!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n-1?"horizontal":"vertical",nowStr:l().format("YYYY.MM.DD HH:mm"),setNowInterval:function(){setInterval((function(){var t=l().format("YYYY.MM.DD HH:mm");C.nowStr=t}),3e4)},changeScreen:function(){"vertical"==C.nowScreen?(C.nowScreen="horizontal",_.push({path:"/horiScreen"})):(C.nowScreen="vertical",_.push({path:"/verScreen"}))},toPlayStop:function(){1==x.stopSign?(x.stopSign=!1,e.emit("toplay")):(x.stopSign=!0,e.emit("tostop"))},toPlay:function(){x.stopSign=!1,e.emit("toplay")},toStop:function(){x.stopSign=!0,e.emit("tostop")},toLast:function(){e.emit("lastpage")},toNext:function(){e.emit("nextpage")}});return u((function(){console.log("pagehead-mounted"),C.setNowInterval()})),n(n({},c(C)),{},{weatherCont:w,projectObj:M,stopSign:j,projectId:S})}}),xt={class:"horHead horSty"},bt={class:"horHead-content"},wt={class:"firtitle"},Mt=function(t){return _("data-v-b75b25fc"),t=t(),x(),t}((function(){return g("div",{class:"sectitle"},"懂空间,更懂办公",-1)})),St={class:"horHead-left"},jt={key:0,class:"CBIClass"},Ct=["src"],Et={class:"horHead-right"},Pt={class:"right-item"},Tt={class:"item-time"},kt={class:"right-item"},At={class:"right-item button-wrap"},Ot=["src"],It=["src"];e("p",d(_t,[["render",function(t,e,n,r,i,o){return m(),p("div",xt,[g("div",bt,[g("div",null,[g("div",wt,v(t.projectObj.localName),1),Mt])]),g("div",St,["Pj1101010007"==t.projectId?(m(),p("div",jt,"塑美尚格")):y("",!0),g("img",{src:t.logo,alt:"",style:{height:"48px"}},null,8,Ct)]),g("div",Et,[g("div",Pt,[g("span",Tt,v(t.nowStr),1)]),g("div",kt,v(t.weatherCont.text),1),g("div",At,[g("img",{class:"controlImg",alt:"",src:"/sgdaping/assets/lastbutton.98e444b1.svg",onClick:e[0]||(e[0]=function(){return t.toLast&&t.toLast.apply(t,arguments)})}),g("img",{class:"controlImg",alt:"",src:t.stopSign?t.playbutton:t.stopbutton,onClick:e[1]||(e[1]=function(){return t.toPlayStop&&t.toPlayStop.apply(t,arguments)})},null,8,Ot),g("img",{class:"controlImg",alt:"",src:"/sgdaping/assets/nextButton.aeca7da3.svg",onClick:e[2]||(e[2]=function(){return t.toNext&&t.toNext.apply(t,arguments)})})]),g("div",{class:"right-item button-wrap",onClick:e[3]||(e[3]=function(){return t.changeScreen&&t.changeScreen.apply(t,arguments)})},[g("img",{class:"firstImg",alt:"",src:"vertical"==t.nowScreen?t.changeHor:t.changeVer},null,8,It)])])])}],["__scopeId","data-v-b75b25fc"]]));var Bt=function(t,e,n){if(null==t)return null;var r=U,i=Z,o=K,a=Q,s=$,l=J,u=tt,c={temp:[{min:Number.NEGATIVE_INFINITY,max:20,image:u,color:"#52A0FF",fcolor:"rgba(0, 95, 163, 0.76)"},{min:20,max:22,image:a,color:"#40DDCE",fcolor:"rgba(0, 160, 163, 0.76)"},{min:22,max:27,image:o,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:27,max:28,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:28,max:30,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:30,max:Number.POSITIVE_INFINITY,image:i,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}],humidity:[{min:0,max:30,image:i,color:"#F5483D",fcolor:"rgba(173, 107, 0, 0.8)"},{min:30,max:35,image:l,color:"#EE9F2B",fcolor:"rgba(133, 148, 0, 0.76)"},{min:35,max:65,image:o,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:65,max:95,image:a,color:"#40DDCE",fcolor:"rgba(0, 160, 163, 0.76)"},{min:95,max:Number.POSITIVE_INFINITY,image:u,color:"#52A0FF",fcolor:"rgba(0, 95, 163, 0.76)"}],co2:[{min:0,max:800,image:o,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:800,max:1e3,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:1e3,max:2500,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:2500,max:Number.POSITIVE_INFINITY,image:i,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}],methanal:[{min:0,max:.08,image:o,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:.08,max:.1,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:.1,max:.2,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:.2,max:Number.POSITIVE_INFINITY,image:i,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}],pm25:[{min:0,max:35,image:o,color:"#7ED874",fcolor:"rgba(34, 139, 81, 0.76)"},{min:35,max:75,image:s,color:"#C4E34F",fcolor:"rgba(133, 148, 0, 0.76)"},{min:75,max:150,image:r,color:"#EFD62E",fcolor:"rgba(156, 137, 0, 0.76)"},{min:150,max:250,image:l,color:"#EE9F2B",fcolor:"rgba(173, 107, 0, 0.8)"},{min:250,max:Number.POSITIVE_INFINITY,image:i,color:"#F5483D",fcolor:"rgba(154, 40, 40, 0.8)"}]},h=null;return c[e].forEach((function(e){t>=e.min&&t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ve(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function ye(){for(var t=0,e=0,n=arguments.length;e-1},be=function(t,e){if(!_e(t))return t;for(var n=[],r=0;rn?n:t},Ze=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},Ke=function(t){return Me(t,"Number")};function Qe(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)e?(r&&(clearTimeout(r),r=null),s=u,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},In={},Bn=function(t){return In[t=t||"g"]?In[t]+=1:In[t]=1,t+In[t]},Ln=function(){};function Fn(t){return je(t)?0:_e(t)?t.length:Object.keys(t).length}var Dn,Rn,Nn,zn=mn((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return Sn||(Sn=document.createElement("canvas").getContext("2d")),Sn.font=[o,a,i,n+"px",r].join(" "),Sn.measureText(Ne(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),ye([t],nn(e)).join("")})),Hn=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();!function(t){t.FORE="fore",t.MID="mid",t.BG="bg"}(Dn||(Dn={})),function(t){t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.RIGHT="right",t.RIGHT_TOP="right-top",t.RIGHT_BOTTOM="right-bottom",t.LEFT="left",t.LEFT_TOP="left-top",t.LEFT_BOTTOM="left-bottom",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t.RADIUS="radius",t.CIRCLE="circle",t.NONE="none"}(Rn||(Rn={})),function(t){t.AXIS="axis",t.GRID="grid",t.LEGEND="legend",t.TOOLTIP="tooltip",t.ANNOTATION="annotation",t.SLIDER="slider",t.SCROLLBAR="scrollbar",t.OTHER="other"}(Nn||(Nn={}));var Gn,Yn,Vn,Xn,qn=3,Wn=2,Un=1;!function(t){t.BEFORE_RENDER="beforerender",t.AFTER_RENDER="afterrender",t.BEFORE_PAINT="beforepaint",t.AFTER_PAINT="afterpaint",t.BEFORE_CHANGE_DATA="beforechangedata",t.AFTER_CHANGE_DATA="afterchangedata",t.BEFORE_CLEAR="beforeclear",t.AFTER_CLEAR="afterclear",t.BEFORE_DESTROY="beforedestroy",t.BEFORE_CHANGE_SIZE="beforechangesize",t.AFTER_CHANGE_SIZE="afterchangesize"}(Gn||(Gn={})),function(t){t.BEFORE_DRAW_ANIMATE="beforeanimate",t.AFTER_DRAW_ANIMATE="afteranimate",t.BEFORE_RENDER_LABEL="beforerenderlabel",t.AFTER_RENDER_LABEL="afterrenderlabel"}(Yn||(Yn={})),function(t){t.MOUSE_ENTER="plot:mouseenter",t.MOUSE_DOWN="plot:mousedown",t.MOUSE_MOVE="plot:mousemove",t.MOUSE_UP="plot:mouseup",t.MOUSE_LEAVE="plot:mouseleave",t.TOUCH_START="plot:touchstart",t.TOUCH_MOVE="plot:touchmove",t.TOUCH_END="plot:touchend",t.TOUCH_CANCEL="plot:touchcancel",t.CLICK="plot:click",t.DBLCLICK="plot:dblclick",t.CONTEXTMENU="plot:contextmenu",t.LEAVE="plot:leave",t.ENTER="plot:enter"}(Vn||(Vn={})),function(t){t.ACTIVE="active",t.INACTIVE="inactive",t.SELECTED="selected",t.DEFAULT="default"}(Xn||(Xn={}));var Zn,Kn,Qn,$n,Jn=["color","shape","size"],tr="_origin",er={};function nr(t,e){er[t]=e}function rr(t,e,n){if(t){if("function"==typeof t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if("function"==typeof t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}}function ir(t){Zn||(Zn=document.createElement("table"),Kn=document.createElement("tr"),Qn=/^\s*<(\w+|!)[^>]*>/,$n={tr:document.createElement("tbody"),tbody:Zn,thead:Zn,tfoot:Zn,td:Kn,th:Kn,"*":document.createElement("div")});var e=Qn.test(t)&&RegExp.$1;e&&e in $n||(e="*");var n=$n[e];t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,n.innerHTML=""+t;var r=n.childNodes[0];return r&&n.contains(r)&&n.removeChild(r),r}function or(t,e,n){var r;try{r=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(i){}finally{r=void 0===r?n:r}return r}function ar(t,e){var n=function(t,e){var n=or(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}(t,e),r=parseFloat(or(t,"borderTopWidth"))||0,i=parseFloat(or(t,"paddingTop"))||0,o=parseFloat(or(t,"paddingBottom"))||0;return n+r+(parseFloat(or(t,"borderBottomWidth"))||0)+i+o+(parseFloat(or(t,"marginTop"))||0)+(parseFloat(or(t,"marginBottom"))||0)}function sr(t,e){var n=function(t,e){var n=or(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}(t,e),r=parseFloat(or(t,"borderLeftWidth"))||0,i=parseFloat(or(t,"paddingLeft"))||0,o=parseFloat(or(t,"paddingRight"))||0,a=parseFloat(or(t,"borderRightWidth"))||0,s=parseFloat(or(t,"marginRight"))||0;return n+r+a+i+o+(parseFloat(or(t,"marginLeft"))||0)+s}function lr(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}function ur(t){return"number"==typeof t&&!isNaN(t)}function cr(t,e,n,r){var i=n,o=r;if(e){var a=function(t){var e=getComputedStyle(t);return{width:(t.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10),height:(t.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)}}(t);i=a.width?a.width:i,o=a.height?a.height:o}return{width:Math.max(ur(i)?i:1,1),height:Math.max(ur(o)?o:1,1)}}var hr=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r2&&(n.push([i].concat(a.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===a.length&&n.push([i,a[0]]),"r"===s)n.push([i].concat(a));else for(;a.length>=e[s]&&(n.push([i].concat(a.splice(0,e[s]))),e[s]););return t})),n},yr=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?o[3]={x:+t[0],y:+t[1]}:i-2===r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},mr=function(t,e,n,r,i){var o=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var a=Math.PI/180,s=t+n*Math.cos(-r*a),l=t+n*Math.cos(-i*a);o=[["M",s,e+n*Math.sin(-r*a)],["A",n,n,0,+(i-r>180),0,l,e+n*Math.sin(-i*a)]]}else o=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return o},_r=function(t){if(!(t=vr(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,o=0,a=0,s=0,l=0;"M"===t[0][0]&&(a=i=+t[0][1],s=o=+t[0][2],l++,r[0]=["M",i,o]);for(var u=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),c=void 0,h=void 0,f=l,d=t.length;f1&&(r*=w=Math.sqrt(w),i*=w);var M=r*r,S=i*i,j=(a===s?-1:1)*Math.sqrt(Math.abs((M*S-M*b*b-S*x*x)/(M*b*b+S*x*x)));p=j*r*b/i+(e+l)/2,g=j*-i*x/r+(n+u)/2,f=Math.asin(((n-g)/i).toFixed(9)),d=Math.asin(((u-g)/i).toFixed(9)),f=ed&&(f-=2*Math.PI),!s&&d>f&&(d-=2*Math.PI)}var C=d-f;if(Math.abs(C)>v){var E=d,P=l,T=u;d=f+v*(s&&d>f?1:-1),m=t(l=p+r*Math.cos(d),u=g+i*Math.sin(d),r,i,o,0,s,P,T,[d,E,p,g])}C=d-f;var k=Math.cos(f),A=Math.sin(f),O=Math.cos(d),I=Math.sin(d),B=Math.tan(C/4),L=4/3*r*B,F=4/3*i*B,D=[e,n],R=[e+L*A,n-F*k],N=[l+L*I,u-F*O],z=[l,u];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],c)return[R,N,z].concat(m);for(var H=[],G=0,Y=(m=[R,N,z].concat(m).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",i&&(l[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},d=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var p=0;p1?1:l<0?0:l)/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,d=0;d<12;d++){var p=u*c[d]+u,g=Cr(p,t,n,i,a),v=Cr(p,e,r,o,s),y=g*g+v*v;f+=h[d]*Math.sqrt(y)}return u*f},Pr=function(t,e,n,r,i,o,a,s){for(var l,u,c,h,f=[],d=[[],[]],p=0;p<2;++p)if(0===p?(u=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*a,c=3*n-3*t):(u=6*e-12*r+6*o,l=-3*e+9*r-9*o+3*s,c=3*r-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;(h=-c/u)>0&&h<1&&f.push(h)}else{var g=u*u-4*c*l,v=Math.sqrt(g);if(!(g<0)){var y=(-u+v)/(2*l);y>0&&y<1&&f.push(y);var m=(-u-v)/(2*l);m>0&&m<1&&f.push(m)}}for(var _,x=f.length,b=x;x--;)_=1-(h=f[x]),d[0][x]=_*_*_*t+3*_*_*h*n+3*_*h*h*i+h*h*h*a,d[1][x]=_*_*_*e+3*_*_*h*r+3*_*h*h*o+h*h*h*s;return d[0][b]=t,d[1][b]=e,d[0][b+1]=a,d[1][b+1]=s,d[0].length=d[1].length=b+2,{min:{x:Math.min.apply(0,d[0]),y:Math.min.apply(0,d[1])},max:{x:Math.max.apply(0,d[0]),y:Math.max.apply(0,d[1])}}},Tr=function(t,e,n,r,i,o,a,s){if(!(Math.max(t,n)Math.max(i,a)||Math.max(e,r)Math.max(o,s))){var l=(t-n)*(o-s)-(e-r)*(i-a);if(l){var u=((t*r-e*n)*(i-a)-(t-n)*(i*s-o*a))/l,c=((t*r-e*n)*(o-s)-(e-r)*(i*s-o*a))/l,h=+u.toFixed(2),f=+c.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,a).toFixed(2)||h>+Math.max(i,a).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(o,s).toFixed(2)||f>+Math.max(o,s).toFixed(2)))return{x:u,y:c}}}},kr=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},Ar=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var o=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return o.parsePathArray=jr,o},Or=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:Ar(t,e,n,r),vb:[t,e,n,r].join(" ")}},Ir=function(t,e,n,r,i,o,a,s){Ce(t)||(t=[t,e,n,r,i,o,a,s]);var l=Pr.apply(null,t);return Or(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},Br=function(t,e,n,r,i,o,a,s,l){var u=1-l,c=Math.pow(u,3),h=Math.pow(u,2),f=l*l,d=f*l,p=t+2*l*(n-t)+f*(i-2*n+t),g=e+2*l*(r-e)+f*(o-2*r+e),v=n+2*l*(i-n)+f*(a-2*i+n),y=r+2*l*(o-r)+f*(s-2*o+r);return{x:c*t+3*h*l*n+3*u*l*l*i+d*a,y:c*e+3*h*l*r+3*u*l*l*o+d*s,m:{x:p,y:g},n:{x:v,y:y},start:{x:u*t+l*n,y:u*e+l*r},end:{x:u*i+l*a,y:u*o+l*s},alpha:90-180*Math.atan2(p-v,g-y)/Math.PI}},Lr=function(t,e,n){if(!function(t,e){return t=Or(t),e=Or(e),kr(e,t.x,t.y)||kr(e,t.x2,t.y)||kr(e,t.x,t.y2)||kr(e,t.x2,t.y2)||kr(t,e.x,e.y)||kr(t,e.x2,e.y)||kr(t,e.x,e.y2)||kr(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(Ir(t),Ir(e)))return n?0:[];for(var r=~~(Er.apply(0,t)/8),i=~~(Er.apply(0,e)/8),o=[],a=[],s={},l=n?0:[],u=0;u=0&&_<=1&&x>=0&&x<=1&&(n?l+=1:l.push({x:m.x,y:m.y,t1:_,t2:x}))}}return l};function Fr(t,e){var n=[],r=[];return t.length&&function t(e,i){if(1===e.length)n.push(e[0]),r.push(e[0]);else{for(var o=[],a=0;a=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var o=0;o<=n-1;o++)r.push(i)}return r},Rr=function(t,e){if(t.length!==e.length)return!1;var n=!0;return Pe(t,(function(t,r){if(t!==e[r])return n=!1,!1})),n};function Nr(t,e,n){var r=null,i=n;return e=0;l--)a=o[l].index,"add"===o[l].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=i-(r=t.length);if(r0)){t[r]=e[r];break}n=Hr(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=Hr(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=Hr(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t},Vr=Object.freeze(Object.defineProperty({__proto__:null,catmullRomToBezier:yr,fillPath:function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function xi(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),li=new ui(3),ui!=Float32Array&&(li[0]=0,li[1]=0,li[2]=0);var bi=di;function wi(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return function(t,e){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1}(r,n),ci(t,r,e)}function Mi(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return function(t,e){var n=Math.sin(e),r=Math.cos(e);t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1}(r,n),ci(t,r,e)}function Si(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return function(t,e){t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1}(r,n),ci(t,r,e)}function ji(t,e,n){return ci(t,n,e)}function Ci(t,e){for(var n=t?[].concat(t):[1,0,0,0,1,0,0,0,1],r=0,i=e.length;r=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r}function Pi(t,e){var n=[],r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],f=e[0],d=e[1],p=e[2],g=e[3],v=e[4],y=e[5],m=e[6],_=e[7],x=e[8];return n[0]=f*r+d*a+p*u,n[1]=f*i+d*s+p*c,n[2]=f*o+d*l+p*h,n[3]=g*r+v*a+y*u,n[4]=g*i+v*s+y*c,n[5]=g*o+v*l+y*h,n[6]=m*r+_*a+x*u,n[7]=m*i+_*s+x*c,n[8]=m*o+_*l+x*h,n}function Ti(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}function ki(t){var e=[],n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=c*a-s*u,f=-c*o+s*l,d=u*o-a*l,p=n*h+r*f+i*d;return p?(p=1/p,e[0]=h*p,e[1]=(-c*r+i*u)*p,e[2]=(s*r-i*a)*p,e[3]=f*p,e[4]=(c*n-i*l)*p,e[5]=(-s*n+i*o)*p,e[6]=d*p,e[7]=(-u*n+r*l)*p,e[8]=(a*n-r*o)*p,e):null}!function(){var t=function(){var t=new ui(2);return ui!=Float32Array&&(t[0]=0,t[1]=0),t}()}();var Ai=Ci,Oi="matrix",Ii=["zIndex","capture","visible","type"],Bi=["repeat"];function Li(t,e){var n={},r=e.attrs;for(var i in t)n[i]=r[i];return n}function Fi(t,e){var n={},r=e.attr();return Pe(t,(function(t,e){-1!==Bi.indexOf(e)||jn(r[e],t)||(n[e]=t)})),n}function Di(t,e){if(e.onFrame)return t;var n=e.startTime,r=e.delay,i=e.duration,o=Object.prototype.hasOwnProperty;return Pe(t,(function(t){n+rt.delay&&Pe(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var Ri=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return gn(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return ce(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?r=Di(r,m):n.addAnimator(this),r.push(m),this.set("animations",r),this.set("_pause",{isPaused:!1})}},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0),Pe(this.get("animations"),(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),n=t.getTime();return Pe(e,(function(t){t._paused=!0,t._pauseTime=n,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return Pe(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){var n,r=this,i=e.propagationPath;this.getEvents(),"mouseenter"===t?n=e.fromShape:"mouseleave"===t&&(n=e.toShape);for(var o=function(t){var o=i[t],s=o.get("name");if(s){if((o.isGroup()||o.isCanvas&&o.isCanvas())&&n&&Ur(o,n))return"break";Ce(s)?Pe(s,(function(t){r.emitDelegateEvent(o,t,e)})):a.emitDelegateEvent(o,s,e)}},a=this,s=0;s0)}));return a.length>0?(Pe(a,(function(t){var e=t.getBBox();i.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Le(i),e=Be(i),n=Le(o),r=Be(o)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(Pe(a,(function(t){var e=t.getCanvasBBox();i.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Le(i),e=Be(i),n=Le(o),r=Be(o)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){Pe(this.getChildren(),(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(Zr(a)&&(a.isGroup()?i=a.getShape(e,n,r):a.isHit(e,n)&&(i=a)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),qr(t.getChildren(),e)}(i,t,!1),t.set("parent",this),e&&Hi(t,e),r&&Gi(t,r),n.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();Pe(e,(function(t,e){return t[zi]=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var r=t(e,n);return 0===r?e[zi]-n[zi]:r})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[];return Pe(this.getChildren(),(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null;return Pe(this.getChildren(),(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(Ri),qi=0,Wi=0,Ui=0,Zi=0,Ki=0,Qi=0,$i="object"===("undefined"==typeof performance?"undefined":t(performance))&&performance.now?performance:Date,Ji="object"===("undefined"==typeof window?"undefined":t(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function to(){return Ki||(Ji(eo),Ki=$i.now()+Qi)}function eo(){Ki=0}function no(){this._call=this._time=this._next=null}function ro(t,e,n){var r=new no;return r.restart(t,e,n),r}function io(){Ki=(Zi=$i.now())+Qi,qi=Wi=0;try{!function(){to(),++qi;for(var t,e=Yi;e;)(t=Ki-e._time)>=0&&e._call.call(null,t),e=e._next;--qi}()}finally{qi=0,function(){var t,e,n=Yi,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Yi=e);Vi=t,ao(r)}(),Ki=0}}function oo(){var t=$i.now(),e=t-Zi;e>1e3&&(Qi-=e,Zi=t)}function ao(t){qi||(Wi&&(Wi=clearTimeout(Wi)),t-Ki>24?(t<1/0&&(Wi=setTimeout(io,t-$i.now()-Qi)),Ui&&(Ui=clearInterval(Ui))):(Ui||(Zi=$i.now(),Ui=setInterval(oo,1e3)),qi=1,Ji(io)))}function so(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function lo(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function uo(){}no.prototype=ro.prototype={constructor:no,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?to():+n)+(null==e?0:+e),this._next||Vi===this||(Vi?Vi._next=this:Yi=this,Vi=this),this._call=t,this._time=n,ao()},stop:function(){this._call&&(this._call=null,this._time=1/0,ao())}};var co=.7,ho=1/co,fo="\\s*([+-]?\\d+)\\s*",po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vo=/^#([0-9a-f]{3,8})$/,yo=new RegExp("^rgb\\(".concat(fo,",").concat(fo,",").concat(fo,"\\)$")),mo=new RegExp("^rgb\\(".concat(go,",").concat(go,",").concat(go,"\\)$")),_o=new RegExp("^rgba\\(".concat(fo,",").concat(fo,",").concat(fo,",").concat(po,"\\)$")),xo=new RegExp("^rgba\\(".concat(go,",").concat(go,",").concat(go,",").concat(po,"\\)$")),bo=new RegExp("^hsl\\(".concat(po,",").concat(go,",").concat(go,"\\)$")),wo=new RegExp("^hsla\\(".concat(po,",").concat(go,",").concat(go,",").concat(po,"\\)$")),Mo={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 So(){return this.rgb().formatHex()}function jo(){return this.rgb().formatRgb()}function Co(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=vo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Eo(e):3===n?new Ao(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Po(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Po(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yo.exec(t))?new Ao(e[1],e[2],e[3],1):(e=mo.exec(t))?new Ao(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=_o.exec(t))?Po(e[1],e[2],e[3],e[4]):(e=xo.exec(t))?Po(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=bo.exec(t))?Do(e[1],e[2]/100,e[3]/100,1):(e=wo.exec(t))?Do(e[1],e[2]/100,e[3]/100,e[4]):Mo.hasOwnProperty(t)?Eo(Mo[t]):"transparent"===t?new Ao(NaN,NaN,NaN,0):null}function Eo(t){return new Ao(t>>16&255,t>>8&255,255&t,1)}function Po(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ao(t,e,n,r)}function To(t){return t instanceof uo||(t=Co(t)),t?new Ao((t=t.rgb()).r,t.g,t.b,t.opacity):new Ao}function ko(t,e,n,r){return 1===arguments.length?To(t):new Ao(t,e,n,null==r?1:r)}function Ao(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Oo(){return"#".concat(Fo(this.r)).concat(Fo(this.g)).concat(Fo(this.b))}function Io(){var t=Bo(this.opacity);return"".concat(1===t?"rgb(":"rgba(").concat(Lo(this.r),", ").concat(Lo(this.g),", ").concat(Lo(this.b)).concat(1===t?")":", ".concat(t,")"))}function Bo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Lo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fo(t){return((t=Lo(t))<16?"0":"")+t.toString(16)}function Do(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new No(t,e,n,r)}function Ro(t){if(t instanceof No)return new No(t.h,t.s,t.l,t.opacity);if(t instanceof uo||(t=Co(t)),!t)return new No;if(t instanceof No)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,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&l<1?0:a,new No(a,s,l,t.opacity)}function No(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function zo(t){return(t=(t||0)%360)<0?t+360:t}function Ho(t){return Math.max(0,Math.min(1,t||0))}function Go(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}so(uo,Co,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:So,formatHex:So,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ro(this).formatHsl()},formatRgb:jo,toString:jo}),so(Ao,ko,lo(uo,{brighter:function(t){return t=null==t?ho:Math.pow(ho,t),new Ao(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?co:Math.pow(co,t),new Ao(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new Ao(Lo(this.r),Lo(this.g),Lo(this.b),Bo(this.opacity))},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:Oo,formatHex:Oo,formatHex8:function(){return"#".concat(Fo(this.r)).concat(Fo(this.g)).concat(Fo(this.b)).concat(Fo(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:Io,toString:Io})),so(No,(function(t,e,n,r){return 1===arguments.length?Ro(t):new No(t,e,n,null==r?1:r)}),lo(uo,{brighter:function(t){return t=null==t?ho:Math.pow(ho,t),new No(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?co:Math.pow(co,t),new No(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 Ao(Go(t>=240?t-240:t+120,i,r),Go(t,i,r),Go(t<120?t+240:t-120,i,r),this.opacity)},clamp:function(){return new No(zo(this.h),Ho(this.s),Ho(this.l),Bo(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=Bo(this.opacity);return"".concat(1===t?"hsl(":"hsla(").concat(zo(this.h),", ").concat(100*Ho(this.s),"%, ").concat(100*Ho(this.l),"%").concat(1===t?")":", ".concat(t,")"))}}));var Yo=function(t){return function(){return t}};function Vo(t){return 1==(t=+t)?Xo:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Yo(isNaN(e)?n:e)}}function Xo(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Yo(isNaN(t)?e:t)}var qo=function t(e){var n=Vo(e);function r(t,e){var r=n((t=ko(t)).r,(e=ko(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Xo(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Wo(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;no&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Qo(n,r)})),o=ta.lastIndex;return of.length?(h=vr(o[c]),f=vr(i[c]),f=zr(f,h),f=Yr(f,h),e.fromAttrs.path=f,e.toAttrs.path=h):e.pathFormatted||(h=vr(o[c]),f=vr(i[c]),f=Yr(f,h),e.fromAttrs.path=f,e.toAttrs.path=h,e.pathFormatted=!0),r[c]=[];for(var d=0;d0){for(var o=r.animators.length-1;o>=0;o--)if((t=r.animators[o]).destroyed)r.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],Ta(t,n,i)&&(e.splice(a,1),!1,n.callback&&n.callback());0===e.length&&r.removeAnimator(o)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Aa=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function Oa(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function Ia(t,e,n){if(n.bubbles){var r=void 0,i=!1;if("mouseenter"===e?(r=n.fromShape,i=!0):"mouseleave"===e&&(i=!0,r=n.toShape),t.isCanvas()&&i)return;if(r&&Ur(t,r))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var Ba=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){if(e.canvas.get("el")!==t.target&&(e.dragging||e.currentShape)){var n=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,n,e.draggingShape)}},this._onDocumentMouseUp=function(t){if(e.canvas.get("el")!==t.target&&e.dragging){var n=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,n,null),e._emitEvent("dragend",t,n,e.draggingShape),e._afterDrag(e.draggingShape,n,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");Pe(Aa,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");Pe(Aa,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,r,i,o){var a=new Xr(t,e);return a.fromShape=i,a.toShape=o,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.propagationPath.push(r),a},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e=this.canvas,n=e.getClientByEvent(t),r=e.getPointByEvent(t);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),r=this._getShape(n,e),i=this["_on"+t],o=!1;if(i)i.call(this,n,r,e);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,r),r&&this._emitEvent(t,e,n,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,e,n,a,a,null),this._emitEvent(t,e,n,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,r,null,null)}if(o||(this.currentShape=r),r&&!r.get("destroyed")){var s=this.canvas;s.get("el").style.cursor=r.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,n){0===n.button&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,r){var i=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",t,e,n,n,r),this._emitEvent("mouseleave",t,e,n,n,r),r&&!r.get("destroyed")||(i.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,e,r,n,r),this._emitEvent("mouseenter",t,e,r,n,r)))},t.prototype._emitDragoverEvents=function(t,e,n,r,i){r?(r!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,r),this._emitEvent("dragenter",t,e,r,n,r)),i||this._emitEvent("dragover",t,e,r)):n&&this._emitEvent("dragleave",t,e,n,n,r),i&&this._emitEvent("dragover",t,e,r)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(e,n);r!==t&&this._emitMouseoverEvents(n,e,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,e,n){if(0===n.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,r),this._afterDrag(r,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,t,r,e,!0)},t.prototype._onmousemove=function(t,e,n){var r=this.canvas,i=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(n,t,i,e,!1),this._emitEvent("drag",n,t,o);else{var a=this.mousedownPoint;if(a){var s=this.mousedownShape,l=n.timeStamp-this.mousedownTimeStamp,u=a.clientX-t.clientX,c=a.clientY-t.clientY;l>120||u*u+c*c>40?s&&s.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,r,i,o){var a=this._getEventObj(t,e,n,r,i,o);if(r){a.shape=r,Oa(r,t,a);for(var s=r.getParent();s;)s.emitDelegation(t,a),a.propagationStopped||Ia(s,t,a),a.propagationPath.push(s),s=s.getParent()}else{Oa(this.canvas,t,a)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),La=ai(),Fa=La&&"firefox"===La.name,Da=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e.supportCSSTransform=!1,e},e.prototype.initContainer=function(){var t=this.get("container");Ne(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){var t=new Ba({canvas:this});t.init(),this.set("eventController",t)},e.prototype.initTimeline=function(){var t=new ka(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");Wr&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");Wr&&e&&(e.style.cursor=t)},e.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(Fa&&!je(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!je(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var e=this.getClientByEvent(t),n=e.x,r=e.y;return this.getPointByClient(n,r)},e.prototype.getClientByEvent=function(t){var e=t;return t.touches&&(e="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:e.clientX,y:e.clientY}},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){this.get("eventController").destroy()},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Xi),Ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,o=t.maxY;if(e){var a=Ti(e,[t.minX,t.minY]),s=Ti(e,[t.maxX,t.minY]),l=Ti(e,[t.minX,t.maxY]),u=Ti(e,[t.maxX,t.maxY]);n=Math.min(a[0],s[0],l[0],u[0]),i=Math.max(a[0],s[0],l[0],u[0]),r=Math.min(a[1],s[1],l[1],u[1]),o=Math.max(a[1],s[1],l[1],u[1])}var c=this.attrs;if(c.shadowColor){var h=c.shadowBlur,f=void 0===h?0:h,d=c.shadowOffsetX,p=void 0===d?0:d,g=c.shadowOffsetY,v=void 0===g?0:g,y=n-f+p,m=i+f+p,_=r-f+v,x=o+f+v;n=Math.min(n,y),i=Math.max(i,m),r=Math.min(r,_),o=Math.max(o,x)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:o,width:i-n,height:o-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1],o=(i=this.invertFromMatrix(i))[0],a=i[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(r&&r.isHit(o,a))return!0}return!1},e}(Ri),za=new Map;function Ha(t,e){za.set(t,e)}function Ga(t){return za.get(t)}function Ya(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}}function Va(t){var e=t.attr(),n=e.x,r=e.y,i=e.r;return{x:n-i,y:r-i,width:2*i,height:2*i}}function Xa(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function qa(t,e){return Math.abs(t-e)<.001}function Wa(t,e){var n=Le(t),r=Le(e);return{x:n,y:r,width:Be(t)-n,height:Be(e)-r}}function Ua(t){return(t+2*Math.PI)%(2*Math.PI)}var Za={box:function(t,e,n,r){return Wa([t,n],[e,r])},length:function(t,e,n,r){return Xa(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Xa(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Xa(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];_i(s,s);var l=[i-t,o-e];return Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}(l,s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Ka(t,e,n,r,i,o){var a,s=1/0,l=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,h=c/10,f=0;f<=u;f++){var d=f*c,p=[i.apply(null,t.concat([d])),i.apply(null,e.concat([d]))];(m=Xa(l[0],l[1],p[0],p[1]))=0&&m=0?[i]:[]}function Ja(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function ts(t,e,n,r,i,o,a){var s=Qa(t,n,i,a),l=Qa(e,r,o,a),u=Za.pointAt(t,e,n,r,a),c=Za.pointAt(n,r,i,o,a);return[[t,e,u.x,u.y,s,l],[s,l,c.x,c.y,i,o]]}function es(t,e,n,r,i,o,a){if(0===a)return(Xa(t,e,n,r)+Xa(n,r,i,o)+Xa(t,e,i,o))/2;var s=ts(t,e,n,r,i,o,.5),l=s[0],u=s[1];return l.push(a-1),u.push(a-1),es.apply(null,l)+es.apply(null,u)}var ns={box:function(t,e,n,r,i,o){var a=$a(t,n,i)[0],s=$a(e,r,o)[0],l=[t,i],u=[e,o];return void 0!==a&&l.push(Qa(t,n,i,a)),void 0!==s&&u.push(Qa(e,r,o,s)),Wa(l,u)},length:function(t,e,n,r,i,o){return es(t,e,n,r,i,o,3)},nearestPoint:function(t,e,n,r,i,o,a,s){return Ka([t,n,i],[e,r,o],a,s,Qa)},pointDistance:function(t,e,n,r,i,o,a,s){var l=this.nearestPoint(t,e,n,r,i,o,a,s);return Xa(l.x,l.y,a,s)},interpolationAt:Qa,pointAt:function(t,e,n,r,i,o,a){return{x:Qa(t,n,i,a),y:Qa(e,r,o,a)}},divide:function(t,e,n,r,i,o,a){return ts(t,e,n,r,i,o,a)},tangentAngle:function(t,e,n,r,i,o,a){var s=Ja(t,n,i,a),l=Ja(e,r,o,a);return Ua(Math.atan2(l,s))}};function rs(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function is(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function os(t,e,n,r){var i,o,a,s=-3*t+9*e-9*n+3*r,l=6*t-12*e+6*n,u=3*e-3*t,c=[];if(qa(s,0))qa(l,0)||(i=-u/l)>=0&&i<=1&&c.push(i);else{var h=l*l-4*s*u;qa(h,0)?c.push(-l/(2*s)):h>0&&(o=(-l-(a=Math.sqrt(h)))/(2*s),(i=(-l+a)/(2*s))>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function as(t,e,n,r,i,o,a,s,l){var u=rs(t,n,i,a,l),c=rs(e,r,o,s,l),h=Za.pointAt(t,e,n,r,l),f=Za.pointAt(n,r,i,o,l),d=Za.pointAt(i,o,a,s,l),p=Za.pointAt(h.x,h.y,f.x,f.y,l),g=Za.pointAt(f.x,f.y,d.x,d.y,l);return[[t,e,h.x,h.y,p.x,p.y,u,c],[u,c,g.x,g.y,d.x,d.y,a,s]]}function ss(t,e,n,r,i,o,a,s,l){if(0===l)return function(t,e){for(var n=0,r=t.length,i=0;iu&&(u=d)}var p=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),g=1/0,v=-1/0,y=[o,a];for(h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var m=p+h;ov&&(v=_)}return{x:l,y:g,width:u-l,height:v-g}};var fs=function(t){return function(t){if(t.length<2)return 0;for(var e=0,n=0;n1){var i=function(t,e){return e?e-t:.14*t}(e,n);return e*r+i*(r-1)}return e}function ms(t){var e=t.fontSize,n=t.fontFamily,r=t.fontWeight;return[t.fontStyle,t.fontVariant,r,e+"px",n].join(" ").trim()}var _s=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,xs=/[^\s\,]+/gi;function bs(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r=!!e,i=[],o=0,a=t.length;o2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););return""})),n}var Cs=/[a-z]/;function Es(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Ps(t){var e=js(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,l=0,u=0,c=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(l=a=+h[1],u=s=+h[2],c++,o[0]=["M",a,s]);r=c;for(var f=e.length;r1&&(n*=Math.sqrt(d),r*=Math.sqrt(d));var p=n*n*(f*f)+r*r*(h*h),g=p?Math.sqrt((n*n*(r*r)-p)/p):1;o===a&&(g*=-1),isNaN(g)&&(g=0);var v=r?g*n*f/r:0,y=n?g*-r*h/n:0,m=(s+u)/2+Math.cos(i)*v-Math.sin(i)*y,_=(l+c)/2+Math.sin(i)*v+Math.cos(i)*y,x=[(h-v)/n,(f-y)/r],b=[(-1*h-v)/n,(-1*f-y)/r],w=As([1,0],x),M=As(x,b);return ks(x,b)<=-1&&(M=Math.PI),ks(x,b)>=1&&(M=0),0===a&&M>0&&(M-=2*Math.PI),1===a&&M<0&&(M+=2*Math.PI),{cx:m,cy:_,rx:Os(t,[u,c])?0:n,ry:Os(t,[u,c])?0:r,startAngle:w,endAngle:w+M,xRotation:i,arcFlag:o,sweepFlag:a}}function Bs(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Ls(t){t=function(t){var e=t||[];return Ce(e)?e:Ne(e)?(Pe(e=e.match(_s),(function(t,n){if((t=t.match(xs))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}Pe(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}(t);for(var e=[],n=null,r=null,i=null,o=0,a=t.length,s=0;s=e&&t<=n};function Ds(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Rs(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function Ns(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o=0;o0!=Ds(s[1]-n)>0&&Ds(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(r=!r)}return r}function zs(t){for(var e=[],n=t.length,r=0;r1){var a=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:a[0],y:a[1]}})}return e}function Hs(t,e){var n=!1;return Pe(t,(function(t){if(function(t,e,n,r){var i=n.x-t.x,o=n.y-t.y,a=e.x-t.x,s=e.y-t.y,l=r.x-n.x,u=r.y-n.y,c=a*u-s*l,h=null;if(c*c>.001*(a*a+s*s)*(l*l+u*u)){var f=(i*u-o*l)/c,d=(i*s-o*a)/c;Fs(f,0,1)&&Fs(d,0,1)&&(h={x:t.x+f*a,y:t.y+f*s})}return h}(t.from,t.to,e.from,e.to))return n=!0,!1})),n}function Gs(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function Ys(t,e){var n=t.prePoint,r=t.currentPoint,i=t.nextPoint,o=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),a=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),l=Math.acos((o+a-s)/(2*Math.sqrt(o)*Math.sqrt(a)));if(!l||0===Math.sin(l)||Qe(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),c=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));return u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c,{xExtra:Math.cos(l/2-u)*(e/2*(1/Math.sin(l/2)))-e/2||0,yExtra:Math.cos(c-l/2)*(e/2*(1/Math.sin(l/2)))-e/2||0}}Ha("rect",Ya),Ha("image",Ya),Ha("circle",Va),Ha("marker",Va),Ha("polyline",(function(t){for(var e=t.attr().points,n=[],r=[],i=0;i=0},t.prototype.getAdjustRange=function(t,e,n){var r,i,o=this.yField,a=n.indexOf(e),s=n.length;return!o&&this.isAdjust("y")?(r=0,i=1):s>1?(r=n[0===a?0:a-1],i=n[a===s-1?s-1:a+1],0!==a?r+=(e-r)/2:r-=(i-e)/2,a!==s-1?i-=(i-e)/2:i+=(e-n[s-2])/2):(r=0===e?0:e-.5,i=0===e?1:e+.5),{pre:r,next:i}},t.prototype.adjustData=function(t,e){var n=this,r=this.getDimValues(e);Pe(t,(function(t,e){Pe(r,(function(r,i){n.adjustDim(i,r,t,e)}))}))},t.prototype.groupData=function(t,e){return Pe(t,(function(t){void 0===t[e]&&(t[e]=0)})),qe(t,e)},t.prototype.adjustDim=function(t,e,n,r){},t.prototype.getDimValues=function(t){var e=this.xField,n=this.yField,r=gn({},this.dimValuesMap),i=[];if(e&&this.isAdjust("x")&&i.push(e),n&&this.isAdjust("y")&&i.push(n),i.forEach((function(e){r&&r[e]||(r[e]=He(t,e).sort((function(t,e){return t-e})))})),!n&&this.isAdjust("y")){r.y=[0,1]}return r},t}(),Xs={},qs=function(t){return Xs[t.toLowerCase()]},Ws=function(t,e){if(qs(t))throw new Error("Adjust type '"+t+"' existed.");Xs[t.toLowerCase()]=e},Us=function(t,e){return Us=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},Us(t,e)};function Zs(t,e){function n(){this.constructor=t}Us(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Ks=function(){return Ks=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0)r=u+this.getIntervalOnlyOffset(n,e);else if(!je(l)&&je(s)&&l>=0){r=u+this.getDodgeOnlyOffset(n,e)}else if(!je(s)&&!je(l)&&s>=0&&l>=0){r=u+this.getIntervalAndDodgeOffset(n,e)}else{var f=h*o/n,d=a*f;r=(u+c)/2+(.5*(h-n*f-(n-1)*d)+((e+1)*f+e*d)-.5*f-.5*h)}return r},e.prototype.getIntervalOnlyOffset=function(t,e){var n=this,r=n.defaultSize,i=n.intervalPadding,o=n.xDimensionLegenth,a=n.groupNum,s=n.dodgeRatio,l=n.maxColumnWidth,u=n.minColumnWidth,c=n.columnWidthRatio,h=i/o,f=(1-(a-1)*h)/a*s/(t-1),d=((1-h*(a-1))/a-f*(t-1))/t;if(d=je(c)?d:1/a/t*c,!je(l)){var p=l/o;d=Math.min(d,p)}if(!je(u)){var g=u/o;d=Math.max(d,g)}return((.5+e)*(d=r?r/o:d)+e*(f=((1-(a-1)*h)/a-t*d)/(t-1))+.5*h)*a-h/2},e.prototype.getDodgeOnlyOffset=function(t,e){var n=this,r=n.defaultSize,i=n.dodgePadding,o=n.xDimensionLegenth,a=n.groupNum,s=n.marginRatio,l=n.maxColumnWidth,u=n.minColumnWidth,c=n.columnWidthRatio,h=i/o,f=1*s/(a-1),d=((1-f*(a-1))/a-h*(t-1))/t;if(d=c?1/a/t*c:d,!je(l)){var p=l/o;d=Math.min(d,p)}if(!je(u)){var g=u/o;d=Math.max(d,g)}return((.5+e)*(d=r?r/o:d)+e*h+.5*(f=(1-(d*t+h*(t-1))*a)/(a-1)))*a-f/2},e.prototype.getIntervalAndDodgeOffset=function(t,e){var n=this,r=n.intervalPadding,i=n.dodgePadding,o=n.xDimensionLegenth,a=n.groupNum,s=r/o,l=i/o;return((.5+e)*(((1-s*(a-1))/a-l*(t-1))/t)+e*l+.5*s)*a-s/2},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,n=this.cacheMap,r=n[t];return r||(r={},Pe(e,(function(e,n){var i=He(e,t);i.length||i.push(0),Pe(i,(function(t){r[t]||(r[t]=[]),r[t].push(n)}))})),n[t]=r),r},e}(Vs);var $s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Zs(e,t),e.prototype.process=function(t){var e=vn(t),n=Ie(e);return this.adjustData(e,n),e},e.prototype.adjustDim=function(t,e,n){var r=this;return Pe(this.groupData(n,t),(function(n,i){return r.adjustGroup(n,t,parseFloat(i),e)}))},e.prototype.getAdjustOffset=function(t){var e=t.pre,n=t.next,r=.05*(n-e);return function(t,e){return(e-t)*Math.random()+t}(e+r,n-r)},e.prototype.adjustGroup=function(t,e,n,r){var i=this,o=this.getAdjustRange(e,n,r);return Pe(t,(function(t){t[e]=i.getAdjustOffset(o)})),t},e}(Vs),Js=Hn,tl=function(t){function e(e){var n=t.call(this,e)||this,r=e.adjustNames,i=void 0===r?["y"]:r,o=e.height,a=void 0===o?NaN:o,s=e.size,l=void 0===s?10:s,u=e.reverseOrder,c=void 0!==u&&u;return n.adjustNames=i,n.height=a,n.size=l,n.reverseOrder=c,n}return Zs(e,t),e.prototype.process=function(t){var e=this.yField,n=this.reverseOrder,r=e?this.processStack(t):this.processOneDimStack(t);return n?this.reverse(r):r},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this,n=e.xField,r=e.yField,i=e.reverseOrder?this.reverse(t):t,o=new Js,a=new Js;return i.map((function(t){return t.map((function(t){var e,i=Pn(t,n,0),s=Pn(t,[r]),l=i.toString();if(s=Ce(s)?s[1]:s,!je(s)){var u=s>=0?o:a;u.has(l)||u.set(l,0);var c=u.get(l),h=s+c;return u.set(l,h),Ks(Ks({},t),((e={})[r]=[c,h],e))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,n=this,r=n.xField,i=n.height,o=n.reverseOrder,a=o?this.reverse(t):t,s=new Js;return a.map((function(t){return t.map((function(t){var n,o=e.size,a=t[r],l=2*o/i;s.has(a)||s.set(a,l/2);var u=s.get(a);return s.set(a,u+l),Ks(Ks({},t),((n={}).y=u,n))}))}))},e}(Vs),el=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Zs(e,t),e.prototype.process=function(t){var e=Ie(t),n=this.xField,r=this.yField,i=this.getXValuesMaxMap(e),o=Math.max.apply(Math,Object.keys(i).map((function(t){return i[t]})));return Cn(t,(function(t){return Cn(t,(function(t){var e,a,s=t[r],l=t[n];if(Ce(s)){var u=(o-i[l])/2;return Ks(Ks({},t),((e={})[r]=Cn(s,(function(t){return u+t})),e))}var c=(o-s)/2;return Ks(Ks({},t),((a={})[r]=[c,s+c],a))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,n=this.xField,r=this.yField;return function(t,e){void 0===e&&(e=En);var n={};return Ee(t)&&!je(t)&&Object.keys(t).forEach((function(r){n[r]=e(t[r],r)})),n}(qe(t,(function(t){return t[n]})),(function(t){return e.getDimMaxValue(t,r)}))},e.prototype.getDimMaxValue=function(t,e){var n=Cn(t,(function(t){return Pn(t,e,[])})),r=Ie(n);return Math.max.apply(Math,r)},e}(Vs);Ws("Dodge",Qs),Ws("Jitter",$s),Ws("Stack",tl),Ws("Symmetric",el);var nl=function(t,e){return Ne(e)?e:t.invert(t.scale(e))},rl=function(){function t(t){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(t)}return t.prototype.mapping=function(){for(var t=this,e=[],n=0;n1?1:Number(e),r=t.length-1,i=Math.floor(r*n),o=r*n-i,a=t[i],s=i===r?a:t[i+1];return hl([cl(a,s,o,0),cl(a,s,o,1),cl(a,s,o,2)])}(n,t)}},toRGB:mn(gl),toCSSGradient:function(t){if(/^[r,R,L,l]{1}[\s]*\(/.test(t)){var e,n=void 0;if("l"===t[0]){var r=+(i=sl.exec(t))[1]+90;n=i[2],e="linear-gradient("+r+"deg, "}else if("r"===t[0]){var i;e="radial-gradient(",n=(i=ll.exec(t))[4]}var o=n.match(ul);return Pe(o,(function(t,n){var r=t.split(":");e+=r[1]+" "+100*r[0]+"%",n!==o.length-1&&(e+=", ")})),e+=")"}return t}},yl=function(t){function e(e){var n=t.call(this,e)||this;return n.type="color",n.names=["color"],Ne(n.values)&&(n.linear=!0),n.gradient=vl.gradient(n.values),n}return ol(e,t),e.prototype.getLinearValue=function(t){return this.gradient(t)},e}(rl),ml=function(t){function e(e){var n=t.call(this,e)||this;return n.type="opacity",n.names=["opacity"],n}return ol(e,t),e}(rl),_l=function(t){function e(e){var n=t.call(this,e)||this;return n.names=["x","y"],n.type="position",n}return ol(e,t),e.prototype.mapping=function(t,e){var n=this.scales,r=n[0],i=n[1];return je(t)||je(e)?[]:[Ce(t)?t.map((function(t){return r.scale(t)})):r.scale(t),Ce(e)?e.map((function(t){return i.scale(t)})):i.scale(e)]},e}(rl),xl=function(t){function e(e){var n=t.call(this,e)||this;return n.type="shape",n.names=["shape"],n}return ol(e,t),e.prototype.getLinearValue=function(t){var e=Math.round((this.values.length-1)*t);return this.values[e]},e}(rl),bl=function(t){function e(e){var n=t.call(this,e)||this;return n.type="size",n.names=["size"],n}return ol(e,t),e}(rl),wl={};function Ml(t,e){wl[t]=e}var Sl=function(){function t(t){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=t,this.initCfg(),this.init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){gn(this.__cfg__,t),this.init()},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return Cn(this.ticks,(function(e,n){return Ee(e)?e:{text:t.getText(e,n),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var n=this.formatter,r=n?n(t,e):t;return je(r)||!Se(r.toString)?"":r.toString()},t.prototype.getConfig=function(t){return this.__cfg__[t]},t.prototype.init=function(){gn(this,this.__cfg__),this.setDomain(),Mn(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},t.prototype.initCfg=function(){},t.prototype.setDomain=function(){},t.prototype.calculateTicks=function(){var t=this.tickMethod,e=[];if(Ne(t)){var n=wl[t];if(!n)throw new Error("There is no method to to calculate ticks!");e=n(this)}else Se(t)&&(e=t(this));return e},t.prototype.rangeMin=function(){return this.range[0]},t.prototype.rangeMax=function(){return this.range[1]},t.prototype.calcPercent=function(t,e,n){return Ke(t)?(t-e)/(n-e):NaN},t.prototype.calcValue=function(t,e,n){return e+t*(n-e)},t}(),jl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cat",e.isCategory=!0,e}return ce(e,t),e.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;tthis.max?NaN:this.values[r]},e.prototype.getText=function(e){for(var n=[],r=1;r1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},e}(Sl),Cl=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,El="\\d\\d?",Pl="\\d\\d",Tl="[^\\s]+",kl=/\[([^]*?)\]/gm;function Al(t,e){for(var n=[],r=0,i=t.length;r-1?i:null}};function Il(t){for(var e=[],n=1;n3?0:(t-t%10!=10?1:0)*t%10]}},Rl=Il({},Dl),Nl=function(t){return Rl=Il(Rl,t)},zl=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Hl=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length0?"-":"+")+Hl(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Hl(Math.floor(Math.abs(e)/60),2)+":"+Hl(Math.abs(e)%60,2)}},Yl=function(t){return+t-1},Vl=[null,El],Xl=[null,Tl],ql=["isPm",Tl,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],Wl=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?n:-n}return 0}],Ul={D:["day",El],DD:["day",Pl],Do:["day",El+Tl,function(t){return parseInt(t,10)}],M:["month",El,Yl],MM:["month",Pl,Yl],YY:["year",Pl,function(t){var e=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+t>68?e-1:e)+t)}],h:["hour",El,void 0,"isPm"],hh:["hour",Pl,void 0,"isPm"],H:["hour",El],HH:["hour",Pl],m:["minute",El],mm:["minute",Pl],s:["second",El],ss:["second",Pl],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond",Pl,function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:Vl,dd:Vl,ddd:Xl,dddd:Xl,MMM:["month",Tl,Ol("monthNamesShort")],MMMM:["month",Tl,Ol("monthNames")],a:ql,A:ql,ZZ:Wl,Z:Wl},Zl={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Kl=function(t){return Il(Zl,t)},Ql=function(t,e,n){if(void 0===e&&(e=Zl.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var r=[];e=(e=Zl[e]||e).replace(kl,(function(t,e){return r.push(e),"@@@"}));var i=Il(Il({},Rl),n);return(e=e.replace(Cl,(function(e){return Gl[e](t,i)}))).replace(/@@@/g,(function(){return r.shift()}))};function $l(t,e,n){if(void 0===n&&(n={}),"string"!=typeof e)throw new Error("Invalid format in fecha parse");if(e=Zl[e]||e,t.length>1e3)return null;var r={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],o=[],a=e.replace(kl,(function(t,e){return o.push(zl(e)),"@@@"})),s={},l={};a=zl(a).replace(Cl,(function(t){var e=Ul[t],n=e[0],r=e[1],o=e[3];if(s[n])throw new Error("Invalid format. "+n+" specified twice in format");return s[n]=!0,o&&(l[o]=!0),i.push(e),"("+r+")"})),Object.keys(l).forEach((function(t){if(!s[t])throw new Error("Invalid format. "+t+" is required in specified format")})),a=a.replace(/@@@/g,(function(){return o.shift()}));var u=t.match(new RegExp(a,"i"));if(!u)return null;for(var c,h=Il(Il({},Rl),n),f=1;f11||r.month<0||r.day>31||r.day<1||r.hour>23||r.hour<0||r.minute>59||r.minute<0||r.second>59||r.second<0)return null;return c}var Jl={format:Ql,parse:$l,defaultI18n:Dl,setGlobalDateI18n:Nl,setGlobalDateMasks:Kl},tu=Object.freeze(Object.defineProperty({__proto__:null,default:Jl,assign:Il,format:Ql,parse:$l,defaultI18n:Dl,setGlobalDateI18n:Nl,setGlobalDateMasks:Kl},Symbol.toStringTag,{value:"Module"}));var eu="format";function nu(t,e){return(tu[eu]||Jl[eu])(t,e)}function ru(t){return Ne(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),cn(t)&&(t=t.getTime()),t}var iu=1e3,ou=6e4,au=36e5,su=24*au,lu=31*su,uu=365*su,cu=[["HH:mm:ss",iu],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",ou],["HH:mm",6e5],["HH:mm",18e5],["HH",au],["HH",6*au],["HH",12*au],["YYYY-MM-DD",su],["YYYY-MM-DD",4*su],["YYYY-WW",7*su],["YYYY-MM",lu],["YYYY-MM",4*lu],["YYYY-MM",6*lu],["YYYY",380*su]];function hu(t,e,n){var r,i=(r=function(t){return t[1]},function(t,e,n,i){for(var o=je(n)?0:n,a=je(i)?t.length:i;o>>1;r(t[s])>e?a=s:o=s+1}return o})(cu,(e-t)/n)-1,o=cu[i];return i<0?o=cu[0]:i>=cu.length&&(o=Ye(cu)),o}var fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="timeCat",e}return ce(e,t),e.prototype.translate=function(t){t=ru(t);var e=this.values.indexOf(t);return-1===e&&(e=Ke(t)&&t-1){var r=this.values[n],i=this.formatter;return r=i?i(r,e):nu(r,this.mask)}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;Pe(e,(function(t,n){e[n]=ru(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(jl),du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return ce(e,t),e.prototype.scale=function(t){if(je(t))return NaN;var e=this.rangeMin(),n=this.rangeMax();return this.max===this.min?e:e+this.getScalePercent(t)*(n-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,n=Ge(e),r=Ye(e);nthis.max&&(this.max=r),je(this.minLimit)||(this.min=n),je(this.maxLimit)||(this.max=r)},e.prototype.setDomain=function(){var t=function(t){var e=t.filter((function(t){return!isNaN(t)}));if(!e.length)return{min:0,max:0};if(Ce(t[0])){for(var n=[],r=0;rthis.max&&(this.min=e,this.max=n)},e.prototype.calculateTicks=function(){var e=this,n=t.prototype.calculateTicks.call(this);return this.nice||(n=be(n,(function(t){return t>=e.min&&t<=e.max}))),n},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;return(t-n)/(e-n)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(Sl),pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return ce(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(du);function gu(t,e){var n=Math.E;return e>=0?Math.pow(n,Math.log(e)/t):-1*Math.pow(n,Math.log(-e)/t)}function vu(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function yu(t,e,n){je(n)&&(n=Math.max.apply(null,t));var r=n;return Pe(t,(function(t){t>0&&t1&&(r=1),r}var mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return ce(e,t),e.prototype.invert=function(t){var e,n=this.base,r=vu(n,this.max),i=this.rangeMin(),o=this.rangeMax()-i,a=this.positiveMin;if(a){if(0===t)return 0;var s=1/(r-(e=vu(n,a/n)))*o;if(t=0?1:-1;return Math.pow(o,n)*a},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var r=this.exponent;return(gu(r,t)-gu(r,n))/(gu(r,e)-gu(r,n))},e}(du),xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return ce(e,t),e.prototype.getText=function(t,e){var n=this.translate(t),r=this.formatter;return r?r(n,e):nu(n,this.mask)},e.prototype.scale=function(e){var n=e;return(Ne(n)||cn(n))&&(n=this.translate(n)),t.prototype.scale.call(this,n)},e.prototype.translate=function(t){return ru(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if(je(e)&&Ke(e)||(this.min=this.translate(this.min)),je(n)&&Ke(n)||(this.max=this.translate(this.max)),t&&t.length){var r=[],i=1/0,o=i,a=0;Pe(t,(function(t){var e=ru(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");i>e?(o=i,i=e):o>e&&(o=e),a1&&(this.minTickInterval=o-i),je(e)&&(this.min=i),je(n)&&(this.max=a)}},e}(pu),bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return ce(e,t),e.prototype.invert=function(t){var e=this.ticks,n=e.length,r=this.getInvertPercent(t),i=Math.floor(r*(n-1));if(i>=n-1)return Ye(e);if(i<0)return Ge(e);var o=e[i],a=i/(n-1);return o+(r-a)/((i+1)/(n-1)-a)*(e[i+1]-o)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||(Ye(e)!==this.max&&e.push(this.max),Ge(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(tYe(e))return 1;var n=0;return Pe(e,(function(e,r){if(!(t>=e))return!1;n=r})),n/(e.length-1)},e}(du),wu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return ce(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(bu),Mu={};function Su(t){return Mu[t]}function ju(t,e){if(Su(t))throw new Error("type '"+t+"' existed.");Mu[t]=e}var Cu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return ce(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&Ke(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},e}(Sl);function Eu(t){var e=t.values,n=t.tickInterval,r=t.tickCount,i=t.showLast;if(Ke(n)){var o=be(e,(function(t,e){return e%n==0})),a=Ye(e);return i&&Ye(o)!==a&&o.push(a),o}var s=e.length,l=t.min,u=t.max;if(je(l)&&(l=0),je(u)&&(u=e.length-1),!Ke(r)||r>=s)return e.slice(l,u+1);if(r<=0||u<=0)return[];for(var c=1===r?s:Math.floor(s/(r-1)),h=[],f=l,d=0;d=u);d++)f=Math.min(l+d*c,u),d===r-1&&i?h.push(e[u]):h.push(e[f]);return h}var Pu=Math.sqrt(50),Tu=Math.sqrt(10),ku=Math.sqrt(2),Au=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,n;void 0===t&&(t=5);var r,i=this._domain.slice(),o=0,a=this._domain.length-1,s=this._domain[o],l=this._domain[a];return l0?r=Ou(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,t):r<0&&(r=Ou(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,t)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,this.domain(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,this.domain(i)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];(r=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s=0?(o>=Pu?10:o>=Tu?5:o>=ku?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Pu?10:o>=Tu?5:o>=ku?2:1)}function Iu(t,e,n){return("ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e))*e}function Bu(t,e,n){var r=Iu(t,n,"floor"),i=Iu(e,n,"ceil");r=Ze(r,n),i=Ze(i,n);for(var o=[],a=Math.max((i-r)/(Math.pow(2,12)-1),n),s=r;s<=i;s+=a){var l=Ze(s,a);o.push(l)}return{min:r,max:i,ticks:o}}function Lu(t,e,n){var r,i=t.minLimit,o=t.maxLimit,a=t.min,s=t.max,l=t.tickCount,u=void 0===l?5:l,c=je(i)?je(e)?a:e:i,h=je(o)?je(n)?s:n:o;if(c>h&&(h=(r=[c,h])[0],c=r[1]),u<=2)return[c,h];for(var f=(h-c)/(u-1),d=[],p=0;p=0&&(l=1),1-s/(a-1)-n+l}function zu(t,e,n){var r=Fn(e);return 1-bn(e,t)/(r-1)-n+1}function Hu(t,e,n,r,i,o){var a=(t-1)/(o-i),s=(e-1)/(Math.max(o,r)-Math.min(n,i));return 2-Math.max(a/s,s/a)}function Gu(t,e){return t>=e?2-(t-1)/(e-1):1}function Yu(t,e,n,r){var i=e-t;return 1-.5*(Math.pow(e-r,2)+Math.pow(t-n,2))/Math.pow(.1*i,2)}function Vu(t,e,n){var r=e-t;if(n>r){var i=(n-r)/2;return 1-Math.pow(i,2)/Math.pow(.1*r,2)}return 1}function Xu(t,e,n,r,i,o){void 0===n&&(n=5),void 0===r&&(r=!0),void 0===i&&(i=Du),void 0===o&&(o=[.25,.2,.5,.05]);var a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return{min:0,max:0,ticks:[]};if(e-t<1e-15||1===a)return{min:t,max:e,ticks:[t]};if(e-t>1e148){var s=(e-t)/(b=n||5);return{min:t,max:e,ticks:Array(b).fill(null).map((function(e,n){return Fu(t+s*n)}))}}for(var l={score:-2,lmin:0,lmax:0,lstep:0},u=1;u<1/0;){for(var c=0;cl.score&&(!r||M<=t&&S>=e)&&(l.lmin=M,l.lmax=S,l.lstep=j,l.score=T)}v+=1}d+=1}}u+=1}var k=Fu(l.lmax),A=Fu(l.lmin),O=Fu(l.lstep),I=Math.floor(function(t){return Math.round(1e12*t)/1e12}((k-A)/O))+1,B=new Array(I);B[0]=Fu(A);for(c=1;c1&&(i*=Math.ceil(a)),r&&iuu)for(var l=Uu(n),u=Math.ceil(o/uu),c=s;c<=l+u;c+=u)a.push(Zu(c));else if(o>lu){var h=Math.ceil(o/lu),f=Ku(e),d=function(t,e){var n=Uu(t),r=Uu(e),i=Ku(t);return 12*(r-n)+(Ku(e)-i)%12}(e,n);for(c=0;c<=d+h;c+=h)a.push(Qu(s,c+f))}else if(o>su){var p=(_=new Date(e)).getFullYear(),g=_.getMonth(),v=_.getDate(),y=Math.ceil(o/su),m=function(t,e){return Math.ceil((e-t)/su)}(e,n);for(c=0;cau){p=(_=new Date(e)).getFullYear(),g=_.getMonth(),y=_.getDate();var _,x=_.getHours(),b=Math.ceil(o/au),w=function(t,e){return Math.ceil((e-t)/au)}(e,n);for(c=0;c<=w+b;c+=b)a.push(new Date(p,g,y,x+c).getTime())}else if(o>ou){var M=function(t,e){return Math.ceil((e-t)/6e4)}(e,n),S=Math.ceil(o/ou);for(c=0;c<=M+S;c+=S)a.push(e+c*ou)}else{var j=o;j=512&&console.warn("Notice: current ticks length("+a.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+o+") is too small, increase the value to solve the problem!"),a})),Ml("log",(function(t){var e,n=t.base,r=t.tickCount,i=t.min,o=t.max,a=t.values,s=vu(n,o);if(i>0)e=Math.floor(vu(n,i));else{var l=yu(a,n,o);e=Math.floor(vu(n,l))}for(var u=s-e,c=Math.ceil(u/r),h=[],f=e;f=0?1:-1;return Math.pow(t,e)*n}))})),Ml("quantile",(function(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var r=n.slice().sort((function(t,e){return t-e})),i=[],o=0;o=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},e.prototype.convertPoint=function(t){var e,n=t.x,r=t.y;this.isTransposed&&(n=(e=[r,n])[0],r=e[1]);var i=this.convertDim(n,"x"),o=this.a*i,a=this.convertDim(r,"y");return{x:this.center.x+Math.cos(i)*(o+a),y:this.center.y+Math.sin(i)*(o+a)}},e.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,r=di([0,0],[t.x,t.y],[this.center.x,this.center.y]),i=Ei(r,[1,0],!0),o=i*this.a;mi(r)this.width/r?(e=this.width/r,this.circleCenter={x:this.center.x-(.5-o)*this.width,y:this.center.y-(.5-a)*e*i}):(e=this.height/i,this.circleCenter={x:this.center.x-(.5-o)*e*r,y:this.center.y-(.5-a)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,n=this.getCenter(),r=t.x,i=t.y;return this.isTransposed&&(r=(e=[i,r])[0],i=e[1]),r=this.convertDim(r,"x"),i=this.convertDim(i,"y"),{x:n.x+Math.cos(r)*i,y:n.y+Math.sin(r)*i}},e.prototype.invertPoint=function(t){var e,n=this.getCenter(),r=[t.x-n.x,t.y-n.y],i=this.startAngle,o=this.endAngle;this.isReflect("x")&&(i=(e=[o,i])[0],o=e[1]);var a=[1,0,0,0,1,0,0,0,1];Mi(a,a,i);var s=[1,0,0];hi(s,s,a);var l=Ei([s[0],s[1]],r,o0?c:-c;var h=this.invertDim(u,"y"),f={x:0,y:0};return f.x=this.isTransposed?h:c,f.y=this.isTransposed?c:h,f},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],r=[0,Math.sin(t),Math.sin(e)],i=Math.min(t,e);i=0;n--)t.removeChild(e[n])}function vc(t){var e=t.start,n=t.end,r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),o=Math.max(e.x,n.x),a=Math.max(e.y,n.y);return{x:r,y:i,minX:r,minY:i,maxX:o,maxY:a,width:o-r,height:a-i}}function yc(t,e,n,r){var i=t+n,o=e+r;return{x:t,y:e,width:n,height:r,minX:t,minY:e,maxX:isNaN(i)?0:i,maxY:isNaN(o)?0:o}}function mc(t,e,n){return(1-n)*t+e*n}function _c(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}}var xc=function(t,e,n){return void 0===n&&(n=Math.pow(Number.EPSILON,.5)),[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)0?Pe(f,(function(t){if(t.get("visible")){if(t.isGroup()&&0===t.get("children").length)return!0;var e=bc(t),n=t.applyToMatrix([e.minX,e.minY,1]),r=t.applyToMatrix([e.minX,e.maxY,1]),i=t.applyToMatrix([e.maxX,e.minY,1]),o=t.applyToMatrix([e.maxX,e.maxY,1]),a=Math.min(n[0],r[0],i[0],o[0]),s=Math.max(n[0],r[0],i[0],o[0]),f=Math.min(n[1],r[1],i[1],o[1]),d=Math.max(n[1],r[1],i[1],o[1]);au&&(u=s),fh&&(h=d)}})):(l=0,u=0,c=0,h=0),e=yc(l,c,u-l,h-c)}else e=t.getBBox();return s?(n=e,r=s,i=Math.max(n.minX,r.minX),o=Math.max(n.minY,r.minY),yc(i,o,Math.min(n.maxX,r.maxX)-i,Math.min(n.maxY,r.maxY)-o)):e}function wc(t){return t+"px"}function Mc(t,e,n,r){var i,o,a,s,l=r/(i=t,a=(o=e).x-i.x,s=o.y-i.y,Math.sqrt(a*a+s*s)),u=0;return"start"===n?u=0-l:"end"===n&&(u=1+l),{x:mc(t.x,e.x,u),y:mc(t.y,e.y,u)}}var Sc={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},jc=function(t){function e(e){var n=t.call(this,e)||this;return n.initCfg(),n}return ce(e,t),e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,n=this.get("defaultCfg")||{};Pe(t,(function(t,r){var i=t;e.get(r)!==t&&(Ee(t)&&n[r]&&(i=xn({},n[r],t)),e.set(r,i))})),this.updateInner(t),this.afterUpdate(t)},e.prototype.updateInner=function(t){},e.prototype.afterUpdate=function(t){en(t,"visible")&&(t.visible?this.show():this.hide()),en(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=he({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},n=this.get("locationType");return Pe(Sc[n],(function(n){e[n]=t.get(n)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this;Pe(this.get("defaultCfg"),(function(e,n){var r=t.get(n);if(Ee(r)){var i=xn({},e,r);t.set(n,i)}}))},e}(Kr),Cc="update_status",Ec=["visible","tip","delegateObject"],Pc=["container","group","shapesMap","isRegister","isUpdating","destroyed"],Tc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear(),this.get("group").remove()},e.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var e=this.getElementById(t);return e&&e.get("component")},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},e.prototype.getElementsByName=function(t){var e=[];return Pe(this.get("shapesMap"),(function(n){n.get("name")===t&&e.push(n)})),e},e.prototype.getContainer=function(){return this.get("container")},e.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},e.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){this.get("group").set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),t.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(e=function(t,e){var n=hc(t,[e.minX,e.minY]),r=hc(t,[e.maxX,e.minY]),i=hc(t,[e.minX,e.maxY]),o=hc(t,[e.maxX,e.maxY]),a=Math.min(n[0],r[0],i[0],o[0]),s=Math.max(n[0],r[0],i[0],o[0]),l=Math.min(n[1],r[1],i[1],o[1]),u=Math.max(n[1],r[1],i[1],o[1]);return{x:a,y:l,minX:a,minY:l,maxX:s,maxY:u,width:s-a,height:u-l}}(n,e)),e},e.prototype.on=function(t,e,n){return this.get("group").on(t,e,n),this},e.prototype.off=function(t,e){var n=this.get("group");return n&&n.off(t,e),this},e.prototype.emit=function(t,e){this.get("group").emit(t,e)},e.prototype.init=function(){t.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,e){var n=this.get("group");e.target=n,n.emit(t,e),sc(n,t,e)},e.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},e.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",bc(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addComponent=function(t,e){var n=e.id,r=e.component,i=fe(e,["id","component"]),o=new r(he(he({},i),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return o.init(),o.render(),this.get("isRegister")&&this.registerElement(o.get("group")),o},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){this.get("group").off()},e.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var n=cc(e);t.attr("matrix",n)},e.prototype.addAnimation=function(t,e,n){var r=e.attr("opacity");je(r)&&(r=1),e.attr("opacity",0),e.animate({opacity:r},n)},e.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},e.prototype.updateAnimation=function(t,e,n,r){e.animate(n,r)},e.prototype.updateElements=function(t,e){var n,r=this,i=this.get("animate"),o=this.get("animateOption");Pe(t.getChildren().slice(0),(function(t){var a=t.get("id"),s=r.getElementById(a),l=t.get("name");if(s)if(t.get("isComponent")){var u=t.get("component"),c=s.get("component"),h=An(u.cfg,function(t,e){return void 0===e&&(e=[]),be(t,(function(t){return!xe(e,t)}))}(Te(u.cfg),Pc));c.update(h),s.set(Cc,"update")}else{var f=r.getReplaceAttrs(s,t);i&&o.update?r.updateAnimation(l,s,f,o.update):s.attr(f),t.isGroup()&&r.updateElements(t,s),Pe(Ec,(function(e){s.set(e,t.get(e))})),function(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(n){var r={type:n.get("type"),attrs:n.attr()};t.setClip(r)}else t.setClip(null)}}(s,t),n=s,s.set(Cc,"update")}else{e.add(t);var d=e.getChildren();if(d.splice(d.length-1,1),n){var p=d.indexOf(n);d.splice(p+1,0,t)}else d.unshift(t);if(r.registerElement(t),t.set(Cc,"add"),t.get("isComponent"))(u=t.get("component")).set("container",e);else t.isGroup()&&r.registerNewGroup(t);if(n=t,i){var g=r.get("isInit")?o.appear:o.enter;g&&r.addAnimation(l,t,g)}}}))},e.prototype.clearUpdateStatus=function(t){Pe(t.getChildren(),(function(t){t.set(Cc,null)}))},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t;return(t={})[this.get("name")]=this,t.component=this,t},e.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),gn(e.delegateObject,n)},e.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),r=e.attr();return Pe(n,(function(t,e){void 0===r[e]&&(r[e]=void 0)})),r},e.prototype.registerNewGroup=function(t){var e=this;Pe(t.getChildren(),(function(t){e.registerElement(t),t.set(Cc,"add"),t.isGroup()&&e.registerNewGroup(t)}))},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];Pe(e,(function(t,e){!t.get(Cc)||t.destroyed?n.push([e,t]):t.set(Cc,null)}));var r=this.get("animate"),i=this.get("animateOption");Pe(n,(function(n){var o=n[0],a=n[1];if(!a.destroyed){var s=a.get("name");if(r&&i.leave){var l=gn({callback:function(){t.removeElement(a)}},i.leave);t.removeAnimation(s,a,l)}else t.removeElement(a)}delete e[o]}))},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(jc);function kc(t,e){return t.charCodeAt(e)>0&&t.charCodeAt(e)<128?1:2}function Ac(t){if(t.length>400)return function(t){for(var e=t.map((function(t){var e=t.attr("text");return je(e)?"":""+e})),n=0,r=0,i=0;i=19968&&s<=40869?2:1}o>n&&(n=o,r=i)}return t[r].getBBox().width}(t);var e=0;return Pe(t,(function(t){var n=t.getBBox().width;el&&o>l);)if(u.push(i),l-=o,!(s=s.substr(16)))return u.join("");for(;i=s.substr(0,1),!((o=zn(i,n))+a>l);)if(u.push(i),l-=o,!(s=s.substr(1)))return u.join("");return""+u.join("")+r}(o,n,An(e.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),"…");return o!==a?(e.attr("text",a),e.set("tip",o),!0):(e.set("tip",null),!1)}var s=function(t,e){var n=e.getCanvasBBox();return t?n.width:n.height}(t,e),l=function(t){for(var e=0,n=0;n=0?function(t,e,n){void 0===n&&(n="tail");var r=t.length,i="";if("tail"===n){for(var o=0,a=0;o1||r<0)&&(r=1),{x:mc(t.x,e.x,r),y:mc(t.y,e.y,r)}},e.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),r=this.get("end"),i=e.position,o=e.content,a=e.style,s=e.offsetX,l=e.offsetY,u=e.autoRotate,c=e.maxLength,h=e.autoEllipsis,f=e.ellipsisPosition,d=e.background,p=e.isVertical,g=void 0!==p&&p,v=this.getLabelPoint(n,r,i),y=v.x+s,m=v.y+l,_={id:this.getElementId("line-text"),name:"annotation-line-text",x:y,y:m,content:o,style:a,maxLength:c,autoEllipsis:h,ellipsisPosition:f,background:d,isVertical:g};if(u){var x=[r.x-n.x,r.y-n.y];_.rotate=Math.atan2(x[1],x[0])}Ic(t,_)},e}(Tc),Fc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:Bc.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Bc.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){var e=this.getLocation(),n=e.x,r=e.y,i=this.get("content"),o=this.get("style");Ic(t,{id:this.getElementId("text"),name:this.get("name")+"-text",x:n,y:r,content:i,style:o,maxLength:this.get("maxLength"),autoEllipsis:this.get("autoEllipsis"),isVertical:this.get("isVertical"),ellipsisPosition:this.get("ellipsisPosition"),background:this.get("background"),rotate:this.get("rotate")})},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var e=this.getLocation(),n=e.x,r=e.y,i=this.get("rotate");dc(t,n,r),fc(t,i,n,r)}},e}(Tc),Dc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,i=t.endAngle,o=_c(e,n,r),a=_c(e,n,i),s=i-r>Math.PI?1:0,l=[["M",o.x,o.y]];if(i-r==2*Math.PI){var u=_c(e,n,r+Math.PI);l.push(["A",n,n,0,s,1,u.x,u.y]),l.push(["A",n,n,0,s,1,a.x,a.y])}else l.push(["A",n,n,0,s,1,a.x,a.y]);return l},e.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:he({path:e},n)})},e}(Tc),Rc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Bc.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style"),i=vc({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:he({x:i.x,y:i.y,width:i.width,height:i.height},r)})},e}(Tc),Nc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),r=vc({start:t,end:e}),i=this.get("src");return he({x:r.x,y:r.y,img:i,width:r.width,height:r.height},n)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(Tc),zc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:Bc.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Bc.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Bc.fontFamily}}}})},e.prototype.renderInner=function(t){Pn(this.get("line"),"display")&&this.renderLine(t),Pn(this.get("text"),"display")&&this.renderText(t),Pn(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text,n=e.x,r=e.y,i=e.text,o=fe(e,["x","y","text"]),a=this.get("text"),s=a.background,l=a.maxLength,u=a.autoEllipsis,c=a.isVertival,h=a.ellipsisPosition;Ic(t,{x:n,y:r,id:this.getElementId("text"),name:"annotation-text",content:i,style:o,background:s,maxLength:l,autoEllipsis:u,isVertival:c,ellipsisPosition:h})},e.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),r=this.get("y"),i=Pn(this.get("line"),"length",0),o=this.get("coordinateBBox"),a=t.getBBox(),s=a.minX,l=a.maxX,u=a.minY,c=a.maxY,h=t.findById(this.getElementId("text-group")),f=t.findById(this.getElementId("text")),d=t.findById(this.getElementId("line"));if(o){if(h){if(n+s<=o.minX){var p=o.minX-(n+s);dc(h,h.attr("x")+p,h.attr("y"))}if(n+l>=o.maxX){p=n+l-o.maxX;dc(h,h.attr("x")-p,h.attr("y"))}}if("upward"===e&&r+u<=o.minY||"upward"!==e&&r+c>=o.maxY){var g=void 0,v=void 0;"upward"===e&&r+u<=o.minY?(g="top",v=1):(g="bottom",v=-1),f.attr("textBaseline",g),d&&d.attr("path",[["M",0,0],["L",0,i*v]]),dc(h,h.attr("x"),(i+2)*v)}}},e.prototype.getShapeAttrs=function(){var t=Pn(this.get("line"),"display"),e=Pn(this.get("point"),"style",{}),n=Pn(this.get("line"),"style",{}),r=Pn(this.get("text"),"style",{}),i=this.get("direction"),o=t?Pn(this.get("line"),"length",0):0,a="upward"===i?-1:1;return{point:he({x:0,y:0},e),line:he({path:[["M",0,0],["L",0,o*a]]},n),text:he({x:0,y:(o+2)*a,text:Pn(this.get("text"),"content",""),textBaseline:"upward"===i?"bottom":"top"},r)}},e}(Tc),Hc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Bc.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Bc.textColor,fontFamily:Bc.fontFamily}}}})},e.prototype.renderInner=function(t){var e=Pn(this.get("region"),"style",{});Pn(this.get("text"),"style",{});var n=this.get("lineLength")||0,r=this.get("points");if(r.length){var i=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),r=Math.min.apply(Math,e),i=Math.min.apply(Math,n),o=Math.max.apply(Math,e),a=Math.max.apply(Math,n);return{x:r,y:i,minX:r,minY:i,maxX:o,maxY:a,width:o-r,height:a-i}}(r),o=[];o.push(["M",r[0].x,i.minY-n]),r.forEach((function(t){o.push(["L",t.x,t.y])})),o.push(["L",r[r.length-1].x,r[r.length-1].y-n]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:he({path:o},e)}),Ic(t,he({id:this.getElementId("text"),name:"annotation-text",x:(i.minX+i.maxX)/2,y:i.minY-n},this.get("text")))}},e}(Tc),Gc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,n=this.get("start"),r=this.get("end"),i=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});Pe(this.get("shapes"),(function(t,n){var r=t.get("type"),o=vn(t.attr());e.adjustShapeAttrs(o),e.addShape(i,{id:e.getElementId("shape-"+r+"-"+n),capture:!1,type:r,attrs:o})}));var o=vc({start:n,end:r});i.setClip({type:"rect",attrs:{x:o.minX,y:o.minY,width:o.width,height:o.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e}(Tc),Yc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"shape",draw:Ln})},e.prototype.renderInner=function(t){var e=this.get("render");Se(e)&&e(t)},e}(Tc),Vc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer();return yc(parseFloat(t.style.left)||0,parseFloat(t.style.top)||0,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){gc(this.get("container"))},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if(je(t)){t=this.createDom();var e=this.get("parent");Ne(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else Ne(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?xn({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var e=this.getContainer();this.applyChildrenStyles(e,t);var n,r=this.get("containerClassName");if(r&&(n=r,e.className.match(new RegExp("(\\s|^)"+n+"(\\s|$)"))))lr(e,t[r])}},e.prototype.applyChildrenStyles=function(t,e){Pe(e,(function(e,n){Pe(t.getElementsByClassName(n),(function(t){lr(t,e)}))}))},e.prototype.applyStyle=function(t,e){lr(e,this.get("domStyles")[t])},e.prototype.createDom=function(){return ir(this.get("containerTpl"))},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){en(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(jc),Xc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},e.prototype.render=function(){var t=this.getContainer(),e=this.get("html");gc(t);var n=Se(e)?e(t):e;if(dn(n))t.appendChild(n);else if(Ne(n)||Ke(n)){var r=ir(""+n);r&&t.appendChild(r)}this.resetPosition()},e.prototype.resetPosition=function(){var t=this.getContainer(),e=this.getLocation(),n=e.x,r=e.y,i=this.get("alignX"),o=this.get("alignY"),a=this.get("offsetX"),s=this.get("offsetY"),l=sr(t),u=ar(t),c={x:n,y:r};"middle"===i?c.x-=Math.round(l/2):"right"===i&&(c.x-=Math.round(l)),"middle"===o?c.y-=Math.round(u/2):"bottom"===o&&(c.y-=Math.round(u)),a&&(c.x+=a),s&&(c.y+=s),lr(t,{position:"absolute",left:c.x+"px",top:c.y+"px",zIndex:this.get("zIndex")})},e}(Vc),qc=Object.freeze(Object.defineProperty({__proto__:null,Line:Lc,Text:Fc,Arc:Dc,Region:Rc,Image:Nc,DataMarker:zc,DataRegion:Hc,RegionFilter:Gc,Shape:Yc,Html:Xc},Symbol.toStringTag,{value:"Module"}));function Wc(t,e,n){var r=e+"Style",i=null;return Pe(n,(function(e,n){t[n]&&e[r]&&(i||(i={}),gn(i,e[r]))})),i}var Uc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:Bc.lineColor}},tickLine:{style:{lineWidth:1,stroke:Bc.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Bc.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Bc.textColor,fontFamily:Bc.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Bc.textColor,textBaseline:"middle",fontFamily:Bc.fontFamily,textAlign:"center"},iconStyle:{fill:Bc.descriptionIconFill,stroke:Bc.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Bc.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){gn(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return Pe(e,(function(e,r){t[r]&&n.push(r)})),n},e.prototype.clearItemsState=function(t){var e=this;Pe(this.getItemsByState(t),(function(n){e.setItemState(n,t,!1)}))},e.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return be(n,(function(n){return e.hasState(n,t)}))},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTextAnchor=function(t){var e;return Qe(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.getTextBaseline=function(t){var e;return Qe(t[1],0)?e="middle":t[1]>0?e="top":t[1]<0&&(e="bottom"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:gn({path:e},n.style)})},e.prototype.getTickLineItems=function(t){var e=this,n=[],r=this.get("tickLine"),i=r.alignTick,o=r.length,a=1;return t.length>=2&&(a=t[1].value-t[0].value),Pe(t,(function(t){var r=t.point;i||(r=e.getTickPoint(t.value-a/2));var s=e.getSidePoint(r,o);n.push({startPoint:r,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})})),n},e.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),r=n.count,i=t.length;if(i>=2)for(var o=0;o0){var n=Fn(e);if(n>t.threshold){var r=Math.ceil(n/t.threshold),i=e.filter((function(t,e){return e%r==0}));this.set("ticks",i),this.set("originalTicks",e)}}},e.prototype.getLabelAttrs=function(t,e,n){var r=this.get("label"),i=r.offset,o=r.offsetX,a=r.offsetY,s=r.rotate,l=r.formatter,u=this.getSidePoint(t.point,i),c=this.getSideVector(i,u),h=l?l(t.name,t,e):t.name,f=r.style;f=Se(f)?Pn(this.get("theme"),["label","style"],{}):f;var d=gn({x:u.x+o,y:u.y+a,text:h,textAlign:this.getTextAnchor(c),textBaseline:this.getTextBaseline(c)},f);return s&&(d.matrix=uc(u,s)),d},e.prototype.drawLabels=function(t){var e=this,n=this.get("ticks"),r=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});Pe(n,(function(t,i){e.addShape(r,{type:"text",name:"axis-label",id:e.getElementId("label-"+t.id),attrs:e.getLabelAttrs(t,i,n),delegateObject:{tick:t,item:t,index:i}})})),this.processOverlap(r);var i=r.getChildren(),o=Pn(this.get("theme"),["label","style"],{}),a=this.get("label"),s=a.style,l=a.formatter;if(Se(s)){var u=i.map((function(t){return Pn(t.get("delegateObject"),"tick")}));Pe(i,(function(t,e){var n=t.get("delegateObject").tick,r=l?l(n.name,n,e):n.name,i=gn({},o,s(r,e,u));t.attr(i)}))}},e.prototype.getTitleAttrs=function(){var t=this.get("title"),e=t.style,n=t.position,r=t.offset,i=t.spacing,o=void 0===i?0:i,a=t.autoRotate,s=e.fontSize,l=.5;"start"===n?l=0:"end"===n&&(l=1);var u=this.getTickPoint(l),c=this.getSidePoint(u,r||o+s/2),h=gn({x:c.x,y:c.y,text:t.text},e),f=t.rotate,d=f;if(je(f)&&a){d=Ei(this.getAxisVector(u),[1,0],!0)}if(d){var p=uc(c,d);h.matrix=p}return h},e.prototype.drawTitle=function(t){var e,n=this.getTitleAttrs(),r=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});(null===(e=this.get("title"))||void 0===e?void 0:e.description)&&this.drawDescriptionIcon(t,r,n.matrix)},e.prototype.drawDescriptionIcon=function(t,e,n){var r=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),i=e.getBBox(),o=i.maxX,a=i.maxY,s=i.height,l=this.get("title").iconStyle,u=s/2,c=u/6,h=o+4,f=a-s/2,d=[h+u,f-u],p=d[0],g=d[1],v=[p+u,g+u],y=v[0],m=v[1],_=[p,m+u],x=_[0],b=_[1],w=[h,g+u],M=w[0],S=w[1],j=[h+u,f-s/4],C=j[0],E=j[1],P=[C,E+c],T=P[0],k=P[1],A=[T,k+c],O=A[0],I=A[1],B=[O,I+3*u/4],L=B[0],F=B[1];this.addShape(r,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:he({path:[["M",p,g],["A",u,u,0,0,1,y,m],["A",u,u,0,0,1,x,b],["A",u,u,0,0,1,M,S],["A",u,u,0,0,1,p,g],["M",C,E],["L",T,k],["M",O,I],["L",L,F]],lineWidth:c,matrix:n},l)}),this.addShape(r,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:h,y:f-s/2,width:s,height:s,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},e.prototype.applyTickStates=function(t,e){if(this.getItemStates(t).length){var n=this.get("tickStates"),r=this.getElementId("label-"+t.id),i=e.findById(r);if(i){var o=Wc(t,"label",n);o&&i.attr(o)}var a=this.getElementId("tickline-"+t.id),s=e.findById(a);if(s){var l=Wc(t,"tickLine",n);l&&s.attr(l)}}},e.prototype.updateTickStates=function(t){var e=this.getItemStates(t),n=this.get("tickStates"),r=this.get("label"),i=this.getElementByLocalId("label-"+t.id),o=this.get("tickLine"),a=this.getElementByLocalId("tickline-"+t.id);if(e.length){if(i){var s=Wc(t,"label",n);s&&i.attr(s)}if(a){var l=Wc(t,"tickLine",n);l&&a.attr(l)}}else i&&i.attr(r.style),a&&a.attr(o.style)},e}(Tc);function Zc(t,e,n,r){var i=e.getChildren(),o=!1;return Pe(i,(function(e){var i=Oc(t,e,n,r);o=o||i})),o}function Kc(t,e,n){return Zc(t,e,n,"tail")}var Qc=Object.freeze(Object.defineProperty({__proto__:null,getDefault:function(){return Kc},ellipsisHead:function(t,e,n){return Zc(t,e,n,"head")},ellipsisTail:Kc,ellipsisMiddle:function(t,e,n){return Zc(t,e,n,"middle")}},Symbol.toStringTag,{value:"Module"}));function $c(t){var e=function(t){var e=t.attr("matrix");return e&&1!==e[0]}(t)?function(t){var e=[0,0,0];return hi(e,[1,0,0],t),Math.atan2(e[1],e[0])}(t.attr("matrix")):0;return e%360}function Jc(t,e,n,r){var i=!1,o=$c(e),a=t?Math.abs(n.attr("y")-e.attr("y")):Math.abs(n.attr("x")-e.attr("x")),s=(t?n.attr("y")>e.attr("y"):n.attr("x")>e.attr("x"))?e.getBBox():n.getBBox();if(t){var l=Math.abs(Math.cos(o));i=xc(l,0,Math.PI/180)?s.width+r>a:s.height/l+r>a}else{l=Math.abs(Math.sin(o));i=xc(l,0,Math.PI/180)?s.width+r>a:s.height/l+r>a}return i}function th(t,e,n,r){var i=(null==r?void 0:r.minGap)||0,o=e.getChildren().slice().filter((function(t){return t.get("visible")}));if(!o.length)return!1;var a=!1;n&&o.reverse();for(var s=o.length,l=o[0],u=1;u1){f=Math.ceil(f);for(var p=0;p2){var a=i[0],s=i[i.length-1];a.get("visible")||(a.show(),th(t,e,!1,r)&&(o=!0)),s.get("visible")||(s.show(),th(t,e,!0,r)&&(o=!0))}return o}},Symbol.toStringTag,{value:"Module"}));function ih(t,e,n,r){var i=e.getChildren();if(!i.length)return!1;if(!t&&i.length<2)return!1;var o=Ac(i),a=!1;t?a=!!n&&o>n:a=o>Math.abs(i[1].attr("x")-i[0].attr("x"));a&&function(t,e){Pe(t,(function(t){var n=uc({x:t.attr("x"),y:t.attr("y")},e);t.attr("matrix",n)}))}(i,r(n,o));return a}function oh(t,e,n,r){return ih(t,e,n,(function(){return Ke(r)?r:t?Bc.verticalAxisRotate:Bc.horizontalAxisRotate}))}var ah,sh=Object.freeze(Object.defineProperty({__proto__:null,getDefault:function(){return oh},fixedAngle:oh,unfixedAngle:function(t,e,n){return ih(t,e,n,(function(e,n){if(!e)return t?Bc.verticalAxisRotate:Bc.horizontalAxisRotate;if(t)return-Math.acos(e/n);var r=0;return(e>n||(r=Math.asin(e/n))>Math.PI/4)&&(r=Math.PI/4),r}))}},Symbol.toStringTag,{value:"Module"})),lh=Object.freeze(Object.defineProperty({__proto__:null,autoHide:rh,autoRotate:sh,autoEllipsis:Qc},Symbol.toStringTag,{value:"Module"})),uh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),r=t.prototype.getInnerLayoutBBox.call(this),i=Math.min(e.x,n.x,r.x),o=Math.min(e.y,n.y,r.y),a=Math.max(e.x,n.x,r.maxX),s=Math.max(e.y,n.y,r.maxY);return{x:i,y:o,minX:i,minY:o,maxX:a,maxY:s,width:a-i,height:s-o}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return Qe(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return Qe(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),r=n.x-e.x,i=n.y-e.y;return{x:e.x+r*t,y:e.y+i*t}},e.prototype.getSideVector=function(t){var e=_i([0,0],this.getAxisVector()),n=this.get("verticalFactor");return vi([0,0],[e[1],-1*e[0]],t*n)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),r=this.isHorizontal();if(n||r){var i=this.get("label"),o=this.get("title"),a=this.get("verticalLimitLength"),s=i.offset,l=a,u=0,c=0;if(o&&(u=o.style.fontSize,c=o.spacing),l&&(l=l-s-c-u),Pe(this.get("overlapOrder"),(function(n){i[n]&&e.canProcessOverlap(n)&&e.autoProcessOverlap(n,i[n],t,l)})),o&&je(o.offset)){var h=t.getCanvasBBox(),f=n?h.width:h.height;o.offset=s+f+c+u/2}}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||je(e.rotate)},e.prototype.autoProcessOverlap=function(t,e,n,r){var i=this,o=this.isVertical(),a=!1,s=lh[t];if(!0===e)this.get("label"),a=s.getDefault()(o,n,r);else if(Se(e))a=e(o,n,r);else if(Ee(e)){var l=e;s[l.type]&&(a=s[l.type](o,n,r,l.cfg))}else s[e]&&(a=s[e](o,n,r));if("autoRotate"===t){if(a){var u=n.getChildren(),c=this.get("verticalFactor");Pe(u,(function(t){if("center"===t.attr("textAlign")){var e=c>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){Pe(n.getChildren().slice(0),(function(t){t.get("visible")||(i.get("isRegister")&&i.unregisterElement(t),t.remove())}))}},e}(Uc),ch=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),i=r,o=this.get("startAngle"),a=this.get("endAngle"),s=[];if(Math.abs(a-o)===2*Math.PI)s=[["M",e,n-i],["A",r,i,0,1,1,e,n+i],["A",r,i,0,1,1,e,n-i],["Z"]];else{var l=this.getCirclePoint(o),u=this.getCirclePoint(a),c=Math.abs(a-o)>Math.PI?1:0,h=o>a?0:1;s=[["M",e,n],["L",l.x,l.y],["A",r,i,0,c,h,u.x,u.y],["L",e,n]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this.getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),r=[e.x-n.x,e.y-n.y];return vi(r,r,this.get("verticalFactor")*t/mi(r)),r},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||je(e.rotate)},e.prototype.processOverlap=function(t){var e=this,n=this.get("label"),r=this.get("title"),i=this.get("verticalLimitLength"),o=n.offset,a=i,s=0,l=0;if(r&&(s=r.style.fontSize,l=r.spacing),a&&(a=a-o-l-s),Pe(this.get("overlapOrder"),(function(r){n[r]&&e.canProcessOverlap(r)&&e.autoProcessOverlap(r,n[r],t,a)})),r&&je(r.offset)){var u=t.getCanvasBBox().height;r.offset=o+u+l+s/2}},e.prototype.autoProcessOverlap=function(t,e,n,r){var i=this,o=!1,a=lh[t];if(r>0)if(!0===e)o=a.getDefault()(!1,n,r);else if(Se(e))o=e(!1,n,r);else if(Ee(e)){var s=e;a[s.type]&&(o=a[s.type](!1,n,r,s.cfg))}else a[e]&&(o=a[e](!1,n,r));if("autoRotate"===t){if(o){var l=n.getChildren(),u=this.get("verticalFactor");Pe(l,(function(t){if("center"===t.attr("textAlign")){var e=u>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){Pe(n.getChildren().slice(0),(function(t){t.get("visible")||(i.get("isRegister")&&i.unregisterElement(t),t.remove())}))}},e}(Uc),hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Bc.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Bc.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Bc.fontFamily}},textBackground:{padding:5,style:{stroke:Bc.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),n=e.style,r=e.autoRotate,i=e.content;if(!je(i)){var o=this.getTextPoint(),a=null;if(r)a=uc(o,this.getRotateAngle());this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:he(he(he({},o),{text:i,matrix:a}),n)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:he({path:e},n)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),r=this.get("textBackground");if(r&&n){var i=n.getBBox(),o=pc(r.padding),a=r.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:he({x:i.x-o[3],y:i.y-o[0],width:i.width+o[1]+o[3],height:i.height+o[0]+o[2],matrix:n.attr("matrix")},a)}).toBack()}},e}(Tc),fh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text").position,i=Math.atan2(n.y-e.y,n.x-e.x);return"start"===r?i-Math.PI/2:i+Math.PI/2},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text");return Mc(e,n,r.position,r.offset)},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]},e}(hh),dh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle;return"start"===this.get("text").position?e+Math.PI/2:n-Math.PI/2},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,r=this.getLocation(),i=r.center,o=r.radius,a=r.startAngle,s=r.endAngle,l="start"===e?a:s,u=this.getRotateAngle()-Math.PI,c=_c(i,o,l),h=Math.cos(u)*n,f=Math.sin(u)*n;return{x:c.x+h,y:c.y+f}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,i=t.endAngle,o=null;if(i-r==2*Math.PI){var a=e.x,s=e.y;o=[["M",a,s-n],["A",n,n,0,1,1,a,s+n],["A",n,n,0,1,1,a,s-n],["Z"]]}else{var l=_c(e,n,r),u=_c(e,n,i),c=Math.abs(i-r)>Math.PI?1:0,h=r>i?0:1;o=[["M",l.x,l.y],["A",n,n,0,c,h,u.x,u.y]]}return o},e}(hh),ph="g2-crosshair",gh=ph+"-line",vh=ph+"-text",yh=((ah={})[""+ph]={position:"relative"},ah[""+gh]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},ah[""+vh]={position:"absolute",color:Bc.textColor,fontFamily:Bc.fontFamily},ah),mh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:ph,defaultStyles:yh,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),e=ir(this.get("crosshairTpl"));t.appendChild(e),this.applyStyle(gh,e),this.set("crosshairEl",e)},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text");return Mc(e,n,r.position,r.offset)},e.prototype.resetText=function(){var t=this.get("text"),e=this.get("textEl");if(t){var n=t.content;if(!e){var r=this.getContainer();e=ir(an(this.get("textTpl"),t)),r.appendChild(e),this.applyStyle(vh,e),this.set("textEl",e)}e.innerHTML=n}else e&&e.remove()},e.prototype.isVertical=function(t,e){return t.x===e.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var e=this.get("start"),n=this.get("end"),r=Math.min(e.x,n.x),i=Math.min(e.y,n.y);this.isVertical(e,n)?lr(t,{width:"1px",height:wc(Math.abs(n.y-e.y))}):lr(t,{height:"1px",width:wc(Math.abs(n.x-e.x))}),lr(t,{top:wc(i),left:wc(r)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var e=this.get("text").align,n=t.clientWidth,r=this.getTextPoint();switch(e){case"center":r.x=r.x-n/2;break;case"right":r.x=r.x-n}lr(t,{top:wc(r.y),left:wc(r.x)})}},e.prototype.updateInner=function(e){en(e,"text")&&this.resetText(),t.prototype.updateInner.call(this,e)},e}(Vc),_h=Object.freeze(Object.defineProperty({__proto__:null,Line:fh,Circle:dh,Base:hh,Html:mh},Symbol.toStringTag,{value:"Module"})),xh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Bc.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),r=e.slice(0).reverse(),i=this.getGridPath(r,!0);return this.get("closed")?n=n.concat(i):(i[0][0]="L",(n=n.concat(i)).push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),r=this.get("items"),i=this.get("alternateColor"),o=null;Pe(r,(function(a,s){var l=a.id||s;if(n){var u=e.getPathStyle();u=Se(u)?u(a,s,r):u;var c=e.getElementId("line-"+l),h=e.getGridPath(a.points);e.addShape(t,{type:"path",name:"grid-line",id:c,attrs:gn({path:h},u)})}if(i&&s>0){var f=e.getElementId("region-"+l),d=s%2==0;if(Ne(i))d&&e.drawAlternateRegion(f,t,o.points,a.points,i);else{var p=d?i[1]:i[0];e.drawAlternateRegion(f,t,o.points,a.points,p)}}o=a}))},e.prototype.drawAlternateRegion=function(t,e,n,r,i){var o=this.getAlternatePath(n,r);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:o,fill:i}})},e}(Tc);var bh,wh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n,r,i,o,a,s,l=this.getLineType(),u=this.get("closed"),c=[];if(t.length)if("circle"===l){var h=this.get("center"),f=t[0],d=(n=h.x,r=h.y,i=f.x,o=f.y,a=i-n,s=o-r,Math.sqrt(a*a+s*s)),p=e?0:1;u?(c.push(["M",h.x,h.y-d]),c.push(["A",d,d,0,0,p,h.x,h.y+d]),c.push(["A",d,d,0,0,p,h.x,h.y-d]),c.push(["Z"])):Pe(t,(function(t,e){0===e?c.push(["M",t.x,t.y]):c.push(["A",d,d,0,0,p,t.x,t.y])}))}else Pe(t,(function(t,e){0===e?c.push(["M",t.x,t.y]):c.push(["L",t.x,t.y])})),u&&c.push(["Z"]);return c},e}(xh),Mh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return Pe(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e},e}(xh),Sh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("maxWidth"),r=this.get("maxHeight"),i=e.width,o=e.height;return n&&(i=Math.min(i,n)),r&&(o=Math.min(o,r)),yc(e.minX,e.minY,i,o)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),r=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+r})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),r=pc(e.padding),i=he({x:0,y:0,width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:i}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),r=n.spacing,i=n.style,o=n.text,a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:he({text:o,x:e.x,y:e.y},i)}).getBBox();this.set("currentPoint",{x:e.x,y:a.maxY+r})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=pc(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(Tc),jh={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Ch={fill:Bc.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Bc.fontFamily,fontWeight:"normal",lineHeight:12},Eh="navigation-arrow-right",Ph="navigation-arrow-left",Th={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},kh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexp&&(p=m),"horizontal"===h?(g&&gm&&(m=e.width)})),_=m,m+=c,s&&(m=Math.min(s,m),_=Math.min(s,_)),this.pageWidth=m,this.pageHeight=l-Math.max(p.height,h+x);var M=Math.floor(this.pageHeight/(h+x));Pe(a,(function(t,e){0!==e&&e%M==0&&(v+=1,g.x+=m,g.y=i),n.moveElementTo(t,g),t.getParent().setClip({type:"rect",attrs:{x:g.x,y:g.y,width:m,height:h}}),g.y+=h+x})),this.totalPagesCnt=v,this.moveElementTo(d,{x:r+_/2-p.width/2-p.minX,y:l-p.height-p.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),"horizontal"===o&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(v/this.get("maxRow")):this.totalPagesCnt=v,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(d),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,n,r){var i={x:0,y:0},o=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),a=Pn(r.marker,"style",{}),s=a.size,l=void 0===s?12:s,u=fe(a,["size"]),c=this.drawArrow(o,i,Ph,"horizontal"===e?"up":"left",l,u);c.on("click",this.onNavigationBack);var h=c.getBBox();i.x+=h.width+2;var f=this.addShape(o,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:he({x:i.x,y:i.y+l/2,text:n,textBaseline:"middle"},Pn(r.text,"style"))}).getBBox();return i.x+=f.width+2,this.drawArrow(o,i,Eh,"horizontal"===e?"down":"right",l,u).on("click",this.onNavigationAfter),o},e.prototype.updateNavigation=function(t){var e=xn({},jh,this.get("pageNavigator")).marker.style,n=e.fill,r=e.opacity,i=e.inactiveFill,o=e.inactiveOpacity,a=this.currentPageIndex+"/"+this.totalPagesCnt,s=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),l=t?t.findById(this.getElementId(Ph)):this.getElementByLocalId(Ph),u=t?t.findById(this.getElementId(Eh)):this.getElementByLocalId(Eh);s.attr("text",a),l.attr("opacity",1===this.currentPageIndex?o:r),l.attr("fill",1===this.currentPageIndex?i:n),l.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),u.attr("opacity",this.currentPageIndex===this.totalPagesCnt?o:r),u.attr("fill",this.currentPageIndex===this.totalPagesCnt?i:n),u.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var c=l.getBBox().maxX+2;s.attr("x",c),c+=s.getBBox().width+2,this.updateArrowPath(u,{x:c,y:0})},e.prototype.drawArrow=function(t,e,n,r,i,o){var a=e.x,s=e.y,l=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:he({size:i,direction:r,path:[["M",a+i/2,s],["L",a,s+i],["L",a+i,s+i],["Z"]],cursor:"pointer"},o)});return l.attr("matrix",uc({x:a+i/2,y:s+i/2},Th[r])),l},e.prototype.updateArrowPath=function(t,e){var n=e.x,r=e.y,i=t.attr(),o=i.size,a=i.direction,s=uc({x:n+o/2,y:r+o/2},Th[a]);t.attr("path",[["M",n+o/2,r],["L",n,r+o],["L",n+o,r+o],["Z"]]),t.attr("matrix",s)},e.prototype.getCurrentNavigationMatrix=function(){var t=this,e=t.currentPageIndex,n=t.pageWidth,r=t.pageHeight;return cc("horizontal"===this.get("layout")?{x:0,y:r*(1-e)}:{x:n*(1-e),y:0})},e.prototype.applyItemStates=function(t,e){if(this.getItemStates(t).length>0){var n=e.getChildren(),r=this.get("itemStates");Pe(n,(function(e){var n=e.get("name").split("-")[2],i=Wc(t,n,r);i&&(e.attr(i),"marker"!==n||e.get("isStroke")&&e.get("isFill")||(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))}))}},e.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),e=this.get("maxItemWidth");return e?t&&(e=t<=e?t:e):t&&(e=t),e},e}(Sh),Ah=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:Bc.textColor,textBaseline:"middle",fontFamily:Bc.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:Bc.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",(function(t){var n=e.getValueByCanvasPoint(t.x,t.y),r=e.getCurrentValue()[1];rn&&(r=n),e.setValue([r,n])}))},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",(function(t){n={x:t.x,y:t.y}})),t.on("legend-track:drag",(function(t){if(n){var r=e.getValueByCanvasPoint(n.x,n.y),i=e.getValueByCanvasPoint(t.x,t.y),o=e.getCurrentValue(),a=o[1]-o[0],s=e.getRange(),l=i-r;l<0?o[0]+l>s.min?e.setValue([o[0]+l,o[1]+l]):e.setValue([s.min,s.min+a]):l>0&&(l>0&&o[1]+li&&(l=i),l0&&this.changeRailLength(r,i,n[i]-u)}},e.prototype.changeRailLength=function(t,e,n){var r,i=t.getBBox();r="height"===e?this.getRailPath(i.x,i.y,i.width,n):this.getRailPath(i.x,i.y,n,i.height),t.attr("path",r)},e.prototype.changeRailPosition=function(t,e,n){var r=t.getBBox(),i=this.getRailPath(e,n,r.width,r.height);t.attr("path",i)},e.prototype.fixedHorizontal=function(t,e,n,r){var i=this.get("label"),o=i.align,a=i.spacing,s=n.getBBox(),l=t.getBBox(),u=e.getBBox(),c=s.height;this.fitRailLength(l,u,s,n),s=n.getBBox(),"rail"===o?(t.attr({x:r.x,y:r.y+c/2}),this.changeRailPosition(n,r.x+l.width+a,r.y),e.attr({x:r.x+l.width+s.width+2*a,y:r.y+c/2})):"top"===o?(t.attr({x:r.x,y:r.y}),e.attr({x:r.x+s.width,y:r.y}),this.changeRailPosition(n,r.x,r.y+l.height+a)):(this.changeRailPosition(n,r.x,r.y),t.attr({x:r.x,y:r.y+s.height+a}),e.attr({x:r.x+s.width,y:r.y+s.height+a}))},e.prototype.fixedVertail=function(t,e,n,r){var i=this.get("label"),o=i.align,a=i.spacing,s=n.getBBox(),l=t.getBBox(),u=e.getBBox();if(this.fitRailLength(l,u,s,n),s=n.getBBox(),"rail"===o)t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x,r.y+l.height+a),e.attr({x:r.x,y:r.y+l.height+s.height+2*a});else if("right"===o)t.attr({x:r.x+s.width+a,y:r.y}),this.changeRailPosition(n,r.x,r.y),e.attr({x:r.x+s.width+a,y:r.y+s.height});else{var c=Math.max(l.width,u.width);t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x+c+a,r.y),e.attr({x:r.x,y:r.y+s.height})}},e}(Sh),Oh="g2-tooltip",Ih="g2-tooltip-title",Bh="g2-tooltip-list",Lh="g2-tooltip-list-item",Fh="g2-tooltip-marker",Dh="g2-tooltip-value",Rh="g2-tooltip-name",Nh="g2-tooltip-crosshair-x",zh="g2-tooltip-crosshair-y",Hh=Object.freeze(Object.defineProperty({__proto__:null,CONTAINER_CLASS:Oh,TITLE_CLASS:Ih,LIST_CLASS:Bh,LIST_ITEM_CLASS:Lh,MARKER_CLASS:Fh,VALUE_CLASS:Dh,NAME_CLASS:Rh,CROSSHAIR_X:Nh,CROSSHAIR_Y:zh},Symbol.toStringTag,{value:"Module"})),Gh=((bh={})[""+Oh]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:Bc.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},bh[""+Ih]={marginBottom:"4px"},bh[""+Bh]={margin:"0px",listStyleType:"none",padding:"0px"},bh[""+Lh]={listStyleType:"none",marginBottom:"4px"},bh[""+Fh]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},bh[""+Dh]={display:"inline-block",float:"right",marginLeft:"30px"},bh[""+Nh]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},bh[""+zh]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},bh);var Yh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • \n \n {name}:\n {value}\n
  • ',xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Oh,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Gh})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),lr(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),lr(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");n&&lr(n,{display:e}),r&&lr(r,{display:e})},e.prototype.initContainer=function(){if(t.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var e=this.getHtmlContentNode();this.get("parent").appendChild(e),this.set("container",e),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(e){this.get("customContent")?this.renderCustomContent():(function(t,e){var n=!1;return Pe(e,(function(e){if(en(t,e))return n=!0,!1})),n}(e,["title","showTitle"])&&this.resetTitle(),en(e,"items")&&this.renderItems()),t.prototype.updateInner.call(this,e)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),r=this.get("offset"),i=this.getOffset(),o=i.offsetX,a=i.offsetY,s=this.get("position"),l=this.get("region"),u=this.getContainer(),c=this.getBBox(),h=c.width,f=c.height;l&&(t=vc(l));var d=function(t,e,n,r,i,o,a){var s=function(t,e,n,r,i,o){var a=t,s=e;switch(o){case"left":a=t-r-n,s=e-i/2;break;case"right":a=t+n,s=e-i/2;break;case"top":a=t-r/2,s=e-i-n;break;case"bottom":a=t-r/2,s=e+n;break;default:a=t+n,s=e-i-n}return{x:a,y:s}}(t,e,n,r,i,o);if(a){var l=function(t,e,n,r,i){return{left:ti.x+i.width,top:ei.y+i.height}}(s.x,s.y,r,i,a);"auto"===o?(l.right&&(s.x=Math.max(0,t-r-n)),l.top&&(s.y=Math.max(0,e-i-n))):"top"===o||"bottom"===o?(l.left&&(s.x=a.x),l.right&&(s.x=a.x+a.width-r),"top"===o&&l.top&&(s.y=e+n),"bottom"===o&&l.bottom&&(s.y=e-i-n)):(l.top&&(s.y=a.y),l.bottom&&(s.y=a.y+a.height-i),"left"===o&&l.left&&(s.x=t+n),"right"===o&&l.right&&(s.x=t-r-n))}return s}(e,n,r,h,f,s,t);lr(u,{left:wc(d.x+o),top:wc(d.y+a)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),e=this.get("parent"),n=this.get("container");n&&n.parentNode===e?e.replaceChild(t,n):e.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,e=this.get("customContent");if(e){var n=e(this.get("title"),this.get("items"));t=dn(n)?n:ir(n)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(Ih)[0],n=t.getElementsByClassName(Bh)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=vc(t),r=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),i&&(i.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),r&&(r.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),r=this.get(t);lr(n,"x"===t?{left:wc(r),top:wc(e.y),height:wc(e.height)}:{top:wc(r),left:wc(e.x),width:wc(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",r="CROSSHAIR_"+t.toUpperCase(),i=Hh[r],o=this.get(e),a=this.get("parent");return o||(o=ir(this.get(n)),this.applyStyle(i,o),a.appendChild(o),this.set(e,o)),o},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");n&&(Pe(t,(function(t){var r=vl.toCSSGradient(t.color),i=he(he({},t),{color:r}),o=ir(an(e,i));n.appendChild(o)})),this.applyChildrenStyles(n,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&gc(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(Vc),Vh={opacity:0},Xh={stroke:"#C5C5C5",strokeOpacity:.85},qh={fill:"#CACED4",opacity:.85};function Wh(t){return function(t){return Cn(t,(function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t)}function Uh(t,e,n,r){void 0===r&&(r=!0);var i=new pu({values:t}),o=new jl({values:Cn(t,(function(t,e){return e}))}),a=Cn(t,(function(t,r){return[o.scale(r)*e,n-i.scale(t)*n]}));return r?function(t){if(t.length<=2)return Wh(t);var e=[];Pe(t,(function(t){jn(t,e.slice(e.length-2))||e.push(t[0],t[1])}));var n=bs(e,!1),r=Ge(t),i=r[0],o=r[1];return n.unshift(["M",i,o]),n}(a):Wh(a)}function Zh(t,e,n,r){var i=ye(t),o=function(t,e){var n=new pu({values:t}),r=n.max<0?n.max:Math.max(0,n.min);return e-n.scale(r)*e}(r,n);return i.push(["L",e,o]),i.push(["L",0,o]),i.push(["Z"]),i}var Kh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Vh,lineStyle:Xh,areaStyle:qh})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,i=e.data,o=e.smooth,a=e.isArea,s=e.backgroundStyle,l=e.lineStyle,u=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:he({x:0,y:0,width:n,height:r},s)});var c=Uh(i,n,r,o);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:he({path:c},l)}),a){var h=Zh(c,n,r,i);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:he({path:h},u)})}},e.prototype.applyOffset=function(){var t=this.cfg,e=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:e,y:n})},e}(Tc),Qh={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},$h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"handler",x:0,y:0,width:10,height:24,style:Qh})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,i=e.style,o=i.fill,a=i.stroke,s=i.radius,l=i.opacity,u=i.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:r,fill:o,stroke:a,radius:s,opacity:l,cursor:u}});var c=1/3*n,h=2/3*n,f=1/4*r,d=3/4*r;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:c,y1:f,x2:c,y2:d,stroke:a,cursor:u}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:h,y1:f,x2:h,y2:d,stroke:a,cursor:u}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",(function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()})),this.get("group").on("mouseleave",(function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()}))},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(Tc),Jh={fill:"#416180",opacity:.05},tf={fill:"#5B8FF9",opacity:.15,cursor:"move"},ef={width:10,height:24},nf={textBaseline:"middle",fill:"#000",opacity:.45},rf="sliderchange",of=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){return function(n){e.currentTarget=t;var r=n.originalEvent;r.stopPropagation(),r.preventDefault(),e.prevX=Pn(r,"touches.0.pageX",r.pageX),e.prevY=Pn(r,"touches.0.pageY",r.pageY);var i=e.getContainerDOM();i.addEventListener("mousemove",e.onMouseMove),i.addEventListener("mouseup",e.onMouseUp),i.addEventListener("mouseleave",e.onMouseUp),i.addEventListener("touchmove",e.onMouseMove),i.addEventListener("touchend",e.onMouseUp),i.addEventListener("touchcancel",e.onMouseUp)}},e.onMouseMove=function(t){var n=e.cfg.width,r=[e.get("start"),e.get("end")];t.stopPropagation(),t.preventDefault();var i=Pn(t,"touches.0.pageX",t.pageX),o=Pn(t,"touches.0.pageY",t.pageY),a=i-e.prevX,s=e.adjustOffsetRange(a/n);e.updateStartEnd(s),e.updateUI(e.getElementByLocalId("foreground"),e.getElementByLocalId("minText"),e.getElementByLocalId("maxText")),e.prevX=i,e.prevY=o,e.draw(),e.emit(rf,[e.get("start"),e.get("end")].sort()),e.delegateEmit("valuechanged",{originValue:r,value:[e.get("start"),e.get("end")]})},e.onMouseUp=function(){e.currentTarget&&(e.currentTarget=void 0);var t=e.getContainerDOM();t&&(t.removeEventListener("mousemove",e.onMouseMove),t.removeEventListener("mouseup",e.onMouseUp),t.removeEventListener("mouseleave",e.onMouseUp),t.removeEventListener("touchmove",e.onMouseMove),t.removeEventListener("touchend",e.onMouseUp),t.removeEventListener("touchcancel",e.onMouseUp))},e}return ce(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.get("start"),r=this.get("end"),i=Ue(n,t,e),o=Ue(r,t,e);this.get("isInit")||n===i&&r===o||this.setValue([i,o])},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange();if(Ce(t)&&2===t.length){var n=[this.get("start"),this.get("end")];this.update({start:Ue(t[0],e.min,e.max),end:Ue(t[1],e.min,e.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:Jh,foregroundStyle:tf,handlerStyle:ef,textStyle:nf}})},e.prototype.update=function(e){var n=e.start,r=e.end,i=he({},e);je(n)||(i.start=Ue(n,0,1)),je(r)||(i.end=Ue(r,0,1)),t.prototype.update.call(this,i),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},e.prototype.init=function(){this.set("start",Ue(this.get("start"),0,1)),this.set("end",Ue(this.get("end"),0,1)),t.prototype.init.call(this)},e.prototype.render=function(){t.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},e.prototype.renderInner=function(t){var e=this.cfg;e.start,e.end;var n=e.width,r=e.height,i=e.trendCfg,o=void 0===i?{}:i,a=e.minText,s=e.maxText,l=e.backgroundStyle,u=void 0===l?{}:l,c=e.foregroundStyle,h=void 0===c?{}:c,f=e.textStyle,d=void 0===f?{}:f,p=xn({},Qh,this.cfg.handlerStyle);Fn(Pn(o,"data"))&&(this.trend=this.addComponent(t,he({component:Kh,id:this.getElementId("trend"),x:0,y:0,width:n,height:r},o))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:he({x:0,y:0,width:n,height:r},u)}),this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:he({y:r/2,textAlign:"right",text:a,silent:!1},d)}),this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:he({y:r/2,textAlign:"left",text:s,silent:!1},d)}),this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:he({y:0,height:r},h)});var g=Pn(p,"width",10),v=Pn(p,"height",24);this.minHandler=this.addComponent(t,{component:$h,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(r-v)/2,width:g,height:v,cursor:"ew-resize",style:p}),this.maxHandler=this.addComponent(t,{component:$h,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(r-v)/2,width:g,height:v,cursor:"ew-resize",style:p})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,e,n){var r=this.cfg,i=r.start,o=r.end,a=r.width,s=r.minText,l=r.maxText,u=r.handlerStyle,c=r.height,h=i*a,f=o*a;this.trend&&(this.trend.update({width:a,height:c}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",h),t.attr("width",f-h);var d=Pn(u,"width",10);e.attr("text",s),n.attr("text",l);var p=this._dodgeText([h,f],e,n),g=p[0],v=p[1];this.minHandler&&(this.minHandler.update({x:h-d/2}),this.get("updateAutoRender")||this.minHandler.render()),Pe(g,(function(t,n){return e.attr(n,t)})),this.maxHandler&&(this.maxHandler.update({x:f-d/2}),this.get("updateAutoRender")||this.maxHandler.render()),Pe(v,(function(t,e){return n.attr(e,t)}))},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":var i=0-n,o=1-n;return Math.min(o,Math.max(i,t));case"maxHandler":i=0-r,o=1-r;return Math.min(o,Math.max(i,t));case"foreground":i=0-n,o=1-r;return Math.min(o,Math.max(i,t))}},e.prototype.updateStartEnd=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":r+=t;break;case"foreground":n+=t,r+=t}this.set("start",n),this.set("end",r)},e.prototype._dodgeText=function(t,e,n){var r,i,o=this.cfg,a=o.handlerStyle,s=o.width,l=Pn(a,"width",10),u=t[0],c=t[1],h=!1;u>c&&(u=(r=[c,u])[0],c=r[1],e=(i=[n,e])[0],n=i[1],h=!0);var f=e.getBBox(),d=n.getBBox(),p=f.width>u-2?{x:u+l/2+2,textAlign:"left"}:{x:u-l/2-2,textAlign:"right"},g=d.width>s-c-2?{x:c-l/2-2,textAlign:"right"}:{x:c+l/2+2,textAlign:"left"};return h?[g,p]:[p,g]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(Tc),af={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},sf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=Ln,e.onStartEvent=function(t){return function(n){e.isMobile=t,n.originalEvent.preventDefault();var r=t?Pn(n.originalEvent,"touches.0.clientX"):n.clientX,i=t?Pn(n.originalEvent,"touches.0.clientY"):n.clientY;e.startPos=e.cfg.isHorizontal?r:i,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),n=[];n=e.isMobile?[rr(t,"touchmove",e.onMouseMove),rr(t,"touchend",e.onMouseUp),rr(t,"touchcancel",e.onMouseUp)]:[rr(t,"mousemove",e.onMouseMove),rr(t,"mouseup",e.onMouseUp),rr(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){n.forEach((function(t){t.remove()}))}},e.onMouseMove=function(t){var n=e.cfg,r=n.isHorizontal,i=n.thumbOffset;t.preventDefault();var o=e.isMobile?Pn(t,"touches.0.clientX"):t.clientX,a=e.isMobile?Pn(t,"touches.0.clientY"):t.clientY,s=r?o:a,l=s-e.startPos;e.startPos=s,e.updateThumbOffset(i+l)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var n=e.cfg,r=n.isHorizontal,i=n.x,o=n.y,a=n.thumbLen,s=e.getContainerDOM().getBoundingClientRect(),l=t.clientX,u=t.clientY,c=r?l-s.left-i-a/2:u-s.top-o-a/2,h=e.validateRange(c);e.updateThumbOffset(h)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return ce(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.getValue(),r=Ue(n,t,e);n===r||this.get("isInit")||this.setValue(r)},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*Ue(t,e.min,e.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},e.prototype.getValue=function(){return Ue(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return he(he({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:af})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,r=e.theme,i=xn({},af,void 0===r?{default:{}}:r).default,o=i.lineCap,a=i.trackColor,s=i.size,l=Pn(this.cfg,"size",s),u=this.get("isHorizontal")?{x1:0+l/2,y1:l/2,x2:n-l/2,y2:l/2,lineWidth:l,stroke:a,lineCap:o}:{x1:l/2,y1:0+l/2,x2:l/2,y2:n-l/2,lineWidth:l,stroke:a,lineCap:o};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:u})},e.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,r=e.thumbLen,i=e.theme,o=xn({},af,i).default,a=o.size,s=o.lineCap,l=o.thumbColor,u=Pn(this.cfg,"size",a),c=this.get("isHorizontal")?{x1:n+u/2,y1:u/2,x2:n+r-u/2,y2:u/2,lineWidth:u,stroke:l,lineCap:s,cursor:"default"}:{x1:u/2,y1:n+u/2,x2:u/2,y2:n+r-u/2,lineWidth:u,stroke:l,lineCap:s,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:c})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var e=t.findById(this.getElementId("thumb"));e.on("mouseover",this.onThumbMouseOver),e.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,r=e.trackLen,i=t;return t+n>r?i=r-n:t+nt.x?t.x:e,n=nt.y?t.y:r,i=i=r&&t<=i}function Mf(e,n){return"object"===t(e)&&n.forEach((function(t){delete e[t]})),e}function Sf(t,e,n){var r,i;void 0===e&&(e=[]),void 0===n&&(n=new Map);try{for(var o=ge(t),a=o.next();!a.done;a=o.next()){var s=a.value;n.has(s)||(e.push(s),n.set(s,!0))}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e}var jf=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=t,this.y=e,this.height=r,this.width=n}return t.fromRange=function(e,n,r,i){return new t(e,n,r-e,i-n)},t.fromObject=function(e){return new t(e.minX,e.minY,e.width,e.height)},Object.defineProperty(t.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.contains=function(t){return t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;et.minX&&this.minYt.minY},t.prototype.size=function(){return this.width*this.height},t.prototype.isPointIn=function(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY},t}();function Cf(t){if(t.isPolar&&!t.isTransposed)return(t.endAngle-t.startAngle)*t.getRadius();var e=t.convert({x:0,y:0}),n=t.convert({x:1,y:0});return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function Ef(t,e){var n=t.getCenter();return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Pf(t,e){var n=t.getCenter();return Math.atan2(e.y-n.y,e.x-n.x)}function Tf(t,e){void 0===e&&(e=0);var n,r=t.start,i=t.end,o=t.getWidth(),a=t.getHeight();if(t.isPolar){var s=t.startAngle,l=t.endAngle,u=t.getCenter(),c=t.getRadius();return{type:"path",startState:{path:mf(u.x,u.y,c+e,s,s)},endState:function(t){var n=(l-s)*t+s;return{path:mf(u.x,u.y,c+e,s,n)}},attrs:{path:mf(u.x,u.y,c+e,s,l)}}}return n=t.isTransposed?{height:a+2*e}:{width:o+2*e},{type:"rect",startState:{x:r.x-e,y:i.y-e,width:t.isTransposed?o+2*e:0,height:t.isTransposed?0:a+2*e},endState:n,attrs:{x:r.x-e,y:i.y-e,width:o+2*e,height:a+2*e}}}var kf=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;function Af(t,e,n,r){return void 0===e&&(e={}),e.type?e.type:"identity"!==t.type&&Jn.includes(n)&&["interval"].includes(r)||t.isCategory?"cat":t.type}function Of(t,e,n){var r=e||[];if(Ke(t)||je(function(t,e){for(var n=null,r=0;r0?1:-1:(r.x-n.x)*(n.y-e.y)>0?-1:1}function Nf(t,e){var n=Pn(t,["components","axis"],{});return xn({},Pn(n,["common"],{}),xn({},Pn(n,[e],{})))}function zf(t,e,n){var r=Pn(t,["components","axis"],{});return xn({},Pn(r,["common","title"],{}),xn({},Pn(r,[e,"title"],{})),n)}function Hf(t){var e=t.x,n=t.y,r=t.circleCenter,i=n.start>n.end,o=t.isTransposed?t.convert({x:i?0:1,y:0}):t.convert({x:0,y:i?0:1}),a=[o.x-r.x,o.y-r.y],s=[1,0],l=o.y>r.y?xi(a,s):-1*xi(a,s),u=l+(e.end-e.start);return{center:r,radius:Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),startAngle:l,endAngle:u}}function Gf(t,e){return un(t)?!1!==t&&{}:Pn(t,[e])}function Yf(t,e){return Pn(t,"position",e)}function Vf(t,e){return Pn(e,["title","text"],If(t))}var Xf=function(){function t(t,e){this.destroyed=!1,this.facets=[],this.view=t,this.cfg=xn({},this.getDefaultCfg(),e)}return t.prototype.init=function(){this.container||(this.container=this.createContainer());var t=this.view.getData();this.facets=this.generateFacets(t)},t.prototype.render=function(){this.renderViews()},t.prototype.update=function(){},t.prototype.clear=function(){this.clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},t.prototype.facetToView=function(t){var e=t.region,n=t.data,r=t.padding,i=void 0===r?this.cfg.padding:r,o=this.view.createView({region:e,padding:i});o.data(n||[]),t.view=o,this.beforeEachView(o,t);var a=this.cfg.eachView;return a&&a(o,t),this.afterEachView(o,t),o},t.prototype.createContainer=function(){return this.view.getLayer(Dn.FORE).addGroup()},t.prototype.renderViews=function(){this.createFacetViews()},t.prototype.createFacetViews=function(){var t=this;return this.facets.map((function(e){return t.facetToView(e)}))},t.prototype.clearFacetViews=function(){var t=this;Pe(this.facets,(function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)}))},t.prototype.parseSpacing=function(){var t=this.view.viewBBox,e=t.width,n=t.height;return this.cfg.spacing.map((function(t,r){return Ke(t)?t/(0===r?e:n):parseFloat(t)/100}))},t.prototype.getFieldValues=function(t,e){var n=[],r={};return Pe(t,(function(t){var i=t[e];je(i)||r[i]||(n.push(i),r[i]=!0)})),n},t.prototype.getRegion=function(t,e,n,r){var i=ve(this.parseSpacing(),2),o=i[0],a=i[1],s=(1+o)/(0===e?1:e)-o,l=(1+a)/(0===t?1:t)-a,u={x:(s+o)*n,y:(l+a)*r};return{start:u,end:{x:u.x+s,y:u.y+l}}},t.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},t.prototype.getDefaultTitleCfg=function(){return{style:{fontSize:14,fill:"#666",fontFamily:this.view.getTheme().fontFamily}}},t.prototype.processAxis=function(t,e){var n=t.getOptions(),r=n.coordinate,i=t.geometries;if("rect"===Pn(r,"type","rect")&&i.length){je(n.axes)&&(n.axes={});var o=n.axes,a=ve(i[0].getXYFields(),2),s=a[0],l=a[1],u=Gf(o,s),c=Gf(o,l);!1!==u&&(n.axes[s]=this.getXAxisOption(s,o,u,e)),!1!==c&&(n.axes[l]=this.getYAxisOption(l,o,c,e))}},t.prototype.getFacetDataFilter=function(t){return function(e){return function(t,e){for(var n=0;n=a[u]?1:0,f=c>Math.PI?1:0,d=n.convert(s),p=Ef(n,d);if(p>=.5)if(c===2*Math.PI){var g={x:(s.x+a.x)/2,y:(s.y+a.y)/2},v=n.convert(g);l.push(["A",p,p,0,f,h,v.x,v.y]),l.push(["A",p,p,0,f,h,d.x,d.y])}else l.push(["A",p,p,0,f,h,d.x,d.y]);return l}(n,r,t)):o.push(Jf(a,t));break;case"a":o.push(td(a,t));break;default:o.push(a)}})),function(t){Pe(t,(function(e,n){if("a"===e[0].toLowerCase()){var r=t[n-1],i=t[n+1];i&&"a"===i[0].toLowerCase()?r&&"l"===r[0].toLowerCase()&&(r[0]="M"):r&&"a"===r[0].toLowerCase()&&i&&"l"===i[0].toLowerCase()&&(i[0]="M")}}))}(o),o}function od(t,e){var n=t.event.target.getCanvasBBox();return n.width>=e||n.height>=e?n:null}function ad(t){var e,n=t.event.target;return n&&(e=n.get("element")),e}function sd(t){var e,n=t.event.target;return n&&(e=n.get("delegateObject")),e}function ld(t){var e=t.event.gEvent;return!(e&&e.fromShape&&e.toShape&&e.fromShape.get("element")===e.toShape.get("element"))}function ud(t){return t&&t.component&&t.component.isList()}function cd(t){return t&&t.component&&t.component.isSlider()}function hd(t){var e=t.event.target;return e&&"mask"===e.get("name")}function fd(t,e){if("path"===t.event.target.get("type")){var n=function(t,e){var n=t.event.target,r=n.getCanvasBBox();return r.width>=e||r.height>=e?n.attr("path"):null}(t,e);if(!n)return;return function(t,e){var n=pd(t),r=md(e);return n.filter((function(t){var e,n,i=t.shape;if("path"===i.get("type"))e=md(i.attr("path"));else{var o=i.getCanvasBBox();e=[[(n=o).minX,n.minY],[n.maxX,n.minY],[n.maxX,n.maxY],[n.minX,n.maxY]]}return function(t,e){if(t.length<2||e.length<2)return!1;var n,r,i=Gs(t),o=Gs(e);if(n=i,(r=o).minX>n.maxX||r.maxXn.maxY||r.maxYn.maxX||i.maxXn.maxY||i.maxY=e.x&&t.y<=e.y&&t.maxY>e.y}function wd(t){var e=t.parent,n=null;return e&&(n=e.views.filter((function(e){return e!==t}))),n}function Md(t,e,n){var r=function(t,e){return t.getCoordinate().invert(e)}(t,n);return e.getCoordinate().convert(r)}function Sd(t,e,n,r){var i=!1;return Pe(t,(function(t){if(t[n]===e[n]&&t[r]===e[r])return i=!0,!1})),i}function jd(t,e){var n=t.getScaleByField(e);return!n&&t.views&&Pe(t.views,(function(t){if(n=jd(t,e))return!1})),n}var Cd=function(){function t(t){this.actions=[],this.event=null,this.cacheMap={},this.view=t}return t.prototype.cache=function(){for(var t=[],e=0;e=0&&e.splice(n,1)},t.prototype.getCurrentPoint=function(){var t=this.event;return t?t.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(t.clientX,t.clientY):{x:t.x,y:t.y}:null},t.prototype.getCurrentShape=function(){return Pn(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=_d(this.view),n=this.getCurrentPoint();return!!n&&!!e.find((function(e){var r=e.getBBox();return t?e.get("name")===t&&bd(r,n):bd(r,n)}))},t.prototype.destroy=function(){Pe(this.actions.slice(),(function(t){t.destroy()})),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},t}(),Ed=function(){function t(t,e){this.view=t,this.cfg=e}return t.prototype.init=function(){this.initEvents()},t.prototype.initEvents=function(){},t.prototype.clearEvents=function(){},t.prototype.destroy=function(){this.clearEvents()},t}();function Pd(t,e,n){var r=t.split(":"),i=r[0],o=e.getAction(i)||function(t,e){var n=Kf[t],r=null;return n&&((r=new(0,n.ActionClass)(e,n.cfg)).name=t,r.init()),r}(i,e);if(!o)throw new Error("There is no action named ".concat(i));return{action:o,methodName:r[1],arg:n}}function Td(t){var e=t.action,n=t.methodName,r=t.arg;if(!e[n])throw new Error("Action(".concat(e.name,") doesn't have a method called ").concat(n));e[n](r)}var kd="start",Ad="showEnable",Od="end",Id="rollback",Bd="processing",Ld=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.callbackCaches={},r.emitCaches={},r.steps=n,r}return ce(e,t),e.prototype.init=function(){this.initContext(),t.prototype.init.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},e.prototype.initEvents=function(){var t=this;Pe(this.steps,(function(e,n){Pe(e,(function(e){var r=t.getActionCallback(n,e);r&&t.bindEvent(e.trigger,r)}))}))},e.prototype.clearEvents=function(){var t=this;Pe(this.steps,(function(e,n){Pe(e,(function(e){var r=t.getActionCallback(n,e);r&&t.offEvent(e.trigger,r)}))}))},e.prototype.initContext=function(){var t=this.view,e=new Cd(t);this.context=e,Pe(this.steps,(function(t){Pe(t,(function(t){if(Se(t.action))t.actionObject={action:$f(t.action,e),methodName:"execute"};else if(Ne(t.action))t.actionObject=Pd(t.action,e,t.arg);else if(Ce(t.action)){var n=t.action,r=Ce(t.arg)?t.arg:[t.arg];t.actionObject=[],Pe(n,(function(n,i){t.actionObject.push(Pd(n,e,r[i]))}))}}))}))},e.prototype.isAllowStep=function(t){var e=this.currentStepName,n=this.steps;if(e===t)return!0;if(t===Ad)return!0;if(t===Bd)return e===kd;if(t===kd)return e!==Bd;if(t===Od)return e===Bd||e===kd;if(t===Id){if(n[Od])return e===Od;if(e===kd)return!0}return!1},e.prototype.isAllowExecute=function(t,e){if(this.isAllowStep(t)){var n=this.getKey(t,e);return(!e.once||!this.emitCaches[n])&&(!e.isEnable||e.isEnable(this.context))}return!1},e.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},e.prototype.afterExecute=function(t,e){t!==Ad&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,e);this.emitCaches[n]=!0},e.prototype.getKey=function(t,e){return t+e.trigger+e.action},e.prototype.getActionCallback=function(t,e){var n=this,r=this.context,i=this.callbackCaches,o=e.actionObject;if(e.action&&o){var a=this.getKey(t,e);if(!i[a]){var s=function(i){r.event=i,n.isAllowExecute(t,e)?(Ce(o)?Pe(o,(function(t){r.event=i,Td(t)})):(r.event=i,Td(o)),n.afterExecute(t,e),e.callback&&(r.event=i,e.callback(r))):r.event=null};e.debounce?i[a]=yn(s,e.debounce.wait,e.debounce.immediate):e.throttle?i[a]=On(s,e.throttle.wait,{leading:e.throttle.leading,trailing:e.throttle.trailing}):i[a]=s}return i[a]}return null},e.prototype.bindEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.addEventListener(n[1],e):"document"===n[0]?document.addEventListener(n[1],e):this.view.on(t,e)},e.prototype.offEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.removeEventListener(n[1],e):"document"===n[0]?document.removeEventListener(n[1],e):this.view.off(t,e)},e}(Ed),Fd={};function Dd(t,e){Fd[on(t)]=e}function Rd(t,e,n){var r=function(t){return Fd[on(t)]}(t);if(!r)return null;if(Ae(r)){var i=gn(vn(r),n);return new Ld(e,i)}return new r(e,n)}function Nd(t){var e,n={point:{default:{fill:t.pointFillColor,r:t.pointSize,stroke:t.pointBorderColor,lineWidth:t.pointBorder,fillOpacity:t.pointFillOpacity},active:{stroke:t.pointActiveBorderColor,lineWidth:t.pointActiveBorder},selected:{stroke:t.pointSelectedBorderColor,lineWidth:t.pointSelectedBorder},inactive:{fillOpacity:t.pointInactiveFillOpacity,strokeOpacity:t.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:t.hollowPointFillColor,lineWidth:t.hollowPointBorder,stroke:t.hollowPointBorderColor,strokeOpacity:t.hollowPointBorderOpacity,r:t.hollowPointSize},active:{stroke:t.hollowPointActiveBorderColor,strokeOpacity:t.hollowPointActiveBorderOpacity},selected:{lineWidth:t.hollowPointSelectedBorder,stroke:t.hollowPointSelectedBorderColor,strokeOpacity:t.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:t.hollowPointInactiveBorderOpacity}},area:{default:{fill:t.areaFillColor,fillOpacity:t.areaFillOpacity,stroke:null},active:{fillOpacity:t.areaActiveFillOpacity},selected:{fillOpacity:t.areaSelectedFillOpacity},inactive:{fillOpacity:t.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:t.hollowAreaBorderColor,lineWidth:t.hollowAreaBorder,strokeOpacity:t.hollowAreaBorderOpacity},active:{fill:null,lineWidth:t.hollowAreaActiveBorder},selected:{fill:null,lineWidth:t.hollowAreaSelectedBorder},inactive:{strokeOpacity:t.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:t.intervalFillColor,fillOpacity:t.intervalFillOpacity},active:{stroke:t.intervalActiveBorderColor,lineWidth:t.intervalActiveBorder},selected:{stroke:t.intervalSelectedBorderColor,lineWidth:t.intervalSelectedBorder},inactive:{fillOpacity:t.intervalInactiveFillOpacity,strokeOpacity:t.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:t.hollowIntervalFillColor,stroke:t.hollowIntervalBorderColor,lineWidth:t.hollowIntervalBorder,strokeOpacity:t.hollowIntervalBorderOpacity},active:{stroke:t.hollowIntervalActiveBorderColor,lineWidth:t.hollowIntervalActiveBorder,strokeOpacity:t.hollowIntervalActiveBorderOpacity},selected:{stroke:t.hollowIntervalSelectedBorderColor,lineWidth:t.hollowIntervalSelectedBorder,strokeOpacity:t.hollowIntervalSelectedBorderOpacity},inactive:{stroke:t.hollowIntervalInactiveBorderColor,lineWidth:t.hollowIntervalInactiveBorder,strokeOpacity:t.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:t.lineBorderColor,lineWidth:t.lineBorder,strokeOpacity:t.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:t.lineActiveBorder},selected:{lineWidth:t.lineSelectedBorder},inactive:{strokeOpacity:t.lineInactiveBorderOpacity}}},r=function(t){return{title:{autoRotate:!0,position:"center",spacing:t.axisTitleSpacing,style:{fill:t.axisTitleTextFillColor,fontSize:t.axisTitleTextFontSize,lineHeight:t.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily},iconStyle:{fill:t.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:t.axisLabelOffset,style:{fill:t.axisLabelFillColor,fontSize:t.axisLabelFontSize,lineHeight:t.axisLabelLineHeight,fontFamily:t.fontFamily}},line:{style:{lineWidth:t.axisLineBorder,stroke:t.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:t.axisGridBorderColor,lineWidth:t.axisGridBorder,lineDash:t.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:t.axisTickLineBorder,stroke:t.axisTickLineBorderColor},alignTick:!0,length:t.axisTickLineLength},subTickLine:null,animate:!0}}(t),i=function(t){return{title:null,marker:{symbol:"circle",spacing:t.legendMarkerSpacing,style:{r:t.legendCircleMarkerSize,fill:t.legendMarkerColor}},itemName:{spacing:5,style:{fill:t.legendItemNameFillColor,fontFamily:t.fontFamily,fontSize:t.legendItemNameFontSize,lineHeight:t.legendItemNameLineHeight,fontWeight:t.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:t.legendPageNavigatorMarkerSize,inactiveFill:t.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:t.legendPageNavigatorMarkerInactiveFillOpacity,fill:t.legendPageNavigatorMarkerFillColor,opacity:t.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:t.legendPageNavigatorTextFillColor,fontSize:t.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:t.legendItemSpacing,itemMarginBottom:t.legendItemMarginBottom,padding:t.legendPadding}}(t);return{background:t.backgroundColor,defaultColor:t.brandColor,subColor:t.subColor,semanticRed:t.paletteSemanticRed,semanticGreen:t.paletteSemanticGreen,padding:"auto",fontFamily:t.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:t.paletteQualitative10,colors20:t.paletteQualitative20,sequenceColors:t.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:function(t){var e=t.geometry.coordinate;if(e.isPolar&&e.isTransposed){var r=xf(t.getModel(),e),i=(r.startAngle+r.endAngle)/2;return{matrix:Ci(null,[["t",7.5*Math.cos(i),7.5*Math.sin(i)]])}}return n.interval.selected}}},"hollow-rect":{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},line:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},tick:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},funnel:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}},pyramid:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},line:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},dot:{default:{style:he(he({},n.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:he(he({},n.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:he(he({},n.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:he(he({},n.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:he(he({},n.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:he(he({},n.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:he(he({},n.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:he(he({},n.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hvh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},polygon:{polygon:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},point:{circle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},square:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},bowtie:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},diamond:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},hexagon:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},triangle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"triangle-down":{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"hollow-circle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-square":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-bowtie":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-diamond":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-hexagon":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle-down":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},cross:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},tick:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},plus:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},hyphen:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},line:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}}},area:{area:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},smooth:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},line:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"smooth-line":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}},schema:{candle:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},box:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}}},edge:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},arc:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},violin:{violin:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hollow:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"hollow-smooth":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}}},components:{axis:{common:r,top:{position:"top",grid:null,title:null,verticalLimitLength:.5},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:.5},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:xn({},r.grid,{line:{type:"line"}})},radius:{title:null,grid:xn({},r.grid,{line:{type:"circle"}})}},legend:{common:i,right:{layout:"vertical",padding:t.legendVerticalPadding},left:{layout:"vertical",padding:t.legendVerticalPadding},top:{layout:"horizontal",padding:t.legendHorizontalPadding},bottom:{layout:"horizontal",padding:t.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:t.sliderRailHeight,defaultLength:t.sliderRailWidth,style:{fill:t.sliderRailFillColor,stroke:t.sliderRailBorderColor,lineWidth:t.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:t.sliderLabelTextFillColor,fontSize:t.sliderLabelTextFontSize,lineHeight:t.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},handler:{size:t.sliderHandlerWidth,style:{fill:t.sliderHandlerFillColor,stroke:t.sliderHandlerBorderColor}},slidable:!0,padding:i.padding}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:t.tooltipCrosshairsBorderColor,lineWidth:t.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e["".concat(Oh)]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:t.tooltipContainerFillColor,opacity:t.tooltipContainerFillOpacity,boxShadow:t.tooltipContainerShadow,borderRadius:"".concat(t.tooltipContainerBorderRadius,"px"),color:t.tooltipTextFillColor,fontSize:"".concat(t.tooltipTextFontSize,"px"),fontFamily:t.fontFamily,lineHeight:"".concat(t.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},e["".concat(Ih)]={marginBottom:"12px",marginTop:"12px"},e["".concat(Bh)]={margin:0,listStyleType:"none",padding:0},e["".concat(Lh)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e["".concat(Fh)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e["".concat(Dh)]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:t.annotationArcBorderColor,lineWidth:t.annotationArcBorder},animate:!0},line:{style:{stroke:t.annotationLineBorderColor,lineDash:t.annotationLineDash,lineWidth:t.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textAlign:"start",fontFamily:t.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:t.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:t.annotationRegionBorder,stroke:t.annotationRegionBorderColor,fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:t.brandColor,lineWidth:2}},line:{style:{stroke:t.annotationLineBorderColor,lineWidth:t.annotationLineBorder},length:t.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:t.cSliderBackgroundFillColor,opacity:t.cSliderBackgroundFillOpacity},foregroundStyle:{fill:t.cSliderForegroundFillColor,opacity:t.cSliderForegroundFillOpacity},handlerStyle:{width:t.cSliderHandlerWidth,height:t.cSliderHandlerHeight,fill:t.cSliderHandlerFillColor,opacity:t.cSliderHandlerFillOpacity,stroke:t.cSliderHandlerBorderColor,lineWidth:t.cSliderHandlerBorder,radius:t.cSliderHandlerBorderRadius,highLightFill:t.cSliderHandlerHighlightFillColor},textStyle:{fill:t.cSliderTextFillColor,opacity:t.cSliderTextFillOpacity,fontSize:t.cSliderTextFontSize,lineHeight:t.cSliderTextLineHeight,fontWeight:t.cSliderTextFontWeight,stroke:t.cSliderTextBorderColor,lineWidth:t.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:t.scrollbarTrackFillColor,thumbColor:t.scrollbarThumbFillColor}},hover:{style:{thumbColor:t.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:t.labelFillColor,fontSize:t.labelFontSize,fontFamily:t.fontFamily,stroke:t.labelBorderColor,lineWidth:t.labelBorder},fillColorDark:t.labelFillColorDark,fillColorLight:t.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:t.innerLabelFillColor,fontSize:t.innerLabelFontSize,fontFamily:t.fontFamily,stroke:t.innerLabelBorderColor,lineWidth:t.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:t.overflowLabelFillColor,fontSize:t.overflowLabelFontSize,fontFamily:t.fontFamily,stroke:t.overflowLabelBorderColor,lineWidth:t.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:t.labelLineBorder}},autoRotate:!0}}}var zd="#000",Hd="#595959",Gd="#8C8C8C",Yd="#BFBFBF",Vd="#D9D9D9",Xd="#F0F0F0",qd="#FFFFFF",Wd="#D9D9D9",Ud=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],Zd=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],Kd=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],Qd=function(t){void 0===t&&(t={});var e=t.paletteQualitative10,n=void 0===e?Ud:e,r=t.paletteQualitative20,i=void 0===r?Zd:r,o=t.brandColor,a=void 0===o?n[0]:o;return he(he({},{backgroundColor:"transparent",brandColor:a,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:n,paletteQualitative20:i,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:Kd,fontFamily:'"Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:Yd,axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Hd,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Wd,axisTickLineBorderColor:Yd,axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Vd,axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Gd,axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Vd,axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Gd,legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:a,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Hd,legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:zd,legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:zd,legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Gd,legendPageNavigatorTextFontSize:12,sliderRailFillColor:Vd,sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Gd,sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Xd,sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Yd,annotationArcBorderColor:Vd,annotationArcBorder:1,annotationLineBorderColor:Yd,annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Hd,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:zd,annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Yd,tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Hd,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Hd,labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:qd,innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Hd,overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:qd,overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Yd,cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:a,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:qd,pointBorderOpacity:1,pointActiveBorderColor:zd,pointSelectedBorder:2,pointSelectedBorderColor:zd,pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:a,hollowPointBorderOpacity:.95,hollowPointFillColor:qd,hollowPointActiveBorder:1,hollowPointActiveBorderColor:zd,hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:zd,hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:a,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:a,areaFillOpacity:.25,areaActiveFillColor:a,areaActiveFillOpacity:.5,areaSelectedFillColor:a,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:a,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:zd,hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:zd,hollowAreaInactiveBorderOpacity:.3,intervalFillColor:a,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:zd,intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:zd,intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:a,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:qd,hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:zd,hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:zd,hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}),t)};function $d(t){var e=t.styleSheet,n=void 0===e?{}:e,r=fe(t,["styleSheet"]),i=Qd(n);return xn({},Nd(i),r)}Qd();var Jd={default:$d({})};function tp(t){return Pn(Jd,on(t),Jd.default)}function ep(t,e,n){return Qe(n.translate(t),n.translate(e))}function np(t,e,n){var r=n.coordinate,i=n.getYScale(),o=i.field,a=r.invert(e),s=i.invert(a.y);return Oe(t,(function(t){var e=t[tr];return e[o][0]<=s&&e[o][1]>=s}))||t[t.length-1]}var rp=mn((function(t){if(t.isCategory)return 1;for(var e=t.values,n=e.length,r=t.translate(e[0]),i=r,o=0;oi&&(i=s)}return(i-r)/(n-1)}));function ip(t){var e,n,r,i=function(t){var e=nn(t.attributes);return be(e,(function(t){return xe(Jn,t.type)}))}(t);try{for(var o=ge(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=s.getScale(s.type);if(l&&l.isLinear)if("cat"!==Af(l,Pn(t.scaleDefs,l.field),s.type,t.type)){r=l;break}}}catch(h){e={error:h}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}var u=t.getXScale(),c=t.getYScale();return r||c||u}function op(t,e,n){if(0===e.length)return null;var r=n.type,i=n.getXScale(),o=n.getYScale(),a=i.field,s=o.field,l=null;if("heatmap"===r||"point"===r){for(var u=n.coordinate.invert(t),c=i.invert(u.x),h=o.invert(u.y),f=1/0,d=0;d(1+o)/2&&(s=a),r.translate(r.invert(s))}(t,n),x=y[tr][a],b=y[tr][s],w=m[tr][a],M=o.isLinear&&Ce(b);if(Ce(x)){for(d=0;d=_){if(!M){l=T;break}Ce(l)||(l=[]),l.push(T)}}Ce(l)&&(l=np(l,t,n))}else{var S=void 0;if(i.isLinear||"timeCat"===i.type){if((_>i.translate(w)||_i.max||_Math.abs(i.translate(S[tr][a])-_)&&(m=S)}var k=rp(n.getXScale());return!l&&Math.abs(i.translate(m[tr][a])-_)<=k/2&&(l=m),l}function ap(t,e,n,r){var i,o;void 0===n&&(n=""),void 0===r&&(r=!1);var a,s,l=t[tr],u=function(t,e,n){var r=e.getAttribute("position").getFields(),i=e.scales,o=Se(n)||!n?r[0]:n,a=i[o],s=a?a.getText(t[o]):t[o]||o;return Se(n)?n(s,t):s}(l,e,n),c=e.tooltipOption,h=e.theme.defaultColor,f=[];function d(e,n){if(r||!je(n)&&""!==n){var i={title:u,data:l,mappingData:t,name:e,value:n,color:t.color||h,marker:!0};f.push(i)}}if(Ee(c)){var p=c.fields,g=c.callback;if(g){var v=p.map((function(e){return t[tr][e]})),y=g.apply(void 0,me([],ve(v),!1)),m=he({data:t[tr],mappingData:t,title:u,color:t.color||h,marker:!0},y);f.push(m)}else{var _=e.scales;try{for(var x=ge(p),b=x.next();!b.done;b=x.next()){var w=b.value;if(!je(l[w])){var M=_[w];d(a=If(M),s=M.getText(l[w]))}}}catch(j){i={error:j}}finally{try{b&&!b.done&&(o=x.return)&&o.call(x)}finally{if(i)throw i.error}}}}else{var S=ip(e);s=function(t,e){var n=t[e.field];return Ce(n)?n.map((function(t){return e.getText(t)})).join("-"):e.getText(n)}(l,S),a=function(t,e){var n,r=e.getGroupScales();if(r.length&&(n=r[0]),n){var i=n.field;return n.getText(t[i])}return If(ip(e))}(l,e),d(a,s)}return f}function sp(t,e,n,r){var i,o,a=r.showNil,s=[],l=t.dataArray;if(!Mn(l)){t.sort(l);try{for(var u=ge(l),c=u.next();!c.done;c=u.next()){var h=op(e,c.value,t);if(h){var f=t.getElementId(h),d=t.elementsMap[f];if("heatmap"===t.type||d.visible){var p=ap(h,t,n,a);p.length&&s.push(p)}}}}catch(g){i={error:g}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return s}function lp(t,e,n,r){var i=r.showNil,o=[],a=t.container.getShape(e.x,e.y);if(a&&a.get("visible")&&a.get("origin")){var s=ap(a.get("origin").mappingData,t,n,i);s.length&&o.push(s)}return o}function up(t,e,n){var r,i,o=[],a=t.geometries,s=n.shared,l=n.title,u=n.reversed;try{for(var c=ge(a),h=c.next();!h.done;h=c.next()){var f=h.value;if(f.visible&&!1!==f.tooltipOption){var d=f.type,p=void 0;(p=["point","edge","polygon"].includes(d)?lp(f,e,l,n):["area","line","path","heatmap"].includes(d)||!1!==s?sp(f,e,l,n):lp(f,e,l,n)).length&&(u&&p.reverse(),o.push(p))}}}catch(g){r={error:g}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return o}function cp(t){void 0===t&&(t=0);var e=Ce(t)?t:[t];switch(e.length){case 0:e=[0,0,0,0];break;case 1:e=new Array(4).fill(e[0]);break;case 2:e=me(me([],ve(e),!1),ve(e),!1);break;case 3:e=me(me([],ve(e),!1),[e[1]],!1);break;default:e=e.slice(0,4)}return e}var hp={};function fp(t,e){hp[t]=e}var dp=function(){function t(t){this.option=this.wrapperOption(t)}return t.prototype.update=function(t){return this.option=this.wrapperOption(t),this},t.prototype.hasAction=function(t){var e=this.option.actions;return Ve(e,(function(e){return e[0]===t}))},t.prototype.create=function(t,e){var n=this.option,r=n.type,i=n.cfg,o="theta"===r,a=he({start:t,end:e},i),s=function(t){return oc[t.toLowerCase()]}(o?"polar":r);return this.coordinate=new s(a),this.coordinate.type=r,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},t.prototype.adjust=function(t,e){return this.coordinate.update({start:t,end:e}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},t.prototype.rotate=function(t){return this.option.actions.push(["rotate",t]),this},t.prototype.reflect=function(t){return this.option.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.option.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},t.prototype.getOption=function(){return this.option},t.prototype.getCoordinate=function(){return this.coordinate},t.prototype.wrapperOption=function(t){return he({type:"rect",actions:[],cfg:{}},t)},t.prototype.execActions=function(t){var e=this;Pe(this.option.actions,(function(n){var r,i=ve(n),o=i[0],a=i.slice(1);(!!je(t)||t.includes(o))&&(r=e.coordinate)[o].apply(r,me([],ve(a),!1))}))},t}(),pp=function(){function t(t,e,n){this.view=t,this.gEvent=e,this.data=n,this.type=e.type}return t.fromData=function(e,n,r){return new t(e,new Xr(n,{}),r)},Object.defineProperty(t.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},t.prototype.clone=function(){return new t(this.view,this.gEvent,this.data)},t}();function gp(t){var e=t.getController("axis"),n=t.getController("legend"),r=t.getController("annotation");[e,t.getController("slider"),t.getController("scrollbar"),n,r].forEach((function(t){t&&t.layout()}))}var vp=function(){function t(){this.scales=new Map,this.syncScales=new Map}return t.prototype.createScale=function(t,e,n,r){var i=n,o=this.getScaleMeta(r);if(0===e.length&&o){var a=o.scale,s={type:a.type};a.isCategory&&(s.values=a.values),i=xn(s,o.scaleDef,n)}var l=Of(t,e,i);return this.cacheScale(l,n,r),l},t.prototype.sync=function(t,e){var n=this;this.syncScales.forEach((function(r,i){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=[];Pe(r,(function(t){var e=n.getScale(t);a=Ke(e.max)?Math.max(a,e.max):a,o=Ke(e.min)?Math.min(o,e.min):o,Pe(e.values,(function(t){s.includes(t)||s.push(t)}))})),Pe(r,(function(r){var i=n.getScale(r);if(i.isContinuous)i.change({min:o,max:a,values:s});else if(i.isCategory){var l=i.range,u=n.getScaleMeta(r);s&&!Pn(u,["scaleDef","range"])&&(l=Bf(xn({},i,{values:s}),t,e)),i.change({values:s,range:l})}}))}))},t.prototype.cacheScale=function(t,e,n){var r=this.getScaleMeta(n);r&&r.scale.type===t.type?(!function(t,e){if("identity"!==t.type&&"identity"!==e.type){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);t.change(n)}}(r.scale,t),r.scaleDef=e):(r={key:n,scale:t,scaleDef:e},this.scales.set(n,r));var i=this.getSyncKey(r);if(r.syncKey=i,this.removeFromSyncScales(n),i){var o=this.syncScales.get(i);o||(o=[],this.syncScales.set(i,o)),o.push(n)}},t.prototype.getScale=function(t){var e=this.getScaleMeta(t);if(!e){var n=Ye(t.split("-")),r=this.syncScales.get(n);r&&r.length&&(e=this.getScaleMeta(r[0]))}return e&&e.scale},t.prototype.deleteScale=function(t){var e=this.getScaleMeta(t);if(e){var n=e.syncKey,r=this.syncScales.get(n);if(r&&r.length){var i=r.indexOf(t);-1!==i&&r.splice(i,1)}}this.scales.delete(t)},t.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},t.prototype.removeFromSyncScales=function(t){var e=this;this.syncScales.forEach((function(n,r){var i=n.indexOf(t);if(-1!==i)return n.splice(i,1),0===n.length&&e.syncScales.delete(r),!1}))},t.prototype.getSyncKey=function(t){var e=t.scale,n=t.scaleDef,r=e.field,i=Pn(n,["sync"]);return!0===i?r:!1===i?void 0:i},t.prototype.getScaleMeta=function(t){return this.scales.get(t)},t}(),yp=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.top=t,this.right=e,this.bottom=n,this.left=r}return t.instance=function(e,n,r,i){return void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),new t(e,n,r,i)},t.prototype.max=function(t){var e=ve(t,4),n=e[0],r=e[1],i=e[2],o=e[3];return this.top=Math.max(this.top,n),this.right=Math.max(this.right,r),this.bottom=Math.max(this.bottom,i),this.left=Math.max(this.left,o),this},t.prototype.shrink=function(t){var e=ve(t,4),n=e[0],r=e[1],i=e[2],o=e[3];return this.top+=n,this.right+=r,this.bottom+=i,this.left+=o,this},t.prototype.inc=function(t,e){var n=t.width,r=t.height;switch(e){case Rn.TOP:case Rn.TOP_LEFT:case Rn.TOP_RIGHT:this.top+=r;break;case Rn.RIGHT:case Rn.RIGHT_TOP:case Rn.RIGHT_BOTTOM:this.right+=n;break;case Rn.BOTTOM:case Rn.BOTTOM_LEFT:case Rn.BOTTOM_RIGHT:this.bottom+=r;break;case Rn.LEFT:case Rn.LEFT_TOP:case Rn.LEFT_BOTTOM:this.left+=n}return this},t.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},t.prototype.clone=function(){return new(t.bind.apply(t,me([void 0],ve(this.getPadding()),!1)))},t}();function mp(t){var e=t.padding;if(!function(t){return!Ke(t)&&!Ce(t)}(e))return new(yp.bind.apply(yp,me([void 0],ve(cp(e)),!1)));var n=t.viewBBox,r=new yp,i=[],o=[],a=[];return Pe(t.getComponents(),(function(t){var e=t.type;e===Nn.AXIS?i.push(t):[Nn.LEGEND,Nn.SLIDER,Nn.SCROLLBAR].includes(e)?o.push(t):e!==Nn.GRID&&e!==Nn.TOOLTIP&&a.push(t)})),Pe(i,(function(t){var e=t.component.getLayoutBBox(),i=new jf(e.x,e.y,e.width,e.height).exceed(n);r.max(i)})),Pe(o,(function(t){var e=t.component,n=t.direction,i=e.getLayoutBBox(),o=e.get("padding"),a=new jf(i.x,i.y,i.width,i.height).expand(o);r.inc(a,n)})),Pe(a,(function(t){var e=t.component,n=t.direction,i=e.getLayoutBBox(),o=new jf(i.x,i.y,i.width,i.height);r.inc(o,n)})),r}function _p(t,e,n){var r=n.instance();e.forEach((function(t){t.autoPadding=r.max(t.autoPadding.getPadding())}))}var xp=function(t){function e(e){var n=t.call(this,{visible:e.visible})||this;n.views=[],n.geometries=[],n.controllers=[],n.interactions={},n.limitInPlot=!1,n.options={data:[],animate:!0},n.usedControllers=Object.keys(hp),n.scalePool=new vp,n.layoutFunc=gp,n.isPreMouseInPlot=!1,n.isDataChanged=!1,n.isCoordinateChanged=!1,n.createdScaleKeys=new Map,n.onCanvasEvent=function(t){var e=t.name;if(!e.includes(":")){var r=n.createViewEvent(t);n.doPlotEvent(r),n.emit(e,r)}},n.onDelegateEvents=function(t){var e=t.name;if(e.includes(":")){var r=n.createViewEvent(t);n.emit(e,r)}};var r=e.id,i=void 0===r?Bn("view"):r,o=e.parent,a=e.canvas,s=e.backgroundGroup,l=e.middleGroup,u=e.foregroundGroup,c=e.region,h=void 0===c?{start:{x:0,y:0},end:{x:1,y:1}}:c,f=e.padding,d=e.appendPadding,p=e.theme,g=e.options,v=e.limitInPlot,y=e.syncViewPadding;return n.parent=o,n.canvas=a,n.backgroundGroup=s,n.middleGroup=l,n.foregroundGroup=u,n.region=h,n.padding=f,n.appendPadding=d,n.options=he(he({},n.options),g),n.limitInPlot=v,n.id=i,n.syncViewPadding=y,n.themeObject=Ee(p)?xn({},tp("default"),$d(p)):tp(p),n.init(),n}return ce(e,t),e.prototype.setLayout=function(t){this.layoutFunc=t},e.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},e.prototype.render=function(t,e){void 0===t&&(t=!1),this.emit(Gn.BEFORE_RENDER,pp.fromData(this,Gn.BEFORE_RENDER,e)),this.paint(t),this.emit(Gn.AFTER_RENDER,pp.fromData(this,Gn.AFTER_RENDER,e)),!1===this.visible&&this.changeVisible(!1)},e.prototype.clear=function(){var t=this;this.emit(Gn.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var e=this.geometries,n=0;n');j.appendChild(C);var E=cr(j,s,i,o),P=new(function(t){var e=er[t];if(!e)throw new Error("G engine '".concat(t,"' is not exist, please register it at first."));return e}(h).Canvas)(he({container:C,pixelRatio:f,localRefresh:p,supportCSSTransform:m},E));return(n=t.call(this,{parent:null,canvas:P,backgroundGroup:P.addGroup({zIndex:Un}),middleGroup:P.addGroup({zIndex:Wn}),foregroundGroup:P.addGroup({zIndex:qn}),padding:l,appendPadding:u,visible:v,options:b,limitInPlot:w,theme:M,syncViewPadding:S})||this).onResize=yn((function(){n.forceFit()}),300),n.ele=j,n.canvas=P,n.width=E.width,n.height=E.height,n.autoFit=s,n.localRefresh=p,n.renderer=h,n.wrapperElement=C,n.updateCanvasStyle(),n.bindAutoFit(),n.initDefaultInteractions(x),n}return ce(e,t),e.prototype.initDefaultInteractions=function(t){var e=this;Pe(t,(function(t){e.interaction(t)}))},e.prototype.aria=function(t){var e="aria-label";!1===t?this.ele.removeAttribute(e):this.ele.setAttribute(e,t.label)},e.prototype.changeSize=function(t,e){return this.width===t&&this.height===e||(this.emit(Gn.BEFORE_CHANGE_SIZE),this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this.emit(Gn.AFTER_CHANGE_SIZE)),this},e.prototype.clear=function(){t.prototype.clear.call(this),this.aria(!1)},e.prototype.destroy=function(){var e,n;t.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),e=this.wrapperElement,(n=e.parentNode)&&n.removeChild(e),this.wrapperElement=null},e.prototype.changeVisible=function(e){return t.prototype.changeVisible.call(this,e),this.wrapperElement.style.display=e?"":"none",this},e.prototype.forceFit=function(){if(!this.destroyed){var t=cr(this.ele,!0,this.width,this.height),e=t.width,n=t.height;this.changeSize(e,n)}},e.prototype.updateCanvasStyle=function(){lr(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(xp),Mp=function(){function t(t){this.visible=!0,this.components=[],this.view=t}return t.prototype.clear=function(t){Pe(this.components,(function(t){t.component.destroy()})),this.components=[]},t.prototype.destroy=function(){this.clear()},t.prototype.getComponents=function(){return this.components},t.prototype.changeVisible=function(t){this.visible!==t&&(this.components.forEach((function(e){t?e.component.show():e.component.hide()})),this.visible=t)},t}();var Sp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isLocked=!1,e}return ce(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.isVisible=function(){return!1!==this.view.getOptions().tooltip},e.prototype.render=function(){},e.prototype.showTooltip=function(t){if(this.point=t,this.isVisible()){var e=this.view,n=this.getTooltipItems(t);if(n.length){var r=this.getTitle(n),i={x:n[0].x,y:n[0].y};e.emit("tooltip:show",pp.fromData(e,"tooltip:show",he({items:n,title:r},t)));var o=this.getTooltipCfg(),a=o.follow,s=o.showMarkers,l=o.showCrosshairs,u=o.showContent,c=o.marker,h=this.items,f=this.title;if(jn(f,r)&&jn(h,n)?(this.tooltip&&a&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()):(e.emit("tooltip:change",pp.fromData(e,"tooltip:change",he({items:n,title:r},t))),(Se(u)?u(n):u)&&(this.tooltip||this.renderTooltip(),this.tooltip.update(gn({},o,{items:this.getItemsAfterProcess(n),title:r},a?t:{})),this.tooltip.show()),s&&this.renderTooltipMarkers(n,c)),this.items=n,this.title=r,l){var d=Pn(o,["crosshairs","follow"],!1);this.renderCrosshairs(d?t:i,o)}}else this.hideTooltip()}},e.prototype.hideTooltip=function(){if(this.getTooltipCfg().follow){var t=this.tooltipMarkersGroup;t&&t.hide();var e=this.xCrosshair,n=this.yCrosshair;e&&e.hide(),n&&n.hide();var r=this.tooltip;r&&r.hide(),this.view.emit("tooltip:hide",pp.fromData(this.view,"tooltip:hide",{})),this.point=null}else this.point=null},e.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},e.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},e.prototype.isTooltipLocked=function(){return this.isLocked},e.prototype.clear=function(){var t=this,e=t.tooltip,n=t.xCrosshair,r=t.yCrosshair,i=t.tooltipMarkersGroup;e&&(e.hide(),e.clear()),n&&n.clear(),r&&r.clear(),i&&i.clear(),(null==e?void 0:e.get("customContent"))&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},e.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},e.prototype.changeVisible=function(t){if(this.visible!==t){var e=this,n=e.tooltip,r=e.tooltipMarkersGroup,i=e.xCrosshair,o=e.yCrosshair;t?(n&&n.show(),r&&r.show(),i&&i.show(),o&&o.show()):(n&&n.hide(),r&&r.hide(),i&&i.hide(),o&&o.hide()),this.visible=t}},e.prototype.getTooltipItems=function(t){var e,n,r,i,o,a,s=this.findItemsFromView(this.view,t);if(s.length){s=Ie(s);try{for(var l=ge(s),u=l.next();!u.done;u=l.next()){var c=u.value;try{for(var h=(r=void 0,ge(c)),f=h.next();!f.done;f=h.next()){var d=f.value,p=d.mappingData,g=p.x,v=p.y;d.x=Ce(g)?g[g.length-1]:g,d.y=Ce(v)?v[v.length-1]:v}}catch(M){r={error:M}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}}catch(S){e={error:S}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}if(!1===this.getTooltipCfg().shared&&s.length>1){var y=s[0],m=Math.abs(t.y-y[0].y);try{for(var _=ge(s),x=_.next();!x.done;x=_.next()){var b=x.value,w=Math.abs(t.y-b[0].y);w<=m&&(y=b,m=w)}}catch(j){o={error:j}}finally{try{x&&!x.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}s=[y]}return function(t){for(var e=[],n=function(n){var r=t[n];Oe(e,(function(t){return t.color===r.color&&t.name===r.name&&t.value===r.value&&t.title===r.title}))||e.push(r)},r=0;r'+r+"":r}})},e.prototype.getTitle=function(t){var e=t[0].title||t[0].name;return this.title=e,e},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),e={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),r=new pf(he(he({parent:t.get("el").parentNode,region:e},n),{visible:!1,crosshairs:null}));r.init(),this.tooltip=r},e.prototype.renderTooltipMarkers=function(t,e){var n,r,i=this.getTooltipMarkersGroup(),o=this.view.getRootView(),a=o.limitInPlot;try{for(var s=ge(t),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.x,h=u.y;if(a||(null==i?void 0:i.getClip())){var f=Tf(o.getCoordinate()),d=f.type,p=f.attrs;null==i||i.setClip({type:d,attrs:p})}else null==i||i.setClip(void 0);var g=this.view.getTheme(),v=Pn(g,["components","tooltip","marker"],{}),y=he(he({fill:u.color,symbol:"circle",shadowColor:u.color},Se(e)?he(he({},v),e(u)):e),{x:c,y:h});i.addShape("marker",{attrs:y})}}catch(m){n={error:m}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},e.prototype.renderCrosshairs=function(t,e){var n=Pn(e,["crosshairs","type"],"x");"x"===n?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,e)):"y"===n?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,e)):"xy"===n&&(this.renderXCrosshairs(t,e),this.renderYCrosshairs(t,e))},e.prototype.renderXCrosshairs=function(t,e){var n,r,i=this.getViewWithGeometry(this.view).getCoordinate();if(i.isRect)i.isTransposed?(n={x:i.start.x,y:t.y},r={x:i.end.x,y:t.y}):(n={x:t.x,y:i.end.y},r={x:t.x,y:i.start.y});else{var o=Pf(i,t),a=i.getCenter(),s=i.getRadius();r=yf(a.x,a.y,s,o),n=a}var l=xn({start:n,end:r,container:this.getTooltipCrosshairsGroup()},Pn(e,"crosshairs",{}),this.getCrosshairsText("x",t,e));delete l.type;var u=this.xCrosshair;u?u.update(l):(u=new fh(l)).init(),u.render(),u.show(),this.xCrosshair=u},e.prototype.renderYCrosshairs=function(t,e){var n,r,i=this.getViewWithGeometry(this.view).getCoordinate();if(i.isRect){var o=void 0,a=void 0;i.isTransposed?(o={x:t.x,y:i.end.y},a={x:t.x,y:i.start.y}):(o={x:i.start.x,y:t.y},a={x:i.end.x,y:t.y}),n={start:o,end:a},r="Line"}else n={center:i.getCenter(),radius:Ef(i,t),startAngle:i.startAngle,endAngle:i.endAngle},r="Circle";delete(n=xn({container:this.getTooltipCrosshairsGroup()},n,Pn(e,"crosshairs",{}),this.getCrosshairsText("y",t,e))).type;var s=this.yCrosshair;s?i.isRect&&"circle"===s.get("type")||!i.isRect&&"line"===s.get("type")?(s=new _h[r](n)).init():s.update(n):(s=new _h[r](n)).init(),s.render(),s.show(),this.yCrosshair=s},e.prototype.getCrosshairsText=function(t,e,n){var r=Pn(n,["crosshairs","text"]),i=Pn(n,["crosshairs","follow"]),o=this.items;if(r){var a=this.getViewWithGeometry(this.view),s=o[0],l=a.getXScale(),u=a.getYScales()[0],c=void 0,h=void 0;if(i){var f=this.view.getCoordinate().invert(e);c=l.invert(f.x),h=u.invert(f.y)}else c=s.data[l.field],h=s.data[u.field];var d="x"===t?c:h;return Se(r)?r=r(t,d,o,e):r.content=d,{text:r}}},e.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},e.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):((t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"})).toFront(),this.tooltipMarkersGroup=t),t},e.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||((t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1})).toBack(),this.tooltipCrosshairsGroup=t),t},e.prototype.findItemsFromView=function(t,e){var n,r;if(!1===t.getOptions().tooltip)return[];var i=up(t,e,this.getTooltipCfg());try{for(var o=ge(t.views),a=o.next();!a.done;a=o.next()){var s=a.value;i=i.concat(this.findItemsFromView(s,e))}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.prototype.getViewWithGeometry=function(t){var e=this;return t.geometries.length?t:Oe(t.views,(function(t){return e.getViewWithGeometry(t)}))},e.prototype.getItemsAfterProcess=function(t){var e=this.getTooltipCfg().customItems;return(e||function(t){return t})(t)},e}(Mp),jp={};function Cp(t){return jp[t.toLowerCase()]}function Ep(t,e){jp[t.toLowerCase()]=e}var Pp={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Tp={interval:function(t){return{enter:{animation:t.isRect?t.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:t.isPolar&&t.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},kp={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(t){var e;return t.isRect?e=t.isTransposed?"grow-in-x":"grow-in-y":(e="grow-in-xy",t.isPolar&&t.isTransposed&&(e="wave-in")),{animation:e}},schema:function(t){return{animation:t.isRect?t.isTransposed?"grow-in-x":"grow-in-y":"grow-in-xy"}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function Ap(t,e,n){var r=Tp[t];return r&&(Se(r)&&(r=r(e)),r=xn({},Pp,r),n)?r[n]:r}function Op(t,e,n){var r=Pn(t.get("origin"),"data",tr),i=e.animation,o=function(t,e){return{delay:Se(t.delay)?t.delay(e):t.delay,easing:Se(t.easing)?t.easing(e):t.easing,duration:Se(t.duration)?t.duration(e):t.duration,callback:t.callback,repeat:t.repeat}}(e,r);if(i){var a=Cp(i);a&&a(t,o,n)}else t.animate(n.toAttrs,o)}var Ip="element-background",Bp=function(t){function e(e){var n=t.call(this,e)||this;n.labelShape=[],n.states=[];var r=e.shapeFactory,i=e.container,o=e.offscreenGroup,a=e.elementIndex,s=e.visible,l=void 0===s||s;return n.shapeFactory=r,n.container=i,n.offscreenGroup=o,n.visible=l,n.elementIndex=a,n}return ce(e,t),e.prototype.draw=function(t,e){void 0===e&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),!1===this.visible&&this.changeVisible(!1)},e.prototype.update=function(t){var e=this.shapeFactory,n=this.shape;if(n){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(n,t);var r=this.getOffscreenGroup(),i=e.drawShape(this.shapeType,t,r);i.cfg.data=this.data,i.cfg.origin=t,i.cfg.element=this,this.syncShapeStyle(n,i,this.getStates(),this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var e=this.shapeFactory,n=this.shape;if(n){var r=this.getAnimateCfg("leave");r?Op(n,r,{coordinate:e.coordinate,toAttrs:he({},n.attr())}):n.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=[],this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,t.prototype.destroy.call(this)},e.prototype.changeVisible=function(e){t.prototype.changeVisible.call(this,e),e?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(t){t.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(t){t.hide()})))},e.prototype.setState=function(t,e){var n=this,r=n.states,i=n.shapeFactory,o=n.model,a=n.shape,s=n.shapeType,l=r.indexOf(t);if(e){if(l>-1)return;r.push(t),"active"!==t&&"selected"!==t||null==a||a.toFront()}else{if(-1===l)return;if(r.splice(l,1),"active"===t||"selected"===t){var u=this.geometry,c=u.sortZIndex,h=u.zIndexReversed?this.geometry.elements.length-this.elementIndex:this.elementIndex;c?a.setZIndex(h):a.set("zIndex",h)}}var f=i.drawShape(s,o,this.getOffscreenGroup());r.length?this.syncShapeStyle(a,f,r,null):this.syncShapeStyle(a,f,["reset"],null),f.remove(!0);var d={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",d),sc(this.shape,"statechange",d)},e.prototype.clearStates=function(){var t=this;Pe(this.states,(function(e){t.setState(e,!1)})),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this.shape,e=this.labelShape,n={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return t&&(n=t.getCanvasBBox()),e&&e.forEach((function(t){var e=t.getCanvasBBox();n.x=Math.min(e.x,n.x),n.y=Math.min(e.y,n.y),n.minX=Math.min(e.minX,n.minX),n.minY=Math.min(e.minY,n.minY),n.maxX=Math.max(e.maxX,n.maxX),n.maxY=Math.max(e.maxY,n.maxY)})),n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,e=t.shapeType,n=t.geometry,r=t.shapeFactory,i=n.stateOption,o=r.defaultShapeType,a=r.theme[e]||r.theme[o];this.statesStyle=xn({},a,i)}return this.statesStyle},e.prototype.getStateStyle=function(t,e){var n=this.getStatesStyle(),r=Pn(n,[t,"style"],{}),i=r[e]||r;return Se(i)?i(this):i},e.prototype.getAnimateCfg=function(t){var e=this,n=this.animate;if(n){var r=n[t];return r?he(he({},r),{callback:function(){var t;Se(r.callback)&&r.callback(),null===(t=e.geometry)||void 0===t||t.emit(Yn.AFTER_DRAW_ANIMATE)}}):r}return null},e.prototype.drawShape=function(t,e){var n;void 0===e&&(e=!1);var r=this,i=r.shapeFactory,o=r.container,a=r.shapeType;if(this.shape=i.drawShape(a,t,o),this.shape){this.setShapeInfo(this.shape,t);var s=this.shape.cfg.name;s?Ne(s)&&(this.shape.cfg.name=["element",s]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var l=e?"enter":"appear",u=this.getAnimateCfg(l);u&&(null===(n=this.geometry)||void 0===n||n.emit(Yn.BEFORE_DRAW_ANIMATE),Op(this.shape,u,{coordinate:i.coordinate,toAttrs:he({},this.shape.attr())}))}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var n=this;(t.cfg.origin=e,t.cfg.element=this,t.isGroup())&&t.get("children").forEach((function(t){n.setShapeInfo(t,e)}))},e.prototype.syncShapeStyle=function(t,e,n,r,i){var o,a=this;if(void 0===n&&(n=[]),void 0===i&&(i=0),t&&e){var s=t.get("clipShape"),l=e.get("clipShape");if(this.syncShapeStyle(s,l,n,r),t.isGroup())for(var u=t.get("children"),c=e.get("children"),h=0;h=0?e:n<=0?n:0},n.prototype.createAttrOption=function(t,e,n){if(je(e)||Ee(e))Ee(e)&&jn(Object.keys(e),["values"])?Tn(this.attributeOption,t,{fields:e.values}):Tn(this.attributeOption,t,e);else{var r={};Ke(e)?r.values=[e]:r.fields=qp(e),n&&(Se(n)?r.callback=n:r.values=n),Tn(this.attributeOption,t,r)}},n.prototype.initAttributes=function(){var e=this,n=this,r=n.attributes,i=n.attributeOption,o=n.theme,a=n.shapeType;this.groupScales=[];var s={},l=function(t){if(i.hasOwnProperty(t)){var n=i[t];if(!n)return{value:void 0};var l=he({},n),u=l.callback,c=l.values,h=l.fields,f=(void 0===h?[]:h).map((function(n){var r=e.scales[n];!s[n]&&Jn.includes(t)&&("cat"===Af(r,Pn(e.scaleDefs,n),t,e.type)&&(e.groupScales.push(r),s[n]=!0));return r}));l.scales=f,"position"!==t&&1===f.length&&"identity"===f[0].type?l.values=f[0].values:u||c||("size"===t?l.values=o.sizes:"shape"===t?l.values=o.shapes[a]||[]:"color"===t&&(f.length?l.values=f[0].values.length<=10?o.colors10:o.colors20:l.values=o.colors10));var d=Ju(t);r[t]=new d(l)}};for(var u in i){var c=l(u);if("object"===t(c))return c.value}},n.prototype.processData=function(t){var e,n;this.hasSorted=!1;for(var r=this.getAttribute("position").scales.filter((function(t){return t.isCategory})),i=this.groupData(t),o=[],a=0,s=i.length;ao&&(o=u)}var c=this.scaleDefs,h={};it.max&&!Pn(c,[r,"max"])&&(h.max=o),t.change(h)},n.prototype.beforeMapping=function(t){var e=t;if(this.sortable&&this.sort(e),this.generatePoints)for(var n=0,r=e.length;n1)for(var c=0;c0}))}function eg(t,e,n){var r=n.data,i=n.origin,o=n.animateCfg,a=n.coordinate,s=Pn(o,"update");t.set("data",r),t.set("origin",i),t.set("animateCfg",o),t.set("coordinate",a),t.set("visible",e.get("visible")),(t.getChildren()||[]).forEach((function(l,u){var c=e.getChildByIndex(u);if(c){l.set("data",r),l.set("origin",i),l.set("animateCfg",o),l.set("coordinate",a);var h=bf(l,c);s?Op(l,s,{toAttrs:h,coordinate:a}):l.attr(h),c.isGroup()&&eg(l,c,n)}else t.removeChild(l),l.remove(!0)})),Pe(e.getChildren(),(function(e,n){n>=t.getCount()&&(e.destroyed||t.add(e))}))}var ng=function(){function t(t){this.shapesMap={};var e=t.layout,n=t.container;this.layout=e,this.container=n}return t.prototype.render=function(t,e,n){return void 0===n&&(n=!1),de(this,void 0,void 0,(function(){var r,i,o,a,s,l,u,c,h=this;return pe(this,(function(f){switch(f.label){case 0:if(r={},i=this.createOffscreenGroup(),!t.length)return[3,2];try{for(o=ge(t),a=o.next();!a.done;a=o.next())(s=a.value)&&(r[s.id]=this.renderLabel(s,i))}catch(d){u={error:d}}finally{try{a&&!a.done&&(c=o.return)&&c.call(o)}finally{if(u)throw u.error}}return[4,this.doLayout(t,e,r)];case 1:f.sent(),this.renderLabelLine(t,r),this.renderLabelBackground(t,r),this.adjustLabel(t,r),f.label=2;case 2:return l=this.shapesMap,Pe(r,(function(t,e){if(t.destroyed)delete r[e];else{if(l[e]){var i=t.get("data"),o=t.get("origin"),a=t.get("coordinate"),s=t.get("animateCfg"),u=l[e];eg(u,r[e],{data:i,origin:o,animateCfg:s,coordinate:a}),r[e]=u}else{if(h.container.destroyed)return;h.container.add(t);var c=Pn(t.get("animateCfg"),n?"enter":"appear");c&&Op(t,c,{toAttrs:he({},t.attr()),coordinate:t.get("coordinate")})}delete l[e]}})),Pe(l,(function(t){var e=Pn(t.get("animateCfg"),"leave");e?Op(t,e,{toAttrs:null,coordinate:t.get("coordinate")}):t.remove(!0)})),this.shapesMap=r,i.destroy(),[2]}}))}))},t.prototype.clear=function(){this.container.clear(),this.shapesMap={}},t.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},t.prototype.renderLabel=function(t,e){var n,r,i=t.id,o=t.elementId,a=t.data,s=t.mappingData,l=t.coordinate,u=t.animate,c=t.content,h={id:i,elementId:o,capture:t.capture,data:a,origin:he(he({},s),{data:s[tr]}),coordinate:l},f=e.addGroup(he({name:"label",animateCfg:!1!==this.animate&&null!==u&&!1!==u&&xn({},this.animate,u)},h));if(c.isGroup&&c.isGroup()||c.isShape&&c.isShape()){var d=c.getCanvasBBox(),p=d.width,g=d.height,v=Pn(t,"textAlign","left"),y=t.x;"center"===v?y-=p/2:"right"!==v&&"end"!==v||(y-=p),Kp(c,y,t.y-g/2),n=c,f.add(c)}else{var m=Pn(t,["style","fill"]);n=f.addShape("text",he({attrs:he(he({x:t.x,y:t.y,textAlign:t.textAlign,textBaseline:Pn(t,"textBaseline","middle"),text:t.content},t.style),{fill:(r=m,null===r?t.color:m)})},h))}return t.rotate&&Qp(n,t.rotate),f},t.prototype.doLayout=function(t,e,n){return de(this,void 0,void 0,(function(){var r,i=this;return pe(this,(function(o){switch(o.label){case 0:return this.layout?(r=Ce(this.layout)?this.layout:[this.layout],[4,Promise.all(r.map((function(r){var o,a=(o=Pn(r,"type",""),Fp[o.toLowerCase()]);if(a){var s=[],l=[];return Pe(n,(function(t,n){s.push(t),l.push(e[t.get("elementId")])})),a(t,s,l,i.region,r.cfg)}})))]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},t.prototype.renderLabelLine=function(t,e){Pe(t,(function(t){var n=Pn(t,"coordinate");if(t&&n){var r=n.getCenter(),i=n.getRadius();if(t.labelLine){var o=Pn(t,"labelLine",{}),a=t.id,s=o.path;if(!s){var l=yf(r.x,r.y,i,t.angle);s=[["M",l.x,l.y],["L",t.x,t.y]]}var u=e[a];u.destroyed||u.addShape("path",{capture:!1,attrs:he({path:s,stroke:t.color?t.color:Pn(t,["style","fill"],"#000"),fill:null},o.style),id:a,origin:t.mappingData,data:t.data,coordinate:t.coordinate})}}}))},t.prototype.renderLabelBackground=function(t,e){Pe(t,(function(t){var n=Pn(t,"coordinate"),r=Pn(t,"background");if(r&&n){var i=t.id,o=e[i];if(!o.destroyed){var a=o.getChildren()[0];if(a){var s=Jp(o,t,r.padding),l=s.rotation,u=fe(s,["rotation"]),c=o.addShape("rect",{attrs:he(he({},u),r.style||{}),id:i,origin:t.mappingData,data:t.data,coordinate:t.coordinate});if(c.setZIndex(-1),l){var h=a.getMatrix();c.setMatrix(h)}}}}}))},t.prototype.createOffscreenGroup=function(){return new(this.container.getGroupBase())({})},t.prototype.adjustLabel=function(t,e){Pe(t,(function(t){if(t){var n=t.id,r=e[n];if(!r.destroyed)Pe(r.findAll((function(t){return"path"!==t.get("type")})),(function(e){e&&(t.offsetX&&e.attr("x",e.attr("x")+t.offsetX),t.offsetY&&e.attr("y",e.attr("y")+t.offsetY))}))}}))},t}();function rg(t){var e=0;return Pe(t,(function(t){e+=t})),e/t.length}var ig=function(){function t(t){this.geometry=t}return t.prototype.getLabelItems=function(t){var e=this,n=[],r=this.getLabelCfgs(t);return Pe(t,(function(t,i){var o=r[i];if(!o||je(t.x)||je(t.y))n.push(null);else{var a=Ce(o.content)?o.content:[o.content];o.content=a;var s=a.length;Pe(a,(function(r,i){if(je(r)||""===r)n.push(null);else{var a=he(he({},o),e.getLabelPoint(o,t,i));a.textAlign||(a.textAlign=e.getLabelAlign(a,i,s)),a.offset<=0&&(a.labelLine=null),n.push(a)}}))}})),n},t.prototype.render=function(t,e){return void 0===e&&(e=!1),de(this,void 0,void 0,(function(){var n,r,i;return pe(this,(function(o){switch(o.label){case 0:return n=this.getLabelItems(t),r=this.getLabelsRenderer(),i=this.getGeometryShapes(),[4,r.render(n,i,e)];case 1:return o.sent(),[2]}}))}))},t.prototype.clear=function(){var t=this.labelsRenderer;t&&t.clear()},t.prototype.destroy=function(){var t=this.labelsRenderer;t&&t.destroy(),this.labelsRenderer=null},t.prototype.getCoordinate=function(){return this.geometry.coordinate},t.prototype.getDefaultLabelCfg=function(t,e){var n=this.geometry,r=n.type,i=n.theme;return"polygon"===r||"interval"===r&&"middle"===e||t<0&&!["line","point","path"].includes(r)?Pn(i,"innerLabels",{}):Pn(i,"labels",{})},t.prototype.getThemedLabelCfg=function(t){var e=this.geometry,n=this.getDefaultLabelCfg(),r=e.type,i=e.theme;return"polygon"===r||t.offset<0&&!["line","point","path"].includes(r)?xn({},n,i.innerLabels,t):xn({},n,i.labels,t)},t.prototype.setLabelPosition=function(t,e,n,r){},t.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=this.getOffsetVector(t);return e.isTransposed?n[0]:n[1]},t.prototype.getLabelOffsetPoint=function(t,e,n){var r=t.offset,i=this.getCoordinate().isTransposed,o=i?"x":"y",a=i?1:-1,s={x:0,y:0};return s[o]=e>0||1===n?r*a:r*a*-1,s},t.prototype.getLabelPoint=function(t,e,n){var r=this.getCoordinate(),i=t.content.length;function o(e,n,r){void 0===r&&(r=!1);var i=e;return Ce(i)&&(i=1===t.content.length?r?rg(i):i.length<=2?i[e.length-1]:rg(i):i[n]),i}var a={content:t.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"},s=Ce(e.shape)?e.shape[0]:e.shape,l="funnel"===s||"pyramid"===s;if("polygon"===this.geometry.type){var u=function(t,e){if(Ke(t)&&Ke(e))return[t,e];if(gf(t)||gf(e))return[vf(t),vf(e)];for(var n,r,i=-1,o=0,a=0,s=t.length-1,l=0;++i1&&0===e&&("right"===r?r="left":"left"===r&&(r="right"))}return r},t.prototype.getLabelId=function(t){var e=this.geometry,n=e.type,r=e.getXScale(),i=e.getYScale(),o=t[tr],a=e.getElementId(t);return"line"===n||"area"===n?a+=" ".concat(o[r.field]):"path"===n&&(a+=" ".concat(o[r.field],"-").concat(o[i.field])),a},t.prototype.getLabelsRenderer=function(){var t=this.geometry,e=t.labelsContainer,n=t.labelOption,r=t.canvasRegion,i=t.animateOption,o=this.geometry.coordinate,a=this.labelsRenderer;return a||(a=new ng({container:e,layout:Pn(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=a),a.region=r,a.animate=!!i&&Ap("label",o),a},t.prototype.getLabelCfgs=function(t){var e=this,n=this.geometry,r=n.labelOption,i=n.scales,o=n.coordinate,a=r,s=a.fields,l=a.callback,u=a.cfg,c=s.map((function(t){return i[t]})),h=[];return Pe(t,(function(t,n){var r,i=t[tr],a=e.getLabelText(i,c);if(l){var f=s.map((function(t){return i[t]}));if(r=l.apply(void 0,me([],ve(f),!1)),je(r))return void h.push(null)}var d=he(he({id:e.getLabelId(t),elementId:e.geometry.getElementId(t),data:i,mappingData:t,coordinate:o},u),r);Se(d.position)&&(d.position=d.position(i,t,n));var p=e.getLabelOffset(d.offset||0),g=e.getDefaultLabelCfg(p,d.position);(d=xn({},g,d)).offset=e.getLabelOffset(d.offset||0);var v=d.content;Se(v)?d.content=v(i,t,n):fn(v)&&(d.content=a[0]),h.push(d)})),h},t.prototype.getLabelText=function(t,e){var n=[];return Pe(e,(function(e){var r=t[e.field];r=Ce(r)?r.map((function(t){return e.getText(t)})):e.getText(r),je(r)||""===r?n.push(null):n.push(r)})),n},t.prototype.getOffsetVector=function(t){void 0===t&&(t=0);var e=this.getCoordinate(),n=0;return Ke(t)&&(n=t),e.isTransposed?e.applyMatrix(n,0):e.applyMatrix(0,n)},t.prototype.getGeometryShapes=function(){var t=this.geometry,e={};return Pe(t.elementsMap,(function(t,n){e[n]=t.shape})),Pe(t.getOffscreenGroup().getChildren(),(function(n){var r=t.getElementId(n.get("origin").mappingData);e[r]=n})),e},t}();function og(t,e,n){if(!t)return n;var r;if(t.callback&&t.callback.length>1){var i=Array(t.callback.length-1).fill("");r=t.mapping.apply(t,me([e],ve(i),!1)).join("")}else r=t.mapping(e).join("");return r||n}var ag={hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},line:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]}},sg=["line","cross","tick","plus","hyphen"];function lg(t){var e=t.symbol;Ne(e)&&ag[e]&&(t.symbol=ag[e])}function ug(t){return t.startsWith(Rn.LEFT)||t.startsWith(Rn.RIGHT)?"vertical":"horizontal"}function cg(t,e,n,r,i){var o=n.getScale(n.type);if(o.isCategory){var a=o.field,s=e.getAttribute("color"),l=e.getAttribute("shape"),u=t.getTheme().defaultColor,c=e.coordinate.isPolar;return o.getTicks().map((function(n,h){var f,d=n.text,p=n.value,g=d,v=o.invert(p),y=0===t.filterFieldData(a,[(f={},f[a]=v,f)]).length;Pe(t.views,(function(t){var e;t.filterFieldData(a,[(e={},e[a]=v,e)]).length||(y=!0)}));var m,_,x=og(s,v,u),b=og(l,v,"point"),w=e.getShapeMarker(b,{color:x,isInPolar:c}),M=i;return Se(M)&&(M=M(g,h,he({name:g,value:v},xn({},r,w)))),function(t,e){var n=t.symbol;if(Ne(n)&&-1!==sg.indexOf(n)){var r=Pn(t,"style",{}),i=Pn(r,"lineWidth",1),o=r.stroke||r.fill||e;t.style=xn({},t.style,{lineWidth:i,stroke:o,fill:null})}}(w=xn({},r,w,Mf(he({},M),["style"])),x),M&&M.style&&(w.style=(m=w.style,_=M.style,Se(_)?_(m):xn({},m,_))),lg(w),{id:v,name:g,value:v,marker:w,unchecked:y}}))}return[]}function hg(t,e){var n=Pn(t,["components","legend"],{});return xn({},Pn(n,["common"],{}),xn({},Pn(n,[e],{})))}function fg(t){return!t&&(null==t||isNaN(t))}function dg(t){if(Ce(t))return fg(t[1].y);var e=t.y;return Ce(e)?fg(e[0]):fg(e)}function pg(t,e,n){if(void 0===e&&(e=!1),void 0===n&&(n=!0),!t.length||1===t.length&&!n)return[];if(e){for(var r=[],i=0,o=t.length;i=t&&i<=t+n&&o>=e&&o<=e+r}function Ng(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=0&&a<.5*Math.PI?(r={x:l.minX,y:l.minY},i={x:l.maxX,y:l.maxY}):.5*Math.PI<=a&&a1&&(n*=Math.sqrt(d),r*=Math.sqrt(d));var p=n*n*(f*f)+r*r*(h*h),g=p?Math.sqrt((n*n*(r*r)-p)/p):1;o===a&&(g*=-1),isNaN(g)&&(g=0);var v=r?g*n*f/r:0,y=n?g*-r*h/n:0,m=(s+u)/2+Math.cos(i)*v-Math.sin(i)*y,_=(l+c)/2+Math.sin(i)*v+Math.cos(i)*y,x=[(h-v)/n,(f-y)/r],b=[(-1*h-v)/n,(-1*f-y)/r],w=Zg([1,0],x),M=Zg(x,b);return Ug(x,b)<=-1&&(M=Math.PI),Ug(x,b)>=1&&(M=0),0===a&&M>0&&(M-=2*Math.PI),1===a&&M<0&&(M+=2*Math.PI),{cx:m,cy:_,rx:zg(t,[u,c])?0:n,ry:zg(t,[u,c])?0:r,startAngle:w,endAngle:w+M,xRotation:i,arcFlag:o,sweepFlag:a}}var Qg=Math.sin,$g=Math.cos,Jg=Math.atan2,tv=Math.PI;function ev(t,e,n,r,i,o,a){var s=e.stroke,l=e.lineWidth,u=Jg(r-o,n-i),c=new Yv({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*$g(tv/6)+","+10*Qg(tv/6)+" L0,0 L"+10*$g(tv/6)+",-"+10*Qg(tv/6),stroke:s,lineWidth:l}});c.translate(i,o),c.rotateAtPoint(i,o,u),t.set(a?"startArrowShape":"endArrowShape",c)}function nv(t,e,n,r,i,o,a){var s=e.startArrow,l=e.endArrow,u=e.stroke,c=e.lineWidth,h=a?s:l,f=h.d,d=h.fill,p=h.stroke,g=h.lineWidth,v=fe(h,["d","fill","stroke","lineWidth"]),y=Jg(r-o,n-i);f&&(i-=$g(y)*f,o-=Qg(y)*f);var m=new Yv({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:he(he({},v),{stroke:p||u,lineWidth:g||c,fill:d})});m.translate(i,o),m.rotateAtPoint(i,o,y),t.set(a?"startArrowShape":"endArrowShape",m)}function rv(t,e,n,r,i){var o=Jg(r-e,n-t);return{dx:$g(o)*i,dy:Qg(o)*i}}function iv(e,n,r,i,o,a){"object"===t(n.startArrow)?nv(e,n,r,i,o,a,!0):n.startArrow?ev(e,n,r,i,o,a,!0):e.set("startArrowShape",null)}function ov(e,n,r,i,o,a){"object"===t(n.endArrow)?nv(e,n,r,i,o,a,!1):n.endArrow?ev(e,n,r,i,o,a,!1):e.set("startArrowShape",null)}var av={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function sv(t,e){var n=e.attr();for(var r in n){var i=n[r],o=av[r]?av[r]:r;"matrix"===o&&i?t.transform(i[0],i[1],i[3],i[4],i[6],i[7]):"lineDash"===o&&t.setLineDash?Ce(i)&&t.setLineDash(i):("strokeStyle"===o||"fillStyle"===o?i=qg(t,e,i):"globalAlpha"===o&&(i*=t.globalAlpha),t[o]=i)}}function lv(t,e,n){for(var r=0;rx?_:x,C=_>x?1:_/x,E=_>x?x/_:1;e.translate(y,m),e.rotate(M),e.scale(C,E),e.arc(0,0,j,b,w,1-S),e.scale(1/C,1/E),e.rotate(-M),e.translate(-y,-m)}break;case"Z":e.closePath()}if("Z"===f)s=l;else{var P=h.length;s=[h[P-2],h[P-1]]}}}}function gv(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(t.set("hasChanged",!0),t.cfg.parent&&t.cfg.parent.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw())))}function vv(t){var e,n,r;if(t.destroyed)e=t._cacheCanvasBBox;else{var i=t.get("cacheCanvasBBox"),o=i&&!(!i.width||!i.height),a=t.getCanvasBBox(),s=a&&!(!a.width||!a.height);o&&s?(r=a,e=(n=i)&&r?{minX:Math.min(n.minX,r.minX),minY:Math.min(n.minY,r.minY),maxX:Math.max(n.maxX,r.maxX),maxY:Math.max(n.maxY,r.maxY)}:n||r):o?e=i:s&&(e=a)}return e}var yv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.onCanvasChange=function(t){gv(this,t)},e.prototype.getShapeBase=function(){return r},e.prototype.getGroupBase=function(){return e},e.prototype._applyClip=function(t,e){e&&(t.save(),sv(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,e=[],n=[];Pe(t,(function(t){var r=t.cfg.cacheCanvasBBox;r&&t.cfg.isInView&&(e.push(r.minX,r.maxX),n.push(r.minY,r.maxY))}));var r=null;if(e.length){var i=Le(e),o=Be(e),a=Le(n),s=Be(n);r={minX:i,minY:a,x:i,y:a,maxX:o,maxY:s,width:o-i,height:s-a};var l=this.cfg.canvas;if(l){var u=l.getViewRange();this.set("isInView",Ng(r,u))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",r)},e.prototype.draw=function(t,e){var n=this.cfg.children,r=!e||this.cfg.refresh;n.length&&r&&(t.save(),sv(t,this),this._applyClip(t,this.getClip()),lv(t,n,e),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},e}(Ra),mv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return r},e.prototype.getGroupBase=function(){return yv},e.prototype.onCanvasChange=function(t){gv(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=Ga(t)(this),r=e/2,i=n.x-r,o=n.y-r,a=n.x+n.width+r,s=n.y+n.height+r;return{x:i,minX:i,y:o,minY:o,width:n.width+e,height:n.height+e,maxX:a,maxY:s}},e.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs.stroke},e.prototype._applyClip=function(t,e){e&&(t.save(),sv(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.draw=function(t,e){var n=this.cfg.clipShape;if(e){if(!1===this.cfg.refresh)return void this.set("hasChanged",!1);if(!Ng(e,this.getCanvasBBox()))return this.set("hasChanged",!1),void(this.cfg.isInView&&this._afterDraw())}t.save(),sv(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},e.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var e=this.getCanvasBBox(),n=Ng(e,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",e):this.set("cacheCanvasBBox",null)}},e.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,i=e.strokeOpacity,o=e.fillOpacity;this.isFill()&&(je(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=r)),this.isStroke()&&n>0&&(je(i)||1===i||(t.globalAlpha=i),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),r=this.isFill(),i=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(Na),_v=mv,xv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr(),a=o.x,s=o.y,l=o.r,u=i/2,c=Dg(a,s,t,e);return r&&n?c<=l+u:r?c<=l:!!n&&(c>=l-u&&c<=l+u)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()},e}(_v),bv=xv;function wv(t,e,n,r){return t/(n*n)+e/(r*r)}var Mv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr(),a=i/2,s=o.x,l=o.y,u=o.rx,c=o.ry,h=(t-s)*(t-s),f=(e-l)*(e-l);return r&&n?wv(h,f,u+a,c+a)<=1:r?wv(h,f,u,c)<=1:!!n&&(wv(h,f,u-a,c-a)>=1&&wv(h,f,u+a,c+a)<=1)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,r,i,o,0,0,2*Math.PI,!1);else{var a=i>o?i:o,s=i>o?1:i/o,l=i>o?o/i:1;t.save(),t.translate(n,r),t.scale(s,l),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(_v),Sv=Mv;function jv(t){return t instanceof HTMLElement&&Ne(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var Cv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if(Ne(t)){var r=new Image;r.onload=function(){if(e.destroyed)return!1;e.attr("img",r),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},r.crossOrigin="Anonymous",r.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):jv(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,r=e.y,i=e.width,o=e.height,a=e.sx,s=e.sy,l=e.swidth,u=e.sheight,c=e.img;(c instanceof Image||jv(c))&&(je(a)||je(s)||je(l)||je(u)?t.drawImage(c,n,r,i,o):t.drawImage(c,a,s,l,u,n,r,i,o))},e}(_v),Ev=Cv;function Pv(t,e,n,r,i,o,a){var s=Math.min(t,n),l=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r),h=i/2;return o>=s-h&&o<=l+h&&a>=u-h&&a<=c+h&&Za.pointToLine(t,e,n,r,o,a)<=i/2}var Tv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=t.startArrow,a=t.endArrow;o&&iv(this,t,r,i,e,n),a&&ov(this,t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){if(!n||!i)return!1;var o=this.attr();return Pv(o.x1,o.y1,o.x2,o.y2,i,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.startArrow,s=e.endArrow,l={dx:0,dy:0},u={dx:0,dy:0};a&&a.d&&(l=rv(n,r,i,o,e.startArrow.d)),s&&s.d&&(u=rv(n,r,i,o,e.endArrow.d)),t.beginPath(),t.moveTo(n+l.dx,r+l.dy),t.lineTo(i-u.dx,o-u.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2;return Za.length(e,n,r,i)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,o=e.y2;return Za.pointAt(n,r,i,o,t)},e}(_v),kv=Tv,Av={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},Ov=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return je(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,r=this.attr(),i=r.x,o=r.y,a=r.symbol||"circle",s=this._getR(r);if(Se(a))n=Ps(n=(t=a)(i,o,s));else{if(!(t=e.Symbols[a]))return console.warn(a+" marker is not supported."),null;n=t(i,o,s)}return n},e.prototype.createPath=function(t){pv(this,t,{path:this._getPath()},this.get("paramsCache"))},e.Symbols=Av,e}(_v),Iv=Ov;function Bv(t,e,n){var r=vs();return t.createPath(r),r.isPointInPath(e,n)}function Lv(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Fv(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function Dv(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o=0;o0!=Lv(s[1]-n)>0&&Lv(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(r=!r)}return r}function Rv(t,e,n,r,i,o,a,s){var l=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI);if(li)return!1;var u={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return Dg(u.x,u.y,a,s)<=o/2}var Nv=Ci;var zv=he({hasArc:function(t){for(var e=!1,n=t.length,r=0;r0&&r.push(i),{polygons:n,polylines:r}},isPointInStroke:function(t,e,n,r,i){for(var o=!1,a=e/2,s=0;sy?v:y;hi(b,b,Nv(null,[["t",-p,-g],["r",-x],["s",1/(v>y?1:v/y),1/(v>y?y/v:1)]])),o=Rv(0,0,w,m,_,e,b[0],b[1])}if(o)break}}return o}},Vr);function Hv(t,e,n){for(var r=!1,i=0;i=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var o=i[n];if(je(o)||je(n))return null;var a=o.length,s=i[n+1];return ls.pointAt(o[a-2],o[a-1],s[1],s[2],s[3],s[4],s[5],s[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",zv.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,r,i=0,o=0,a=[],s=this.get("curve");s&&(Pe(s,(function(t,e){n=s[e+1],r=t.length,n&&(i+=ls.length(t[r-2],t[r-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",i),0!==i?(Pe(s,(function(l,u){n=s[u+1],r=l.length,n&&((t=[])[0]=o/i,e=ls.length(l[r-2],l[r-1],n[1],n[2],n[3],n[4],n[5],n[6]),o+=e||0,t[1]=o/i,a.push(t))})),this.set("tCache",a)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,r=e[1].currentPoint,i=e[1].startTangent;t=[],i?(t.push([n[0]-i[0],n[1]-i[1]]),t.push([n[0],n[1]])):(t.push([r[0],r[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var r=e[n-2].currentPoint,i=e[n-1].currentPoint,o=e[n-1].endTangent;t=[],o?(t.push([i[0]-o[0],i[1]-o[1]]),t.push([i[0],i[1]])):(t.push([r[0],r[1]]),t.push([i[0],i[1]]))}return t},e}(_v),Yv=Gv;function Vv(t,e,n,r,i){var o=t.length;if(o<2)return!1;for(var a=0;a=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),Za.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,i=0,o=[];Pe(t,(function(a,s){t[s+1]&&((n=[])[0]=i/e,r=Za.length(a[0],a[1],t[s+1][0],t[s+1][1]),i+=r,n[1]=i/e,o.push(n))})),this.set("tCache",o)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(_v),Uv=Wv;var Zv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr(),a=o.x,s=o.y,l=o.width,u=o.height,c=o.radius;if(c){var h=!1;return n&&(h=function(t,e,n,r,i,o,a,s){return Pv(t+i,e,t+n-i,e,o,a,s)||Pv(t+n,e+i,t+n,e+r-i,o,a,s)||Pv(t+n-i,e+r,t+i,e+r,o,a,s)||Pv(t,e+r-i,t,e+i,o,a,s)||Rv(t+n-i,e+i,i,1.5*Math.PI,2*Math.PI,o,a,s)||Rv(t+n-i,e+r-i,i,0,.5*Math.PI,o,a,s)||Rv(t+i,e+r-i,i,.5*Math.PI,Math.PI,o,a,s)||Rv(t+i,e+i,i,Math.PI,1.5*Math.PI,o,a,s)}(a,s,l,u,c,i,t,e)),!h&&r&&(h=Bv(this,t,e)),h}var f=i/2;return r&&n?Rg(a-f,s-f,l+f,u+f,t,e):r?Rg(a,s,l,u,t,e):n?function(t,e,n,r,i,o,a){var s=i/2;return Rg(t-s,e-s,n,i,o,a)||Rg(t+n-s,e-s,i,r,o,a)||Rg(t+s,e+r-s,n,i,o,a)||Rg(t-s,e+s,i,r,o,a)}(a,s,l,u,i,t,e):void 0},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.width,o=e.height,a=e.radius;if(t.beginPath(),0===a)t.rect(n,r,i,o);else{var s=function(t){var e=0,n=0,r=0,i=0;return Ce(t)?1===t.length?e=n=r=i=t[0]:2===t.length?(e=r=t[0],n=i=t[1]):3===t.length?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,[e,n,r,i]}(a),l=s[0],u=s[1],c=s[2],h=s[3];t.moveTo(n+l,r),t.lineTo(n+i-u,r),0!==u&&t.arc(n+i-u,r+u,u,-Math.PI/2,0),t.lineTo(n+i,r+o-c),0!==c&&t.arc(n+i-c,r+o-c,c,0,Math.PI/2),t.lineTo(n+h,r+o),0!==h&&t.arc(n+h,r+o-h,h,Math.PI/2,Math.PI),t.lineTo(n,r+l),0!==l&&t.arc(n+l,r+l,l,Math.PI,1.5*Math.PI),t.closePath()}},e}(_v),Kv=Zv,Qv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=ms(t)},e.prototype._setText=function(t){var e=null;Ne(t)&&-1!==t.indexOf("\n")&&(e=t.split("\n")),this.set("textArr",e)},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),e.startsWith("font")&&this._assembleFont(),"text"===e&&this._setText(n)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},e.prototype._drawTextArr=function(t,e,n){var r,i=this.attrs,o=i.textBaseline,a=i.x,s=i.y,l=1*i.fontSize,u=this._getSpaceingY(),c=ys(i.text,i.fontSize,i.lineHeight);Pe(e,(function(e,i){r=s+i*(u+l)-c+l,"middle"===o&&(r+=c-l-(c-l)/2),"top"===o&&(r+=c-l),je(e)||(n?t.fillText(e,a,r):t.strokeText(e,a,r))}))},e.prototype._drawText=function(t,e){var n=this.attr(),r=n.x,i=n.y,o=this.get("textArr");if(o)this._drawTextArr(t,o,e);else{var a=n.text;je(a)||(e?t.fillText(a,r,i):t.strokeText(a,r,i))}},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,i=e.strokeOpacity,o=e.fillOpacity;this.isStroke()&&n>0&&(je(i)||1===i||(t.globalAlpha=r),this.stroke(t)),this.isFill()&&(je(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=r)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(_v),$v=Qv;function Jv(t,e,n){var r,i,o=t.getTotalMatrix();if(o){var a=(r=[e,n,1],(i=o)?Ti(ki(i),r):r);return[a[0],a[1]]}return[e,n]}function ty(t,e,n){if(t.isCanvas&&t.isCanvas())return!0;if(!Zr(t)||!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var r=Jv(t,e,n),i=r[0],o=r[1];if(t.isClipped(i,o))return!1}var a=t.cfg.cacheCanvasBBox||t.getCanvasBBox();return e>=a.minX&&e<=a.maxX&&n>=a.minY&&n<=a.maxY}function ey(t,e,n){if(!ty(t,e,n))return null;for(var r=null,i=t.getChildren(),o=i.length-1;o>=0;o--){var a=i[o];if(a.isGroup())r=ey(a,e,n);else if(ty(a,e,n)){var s=a,l=Jv(a,e,n),u=l[0],c=l[1];s.isInShape(u,c)&&(r=a)}if(r)break}return r}var ny=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e.clipView=!0,e.quickHit=!1,e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return r},e.prototype.getGroupBase=function(){return yv},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||(window?window.devicePixelRatio:1);return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var r=this.get("context"),i=this.get("el"),o=this.getPixelRatio();i.width=o*e,i.height=o*n,o>1&&r.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype.getShape=function(e,n){return this.get("quickHit")?ey(this,e,n):t.prototype.getShape.call(this,e,n,null)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements"),n=this.getViewRange();e.length&&e[0]===this?t=n:(t=function(t){if(!t.length)return null;var e=[],n=[],r=[],i=[];return Pe(t,(function(t){var o=vv(t);o&&(e.push(o.minX),n.push(o.minY),r.push(o.maxX),i.push(o.maxY))})),{minX:Le(e),minY:Le(n),maxX:Be(r),maxY:Be(i)}}(e),t&&(t.minX=Math.floor(t.minX),t.minY=Math.floor(t.minY),t.maxX=Math.ceil(t.maxX),t.maxY=Math.ceil(t.maxY),t.maxY+=1,this.get("clipView")&&(t=function(t,e){return t&&e&&Ng(t,e)?{minX:Math.max(t.minX,e.minX),minY:Math.max(t.minY,e.minY),maxX:Math.min(t.maxX,e.maxX),maxY:Math.min(t.maxY,e.maxY)}:null}(t,n))));return t},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t,e=this.get("drawFrame");e&&(t=e,(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),sv(t,this),lv(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.get("refreshElements"),n=this.getChildren(),r=this._getRefreshRegion();r?(t.clearRect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.save(),t.beginPath(),t.rect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.clip(),sv(t,this),uv(this,n,r),lv(t,n,r),t.restore()):e.length&&hv(e),Pe(e,(function(t){t.get("hasChanged")&&t.set("hasChanged",!1)})),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t,e=this,n=this.get("drawFrame");n||(t=function(){e.get("localRefresh")?e._drawRegion():e._drawAll(),e.set("drawFrame",null)},n=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)})(t),this.set("drawFrame",n))},e.prototype.skipDraw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},e}(Da),ry=Object.freeze(Object.defineProperty({__proto__:null,Shape:r,version:"0.5.12",Canvas:ny,Group:yv,getArcParams:Kg,Event:Xr,Base:Kr,AbstractCanvas:Da,AbstractGroup:Ra,AbstractShape:Na,getBBoxMethod:Ga,registerBBox:Ha,getTextHeight:ys,assembleFont:ms,isAllowCapture:Zr,multiplyVec2:Ti,invert:ki,getOffScreenContext:vs,registerEasing:Ea,PathUtil:Vr},Symbol.toStringTag,{value:"Module"})),iy={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},oy={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"};function ay(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function sy(t){var e=iy[t.type],n=t.getParent();if(!e)throw new Error("the type "+t.type+" is not supported by svg");var r=ay(e);if(t.get("id")&&(r.id=t.get("id")),t.set("el",r),t.set("attrs",{}),n){var i=n.get("el");i||(i=n.createDom(),n.set("el",i)),i.appendChild(r)}return r}function ly(t,e){var n,r=t.get("el"),i=(n=r.children,_e(n)?Array.prototype.slice.call(n):[]).sort(e),o=document.createDocumentFragment();i.forEach((function(t){o.appendChild(t)})),r.appendChild(o)}function uy(t){var e=t.attr().matrix;if(e){for(var n=t.cfg.el,r=[],i=0;i<9;i+=3)r.push(e[i]+","+e[i+1]);-1===(r=r.join(",")).indexOf("NaN")?n.setAttribute("transform","matrix("+r+")"):console.warn("invalid matrix:",e)}}function cy(t,e){var n=t.getClip(),r=t.get("el");if(n){if(n&&!r.hasAttribute("clip-path")){sy(n),n.createPath(e);var i=e.addClip(n);r.setAttribute("clip-path","url(#"+i+")")}}else r.removeAttribute("clip-path")}function hy(t,e){e.forEach((function(e){e.draw(t)}))}function fy(t,e){var n=t.get("canvas");if(n&&n.get("autoDraw")){var r=n.get("context"),i=t.getParent(),o=i?i.getChildren():[n],a=t.get("el");if("remove"===e)if(t.get("isClipShape")){var s=a&&a.parentNode,l=s&&s.parentNode;s&&l&&l.removeChild(s)}else a&&a.parentNode&&a.parentNode.removeChild(a);else if("show"===e)a.setAttribute("visibility","visible");else if("hide"===e)a.setAttribute("visibility","hidden");else if("zIndex"===e)!function(t,e){var n=t.parentNode,r=Array.from(n.childNodes).filter((function(t){return 1===t.nodeType&&"defs"!==t.nodeName.toLowerCase()})),i=r[e],o=r.indexOf(t);if(i){if(o>e)n.insertBefore(t,i);else if(o0&&(e?"stroke"in n?this._setColor(t,"stroke",o):"strokeStyle"in n&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),l&&c.setAttribute(oy.strokeOpacity,l),u&&c.setAttribute(oy.lineWidth,u))},e.prototype._setColor=function(t,e,n){var r=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n))(i=t.find("gradient",n))||(i=t.addGradient(n)),r.setAttribute(oy[e],"url(#"+i+")");else if(/^[p,P]{1}[\s]*\(/.test(n)){var i;(i=t.find("pattern",n))||(i=t.addPattern(n)),r.setAttribute(oy[e],"url(#"+i+")")}else r.setAttribute(oy[e],n);else r.setAttribute(oy[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),r=e||n,i=r.shadowOffsetX,o=r.shadowOffsetY,a=r.shadowBlur,s=r.shadowColor;(i||o||a||s)&&function(t,e){var n=t.cfg.el,r=t.attr(),i={dx:r.shadowOffsetX,dy:r.shadowOffsetY,blur:r.shadowBlur,color:r.shadowColor};if(i.dx||i.dy||i.blur||i.color){var o=e.find("filter",i);o||(o=e.addShadow(i)),n.setAttribute("filter","url(#"+o+")")}else n.removeAttribute("filter")}(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&uy(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),r=this.get("canvas").get("el").getBoundingClientRect(),i=t+r.left,o=e+r.top,a=document.elementFromPoint(i,o);return!(!a||!a.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(Na),gy=py,vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,r:0})},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Pe(e||n,(function(t,e){"x"===e||"y"===e?r.setAttribute("c"+e,t):oy[e]&&r.setAttribute(oy[e],t)}))},e}(gy),yy=vy,my=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dom",e.canFill=!1,e.canStroke=!1,e}return ce(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");if(Pe(e||n,(function(t,e){oy[e]&&r.setAttribute(oy[e],t)})),"function"==typeof n.html){var i=n.html.call(this,n);if(i instanceof Element||i instanceof HTMLDocument){for(var o=r.childNodes,a=o.length-1;a>=0;a--)r.removeChild(o[a]);r.appendChild(i)}else r.innerHTML=i}else r.innerHTML=n.html},e}(gy),_y=my,xy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ellipse",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Pe(e||n,(function(t,e){"x"===e||"y"===e?r.setAttribute("c"+e,t):oy[e]&&r.setAttribute(oy[e],t)}))},e}(gy),by=xy,wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="image",e.canFill=!1,e.canStroke=!1,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,width:0,height:0})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el");Pe(e||r,(function(t,e){"img"===e?n._setImage(r.img):oy[e]&&i.setAttribute(oy[e],t)}))},e.prototype.setAttr=function(t,e){this.attrs[t]=e,"img"===t&&this._setImage(e)},e.prototype._setImage=function(t){var e=this.attr(),n=this.get("el");if(Ne(t))n.setAttribute("href",t);else if(t instanceof window.Image)e.width||(n.setAttribute("width",t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",t.height),this.attr("height",t.height)),n.setAttribute("href",t.src);else if(t instanceof HTMLElement&&Ne(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase())n.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var r=document.createElement("canvas");r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.getContext("2d").putImageData(t,0,0),e.width||(n.setAttribute("width",""+t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",""+t.height),this.attr("height",t.height)),n.setAttribute("href",r.toDataURL())}},e}(gy),My=wy,Sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.canFill=!1,e.canStroke=!0,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Pe(e||n,(function(e,i){if("startArrow"===i||"endArrow"===i)if(e){var o=Ee(e)?t.addArrow(n,oy[i]):t.getDefaultArrow(n,oy[i]);r.setAttribute(oy[i],"url(#"+o+")")}else r.removeAttribute(oy[i]);else oy[i]&&r.setAttribute(oy[i],e)}))},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2;return Za.length(e,n,r,i)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,o=e.y2;return Za.pointAt(n,r,i,o,t)},e}(gy),jy=Sy,Cy={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},Ey={get:function(t){return Cy[t]},register:function(t,e){Cy[t]=e},remove:function(t){delete Cy[t]},getAll:function(){return Cy}},Py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="marker",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.createPath=function(t){this.get("el").setAttribute("d",this._assembleMarker())},e.prototype._assembleMarker=function(){var t=this._getPath();return Ce(t)?t.map((function(t){return t.join(" ")})).join(""):t},e.prototype._getPath=function(){var t,e=this.attr(),n=e.x,r=e.y,i=e.r||e.radius,o=e.symbol||"circle";return(t=Se(o)?o:Ey.get(o))?t(n,r,i):(console.warn(t+" symbol is not exist."),null)},e.symbolsFactory=Ey,e}(gy),Ty=Py,ky=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="path",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el");Pe(e||r,(function(e,o){if("path"===o&&Ce(e))i.setAttribute("d",n._formatPath(e));else if("startArrow"===o||"endArrow"===o)if(e){var a=Ee(e)?t.addArrow(r,oy[o]):t.getDefaultArrow(r,oy[o]);i.setAttribute(oy[o],"url(#"+a+")")}else i.removeAttribute(oy[o]);else oy[o]&&i.setAttribute(oy[o],e)}))},e.prototype._formatPath=function(t){var e=t.map((function(t){return t.join(" ")})).join("");return~e.indexOf("NaN")?"":e},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var e=this.get("el"),n=this.getTotalLength();if(0===n)return null;var r=e?e.getPointAtLength(t*n):null;return r?{x:r.x,y:r.y}:null},e}(gy),Ay=ky,Oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Pe(e||n,(function(t,e){"points"===e&&Ce(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):oy[e]&&r.setAttribute(oy[e],t)}))},e}(gy),Iy=Oy,By=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");Pe(e||n,(function(t,e){"points"===e&&Ce(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):oy[e]&&r.setAttribute(oy[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return je(e)?(this.set("totalLength",fs(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,r=this.attr().points,i=this.get("tCache");return i||(this._setTcache(),i=this.get("tCache")),Pe(i,(function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),Za.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,i=0,o=[];Pe(t,(function(a,s){t[s+1]&&((n=[])[0]=i/e,r=Za.length(a[0],a[1],t[s+1][0],t[s+1][1]),i+=r,n[1]=i/e,o.push(n))})),this.set("tCache",o)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(gy),Ly=By;var Fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rect",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el"),o=!1,a=["x","y","width","height","radius"];Pe(e||r,(function(t,e){-1===a.indexOf(e)||o?-1===a.indexOf(e)&&oy[e]&&i.setAttribute(oy[e],t):(i.setAttribute("d",n._assembleRect(r)),o=!0)}))},e.prototype._assembleRect=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.radius;if(!o)return"M "+e+","+n+" l "+r+",0 l 0,"+i+" l"+-r+" 0 z";var a=function(t){var e=0,n=0,r=0,i=0;return Ce(t)?1===t.length?e=n=r=i=t[0]:2===t.length?(e=r=t[0],n=i=t[1]):3===t.length?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,{r1:e,r2:n,r3:r,r4:i}}(o);return Ce(o)?1===o.length?a.r1=a.r2=a.r3=a.r4=o[0]:2===o.length?(a.r1=a.r3=o[0],a.r2=a.r4=o[1]):3===o.length?(a.r1=o[0],a.r2=a.r4=o[1],a.r3=o[2]):(a.r1=o[0],a.r2=o[1],a.r3=o[2],a.r4=o[3]):a.r1=a.r2=a.r3=a.r4=o,[["M "+(e+a.r1)+","+n],["l "+(r-a.r1-a.r2)+",0"],["a "+a.r2+","+a.r2+",0,0,1,"+a.r2+","+a.r2],["l 0,"+(i-a.r2-a.r3)],["a "+a.r3+","+a.r3+",0,0,1,"+-a.r3+","+a.r3],["l "+(a.r3+a.r4-r)+",0"],["a "+a.r4+","+a.r4+",0,0,1,"+-a.r4+","+-a.r4],["l 0,"+(a.r4+a.r1-i)],["a "+a.r1+","+a.r1+",0,0,1,"+a.r1+","+-a.r1],["z"]].join(" ")},e}(gy),Dy=Fy,Ry={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},Ny={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},zy={left:"left",start:"left",center:"middle",right:"end",end:"end"},Hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return ce(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return he(he({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el");this._setFont(),Pe(e||r,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?uy(n):oy[e]&&i.setAttribute(oy[e],t)})),i.setAttribute("paint-order","stroke"),i.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.textBaseline,r=e.textAlign,i=ai();i&&"firefox"===i.name?t.setAttribute("dominant-baseline",Ny[n]||"alphabetic"):t.setAttribute("alignment-baseline",Ry[n]||"baseline"),t.setAttribute("text-anchor",zy[r]||"left")},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),r=n.x,i=n.textBaseline,o=void 0===i?"bottom":i;if(t)if(~t.indexOf("\n")){var a=t.split("\n"),s=a.length-1,l="";Pe(a,(function(t,e){0===e?"alphabetic"===o?l+=''+t+"":"top"===o?l+=''+t+"":"middle"===o?l+=''+t+"":"bottom"===o?l+=''+t+"":"hanging"===o&&(l+=''+t+""):l+=''+t+""})),e.innerHTML=l}else e.innerHTML=t;else e.innerHTML=""},e}(gy),Gy=Hy,Yy=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Vy=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Xy=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function qy(t){var e=t.match(Xy);if(!e)return"";var n="";return e.sort((function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])})),Pe(e,(function(t){t=t.split(":"),n+=''})),n}var Wy=function(){function t(t){this.cfg={};var e=null,n=Bn("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,r,i=Yy.exec(t),o=$e(tn(parseFloat(i[1])),2*Math.PI),a=i[2];o>=0&&o<.5*Math.PI?(n={x:0,y:0},r={x:1,y:1}):.5*Math.PI<=o&&o';e.innerHTML=n},t}(),Qy=function(){function t(t,e){this.cfg={};var n=ay("marker"),r=Bn("marker_");n.setAttribute("id",r);var i=ay("path");i.setAttribute("stroke",t.stroke||"none"),i.setAttribute("fill",t.fill||"none"),n.appendChild(i),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=i,this.id=r;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,i):(this.cfg=o,this._setMarker(t.lineWidth,i)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,r=this.cfg.path,i=this.cfg.d;Ce(r)&&(r=r.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",r),n.appendChild(e),i&&n.setAttribute("refX",""+i/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}(),$y=function(){function t(t){this.type="clip",this.cfg={};var e=ay("clipPath");this.el=e,this.id=Bn("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}(),Jy=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,tm=function(){function t(t){this.cfg={};var e=ay("pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=ay("image");e.appendChild(n);var r=Bn("pattern_");e.id=r,this.el=e,this.id=r,this.cfg=t;var i=Jy.exec(t)[2];n.setAttribute("href",i);var o=new Image;function a(){e.setAttribute("width",""+o.width),e.setAttribute("height",""+o.height)}return i.match(/^data:/i)||(o.crossOrigin="Anonymous"),o.src=i,o.complete?a():(o.onload=a,o.src=o.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}(),em=function(){function t(t){var e=ay("defs"),n=Bn("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,r=null,i=0;i0&&(u[0][0]="L")),o=o.concat(u)})),o.push(["Z"])}return o}function am(t,e,n,r,i){for(var o=yg(t,e,!e,"lineWidth"),a=t.connectNulls,s=t.isInCircle,l=pg(t.points,a,t.showSinglePoint),u=[],c=0,h=l.length;cr&&(r=i),i=e[0]})));var d=this.scales[h];try{for(var p=ge(t),g=p.next();!g.done;g=p.next()){var v=g.value,y=this.getDrawCfg(v),m=y.x,_=y.y,x=d.scale(v[tr][h]);this.drawGrayScaleBlurredCircle(m-s.x,_-l.y,n+r,x,f)}}catch(M){i={error:M}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}var b=f.getImageData(0,0,u,c);this.clearShadowCanvasCtx(),this.colorize(b),f.putImageData(b,0,0);var w=this.getImageShape();w.attr("x",s.x),w.attr("y",l.y),w.attr("width",u),w.attr("height",c),w.attr("img",f.canvas),w.set("origin",this.getShapeInfo(t))},e.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),e=this.coordinate;return Math.min(e.getWidth()/(4*t.scales[0].ticks.length),e.getHeight()/(4*t.scales[1].ticks.length))},e.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},e.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},e.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},e.prototype.drawGrayScaleBlurredCircle=function(t,e,n,r,i){var o=this.getGrayScaleBlurredCanvas();i.globalAlpha=r,i.drawImage(o,t-n,e-n)},e.prototype.colorize=function(t){for(var e=this.getAttribute("color"),n=t.data,r=this.paletteCache,i=3;ie&&(r=e-(n=n?e/(1+r/n):0)),i+o>e&&(o=e-(i=i?e/(1+o/i):0)),[n||0,r||0,i||0,o||0]}function pm(t,e,n){var r=[];if(n.isRect){var i=n.isTransposed?{x:n.start.x,y:e[0].y}:{x:e[0].x,y:n.start.y},o=n.isTransposed?{x:n.end.x,y:e[2].y}:{x:e[3].x,y:n.end.y},a=Pn(t,["background","style","radius"]);if(a){var s=n.isTransposed?Math.abs(e[0].y-e[2].y):e[2].x-e[1].x,l=n.isTransposed?n.getWidth():n.getHeight(),u=ve(dm(a,Math.min(s,l)),4),c=u[0],h=u[1],f=u[2],d=u[3],p=n.isTransposed&&n.isReflect("y"),g=p?0:1,v=function(t){return p?-t:t};r.push(["M",i.x,o.y+v(c)]),0!==c&&r.push(["A",c,c,0,0,g,i.x+c,o.y]),r.push(["L",o.x-h,o.y]),0!==h&&r.push(["A",h,h,0,0,g,o.x,o.y+v(h)]),r.push(["L",o.x,i.y-v(f)]),0!==f&&r.push(["A",f,f,0,0,g,o.x-f,i.y]),r.push(["L",i.x+d,i.y]),0!==d&&r.push(["A",d,d,0,0,g,i.x,i.y-v(d)])}else r.push(["M",i.x,i.y]),r.push(["L",o.x,i.y]),r.push(["L",o.x,o.y]),r.push(["L",i.x,o.y]),r.push(["L",i.x,i.y]);r.push(["z"])}if(n.isPolar){var y=n.getCenter(),m=xf(t,n),_=m.startAngle,x=m.endAngle;if("theta"===n.type||n.isTransposed){var b=function(t){return Math.pow(t,2)};c=Math.sqrt(b(y.x-e[0].x)+b(y.y-e[0].y)),h=Math.sqrt(b(y.x-e[2].x)+b(y.y-e[2].y));r=mf(y.x,y.y,c,n.startAngle,n.endAngle,h)}else r=mf(y.x,y.y,n.getRadius(),_,x)}return r}function gm(t,e,n){var r=[];return je(e)?n?r.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",(t[2].x+t[3].x)/2,(t[2].y+t[3].y)/2],["Z"]):r.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",t[2].x,t[2].y],["L",t[3].x,t[3].y],["Z"]):r.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",e[1].x,e[1].y],["L",e[0].x,e[0].y],["Z"]),r}function vm(t,e){return[e,t]}function ym(t){var e=t.theme,n=t.coordinate,r=t.getXScale(),i=r.values,o=t.beforeMappingData,a=i.length,s=Cf(t.coordinate),l=t.intervalPadding,u=t.dodgePadding,c=t.maxColumnWidth||e.maxColumnWidth,h=t.minColumnWidth||e.minColumnWidth,f=t.columnWidthRatio||e.columnWidthRatio,d=t.multiplePieWidthRatio||e.multiplePieWidthRatio,p=t.roseWidthRatio||e.roseWidthRatio;if(r.isLinear&&i.length>1){i.sort();var g=function(t,e){var n=t.length,r=t;Ne(r[0])&&(r=t.map((function(t){return e.translate(t)})));for(var i=r[1]-r[0],o=2;oa&&(i=a)}return i}(i,r);a=(r.max-r.min)/g,i.length>a&&(a=i.length)}var v=r.range,y=1/a,m=1;(n.isPolar?m=n.isTransposed&&a>1?d:p:(r.isLinear&&(y*=v[1]-v[0]),m=f),!je(l)&&l>=0)?y=(1-(a-1)*(l/s))/a:y*=m;if(t.getAdjust("dodge")){var _=function(t,e){if(e){var n=Ie(t);return He(n,e).length}return t.length}(o,t.getAdjust("dodge").dodgeBy);if(!je(u)&&u>=0)y=(y-u/s*(_-1))/_;else!je(l)&&l>=0?(y*=m,y/=_):y/=_;y=y>=0?y:0}if(!je(c)&&c>=0){var x=c/s;y>x&&(y=x)}if(!je(h)&&h>=0){var b=h/s;y0&&!Pn(n,[r,"min"])&&e.change({min:0}),o<=0&&!Pn(n,[r,"max"])&&e.change({max:0}))}},e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return n.background=this.background,n},e}(Up),_m=function(t){function e(e){var n=t.call(this,e)||this;n.type="line";var r=e.sortable,i=void 0!==r&&r;return n.sortable=i,n}return ce(e,t),e}(im),xm=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"];function bm(t,e,n,r,i){var o,a,s=yg(e,i,!i,"r"),l=t.parsePoints(e.points),u=l[0];if(e.isStack)u=l[1];else if(l.length>1){var c=n.addGroup();try{for(var h=ge(l),f=h.next();!f.done;f=h.next()){var d=f.value;c.addShape({type:"marker",attrs:he(he(he({},s),{symbol:ag[r]||r}),d)})}}catch(p){o={error:p}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}return c}return n.addShape({type:"marker",attrs:he(he(he({},s),{symbol:ag[r]||r}),u)})}Gp("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(t){return _g(t)}}),Pe(xm,(function(t){Yp("point","hollow-".concat(t),{draw:function(e,n){return bm(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:ag[t]||t,style:{r:4.5,stroke:n,fill:null}}}})}));var wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="point",e.shapeType="point",e.generatePoints=!0,e}return ce(e,t),e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return he(he({},n),{isStack:!!this.getAdjust("stack")})},e}(Up);Gp("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(t){var e=[];return Pe(t.x,(function(n,r){var i=t.y[r];e.push({x:n,y:i})})),e}}),Yp("polygon","polygon",{draw:function(t,e){if(!Mn(t.points)){var n=yg(t,!0,!0),r=this.parsePath(function(t){for(var e=t[0],n=1,r=[["M",e.x,e.y]];n2?"weight":"normal";if(t.isInCircle){var a={x:0,y:1};return"normal"===o?n=function(t,e,n){var r=Em(e,n),i=[["M",t.x,t.y]];return i.push(r),i}(i[0],i[1],a):(r.fill=r.stroke,n=function(t,e){var n=Em(t[1],e),r=Em(t[3],e),i=[["M",t[0].x,t[0].y]];return i.push(r),i.push(["L",t[3].x,t[3].y]),i.push(["L",t[2].x,t[2].y]),i.push(n),i.push(["L",t[1].x,t[1].y]),i.push(["L",t[0].x,t[0].y]),i.push(["Z"]),i}(i,a)),n=this.parsePath(n),e.addShape("path",{attrs:he(he({},r),{path:n})})}if("normal"===o)return n=_f(((i=this.parsePoints(i))[1].x+i[0].x)/2,i[0].y,Math.abs(i[1].x-i[0].x)/2,Math.PI,2*Math.PI),e.addShape("path",{attrs:he(he({},r),{path:n})});var s=Cm(i[1],i[3]),l=Cm(i[2],i[0]);return n=[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],s,["L",i[3].x,i[3].y],["L",i[2].x,i[2].y],l,["Z"]],n=this.parsePath(n),r.fill=r.stroke,e.addShape("path",{attrs:he(he({},r),{path:n})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),Yp("edge","smooth",{draw:function(t,e){var n=yg(t,!0,!1,"lineWidth"),r=t.points,i=this.parsePath(function(t,e){var n=Cm(t,e),r=[["M",t.x,t.y]];return r.push(n),r}(r[0],r[1]));return e.addShape("path",{attrs:he(he({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}});var Pm=1/3;Yp("edge","vhv",{draw:function(t,e){var n=yg(t,!0,!1,"lineWidth"),r=t.points,i=this.parsePath(function(t,e){var n=[];n.push({x:t.x,y:t.y*(1-Pm)+e.y*Pm}),n.push({x:e.x,y:t.y*(1-Pm)+e.y*Pm}),n.push(e);var r=[["M",t.x,t.y]];return Pe(n,(function(t){r.push(["L",t.x,t.y])})),r}(r[0],r[1]));return e.addShape("path",{attrs:he(he({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),Yp("interval","funnel",{getPoints:function(t){return t.size=2*t.size,hm(t)},draw:function(t,e){var n=yg(t,!1,!0),r=this.parsePath(gm(t.points,t.nextPoints,!1));return e.addShape("path",{attrs:he(he({},n),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),Yp("interval","hollow-rect",{draw:function(t,e){var n=yg(t,!0,!1),r=e,i=null==t?void 0:t.background;if(i){r=e.addGroup();var o=mg(t),a=pm(t,this.parsePoints(t.points),this.coordinate);r.addShape("path",{attrs:he(he({},o),{path:a}),zIndex:-1,name:Ip})}var s=this.parsePath(fm(t.points)),l=r.addShape("path",{attrs:he(he({},n),{path:s}),name:"interval"});return i?r:l},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}}),Yp("interval","line",{getPoints:function(t){return n=(e=t).x,r=e.y,i=e.y0,Ce(r)?r.map((function(t,e){return{x:Ce(n)?n[e]:n,y:t}})):[{x:n,y:i},{x:n,y:r}];var e,n,r,i},draw:function(t,e){var n=yg(t,!0,!1,"lineWidth"),r=Mf(he({},n),["fill"]),i=this.parsePath(fm(t.points,!1));return e.addShape("path",{attrs:he(he({},r),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]},style:{r:5,stroke:t.color}}}}),Yp("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,hm(t)},draw:function(t,e){var n=yg(t,!1,!0),r=this.parsePath(gm(t.points,t.nextPoints,!0));return e.addShape("path",{attrs:he(he({},n),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),Yp("interval","tick",{getPoints:function(t){return function(t){var e,n,r,i=t.x,o=t.y,a=t.y0,s=t.size;Ce(o)?(n=(e=ve(o,2))[0],r=e[1]):(n=a,r=o);var l=i+s/2,u=i-s/2;return[{x:i,y:n},{x:i,y:r},{x:u,y:n},{x:l,y:n},{x:u,y:r},{x:l,y:r}]}(t)},draw:function(t,e){var n,r=yg(t,!0,!1),i=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y]]);return e.addShape("path",{attrs:he(he({},r),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},style:{r:5,stroke:t.color}}}});function Tm(t,e){var n=pg(t.points,t.connectNulls,t.showSinglePoint),r=[];return Pe(n,(function(t){var n=function(t,e){var n=[];return Pe(t,(function(r,i){var o=t[i+1];if(n.push(r),o){var a=function(t,e,n){var r,i=t.x,o=t.y,a=e.x,s=e.y;switch(n){case"hv":r=[{x:a,y:o}];break;case"vh":r=[{x:i,y:s}];break;case"hvh":var l=(a+i)/2;r=[{x:l,y:o},{x:l,y:s}];break;case"vhv":var u=(o+s)/2;r=[{x:i,y:u},{x:a,y:u}]}return r}(r,o,e);n=n.concat(a)}})),n}(t,e);r=r.concat(function(t){return t.map((function(t,e){return 0===e?["M",t.x,t.y]:["L",t.x,t.y]}))}(n))})),he(he({},yg(t,!0,!1,"lineWidth")),{path:r})}function km(t){var e=Ce(t)?t:[t],n=e[0],r=e[e.length-1],i=e.length>1?e[1]:n;return{min:n,max:r,min1:i,max1:e.length>3?e[3]:r,median:e.length>2?e[2]:i}}function Am(t,e,n){var r,i=n/2;if(Ce(e)){var o=km(e),a=o.min,s=o.max,l=o.median,u=o.min1,c=t-i,h=t+i;r=[[c,s],[h,s],[t,s],[t,f=o.max1],[c,u],[c,f],[h,f],[h,u],[t,u],[t,a],[c,a],[h,a],[c,l],[h,l]]}else{e=je(e)?.5:e;var f,d=km(t),p=(a=d.min,s=d.max,l=d.median,e-i),g=e+i;r=[[a,p],[a,g],[a,e],[u=d.min1,e],[u,p],[u,g],[f=d.max1,g],[f,p],[f,e],[s,e],[s,p],[s,g],[l,p],[l,g]]}return r.map((function(t){return{x:t[0],y:t[1]}}))}function Om(t){var e=(Ce(t)?t:[t]).sort((function(t,e){return e-t}));return function(t,e,n){if(Ne(t))return t.padEnd(e,n);if(Ce(t)){var r=t.length;if(r1){var s=e.addGroup();try{for(var l=ge(o),u=l.next();!u.done;u=l.next()){var c=u.value;s.addShape("image",{attrs:{x:c.x-i/2,y:c.y-i,width:i,height:i,img:t.shape[1]}})}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return s}return e.addShape("image",{attrs:{x:a.x-i/2,y:a.y-i,width:i,height:i,img:t.shape[1]}})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),Pe(xm,(function(t){Yp("point",t,{draw:function(e,n){return bm(this,e,n,t,!1)},getMarker:function(e){var n=e.color;return{symbol:ag[t]||t,style:{r:4.5,fill:n}}}})})),Yp("schema","box",{getPoints:function(t){return Am(t.x,t.y,t.size)},draw:function(t,e){var n,r=yg(t,!0,!1),i=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y],["L",n[6].x,n[6].y],["L",n[7].x,n[7].y],["L",n[4].x,n[4].y],["Z"],["M",n[8].x,n[8].y],["L",n[9].x,n[9].y],["M",n[10].x,n[10].y],["L",n[11].x,n[11].y],["M",n[12].x,n[12].y],["L",n[13].x,n[13].y]]);return e.addShape("path",{attrs:he(he({},r),{path:i,name:"schema"})})},getMarker:function(t){return{symbol:function(t,e,n){var r=Am(t,[e-6,e-3,e,e+3,e+6],n);return[["M",r[0].x+1,r[0].y],["L",r[1].x-1,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y],["L",r[6].x,r[6].y],["L",r[7].x,r[7].y],["L",r[4].x,r[4].y],["Z"],["M",r[8].x,r[8].y],["L",r[9].x,r[9].y],["M",r[10].x+1,r[10].y],["L",r[11].x-1,r[11].y],["M",r[12].x,r[12].y],["L",r[13].x,r[13].y]]},style:{r:6,lineWidth:1,stroke:t.color}}}}),Yp("schema","candle",{getPoints:function(t){return Im(t.x,t.y,t.size)},draw:function(t,e){var n,r=yg(t,!0,!0),i=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["L",n[4].x,n[4].y],["L",n[5].x,n[5].y],["Z"],["M",n[6].x,n[6].y],["L",n[7].x,n[7].y]]);return e.addShape("path",{attrs:he(he({},r),{path:i,name:"schema"})})},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){var r=Im(t,[e+7.5,e+3,e-3,e-7.5],n);return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["L",r[4].x,r[4].y],["L",r[5].x,r[5].y],["Z"],["M",r[6].x,r[6].y],["L",r[7].x,r[7].y]]},style:{lineWidth:1,stroke:e,fill:e,r:6}}}}),Yp("polygon","square",{draw:function(t,e){if(!Mn(t.points)){var n=yg(t,!0,!0),r=this.parsePoints(t.points);return e.addShape("rect",{attrs:he(he({},n),Bm(r,t.size)),name:"polygon"})}},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),Yp("violin","smooth",{draw:function(t,e){var n=yg(t,!0,!0),r=this.parsePath(vg(t.points));return e.addShape("path",{attrs:he(he({},n),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{stroke:null,r:4,fill:t.color}}}}),Yp("violin","hollow",{draw:function(t,e){var n=yg(t,!0,!1),r=this.parsePath(gg(t.points));return e.addShape("path",{attrs:he(he({},n),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{r:4,fill:null,stroke:t.color}}}}),Yp("violin","hollow-smooth",{draw:function(t,e){var n=yg(t,!0,!1),r=this.parsePath(vg(t.points));return e.addShape("path",{attrs:he(he({},n),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{r:4,fill:null,stroke:t.color}}}});var Lm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getLabelValueDir=function(t){var e=t.points;return e[0].y<=e[2].y?1:-1},e.prototype.getLabelOffsetPoint=function(e,n,r,i){var o,a=t.prototype.getLabelOffsetPoint.call(this,e,n,r),s=this.getCoordinate(),l=s.isTransposed?"x":"y",u=this.getLabelValueDir(e.mappingData);return a=he(he({},a),((o={})[l]=a[l]*u,o)),s.isReflect("x")&&(a=he(he({},a),{x:-1*a.x})),s.isReflect("y")&&(a=he(he({},a),{y:-1*a.y})),a},e.prototype.getThemedLabelCfg=function(t){var e=this.geometry,n=this.getDefaultLabelCfg(),r=e.theme;return xn({},n,r.labels,"middle"===t.position?{offset:0}:{},t)},e.prototype.setLabelPosition=function(t,e,n,r){var i,o,a,s,l=this.getCoordinate(),u=l.isTransposed,c=e.points,h=l.convert(c[0]),f=l.convert(c[2]),d=this.getLabelValueDir(e),p=Ce(e.shape)?e.shape[0]:e.shape;if("funnel"===p||"pyramid"===p){var g=Pn(e,"nextPoints"),v=Pn(e,"points");if(g){var y=l.convert(v[0]),m=l.convert(v[1]),_=l.convert(g[0]),x=l.convert(g[1]);u?(i=Math.min(_.y,y.y),a=Math.max(_.y,y.y),o=(m.x+x.x)/2,s=(y.x+_.x)/2):(i=Math.min((m.y+x.y)/2,(y.y+_.y)/2),a=Math.max((m.y+x.y)/2,(y.y+_.y)/2),o=x.x,s=y.x)}else i=Math.min(f.y,h.y),a=Math.max(f.y,h.y),o=f.x,s=h.x}else i=Math.min(f.y,h.y),a=Math.max(f.y,h.y),o=f.x,s=h.x;switch(r){case"right":t.x=o,t.y=(i+a)/2,t.textAlign=Pn(t,"textAlign",d>0?"left":"right");break;case"left":t.x=s,t.y=(i+a)/2,t.textAlign=Pn(t,"textAlign",d>0?"left":"right");break;case"bottom":u&&(t.x=(o+s)/2),t.y=a,t.textAlign=Pn(t,"textAlign","center"),t.textBaseline=Pn(t,"textBaseline",d>0?"bottom":"top");break;case"middle":u&&(t.x=(o+s)/2),t.y=(i+a)/2,t.textAlign=Pn(t,"textAlign","center"),t.textBaseline=Pn(t,"textBaseline","middle");break;case"top":u&&(t.x=(o+s)/2),t.y=i,t.textAlign=Pn(t,"textAlign","center"),t.textBaseline=Pn(t,"textBaseline",d>0?"bottom":"top")}},e}(ig),Fm=Math.PI/2,Dm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=0;if(Ke(t))n=t;else if(Ne(t)&&-1!==t.indexOf("%")){var r=e.getRadius();e.innerRadius>0&&(r*=1-e.innerRadius),n=.01*parseFloat(t)*r}return n},e.prototype.getLabelItems=function(e){var n=t.prototype.getLabelItems.call(this,e),r=this.geometry.getYScale();return Cn(n,(function(t){if(t&&r){var e=r.scale(Pn(t.data,r.field));return he(he({},t),{percent:e})}return t}))},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate();if(t.labelEmit)e=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(n.isTransposed){var r=n.getCenter(),i=t.offset;e=Math.abs(t.x-r.x)<1?"center":t.angle>Math.PI||t.angle<=0?i>0?"left":"right":i>0?"right":"left"}else e="center";return e},e.prototype.getLabelPoint=function(t,e,n){var r,i=1,o=t.content[n];this.isToMiddle(e)?r=this.getMiddlePoint(e.points):(1===t.content.length&&0===n?n=1:0===n&&(i=-1),r=this.getArcPoint(e,n));var a=t.offset*i,s=this.getPointAngle(r),l=t.labelEmit,u=this.getCirclePoint(s,a,r,l);return 0===u.r?u.content="":(u.content=o,u.angle=s,u.color=e.color),u.rotate=t.autoRotate?this.getLabelRotate(s,a,l):t.rotate,u.start={x:r.x,y:r.y},u},e.prototype.getArcPoint=function(t,e){return void 0===e&&(e=0),Ce(t.x)||Ce(t.y)?{x:Ce(t.x)?t.x[e]:t.x,y:Ce(t.y)?t.y[e]:t.y}:{x:t.x,y:t.y}},e.prototype.getPointAngle=function(t){return Pf(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,e,n,r){var i=this.getCoordinate(),o=i.getCenter(),a=Ef(i,n);if(0===a)return he(he({},o),{r:a});var s=t;i.isTransposed&&a>e&&!r?s=t+2*Math.asin(e/(2*a)):a+=e;return{x:o.x+a*Math.cos(s),y:o.y+a*Math.sin(s),r:a}},e.prototype.getLabelRotate=function(t,e,n){var r=t+Fm;return n&&(r-=Fm),r&&(r>Fm?r-=Math.PI:r<-Fm&&(r+=Math.PI)),r},e.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),n=t.length,r={x:0,y:0};return Pe(t,(function(t){r.x+=t.x,r.y+=t.y})),r.x/=n,r.y/=n,r=e.convert(r)},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(ig),Rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultLayout="distribute",e}return ce(e,t),e.prototype.getDefaultLabelCfg=function(e,n){var r=t.prototype.getDefaultLabelCfg.call(this,e,n);return xn({},r,Pn(this.geometry.theme,"pieLabels",{}))},e.prototype.getLabelOffset=function(e){return t.prototype.getLabelOffset.call(this,e)||0},e.prototype.getLabelRotate=function(t,e,n){var r;return e<0&&((r=t)>Math.PI/2&&(r-=Math.PI),r<-Math.PI/2&&(r+=Math.PI)),r},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate().getCenter();return e=t.angle<=Math.PI/2&&t.x>=n.x?"left":"right",t.offset<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e,n=this.getCoordinate(),r={x:Ce(t.x)?t.x[0]:t.x,y:t.y[0]},i={x:Ce(t.x)?t.x[1]:t.x,y:t.y[1]},o=Pf(n,r);if(t.points&&t.points[0].y===t.points[1].y)e=o;else{var a=Pf(n,i);o>=a&&(a+=2*Math.PI),e=o+(a-o)/2}return e},e.prototype.getCirclePoint=function(t,e){var n=this.getCoordinate(),r=n.getCenter(),i=n.getRadius()+e;return he(he({},yf(r.x,r.y,i,t)),{angle:t,r:i})},e}(Dm);function Nm(t,e,n){var r=t.filter((function(t){return!t.invisible}));r.sort((function(t,e){return t.y-e.y}));var i,o=!0,a=n.minY,s=n.maxY,l=Math.abs(a-s),u=0,c=Number.MIN_VALUE,h=r.map((function(t){return t.y>u&&(u=t.y),t.yl&&(l=u-a);o;)for(h.forEach((function(t){var e=(Math.min.apply(c,t.targets)+Math.max.apply(c,t.targets))/2;t.pos=Math.min(Math.max(c,e-t.size/2),l-t.size),t.pos=Math.max(0,t.pos)})),o=!1,i=h.length;i--;)if(i>0){var f=h[i-1],d=h[i];f.pos+f.size>d.pos&&(f.size+=d.size,f.targets=f.targets.concat(d.targets),f.pos+f.size>l&&(f.pos=l-f.size),h.splice(i,1),o=!0)}i=0,h.forEach((function(t){var n=a+e/2;t.targets.forEach((function(){r[i].y=t.pos+n,n+=e,i++}))}))}var zm=function(){function t(t){void 0===t&&(t={}),this.bitmap={};var e=t.xGap,n=void 0===e?1:e,r=t.yGap,i=void 0===r?8:r;this.xGap=n,this.yGap=i}return t.prototype.hasGap=function(t){for(var e=!0,n=this.bitmap,r=Math.round(t.minX),i=Math.round(t.maxX),o=Math.round(t.minY),a=Math.round(t.maxY),s=r;s<=i;s+=1)if(n[s]){if(s===r||s===i){for(var l=o;l<=a;l++)if(n[s][l]){e=!1;break}}else if(n[s][o]||n[s][a]){e=!1;break}}else n[s]={};return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,n=Math.round(t.minX),r=Math.round(t.maxX),i=Math.round(t.minY),o=Math.round(t.maxY),a=n;a<=r;a+=1)e[a]||(e[a]={});for(a=n;a<=r;a+=this.xGap){for(var s=i;s<=o;s+=this.yGap)e[a][s]=!0;e[a][o]=!0}if(1!==this.yGap)for(a=i;a<=o;a+=1)e[n][a]=!0,e[r][a]=!0;if(1!==this.xGap)for(a=n;a<=r;a+=1)e[a][i]=!0,e[a][o]=!0},t.prototype.destroy=function(){this.bitmap={}},t}();function Hm(t,e,n,r){var i=t.getCanvasBBox(),o=i.width,a=i.height,s={x:e,y:n,textAlign:"center"};switch(r){case 0:s.y-=a+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=a+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=a+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=a+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*a+2;break;case 6:s.y+=2*a+2;break;case 7:s.x+=o+1,s.textAlign="left";break;case 8:s.x-=o+1,s.textAlign="right"}return t.attr(s),t.getCanvasBBox()}function Gm(t){if(t.length>4)return[];var e=function(t,e){return[e.x-t.x,e.y-t.y]};return[e(t[0],t[1]),e(t[1],t[2])]}function Ym(t,e,n){void 0===e&&(e=0),void 0===n&&(n={x:0,y:0});var r=t.x,i=t.y;return{x:(r-n.x)*Math.cos(-e)+(i-n.y)*Math.sin(-e)+n.x,y:(n.x-r)*Math.sin(-e)+(i-n.y)*Math.cos(-e)+n.y}}function Vm(t){var e=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],n=t.rotation;return n?[Ym(e[0],n,e[0]),Ym(e[1],n,e[0]),Ym(e[2],n,e[0]),Ym(e[3],n,e[0])]:e}function Xm(t,e){if(t.length>4)return{min:0,max:0};var n=[];return t.forEach((function(t){var r,i;n.push((r=[t.x,t.y],i=e,(r[0]||0)*(i[0]||0)+(r[1]||0)*(i[1]||0)+(r[2]||0)*(i[2]||0)))})),{min:Math.min.apply(Math,me([],ve(n),!1)),max:Math.max.apply(Math,me([],ve(n),!1))}}function qm(t,e){return t.max>e.min&&t.mint.x+t.width+n||e.x+e.widtht.y+t.height+n||e.y+e.height4)return[];var e=function(t,e){return[e.x-t.x,e.y-t.y]};return[e(t[0],t[1]),e(t[1],t[2])]}function e(t,e,n){void 0===e&&(e=0),void 0===n&&(n={x:0,y:0});var r=t.x,i=t.y;return{x:(r-n.x)*Math.cos(-e)+(i-n.y)*Math.sin(-e)+n.x,y:(n.x-r)*Math.sin(-e)+(i-n.y)*Math.cos(-e)+n.y}}function n(t){var n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],r=t.rotation;return r?[e(n[0],r,n[0]),e(n[1],r,n[0]),e(n[2],r,n[0]),e(n[3],r,n[0])]:n}function r(t,e){if(t.length>4)return{min:0,max:0};var n=[];return t.forEach((function(t){var r,i;n.push((r=[t.x,t.y],i=e,(r[0]||0)*(i[0]||0)+(r[1]||0)*(i[1]||0)+(r[2]||0)*(i[2]||0)))})),{min:Math.min.apply(null,n),max:Math.max.apply(null,n)}}function i(t,e){return t.max>e.min&&t.mint.x+t.width+n||e.x+e.widtht.y+t.height+n||e.y+e.height=o.height:a.width>=o.width}(t,e,i)}))}function r_(t,e,n){return t.some((function(t){return n(t,e)}))}function i_(t,e){return r_(t,e,(function(t,e){var n,r,i,o=$p(t),a=$p(e);return n=o.getCanvasBBox(),r=a.getCanvasBBox(),void 0===(i=2)&&(i=0),Math.max(0,Math.min(n.x+n.width+i,r.x+r.width+i)-Math.max(n.x-i,r.x-i))*Math.max(0,Math.min(n.y+n.height+i,r.y+r.height+i)-Math.max(n.y-i,r.y-i))>0}))}function o_(t,e,n){return t.some((function(t){return n(t,e)}))}function a_(t,e){return o_(t,e,(function(t,e){var n,r,i,o=$p(t),a=$p(e);return n=o.getCanvasBBox(),r=a.getCanvasBBox(),void 0===(i=2)&&(i=0),Math.max(0,Math.min(n.x+n.width+i,r.x+r.width+i)-Math.max(n.x-i,r.x-i))*Math.max(0,Math.min(n.y+n.height+i,r.y+r.height+i)-Math.max(n.y-i,r.y-i))>0}))}function s_(){return t_||(t_=document.createElement("canvas").getContext("2d")),t_}var l_=mn((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant,s=s_();return s.font=[o,a,i,"".concat(n,"px"),r].join(" "),s.measureText(Ne(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),me([t],ve(nn(e)),!1).join("")}));function u_(t,e,n,r,i){var o,a,s=n.start,l=n.end,u=n.getWidth(),c=n.getHeight();"y"===i?(o=s.x+u/2,a=r.ys.x?r.x:s.x,a=s.y+c/2):"xy"===i&&(n.isPolar?(o=n.getCenter().x,a=n.getCenter().y):(o=(s.x+l.x)/2,a=(s.y+l.y)/2));var h=function(t,e,n){var r,i=ve(e,2),o=i[0],a=i[1];return t.applyToMatrix([o,a,1]),"x"===n?(t.setMatrix(Ci(t.getMatrix(),[["t",-o,-a],["s",.01,1],["t",o,a]])),r=Ci(t.getMatrix(),[["t",-o,-a],["s",100,1],["t",o,a]])):"y"===n?(t.setMatrix(Ci(t.getMatrix(),[["t",-o,-a],["s",1,.01],["t",o,a]])),r=Ci(t.getMatrix(),[["t",-o,-a],["s",1,100],["t",o,a]])):"xy"===n&&(t.setMatrix(Ci(t.getMatrix(),[["t",-o,-a],["s",.01,.01],["t",o,a]])),r=Ci(t.getMatrix(),[["t",-o,-a],["s",100,100],["t",o,a]])),r}(t,[o,a],i);t.animate({matrix:h},e)}function c_(t,e){var n,r=Kg(t,e),i=r.startAngle,o=r.endAngle;return!Qe(i,.5*-Math.PI)&&i<.5*-Math.PI&&(i+=2*Math.PI),!Qe(o,.5*-Math.PI)&&o<.5*-Math.PI&&(o+=2*Math.PI),0===e[5]&&(i=(n=ve([o,i],2))[0],o=n[1]),Qe(i,1.5*Math.PI)&&(i=-.5*Math.PI),Qe(o,-.5*Math.PI)&&!Qe(i,o)&&(o=1.5*Math.PI),{startAngle:i,endAngle:o}}function h_(t){var e;return"M"===t[0]||"L"===t[0]?e=[t[1],t[2]]:"a"!==t[0]&&"A"!==t[0]&&"C"!==t[0]||(e=[t[t.length-2],t[t.length-1]]),e}function f_(t){var e,n,r,i=t.filter((function(t){return"A"===t[0]||"a"===t[0]}));if(0===i.length)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var o=i[0],a=i.length>1?i[1]:i[0],s=t.indexOf(o),l=t.indexOf(a),u=h_(t[s-1]),c=h_(t[l-1]),h=c_(u,o),f=h.startAngle,d=h.endAngle,p=c_(c,a),g=p.startAngle,v=p.endAngle;Qe(f,g)&&Qe(d,v)?(n=f,r=d):(n=Math.min(f,g),r=Math.max(d,v));var y=o[1],m=i[i.length-1][1];return y=0;a--){var s=this.getFacetsByLevel(t,a);try{for(var l=(e=void 0,ge(s)),u=l.next();!u.done;u=l.next()){var c=u.value;this.isLeaf(c)||(c.originColIndex=c.columnIndex,c.columnIndex=this.getRegionIndex(c.children),c.columnValuesLength=i.length)}}catch(h){e={error:h}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}}},e.prototype.getFacetsByLevel=function(t,e){var n=[];return t.forEach((function(t){t.rowIndex===e&&n.push(t)})),n},e.prototype.getRegionIndex=function(t){var e=t[0];return(t[t.length-1].columnIndex-e.columnIndex)/2+e.columnIndex},e.prototype.isLeaf=function(t){return!t.children||!t.children.length},e.prototype.getRows=function(){return this.cfg.fields.length+1},e.prototype.getChildFacets=function(t,e,n){var r=this,i=this.cfg.fields;if(!(i.length=n){var i=r.parsePosition([t[s],t[a.field]]);i&&h.push(i)}if(t[s]===c)return!1})),h},e.prototype.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,n=parseFloat(t[1])/100,r=this.view.getCoordinate(),i=r.start,o=r.end,a=Math.min(i.x,o.x),s=Math.min(i.y,o.y);return{x:r.getWidth()*e+a,y:r.getHeight()*n+s}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,n=t.end,r=t.getWidth(),i=t.getHeight(),o={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y)};return{x:o.x,y:o.y,minX:o.x,minY:o.y,maxX:o.x+r,maxY:o.y+i,width:r,height:i}},e.prototype.getAnnotationCfg=function(t,e,n){var r=this,i=this.view.getCoordinate(),o=this.view.getCanvas(),a={};if(je(e))return null;var s=e.start,l=e.end,u=e.position,c=this.parsePosition(s),h=this.parsePosition(l),f=this.parsePosition(u);if(!(!["arc","image","line","region","regionFilter"].includes(t)||c&&h))return null;if(["text","dataMarker","html"].includes(t)&&!f)return null;if("arc"===t){var d=e;d.start,d.end;var p=fe(d,["start","end"]),g=Pf(i,c),v=Pf(i,h);g>v&&(v=2*Math.PI+v),a=he(he({},p),{center:i.getCenter(),radius:Ef(i,c),startAngle:g,endAngle:v})}else if("image"===t){var y=e;y.start,y.end;p=fe(y,["start","end"]);a=he(he({},p),{start:c,end:h,src:e.src})}else if("line"===t){var m=e;m.start,m.end;p=fe(m,["start","end"]);a=he(he({},p),{start:c,end:h,text:Pn(e,"text",null)})}else if("region"===t){var _=e;_.start,_.end;p=fe(_,["start","end"]);a=he(he({},p),{start:c,end:h})}else if("text"===t){var x=this.view.getData(),b=e;b.position;var w=b.content,M=(p=fe(b,["position","content"]),w);Se(w)&&(M=w(x)),a=he(he(he({},f),p),{content:M})}else if("dataMarker"===t){var S=e;S.position;var j=S.point,C=S.line,E=S.text,P=S.autoAdjust,T=S.direction;p=fe(S,["position","point","line","text","autoAdjust","direction"]);a=he(he(he({},p),f),{coordinateBBox:this.getCoordinateBBox(),point:j,line:C,text:E,autoAdjust:P,direction:T})}else if("dataRegion"===t){var k=e,A=k.start,O=k.end,I=k.region,B=(E=k.text,k.lineLength);p=fe(k,["start","end","region","text","lineLength"]);a=he(he({},p),{points:this.getRegionPoints(A,O),region:I,text:E,lineLength:B})}else if("regionFilter"===t){var L=e;L.start,L.end;var F=L.apply,D=L.color,R=(p=fe(L,["start","end","apply","color"]),this.view.geometries),N=[],z=function t(e){e&&(e.isGroup()?e.getChildren().forEach((function(e){return t(e)})):N.push(e))};Pe(R,(function(t){F?xe(F,t.type)&&Pe(t.elements,(function(t){z(t.shape)})):Pe(t.elements,(function(t){z(t.shape)}))})),a=he(he({},p),{color:D,shapes:N,start:c,end:h})}else if("shape"===t){var H=e,G=H.render,Y=fe(H,["render"]);a=he(he({},Y),{render:function(t){if(Se(e.render))return G(t,r.view,{parsePosition:r.parsePosition.bind(r)})}})}else if("html"===t){var V=e,X=V.html;V.position;Y=fe(V,["html","position"]);a=he(he(he({},Y),f),{parent:o.get("el").parentNode,html:function(t){return Se(X)?X(t,r.view):X}})}var q=xn({},n,he(he({},a),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return"html"!==t&&(q.container=this.getComponentContainer(q)),q.animate=this.view.getOptions().animate&&q.animate&&Pn(e,"animate",q.animate),q.animateOption=xn({},Pp,q.animateOption,e.animateOption),q},e.prototype.isTop=function(t){return Pn(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return Pn(this.view.getTheme(),["components","annotation",t],{})},e.prototype.updateOrCreate=function(t){var e=this.cache.get(this.getCacheKey(t));if(e){var n=t.type,r=this.getAnnotationTheme(n),i=this.getAnnotationCfg(n,t,r);i&&Mf(i,["container"]),e.component.update(he(he({},i||{}),{visible:!!i})),xe(S_,t.type)&&e.component.render()}else(e=this.createAnnotation(t))&&(e.component.init(),xe(S_,t.type)&&e.component.render());return e},e.prototype.syncCache=function(t){var e=this,n=new Map(this.cache);return t.forEach((function(t,e){n.set(e,t)})),n.forEach((function(t,r){Oe(e.option,(function(t){return r===e.getCacheKey(t)}))||(t.component.destroy(),n.delete(r))})),n},e.prototype.getCacheKey=function(t){return t},e}(Mp);function C_(t,e){var n=xn({},Pn(t,["components","axis","common"]),Pn(t,["components","axis",e]));return Pn(n,["grid"],{})}function E_(t,e,n,r){var i=[],o=e.getTicks();return t.isPolar&&o.push({value:1,text:"",tickValue:""}),o.reduce((function(e,o,a){var s=o.value;if(r)i.push({points:[t.convert("y"===n?{x:0,y:s}:{x:s,y:0}),t.convert("y"===n?{x:1,y:s}:{x:s,y:1})]});else if(a){var l=(e.value+s)/2;i.push({points:[t.convert("y"===n?{x:0,y:l}:{x:l,y:0}),t.convert("y"===n?{x:1,y:l}:{x:l,y:1})]})}return o}),o[0]),i}function P_(t,e,n,r,i){var o=e.values.length,a=[],s=n.getTicks();return s.reduce((function(e,n){var s=e?e.value:n.value,l=n.value,u=(s+l)/2;return"x"===i?a.push({points:[t.convert({x:r?l:u,y:0}),t.convert({x:r?l:u,y:1})]}):a.push({points:Cn(Array(o+1),(function(e,n){return t.convert({x:n/o,y:r?l:u})}))}),n}),s[0]),a}function T_(t,e){var n=Pn(e,"grid");if(null===n)return!1;var r=Pn(t,"grid");return!(void 0===n&&null===r)}var k_=["container"],A_=he(he({},Pp),{appear:null}),O_=function(t){function e(e){var n=t.call(this,e)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(Dn.BG).addGroup(),n.gridForeContainer=n.view.getLayer(Dn.FORE).addGroup(),n.axisContainer=n.view.getLayer(Dn.BG).addGroup(),n.axisForeContainer=n.view.getLayer(Dn.FORE).addGroup(),n}return ce(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this,e=this.view.getCoordinate();Pe(this.getComponents(),(function(n){var r,i=n.component,o=n.direction,a=n.type,s=n.extra,l=s.dim,u=s.scale,c=s.alignTick;if(a===Nn.AXIS)e.isPolar?"x"===l?r=e.isTransposed?Ff(e,o):Hf(e):"y"===l&&(r=e.isTransposed?Hf(e):Ff(e,o)):r=Ff(e,o);else if(a===Nn.GRID)if(e.isPolar){r={items:e.isTransposed?"x"===l?P_(e,t.view.getYScales()[0],u,c,l):E_(e,u,l,c):"x"===l?E_(e,u,l,c):P_(e,t.view.getXScale(),u,c,l),center:t.view.getCoordinate().getCenter()}}else r={items:E_(e,u,l,c)};i.update(r)}))},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach((function(n,r){t.has(r)?e.set(r,n):n.component.destroy()})),this.cache=e},e.prototype.clear=function(){t.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach((function(e){t.push(e)})),t},e.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(e&&!e.isIdentity){var n=Gf(this.option,e.field);if(!1!==n){var r=Yf(n,Rn.BOTTOM),i=Dn.BG,o="x",a=this.view.getCoordinate(),s=this.getId("axis",e.field),l=this.getId("grid",e.field);if(a.isRect){if(u=this.cache.get(s))Mf(h=this.getLineAxisCfg(e,n,r),k_),u.component.update(h),t.set(s,u);else u=this.createLineAxis(e,n,i,r,o),this.cache.set(s,u),t.set(s,u);if(c=this.cache.get(l))Mf(h=this.getLineGridCfg(e,n,r,o),k_),c.component.update(h),t.set(l,c);else(c=this.createLineGrid(e,n,i,r,o))&&(this.cache.set(l,c),t.set(l,c))}else if(a.isPolar){var u,c;if(u=this.cache.get(s)){Mf(h=a.isTransposed?this.getLineAxisCfg(e,n,Rn.RADIUS):this.getCircleAxisCfg(e,n,r),k_),u.component.update(h),t.set(s,u)}else{if(a.isTransposed){if(fn(n))return;u=this.createLineAxis(e,n,i,Rn.RADIUS,o)}else u=this.createCircleAxis(e,n,i,r,o);this.cache.set(s,u),t.set(s,u)}if(c=this.cache.get(l)){var h;Mf(h=a.isTransposed?this.getCircleGridCfg(e,n,Rn.RADIUS,o):this.getLineGridCfg(e,n,Rn.CIRCLE,o),k_),c.component.update(h),t.set(l,c)}else{if(a.isTransposed){if(fn(n))return;c=this.createCircleGrid(e,n,i,Rn.RADIUS,o)}else c=this.createLineGrid(e,n,i,Rn.CIRCLE,o);c&&(this.cache.set(l,c),t.set(l,c))}}}}},e.prototype.updateYAxes=function(t){var e=this;Pe(this.view.getYScales(),(function(n,r){if(n&&!n.isIdentity){var i=n.field,o=Gf(e.option,i);if(!1!==o){var a=Dn.BG,s="y",l=e.getId("axis",i),u=e.getId("grid",i),c=e.view.getCoordinate();if(c.isRect){var h=Yf(o,0===r?Rn.LEFT:Rn.RIGHT);if(f=e.cache.get(l))Mf(p=e.getLineAxisCfg(n,o,h),k_),f.component.update(p),t.set(l,f);else f=e.createLineAxis(n,o,a,h,s),e.cache.set(l,f),t.set(l,f);if(d=e.cache.get(u))Mf(p=e.getLineGridCfg(n,o,h,s),k_),d.component.update(p),t.set(u,d);else(d=e.createLineGrid(n,o,a,h,s))&&(e.cache.set(u,d),t.set(u,d))}else if(c.isPolar){var f,d;if(f=e.cache.get(l)){Mf(p=c.isTransposed?e.getCircleAxisCfg(n,o,Rn.CIRCLE):e.getLineAxisCfg(n,o,Rn.RADIUS),k_),f.component.update(p),t.set(l,f)}else{if(c.isTransposed){if(fn(o))return;f=e.createCircleAxis(n,o,a,Rn.CIRCLE,s)}else f=e.createLineAxis(n,o,a,Rn.RADIUS,s);e.cache.set(l,f),t.set(l,f)}if(d=e.cache.get(u)){var p;Mf(p=c.isTransposed?e.getLineGridCfg(n,o,Rn.CIRCLE,s):e.getCircleGridCfg(n,o,Rn.RADIUS,s),k_),d.component.update(p),t.set(u,d)}else{if(c.isTransposed){if(fn(o))return;d=e.createLineGrid(n,o,a,Rn.CIRCLE,s)}else d=e.createCircleGrid(n,o,a,Rn.RADIUS,s);d&&(e.cache.set(u,d),t.set(u,d))}}}}}))},e.prototype.createLineAxis=function(t,e,n,r,i){var o={component:new lf(this.getLineAxisCfg(t,e,r)),layer:n,direction:r===Rn.RADIUS?Rn.NONE:r,type:Nn.AXIS,extra:{dim:i,scale:t}};return o.component.set("field",t.field),o.component.init(),o},e.prototype.createLineGrid=function(t,e,n,r,i){var o=this.getLineGridCfg(t,e,r,i);if(o){var a={component:new cf(o),layer:n,direction:Rn.NONE,type:Nn.GRID,extra:{dim:i,scale:t,alignTick:Pn(o,"alignTick",!0)}};return a.component.init(),a}},e.prototype.createCircleAxis=function(t,e,n,r,i){var o={component:new uf(this.getCircleAxisCfg(t,e,r)),layer:n,direction:r,type:Nn.AXIS,extra:{dim:i,scale:t}};return o.component.set("field",t.field),o.component.init(),o},e.prototype.createCircleGrid=function(t,e,n,r,i){var o=this.getCircleGridCfg(t,e,r,i);if(o){var a={component:new hf(o),layer:n,direction:Rn.NONE,type:Nn.GRID,extra:{dim:i,scale:t,alignTick:Pn(o,"alignTick",!0)}};return a.component.init(),a}},e.prototype.getLineAxisCfg=function(t,e,n){var r=Pn(e,["top"])?this.axisForeContainer:this.axisContainer,i=this.view.getCoordinate(),o=Ff(i,n),a=Vf(t,e),s=Nf(this.view.getTheme(),n),l=Pn(e,["title"])?xn({title:{style:{text:a}}},{title:zf(this.view.getTheme(),n,e.title)},e):e,u=xn(he(he({container:r},o),{ticks:t.getTicks().map((function(t){return{id:"".concat(t.tickValue),name:t.text,value:t.value}})),verticalFactor:i.isPolar?-1*Rf(o,i.getCenter()):Rf(o,i.getCenter()),theme:s}),s,l),c=this.getAnimateCfg(u),h=c.animate,f=c.animateOption;u.animateOption=f,u.animate=h;var d=Df(o),p=Pn(u,"verticalLimitLength",d?1/3:.5);if(p<=1){var g=this.view.getCanvas().get("width"),v=this.view.getCanvas().get("height");u.verticalLimitLength=p*(d?g:v)}return u},e.prototype.getLineGridCfg=function(t,e,n,r){if(T_(Nf(this.view.getTheme(),n),e)){var i=C_(this.view.getTheme(),n),o=xn({container:Pn(e,["top"])?this.gridForeContainer:this.gridContainer},i,Pn(e,"grid"),this.getAnimateCfg(e));return o.items=E_(this.view.getCoordinate(),t,r,Pn(o,"alignTick",!0)),o}},e.prototype.getCircleAxisCfg=function(t,e,n){var r=Pn(e,["top"])?this.axisForeContainer:this.axisContainer,i=this.view.getCoordinate(),o=t.getTicks().map((function(t){return{id:"".concat(t.tickValue),name:t.text,value:t.value}}));t.isCategory||Math.abs(i.endAngle-i.startAngle)!==2*Math.PI||o.pop();var a=Vf(t,e),s=Nf(this.view.getTheme(),Rn.CIRCLE),l=Pn(e,["title"])?xn({title:{style:{text:a}}},{title:zf(this.view.getTheme(),n,e.title)},e):e,u=xn(he(he({container:r},Hf(this.view.getCoordinate())),{ticks:o,verticalFactor:1,theme:s}),s,l),c=this.getAnimateCfg(u),h=c.animate,f=c.animateOption;return u.animate=h,u.animateOption=f,u},e.prototype.getCircleGridCfg=function(t,e,n,r){if(T_(Nf(this.view.getTheme(),n),e)){var i=C_(this.view.getTheme(),Rn.RADIUS),o=xn({container:Pn(e,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},i,Pn(e,"grid"),this.getAnimateCfg(e)),a=Pn(o,"alignTick",!0),s="x"===r?this.view.getYScales()[0]:this.view.getXScale();return o.items=P_(this.view.getCoordinate(),s,t,a,r),o}},e.prototype.getId=function(t,e){var n=this.view.getCoordinate();return"".concat(t,"-").concat(e,"-").concat(n.type)},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&Pn(t,"animate"),animateOption:t&&t.animateOption?xn({},A_,t.animateOption):A_}},e}(Mp);function I_(t,e,n){return n===Rn.TOP?[t.minX+t.width/2-e.width/2,t.minY]:n===Rn.BOTTOM?[t.minX+t.width/2-e.width/2,t.maxY-e.height]:n===Rn.LEFT?[t.minX,t.minY+t.height/2-e.height/2]:n===Rn.RIGHT?[t.maxX-e.width,t.minY+t.height/2-e.height/2]:n===Rn.TOP_LEFT||n===Rn.LEFT_TOP?[t.tl.x,t.tl.y]:n===Rn.TOP_RIGHT||n===Rn.RIGHT_TOP?[t.tr.x-e.width,t.tr.y]:n===Rn.BOTTOM_LEFT||n===Rn.LEFT_BOTTOM?[t.bl.x,t.bl.y-e.height]:n===Rn.BOTTOM_RIGHT||n===Rn.RIGHT_BOTTOM?[t.br.x-e.width,t.br.y-e.height]:[0,0]}function B_(t,e){return un(t)?!1!==t&&{}:Pn(t,[e],t)}function L_(t){return Pn(t,"position",Rn.BOTTOM)}var F_=function(t){function e(e){var n=t.call(this,e)||this;return n.container=n.view.getLayer(Dn.FORE).addGroup(),n}return ce(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,Pe(this.components,(function(e){var n=e.component,r=e.direction,i=ug(r),o=n.get("maxWidthRatio"),a=n.get("maxHeightRatio"),s=t.getCategoryLegendSizeCfg(i,o,a),l=n.get("maxWidth"),u=n.get("maxHeight");n.update({maxWidth:Math.min(s.maxWidth,l||0),maxHeight:Math.min(s.maxHeight,u||0)});var c=n.get("padding"),h=n.getLayoutBBox(),f=new jf(h.x,h.y,h.width,h.height).expand(c),d=ve(I_(t.view.viewBBox,f,r),2),p=d[0],g=d[1],v=ve(I_(t.layoutBBox,f,r),2),y=v[0],m=v[1],_=0,x=0;r.startsWith("top")||r.startsWith("bottom")?(_=p,x=m):(_=y,x=g),n.setLocation({x:_+c[3],y:x+c[0]}),t.layoutBBox=t.layoutBBox.cut(f,r)}))},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={};if(Pn(this.option,"custom")){var n="global-custom",r=this.getComponentById(n);if(r){var i=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);Mf(i,["container"]),r.component.update(i),e[n]=!0}else{var o=this.createCustomLegend(void 0,void 0,void 0,this.option);if(o){o.init();var a=Dn.FORE,s=L_(this.option);this.components.push({id:n,component:o,layer:a,direction:s,type:Nn.LEGEND,extra:void 0}),e[n]=!0}}}else this.loopLegends((function(n,r,i){var o=t.getId(i.field),a=t.getComponentById(o);if(a){var s=void 0,l=B_(t.option,i.field);!1!==l&&(Pn(l,"custom")?s=t.getCategoryCfg(n,r,i,l,!0):i.isLinear?s=t.getContinuousCfg(n,r,i,l):i.isCategory&&(s=t.getCategoryCfg(n,r,i,l))),s&&(Mf(s,["container"]),a.direction=L_(l),a.component.update(s),e[o]=!0)}else{var u=t.createFieldLegend(n,r,i);u&&(u.component.init(),t.components.push(u),e[o]=!0)}}));var l=[];Pe(this.getComponents(),(function(t){e[t.id]?l.push(t):t.component.destroy()})),this.components=l},e.prototype.clear=function(){t.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t){var e=this,n=t.geometries;return Pe(t.views,(function(t){n=n.concat(e.getGeometries(t))})),n},e.prototype.loopLegends=function(t){if(this.view.getRootView()===this.view){var e=this.getGeometries(this.view),n={};Pe(e,(function(e){Pe(e.getGroupAttributes(),(function(r){var i=r.getScale(r.type);i&&"identity"!==i.type&&!n[i.field]&&(t(e,r,i),n[i.field]=!0)}))}))}},e.prototype.createFieldLegend=function(t,e,n){var r,i=B_(this.option,n.field),o=Dn.FORE,a=L_(i);if(!1!==i&&(Pn(i,"custom")?r=this.createCustomLegend(t,e,n,i):n.isLinear?r=this.createContinuousLegend(t,e,n,i):n.isCategory&&(r=this.createCategoryLegend(t,e,n,i))),r)return r.set("field",n.field),{id:this.getId(n.field),component:r,layer:o,direction:a,type:Nn.LEGEND,extra:{scale:n}}},e.prototype.createCustomLegend=function(t,e,n,r){var i=this.getCategoryCfg(t,e,n,r,!0);return new ff(i)},e.prototype.createContinuousLegend=function(t,e,n,r){var i=this.getContinuousCfg(t,e,n,Mf(r,["value"]));return new df(i)},e.prototype.createCategoryLegend=function(t,e,n,r){var i=this.getCategoryCfg(t,e,n,r);return new ff(i)},e.prototype.getContinuousCfg=function(t,e,n,r){var i=n.getTicks(),o=Oe(i,(function(t){return 0===t.value})),a=Oe(i,(function(t){return 1===t.value})),s=i.map((function(t){var r=t.value,i=t.tickValue,o=e.mapping(n.invert(r)).join("");return{value:i,attrValue:o,color:o,scaleValue:r}}));o||s.push({value:n.min,attrValue:e.mapping(n.invert(0)).join(""),color:e.mapping(n.invert(0)).join(""),scaleValue:0}),a||s.push({value:n.max,attrValue:e.mapping(n.invert(1)).join(""),color:e.mapping(n.invert(1)).join(""),scaleValue:1}),s.sort((function(t,e){return t.value-e.value}));var l={min:Ge(s).value,max:Ye(s).value,colors:[],rail:{type:e.type},track:{}};"size"===e.type&&(l.track={style:{fill:"size"===e.type?this.view.getTheme().defaultColor:void 0}}),"color"===e.type&&(l.colors=s.map((function(t){return t.attrValue})));var u=this.container,c=ug(L_(r)),h=Pn(r,"title");return h&&(h=xn({text:If(n)},h)),l.container=u,l.layout=c,l.title=h,l.animateOption=Pp,this.mergeLegendCfg(l,r,"continuous")},e.prototype.getCategoryCfg=function(t,e,n,r,i){var o=this.container,a=Pn(r,"position",Rn.BOTTOM),s=hg(this.view.getTheme(),a),l=Pn(s,["marker"]),u=Pn(r,"marker"),c=ug(a),h=Pn(s,["pageNavigator"]),f=Pn(r,"pageNavigator"),d=i?function(t,e,n){return n.map((function(n,r){var i=e;Se(i)&&(i=i(n.name,r,xn({},t,n)));var o=Se(n.marker)?n.marker(n.name,r,xn({},t,n)):n.marker,a=xn({},t,i,o);return lg(a),n.marker=a,n}))}(l,u,r.items):cg(this.view,t,e,l,u),p=Pn(r,"title");p&&(p=xn({text:n?If(n):""},p));var g=Pn(r,"maxWidthRatio"),v=Pn(r,"maxHeightRatio"),y=this.getCategoryLegendSizeCfg(c,g,v);y.container=o,y.layout=c,y.items=d,y.title=p,y.animateOption=Pp,y.pageNavigator=xn({},h,f);var m=this.mergeLegendCfg(y,r,a);m.reversed&&m.items.reverse();var _=Pn(m,"maxItemWidth");return _&&_<=1&&(m.maxItemWidth=this.view.viewBBox.width*_),m},e.prototype.mergeLegendCfg=function(t,e,n){var r=n.split("-")[0],i=hg(this.view.getTheme(),r);return xn({},i,t,e)},e.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},e.prototype.getComponentById=function(t){return Oe(this.components,(function(e){return e.id===t}))},e.prototype.getCategoryLegendSizeCfg=function(t,e,n){void 0===e&&(e=.25),void 0===n&&(n=.25);var r=this.view.viewBBox,i=r.width,o=r.height;return"vertical"===t?{maxWidth:i*e,maxHeight:o}:{maxWidth:i,maxHeight:o*n}},e}(Mp),D_=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=Ln,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=ve(t,2),r=e[0],i=e[1];n.start=r,n.end=i,n.changeViewData(r,i)},n.container=n.view.getLayer(Dn.FORE).addGroup(),n.onChangeFn=On(n.onValueChange,20,{leading:!0}),n.width=0,n.view.on(Gn.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(Gn.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return ce(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(Gn.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(Gn.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),e=t.start,n=t.end;je(this.start)&&(this.start=e,this.end=n);var r=this.view.getOptions().data;this.option&&!Mn(r)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout((function(){t.view.destroyed||t.changeViewData(t.start,t.end)}),0)),this.slider){var e=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),r=ve(n,4),i=r[0];r[1],r[2];var o=r[3],a=this.slider.component.getLayoutBBox(),s=new jf(a.x,a.y,Math.min(a.width,e),a.height).expand(n),l=this.getMinMaxText(this.start,this.end),u=l.minText,c=l.maxText,h=ve(I_(this.view.viewBBox,s,Rn.BOTTOM),2);h[0];var f=h[1],d=ve(I_(this.view.coordinateBBox,s,Rn.BOTTOM),2),p=d[0];d[1],this.slider.component.update(he(he({},this.getSliderCfg()),{x:p+o,y:f+i,width:this.width,start:this.start,end:this.end,minText:u,maxText:c})),this.view.viewBBox=this.view.viewBBox.cut(s,Rn.BOTTOM)}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new of(he({container:this.container},t));return e.init(),{component:e,layer:Dn.FORE,direction:Rn.BOTTOM,type:Nn.SLIDER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var e=this.getMinMaxText(this.start,this.end),n=e.minText,r=e.maxText;t=he(he({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:r})}return this.slider.component.update(t),this.slider},e.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},e.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if(Ee(this.option)){var e=he({data:this.getData()},Pn(this.option,"trendCfg",{}));t=xn({},t,this.getThemeOptions(),this.option),t=he(he({},t),{trendCfg:e})}return t.start=Ue(Math.min(je(t.start)?0:t.start,je(t.end)?1:t.end),0,1),t.end=Ue(Math.max(je(t.start)?0:t.start,je(t.end)?1:t.end),0,1),t},e.prototype.getData=function(){var t=this.view.getOptions().data,e=ve(this.view.getYScales(),1)[0],n=this.view.getGroupScales();if(n.length){var r=n[0],i=r.field,o=r.ticks;return t.reduce((function(t,n){return n[i]===o[0]&&t.push(n[e.field]),t}),[])}return t.map((function(t){return t[e.field]||0}))},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return Pn(t,["components","slider","common"],{})},e.prototype.getMinMaxText=function(t,e){var n=this.view.getOptions().data,r=this.view.getXScale(),i=He(n,r.field);r.isLinear&&(i=i.sort());var o=i,a=Fn(n);if(!r||!a)return{};var s=Fn(o),l=Math.round(t*(s-1)),u=Math.round(e*(s-1)),c=Pn(o,[l]),h=Pn(o,[u]),f=this.getSliderCfg().formatter;return f&&(c=f(c,n[l],l),h=f(h,n[u],u)),{minText:c,maxText:h}},e.prototype.changeViewData=function(t,e){var n=this.view.getOptions().data,r=this.view.getXScale(),i=Fn(n);if(r&&i){var o=He(n,r.field),a=this.view.getXScale().isLinear?o.sort((function(t,e){return Number(t)-Number(e)})):o,s=Fn(a),l=Math.round(t*(s-1)),u=Math.round(e*(s-1));this.view.filter(r.field,(function(t,e){var n=a.indexOf(t);return!(n>-1)||wf(n,l,u)})),this.view.render(!0)}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},e}(Mp),R_=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=Ln,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=t.ratio,r=n.getValidScrollbarCfg().animate;n.ratio=Ue(e,0,1);var i=n.view.getOptions().animate;r||n.view.animate(!1),n.changeViewData(n.getScrollRange(),!0),n.view.animate(i)},n.container=n.view.getLayer(Dn.FORE).addGroup(),n.onChangeFn=On(n.onValueChange,20,{leading:!0}),n.trackLen=0,n.thumbLen=0,n.ratio=0,n.view.on(Gn.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(Gn.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return ce(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(Gn.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(Gn.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout((function(){t.view.destroyed||t.changeViewData(t.getScrollRange(),!0)}))),this.scrollbar){var e=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),r=this.scrollbar.component.getLayoutBBox(),i=new jf(r.x,r.y,Math.min(r.width,e),r.height).expand(n),o=this.getScrollbarComponentCfg(),a=void 0,s=void 0;if(o.isHorizontal){var l=ve(I_(this.view.viewBBox,i,Rn.BOTTOM),2);l[0];var u=l[1],c=ve(I_(this.view.coordinateBBox,i,Rn.BOTTOM),2),h=c[0];c[1],a=h,s=u}else{var f=ve(I_(this.view.viewBBox,i,Rn.RIGHT),2);f[0];u=f[1];var d=ve(I_(this.view.viewBBox,i,Rn.RIGHT),2);h=d[0];d[1],a=h,s=u}a+=n[3],s+=n[0],this.trackLen?this.scrollbar.component.update(he(he({},o),{x:a,y:s,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update(he(he({},o),{x:a,y:s})),this.view.viewBBox=this.view.viewBBox.cut(i,o.isHorizontal?Rn.BOTTOM:Rn.RIGHT)}},e.prototype.update=function(){this.render()},e.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},e.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},e.prototype.setValue=function(t){this.onValueChange({ratio:t})},e.prototype.getValue=function(){return this.ratio},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return Pn(t,["components","scrollbar","common"],{})},e.prototype.getScrollbarTheme=function(t){var e=Pn(this.view.getTheme(),["components","scrollbar"]),n=t||{},r=n.thumbHighlightColor,i=fe(n,["thumbHighlightColor"]);return{default:xn({},Pn(e,["default","style"],{}),i),hover:xn({},Pn(e,["hover","style"],{}),{thumbColor:r})}},e.prototype.measureScrollbar=function(){var t=this.view.getXScale(),e=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),r=n.trackLen,i=n.thumbLen;this.trackLen=r,this.thumbLen=i,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=e},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*Ue(this.ratio,0,1));return[t,Math.min(t+this.step-1,this.cnt-1)]},e.prototype.changeViewData=function(t,e){var n=this,r=ve(t,2),i=r[0],o=r[1],a="vertical"!==this.getValidScrollbarCfg().type,s=He(this.data,this.xScaleCfg.field),l=this.view.getXScale().isLinear?s.sort((function(t,e){return Number(t)-Number(e)})):s,u=a?l:l.reverse();this.yScalesCfg.forEach((function(t){n.view.scale(t.field,{formatter:t.formatter,type:t.type,min:t.min,max:t.max,tickMethod:t.tickMethod})})),this.view.filter(this.xScaleCfg.field,(function(t){var e=u.indexOf(t);return!(e>-1)||wf(e,i,o)})),this.view.render(!0)},e.prototype.createScrollbar=function(){var t="vertical"!==this.getValidScrollbarCfg().type,e=new sf(he(he({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return e.init(),{component:e,layer:Dn.FORE,direction:t?Rn.BOTTOM:Rn.RIGHT,type:Nn.SCROLLBAR}},e.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),e=this.trackLen?he(he({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):he({},t);return this.scrollbar.component.update(e),this.scrollbar},e.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,e=this.getValidScrollbarCfg(),n=e.type,r=e.categorySize,i="vertical"!==n;return Math.floor((i?t.width:t.height)/r)},e.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),e=this.getScrollbarData();return Fn(He(e,t.field))},e.prototype.getScrollbarComponentCfg=function(){var t=this.view,e=t.coordinateBBox,n=t.viewBBox,r=this.getValidScrollbarCfg(),i=r.type,o=r.padding,a=r.width,s=r.height,l=r.style,u="vertical"!==i,c=ve(o,4),h=c[0],f=c[1],d=c[2],p=c[3],g=u?{x:e.minX+p,y:n.maxY-s-d}:{x:n.maxX-a-f,y:e.minY+h},v=this.getStep(),y=this.getCnt(),m=u?e.width-p-f:e.height-h-d,_=Math.max(m*Ue(v/y,0,1),20);return he(he({},this.getThemeOptions()),{x:g.x,y:g.y,size:u?s:a,isHorizontal:u,trackLen:m,thumbLen:_,thumbOffset:0,theme:this.getScrollbarTheme(l)})},e.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:32,width:8,height:8,padding:[0,0,0,0],animate:!0,style:{}};return Ee(this.option)&&(t=he(he({},t),this.option)),Ee(this.option)&&this.option.padding||(t.padding=(t.type,[0,0,0,0])),t},e.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),e=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&"vertical"===e.type&&(n=me([],ve(n),!1).reverse()),n},e}(Mp),N_={fill:"#CCD6EC",opacity:.3};function z_(t,e,n){var r,i,o,a,s,l,u=function(t,e,n){var r,i,o=up(t,e,n);try{for(var a=ge(t.views),s=a.next();!s.done;s=a.next()){var l=s.value;o=o.concat(up(l,e,n))}}catch(u){r={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}(t,e,n);if(u.length){u=Ie(u);try{for(var c=ge(u),h=c.next();!h.done;h=c.next()){var f=h.value;try{for(var d=(o=void 0,ge(f)),p=d.next();!p.done;p=d.next()){var g=p.value,v=g.mappingData,y=v.x,m=v.y;g.x=Ce(y)?y[y.length-1]:y,g.y=Ce(m)?m[m.length-1]:m}}catch(j){o={error:j}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}}}catch(C){r={error:C}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}if(!1===n.shared&&u.length>1){var _=u[0],x=Math.abs(e.y-_[0].y);try{for(var b=ge(u),w=b.next();!w.done;w=b.next()){var M=w.value,S=Math.abs(e.y-M[0].y);S<=x&&(_=M,x=S)}}catch(E){s={error:E}}finally{try{w&&!w.done&&(l=b.return)&&l.call(b)}finally{if(s)throw s.error}}u=[_]}return ze(Ie(u))}return[]}var H_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.show=function(t){var e=this.context.view,n=this.context.event,r=e.getController("tooltip").getTooltipCfg(),i=z_(e,{x:n.x,y:n.y},r);if(!jn(i,this.items)&&(this.items=i,i.length)){var o=e.getXScale().field,a=i[0].data[o],s=[];if(Pe(e.geometries,(function(t){if("interval"===t.type||"schema"===t.type){var e=t.getElementsBy((function(t){return t.getData()[o]===a}));s=s.concat(e)}})),s.length){var l=e.getCoordinate(),u=s[0].shape.getCanvasBBox(),c=s[0].shape.getCanvasBBox(),h=u;Pe(s,(function(t){var e=t.shape.getCanvasBBox();l.isTransposed?(e.minYc.maxY&&(c=e)):(e.minXc.maxX&&(c=e)),h.x=Math.min(e.minX,h.minX),h.y=Math.min(e.minY,h.minY),h.width=Math.max(e.maxX,h.maxX)-h.x,h.height=Math.max(e.maxY,h.maxY)-h.y}));var f=e.backgroundGroup,d=e.coordinateBBox,p=void 0;if(l.isRect){var g=e.getXScale(),v=t||{},y=v.appendRatio,m=v.appendWidth;je(m)&&(y=je(y)?g.isLinear?0:.25:y,m=l.isTransposed?y*c.height:y*u.width);var _=void 0,x=void 0,b=void 0,w=void 0;l.isTransposed?(_=d.minX,x=Math.min(c.minY,u.minY)-m,b=d.width,w=h.height+2*m):(_=Math.min(u.minX,c.minX)-m,x=d.minY,b=h.width+2*m,w=d.height),p=[["M",_,x],["L",_+b,x],["L",_+b,x+w],["L",_,x+w],["Z"]]}else{var M=Ge(s),S=Ye(s),j=xf(M.getModel(),l).startAngle,C=xf(S.getModel(),l).endAngle,E=l.getCenter(),P=l.getRadius(),T=l.innerRadius*P;p=mf(E.x,E.y,P,j,C,T)}if(this.regionPath)this.regionPath.attr("path",p),this.regionPath.show();else{var k=Pn(t,"style",N_);this.regionPath=f.addShape({type:"path",name:"active-region",capture:!1,attrs:he(he({},k),{path:p})})}}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),t.prototype.destroy.call(this)},e}(Uf),G_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return ce(e,t),e.prototype.show=function(){var t=this.context,e=t.event,n=t.view;if(!n.isTooltipLocked()){var r=this.timeStamp,i=+new Date;if(i-r>Pn(t.view.getOptions(),"tooltip.showDelay",16)){var o=this.location,a={x:e.x,y:e.y};o&&jn(o,a)||this.showTooltip(n,a),this.timeStamp=i,this.location=a}}},e.prototype.hide=function(){var t=this.context.view,e=t.getController("tooltip"),n=this.context.event,r=n.clientX,i=n.clientY;e.isCursorEntered({x:r,y:i})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},e.prototype.showTooltip=function(t,e){t.showTooltip(e)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(Uf),Y_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.showTooltip=function(t,e){Pe(wd(t),(function(n){var r=Md(t,n,e);n.showTooltip(r)}))},e.prototype.hideTooltip=function(t){Pe(wd(t),(function(t){t.hideTooltip()}))},e}(G_),V_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return ce(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.show=function(){var t=this.context.event,e=this.timeStamp,n=+new Date;if(n-e>16){var r=this.location,i={x:t.x,y:t.y};r&&jn(r,i)||this.showTooltip(i),this.timeStamp=n,this.location=i}},e.prototype.hide=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context.event.target;if(e&&e.get("tip")){this.tooltip||this.renderTooltip();var n=e.get("tip");this.tooltip.update(he({title:n},t)),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=this.context.view,n=e.canvas,r={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},i=e.getTheme(),o=Pn(i,["components","tooltip","domStyles"],{}),a=new pf({parent:n.get("el").parentNode,region:r,visible:!1,crosshairs:null,domStyles:he({},xn({},o,(t={},t[Oh]={"max-width":"50%"},t[Ih]={"word-break":"break-all"},t)))});a.init(),a.setCapture(!1),this.tooltip=a},e}(Uf),X_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e}return ce(e,t),e.prototype.hasState=function(t){return t.hasState(this.stateName)},e.prototype.setElementState=function(t,e){t.setState(this.stateName,e)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},e.prototype.clearViewState=function(t){var e=this;Pe(gd(t,this.stateName),(function(t){e.setElementState(t,!1)}))},e}(Uf);function q_(t){return Pn(t.get("delegateObject"),"item")}var W_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreListItemStates=["unchecked"],e}return ce(e,t),e.prototype.isItemIgnore=function(t,e){return!!this.ignoreListItemStates.filter((function(n){return e.hasState(t,n)})).length},e.prototype.setStateByComponent=function(t,e,n){var r=this.context.view,i=t.get("field"),o=pd(r);this.setElementsStateByItem(o,i,e,n)},e.prototype.setStateByElement=function(t,e){this.setElementState(t,e)},e.prototype.isMathItem=function(t,e,n){var r=jd(this.context.view,e),i=vd(t,e);return!je(i)&&n.name===r.getText(i)},e.prototype.setElementsStateByItem=function(t,e,n,r){var i=this;Pe(t,(function(t){i.isMathItem(t,e,n)&&t.setState(i.stateName,r)}))},e.prototype.setStateEnable=function(t){var e=ad(this.context);if(e)ld(this.context)&&this.setStateByElement(e,t);else{var n=sd(this.context);if(ud(n)){var r=n.item,i=n.component;if(r&&i&&!this.isItemIgnore(r,i)){var o=this.context.event.gEvent;if(o&&o.fromShape&&o.toShape&&q_(o.fromShape)===q_(o.toShape))return;this.setStateByComponent(i,r,t)}}}},e.prototype.toggle=function(){var t=ad(this.context);if(t){var e=t.hasState(this.stateName);this.setElementState(t,!e)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(X_),U_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return ce(e,t),e.prototype.active=function(){this.setState()},e}(W_),Z_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache={},e}return ce(e,t),e.prototype.getColorScale=function(t,e){var n=e.geometry.getAttribute("color");return n?t.getScaleByField(n.getFields()[0]):null},e.prototype.getLinkPath=function(t,e){var n=this.context.view.getCoordinate().isTransposed,r=t.shape.getCanvasBBox(),i=e.shape.getCanvasBBox();return n?[["M",r.minX,r.minY],["L",i.minX,i.maxY],["L",i.maxX,i.maxY],["L",r.maxX,r.minY],["Z"]]:[["M",r.maxX,r.minY],["L",i.minX,i.minY],["L",i.minX,i.maxY],["L",r.maxX,r.maxY],["Z"]]},e.prototype.addLinkShape=function(t,e,n,r){var i={opacity:.4,fill:e.shape.attr("fill")};t.addShape({type:"path",attrs:he(he({},xn({},i,Se(r)?r(i,e):r)),{path:this.getLinkPath(e,n)})})},e.prototype.linkByElement=function(t,e){var n=this,r=this.context.view,i=this.getColorScale(r,t);if(i){var o=vd(t,i.field);if(!this.cache[o]){var a=function(t,e,n){return pd(t).filter((function(t){return vd(t,e)===n}))}(r,i.field,o),s=this.linkGroup.addGroup();this.cache[o]=s;var l=a.length;Pe(a,(function(t,r){if(r=0}),e)},e}(K_),hx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return ce(e,t),e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,e){rx(pd(this.context.view),(function(e){return t===e}),e)},e.prototype.clear=function(){nx(this.context.view)},e}($_),fx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return ce(e,t),e.prototype.selected=function(){this.setState()},e}(K_),dx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return ce(e,t),e.prototype.selected=function(){this.setState()},e}(W_),px=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return ce(e,t),e.prototype.selected=function(){this.setState()},e}($_),gx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e.ignoreItemStates=[],e}return ce(e,t),e.prototype.getTriggerListInfo=function(){var t=sd(this.context),e=null;return ud(t)&&(e={item:t.item,list:t.component}),e},e.prototype.getAllowComponents=function(){var t=this,e=_d(this.context.view),n=[];return Pe(e,(function(e){e.isList()&&t.allowSetStateByElement(e)&&n.push(e)})),n},e.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this;Pe(this.getAllowComponents(),(function(e){e.clearItemsState(t.stateName)}))},e.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(-1===this.cfg.componentNames.indexOf(n))return!1}var r=jd(this.context.view,e);return r&&r.isCategory},e.prototype.allowSetStateByItem=function(t,e){var n=this.ignoreItemStates;return!n.length||0===n.filter((function(n){return e.hasState(t,n)})).length},e.prototype.setStateByElement=function(t,e,n){var r=t.get("field"),i=jd(this.context.view,r),o=vd(e,r),a=i.getText(o);this.setItemsState(t,a,n)},e.prototype.setStateEnable=function(t){var e=this,n=ad(this.context);if(n){Pe(this.getAllowComponents(),(function(r){e.setStateByElement(r,n,t)}))}else{var r=sd(this.context);if(ud(r)){var i=r.item,o=r.component;this.allowSetStateByElement(o)&&this.allowSetStateByItem(i,o)&&this.setItemState(o,i,t)}}},e.prototype.setItemsState=function(t,e,n){var r=this;Pe(t.getItems(),(function(i){i.name===e&&r.setItemState(t,i,n)}))},e.prototype.setItemState=function(t,e,n){t.setItemState(e,this.stateName,n)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,r=this.hasState(e,n);this.setItemState(e,n,!r)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(Uf),vx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return ce(e,t),e.prototype.active=function(){this.setState()},e}(gx),yx="inactive",mx="active";var _x="inactive",xx="active",bx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName=xx,e.ignoreItemStates=["unchecked"],e}return ce(e,t),e.prototype.setItemsState=function(t,e,n){this.setHighlightBy(t,(function(t){return t.name===e}),n)},e.prototype.setItemState=function(t,e,n){t.getItems(),this.setHighlightBy(t,(function(t){return t===e}),n)},e.prototype.setHighlightBy=function(t,e,n){var r=t.getItems();if(n)Pe(r,(function(n){e(n)?(t.hasState(n,_x)&&t.setItemState(n,_x,!1),t.setItemState(n,xx,!0)):t.hasState(n,xx)||t.setItemState(n,_x,!0)}));else{var i=t.getItemsByState(xx),o=!0;Pe(i,(function(t){if(!e(t))return o=!1,!1})),o?this.clear():Pe(r,(function(n){e(n)&&(t.hasState(n,xx)&&t.setItemState(n,xx,!1),t.setItemState(n,_x,!0))}))}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t,e=this.getTriggerListInfo();e?Pe((t=e.list).getItems(),(function(e){t.hasState(e,mx)&&t.setItemState(e,mx,!1),t.hasState(e,yx)&&t.setItemState(e,yx,!1)})):Pe(this.getAllowComponents(),(function(t){t.clearItemsState(xx),t.clearItemsState(_x)}))},e}(gx),wx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return ce(e,t),e.prototype.selected=function(){this.setState()},e}(gx),Mx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="unchecked",e}return ce(e,t),e.prototype.unchecked=function(){this.setState()},e}(gx),Sx="unchecked",jx="checked",Cx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName=jx,e}return ce(e,t),e.prototype.setItemState=function(t,e,n){this.setCheckedBy(t,(function(t){return t===e}),n)},e.prototype.setCheckedBy=function(t,e,n){var r=t.getItems();n&&Pe(r,(function(n){e(n)?(t.hasState(n,Sx)&&t.setItemState(n,Sx,!1),t.setItemState(n,jx,!0)):t.hasState(n,jx)||t.setItemState(n,Sx,!0)}))},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item;!Ve(e.getItems(),(function(t){return e.hasState(t,Sx)}))||e.hasState(n,Sx)?this.setItemState(e,n,!0):this.reset()}},e.prototype.checked=function(){this.setState()},e.prototype.reset=function(){Pe(this.getAllowComponents(),(function(t){t.clearItemsState(jx),t.clearItemsState(Sx)}))},e}(gx),Ex="unchecked",Px=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.toggle=function(){var t,e,n,r,i,o,a,s,l=this.getTriggerListInfo();if(null==l?void 0:l.item){var u=l.list,c=l.item,h=u.getItems(),f=h.filter((function(t){return!u.hasState(t,Ex)})),d=h.filter((function(t){return u.hasState(t,Ex)})),p=f[0];if(h.length===f.length)try{for(var g=ge(h),v=g.next();!v.done;v=g.next()){var y=v.value;u.setItemState(y,Ex,y.id!==c.id)}}catch(S){t={error:S}}finally{try{v&&!v.done&&(e=g.return)&&e.call(g)}finally{if(t)throw t.error}}else if(h.length-d.length==1)if(p.id===c.id)try{for(var m=ge(h),_=m.next();!_.done;_=m.next()){y=_.value;u.setItemState(y,Ex,!1)}}catch(j){n={error:j}}finally{try{_&&!_.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}else try{for(var x=ge(h),b=x.next();!b.done;b=x.next()){y=b.value;u.setItemState(y,Ex,y.id!==c.id)}}catch(C){i={error:C}}finally{try{b&&!b.done&&(o=x.return)&&o.call(x)}finally{if(i)throw i.error}}else try{for(var w=ge(h),M=w.next();!M.done;M=w.next()){y=M.value;u.setItemState(y,Ex,y.id!==c.id)}}catch(E){a={error:E}}finally{try{M&&!M.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}}},e}(gx),Tx="showRadio",kx="legend-radio-tip",Ax=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return ce(e,t),e.prototype.show=function(){var t=this.getTriggerListInfo();if(null==t?void 0:t.item){var e=t.list,n=t.item;e.setItemState(n,Tx,!0)}},e.prototype.hide=function(){var t=this.getTriggerListInfo();if(null==t?void 0:t.item){var e=t.list,n=t.item;e.setItemState(n,Tx,!1)}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.showTip=function(){var t=this.context.event,e=this.timeStamp,n=+new Date,r=this.context.event.target;if(n-e>16&&"legend-item-radio"===r.get("name")){var i=this.location,o={x:t.x,y:t.y};this.timeStamp=n,this.location=o,i&&jn(i,o)||this.showTooltip(o)}},e.prototype.hideTip=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context,n=e.event.target;if(n&&n.get("tip")){this.tooltip||this.renderTooltip();var r=e.view.getCanvas().get("el").getBoundingClientRect(),i=r.x,o=r.y;this.tooltip.update(he(he({title:n.get("tip")},t),{x:t.x+i,y:t.y+o})),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=((t={})[Oh]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[Ih]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(kx)&&document.body.removeChild(document.getElementById(kx));var n=new pf({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:e,containerId:kx});n.init(),n.setCapture(!1),this.tooltip=n},e}(gx),Ox=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskShape=null,e.points=[],e.starting=!1,e.moving=!1,e.preMovePoint=null,e.shapeType="path",e}return ce(e,t),e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var e="mask:".concat(t),n=this.context.view,r=this.context.event;n.emit(e,{target:this.maskShape,shape:this.maskShape,points:this.points,x:r.x,y:r.y})},e.prototype.createMask=function(){var t=this.context.view,e=this.getMaskAttrs();return t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:he({fill:"#C5D4EB",opacity:.3},e)})},e.prototype.getMaskPath=function(){return[]},e.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},e.prototype.start=function(t){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(null==t?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},e.prototype.move=function(){if(this.moving&&this.maskShape){var t=this.getCurrentPoint(),e=this.preMovePoint,n=t.x-e.x,r=t.y-e.y;Pe(this.points,(function(t){t.x+=n,t.y+=r})),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},e.prototype.updateMask=function(t){var e=xn({},this.getMaskAttrs(),t);this.maskShape.attr(e)},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},e.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},e.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},e.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,t.prototype.destroy.call(this)},e}(Uf),Ix=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e}return ce(e,t),e.prototype.getMaskAttrs=function(){var t=this.points,e=Ye(this.points),n=0,r=0,i=0;if(t.length){var o=t[0];n=xd(o,e)/2,r=(e.x+o.x)/2,i=(e.y+o.y)/2}return{x:r,y:i,r:n}},e}(Ox),Bx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return ce(e,t),e.prototype.getRegion=function(){var t=this.points;return{start:Ge(t),end:Ye(t)}},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),e=t.start,n=t.end;return{x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}},e}(Ox);function Lx(t){t.x=Ue(t.x,0,1),t.y=Ue(t.y,0,1)}var Fx,Dx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return ce(e,t),e.prototype.getRegion=function(){var t=null,e=null,n=this.points,r=this.dim,i=this.context.view.getCoordinate(),o=i.invert(Ge(n)),a=i.invert(Ye(n));return this.inPlot&&(Lx(o),Lx(a)),"x"===r?(t=i.convert({x:o.x,y:0}),e=i.convert({x:a.x,y:1})):(t=i.convert({x:0,y:o.y}),e=i.convert({x:1,y:a.y})),{start:t,end:e}},e}(Bx),Rx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getMaskPath=function(){var t=this.points,e=[];return t.length&&(Pe(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e.push(["L",t[0].x,t[0].y])),e},e.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},e.prototype.addPoint=function(){this.resize()},e}(Ox),Nx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getMaskPath=function(){return function(t,e){if(t.length<=2)return nd(t,!1);var n=t[0],r=[];Pe(t,(function(t){r.push(t.x),r.push(t.y)}));var i=ed(r,e,null);return i.unshift(["M",n.x,n.y]),i}(this.points,!0)},e}(Rx),zx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.setCursor=function(t){this.context.view.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e.prototype.zoomIn=function(){this.setCursor("zoom-in")},e.prototype.zoomOut=function(){this.setCursor("zoom-out")},e}(Uf),Hx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.filterView=function(t,e,n){var r=this;t.getScaleByField(e)&&t.filter(e,n),t.views&&t.views.length&&Pe(t.views,(function(t){r.filterView(t,e,n)}))},e.prototype.filter=function(){var t=sd(this.context);if(t){var e=this.context.view,n=t.component,r=n.get("field");if(ud(t)){if(r){var i=n.getItemsByState("unchecked"),o=jd(e,r),a=i.map((function(t){return t.name}));a.length?this.filterView(e,r,(function(t){var e=o.getText(t);return!a.includes(e)})):this.filterView(e,r,null),e.render(!0)}}else if(cd(t)){var s=ve(n.getValue(),2),l=s[0],u=s[1];this.filterView(e,r,(function(t){return t>=l&&t<=u})),e.render(!0)}}},e}(Uf);function Gx(t,e,n,r){var i=Math.min(n[e],r[e]),o=Math.max(n[e],r[e]),a=ve(t.range,2),s=a[0],l=a[1];if(il&&(o=l),i===l&&o===l)return null;var u=t.invert(i),c=t.invert(o);if(t.isCategory){var h=t.values.indexOf(u),f=t.values.indexOf(c),d=t.values.slice(h,f+1);return function(t){return d.includes(t)}}return function(t){return t>=u&&t<=c}}!function(t){t.FILTER="brush-filter-processing",t.RESET="brush-filter-reset",t.BEFORE_FILTER="brush-filter:beforefilter",t.AFTER_FILTER="brush-filter:afterfilter",t.BEFORE_RESET="brush-filter:beforereset",t.AFTER_RESET="brush-filter:afterreset"}(Fx||(Fx={}));var Yx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return ce(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,e;if(hd(this.context)){var n=this.context.event.target.getCanvasBBox();t={x:n.x,y:n.y},e={x:n.maxX,y:n.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var r=this.context,i=r.view,o={view:i,event:r.event,dims:this.dims};i.emit(Fx.BEFORE_FILTER,pp.fromData(i,Fx.BEFORE_FILTER,o));var a=i.getCoordinate(),s=a.invert(e),l=a.invert(t);if(this.hasDim("x")){var u=i.getXScale(),c=Gx(u,"x",s,l);this.filterView(i,u.field,c)}if(this.hasDim("y")){var h=i.getYScales()[0];c=Gx(h,"y",s,l);this.filterView(i,h.field,c)}this.reRender(i,{source:Fx.FILTER}),i.emit(Fx.AFTER_FILTER,pp.fromData(i,Fx.AFTER_FILTER,o))}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(t.emit(Fx.BEFORE_RESET,pp.fromData(t,Fx.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:Fx.RESET}),t.emit(Fx.AFTER_RESET,pp.fromData(t,Fx.AFTER_RESET,{}))},e.prototype.filterView=function(t,e,n){t.filter(e,n)},e.prototype.reRender=function(t,e){t.render(!0,e)},e}(Uf),Vx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.filterView=function(t,e,n){Pe(wd(t),(function(t){t.filter(e,n)}))},e.prototype.reRender=function(t){Pe(wd(t),(function(t){t.render(!0)}))},e}(Yx),Xx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.filter=function(){var t=sd(this.context),e=this.context.view,n=pd(e);if(hd(this.context)){var r=fd(this.context,10);r&&Pe(n,(function(t){r.includes(t)?t.show():t.hide()}))}else if(t){var i=t.component,o=i.get("field");if(ud(t)){if(o){var a=i.getItemsByState("unchecked"),s=jd(e,o),l=a.map((function(t){return t.name}));Pe(n,(function(t){var e=vd(t,o),n=s.getText(e);l.indexOf(n)>=0?t.hide():t.show()}))}}else if(cd(t)){var u=ve(i.getValue(),2),c=u[0],h=u[1];Pe(n,(function(t){var e=vd(t,o);e>=c&&e<=h?t.show():t.hide()}))}}},e.prototype.clear=function(){Pe(pd(this.context.view),(function(t){t.show()}))},e.prototype.reset=function(){this.clear()},e}(Uf),qx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return ce(e,t),e.prototype.filter=function(){hd(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=fd(this.context,10);if(e){var n=t.getXScale().field,r=t.getYScales()[0].field,i=e.map((function(t){return t.getModel().data}));Pe(wd(t),(function(t){Pe(pd(t),(function(t){var e=t.getModel().data;Sd(i,e,n,r)?t.show():t.hide()}))}))}},e.prototype.filterByBBox=function(){var t=this;Pe(wd(this.context.view),(function(e){var n=dd(t.context,e,10),r=pd(e);n&&Pe(r,(function(t){n.includes(t)?t.show():t.hide()}))}))},e.prototype.reset=function(){Pe(wd(this.context.view),(function(t){Pe(pd(t),(function(t){t.show()}))}))},e}(Uf),Wx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return ce(e,t),e.prototype.getButtonCfg=function(){return xn(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:he({text:t.text},t.textStyle)}).getBBox(),r=cp(t.padding),i=e.addShape({type:"rect",name:"button-rect",attrs:he({x:n.x-r[3],y:n.y-r[0],width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},t.style)});i.toBack(),e.on("mouseenter",(function(){i.attr(t.activeStyle)})),e.on("mouseleave",(function(){i.attr(t.style)})),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view.getCoordinate().convert({x:1,y:1}),e=this.buttonGroup,n=e.getBBox(),r=Ci(null,[["t",t.x-n.width-10,t.y+n.height+5]]);e.setMatrix(r)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(Uf),Ux=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return ce(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):xd(t,this.startPoint)>4&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(Uf),Zx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return ce(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint();if(xd(t,e)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var n=this.context.view,r=Ci(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);n.backgroundGroup.setMatrix(r),n.foregroundGroup.setMatrix(r),n.middleGroup.setMatrix(r)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(Uf),Kx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return ce(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},e}(Uf),Qx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return ce(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0,Pe(this.dims,(function(e){var n=t.getScale(e),r=n.min,i=n.max,o=n.values;t.startCache[e]={min:r,max:i,values:o}}))},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),r=this.context.getCurrentPoint(),i=n.invert(e),o=n.invert(r),a=o.x-i.x,s=o.y-i.y,l=this.context.view;Pe(this.dims,(function(e){t.translateDim(e,{x:-1*a,y:-1*s})})),l.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},e.prototype.translateLinear=function(t,e,n){var r=this.context.view,i=this.startCache[t],o=i.min,a=i.max,s=a-o,l=n[t]*s;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:o,max:a}),r.scale(e.field,{nice:!1,min:o+l,max:a+l})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(Kx),$x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return ce(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this;Pe(this.dims,(function(n){e.zoomDim(n,t)})),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},e.prototype.zoomLinear=function(t,e,n){var r=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var i=this.cacheScaleDefs[t],o=i.max-i.min,a=e.min,s=e.max,l=n*o,u=a-l,c=s+l,h=(c-u)/o;c>u&&h<100&&h>.01&&r.scale(e.field,{nice:!1,min:a-l,max:s+l})},e}(Kx);var Jx,tb,eb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.scroll=function(t){var e=this.context,n=e.view,r=e.event;if(n.getOptions().scrollbar){var i=(null==t?void 0:t.wheelDelta)||1,o=n.getController("scrollbar"),a=n.getXScale(),s=n.getOptions().data,l=Fn(He(s,a.field)),u=Fn(a.values),c=o.getValue(),h=Math.floor((l-u)*c)+(function(t){return t.gEvent.originalEvent.deltaY>0}(r)?i:-i),f=Ue(h/(l-u)+i/(l-u)/1e4,0,1);o.setValue(f)}},e}(Uf),nb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.show=function(){var t=this.context,e=sd(t).axis.cfg.title,n=e.description,r=e.text,i=e.descriptionTooltipStyle,o=t.event,a=o.x,s=o.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:r||"",customContent:function(){return'\n
    \n
    \n 字段说明:').concat(n,"\n
    \n
    \n ")},x:a,y:s}),this.tooltip.show()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=this.context.view.canvas,n={start:{x:0,y:0},end:{x:e.get("width"),y:e.get("height")}},r=new pf({parent:e.get("el").parentNode,region:n,visible:!1,containerId:"aixs-description-tooltip",domStyles:he({},xn({},(t={},t[Oh]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[Ih]={"word-break":"break-all","margin-bottom":"3px"},t)))});r.init(),r.setCapture(!1),this.tooltip=r},e}(Uf);function rb(t){return t.isInPlot()}function ib(t){return t.gEvent.preventDefault(),t.gEvent.originalEvent.deltaY>0}Jx="dark",tb=Nd(Fg),Jd[on(Jx)]=$d(tb),nr("canvas",ry),nr("svg",rm),bp("Polygon",Mm),bp("Interval",mm),bp("Schema",Sm),bp("Path",im),bp("Point",wm),bp("Line",_m),bp("Area",lm),bp("Edge",um),bp("Heatmap",cm),bp("Violin",jm),Dp("base",ig),Dp("interval",Lm),Dp("pie",Rm),Dp("polar",Dm),Rp("overlap",(function(t,e,n,r){var i=new zm;Pe(e,(function(t){for(var e=t.find((function(t){return"text"===t.get("type")})),n=e.attr(),r=n.x,o=n.y,a=!1,s=0;s<=8;s++){var l=Hm(e,r,o,s);if(i.hasGap(l)){i.fillGap(l),a=!0;break}}a||t.remove(!0)})),i.destroy()})),Rp("distribute",(function(t,e,n,r){if(t.length&&e.length){var i=t[0]?t[0].offset:0,o=e[0].get("coordinate"),a=o.getRadius(),s=o.getCenter();if(i>0){var l=2*(a+i)+28,u={start:o.start,end:o.end},c=[[],[]];t.forEach((function(t){t&&("right"===t.textAlign?c[0].push(t):c[1].push(t))})),c.forEach((function(t,n){var r=l/14;t.length>r&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(r,t.length-r)),t.sort((function(t,e){return t.y-e.y})),function(t,e,n,r,i,o){var a,s,l,u=!0,c=r.start,h=r.end,f=Math.min(c.y,h.y),d=Math.abs(c.y-h.y),p=0,g=Number.MIN_VALUE,v=e.map((function(t){return t.y>p&&(p=t.y),t.yd&&(d=p-f);u;)for(v.forEach((function(t){var e=(Math.min.apply(g,t.targets)+Math.max.apply(g,t.targets))/2;t.pos=Math.min(Math.max(g,e-t.size/2),d-t.size)})),u=!1,l=v.length;l--;)if(l>0){var y=v[l-1],m=v[l];y.pos+y.size>m.pos&&(y.size+=m.size,y.targets=y.targets.concat(m.targets),y.pos+y.size>d&&(y.pos=d-y.size),v.splice(l,1),u=!0)}l=0,v.forEach((function(t){var r=f+n/2;t.targets.forEach((function(){e[l].y=t.pos+r,r+=n,l++}))}));var _={};try{for(var x=ge(t),b=x.next();!b.done;b=x.next()){var w=b.value;_[w.get("id")]=w}}catch(M){a={error:M}}finally{try{b&&!b.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}e.forEach((function(t){var e=t.r*t.r,n=Math.pow(Math.abs(t.y-i.y),2);if(ei.maxX||r.maxY>i.maxY)&&t.remove(!0)}))})),Rp("limit-in-canvas",(function(t,e,n,r){Pe(e,(function(t){var e=r.minX,n=r.minY,i=r.maxX,o=r.maxY,a=t.getCanvasBBox(),s=a.minX,l=a.minY,u=a.maxX,c=a.maxY,h=a.x,f=a.y,d=a.width,p=a.height,g=h,v=f;(si?g=i-d:u>i&&(g-=u-i),l>o?v=o-p:c>o&&(v-=c-o),g===h&&v===f||Kp(t,g-h,v-f)}))})),Rp("limit-in-plot",(function(t,e,n,r,i){if(!(e.length<=0)){var o=(null==i?void 0:i.direction)||["top","right","bottom","left"],a=(null==i?void 0:i.action)||"translate",s=(null==i?void 0:i.margin)||0,l=e[0].get("coordinate");if(l){var u=function(t,e){void 0===e&&(e=0);var n=t.start,r=t.end,i=t.getWidth(),o=t.getHeight(),a=Math.min(n.x,r.x),s=Math.min(n.y,r.y);return jf.fromRange(a-e,s-e,a+i+e,s+o+e)}(l,s),c=u.minX,h=u.minY,f=u.maxX,d=u.maxY;Pe(e,(function(t){var e=t.getCanvasBBox(),n=e.minX,r=e.minY,i=e.maxX,s=e.maxY,l=e.x,u=e.y,p=e.width,g=e.height,v=l,y=u;if(o.indexOf("left")>=0&&(n=0&&(r=0&&(n>f?v=f-p:i>f&&(v-=i-f)),o.indexOf("bottom")>=0&&(r>d?y=d-g:s>d&&(y-=s-d)),v!==l||y!==u){var m=v-l;if("translate"===a)Kp(t,m,y-u);else if("ellipsis"===a){t.findAll((function(t){return"text"===t.get("type")})).forEach((function(t){var e=An(t.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),n=t.getCanvasBBox(),r=function(t,e,n){var r,i=l_("...",n);r=Ne(t)?t:rn(t);var o,a,s=e,l=[];if(l_(t,n)<=e)return t;for(;o=r.substr(0,16),!((a=l_(o,n))+i>s&&a>s);)if(l.push(o),s-=a,!(r=r.substr(16)))return l.join("");for(;o=r.substr(0,1),!((a=l_(o,n))+i>s);)if(l.push(o),s-=a,!(r=r.substr(1)))return l.join("");return"".concat(l.join(""),"...")}(t.attr("text"),n.width-Math.abs(m),e);t.attr("text",r)}))}else t.hide()}}))}}})),Rp("pie-outer",(function(t,e,n,r){var i,o,a=be(t,(function(t){return!je(t)})),s=e[0]&&e[0].get("coordinate");if(s){var l=s.getCenter(),u=s.getRadius(),c={};try{for(var h=ge(e),f=h.next();!f.done;f=h.next()){var d=f.value;c[d.get("id")]=d}}catch(M){i={error:M}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}var p=Pn(a[0],"labelHeight",14),g=Pn(a[0],"offset",0);if(!(g<=0)){var v="right",y=qe(a,(function(t){return t.xn&&(t.sort((function(t,e){return e.percent-t.percent})),Pe(t,(function(t,e){e+1>n&&(c[t.id].set("visible",!1),t.invisible=!0)}))),Nm(t,p,w)})),Pe(y,(function(t,e){Pe(t,(function(t){var n=e===v,r=c[t.id].getChildByIndex(0);if(r){var i=u+g,o=t.y-l.y,a=Math.pow(i,2),h=Math.pow(o,2),f=a-h>0?a-h:0,d=Math.sqrt(f),p=Math.abs(Math.cos(t.angle)*i);t.x=n?l.x+Math.max(d,p):l.x-Math.max(d,p)}r&&(r.attr("y",t.y),r.attr("x",t.x)),function(t,e){var n=e.getCenter(),r=e.getRadius();if(t&&t.labelLine){var i=t.angle,o=t.offset,a=yf(n.x,n.y,r,i),s=t.x+Pn(t,"offsetX",0)*(Math.cos(i)>0?1:-1),l=t.y+Pn(t,"offsetY",0)*(Math.sin(i)>0?1:-1),u={x:s-4*Math.cos(i),y:l-4*Math.sin(i)},c=t.labelLine.smooth,h=[],f=u.x-n.x,d=u.y-n.y,p=Math.atan(d/f);if(f<0&&(p+=Math.PI),!1===c){Ee(t.labelLine)||(t.labelLine={});var g=0;(i<0&&i>-Math.PI/2||i>1.5*Math.PI)&&u.y>a.y&&(g=1),i>=0&&ia.y&&(g=1),i>=Math.PI/2&&iu.y&&(g=1),(i<-Math.PI/2||i>=Math.PI&&i<1.5*Math.PI)&&a.y>u.y&&(g=1);var v=o/2>4?4:Math.max(o/2-1,0),y=yf(n.x,n.y,r+v,i),m=yf(n.x,n.y,r+o/2,p);h.push("M ".concat(a.x," ").concat(a.y)),h.push("L ".concat(y.x," ").concat(y.y)),h.push("A ".concat(n.x," ").concat(n.y," 0 ").concat(0," ").concat(g," ").concat(m.x," ").concat(m.y)),h.push("L ".concat(u.x," ").concat(u.y))}else{y=yf(n.x,n.y,r+(o/2>4?4:Math.max(o/2-1,0)),i);var _=a.xMath.pow(Math.E,-16)&&h.push.apply(h,["C",u.x+4*_,u.y,2*y.x-a.x,2*y.y-a.y,a.x,a.y]),h.push("L ".concat(a.x," ").concat(a.y))}t.labelLine.path=h.join(" ")}}(t,s)}))}))}}})),Rp("adjust-color",(function(t,e,n){if(0!==n.length){var r=n[0].get("element").geometry.theme,i=r.labels||{},o=i.fillColorLight,a=i.fillColorDark;n.forEach((function(t,n){var i=e[n].find((function(t){return"text"===t.get("type")})),s=jf.fromObject(t.getBBox()),l=jf.fromObject(i.getCanvasBBox()),u=!s.contains(l),c=function(t){var e=vl.toRGB(t).toUpperCase();if(e_[e])return e_[e];var n=ve(vl.rgb2arr(e),3);return(299*n[0]+587*n[1]+114*n[2])/1e3<128}(t.attr("fill"));u?i.attr(r.overflowLabels.style):c?o&&i.attr("fill",o):a&&i.attr("fill",a)}))}})),Rp("interval-adjust-position",(function(t,e,n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.get("element"),o=null==i?void 0:i.geometry;if(o&&"interval"===o.type)n_(o,e,n)&&n.forEach((function(t,n){var r=e[n];!function(t,e,n){var r=t.coordinate,i=jf.fromObject(n.getBBox()),o=$p(e);r.isTransposed?o.attr({x:i.minX+i.width/2,textAlign:"center"}):o.attr({y:i.minY+i.height/2,textBaseline:"middle"})}(o,r,t)}))}})),Rp("interval-hide-overlap",(function(t,e,n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.get("element"),o=null==i?void 0:i.geometry;if(o&&"interval"===o.type){var a,s=function(t){var e=[],n=Math.max(Math.floor(t.length/500),1);return Pe(t,(function(t,r){r%n==0?e.push(t):t.set("visible",!1)})),e}(e),l=ve(o.getXYFields(),1)[0],u=[],c=[],h=qe(s,(function(t){return t.get("data")[l]})),f=ze(Cn(s,(function(t){return t.get("data")[l]})));s.forEach((function(t){t.set("visible",!0)}));var d=function(t){t&&(t.length&&c.push(t.pop()),c.push.apply(c,me([],ve(t),!1)))};for(Fn(f)>0&&(a=f.shift(),d(h[a])),Fn(f)>0&&(a=f.pop(),d(h[a])),Pe(f.reverse(),(function(t){d(h[t])}));c.length>0;){var p=c.shift();p.get("visible")&&(tg(p,u)?p.set("visible",!1):u.push(p))}}}})),Rp("point-adjust-position",(function(t,e,n,r,i){var o,a;if(0!==n.length){var s=null===(o=n[0])||void 0===o?void 0:o.get("element"),l=null==s?void 0:s.geometry;if(l&&"point"===l.type){var u=ve(l.getXYFields(),2),c=u[0],h=u[1],f=qe(e,(function(t){return t.get("data")[c]})),d=[],p=i&&i.offset||(null===(a=t[0])||void 0===a?void 0:a.offset)||12;Cn(Te(f).reverse(),(function(t){for(var e=function(t,e){var n=t.getXYFields()[1],r=[],i=e.sort((function(t,e){return t.get("data")[n]-t.get("data")[n]}));return i.length>0&&r.push(i.shift()),i.length>0&&r.push(i.pop()),r.push.apply(r,me([],ve(i),!1)),r}(l,f[t]);e.length;){var n=e.shift(),r=$p(n);if(r_(d,n,(function(t,e){return t.get("data")[c]===e.get("data")[c]&&t.get("data")[h]===e.get("data")[h]})))r.set("visible",!1);else{var i=!1;i_(d,n)&&(r.attr("y",r.attr("y")+2*p),i=i_(d,n)),i?r.set("visible",!1):d.push(n)}}}))}}})),Rp("pie-spider",(function(t,e,n,r){var i,o,a=e[0]&&e[0].get("coordinate");if(a){var s=a.getCenter(),l=a.getRadius(),u={};try{for(var c=ge(e),h=c.next();!h.done;h=c.next()){var f=h.value;u[f.get("id")]=f}}catch(M){i={error:M}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}var d=Pn(t[0],"labelHeight",14),p=Math.max(Pn(t[0],"offset",0),4);Pe(t,(function(t){if(t&&Pn(u,[t.id])){var e=t.x>s.x||t.x===s.x&&t.y>s.y,n=je(t.offsetX)?4:t.offsetX,r=yf(s.x,s.y,l+4,t.angle),i=p+n;t.x=s.x+(e?1:-1)*(l+i),t.y=r.y}}));var g=a.start,v=a.end,y="right",m=qe(t,(function(t){return t.x_&&(_=Math.min(e,Math.abs(g.y-v.y)))}));var x={minX:g.x,maxX:v.x,minY:s.y-_/2,maxY:s.y+_/2};Pe(m,(function(t,e){var n=_/d;t.length>n&&(t.sort((function(t,e){return e.percent-t.percent})),Pe(t,(function(t,e){e>n&&(u[t.id].set("visible",!1),t.invisible=!0)}))),Nm(t,d,x)}));var b=x.minY,w=x.maxY;Pe(m,(function(t,e){var n=e===y;Pe(t,(function(t){var e=Pn(u,t&&[t.id]);if(e)if(t.yw)e.set("visible",!1);else{var r=e.getChildByIndex(0),i=r.getCanvasBBox(),o=n?i.x:i.maxX,s=i.y+i.height/2;Kp(r,t.x-o,t.y-s),t.labelLine&&function(t,e,n){var r,i=e.getCenter(),o=e.getRadius(),a={x:t.x-(n?4:-4),y:t.y},s=yf(i.x,i.y,o+4,t.angle),l={x:a.x,y:a.y},u={x:s.x,y:s.y},c=yf(i.x,i.y,o,t.angle);if(a.y!==s.y){var h=n?4:-4;l.y=a.y,t.angle<0&&t.angle>=-Math.PI/2&&(l.x=Math.max(s.x,a.x-h),a.y0&&t.angles.y?u.y=l.y:(u.y=s.y,u.x=Math.max(u.x,l.x-h))),t.angle>Math.PI/2&&(l.x=Math.min(s.x,a.x-h),a.y>s.y?u.y=l.y:(u.y=s.y,u.x=Math.min(u.x,l.x-h))),t.angle<-Math.PI/2&&(l.x=Math.min(s.x,a.x-h),a.y0&&r.push(i.shift()),i.length>0&&r.push(i.pop()),r.push.apply(r,me([],ve(i),!1)),r}(l,f[t]);e.length;){var n=e.shift(),r=$p(n);if(o_(d,n,(function(t,e){return t.get("data")[c]===e.get("data")[c]&&t.get("data")[h]===e.get("data")[h]})))r.set("visible",!1);else{var i=!1;a_(d,n)&&(r.attr("y",r.attr("y")+2*p),i=a_(d,n)),i?r.set("visible",!1):d.push(n)}}}))}}})),Ep("fade-in",(function(t,e,n){var r={fillOpacity:je(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),strokeOpacity:je(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity"),opacity:je(t.attr("opacity"))?1:t.attr("opacity")};t.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),t.animate(r,e)})),Ep("fade-out",(function(t,e,n){var r=e.easing,i=e.duration,o=e.delay;t.animate({fillOpacity:0,strokeOpacity:0,opacity:0},i,r,(function(){t.remove(!0)}),o)})),Ep("grow-in-x",(function(t,e,n){u_(t,e,n.coordinate,n.minYPoint,"x")})),Ep("grow-in-xy",(function(t,e,n){u_(t,e,n.coordinate,n.minYPoint,"xy")})),Ep("grow-in-y",(function(t,e,n){u_(t,e,n.coordinate,n.minYPoint,"y")})),Ep("scale-in-x",(function(t,e,n){var r=t.getBBox(),i=t.get("origin").mappingData.points,o=i[0].y-i[1].y>0?r.maxX:r.minX,a=(r.minY+r.maxY)/2;t.applyToMatrix([o,a,1]);var s=Ci(t.getMatrix(),[["t",-o,-a],["s",.01,1],["t",o,a]]);t.setMatrix(s),t.animate({matrix:Ci(t.getMatrix(),[["t",-o,-a],["s",100,1],["t",o,a]])},e)})),Ep("scale-in-y",(function(t,e,n){var r=t.getBBox(),i=t.get("origin").mappingData,o=(r.minX+r.maxX)/2,a=i.points,s=a[0].y-a[1].y<=0?r.maxY:r.minY;t.applyToMatrix([o,s,1]);var l=Ci(t.getMatrix(),[["t",-o,-s],["s",1,.01],["t",o,s]]);t.setMatrix(l),t.animate({matrix:Ci(t.getMatrix(),[["t",-o,-s],["s",1,100],["t",o,s]])},e)})),Ep("wave-in",(function(t,e,n){var r=Tf(n.coordinate,20),i=r.type,o=r.startState,a=r.endState,s=t.setClip({type:i,attrs:o});n.toAttrs&&t.attr(n.toAttrs),s.animate(a,he(he({},e),{callback:function(){t&&!t.get("destroyed")&&t.set("clipShape",null),s.remove(!0)}}))})),Ep("zoom-in",(function(t,e,n){d_(t,e,"zoomIn")})),Ep("zoom-out",(function(t,e,n){d_(t,e,"zoomOut")})),Ep("position-update",(function(t,e,n){var r=n.toAttrs,i=r.x,o=r.y;delete r.x,delete r.y,t.attr(r),t.animate({x:i,y:o},e)})),Ep("sector-path-update",(function(t,e,n){var r=n.toAttrs,i=n.coordinate,o=r.path||[],a=o.map((function(t){return t[0]}));if(!(o.length<1)){var s=f_(o),l=s.startAngle,u=s.endAngle,c=s.radius,h=s.innerRadius,f=f_(t.attr("path")),d=f.startAngle,p=f.endAngle,g=i.getCenter(),v=l-d,y=u-p;0!==v||0!==y?t.animate((function(t){var e=d+t*v,n=p+t*y;return he(he({},r),{path:jn(a,["M","A","A","Z"])?_f(g.x,g.y,c,e,n):mf(g.x,g.y,c,e,n,h)})}),he(he({},e),{callback:function(){t.attr("path",o)}})):t.attr("path",o)}})),Ep("path-in",(function(t,e,n){var r=t.getTotalLength();t.attr("lineDash",[r]),t.animate((function(t){return{lineDashOffset:(1-t)*r}}),e)})),Wf("rect",x_),Wf("mirror",__),Wf("list",y_),Wf("matrix",m_),Wf("circle",v_),Wf("tree",b_),fp("axis",O_),fp("legend",F_),fp("tooltip",Sp),fp("annotation",j_),fp("slider",D_),fp("scrollbar",R_),Qf("tooltip",G_),Qf("sibling-tooltip",Y_),Qf("ellipsis-text",V_),Qf("element-active",U_),Qf("element-single-active",J_),Qf("element-range-active",Q_),Qf("element-highlight",sx),Qf("element-highlight-by-x",ux),Qf("element-highlight-by-color",lx),Qf("element-single-highlight",hx),Qf("element-range-highlight",cx),Qf("element-sibling-highlight",cx,{effectSiblings:!0,effectByRecord:!0}),Qf("element-selected",dx),Qf("element-single-selected",px),Qf("element-range-selected",fx),Qf("element-link-by-color",Z_),Qf("active-region",H_),Qf("list-active",vx),Qf("list-selected",wx),Qf("list-highlight",bx),Qf("list-unchecked",Mx),Qf("list-checked",Cx),Qf("list-focus",Px),Qf("list-radio",Ax),Qf("legend-item-highlight",bx,{componentNames:["legend"]}),Qf("axis-label-highlight",bx,{componentNames:["axis"]}),Qf("axis-description",nb),Qf("rect-mask",Bx),Qf("x-rect-mask",Dx,{dim:"x"}),Qf("y-rect-mask",Dx,{dim:"y"}),Qf("circle-mask",Ix),Qf("path-mask",Rx),Qf("smooth-path-mask",Nx),Qf("cursor",zx),Qf("data-filter",Hx),Qf("brush",Yx),Qf("brush-x",Yx,{dims:["x"]}),Qf("brush-y",Yx,{dims:["y"]}),Qf("sibling-filter",Vx),Qf("sibling-x-filter",Vx),Qf("sibling-y-filter",Vx),Qf("element-filter",Xx),Qf("element-sibling-filter",qx),Qf("element-sibling-filter-record",qx,{byRecord:!0}),Qf("view-drag",Ux),Qf("view-move",Zx),Qf("scale-translate",Qx),Qf("scale-zoom",$x),Qf("reset-button",Wx,{name:"reset-button",text:"reset"}),Qf("mousewheel-scroll",eb),Dd("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),Dd("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),Dd("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Dd("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Dd("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Dd("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Dd("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Dd("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),Dd("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),Dd("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),Dd("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),Dd("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),Dd("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:rb,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:rb,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:rb,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),Dd("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),Dd("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:rb,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:rb,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:rb,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Dd("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:rb,action:"path-mask:start"},{trigger:"mousedown",isEnable:rb,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),Dd("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Dd("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(t){return!t.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),Dd("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Dd("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Dd("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),Dd("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Dd("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]}),Dd("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(t){return ib(t.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(t){return!ib(t.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Dd("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Dd("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var ob=i({props:{navigateItem:{type:String},color:{type:String}},setup:function(t,e){var r=Jt(),i=r.airValue,o=r.airStatus,a=s({airStatus:o,achart:null});T(i,(function(t,e){l()})),k((function(){a.achart&&a.achart.destroy()}));var l=function(){a.achart&&(a.achart.destroy(),console.log("allData.achart",a.achart),a.achart=null);var t=i.value||0,e=[{type:"开启",value:t},{type:"关闭",value:100-t}],n=new wp({container:"container",autoFit:!0});n.data(e),n.legend(!1),n.tooltip(!1),n.coordinate("theta",{radius:.9,innerRadius:.8});var r=n.interval().animate({appear:{easing:"easeQuadIn",delay:0,duration:1e3}}).adjust("stack").position("value").color("type",["l(90) 0:#BFA17E 1:#E0D1BB","#3C3F52"]).style({opacity:1,strokeOpacity:0,lineCap:"round"}),o='
    '.concat(e[0].value,'%
    ');n.annotation().html({position:["50%","50%"],html:o,offsetY:-43}),n.annotation().text({position:["50%","50%"],content:"空调开启率",style:{fontSize:16,fill:"#F8EDDA",fontWeight:400,textAlign:"center"},offsetY:26}),n.render(),a.achart=n,r.elements[0].setState("active",!0)};return u((function(){})),n({},c(a))}}),ab={class:"airSwitch"},sb={class:"airWrap"},lb=function(t){return _("data-v-6f8e2b6b"),t=t(),x(),t}((function(){return g("div",{class:"container",id:"container"},null,-1)})),ub={class:"air-title"};e("c",d(ob,[["render",function(t,e,n,r,i,o){return m(),p("div",ab,[g("div",sb,[lb,g("div",ub,[g("span",null,v(t.airStatus?"空调已开启":"空调已关闭"),1)])])])}],["__scopeId","data-v-6f8e2b6b"]]));var cb=i({props:{screenType:{type:String}},setup:function(t,e){var r=s({}),i=E();return u((function(){A().then((function(t){var e=t.data.data||[],n=[];e.forEach((function(t){var e=t.time||"",r=e.substr(8,2),i=e.substr(10,2);t.time=r+":"+i,t.temp=t&&t.temp?Number(t.temp).toFixed(1):t.temp,t.temp&&n.push(t.temp)}));var r=Math.floor(Math.min.apply(Math,n)),o=Math.ceil(Math.max.apply(Math,n));O((function(){!function(t,e,n){Yp("point","breath-point",{draw:function(e,n){var r=e.data,i={x:e.x,y:e.y},o=n.addGroup();return r.time===t[t.length-1].time&&r.temp===t[t.length-1].temp&&(o.addShape("circle",{attrs:{x:i.x,y:i.y,r:8,fill:"#F2E2CC"}}),o.addShape("circle",{attrs:{x:i.x,y:i.y,r:4,fill:"#ffffff",filter:"blur(2px)",opacity:.5}})),o}}),i.value&&i.value.offsetWidth,i.value&&i.value.offsetHeight;var r=i.value&&new wp({container:"tempChartBox",autoFit:!0,padding:[70,50,46,60]});r.data(t),r.scale("time",{}),r.scale("temp",{type:"linear",minTickInterval:1,min:e,max:n}),r.axis("time",{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.2)",lineDash:[3,3]}},label:{style:{fill:"#E0C29B",fontSize:12}},tickLine:null}),r.axis("temp",{tickLine:null,grid:{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.2)",lineDash:[3,3]}}},label:{style:{fill:"#E0C29B",fontSize:12}}}),r.legend(!1),r.line().animate({appear:{easing:"easeQuadIn",delay:100,duration:1500}}).position("time*temp").color("#F2E3CD").shape("smooth").tooltip(!1).style({lineWidth:3}),r.area().animate({appear:{easing:"easeQuadIn",delay:100,duration:1500}}).position("time*temp").color("l(90) 0:rgba(237,217,190,0.8) 0.6:rgb(149, 162, 194, 0.01)").tooltip(!1).shape("smooth"),r.point().tooltip(!1).position("time*temp").shape("breath-point");var o=t[t.length-1],a=l().format("YYYY.MM.DD"),s="
    \n
    ".concat(a,"").concat(o&&o.time,"
    \n
    室内温度:").concat(o&&o.temp&&Number(o.temp).toFixed(1),"℃
    ");o&&o.time&&r.annotation().html({position:o,html:s,alignX:"right",alignY:"bottom",offsetX:60,offsetY:-15}),r.annotation().text({position:function(t,e){return["0%","0%"]},content:"温度/℃",style:{fill:"#E0C29B",fontSize:"12"},offsetX:-40,offsetY:-46}),r.render()}(e,r,o)}))})).catch((function(t){}))})),n(n({},c(r)),{},{tempChartRef:i})}}),hb={class:"temChartCont"},fb={class:"subhead-title"},db=[function(t){return _("data-v-a29e2755"),t=t(),x(),t}((function(){return g("span",null,"实时温度",-1)}))],pb={id:"tempChartBox",class:"tempChartBox",ref:"tempChartRef"};e("T",d(cb,[["render",function(t,e,n,r,i,o){return m(),p("div",{class:S(["temChart",["hor"===t.screenType?"horiCompClass":"verCompClass "]])},[g("div",hb,[I(g("div",fb,db,512),[[B,"ver"===t.screenType]]),g("div",pb,null,512)])],2)}],["__scopeId","data-v-a29e2755"]]));var gb=i({props:{screenType:{type:String}},setup:function(t,e){var r=o(),i=s({widthBase:"0%",compareBase:"0%"}),a=L((function(){var t=r.lastAllEnergy,e={energyBase:t.energyBase?t.energyBase.toFixed(1):t.energyBase,energyTotal:t.energyTotal?t.energyTotal.toFixed(1):t.energyTotal,energyCompare:t.energyCompare?(100*t.energyCompare).toFixed(0):t.energyCompare};return i.compareBase=100*(1-t.energyCompare)+"%",i.widthBase="100%",e}));return r.$subscribe((function(t,e){})),u((function(){})),n(n({},c(i)),{},{lastAllComputed:a,projectStore:r})},computed:{}}),vb=function(t){return _("data-v-c2e9d3ad"),t=t(),x(),t},yb=vb((function(){return g("div",{class:"subhead-title"},[g("span",null,"上月总能耗")],-1)})),mb={class:"saveEnergy"},_b={class:"backImage"},xb={class:"value"},bb={class:"energySave"},wb={class:"textDiv"},Mb=vb((function(){return g("span",null,"项目能耗",-1)})),Sb={class:"value"},jb={class:"energyTotal"},Cb={class:"textDiv"},Eb=vb((function(){return g("span",null,"基准能耗",-1)})),Pb={class:"value"};e("b",d(gb,[["render",function(t,e,n,r,i,o){return m(),p("div",{class:S(["lastMonth",["hor"===t.screenType?"horizontalClass ":"verLastClass "]])},[yb,g("div",mb,[g("span",_b,[F("节能"),g("span",xb,v(t.lastAllComputed.energyCompare)+"%",1)])]),g("div",bb,[g("div",wb,[Mb,g("span",Sb,v(t.lastAllComputed.energyTotal)+"kWh",1)]),g("div",{class:"saveBack",style:j({width:t.compareBase})},null,4)]),g("div",jb,[g("div",Cb,[Eb,g("span",Pb,v(t.lastAllComputed.energyBase)+"kWh",1)]),g("div",{class:"totalBack",style:j({width:t.widthBase})},null,4)])],2)}],["__scopeId","data-v-c2e9d3ad"]]));var Tb=i({props:{screenType:{type:String}},setup:function(t,e){var r=E(),i=E(),l=s({videoWidth:0,videoLeft:0,doNum:function(t,e){return t?t.toFixed(e):t}}),h={},f={},d={};function p(t){window.requestAnimationFrame((function(){p(t)})),t.clearRect(0,0,800,300),t.fillStyle="#FFDEB4",t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor="#ffffff",t.shadowBlur=10,function(t,e){t.beginPath(),t.arc(h.x,h.y,e,0,2*Math.PI),t.closePath(),t.fill(),t.beginPath(),t.arc(f.x,f.y,e,0,2*Math.PI),t.closePath(),t.fill(),t.beginPath(),t.arc(d.x,d.y,e,0,2*Math.PI),t.closePath(),t.fill()}(t,3),function(t,e,n){h.x>e.x&&h.x<=t.x&&(h.x=h.x-1,h.y=h.y-1*(e.y-t.y)/(e.x-t.x));h.x>n.x&&h.x<=e.x&&(h.x=h.x-1,h.y=h.y-1*(n.y-e.y)/(n.x-e.x));h.x==n.x&&(h=t)}({x:v(173),y:v(173)},{x:v(110),y:v(120)},{x:v(20),y:v(120)}),f=g(f,{x:v(515),y:v(150)},{x:v(590),y:v(150)},{x:v(676),y:v(50)}),d=g(d,{x:v(512),y:v(210)},{x:v(670),y:v(210)},{x:v(756),y:v(250)})}function g(t,e,n,r){return t.x>=e.x&&t.x=n.x&&(t.x=t.x+1,t.y=t.y+1*(r.y-n.y)/(r.x-n.x)),t.x==r.x&&(t=e),t}function v(t){var e=D();return Number((t/192*e).toFixed(0))}u((function(){O((function(){var t=r.value.offsetHeight/692*2116,e=i.value.offsetWidth;l.videoWidth=t,l.videoLeft=(e-t)/2;var n=document.getElementById("co2Canvas");n.setAttribute("width",v(800)+"px"),n.setAttribute("height",v(300)+"px");var o=n.getContext("2d");o.moveTo(v(20),v(120)),o.lineTo(v(110),v(120)),o.lineTo(v(173),v(173)),o.lineWidth=1,o.strokeStyle="rgba(247, 230, 205, 0.4)",o.setLineDash([v(2),v(3)]),o.stroke(),o.beginPath(),o.moveTo(v(676),v(50)),o.lineTo(v(590),v(150)),o.lineTo(v(515),v(150)),o.lineWidth=1,o.strokeStyle="rgba(247, 230, 205, 0.4)",o.setLineDash([v(2),v(3)]),o.stroke(),o.beginPath(),o.moveTo(v(756),v(250)),o.lineTo(v(670),v(210)),o.lineTo(v(512),v(210)),o.lineWidth=1,o.strokeStyle="rgba(247, 230, 205, 0.4)",o.setLineDash([v(2),v(3)]),o.stroke();var a=document.getElementById("circleCanvas1");a.setAttribute("width",v(800)+"px"),a.setAttribute("height",v(300)+"px");var s=a.getContext("2d");h={x:v(173),y:v(173)},f={x:v(515),y:v(150)},d={x:v(512),y:v(210)},p(s)}))}));var y=o(),m=a(y).lastAllEnergy;return y.$subscribe((function(t,e){var n=e.lastAllEnergy||{};l.lastAllEnergyRes={cdmCo2:n.cdmCo2?n.cdmCo2.toFixed(2):n.cdmCo2,cdmTree:n.cdmTree?n.cdmTree.toFixed(0):n.cdmTree,cdmC:n.cdmC?n.cdmC.toFixed(2):n.cdmC,energySaving:n.energySaving?n.energySaving.toFixed(0):n.energySaving}})),u((function(){})),n(n({},c(l)),{},{svideo:r,saveCont:i,lastAllEnergy:m})},computed:{}}),kb="/sgdaping/assets/saveLight.0e63e0e5.png",Ab=function(t){return _("data-v-ba9ae691"),t=t(),x(),t},Ob={class:"lastMonthCont"},Ib=Ab((function(){return g("div",{class:"subhead-title"},[g("span",null,"上月节约能耗")],-1)})),Bb={class:"saveCont",ref:"saveCont"},Lb={class:"saveCenterCont"},Fb={class:"centerOval"},Db=Ab((function(){return g("img",{class:"round1",src:"/sgdaping/assets/round1.3f179f0a.png"},null,-1)})),Rb=Ab((function(){return g("img",{class:"round2",src:"/sgdaping/assets/round2.7a1a2069.png"},null,-1)})),Nb=Ab((function(){return g("img",{class:"round3",src:"/sgdaping/assets/round3.61e0aed3.png"},null,-1)})),zb=Ab((function(){return g("img",{class:"round4",src:"/sgdaping/assets/round4.6fddfd82.png"},null,-1)})),Hb=Ab((function(){return g("img",{class:"round5",src:"/sgdaping/assets/round5.398880f2.png"},null,-1)})),Gb={class:"electWrap"},Yb=Ab((function(){return g("div",null,"节约电",-1)})),Vb={class:"value"},Xb={class:"num"},qb=Ab((function(){return g("canvas",{id:"co2Canvas",class:"co2Canvas"},null,-1)})),Wb=Ab((function(){return g("canvas",{id:"circleCanvas1",class:"circleCanvas1"},null,-1)})),Ub={class:"outOval outOvalCo2"},Zb=Ab((function(){return g("div",{class:"outCircle"},null,-1)})),Kb=Ab((function(){return g("div",{class:"inOval"},null,-1)})),Qb=Ab((function(){return g("img",{class:"saveLight",src:kb},null,-1)})),$b=Ab((function(){return g("img",{class:"saveCo2",src:"/sgdaping/assets/saveCo2.f203e456.png"},null,-1)})),Jb={class:"co2Wrap sco2"},tw={class:"value"},ew={class:"outOval outOvalCarbon"},nw=Ab((function(){return g("div",{class:"outCircle"},null,-1)})),rw=Ab((function(){return g("div",{class:"inOval"},null,-1)})),iw=Ab((function(){return g("img",{class:"saveLight",src:kb},null,-1)})),ow=Ab((function(){return g("img",{class:"saveCo2",src:"/sgdaping/assets/saveCarbon.073b9188.png"},null,-1)})),aw={class:"co2Wrap sco2"},sw={class:"value"},lw={class:"outOval outOvalTree"},uw=Ab((function(){return g("div",{class:"outCircle"},null,-1)})),cw=Ab((function(){return g("div",{class:"inOval"},null,-1)})),hw=Ab((function(){return g("img",{class:"saveLight",src:kb},null,-1)})),fw=Ab((function(){return g("img",{class:"saveCo2",src:"/sgdaping/assets/saveTree.7b54f2da.png"},null,-1)})),dw={class:"co2Wrap sco2"},pw={class:"value"},gw={style:{display:"none"},class:"svideo",autoplay:"",loop:"",muted:"",ref:"svideo"},vw=[Ab((function(){return g("source",{src:"/sgdaping/assets/saveEnergy.bfe3145a.mov"},null,-1)}))];e("d",d(Tb,[["render",function(t,e,n,r,i,o){return m(),p("div",{class:S(["lastMonth",["hor"===t.screenType?"horSaveClass ":"verSaveClass"]])},[g("div",Ob,[Ib,g("div",Bb,[g("div",Lb,[g("div",Fb,[Db,Rb,F(),Nb,zb,Hb,g("div",Gb,[Yb,g("div",Vb,[g("span",Xb,v(t.doNum(t.lastAllEnergy.energySaving,0)),1),F("度 ")])])]),qb,Wb,g("div",Ub,[Zb,Kb,Qb,$b,g("div",Jb,[F(" 减排"),g("span",tw,v(t.doNum(t.lastAllEnergy.cdmCo2,2))+"Kg",1),F("CO₂ ")])]),g("div",ew,[nw,rw,iw,ow,g("div",aw,[F(" 减排"),g("span",sw,v(t.doNum(t.lastAllEnergy.cdmC,2))+"Kg",1),F("碳 ")])]),g("div",lw,[uw,cw,hw,fw,g("div",dw,[F(" 为国家种"),g("span",pw,v(t.doNum(t.lastAllEnergy.cdmTree,0)),1),F("棵树 ")])])]),g("video",gw,vw,512)],512)])],2)}],["__scopeId","data-v-ba9ae691"]]));var yw=i({props:{screenType:{type:String},showPing:{type:Number}},setup:function(t,e){var r=o(),i=s({selectColor:Bt,timeoutsign:null,selIndicator:{},selIndicatorId:"",nowIndicatorIndex:null,allIndicator:[{id:"temp",index:0,code:"Tdb",name:"温度",img:ct,verimg:gt,unit:"℃",fixed:1},{id:"humidity",index:1,code:"RH",name:"湿度",img:ut,verimg:pt,unit:"%",fixed:0},{id:"co2",index:2,code:"CO2",name:"CO₂",img:at,verimg:ht,unit:"ppm",fixed:0},{id:"methanal",index:3,code:"HCHO",name:"甲醛",img:st,verimg:ft,unit:"mg/m³",fixed:2},{id:"pm25",index:4,code:"PM2d5",name:"PM2.5",img:lt,verimg:dt,unit:"ug/m³",fixed:0}],allBuild:[],nowBuildName:"",nowBuildPage:1,allFloor:[],firstPageParams:[],secondPageParams:[],nowPage:1,pageNum:0,showFloors:[],totalAvgValues:null,hqueryBuild:function(){R().then((function(t){var e=(t.data||{}).content||[];if("Pj3301100002"==r.projectId){var n=e.filter((function(t){return"1#楼"==t.localName}));i.allBuild=n}else i.allBuild=e;i.nowBuildPage=1,i.fqueryFs()})).catch((function(t){e.emit("donetowpage")}))},fqueryFs:function(){var t=(i.allBuild[i.nowBuildPage-1]||{}).id;t&&N({criteria:{projectId:r.projectId,buildingId:t},size:14,page:1,orders:[{column:"floorSequenceId",asc:!0}]}).then((function(t){var n=t.data.content||[];if(0==(n=n.filter((function(t){return t.spaceNum>0}))).length)return i.nowBuildPage=i.nowBuildPage+1,i.nowBuildPage>i.allBuild.length?void e.emit("donetowpage"):void i.fqueryFs();i.nowBuildName=i.allBuild[i.nowBuildPage-1].localName,i.allFloor=n;var o,a,s=n.length;s<=7?(o=s,a=0,i.pageNum=1):(o=Math.ceil(s/2),a=Math.floor(s/2),i.pageNum=2);var l=i.floorHandle(o),u=i.floorHandle(a),c=n.slice(0,o),h=n.slice(o);i.firstPageParams=c.map((function(t){var e={};return e.id=t.id,e.projectId=r.projectId,e.spaceNum=l,e})),i.secondPageParams=h.map((function(t){var e={};return e.id=t.id,e.projectId=r.projectId,e.spaceNum=u,e})),i.nowIndicatorIndex=0,i.getTimeFloorParam(3e3)})).catch((function(t){i.nowBuildPage=i.nowBuildPage+1,i.nowBuildPage>i.allBuild.length?e.emit("donetowpage"):i.fqueryFs()}))},toplay:function(){i.getTimeFloorParam(500)},tostop:function(){clearTimeout(i.timeoutsign)},getTimeFloorParam:function(t){var n=1==i.nowPage?i.firstPageParams:i.secondPageParams;i.fqueryParam(n).then((function(){r.stopSign||(i.timeoutsign=setTimeout((function(){if(i.nowIndicatorIndex=i.nowIndicatorIndex+1,5==i.nowIndicatorIndex){if(i.pageNum==i.nowPage)return i.nowPage=1,void(i.nowBuildPage==i.allBuild.length?(e.emit("donetowpage"),clearTimeout(i.timeoutsign)):(i.nowBuildPage=i.nowBuildPage+1,i.fqueryFs()));2==i.pageNum&&1==i.nowPage&&(i.nowPage=2,i.nowIndicatorIndex=0)}i.getTimeFloorParam(3e3)}),t))})).catch((function(){}))},fqueryParam:function(t){var e=l(),n=l().subtract(30,"minutes").format("YYYYMMDDHHmmss"),r=e.format("YYYYMMDDHHmmss"),o=i.nowIndicatorIndex;i.selIndicator=i.allIndicator[o];var a=i.selIndicator.code;return z(r,n,a,t).then((function(t){var e=(t.data.data||{}).floors||[];i.totalAvgValues=t.data.data.avgValues||null,i.totalAvgValues&&(i.totalAvgValues=i.totalAvgValues.toFixed(i.selIndicator.fixed));var n=document.getElementById("floorWrap")&&document.getElementById("floorWrap").offsetHeight;e.forEach((function(t){var r=i.allFloor.filter((function(e){return e.id==t.id}))[0]||{};t.name=r.name,t.localId=r.localId,t.localName=r.localName;var o=(t.dataSpaces||[]).length,a=i.spaceHandle(o);t.spacewidth=100/a.lineNum,t.spaceheight=100/a.floorline,t.floorHeight=n/e.length})),i.showFloors=e,i.selIndicatorId=i.selIndicator.id})).catch((function(t){}))},spaceHandle:function(t){var e=Math.ceil(t/14);return{lineNum:Math.ceil(t/e),floorline:e}},floorHandle:function(t){return 28}});return u((function(){i.nowPage=1,i.hqueryBuild()})),n({},c(i))}}),mw={key:0,class:"leftChange"},_w={class:"allIndicator"},xw={class:"title"},bw={class:"ltextCont"},ww={class:"value"},Mw={class:"name"},Sw={class:"other"},jw=["src"],Cw=["onClick"],Ew={class:"title"},Pw={key:1,class:"topChange"},Tw={class:"allIndicator"},kw=["onClick"],Aw={class:"imageDiv"},Ow=["src"],Iw={class:"textCont"},Bw={class:"value"},Lw={class:"floorWrap",id:"floorWrap"},Fw={class:"floor-num"},Dw={class:"floor-space"};e("H",d(yw,[["render",function(t,e,n,r,i,o){return m(),p("div",{class:S(["floorSpace",["hor"===t.screenType?"horiFloorClass ":"verFloorClass "]])},[I(g("div",{class:"buildName"},v(t.nowBuildName),513),[[B,t.allBuild.length]]),"hor"==t.screenType?(m(),p("div",mw,[g("div",_w,[g("div",{class:"showItem",style:j({top:16*t.selIndicator.index+"%"})},[g("div",xw,v(t.selIndicator.name),1),g("div",bw,[g("div",ww,v(t.totalAvgValues)+v(t.selIndicator.unit),1),g("div",Mw,"平均"+v(t.selIndicator.name),1)]),g("div",Sw,[g("img",{class:"img",src:t.selIndicator.img},null,8,jw)])],4),(m(!0),p(w,null,M(t.allIndicator,(function(e,n){return m(),p("div",{class:S(["eachItem",{select:e.id==t.selIndicator.id}]),onClick:function(e){return t.clickIndicator(n)}},[g("div",Ew,v(e.name),1)],10,Cw)})),256))])])):y("",!0),"ver"==t.screenType?(m(),p("div",Pw,[g("div",Tw,[(m(!0),p(w,null,M(t.allIndicator,(function(e,n){return m(),p("div",{class:S(["eachItem",{select:e.id==t.selIndicator.id}]),onClick:function(e){return t.clickIndicator(n)}},[g("span",null,v(e.name),1)],10,kw)})),256))]),g("div",Aw,[g("img",{src:t.selIndicator.verimg},null,8,Ow)]),g("div",Iw,[F(" 平均"),g("span",null,v(t.selIndicator.name),1),g("span",Bw,v(t.totalAvgValues),1),g("span",null,v(t.selIndicator.unit),1)])])):y("",!0),g("div",Lw,[(m(!0),p(w,null,M(t.showFloors,(function(e,n){return m(),p("div",{class:"floor-item",key:n,style:j({height:e.floorHeight+"px"})},[g("div",Fw,[g("span",null,v(e.localName),1)]),g("div",Dw,[(m(!0),p(w,null,M(e.dataSpaces,(function(n,r){return m(),p("div",{class:"space-box",key:r,style:j({width:e.spacewidth+"%",height:e.spaceheight+"%"})},[g("div",{class:"space-name",style:j({backgroundColor:t.selectColor(n.avgValues,t.selIndicatorId,!0)})},v(n.localName),5)],4)})),128))])],4)})),128))])],2)}],["__scopeId","data-v-b97b7467"]]));var Rw={exports:{}};!function(e,n){var r;window,r=function(){return function(e){var n={};function r(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=n,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"===t(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(i,o,function(t){return e[t]}.bind(null,o));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="./src/index.ts")}({"./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js": /*!********************************************************************************!*\ !*** ./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js ***! \********************************************************************************/ /*! no static exports found */function(e,n,r){var i;"undefined"!=typeof self&&self,i=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=31)}([function(t,e,n){var r=n(4);e.a=function(t){return Array.isArray?Array.isArray(t):Object(r.a)(t,"Array")}},function(t,e,n){e.a=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},function(t,e,n){var r=n(0),i=n(13);e.a=function(t,e){if(t)if(Object(r.a)(t))for(var n=0,o=t.length;n-1}},function(e,n,r){n.a=function(e){var n=t(e);return null!==e&&"object"===n||"function"===n}},function(t,e,n){var r=n(2),i=n(1);e.a=function(t,e){if(!Object(i.a)(t))return t;var n=[];return Object(r.a)(t,(function(t,r){e(t,r)&&n.push(t)})),n}},function(e,n,r){n.a=function(e){return"object"===t(e)&&null!==e}},function(t,e,n){function r(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}e.a=function(t,e,n,i){return e&&r(t,e),n&&r(t,n),i&&r(t,i),t}},function(t,e,n){var r=n(30),i=["LR","RL","TB","BT","H","V"],o=["LR","RL","H"],a=i[0];t.exports=function(t,e,n){var s=e.direction||a;if(e.isHorizontal=function(t){return o.indexOf(t)>-1}(s),s&&-1===i.indexOf(s))throw new TypeError("Invalid direction: "+s);if(s===i[0])n(t,e);else if(s===i[1])n(t,e),t.right2left();else if(s===i[2])n(t,e);else if(s===i[3])n(t,e),t.bottom2top();else if(s===i[4]||s===i[5]){var l=r(t,e),u=l.left,c=l.right;n(u,e),n(c,e),e.isHorizontal?u.right2left():u.bottom2top(),c.translate(u.x-c.x,u.y-c.y),t.x=u.x,t.y=c.y;var h=t.getBoundingBox();e.isHorizontal?h.top<0&&t.translate(0,-h.top):h.left<0&&t.translate(-h.left,0)}var f=e.fixedRoot;return void 0===f&&(f=!0),f&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),t}},function(t,e,n){var r=n(7),i={getId:function(t){return t.id||t.name},getHGap:function(t){return t.hgap||18},getVGap:function(t){return t.vgap||18},getChildren:function(t){return t.children},getHeight:function(t){return t.height||36},getWidth:function(t){var e=t.label||" ";return t.width||18*e.split("").length}};function o(t,e){var n=this;if(n.vgap=n.hgap=0,t instanceof o)return t;n.data=t;var r=e.getHGap(t),i=e.getVGap(t);return n.width=e.getWidth(t),n.height=e.getHeight(t),n.id=e.getId(t),n.x=n.y=0,n.depth=0,n.children||(n.children=[]),n.addGap(r,i),n}r.assign(o.prototype,{isRoot:function(){return 0===this.depth},isLeaf:function(){return 0===this.children.length},addGap:function(t,e){var n=this;n.hgap+=t,n.vgap+=e,n.width+=2*t,n.height+=2*e},eachNode:function(t){for(var e,n=[this];e=n.shift();)t(e),n=e.children.concat(n)},DFTraverse:function(t){this.eachNode(t)},BFTraverse:function(t){for(var e,n=[this];e=n.shift();)t(e),n=n.concat(e.children)},getBoundingBox:function(){var t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode((function(e){t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.width=Math.max(t.width,e.x+e.width),t.height=Math.max(t.height,e.y+e.height)})),t},translate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.eachNode((function(n){n.x+=t,n.y+=e}))},right2left:function(){var t=this,e=t.getBoundingBox();t.eachNode((function(t){t.x=t.x-2*(t.x-e.left)-t.width})),t.translate(e.width,0)},bottom2top:function(){var t=this,e=t.getBoundingBox();t.eachNode((function(t){t.y=t.y-2*(t.y-e.top)-t.height})),t.translate(0,e.height)}}),t.exports=function(t,e,n){void 0===e&&(e={});var a,s=new o(t,e=r.assign({},i,e)),l=[s];if(!n&&!t.collapsed)for(;a=l.shift();)if(!a.data.collapsed){var u=e.getChildren(a.data),c=u?u.length:0;if(a.children=new Array(c),u&&c)for(var h=0;h-1;)i.call(t,s,1);return t}},function(t,e,n){var r=n(2),i=n(0),o=n(9);e.a=function(t,e,n){if(!Object(i.a)(t)&&!Object(o.a)(t))return t;var a=n;return Object(r.a)(t,(function(t,n){a=e(a,t,n)})),a}},function(t,e,n){var r=n(1),i=n(21);e.a=function(t,e){var n=[];if(!Object(r.a)(t))return n;for(var o=-1,a=[],s=t.length;++oe[r])return 1;if(t[r]n?n:t}},function(t,e,n){e.a=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))}},function(t,e,n){var r=n(5);e.a=function(t){return Object(r.a)(t)&&t%1!=0}},function(t,e,n){var r=n(5);e.a=function(t){return Object(r.a)(t)&&t%2==0}},function(t,e,n){var r=n(5),i=Number.isInteger?Number.isInteger:function(t){return Object(r.a)(t)&&t%1==0};e.a=i},function(t,e,n){var r=n(5);e.a=function(t){return Object(r.a)(t)&&t<0}},function(t,e,n){e.a=function(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0}},function(t,e,n){var r=n(2),i=n(0),o=n(3);e.a=function(t,e){if(Object(i.a)(t)){var n,a,s=t[0];return n=Object(o.a)(e)?e(t[0]):t[0][e],Object(r.a)(t,(function(t){(a=Object(o.a)(e)?e(t):t[e])>n&&(s=t,n=a)})),s}}},function(t,e,n){var r=n(2),i=n(0),o=n(3);e.a=function(t,e){if(Object(i.a)(t)){var n,a,s=t[0];return n=Object(o.a)(e)?e(t[0]):t[0][e],Object(r.a)(t,(function(t){(a=Object(o.a)(e)?e(t):t[e])e?(r&&(clearTimeout(r),r=null),s=u,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u}},function(t,e,n){var r=n(1);e.a=function(t){return Object(r.a)(t)?Array.prototype.slice.call(t):[]}},function(t,e,n){var r={};e.a=function(t){return r[t=t||"g"]?r[t]+=1:r[t]=1,t+r[t]}},function(t,e,n){e.a=function(){}},function(t,e,n){e.a=function(t){return t}},function(t,e,n){e.a=function(t){return Object(r.a)(t)?0:Object(i.a)(t)?t.length:Object.keys(t).length};var r=n(6),i=n(1)},function(t,e,n){var r=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();e.a=r},function(t,e){function n(t,e,n,r){void 0===r&&(r=[]);var i=this;i.w=t||0,i.h=e||0,i.y=n||0,i.x=0,i.c=r||[],i.cs=r.length,i.prelim=0,i.mod=0,i.shift=0,i.change=0,i.tl=null,i.tr=null,i.el=null,i.er=null,i.msel=0,i.mser=0}function r(t,e,n){n?t.y+=e:t.x+=e,t.children.forEach((function(t){r(t,e,n)}))}function i(t,e){var n=e?t.y:t.x;return t.children.forEach((function(t){n=Math.min(i(t,e),n)})),n}function o(t,e){r(t,-i(t,e),e)}function a(t,e,n){n?e.y=t.x:e.x=t.x,t.c.forEach((function(t,r){a(t,e.children[r],n)}))}function s(t,e,n){void 0===n&&(n=0),e?(t.x=n,n+=t.width):(t.y=n,n+=t.height),t.children.forEach((function(t){s(t,e,n)}))}n.fromNode=function(t,e){if(!t)return null;var r=[];return t.children.forEach((function(t){r.push(n.fromNode(t,e))})),e?new n(t.height,t.width,t.x,r):new n(t.width,t.height,t.y,r)},t.exports=function(t,e){void 0===e&&(e={});var r=e.isHorizontal;function i(t){0===t.cs?(t.el=t,t.er=t,t.msel=t.mser=0):(t.el=t.c[0].el,t.msel=t.c[0].msel,t.er=t.c[t.cs-1].er,t.mser=t.c[t.cs-1].mser)}function l(t,e,n){for(var r=t.c[e-1],i=r.mod,o=t.c[e],a=o.mod;null!==r&&null!==o;){f(r)>n.low&&(n=n.nxt);var s=i+r.prelim+r.w-(a+o.prelim);s>0&&(a+=s,u(t,e,n.index,s));var l=f(r),d=f(o);l<=d&&null!==(r=h(r))&&(i+=r.mod),l>=d&&null!==(o=c(o))&&(a+=o.mod)}!r&&o?function(t,e,n,r){var i=t.c[0].el;i.tl=n;var o=r-n.mod-t.c[0].msel;i.mod+=o,i.prelim-=o,t.c[0].el=t.c[e].el,t.c[0].msel=t.c[e].msel}(t,e,o,a):r&&!o&&function(t,e,n,r){var i=t.c[e].er;i.tr=n;var o=r-n.mod-t.c[e].mser;i.mod+=o,i.prelim-=o,t.c[e].er=t.c[e-1].er,t.c[e].mser=t.c[e-1].mser}(t,e,r,i)}function u(t,e,n,r){t.c[e].mod+=r,t.c[e].msel+=r,t.c[e].mser+=r,function(t,e,n,r){if(n!==e-1){var i=e-n;t.c[n+1].shift+=r/i,t.c[e].shift-=r/i,t.c[e].change-=r-r/i}}(t,e,n,r)}function c(t){return 0===t.cs?t.tl:t.c[0]}function h(t){return 0===t.cs?t.tr:t.c[t.cs-1]}function f(t){return t.y+t.h}function d(t,e,n){for(;null!==n&&t>=n.low;)n=n.nxt;return{low:t,index:e,nxt:n}}s(t,r);var p=n.fromNode(t,r);return function t(e){if(0!==e.cs){t(e.c[0]);for(var n=d(f(e.c[0].el),0,null),r=1;rs&&(s=e.depth);var n=e.children,r=n.length,o=new i(e.height,[]);return n.forEach((function(e,n){var i=t(e);o.children.push(i),0===n&&(o.leftChild=i),n===r-1&&(o.rightChild=i)})),o.originNode=e,o.isLeaf=e.isLeaf(),o}(t);return function t(e){if(e.isLeaf||0===e.children.length)e.drawingDepth=s;else{var n=e.children.map((function(e){return t(e)})),r=Math.min.apply(null,n);e.drawingDepth=r-1}return e.drawingDepth}(l),function t(r){r.x=r.drawingDepth*e.rankSep,r.isLeaf?(r.y=0,n&&(r.y=n.y+n.height+e.nodeSep,r.originNode.parent!==n.originNode.parent&&(r.y+=e.subTreeSep)),n=r):(r.children.forEach((function(e){t(e)})),r.y=(r.leftChild.y+r.rightChild.y)/2)}(l),a(l,t,e.isHorizontal),t}},function(t,e,n){var r=n(11),i=n(117),o=n(30),a=n(7),s=["LR","RL","H"],l=s[0],u=function(t){var e,n;function r(){return t.apply(this,arguments)||this}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.execute=function(){var t=this.options,e=this.rootNode;t.isHorizontal=!0;var n=t.indent,r=void 0===n?20:n,a=t.dropCap,u=void 0===a||a,c=t.direction||l;if(c&&-1===s.indexOf(c))throw new TypeError("Invalid direction: "+c);if(c===s[0])i(e,r,u);else if(c===s[1])i(e,r,u),e.right2left();else if(c===s[2]){var h=o(e,t),f=h.left,d=h.right;i(f,r,u),f.right2left(),i(d,r,u);var p=f.getBoundingBox();d.translate(p.width,0),e.x=d.x-e.width/2}return e},r}(r),c={};t.exports=function(t,e){return e=a.assign({},c,e),new u(t,e).execute()}},function(t,e){t.exports=function(t,e,n){var r=null;t.eachNode((function(t){!function(t,e,n,r){if(!r)try{if(t.id===t.parent.children[0].id)return t.x+=n*t.depth,void(t.y=e?e.y:0)}catch(i){}t.x+=n*t.depth,t.y=e?e.y+e.height:0}(t,r,e,n),r=t}))}},function(t,e,n){var r=n(11),i=n(119),o=n(17),a=n(7),s=function(t){var e,n;function r(){return t.apply(this,arguments)||this}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.execute=function(){return o(this.rootNode,this.options,i)},r}(r),l={};t.exports=function(t,e){return e=a.assign({},l,e),new s(t,e).execute()}},function(t,e,n){var r=n(7);function i(t,e){var n=0;return t.children.length?t.children.forEach((function(t){n+=i(t,e)})):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function o(t){var e=t.children,n=e.length;if(n){e.forEach((function(t){o(t)}));var r=e[0],i=e[n-1],a=i.y-r.y+i.height,s=0;if(e.forEach((function(t){s+=t.totalHeight})),a>t.height)t.y=r.y+a/2-t.height/2;else if(1!==e.length||t.height>s){var l=t.y+(t.height-a)/2-r.y;e.forEach((function(t){t.translate(0,l)}))}else t.y=(r.y+r.height/2+i.y+i.height/2)/2-t.height/2}}var a={getSubTreeSep:function(){return 0}};t.exports=function(t,e){void 0===e&&(e={}),e=r.assign({},a,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse((function(t){t.x=t.parent.x+t.parent.width})),t.parent=null,i(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode((function(t){var e=t.children,n=e.length;if(n){var r=e[0];if(r.startY=t.startY+t._subTreeSep,1===n)r.y=t.y+t.height/2-r.height/2;else{r.y=r.startY+r.totalHeight/2-r.height/2;for(var i=1;in?n:t}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/clear-animation-frame.js": /*!*********************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/clear-animation-frame.js ***! \*********************************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t)}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/clone.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/clone.js ***! \*****************************************************************/ /*! no static exports found */function(e,n,r){Object.defineProperty(n,"__esModule",{value:!0});var i=r(/*! ./is-array */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js");n.default=function e(n){if("object"!==t(n)||null===n)return n;var r;if(i.default(n)){r=[];for(var o=0,a=n.length;o-1}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/debounce.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/debounce.js ***! \********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||t.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,e),s&&t.apply(i,o)}}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/deep-mix.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/deep-mix.js ***! \********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-array */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js"),i=n(/*! ./is-plain-object */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-plain-object.js");function o(t,e,n,a){for(var s in n=n||0,a=a||5,e)if(e.hasOwnProperty(s)){var l=e[s];null!==l&&i.default(l)?(i.default(t[s])||(t[s]={}),n20&&(i=20),parseFloat(t.toFixed(i))}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/flatten-deep.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/flatten-deep.js ***! \************************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-array */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js");e.default=function t(e,n){if(void 0===n&&(n=[]),r.default(e))for(var i=0;i0}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-prototype.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-prototype.js ***! \************************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=Object.prototype;e.default=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-reg-exp.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-reg-exp.js ***! \**********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-type */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-type.js");e.default=function(t){return r.default(t,"RegExp")}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-string.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-string.js ***! \*********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-type */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-type.js");e.default=function(t){return r.default(t,"String")}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-type.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-type.js ***! \*******************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r={}.toString;e.default=function(t,e){return r.call(t)==="[object "+e+"]"}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-undefined.js": /*!************************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-undefined.js ***! \************************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return void 0===t}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/keys.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/keys.js ***! \****************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./each */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/each.js"),i=n(/*! ./is-function */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-function.js"),o=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return r.default(t,(function(n,r){i.default(t)&&"prototype"===r||e.push(r)})),e};e.default=o},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/last.js": /*!****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/last.js ***! \****************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-array-like */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js");e.default=function(t){if(r.default(t))return t[t.length-1]}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/lower-case.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/lower-case.js ***! \**********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./to-string */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-string.js");e.default=function(t){return r.default(t).toLowerCase()}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/lower-first.js": /*!***********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/lower-first.js ***! \***********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./to-string */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-string.js");e.default=function(t){var e=r.default(t);return e.charAt(0).toLowerCase()+e.substring(1)}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/map-values.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/map-values.js ***! \**********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-nil */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-nil.js"),i=n(/*! ./is-object */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-object.js"),o=function(t){return t};e.default=function(t,e){void 0===e&&(e=o);var n={};return i.default(t)&&!r.default(t)&&Object.keys(t).forEach((function(r){n[r]=e(t[r],r)})),n}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/map.js": /*!***************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/map.js ***! \***************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-array-like */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js");e.default=function(t,e){if(!r.default(t))return t;for(var n=[],i=0;in&&(s=t,n=a)})),s}}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/memoize.js": /*!*******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/memoize.js ***! \*******************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-function */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-function.js");e.default=function(t,e){if(!r.default(t))throw new TypeError("Expected a function");var n=function n(){for(var r=[],i=0;i-1;)i.call(t,s,1);return t}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/reduce.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/reduce.js ***! \******************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./each */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/each.js"),i=n(/*! ./is-array */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array.js"),o=n(/*! ./is-plain-object */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-plain-object.js");e.default=function(t,e,n){if(!i.default(t)&&!o.default(t))return t;var a=n;return r.default(t,(function(t,n){a=e(a,t,n)})),a}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/remove.js": /*!******************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/remove.js ***! \******************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-array-like */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js"),i=n(/*! ./pull-at */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/pull-at.js");e.default=function(t,e){var n=[];if(!r.default(t))return n;for(var o=-1,a=[],s=t.length;++oe[r])return 1;if(t[r]e?(r&&(clearTimeout(r),r=null),s=u,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-array.js": /*!********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-array.js ***! \********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-array-like */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-array-like.js");e.default=function(t){return r.default(t)?Array.prototype.slice.call(t):[]}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-degree.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-degree.js ***! \*********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=180/Math.PI;e.default=function(t){return r*t}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-integer.js": /*!**********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-integer.js ***! \**********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=parseInt},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-radian.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-radian.js ***! \*********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=Math.PI/180;e.default=function(t){return r*t}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-string.js": /*!*********************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/to-string.js ***! \*********************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./is-nil */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/is-nil.js");e.default=function(t){return r.default(t)?"":t.toString()}},"./node_modules/_@antv_util@2.0.10@@antv/util/lib/union.js": /*!*****************************************************************!*\ !*** ./node_modules/_@antv_util@2.0.10@@antv/util/lib/union.js ***! \*****************************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! ./uniq */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/uniq.js");e.default=function(){for(var t=[],e=0;ee?1:t>=e?0:NaN}function n(t){return 1===t.length&&(t=r(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}function r(t){return function(n,r){return e(t(n),r)}}var i=n(e),o=i.right,a=i.left;function s(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);nt?1:e>=t?0:NaN}function h(t){return null===t?NaN:+t}function f(t,e){var n,r,i=t.length,o=0,a=-1,s=0,l=0;if(null==e)for(;++a1)return l/(o-1)}function d(t,e){var n=f(t,e);return n?Math.sqrt(n):n}function p(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a=n)for(r=i=n;++an&&(r=n),i=n)for(r=i=n;++an&&(r=n),i0)return[t];if((r=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s=0?(o>=b?10:o>=w?5:o>=M?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=b?10:o>=w?5:o>=M?2:1)}function C(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=b?i*=10:o>=w?i*=5:o>=M&&(i*=2),eh;)f.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?f[i-1]:c,p.x1=i=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function k(t,n,r){return t=y.call(t,h).sort(e),Math.ceil((r-n)/(2*(T(t,.75)-T(t,.25))*Math.pow(t.length,-1/3)))}function A(t,e,n){return Math.ceil((n-e)/(3.5*d(t)*Math.pow(t.length,-1/3)))}function O(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o=n)for(r=n;++or&&(r=n)}else for(;++o=n)for(r=n;++or&&(r=n);return r}function I(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n}function F(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o=n)for(r=n;++on&&(r=n)}else for(;++o=n)for(r=n;++on&&(r=n);return r}function D(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function R(t,n){if(r=t.length){var r,i,o=0,a=0,s=t[a];for(null==n&&(n=e);++oe?1:t>=e?0:NaN}function r(t){var e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[o],e)<0?r=o+1:i=o}return r}function i(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[o],e)>0?i=o:r=o+1}return r}function a(t,n,i,o){null==i&&(i=0),null==o&&(o=t.length);var a=r(t,n,i,o-1);return a>i&&e(t[a-1],n)>-e(t[a],n)?a-1:a}return 1===t.length&&(e=function(e,n){return t(e)-n},n=o(t)),{left:r,center:a,right:i}}function o(t){return function(e,r){return n(t(e),r)}}function a(t){return null===t?NaN:+t}function s(t,e){var n,r,o,a,s,l,u,c,h,f,d,p;return i.__generator(this,(function(g){switch(g.label){case 0:if(void 0!==e)return[3,9];g.label=1;case 1:g.trys.push([1,6,7,8]),n=i.__values(t),r=n.next(),g.label=2;case 2:return r.done?[3,5]:null!=(u=r.value)&&(u=+u)>=u?[4,u]:[3,4];case 3:g.sent(),g.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return o=g.sent(),h={error:o},[3,8];case 7:try{r&&!r.done&&(f=n.return)&&f.call(n)}finally{if(h)throw h.error}return[7];case 8:return[3,17];case 9:a=-1,g.label=10;case 10:g.trys.push([10,15,16,17]),s=i.__values(t),l=s.next(),g.label=11;case 11:return l.done?[3,14]:(u=l.value,null!=(u=e(u,++a,t))&&(u=+u)>=u?[4,u]:[3,13]);case 12:g.sent(),g.label=13;case 13:return l=s.next(),[3,11];case 14:return[3,17];case 15:return c=g.sent(),d={error:c},[3,17];case 16:try{l&&!l.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 17:return[2]}}))}var l=r(n),u=l.right,c=l.left,h=r(a).center;function f(t,e){var n,r,o,a,s=0;if(void 0===e)try{for(var l=i.__values(t),u=l.next();!u.done;u=l.next())null!=(d=u.value)&&(d=+d)>=d&&++s}catch(p){n={error:p}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}else{var c=-1;try{for(var h=i.__values(t),f=h.next();!f.done;f=h.next()){var d;null!=(d=e(d=f.value,++c,t))&&(d=+d)>=d&&++s}}catch(g){o={error:g}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}return s}function d(t){return 0|t.length}function p(t){return!(t>0)}function g(e){return"object"!==t(e)||"length"in e?e:Array.from(e)}function v(t){return function(e){return t.apply(void 0,i.__spread(e))}}function y(){for(var t=[],e=0;et?1:e>=t?0:NaN}function x(t,e){var n,r,o,a,s,l=0,u=0,c=0;if(void 0===e)try{for(var h=i.__values(t),f=h.next();!f.done;f=h.next())null!=(v=f.value)&&(v=+v)>=v&&(c+=(s=v-u)*(v-(u+=s/++l)))}catch(y){n={error:y}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}else{var d=-1;try{for(var p=i.__values(t),g=p.next();!g.done;g=p.next()){var v;null!=(v=e(v=g.value,++d,t))&&(v=+v)>=v&&(c+=(s=v-u)*(v-(u+=s/++l)))}}catch(m){o={error:m}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}}if(l>1)return c/(l-1)}function b(t,e){var n=x(t,e);return n?Math.sqrt(n):n}function w(t,e){var n,r,o,a,s,l;if(void 0===e)try{for(var u=i.__values(t),c=u.next();!c.done;c=u.next())null!=(p=c.value)&&(void 0===s?p>=p&&(s=l=p):(s>p&&(s=p),l=p&&(s=l=p):(s>p&&(s=p),l0){for(o=r[--i];i>0&&(t=o,!(n=(e=r[--i])-((o=t+e)-t))););i>0&&(n<0&&r[i-1]<0||n>0&&r[i-1]>0)&&(e=2*n)==(t=o+e)-o&&(o=t)}return o},t}();function S(t,e){var n,r,o,a,s=new M;if(void 0===e)try{for(var l=i.__values(t),u=l.next();!u.done;u=l.next())(d=+(d=u.value))&&s.add(d)}catch(p){n={error:p}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}else{var c=-1;try{for(var h=i.__values(t),f=h.next();!f.done;f=h.next()){var d;(d=+e(d=f.value,++c,t))&&s.add(d)}}catch(g){o={error:g}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}return+s}var j=function(t){function e(e,n){var r,o;void 0===e&&(e=[]),void 0===n&&(n=k);var a=t.call(this)||this;Object.defineProperties(a,{_intern:{value:new Map},_key:{value:n}});try{for(var s=i.__values(e),l=s.next();!l.done;l=s.next()){var u=i.__read(l.value,2),c=u[0],h=u[1];a.set(c,h)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a}return i.__extends(e,t),e.prototype.get=function(e){return t.prototype.get.call(this,E(this,e))},e.prototype.has=function(e){return t.prototype.has.call(this,E(this,e))},e.prototype.set=function(e,n){return t.prototype.set.call(this,P(this,e),n)},e.prototype.delete=function(e){return t.prototype.delete.call(this,T(this,e))},e}(Map),C=function(t){function e(e,n){var r,o;void 0===e&&(e=[]),void 0===n&&(n=k);var a=t.call(this)||this;Object.defineProperties(a,{_intern:{value:new Map},_key:{value:n}});try{for(var s=i.__values(e),l=s.next();!l.done;l=s.next()){var u=l.value;a.add(u)}}catch(c){r={error:c}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a}return i.__extends(e,t),e.prototype.has=function(e){return t.prototype.has.call(this,E(this,e))},e.prototype.add=function(e){return t.prototype.add.call(this,P(this,e))},e.prototype.delete=function(e){return t.prototype.delete.call(this,T(this,e))},e}(Set);function E(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)?n.get(r):e}function P(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)?n.get(r):(n.set(r,e),e)}function T(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)&&(e=n.get(e),n.delete(r)),e}function k(e){return null!==e&&"object"===t(e)?e.valueOf():e}function A(t){return t}function O(t){for(var e=[],n=1;n=r.length)return n(o);var h=new j,f=r[a++],d=-1;try{for(var p=i.__values(o),g=p.next();!g.done;g=p.next()){var v=g.value,y=f(v,++d,o),m=h.get(y);m?m.push(v):h.set(y,[v])}}catch(M){s={error:M}}finally{try{g&&!g.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}try{for(var _=i.__values(h),x=_.next();!x.done;x=_.next()){var b=i.__read(x.value,2),w=(y=b[0],b[1]);h.set(y,t(w,a))}}catch(S){u={error:S}}finally{try{x&&!x.done&&(c=_.return)&&c.call(_)}finally{if(u)throw u.error}}return e(h)}(t,0)}function z(t,e){return Array.from(e,(function(e){return t[e]}))}function H(t){for(var e=[],r=1;r1){var s=Uint32Array.from(t,(function(t,e){return e}));return e.length>1?(e=e.map((function(e){return t.map(e)})),s.sort((function(t,r){var o,a;try{for(var s=i.__values(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=n(u[t],u[r]);if(c)return c}}catch(h){o={error:h}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}}))):(a=t.map(a),s.sort((function(t,e){return n(a[t],a[e])}))),z(t,s)}return t.sort(a)}function G(t,e,r){return(1===e.length?H(B(t,e,r),(function(t,e){var r=i.__read(t,2),o=r[0],a=r[1],s=i.__read(e,2),l=s[0];return n(a,s[1])||n(o,l)})):H(O(t,r),(function(t,r){var o=i.__read(t,2),a=o[0],s=o[1],l=i.__read(r,2),u=l[0],c=l[1];return e(s,c)||n(a,u)}))).map((function(t){return i.__read(t,1)[0]}))}var Y=Array.prototype.slice;function V(t){return function(){return t}}var X=Math.sqrt(50),q=Math.sqrt(10),W=Math.sqrt(2);function U(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s=0?(o>=X?10:o>=q?5:o>=W?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=X?10:o>=q?5:o>=W?2:1)}function K(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=X?i*=10:o>=q?i*=5:o>=W&&(i*=2),e0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function $(t){return Math.ceil(Math.log(f(t))/Math.LN2)+1}function J(){var t=A,e=w,n=$;function r(r){var o;Array.isArray(r)||(r=Array.from(r));var a,s,l=r.length,c=new Array(l);for(a=0;a=d)if(g>=d&&e===w){var y=Z(f,d,v);isFinite(y)&&(y>0?d=(Math.floor(d/y)+1)*y:y<0&&(d=(Math.ceil(d*-y)+1)/-y))}else p.pop()}for(var m=p.length;p[0]<=f;)p.shift(),--m;for(;p[m-1]>d;)p.pop(),--m;var _,x=new Array(m+1);for(a=0;a<=m;++a)(_=x[a]=[]).x0=a>0?p[a-1]:f,_.x1=a=d)&&(s=d)}catch(p){n={error:p}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}else{var c=-1;try{for(var h=i.__values(t),f=h.next();!f.done;f=h.next()){var d;null!=(d=e(d=f.value,++c,t))&&(s=d)&&(s=d)}}catch(g){o={error:g}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}return s}function et(t,e){var n,r,o,a,s;if(void 0===e)try{for(var l=i.__values(t),u=l.next();!u.done;u=l.next())null!=(d=u.value)&&(s>d||void 0===s&&d>=d)&&(s=d)}catch(p){n={error:p}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}else{var c=-1;try{for(var h=i.__values(t),f=h.next();!f.done;f=h.next()){var d;null!=(d=e(d=f.value,++c,t))&&(s>d||void 0===s&&d>=d)&&(s=d)}}catch(g){o={error:g}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}return s}function nt(t,e,r,i,o){for(void 0===r&&(r=0),void 0===i&&(i=t.length-1),void 0===o&&(o=n);i>r;){if(i-r>600){var a=i-r+1,s=e-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);nt(t,e,Math.max(r,Math.floor(e-s*u/a+c)),Math.min(i,Math.floor(e+(a-s)*u/a+c)),o)}var h=t[e],f=r,d=i;for(rt(t,r,e),o(t[i],h)>0&&rt(t,r,i);f0;)--d}0===o(t[r],h)?rt(t,r,d):rt(t,++d,i),d<=e&&(r=d+1),e<=d&&(i=d-1)}return t}function rt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function it(t,e,n){if(r=(t=Float64Array.from(s(t,n))).length){if((e=+e)<=0||r<2)return et(t);if(e>=1)return tt(t);var r,i=(r-1)*e,o=Math.floor(i),a=tt(nt(t,o).subarray(0,o+1));return a+(et(t.subarray(o+1))-a)*(i-o)}}function ot(t,e,n){if(void 0===n&&(n=a),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),s=+n(t[o],o,t);return s+(+n(t[o+1],o+1,t)-s)*(i-o)}}function at(t,e,n){return Math.ceil((n-e)/(2*(it(t,.75)-it(t,.25))*Math.pow(f(t),-1/3)))}function st(t,e,n){return Math.ceil((n-e)/(3.5*b(t)*Math.pow(f(t),-1/3)))}function lt(t,e){var n,r,o,a,s,l=-1,u=-1;if(void 0===e)try{for(var c=i.__values(t),h=c.next();!h.done;h=c.next()){var f=h.value;++u,null!=f&&(s=f)&&(s=f,l=u)}}catch(g){n={error:g}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}else try{for(var d=i.__values(t),p=d.next();!p.done;p=d.next())null!=(f=e(f=p.value,++u,t))&&(s=f)&&(s=f,l=u)}catch(v){o={error:v}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}return l}function ut(t,e){var n,r,o,a,s=0,l=0;if(void 0===e)try{for(var u=i.__values(t),c=u.next();!c.done;c=u.next())null!=(p=c.value)&&(p=+p)>=p&&(++s,l+=p)}catch(g){n={error:g}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}else{var h=-1;try{for(var f=i.__values(t),d=f.next();!d.done;d=f.next()){var p;null!=(p=e(p=d.value,++h,t))&&(p=+p)>=p&&(++s,l+=p)}}catch(v){o={error:v}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}}if(s)return l/s}function ct(t,e){return it(t,.5,e)}function ht(t){var e,n,r,o,a,s;return i.__generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,7]),e=i.__values(t),n=e.next(),l.label=1;case 1:return n.done?[3,4]:(r=n.value,[5,i.__values(r)]);case 2:l.sent(),l.label=3;case 3:return n=e.next(),[3,1];case 4:return[3,7];case 5:return o=l.sent(),a={error:o},[3,7];case 6:try{n&&!n.done&&(s=e.return)&&s.call(e)}finally{if(a)throw a.error}return[7];case 7:return[2]}}))}function ft(t){return Array.from(ht(t))}function dt(t,e){var n,r,o,a,s,l=-1,u=-1;if(void 0===e)try{for(var c=i.__values(t),h=c.next();!h.done;h=c.next()){var f=h.value;++u,null!=f&&(s>f||void 0===s&&f>=f)&&(s=f,l=u)}}catch(g){n={error:g}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}else try{for(var d=i.__values(t),p=d.next();!p.done;p=d.next())null!=(f=e(f=p.value,++u,t))&&(s>f||void 0===s&&f>=f)&&(s=f,l=u)}catch(v){o={error:v}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}return l}function pt(t,e){var n,r;void 0===e&&(e=gt);var o,a=[],s=!1;try{for(var l=i.__values(t),u=l.next();!u.done;u=l.next()){var c=u.value;s&&a.push(e(o,c)),o=c,s=!0}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return a}function gt(t,e){return[t,e]}function vt(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r0:0===n(p,p))&&(l=d,c=p,u=!0)}}catch(y){r={error:y}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}else try{for(var g=i.__values(t),v=g.next();!v.done;v=g.next())p=v.value,(u?e(p,l)>0:0===e(p,p))&&(l=p,u=!0)}catch(m){a={error:m}}finally{try{v&&!v.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}return l}function xt(t,e){var r,o,a;if(void 0===e&&(e=n),1===e.length)return lt(t,e);var s=-1,l=-1;try{for(var u=i.__values(t),c=u.next();!c.done;c=u.next()){var h=c.value;++l,(s<0?0===e(h,h):e(h,a)>0)&&(a=h,s=l)}}catch(f){r={error:f}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return s}function bt(t,e){var n=mt(t,e);return n<0?void 0:n}var wt=Mt(Math.random);function Mt(t){return function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);for(var i=r-(n=+n);i;){var o=t()*i--|0,a=e[i+n];e[i+n]=e[o+n],e[o+n]=a}return e}}function St(t,e){var n,r,o,a,s=0;if(void 0===e)try{for(var l=i.__values(t),u=l.next();!u.done;u=l.next())(d=+(d=u.value))&&(s+=d)}catch(p){n={error:p}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}else{var c=-1;try{for(var h=i.__values(t),f=h.next();!f.done;f=h.next()){var d;(d=+e(d=f.value,++c,t))&&(s+=d)}}catch(g){o={error:g}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}return s}function jt(t){if(!(i=t.length))return[];for(var e=-1,n=et(t,Ct),r=new Array(n);++e=i.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var l,u,h,f=-1,d=n.length,p=i[o++],g=r(),v=a();++fi.length)return t;var r,o=u[n-1];return null!=e&&n>=i.length?r=t.entries():(r=[],t.each((function(t,e){r.push({key:e,values:h(t,n)})}))),null!=o?r.sort((function(t,e){return o(t.key,e.key)})):r}return n={object:function(t){return c(t,0,o,a)},map:function(t){return c(t,0,s,l)},entries:function(t){return h(c(t,0,s,l),0)},key:function(t){return i.push(t),n},sortKeys:function(t){return u[i.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}function o(){return{}}function a(t,e,n){t[e]=n}function s(){return r()}function l(t,e,n){t.set(e,n)}function u(){}n.prototype=r.prototype={constructor:n,has:function(t){return e+t in this},get:function(t){return this[e+t]},set:function(t,n){return this[e+t]=n,this},remove:function(t){var n=e+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===e&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===e&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===e&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===e&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===e&&++t;return t},empty:function(){for(var t in this)if(t[0]===e)return!1;return!0},each:function(t){for(var n in this)n[0]===e&&t(this[n],n.slice(1),this)}};var c=r.prototype;function h(t,e){var n=new u;if(t instanceof u)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++rl&&(l=t),eu&&(u=e)}function f(t,n,r){var i=n[1][0]-n[0][0],o=n[1][1]-n[0][1],a=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=a&&t.clipExtent(null),e.geoStream(r,t.stream(c));var s=c.result(),l=Math.min(i/(s[1][0]-s[0][0]),o/(s[1][1]-s[0][1])),u=+n[0][0]+(i-l*(s[1][0]+s[0][0]))/2,h=+n[0][1]+(o-l*(s[1][1]+s[0][1]))/2;return null!=a&&t.clipExtent(a),t.scale(150*l).translate([u,h])}function d(t,e,n){return f(t,[[0,0],e],n)}function p(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=.12&&i<.234&&r>=-.425&&r<-.214?c:i>=.166&&i<.234&&r>=-.214&&r<-.115?h:u).invert(t)},v.stream=function(e){return t&&r===e?t:t=p([u.stream(r=e),c.stream(e),h.stream(e)])},v.precision=function(t){return arguments.length?(u.precision(t),c.precision(t),h.precision(t),y()):u.precision()},v.scale=function(t){return arguments.length?(u.scale(t),c.scale(.35*t),h.scale(t),v.translate(u.translate())):u.scale()},v.translate=function(t){if(!arguments.length)return u.translate();var e=u.scale(),n=+t[0],r=+t[1];return o=u.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(g),a=c.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+i,r+.12*e+i],[n-.214*e-i,r+.234*e-i]]).stream(g),s=h.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+i,r+.166*e+i],[n-.115*e-i,r+.234*e-i]]).stream(g),y()},v.fitExtent=function(t,e){return f(v,t,e)},v.fitSize=function(t,e){return d(v,t,e)},v.drawCompositionBorders=function(t){var e=u([-102.91,26.3]),n=u([-104,27.5]),r=u([-108,29.1]),i=u([-110,29.1]),o=u([-110,26.7]),a=u([-112.8,27.6]),s=u([-114.3,30.6]),l=u([-119.3,30.1]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.moveTo(o[0],o[1]),t.lineTo(a[0],a[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1])},v.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},v.scale(1070)}function v(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=.12&&i<.234&&r>=-.425&&r<-.214?g:i>=.166&&i<.234&&r>=-.214&&r<-.115?y:i>=.2064&&i<.2413&&r>=.312&&r<.385?m:i>=.09&&i<.1197&&r>=-.4243&&r<-.3232?_:i>=-.0518&&i<.0895&&r>=-.4243&&r<-.3824?x:p).invert(t)},w.stream=function(e){return t&&r===e?t:t=v([p.stream(r=e),g.stream(e),y.stream(e),m.stream(e),_.stream(e),x.stream(e)])},w.precision=function(t){return arguments.length?(p.precision(t),g.precision(t),y.precision(t),m.precision(t),_.precision(t),x.precision(t),M()):p.precision()},w.scale=function(t){return arguments.length?(p.scale(t),g.scale(.35*t),y.scale(t),m.scale(t),_.scale(2*t),x.scale(t),w.translate(p.translate())):p.scale()},w.translate=function(t){if(!arguments.length)return p.translate();var e=p.scale(),n=+t[0],r=+t[1];return o=p.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(b),a=g.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+i,r+.12*e+i],[n-.214*e-i,r+.233*e-i]]).stream(b),s=y.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+i,r+.166*e+i],[n-.115*e-i,r+.233*e-i]]).stream(b),l=m.translate([n+.35*e,r+.224*e]).clipExtent([[n+.312*e+i,r+.2064*e+i],[n+.385*e-i,r+.233*e-i]]).stream(b),u=_.translate([n-.492*e,r+.09*e]).clipExtent([[n-.4243*e+i,r+.0903*e+i],[n-.3233*e-i,r+.1197*e-i]]).stream(b),c=x.translate([n-.408*e,r+.018*e]).clipExtent([[n-.4244*e+i,r-.0519*e+i],[n-.3824*e-i,r+.0895*e-i]]).stream(b),M()},w.fitExtent=function(t,e){return f(w,t,e)},w.fitSize=function(t,e){return d(w,t,e)},w.drawCompositionBorders=function(t){var e=p([-110.4641,28.2805]),n=p([-104.0597,28.9528]),r=p([-103.7049,25.1031]),i=p([-109.8337,24.4531]),o=p([-124.4745,28.1407]),a=p([-110.931,30.8844]),s=p([-109.8337,24.4531]),l=p([-122.4628,21.8562]),u=p([-76.8579,25.1544]),c=p([-72.429,24.2097]),h=p([-72.8265,22.7056]),f=p([-77.1852,23.6392]),d=p([-125.0093,29.7791]),g=p([-118.5193,31.3262]),v=p([-118.064,29.6912]),y=p([-124.4369,28.169]),m=p([-128.1314,37.4582]),_=p([-125.2132,38.214]),x=p([-122.3616,30.5115]),b=p([-125.0315,29.8211]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),t.moveTo(o[0],o[1]),t.lineTo(a[0],a[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath(),t.moveTo(u[0],u[1]),t.lineTo(c[0],c[1]),t.lineTo(h[0],h[1]),t.lineTo(h[0],h[1]),t.lineTo(f[0],f[1]),t.closePath(),t.moveTo(d[0],d[1]),t.lineTo(g[0],g[1]),t.lineTo(v[0],v[1]),t.lineTo(v[0],v[1]),t.lineTo(y[0],y[1]),t.closePath(),t.moveTo(m[0],m[1]),t.lineTo(_[0],_[1]),t.lineTo(x[0],x[1]),t.lineTo(x[0],x[1]),t.lineTo(b[0],b[1]),t.closePath()},w.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},w.scale(1070)}function m(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=.05346&&i<.0897&&r>=-.13388&&r<-.0322?u:l).invert(t)},h.stream=function(e){return t&&r===e?t:t=m([l.stream(r=e),u.stream(e)])},h.precision=function(t){return arguments.length?(l.precision(t),u.precision(t),p()):l.precision()},h.scale=function(t){return arguments.length?(l.scale(t),u.scale(t),h.translate(l.translate())):l.scale()},h.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),n=+t[0],r=+t[1];return o=l.translate(t).clipExtent([[n-.06857*e,r-.1288*e],[n+.13249*e,r+.06*e]]).stream(c),a=u.translate([n+.1*e,r-.094*e]).clipExtent([[n-.1331*e+i,r+.053457*e+i],[n-.0354*e-i,r+.08969*e-i]]).stream(c),p()},h.fitExtent=function(t,e){return f(h,t,e)},h.fitSize=function(t,e){return d(h,t,e)},h.drawCompositionBorders=function(t){var e=l([-14.034675,34.965007]),n=l([-7.4208899,35.536988]),r=l([-7.3148275,33.54359]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1])},h.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},h.scale(2700)}function x(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=.0093&&i<.03678&&r>=-.03875&&r<-.0116?c:i>=-.0412&&i<.0091&&r>=-.07782&&r<-.01166?h:u).invert(t)},g.stream=function(e){return t&&r===e?t:t=x([u.stream(r=e),c.stream(e),h.stream(e)])},g.precision=function(t){return arguments.length?(u.precision(t),c.precision(t),h.precision(t),v()):u.precision()},g.scale=function(t){return arguments.length?(u.scale(t),c.scale(t),h.scale(.6*t),g.translate(u.translate())):u.scale()},g.translate=function(t){if(!arguments.length)return u.translate();var e=u.scale(),n=+t[0],r=+t[1];return o=u.translate(t).clipExtent([[n-.0115*e,r-.1138*e],[n+.2105*e,r+.0673*e]]).stream(p),a=c.translate([n-.0265*e,r+.025*e]).clipExtent([[n-.0388*e+i,r+.0093*e+i],[n-.0116*e-i,r+.0368*e-i]]).stream(p),s=h.translate([n-.045*e,r+-.02*e]).clipExtent([[n-.0778*e+i,r-.0413*e+i],[n-.0117*e-i,r+.0091*e-i]]).stream(p),v()},g.fitExtent=function(t,e){return f(g,t,e)},g.fitSize=function(t,e){return d(g,t,e)},g.drawCompositionBorders=function(t){var e=u([-12.8351,38.7113]),n=u([-10.8482,38.7633]),r=u([-10.8181,37.2072]),i=u([-12.7345,37.1573]),o=u([-16.0753,41.4436]),a=u([-10.9168,41.6861]),s=u([-10.8557,38.7747]),l=u([-15.6728,38.5505]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),t.moveTo(o[0],o[1]),t.lineTo(a[0],a[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath()},g.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},g.scale(4200)}function w(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=-.0676&&i<-.026&&r>=-.0857&&r<-.0263?u:l).invert(t)},h.stream=function(e){return t&&r===e?t:t=w([l.stream(r=e),u.stream(e)])},h.precision=function(t){return arguments.length?(l.precision(t),u.precision(t),p()):l.precision()},h.scale=function(t){return arguments.length?(l.scale(t),u.scale(t),h.translate(l.translate())):l.scale()},h.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),n=+t[0],r=+t[1];return o=l.translate(t).clipExtent([[n-.0262*e,r-.0734*e],[n+.1741*e,r+.079*e]]).stream(c),a=u.translate([n-.06*e,r-.04*e]).clipExtent([[n-.0857*e+i,r-.0676*e+i],[n-.0263*e-i,r-.026*e-i]]).stream(c),p()},h.fitExtent=function(t,e){return f(h,t,e)},h.fitSize=function(t,e){return d(h,t,e)},h.drawCompositionBorders=function(t){var e=l([-84.9032,2.3757]),n=l([-81.5047,2.3708]),r=l([-81.5063,-.01]),i=l([-84.9086,-.005]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath()},h.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},h.scale(3500)}function S(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=.2582&&i<.32&&r>=-.1036&&r<-.087?h:i>=-.01298&&i<.0133&&r>=-.11396&&r<-.05944?p:i>=.01539&&i<.03911&&r>=-.089&&r<-.0588?g:c).invert(t)},y.stream=function(e){return t&&r===e?t:t=S([c.stream(r=e),h.stream(e),p.stream(e),g.stream(e)])},y.precision=function(t){return arguments.length?(c.precision(t),h.precision(t),p.precision(t),g.precision(t),m()):c.precision()},y.scale=function(t){return arguments.length?(c.scale(t),h.scale(.15*t),p.scale(1.5*t),g.scale(1.5*t),y.translate(c.translate())):c.scale()},y.translate=function(t){if(!arguments.length)return c.translate();var e=c.scale(),n=+t[0],r=+t[1];return o=c.translate(t).clipExtent([[n-.059*e,r-.3835*e],[n+.4498*e,r+.3375*e]]).stream(v),a=h.translate([n-.087*e,r+.17*e]).clipExtent([[n-.1166*e+i,r+.2582*e+i],[n-.06*e-i,r+.32*e-i]]).stream(v),s=p.translate([n-.092*e,r-0*e]).clipExtent([[n-.114*e+i,r-.013*e+i],[n-.0594*e-i,r+.0133*e-i]]).stream(v),l=g.translate([n-.089*e,r-.0265*e]).clipExtent([[n-.089*e+i,r+.0154*e+i],[n-.0588*e-i,r+.0391*e-i]]).stream(v),m()},y.fitExtent=function(t,e){return f(y,t,e)},y.fitSize=function(t,e){return d(y,t,e)},y.drawCompositionBorders=function(t){var e=c([-82.6999,-51.3043]),n=c([-77.5442,-51.6631]),r=c([-78.0254,-55.186]),i=c([-83.6106,-54.7785]),o=c([-80.0638,-35.984]),a=c([-76.2153,-36.1811]),s=c([-76.2994,-37.6839]),l=c([-80.2231,-37.4757]),u=c([-78.442,-37.706]),h=c([-76.263,-37.8054]),f=c([-76.344,-39.1595]),d=c([-78.5638,-39.0559]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),t.moveTo(o[0],o[1]),t.lineTo(a[0],a[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath(),t.moveTo(u[0],u[1]),t.lineTo(h[0],h[1]),t.lineTo(f[0],f[1]),t.lineTo(f[0],f[1]),t.lineTo(d[0],d[1]),t.closePath()},y.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},y.scale(700)}function C(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=-.10925&&i<-.02701&&r>=-.135&&r<-.0397?c:i>=.04713&&i<.11138&&r>=-.03986&&r<.051?h:u).invert(t)},g.stream=function(e){return t&&r===e?t:t=C([u.stream(r=e),c.stream(e),h.stream(e)])},g.precision=function(t){return arguments.length?(u.precision(t),c.precision(t),h.precision(t),v()):u.precision()},g.scale=function(t){return arguments.length?(u.scale(t),c.scale(t),h.scale(.7*t),g.translate(u.translate())):u.scale()},g.translate=function(t){if(!arguments.length)return u.translate();var e=u.scale(),n=+t[0],r=+t[1];return o=u.translate(t).clipExtent([[n-.1352*e,r-.1091*e],[n+.117*e,r+.098*e]]).stream(p),a=c.translate([n-.0425*e,r-.005*e]).clipExtent([[n-.135*e+i,r-.1093*e+i],[n-.0397*e-i,r-.027*e-i]]).stream(p),s=h.translate(t).clipExtent([[n-.0399*e+i,r+.0471*e+i],[n+.051*e-i,r+.1114*e-i]]).stream(p),v()},g.fitExtent=function(t,e){return f(g,t,e)},g.fitSize=function(t,e){return d(g,t,e)},g.drawCompositionBorders=function(t){var e=u([126.01320483689143,41.621090310215585]),n=u([133.04304387025903,42.15087523707186]),r=u([133.3021766080688,37.43975444725098]),i=u([126.87889168628224,36.95488945159779]),o=u([132.9,29.8]),a=u([134,33]),s=u([139.3,33.2]),l=u([139.16,30.5]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),t.moveTo(o[0],o[1]),t.lineTo(a[0],a[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1])},g.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},g.scale(2200)}function P(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=.029&&i<.0864&&r>=-.14&&r<-.0996?b:i>=0&&i<.029&&r>=-.14&&r<-.0996?w:i>=-.032&&i<0&&r>=-.14&&r<-.0996?M:i>=-.052&&i<-.032&&r>=-.14&&r<-.0996?S:i>=-.076&&i<.052&&r>=-.14&&r<-.0996?j:i>=-.076&&i<-.052&&r>=.0967&&r<.1371?C:i>=-.052&&i<-.02&&r>=.0967&&r<.1371?E:i>=-.02&&i<.012&&r>=.0967&&r<.1371?T:i>=.012&&i<.033&&r>=.0967&&r<.1371?k:i>=.033&&i<.0864&&r>=.0967&&r<.1371?A:x).invert(t)},B.stream=function(e){return t&&r===e?t:t=P([x.stream(r=e),b.stream(e),w.stream(e),M.stream(e),S.stream(e),j.stream(e),C.stream(e),E.stream(e),T.stream(e),k.stream(e),A.stream(e),O.stream(e)])},B.precision=function(t){return arguments.length?(x.precision(t),b.precision(t),w.precision(t),M.precision(t),S.precision(t),j.precision(t),C.precision(t),E.precision(t),T.precision(t),k.precision(t),A.precision(t),O.precision(t),L()):x.precision()},B.scale=function(t){return arguments.length?(x.scale(t),b.scale(.6*t),w.scale(1.6*t),M.scale(1.4*t),S.scale(5*t),j.scale(1.3*t),C.scale(1.6*t),E.scale(1.2*t),T.scale(.3*t),k.scale(2.7*t),A.scale(.5*t),O.scale(.06*t),B.translate(x.translate())):x.scale()},B.translate=function(t){if(!arguments.length)return x.translate();var e=x.scale(),n=+t[0],r=+t[1];return o=x.translate(t).clipExtent([[n-.0996*e,r-.0908*e],[n+.0967*e,r+.0864*e]]).stream(I),a=b.translate([n-.12*e,r+.0575*e]).clipExtent([[n-.14*e+i,r+.029*e+i],[n-.0996*e-i,r+.0864*e-i]]).stream(I),s=w.translate([n-.12*e,r+.013*e]).clipExtent([[n-.14*e+i,r+0*e+i],[n-.0996*e-i,r+.029*e-i]]).stream(I),l=M.translate([n-.12*e,r-.014*e]).clipExtent([[n-.14*e+i,r-.032*e+i],[n-.0996*e-i,r+0*e-i]]).stream(I),u=S.translate([n-.12*e,r-.044*e]).clipExtent([[n-.14*e+i,r-.052*e+i],[n-.0996*e-i,r-.032*e-i]]).stream(I),c=j.translate([n-.12*e,r-.065*e]).clipExtent([[n-.14*e+i,r-.076*e+i],[n-.0996*e-i,r-.052*e-i]]).stream(I),h=C.translate([n+.117*e,r-.064*e]).clipExtent([[n+.0967*e+i,r-.076*e+i],[n+.1371*e-i,r-.052*e-i]]).stream(I),p=E.translate([n+.116*e,r-.0355*e]).clipExtent([[n+.0967*e+i,r-.052*e+i],[n+.1371*e-i,r-.02*e-i]]).stream(I),g=T.translate([n+.116*e,r-.0048*e]).clipExtent([[n+.0967*e+i,r-.02*e+i],[n+.1371*e-i,r+.012*e-i]]).stream(I),v=k.translate([n+.116*e,r+.022*e]).clipExtent([[n+.0967*e+i,r+.012*e+i],[n+.1371*e-i,r+.033*e-i]]).stream(I),m=O.translate([n+.11*e,r+.045*e]).clipExtent([[n+.0967*e+i,r+.033*e+i],[n+.1371*e-i,r+.06*e-i]]).stream(I),y=A.translate([n+.115*e,r+.075*e]).clipExtent([[n+.0967*e+i,r+.06*e+i],[n+.1371*e-i,r+.0864*e-i]]).stream(I),L()},B.fitExtent=function(t,e){return f(B,t,e)},B.fitSize=function(t,e){return d(B,t,e)},B.drawCompositionBorders=function(t){var e,n,r,i;e=x([-7.938886725111036,43.7219460918835]),n=x([-4.832080896458295,44.12930268549372]),r=x([-4.205299743793263,40.98096346967365]),i=x([-7.071796453126152,40.610037319181444]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([-8.42751373617692,45.32889452553031]),n=x([-5.18599305777107,45.7566442062976]),r=x([-4.832080905154431,44.129302726751426]),i=x([-7.938886737126192,43.72194613263854]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([-9.012656899657046,47.127733821030176]),n=x([-5.6105244772793155,47.579777861410626]),r=x([-5.185993067168585,45.756644248170346]),i=x([-8.427513749141811,45.32889456686326]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([-9.405747558985553,48.26506375557457]),n=x([-5.896175018439575,48.733352850851624]),r=x([-5.610524487556043,47.57977790393761]),i=x([-9.012656913808351,47.127733862971255]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([-9.908436061346974,49.642448789505856]),n=x([-6.262026716233124,50.131426841787174]),r=x([-5.896175029331232,48.73335289377258]),i=x([-9.40574757396393,48.26506379787767]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([11.996907706504462,50.16039028163579]),n=x([15.649907879773343,49.68279246765253]),r=x([15.156712840526632,48.30371557625831]),i=x([11.64122661754411,48.761078240546816]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([11.641226606955788,48.7610781975889]),n=x([15.156712825832164,48.30371553390465]),r=x([14.549932166241172,46.4866532486199]),i=x([11.204443787952183,46.91899233914248]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([11.204443778297161,46.918992296823646]),n=x([14.549932152815039,46.486653206856396]),r=x([13.994409796764009,44.695833444323256]),i=x([10.805306599253848,45.105133870684924]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([10.805306590412085,45.10513382903308]),n=x([13.99440978444733,44.695833403183606]),r=x([13.654633799024392,43.53552468558152]),i=x([10.561516803980956,43.930671459798624]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([10.561516795617383,43.93067141859757]),n=x([13.654633787361952,43.5355246448671]),r=x([12.867691604239901,40.640701985019405]),i=x([9.997809515987688,41.00288343254471]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([10.8,42.4]),n=x([12.8,42.13]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1])},B.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},B.scale(2700)}function k(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=-.31&&i<-.24&&r>=.14&&r<.24?b:i>=-.24&&i<-.17&&r>=.14&&r<.24?w:i>=-.17&&i<-.12&&r>=.21&&r<.24?S:i>=-.17&&i<-.14&&r>=.14&&r<.165?j:i>=-.17&&i<-.1&&r>=.14&&r<.24?M:i>=-.1&&i<-.03&&r>=.14&&r<.24?C:i>=-.03&&i<.04&&r>=.14&&r<.24?E:i>=-.31&&i<-.24&&r>=.24&&r<.34?P:i>=-.24&&i<-.17&&r>=.24&&r<.34?T:i>=-.17&&i<-.1&&r>=.24&&r<.34?A:i>=-.1&&i<-.03&&r>=.24&&r<.34?O:x).invert(t)},B.stream=function(e){return t&&r===e?t:t=k([x.stream(r=e),w.stream(e),P.stream(e),b.stream(e),E.stream(e),C.stream(e),T.stream(e),A.stream(e),O.stream(e),M.stream(e),S.stream(e),j.stream(e)])},B.precision=function(t){return arguments.length?(x.precision(t),w.precision(t),P.precision(t),b.precision(t),E.precision(t),C.precision(t),T.precision(t),A.precision(t),O.precision(t),M.precision(t),S.precision(t),j.precision(t),L()):x.precision()},B.scale=function(t){return arguments.length?(x.scale(t),b.scale(3*t),w.scale(.8*t),P.scale(3.5*t),A.scale(2.7*t),M.scale(2*t),S.scale(2*t),j.scale(2*t),C.scale(3*t),E.scale(t),T.scale(5.5*t),O.scale(6*t),B.translate(x.translate())):x.scale()},B.translate=function(t){if(!arguments.length)return x.translate();var e=x.scale(),n=+t[0],r=+t[1];return o=x.translate([n-.08*e,r]).clipExtent([[n-.51*e,r-.33*e],[n+.5*e,r+.33*e]]).stream(I),a=b.translate([n+.19*e,r-.275*e]).clipExtent([[n+.14*e+i,r-.31*e+i],[n+.24*e-i,r-.24*e-i]]).stream(I),s=w.translate([n+.19*e,r-.205*e]).clipExtent([[n+.14*e+i,r-.24*e+i],[n+.24*e-i,r-.17*e-i]]).stream(I),l=M.translate([n+.19*e,r-.135*e]).clipExtent([[n+.14*e+i,r-.17*e+i],[n+.24*e-i,r-.1*e-i]]).stream(I),u=S.translate([n+.225*e,r-.147*e]).clipExtent([[n+.21*e+i,r-.17*e+i],[n+.24*e-i,r-.12*e-i]]).stream(I),c=j.translate([n+.153*e,r-.15*e]).clipExtent([[n+.14*e+i,r-.17*e+i],[n+.165*e-i,r-.14*e-i]]).stream(I),h=C.translate([n+.19*e,r-.065*e]).clipExtent([[n+.14*e+i,r-.1*e+i],[n+.24*e-i,r-.03*e-i]]).stream(I),p=E.translate([n+.19*e,r+.005*e]).clipExtent([[n+.14*e+i,r-.03*e+i],[n+.24*e-i,r+.04*e-i]]).stream(I),g=P.translate([n+.29*e,r-.275*e]).clipExtent([[n+.24*e+i,r-.31*e+i],[n+.34*e-i,r-.24*e-i]]).stream(I),v=T.translate([n+.29*e,r-.205*e]).clipExtent([[n+.24*e+i,r-.24*e+i],[n+.34*e-i,r-.17*e-i]]).stream(I),y=A.translate([n+.29*e,r-.135*e]).clipExtent([[n+.24*e+i,r-.17*e+i],[n+.34*e-i,r-.1*e-i]]).stream(I),m=O.translate([n+.29*e,r-.065*e]).clipExtent([[n+.24*e+i,r-.1*e+i],[n+.34*e-i,r-.03*e-i]]).stream(I),L()},B.fitExtent=function(t,e){return f(B,t,e)},B.fitSize=function(t,e){return d(B,t,e)},B.drawCompositionBorders=function(t){var e,n,r,i;e=x([42.45755610828648,63.343658547914934]),n=x([52.65837266667029,59.35045080290929]),r=x([47.19754502247785,56.12653496548117]),i=x([37.673034273363044,59.61638268506111]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([59.41110754003403,62.35069727399336]),n=x([66.75050228640794,57.11797303636038]),r=x([60.236065725110436,54.63331433818992]),i=x([52.65837313153311,59.350450804599355]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([48.81091130080243,66.93353402634641]),n=x([59.41110730654679,62.35069740653086]),r=x([52.6583728974441,59.3504509222445]),i=x([42.45755631675751,63.34365868805821]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([31.054198418446475,52.1080673766184]),n=x([39.09869284884117,49.400700047190554]),r=x([36.0580811499175,46.02944174908498]),i=x([28.690508588835726,48.433126979386415]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([33.977877745912025,55.849945501331]),n=x([42.75328432167726,52.78455122462353]),r=x([39.09869297540224,49.400700176148625]),i=x([31.05419851807008,52.10806751810923]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([52.658372900759296,59.35045068526415]),n=x([60.23606549583304,54.63331423800264]),r=x([54.6756370953122,51.892298789399455]),i=x([47.19754524788189,56.126534861222794]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([47.19754506082455,56.126534735591456]),n=x([54.675636900123514,51.892298681337095]),r=x([49.94448648951486,48.98775484983285]),i=x([42.75328468716108,52.78455126060818]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([42.75328453416769,52.78455113209101]),n=x([49.94448632339758,48.98775473706457]),r=x([45.912339990394315,45.99361784987003]),i=x([39.09869317356607,49.40070009378711]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([37.673034114296634,59.61638254183119]),n=x([47.197544835420544,56.126534839849846]),r=x([42.75328447467064,52.78455135314068]),i=x([33.977877870363905,55.849945644671145]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([44.56748486446032,57.26489367845818]),r=x([43.9335791193588,53.746540942601726]),i=x([43,56]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=x([37.673034114296634,59.61638254183119]),n=x([40.25902691953466,58.83002044222639]),r=x([38.458270492742024,57.26232178028002]),i=x([35.97754948030156,58.00266637992386]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath()},B.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},B.scale(750)}function O(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=-.0067&&i<.0015&&r>=-.0232&&r<-.0154?h:i>=-.022&&i<-.014&&r>=-.023&&r<-.014?p:c).invert(t)},v.stream=function(e){return t&&o===e?t:t=O([c.stream(o=e),h.stream(e),p.stream(e)])},v.precision=function(t){return arguments.length?(c.precision(t),h.precision(t),p.precision(t),y()):c.precision()},v.scale=function(t){return arguments.length?(c.scale(t),h.scale(t),p.scale(t),v.translate(c.translate())):c.scale()},v.translate=function(t){if(!arguments.length)return c.translate();var e=c.scale(),n=+t[0],r=+t[1];return a=c.translate(t).clipExtent([[n-.0245*e,r-.026*e],[n+.023*e,r+.026*e]]).stream(g),s=h.translate([n-.0186*e,r-.00325*e]).clipExtent([[n-.0232*e+i,r-.0067*e+i],[n-.0154*e-i,r+.0015*e-i]]).stream(g),l=p.translate([n-.0185*e,r-.017*e]).clipExtent([[n-.023*e+i,r-.022*e+i],[n-.014*e-i,r-.014*e-i]]).stream(g),y()},v.fitExtent=function(t,e){return f(v,t,e)},v.fitSize=function(t,e){return d(v,t,e)},v.drawCompositionBorders=function(t){var e=c([3.30573,52.5562]),n=c([4.043,52.572]),r=c([4.0646,52.1017]),i=c([3.3382,52.0861]),o=c([3.262,53.439]),a=c([4.1373,53.4571]),s=c([4.1574,52.9946]),l=c([3.2951,52.9768]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),t.moveTo(o[0],o[1]),t.lineTo(a[0],a[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath()},v.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},v.scale(4200)}function B(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=-.0521&&i<.0229&&r>=-.0111&&r<.1?u:l).invert(t)},h.stream=function(e){return t&&r===e?t:t=B([l.stream(r=e),u.stream(e)])},h.precision=function(t){return arguments.length?(l.precision(t),u.precision(t),p()):l.precision()},h.scale=function(t){return arguments.length?(l.scale(t),u.scale(.615*t),h.translate(l.translate())):l.scale()},h.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),n=+t[0],r=+t[1];return o=l.translate(t).clipExtent([[n-.11*e,r-.0521*e],[n-.0111*e,r+.0521*e]]).stream(c),a=u.translate([n+.09*e,r-0*e]).clipExtent([[n-.0111*e+i,r-.0521*e+i],[n+.1*e-i,r+.024*e-i]]).stream(c),p()},h.fitExtent=function(t,e){return f(h,t,e)},h.fitSize=function(t,e){return d(h,t,e)},h.drawCompositionBorders=function(t){var e=l([106.3214,2.0228]),n=l([105.1843,2.3761]),r=l([104.2151,3.3618]),i=l([104.215,4.5651]);t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1])},h.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},h.scale(4800)}function F(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=-.02&&i<0&&r>=-.038&&r<-.005?c:i>=0&&i<.02&&r>=-.038&&r<-.005?h:u).invert(t)},g.stream=function(e){return t&&r===e?t:t=F([u.stream(r=e),c.stream(e),h.stream(e)])},g.precision=function(t){return arguments.length?(u.precision(t),c.precision(t),h.precision(t),v()):u.precision()},g.scale=function(t){return arguments.length?(u.scale(t),c.scale(1.5*t),h.scale(4*t),g.translate(u.translate())):u.scale()},g.translate=function(t){if(!arguments.length)return u.translate();var e=u.scale(),n=+t[0],r=+t[1];return o=u.translate(t).clipExtent([[n-.005*e,r-.02*e],[n+.038*e,r+.02*e]]).stream(p),a=c.translate([n-.025*e,r-.01*e]).clipExtent([[n-.038*e+i,r-.02*e+i],[n-.005*e-i,r+0*e-i]]).stream(p),s=h.translate([n-.025*e,r+.01*e]).clipExtent([[n-.038*e+i,r-0*e+i],[n-.005*e-i,r+.02*e-i]]).stream(p),v()},g.fitExtent=function(t,e){return f(g,t,e)},g.fitSize=function(t,e){return d(g,t,e)},g.drawCompositionBorders=function(t){var e,n,r,i;e=u([9.21327272751682,2.645820439454123]),n=u([11.679126293239872,2.644755519268689]),r=u([11.676845389029227,.35307824637606433]),i=u([9.213572917774014,.35414205204417754]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=u([7.320873711543669,2.64475551449975]),n=u([9.213272722738658,2.645820434679803]),r=u([9.213422896480349,1.4999812505283054]),i=u([7.322014760520787,1.4989168878985566]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath(),e=u([7.3220147605302905,1.4989168783492766]),n=u([9.213422896481598,1.499981240979021]),r=u([9.213572912999604,.354142056817247]),i=u([7.323154615739809,.353078251154504]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath()},g.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},g.scale(12e3)}function R(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i=-.089&&i<.06&&r>=.029&&r<.046?u:l).invert(t)},h.stream=function(e){return t&&r===e?t:t=R([l.stream(r=e),u.stream(e)])},h.precision=function(t){return arguments.length?(l.precision(t),u.precision(t),p()):l.precision()},h.scale=function(t){return arguments.length?(l.scale(t),u.scale(t),h.translate(l.translate())):l.scale()},h.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),n=+t[0],r=+t[1];return o=l.translate(t).clipExtent([[n-.065*e,r-.089*e],[n+.075*e,r+.089*e]]).stream(c),a=u.translate([n+.01*e,r+.025*e]).clipExtent([[n+.029*e+i,r-.089*e+i],[n+.046*e-i,r-.06*e-i]]).stream(c),p()},h.fitExtent=function(t,e){return f(h,t,e)},h.fitSize=function(t,e){return d(h,t,e)},h.drawCompositionBorders=function(t){var e,n,r,i;e=l([-1.113205870242365,59.64920050773357]),n=l([.807899092399606,59.59085836472269]),r=l([.5778611961420386,57.93467822832577]),i=l([-1.25867782078448,57.99029450085142]),t.moveTo(e[0],e[1]),t.lineTo(n[0],n[1]),t.lineTo(r[0],r[1]),t.lineTo(i[0],i[1]),t.closePath()},h.getCompositionBorders=function(){var t=n.path();return this.drawCompositionBorders(t),t.toString()},h.scale(2800)}t.geoAlbersUk=N,t.geoAlbersUsa=g,t.geoAlbersUsaTerritories=y,t.geoConicConformalEurope=A,t.geoConicConformalFrance=T,t.geoConicConformalNetherlands=I,t.geoConicConformalPortugal=b,t.geoConicConformalSpain=_,t.geoConicEquidistantJapan=E,t.geoMercatorEcuador=M,t.geoMercatorEquatorialGuinea=D,t.geoMercatorMalaysia=L,t.geoTransverseMercatorChile=j,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(/*! d3-geo */"./node_modules/_d3-geo@2.0.1@d3-geo/dist/d3-geo.js"),n(/*! d3-path */"./node_modules/_d3-path@2.0.0@d3-path/dist/d3-path.js"))},"./node_modules/_d3-dsv@1.2.0@d3-dsv/dist/d3-dsv.js": /*!**********************************************************!*\ !*** ./node_modules/_d3-dsv@1.2.0@d3-dsv/dist/d3-dsv.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){!function(t){var e={},n={},r=34,i=10,o=13;function a(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function s(t,e){var n=a(t);return function(r,i){return e(n(r),i,t)}}function l(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function u(t,e){var n=t+"",r=n.length;return r9999?"+"+u(t,6):u(t,4)}function h(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":c(t.getUTCFullYear())+"-"+u(t.getUTCMonth()+1,2)+"-"+u(t.getUTCDate(),2)+(i?"T"+u(e,2)+":"+u(n,2)+":"+u(r,2)+"."+u(i,3)+"Z":r?"T"+u(e,2)+":"+u(n,2)+":"+u(r,2)+"Z":n||e?"T"+u(e,2)+":"+u(n,2)+"Z":"")}function f(t){var u=new RegExp('["'+t+"\n\r]"),c=t.charCodeAt(0);function f(t,e){var n,r,i=d(t,(function(t,i){if(n)return n(t,i-1);r=t,n=e?s(t,e):a(t)}));return i.columns=r||[],i}function d(t,a){var s,l=[],u=t.length,h=0,f=0,d=u<=0,p=!1;function g(){if(d)return n;if(p)return p=!1,e;var a,s,l=h;if(t.charCodeAt(l)===r){for(;h++=u?d=!0:(s=t.charCodeAt(h++))===i?p=!0:s===o&&(p=!0,t.charCodeAt(h)===i&&++h),t.slice(l+1,a-1).replace(/""/g,'"')}for(;h0?1:t<0?-1:0},g=Math.sin,v=Math.tan,y=1e-6,m=1e-12,_=Math.PI,x=_/2,b=_/4,w=Math.SQRT1_2,M=A(2),S=A(_),j=2*_,C=180/_,E=_/180;function P(t){return t?t/Math.sin(t):1}function T(t){return t>1?x:t<-1?-x:Math.asin(t)}function k(t){return t>1?0:t<-1?_:Math.acos(t)}function A(t){return t>0?Math.sqrt(t):0}function O(t){return((t=s(2*t))-1)/(t+1)}function I(t){return(s(t)-s(-t))/2}function B(t){return(s(t)+s(-t))/2}function L(t){return u(t+A(t*t+1))}function F(t){return u(t+A(t*t-1))}function D(t){var e=v(t/2),n=2*u(a(t/2))/(e*e);function i(t,e){var r=a(t),i=a(e),o=g(e),s=i*r,l=-((1-s?u((1+s)/2)/(1-s):-.5)+n/(1+s));return[l*i*g(t),l*o]}return i.invert=function(e,i){var s,l=A(e*e+i*i),c=-t/2,h=50;if(!l)return[0,0];do{var f=c/2,d=a(f),p=g(f),m=v(f),_=u(1/d);c-=s=(2/m*_-n*m-l)/(-_/(p*p)+1-n/(2*d*d))}while(r(s)>y&&--h>0);var x=g(c);return[o(e*x,l*a(c)),T(i*x/l)]},i}var R=function(){var t=x,n=e.geoProjectionMutator(D),r=n(t);return r.radius=function(e){return arguments.length?n(t=e*E):t*C},r.scale(179.976).clipAngle(147)};function N(t,e){var n=a(e),r=P(k(n*a(t/=2)));return[2*n*g(t)*r,g(e)*r]}N.invert=function(t,e){if(!(t*t+4*e*e>_*_+y)){var n=t,i=e,o=25;do{var s,l=g(n),u=g(n/2),c=a(n/2),h=g(i),f=a(i),d=g(2*i),p=h*h,v=f*f,m=u*u,x=1-v*c*c,b=x?k(f*c)*A(s=1/x):s=0,w=2*b*f*u-t,M=b*h-e,S=s*(v*m+b*f*c*p),j=s*(.5*l*d-2*b*h*u),C=.25*s*(d*u-b*h*v*l),E=s*(p*c+b*m*f),P=j*C-E*S;if(!P)break;var T=(M*j-w*E)/P,O=(w*C-M*S)/P;n-=T,i-=O}while((r(T)>y||r(O)>y)&&--o>0);return[n,i]}};var z=function(){return e.geoProjection(N).scale(152.63)};function H(t){var e=g(t),n=a(t),i=t>=0?1:-1,s=v(i*t),l=(1+e-n)/2;function u(t,r){var u=a(r),c=a(t/=2);return[(1+u)*g(t),(i*r>-o(c,s)-.001?0:10*-i)+l+g(r)*n-(1+u)*e*c]}return u.invert=function(t,u){var c=0,h=0,f=50;do{var d=a(c),p=g(c),v=a(h),m=g(h),_=1+v,x=_*p-t,b=l+m*n-_*e*d-u,w=_*d/2,M=-p*m,S=e*_*p/2,j=n*v+e*d*m,C=M*S-j*w,E=(b*M-x*j)/C/2,P=(x*S-b*w)/C;c-=E,h-=P}while((r(E)>y||r(P)>y)&&--f>0);return i*h>-o(a(c),s)-.001?[2*c,h]:null},u}var G=function(){var t=20*E,n=t>=0?1:-1,r=v(n*t),i=e.geoProjectionMutator(H),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(r=v((n=(t=e*E)>=0?1:-1)*t),i(t)):t*C},s.stream=function(e){var i=s.rotate(),u=l(e),c=(s.rotate([0,0]),l(e));return s.rotate(i),u.sphere=function(){c.polygonStart(),c.lineStart();for(var e=-180*n;n*e<180;e+=90*n)c.point(e,90*n);for(;n*(e-=t)>=-180;)c.point(e,n*-o(a(e*E/2),r)*C);c.lineEnd(),c.polygonEnd()},u},s.scale(218.695).center([0,28.0974])};function Y(t,e){var n=v(e/2),r=A(1-n*n),i=1+r*a(t/=2),o=g(t)*r/i,s=n/i,l=o*o,u=s*s;return[4/3*o*(3+l-3*u),4/3*s*(3+3*l-u)]}Y.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&r(e)>1)return null;var n=1+t*t+e*e,i=A((n-A(n*n-4*e*e))/2),s=T(i)/3,l=i?F(r(e/i))/3:L(r(t))/3,u=a(s),c=B(l),h=c*c-u*u;return[2*p(t)*o(I(l)*u,.25-h),2*p(e)*o(c*g(s),.25+h)]};var V=function(){return e.geoProjection(Y).scale(66.1603)},X=A(8),q=u(1+M);function W(t,e){var n=r(e);return nm&&--c>0);return[t/(a(l)*(X-1/g(l))),p(e)*l]};var U=function(){return e.geoProjection(W).scale(112.314)};function Z(t){var n=2*_/t;function s(t,i){var s=e.geoAzimuthalEquidistantRaw(t,i);if(r(t)>x){var l=o(s[1],s[0]),u=A(s[0]*s[0]+s[1]*s[1]),c=n*d((l-x)/n)+x,h=o(g(l-=c),2-a(l));l=c+T(_/u*g(h))-h,s[0]=u*a(l),s[1]=u*g(l)}return s}return s.invert=function(t,r){var s=A(t*t+r*r);if(s>x){var l=o(r,t),u=n*d((l-x)/n)+x,c=l>u?-1:1,h=s*a(u-l),f=1/v(c*k((h-_)/A(_*(_-2*h)+s*s)));l=u+2*i((f+c*A(f*f-3))/3),t=s*a(l),r=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,r)},s}var K=function(){var t=5,n=e.geoProjectionMutator(Z),r=n(t),i=r.stream,s=.01,l=-a(s*E),u=g(s*E);return r.lobes=function(e){return arguments.length?n(t=+e):t},r.stream=function(e){var n=r.rotate(),c=i(e),h=(r.rotate([0,0]),i(e));return r.rotate(n),c.sphere=function(){h.polygonStart(),h.lineStart();for(var e=0,n=360/t,r=2*_/t,i=90-180/t,c=x;ey&&--o>0);return e/2}function $(t,e,n){function r(r,i){return[t*r*a(i=Q(n,i)),e*g(i)]}return r.invert=function(r,i){return i=T(i/e),[r/(t*a(i)),T((2*i+g(2*i))/n)]},r}var J=$(M/x,M,_),tt=function(){return e.geoProjection(J).scale(169.529)},et=2.00276,nt=1.11072;function rt(t,e){var n=Q(_,e);return[et*t/(1/a(e)+nt/a(n)),(e+M*g(n))/et]}rt.invert=function(t,e){var n,i,o=et*e,s=e<0?-b:b,l=25;do{i=o-M*g(s),s-=n=(g(2*s)+2*s-_*g(i))/(2*a(2*s)+2+_*a(i)*M*a(s))}while(r(n)>y&&--l>0);return i=o-M*g(s),[t*(1/a(i)+nt/a(s))/et,i]};var it=function(){return e.geoProjection(rt).scale(160.857)},ot=function(t){var n=0,r=e.geoProjectionMutator(t),i=r(n);return i.parallel=function(t){return arguments.length?r(n=t*E):n*C},i};function at(t,e){return[t*a(e),e]}at.invert=function(t,e){return[t/a(e),e]};var st=function(){return e.geoProjection(at).scale(152.63)};function lt(t){if(!t)return at;var e=1/v(t);function n(n,r){var i=e+t-r,o=i?n*a(r)/i:i;return[i*g(o),e-i*a(o)]}return n.invert=function(n,r){var i=A(n*n+(r=e-r)*r),s=e+t-i;return[i/a(s)*o(n,r),s]},n}var ut=function(){return ot(lt).scale(123.082).center([0,26.1441]).parallel(45)};function ct(t){function e(e,n){var r=x-n,i=r?e*t*g(r)/r:r;return[r*g(i)/t,x-r*a(i)]}return e.invert=function(e,n){var r=e*t,i=x-n,a=A(r*r+i*i),s=o(r,i);return[(a?a/g(a):1)*s/t,x-a]},e}var ht=function(){var t=.5,n=e.geoProjectionMutator(ct),r=n(t);return r.fraction=function(e){return arguments.length?n(t=+e):t},r.scale(158.837)},ft=$(1,4/_,_),dt=function(){return e.geoProjection(ft).scale(152.63)};function pt(t,e,n,i,s,l){var u,c=a(l);if(r(t)>1||r(l)>1)u=k(n*s+e*i*c);else{var h=g(t/2),f=g(l/2);u=2*T(A(h*h+e*i*f*f))}return r(u)>y?[u,o(i*g(l),e*s-n*i*c)]:[0,0]}function gt(t,e,n){return k((t*t+e*e-n*n)/(2*t*e))}function vt(t){return t-2*_*l((t+_)/(2*_))}function yt(t,e,n){for(var r,i=[[t[0],t[1],g(t[1]),a(t[1])],[e[0],e[1],g(e[1]),a(e[1])],[n[0],n[1],g(n[1]),a(n[1])]],o=i[2],s=0;s<3;++s,o=r)r=i[s],o.v=pt(r[1]-o[1],o[3],o[2],r[3],r[2],r[0]-o[0]),o.point=[0,0];var l=gt(i[0].v[0],i[2].v[0],i[1].v[0]),u=gt(i[0].v[0],i[1].v[0],i[2].v[0]),c=_-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var h=[i[2].point[0]=i[0].point[0]+i[2].v[0]*a(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];function f(t,e){var n,r=g(e),o=a(e),s=new Array(3);for(n=0;n<3;++n){var l=i[n];if(s[n]=pt(e-l[1],l[3],l[2],o,r,t-l[0]),!s[n][0])return l.point;s[n][1]=vt(s[n][1]-l.v[1])}var f=h.slice();for(n=0;n<3;++n){var d=2==n?0:n+1,p=gt(i[n].v[0],s[n][0],s[d][0]);s[n][1]<0&&(p=-p),n?1==n?(p=u-p,f[0]-=s[n][0]*a(p),f[1]-=s[n][0]*g(p)):(p=c-p,f[0]+=s[n][0]*a(p),f[1]+=s[n][0]*g(p)):(f[0]+=s[n][0]*a(p),f[1]-=s[n][0]*g(p))}return f[0]/=3,f[1]/=3,f}return f}function mt(t){return t[0]*=E,t[1]*=E,t}function _t(){return xt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function xt(t,n,r){var i=e.geoCentroid({type:"MultiPoint",coordinates:[t,n,r]}),o=[-i[0],-i[1]],a=e.geoRotation(o),s=e.geoProjection(yt(mt(a(t)),mt(a(n)),mt(a(r)))).rotate(o),l=s.center;return delete s.rotate,s.center=function(t){return arguments.length?l(a(t)):a.invert(l())},s.clipAngle(90)}function bt(t,e){var n=A(1-g(e));return[2/S*t*n,S*(1-n)]}bt.invert=function(t,e){var n=(n=e/S-1)*n;return[n>0?t*A(_/n)/2:0,T(1-n)]};var wt=function(){return e.geoProjection(bt).scale(95.6464).center([0,30])};function Mt(t){var e=v(t);function n(t,n){return[t,(t?t/g(t):1)*(g(n)*a(t)-e*a(n))]}return n.invert=e?function(t,n){t&&(n*=g(t)/t);var r=a(t);return[t,2*o(A(r*r+e*e-n*n)-r,e-n)]}:function(t,e){return[t,T(t?e*v(t)/t:e)]},n}var St=function(){return ot(Mt).scale(249.828).clipAngle(90)},jt=A(3);function Ct(t,e){return[jt*t*(2*a(2*e/3)-1)/S,jt*S*g(e/3)]}Ct.invert=function(t,e){var n=3*T(e/(jt*S));return[S*t/(jt*(2*a(2*n/3)-1)),n]};var Et=function(){return e.geoProjection(Ct).scale(156.19)};function Pt(t){var e=a(t);function n(t,n){return[t*e,g(n)/e]}return n.invert=function(t,n){return[t/e,T(n*e)]},n}var Tt=function(){return ot(Pt).parallel(38.58).scale(195.044)};function kt(t){var e=a(t);function n(t,n){return[t*e,(1+e)*v(n/2)]}return n.invert=function(t,n){return[t/e,2*i(n/(1+e))]},n}var At=function(){return ot(kt).scale(124.75)};function Ot(t,e){var n=A(8/(3*_));return[n*t*(1-r(e)/_),n*e]}Ot.invert=function(t,e){var n=A(8/(3*_)),i=e/n;return[t/(n*(1-r(i)/_)),i]};var It=function(){return e.geoProjection(Ot).scale(165.664)};function Bt(t,e){var n=A(4-3*g(r(e)));return[2/A(6*_)*t*n,p(e)*A(2*_/3)*(2-n)]}Bt.invert=function(t,e){var n=2-r(e)/A(2*_/3);return[t*A(6*_)/(2*n),p(e)*T((4-n*n)/3)]};var Lt=function(){return e.geoProjection(Bt).scale(165.664)};function Ft(t,e){var n=A(_*(4+_));return[2/n*t*(1+A(1-4*e*e/(_*_))),4/n*e]}Ft.invert=function(t,e){var n=A(_*(4+_))/2;return[t*n/(1+A(1-e*e*(4+_)/(4*_))),e*n/2]};var Dt=function(){return e.geoProjection(Ft).scale(180.739)};function Rt(t,e){var n=(2+x)*g(e);e/=2;for(var i=0,o=1/0;i<10&&r(o)>y;i++){var s=a(e);e-=o=(e+g(e)*(s+2)-n)/(2*s*(1+s))}return[2/A(_*(4+_))*t*(1+a(e)),2*A(_/(4+_))*g(e)]}Rt.invert=function(t,e){var n=e*A((4+_)/_)/2,r=T(n),i=a(r);return[t/(2/A(_*(4+_))*(1+i)),T((r+n*(i+2))/(2+x))]};var Nt=function(){return e.geoProjection(Rt).scale(180.739)};function zt(t,e){return[t*(1+a(e))/A(2+_),2*e/A(2+_)]}zt.invert=function(t,e){var n=A(2+_),r=e*n/2;return[n*t/(1+a(r)),r]};var Ht=function(){return e.geoProjection(zt).scale(173.044)};function Gt(t,e){for(var n=(1+x)*g(e),i=0,o=1/0;i<10&&r(o)>y;i++)e-=o=(e+g(e)-n)/(1+a(e));return n=A(2+_),[t*(1+a(e))/n,2*e/n]}Gt.invert=function(t,e){var n=1+x,r=A(n/2);return[2*t*r/(1+a(e*=r)),T((e+g(e))/n)]};var Yt=function(){return e.geoProjection(Gt).scale(173.044)},Vt=3+2*M;function Xt(t,e){var n=g(t/=2),r=a(t),o=A(a(e)),s=a(e/=2),l=g(e)/(s+M*r*o),c=A(2/(1+l*l)),h=A((M*s+(r+n)*o)/(M*s+(r-n)*o));return[Vt*(c*(h-1/h)-2*u(h)),Vt*(c*l*(h+1/h)-2*i(l))]}Xt.invert=function(t,e){if(!(n=Y.invert(t/1.2,1.065*e)))return null;var n,o=n[0],s=n[1],l=20;t/=Vt,e/=Vt;do{var f=o/2,d=s/2,p=g(f),v=a(f),m=g(d),_=a(d),b=a(s),S=A(b),j=m/(_+M*v*S),C=j*j,E=A(2/(1+C)),P=(M*_+(v+p)*S)/(M*_+(v-p)*S),T=A(P),k=T-1/T,O=T+1/T,I=E*k-2*u(T)-t,B=E*j*O-2*i(j)-e,L=m&&w*S*p*C/m,F=(M*v*_+S)/(2*(_+M*v*S)*(_+M*v*S)*S),D=-.5*j*E*E*E,R=D*L,N=D*F,z=(z=2*_+M*S*(v-p))*z*T,H=(M*v*_*S+b)/z,G=-M*p*m/(S*z),V=k*R-2*H/T+E*(H+H/P),X=k*N-2*G/T+E*(G+G/P),q=j*O*R-2*L/(1+C)+E*O*L+E*j*(H-H/P),W=j*O*N-2*F/(1+C)+E*O*F+E*j*(G-G/P),U=X*q-W*V;if(!U)break;var Z=(B*X-I*W)/U,K=(I*q-B*V)/U;o-=Z,s=c(-x,h(x,s-K))}while((r(Z)>y||r(K)>y)&&--l>0);return r(r(s)-x)s){var p=A(f),v=o(h,c),m=i*d(v/i),b=v-m,w=t*a(b),M=(t*g(b)-b*g(w))/(x-w),S=ne(b,M),j=(_-t)/re(S,w,_);c=p;var C,E=50;do{c-=C=(t+re(S,w,c)*j-p)/(S(c)*j)}while(r(C)>y&&--E>0);h=b*g(c),cs){var c=A(u),h=o(l,n),f=i*d(h/i),p=h-f;n=c*a(p),l=c*g(p);for(var v=n-x,y=g(n),b=l/y,w=ny||r(d)>y)&&--m>0);return[p,v]},c},ae=oe(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),se=function(){return e.geoProjection(ae).scale(149.995)},le=oe(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),ue=function(){return e.geoProjection(le).scale(153.93)},ce=oe(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045),he=function(){return e.geoProjection(ce).scale(130.945)};function fe(t,e){var n=t*t,r=e*e;return[t*(1-.162388*r)*(.87-952426e-9*n*n),e*(1+r/12)]}fe.invert=function(t,e){var n,i=t,o=e,a=50;do{var s=o*o;o-=n=(o*(1+s/12)-e)/(1+s/4)}while(r(n)>y&&--a>0);a=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=n=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(r(n)>y&&--a>0);return[i,o]};var de=function(){return e.geoProjection(fe).scale(131.747)},pe=oe(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762),ge=function(){return e.geoProjection(pe).scale(131.087)},ve=function(t){var e=t(x,0)[0]-t(-x,0)[0];function n(n,r){var i=n>0?-.5:.5,o=t(n+i*_,r);return o[0]-=i*e,o}return t.invert&&(n.invert=function(n,r){var i=n>0?-.5:.5,o=t.invert(n+i*e,r),a=o[0]-i*_;return a<-_?a+=2*_:a>_&&(a-=2*_),o[0]=a,o}),n};function ye(t,e){var n=p(t),i=p(e),s=a(e),l=a(t)*s,u=g(t)*s,c=g(i*e);t=r(o(u,c)),e=T(l),r(t-x)>y&&(t%=x);var h=me(t>_/4?x-t:t,e);return t>_/4&&(c=h[0],h[0]=-h[1],h[1]=-c),h[0]*=n,h[1]*=-i,h}function me(t,e){if(e===x)return[0,0];var n,i,o=g(e),s=o*o,l=s*s,u=1+l,c=1+3*l,h=1-l,f=T(1/A(u)),d=h+s*u*f,p=(1-o)/d,v=A(p),m=p*u,b=A(m),w=v*h;if(0===t)return[0,-(w+s*b)];var M,S=a(e),j=1/S,C=2*o*S,E=(-d*S-(-3*s+f*c)*C*(1-o))/(d*d),P=-j*C,k=-j*(s*u*E+p*c*C),O=-2*j*(h*(.5*E/v)-2*s*v*C),I=4*t/_;if(t>.222*_||e<_/4&&t>.175*_){if(n=(w+s*A(m*(1+l)-w*w))/(1+l),t>_/4)return[n,n];var B=n,L=.5*n;n=.5*(L+B),i=50;do{var F=n*(O+P*A(m-n*n))+k*T(n/b)-I;if(!F)break;F<0?L=n:B=n,n=.5*(L+B)}while(r(B-L)>y&&--i>0)}else{n=y,i=25;do{var D=n*n,R=A(m-D),N=O+P*R,z=n*N+k*T(n/b)-I;n-=M=R?z/(N+(k-P*D)/R):0}while(r(M)>y&&--i>0)}return[n,-w-s*A(m-n*n)]}function _e(t,e){for(var n=0,i=1,o=.5,s=50;;){var l=o*o,u=A(o),c=T(1/A(1+l)),h=1-l+o*(1+l)*c,f=(1-u)/h,d=A(f),p=f*(1+l),g=d*(1-l),v=A(p-t*t),y=e+g+o*v;if(r(i-n)0?n=o:i=o,o=.5*(n+i)}if(!s)return null;var x=T(u),b=a(x),w=1/b,M=2*u*b,S=(-h*b-(-3*o+c*(1+3*l))*M*(1-u))/(h*h);return[_/4*(t*(-2*w*(.5*S/d*(1-l)-2*o*d*M)+-w*M*v)+-w*(o*(1+l)*S+f*(1+3*l)*M)*T(t/A(p))),x]}ye.invert=function(t,e){r(t)>1&&(t=2*p(t)-t),r(e)>1&&(e=2*p(e)-e);var n=p(t),i=p(e),s=-n*t,l=-i*e,u=l/s<1,c=_e(u?l:s,u?s:l),h=c[0],f=c[1],d=a(f);return u&&(h=-x-h),[n*(o(g(h)*d,-g(f))+_),i*T(a(h)*d)]};var xe=function(){return e.geoProjection(ve(ye)).scale(239.75)};function be(t,e,n){var r,i,o;return t?(r=we(t,n),e?(o=(i=we(e,1-n))[1]*i[1]+n*r[0]*r[0]*i[0]*i[0],[[r[0]*i[2]/o,r[1]*r[2]*i[0]*i[1]/o],[r[1]*i[1]/o,-r[0]*r[2]*i[0]*i[2]/o],[r[2]*i[1]*i[2]/o,-n*r[0]*r[1]*i[0]/o]]):[[r[0],0],[r[1],0],[r[2],0]]):[[0,(i=we(e,1-n))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}function we(t,e){var n,o,l,u,c;if(e=1-y)return n=(1-e)/4,l=1/(o=B(t)),[(u=O(t))+n*((c=o*I(t))-t)/(o*o),l-n*u*l*(c-t),l+n*u*l*(c+t),2*i(s(t))-x+n*(c-t)/o];var h=[1,0,0,0,0,0,0,0,0],f=[A(e),0,0,0,0,0,0,0,0],d=0;for(o=A(1-e),c=1;r(f[d]/h[d])>y&&d<8;)n=h[d++],f[d]=(n-o)/2,h[d]=(n+o)/2,o=A(n*o),c*=2;l=c*h[d]*t;do{l=(T(u=f[d]*g(o=l)/h[d])+l)/2}while(--d);return[g(l),u=a(l),u/a(l-o),l]}function Me(t,e,n){var o=r(t),a=I(r(e));if(o){var s=1/g(o),l=1/(v(o)*v(o)),u=-(l+n*(a*a*s*s)-1+n),c=(-u+A(u*u-(n-1)*l*4))/2;return[Se(i(1/A(c)),n)*p(t),Se(i(A((c/l-1)/n)),1-n)*p(e)]}return[0,Se(i(a),1-n)*p(e)]}function Se(t,e){if(!e)return t;if(1===e)return u(v(t/2+b));for(var n=1,o=A(1-e),a=A(e),s=0;r(a)>y;s++){if(t%_){var l=i(o*v(t)/n);l<0&&(l+=_),t+=l+~~(t/_)*_}else t+=t;a=(n+o)/2,o=A(n*o),a=((n=a)-o)/2}return t/(f(2,s)*n)}function je(t,e){var n=(M-1)/(M+1),i=A(1-n*n),o=Se(x,i*i),l=-1,c=u(v(_/4+r(e)/2)),h=s(l*c)/A(n),f=Ce(h*a(l*t),h*g(l*t)),d=Me(f[0],f[1],i*i);return[-d[1],(e>=0?1:-1)*(.5*o-d[0])]}function Ce(t,e){var n=t*t,r=e+1,i=1-n-e*e;return[.5*((t>=0?x:-x)-o(i,2*t)),-.25*u(i*i+4*n)+.5*u(r*r+n)]}function Ee(t,e){var n=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/n,(t[1]*e[0]-t[0]*e[1])/n]}je.invert=function(t,e){var n=(M-1)/(M+1),r=A(1-n*n),a=-1,l=be(.5*Se(x,r*r)-e,-t,r*r),c=Ee(l[0],l[1]);return[o(c[1],c[0])/a,2*i(s(.5/a*u(n*c[0]*c[0]+n*c[1]*c[1])))-x]};var Pe=function(){return e.geoProjection(ve(je)).scale(151.496)};function Te(t,n){if(arguments.length<2&&(n=t),1===n)return e.geoAzimuthalEqualAreaRaw;if(n===1/0)return ke;function r(r,i){var o=e.geoAzimuthalEqualAreaRaw(r/n,i);return o[0]*=t,o}return r.invert=function(r,i){var o=e.geoAzimuthalEqualAreaRaw.invert(r/t,i);return o[0]*=n,o},r}function ke(t,e){return[t*a(e)/a(e/=2),2*g(e)]}ke.invert=function(t,e){var n=2*T(e/2);return[t*a(n/2)/a(n),n]};var Ae=function(){var t=2,n=e.geoProjectionMutator(Te),r=n(t);return r.coefficient=function(e){return arguments.length?n(t=+e):t},r.scale(169.529)};function Oe(t){var e=g(t),n=a(t),i=Ie(t);function s(t,o){var s=i(t,o);t=s[0],o=s[1];var l=g(o),u=a(o),c=a(t),h=k(e*l+n*u*c),f=g(h),d=r(f)>y?h/f:1;return[d*n*g(t),(r(t)>x?d:-d)*(e*u-n*l*c)]}return i.invert=Ie(-t),s.invert=function(t,n){var r=A(t*t+n*n),s=-g(r),l=a(r),u=r*l,c=-n*s,h=r*e,f=A(u*u+c*c-h*h),d=o(u*h+c*f,c*h-u*f),p=(r>x?-1:1)*o(t*s,r*a(d)*l+n*g(d)*s);return i.invert(p,d)},s}function Ie(t){var e=g(t),n=a(t);return function(t,r){var i=a(r),s=a(t)*i,l=g(t)*i,u=g(r);return[o(l,s*n-u*e),T(u*n+s*e)]}}var Be=function(){var t=0,n=e.geoProjectionMutator(Oe),r=n(t),i=r.rotate,o=r.stream,a=e.geoCircle();return r.parallel=function(e){if(!arguments.length)return t*C;var i=r.rotate();return n(t=e*E).rotate(i)},r.rotate=function(e){return arguments.length?(i.call(r,[e[0],e[1]-t*C]),a.center([-e[0],-e[1]]),r):((e=i.call(r))[1]+=t*C,e)},r.stream=function(t){return(t=o(t)).sphere=function(){t.polygonStart();var e,n=.01,r=a.radius(90-n)().coordinates[0],i=r.length-1,o=-1;for(t.lineStart();++o=0;)t.point((e=r[o])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},r.scale(79.4187).parallel(45).clipAngle(179.999)},Le=41+48/36+37/3600,Fe=Pt(0);function De(t){var e=Le*E,n=bt(_,e)[0]-bt(-_,e)[0],i=Fe(0,e)[1],o=bt(0,e)[1],a=S-o,s=j/t,u=4/j,f=i+a*a*4/j;function d(d,p){var g,v=r(p);if(v>e){var y=h(t-1,c(0,l((d+_)/s)));(g=bt(d+=_*(t-1)/t-y*s,v))[0]=g[0]*j/n-j*(t-1)/(2*t)+y*j/t,g[1]=i+4*(g[1]-o)*a/j,p<0&&(g[1]=-g[1])}else g=Fe(d,p);return g[0]*=u,g[1]/=f,g}return d.invert=function(e,d){e/=u;var p=r(d*=f);if(p>i){var g=h(t-1,c(0,l((e+_)/s)));e=(e+_*(t-1)/t-g*s)*n/j;var v=bt.invert(e,.25*(p-i)*j/a+o);return v[0]-=_*(t-1)/t-g*s,d<0&&(v[1]=-v[1]),v}return Fe.invert(e,d)},d}function Re(t){return{type:"Polygon",coordinates:[n.range(-180,180+t/2,t).map((function(t,e){return[t,1&e?89.999999:Le]})).concat(n.range(180,-180-t/2,-t).map((function(t,e){return[t,1&e?-89.999999:-Le]})))]}}var Ne=function(){var t=4,n=e.geoProjectionMutator(De),r=n(t),i=r.stream;return r.lobes=function(e){return arguments.length?n(t=+e):t},r.stream=function(n){var o=r.rotate(),a=i(n),s=(r.rotate([0,0]),i(n));return r.rotate(o),a.sphere=function(){e.geoStream(Re(180/t),s)},a},r.scale(239.75)};function ze(t){var e,n=1+t,i=T(g(1/n)),s=2*A(_/(e=_+4*i*n)),l=.5*s*(n+A(t*(2+t))),u=t*t,c=n*n;function h(h,f){var d,p,v=1-g(f);if(v&&v<2){var y,b=x-f,w=25;do{var M=g(b),S=a(b),j=i+o(M,n-S),C=1+c-2*n*S;b-=y=(b-u*i-n*M+C*j-.5*v*e)/(2*n*M*j)}while(r(y)>m&&--w>0);d=s*A(C),p=h*j/_}else d=s*(t+v),p=h*i/_;return[d*g(p),l-d*a(p)]}return h.invert=function(t,r){var a=t*t+(r-=l)*r,h=(1+c-a/(s*s))/(2*n),f=k(h),d=g(f),p=i+o(d,n-h);return[T(t/A(a))*_/p,T(1-2*(f-u*i-n*d+(1+c-2*n*h)*p)/e)]},h}var He=function(){var t=1,n=e.geoProjectionMutator(ze),r=n(t);return r.ratio=function(e){return arguments.length?n(t=+e):t},r.scale(167.774).center([0,18.67])},Ge=.7109889596207567,Ye=.0528035274542;function Ve(t,e){return e>-Ge?((t=J(t,e))[1]+=Ye,t):at(t,e)}Ve.invert=function(t,e){return e>-Ge?J.invert(t,e-Ye):at.invert(t,e)};var Xe=function(){return e.geoProjection(Ve).rotate([-20,-55]).scale(164.263).center([0,-5.4036])};function qe(t,e){return r(e)>Ge?((t=J(t,e))[1]-=e>0?Ye:-Ye,t):at(t,e)}qe.invert=function(t,e){return r(e)>Ge?J.invert(t,e+(e>0?Ye:-Ye)):at.invert(t,e)};var We=function(){return e.geoProjection(qe).scale(152.63)};function Ue(t,e){return r(t[0]-e[0])=0;--l)r=(e=t[1][l])[0][0],i=e[0][1],o=e[1][1],a=e[2][0],s=e[2][1],u.push(Ze([[a-y,s-y],[a-y,o+y],[r+y,o+y],[r+y,i-y]],30));return{type:"Polygon",coordinates:[n.merge(u)]}}var Qe=function(t,n){var r=Ke(n),i=(n=n.map((function(t){return t.map((function(t){return[[t[0][0]*E,t[0][1]*E],[t[1][0]*E,t[1][1]*E],[t[2][0]*E,t[2][1]*E]]}))}))).map((function(e){return e.map((function(e){var n,r=t(e[0][0],e[0][1])[0],i=t(e[2][0],e[2][1])[0],o=t(e[1][0],e[0][1])[1],a=t(e[1][0],e[1][1])[1];return o>a&&(n=o,o=a,a=n),[[r,o],[i,a]]}))}));function o(e,r){for(var i=r<0?-1:1,o=n[+(r<0)],a=0,s=o.length-1;ao[a][2][0];++a);var l=t(e-o[a][1][0],r);return l[0]+=t(o[a][1][0],i*r>i*o[a][0][1]?o[a][0][1]:r)[0],l}t.invert&&(o.invert=function(e,r){for(var a=i[+(r<0)],s=n[+(r<0)],l=0,u=a.length;l2)return null;var a=(e/=2)*e,s=(n/=2)*n,l=2*n/(1+a+s);return l=f((1+l)/(1-l),1/t),[o(2*e,1-a-s)/t,T((l-1)/(l+1))]},e}var pn=function(){var t=.5,n=e.geoProjectionMutator(dn),r=n(t);return r.spacing=function(e){return arguments.length?n(t=+e):t},r.scale(124.75)},gn=_/M;function vn(t,e){return[t*(1+A(a(e)))/2,e/(a(e/2)*a(t/6))]}vn.invert=function(t,e){var n=r(t),i=r(e),o=y,s=x;iy||r(x)>y)&&--o>0);return o&&[n,i]};var _n=function(){return e.geoProjection(mn).scale(139.98)};function xn(t,e){return[g(t)/a(e),v(e)*a(t)]}xn.invert=function(t,e){var n=t*t,r=e*e,i=r+1,o=t?w*A((i-A(n*n+2*n*(r-1)+i*i))/n+1):1/A(i);return[T(t*o),p(e)*k(o)]};var bn=function(){return e.geoProjection(xn).scale(144.049).clipAngle(89.999)};function wn(t){var e=a(t),n=v(b+t/2);function i(i,o){var a=o-t,s=r(a)=0;)f=(h=t[c])[0]+l*(i=f)-u*d,d=h[1]+l*d+u*i;return[f=l*(i=f)-u*d,d=l*d+u*i]}return n.invert=function(n,s){var l=20,u=n,c=s;do{for(var h,f=e,d=t[f],p=d[0],v=d[1],m=0,_=0;--f>=0;)m=p+u*(h=m)-c*_,_=v+u*_+c*h,p=(d=t[f])[0]+u*(h=p)-c*v,v=d[1]+u*v+c*h;var x,b,w=(m=p+u*(h=m)-c*_)*m+(_=v+u*_+c*h)*_;u-=x=((p=u*(h=p)-c*v-n)*m+(v=u*v+c*h-s)*_)/w,c-=b=(v*m-p*_)/w}while(r(x)+r(b)>y*y&&--l>0);if(l){var M=A(u*u+c*c),S=2*i(.5*M),j=g(S);return[o(u*j,M*a(S)),M?T(c*j/M):0]}},n}var En=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Pn=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Tn=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],kn=[[.9245,0],[0,0],[.01943,0]],An=[[.721316,0],[0,0],[-.00881625,-.00617325]];function On(){return Dn(En,[152,-64]).scale(1500).center([-160.908,62.4864]).clipAngle(25)}function In(){return Dn(Pn,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Bn(){return Dn(Tn,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ln(){return Dn(kn,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Fn(){return Dn(An,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Dn(t,n){var r=e.geoProjection(Cn(t)).rotate(n).clipAngle(90),i=e.geoRotation(n),o=r.center;return delete r.rotate,r.center=function(t){return arguments.length?o(i(t)):i.invert(o())},r}var Rn=A(6),Nn=A(7);function zn(t,e){var n=T(7*g(e)/(3*Rn));return[Rn*t*(2*a(2*n/3)-1)/Nn,9*g(n/3)/Nn]}zn.invert=function(t,e){var n=3*T(e*Nn/9);return[t*Nn/(Rn*(2*a(2*n/3)-1)),T(3*g(n)*Rn/7)]};var Hn=function(){return e.geoProjection(zn).scale(164.859)};function Gn(t,e){for(var n,i=(1+w)*g(e),o=e,s=0;s<25&&(o-=n=(g(o/2)+g(o)-i)/(.5*a(o/2)+a(o)),!(r(n)y&&--o>0);return[t/(.8707+(a=i*i)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),i]};var Wn=function(){return e.geoProjection(qn).scale(175.295)};function Un(t,e){var n=e*e,r=n*n,i=n*r;return[t*(.84719-.13063*n+i*i*(.05494*n-.04515-.02326*r+.00331*i)),e*(1.01183+r*r*(.01926*n-.02625-.00396*r))]}Un.invert=function(t,e){var n,i,o,a,s=e,l=25;do{s-=n=(s*(1.01183+(o=(i=s*s)*i)*o*(.01926*i-.02625-.00396*o))-e)/(1.01183+o*o*(.21186*i-.23625+-.05148*o))}while(r(n)>m&&--l>0);return[t/(.84719-.13063*(i=s*s)+(a=i*(o=i*i))*a*(.05494*i-.04515-.02326*o+.00331*a)),s]};var Zn=function(){return e.geoProjection(Un).scale(175.295)};function Kn(t,e){return[t*(1+a(e))/2,2*(e-v(e/2))]}Kn.invert=function(t,e){for(var n=e/2,i=0,o=1/0;i<10&&r(o)>y;++i){var s=a(e/2);e-=o=(e-v(e/2)-n)/(1-.5/(s*s))}return[2*t/(1+a(e)),e]};var Qn=function(){return e.geoProjection(Kn).scale(152.63)},$n=1.0148,Jn=.23185,tr=-.14499,er=.02406,nr=$n,rr=5*Jn,ir=7*tr,or=9*er,ar=1.790857183;function sr(t,e){var n=e*e;return[t,e*($n+n*n*(Jn+n*(tr+er*n)))]}sr.invert=function(t,e){e>ar?e=ar:e<-ar&&(e=-ar);var n,i=e;do{var o=i*i;i-=n=(i*($n+o*o*(Jn+o*(tr+er*o)))-e)/(nr+o*o*(rr+o*(ir+or*o)))}while(r(n)>y);return[t,i]};var lr=function(){return e.geoProjection(sr).scale(139.319)};function ur(t,e){if(r(e)y&&--s>0);return l=v(o),[(r(e)=0;)if(r=e[s],n[0]===r[0]&&n[1]===r[1]){if(o)return[o,n];o=n}}}function br(t){for(var e=t.length,n=[],r=t[e-1],i=0;i0?[-n[0],0]:[180-n[0],180])};var n=Sr.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var r=n[t];r&&(r.children||(r.children=[])).push(n[e])})),yr(n[0],(function(t,e){return n[t<-_/2?e<0?6:4:t<0?e<0?2:0:t<_/2?e<0?3:1:e<0?7:5]})).scale(121.906).center([0,48.5904])},Tr=function(t){t=t||function(t){var n=6===t.length?e.geoCentroid({type:"MultiPoint",coordinates:t}):t[0];return e.geoGnomonic().scale(1).translate([0,0]).rotate([-n[0],-n[1]])};var n=Sr.map((function(t){for(var e,n=t.map(Ir),r=n.length,i=n[r-1],o=[],a=0;ar^d>r&&n<(f-u)*(r-c)/(d-c)+u&&(i=!i)}return i},Dr=function(t,e){var n,r=e.stream;if(!r)throw new Error("invalid projection");switch(t&&t.type){case"Feature":n=Nr;break;case"FeatureCollection":n=Rr;break;default:n=Hr}return n(t,r)};function Rr(t,e){return{type:"FeatureCollection",features:t.features.map((function(t){return Nr(t,e)}))}}function Nr(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:Hr(t.geometry,e)}}function zr(t,e){return{type:"GeometryCollection",geometries:t.geometries.map((function(t){return Hr(t,e)}))}}function Hr(t,n){if(!t)return null;if("GeometryCollection"===t.type)return zr(t,n);var r;switch(t.type){case"Point":case"MultiPoint":r=Vr;break;case"LineString":case"MultiLineString":r=Xr;break;case"Polygon":case"MultiPolygon":case"Sphere":r=qr;break;default:return null}return e.geoStream(t,n(r)),r.result()}var Gr=[],Yr=[],Vr={point:function(t,e){Gr.push([t,e])},result:function(){var t=Gr.length?Gr.length<2?{type:"Point",coordinates:Gr[0]}:{type:"MultiPoint",coordinates:Gr}:null;return Gr=[],t}},Xr={lineStart:Br,point:function(t,e){Gr.push([t,e])},lineEnd:function(){Gr.length&&(Yr.push(Gr),Gr=[])},result:function(){var t=Yr.length?Yr.length<2?{type:"LineString",coordinates:Yr[0]}:{type:"MultiLineString",coordinates:Yr}:null;return Yr=[],t}},qr={polygonStart:Br,lineStart:Br,point:function(t,e){Gr.push([t,e])},lineEnd:function(){var t=Gr.length;if(t){do{Gr.push(Gr[0].slice())}while(++t<4);Yr.push(Gr),Gr=[]}},polygonEnd:Br,result:function(){if(!Yr.length)return null;var t=[],e=[];return Yr.forEach((function(n){Lr(n)?t.push([n]):e.push(n)})),e.forEach((function(e){var n=e[0];t.some((function(t){if(Fr(t[0],n))return t.push(e),!0}))||t.push([e])})),Yr=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},Wr=function(t){var n=t(x,0)[0]-t(-x,0)[0];function i(e,i){var o=r(e)0?e-_:e+_,i),s=(a[0]-a[1])*w,l=(a[0]+a[1])*w;if(o)return[s,l];var u=n*w,c=s>0^l>0?-1:1;return[c*s-p(l)*u,c*l-p(s)*u]}return t.invert&&(i.invert=function(e,i){var o=(e+i)*w,a=(i-e)*w,s=r(o)<.5*n&&r(a)<.5*n;if(!s){var l=n*w,u=o>0^a>0?-1:1,c=-u*e+(a>0?1:-1)*l,h=-u*i+(o>0?1:-1)*l;o=(-c-h)*w,a=(c-h)*w}var f=t.invert(o,a);return s||(f[0]+=o>0?_:-_),f}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)},Ur=function(){return Wr(ye).scale(176.423)},Zr=function(){return Wr(je).scale(111.48)},Kr=function(t,e){if(!(0<=(e=+e)&&e<=20))throw new Error("invalid digits");function n(t){var n=t.length,r=2,i=new Array(n);for(i[0]=+t[0].toFixed(e),i[1]=+t[1].toFixed(e);ry&&--c>0);var p=n*(h=v(u)),m=v(r(o)0?x:-x)*(f+a*(p-u)/2+a*a*(p-2*f+u)/2)]}Jr.forEach((function(t){t[1]*=1.0144})),ti.invert=function(t,e){var n=e/x,i=90*n,o=h(18,r(i/5)),a=c(0,l(o));do{var s=Jr[a][1],u=Jr[a+1][1],f=Jr[h(19,a+2)][1],d=f-s,p=f-2*u+s,g=2*(r(n)-u)/d,v=p/d,y=g*(1-v*g*(1-2*v*g));if(y>=0||1===a){i=(e>=0?5:-5)*(y+o);var _,b=50;do{y=(o=h(18,r(i)/5))-(a=l(o)),s=Jr[a][1],u=Jr[a+1][1],f=Jr[h(19,a+2)][1],i-=(_=(e>=0?x:-x)*(u+y*(f-s)/2+y*y*(f-2*u+s)/2)-e)*C}while(r(_)>m&&--b>0);break}}while(--a>=0);var w=Jr[a][0],M=Jr[a+1][0],S=Jr[h(19,a+2)][0];return[t/(M+y*(S-w)/2+y*y*(S-2*M+w)/2),i*E]};var ei=function(){return e.geoProjection(ti).scale(152.63)};function ni(t){function e(e,n){var r=a(n),i=(t-1)/(t-r*a(e));return[i*r*g(e),i*g(n)]}return e.invert=function(e,n){var r=e*e+n*n,i=A(r),a=(t-A(1-r*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[o(e*a,i*A(1-a*a)),i?T(n*a/i):0]},e}function ri(t,e){var n=ni(t);if(!e)return n;var r=a(e),i=g(e);function o(e,o){var a=n(e,o),s=a[1],l=s*i/(t-1)+r;return[a[0]*r/l,s/l]}return o.invert=function(e,o){var a=(t-1)/(t-1-o*i);return n.invert(a*e,a*o*r)},o}var ii=function(){var t=2,n=0,r=e.geoProjectionMutator(ri),i=r(t,n);return i.distance=function(e){return arguments.length?r(t=+e,n):t},i.tilt=function(e){return arguments.length?r(t,n=e*E):n*C},i.scale(432.147).clipAngle(k(1/t)*C-1e-6)},oi=1e-4,ai=1e4,si=-180,li=si+oi,ui=180,ci=ui-oi,hi=-90,fi=hi+oi,di=90,pi=di-oi;function gi(t){return t.length>0}function vi(t){return Math.floor(t*ai)/ai}function yi(t){return t===hi||t===di?[0,t]:[si,vi(t)]}function mi(t){var e=t[0],n=t[1],r=!1;return e<=li?(e=si,r=!0):e>=ci&&(e=ui,r=!0),n<=fi?(n=hi,r=!0):n>=pi&&(n=di,r=!0),r?[e,n]:t}function _i(t){return t.map(mi)}function xi(t,e,n){for(var r=0,i=t.length;r=ci||c<=fi||c>=pi){o[a]=mi(l);for(var h=a+1;hli&&dfi&&p=s)break;n.push({index:-1,polygon:e,ring:o=o.slice(h-1)}),o[0]=yi(o[0][1]),a=-1,s=o.length}}}}function bi(t){var e,n,r,i,o,a,s=t.length,l={},u={};for(e=0;e0?_-l:l)*C],c=e.geoProjection(t(s)).rotate(u),h=e.geoRotation(u),f=c.center;return delete c.rotate,c.center=function(t){return arguments.length?f(h(t)):h.invert(f())},c.clipAngle(90)};function Pi(t){var n=a(t);function r(t,r){var i=e.geoGnomonicRaw(t,r);return i[0]*=n,i}return r.invert=function(t,r){return e.geoGnomonicRaw.invert(t/n,r)},r}function Ti(){return ki([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function ki(t,e){return Ei(Pi,t,e)}function Ai(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var n=-t/2,r=-n,i=t*t,s=v(r),l=.5/g(r);function u(e,o){var s=k(a(o)*a(e-n)),l=k(a(o)*a(e-r));return[((s*=s)-(l*=l))/(2*t),(o<0?-1:1)*A(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return u.invert=function(t,e){var i,u,c=e*e,h=a(A(c+(i=t+n)*i)),f=a(A(c+(i=t+r)*i));return[o(u=h-f,i=(h+f)*s),(e<0?-1:1)*k(A(i*i+u*u)*l)]},u}function Oi(){return Ii([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Ii(t,e){return Ei(Ai,t,e)}function Bi(t,e){if(r(e)y&&--l>0);return[p(t)*(A(o*o+4)+o)*_/4,x*s]};var Hi=function(){return e.geoProjection(zi).scale(127.16)},Gi=4*_+3*A(3),Yi=2*A(2*_*A(3)/Gi),Vi=$(Yi*A(3)/_,Yi,Gi/6),Xi=function(){return e.geoProjection(Vi).scale(176.84)};function qi(t,e){return[t*A(1-3*e*e/(_*_)),e]}qi.invert=function(t,e){return[t/A(1-3*e*e/(_*_)),e]};var Wi=function(){return e.geoProjection(qi).scale(152.63)};function Ui(t,e){var n=.90631*g(e),r=A(1-n*n),i=A(2/(1+r*a(t/=3)));return[2.66723*r*i*g(t),1.24104*n*i]}Ui.invert=function(t,e){var n=t/2.66723,r=e/1.24104,i=A(n*n+r*r),a=2*T(i/2);return[3*o(t*v(a),2.66723*i),i&&T(e*g(a)/(1.24104*.90631*i))]};var Zi=function(){return e.geoProjection(Ui).scale(172.632)};function Ki(t,e){var n=a(e),r=a(t)*n,i=1-r,s=a(t=o(g(t)*n,-g(e))),l=g(t);return[l*(n=A(1-r*r))-s*i,-s*n-l*i]}Ki.invert=function(t,e){var n=(t*t+e*e)/-2,r=A(-n*(2+n)),i=e*n+t*r,a=t*n-e*r,s=A(a*a+i*i);return[o(r*i,s*(1+n)),s?-T(r*a/s):0]};var Qi=function(){return e.geoProjection(Ki).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)};function $i(t,e){var n=N(t,e);return[(n[0]+t/x)/2,(n[1]+e)/2]}$i.invert=function(t,e){var n=t,i=e,o=25;do{var s,l=a(i),u=g(i),c=g(2*i),h=u*u,f=l*l,d=g(n),p=a(n/2),v=g(n/2),m=v*v,_=1-f*p*p,b=_?k(l*p)*A(s=1/_):s=0,w=.5*(2*b*l*v+n/x)-t,M=.5*(b*u+i)-e,S=.5*s*(f*m+b*l*p*h)+.5/x,j=s*(d*c/4-b*u*v),C=.125*s*(c*v-b*u*f*d),E=.5*s*(h*p+b*m*l)+.5,P=j*C-E*S,T=(M*j-w*E)/P,O=(w*C-M*S)/P;n-=T,i-=O}while((r(T)>y||r(O)>y)&&--o>0);return[n,i]};var Ji=function(){return e.geoProjection($i).scale(158.837)};t.geoAiry=R,t.geoAiryRaw=D,t.geoAitoff=z,t.geoAitoffRaw=N,t.geoArmadillo=G,t.geoArmadilloRaw=H,t.geoAugust=V,t.geoAugustRaw=Y,t.geoBaker=U,t.geoBakerRaw=W,t.geoBerghaus=K,t.geoBerghausRaw=Z,t.geoBoggs=it,t.geoBoggsRaw=rt,t.geoBonne=ut,t.geoBonneRaw=lt,t.geoBottomley=ht,t.geoBottomleyRaw=ct,t.geoBromley=dt,t.geoBromleyRaw=ft,t.geoChamberlin=xt,t.geoChamberlinRaw=yt,t.geoChamberlinAfrica=_t,t.geoCollignon=wt,t.geoCollignonRaw=bt,t.geoCraig=St,t.geoCraigRaw=Mt,t.geoCraster=Et,t.geoCrasterRaw=Ct,t.geoCylindricalEqualArea=Tt,t.geoCylindricalEqualAreaRaw=Pt,t.geoCylindricalStereographic=At,t.geoCylindricalStereographicRaw=kt,t.geoEckert1=It,t.geoEckert1Raw=Ot,t.geoEckert2=Lt,t.geoEckert2Raw=Bt,t.geoEckert3=Dt,t.geoEckert3Raw=Ft,t.geoEckert4=Nt,t.geoEckert4Raw=Rt,t.geoEckert5=Ht,t.geoEckert5Raw=zt,t.geoEckert6=Yt,t.geoEckert6Raw=Gt,t.geoEisenlohr=qt,t.geoEisenlohrRaw=Xt,t.geoFahey=Zt,t.geoFaheyRaw=Ut,t.geoFoucaut=Qt,t.geoFoucautRaw=Kt,t.geoGilbert=te,t.geoGingery=ie,t.geoGingeryRaw=ee,t.geoGinzburg4=se,t.geoGinzburg4Raw=ae,t.geoGinzburg5=ue,t.geoGinzburg5Raw=le,t.geoGinzburg6=he,t.geoGinzburg6Raw=ce,t.geoGinzburg8=de,t.geoGinzburg8Raw=fe,t.geoGinzburg9=ge,t.geoGinzburg9Raw=pe,t.geoGringorten=xe,t.geoGringortenRaw=ye,t.geoGuyou=Pe,t.geoGuyouRaw=je,t.geoHammer=Ae,t.geoHammerRaw=Te,t.geoHammerRetroazimuthal=Be,t.geoHammerRetroazimuthalRaw=Oe,t.geoHealpix=Ne,t.geoHealpixRaw=De,t.geoHill=He,t.geoHillRaw=ze,t.geoHomolosine=We,t.geoHomolosineRaw=qe,t.geoInterrupt=Qe,t.geoInterruptedBoggs=Je,t.geoInterruptedHomolosine=en,t.geoInterruptedMollweide=rn,t.geoInterruptedMollweideHemispheres=an,t.geoInterruptedSinuMollweide=ln,t.geoInterruptedSinusoidal=cn,t.geoKavrayskiy7=fn,t.geoKavrayskiy7Raw=hn,t.geoLagrange=pn,t.geoLagrangeRaw=dn,t.geoLarrivee=yn,t.geoLarriveeRaw=vn,t.geoLaskowski=_n,t.geoLaskowskiRaw=mn,t.geoLittrow=bn,t.geoLittrowRaw=xn,t.geoLoximuthal=Mn,t.geoLoximuthalRaw=wn,t.geoMiller=jn,t.geoMillerRaw=Sn,t.geoModifiedStereographic=Dn,t.geoModifiedStereographicRaw=Cn,t.geoModifiedStereographicAlaska=On,t.geoModifiedStereographicGs48=In,t.geoModifiedStereographicGs50=Bn,t.geoModifiedStereographicMiller=Ln,t.geoModifiedStereographicLee=Fn,t.geoMollweide=tt,t.geoMollweideRaw=J,t.geoMtFlatPolarParabolic=Hn,t.geoMtFlatPolarParabolicRaw=zn,t.geoMtFlatPolarQuartic=Yn,t.geoMtFlatPolarQuarticRaw=Gn,t.geoMtFlatPolarSinusoidal=Xn,t.geoMtFlatPolarSinusoidalRaw=Vn,t.geoNaturalEarth=Wn,t.geoNaturalEarthRaw=qn,t.geoNaturalEarth2=Zn,t.geoNaturalEarth2Raw=Un,t.geoNellHammer=Qn,t.geoNellHammerRaw=Kn,t.geoPatterson=lr,t.geoPattersonRaw=sr,t.geoPolyconic=cr,t.geoPolyconicRaw=ur,t.geoPolyhedral=yr,t.geoPolyhedralButterfly=jr,t.geoPolyhedralCollignon=Pr,t.geoPolyhedralWaterman=Tr,t.geoProject=Dr,t.geoGringortenQuincuncial=Ur,t.geoPeirceQuincuncial=Zr,t.geoPierceQuincuncial=Zr,t.geoQuantize=Kr,t.geoQuincuncial=Wr,t.geoRectangularPolyconic=$r,t.geoRectangularPolyconicRaw=Qr,t.geoRobinson=ei,t.geoRobinsonRaw=ti,t.geoSatellite=ii,t.geoSatelliteRaw=ri,t.geoSinuMollweide=Xe,t.geoSinuMollweideRaw=Ve,t.geoSinusoidal=st,t.geoSinusoidalRaw=at,t.geoStitch=Si,t.geoTimes=Ci,t.geoTimesRaw=ji,t.geoTwoPointAzimuthal=ki,t.geoTwoPointAzimuthalRaw=Pi,t.geoTwoPointAzimuthalUsa=Ti,t.geoTwoPointEquidistant=Ii,t.geoTwoPointEquidistantRaw=Ai,t.geoTwoPointEquidistantUsa=Oi,t.geoVanDerGrinten=Li,t.geoVanDerGrintenRaw=Bi,t.geoVanDerGrinten2=Di,t.geoVanDerGrinten2Raw=Fi,t.geoVanDerGrinten3=Ni,t.geoVanDerGrinten3Raw=Ri,t.geoVanDerGrinten4=Hi,t.geoVanDerGrinten4Raw=zi,t.geoWagner4=Xi,t.geoWagner4Raw=Vi,t.geoWagner6=Wi,t.geoWagner6Raw=qi,t.geoWagner7=Zi,t.geoWagner7Raw=Ui,t.geoWiechel=Qi,t.geoWiechelRaw=Ki,t.geoWinkel3=Ji,t.geoWinkel3Raw=$i,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(/*! d3-geo */"./node_modules/_d3-geo@1.12.1@d3-geo/dist/d3-geo.js"),n(/*! d3-array */"./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"))},"./node_modules/_d3-geo@1.12.1@d3-geo/dist/d3-geo.js": /*!***********************************************************!*\ !*** ./node_modules/_d3-geo@1.12.1@d3-geo/dist/d3-geo.js ***! \***********************************************************/ /*! no static exports found */function(t,e,n){!function(t,e){function n(){return new r}function r(){this.reset()}r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){o(i,t,this.t),o(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new r;function o(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var a=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,h=2*l,f=180/l,d=l/180,p=Math.abs,g=Math.atan,v=Math.atan2,y=Math.cos,m=Math.ceil,_=Math.exp,x=Math.log,b=Math.pow,w=Math.sin,M=Math.sign||function(t){return t>0?1:t<0?-1:0},S=Math.sqrt,j=Math.tan;function C(t){return t>1?0:t<-1?l:Math.acos(t)}function E(t){return t>1?u:t<-1?-u:Math.asin(t)}function P(t){return(t=w(t/2))*t}function T(){}function k(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var A={Feature:function(t,e){k(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=y(e=(e*=d)/2+c),a=w(e),s=z*a,l=N*o+s*y(i),u=s*r*w(i);H.add(v(u,l)),R=t,N=o,z=a}function U(t){return G.reset(),L(t,Y),2*G}function Z(t){return[v(t[1],t[0]),E(t[2])]}function K(t){var e=t[0],n=t[1],r=y(n);return[r*y(e),r*w(e),w(n)]}function Q(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function $(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function J(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function tt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function et(t){var e=S(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var nt,rt,it,ot,at,st,lt,ut,ct,ht,ft,dt,pt,gt,vt,yt,mt,_t,xt,bt,wt,Mt,St,jt,Ct,Et,Pt=n(),Tt={point:kt,lineStart:Ot,lineEnd:It,polygonStart:function(){Tt.point=Bt,Tt.lineStart=Lt,Tt.lineEnd=Ft,Pt.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),Tt.point=kt,Tt.lineStart=Ot,Tt.lineEnd=It,H<0?(nt=-(it=180),rt=-(ot=90)):Pt>a?ot=90:Pt<-a&&(rt=-90),ht[0]=nt,ht[1]=it},sphere:function(){nt=-(it=180),rt=-(ot=90)}};function kt(t,e){ct.push(ht=[nt=t,it=t]),eot&&(ot=e)}function At(t,e){var n=K([t*d,e*d]);if(ut){var r=$(ut,n),i=$([r[1],-r[0],0],r);et(i),i=Z(i);var o,a=t-at,s=a>0?1:-1,l=i[0]*f*s,u=p(a)>180;u^(s*atot&&(ot=o):u^(s*at<(l=(l+360)%360-180)&&lot&&(ot=e)),u?tDt(nt,it)&&(it=t):Dt(t,it)>Dt(nt,it)&&(nt=t):it>=nt?(tit&&(it=t)):t>at?Dt(nt,t)>Dt(nt,it)&&(it=t):Dt(t,it)>Dt(nt,it)&&(nt=t)}else ct.push(ht=[nt=t,it=t]);eot&&(ot=e),ut=n,at=t}function Ot(){Tt.point=At}function It(){ht[0]=nt,ht[1]=it,Tt.point=kt,ut=null}function Bt(t,e){if(ut){var n=t-at;Pt.add(p(n)>180?n+(n>0?360:-360):n)}else st=t,lt=e;Y.point(t,e),At(t,e)}function Lt(){Y.lineStart()}function Ft(){Bt(st,lt),Y.lineEnd(),p(Pt)>a&&(nt=-(it=180)),ht[0]=nt,ht[1]=it,ut=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Nt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eDt(r[0],r[1])&&(r[1]=i[1]),Dt(i[0],r[1])>Dt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=Dt(r[1],i[0]))>a&&(a=s,nt=i[0],it=r[1])}return ct=ht=null,nt===1/0||rt===1/0?[[NaN,NaN],[NaN,NaN]]:[[nt,rt],[it,ot]]}var Ht={sphere:T,point:Gt,lineStart:Vt,lineEnd:Wt,polygonStart:function(){Ht.lineStart=Ut,Ht.lineEnd=Zt},polygonEnd:function(){Ht.lineStart=Vt,Ht.lineEnd=Wt}};function Gt(t,e){t*=d;var n=y(e*=d);Yt(n*y(t),n*w(t),w(e))}function Yt(t,e,n){++ft,pt+=(t-pt)/ft,gt+=(e-gt)/ft,vt+=(n-vt)/ft}function Vt(){Ht.point=Xt}function Xt(t,e){t*=d;var n=y(e*=d);jt=n*y(t),Ct=n*w(t),Et=w(e),Ht.point=qt,Yt(jt,Ct,Et)}function qt(t,e){t*=d;var n=y(e*=d),r=n*y(t),i=n*w(t),o=w(e),a=v(S((a=Ct*o-Et*i)*a+(a=Et*r-jt*o)*a+(a=jt*i-Ct*r)*a),jt*r+Ct*i+Et*o);dt+=a,yt+=a*(jt+(jt=r)),mt+=a*(Ct+(Ct=i)),_t+=a*(Et+(Et=o)),Yt(jt,Ct,Et)}function Wt(){Ht.point=Gt}function Ut(){Ht.point=Kt}function Zt(){Qt(Mt,St),Ht.point=Gt}function Kt(t,e){Mt=t,St=e,t*=d,e*=d,Ht.point=Qt;var n=y(e);jt=n*y(t),Ct=n*w(t),Et=w(e),Yt(jt,Ct,Et)}function Qt(t,e){t*=d;var n=y(e*=d),r=n*y(t),i=n*w(t),o=w(e),a=Ct*o-Et*i,s=Et*r-jt*o,l=jt*i-Ct*r,u=S(a*a+s*s+l*l),c=E(u),h=u&&-c/u;xt+=h*a,bt+=h*s,wt+=h*l,dt+=c,yt+=c*(jt+(jt=r)),mt+=c*(Ct+(Ct=i)),_t+=c*(Et+(Et=o)),Yt(jt,Ct,Et)}function $t(t){ft=dt=pt=gt=vt=yt=mt=_t=xt=bt=wt=0,L(t,Ht);var e=xt,n=bt,r=wt,i=e*e+n*n+r*r;return il?t+Math.round(-t/h)*h:t,e]}function ne(t,e,n){return(t%=h)?e||n?te(ie(t),oe(e,n)):ie(t):e||n?oe(e,n):ee}function re(t){return function(e,n){return[(e+=t)>l?e-h:e<-l?e+h:e,n]}}function ie(t){var e=re(t);return e.invert=re(-t),e}function oe(t,e){var n=y(t),r=w(t),i=y(e),o=w(e);function a(t,e){var a=y(e),s=y(t)*a,l=w(t)*a,u=w(e),c=u*n+s*r;return[v(l*i-c*o,s*n-u*r),E(c*i+l*o)]}return a.invert=function(t,e){var a=y(e),s=y(t)*a,l=w(t)*a,u=w(e),c=u*i-l*o;return[v(l*i+u*o,s*n+c*r),E(c*n-s*r)]},a}function ae(t){function e(e){return(e=t(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e}return t=ne(t[0]*d,t[1]*d,t.length>2?t[2]*d:0),e.invert=function(e){return(e=t.invert(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e},e}function se(t,e,n,r,i,o){if(n){var a=y(e),s=w(e),l=r*n;null==i?(i=e+r*h,o=e-l/2):(i=le(a,i),o=le(a,o),(r>0?io)&&(i+=r*h));for(var u,c=i;r>0?c>o:c1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function he(t,e){return p(t[0]-e[0])=0;--o)i.point((h=c[o])[0],h[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function pe(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,B=I*O,L=B>l,F=M*k;if(ge.add(v(F*I*w(B),S*A+F*y(B))),s+=L?O+I*h:O,L^x>=n^P>=n){var D=$(K(_),K(C));et(D);var R=$(o,D);et(R);var N=(L^O>=0?-1:1)*E(R[2]);(r>N||r===N&&(D[0]||D[1]))&&(f+=L^O>=0?1:-1)}}return(s<-a||s0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t1&&2&i&&u.push(u.pop().concat(u.shift())),s.push(u.filter(_e))}return d}}function _e(t){return t.length>1}function xe(t,e){return((t=t.x)[0]<0?t[1]-u-a:u-t[1])-((e=e.x)[0]<0?e[1]-u-a:u-e[1])}var be=me((function(){return!0}),we,Se,[-l,-u]);function we(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var c=o>0?l:-l,h=p(o-n);p(h-l)0?u:-u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),t.point(o,r),e=0):i!==c&&h>=l&&(p(n-i)a?g((w(e)*(o=y(r))*w(n)-w(r)*(i=y(e))*w(t))/(i*o*s)):(e+r)/2}function Se(t,e,n,r){var i;if(null==t)i=n*u,r.point(-l,i),r.point(0,i),r.point(l,i),r.point(l,0),r.point(l,-i),r.point(0,-i),r.point(-l,-i),r.point(-l,0),r.point(-l,i);else if(p(t[0]-e[0])>a){var o=t[0]0,i=p(e)>a;function o(e,r,i,o){se(o,t,n,i,e,r)}function s(t,n){return y(t)*y(n)>e}function u(t){var e,n,o,a,u;return{lineStart:function(){a=o=!1,u=1},point:function(f,d){var p,g=[f,d],v=s(f,d),y=r?v?0:h(f,d):v?h(f+(f<0?l:-l),d):0;if(!e&&(a=o=v)&&t.lineStart(),v!==o&&(!(p=c(e,g))||he(e,p)||he(g,p))&&(g[2]=1),v!==o)u=0,v?(t.lineStart(),p=c(g,e),t.point(p[0],p[1])):(p=c(e,g),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^v){var m;y&n||!(m=c(g,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!v||e&&he(e,g)||t.point(g[0],g[1]),e=g,o=v,n=y},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return u|(a&&o)<<1}}}function c(t,n,r){var i=[1,0,0],o=$(K(t),K(n)),s=Q(o,o),u=o[0],c=s-u*u;if(!c)return!r&&t;var h=e*s/c,f=-e*u/c,d=$(i,o),g=tt(i,h);J(g,tt(o,f));var v=d,y=Q(g,v),m=Q(v,v),_=y*y-m*(Q(g,g)-1);if(!(_<0)){var x=S(_),b=tt(v,(-y-x)/m);if(J(b,g),b=Z(b),!r)return b;var w,M=t[0],j=n[0],C=t[1],E=n[1];j0^b[1]<(p(b[0]-M)l^(M<=b[0]&&b[0]<=j)){var k=tt(v,(-y+x)/m);return J(k,g),[b,Z(k)]}}}function h(e,n){var i=r?t:l-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return me(s,u,o,r?[0,-t]:[-l,t-l])}function Ce(t,e,n,r,i,o){var a,s=t[0],l=t[1],u=0,c=1,h=e[0]-s,f=e[1]-l;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>u&&(u=a)}else if(h>0){if(a0)){if(a/=f,f<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>u&&(u=a)}else if(f>0){if(a0&&(t[0]=s+u*h,t[1]=l+u*f),c<1&&(e[0]=s+c*h,e[1]=l+c*f),!0}}}}}var Ee=1e9,Pe=-Ee;function Te(t,n,r,i){function o(e,o){return t<=e&&e<=r&&n<=o&&o<=i}function s(e,o,a,s){var u=0,h=0;if(null==e||(u=l(e,a))!==(h=l(o,a))||c(e,o)<0^a>0)do{s.point(0===u||3===u?t:r,u>1?i:n)}while((u=(u+a+4)%4)!==h);else s.point(o[0],o[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-r)0?2:1:p(e[1]-n)0?1:0:i>0?3:2}function u(t,e){return c(t.x,e.x)}function c(t,e){var n=l(t,1),r=l(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var l,c,h,f,d,p,g,v,y,m,_,x=a,b=ce(),w={point:M,lineStart:E,lineEnd:P,polygonStart:j,polygonEnd:C};function M(t,e){o(t,e)&&x.point(t,e)}function S(){for(var e=0,n=0,r=c.length;ni&&(f-o)*(i-a)>(d-a)*(t-o)&&++e:d<=i&&(f-o)*(i-a)<(d-a)*(t-o)&&--e;return e}function j(){x=b,l=[],c=[],_=!0}function C(){var t=S(),n=_&&t,r=(l=e.merge(l)).length;(n||r)&&(a.polygonStart(),n&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),r&&de(l,u,t,s,a),a.polygonEnd()),x=a,l=c=h=null}function E(){w.point=T,c&&c.push(h=[]),m=!0,y=!1,g=v=NaN}function P(){l&&(T(f,d),p&&y&&b.rejoin(),l.push(b.result())),w.point=M,y&&x.lineEnd()}function T(e,a){var s=o(e,a);if(c&&h.push([e,a]),m)f=e,d=a,p=s,m=!1,s&&(x.lineStart(),x.point(e,a));else if(s&&y)x.point(e,a);else{var l=[g=Math.max(Pe,Math.min(Ee,g)),v=Math.max(Pe,Math.min(Ee,v))],u=[e=Math.max(Pe,Math.min(Ee,e)),a=Math.max(Pe,Math.min(Ee,a))];Ce(l,u,t,n,r,i)?(y||(x.lineStart(),x.point(l[0],l[1])),x.point(u[0],u[1]),s||x.lineEnd(),_=!1):s&&(x.lineStart(),x.point(e,a),_=!1)}g=e,v=a,y=s}return w}}function ke(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=Te(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}}var Ae,Oe,Ie,Be=n(),Le={sphere:T,point:T,lineStart:Fe,lineEnd:T,polygonStart:T,polygonEnd:T};function Fe(){Le.point=Re,Le.lineEnd=De}function De(){Le.point=Le.lineEnd=T}function Re(t,e){Ae=t*=d,Oe=w(e*=d),Ie=y(e),Le.point=Ne}function Ne(t,e){t*=d;var n=w(e*=d),r=y(e),i=p(t-Ae),o=y(i),a=r*w(i),s=Ie*n-Oe*r*o,l=Oe*n+Ie*r*o;Be.add(v(S(a*a+s*s),l)),Ae=t,Oe=n,Ie=r}function ze(t){return Be.reset(),L(t,Le),+Be}var He=[null,null],Ge={type:"LineString",coordinates:He};function Ye(t,e){return He[0]=t,He[1]=e,ze(Ge)}var Ve={Feature:function(t,e){return qe(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Ye(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))a})).map(c)).concat(e.range(m(s/v)*v,o,v).filter((function(t){return p(t%_)>a})).map(h))}return b.lines=function(){return w().map((function(t){return{type:"LineString",coordinates:t}}))},b.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(d(l).slice(1),f(r).reverse().slice(1),d(u).reverse().slice(1))]}},b.extent=function(t){return arguments.length?b.extentMajor(t).extentMinor(t):b.extentMinor()},b.extentMajor=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],u=+t[0][1],l=+t[1][1],i>r&&(t=i,i=r,r=t),u>l&&(t=u,u=l,l=t),b.precision(x)):[[i,u],[r,l]]},b.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],s=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),s>o&&(e=s,s=o,o=e),b.precision(x)):[[n,s],[t,o]]},b.step=function(t){return arguments.length?b.stepMajor(t).stepMinor(t):b.stepMinor()},b.stepMajor=function(t){return arguments.length?(y=+t[0],_=+t[1],b):[y,_]},b.stepMinor=function(t){return arguments.length?(g=+t[0],v=+t[1],b):[g,v]},b.precision=function(e){return arguments.length?(x=+e,c=Je(s,o,90),h=tn(n,t,x),f=Je(u,l,90),d=tn(i,r,x),b):x},b.extentMajor([[-180,-90+a],[180,90-a]]).extentMinor([[-180,-80-a],[180,80+a]])}function nn(){return en()()}function rn(t,e){var n=t[0]*d,r=t[1]*d,i=e[0]*d,o=e[1]*d,a=y(r),s=w(r),l=y(o),u=w(o),c=a*y(n),h=a*w(n),p=l*y(i),g=l*w(i),m=2*E(S(P(o-r)+a*l*P(i-n))),_=w(m),x=m?function(t){var e=w(t*=m)/_,n=w(m-t)/_,r=n*c+e*p,i=n*h+e*g,o=n*s+e*u;return[v(i,r)*f,v(o,S(r*r+i*i))*f]}:function(){return[n*f,r*f]};return x.distance=m,x}function on(t){return t}var an,sn,ln,un,cn=n(),hn=n(),fn={point:T,lineStart:T,lineEnd:T,polygonStart:function(){fn.lineStart=dn,fn.lineEnd=vn},polygonEnd:function(){fn.lineStart=fn.lineEnd=fn.point=T,cn.add(p(hn)),hn.reset()},result:function(){var t=cn/2;return cn.reset(),t}};function dn(){fn.point=pn}function pn(t,e){fn.point=gn,an=ln=t,sn=un=e}function gn(t,e){hn.add(un*t-ln*e),ln=t,un=e}function vn(){gn(an,sn)}var yn=1/0,mn=yn,_n=-yn,xn=_n,bn={point:wn,lineStart:T,lineEnd:T,polygonStart:T,polygonEnd:T,result:function(){var t=[[yn,mn],[_n,xn]];return _n=xn=-(mn=yn=1/0),t}};function wn(t,e){t_n&&(_n=t),exn&&(xn=e)}var Mn,Sn,jn,Cn,En=0,Pn=0,Tn=0,kn=0,An=0,On=0,In=0,Bn=0,Ln=0,Fn={point:Dn,lineStart:Rn,lineEnd:Hn,polygonStart:function(){Fn.lineStart=Gn,Fn.lineEnd=Yn},polygonEnd:function(){Fn.point=Dn,Fn.lineStart=Rn,Fn.lineEnd=Hn},result:function(){var t=Ln?[In/Ln,Bn/Ln]:On?[kn/On,An/On]:Tn?[En/Tn,Pn/Tn]:[NaN,NaN];return En=Pn=Tn=kn=An=On=In=Bn=Ln=0,t}};function Dn(t,e){En+=t,Pn+=e,++Tn}function Rn(){Fn.point=Nn}function Nn(t,e){Fn.point=zn,Dn(jn=t,Cn=e)}function zn(t,e){var n=t-jn,r=e-Cn,i=S(n*n+r*r);kn+=i*(jn+t)/2,An+=i*(Cn+e)/2,On+=i,Dn(jn=t,Cn=e)}function Hn(){Fn.point=Dn}function Gn(){Fn.point=Vn}function Yn(){Xn(Mn,Sn)}function Vn(t,e){Fn.point=Xn,Dn(Mn=jn=t,Sn=Cn=e)}function Xn(t,e){var n=t-jn,r=e-Cn,i=S(n*n+r*r);kn+=i*(jn+t)/2,An+=i*(Cn+e)/2,On+=i,In+=(i=Cn*t-jn*e)*(jn+t),Bn+=i*(Cn+e),Ln+=3*i,Dn(jn=t,Cn=e)}function qn(t){this._context=t}qn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,h)}},result:T};var Wn,Un,Zn,Kn,Qn,$n=n(),Jn={point:T,lineStart:function(){Jn.point=tr},lineEnd:function(){Wn&&er(Un,Zn),Jn.point=T},polygonStart:function(){Wn=!0},polygonEnd:function(){Wn=null},result:function(){var t=+$n;return $n.reset(),t}};function tr(t,e){Jn.point=er,Un=Kn=t,Zn=Qn=e}function er(t,e){Kn-=t,Qn-=e,$n.add(S(Kn*Kn+Qn*Qn)),Kn=t,Qn=e}function nr(){this._string=[]}function rr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ir(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),L(t,n(r))),r.result()}return o.area=function(t){return L(t,n(fn)),fn.result()},o.measure=function(t){return L(t,n(Jn)),Jn.result()},o.bounds=function(t){return L(t,n(bn)),bn.result()},o.centroid=function(t){return L(t,n(Fn)),Fn.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,on):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new nr):new qn(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)}function or(t){return{stream:ar(t)}}function ar(t){return function(e){var n=new sr;for(var r in t)n[r]=t[r];return n.stream=e,n}}function sr(){}function lr(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),L(n,t.stream(bn)),e(bn.result()),null!=r&&t.clipExtent(r),t}function ur(t,e,n){return lr(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}function cr(t,e,n){return ur(t,[[0,0],e],n)}function hr(t,e,n){return lr(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function fr(t,e,n){return lr(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}nr.prototype={_radius:4.5,_circle:rr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=rr(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},sr.prototype={constructor:sr,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var dr=16,pr=y(30*d);function gr(t,e){return+e?yr(t,e):vr(t)}function vr(t){return ar({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function yr(t,e){function n(r,i,o,s,l,u,c,h,f,d,g,y,m,_){var x=c-r,b=h-i,w=x*x+b*b;if(w>4*e&&m--){var M=s+d,j=l+g,C=u+y,P=S(M*M+j*j+C*C),T=E(C/=P),k=p(p(C)-1)e||p((x*B+b*L)/w-.5)>.3||s*d+l*g+u*y2?t[2]%360*d:0,O()):[m*f,_*f,x*f]},k.angle=function(t){return arguments.length?(b=t%360*d,O()):b*f},k.reflectX=function(t){return arguments.length?(w=t?-1:1,O()):w<0},k.reflectY=function(t){return arguments.length?(M=t?-1:1,O()):M<0},k.precision=function(t){return arguments.length?(a=gr(s,T=t*t),I()):S(T)},k.fitExtent=function(t,e){return ur(k,t,e)},k.fitSize=function(t,e){return cr(k,t,e)},k.fitWidth=function(t,e){return hr(k,t,e)},k.fitHeight=function(t,e){return fr(k,t,e)},function(){return e=t.apply(this,arguments),k.invert=e.invert&&A,O()}}function Sr(t){var e=0,n=l/3,r=Mr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*d,n=t[1]*d):[e*f,n*f]},i}function jr(t){var e=y(t);function n(t,n){return[t*e,w(n)/e]}return n.invert=function(t,n){return[t/e,E(n*e)]},n}function Cr(t,e){var n=w(t),r=(n+w(e))/2;if(p(r)=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:s).invert(t)},h.stream=function(n){return t&&e===n?t:t=Tr([s.stream(e=n),l.stream(n),u.stream(n)])},h.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),u.scale(t),h.translate(s.translate())):s.scale()},h.translate=function(t){if(!arguments.length)return s.translate();var e=s.scale(),o=+t[0],h=+t[1];return n=s.translate(t).clipExtent([[o-.455*e,h-.238*e],[o+.455*e,h+.238*e]]).stream(c),r=l.translate([o-.307*e,h+.201*e]).clipExtent([[o-.425*e+a,h+.12*e+a],[o-.214*e-a,h+.234*e-a]]).stream(c),i=u.translate([o-.205*e,h+.212*e]).clipExtent([[o-.214*e+a,h+.166*e+a],[o-.115*e-a,h+.234*e-a]]).stream(c),f()},h.fitExtent=function(t,e){return ur(h,t,e)},h.fitSize=function(t,e){return cr(h,t,e)},h.fitWidth=function(t,e){return hr(h,t,e)},h.fitHeight=function(t,e){return fr(h,t,e)},h.scale(1070)}function Ar(t){return function(e,n){var r=y(e),i=y(n),o=t(r*i);return[o*i*w(e),o*w(n)]}}function Or(t){return function(e,n){var r=S(e*e+n*n),i=t(r),o=w(i),a=y(i);return[v(e*o,r*a),E(r&&n*o/r)]}}var Ir=Ar((function(t){return S(2/(1+t))}));function Br(){return wr(Ir).scale(124.75).clipAngle(179.999)}Ir.invert=Or((function(t){return 2*E(t/2)}));var Lr=Ar((function(t){return(t=C(t))&&t/w(t)}));function Fr(){return wr(Lr).scale(79.4188).clipAngle(179.999)}function Dr(t,e){return[t,x(j((u+e)/2))]}function Rr(){return Nr(Dr).scale(961/h)}function Nr(t){var e,n,r,i=wr(t),o=i.center,a=i.scale,s=i.translate,u=i.clipExtent,c=null;function h(){var o=l*a(),s=i(ae(i.rotate()).invert([0,0]));return u(null==c?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===Dr?[[Math.max(s[0]-o,c),e],[Math.min(s[0]+o,n),r]]:[[c,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),h()):a()},i.translate=function(t){return arguments.length?(s(t),h()):s()},i.center=function(t){return arguments.length?(o(t),h()):o()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),h()):null==c?null:[[c,e],[n,r]]},h()}function zr(t){return j((u+t)/2)}function Hr(t,e){var n=y(t),r=t===e?w(t):x(n/y(e))/x(zr(e)/zr(t)),i=n*b(zr(t),r)/r;if(!r)return Dr;function o(t,e){i>0?e<-u+a&&(e=-u+a):e>u-a&&(e=u-a);var n=i/b(zr(e),r);return[n*w(r*t),i-n*y(r*t)]}return o.invert=function(t,e){var n=i-e,o=M(r)*S(t*t+n*n),a=v(t,p(n))*M(n);return n*r<0&&(a-=l*M(t)*M(n)),[a/r,2*g(b(i/o,1/r))-u]},o}function Gr(){return Sr(Hr).scale(109.5).parallels([30,30])}function Yr(t,e){return[t,e]}function Vr(){return wr(Yr).scale(152.63)}function Xr(t,e){var n=y(t),r=t===e?w(t):(n-y(e))/(e-t),i=n/r+t;if(p(r)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}Jr.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<$r&&(o=(i=(r-=n=(r*(Wr+Ur*i+o*(Zr+Kr*i))-e)/(Wr+3*Ur*i+o*(7*Zr+9*Kr*i)))*r)*i*i,!(p(n)a&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},ai.invert=Or(E),li.invert=Or((function(t){return 2*g(t)})),ci.invert=function(t,e){return[-e,2*g(_(t))-u]},t.geoAlbers=Pr,t.geoAlbersUsa=kr,t.geoArea=U,t.geoAzimuthalEqualArea=Br,t.geoAzimuthalEqualAreaRaw=Ir,t.geoAzimuthalEquidistant=Fr,t.geoAzimuthalEquidistantRaw=Lr,t.geoBounds=zt,t.geoCentroid=$t,t.geoCircle=ue,t.geoClipAntimeridian=be,t.geoClipCircle=je,t.geoClipExtent=ke,t.geoClipRectangle=Te,t.geoConicConformal=Gr,t.geoConicConformalRaw=Hr,t.geoConicEqualArea=Er,t.geoConicEqualAreaRaw=Cr,t.geoConicEquidistant=qr,t.geoConicEquidistantRaw=Xr,t.geoContains=$e,t.geoDistance=Ye,t.geoEqualEarth=ti,t.geoEqualEarthRaw=Jr,t.geoEquirectangular=Vr,t.geoEquirectangularRaw=Yr,t.geoGnomonic=ni,t.geoGnomonicRaw=ei,t.geoGraticule=en,t.geoGraticule10=nn,t.geoIdentity=ri,t.geoInterpolate=rn,t.geoLength=ze,t.geoMercator=Rr,t.geoMercatorRaw=Dr,t.geoNaturalEarth1=oi,t.geoNaturalEarth1Raw=ii,t.geoOrthographic=si,t.geoOrthographicRaw=ai,t.geoPath=ir,t.geoProjection=wr,t.geoProjectionMutator=Mr,t.geoRotation=ae,t.geoStereographic=ui,t.geoStereographicRaw=li,t.geoStream=L,t.geoTransform=or,t.geoTransverseMercator=hi,t.geoTransverseMercatorRaw=ci,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(/*! d3-array */"./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"))},"./node_modules/_d3-geo@1.6.4@d3-geo/build/d3-geo.js": /*!***********************************************************!*\ !*** ./node_modules/_d3-geo@1.6.4@d3-geo/build/d3-geo.js ***! \***********************************************************/ /*! no static exports found */function(t,e,n){!function(t,e){var n=function(){return new r};function r(){this.reset()}r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){o(i,t,this.t),o(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new r;function o(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var a=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,h=2*l,f=180/l,d=l/180,p=Math.abs,g=Math.atan,v=Math.atan2,y=Math.cos,m=Math.ceil,_=Math.exp,x=Math.log,b=Math.pow,w=Math.sin,M=Math.sign||function(t){return t>0?1:t<0?-1:0},S=Math.sqrt,j=Math.tan;function C(t){return t>1?0:t<-1?l:Math.acos(t)}function E(t){return t>1?u:t<-1?-u:Math.asin(t)}function P(t){return(t=w(t/2))*t}function T(){}function k(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var A={Feature:function(t,e){k(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=y(e=(e*=d)/2+c),a=w(e),s=N*a,l=R*o+s*y(i),u=s*r*w(i);H.add(v(u,l)),D=t,R=o,N=a}var U,Z,K,Q,$,J,tt,et,nt=function(t){return G.reset(),z(t,Y),2*G};function rt(t){return[v(t[1],t[0]),E(t[2])]}function it(t){var e=t[0],n=t[1],r=y(n);return[r*y(e),r*w(e),w(n)]}function ot(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function at(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function st(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function lt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ut(t){var e=S(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ct,ht,ft=n(),dt={point:pt,lineStart:vt,lineEnd:yt,polygonStart:function(){dt.point=mt,dt.lineStart=_t,dt.lineEnd=xt,ft.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),dt.point=pt,dt.lineStart=vt,dt.lineEnd=yt,H<0?(U=-(K=180),Z=-(Q=90)):ft>a?Q=90:ft<-a&&(Z=-90),ht[0]=U,ht[1]=K}};function pt(t,e){ct.push(ht=[U=t,K=t]),eQ&&(Q=e)}function gt(t,e){var n=it([t*d,e*d]);if(et){var r=at(et,n),i=at([r[1],-r[0],0],r);ut(i),i=rt(i);var o,a=t-$,s=a>0?1:-1,l=i[0]*f*s,u=p(a)>180;u^(s*$Q&&(Q=o):u^(s*$<(l=(l+360)%360-180)&&lQ&&(Q=e)),u?t<$?bt(U,t)>bt(U,K)&&(K=t):bt(t,K)>bt(U,K)&&(U=t):K>=U?(tK&&(K=t)):t>$?bt(U,t)>bt(U,K)&&(K=t):bt(t,K)>bt(U,K)&&(U=t)}else ct.push(ht=[U=t,K=t]);eQ&&(Q=e),et=n,$=t}function vt(){dt.point=gt}function yt(){ht[0]=U,ht[1]=K,dt.point=pt,et=null}function mt(t,e){if(et){var n=t-$;ft.add(p(n)>180?n+(n>0?360:-360):n)}else J=t,tt=e;Y.point(t,e),gt(t,e)}function _t(){Y.lineStart()}function xt(){mt(J,tt),Y.lineEnd(),p(ft)>a&&(U=-(K=180)),ht[0]=U,ht[1]=K,et=null}function bt(t,e){return(e-=t)<0?e+360:e}function wt(t,e){return t[0]-e[0]}function Mt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:ebt(r[0],r[1])&&(r[1]=i[1]),bt(i[0],r[1])>bt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=bt(r[1],i[0]))>a&&(a=s,U=i[0],K=r[1])}return ct=ht=null,U===1/0||Z===1/0?[[NaN,NaN],[NaN,NaN]]:[[U,Z],[K,Q]]},Ht={sphere:T,point:Gt,lineStart:Vt,lineEnd:Wt,polygonStart:function(){Ht.lineStart=Ut,Ht.lineEnd=Zt},polygonEnd:function(){Ht.lineStart=Vt,Ht.lineEnd=Wt}};function Gt(t,e){t*=d;var n=y(e*=d);Yt(n*y(t),n*w(t),w(e))}function Yt(t,e,n){++St,Ct+=(t-Ct)/St,Et+=(e-Et)/St,Pt+=(n-Pt)/St}function Vt(){Ht.point=Xt}function Xt(t,e){t*=d;var n=y(e*=d);Dt=n*y(t),Rt=n*w(t),Nt=w(e),Ht.point=qt,Yt(Dt,Rt,Nt)}function qt(t,e){t*=d;var n=y(e*=d),r=n*y(t),i=n*w(t),o=w(e),a=v(S((a=Rt*o-Nt*i)*a+(a=Nt*r-Dt*o)*a+(a=Dt*i-Rt*r)*a),Dt*r+Rt*i+Nt*o);jt+=a,Tt+=a*(Dt+(Dt=r)),kt+=a*(Rt+(Rt=i)),At+=a*(Nt+(Nt=o)),Yt(Dt,Rt,Nt)}function Wt(){Ht.point=Gt}function Ut(){Ht.point=Kt}function Zt(){Qt(Lt,Ft),Ht.point=Gt}function Kt(t,e){Lt=t,Ft=e,t*=d,e*=d,Ht.point=Qt;var n=y(e);Dt=n*y(t),Rt=n*w(t),Nt=w(e),Yt(Dt,Rt,Nt)}function Qt(t,e){t*=d;var n=y(e*=d),r=n*y(t),i=n*w(t),o=w(e),a=Rt*o-Nt*i,s=Nt*r-Dt*o,l=Dt*i-Rt*r,u=S(a*a+s*s+l*l),c=E(u),h=u&&-c/u;Ot+=h*a,It+=h*s,Bt+=h*l,jt+=c,Tt+=c*(Dt+(Dt=r)),kt+=c*(Rt+(Rt=i)),At+=c*(Nt+(Nt=o)),Yt(Dt,Rt,Nt)}var $t=function(t){St=jt=Ct=Et=Pt=Tt=kt=At=Ot=It=Bt=0,z(t,Ht);var e=Ot,n=It,r=Bt,i=e*e+n*n+r*r;return il?t-h:t<-l?t+h:t,e]}function ne(t,e,n){return(t%=h)?e||n?te(ie(t),oe(e,n)):ie(t):e||n?oe(e,n):ee}function re(t){return function(e,n){return[(e+=t)>l?e-h:e<-l?e+h:e,n]}}function ie(t){var e=re(t);return e.invert=re(-t),e}function oe(t,e){var n=y(t),r=w(t),i=y(e),o=w(e);function a(t,e){var a=y(e),s=y(t)*a,l=w(t)*a,u=w(e),c=u*n+s*r;return[v(l*i-c*o,s*n-u*r),E(c*i+l*o)]}return a.invert=function(t,e){var a=y(e),s=y(t)*a,l=w(t)*a,u=w(e),c=u*i-l*o;return[v(l*i+u*o,s*n+c*r),E(c*n-s*r)]},a}ee.invert=ee;var ae=function(t){function e(e){return(e=t(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e}return t=ne(t[0]*d,t[1]*d,t.length>2?t[2]*d:0),e.invert=function(e){return(e=t.invert(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e},e};function se(t,e,n,r,i,o){if(n){var a=y(e),s=w(e),l=r*n;null==i?(i=e+r*h,o=e-l/2):(i=le(a,i),o=le(a,o),(r>0?io)&&(i+=r*h));for(var u,c=i;r>0?c>o:c1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},he=function(t,e,n,r,i,o){var a,s=t[0],l=t[1],u=0,c=1,h=e[0]-s,f=e[1]-l;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>u&&(u=a)}else if(h>0){if(a0)){if(a/=f,f<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>u&&(u=a)}else if(f>0){if(a0&&(t[0]=s+u*h,t[1]=l+u*f),c<1&&(e[0]=s+c*h,e[1]=l+c*f),!0}}}}},fe=function(t,e){return p(t[0]-e[0])=0;--o)i.point((c=u[o])[0],c[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}};function ge(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r0)do{s.point(0===u||3===u?t:r,u>1?i:n)}while((u=(u+a+4)%4)!==h);else s.point(o[0],o[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-r)0?2:1:p(e[1]-n)0?1:0:i>0?3:2}function u(t,e){return c(t.x,e.x)}function c(t,e){var n=l(t,1),r=l(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var l,c,h,f,d,p,g,v,y,m,_,x=a,b=ce(),w={point:M,lineStart:E,lineEnd:P,polygonStart:j,polygonEnd:C};function M(t,e){o(t,e)&&x.point(t,e)}function S(){for(var e=0,n=0,r=c.length;ni&&(f-o)*(i-a)>(d-a)*(t-o)&&++e:d<=i&&(f-o)*(i-a)<(d-a)*(t-o)&&--e;return e}function j(){x=b,l=[],c=[],_=!0}function C(){var t=S(),n=_&&t,r=(l=e.merge(l)).length;(n||r)&&(a.polygonStart(),n&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),r&&pe(l,u,t,s,a),a.polygonEnd()),x=a,l=c=h=null}function E(){w.point=T,c&&c.push(h=[]),m=!0,y=!1,g=v=NaN}function P(){l&&(T(f,d),p&&y&&b.rejoin(),l.push(b.result())),w.point=M,y&&x.lineEnd()}function T(e,a){var s=o(e,a);if(c&&h.push([e,a]),m)f=e,d=a,p=s,m=!1,s&&(x.lineStart(),x.point(e,a));else if(s&&y)x.point(e,a);else{var l=[g=Math.max(ye,Math.min(ve,g)),v=Math.max(ye,Math.min(ve,v))],u=[e=Math.max(ye,Math.min(ve,e)),a=Math.max(ye,Math.min(ve,a))];he(l,u,t,n,r,i)?(y||(x.lineStart(),x.point(l[0],l[1])),x.point(u[0],u[1]),s||x.lineEnd(),_=!1):s&&(x.lineStart(),x.point(e,a),_=!1)}g=e,v=a,y=s}return w}}var _e,xe,be,we=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=me(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}},Me=n(),Se=function(t,e){var n=e[0],r=e[1],i=[w(n),-y(n),0],o=0,s=0;Me.reset();for(var u=0,f=t.length;u=0?1:-1,O=A*k,I=O>l,B=x*P;if(Me.add(v(B*A*w(O),b*T+B*y(O))),o+=I?k+A*h:k,I^m>=n^j>=n){var L=at(it(g),it(S));ut(L);var F=at(i,L);ut(F);var D=(I^k>=0?-1:1)*E(F[2]);(r>D||r===D&&(L[0]||L[1]))&&(s+=I^k>=0?1:-1)}}return(o<-a||oa})).map(c)).concat(e.range(m(s/v)*v,o,v).filter((function(t){return p(t%_)>a})).map(h))}return b.lines=function(){return w().map((function(t){return{type:"LineString",coordinates:t}}))},b.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(d(l).slice(1),f(r).reverse().slice(1),d(u).reverse().slice(1))]}},b.extent=function(t){return arguments.length?b.extentMajor(t).extentMinor(t):b.extentMinor()},b.extentMajor=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],u=+t[0][1],l=+t[1][1],i>r&&(t=i,i=r,r=t),u>l&&(t=u,u=l,l=t),b.precision(x)):[[i,u],[r,l]]},b.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],s=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),s>o&&(e=s,s=o,o=e),b.precision(x)):[[n,s],[t,o]]},b.step=function(t){return arguments.length?b.stepMajor(t).stepMinor(t):b.stepMinor()},b.stepMajor=function(t){return arguments.length?(y=+t[0],_=+t[1],b):[y,_]},b.stepMinor=function(t){return arguments.length?(g=+t[0],v=+t[1],b):[g,v]},b.precision=function(e){return arguments.length?(x=+e,c=Ve(s,o,90),h=Xe(n,t,x),f=Ve(u,l,90),d=Xe(i,r,x),b):x},b.extentMajor([[-180,-90+a],[180,90-a]]).extentMinor([[-180,-80-a],[180,80+a]])}function We(){return qe()()}var Ue,Ze,Ke,Qe,$e=function(t,e){var n=t[0]*d,r=t[1]*d,i=e[0]*d,o=e[1]*d,a=y(r),s=w(r),l=y(o),u=w(o),c=a*y(n),h=a*w(n),p=l*y(i),g=l*w(i),m=2*E(S(P(o-r)+a*l*P(i-n))),_=w(m),x=m?function(t){var e=w(t*=m)/_,n=w(m-t)/_,r=n*c+e*p,i=n*h+e*g,o=n*s+e*u;return[v(i,r)*f,v(o,S(r*r+i*i))*f]}:function(){return[n*f,r*f]};return x.distance=m,x},Je=function(t){return t},tn=n(),en=n(),nn={point:T,lineStart:T,lineEnd:T,polygonStart:function(){nn.lineStart=rn,nn.lineEnd=sn},polygonEnd:function(){nn.lineStart=nn.lineEnd=nn.point=T,tn.add(p(en)),en.reset()},result:function(){var t=tn/2;return tn.reset(),t}};function rn(){nn.point=on}function on(t,e){nn.point=an,Ue=Ke=t,Ze=Qe=e}function an(t,e){en.add(Qe*t-Ke*e),Ke=t,Qe=e}function sn(){an(Ue,Ze)}var ln=1/0,un=ln,cn=-ln,hn=cn,fn={point:dn,lineStart:T,lineEnd:T,polygonStart:T,polygonEnd:T,result:function(){var t=[[ln,un],[cn,hn]];return cn=hn=-(un=ln=1/0),t}};function dn(t,e){tcn&&(cn=t),ehn&&(hn=e)}var pn,gn,vn,yn,mn=0,_n=0,xn=0,bn=0,wn=0,Mn=0,Sn=0,jn=0,Cn=0,En={point:Pn,lineStart:Tn,lineEnd:On,polygonStart:function(){En.lineStart=In,En.lineEnd=Bn},polygonEnd:function(){En.point=Pn,En.lineStart=Tn,En.lineEnd=On},result:function(){var t=Cn?[Sn/Cn,jn/Cn]:Mn?[bn/Mn,wn/Mn]:xn?[mn/xn,_n/xn]:[NaN,NaN];return mn=_n=xn=bn=wn=Mn=Sn=jn=Cn=0,t}};function Pn(t,e){mn+=t,_n+=e,++xn}function Tn(){En.point=kn}function kn(t,e){En.point=An,Pn(vn=t,yn=e)}function An(t,e){var n=t-vn,r=e-yn,i=S(n*n+r*r);bn+=i*(vn+t)/2,wn+=i*(yn+e)/2,Mn+=i,Pn(vn=t,yn=e)}function On(){En.point=Pn}function In(){En.point=Ln}function Bn(){Fn(pn,gn)}function Ln(t,e){En.point=Fn,Pn(pn=vn=t,gn=yn=e)}function Fn(t,e){var n=t-vn,r=e-yn,i=S(n*n+r*r);bn+=i*(vn+t)/2,wn+=i*(yn+e)/2,Mn+=i,Sn+=(i=yn*t-vn*e)*(vn+t),jn+=i*(yn+e),Cn+=3*i,Pn(vn=t,yn=e)}function Dn(t){this._context=t}Dn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,h)}},result:T};var Rn,Nn,zn,Hn,Gn,Yn=n(),Vn={point:T,lineStart:function(){Vn.point=Xn},lineEnd:function(){Rn&&qn(Nn,zn),Vn.point=T},polygonStart:function(){Rn=!0},polygonEnd:function(){Rn=null},result:function(){var t=+Yn;return Yn.reset(),t}};function Xn(t,e){Vn.point=qn,Nn=Hn=t,zn=Gn=e}function qn(t,e){Hn-=t,Gn-=e,Yn.add(S(Hn*Hn+Gn*Gn)),Hn=t,Gn=e}function Wn(){this._string=[]}function Un(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Wn.prototype={_radius:4.5,_circle:Un(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Un(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Zn=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),z(t,n(r))),r.result()}return o.area=function(t){return z(t,n(nn)),nn.result()},o.measure=function(t){return z(t,n(Vn)),Vn.result()},o.bounds=function(t){return z(t,n(fn)),fn.result()},o.centroid=function(t){return z(t,n(En)),En.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,Je):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new Wn):new Dn(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},Kn=function(t,n,r,i){return function(o,a){var s,l,u,c=n(a),h=o.invert(i[0],i[1]),f=ce(),d=n(f),p=!1,g={point:v,lineStart:m,lineEnd:_,polygonStart:function(){g.point=x,g.lineStart=b,g.lineEnd=w,l=[],s=[]},polygonEnd:function(){g.point=v,g.lineStart=m,g.lineEnd=_,l=e.merge(l);var t=Se(s,h);l.length?(p||(a.polygonStart(),p=!0),pe(l,$n,t,r,a)):t&&(p||(a.polygonStart(),p=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),p&&(a.polygonEnd(),p=!1),l=s=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function v(e,n){var r=o(e,n);t(e=r[0],n=r[1])&&a.point(e,n)}function y(t,e){var n=o(t,e);c.point(n[0],n[1])}function m(){g.point=y,c.lineStart()}function _(){g.point=v,c.lineEnd()}function x(t,e){u.push([t,e]);var n=o(t,e);d.point(n[0],n[1])}function b(){d.lineStart(),u=[]}function w(){x(u[0][0],u[0][1]),d.lineEnd();var t,e,n,r,i=d.clean(),o=f.result(),c=o.length;if(u.pop(),s.push(u),u=null,c)if(1&i){if((e=(n=o[0]).length-1)>0){for(p||(a.polygonStart(),p=!0),a.lineStart(),t=0;t1&&2&i&&o.push(o.pop().concat(o.shift())),l.push(o.filter(Qn))}return g}};function Qn(t){return t.length>1}function $n(t,e){return((t=t.x)[0]<0?t[1]-u-a:u-t[1])-((e=e.x)[0]<0?e[1]-u-a:u-e[1])}var Jn=Kn((function(){return!0}),tr,nr,[-l,-u]);function tr(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var c=o>0?l:-l,h=p(o-n);p(h-l)0?u:-u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),t.point(o,r),e=0):i!==c&&h>=l&&(p(n-i)a?g((w(e)*(o=y(r))*w(n)-w(r)*(i=y(e))*w(t))/(i*o*s)):(e+r)/2}function nr(t,e,n,r){var i;if(null==t)i=n*u,r.point(-l,i),r.point(0,i),r.point(l,i),r.point(l,0),r.point(l,-i),r.point(0,-i),r.point(-l,-i),r.point(-l,0),r.point(-l,i);else if(p(t[0]-e[0])>a){var o=t[0]0,i=p(n)>a;function o(n,r,i,o){se(o,t,e,i,n,r)}function s(t,e){return y(t)*y(e)>n}function u(t){var e,n,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(d,p){var g,v=[d,p],y=s(d,p),m=r?y?0:h(d,p):y?h(d+(d<0?l:-l),p):0;if(!e&&(u=o=y)&&t.lineStart(),y!==o&&(!(g=c(e,v))||fe(e,g)||fe(v,g))&&(v[0]+=a,v[1]+=a,y=s(v[0],v[1])),y!==o)f=0,y?(t.lineStart(),g=c(v,e),t.point(g[0],g[1])):(g=c(e,v),t.point(g[0],g[1]),t.lineEnd()),e=g;else if(i&&e&&r^y){var _;m&n||!(_=c(v,e,!0))||(f=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!y||e&&fe(e,v)||t.point(v[0],v[1]),e=v,o=y,n=m},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}function c(t,e,r){var i=[1,0,0],o=at(it(t),it(e)),s=ot(o,o),u=o[0],c=s-u*u;if(!c)return!r&&t;var h=n*s/c,f=-n*u/c,d=at(i,o),g=lt(i,h);st(g,lt(o,f));var v=d,y=ot(g,v),m=ot(v,v),_=y*y-m*(ot(g,g)-1);if(!(_<0)){var x=S(_),b=lt(v,(-y-x)/m);if(st(b,g),b=rt(b),!r)return b;var w,M=t[0],j=e[0],C=t[1],E=e[1];j0^b[1]<(p(b[0]-M)l^(M<=b[0]&&b[0]<=j)){var k=lt(v,(-y+x)/m);return st(k,g),[b,rt(k)]}}}function h(e,n){var i=r?t:l-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Kn(s,u,o,r?[0,-t]:[-l,t-l])},ir=function(t){return{stream:or(t)}};function or(t){return function(e){var n=new ar;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ar(){}function sr(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),z(n,t.stream(fn));var a=fn.result(),s=Math.min(r/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),l=+e[0][0]+(r-s*(a[1][0]+a[0][0]))/2,u=+e[0][1]+(i-s*(a[1][1]+a[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*s).translate([l,u])}function lr(t,e,n){return sr(t,[[0,0],e],n)}ar.prototype={constructor:ar,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var ur=16,cr=y(30*d),hr=function(t,e){return+e?dr(t,e):fr(t)};function fr(t){return or({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function dr(t,e){function n(r,i,o,s,l,u,c,h,f,d,g,y,m,_){var x=c-r,b=h-i,w=x*x+b*b;if(w>4*e&&m--){var M=s+d,j=l+g,C=u+y,P=S(M*M+j*j+C*C),T=E(C/=P),k=p(p(C)-1)e||p((x*B+b*L)/w-.5)>.3||s*d+l*g+u*y2?t[2]%360*d:0,A()):[m*f,_*f,x*f]},P.precision=function(t){return arguments.length?(E=hr(k,C=t*t),O()):S(C)},P.fitExtent=function(t,e){return sr(P,t,e)},P.fitSize=function(t,e){return lr(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&T,A()}}function yr(t){var e=0,n=l/3,r=vr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*d,n=t[1]*d):[e*f,n*f]},i}function mr(t){var e=y(t);function n(t,n){return[t*e,w(n)/e]}return n.invert=function(t,n){return[t/e,E(n*e)]},n}function _r(t,e){var n=w(t),r=(n+w(e))/2;if(p(r)=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:s).invert(t)},h.stream=function(n){return t&&e===n?t:t=wr([s.stream(e=n),l.stream(n),u.stream(n)])},h.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),u.scale(t),h.translate(s.translate())):s.scale()},h.translate=function(t){if(!arguments.length)return s.translate();var e=s.scale(),o=+t[0],h=+t[1];return n=s.translate(t).clipExtent([[o-.455*e,h-.238*e],[o+.455*e,h+.238*e]]).stream(c),r=l.translate([o-.307*e,h+.201*e]).clipExtent([[o-.425*e+a,h+.12*e+a],[o-.214*e-a,h+.234*e-a]]).stream(c),i=u.translate([o-.205*e,h+.212*e]).clipExtent([[o-.214*e+a,h+.166*e+a],[o-.115*e-a,h+.234*e-a]]).stream(c),f()},h.fitExtent=function(t,e){return sr(h,t,e)},h.fitSize=function(t,e){return lr(h,t,e)},h.scale(1070)};function Sr(t){return function(e,n){var r=y(e),i=y(n),o=t(r*i);return[o*i*w(e),o*w(n)]}}function jr(t){return function(e,n){var r=S(e*e+n*n),i=t(r),o=w(i),a=y(i);return[v(e*o,r*a),E(r&&n*o/r)]}}var Cr=Sr((function(t){return S(2/(1+t))}));Cr.invert=jr((function(t){return 2*E(t/2)}));var Er=function(){return gr(Cr).scale(124.75).clipAngle(179.999)},Pr=Sr((function(t){return(t=C(t))&&t/w(t)}));Pr.invert=jr((function(t){return t}));var Tr=function(){return gr(Pr).scale(79.4188).clipAngle(179.999)};function kr(t,e){return[t,x(j((u+e)/2))]}kr.invert=function(t,e){return[t,2*g(_(e))-u]};var Ar=function(){return Or(kr).scale(961/h)};function Or(t){var e,n,r,i=gr(t),o=i.center,a=i.scale,s=i.translate,u=i.clipExtent,c=null;function h(){var o=l*a(),s=i(ae(i.rotate()).invert([0,0]));return u(null==c?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===kr?[[Math.max(s[0]-o,c),e],[Math.min(s[0]+o,n),r]]:[[c,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),h()):a()},i.translate=function(t){return arguments.length?(s(t),h()):s()},i.center=function(t){return arguments.length?(o(t),h()):o()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),h()):null==c?null:[[c,e],[n,r]]},h()}function Ir(t){return j((u+t)/2)}function Br(t,e){var n=y(t),r=t===e?w(t):x(n/y(e))/x(Ir(e)/Ir(t)),i=n*b(Ir(t),r)/r;if(!r)return kr;function o(t,e){i>0?e<-u+a&&(e=-u+a):e>u-a&&(e=u-a);var n=i/b(Ir(e),r);return[n*w(r*t),i-n*y(r*t)]}return o.invert=function(t,e){var n=i-e,o=M(r)*S(t*t+n*n);return[v(t,p(n))/r*M(n),2*g(b(i/o,1/r))-u]},o}var Lr=function(){return yr(Br).scale(109.5).parallels([30,30])};function Fr(t,e){return[t,e]}Fr.invert=Fr;var Dr=function(){return gr(Fr).scale(152.63)};function Rr(t,e){var n=y(t),r=t===e?w(t):(n-y(e))/(e-t),i=n/r+t;if(p(r)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};t.geoArea=nt,t.geoBounds=zt,t.geoCentroid=$t,t.geoCircle=ue,t.geoClipExtent=we,t.geoContains=Ye,t.geoDistance=Be,t.geoGraticule=qe,t.geoGraticule10=We,t.geoInterpolate=$e,t.geoLength=Ae,t.geoPath=Zn,t.geoAlbers=br,t.geoAlbersUsa=Mr,t.geoAzimuthalEqualArea=Er,t.geoAzimuthalEqualAreaRaw=Cr,t.geoAzimuthalEquidistant=Tr,t.geoAzimuthalEquidistantRaw=Pr,t.geoConicConformal=Lr,t.geoConicConformalRaw=Br,t.geoConicEqualArea=xr,t.geoConicEqualAreaRaw=_r,t.geoConicEquidistant=Nr,t.geoConicEquidistantRaw=Rr,t.geoEquirectangular=Dr,t.geoEquirectangularRaw=Fr,t.geoGnomonic=Hr,t.geoGnomonicRaw=zr,t.geoIdentity=Yr,t.geoProjection=gr,t.geoProjectionMutator=vr,t.geoMercator=Ar,t.geoMercatorRaw=kr,t.geoOrthographic=Xr,t.geoOrthographicRaw=Vr,t.geoStereographic=Wr,t.geoStereographicRaw=qr,t.geoTransverseMercator=Zr,t.geoTransverseMercatorRaw=Ur,t.geoRotation=ae,t.geoStream=z,t.geoTransform=ir,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(/*! d3-array */"./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"))},"./node_modules/_d3-geo@2.0.1@d3-geo/dist/d3-geo.js": /*!**********************************************************!*\ !*** ./node_modules/_d3-geo@2.0.1@d3-geo/dist/d3-geo.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){!function(t,e){var n=1e-6,r=1e-12,i=Math.PI,o=i/2,a=i/4,s=2*i,l=180/i,u=i/180,c=Math.abs,h=Math.atan,f=Math.atan2,d=Math.cos,p=Math.ceil,g=Math.exp,v=Math.hypot,y=Math.log,m=Math.pow,_=Math.sin,x=Math.sign||function(t){return t>0?1:t<0?-1:0},b=Math.sqrt,w=Math.tan;function M(t){return t>1?0:t<-1?i:Math.acos(t)}function S(t){return t>1?o:t<-1?-o:Math.asin(t)}function j(t){return(t=_(t/2))*t}function C(){}function E(t,e){t&&T.hasOwnProperty(t.type)&&T[t.type](t,e)}var P={Feature:function(t,e){E(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=d(e=(e*=u)/2+a),s=_(e),l=D*s,c=F*o+l*d(i),h=l*r*_(i);Z.add(f(h,c)),L=t,F=o,D=s}function nt(t){return K=new e.Adder,O(t,Q),2*K}function rt(t){return[f(t[1],t[0]),S(t[2])]}function it(t){var e=t[0],n=t[1],r=d(n);return[r*d(e),r*_(e),_(n)]}function ot(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function at(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function st(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function lt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ut(t){var e=b(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ct,ht,ft,dt,pt,gt,vt,yt,mt,_t,xt,bt,wt,Mt,St,jt,Ct={point:Et,lineStart:Tt,lineEnd:kt,polygonStart:function(){Ct.point=At,Ct.lineStart=Ot,Ct.lineEnd=It,q=new e.Adder,Q.polygonStart()},polygonEnd:function(){Q.polygonEnd(),Ct.point=Et,Ct.lineStart=Tt,Ct.lineEnd=kt,Z<0?(R=-(z=180),N=-(H=90)):q>n?H=90:q<-n&&(N=-90),U[0]=R,U[1]=z},sphere:function(){R=-(z=180),N=-(H=90)}};function Et(t,e){W.push(U=[R=t,z=t]),eH&&(H=e)}function Pt(t,e){var n=it([t*u,e*u]);if(X){var r=at(X,n),i=at([r[1],-r[0],0],r);ut(i),i=rt(i);var o,a=t-G,s=a>0?1:-1,h=i[0]*l*s,f=c(a)>180;f^(s*GH&&(H=o):f^(s*G<(h=(h+360)%360-180)&&hH&&(H=e)),f?tBt(R,z)&&(z=t):Bt(t,z)>Bt(R,z)&&(R=t):z>=R?(tz&&(z=t)):t>G?Bt(R,t)>Bt(R,z)&&(z=t):Bt(t,z)>Bt(R,z)&&(R=t)}else W.push(U=[R=t,z=t]);eH&&(H=e),X=n,G=t}function Tt(){Ct.point=Pt}function kt(){U[0]=R,U[1]=z,Ct.point=Et,X=null}function At(t,e){if(X){var n=t-G;q.add(c(n)>180?n+(n>0?360:-360):n)}else Y=t,V=e;Q.point(t,e),Pt(t,e)}function Ot(){Q.lineStart()}function It(){At(Y,V),Q.lineEnd(),c(q)>n&&(R=-(z=180)),U[0]=R,U[1]=z,X=null}function Bt(t,e){return(e-=t)<0?e+360:e}function Lt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eBt(r[0],r[1])&&(r[1]=i[1]),Bt(i[0],r[1])>Bt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=Bt(r[1],i[0]))>a&&(a=s,R=i[0],z=r[1])}return W=U=null,R===1/0||N===1/0?[[NaN,NaN],[NaN,NaN]]:[[R,N],[z,H]]}var Rt={sphere:C,point:Nt,lineStart:Ht,lineEnd:Vt,polygonStart:function(){Rt.lineStart=Xt,Rt.lineEnd=qt},polygonEnd:function(){Rt.lineStart=Ht,Rt.lineEnd=Vt}};function Nt(t,e){t*=u;var n=d(e*=u);zt(n*d(t),n*_(t),_(e))}function zt(t,e,n){++ct,ft+=(t-ft)/ct,dt+=(e-dt)/ct,pt+=(n-pt)/ct}function Ht(){Rt.point=Gt}function Gt(t,e){t*=u;var n=d(e*=u);Mt=n*d(t),St=n*_(t),jt=_(e),Rt.point=Yt,zt(Mt,St,jt)}function Yt(t,e){t*=u;var n=d(e*=u),r=n*d(t),i=n*_(t),o=_(e),a=f(b((a=St*o-jt*i)*a+(a=jt*r-Mt*o)*a+(a=Mt*i-St*r)*a),Mt*r+St*i+jt*o);ht+=a,gt+=a*(Mt+(Mt=r)),vt+=a*(St+(St=i)),yt+=a*(jt+(jt=o)),zt(Mt,St,jt)}function Vt(){Rt.point=Nt}function Xt(){Rt.point=Wt}function qt(){Ut(bt,wt),Rt.point=Nt}function Wt(t,e){bt=t,wt=e,t*=u,e*=u,Rt.point=Ut;var n=d(e);Mt=n*d(t),St=n*_(t),jt=_(e),zt(Mt,St,jt)}function Ut(t,e){t*=u;var n=d(e*=u),r=n*d(t),i=n*_(t),o=_(e),a=St*o-jt*i,s=jt*r-Mt*o,l=Mt*i-St*r,c=v(a,s,l),h=S(c),f=c&&-h/c;mt.add(f*a),_t.add(f*s),xt.add(f*l),ht+=h,gt+=h*(Mt+(Mt=r)),vt+=h*(St+(St=i)),yt+=h*(jt+(jt=o)),zt(Mt,St,jt)}function Zt(t){ct=ht=ft=dt=pt=gt=vt=yt=0,mt=new e.Adder,_t=new e.Adder,xt=new e.Adder,O(t,Rt);var i=+mt,o=+_t,a=+xt,s=v(i,o,a);return si?t+Math.round(-t/s)*s:t,e]}function Jt(t,e,n){return(t%=s)?e||n?Qt(ee(t),ne(e,n)):ee(t):e||n?ne(e,n):$t}function te(t){return function(e,n){return[(e+=t)>i?e-s:e<-i?e+s:e,n]}}function ee(t){var e=te(t);return e.invert=te(-t),e}function ne(t,e){var n=d(t),r=_(t),i=d(e),o=_(e);function a(t,e){var a=d(e),s=d(t)*a,l=_(t)*a,u=_(e),c=u*n+s*r;return[f(l*i-c*o,s*n-u*r),S(c*i+l*o)]}return a.invert=function(t,e){var a=d(e),s=d(t)*a,l=_(t)*a,u=_(e),c=u*i-l*o;return[f(l*i+u*o,s*n+c*r),S(c*n-s*r)]},a}function re(t){function e(e){return(e=t(e[0]*u,e[1]*u))[0]*=l,e[1]*=l,e}return t=Jt(t[0]*u,t[1]*u,t.length>2?t[2]*u:0),e.invert=function(e){return(e=t.invert(e[0]*u,e[1]*u))[0]*=l,e[1]*=l,e},e}function ie(t,e,n,r,i,o){if(n){var a=d(e),l=_(e),u=r*n;null==i?(i=e+r*s,o=e-u/2):(i=oe(a,i),o=oe(a,o),(r>0?io)&&(i+=r*s));for(var c,h=i;r>0?h>o:h1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function le(t,e){return c(t[0]-e[0])=0;--a)o.point((h=c[a])[0],h[1]);else i(d.x,d.p.x,-1,o);d=d.p}c=(d=d.o).z,p=!p}while(!d.v);o.lineEnd()}}}function he(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,D=F*L,R=D>i,N=E*I;if(y.add(f(N*F*_(D),P*B+N*d(D))),g+=R?L+F*s:L,R^j>=u^A>=u){var z=at(it(M),it(k));ut(z);var H=at(p,z);ut(H);var G=(R^L>=0?-1:1)*S(H[2]);(c>G||c===G&&(z[0]||z[1]))&&(v+=R^L>=0?1:-1)}}return(g<-n||g0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t1&&2&i&&u.push(u.pop().concat(u.shift())),s.push(u.filter(ge))}return d}}function ge(t){return t.length>1}function ve(t,e){return((t=t.x)[0]<0?t[1]-o-n:o-t[1])-((e=e.x)[0]<0?e[1]-o-n:o-e[1])}$t.invert=$t;var ye=pe((function(){return!0}),me,xe,[-i,-o]);function me(t){var e,r=NaN,a=NaN,s=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(l,u){var h=l>0?i:-i,f=c(l-r);c(f-i)0?o:-o),t.point(s,a),t.lineEnd(),t.lineStart(),t.point(h,a),t.point(l,a),e=0):s!==h&&f>=i&&(c(r-s)n?h((_(e)*(a=d(i))*_(r)-_(i)*(o=d(e))*_(t))/(o*a*s)):(e+i)/2}function xe(t,e,r,a){var s;if(null==t)s=r*o,a.point(-i,s),a.point(0,s),a.point(i,s),a.point(i,0),a.point(i,-s),a.point(0,-s),a.point(-i,-s),a.point(-i,0),a.point(-i,s);else if(c(t[0]-e[0])>n){var l=t[0]0,a=c(e)>n;function s(e,n,i,o){ie(o,t,r,i,e,n)}function l(t,n){return d(t)*d(n)>e}function h(t){var e,n,r,s,u;return{lineStart:function(){s=r=!1,u=1},point:function(c,h){var d,g=[c,h],v=l(c,h),y=o?v?0:p(c,h):v?p(c+(c<0?i:-i),h):0;if(!e&&(s=r=v)&&t.lineStart(),v!==r&&(!(d=f(e,g))||le(e,d)||le(g,d))&&(g[2]=1),v!==r)u=0,v?(t.lineStart(),d=f(g,e),t.point(d[0],d[1])):(d=f(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(a&&e&&o^v){var m;y&n||!(m=f(g,e,!0))||(u=0,o?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!v||e&&le(e,g)||t.point(g[0],g[1]),e=g,r=v,n=y},lineEnd:function(){r&&t.lineEnd(),e=null},clean:function(){return u|(s&&r)<<1}}}function f(t,r,o){var a=[1,0,0],s=at(it(t),it(r)),l=ot(s,s),u=s[0],h=l-u*u;if(!h)return!o&&t;var f=e*l/h,d=-e*u/h,p=at(a,s),g=lt(a,f);st(g,lt(s,d));var v=p,y=ot(g,v),m=ot(v,v),_=y*y-m*(ot(g,g)-1);if(!(_<0)){var x=b(_),w=lt(v,(-y-x)/m);if(st(w,g),w=rt(w),!o)return w;var M,S=t[0],j=r[0],C=t[1],E=r[1];j0^w[1]<(c(w[0]-S)i^(S<=w[0]&&w[0]<=j)){var k=lt(v,(-y+x)/m);return st(k,g),[w,rt(k)]}}}function p(e,n){var r=o?t:i-t,a=0;return e<-r?a|=1:e>r&&(a|=2),n<-r?a|=4:n>r&&(a|=8),a}return pe(l,h,s,o?[0,-t]:[-i,t-i])}function we(t,e,n,r,i,o){var a,s=t[0],l=t[1],u=0,c=1,h=e[0]-s,f=e[1]-l;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>u&&(u=a)}else if(h>0){if(a0)){if(a/=f,f<0){if(a0){if(a>c)return;a>u&&(u=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>u&&(u=a)}else if(f>0){if(a0&&(t[0]=s+u*h,t[1]=l+u*f),c<1&&(e[0]=s+c*h,e[1]=l+c*f),!0}}}}}var Me,Se,je,Ce,Ee=1e9,Pe=-Ee;function Te(t,r,i,o){function a(e,n){return t<=e&&e<=i&&r<=n&&n<=o}function s(e,n,a,s){var u=0,c=0;if(null==e||(u=l(e,a))!==(c=l(n,a))||h(e,n)<0^a>0)do{s.point(0===u||3===u?t:i,u>1?o:r)}while((u=(u+a+4)%4)!==c);else s.point(n[0],n[1])}function l(e,o){return c(e[0]-t)0?0:3:c(e[0]-i)0?2:1:c(e[1]-r)0?1:0:o>0?3:2}function u(t,e){return h(t.x,e.x)}function h(t,e){var n=l(t,1),r=l(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(n){var l,c,h,f,d,p,g,v,y,m,_,x=n,b=se(),w={point:M,lineStart:E,lineEnd:P,polygonStart:j,polygonEnd:C};function M(t,e){a(t,e)&&x.point(t,e)}function S(){for(var e=0,n=0,r=c.length;no&&(f-i)*(o-a)>(d-a)*(t-i)&&++e:d<=o&&(f-i)*(o-a)<(d-a)*(t-i)&&--e;return e}function j(){x=b,l=[],c=[],_=!0}function C(){var t=S(),r=_&&t,i=(l=e.merge(l)).length;(r||i)&&(n.polygonStart(),r&&(n.lineStart(),s(null,null,1,n),n.lineEnd()),i&&ce(l,u,t,s,n),n.polygonEnd()),x=n,l=c=h=null}function E(){w.point=T,c&&c.push(h=[]),m=!0,y=!1,g=v=NaN}function P(){l&&(T(f,d),p&&y&&b.rejoin(),l.push(b.result())),w.point=M,y&&x.lineEnd()}function T(e,n){var s=a(e,n);if(c&&h.push([e,n]),m)f=e,d=n,p=s,m=!1,s&&(x.lineStart(),x.point(e,n));else if(s&&y)x.point(e,n);else{var l=[g=Math.max(Pe,Math.min(Ee,g)),v=Math.max(Pe,Math.min(Ee,v))],u=[e=Math.max(Pe,Math.min(Ee,e)),n=Math.max(Pe,Math.min(Ee,n))];we(l,u,t,r,i,o)?(y||(x.lineStart(),x.point(l[0],l[1])),x.point(u[0],u[1]),s||x.lineEnd(),_=!1):s&&(x.lineStart(),x.point(e,n),_=!1)}g=e,v=n,y=s}return w}}function ke(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=Te(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}}var Ae={sphere:C,point:C,lineStart:Oe,lineEnd:C,polygonStart:C,polygonEnd:C};function Oe(){Ae.point=Be,Ae.lineEnd=Ie}function Ie(){Ae.point=Ae.lineEnd=C}function Be(t,e){Se=t*=u,je=_(e*=u),Ce=d(e),Ae.point=Le}function Le(t,e){t*=u;var n=_(e*=u),r=d(e),i=c(t-Se),o=d(i),a=r*_(i),s=Ce*n-je*r*o,l=je*n+Ce*r*o;Me.add(f(b(a*a+s*s),l)),Se=t,je=n,Ce=r}function Fe(t){return Me=new e.Adder,O(t,Ae),+Me}var De=[null,null],Re={type:"LineString",coordinates:De};function Ne(t,e){return De[0]=t,De[1]=e,Fe(Re)}var ze={Feature:function(t,e){return Ge(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(o=Ne(t[a],t[a-1]))>0&&n<=o&&i<=o&&(n+i-o)*(1-Math.pow((n-i)/o,2))n})).map(h)).concat(e.range(p(s/y)*y,a,y).filter((function(t){return c(t%_)>n})).map(f))}return b.lines=function(){return w().map((function(t){return{type:"LineString",coordinates:t}}))},b.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(g(l).slice(1),d(i).reverse().slice(1),g(u).reverse().slice(1))]}},b.extent=function(t){return arguments.length?b.extentMajor(t).extentMinor(t):b.extentMinor()},b.extentMajor=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],u=+t[0][1],l=+t[1][1],o>i&&(t=o,o=i,i=t),u>l&&(t=u,u=l,l=t),b.precision(x)):[[o,u],[i,l]]},b.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),b.precision(x)):[[r,s],[t,a]]},b.step=function(t){return arguments.length?b.stepMajor(t).stepMinor(t):b.stepMinor()},b.stepMajor=function(t){return arguments.length?(m=+t[0],_=+t[1],b):[m,_]},b.stepMinor=function(t){return arguments.length?(v=+t[0],y=+t[1],b):[v,y]},b.precision=function(e){return arguments.length?(x=+e,h=Ze(s,a,90),f=Ke(r,t,x),d=Ze(u,l,90),g=Ke(o,i,x),b):x},b.extentMajor([[-180,-90+n],[180,90-n]]).extentMinor([[-180,-80-n],[180,80+n]])}function $e(){return Qe()()}function Je(t,e){var n=t[0]*u,r=t[1]*u,i=e[0]*u,o=e[1]*u,a=d(r),s=_(r),c=d(o),h=_(o),p=a*d(n),g=a*_(n),v=c*d(i),y=c*_(i),m=2*S(b(j(o-r)+a*c*j(i-n))),x=_(m),w=m?function(t){var e=_(t*=m)/x,n=_(m-t)/x,r=n*p+e*v,i=n*g+e*y,o=n*s+e*h;return[f(i,r)*l,f(o,b(r*r+i*i))*l]}:function(){return[n*l,r*l]};return w.distance=m,w}var tn,en,nn,rn,on=function(t){return t},an=new e.Adder,sn=new e.Adder,ln={point:C,lineStart:C,lineEnd:C,polygonStart:function(){ln.lineStart=un,ln.lineEnd=fn},polygonEnd:function(){ln.lineStart=ln.lineEnd=ln.point=C,an.add(c(sn)),sn=new e.Adder},result:function(){var t=an/2;return an=new e.Adder,t}};function un(){ln.point=cn}function cn(t,e){ln.point=hn,tn=nn=t,en=rn=e}function hn(t,e){sn.add(rn*t-nn*e),nn=t,rn=e}function fn(){hn(tn,en)}var dn=1/0,pn=dn,gn=-dn,vn=gn,yn={point:mn,lineStart:C,lineEnd:C,polygonStart:C,polygonEnd:C,result:function(){var t=[[dn,pn],[gn,vn]];return gn=vn=-(pn=dn=1/0),t}};function mn(t,e){tgn&&(gn=t),evn&&(vn=e)}var _n,xn,bn,wn,Mn=0,Sn=0,jn=0,Cn=0,En=0,Pn=0,Tn=0,kn=0,An=0,On={point:In,lineStart:Bn,lineEnd:Dn,polygonStart:function(){On.lineStart=Rn,On.lineEnd=Nn},polygonEnd:function(){On.point=In,On.lineStart=Bn,On.lineEnd=Dn},result:function(){var t=An?[Tn/An,kn/An]:Pn?[Cn/Pn,En/Pn]:jn?[Mn/jn,Sn/jn]:[NaN,NaN];return Mn=Sn=jn=Cn=En=Pn=Tn=kn=An=0,t}};function In(t,e){Mn+=t,Sn+=e,++jn}function Bn(){On.point=Ln}function Ln(t,e){On.point=Fn,In(bn=t,wn=e)}function Fn(t,e){var n=t-bn,r=e-wn,i=b(n*n+r*r);Cn+=i*(bn+t)/2,En+=i*(wn+e)/2,Pn+=i,In(bn=t,wn=e)}function Dn(){On.point=In}function Rn(){On.point=zn}function Nn(){Hn(_n,xn)}function zn(t,e){On.point=Hn,In(_n=bn=t,xn=wn=e)}function Hn(t,e){var n=t-bn,r=e-wn,i=b(n*n+r*r);Cn+=i*(bn+t)/2,En+=i*(wn+e)/2,Pn+=i,Tn+=(i=wn*t-bn*e)*(bn+t),kn+=i*(wn+e),An+=3*i,In(bn=t,wn=e)}function Gn(t){this._context=t}Gn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,s)}},result:C};var Yn,Vn,Xn,qn,Wn,Un=new e.Adder,Zn={point:C,lineStart:function(){Zn.point=Kn},lineEnd:function(){Yn&&Qn(Vn,Xn),Zn.point=C},polygonStart:function(){Yn=!0},polygonEnd:function(){Yn=null},result:function(){var t=+Un;return Un=new e.Adder,t}};function Kn(t,e){Zn.point=Qn,Vn=qn=t,Xn=Wn=e}function Qn(t,e){qn-=t,Wn-=e,Un.add(b(qn*qn+Wn*Wn)),qn=t,Wn=e}function $n(){this._string=[]}function Jn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function tr(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),O(t,n(r))),r.result()}return o.area=function(t){return O(t,n(ln)),ln.result()},o.measure=function(t){return O(t,n(Zn)),Zn.result()},o.bounds=function(t){return O(t,n(yn)),yn.result()},o.centroid=function(t){return O(t,n(On)),On.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,on):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new $n):new Gn(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)}function er(t){return{stream:nr(t)}}function nr(t){return function(e){var n=new rr;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rr(){}function ir(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),O(n,t.stream(yn)),e(yn.result()),null!=r&&t.clipExtent(r),t}function or(t,e,n){return ir(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}function ar(t,e,n){return or(t,[[0,0],e],n)}function sr(t,e,n){return ir(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function lr(t,e,n){return ir(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}$n.prototype={_radius:4.5,_circle:Jn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Jn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},rr.prototype={constructor:rr,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var ur=16,cr=d(30*u);function hr(t,e){return+e?dr(t,e):fr(t)}function fr(t){return nr({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function dr(t,e){function r(i,o,a,s,l,u,h,d,p,g,v,y,m,_){var x=h-i,w=d-o,M=x*x+w*w;if(M>4*e&&m--){var j=s+g,C=l+v,E=u+y,P=b(j*j+C*C+E*E),T=S(E/=P),k=c(c(E)-1)e||c((x*B+w*L)/M-.5)>.3||s*g+l*v+u*y2?t[2]%360*u:0,O()):[m*l,_*l,x*l]},k.angle=function(t){return arguments.length?(w=t%360*u,O()):w*l},k.reflectX=function(t){return arguments.length?(M=t?-1:1,O()):M<0},k.reflectY=function(t){return arguments.length?(S=t?-1:1,O()):S<0},k.precision=function(t){return arguments.length?(a=hr(s,T=t*t),I()):b(T)},k.fitExtent=function(t,e){return or(k,t,e)},k.fitSize=function(t,e){return ar(k,t,e)},k.fitWidth=function(t,e){return sr(k,t,e)},k.fitHeight=function(t,e){return lr(k,t,e)},function(){return e=t.apply(this,arguments),k.invert=e.invert&&A,O()}}function xr(t){var e=0,n=i/3,r=_r(t),o=r(e,n);return o.parallels=function(t){return arguments.length?r(e=t[0]*u,n=t[1]*u):[e*l,n*l]},o}function br(t){var e=d(t);function n(t,n){return[t*e,_(n)/e]}return n.invert=function(t,n){return[t/e,S(n*e)]},n}function wr(t,e){var r=_(t),o=(r+_(e))/2;if(c(o)=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:s).invert(t)},h.stream=function(n){return t&&e===n?t:t=jr([s.stream(e=n),l.stream(n),u.stream(n)])},h.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),u.scale(t),h.translate(s.translate())):s.scale()},h.translate=function(t){if(!arguments.length)return s.translate();var e=s.scale(),a=+t[0],h=+t[1];return r=s.translate(t).clipExtent([[a-.455*e,h-.238*e],[a+.455*e,h+.238*e]]).stream(c),i=l.translate([a-.307*e,h+.201*e]).clipExtent([[a-.425*e+n,h+.12*e+n],[a-.214*e-n,h+.234*e-n]]).stream(c),o=u.translate([a-.205*e,h+.212*e]).clipExtent([[a-.214*e+n,h+.166*e+n],[a-.115*e-n,h+.234*e-n]]).stream(c),f()},h.fitExtent=function(t,e){return or(h,t,e)},h.fitSize=function(t,e){return ar(h,t,e)},h.fitWidth=function(t,e){return sr(h,t,e)},h.fitHeight=function(t,e){return lr(h,t,e)},h.scale(1070)}function Er(t){return function(e,n){var r=d(e),i=d(n),o=t(r*i);return o===1/0?[2,0]:[o*i*_(e),o*_(n)]}}function Pr(t){return function(e,n){var r=b(e*e+n*n),i=t(r),o=_(i),a=d(i);return[f(e*o,r*a),S(r&&n*o/r)]}}var Tr=Er((function(t){return b(2/(1+t))}));function kr(){return mr(Tr).scale(124.75).clipAngle(179.999)}Tr.invert=Pr((function(t){return 2*S(t/2)}));var Ar=Er((function(t){return(t=M(t))&&t/_(t)}));function Or(){return mr(Ar).scale(79.4188).clipAngle(179.999)}function Ir(t,e){return[t,y(w((o+e)/2))]}function Br(){return Lr(Ir).scale(961/s)}function Lr(t){var e,n,r,o=mr(t),a=o.center,s=o.scale,l=o.translate,u=o.clipExtent,c=null;function h(){var a=i*s(),l=o(re(o.rotate()).invert([0,0]));return u(null==c?[[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]]:t===Ir?[[Math.max(l[0]-a,c),e],[Math.min(l[0]+a,n),r]]:[[c,Math.max(l[1]-a,e)],[n,Math.min(l[1]+a,r)]])}return o.scale=function(t){return arguments.length?(s(t),h()):s()},o.translate=function(t){return arguments.length?(l(t),h()):l()},o.center=function(t){return arguments.length?(a(t),h()):a()},o.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),h()):null==c?null:[[c,e],[n,r]]},h()}function Fr(t){return w((o+t)/2)}function Dr(t,e){var r=d(t),a=t===e?_(t):y(r/d(e))/y(Fr(e)/Fr(t)),s=r*m(Fr(t),a)/a;if(!a)return Ir;function l(t,e){s>0?e<-o+n&&(e=-o+n):e>o-n&&(e=o-n);var r=s/m(Fr(e),a);return[r*_(a*t),s-r*d(a*t)]}return l.invert=function(t,e){var n=s-e,r=x(a)*b(t*t+n*n),l=f(t,c(n))*x(n);return n*a<0&&(l-=i*x(t)*x(n)),[l/a,2*h(m(s/r,1/a))-o]},l}function Rr(){return xr(Dr).scale(109.5).parallels([30,30])}function Nr(t,e){return[t,e]}function zr(){return mr(Nr).scale(152.63)}function Hr(t,e){var r=d(t),o=t===e?_(t):(r-d(e))/(e-t),a=r/o+t;if(c(o)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}Zr.invert=function(t,e){for(var n,i=e,o=i*i,a=o*o*o,s=0;sn&&--o>0);return[t/(.8707+(a=i*i)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),i]},ni.invert=Pr(S),ii.invert=Pr((function(t){return 2*h(t)})),ai.invert=function(t,e){return[-e,2*h(g(t))-o]},t.geoAlbers=Sr,t.geoAlbersUsa=Cr,t.geoArea=nt,t.geoAzimuthalEqualArea=kr,t.geoAzimuthalEqualAreaRaw=Tr,t.geoAzimuthalEquidistant=Or,t.geoAzimuthalEquidistantRaw=Ar,t.geoBounds=Dt,t.geoCentroid=Zt,t.geoCircle=ae,t.geoClipAntimeridian=ye,t.geoClipCircle=be,t.geoClipExtent=ke,t.geoClipRectangle=Te,t.geoConicConformal=Rr,t.geoConicConformalRaw=Dr,t.geoConicEqualArea=Mr,t.geoConicEqualAreaRaw=wr,t.geoConicEquidistant=Gr,t.geoConicEquidistantRaw=Hr,t.geoContains=Ue,t.geoDistance=Ne,t.geoEqualEarth=Kr,t.geoEqualEarthRaw=Zr,t.geoEquirectangular=zr,t.geoEquirectangularRaw=Nr,t.geoGnomonic=$r,t.geoGnomonicRaw=Qr,t.geoGraticule=Qe,t.geoGraticule10=$e,t.geoIdentity=Jr,t.geoInterpolate=Je,t.geoLength=Fe,t.geoMercator=Br,t.geoMercatorRaw=Ir,t.geoNaturalEarth1=ei,t.geoNaturalEarth1Raw=ti,t.geoOrthographic=ri,t.geoOrthographicRaw=ni,t.geoPath=tr,t.geoProjection=mr,t.geoProjectionMutator=_r,t.geoRotation=re,t.geoStereographic=oi,t.geoStereographicRaw=ii,t.geoStream=O,t.geoTransform=er,t.geoTransverseMercator=si,t.geoTransverseMercatorRaw=ai,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(/*! d3-array */"./node_modules/_d3-array@2.11.0@d3-array/dist/d3-array.js"))},"./node_modules/_d3-hexjson@1.1.1@d3-hexjson/build/d3-hexjson.js": /*!***********************************************************************!*\ !*** ./node_modules/_d3-hexjson@1.1.1@d3-hexjson/build/d3-hexjson.js ***! \***********************************************************************/ /*! no static exports found */function(t,e,n){!function(t,e){function n(t,n,s){var l=t.layout,u=[],c=0;Object.keys(t.hexes).forEach((function(e){t.hexes[e].key=e,u.push(t.hexes[e])}));var h=e.max(u,(function(t){return+t.q})),f=e.min(u,(function(t){return+t.q})),d=e.max(u,(function(t){return+t.r})),p=e.min(u,(function(t){return+t.r})),g=h-f+1,v=d-p+1,y=(c="odd-r"===l||"even-r"===l?e.min([n/((g+.5)*Math.sqrt(3)),s/(1.5*(v+1/3))]):e.min([s/((v+.5)*Math.sqrt(3)),n/(1.5*(g+1/3))]))*Math.sqrt(3),m=o(l,y,c),_=a(m);return u.forEach((function(t){t.qc=t.q-f,t.rc=d-t.r,t.x=r(t,l,y,c),t.y=i(t,l,y,c),t.vertices=m,t.points=_})),u}function r(t,e,n,r){var i=0,o=0;switch(e){case"odd-r":o=t.rc%2==1?n:n/2,i=t.qc*n+o;break;case"even-r":o=t.rc%2==0?n:n/2,i=t.qc*n+o;break;case"odd-q":case"even-q":i=t.qc*r*1.5+r}return i}function i(t,e,n,r){var i=0,o=0;switch(e){case"odd-r":case"even-r":i=t.rc*r*1.5+r;break;case"odd-q":o=t.qc%2==1?n:n/2,i=t.rc*n+o;break;case"even-q":o=t.qc%2==0?n:n/2,i=t.rc*n+o}return i}function o(t,e,n){var r=[];switch(t){case"odd-r":case"even-r":r.push({x:0,y:0-n}),r.push({x:0+.5*e,y:0-.5*n}),r.push({x:0+.5*e,y:0+.5*n}),r.push({x:0,y:0+n}),r.push({x:0-.5*e,y:0+.5*n}),r.push({x:0-.5*e,y:0-.5*n});break;case"odd-q":case"even-q":r.push({x:0-n,y:0}),r.push({x:0-.5*n,y:0-.5*e}),r.push({x:0+.5*n,y:0-.5*e}),r.push({x:0+n,y:0}),r.push({x:0+.5*n,y:0+.5*e}),r.push({x:0-.5*n,y:0+.5*e})}return r}function a(t){var e="";return t.forEach((function(t){e+=t.x+","+t.y+" "})),e.substring(0,e.length-1)}function s(t){var n={};n.layout=t.layout,n.hexes={};var r=[];Object.keys(t.hexes).forEach((function(e){r.push(t.hexes[e])}));var i,o,a,s=e.max(r,(function(t){return+t.q})),l=e.min(r,(function(t){return+t.q})),u=e.max(r,(function(t){return+t.r})),c=e.min(r,(function(t){return+t.r}));for(i=l;i<=s;i++)for(o=c;o<=u;o++)a="Q"+i+"R"+o,n.hexes[a]={q:i,r:o};return n}function l(t,n,o,a){var s=[],l=t.layout;Object.keys(t.hexes).forEach((function(e){s.push(t.hexes[e])}));var u,c=e.max(s,(function(t){return+t.q})),h=e.min(s,(function(t){return+t.q})),f=e.max(s,(function(t){return+t.r})),d=e.min(s,(function(t){return+t.r})),p=c-h+1,g=f-d+1,v=(u="odd-r"===l||"even-r"===l?e.min([n/((p+.5)*Math.sqrt(3)),o/(1.5*(g+1/3))]):e.min([o/((g+.5)*Math.sqrt(3)),n/(1.5*(p+1/3))]))*Math.sqrt(3),y=[],m=u*u*4,_=s.length;if(_>1){s.forEach((function(t){t.qc=t.q-h,t.rc=f-t.r,t.x=r(t,l,v,u),t.y=i(t,l,v,u)}));for(var x=0;x<_-1;x++)for(var b=x+1;b<_;b++){var w=s[x],M=s[b];if(w[a]!==M[a]&&Math.abs(w.q-M.q)<=1&&Math.abs(w.r-M.r)<=1&&(w.x-M.x)*(w.x-M.x)+(w.y-M.y)*(w.y-M.y)1){s.forEach((function(t){t.qc=t.q-h,t.rc=f-t.r,t.x=r(t,l,v,u),t.y=i(t,l,v,u)}));for(var x=0;x<_-1;x++)for(var b=x+1;b<_;b++){var w=s[x],M=s[b];if(w[a]!==M[a]&&Math.abs(w.q-M.q)<=1&&Math.abs(w.r-M.r)<=1&&(w.x-M.x)*(w.x-M.x)+(w.y-M.y)*(w.y-M.y)=0;)e+=n[r].value;else e=1;t.value=e}function c(){return this.eachAfter(u)}function h(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=0;--n)i.push(e[n]);return this}function d(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=0;)n+=r[i].value;e.value=n}))}function g(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))}function v(t){for(var e=this,n=y(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}function y(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 m(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function _(){var t=[];return this.each((function(e){t.push(e)})),t}function x(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t}function b(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e}function w(t,e){var n,r,i,o,a,s=new E(t),l=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=S);n=u.pop();)if(l&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)u.push(r=n.children[o]=new E(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(C)}function M(){return w(this).eachBefore(j)}function S(t){return t.children}function j(t){t.data=t.data.data}function C(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function E(t){this.data=t,this.depth=this.height=0,this.parent=null}E.prototype=w.prototype={constructor:E,count:c,each:h,eachAfter:d,eachBefore:f,sum:p,sort:g,path:v,ancestors:m,descendants:_,leaves:x,links:b,copy:M};var P=Array.prototype.slice;function T(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 k(t){for(var e,n,r=0,i=(t=T(P.call(t))).length,o=[];r0&&n*n>r*r+i*i}function B(t,e){for(var n=0;n(a*=a)?(r=(u+a-i)/(2*u),o=Math.sqrt(Math.max(0,a/u-r*r)),n.x=t.x-r*s-o*l,n.y=t.y-r*l+o*s):(r=(u+i-a)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-o*l,n.y=e.y+r*l+o*s)):(n.x=e.x+n.r,n.y=e.y)}function z(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 H(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 G(t){this._=t,this.next=null,this.previous=null}function Y(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,l,u,c,h;if((e=t[0]).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;N(n,e,r=t[2]),e=new G(e),n=new G(n),r=new G(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=q(e),n):t},n.parentId=function(t){return arguments.length?(e=q(t),n):e},n}function ut(t,e){return t.parent===e.parent?1:2}function ct(t){var e=t.children;return e?e[0]:t.t}function ht(t){var e=t.children;return e?e[e.length-1]:t.t}function ft(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 dt(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 pt(t,e,n){return t.a.parent===e.parent?t.a:n}function gt(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 vt(t){for(var e,n,r,i,o,a=new gt(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 gt(r[i],i)),n.parent=e;return(a.parent=new gt(null,0)).children=[a],a}function yt(){var t=ut,e=1,n=1,r=null;function i(i){var s=vt(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,h=i;i.eachBefore((function(t){t.xc.x&&(c=t),t.depth>h.depth&&(h=t)}));var f=u===c?1:t(u,c)/2,d=f-u.x,p=e/(c.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){dt(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=s(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(e,n,r){if(n){for(var i,o=e,a=e,s=n,l=o.parent.children[0],u=o.m,c=a.m,h=s.m,f=l.m;s=ht(s),o=ct(o),s&&o;)l=ct(l),(a=ht(a)).a=e,(i=s.z+h-o.z-u+t(s._,o._))>0&&(ft(pt(s,e,r),e,i),u+=i,c+=i),h+=s.m,u+=o.m,f+=l.m,c+=a.m;s&&!ht(a)&&(a.t=s,a.m+=h-c),o&&!ct(l)&&(l.t=o,l.m+=u-f,r=e)}return r}function l(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function mt(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(i-n)/t.value;++sf&&(f=s),v=c*c*g,(d=Math.max(f/v,v/h))>p){c-=s;break}p=d}y.push(a={value:c,dice:l1?e:1)},n}(_t);function wt(){var t=bt,e=!1,n=1,r=1,i=[0],o=W,a=W,s=W,l=W,u=W;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(tt),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,f=e.y1-n;h=e-1){var l=s[t];return l.x0=r,l.y0=i,l.x1=o,void(l.y1=a)}for(var h=u[t],f=n/2+h,d=t+1,p=e-1;d>>1;u[g]a-i){var m=(r*y+o*v)/n;c(t,d,v,r,i,m,a),c(d,e,y,m,i,o,a)}else{var _=(i*y+a*v)/n;c(t,d,v,r,i,o,_),c(d,e,y,r,_,o,a)}}c(0,l,t.value,e,n,r,i)}function St(t,e,n,r,i){(1&t.depth?mt:et)(t,e,n,r,i)}var jt=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,l,u,c,h=-1,f=a.length,d=t.value;++h1?e:1)},n}(_t);t.cluster=l,t.hierarchy=w,t.pack=K,t.packEnclose=k,t.packSiblings=V,t.partition=nt,t.stratify=lt,t.tree=yt,t.treemap=wt,t.treemapBinary=Mt,t.treemapDice=et,t.treemapResquarify=jt,t.treemapSlice=mt,t.treemapSliceDice=St,t.treemapSquarify=bt,Object.defineProperty(t,"__esModule",{value:!0})}(e)},"./node_modules/_d3-path@1.0.9@d3-path/dist/d3-path.js": /*!*************************************************************!*\ !*** ./node_modules/_d3-path@1.0.9@d3-path/dist/d3-path.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){!function(t){var e=Math.PI,n=2*e,r=1e-6,i=n-r;function o(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new o}o.prototype=a.prototype={constructor:o,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,n,i,o,a){t=+t,n=+n,i=+i,o=+o,a=+a;var s=this._x1,l=this._y1,u=i-t,c=o-n,h=s-t,f=l-n,d=h*h+f*f;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(d>r)if(Math.abs(f*u-c*h)>r&&a){var p=i-s,g=o-l,v=u*u+c*c,y=p*p+g*g,m=Math.sqrt(v),_=Math.sqrt(d),x=a*Math.tan((e-Math.acos((v+d-y)/(2*m*_)))/2),b=x/_,w=x/m;Math.abs(b-1)>r&&(this._+="L"+(t+b*h)+","+(n+b*f)),this._+="A"+a+","+a+",0,0,"+ +(f*p>h*g)+","+(this._x1=t+w*u)+","+(this._y1=n+w*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,o,a,s,l,u){t=+t,o=+o,u=!!u;var c=(a=+a)*Math.cos(s),h=a*Math.sin(s),f=t+c,d=o+h,p=1^u,g=u?s-l:l-s;if(a<0)throw new Error("negative radius: "+a);null===this._x1?this._+="M"+f+","+d:(Math.abs(this._x1-f)>r||Math.abs(this._y1-d)>r)&&(this._+="L"+f+","+d),a&&(g<0&&(g=g%n+n),g>i?this._+="A"+a+","+a+",0,1,"+p+","+(t-c)+","+(o-h)+"A"+a+","+a+",0,1,"+p+","+(this._x1=f)+","+(this._y1=d):g>r&&(this._+="A"+a+","+a+",0,"+ +(g>=e)+","+p+","+(this._x1=t+a*Math.cos(l))+","+(this._y1=o+a*Math.sin(l))))},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._}},t.path=a,Object.defineProperty(t,"__esModule",{value:!0})}(e)},"./node_modules/_d3-path@2.0.0@d3-path/dist/d3-path.js": /*!*************************************************************!*\ !*** ./node_modules/_d3-path@2.0.0@d3-path/dist/d3-path.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){!function(t){var e=Math.PI,n=2*e,r=1e-6,i=n-r;function o(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new o}o.prototype=a.prototype={constructor:o,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,n,i,o,a){t=+t,n=+n,i=+i,o=+o,a=+a;var s=this._x1,l=this._y1,u=i-t,c=o-n,h=s-t,f=l-n,d=h*h+f*f;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(d>r)if(Math.abs(f*u-c*h)>r&&a){var p=i-s,g=o-l,v=u*u+c*c,y=p*p+g*g,m=Math.sqrt(v),_=Math.sqrt(d),x=a*Math.tan((e-Math.acos((v+d-y)/(2*m*_)))/2),b=x/_,w=x/m;Math.abs(b-1)>r&&(this._+="L"+(t+b*h)+","+(n+b*f)),this._+="A"+a+","+a+",0,0,"+ +(f*p>h*g)+","+(this._x1=t+w*u)+","+(this._y1=n+w*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,o,a,s,l,u){t=+t,o=+o,u=!!u;var c=(a=+a)*Math.cos(s),h=a*Math.sin(s),f=t+c,d=o+h,p=1^u,g=u?s-l:l-s;if(a<0)throw new Error("negative radius: "+a);null===this._x1?this._+="M"+f+","+d:(Math.abs(this._x1-f)>r||Math.abs(this._y1-d)>r)&&(this._+="L"+f+","+d),a&&(g<0&&(g=g%n+n),g>i?this._+="A"+a+","+a+",0,1,"+p+","+(t-c)+","+(o-h)+"A"+a+","+a+",0,1,"+p+","+(this._x1=f)+","+(this._y1=d):g>r&&(this._+="A"+a+","+a+",0,"+ +(g>=e)+","+p+","+(this._x1=t+a*Math.cos(l))+","+(this._y1=o+a*Math.sin(l))))},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._}},t.path=a,Object.defineProperty(t,"__esModule",{value:!0})}(e)},"./node_modules/_d3-sankey@0.9.1@d3-sankey/dist/d3-sankey.js": /*!*******************************************************************!*\ !*** ./node_modules/_d3-sankey@0.9.1@d3-sankey/dist/d3-sankey.js ***! \*******************************************************************/ /*! no static exports found */function(e,n,r){var i=r(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js");!function(e,n,r,o){function a(t){return t.target.depth}function s(t){return t.depth}function l(t,e){return e-1-t.height}function u(t,e){return t.sourceLinks.length?t.depth:e-1}function c(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?n.min(t.sourceLinks,a)-1:0}function h(t){return function(){return t}}function f(t,e){return p(t.source,e.source)||t.index-e.index}function d(t,e){return p(t.target,e.target)||t.index-e.index}function p(t,e){return t.y0-e.y0}function g(t){return t.value}function v(t){return t.index}function y(t){return t.nodes}function m(t){return t.links}function _(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function x(){var e,o=0,a=0,s=1,l=1,c=24,x=8,b=v,w=u,M=y,S=m,j=6;function C(){var t={nodes:M.apply(null,arguments),links:S.apply(null,arguments)};return E(t),P(t),T(t),k(t),A(t),t}function E(e){e.nodes.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]}));var n=r.map(e.nodes,b);e.links.forEach((function(e,r){e.index=r;var i=e.source,o=e.target;"object"!==t(i)&&(i=e.source=_(n,i)),"object"!==t(o)&&(o=e.target=_(n,o)),i.sourceLinks.push(e),o.targetLinks.push(e)}))}function P(t){t.nodes.forEach((function(t){t.value=Math.max(n.sum(t.sourceLinks,g),n.sum(t.targetLinks,g))}))}function T(t){var e,n,r,i=t.nodes.length;for(e=t.nodes,n=[],r=0;e.length;++r,e=n,n=[]){if(r>i)throw new Error("circular link");e.forEach((function(t){t.depth=r,t.sourceLinks.forEach((function(t){n.indexOf(t.target)<0&&n.push(t.target)}))}))}for(e=t.nodes,n=[],r=0;e.length;++r,e=n,n=[]){if(r>i)throw new Error("circular link");e.forEach((function(t){t.height=r,t.targetLinks.forEach((function(t){n.indexOf(t.source)<0&&n.push(t.source)}))}))}var a=(s-o-c)/(r-1);t.nodes.forEach((function(t){t.x1=(t.x0=o+Math.max(0,Math.min(r-1,Math.floor(w.call(null,t,r))))*a)+c}))}function k(t){var o=r.nest().key((function(t){return t.x0})).sortKeys(n.ascending).entries(t.nodes).map((function(t){return t.values}));c(),y();for(var s=.9,u=j;u>0;--u,s*=.9)v(s),y(),h(s),y();function c(){var r=n.min(o,(function(t){return(l-a-(t.length-1)*x)/n.sum(t,g)}));o.forEach((function(t){null!=e&&t.sort(e),t.forEach((function(t,e){t.y1=(t.y0=e)+t.value*r}))})),t.links.forEach((function(t){t.width=t.value*r}))}function h(t){o.forEach((function(e){e.forEach((function(e){var n,r,o,a,s=e.y0;try{for(var l=i.__values(e.sourceLinks.sort(d)),u=l.next();!u.done;u=l.next()){var c=u.value,h=c.target,f=c.width,p=c.value;if(p>0){var g=0;try{for(var v=(o=void 0,i.__values(h.targetLinks)),y=v.next();!y.done;y=v.next()){var m=y.value,_=m.source,b=m.width;if(_===e)break;g+=b+x/2}}catch(w){o={error:w}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}g=(s-g-h.y0)*t*(p/Math.min(e.value,h.value)),h.y0+=g,h.y1+=g}s+=f+x/2}}catch(M){n={error:M}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}))}))}function v(t){o.slice().reverse().forEach((function(e){e.forEach((function(e){var n,r,o,a,s=e.y0;try{for(var l=i.__values(e.targetLinks.sort(f)),u=l.next();!u.done;u=l.next()){var c=u.value,h=c.source,d=c.width,p=c.value;if(p>0){var g=0;try{for(var v=(o=void 0,i.__values(h.sourceLinks)),y=v.next();!y.done;y=v.next()){var m=y.value,_=m.target,b=m.width;if(_===e)break;g+=b+x/2}}catch(w){o={error:w}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}g=(s-g-h.y0)*t*(p/Math.min(e.value,h.value)),h.y0+=g,h.y1+=g}s+=d+x/2}}catch(M){n={error:M}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}))}))}function y(){o.forEach((function(t){var n,r,i,o=a,s=t.length;for(void 0===e&&t.sort(p),i=0;i0&&(n.y0+=r,n.y1+=r),o=n.y1+x;if((r=o-x-l)>0)for(o=n.y0-=r,n.y1-=r,i=s-2;i>=0;--i)(r=(n=t[i]).y1+x-o)>0&&(n.y0-=r,n.y1-=r),o=n.y0}))}}function A(t){t.nodes.forEach((function(t){t.sourceLinks.sort(d),t.targetLinks.sort(f)})),t.nodes.forEach((function(t){var e=t.y0,n=e;t.sourceLinks.forEach((function(t){t.y0=e+t.width/2,e+=t.width})),t.targetLinks.forEach((function(t){t.y1=n+t.width/2,n+=t.width}))}))}return C.update=function(t){return A(t),t},C.nodeId=function(t){return arguments.length?(b="function"==typeof t?t:h(t),C):b},C.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:h(t),C):w},C.nodeSort=function(t){return arguments.length?(e=t,C):e},C.nodeWidth=function(t){return arguments.length?(c=+t,C):c},C.nodePadding=function(t){return arguments.length?(x=+t,C):x},C.nodes=function(t){return arguments.length?(M="function"==typeof t?t:h(t),C):M},C.links=function(t){return arguments.length?(S="function"==typeof t?t:h(t),C):S},C.size=function(t){return arguments.length?(o=a=0,s=+t[0],l=+t[1],C):[s-o,l-a]},C.extent=function(t){return arguments.length?(o=+t[0][0],s=+t[1][0],a=+t[0][1],l=+t[1][1],C):[[o,a],[s,l]]},C.iterations=function(t){return arguments.length?(j=+t,C):j},C}function b(t){return[t.source.x1,t.y0]}function w(t){return[t.target.x0,t.y1]}function M(){return o.linkHorizontal().source(b).target(w)}e.sankey=x,e.sankeyCenter=c,e.sankeyLeft=s,e.sankeyRight=l,e.sankeyJustify=u,e.sankeyLinkHorizontal=M,Object.defineProperty(e,"__esModule",{value:!0})}(n,r(/*! d3-array */"./node_modules/_d3-array@1.2.4@d3-array/dist/d3-array.js"),r(/*! d3-collection */"./node_modules/_d3-collection@1.0.7@d3-collection/dist/d3-collection.js"),r(/*! d3-shape */"./node_modules/_d3-shape@1.3.7@d3-shape/dist/d3-shape.js"))},"./node_modules/_d3-shape@1.3.7@d3-shape/dist/d3-shape.js": /*!****************************************************************!*\ !*** ./node_modules/_d3-shape@1.3.7@d3-shape/dist/d3-shape.js ***! \****************************************************************/ /*! no static exports found */function(t,e,n){!function(t,e){function n(t){return function(){return t}}var r=Math.abs,i=Math.atan2,o=Math.cos,a=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,h=Math.PI,f=h/2,d=2*h;function p(t){return t>1?0:t<-1?h:Math.acos(t)}function g(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function v(t){return t.innerRadius}function y(t){return t.outerRadius}function m(t){return t.startAngle}function _(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,h=a-i,f=s-o,d=f*l-h*u;if(!(d*dO*O+I*I&&(C=P,E=T),{cx:C,cy:E,x01:-f,y01:-d,x11:C*(i/M-1),y11:E*(i/M-1)}}function M(){var t=v,a=y,M=n(0),S=null,j=m,C=_,E=x,P=null;function T(){var n,v,y=+t.apply(this,arguments),m=+a.apply(this,arguments),_=j.apply(this,arguments)-f,x=C.apply(this,arguments)-f,T=r(x-_),k=x>_;if(P||(P=n=e.path()),mc)if(T>d-c)P.moveTo(m*o(_),m*l(_)),P.arc(0,0,m,_,x,!k),y>c&&(P.moveTo(y*o(x),y*l(x)),P.arc(0,0,y,x,_,k));else{var A,O,I=_,B=x,L=_,F=x,D=T,R=T,N=E.apply(this,arguments)/2,z=N>c&&(S?+S.apply(this,arguments):u(y*y+m*m)),H=s(r(m-y)/2,+M.apply(this,arguments)),G=H,Y=H;if(z>c){var V=g(z/y*l(N)),X=g(z/m*l(N));(D-=2*V)>c?(L+=V*=k?1:-1,F-=V):(D=0,L=F=(_+x)/2),(R-=2*X)>c?(I+=X*=k?1:-1,B-=X):(R=0,I=B=(_+x)/2)}var q=m*o(I),W=m*l(I),U=y*o(F),Z=y*l(F);if(H>c){var K,Q=m*o(B),$=m*l(B),J=y*o(L),tt=y*l(L);if(Tc?Y>c?(A=w(J,tt,q,W,m,Y,k),O=w(Q,$,U,Z,m,Y,k),P.moveTo(A.cx+A.x01,A.cy+A.y01),Yc&&D>c?G>c?(A=w(U,Z,Q,$,y,-G,k),O=w(q,W,J,tt,y,-G,k),P.lineTo(A.cx+A.x01,A.cy+A.y01),G=h;--f)u.point(y[f],m[f]);u.lineEnd(),u.areaEnd()}v&&(y[c]=+t(d,c,n),m[c]=+i(d,c,n),u.point(r?+r(d,c,n):y[c],o?+o(d,c,n):m[c]))}if(p)return u=null,p+""||null}function h(){return P().defined(a).curve(l).context(s)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),r=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:n(+t),c):r},c.y=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),o=null,c):i},c.y0=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),c):i},c.y1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:n(+t),c):o},c.lineX0=c.lineY0=function(){return h().x(t).y(i)},c.lineY1=function(){return h().x(t).y(o)},c.lineX1=function(){return h().x(r).y(i)},c.defined=function(t){return arguments.length?(a="function"==typeof t?t:n(!!t),c):a},c.curve=function(t){return arguments.length?(l=t,null!=s&&(u=l(s)),c):l},c.context=function(t){return arguments.length?(null==t?s=u=null:u=l(s=t),c):s},c}function k(t,e){return et?1:e>=t?0:NaN}function A(t){return t}function O(){var t=A,e=k,r=null,i=n(0),o=n(d),a=n(0);function s(n){var s,l,u,c,h,f=n.length,p=0,g=new Array(f),v=new Array(f),y=+i.apply(this,arguments),m=Math.min(d,Math.max(-d,o.apply(this,arguments)-y)),_=Math.min(Math.abs(m)/f,a.apply(this,arguments)),x=_*(m<0?-1:1);for(s=0;s0&&(p+=h);for(null!=e?g.sort((function(t,n){return e(v[t],v[n])})):null!=r&&g.sort((function(t,e){return r(n[t],n[e])})),s=0,u=p?(m-f*x)/p:0;s0?h*u:0)+x,v[l]={data:n[l],index:s,value:h,startAngle:y,endAngle:c,padAngle:_};return v}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),s):o},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),s):a},s}S.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)}}};var I=L(j);function B(t){this._curve=t}function L(t){function e(e){return new B(t(e))}return e._curve=t,e}function F(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(L(t)):e()._curve},t}function D(){return F(P().curve(I))}function R(){var t=T().curve(I),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return F(n())},delete t.lineX0,t.lineEndAngle=function(){return F(r())},delete t.lineX1,t.lineInnerRadius=function(){return F(i())},delete t.lineY0,t.lineOuterRadius=function(){return F(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(L(t)):e()._curve},t}function N(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}B.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var z=Array.prototype.slice;function H(t){return t.source}function G(t){return t.target}function Y(t){var r=H,i=G,o=C,a=E,s=null;function l(){var n,l=z.call(arguments),u=r.apply(this,l),c=i.apply(this,l);if(s||(s=n=e.path()),t(s,+o.apply(this,(l[0]=u,l)),+a.apply(this,l),+o.apply(this,(l[0]=c,l)),+a.apply(this,l)),n)return s=null,n+""||null}return l.source=function(t){return arguments.length?(r=t,l):r},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),l):o},l.y=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),l):a},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function V(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function X(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function q(t,e,n,r,i){var o=N(e,n),a=N(e,n=(n+i)/2),s=N(r,n),l=N(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function W(){return Y(V)}function U(){return Y(X)}function Z(){var t=Y(q);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var K={draw:function(t,e){var n=Math.sqrt(e/h);t.moveTo(n,0),t.arc(0,0,n,0,d)}},Q={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},$=Math.sqrt(1/3),J=2*$,tt={draw:function(t,e){var n=Math.sqrt(e/J),r=n*$;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},et=.8908130915292852,nt=Math.sin(h/10)/Math.sin(7*h/10),rt=Math.sin(d/10)*nt,it=-Math.cos(d/10)*nt,ot={draw:function(t,e){var n=Math.sqrt(e*et),r=rt*n,i=it*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=d*o/5,s=Math.cos(a),l=Math.sin(a);t.lineTo(l*n,-s*n),t.lineTo(s*r-l*i,l*r+s*i)}t.closePath()}},at={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},st=Math.sqrt(3),lt={draw:function(t,e){var n=-Math.sqrt(e/(3*st));t.moveTo(0,2*n),t.lineTo(-st*n,-n),t.lineTo(st*n,-n),t.closePath()}},ut=-.5,ct=Math.sqrt(3)/2,ht=1/Math.sqrt(12),ft=3*(ht/2+1),dt={draw:function(t,e){var n=Math.sqrt(e/ft),r=n/2,i=n*ht,o=r,a=n*ht+n,s=-o,l=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,l),t.lineTo(ut*r-ct*i,ct*r+ut*i),t.lineTo(ut*o-ct*a,ct*o+ut*a),t.lineTo(ut*s-ct*l,ct*s+ut*l),t.lineTo(ut*r+ct*i,ut*i-ct*r),t.lineTo(ut*o+ct*a,ut*a-ct*o),t.lineTo(ut*s+ct*l,ut*l-ct*s),t.closePath()}},pt=[K,Q,tt,at,ot,lt,dt];function gt(){var t=n(K),r=n(64),i=null;function o(){var n;if(i||(i=n=e.path()),t.apply(this,arguments).draw(i,+r.apply(this,arguments)),n)return i=null,n+""||null}return o.type=function(e){return arguments.length?(t="function"==typeof e?e:n(e),o):t},o.size=function(t){return arguments.length?(r="function"==typeof t?t:n(+t),o):r},o.context=function(t){return arguments.length?(i=null==t?null:t,o):i},o}function vt(){}function yt(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function mt(t){this._context=t}function _t(t){return new mt(t)}function xt(t){this._context=t}function bt(t){return new xt(t)}function wt(t){this._context=t}function Mt(t){return new wt(t)}function St(t,e){this._basis=new mt(t),this._beta=e}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},xt.prototype={areaStart:vt,areaEnd:vt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},St.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*a),this._beta*e[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var jt=function t(e){function n(t){return 1===e?new mt(t):new St(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Ct(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Et(t,e){this._context=t,this._k=(1-e)/6}Et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ct(this,this._x1,this._y1)}(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,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ct(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pt=function t(e){function n(t){return new Et(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Tt(t,e){this._context=t,this._k=(1-e)/6}Tt.prototype={areaStart:vt,areaEnd:vt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ct(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function n(t){return new Tt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function At(t,e){this._context=t,this._k=(1-e)/6}At.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ot=function t(e){function n(t){return new At(t,e)}return n.tension=function(e){return t(+e)},n}(0);function It(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>c){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>c){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/h,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Bt(t,e){this._context=t,this._alpha=e}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}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;default:It(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Lt=function t(e){function n(t){return e?new Bt(t,e):new Et(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ft(t,e){this._context=t,this._alpha=e}Ft.prototype={areaStart:vt,areaEnd:vt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:It(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Dt=function t(e){function n(t){return e?new Ft(t,e):new Tt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Rt(t,e){this._context=t,this._alpha=e}Rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:It(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Nt=function t(e){function n(t){return e?new Rt(t,e):new At(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function zt(t){this._context=t}function Ht(t){return new zt(t)}function Gt(t){return t<0?-1:1}function Yt(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(Gt(o)+Gt(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Vt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Xt(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 qt(t){this._context=t}function Wt(t){this._context=new Ut(t)}function Ut(t){this._context=t}function Zt(t){return new qt(t)}function Kt(t){return new Wt(t)}function Qt(t){this._context=t}function $t(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o=0;)n[e]=e;return n}function ae(t,e){return t[e]}function se(){var t=n([]),e=oe,r=ie,i=ae;function o(n){var o,a,s=t.apply(this,arguments),l=n.length,u=s.length,c=new Array(u);for(o=0;o0){for(var n,r,i,o=0,a=t[0].length;o0)for(var n,r,i,o,a,s,l=0,u=t[e[0]].length;l0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function ce(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;ao&&(o=e,r=n);return r}function pe(t){var e=t.map(ge);return oe(t).sort((function(t,n){return e[t]-e[n]}))}function ge(t){for(var e,n=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,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:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},t.arc=M,t.area=T,t.areaRadial=R,t.curveBasis=_t,t.curveBasisClosed=bt,t.curveBasisOpen=Mt,t.curveBundle=jt,t.curveCardinal=Pt,t.curveCardinalClosed=kt,t.curveCardinalOpen=Ot,t.curveCatmullRom=Lt,t.curveCatmullRomClosed=Dt,t.curveCatmullRomOpen=Nt,t.curveLinear=j,t.curveLinearClosed=Ht,t.curveMonotoneX=Zt,t.curveMonotoneY=Kt,t.curveNatural=Jt,t.curveStep=ee,t.curveStepAfter=re,t.curveStepBefore=ne,t.line=P,t.lineRadial=D,t.linkHorizontal=W,t.linkRadial=Z,t.linkVertical=U,t.pie=O,t.pointRadial=N,t.radialArea=R,t.radialLine=D,t.stack=se,t.stackOffsetDiverging=ue,t.stackOffsetExpand=le,t.stackOffsetNone=ie,t.stackOffsetSilhouette=ce,t.stackOffsetWiggle=he,t.stackOrderAppearance=fe,t.stackOrderAscending=pe,t.stackOrderDescending=ve,t.stackOrderInsideOut=ye,t.stackOrderNone=oe,t.stackOrderReverse=me,t.symbol=gt,t.symbolCircle=K,t.symbolCross=Q,t.symbolDiamond=tt,t.symbolSquare=at,t.symbolStar=ot,t.symbolTriangle=lt,t.symbolWye=dt,t.symbols=pt,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(/*! d3-path */"./node_modules/_d3-path@1.0.9@d3-path/dist/d3-path.js"))},"./node_modules/_d3-voronoi@1.1.4@d3-voronoi/dist/d3-voronoi.js": /*!**********************************************************************!*\ !*** ./node_modules/_d3-voronoi@1.1.4@d3-voronoi/dist/d3-voronoi.js ***! \**********************************************************************/ /*! no static exports found */function(t,e,n){!function(t){function e(t){return function(){return t}}function n(t){return t[0]}function r(t){return t[1]}function i(){this._=null}function o(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function a(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function s(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function l(t){for(;t.L;)t=t.L;return t}function u(t,e,n,r){var i=[null,null],o=D.push(i)-1;return i.left=t,i.right=e,n&&h(i,t,e,n),r&&h(i,e,t,r),L[t.index].halfedges.push(o),L[e.index].halfedges.push(o),i}function c(t,e,n){var r=[e,n];return r.left=t,r}function h(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function f(t,e,n,r,i){var o,a=t[0],s=t[1],l=a[0],u=a[1],c=0,h=1,f=s[0]-l,d=s[1]-u;if(o=e-l,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>h)return;o>c&&(c=o)}if(o=r-l,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=d,d<0){if(o0){if(o>h)return;o>c&&(c=o)}if(o=i-u,d||!(o<0)){if(o/=d,d<0){if(o>h)return;o>c&&(c=o)}else if(d>0){if(o0||h<1)||(c>0&&(t[0]=[l+c*f,u+c*d]),h<1&&(t[1]=[l+h*f,u+h*d]),!0)}}}}}function d(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,l=t[0],u=t.left,c=t.right,h=u[0],f=u[1],d=c[0],p=c[1],g=(h+d)/2,v=(f+p)/2;if(p===f){if(g=r)return;if(h>d){if(l){if(l[1]>=i)return}else l=[g,n];o=[g,i]}else{if(l){if(l[1]1)if(h>d){if(l){if(l[1]>=i)return}else l=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(l){if(l[1]=r)return}else l=[e,a*e+s];o=[r,a*r+s]}else{if(l){if(l[0]R||Math.abs(i[0][1]-i[1][1])>R)||delete D[o]}function g(t){return L[t.index]={site:t,halfedges:[]}}function v(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function y(t,e){return e[+(e.left!==t.site)]}function m(t,e){return e[+(e.left===t.site)]}function _(){for(var t,e,n,r,i=0,o=L.length;iR||Math.abs(v-d)>R)&&(l.splice(s,0,D.push(c(a,p,Math.abs(g-t)R?[t,Math.abs(f-t)R?[Math.abs(d-r)R?[n,Math.abs(f-n)R?[Math.abs(d-e)=-N)){var d=l*l+u*u,p=c*c+h*h,g=(h*d-u*p)/f,v=(l*p-c*d)/f,y=w.pop()||new M;y.arc=t,y.site=i,y.x=g+a,y.y=(y.cy=v+s)+Math.sqrt(g*g+v*v),t.circle=y;for(var m=null,_=F._;_;)if(y.y<_.y||y.y===_.y&&y.x<=_.x){if(!_.L){m=_.P;break}_=_.L}else{if(!_.R){m=_;break}_=_.R}F.insert(m,y),m||(b=y)}}}}function j(t){var e=t.circle;e&&(e.P||(b=e.N),F.remove(e),w.push(e),o(e),t.circle=null)}var C=[];function E(){o(this),this.edge=this.site=this.circle=null}function P(t){var e=C.pop()||new E;return e.site=t,e}function T(t){j(t),B.remove(t),C.push(t),o(t)}function k(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,s=[t];T(t);for(var l=o;l.circle&&Math.abs(n-l.circle.x)R)s=s.L;else{if(!((i=o-I(s,a))>R)){r>-R?(e=s.P,n=s):i>-R?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}g(t);var l=P(t);if(B.insert(e,l),e||n){if(e===n)return j(e),n=P(e.site),B.insert(l,n),l.edge=n.edge=u(e.site,l.site),S(e),void S(n);if(n){j(e),j(n);var c=e.site,f=c[0],d=c[1],p=t[0]-f,v=t[1]-d,y=n.site,m=y[0]-f,_=y[1]-d,x=2*(p*_-v*m),b=p*p+v*v,w=m*m+_*_,M=[(_*b-v*w)/x+f,(p*w-m*b)/x+d];h(n.edge,c,y,M),l.edge=u(c,t,null,M),n.edge=u(t,y,null,M),S(e),S(n)}else l.edge=u(e.site,l.site)}}function O(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],l=n[1],u=l-e;if(!u)return s;var c=s-r,h=1/o-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+i-o/2)))/h+r:(r+s)/2}function I(t,e){var n=t.N;if(n)return O(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var B,L,F,D,R=1e-6,N=1e-12;function z(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function H(t,e){return e[1]-t[1]||e[0]-t[0]}function G(t,e){var n,r,o,a=t.sort(H).pop();for(D=[],L=new Array(t.length),B=new i,F=new i;;)if(o=b,a&&(!o||a[1]=s)return null;var l=t-i.site[0],u=e-i.site[1],c=l*l+u*u;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var l=t-s[0],u=e-s[1],h=l*l+u*u;h0;--l)if(r=e[l].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function s(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,l(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,l(e,n,a)})),t.removeNode(i.v),a}function l(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},"./node_modules/_dagre@0.8.5@dagre/lib/layout.js": /*!*******************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/layout.js ***! \*******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),i=n(/*! ./acyclic */"./node_modules/_dagre@0.8.5@dagre/lib/acyclic.js"),o=n(/*! ./normalize */"./node_modules/_dagre@0.8.5@dagre/lib/normalize.js"),a=n(/*! ./rank */"./node_modules/_dagre@0.8.5@dagre/lib/rank/index.js"),s=n(/*! ./util */"./node_modules/_dagre@0.8.5@dagre/lib/util.js").normalizeRanks,l=n(/*! ./parent-dummy-chains */"./node_modules/_dagre@0.8.5@dagre/lib/parent-dummy-chains.js"),u=n(/*! ./util */"./node_modules/_dagre@0.8.5@dagre/lib/util.js").removeEmptyRanks,c=n(/*! ./nesting-graph */"./node_modules/_dagre@0.8.5@dagre/lib/nesting-graph.js"),h=n(/*! ./add-border-segments */"./node_modules/_dagre@0.8.5@dagre/lib/add-border-segments.js"),f=n(/*! ./coordinate-system */"./node_modules/_dagre@0.8.5@dagre/lib/coordinate-system.js"),d=n(/*! ./order */"./node_modules/_dagre@0.8.5@dagre/lib/order/index.js"),p=n(/*! ./position */"./node_modules/_dagre@0.8.5@dagre/lib/position/index.js"),g=n(/*! ./util */"./node_modules/_dagre@0.8.5@dagre/lib/util.js"),v=n(/*! ./graphlib */"./node_modules/_dagre@0.8.5@dagre/lib/graphlib.js").Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},m,j(n,y),r.pick(n,_))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(j(i,x),b)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},M,j(i,w),r.pick(i,S)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){c.run(t)})),e(" rank",(function(){a(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){c.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){l(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),s=a.marginx||0,l=a.marginy||0;function u(t){var r=t.x,a=t.y,s=t.width,l=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-l/2),o=Math.max(o,a+l/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=l,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+s,a.height=o-i+l}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n)),i.points.push(g.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var y=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],x=["width","height"],b={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},S=["labelpos"];function j(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js": /*!*******************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/lodash.js ***! \*******************************************************/ /*! no static exports found */function(t,e,n){var r;try{r={cloneDeep:n(/*! lodash/cloneDeep */"./node_modules/_lodash@4.17.20@lodash/cloneDeep.js"),constant:n(/*! lodash/constant */"./node_modules/_lodash@4.17.20@lodash/constant.js"),defaults:n(/*! lodash/defaults */"./node_modules/_lodash@4.17.20@lodash/defaults.js"),each:n(/*! lodash/each */"./node_modules/_lodash@4.17.20@lodash/each.js"),filter:n(/*! lodash/filter */"./node_modules/_lodash@4.17.20@lodash/filter.js"),find:n(/*! lodash/find */"./node_modules/_lodash@4.17.20@lodash/find.js"),flatten:n(/*! lodash/flatten */"./node_modules/_lodash@4.17.20@lodash/flatten.js"),forEach:n(/*! lodash/forEach */"./node_modules/_lodash@4.17.20@lodash/forEach.js"),forIn:n(/*! lodash/forIn */"./node_modules/_lodash@4.17.20@lodash/forIn.js"),has:n(/*! lodash/has */"./node_modules/_lodash@4.17.20@lodash/has.js"),isUndefined:n(/*! lodash/isUndefined */"./node_modules/_lodash@4.17.20@lodash/isUndefined.js"),last:n(/*! lodash/last */"./node_modules/_lodash@4.17.20@lodash/last.js"),map:n(/*! lodash/map */"./node_modules/_lodash@4.17.20@lodash/map.js"),mapValues:n(/*! lodash/mapValues */"./node_modules/_lodash@4.17.20@lodash/mapValues.js"),max:n(/*! lodash/max */"./node_modules/_lodash@4.17.20@lodash/max.js"),merge:n(/*! lodash/merge */"./node_modules/_lodash@4.17.20@lodash/merge.js"),min:n(/*! lodash/min */"./node_modules/_lodash@4.17.20@lodash/min.js"),minBy:n(/*! lodash/minBy */"./node_modules/_lodash@4.17.20@lodash/minBy.js"),now:n(/*! lodash/now */"./node_modules/_lodash@4.17.20@lodash/now.js"),pick:n(/*! lodash/pick */"./node_modules/_lodash@4.17.20@lodash/pick.js"),range:n(/*! lodash/range */"./node_modules/_lodash@4.17.20@lodash/range.js"),reduce:n(/*! lodash/reduce */"./node_modules/_lodash@4.17.20@lodash/reduce.js"),sortBy:n(/*! lodash/sortBy */"./node_modules/_lodash@4.17.20@lodash/sortBy.js"),uniqueId:n(/*! lodash/uniqueId */"./node_modules/_lodash@4.17.20@lodash/uniqueId.js"),values:n(/*! lodash/values */"./node_modules/_lodash@4.17.20@lodash/values.js"),zipObject:n(/*! lodash/zipObject */"./node_modules/_lodash@4.17.20@lodash/zipObject.js")}}catch(i){}r||(r=window._),t.exports=r},"./node_modules/_dagre@0.8.5@dagre/lib/nesting-graph.js": /*!**************************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/nesting-graph.js ***! \**************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),i=n(/*! ./util */"./node_modules/_dagre@0.8.5@dagre/lib/util.js");function o(t,e,n,a,s,l,u){var c=t.children(u);if(c.length){var h=i.addBorderNode(t,"_bt"),f=i.addBorderNode(t,"_bb"),d=t.node(u);t.setParent(h,u),d.borderTop=h,t.setParent(f,u),d.borderBottom=f,r.forEach(c,(function(r){o(t,e,n,a,s,l,r);var i=t.node(r),c=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=c!==d?1:s-l[u]+1;t.setEdge(h,c,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,h,{weight:0,minlen:s+l[u]})}else u!==e&&t.setEdge(e,u,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)})),e[i]=o}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),a=r.max(r.values(n))-1,s=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var l=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){o(t,e,s,l,a,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},"./node_modules/_dagre@0.8.5@dagre/lib/normalize.js": /*!**********************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/normalize.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),i=n(/*! ./util */"./node_modules/_dagre@0.8.5@dagre/lib/util.js");t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,s=t.node(a).rank,l=e.w,u=t.node(l).rank,c=e.name,h=t.edge(e),f=h.labelRank;if(u!==s+1){for(t.removeEdge(e),o=0,++s;s0;)e%2&&(n+=l[e+1]),l[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r=2),s=c.buildLayerMatrix(t);var v=o(t,s);v=t.barycenter)&&(i=e,o=0,a=0,(n=t).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},"./node_modules/_dagre@0.8.5@dagre/lib/order/sort-subgraph.js": /*!********************************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/order/sort-subgraph.js ***! \********************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),i=n(/*! ./barycenter */"./node_modules/_dagre@0.8.5@dagre/lib/order/barycenter.js"),o=n(/*! ./resolve-conflicts */"./node_modules/_dagre@0.8.5@dagre/lib/order/resolve-conflicts.js"),a=n(/*! ./sort */"./node_modules/_dagre@0.8.5@dagre/lib/order/sort.js");t.exports=function t(e,n,s,l){var u=e.children(n),c=e.node(n),h=c?c.borderLeft:void 0,f=c?c.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,l);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var g=o(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var v=a(g,l);if(h&&(v.vs=r.flatten([h,v.vs,f],!0),e.predecessors(h).length)){var y=e.node(e.predecessors(h)[0]),m=e.node(e.predecessors(f)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+y.order+m.order)/(v.weight+2),v.weight+=2}return v}},"./node_modules/_dagre@0.8.5@dagre/lib/order/sort.js": /*!***********************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/order/sort.js ***! \***********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),i=n(/*! ../util */"./node_modules/_dagre@0.8.5@dagre/lib/util.js");function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,a=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=a.lhs,l=r.sortBy(a.rhs,(function(t){return-t.i})),u=[],c=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),f=o(u,l,f),r.forEach(s,(function(t){f+=t.vs.length,u.push(t.vs),c+=t.barycenter*t.weight,h+=t.weight,f=o(u,l,f)}));var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=c/h,d.weight=h),d}},"./node_modules/_dagre@0.8.5@dagre/lib/parent-dummy-chains.js": /*!********************************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/parent-dummy-chains.js ***! \********************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js");t.exports=function(t){var e=function(t){var e={},n=0;function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],s=[],l=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>l||u>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,l=0,u=a[l],c=!0;n!==i.w;){if(r=t.node(n),c){for(;(u=a[l])!==s&&t.node(u).maxRanks)&&l(n,e,u)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,s=0;return r.forEach(n,(function(r,l){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(o=t.node(u[0]).order,i(n,s,l,a,o),s=l,a=o)}i(n,s,n.length,o,e.length)})),n})),n}function l(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function c(t,e,n,i){var o={},a={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var l=i(t);if(l.length){l=r.sortBy(l,(function(t){return s[t]}));for(var c=(l.length-1)/2,h=Math.floor(c),f=Math.ceil(c);h<=f;++h){var d=l[h];a[t]===t&&el.lim&&(u=l,c=!0);var h=r.filter(e.edges(),(function(e){return c===m(0,t.node(e.v),u)&&c!==m(0,t.node(e.w),u)}));return r.minBy(h,(function(t){return o(e,t)}))}function y(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function m(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=c,c.initLowLimValues=d,c.initCutValues=h,c.calcCutValue=f,c.leaveEdge=g,c.enterEdge=v,c.exchangeEdges=y},"./node_modules/_dagre@0.8.5@dagre/lib/rank/util.js": /*!**********************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/rank/util.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js");t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},"./node_modules/_dagre@0.8.5@dagre/lib/util.js": /*!*****************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/util.js ***! \*****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./lodash */"./node_modules/_dagre@0.8.5@dagre/lib/lodash.js"),i=n(/*! ./graphlib */"./node_modules/_dagre@0.8.5@dagre/lib/graphlib.js").Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,l=t.width/2,u=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(a)*u?(s<0&&(u=-u),n=u*a/s,r=u):(a<0&&(l=-l),n=l,r=l*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},"./node_modules/_dagre@0.8.5@dagre/lib/version.js": /*!********************************************************!*\ !*** ./node_modules/_dagre@0.8.5@dagre/lib/version.js ***! \********************************************************/ /*! no static exports found */function(t,e){t.exports="0.8.5"},"./node_modules/_graphlib@2.1.8@graphlib/index.js": /*!********************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/index.js ***! \********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./lib */"./node_modules/_graphlib@2.1.8@graphlib/lib/index.js");t.exports={Graph:r.Graph,json:n(/*! ./lib/json */"./node_modules/_graphlib@2.1.8@graphlib/lib/json.js"),alg:n(/*! ./lib/alg */"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/index.js"),version:r.version}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/components.js": /*!*********************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/components.js ***! \*********************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),(function(t){e=[],o(t),e.length&&i.push(e)})),i}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dfs.js": /*!**************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dfs.js ***! \**************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");function i(t,e,n,o,a,s){r.has(o,e)||(o[e]=!0,n||s.push(e),r.each(a(e),(function(e){i(t,e,n,o,a,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,o,a)})),a}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra-all.js": /*!***********************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra-all.js ***! \***********************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./dijkstra */"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra.js"),i=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra.js": /*!*******************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/dijkstra.js ***! \*******************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js"),i=n(/*! ../data/priority-queue */"./node_modules/_graphlib@2.1.8@graphlib/lib/data/priority-queue.js");t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,s={},l=new i,u=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),u=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u0&&(o=l.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(u);return s}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/find-cycles.js": /*!**********************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/find-cycles.js ***! \**********************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js"),i=n(/*! ./tarjan */"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/tarjan.js");t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/floyd-warshall.js": /*!*************************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/floyd-warshall.js ***! \*************************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s0;){if(n=l.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+t);c=!0}t.nodeEdges(n).forEach(u)}return a}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/tarjan.js": /*!*****************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/tarjan.js ***! \*****************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");t.exports=function(t){var e=0,n=[],i={},o=[];function a(s){var l=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(l.lowlink=Math.min(l.lowlink,i[t].index)):(a(t),l.lowlink=Math.min(l.lowlink,i[t].lowlink))})),l.lowlink===l.index){var u,c=[];do{u=n.pop(),i[u].onStack=!1,c.push(u)}while(s!==u);o.push(c)}}return t.nodes().forEach((function(t){r.has(i,t)||a(t)})),o}},"./node_modules/_graphlib@2.1.8@graphlib/lib/alg/topsort.js": /*!******************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/alg/topsort.js ***! \******************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),a),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},"./node_modules/_graphlib@2.1.8@graphlib/lib/data/priority-queue.js": /*!**************************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/data/priority-queue.js ***! \**************************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ../lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js");function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1].prioritya){var s=o;o=a,a=s}return o+""+a+""+(i.isUndefined(r)?"\0":r)}function c(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function h(t,e){return u(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,r=this;return i.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},a.prototype.setNode=function(t,e){return i.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=o,this._children[t]={},this._children[o][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return i.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(i.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],i.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),i.each(i.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],i.each(i.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(e))e=o;else{for(var n=e+="";!i.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==o)return e}},a.prototype.children=function(t){if(i.isUndefined(t)&&(t=o),this._isCompound){var e=this._children[t];if(e)return i.keys(e)}else{if(t===o)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return i.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return i.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return i.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),i.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function o(t){var i=n.parent(t);return void 0===i||e.hasNode(i)?(r[t]=i,i):i in r?r[i]:o(i)}return this._isCompound&&i.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,r=arguments;return i.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},a.prototype.setEdge=function(){var e,n,r,o,a=!1,l=arguments[0];"object"===t(l)&&null!==l&&"v"in l?(e=l.v,n=l.w,r=l.name,2===arguments.length&&(o=arguments[1],a=!0)):(e=l,n=arguments[1],r=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),e=""+e,n=""+n,i.isUndefined(r)||(r=""+r);var h=u(this._isDirected,e,n,r);if(i.has(this._edgeLabels,h))return a&&(this._edgeLabels[h]=o),this;if(!i.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[h]=a?o:this._defaultEdgeLabelFn(e,n,r);var f=c(this._isDirected,e,n,r);return e=f.v,n=f.w,Object.freeze(f),this._edgeObjs[h]=f,s(this._preds[n],e),s(this._sucs[e],n),this._in[n][h]=f,this._out[e][h]=f,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):u(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):u(this._isDirected,t,e,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):u(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],l(this._preds[e],t),l(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.v===e})):r}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.w===e})):r}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},"./node_modules/_graphlib@2.1.8@graphlib/lib/index.js": /*!************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/index.js ***! \************************************************************/ /*! no static exports found */function(t,e,n){t.exports={Graph:n(/*! ./graph */"./node_modules/_graphlib@2.1.8@graphlib/lib/graph.js"),version:n(/*! ./version */"./node_modules/_graphlib@2.1.8@graphlib/lib/version.js")}},"./node_modules/_graphlib@2.1.8@graphlib/lib/json.js": /*!***********************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/json.js ***! \***********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./lodash */"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js"),i=n(/*! ./graph */"./node_modules/_graphlib@2.1.8@graphlib/lib/graph.js");function o(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},"./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js": /*!*************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/lodash.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r;try{r={clone:n(/*! lodash/clone */"./node_modules/_lodash@4.17.20@lodash/clone.js"),constant:n(/*! lodash/constant */"./node_modules/_lodash@4.17.20@lodash/constant.js"),each:n(/*! lodash/each */"./node_modules/_lodash@4.17.20@lodash/each.js"),filter:n(/*! lodash/filter */"./node_modules/_lodash@4.17.20@lodash/filter.js"),has:n(/*! lodash/has */"./node_modules/_lodash@4.17.20@lodash/has.js"),isArray:n(/*! lodash/isArray */"./node_modules/_lodash@4.17.20@lodash/isArray.js"),isEmpty:n(/*! lodash/isEmpty */"./node_modules/_lodash@4.17.20@lodash/isEmpty.js"),isFunction:n(/*! lodash/isFunction */"./node_modules/_lodash@4.17.20@lodash/isFunction.js"),isUndefined:n(/*! lodash/isUndefined */"./node_modules/_lodash@4.17.20@lodash/isUndefined.js"),keys:n(/*! lodash/keys */"./node_modules/_lodash@4.17.20@lodash/keys.js"),map:n(/*! lodash/map */"./node_modules/_lodash@4.17.20@lodash/map.js"),reduce:n(/*! lodash/reduce */"./node_modules/_lodash@4.17.20@lodash/reduce.js"),size:n(/*! lodash/size */"./node_modules/_lodash@4.17.20@lodash/size.js"),transform:n(/*! lodash/transform */"./node_modules/_lodash@4.17.20@lodash/transform.js"),union:n(/*! lodash/union */"./node_modules/_lodash@4.17.20@lodash/union.js"),values:n(/*! lodash/values */"./node_modules/_lodash@4.17.20@lodash/values.js")}}catch(i){}r||(r=window._),t.exports=r},"./node_modules/_graphlib@2.1.8@graphlib/lib/version.js": /*!**************************************************************!*\ !*** ./node_modules/_graphlib@2.1.8@graphlib/lib/version.js ***! \**************************************************************/ /*! no static exports found */function(t,e){t.exports="2.1.8"},"./node_modules/_isarray@0.0.1@isarray/index.js": /*!******************************************************!*\ !*** ./node_modules/_isarray@0.0.1@isarray/index.js ***! \******************************************************/ /*! no static exports found */function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},"./node_modules/_lodash@4.17.20@lodash/_DataView.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_DataView.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_getNative */"./node_modules/_lodash@4.17.20@lodash/_getNative.js")(n(/*! ./_root */"./node_modules/_lodash@4.17.20@lodash/_root.js"),"DataView");t.exports=r},"./node_modules/_lodash@4.17.20@lodash/_Hash.js": /*!******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_Hash.js ***! \******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_hashClear */"./node_modules/_lodash@4.17.20@lodash/_hashClear.js"),i=n(/*! ./_hashDelete */"./node_modules/_lodash@4.17.20@lodash/_hashDelete.js"),o=n(/*! ./_hashGet */"./node_modules/_lodash@4.17.20@lodash/_hashGet.js"),a=n(/*! ./_hashHas */"./node_modules/_lodash@4.17.20@lodash/_hashHas.js"),s=n(/*! ./_hashSet */"./node_modules/_lodash@4.17.20@lodash/_hashSet.js");function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1}},"./node_modules/_lodash@4.17.20@lodash/_arrayIncludesWith.js": /*!*******************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_arrayIncludesWith.js ***! \*******************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r0&&o(c)?n>1?t(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},"./node_modules/_lodash@4.17.20@lodash/_baseFor.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseFor.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_createBaseFor */"./node_modules/_lodash@4.17.20@lodash/_createBaseFor.js")();t.exports=r},"./node_modules/_lodash@4.17.20@lodash/_baseForOwn.js": /*!************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseForOwn.js ***! \************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseFor */"./node_modules/_lodash@4.17.20@lodash/_baseFor.js"),i=n(/*! ./keys */"./node_modules/_lodash@4.17.20@lodash/keys.js");t.exports=function(t,e){return t&&r(t,e,i)}},"./node_modules/_lodash@4.17.20@lodash/_baseGet.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseGet.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_castPath */"./node_modules/_lodash@4.17.20@lodash/_castPath.js"),i=n(/*! ./_toKey */"./node_modules/_lodash@4.17.20@lodash/_toKey.js");t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&ne}},"./node_modules/_lodash@4.17.20@lodash/_baseHas.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseHas.js ***! \*********************************************************/ /*! no static exports found */function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},"./node_modules/_lodash@4.17.20@lodash/_baseHasIn.js": /*!***********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseHasIn.js ***! \***********************************************************/ /*! no static exports found */function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},"./node_modules/_lodash@4.17.20@lodash/_baseIndexOf.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseIndexOf.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseFindIndex */"./node_modules/_lodash@4.17.20@lodash/_baseFindIndex.js"),i=n(/*! ./_baseIsNaN */"./node_modules/_lodash@4.17.20@lodash/_baseIsNaN.js"),o=n(/*! ./_strictIndexOf */"./node_modules/_lodash@4.17.20@lodash/_strictIndexOf.js");t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},"./node_modules/_lodash@4.17.20@lodash/_baseIsArguments.js": /*!*****************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseIsArguments.js ***! \*****************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseGetTag */"./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),i=n(/*! ./isObjectLike */"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js");t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},"./node_modules/_lodash@4.17.20@lodash/_baseIsEqual.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseIsEqual.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseIsEqualDeep */"./node_modules/_lodash@4.17.20@lodash/_baseIsEqualDeep.js"),i=n(/*! ./isObjectLike */"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js");t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},"./node_modules/_lodash@4.17.20@lodash/_baseIsEqualDeep.js": /*!*****************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseIsEqualDeep.js ***! \*****************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_Stack */"./node_modules/_lodash@4.17.20@lodash/_Stack.js"),i=n(/*! ./_equalArrays */"./node_modules/_lodash@4.17.20@lodash/_equalArrays.js"),o=n(/*! ./_equalByTag */"./node_modules/_lodash@4.17.20@lodash/_equalByTag.js"),a=n(/*! ./_equalObjects */"./node_modules/_lodash@4.17.20@lodash/_equalObjects.js"),s=n(/*! ./_getTag */"./node_modules/_lodash@4.17.20@lodash/_getTag.js"),l=n(/*! ./isArray */"./node_modules/_lodash@4.17.20@lodash/isArray.js"),u=n(/*! ./isBuffer */"./node_modules/_lodash@4.17.20@lodash/isBuffer.js"),c=n(/*! ./isTypedArray */"./node_modules/_lodash@4.17.20@lodash/isTypedArray.js"),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,v,y){var m=l(t),_=l(e),x=m?f:s(t),b=_?f:s(e),w=(x=x==h?d:x)==d,M=(b=b==h?d:b)==d,S=x==b;if(S&&u(t)){if(!u(e))return!1;m=!0,w=!1}if(S&&!w)return y||(y=new r),m||c(t)?i(t,e,n,g,v,y):o(t,e,x,n,g,v,y);if(!(1&n)){var j=w&&p.call(t,"__wrapped__"),C=M&&p.call(e,"__wrapped__");if(j||C){var E=j?t.value():t,P=C?e.value():e;return y||(y=new r),v(E,P,n,g,y)}}return!!S&&(y||(y=new r),a(t,e,n,g,v,y))}},"./node_modules/_lodash@4.17.20@lodash/_baseIsMap.js": /*!***********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseIsMap.js ***! \***********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_getTag */"./node_modules/_lodash@4.17.20@lodash/_getTag.js"),i=n(/*! ./isObjectLike */"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js");t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},"./node_modules/_lodash@4.17.20@lodash/_baseIsMatch.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_baseIsMatch.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_Stack */"./node_modules/_lodash@4.17.20@lodash/_Stack.js"),i=n(/*! ./_baseIsEqual */"./node_modules/_lodash@4.17.20@lodash/_baseIsEqual.js");t.exports=function(t,e,n,o){var a=n.length,s=a,l=!o;if(null==t)return!s;for(t=Object(t);a--;){var u=n[a];if(l&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a=200){var g=e?null:s(t);if(g)return l(g);f=!1,c=a,p=new r}else p=e?[]:d;t:for(;++ue||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&t=l?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},"./node_modules/_lodash@4.17.20@lodash/_copyArray.js": /*!***********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_copyArray.js ***! \***********************************************************/ /*! no static exports found */function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r-1?s[l?e[u]:u]:void 0}}},"./node_modules/_lodash@4.17.20@lodash/_createRange.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_createRange.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseRange */"./node_modules/_lodash@4.17.20@lodash/_baseRange.js"),i=n(/*! ./_isIterateeCall */"./node_modules/_lodash@4.17.20@lodash/_isIterateeCall.js"),o=n(/*! ./toFinite */"./node_modules/_lodash@4.17.20@lodash/toFinite.js");t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?ec))return!1;var f=l.get(t),d=l.get(e);if(f&&d)return f==e&&d==t;var p=-1,g=!0,v=2&n?new r:void 0;for(l.set(t,e),l.set(e,t);++p-1&&e%1==0&&e-1}},"./node_modules/_lodash@4.17.20@lodash/_listCacheSet.js": /*!**************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_listCacheSet.js ***! \**************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_assocIndexOf */"./node_modules/_lodash@4.17.20@lodash/_assocIndexOf.js");t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},"./node_modules/_lodash@4.17.20@lodash/_mapCacheClear.js": /*!***************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_mapCacheClear.js ***! \***************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_Hash */"./node_modules/_lodash@4.17.20@lodash/_Hash.js"),i=n(/*! ./_ListCache */"./node_modules/_lodash@4.17.20@lodash/_ListCache.js"),o=n(/*! ./_Map */"./node_modules/_lodash@4.17.20@lodash/_Map.js");t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},"./node_modules/_lodash@4.17.20@lodash/_mapCacheDelete.js": /*!****************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_mapCacheDelete.js ***! \****************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_getMapData */"./node_modules/_lodash@4.17.20@lodash/_getMapData.js");t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},"./node_modules/_lodash@4.17.20@lodash/_mapCacheGet.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_mapCacheGet.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_getMapData */"./node_modules/_lodash@4.17.20@lodash/_getMapData.js");t.exports=function(t){return r(this,t).get(t)}},"./node_modules/_lodash@4.17.20@lodash/_mapCacheHas.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_mapCacheHas.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_getMapData */"./node_modules/_lodash@4.17.20@lodash/_getMapData.js");t.exports=function(t){return r(this,t).has(t)}},"./node_modules/_lodash@4.17.20@lodash/_mapCacheSet.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_mapCacheSet.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_getMapData */"./node_modules/_lodash@4.17.20@lodash/_getMapData.js");t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},"./node_modules/_lodash@4.17.20@lodash/_mapToArray.js": /*!************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_mapToArray.js ***! \************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},"./node_modules/_lodash@4.17.20@lodash/_matchesStrictComparable.js": /*!*************************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_matchesStrictComparable.js ***! \*************************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},"./node_modules/_lodash@4.17.20@lodash/_memoizeCapped.js": /*!***************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_memoizeCapped.js ***! \***************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./memoize */"./node_modules/_lodash@4.17.20@lodash/memoize.js");t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},"./node_modules/_lodash@4.17.20@lodash/_nativeCreate.js": /*!**************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_nativeCreate.js ***! \**************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_getNative */"./node_modules/_lodash@4.17.20@lodash/_getNative.js")(Object,"create");t.exports=r},"./node_modules/_lodash@4.17.20@lodash/_nativeKeys.js": /*!************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_nativeKeys.js ***! \************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_overArg */"./node_modules/_lodash@4.17.20@lodash/_overArg.js")(Object.keys,Object);t.exports=r},"./node_modules/_lodash@4.17.20@lodash/_nativeKeysIn.js": /*!**************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_nativeKeysIn.js ***! \**************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},"./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js ***! \**********************************************************/ /*! no static exports found */function(e,n,r){(function(e){var i=r(/*! ./_freeGlobal */"./node_modules/_lodash@4.17.20@lodash/_freeGlobal.js"),o=n&&!n.nodeType&&n,a=o&&"object"==t(e)&&e&&!e.nodeType&&e,s=a&&a.exports===o&&i.process,l=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=l}).call(this,r(/*! ./../_webpack@4.46.0@webpack/buildin/module.js */"./node_modules/_webpack@4.46.0@webpack/buildin/module.js")(e))},"./node_modules/_lodash@4.17.20@lodash/_objectToString.js": /*!****************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_objectToString.js ***! \****************************************************************/ /*! no static exports found */function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},"./node_modules/_lodash@4.17.20@lodash/_overArg.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_overArg.js ***! \*********************************************************/ /*! no static exports found */function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},"./node_modules/_lodash@4.17.20@lodash/_overRest.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_overRest.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_apply */"./node_modules/_lodash@4.17.20@lodash/_apply.js"),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),l=Array(s);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},"./node_modules/_lodash@4.17.20@lodash/_stackClear.js": /*!************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_stackClear.js ***! \************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_ListCache */"./node_modules/_lodash@4.17.20@lodash/_ListCache.js");t.exports=function(){this.__data__=new r,this.size=0}},"./node_modules/_lodash@4.17.20@lodash/_stackDelete.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_stackDelete.js ***! \*************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},"./node_modules/_lodash@4.17.20@lodash/_stackGet.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_stackGet.js ***! \**********************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){return this.__data__.get(t)}},"./node_modules/_lodash@4.17.20@lodash/_stackHas.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_stackHas.js ***! \**********************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){return this.__data__.has(t)}},"./node_modules/_lodash@4.17.20@lodash/_stackSet.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_stackSet.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_ListCache */"./node_modules/_lodash@4.17.20@lodash/_ListCache.js"),i=n(/*! ./_Map */"./node_modules/_lodash@4.17.20@lodash/_Map.js"),o=n(/*! ./_MapCache */"./node_modules/_lodash@4.17.20@lodash/_MapCache.js");t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},"./node_modules/_lodash@4.17.20@lodash/_strictIndexOf.js": /*!***************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/_strictIndexOf.js ***! \***************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r2?e[2]:void 0;for(u&&o(e[0],e[1],u)&&(r=1);++n-1&&t%1==0&&t<=9007199254740991}},"./node_modules/_lodash@4.17.20@lodash/isMap.js": /*!******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isMap.js ***! \******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseIsMap */"./node_modules/_lodash@4.17.20@lodash/_baseIsMap.js"),i=n(/*! ./_baseUnary */"./node_modules/_lodash@4.17.20@lodash/_baseUnary.js"),o=n(/*! ./_nodeUtil */"./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js"),a=o&&o.isMap,s=a?i(a):r;t.exports=s},"./node_modules/_lodash@4.17.20@lodash/isObject.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isObject.js ***! \*********************************************************/ /*! no static exports found */function(e,n){e.exports=function(e){var n=t(e);return null!=e&&("object"==n||"function"==n)}},"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isObjectLike.js ***! \*************************************************************/ /*! no static exports found */function(e,n){e.exports=function(e){return null!=e&&"object"==t(e)}},"./node_modules/_lodash@4.17.20@lodash/isPlainObject.js": /*!**************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isPlainObject.js ***! \**************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseGetTag */"./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),i=n(/*! ./_getPrototype */"./node_modules/_lodash@4.17.20@lodash/_getPrototype.js"),o=n(/*! ./isObjectLike */"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js"),a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=l.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},"./node_modules/_lodash@4.17.20@lodash/isSet.js": /*!******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isSet.js ***! \******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseIsSet */"./node_modules/_lodash@4.17.20@lodash/_baseIsSet.js"),i=n(/*! ./_baseUnary */"./node_modules/_lodash@4.17.20@lodash/_baseUnary.js"),o=n(/*! ./_nodeUtil */"./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js"),a=o&&o.isSet,s=a?i(a):r;t.exports=s},"./node_modules/_lodash@4.17.20@lodash/isString.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isString.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseGetTag */"./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),i=n(/*! ./isArray */"./node_modules/_lodash@4.17.20@lodash/isArray.js"),o=n(/*! ./isObjectLike */"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js");t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},"./node_modules/_lodash@4.17.20@lodash/isSymbol.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isSymbol.js ***! \*********************************************************/ /*! no static exports found */function(e,n,r){var i=r(/*! ./_baseGetTag */"./node_modules/_lodash@4.17.20@lodash/_baseGetTag.js"),o=r(/*! ./isObjectLike */"./node_modules/_lodash@4.17.20@lodash/isObjectLike.js");e.exports=function(e){return"symbol"==t(e)||o(e)&&"[object Symbol]"==i(e)}},"./node_modules/_lodash@4.17.20@lodash/isTypedArray.js": /*!*************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isTypedArray.js ***! \*************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseIsTypedArray */"./node_modules/_lodash@4.17.20@lodash/_baseIsTypedArray.js"),i=n(/*! ./_baseUnary */"./node_modules/_lodash@4.17.20@lodash/_baseUnary.js"),o=n(/*! ./_nodeUtil */"./node_modules/_lodash@4.17.20@lodash/_nodeUtil.js"),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},"./node_modules/_lodash@4.17.20@lodash/isUndefined.js": /*!************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/isUndefined.js ***! \************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){return void 0===t}},"./node_modules/_lodash@4.17.20@lodash/keys.js": /*!*****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/keys.js ***! \*****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_arrayLikeKeys */"./node_modules/_lodash@4.17.20@lodash/_arrayLikeKeys.js"),i=n(/*! ./_baseKeys */"./node_modules/_lodash@4.17.20@lodash/_baseKeys.js"),o=n(/*! ./isArrayLike */"./node_modules/_lodash@4.17.20@lodash/isArrayLike.js");t.exports=function(t){return o(t)?r(t):i(t)}},"./node_modules/_lodash@4.17.20@lodash/keysIn.js": /*!*******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/keysIn.js ***! \*******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_arrayLikeKeys */"./node_modules/_lodash@4.17.20@lodash/_arrayLikeKeys.js"),i=n(/*! ./_baseKeysIn */"./node_modules/_lodash@4.17.20@lodash/_baseKeysIn.js"),o=n(/*! ./isArrayLike */"./node_modules/_lodash@4.17.20@lodash/isArrayLike.js");t.exports=function(t){return o(t)?r(t,!0):i(t)}},"./node_modules/_lodash@4.17.20@lodash/last.js": /*!*****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/last.js ***! \*****************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},"./node_modules/_lodash@4.17.20@lodash/map.js": /*!****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/map.js ***! \****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_arrayMap */"./node_modules/_lodash@4.17.20@lodash/_arrayMap.js"),i=n(/*! ./_baseIteratee */"./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),o=n(/*! ./_baseMap */"./node_modules/_lodash@4.17.20@lodash/_baseMap.js"),a=n(/*! ./isArray */"./node_modules/_lodash@4.17.20@lodash/isArray.js");t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},"./node_modules/_lodash@4.17.20@lodash/mapValues.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/mapValues.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseAssignValue */"./node_modules/_lodash@4.17.20@lodash/_baseAssignValue.js"),i=n(/*! ./_baseForOwn */"./node_modules/_lodash@4.17.20@lodash/_baseForOwn.js"),o=n(/*! ./_baseIteratee */"./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js");t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},"./node_modules/_lodash@4.17.20@lodash/max.js": /*!****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/max.js ***! \****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseExtremum */"./node_modules/_lodash@4.17.20@lodash/_baseExtremum.js"),i=n(/*! ./_baseGt */"./node_modules/_lodash@4.17.20@lodash/_baseGt.js"),o=n(/*! ./identity */"./node_modules/_lodash@4.17.20@lodash/identity.js");t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},"./node_modules/_lodash@4.17.20@lodash/memoize.js": /*!********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/memoize.js ***! \********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_MapCache */"./node_modules/_lodash@4.17.20@lodash/_MapCache.js");function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},"./node_modules/_lodash@4.17.20@lodash/merge.js": /*!******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/merge.js ***! \******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseMerge */"./node_modules/_lodash@4.17.20@lodash/_baseMerge.js"),i=n(/*! ./_createAssigner */"./node_modules/_lodash@4.17.20@lodash/_createAssigner.js")((function(t,e,n){r(t,e,n)}));t.exports=i},"./node_modules/_lodash@4.17.20@lodash/min.js": /*!****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/min.js ***! \****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseExtremum */"./node_modules/_lodash@4.17.20@lodash/_baseExtremum.js"),i=n(/*! ./_baseLt */"./node_modules/_lodash@4.17.20@lodash/_baseLt.js"),o=n(/*! ./identity */"./node_modules/_lodash@4.17.20@lodash/identity.js");t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},"./node_modules/_lodash@4.17.20@lodash/minBy.js": /*!******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/minBy.js ***! \******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseExtremum */"./node_modules/_lodash@4.17.20@lodash/_baseExtremum.js"),i=n(/*! ./_baseIteratee */"./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),o=n(/*! ./_baseLt */"./node_modules/_lodash@4.17.20@lodash/_baseLt.js");t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},"./node_modules/_lodash@4.17.20@lodash/noop.js": /*!*****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/noop.js ***! \*****************************************************/ /*! no static exports found */function(t,e){t.exports=function(){}},"./node_modules/_lodash@4.17.20@lodash/now.js": /*!****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/now.js ***! \****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_root */"./node_modules/_lodash@4.17.20@lodash/_root.js");t.exports=function(){return r.Date.now()}},"./node_modules/_lodash@4.17.20@lodash/pick.js": /*!*****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/pick.js ***! \*****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_basePick */"./node_modules/_lodash@4.17.20@lodash/_basePick.js"),i=n(/*! ./_flatRest */"./node_modules/_lodash@4.17.20@lodash/_flatRest.js")((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},"./node_modules/_lodash@4.17.20@lodash/property.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/property.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseProperty */"./node_modules/_lodash@4.17.20@lodash/_baseProperty.js"),i=n(/*! ./_basePropertyDeep */"./node_modules/_lodash@4.17.20@lodash/_basePropertyDeep.js"),o=n(/*! ./_isKey */"./node_modules/_lodash@4.17.20@lodash/_isKey.js"),a=n(/*! ./_toKey */"./node_modules/_lodash@4.17.20@lodash/_toKey.js");t.exports=function(t){return o(t)?r(a(t)):i(t)}},"./node_modules/_lodash@4.17.20@lodash/range.js": /*!******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/range.js ***! \******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_createRange */"./node_modules/_lodash@4.17.20@lodash/_createRange.js")();t.exports=r},"./node_modules/_lodash@4.17.20@lodash/reduce.js": /*!*******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/reduce.js ***! \*******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_arrayReduce */"./node_modules/_lodash@4.17.20@lodash/_arrayReduce.js"),i=n(/*! ./_baseEach */"./node_modules/_lodash@4.17.20@lodash/_baseEach.js"),o=n(/*! ./_baseIteratee */"./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),a=n(/*! ./_baseReduce */"./node_modules/_lodash@4.17.20@lodash/_baseReduce.js"),s=n(/*! ./isArray */"./node_modules/_lodash@4.17.20@lodash/isArray.js");t.exports=function(t,e,n){var l=s(t)?r:a,u=arguments.length<3;return l(t,o(e,4),n,u,i)}},"./node_modules/_lodash@4.17.20@lodash/size.js": /*!*****************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/size.js ***! \*****************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseKeys */"./node_modules/_lodash@4.17.20@lodash/_baseKeys.js"),i=n(/*! ./_getTag */"./node_modules/_lodash@4.17.20@lodash/_getTag.js"),o=n(/*! ./isArrayLike */"./node_modules/_lodash@4.17.20@lodash/isArrayLike.js"),a=n(/*! ./isString */"./node_modules/_lodash@4.17.20@lodash/isString.js"),s=n(/*! ./_stringSize */"./node_modules/_lodash@4.17.20@lodash/_stringSize.js");t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},"./node_modules/_lodash@4.17.20@lodash/sortBy.js": /*!*******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/sortBy.js ***! \*******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseFlatten */"./node_modules/_lodash@4.17.20@lodash/_baseFlatten.js"),i=n(/*! ./_baseOrderBy */"./node_modules/_lodash@4.17.20@lodash/_baseOrderBy.js"),o=n(/*! ./_baseRest */"./node_modules/_lodash@4.17.20@lodash/_baseRest.js"),a=n(/*! ./_isIterateeCall */"./node_modules/_lodash@4.17.20@lodash/_isIterateeCall.js"),s=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},"./node_modules/_lodash@4.17.20@lodash/stubArray.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/stubArray.js ***! \**********************************************************/ /*! no static exports found */function(t,e){t.exports=function(){return[]}},"./node_modules/_lodash@4.17.20@lodash/stubFalse.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/stubFalse.js ***! \**********************************************************/ /*! no static exports found */function(t,e){t.exports=function(){return!1}},"./node_modules/_lodash@4.17.20@lodash/toFinite.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/toFinite.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./toNumber */"./node_modules/_lodash@4.17.20@lodash/toNumber.js"),i=1/0;t.exports=function(t){return t?(t=r(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},"./node_modules/_lodash@4.17.20@lodash/toInteger.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/toInteger.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./toFinite */"./node_modules/_lodash@4.17.20@lodash/toFinite.js");t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},"./node_modules/_lodash@4.17.20@lodash/toNumber.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/toNumber.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./isObject */"./node_modules/_lodash@4.17.20@lodash/isObject.js"),i=n(/*! ./isSymbol */"./node_modules/_lodash@4.17.20@lodash/isSymbol.js"),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=s.test(t);return n||l.test(t)?u(t.slice(2),n?2:8):a.test(t)?NaN:+t}},"./node_modules/_lodash@4.17.20@lodash/toPlainObject.js": /*!**************************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/toPlainObject.js ***! \**************************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_copyObject */"./node_modules/_lodash@4.17.20@lodash/_copyObject.js"),i=n(/*! ./keysIn */"./node_modules/_lodash@4.17.20@lodash/keysIn.js");t.exports=function(t){return r(t,i(t))}},"./node_modules/_lodash@4.17.20@lodash/toString.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/toString.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseToString */"./node_modules/_lodash@4.17.20@lodash/_baseToString.js");t.exports=function(t){return null==t?"":r(t)}},"./node_modules/_lodash@4.17.20@lodash/transform.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/transform.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_arrayEach */"./node_modules/_lodash@4.17.20@lodash/_arrayEach.js"),i=n(/*! ./_baseCreate */"./node_modules/_lodash@4.17.20@lodash/_baseCreate.js"),o=n(/*! ./_baseForOwn */"./node_modules/_lodash@4.17.20@lodash/_baseForOwn.js"),a=n(/*! ./_baseIteratee */"./node_modules/_lodash@4.17.20@lodash/_baseIteratee.js"),s=n(/*! ./_getPrototype */"./node_modules/_lodash@4.17.20@lodash/_getPrototype.js"),l=n(/*! ./isArray */"./node_modules/_lodash@4.17.20@lodash/isArray.js"),u=n(/*! ./isBuffer */"./node_modules/_lodash@4.17.20@lodash/isBuffer.js"),c=n(/*! ./isFunction */"./node_modules/_lodash@4.17.20@lodash/isFunction.js"),h=n(/*! ./isObject */"./node_modules/_lodash@4.17.20@lodash/isObject.js"),f=n(/*! ./isTypedArray */"./node_modules/_lodash@4.17.20@lodash/isTypedArray.js");t.exports=function(t,e,n){var d=l(t),p=d||u(t)||f(t);if(e=a(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&c(g)?i(s(t)):{}}return(p?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},"./node_modules/_lodash@4.17.20@lodash/union.js": /*!******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/union.js ***! \******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseFlatten */"./node_modules/_lodash@4.17.20@lodash/_baseFlatten.js"),i=n(/*! ./_baseRest */"./node_modules/_lodash@4.17.20@lodash/_baseRest.js"),o=n(/*! ./_baseUniq */"./node_modules/_lodash@4.17.20@lodash/_baseUniq.js"),a=n(/*! ./isArrayLikeObject */"./node_modules/_lodash@4.17.20@lodash/isArrayLikeObject.js"),s=i((function(t){return o(r(t,1,a,!0))}));t.exports=s},"./node_modules/_lodash@4.17.20@lodash/uniqueId.js": /*!*********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/uniqueId.js ***! \*********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./toString */"./node_modules/_lodash@4.17.20@lodash/toString.js"),i=0;t.exports=function(t){var e=++i;return r(t)+e}},"./node_modules/_lodash@4.17.20@lodash/values.js": /*!*******************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/values.js ***! \*******************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_baseValues */"./node_modules/_lodash@4.17.20@lodash/_baseValues.js"),i=n(/*! ./keys */"./node_modules/_lodash@4.17.20@lodash/keys.js");t.exports=function(t){return null==t?[]:r(t,i(t))}},"./node_modules/_lodash@4.17.20@lodash/zipObject.js": /*!**********************************************************!*\ !*** ./node_modules/_lodash@4.17.20@lodash/zipObject.js ***! \**********************************************************/ /*! no static exports found */function(t,e,n){var r=n(/*! ./_assignValue */"./node_modules/_lodash@4.17.20@lodash/_assignValue.js"),i=n(/*! ./_baseZipObject */"./node_modules/_lodash@4.17.20@lodash/_baseZipObject.js");t.exports=function(t,e){return i(t||[],e||[],r)}},"./node_modules/_parse-svg-path@0.1.2@parse-svg-path/index.js": /*!********************************************************************!*\ !*** ./node_modules/_parse-svg-path@0.1.2@parse-svg-path/index.js ***! \********************************************************************/ /*! no static exports found */function(t,e){t.exports=function(t){var e=[];return t.replace(r,(function(t,r,o){var a=r.toLowerCase();for(o=function(t){var e=t.match(i);return e?e.map(Number):[]}(o),"m"==a&&o.length>2&&(e.push([r].concat(o.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(o.length==n[a])return o.unshift(r),e.push(o);if(o.length=t){var d=(o-t)/(o-r[2]);return{length:o,pos:[n[0]*(1-d)+r[0]*d,n[1]*(1-d)+r[1]*d]}}r[0]=n[0],r[1]=n[1],r[2]=o}}else if("Q"===l[0])for(r[0]=i[0]=n[0],r[1]=i[1]=n[1],r[2]=o,u=100,c=0;c<=u;c++){var p;if(h=y(l,p=c/u),f=m(l,p),o+=s(n[0],n[1],h,f),n[0]=h,n[1]=f,"number"==typeof t&&o>=t)return d=(o-t)/(o-r[2]),{length:o,pos:[n[0]*(1-d)+r[0]*d,n[1]*(1-d)+r[1]*d]};r[0]=n[0],r[1]=n[1],r[2]=o}else if("L"===l[0]){if(r[0]=n[0],r[1]=n[1],r[2]=o,o+=s(n[0],n[1],l[1],l[2]),n[0]=l[1],n[1]=l[2],"number"==typeof t&&o>=t)return d=(o-t)/(o-r[2]),{length:o,pos:[n[0]*(1-d)+r[0]*d,n[1]*(1-d)+r[1]*d]};r[0]=n[0],r[1]=n[1],r[2]=o}}return{length:o,pos:n};function g(t,e){return Math.pow(1-e,3)*i[0]+3*Math.pow(1-e,2)*e*t[1]+3*(1-e)*Math.pow(e,2)*t[3]+Math.pow(e,3)*t[5]}function v(t,e){return Math.pow(1-e,3)*i[1]+3*Math.pow(1-e,2)*e*t[2]+3*(1-e)*Math.pow(e,2)*t[4]+Math.pow(e,3)*t[6]}function y(t,e){return Math.pow(1-e,2)*i[0]+2*(1-e)*e*t[1]+Math.pow(e,2)*t[3]}function m(t,e){return Math.pow(1-e,2)*i[1]+2*(1-e)*e*t[2]+Math.pow(e,2)*t[4]}}},"./node_modules/_regression@2.0.1@regression/dist/regression.js": /*!**********************************************************************!*\ !*** ./node_modules/_regression@2.0.1@regression/dist/regression.js ***! \**********************************************************************/ /*! no static exports found */function(t,e,n){var r,i,o;i=[t],r=function(t){function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var n=Object.assign||function(t){for(var e=1;eMath.abs(n[o][a])&&(a=s);for(var l=o;l=o;h--)n[h][c]-=n[h][o]*n[o][c]/n[o][o]}for(var f=r-1;f>=0;f--){for(var d=0,p=f+1;p=0;b--)x+=b>1?y[b]+"x^"+b+" + ":1===b?y[b]+"x + ":y[b];return{string:x,points:_,predict:m,equation:[].concat(r(y)).reverse(),r2:s(o(t,_),e.precision)}}};function u(){var t=function(t,r){return n({_round:s},t,e({},r,(function(t,e){return l[r](t,n({},i,e))})))};return Object.keys(l).reduce(t,{})}t.exports=u()},void 0===(o="function"==typeof r?r.apply(e,i):r)||(t.exports=o)},"./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js": /*!***********************************************************************************************!*\ !*** ./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js ***! \***********************************************************************************************/ /*! no static exports found */function(t,e,n){!function(t){function e(t){if(0===t.length)return 0;for(var e,n=t[0],r=0,i=1;i=Math.abs(t[i])?r+=n-e+t[i]:r+=t[i]-e+n,n=e;return n+r}function n(t){if(0===t.length)throw new Error("mean requires at least one data point");return e(t)/t.length}function r(t,e){var r,i,o=n(t),a=0;if(2===e)for(i=0;ie&&(e=t[n]);return e}function c(t,e){var n=t.length*e;if(0===t.length)throw new Error("quantile requires at least one data point.");if(e<0||1u&&f(t,n,r);cu;)d--}t[n]===u?f(t,n,d):f(t,++d,r),d<=e&&(n=d+1),e<=d&&(r=d-1)}}function f(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function d(t,e){var n=t.slice();if(Array.isArray(e)){!function(t,e){for(var n=[0],r=0;rt[t.length-1])return 1;var n=function(t,e){for(var n=0,r=0,i=t.length;r>>1]?i=n:r=-~n;return r}(t,e);if(t[n]!==e)return n/t.length;n++;var r=function(t,e){for(var n=0,r=0,i=t.length;r=t[n=r+i>>>1]?r=-~n:i=n;return r}(t,e);if(r===n)return n/t.length;var i=r-n+1;return i*(r+n)/2/i/t.length}function m(t){var e=d(t,.75),n=d(t,.25);if("number"==typeof e&&"number"==typeof n)return e-n}function _(t){return+d(t,.5)}function x(t){for(var e=_(t),n=[],r=0;r=r[n][s]);--d)(c=j(l,s,o,a)+r[n-1][l-1])n&&(n=t[r]),t[r]t.length)throw new Error("cannot generate more classes than there are data values");var n=s(t);if(1===M(n))return[n];var r=S(e,n.length),i=S(e,n.length);!function(t,e,n){for(var r,i=e[0].length,o=t[Math.floor(i/2)],a=[],s=[],l=0;l=Math.abs(o)&&(d+=1);else if("greater"===r)for(u=0;u<=i;u++)a[u]>=o&&(d+=1);else for(u=0;u<=i;u++)a[u]<=o&&(d+=1);return d/i},t.bisect=function(t,e,n,r,i){if("function"!=typeof t)throw new TypeError("func must be a function");for(var o=0;oa&&(a=t[0]),t[1]s&&(s=t[1])}function u(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,n=-1,l=t.length;++na&&(a=e[0]),e[1]s&&(s=e[1])})),t.objects)u(t.objects[e]);return[i,o,a,s]}function i(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}function o(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return a(t,e)}))}:a(t,e)}function a(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,o=s(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:o}:null==r?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function s(t,e){var r=n(t.transform),o=t.arcs;function a(t,e){e.length&&e.pop();for(var n=o[t<0?~t:t],a=0,s=n.length;a1)r=h(t,e,n);else for(i=0,r=new Array(o=t.arcs.length);i1)for(var o,a,s=1,c=u(i[0]);sc&&(a=i[0],i[0]=i[s],i[s]=a,c=o);return i})).filter((function(t){return t.length>0}))}}function g(t,e){for(var n=0,r=t.length;n>>1;t[i]=2))throw new Error("n must be ≥2");var n,i=(l=t.bbox||r(t))[0],o=l[1],a=l[2],s=l[3];e={scale:[a-i?(a-i)/(n-1):1,s-o?(s-o)/(n-1):1],translate:[i,o]}}var l,u,c=y(e),h=t.objects,f={};function d(t){return c(t)}function p(t){var e;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(p)};break;case"Point":e={type:"Point",coordinates:d(t.coordinates)};break;case"MultiPoint":e={type:"MultiPoint",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}function g(t){var e,n=0,r=1,i=t.length,o=new Array(i);for(o[0]=c(t[0],0);++n=0;l--)(o=e[l])&&(s=(a<3?o(s):a>3?o(n,r,s):o(n,r))||s);return a>3&&s&&Object.defineProperty(n,r,s),s},u=function(t,e){return function(n,r){e(n,r,t)}},c=function(e,n){if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)},h=function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{l(r.next(t))}catch(e){o(e)}}function s(t){try{l(r.throw(t))}catch(e){o(e)}}function l(t){t.done?n(t.value):i(t.value).then(a,s)}l((r=r.apply(t,e||[])).next())}))},f=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},g=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},v=function(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{l(i[t](e))}catch(n){h(o[0][3],n)}}function l(t){t.value instanceof _?Promise.resolve(t.value.v).then(u,c):h(o[0][2],t)}function u(t){s("next",t)}function c(t){s("throw",t)}function h(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}},b=function(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:_(t[r](e)),done:"return"===r}:i?i(e):e}:i}},w=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){i(r,o,(e=t[n](e)).done,e.value)}))}}function i(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}},M=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};var r=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};S=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&P(e,t,n);return r(e,t),e},j=function(t){return t&&t.__esModule?t:{default:t}},C=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},E=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n},e("__extends",o),e("__assign",a),e("__rest",s),e("__decorate",l),e("__param",u),e("__metadata",c),e("__awaiter",h),e("__generator",f),e("__exportStar",d),e("__createBinding",P),e("__values",p),e("__read",g),e("__spread",v),e("__spreadArrays",y),e("__spreadArray",m),e("__await",_),e("__asyncGenerator",x),e("__asyncDelegator",b),e("__asyncValues",w),e("__makeTemplateObject",M),e("__importStar",S),e("__importDefault",j),e("__classPrivateFieldGet",C),e("__classPrivateFieldSet",E)}(A(k,A(e)))}.apply(n,[n]),void 0===i||(e.exports=i)}()}).call(this,r(/*! ./../_webpack@4.46.0@webpack/buildin/global.js */"./node_modules/_webpack@4.46.0@webpack/buildin/global.js"))},"./node_modules/_webpack@4.46.0@webpack/buildin/global.js": /*!***********************************!*\ !*** (webpack)/buildin/global.js ***! \***********************************/ /*! no static exports found */function(e,n){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(i){"object"===("undefined"==typeof window?"undefined":t(window))&&(r=window)}e.exports=r},"./node_modules/_webpack@4.46.0@webpack/buildin/module.js": /*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ /*! no static exports found */function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"./node_modules/_wolfy87-eventemitter@5.2.9@wolfy87-eventemitter/EventEmitter.js": /*!***************************************************************************************!*\ !*** ./node_modules/_wolfy87-eventemitter@5.2.9@wolfy87-eventemitter/EventEmitter.js ***! \***************************************************************************************/ /*! no static exports found */function(e,n,r){var i; /*! * EventEmitter v5.2.9 - git.io/ee * Unlicense - http://unlicense.org/ * Oliver Caldwell - https://oli.me.uk/ * @preserve */!function(n){function o(){}var a=o.prototype,s=n.EventEmitter;function l(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function u(t){return function(){return this[t].apply(this,arguments)}}function c(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!==t(e))&&c(e.listener)}a.getListeners=function(t){var e,n,r=this._getEvents();if(t instanceof RegExp)for(n in e={},r)r.hasOwnProperty(n)&&t.test(n)&&(e[n]=r[n]);else e=r[t]||(r[t]=[]);return e},a.flattenListeners=function(t){var e,n=[];for(e=0;eB&&(B=t.count)})),i.forIn(C,(function(t){var n=t.x,r=t.y,i=t.count,o={};o[k]=i,e.sizeByCount?(o[P]=O.map((function(e){return n+t.count/B*e[0]})),o[T]=O.map((function(e){return(r+t.count/B*e[1])/j}))):(o[P]=O.map((function(t){return n+t[0]})),o[T]=O.map((function(t){return(r+t[1])/j}))),I.push(o)})),t.rows=I}o.DataSet.registerTransform("bin.hexagon",d),o.DataSet.registerTransform("bin.hex",d),o.DataSet.registerTransform("hexbin",d)},"./src/transform/bin/histogram.ts": /*!****************************************!*\ !*** ./src/transform/bin/histogram.ts ***! \****************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=r.__importDefault(n(/*! ../../util/partition */"./src/util/partition.ts")),a=n(/*! ../../data-set */"./src/data-set.ts"),s=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),l={as:["x","count"],bins:void 0,offset:0,groupBy:[]};function u(t,e){e=i.assign({},l,e);var n=s.getField(e);if(0!==t.rows.length){var a,u=t.range(n),c=u[1]-u[0],h=e.binWidth,f=e.bins;if(!h&&f){if(f<=0)throw new TypeError("Invalid bins: it must be a positive number!");h=c/f}if(!h&&!f){var d=(a=t.rows.length,Math.ceil(Math.log(a)/Math.LN2)+1);h=c/d}var p=e.offset%h,g=[],v=e.groupBy,y=o.default(t.rows,v);i.forIn(y,(function(t){var o={};t.map((function(t){return t[n]})).forEach((function(t){var e=r.__read(function(t,e,n){var r=t-n,i=Math.floor(r/e);return[i*e+n,(i+1)*e+n]}(t,h,p),2),n=e[0],i=e[1],a=n+"-"+i;o[a]=o[a]||{x0:n,x1:i,count:0},o[a].count++}));var a=r.__read(e.as,2),s=a[0],l=a[1];if(!s||!l)throw new TypeError('Invalid as: it must be an array with 2 elements (e.g. [ "x", "count" ])!');var u=i.pick(t[0],v);i.forIn(o,(function(t){var e=i.assign({},u);e[s]=[t.x0,t.x1],e[l]=t.count,g.push(e)}))})),t.rows=g}}a.DataSet.registerTransform("bin.histogram",u),a.DataSet.registerTransform("bin.dot",u)},"./src/transform/bin/quantile.ts": /*!***************************************!*\ !*** ./src/transform/bin/quantile.ts ***! \***************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! simple-statistics */"./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js"),a=r.__importDefault(n(/*! ../../util/partition */"./src/util/partition.ts")),s=r.__importDefault(n(/*! ../../util/p-by-fraction */"./src/util/p-by-fraction.ts")),l=n(/*! ../../data-set */"./src/data-set.ts").DataSet.registerTransform,u=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),c={as:"_bin",groupBy:[],fraction:4};l("bin.quantile",(function(t,e){e=i.assign({},c,e);var n=u.getField(e),r=e.as;if(!i.isString(r))throw new TypeError('Invalid as: it must be a string (e.g. "_bin")!');var l=e.p,h=e.fraction;i.isArray(l)&&0!==l.length||(l=s.default(h));var f=t.rows,d=e.groupBy,p=a.default(f,d),g=[];i.forIn(p,(function(t){var e=t[0],i=t.map((function(t){return t[n]})),a=l.map((function(t){return o.quantile(i,t)}));e[r]=a,g.push(e)})),t.rows=g}))},"./src/transform/bin/rectangle.ts": /*!****************************************!*\ !*** ./src/transform/bin/rectangle.ts ***! \****************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! ../../data-set */"./src/data-set.ts").DataSet.registerTransform,a=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),s={as:["x","y","count"],bins:[30,30],offset:[0,0],sizeByCount:!1};function l(t,e,n){var r=t-n,i=Math.floor(r/e);return[i*e+n,(i+1)*e+n]}function u(t,e){e=i.assign({},s,e);var n=r.__read(a.getFields(e),2),o=n[0],u=n[1];if(!o||!u)throw new TypeError("Invalid fields: must be an array with 2 strings!");var c=t.range(o),h=t.range(u),f=c[1]-c[0],d=h[1]-h[0],p=e.binWidth||[];if(2!==p.length){var g=r.__read(e.bins,2),v=g[0],y=g[1];if(v<=0||y<=0)throw new TypeError("Invalid bins: must be an array with 2 positive numbers (e.g. [ 30, 30 ])!");p=[f/v,d/y]}var m=t.rows.map((function(t){return[t[o],t[u]]})),_={},x=r.__read(e.offset,2),b=x[0],w=x[1];m.forEach((function(t){var e=r.__read(l(t[0],p[0],b),2),n=e[0],i=e[1],o=r.__read(l(t[1],p[1],w),2),a=o[0],s=o[1],u=n+"-"+i+"-"+a+"-"+s;_[u]=_[u]||{x0:n,x1:i,y0:a,y1:s,count:0},_[u].count++}));var M=[],S=r.__read(e.as,3),j=S[0],C=S[1],E=S[2];if(!j||!C||!E)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "count" ])!');if(e.sizeByCount){var P=0;i.forIn(_,(function(t){t.count>P&&(P=t.count)})),i.forIn(_,(function(t){var e=t.x0,n=t.x1,i=t.y0,o=t.y1,a=t.count,s=a/P,l=r.__read([(e+n)/2,(i+o)/2],2),u=l[0],c=l[1],h=(n-e)*s/2,f=(o-i)*s/2,d=u-h,p=u+h,g=c-f,v=c+f,y={};y[j]=[d,p,p,d],y[C]=[g,g,v,v],y[E]=a,M.push(y)}))}else i.forIn(_,(function(t){var e={};e[j]=[t.x0,t.x1,t.x1,t.x0],e[C]=[t.y0,t.y0,t.y1,t.y1],e[E]=t.count,M.push(e)}));t.rows=M}o("bin.rectangle",u),o("bin.rect",u)},"./src/transform/default.ts": /*!**********************************!*\ !*** ./src/transform/default.ts ***! \**********************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),n(/*! ../data-set */"./src/data-set.ts").DataSet.registerTransform("default",(function(t){return t}))},"./src/transform/diagram/arc.ts": /*!**************************************!*\ !*** ./src/transform/diagram/arc.ts ***! \**************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),i=n(/*! ../../data-set */"./src/data-set.ts"),o={y:0,thickness:.05,weight:!1,marginRatio:.1,id:function(t){return t.id},source:function(t){return t.source},target:function(t){return t.target},sourceWeight:function(t){return t.value||1},targetWeight:function(t){return t.value||1},sortBy:null};function a(t,e){e=r.assign({},o,e);var n={},i=t.nodes,a=t.edges;r.isArray(i)&&0!==i.length||(i=function(t,e,n){return void 0===n&&(n={}),t.forEach((function(t){var r=e.edgeSource(t),i=e.edgeTarget(t);n[r]||(n[r]={id:r}),n[i]||(n[i]={id:i})})),r.values(n)}(a,e,n)),i.forEach((function(t){var r=e.id(t);n[r]=t})),function(t,e,n){r.forIn(t,(function(t,r){t.inEdges=e.filter((function(t){return""+n.target(t)==""+r})),t.outEdges=e.filter((function(t){return""+n.source(t)==""+r})),t.edges=t.outEdges.concat(t.inEdges),t.frequency=t.edges.length,t.value=0,t.inEdges.forEach((function(e){t.value+=n.targetWeight(e)})),t.outEdges.forEach((function(e){t.value+=n.sourceWeight(e)}))}))}(n,a,e),function(t,e){var n={weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,n){return(""+e.id(t)).localeCompare(""+e.id(n))}}[e.sortBy];!n&&r.isFunction(e.sortBy)&&(n=e.sortBy),n&&t.sort(n)}(i,e),function(t,e){var n=t.length;if(!n)throw new TypeError("Invalid nodes: it's empty!");if(e.weight){var r=e.marginRatio;if(r<0||r>=1)throw new TypeError("Invalid marginRatio: it must be in range [0, 1)!");var i=r/(2*n),o=e.thickness;if(o<=0||o>=1)throw new TypeError("Invalid thickness: it must be in range (0, 1)!");var a=0;t.forEach((function(t){a+=t.value})),t.forEach((function(t){t.weight=t.value/a,t.width=t.weight*(1-r),t.height=o})),t.forEach((function(n,r){for(var a=0,s=r-1;s>=0;s--)a+=t[s].width+2*i;var l=n.minX=i+a,u=n.maxX=n.minX+n.width,c=n.minY=e.y-o/2,h=n.maxY=c+o;n.x=[l,u,u,l],n.y=[c,c,h,h]}))}else{var s=1/n;t.forEach((function(t,n){t.x=(n+.5)*s,t.y=e.y}))}}(i,e),function(t,e,n){if(n.weight){var i={};r.forIn(t,(function(t,e){i[e]=t.value})),e.forEach((function(e){var r=n.source(e),o=n.target(e),a=t[r],s=t[o];if(a&&s){var l=i[r],u=n.sourceWeight(e),c=a.minX+(a.value-l)/a.value*a.width,h=c+u/a.value*a.width;i[r]-=u;var f=i[o],d=n.targetWeight(e),p=s.minX+(s.value-f)/s.value*s.width,g=p+d/s.value*s.width;i[o]-=d;var v=n.y;e.x=[c,h,p,g],e.y=[v,v,v,v]}}))}else e.forEach((function(e){var r=t[n.source(e)],i=t[n.target(e)];r&&i&&(e.x=[r.x,i.x],e.y=[r.y,i.y])}))}(n,a,e),t.nodes=i,t.edges=a}i.DataSet.registerTransform("diagram.arc",a),i.DataSet.registerTransform("arc",a)},"./src/transform/diagram/dagre.ts": /*!****************************************!*\ !*** ./src/transform/diagram/dagre.ts ***! \****************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=r.__importDefault(n(/*! dagre */"./node_modules/_dagre@0.8.5@dagre/index.js")),a=n(/*! ../../data-set */"./src/data-set.ts"),s={rankdir:"TB",align:"TB",nodesep:50,edgesep:10,ranksep:50,source:function(t){return t.source},target:function(t){return t.target}};function l(t,e){e=i.assign({},s,e);var n=new o.default.graphlib.Graph;n.setGraph({}),n.setDefaultEdgeLabel((function(){return{}})),t.nodes.forEach((function(t){var r=e.nodeId?e.nodeId(t):t.id;t.height||t.width||(t.height=t.width=e.edgesep),n.setNode(r,t)})),t.edges.forEach((function(t){n.setEdge(e.source(t),e.target(t))})),o.default.layout(n);var r=[],a=[];n.nodes().forEach((function(t){var e=n.node(t),i=e.x,o=e.y,a=e.height,s=e.width;e.x=[i-s/2,i+s/2,i+s/2,i-s/2],e.y=[o+a/2,o+a/2,o-a/2,o-a/2],r.push(e)})),n.edges().forEach((function(t){var e=n.edge(t).points,r={};r.x=e.map((function(t){return t.x})),r.y=e.map((function(t){return t.y})),a.push(r)})),t.nodes=r,t.edges=a}a.DataSet.registerTransform("diagram.dagre",l),a.DataSet.registerTransform("dagre",l)},"./src/transform/diagram/sankey.ts": /*!*****************************************!*\ !*** ./src/transform/diagram/sankey.ts ***! \*****************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),i=n(/*! d3-sankey */"./node_modules/_d3-sankey@0.9.1@d3-sankey/dist/d3-sankey.js"),o=n(/*! ../../data-set */"./src/data-set.ts"),a={sankeyLeft:i.sankeyLeft,sankeyRight:i.sankeyRight,sankeyCenter:i.sankeyCenter,sankeyJustify:i.sankeyJustify},s={value:function(t){return t.value},source:function(t){return t.source},target:function(t){return t.target},nodeAlign:"sankeyJustify",nodeWidth:.02,nodePadding:.02,sort:void 0};function l(t,e){e=r.assign({},s,e);var n=null;r.isString(e.nodeAlign)?n=a[e.nodeAlign]:r.isFunction(e.nodeAlign)&&(n=e.nodeAlign);var o=i.sankey().nodeSort(e.sort).links((function(t){return t.edges})).nodeWidth(e.nodeWidth).nodePadding(e.nodePadding).extent([[0,0],[1,1]]);r.isFunction(e.nodeId)&&o.nodeId(e.nodeId),n&&o.nodeAlign(n),o(t),t.nodes.forEach((function(t){var e=t.x0,n=t.x1,r=t.y0,i=t.y1;t.x=[e,n,n,e],t.y=[r,r,i,i]})),t.edges.forEach((function(t){var e=t.source,n=t.target,r=e.x1,i=n.x0;t.x=[r,r,i,i];var o=t.width/2;t.y=[t.y0+o,t.y0-o,t.y1+o,t.y1-o]}))}o.DataSet.registerTransform("diagram.sankey",l),o.DataSet.registerTransform("sankey",l)},"./src/transform/diagram/voronoi.ts": /*!******************************************!*\ !*** ./src/transform/diagram/voronoi.ts ***! \******************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importStar(n(/*! d3-voronoi */"./node_modules/_d3-voronoi@1.1.4@d3-voronoi/dist/d3-voronoi.js")),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! ../../data-set */"./src/data-set.ts").DataSet.registerTransform,a=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),s={as:["_x","_y"]};function l(t,e){var n=(e=i.assign({},s,e)).as;if(!i.isArray(n)||2!==n.length)throw new TypeError("Invalid as: must be an array with two strings!");var o=n[0],l=n[1],u=a.getFields(e);if(!i.isArray(u)||2!==u.length)throw new TypeError("Invalid fields: must be an array with two strings!");var c=u[0],h=u[1],f=t.rows,d=f.map((function(t){return[t[c],t[h]]})),p=r.voronoi();e.extend&&p.extent(e.extend),e.size&&p.size(e.size);var g=p(d).polygons();f.forEach((function(t,e){var n=g[e].filter((function(t){return!!t}));t[o]=n.map((function(t){return t[0]})),t[l]=n.map((function(t){return t[1]}))}))}o("diagram.voronoi",l),o("voronoi",l)},"./src/transform/fill-rows.ts": /*!************************************!*\ !*** ./src/transform/fill-rows.ts ***! \************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=r.__importDefault(n(/*! ../util/partition */"./src/util/partition.ts")),a=n(/*! ../data-set */"./src/data-set.ts"),s={fillBy:"group",groupBy:[],orderBy:[]};function l(t,e){var n=t.map((function(t){return t}));return e.forEach((function(t){var e=n.indexOf(t);e>-1&&n.splice(e,1)})),n}function u(t,e){e=i.assign({},s,e);var n=t.rows,r=e.groupBy,a=e.orderBy,u=o.default(n,r,a),c=0,h=[];i.forIn(u,(function(t){t.length>c&&(c=t.length,h=t)}));var f=[],d={};if(h.forEach((function(t){var e=a.map((function(e){return t[e]})).join("-");f.push(e),d[e]=t})),"order"===e.fillBy){var p=h[0],g=[],v={};n.forEach((function(t){var e=a.map((function(e){return t[e]})).join("-");-1===g.indexOf(e)&&(g.push(e),v[e]=t)})),l(g,f).forEach((function(t){var e={};r.forEach((function(t){e[t]=p[t]})),a.forEach((function(n){e[n]=v[t][n]})),n.push(e),h.push(e),f.push(t),d[t]=e})),c=h.length}i.forIn(u,(function(t){if(t!==h&&t.length=c-t.length)return!0;var s=d[i],l={};return r.forEach((function(t){l[t]=e[t]})),a.forEach((function(t){l[t]=s[t]})),n.push(l),!1}))}}))}a.DataSet.registerTransform("fill-rows",u),a.DataSet.registerTransform("fillRows",u)},"./src/transform/filter.ts": /*!*********************************!*\ !*** ./src/transform/filter.ts ***! \*********************************/ /*! no static exports found */function(t,e,n){function r(t){return!!t}Object.defineProperty(e,"__esModule",{value:!0}),n(/*! ../data-set */"./src/data-set.ts").DataSet.registerTransform("filter",(function(t,e){t.rows=t.rows.filter(e.callback||r)}))},"./src/transform/fold.ts": /*!*******************************!*\ !*** ./src/transform/fold.ts ***! \*******************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),i=n(/*! ../data-set */"./src/data-set.ts"),o=n(/*! ../util/option-parser */"./src/util/option-parser.ts"),a={fields:[],key:"key",retains:[],value:"value"};i.DataSet.registerTransform("fold",(function(t,e){var n=t.getColumnNames();e=r.assign({},a,e);var i=o.getFields(e);0===i.length&&(console.warn("warning: option fields is not specified, will fold all columns."),i=n);var s=e.key,l=e.value,u=e.retains;u&&0!==u.length||(u=r.difference(n,i));var c=[];t.rows.forEach((function(t){i.forEach((function(e){var n=r.pick(t,u);n[s]=e,n[l]=t[e],c.push(n)}))})),t.rows=c}))},"./src/transform/geo/centroid.ts": /*!***************************************!*\ !*** ./src/transform/geo/centroid.ts ***! \***************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),i=n(/*! ../../data-set */"./src/data-set.ts").DataSet.registerTransform,o=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),a={as:["_centroid_x","_centroid_y"]};i("geo.centroid",(function(t,e){e=r.assign({},a,e);var n=o.getField(e),i=e.geoView||e.geoDataView;if(r.isString(i)&&t.dataSet&&(i=t.dataSet.getView(i)),!i||"geo"!==i.dataType)throw new TypeError("Invalid geoView: must be a DataView of GEO dataType!");var s=e.as;if(!r.isArray(s)||2!==s.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "cX", "cY" ])!');var l=s[0],u=s[1];t.rows.forEach((function(t){var e=i.geoFeatureByName(t[n]);e&&(i._projectedAs?(t[l]=e[i._projectedAs[2]],t[u]=e[i._projectedAs[3]]):(t[l]=e.centroidX,t[u]=e.centroidY))}))}))},"./src/transform/geo/projection.ts": /*!*****************************************!*\ !*** ./src/transform/geo/projection.ts ***! \*****************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! d3-geo */"./node_modules/_d3-geo@1.6.4@d3-geo/build/d3-geo.js"),a=r.__importDefault(n(/*! point-at-length */"./node_modules/_point-at-length@1.1.0@point-at-length/index.js")),s=n(/*! ../../data-set */"./src/data-set.ts").DataSet.registerTransform,l=r.__importDefault(n(/*! ../../util/get-geo-projection */"./src/util/get-geo-projection.ts")),u={as:["_x","_y","_centroid_x","_centroid_y"]};s("geo.projection",(function(t,e){if("geo"!==t.dataType&&"geo-graticule"!==t.dataType)throw new TypeError("Invalid dataView: this transform is for Geo data only!");var n=(e=i.assign({},u,e)).projection;if(!n)throw new TypeError("Invalid projection!");n=l.default(n);var s=o.geoPath(n),c=e.as;if(!i.isArray(c)||4!==c.length)throw new TypeError('Invalid as: it must be an array with 4 strings (e.g. [ "x", "y", "cX", "cY" ])!');t._projectedAs=c;var h=r.__read(c,4),f=h[0],d=h[1],p=h[2],g=h[3];t.rows.forEach((function(t){t[f]=[],t[d]=[];var e=s(t);if(e){a.default(e)._path.forEach((function(e){t[f].push(e[1]),t[d].push(e[2])}));var n=s.centroid(t);t[p]=n[0],t[g]=n[1]}})),t.rows=t.rows.filter((function(t){return 0!==t[f].length}))}))},"./src/transform/geo/region.ts": /*!*************************************!*\ !*** ./src/transform/geo/region.ts ***! \*************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),i=n(/*! ../../data-set */"./src/data-set.ts").DataSet.registerTransform,o=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),a={as:["_x","_y"]};i("geo.region",(function(t,e){e=r.assign({},a,e);var n=o.getField(e),i=e.geoView||e.geoDataView;if(r.isString(i)&&(i=t.dataSet.getView(i)),!i||"geo"!==i.dataType)throw new TypeError("Invalid geoView: must be a DataView of GEO dataType!");var s=e.as;if(!r.isArray(s)||2!==s.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var l=s[0],u=s[1];t.rows.forEach((function(t){var e=i.geoFeatureByName(t[n]);e&&(i._projectedAs?(t[l]=e[i._projectedAs[0]],t[u]=e[i._projectedAs[1]]):(t[l]=e.longitude,t[u]=e.latitude))}))}))},"./src/transform/hierarchy/cluster.ts": /*!********************************************!*\ !*** ./src/transform/hierarchy/cluster.ts ***! \********************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importStar(n(/*! d3-hierarchy */"./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! ../../data-set */"./src/data-set.ts"),a=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),s={field:"value",size:[1,1],nodeSize:null,separation:null,as:["x","y"]};function l(t,e){if(t.dataType!==o.DataSet.CONSTANTS.HIERARCHY||!t.root)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var n=t.root,l=(e=i.assign({},s,e)).as;if(!i.isArray(l)||2!==l.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var u=void 0;try{u=a.getField(e)}catch(d){console.warn(d)}u&&n.sum((function(t){return t[u]}));var c=r.cluster();c.size(e.size),e.nodeSize&&c.nodeSize(e.nodeSize),e.separation&&c.separation(e.separation),c(n);var h=l[0],f=l[1];n.each((function(t){t[h]=t.x,t[f]=t.y}))}o.DataSet.registerTransform("hierarchy.cluster",l),o.DataSet.registerTransform("dendrogram",l)},"./src/transform/hierarchy/compact-box.ts": /*!************************************************!*\ !*** ./src/transform/hierarchy/compact-box.ts ***! \************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importDefault(n(/*! @antv/hierarchy */"./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js")),i=n(/*! ../../data-set */"./src/data-set.ts"),o={};function a(t,e){var n=t.root;if(e=Object.assign({},o,e),t.dataType!==i.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");t.root=r.default.compactBox(n,e)}i.DataSet.registerTransform("hierarchy.compact-box",a),i.DataSet.registerTransform("compact-box-tree",a),i.DataSet.registerTransform("non-layered-tidy-tree",a),i.DataSet.registerTransform("mindmap-logical",a)},"./src/transform/hierarchy/dendrogram.ts": /*!***********************************************!*\ !*** ./src/transform/hierarchy/dendrogram.ts ***! \***********************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importDefault(n(/*! @antv/hierarchy */"./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js")),i=n(/*! ../../data-set */"./src/data-set.ts"),o={};function a(t,e){var n=t.root;if(e=Object.assign({},o,e),t.dataType!==i.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");t.root=r.default.dendrogram(n,e)}i.DataSet.registerTransform("hierarchy.dendrogram",a),i.DataSet.registerTransform("dendrogram",a)},"./src/transform/hierarchy/indented.ts": /*!*********************************************!*\ !*** ./src/transform/hierarchy/indented.ts ***! \*********************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importDefault(n(/*! @antv/hierarchy */"./node_modules/_@antv_hierarchy@0.6.6@@antv/hierarchy/build/hierarchy.js")),i=n(/*! ../../data-set */"./src/data-set.ts"),o={};function a(t,e){var n=t.root;if(e=Object.assign({},o,e),t.dataType!==i.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");t.root=r.default.indented(n,e)}i.DataSet.registerTransform("hierarchy.indented",a),i.DataSet.registerTransform("indented-tree",a)},"./src/transform/hierarchy/pack.ts": /*!*****************************************!*\ !*** ./src/transform/hierarchy/pack.ts ***! \*****************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=r.__importStar(n(/*! d3-hierarchy */"./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),a=n(/*! ../../data-set */"./src/data-set.ts"),s=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),l={field:"value",size:[1,1],padding:0,as:["x","y","r"]};function u(t,e){if(t.dataType!==a.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var n,r=t.root,u=(e=i.assign({},l,e)).as;if(!i.isArray(u)||3!==u.length)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');try{n=s.getField(e)}catch(p){console.warn(p)}n&&r.sum((function(t){return t[n]})).sort((function(t,e){return e[n]-t[n]}));var c=o.pack();c.size(e.size),e.padding&&c.padding(e.padding),c(r);var h=u[0],f=u[1],d=u[2];r.each((function(t){t[h]=t.x,t[f]=t.y,t[d]=t.r}))}a.DataSet.registerTransform("hierarchy.pack",u),a.DataSet.registerTransform("hierarchy.circle-packing",u),a.DataSet.registerTransform("circle-packing",u)},"./src/transform/hierarchy/partition.ts": /*!**********************************************!*\ !*** ./src/transform/hierarchy/partition.ts ***! \**********************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importStar(n(/*! d3-hierarchy */"./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! ../../data-set */"./src/data-set.ts"),a=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),s={field:"value",size:[1,1],round:!1,padding:0,sort:!0,as:["x","y"]};function l(t,e){if(t.dataType!==o.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var n,l=t.root,u=(e=i.assign({},s,e)).as;if(!i.isArray(u)||2!==u.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=a.getField(e)}catch(d){console.warn(d)}n&&l.sum((function(t){return t[n]}));var c=r.partition();c.size(e.size).round(e.round).padding(e.padding),c(l);var h=u[0],f=u[1];l.each((function(t){t[h]=[t.x0,t.x1,t.x1,t.x0],t[f]=[t.y1,t.y1,t.y0,t.y0],["x0","x1","y0","y1"].forEach((function(e){-1===u.indexOf(e)&&delete t[e]}))}))}o.DataSet.registerTransform("hierarchy.partition",l),o.DataSet.registerTransform("adjacency",l)},"./src/transform/hierarchy/tree.ts": /*!*****************************************!*\ !*** ./src/transform/hierarchy/tree.ts ***! \*****************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importStar(n(/*! d3-hierarchy */"./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! ../../data-set */"./src/data-set.ts"),a=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),s={field:"value",size:[1,1],nodeSize:null,separation:null,as:["x","y"]};function l(t,e){if(t.dataType!==o.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var n,l=t.root,u=(e=i.assign({},s,e)).as;if(!i.isArray(u)||2!==u.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=a.getField(e)}catch(d){console.warn(d)}n&&l.sum((function(t){return t[n]}));var c=r.tree();c.size(e.size),e.nodeSize&&c.nodeSize(e.nodeSize),e.separation&&c.separation(e.separation),c(l);var h=u[0],f=u[1];l.each((function(t){t[h]=t.x,t[f]=t.y}))}o.DataSet.registerTransform("hierarchy.tree",l),o.DataSet.registerTransform("tree",l)},"./src/transform/hierarchy/treemap.ts": /*!********************************************!*\ !*** ./src/transform/hierarchy/treemap.ts ***! \********************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js").__importStar(n(/*! d3-hierarchy */"./node_modules/_d3-hierarchy@1.1.9@d3-hierarchy/dist/d3-hierarchy.js")),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=n(/*! ../../data-set */"./src/data-set.ts"),a=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),s={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"]};function l(t,e){if(t.dataType!==o.DataSet.CONSTANTS.HIERARCHY)throw new TypeError("Invalid DataView: This transform is for Hierarchy data only!");var n,l=t.root,u=(e=i.assign({},s,e)).as;if(!i.isArray(u)||2!==u.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=a.getField(e)}catch(d){console.warn(d)}n&&l.sum((function(t){return t[n]}));var c=r.treemap();c.tile(r[e.tile]).size(e.size).round(e.round).padding(e.padding).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft),c(l);var h=u[0],f=u[1];l.each((function(t){t[h]=[t.x0,t.x1,t.x1,t.x0],t[f]=[t.y1,t.y1,t.y0,t.y0],["x0","x1","y0","y1"].forEach((function(e){-1===u.indexOf(e)&&delete t[e]}))}))}o.DataSet.registerTransform("hierarchy.treemap",l),o.DataSet.registerTransform("treemap",l)},"./src/transform/impute.ts": /*!*********************************!*\ !*** ./src/transform/impute.ts ***! \*********************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=r.__importStar(n(/*! simple-statistics */"./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js")),a=r.__importDefault(n(/*! ../util/partition */"./src/util/partition.ts")),s=n(/*! ../data-set */"./src/data-set.ts"),l=n(/*! ../util/option-parser */"./src/util/option-parser.ts"),u={groupBy:[]};function c(t){return t.filter((function(t){return!i.isUndefined(t)}))}var h=["mean","median","max","min"],f={};h.forEach((function(t){f[t]=function(e,n){return o[t](n)}})),f.value=function(t,e,n){return n},s.DataSet.registerTransform("impute",(function(t,e){e=i.assign({},u,e);var n=l.getField(e),r=e.method;if(!r)throw new TypeError("Invalid method!");if("value"===r&&!i.has(e,"value"))throw new TypeError("Invalid value: it is nil.");var o=c(t.getColumn(n)),s=a.default(t.rows,e.groupBy);i.forIn(s,(function(t){var a=c(t.map((function(t){return t[n]})));0===a.length&&(a=o),t.forEach((function(o){if(i.isUndefined(o[n]))if(i.isFunction(r))o[n]=r(o,a,e.value,t);else{if(!i.isString(r))throw new TypeError("Invalid method: must be a function or one of "+h.join(", "));o[n]=f[r](o,a,e.value)}}))}))}))},"./src/transform/kde.ts": /*!******************************!*\ !*** ./src/transform/kde.ts ***! \******************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=r.__importDefault(n(/*! ../util/get-series-values */"./src/util/get-series-values.ts")),a=r.__importDefault(n(/*! ../util/kernel */"./src/util/kernel.ts")),s=r.__importStar(n(/*! ../util/bandwidth */"./src/util/bandwidth.ts")),l=r.__importDefault(n(/*! ../util/partition */"./src/util/partition.ts")),u=n(/*! ../data-set */"./src/data-set.ts"),c=n(/*! ../util/option-parser */"./src/util/option-parser.ts"),h=n(/*! simple-statistics */"./node_modules/_simple-statistics@6.1.1@simple-statistics/dist/simple-statistics.min.js"),f={minSize:.01,as:["key","y","size"],extent:[],method:"gaussian",bandwidth:"nrd",step:0,groupBy:[]},d=i.keys(a.default),p=i.keys(s);function g(t,e){e=i.assign({},f,e);var n=c.getFields(e);if(!i.isArray(n)||n.length<1)throw new TypeError("invalid fields: must be an array of at least 1 strings!");var u=e.as;if(!i.isArray(u)||3!==u.length)throw new TypeError("invalid as: must be an array of 3 strings!");var p=e.method;if(i.isString(p)){if(-1===d.indexOf(p))throw new TypeError("invalid method: "+p+". Must be one of "+d.join(", "));p=a.default[p]}if(!i.isFunction(p))throw new TypeError("invalid method: kernel method must be a function!");var g=e.extent;if(!i.isArray(g)||0===g.length){var v=[];i.each(n,(function(e){var n=t.range(e);v=v.concat(n)})),g=[Math.min.apply(Math,r.__spread(v)),Math.max.apply(Math,r.__spread(v))]}var y=e.bandwidth;i.isString(y)&&s[y]?y=s[y](t.getColumn(n[0])):i.isFunction(y)?y=y(t.getColumn(n[0])):(!i.isNumber(y)||y<=0)&&(y=s.nrd(t.getColumn(n[0])));var m=o.default(g,e.step?e.step:y),_=[],x=e.groupBy,b=l.default(t.rows,x);i.forIn(b,(function(t){var o={};i.each(n,(function(n){var a=i.pick(t[0],x);o[n]=h.kernelDensityEstimation(t.map((function(t){return t[n]})),p,y);var s=r.__read(u,3),l=s[0],c=s[1],f=s[2];a[l]=n,a[c]=[],a[f]=[],i.each(m,(function(t){var r=o[n](t);r>=e.minSize&&(a[c].push(t),a[f].push(r))})),_.push(a)}))})),t.rows=_}u.DataSet.registerTransform("kernel-density-estimation",g),u.DataSet.registerTransform("kde",g),u.DataSet.registerTransform("KDE",g),e.default={KERNEL_METHODS:d,BANDWIDTH_METHODS:p}},"./src/transform/kernel-smooth/density.ts": /*!************************************************!*\ !*** ./src/transform/kernel-smooth/density.ts ***! \************************************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),o=r.__importDefault(n(/*! ../../util/get-series-values */"./src/util/get-series-values.ts")),a=r.__importDefault(n(/*! ../../util/kernel */"./src/util/kernel.ts")),s=n(/*! ../../data-set */"./src/data-set.ts"),l=n(/*! ../../util/option-parser */"./src/util/option-parser.ts"),u=n(/*! ../../util/bandwidth */"./src/util/bandwidth.ts"),c={as:["x","y","z"],method:"gaussian"},h=i.keys(a.default);function f(t,e){var n,s;e=i.assign({},c,e);var f=l.getFields(e);if(!i.isArray(f)||2!==f.length)throw new TypeError("invalid fields: must be an array of 2 strings!");var d,p=r.__read(e.as,3),g=p[0],v=p[1],y=p[2];if(!i.isString(g)||!i.isString(v)||!i.isString(y))throw new TypeError("invalid as: must be an array of 3 strings!");if(i.isString(e.method)){if(-1===h.indexOf(e.method))throw new TypeError("invalid method: "+e.method+". Must be one of "+h.join(", "));d=a.default[e.method]}var m,_,x,b,w=r.__read(f,2),M=w[0],S=w[1],j=e.extent,C=e.bandwidth;j&&Array.isArray(j)&&Array.isArray(j[0])&&Array.isArray(j[1])?(m=(n=r.__read(j,2))[0],_=n[1]):(m=t.range(M),_=t.range(S)),C&&Array.isArray(C)&&C.slice(0,2).every(i.isNumber)&&C.slice(0,2).every((function(t){return t>0}))?(x=(s=r.__read(C,2))[0],b=s[1]):(x=u.silverman(t.getColumn(M)),b=u.silverman(t.getColumn(S)));for(var E=o.default(m,x),P=o.default(_,b),T=t.rows.length,k=[],A=0;Ab&&(C=b/e,n=Math.ceil(e*C/M)),P=_/n})),i.forIn(v,(function(t){var e=[E*w,(E+1)*w],n=(e[1]-e[0])*(1-S)/M,r=0,o=0;i.each(t,(function(t){for(var a=t[h],s=Math.round(a*C),l=0;ln[i])return 1}return 0}:r.isString(e)&&(n=function(t,n){return t[e]n[e]?1:0}),t.sort(n)}},"./src/util/tag-cloud.ts": /*!*******************************!*\ !*** ./src/util/tag-cloud.ts ***! \*******************************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=Math.PI/180,o=2048;function a(t){return t.text}function s(){return"serif"}function l(){return"normal"}function u(t){return t.value}function c(){return 90*~~(2*Math.random())}function h(){return 1}function f(t,e,n,r){if(!e.sprite){var a=t.context,s=t.ratio;a.clearRect(0,0,2048/s,o/s);var l=0,u=0,c=0,h=n.length;for(--r;++r>5<<5,d=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else f=f+31>>5<<5;if(d>c&&(c=d),l+f>=2048&&(l=0,u+=c,c=0),u+d>=o)break;a.translate((l+(f>>1))/s,(u+(d>>1))/s),e.rotate&&a.rotate(e.rotate*i),a.fillText(e.text,0,0),e.padding&&(a.lineWidth=2*e.padding,a.strokeText(e.text,0,0)),a.restore(),e.width=f,e.height=d,e.xoff=l,e.yoff=u,e.x1=f>>1,e.y1=d>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,l+=f}for(var x=a.getImageData(0,0,2048/s,o/s).data,b=[];--r>=0;)if((e=n[r]).hasText){for(var w=(f=e.width)>>5,M=(d=e.y1-e.y0,0);M>5),P=x[2048*(u+C)+(l+M)<<2]?1<<31-M%32:0;b[E]|=P,S|=P}S?j=C:(e.y0++,d--,C--,u++)}e.y1=e.y0+j,e.sprite=b.slice(0,(e.y1-e.y0)*w)}}}function d(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,l=32-s,u=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h>>s:0))&e[c+f])return!0;c+=n}return!1}function p(t,e){var n=t[0],r=t[1];e.x+e.x0r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function g(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function v(t){for(var e=[],n=-1;++n=h));)if(n.x=u+o,n.y=c+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&d(n,e,t[0])||r&&(l=r,!((s=n).x+s.x1>l[0].x&&s.x+s.x0l[0].y&&s.y+s.y0>5,m=t[0]>>5,_=n.x-(y<<4),x=127&_,b=32-x,w=n.y1-n.y0,M=void 0,j=(n.y+n.y0)*m+(_>>5),C=0;C>>x:0);j+=m}return delete n.sprite,!0}return!1}return T.canvas=function(t){return arguments.length?(P=m(t),T):P},T.start=function(){var a=r.__read(t,2),s=a[0],l=a[1],u=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=o/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(P()),c=T.board?T.board:v((t[0]>>5)*t[1]),h=j.length,d=[],g=j.map((function(t,r){return t.text=e.call(this,t,r),t.font=n.call(this,t,r),t.style=x.call(this,t,r),t.weight=b.call(this,t,r),t.rotate=w.call(this,t,r),t.size=~~i.call(this,t,r),t.padding=M.call(this,t,r),t})).sort((function(t,e){return e.size-t.size})),y=-1,m=T.board?[{x:0,y:0},{x:s,y:l}]:null;return function(){for(var e=Date.now();Date.now()-e>1,n.y=l*(E()+.5)>>1,f(u,n,g,y),n.hasText&&k(c,n,m)&&(d.push(n),m?T.hasImage||p(m,n):m=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}T._tags=d,T._bounds=m}(),T},T.createMask=function(e){var n=document.createElement("canvas"),i=r.__read(t,2),o=i[0],a=i[1];if(o&&a){var s=o>>5,l=v((o>>5)*a);n.width=o,n.height=a;var u=n.getContext("2d");u.drawImage(e,0,0,e.width,e.height,0,0,o,a);for(var c=u.getImageData(0,0,o,a).data,h=0;h>5),p=h*o+f<<2,g=c[p]>=250&&c[p+1]>=250&&c[p+2]>=250?1<<31-f%32:0;l[d]|=g}T.board=l,T.hasImage=!0}},T.timeInterval=function(t){return arguments.length?(C=null==t?1/0:t,T):C},T.words=function(t){return arguments.length?(j=t,T):j},T.size=function(e){return arguments.length?(t=[+e[0],+e[1]],T):t},T.font=function(t){return arguments.length?(n=m(t),T):n},T.fontStyle=function(t){return arguments.length?(x=m(t),T):x},T.fontWeight=function(t){return arguments.length?(b=m(t),T):b},T.rotate=function(t){return arguments.length?(w=m(t),T):w},T.text=function(t){return arguments.length?(e=m(t),T):e},T.spiral=function(t){return arguments.length?(S=_[t]||t,T):S},T.fontSize=function(t){return arguments.length?(i=m(t),T):i},T.padding=function(t){return arguments.length?(M=m(t),T):M},T.random=function(t){return arguments.length?(E=t,T):E},T}},"./src/view.ts": /*!*********************!*\ !*** ./src/view.ts ***! \*********************/ /*! no static exports found */function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;var r=n(/*! tslib */"./node_modules/_tslib@2.1.0@tslib/tslib.js"),i=r.__importDefault(n(/*! wolfy87-eventemitter */"./node_modules/_wolfy87-eventemitter@5.2.9@wolfy87-eventemitter/EventEmitter.js")),o=n(/*! @antv/util */"./node_modules/_@antv_util@2.0.10@@antv/util/lib/index.js"),a=function(t){function e(e,n){var r=t.call(this)||this;if(r.isView=!0,r.isDataView=!0,r.watchingStates=null,r.dataType="table",r.transforms=[],r.origin=[],r.rows=[],e&&e.isDataSet?r.dataSet=e:(r.dataSet=null,n=e),r.loose=!r.dataSet,n&&(r.watchingStates=n.watchingStates),!r.loose){var i=r.watchingStates;e.on("statechange",(function(t){o.isArray(i)?i.indexOf(t)>-1&&r._reExecute():r._reExecute()}))}return r}return r.__extends(e,t),e.prototype._parseStateExpression=function(t){var e=this.dataSet;if(null!==e){var n=/^\$state\.(\w+)/.exec(t);return n?e.state[n[1]]:t}},e.prototype._preparseOptions=function(t){var e=this,n=function(t){var e={};return o.forIn(t,(function(t,n){o.isObject(t)&&t.isView?e[n]=t:o.isArray(t)?e[n]=t.concat([]):o.isPlainObject(t)?e[n]=o.clone(t):e[n]=t})),e}(t);return this.loose||o.forIn(n,(function(t,r){o.isString(t)&&/^\$state\./.test(t)&&(n[r]=e._parseStateExpression(t))})),n},e.prototype._prepareSource=function(t,n){if(this._source={source:t,options:n},n)r=this._preparseOptions(n),this.origin=e.DataSet.getConnector(r.type)(t,r,this);else if(t instanceof e||o.isString(t))this.origin=e.DataSet.getConnector("default")(t,this.dataSet);else if(o.isArray(t))this.origin=t;else{if(!o.isObject(t)||!t.type)throw new TypeError("Invalid source");var r=this._preparseOptions(t);this.origin=e.DataSet.getConnector(r.type)(r,this)}return this.rows=o.deepMix([],this.origin),this},e.prototype.source=function(t,e){return this._prepareSource(t,e)._reExecuteTransforms(),this.trigger("change",[]),this},e.prototype.transform=function(t){return t&&t.type&&(this.transforms.push(t),this._executeTransform(t)),this},e.prototype._executeTransform=function(t){t=this._preparseOptions(t),e.DataSet.getTransform(t.type)(this,t)},e.prototype._reExecuteTransforms=function(){var t=this;this.transforms.forEach((function(e){t._executeTransform(e)}))},e.prototype.addRow=function(t){this.rows.push(t)},e.prototype.removeRow=function(t){this.rows.splice(t,1)},e.prototype.updateRow=function(t,e){o.assign(this.rows[t],e)},e.prototype.findRows=function(t){return this.rows.filter((function(e){return o.isMatch(e,t)}))},e.prototype.findRow=function(t){return o.find(this.rows,t)},e.prototype.getColumnNames=function(){var t=this.rows[0];return t?o.keys(t):[]},e.prototype.getColumnName=function(t){return this.getColumnNames()[t]},e.prototype.getColumnIndex=function(t){return this.getColumnNames().indexOf(t)},e.prototype.getColumn=function(t){return this.rows.map((function(e){return e[t]}))},e.prototype.getColumnData=function(t){return this.getColumn(t)},e.prototype.getSubset=function(t,e,n){for(var r=[],i=t;i<=e;i++)r.push(o.pick(this.rows[i],n));return r},e.prototype.toString=function(t){return void 0===t&&(t=!1),t?JSON.stringify(this.rows,null,2):JSON.stringify(this.rows)},e.prototype._reExecute=function(){var t=this._source,e=t.source,n=t.options;this._prepareSource(e,n),this._reExecuteTransforms(),this.trigger("change",[])},e}(i.default);e.View=a}})},e.exports=r()}(Rw);var Nw=H(Rw.exports);Yp("interval","borderRadius",{draw:function(t,e){var n=t.points,r=[];return r.push(["M",n[0].x,n[0].y]),r.push(["L",n[1].x,n[1].y]),r.push(["L",n[2].x,n[2].y]),r.push(["L",n[3].x,n[3].y]),r.push("Z"),r=this.parsePath(r),e.addShape("rect",{attrs:{x:r[1][1],y:r[1][2],width:r[2][1]-r[1][1],height:r[0][2]-r[1][2],fill:t.color,radius:(r[2][1]-r[1][1])/2}})}});var zw=i({props:{screenType:{type:String}},setup:function(t,e){var r=o(),i=E(),a=s({lastChart:null,ds:null,intervalInt:null,getLastDayEnergy:function(){G().then((function(t){var n=t.data.content||[];n.sort((function(t,e){return t.date-e.date})),n.forEach((function(t){var e=t.date;t.Date=e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2),t.value=Number(((t.energyAcTerminal||0)+(t.energyCooling||0)+(t.energyHeating||0)+(t.energyLight||0)+(t.energyOthers||0)).toFixed(0))})),0!=n.length?(a.lastChart=a.cInitChart(n),a.setChartInterval()):setTimeout((function(){e.emit("donethreepage")}),6e3)})).catch((function(){setTimeout((function(){e.emit("donethreepage")}),6e3)}))},toplay:function(){a.setChartInterval()},tostop:function(){clearInterval(a.intervalInt)},setChartInterval:function(){if("ver"==t.screenType){if(r.stopSign)return;a.intervalInt=setInterval((function(){var t=l(a.ds.state.laststart).add(1,"days"),n=l(a.ds.state.lastend).add(1,"days");a.ds.setState("laststart",t.format("YYYY-MM-DD")),a.ds.setState("lastend",n.format("YYYY-MM-DD"));var r=a.ds.views.ttime.rows;a.lastChart.changeData(r),11==r.length&&(clearInterval(a.intervalInt),e.emit("donethreepage"))}),800)}},cInitChart:function(e){if("hor"==t.screenType)var n=e[e.length-1]&&e[e.length-1].Date,r=8;else n=e[11]&&e[11].Date,r=12;var o=new Nw({state:{laststart:e[0]&&e[0].Date,lastend:n}}),s=o.createView("ttime",{});s.source(e).transform({type:"filter",callback:function(t){var e=t.Date;return e<=o.state.lastend&&e>=o.state.laststart}}),document.getElementsByTagName("body")[0].offsetWidth;var l=i.value&&new wp({container:"lastChartBox",autoFit:!0,padding:[20,20,36,20]});return l?(l.data(s.rows),l.tooltip(!1),l.scale("Date",{tickInterval:2,type:"timeCat",mask:"MM-DD"}),l.scale("value",{tickCount:5,type:"linear"}),l.axis("Date",{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.1)",lineDash:[3,3]}},label:{style:{fill:"#E0C29B",fontSize:12}},tickLine:null}),l.axis("value",{line:null,grid:{line:{style:{lineWidth:1,stroke:"rgba(224,194,155,0.2)",lineDash:[3,3]}}},tickline:null,label:null}),l.legend(!1),l.interval().position("Date*value").color("l(90) 0:#BFA17E 1:#E0D1BB").shape("borderRadius").adjust({type:"stack"}).size(r).label("value",{offset:12,style:{fill:"#E0C29B",fontSize:12}}),l.render(),a.ds=o,l):l}});return u((function(){console.log("energychart-mounted"),a.getLastDayEnergy()})),n(n({},c(a)),{},{lastChartBox:i})}}),Hw=function(t){return _("data-v-8ec787c8"),t=t(),x(),t}((function(){return g("div",{class:"subhead-title"},[g("span",null,"上月每日能耗(kWh)")],-1)})),Gw={id:"lastChartBox",class:"lastChartBox",ref:"lastChartBox"};e("l",d(zw,[["render",function(t,e,n,r,i,o){return m(),p("div",{class:S(["lastChart",["hor"===t.screenType?"horizontalClass":"verticalTemChart"]])},[Hw,g("div",Gw,null,512)],2)}],["__scopeId","data-v-8ec787c8"]])),e("_","/sgdaping/assets/background.4e64a7f0.png")}}}))}();