import{a6 as ye,n as _r,a7 as f8,b as X,R as Pt,a8 as VG,d as A,a9 as qr,aa as ue,g as nM,c as $d,ab as h8,r as Wr,ac as v8,s as wi,N as d8,ad as Df,v as p8}from"./index.ea99f164.js";function jG(e,r){return r.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(i){if(i!=="default"&&!(i in e)){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}})}),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Xx=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return Ia},get Circle(){return aut},get Ellipse(){return lut},get Image(){return uut},get Line(){return fut},get Marker(){return dut},get Path(){return JE},get Polygon(){return Cut},get Polyline(){return Aut},get Rect(){return Out},get Text(){return Put}},Symbol.toStringTag,{value:"Module"})),Ux=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return ea},get Circle(){return oct},get Dom(){return sct},get Ellipse(){return cct},get Image(){return hct},get Line(){return dct},get Marker(){return gct},get Path(){return mct},get Polygon(){return _ct},get Polyline(){return wct},get Rect(){return Act},get Text(){return Fct}},Symbol.toStringTag,{value:"Module"})),Ui=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)},eo=function(e,r){return Ui(e)?e.indexOf(r)>-1:!1},zr=function(e,r){if(!Ui(e))return e;for(var t=[],i=0;i-1;)y8.call(e,a,1);return e},_8=Array.prototype.splice,UG=function(r,t){if(!Ui(r))return[];for(var i=r?t.length:0,n=i-1;i--;){var a=void 0,o=t[i];(i===n||o!==a)&&(a=o,_8.call(r,o,1))}return r},Zr=function(e,r,t){if(!it(e)&&!wa(e))return e;var i=t;return P(e,function(n,a){i=r(i,n,a)}),i},qG=function(e,r){var t=[];if(!Ui(e))return t;for(var i=-1,n=[],a=e.length;++ia[l])return 1;if(n[l]t?t:e},d0=function(e,r){var t=r.toString(),i=t.indexOf(".");if(i===-1)return Math.round(e);var n=t.substr(i+1).length;return n>20&&(n=20),parseFloat(e.toFixed(n))},Mt=function(e){return Zn(e,"Number")},O8=function(e){return Mt(e)&&e%1!==0},F8=function(e){return Mt(e)&&e%2===0},P8=Number.isInteger?Number.isInteger:function(e){return Mt(e)&&e%1===0},I8=function(e){return Mt(e)&&e<0},L8=1e-5;function Nr(e,r,t){return t===void 0&&(t=L8),Math.abs(e-r)0},Zx=function(e,r){if(!!it(e)){for(var t,i=-1/0,n=0;ni&&(t=a,i=o)}return t}},uM=function(e,r){if(!!it(e)){for(var t,i=1/0,n=0;nr?(i&&(clearTimeout(i),i=null),l=c,o=e.apply(n,a),i||(n=a=null)):!i&&t.trailing!==!1&&(i=setTimeout(s,f)),o};return u.cancel=function(){clearTimeout(i),l=0,i=n=a=null},u},az=function(e){return Ui(e)?Array.prototype.slice.call(e):[]},My={},Fa=function(e){return e=e||"g",My[e]?My[e]+=1:My[e]=1,e+My[e]},Yo=function(){},r9=function(e){return e};function gr(e){return K(e)?0:Ui(e)?e.length:Object.keys(e).length}var Ey,zv=sc(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=r.fontWeight,a=r.fontStyle,o=r.fontVariant;return Ey||(Ey=document.createElement("canvas").getContext("2d")),Ey.font=[a,o,n,t+"px",i].join(" "),Ey.measureText(Ct(e)?e:"").width},function(e,r){return r===void 0&&(r={}),ye([e],_h(r)).join("")}),oz=function(e,r,t,i){i===void 0&&(i="...");var n=16,a=zv(i,t),o=Ct(e)?e:Es(e),l=r,s=[],u,c;if(zv(e,t)<=r)return e;for(;u=o.substr(0,n),c=zv(u,t),!(c+a>l&&c>l);)if(s.push(u),l-=c,o=o.substr(n),!o)return s.join("");for(;u=o.substr(0,1),c=zv(u,t),!(c+a>l);)if(s.push(u),l-=c,o=o.substr(1),!o)return s.join("");return""+s.join("")+i},lz=function(){function e(){this.map={}}return e.prototype.has=function(r){return this.map[r]!==void 0},e.prototype.get=function(r,t){var i=this.map[r];return i===void 0?t:i},e.prototype.set=function(r,t){this.map[r]=t},e.prototype.clear=function(){this.map={}},e.prototype.delete=function(r){delete this.map[r]},e.prototype.size=function(){return Object.keys(this.map).length},e}(),sz=Object.freeze(Object.defineProperty({__proto__:null,contains:eo,includes:eo,difference:HG,find:Yn,findIndex:oM,firstValue:YG,flatten:qi,flattenDeep:WG,getRange:lM,pull:x8,pullAt:UG,reduce:Zr,remove:qG,sortBy:ZG,union:b8,uniq:ss,valuesOfKey:Xn,head:Wi,last:nr,startsWith:w8,endsWith:C8,filter:zr,every:qx,some:pp,group:QG,groupBy:Xi,groupToMap:sM,getWrapBehavior:A8,wrapBehavior:T8,number2color:M8,parseRadius:E8,clamp:Ce,fixedBase:d0,isDecimal:O8,isEven:F8,isInteger:P8,isNegative:I8,isNumberEqual:Nr,isOdd:D8,isPositive:$8,max:vi,maxBy:Zx,min:Ei,minBy:uM,mod:Qx,toDegree:R8,toInteger:B8,toRadian:Kx,forIn:P,has:po,hasKey:po,hasValue:G8,keys:oc,isMatch:aM,values:_h,lowerCase:lc,lowerFirst:z8,substitute:cM,upperCase:V8,upperFirst:Os,getType:KG,isArguments:H8,isArray:it,isArrayLike:Ui,isBoolean:Hu,isDate:fM,isError:Y8,isFunction:pt,isFinite:W8,isNil:K,isNull:JG,isNumber:Mt,isObject:qt,isObjectLike:G0,isPlainObject:wa,isPrototype:tz,isRegExp:U8,isString:Ct,isType:Zn,isUndefined:Hl,isElement:Jx,requestAnimationFrame:ez,clearAnimationFrame:rz,augment:q8,clone:fi,debounce:t1,memoize:sc,deepMix:ft,each:P,extend:Q8,indexOf:hM,isEmpty:di,isEqual:Ge,isEqualWith:J8,map:je,mapValues:nz,mix:Qt,assign:Qt,get:I,set:jt,pick:e1,omit:r1,throttle:i1,toArray:az,toString:Es,uniqueId:Fa,noop:Yo,identity:r9,size:gr,measureTextWidth:zv,getEllipsisText:oz,Cache:lz},Symbol.toStringTag,{value:"Module"})),uz={},j=_r(f8);function fu(e,r,t){if(e){if(typeof e.addEventListener=="function")return e.addEventListener(r,t,!1),{remove:function(){e.removeEventListener(r,t,!1)}};if(typeof e.attachEvent=="function")return e.attachEvent("on"+r,t),{remove:function(){e.detachEvent("on"+r,t)}}}}var Vv,Dw,cz,sA;function i9(){Vv=document.createElement("table"),Dw=document.createElement("tr"),cz=/^\s*<(\w+|!)[^>]*>/,sA={tr:document.createElement("tbody"),tbody:Vv,thead:Vv,tfoot:Vv,td:Dw,th:Dw,"*":document.createElement("div")}}function qo(e){Vv||i9();var r=cz.test(e)&&RegExp.$1;(!r||!(r in sA))&&(r="*");var t=sA[r];e=typeof e=="string"?e.replace(/(^\s*)|(\s*$)/g,""):e,t.innerHTML=""+e;var i=t.childNodes[0];return i&&t.contains(i)&&t.removeChild(i),i}function Ci(e,r,t){var i;try{i=window.getComputedStyle?window.getComputedStyle(e,null)[r]:e.style[r]}catch{}finally{i=i===void 0?t:i}return i}function fz(e,r){var t=Ci(e,"height",r);return t==="auto"&&(t=e.offsetHeight),parseFloat(t)}function hz(e,r){var t=fz(e,r),i=parseFloat(Ci(e,"borderTopWidth"))||0,n=parseFloat(Ci(e,"paddingTop"))||0,a=parseFloat(Ci(e,"paddingBottom"))||0,o=parseFloat(Ci(e,"borderBottomWidth"))||0,l=parseFloat(Ci(e,"marginTop"))||0,s=parseFloat(Ci(e,"marginBottom"))||0;return t+i+o+n+a+l+s}function vz(e,r){var t=Ci(e,"width",r);return t==="auto"&&(t=e.offsetWidth),parseFloat(t)}function dz(e,r){var t=vz(e,r),i=parseFloat(Ci(e,"borderLeftWidth"))||0,n=parseFloat(Ci(e,"paddingLeft"))||0,a=parseFloat(Ci(e,"paddingRight"))||0,o=parseFloat(Ci(e,"borderRightWidth"))||0,l=parseFloat(Ci(e,"marginRight"))||0,s=parseFloat(Ci(e,"marginLeft"))||0;return t+i+o+n+a+s+l}function n9(){return window.devicePixelRatio?window.devicePixelRatio:2}function Xr(e,r){if(e)for(var t in r)r.hasOwnProperty(t)&&(e.style[t]=r[t]);return e}var a9=Object.freeze(Object.defineProperty({__proto__:null,addEventListener:fu,createDom:qo,getHeight:fz,getOuterHeight:hz,getOuterWidth:dz,getRatio:n9,getStyle:Ci,getWidth:vz,modifyCSS:Xr},Symbol.toStringTag,{value:"Module"})),vM=_r(a9),Y=_r(sz),dM={},te={};Object.defineProperty(te,"__esModule",{value:!0});te.getTextPoint=te.toPx=te.updateClip=te.getBBoxWithClip=te.mergeBBox=te.intersectBBox=te.near=te.wait=te.distance=te.getCirclePoint=te.getValueByPercent=te.createBBox=te.pointsToBBox=te.regionToBBox=te.hasClass=pz=te.clearDom=te.formatPadding=void 0;var Qc=Y;function o9(e){var r=0,t=0,i=0,n=0;return Qc.isNumber(e)?r=t=i=n=e:Qc.isArray(e)&&(r=e[0],i=Qc.isNil(e[1])?e[0]:e[1],n=Qc.isNil(e[2])?e[0]:e[2],t=Qc.isNil(e[3])?i:e[3]),[r,i,n,t]}te.formatPadding=o9;function l9(e){for(var r=e.childNodes,t=r.length,i=t-1;i>=0;i--)e.removeChild(r[i])}var pz=te.clearDom=l9;function s9(e,r){return!!e.className.match(new RegExp("(\\s|^)"+r+"(\\s|$)"))}te.hasClass=s9;function u9(e){var r=e.start,t=e.end,i=Math.min(r.x,t.x),n=Math.min(r.y,t.y),a=Math.max(r.x,t.x),o=Math.max(r.y,t.y);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}te.regionToBBox=u9;function c9(e){var r=e.map(function(l){return l.x}),t=e.map(function(l){return l.y}),i=Math.min.apply(Math,r),n=Math.min.apply(Math,t),a=Math.max.apply(Math,r),o=Math.max.apply(Math,t);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}te.pointsToBBox=c9;function n1(e,r,t,i){var n=e+t,a=r+i;return{x:e,y:r,width:t,height:i,minX:e,minY:r,maxX:isNaN(n)?0:n,maxY:isNaN(a)?0:a}}te.createBBox=n1;function uA(e,r,t){return(1-t)*e+r*t}te.getValueByPercent=uA;function f9(e,r,t){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}te.getCirclePoint=f9;function gz(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}te.distance=gz;te.wait=function(e){return new Promise(function(r){setTimeout(r,e)})};te.near=function(e,r,t){return t===void 0&&(t=Math.pow(Number.EPSILON,.5)),[e,r].includes(1/0)?Math.abs(e)===Math.abs(r):Math.abs(e-r)0?Qc.each(s,function(u){if(u.get("visible")){if(u.isGroup()&&u.get("children").length===0)return!0;var c=mz(u),f=u.applyToMatrix([c.minX,c.minY,1]),h=u.applyToMatrix([c.minX,c.maxY,1]),v=u.applyToMatrix([c.maxX,c.minY,1]),d=u.applyToMatrix([c.maxX,c.maxY,1]),p=Math.min(f[0],h[0],v[0],d[0]),x=Math.max(f[0],h[0],v[0],d[0]),m=Math.min(f[1],h[1],v[1],d[1]),_=Math.max(f[1],h[1],v[1],d[1]);pa&&(a=x),ml&&(l=_)}}):(n=0,a=0,o=0,l=0),i=n1(n,o,a-n,l-o)}return t?yz(i,t):i}te.getBBoxWithClip=mz;function v9(e,r){if(!(!e.getClip()&&!r.getClip())){var t=r.getClip();if(!t){e.setClip(null);return}var i={type:t.get("type"),attrs:t.attr()};e.setClip(i)}}te.updateClip=v9;function d9(e){return e+"px"}te.toPx=d9;function p9(e,r,t,i){var n=gz(e,r),a=i/n,o=0;return t==="start"?o=0-a:t==="end"&&(o=1+a),{x:uA(e.x,r.x,o),y:uA(e.y,r.y,o)}}te.getTextPoint=p9;var pM={},cd=` \v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,g9=new RegExp("([a-z])["+cd+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+cd+"]*,?["+cd+"]*)+)","ig"),y9=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+cd+"]*,?["+cd+"]*","ig"),hf=function(e){if(!e)return null;if(it(e))return e;var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(e).replace(g9,function(i,n,a){var o=[],l=n.toLowerCase();if(a.replace(y9,function(s,u){u&&o.push(+u)}),l==="m"&&o.length>2&&(t.push([n].concat(o.splice(0,2))),l="l",n=n==="m"?"l":"L"),l==="o"&&o.length===1&&t.push([n,o[0]]),l==="r")t.push([n].concat(o));else for(;o.length>=r[l]&&(t.push([n].concat(o.splice(0,r[l]))),!!r[l]););return e}),t},cA=function(e,r){for(var t=[],i=0,n=e.length;n-2*!r>i;i+=2){var a=[{x:+e[i-2],y:+e[i-1]},{x:+e[i],y:+e[i+1]},{x:+e[i+2],y:+e[i+3]},{x:+e[i+4],y:+e[i+5]}];r?i?n-4===i?a[3]={x:+e[0],y:+e[1]}:n-2===i&&(a[2]={x:+e[0],y:+e[1]},a[3]={x:+e[2],y:+e[3]}):a[0]={x:+e[n-2],y:+e[n-1]}:n-4===i?a[3]=a[2]:i||(a[0]={x:+e[i],y:+e[i+1]}),t.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return t},Oy=function(e,r,t,i,n){var a=[];if(n===null&&i===null&&(i=t),e=+e,r=+r,t=+t,i=+i,n!==null){var o=Math.PI/180,l=e+t*Math.cos(-i*o),s=e+t*Math.cos(-n*o),u=r+t*Math.sin(-i*o),c=r+t*Math.sin(-n*o);a=[["M",l,u],["A",t,t,0,+(n-i>180),0,s,c]]}else a=[["M",e,r],["m",0,-i],["a",t,i,0,1,1,0,2*i],["a",t,i,0,1,1,0,-2*i],["z"]];return a},fA=function(e){if(e=hf(e),!e||!e.length)return[["M",0,0]];var r=[],t=0,i=0,n=0,a=0,o=0,l,s;e[0][0]==="M"&&(t=+e[0][1],i=+e[0][2],n=t,a=i,o++,r[0]=["M",t,i]);for(var u=e.length===3&&e[0][0]==="M"&&e[1][0].toUpperCase()==="R"&&e[2][0].toUpperCase()==="Z",c=void 0,f=void 0,h=o,v=e.length;h1&&(S=Math.sqrt(S),t=S*t,i=S*i);var M=t*t,O=i*i,F=(a===o?-1:1)*Math.sqrt(Math.abs((M*O-M*w*w-O*b*b)/(M*w*w+O*b*b)));x=F*t*w/i+(e+l)/2,m=F*-i*b/t+(r+s)/2,d=Math.asin(((r-m)/i).toFixed(9)),p=Math.asin(((s-m)/i).toFixed(9)),d=ep&&(d=d-Math.PI*2),!o&&p>d&&(p=p-Math.PI*2)}var L=p-d;if(Math.abs(L)>c){var D=p,R=l,H=s;p=d+c*(o&&p>d?1:-1),l=x+t*Math.cos(p),s=m+i*Math.sin(p),h=xz(l,s,t,i,n,0,o,R,H,[p,D,x,m])}L=p-d;var k=Math.cos(d),V=Math.sin(d),U=Math.cos(p),B=Math.sin(p),G=Math.tan(L/4),N=4/3*t*G,W=4/3*i*G,q=[e,r],tt=[e+N*V,r-W*k],ot=[l+N*B,s-W*U],st=[l,s];if(tt[0]=2*q[0]-tt[0],tt[1]=2*q[1]-tt[1],u)return[tt,ot,st].concat(h);h=[tt,ot,st].concat(h).join().split(",");for(var Z=[],et=0,lt=h.length;et7){b[w].shift();for(var S=b[w];S.length;)o[w]="A",i&&(l[w]="A"),b.splice(w++,0,["C"].concat(S.splice(0,6)));b.splice(w,1),c=Math.max(t.length,i&&i.length||0)}},v=function(b,w,S,M,O){b&&w&&b[O][0]==="M"&&w[O][0]!=="M"&&(w.splice(O,0,["M",M.x,M.y]),S.bx=0,S.by=0,S.x=b[O][1],S.y=b[O][2],c=Math.max(t.length,i&&i.length||0))};c=Math.max(t.length,i&&i.length||0);for(var d=0;d1?1:s<0?0:s;for(var u=s/2,c=12,f=[-.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],v=0,d=0;d0&&v<1&&s.push(v);continue}var p=f*f-4*h*c,x=Math.sqrt(p);if(!(p<0)){var m=(-f+x)/(2*c);m>0&&m<1&&s.push(m);var _=(-f-x)/(2*c);_>0&&_<1&&s.push(_)}}for(var b=s.length,w=b,S;b--;)v=s[b],S=1-v,u[0][b]=S*S*S*e+3*S*S*v*t+3*S*v*v*n+v*v*v*o,u[1][b]=S*S*S*r+3*S*S*v*i+3*S*v*v*a+v*v*v*l;return u[0][w]=e,u[1][w]=r,u[0][w+1]=o,u[1][w+1]=l,u[0].length=u[1].length=w+2,{min:{x:Math.min.apply(0,u[0]),y:Math.min.apply(0,u[1])},max:{x:Math.max.apply(0,u[0]),y:Math.max.apply(0,u[1])}}},_9=function(e,r,t,i,n,a,o,l){if(!(Math.max(e,t)Math.max(n,o)||Math.max(r,i)Math.max(a,l))){var s=(e*i-r*t)*(n-o)-(e-t)*(n*l-a*o),u=(e*i-r*t)*(a-l)-(r-i)*(n*l-a*o),c=(e-t)*(a-l)-(r-i)*(n-o);if(!!c){var f=s/c,h=u/c,v=+f.toFixed(2),d=+h.toFixed(2);if(!(v<+Math.min(e,t).toFixed(2)||v>+Math.max(e,t).toFixed(2)||v<+Math.min(n,o).toFixed(2)||v>+Math.max(n,o).toFixed(2)||d<+Math.min(r,i).toFixed(2)||d>+Math.max(r,i).toFixed(2)||d<+Math.min(a,l).toFixed(2)||d>+Math.max(a,l).toFixed(2)))return{x:f,y:h}}}},wl=function(e,r,t){return r>=e.x&&r<=e.x+e.width&&t>=e.y&&t<=e.y+e.height},bz=function(e,r,t,i,n){if(n)return[["M",+e+ +n,r],["l",t-n*2,0],["a",n,n,0,0,1,n,n],["l",0,i-n*2],["a",n,n,0,0,1,-n,n],["l",n*2-t,0],["a",n,n,0,0,1,-n,-n],["l",0,n*2-i],["a",n,n,0,0,1,n,-n],["z"]];var a=[["M",e,r],["l",t,0],["l",0,i],["l",-t,0],["z"]];return a.parsePathArray=_z,a},vA=function(e,r,t,i){return e===null&&(e=r=t=i=0),r===null&&(r=e.y,t=e.width,i=e.height,e=e.x),{x:e,y:r,width:t,w:t,height:i,h:i,x2:e+t,y2:r+i,cx:e+t/2,cy:r+i/2,r1:Math.min(t,i)/2,r2:Math.max(t,i)/2,r0:Math.sqrt(t*t+i*i)/2,path:bz(e,r,t,i),vb:[e,r,t,i].join(" ")}},b9=function(e,r){return e=vA(e),r=vA(r),wl(r,e.x,e.y)||wl(r,e.x2,e.y)||wl(r,e.x,e.y2)||wl(r,e.x2,e.y2)||wl(e,r.x,r.y)||wl(e,r.x2,r.y)||wl(e,r.x,r.y2)||wl(e,r.x2,r.y2)||(e.xr.x||r.xe.x)&&(e.yr.y||r.ye.y)},$2=function(e,r,t,i,n,a,o,l){it(e)||(e=[e,r,t,i,n,a,o,l]);var s=x9.apply(null,e);return vA(s.min.x,s.min.y,s.max.x-s.min.x,s.max.y-s.min.y)},k2=function(e,r,t,i,n,a,o,l,s){var u=1-s,c=Math.pow(u,3),f=Math.pow(u,2),h=s*s,v=h*s,d=c*e+f*3*s*t+u*3*s*s*n+v*o,p=c*r+f*3*s*i+u*3*s*s*a+v*l,x=e+2*s*(t-e)+h*(n-2*t+e),m=r+2*s*(i-r)+h*(a-2*i+r),_=t+2*s*(n-t)+h*(o-2*n+t),b=i+2*s*(a-i)+h*(l-2*a+i),w=u*e+s*t,S=u*r+s*i,M=u*n+s*o,O=u*a+s*l,F=90-Math.atan2(x-_,m-b)*180/Math.PI;return{x:d,y:p,m:{x,y:m},n:{x:_,y:b},start:{x:w,y:S},end:{x:M,y:O},alpha:F}},w9=function(e,r,t){var i=$2(e),n=$2(r);if(!b9(i,n))return t?0:[];for(var a=D2.apply(0,e),o=D2.apply(0,r),l=~~(a/8),s=~~(o/8),u=[],c=[],f={},h=t?0:[],v=0;v=0&&O<=1&&F>=0&&F<=1&&(t?h+=1:h.push({x:M.x,y:M.y,t1:O,t2:F}))}}return h},C9=function(e,r,t){e=hA(e),r=hA(r);for(var i,n,a,o,l,s,u,c,f,h,v=t?0:[],d=0,p=e.length;d=3&&(f.length===3&&h.push("Q"),h=h.concat(f[1])),f.length===2&&h.push("L"),h=h.concat(f[f.length-1]),h});return c}var M9=function(e,r,t){if(t===1)return[[].concat(e)];var i=[];if(r[0]==="L"||r[0]==="C"||r[0]==="Q")i=i.concat(T9(e,r,t));else{var n=[].concat(e);n[0]==="M"&&(n[0]="L");for(var a=0;a<=t-1;a++)i.push(n)}return i},E9=function(e,r){if(e.length===1)return e;var t=e.length-1,i=r.length-1,n=t/i,a=[];if(e.length===1&&e[0][0]==="M"){for(var o=0;o=0;s--)o=a[s].index,a[s].type==="add"?e.splice(o,0,[].concat(e[o])):e.splice(o,1)}i=e.length;var f=n-i;if(i0)t=$w(t,e[i-1],1);else{e[i]=r[i];break}e[i]=["Q"].concat(t.reduce(function(n,a){return n.concat(a)},[]));break;case"T":e[i]=["T"].concat(t[0]);break;case"C":if(t.length<3)if(i>0)t=$w(t,e[i-1],2);else{e[i]=r[i];break}e[i]=["C"].concat(t.reduce(function(n,a){return n.concat(a)},[]));break;case"S":if(t.length<2)if(i>0)t=$w(t,e[i-1],1);else{e[i]=r[i];break}e[i]=["S"].concat(t.reduce(function(n,a){return n.concat(a)},[]));break;default:e[i]=r[i]}return e},a1=Object.freeze(Object.defineProperty({__proto__:null,catmullRomToBezier:cA,fillPath:E9,fillPathByDiff:wz,formatPath:dA,intersection:S9,parsePathArray:_z,parsePathString:hf,pathToAbsolute:fA,pathToCurve:hA,rectPath:bz},Symbol.toStringTag,{value:"Module"})),bh=function(){function e(r,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=r,this.name=r,this.originalEvent=t,this.timeStamp=t.timeStamp}return e.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.toString=function(){var r=this.type;return"[Event (type="+r+")]"},e.prototype.save=function(){},e.prototype.restore=function(){},e}(),I9="*",gp=function(){function e(){this._events={}}return e.prototype.on=function(r,t,i){return this._events[r]||(this._events[r]=[]),this._events[r].push({callback:t,once:!!i}),this},e.prototype.once=function(r,t){return this.on(r,t,!0)},e.prototype.emit=function(r){for(var t=this,i=[],n=1;n0&&(a=1/Math.sqrt(a)),e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e}function Xz(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]}function E7(e,r,t){var i=r[0],n=r[1],a=r[2],o=t[0],l=t[1],s=t[2];return e[0]=n*s-a*l,e[1]=a*o-i*s,e[2]=i*l-n*o,e}function O7(e,r,t,i){var n=r[0],a=r[1],o=r[2];return e[0]=n+i*(t[0]-n),e[1]=a+i*(t[1]-a),e[2]=o+i*(t[2]-o),e}function F7(e,r,t,i,n,a){var o=a*a,l=o*(2*a-3)+1,s=o*(a-2)+a,u=o*(a-1),c=o*(3-2*a);return e[0]=r[0]*l+t[0]*s+i[0]*u+n[0]*c,e[1]=r[1]*l+t[1]*s+i[1]*u+n[1]*c,e[2]=r[2]*l+t[2]*s+i[2]*u+n[2]*c,e}function P7(e,r,t,i,n,a){var o=1-a,l=o*o,s=a*a,u=l*o,c=3*a*l,f=3*s*o,h=s*a;return e[0]=r[0]*u+t[0]*c+i[0]*f+n[0]*h,e[1]=r[1]*u+t[1]*c+i[1]*f+n[1]*h,e[2]=r[2]*u+t[2]*c+i[2]*f+n[2]*h,e}function I7(e,r){r=r||1;var t=gA()*2*Math.PI,i=gA()*2-1,n=Math.sqrt(1-i*i)*r;return e[0]=Math.cos(t)*n,e[1]=Math.sin(t)*n,e[2]=i*r,e}function L7(e,r,t){var i=r[0],n=r[1],a=r[2],o=t[3]*i+t[7]*n+t[11]*a+t[15];return o=o||1,e[0]=(t[0]*i+t[4]*n+t[8]*a+t[12])/o,e[1]=(t[1]*i+t[5]*n+t[9]*a+t[13])/o,e[2]=(t[2]*i+t[6]*n+t[10]*a+t[14])/o,e}function kf(e,r,t){var i=r[0],n=r[1],a=r[2];return e[0]=i*t[0]+n*t[3]+a*t[6],e[1]=i*t[1]+n*t[4]+a*t[7],e[2]=i*t[2]+n*t[5]+a*t[8],e}function D7(e,r,t){var i=t[0],n=t[1],a=t[2],o=t[3],l=r[0],s=r[1],u=r[2],c=n*u-a*s,f=a*l-i*u,h=i*s-n*l,v=n*h-a*f,d=a*c-i*h,p=i*f-n*c,x=o*2;return c*=x,f*=x,h*=x,v*=2,d*=2,p*=2,e[0]=l+c+v,e[1]=s+f+d,e[2]=u+h+p,e}function $7(e,r,t,i){var n=[],a=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+t[0],e[1]=a[1]+t[1],e[2]=a[2]+t[2],e}function k7(e,r,t,i){var n=[],a=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+t[0],e[1]=a[1]+t[1],e[2]=a[2]+t[2],e}function R7(e,r,t,i){var n=[],a=[];return n[0]=r[0]-t[0],n[1]=r[1]-t[1],n[2]=r[2]-t[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+t[0],e[1]=a[1]+t[1],e[2]=a[2]+t[2],e}function B7(e,r){var t=e[0],i=e[1],n=e[2],a=r[0],o=r[1],l=r[2],s=Math.sqrt(t*t+i*i+n*n),u=Math.sqrt(a*a+o*o+l*l),c=s*u,f=c&&Xz(e,r)/c;return Math.acos(Math.min(Math.max(f,-1),1))}function N7(e){return e[0]=0,e[1]=0,e[2]=0,e}function G7(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function z7(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]}function V7(e,r){var t=e[0],i=e[1],n=e[2],a=r[0],o=r[1],l=r[2];return Math.abs(t-a)<=Bi*Math.max(1,Math.abs(t),Math.abs(a))&&Math.abs(i-o)<=Bi*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-l)<=Bi*Math.max(1,Math.abs(n),Math.abs(l))}var j7=zz,H7=Vz,Y7=jz,W7=Hz,X7=Yz,U7=Gz,q7=Wz,Z7=function(){var e=Nz();return function(r,t,i,n,a,o){var l,s;for(t||(t=3),i||(i=0),n?s=Math.min(n*t+i,r.length):s=r.length,l=i;l0&&(n=1/Math.sqrt(n)),e[0]=r[0]*n,e[1]=r[1]*n,e}function xM(e,r){return e[0]*r[0]+e[1]*r[1]}function lq(e,r,t){var i=r[0]*t[1]-r[1]*t[0];return e[0]=e[1]=0,e[2]=i,e}function sq(e,r,t,i){var n=r[0],a=r[1];return e[0]=n+i*(t[0]-n),e[1]=a+i*(t[1]-a),e}function uq(e,r){r=r||1;var t=gA()*2*Math.PI;return e[0]=Math.cos(t)*r,e[1]=Math.sin(t)*r,e}function cq(e,r,t){var i=r[0],n=r[1];return e[0]=t[0]*i+t[2]*n,e[1]=t[1]*i+t[3]*n,e}function fq(e,r,t){var i=r[0],n=r[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function tV(e,r,t){var i=r[0],n=r[1];return e[0]=t[0]*i+t[3]*n+t[6],e[1]=t[1]*i+t[4]*n+t[7],e}function hq(e,r,t){var i=r[0],n=r[1];return e[0]=t[0]*i+t[4]*n+t[12],e[1]=t[1]*i+t[5]*n+t[13],e}function vq(e,r,t,i){var n=r[0]-t[0],a=r[1]-t[1],o=Math.sin(i),l=Math.cos(i);return e[0]=n*l-a*o+t[0],e[1]=n*o+a*l+t[1],e}function z0(e,r){var t=e[0],i=e[1],n=r[0],a=r[1],o=Math.sqrt(t*t+i*i)*Math.sqrt(n*n+a*a),l=o&&(t*n+i*a)/o;return Math.acos(Math.min(Math.max(l,-1),1))}function dq(e){return e[0]=0,e[1]=0,e}function pq(e){return"vec2("+e[0]+", "+e[1]+")"}function eV(e,r){return e[0]===r[0]&&e[1]===r[1]}function gq(e,r){var t=e[0],i=e[1],n=r[0],a=r[1];return Math.abs(t-n)<=Bi*Math.max(1,Math.abs(t),Math.abs(n))&&Math.abs(i-a)<=Bi*Math.max(1,Math.abs(i),Math.abs(a))}var yq=Yl,Ql=yM,mq=Zz,xq=Qz,_q=us,bq=Kz,wq=Jz,Cq=function(){var e=qz();return function(r,t,i,n,a,o){var l,s;for(t||(t=2),i||(i=0),n?s=Math.min(n*t+i,r.length):s=r.length,l=i;l=0;return t?n?Math.PI*2-i:i:n?i:Math.PI*2-i}function Tq(e,r,t){return t?(e[0]=r[1],e[1]=-1*r[0]):(e[0]=-1*r[1],e[1]=r[0]),e}var Mq=Object.freeze(Object.defineProperty({__proto__:null,leftTranslate:mu,leftRotate:o1,leftScale:_M,transform:rr,direction:rV,angleTo:l1,vertical:Tq},Symbol.toStringTag,{value:"Module"})),Eq=Object.freeze(Object.defineProperty({__proto__:null,mat3:h7,vec2:Sq,vec3:Uz,ext:Mq},Symbol.toStringTag,{value:"Module"}));function z2(e,r){var t=[],i=e[0],n=e[1],a=e[2],o=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],h=r[0],v=r[1],d=r[2],p=r[3],x=r[4],m=r[5],_=r[6],b=r[7],w=r[8];return t[0]=h*i+v*o+d*u,t[1]=h*n+v*l+d*c,t[2]=h*a+v*s+d*f,t[3]=p*i+x*o+m*u,t[4]=p*n+x*l+m*c,t[5]=p*a+x*s+m*f,t[6]=_*i+b*o+w*u,t[7]=_*n+b*l+w*c,t[8]=_*a+b*s+w*f,t}function ro(e,r){var t=[],i=r[0],n=r[1];return t[0]=e[0]*i+e[3]*n+e[6],t[1]=e[1]*i+e[4]*n+e[7],t}function mp(e){var r=[],t=e[0],i=e[1],n=e[2],a=e[3],o=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=c*o-l*u,h=-c*a+l*s,v=u*a-o*s,d=t*f+i*h+n*v;return d?(d=1/d,r[0]=f*d,r[1]=(-c*i+n*u)*d,r[2]=(l*i-n*o)*d,r[3]=h*d,r[4]=(c*t-n*s)*d,r[5]=(-l*t+n*a)*d,r[6]=v*d,r[7]=(-u*t+i*s)*d,r[8]=(o*t-i*a)*d,r):null}var cv=rr,kw="matrix",Oq=["zIndex","capture","visible","type"],Fq=["repeat"],Pq=":",Iq="*";function Lq(e){for(var r=[],t=0;to.delay&&P(r.toAttrs,function(l,s){a.call(o.toAttrs,s)&&(delete o.toAttrs[s],delete o.fromAttrs[s])})}),e}var iV=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.attrs={};var n=i.getDefaultAttrs();return Qt(n,t.attrs),i.attrs=n,i.initAttrs(n),i.initAnimate(),i}return r.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},r.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},r.prototype.onCanvasChange=function(t){},r.prototype.initAttrs=function(t){},r.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},r.prototype.isGroup=function(){return!1},r.prototype.getParent=function(){return this.get("parent")},r.prototype.getCanvas=function(){return this.get("canvas")},r.prototype.attr=function(){for(var t,i=[],n=0;n0?a=kq(a,w):n.addAnimator(this),a.push(w),this.set("animations",a),this.set("_pause",{isPaused:!1})}},r.prototype.stopAnimate=function(t){var i=this;t===void 0&&(t=!0);var n=this.get("animations");P(n,function(a){t&&(a.onFrame?i.attr(a.onFrame(1)):i.attr(a.toAttrs)),a.callback&&a.callback()}),this.set("animating",!1),this.set("animations",[])},r.prototype.pauseAnimate=function(){var t=this.get("timeline"),i=this.get("animations"),n=t.getTime();return P(i,function(a){a._paused=!0,a._pauseTime=n,a.pauseCallback&&a.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:n}),this},r.prototype.resumeAnimate=function(){var t=this.get("timeline"),i=t.getTime(),n=this.get("animations"),a=this.get("_pause").pauseTime;return P(n,function(o){o.startTime=o.startTime+(i-a),o._paused=!1,o._pauseTime=null,o.resumeCallback&&o.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",n),this},r.prototype.emitDelegation=function(t,i){var n=this,a=i.propagationPath;this.getEvents();var o;t==="mouseenter"?o=i.fromShape:t==="mouseleave"&&(o=i.toShape);for(var l=function(f){var h=a[f],v=h.get("name");if(v){if((h.isGroup()||h.isCanvas&&h.isCanvas())&&o&&Az(h,o))return"break";it(v)?P(v,function(d){n.emitDelegateEvent(h,d,i)}):s.emitDelegateEvent(h,v,i)}},s=this,u=0;u0)});o.length>0?P(o,function(s){var u=s.getBBox(),c=u.minX,f=u.maxX,h=u.minY,v=u.maxY;ci&&(i=f),ha&&(a=v)}):(t=0,i=0,n=0,a=0);var l={x:t,y:n,minX:t,minY:n,maxX:i,maxY:a,width:i-t,height:a-n};return l},r.prototype.getCanvasBBox=function(){var t=1/0,i=-1/0,n=1/0,a=-1/0,o=this.getChildren().filter(function(s){return s.get("visible")&&(!s.isGroup()||s.isGroup()&&s.getChildren().length>0)});o.length>0?P(o,function(s){var u=s.getCanvasBBox(),c=u.minX,f=u.maxX,h=u.minY,v=u.maxY;ci&&(i=f),ha&&(a=v)}):(t=0,i=0,n=0,a=0);var l={x:t,y:n,minX:t,minY:n,maxX:i,maxY:a,width:i-t,height:a-n};return l},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.children=[],t},r.prototype.onAttrChange=function(t,i,n){if(e.prototype.onAttrChange.call(this,t,i,n),t==="matrix"){var a=this.getTotalMatrix();this._applyChildrenMarix(a)}},r.prototype.applyMatrix=function(t){var i=this.getTotalMatrix();e.prototype.applyMatrix.call(this,t);var n=this.getTotalMatrix();n!==i&&this._applyChildrenMarix(n)},r.prototype._applyChildrenMarix=function(t){var i=this.getChildren();P(i,function(n){n.applyMatrix(t)})},r.prototype.addShape=function(){for(var t=[],i=0;i=0;l--){var s=t[l];if($f(s)&&(s.isGroup()?o=s.getShape(i,n,a):s.isHit(i,n)&&(o=s)),o)break}return o},r.prototype.add=function(t){var i=this.getCanvas(),n=this.getChildren(),a=this.get("timeline"),o=t.getParent();o&&Rq(o,t,!1),t.set("parent",this),i&&nV(t,i),a&&aV(t,a),n.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},r.prototype._applyElementMatrix=function(t){var i=this.getTotalMatrix();i&&t.applyMatrix(i)},r.prototype.getChildren=function(){return this.get("children")},r.prototype.sort=function(){var t=this.getChildren();P(t,function(i,n){return i[yA]=n,i}),t.sort(Bq(function(i,n){return i.get("zIndex")-n.get("zIndex")})),this.onCanvasChange("sort")},r.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),i=t.length-1;i>=0;i--)t[i].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},r.prototype.destroy=function(){this.get("destroyed")||(this.clear(),e.prototype.destroy.call(this))},r.prototype.getFirst=function(){return this.getChildByIndex(0)},r.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},r.prototype.getChildByIndex=function(t){var i=this.getChildren();return i[t]},r.prototype.getCount=function(){var t=this.getChildren();return t.length},r.prototype.contain=function(t){var i=this.getChildren();return i.indexOf(t)>-1},r.prototype.removeChild=function(t,i){i===void 0&&(i=!0),this.contain(t)&&t.remove(i)},r.prototype.findAll=function(t){var i=[],n=this.getChildren();return P(n,function(a){t(a)&&i.push(a),a.isGroup()&&(i=i.concat(a.findAll(t)))}),i},r.prototype.find=function(t){var i=null,n=this.getChildren();return P(n,function(a){if(t(a)?i=a:a.isGroup()&&(i=a.find(t)),i)return!1}),i},r.prototype.findById=function(t){return this.find(function(i){return i.get("id")===t})},r.prototype.findByClassName=function(t){return this.find(function(i){return i.get("className")===t})},r.prototype.findAllByName=function(t){return this.findAll(function(i){return i.get("name")===t})},r}(iV),Rf=0,jv=0,fv=0,lV=1e3,V0,Hv,j0=0,Yu=0,s1=0,kd=typeof performance=="object"&&performance.now?performance:Date,sV=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function uV(){return Yu||(sV(Nq),Yu=kd.now()+s1)}function Nq(){Yu=0}function mA(){this._call=this._time=this._next=null}mA.prototype=cV.prototype={constructor:mA,restart:function(e,r,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?uV():+t)+(r==null?0:+r),!this._next&&Hv!==this&&(Hv?Hv._next=this:V0=this,Hv=this),this._call=e,this._time=t,xA()},stop:function(){this._call&&(this._call=null,this._time=1/0,xA())}};function cV(e,r,t){var i=new mA;return i.restart(e,r,t),i}function Gq(){uV(),++Rf;for(var e=V0,r;e;)(r=Yu-e._time)>=0&&e._call.call(null,r),e=e._next;--Rf}function j2(){Yu=(j0=kd.now())+s1,Rf=jv=0;try{Gq()}finally{Rf=0,Vq(),Yu=0}}function zq(){var e=kd.now(),r=e-j0;r>lV&&(s1-=r,j0=e)}function Vq(){for(var e,r=V0,t,i=1/0;r;)r._call?(i>r._time&&(i=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:V0=t);Hv=e,xA(i)}function xA(e){if(!Rf){jv&&(jv=clearTimeout(jv));var r=e-Yu;r>24?(e<1/0&&(jv=setTimeout(j2,e-kd.now()-s1)),fv&&(fv=clearInterval(fv))):(fv||(j0=kd.now(),fv=setInterval(zq,lV)),Rf=1,sV(j2))}}function bM(e,r,t){e.prototype=r.prototype=t,t.constructor=e}function fV(e,r){var t=Object.create(e.prototype);for(var i in r)t[i]=r[i];return t}function xp(){}var Rd=.7,H0=1/Rd,wf="\\s*([+-]?\\d+)\\s*",Bd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",so="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jq=/^#([0-9a-f]{3,8})$/,Hq=new RegExp(`^rgb\\(${wf},${wf},${wf}\\)$`),Yq=new RegExp(`^rgb\\(${so},${so},${so}\\)$`),Wq=new RegExp(`^rgba\\(${wf},${wf},${wf},${Bd}\\)$`),Xq=new RegExp(`^rgba\\(${so},${so},${so},${Bd}\\)$`),Uq=new RegExp(`^hsl\\(${Bd},${so},${so}\\)$`),qq=new RegExp(`^hsla\\(${Bd},${so},${so},${Bd}\\)$`),H2={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};bM(xp,Wu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Y2,formatHex:Y2,formatHex8:Zq,formatHsl:Qq,formatRgb:W2,toString:W2});function Y2(){return this.rgb().formatHex()}function Zq(){return this.rgb().formatHex8()}function Qq(){return hV(this).formatHsl()}function W2(){return this.rgb().formatRgb()}function Wu(e){var r,t;return e=(e+"").trim().toLowerCase(),(r=jq.exec(e))?(t=r[1].length,r=parseInt(r[1],16),t===6?X2(r):t===3?new Yi(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):t===8?Py(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):t===4?Py(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=Hq.exec(e))?new Yi(r[1],r[2],r[3],1):(r=Yq.exec(e))?new Yi(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=Wq.exec(e))?Py(r[1],r[2],r[3],r[4]):(r=Xq.exec(e))?Py(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=Uq.exec(e))?Z2(r[1],r[2]/100,r[3]/100,1):(r=qq.exec(e))?Z2(r[1],r[2]/100,r[3]/100,r[4]):H2.hasOwnProperty(e)?X2(H2[e]):e==="transparent"?new Yi(NaN,NaN,NaN,0):null}function X2(e){return new Yi(e>>16&255,e>>8&255,e&255,1)}function Py(e,r,t,i){return i<=0&&(e=r=t=NaN),new Yi(e,r,t,i)}function Kq(e){return e instanceof xp||(e=Wu(e)),e?(e=e.rgb(),new Yi(e.r,e.g,e.b,e.opacity)):new Yi}function Xu(e,r,t,i){return arguments.length===1?Kq(e):new Yi(e,r,t,i==null?1:i)}function Yi(e,r,t,i){this.r=+e,this.g=+r,this.b=+t,this.opacity=+i}bM(Yi,Xu,fV(xp,{brighter(e){return e=e==null?H0:Math.pow(H0,e),new Yi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new Yi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yi(Du(this.r),Du(this.g),Du(this.b),Y0(this.opacity))},displayable(){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:U2,formatHex:U2,formatHex8:Jq,formatRgb:q2,toString:q2}));function U2(){return`#${Su(this.r)}${Su(this.g)}${Su(this.b)}`}function Jq(){return`#${Su(this.r)}${Su(this.g)}${Su(this.b)}${Su((isNaN(this.opacity)?1:this.opacity)*255)}`}function q2(){const e=Y0(this.opacity);return`${e===1?"rgb(":"rgba("}${Du(this.r)}, ${Du(this.g)}, ${Du(this.b)}${e===1?")":`, ${e})`}`}function Y0(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Du(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Su(e){return e=Du(e),(e<16?"0":"")+e.toString(16)}function Z2(e,r,t,i){return i<=0?e=r=t=NaN:t<=0||t>=1?e=r=NaN:r<=0&&(e=NaN),new ga(e,r,t,i)}function hV(e){if(e instanceof ga)return new ga(e.h,e.s,e.l,e.opacity);if(e instanceof xp||(e=Wu(e)),!e)return new ga;if(e instanceof ga)return e;e=e.rgb();var r=e.r/255,t=e.g/255,i=e.b/255,n=Math.min(r,t,i),a=Math.max(r,t,i),o=NaN,l=a-n,s=(a+n)/2;return l?(r===a?o=(t-i)/l+(t0&&s<1?0:o,new ga(o,l,s,e.opacity)}function tZ(e,r,t,i){return arguments.length===1?hV(e):new ga(e,r,t,i==null?1:i)}function ga(e,r,t,i){this.h=+e,this.s=+r,this.l=+t,this.opacity=+i}bM(ga,tZ,fV(xp,{brighter(e){return e=e==null?H0:Math.pow(H0,e),new ga(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new ga(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*r,n=2*t-i;return new Yi(Rw(e>=240?e-240:e+120,n,i),Rw(e,n,i),Rw(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ga(Q2(this.h),Iy(this.s),Iy(this.l),Y0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Y0(this.opacity);return`${e===1?"hsl(":"hsla("}${Q2(this.h)}, ${Iy(this.s)*100}%, ${Iy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Q2(e){return e=(e||0)%360,e<0?e+360:e}function Iy(e){return Math.max(0,Math.min(1,e||0))}function Rw(e,r,t){return(e<60?r+(t-r)*e/60:e<180?t:e<240?r+(t-r)*(240-e)/60:r)*255}var wM=e=>()=>e;function eZ(e,r){return function(t){return e+t*r}}function rZ(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(i){return Math.pow(e+i*r,t)}}function iZ(e){return(e=+e)==1?vV:function(r,t){return t-r?rZ(r,t,e):wM(isNaN(r)?t:r)}}function vV(e,r){var t=r-e;return t?eZ(e,t):wM(isNaN(e)?r:e)}var K2=function e(r){var t=iZ(r);function i(n,a){var o=t((n=Xu(n)).r,(a=Xu(a)).r),l=t(n.g,a.g),s=t(n.b,a.b),u=vV(n.opacity,a.opacity);return function(c){return n.r=o(c),n.g=l(c),n.b=s(c),n.opacity=u(c),n+""}}return i.gamma=e,i}(1);function dV(e,r){r||(r=[]);var t=e?Math.min(r.length,e.length):0,i=r.slice(),n;return function(a){for(n=0;nt&&(a=r.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,s.push({i:o,x:_A(i,n)})),t=Bw.lastIndex;return tu.length?(s=hf(a[l]),u=hf(n[l]),u=wz(u,s),u=dA(u,s),r.fromAttrs.path=u,r.toAttrs.path=s):r.pathFormatted||(s=hf(a[l]),u=hf(n[l]),u=dA(u,s),r.fromAttrs.path=u,r.toAttrs.path=s,r.pathFormatted=!0),i[l]=[];for(var c=0;c0){for(var l=r.animators.length-1;l>=0;l--){if(i=r.animators[l],i.destroyed){r.removeAnimator(l);continue}if(!i.isAnimatePaused()){n=i.get("animations");for(var s=n.length-1;s>=0;s--)a=n[s],t=VZ(i,a,o),t&&(n.splice(s,1),t=!1,a.callback&&a.callback())}n.length===0&&r.removeAnimator(l)}var u=r.canvas.get("autoDraw");u||r.canvas.draw()}})},e.prototype.addAnimator=function(r){this.animators.push(r)},e.prototype.removeAnimator=function(r){this.animators.splice(r,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(r){r===void 0&&(r=!0),this.animators.forEach(function(t){t.stopAnimate(r)}),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}(),HZ=40,sL=0,uL=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function cL(e,r,t){t.name=r,t.target=e,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}function YZ(e,r,t){if(t.bubbles){var i=void 0,n=!1;if(r==="mouseenter"?(i=t.fromShape,n=!0):r==="mouseleave"&&(n=!0,i=t.toShape),e.isCanvas()&&n)return;if(i&&Az(e,i)){t.bubbles=!1;return}t.name=r,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}}var WZ=function(){function e(r){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(i){var n=i.type;t._triggerEvent(n,i)},this._onDocumentMove=function(i){var n=t.canvas,a=n.get("el");if(a!==i.target&&(t.dragging||t.currentShape)){var o=t._getPointInfo(i);t.dragging&&t._emitEvent("drag",i,o,t.draggingShape)}},this._onDocumentMouseUp=function(i){var n=t.canvas,a=n.get("el");if(a!==i.target&&t.dragging){var o=t._getPointInfo(i);t.draggingShape&&t._emitEvent("drop",i,o,null),t._emitEvent("dragend",i,o,t.draggingShape),t._afterDrag(t.draggingShape,o,i)}},this.canvas=r.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var r=this,t=this.canvas.get("el");P(uL,function(i){t.addEventListener(i,r._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var r=this,t=this.canvas.get("el");P(uL,function(i){t.removeEventListener(i,r._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(r,t,i,n,a,o){var l=new bh(r,t);return l.fromShape=a,l.toShape=o,l.x=i.x,l.y=i.y,l.clientX=i.clientX,l.clientY=i.clientY,l.propagationPath.push(n),l},e.prototype._getShape=function(r,t){return this.canvas.getShape(r.x,r.y,t)},e.prototype._getPointInfo=function(r){var t=this.canvas,i=t.getClientByEvent(r),n=t.getPointByEvent(r);return{x:n.x,y:n.y,clientX:i.x,clientY:i.y}},e.prototype._triggerEvent=function(r,t){var i=this._getPointInfo(t),n=this._getShape(i,t),a=this["_on"+r],o=!1;if(a)a.call(this,i,n,t);else{var l=this.currentShape;r==="mouseenter"||r==="dragenter"||r==="mouseover"?(this._emitEvent(r,t,i,null,null,n),n&&this._emitEvent(r,t,i,n,null,n),r==="mouseenter"&&this.draggingShape&&this._emitEvent("dragenter",t,i,null)):r==="mouseleave"||r==="dragleave"||r==="mouseout"?(o=!0,l&&this._emitEvent(r,t,i,l,l,null),this._emitEvent(r,t,i,null,l,null),r==="mouseleave"&&this.draggingShape&&this._emitEvent("dragleave",t,i,null)):this._emitEvent(r,t,i,n,null,null)}if(o||(this.currentShape=n),n&&!n.get("destroyed")){var s=this.canvas,u=s.get("el");u.style.cursor=n.attr("cursor")||s.get("cursor")}},e.prototype._onmousedown=function(r,t,i){i.button===sL&&(this.mousedownShape=t,this.mousedownPoint=r,this.mousedownTimeStamp=i.timeStamp),this._emitEvent("mousedown",i,r,t,null,null)},e.prototype._emitMouseoverEvents=function(r,t,i,n){var a=this.canvas.get("el");i!==n&&(i&&(this._emitEvent("mouseout",r,t,i,i,n),this._emitEvent("mouseleave",r,t,i,i,n),(!n||n.get("destroyed"))&&(a.style.cursor=this.canvas.get("cursor"))),n&&(this._emitEvent("mouseover",r,t,n,i,n),this._emitEvent("mouseenter",r,t,n,i,n)))},e.prototype._emitDragoverEvents=function(r,t,i,n,a){n?(n!==i&&(i&&this._emitEvent("dragleave",r,t,i,i,n),this._emitEvent("dragenter",r,t,n,i,n)),a||this._emitEvent("dragover",r,t,n)):i&&this._emitEvent("dragleave",r,t,i,i,n),a&&this._emitEvent("dragover",r,t,n)},e.prototype._afterDrag=function(r,t,i){r&&(r.set("capture",!0),this.draggingShape=null),this.dragging=!1;var n=this._getShape(t,i);n!==r&&this._emitMouseoverEvents(i,t,r,n),this.currentShape=n},e.prototype._onmouseup=function(r,t,i){if(i.button===sL){var n=this.draggingShape;this.dragging?(n&&this._emitEvent("drop",i,r,t),this._emitEvent("dragend",i,r,n),this._afterDrag(n,r,i)):(this._emitEvent("mouseup",i,r,t),t===this.mousedownShape&&this._emitEvent("click",i,r,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(r,t,i){i.preventDefault();var n=this.currentShape;this._emitDragoverEvents(i,r,n,t,!0)},e.prototype._onmousemove=function(r,t,i){var n=this.canvas,a=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(i,r,a,t,!1),this._emitEvent("drag",i,r,o);else{var l=this.mousedownPoint;if(l){var s=this.mousedownShape,u=i.timeStamp,c=u-this.mousedownTimeStamp,f=l.clientX-r.clientX,h=l.clientY-r.clientY,v=f*f+h*h;c>120||v>HZ?s&&s.get("draggable")?(o=this.mousedownShape,o.set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",i,r,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&n.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",i,r,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(i,r,a,t),this._emitEvent("mousemove",i,r,t)):(this._emitMouseoverEvents(i,r,a,t),this._emitEvent("mousemove",i,r,t))}else this._emitMouseoverEvents(i,r,a,t),this._emitEvent("mousemove",i,r,t)}},e.prototype._emitEvent=function(r,t,i,n,a,o){var l=this._getEventObj(r,t,i,n,a,o);if(n){l.shape=n,cL(n,r,l);for(var s=n.getParent();s;)s.emitDelegation(r,l),l.propagationStopped||YZ(s,r,l),l.propagationPath.push(s),s=s.getParent()}else{var u=this.canvas;cL(u,r,l)}},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}(),fL="px",hL=gM(),XZ=hL&&hL.name==="firefox",_p=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.initContainer(),i.initDom(),i.initEvents(),i.initTimeline(),i}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},r.prototype.initContainer=function(){var t=this.get("container");Ct(t)&&(t=document.getElementById(t),this.set("container",t))},r.prototype.initDom=function(){var t=this.createDom();this.set("el",t);var i=this.get("container");i.appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},r.prototype.initEvents=function(){var t=new WZ({canvas:this});t.init(),this.set("eventController",t)},r.prototype.initTimeline=function(){var t=new jZ(this);this.set("timeline",t)},r.prototype.setDOMSize=function(t,i){var n=this.get("el");R2&&(n.style.width=t+fL,n.style.height=i+fL)},r.prototype.changeSize=function(t,i){this.setDOMSize(t,i),this.set("width",t),this.set("height",i),this.onCanvasChange("changeSize")},r.prototype.getRenderer=function(){return this.get("renderer")},r.prototype.getCursor=function(){return this.get("cursor")},r.prototype.setCursor=function(t){this.set("cursor",t);var i=this.get("el");R2&&i&&(i.style.cursor=t)},r.prototype.getPointByEvent=function(t){var i=this.get("supportCSSTransform");if(i){if(XZ&&!K(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!K(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var n=this.getClientByEvent(t),a=n.x,o=n.y;return this.getPointByClient(a,o)},r.prototype.getClientByEvent=function(t){var i=t;return t.touches&&(t.type==="touchend"?i=t.changedTouches[0]:i=t.touches[0]),{x:i.clientX,y:i.clientY}},r.prototype.getPointByClient=function(t,i){var n=this.get("el"),a=n.getBoundingClientRect();return{x:t-a.left,y:i-a.top}},r.prototype.getClientByPoint=function(t,i){var n=this.get("el"),a=n.getBoundingClientRect();return{x:t+a.left,y:i+a.top}},r.prototype.draw=function(){},r.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},r.prototype.clearEvents=function(){var t=this.get("eventController");t.destroy()},r.prototype.isCanvas=function(){return!0},r.prototype.getParent=function(){return null},r.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))},r}(oV),bp=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isGroup=function(){return!0},r.prototype.isEntityGroup=function(){return!1},r.prototype.clone=function(){for(var t=e.prototype.clone.call(this),i=this.getChildren(),n=0;n=t&&n.minY<=i&&n.maxY>=i},r.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},r.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},r.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},r.prototype.applyMatrix=function(t){e.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},r.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),i=this.getTotalMatrix(),n=t.minX,a=t.minY,o=t.maxX,l=t.maxY;if(i){var s=ro(i,[t.minX,t.minY]),u=ro(i,[t.maxX,t.minY]),c=ro(i,[t.minX,t.maxY]),f=ro(i,[t.maxX,t.maxY]);n=Math.min(s[0],u[0],c[0],f[0]),o=Math.max(s[0],u[0],c[0],f[0]),a=Math.min(s[1],u[1],c[1],f[1]),l=Math.max(s[1],u[1],c[1],f[1])}var h=this.attrs;if(h.shadowColor){var v=h.shadowBlur,d=v===void 0?0:v,p=h.shadowOffsetX,x=p===void 0?0:p,m=h.shadowOffsetY,_=m===void 0?0:m,b=n-d+x,w=o+d+x,S=a-d+_,M=l+d+_;n=Math.min(n,b),o=Math.max(o,w),a=Math.min(a,S),l=Math.max(l,M)}return{x:n,y:a,minX:n,minY:a,maxX:o,maxY:l,width:o-n,height:l-a}},r.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},r.prototype.isClipShape=function(){return this.get("isClipShape")},r.prototype.isInShape=function(t,i){return!1},r.prototype.isOnlyHitBox=function(){return!1},r.prototype.isHit=function(t,i){var n=this.get("startArrowShape"),a=this.get("endArrowShape"),o=[t,i,1];o=this.invertFromMatrix(o);var l=o[0],s=o[1],u=this._isInBBox(l,s);return this.isOnlyHitBox()?u:!!(u&&!this.isClipped(l,s)&&(this.isInShape(l,s)||n&&n.isHit(l,s)||a&&a.isHit(l,s)))},r}(iV),_V=new Map;function wn(e,r){_V.set(e,r)}function Cp(e){return _V.get(e)}function bV(e){var r=e.attr(),t=r.x,i=r.y,n=r.width,a=r.height;return{x:t,y:i,width:n,height:a}}function wV(e){var r=e.attr(),t=r.x,i=r.y,n=r.r;return{x:t-n,y:i-n,width:n*2,height:n*2}}function Qr(e,r,t,i){var n=e-t,a=r-i;return Math.sqrt(n*n+a*a)}function fd(e,r){return Math.abs(e-r)<.001}function uc(e,r){var t=Ei(e),i=Ei(r),n=vi(e),a=vi(r);return{x:t,y:i,width:n-t,height:a-i}}function UZ(e,r,t,i){return{minX:Ei([e,t]),maxX:vi([e,t]),minY:Ei([r,i]),maxY:vi([r,i])}}function Sp(e){return(e+Math.PI*2)%(Math.PI*2)}var qZ=Object.freeze(Object.defineProperty({__proto__:null,distance:Qr,isNumberEqual:fd,getBBoxByArray:uc,getBBoxRange:UZ,piMod:Sp},Symbol.toStringTag,{value:"Module"})),Mr={box:function(e,r,t,i){return uc([e,t],[r,i])},length:function(e,r,t,i){return Qr(e,r,t,i)},pointAt:function(e,r,t,i,n){return{x:(1-n)*e+n*t,y:(1-n)*r+n*i}},pointDistance:function(e,r,t,i,n,a){var o=(t-e)*(n-e)+(i-r)*(a-r);if(o<0)return Qr(e,r,n,a);var l=(t-e)*(t-e)+(i-r)*(i-r);return o>l?Qr(t,i,n,a):this.pointToLine(e,r,t,i,n,a)},pointToLine:function(e,r,t,i,n,a){var o=[t-e,i-r];if(eV(o,[0,0]))return Math.sqrt((n-e)*(n-e)+(a-r)*(a-r));var l=[-o[1],o[0]];mM(l,l);var s=[n-e,a-r];return Math.abs(xM(s,l))},tangentAngle:function(e,r,t,i){return Math.atan2(i-r,t-e)}},ZZ=1e-4;function CV(e,r,t,i,n,a){var o,l=1/0,s=[t,i],u=20;a&&a>200&&(u=a/10);for(var c=1/u,f=c/10,h=0;h<=u;h++){var v=h*c,d=[n.apply(null,e.concat([v])),n.apply(null,r.concat([v]))],p=Qr(s[0],s[1],d[0],d[1]);p=0&&p=0?[n]:[]}function dL(e,r,t,i){return 2*(1-i)*(r-e)+2*i*(t-r)}function SV(e,r,t,i,n,a,o){var l=Bl(e,t,n,o),s=Bl(r,i,a,o),u=Mr.pointAt(e,r,t,i,o),c=Mr.pointAt(t,i,n,a,o);return[[e,r,u.x,u.y,l,s],[l,s,c.x,c.y,n,a]]}function CA(e,r,t,i,n,a,o){if(o===0)return(Qr(e,r,t,i)+Qr(t,i,n,a)+Qr(e,r,n,a))/2;var l=SV(e,r,t,i,n,a,.5),s=l[0],u=l[1];return s.push(o-1),u.push(o-1),CA.apply(null,s)+CA.apply(null,u)}var EM={box:function(e,r,t,i,n,a){var o=vL(e,t,n)[0],l=vL(r,i,a)[0],s=[e,n],u=[r,a];return o!==void 0&&s.push(Bl(e,t,n,o)),l!==void 0&&u.push(Bl(r,i,a,l)),uc(s,u)},length:function(e,r,t,i,n,a){return CA(e,r,t,i,n,a,3)},nearestPoint:function(e,r,t,i,n,a,o,l){return CV([e,t,n],[r,i,a],o,l,Bl)},pointDistance:function(e,r,t,i,n,a,o,l){var s=this.nearestPoint(e,r,t,i,n,a,o,l);return Qr(s.x,s.y,o,l)},interpolationAt:Bl,pointAt:function(e,r,t,i,n,a,o){return{x:Bl(e,t,n,o),y:Bl(r,i,a,o)}},divide:function(e,r,t,i,n,a,o){return SV(e,r,t,i,n,a,o)},tangentAngle:function(e,r,t,i,n,a,o){var l=dL(e,t,n,o),s=dL(r,i,a,o),u=Math.atan2(s,l);return Sp(u)}};function Nl(e,r,t,i,n){var a=1-n;return a*a*a*e+3*r*n*a*a+3*t*n*n*a+i*n*n*n}function pL(e,r,t,i,n){var a=1-n;return 3*(a*a*(r-e)+2*a*n*(t-r)+n*n*(i-t))}function Nw(e,r,t,i){var n=-3*e+9*r-9*t+3*i,a=6*e-12*r+6*t,o=3*r-3*e,l=[],s,u,c;if(fd(n,0))fd(a,0)||(s=-o/a,s>=0&&s<=1&&l.push(s));else{var f=a*a-4*n*o;fd(f,0)?l.push(-a/(2*n)):f>0&&(c=Math.sqrt(f),s=(-a+c)/(2*n),u=(-a-c)/(2*n),s>=0&&s<=1&&l.push(s),u>=0&&u<=1&&l.push(u))}return l}function AV(e,r,t,i,n,a,o,l,s){var u=Nl(e,t,n,o,s),c=Nl(r,i,a,l,s),f=Mr.pointAt(e,r,t,i,s),h=Mr.pointAt(t,i,n,a,s),v=Mr.pointAt(n,a,o,l,s),d=Mr.pointAt(f.x,f.y,h.x,h.y,s),p=Mr.pointAt(h.x,h.y,v.x,v.y,s);return[[e,r,f.x,f.y,d.x,d.y,u,c],[u,c,p.x,p.y,v.x,v.y,o,l]]}function SA(e,r,t,i,n,a,o,l,s){if(s===0)return QZ([e,t,n,o],[r,i,a,l]);var u=AV(e,r,t,i,n,a,o,l,.5),c=u[0],f=u[1];return c.push(s-1),f.push(s-1),SA.apply(null,c)+SA.apply(null,f)}var Cf={extrema:Nw,box:function(e,r,t,i,n,a,o,l){for(var s=[e,o],u=[r,l],c=Nw(e,t,n,o),f=Nw(r,i,a,l),h=0;h0?t:t*-1}var KZ={box:function(e,r,t,i){return{x:e-t,y:r-i,width:t*2,height:i*2}},length:function(e,r,t,i){return Math.PI*(3*(t+i)-Math.sqrt((3*t+i)*(t+3*i)))},nearestPoint:function(e,r,t,i,n,a){var o=t,l=i;if(o===0||l===0)return{x:e,y:r};for(var s=n-e,u=a-r,c=Math.abs(s),f=Math.abs(u),h=o*o,v=l*l,d=Math.PI/4,p,x,m=0;m<4;m++){p=o*Math.cos(d),x=l*Math.sin(d);var _=(h-v)*Math.pow(Math.cos(d),3)/o,b=(v-h)*Math.pow(Math.sin(d),3)/l,w=p-_,S=x-b,M=c-_,O=f-b,F=Math.hypot(S,w),L=Math.hypot(O,M),D=F*Math.asin((w*O-S*M)/(F*L)),R=D/Math.sqrt(h+v-p*p-x*x);d+=R,d=Math.min(Math.PI/2,Math.max(0,d))}return{x:e+gL(p,s),y:r+gL(x,u)}},pointDistance:function(e,r,t,i,n,a){var o=this.nearestPoint(e,r,t,i,n,a);return Qr(o.x,o.y,n,a)},pointAt:function(e,r,t,i,n){var a=2*Math.PI*n;return{x:e+t*Math.cos(a),y:r+i*Math.sin(a)}},tangentAngle:function(e,r,t,i,n){var a=2*Math.PI*n,o=Math.atan2(i*Math.cos(a),-t*Math.sin(a));return Sp(o)}};function JZ(e,r,t,i,n,a,o,l){return-1*t*Math.cos(n)*Math.sin(l)-i*Math.sin(n)*Math.cos(l)}function tQ(e,r,t,i,n,a,o,l){return-1*t*Math.sin(n)*Math.sin(l)+i*Math.cos(n)*Math.cos(l)}function eQ(e,r,t){return Math.atan(-r/e*Math.tan(t))}function rQ(e,r,t){return Math.atan(r/(e*Math.tan(t)))}function yL(e,r,t,i,n,a){return t*Math.cos(n)*Math.cos(a)-i*Math.sin(n)*Math.sin(a)+e}function mL(e,r,t,i,n,a){return t*Math.sin(n)*Math.cos(a)+i*Math.cos(n)*Math.sin(a)+r}function iQ(e,r,t,i){var n=Math.atan2(i*e,t*r);return(n+Math.PI*2)%(Math.PI*2)}function xL(e,r,t){return{x:e*Math.cos(t),y:r*Math.sin(t)}}function _L(e,r,t){var i=Math.cos(t),n=Math.sin(t);return[e*i-r*n,e*n+r*i]}var TV={box:function(e,r,t,i,n,a,o){for(var l=eQ(t,i,n),s=1/0,u=-1/0,c=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var h=l+f;au&&(u=v)}for(var d=rQ(t,i,n),p=1/0,x=-1/0,m=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var _=d+f;ax&&(x=b)}return{x:s,y:p,width:u-s,height:x-p}},length:function(e,r,t,i,n,a,o){},nearestPoint:function(e,r,t,i,n,a,o,l,s){var u=_L(l-e,s-r,-n),c=u[0],f=u[1],h=KZ.nearestPoint(0,0,t,i,c,f),v=iQ(t,i,h.x,h.y);vo&&(h=xL(t,i,o));var d=_L(h.x,h.y,n);return{x:d[0]+e,y:d[1]+r}},pointDistance:function(e,r,t,i,n,a,o,l,s){var u=this.nearestPoint(e,r,t,i,l,s);return Qr(u.x,u.y,l,s)},pointAt:function(e,r,t,i,n,a,o,l){var s=(o-a)*l+a;return{x:yL(e,r,t,i,n,s),y:mL(e,r,t,i,n,s)}},tangentAngle:function(e,r,t,i,n,a,o,l){var s=(o-a)*l+a,u=JZ(e,r,t,i,n,a,o,s),c=tQ(e,r,t,i,n,a,o,s);return Sp(Math.atan2(c,u))}};function MV(e){for(var r=0,t=[],i=0;i1||r<0||e.length<2)return null;var t=MV(e),i=t.segments,n=t.totalLength;if(n===0)return{x:e[0][0],y:e[0][1]};for(var a=0,o=null,l=0;l=a&&r<=a+f){var h=(r-a)/f;o=Mr.pointAt(u[0],u[1],c[0],c[1],h);break}a+=f}return o}function FV(e,r){if(r>1||r<0||e.length<2)return 0;for(var t=MV(e),i=t.segments,n=t.totalLength,a=0,o=0,l=0;l=a&&r<=a+f){o=Math.atan2(c[1]-u[1],c[0]-u[0]);break}a+=f}return o}function PV(e,r,t){for(var i=1/0,n=0;n1){var n=sQ(r,t);return r*i+n*(i-1)}return r}function sQ(e,r){return r?r-e:e*.14}function uQ(e,r){var t=Ap(),i=0;if(K(e)||e==="")return i;if(t.save(),t.font=r,Ct(e)&&e.includes(` `)){var n=e.split(` `);P(n,function(a){var o=t.measureText(a).width;i1){var n=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=n}P(t,function(a,o){isNaN(a)||(t[o]=+a)}),r[i]=t}),r}function vQ(e,r,t,i){var n=[],a=!!i,o,l,s,u,c,f,h;if(a){s=i[0],u=i[1];for(var v=0,d=e.length;v=3&&(f.length===3&&h.push("Q"),h=h.concat(f[1])),f.length===2&&h.push("L"),h=h.concat(f[f.length-1]),h});return c}function gQ(e,r,t){if(t===1)return[[].concat(e)];var i=[];if(r[0]==="L"||r[0]==="C"||r[0]==="Q")i=i.concat(pQ(e,r,t));else{var n=[].concat(e);n[0]==="M"&&(n[0]="L");for(var a=0;a<=t-1;a++)i.push(n)}return i}function yQ(e,r){if(e.length===1)return e;var t=e.length-1,i=r.length-1,n=t/i,a=[];if(e.length===1&&e[0][0]==="M"){for(var o=0;o=0;s--)o=a[s].index,a[s].type==="add"?e.splice(o,0,[].concat(e[o])):e.splice(o,1)}if(i=e.length,i0)t=zw(t,e[i-1],1);else{e[i]=r[i];break}e[i]=["Q"].concat(t.reduce(function(n,a){return n.concat(a)},[]));break;case"T":e[i]=["T"].concat(t[0]);break;case"C":if(t.length<3)if(i>0)t=zw(t,e[i-1],2);else{e[i]=r[i];break}e[i]=["C"].concat(t.reduce(function(n,a){return n.concat(a)},[]));break;case"S":if(t.length<2)if(i>0)t=zw(t,e[i-1],1);else{e[i]=r[i];break}e[i]=["S"].concat(t.reduce(function(n,a){return n.concat(a)},[]));break;default:e[i]=r[i]}return e}function $V(e,r,t,i,n){return n?[["M",+e+ +n,r],["l",t-n*2,0],["a",n,n,0,0,1,n,n],["l",0,i-n*2],["a",n,n,0,0,1,-n,n],["l",n*2-t,0],["a",n,n,0,0,1,-n,-n],["l",0,n*2-i],["a",n,n,0,0,1,n,-n],["z"]]:[["M",e,r],["l",t,0],["l",0,i],["l",-t,0],["z"]]}var hd=` \v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,wQ=new RegExp("([a-z])["+hd+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+hd+"]*,?["+hd+"]*)+)","ig"),CQ=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+hd+"]*,?["+hd+"]*","ig");function c1(e){if(!e)return null;if(it(e))return e;var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(e).replace(wQ,function(i,n,a){var o=[],l=n.toLowerCase();if(a.replace(CQ,function(s,u){u&&o.push(+u)}),l==="m"&&o.length>2&&(t.push([n].concat(o.splice(0,2))),l="l",n=n==="m"?"l":"L"),l==="o"&&o.length===1&&t.push([n,o[0]]),l==="r")t.push([n].concat(o));else for(;o.length>=r[l]&&(t.push([n].concat(o.splice(0,r[l]))),!!r[l]););return""}),t}var SQ=/[a-z]/;function wL(e,r){return[r[0]+(r[0]-e[0]),r[1]+(r[1]-e[1])]}function f1(e){var r=c1(e);if(!r||!r.length)return[["M",0,0]];for(var t=!1,i=0;i=0){t=!0;break}}if(!t)return r;var a=[],o=0,l=0,s=0,u=0,c=0,f=r[0];(f[0]==="M"||f[0]==="m")&&(o=+f[1],l=+f[2],s=o,u=l,c++,a[0]=["M",o,l]);for(var i=c,h=r.length;i1&&(a=1),a<-1&&(a=-1),n*Math.acos(a)},TQ=function(e,r,t,i,n,a,o,l,s,u,c,f){var h=Math.pow(n,2),v=Math.pow(a,2),d=Math.pow(c,2),p=Math.pow(f,2),x=h*v-h*p-v*d;x<0&&(x=0),x/=h*p+v*d,x=Math.sqrt(x)*(o===l?-1:1);var m=x*n/a*f,_=x*-a/n*c,b=u*m-s*_+(e+t)/2,w=s*m+u*_+(r+i)/2,S=(c-m)/n,M=(f-_)/a,O=(-c-m)/n,F=(-f-_)/a,L=CL(1,0,S,M),D=CL(S,M,O,F);return l===0&&D>0&&(D-=vd),l===1&&D<0&&(D+=vd),[b,w,L,D]},MQ=function(e){var r=e.px,t=e.py,i=e.cx,n=e.cy,a=e.rx,o=e.ry,l=e.xAxisRotation,s=l===void 0?0:l,u=e.largeArcFlag,c=u===void 0?0:u,f=e.sweepFlag,h=f===void 0?0:f,v=[];if(a===0||o===0)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:n}];var d=Math.sin(s*vd/360),p=Math.cos(s*vd/360),x=p*(r-i)/2+d*(t-n)/2,m=-d*(r-i)/2+p*(t-n)/2;if(x===0&&m===0)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:n}];a=Math.abs(a),o=Math.abs(o);var _=Math.pow(x,2)/Math.pow(a,2)+Math.pow(m,2)/Math.pow(o,2);_>1&&(a*=Math.sqrt(_),o*=Math.sqrt(_));var b=TQ(r,t,i,n,a,o,c,h,d,p,x,m),w=b[0],S=b[1],M=b[2],O=b[3],F=Math.abs(O)/(vd/4);Math.abs(1-F)<1e-7&&(F=1);var L=Math.max(Math.ceil(F),1);O/=L;for(var D=0;D7){e[t].shift();for(var i=e[t],n=t;i.length;)r[t]="A",e.splice(n+=1,0,["C"].concat(i.splice(0,6)));e.splice(t,1)}}var SL=function(e,r,t,i,n){var a=-3*r+9*t-9*i+3*n,o=e*a+6*r-12*t+6*i;return e*o-3*r+3*t},AL=function(e,r,t,i,n,a,o,l,s){s===null&&(s=1),s=s>1?1:s<0?0:s;for(var u=s/2,c=12,f=[-.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],v=0,d=0;d0&&v<1&&s.push(v);continue}var p=f*f-4*h*c,x=Math.sqrt(p);if(!(p<0)){var m=(-f+x)/(2*c);m>0&&m<1&&s.push(m);var _=(-f-x)/(2*c);_>0&&_<1&&s.push(_)}}for(var b=s.length,w=b,S;b--;)v=s[b],S=1-v,u[0][b]=S*S*S*e+3*S*S*v*t+3*S*v*v*n+v*v*v*o,u[1][b]=S*S*S*r+3*S*S*v*i+3*S*v*v*a+v*v*v*l;return u[0][w]=e,u[1][w]=r,u[0][w+1]=o,u[1][w+1]=l,u[0].length=u[1].length=w+2,{min:{x:Math.min.apply(0,u[0]),y:Math.min.apply(0,u[1])},max:{x:Math.max.apply(0,u[0]),y:Math.max.apply(0,u[1])}}},LQ=function(e,r,t,i,n,a,o,l){if(!(Math.max(e,t)Math.max(n,o)||Math.max(r,i)Math.max(a,l))){var s=(e*i-r*t)*(n-o)-(e-t)*(n*l-a*o),u=(e*i-r*t)*(a-l)-(r-i)*(n*l-a*o),c=(e-t)*(a-l)-(r-i)*(n-o);if(!!c){var f=s/c,h=u/c,v=+f.toFixed(2),d=+h.toFixed(2);if(!(v<+Math.min(e,t).toFixed(2)||v>+Math.max(e,t).toFixed(2)||v<+Math.min(n,o).toFixed(2)||v>+Math.max(n,o).toFixed(2)||d<+Math.min(r,i).toFixed(2)||d>+Math.max(r,i).toFixed(2)||d<+Math.min(a,l).toFixed(2)||d>+Math.max(a,l).toFixed(2)))return{x:f,y:h}}}},Cl=function(e,r,t){return r>=e.x&&r<=e.x+e.width&&t>=e.y&&t<=e.y+e.height},TA=function(e,r,t,i){return e===null&&(e=r=t=i=0),r===null&&(r=e.y,t=e.width,i=e.height,e=e.x),{x:e,y:r,width:t,w:t,height:i,h:i,x2:e+t,y2:r+i,cx:e+t/2,cy:r+i/2,r1:Math.min(t,i)/2,r2:Math.max(t,i)/2,r0:Math.sqrt(t*t+i*i)/2,path:$V(e,r,t,i),vb:[e,r,t,i].join(" ")}},DQ=function(e,r){return e=TA(e),r=TA(r),Cl(r,e.x,e.y)||Cl(r,e.x2,e.y)||Cl(r,e.x,e.y2)||Cl(r,e.x2,e.y2)||Cl(e,r.x,r.y)||Cl(e,r.x2,r.y)||Cl(e,r.x,r.y2)||Cl(e,r.x2,r.y2)||(e.xr.x||r.xe.x)&&(e.yr.y||r.ye.y)},TL=function(e,r,t,i,n,a,o,l){it(e)||(e=[e,r,t,i,n,a,o,l]);var s=IQ.apply(null,e);return TA(s.min.x,s.min.y,s.max.x-s.min.x,s.max.y-s.min.y)},ML=function(e,r,t,i,n,a,o,l,s){var u=1-s,c=Math.pow(u,3),f=Math.pow(u,2),h=s*s,v=h*s,d=c*e+f*3*s*t+u*3*s*s*n+v*o,p=c*r+f*3*s*i+u*3*s*s*a+v*l,x=e+2*s*(t-e)+h*(n-2*t+e),m=r+2*s*(i-r)+h*(a-2*i+r),_=t+2*s*(n-t)+h*(o-2*n+t),b=i+2*s*(a-i)+h*(l-2*a+i),w=u*e+s*t,S=u*r+s*i,M=u*n+s*o,O=u*a+s*l,F=90-Math.atan2(x-_,m-b)*180/Math.PI;return{x:d,y:p,m:{x,y:m},n:{x:_,y:b},start:{x:w,y:S},end:{x:M,y:O},alpha:F}},$Q=function(e,r,t){var i=TL(e),n=TL(r);if(!DQ(i,n))return t?0:[];for(var a=AL.apply(0,e),o=AL.apply(0,r),l=~~(a/8),s=~~(o/8),u=[],c=[],f={},h=t?0:[],v=0;v=0&&O<=1&&F>=0&&F<=1&&(t?h++:h.push({x:M.x,y:M.y,t1:O,t2:F}))}}return h},kQ=function(e,r,t){e=AA(e),r=AA(r);for(var i,n,a,o,l,s,u,c,f,h,v=t?0:[],d=0,p=e.length;d1&&(t*=Math.sqrt(v),i*=Math.sqrt(v));var d=t*t*(h*h)+i*i*(f*f),p=d?Math.sqrt((t*t*(i*i)-d)/d):1;a===o&&(p*=-1),isNaN(p)&&(p=0);var x=i?p*t*h/i:0,m=t?p*-i*f/t:0,_=(l+u)/2+Math.cos(n)*x-Math.sin(n)*m,b=(s+c)/2+Math.sin(n)*x+Math.cos(n)*m,w=[(f-x)/t,(h-m)/i],S=[(-1*f-x)/t,(-1*h-m)/i],M=EL([1,0],w),O=EL(w,S);return MA(w,S)<=-1&&(O=Math.PI),MA(w,S)>=1&&(O=0),o===0&&O>0&&(O=O-2*Math.PI),o===1&&O<0&&(O=O+2*Math.PI),{cx:_,cy:b,rx:EA(e,[u,c])?0:t,ry:EA(e,[u,c])?0:i,startAngle:M,endAngle:M+O,xRotation:n,arcFlag:a,sweepFlag:o}}function OL(e,r){return[r[0]+(r[0]-e[0]),r[1]+(r[1]-e[1])]}function FM(e){e=IV(e);for(var r=[],t=null,i=null,n=null,a=0,o=e.length,l=0;l=r&&e<=t};function RV(e,r,t,i){var n=.001,a={x:t.x-e.x,y:t.y-e.y},o={x:r.x-e.x,y:r.y-e.y},l={x:i.x-t.x,y:i.y-t.y},s=o.x*l.y-o.y*l.x,u=s*s,c=o.x*o.x+o.y*o.y,f=l.x*l.x+l.y*l.y,h=null;if(u>n*c*f){var v=(a.x*l.y-a.y*l.x)/s,d=(a.x*o.y-a.y*o.x)/s;FL(v,0,1)&&FL(d,0,1)&&(h={x:e.x+v*o.x,y:e.y+v*o.y})}return h}var GQ=1e-6;function jw(e){return Math.abs(e)0!=jw(l[1]-t)>0&&jw(r-(t-o[1])*(o[0]-l[0])/(o[1]-l[1])-o[0])<0&&(i=!i)}return i}function PL(e){for(var r=[],t=e.length,i=0;i1){var o=e[0],l=e[t-1];r.push({from:{x:l[0],y:l[1]},to:{x:o[0],y:o[1]}})}return r}function VQ(e,r){var t=!1;return P(e,function(i){if(RV(i.from,i.to,r.from,r.to))return t=!0,!1}),t}function IL(e){var r=e.map(function(i){return i[0]}),t=e.map(function(i){return i[1]});return{minX:Math.min.apply(null,r),maxX:Math.max.apply(null,r),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function jQ(e,r){return!(r.minX>e.maxX||r.maxXe.maxY||r.maxYMath.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var f={xExtra:Math.cos(s/2-u)*(r/2*(1/Math.sin(s/2)))-r/2||0,yExtra:Math.cos(c-s/2)*(r/2*(1/Math.sin(s/2)))-r/2||0};return f}function WQ(e){var r=e.attr(),t=r.path,i=r.stroke,n=i?r.lineWidth:0,a=e.get("segments")||FM(t),o=YQ(a,n),l=o.x,s=o.y,u=o.width,c=o.height,f={minX:l,minY:s,maxX:l+u,maxY:s+c};return f=OM(e,f),{x:f.minX,y:f.minY,width:f.maxX-f.minX,height:f.maxY-f.minY}}function XQ(e){var r=e.attr(),t=r.x1,i=r.y1,n=r.x2,a=r.y2,o=Math.min(t,n),l=Math.max(t,n),s=Math.min(i,a),u=Math.max(i,a),c={minX:o,maxX:l,minY:s,maxY:u};return c=OM(e,c),{x:c.minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY}}function UQ(e){var r=e.attr(),t=r.x,i=r.y,n=r.rx,a=r.ry;return{x:t-n,y:i-a,width:n*2,height:a*2}}wn("rect",bV);wn("image",bV);wn("circle",wV);wn("marker",wV);wn("polyline",oQ);wn("polygon",lQ);wn("text",cQ);wn("path",WQ);wn("line",XQ);wn("ellipse",UQ);var qQ="0.5.11",ZQ=Object.freeze(Object.defineProperty({__proto__:null,PathUtil:a1,version:qQ,Event:bh,Base:yp,AbstractCanvas:_p,AbstractGroup:bp,AbstractShape:wp,getBBoxMethod:Cp,registerBBox:wn,getTextHeight:Tp,assembleFont:Mp,isAllowCapture:$f,multiplyVec2:ro,invert:mp,getOffScreenContext:Ap,registerEasing:MM},Symbol.toStringTag,{value:"Module"})),pi=_r(ZQ);Object.defineProperty(pM,"__esModule",{value:!0});var LL=j,QQ=pi,Io=Y,KQ={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},JQ=function(e){LL.__extends(r,e);function r(t){var i=e.call(this,t)||this;return i.initCfg(),i}return r.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}},r.prototype.clear=function(){},r.prototype.update=function(t){var i=this,n=this.get("defaultCfg")||{};Io.each(t,function(a,o){var l=i.get(o),s=a;l!==a&&(Io.isObject(a)&&n[o]&&(s=Io.deepMix({},n[o],a)),i.set(o,s))}),this.updateInner(t),this.afterUpdate(t)},r.prototype.updateInner=function(t){},r.prototype.afterUpdate=function(t){Io.hasKey(t,"visible")&&(t.visible?this.show():this.hide()),Io.hasKey(t,"capture")&&this.setCapture(t.capture)},r.prototype.getLayoutBBox=function(){return this.getBBox()},r.prototype.getLocationType=function(){return this.get("locationType")},r.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},r.prototype.setOffset=function(t,i){this.update({offsetX:t,offsetY:i})},r.prototype.setLocation=function(t){var i=LL.__assign({},t);this.update(i)},r.prototype.getLocation=function(){var t=this,i={},n=this.get("locationType"),a=KQ[n];return Io.each(a,function(o){i[o]=t.get(o)}),i},r.prototype.isList=function(){return!1},r.prototype.isSlider=function(){return!1},r.prototype.init=function(){},r.prototype.initCfg=function(){var t=this,i=this.get("defaultCfg");Io.each(i,function(n,a){var o=t.get(a);if(Io.isObject(o)){var l=Io.deepMix({},n,o);t.set(a,l)}})},r}(QQ.Base);pM.default=JQ;Object.defineProperty(dM,"__esModule",{value:!0});var Hw=j,By=vM,Ks=Y,Yw=te,tK=pM,eK=function(e){Hw.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return Hw.__assign(Hw.__assign({},t),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},r.prototype.getContainer=function(){return this.get("container")},r.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},r.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},r.prototype.setCapture=function(t){var i=this.getContainer(),n=t?"auto":"none";i.style.pointerEvents=n,this.set("capture",t)},r.prototype.getBBox=function(){var t=this.getContainer(),i=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return Yw.createBBox(i,n,t.clientWidth,t.clientHeight)},r.prototype.clear=function(){var t=this.get("container");Yw.clearDom(t)},r.prototype.destroy=function(){this.removeEvent(),this.removeDom(),e.prototype.destroy.call(this)},r.prototype.init=function(){e.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},r.prototype.initCapture=function(){this.setCapture(this.get("capture"))},r.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},r.prototype.initDom=function(){},r.prototype.initContainer=function(){var t=this.get("container");if(Ks.isNil(t)){t=this.createDom();var i=this.get("parent");Ks.isString(i)&&(i=document.getElementById(i),this.set("parent",i)),i.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else Ks.isString(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},r.prototype.resetStyles=function(){var t=this.get("domStyles"),i=this.get("defaultStyles");t?t=Ks.deepMix({},i,t):t=i,this.set("domStyles",t)},r.prototype.applyStyles=function(){var t=this.get("domStyles");if(!!t){var i=this.getContainer();this.applyChildrenStyles(i,t);var n=this.get("containerClassName");if(n&&Yw.hasClass(i,n)){var a=t[n];By.modifyCSS(i,a)}}},r.prototype.applyChildrenStyles=function(t,i){Ks.each(i,function(n,a){var o=t.getElementsByClassName(a);Ks.each(o,function(l){By.modifyCSS(l,n)})})},r.prototype.applyStyle=function(t,i){var n=this.get("domStyles");By.modifyCSS(i,n[t])},r.prototype.createDom=function(){var t=this.get("containerTpl");return By.createDom(t)},r.prototype.initEvent=function(){},r.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},r.prototype.removeEvent=function(){},r.prototype.updateInner=function(t){Ks.hasKey(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},r.prototype.resetPosition=function(){},r}(tK.default);dM.default=eK;Object.defineProperty(uz,"__esModule",{value:!0});var Ww=j,Ny=vM,Gy=Y,rK=dM,iK=te,nK=function(e){Ww.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return Ww.__assign(Ww.__assign({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},r.prototype.render=function(){var t=this.getContainer(),i=this.get("html");iK.clearDom(t);var n=Gy.isFunction(i)?i(t):i;if(Gy.isElement(n))t.appendChild(n);else if(Gy.isString(n)||Gy.isNumber(n)){var a=Ny.createDom(""+n);a&&t.appendChild(a)}this.resetPosition()},r.prototype.resetPosition=function(){var t=this.getContainer(),i=this.getLocation(),n=i.x,a=i.y,o=this.get("alignX"),l=this.get("alignY"),s=this.get("offsetX"),u=this.get("offsetY"),c=Ny.getOuterWidth(t),f=Ny.getOuterHeight(t),h={x:n,y:a};o==="middle"?h.x-=Math.round(c/2):o==="right"&&(h.x-=Math.round(c)),l==="middle"?h.y-=Math.round(f/2):l==="bottom"&&(h.y-=Math.round(f)),s&&(h.x+=s),u&&(h.y+=u),Ny.modifyCSS(t,{position:"absolute",left:h.x+"px",top:h.y+"px",zIndex:this.get("zIndex")})},r}(rK.default),aK=uz.default=nK,h1={},Kt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.COMPONENT_MAX_VIEW_PERCENTAGE=e.MIN_CHART_HEIGHT=e.MIN_CHART_WIDTH=e.FIELD_ORIGIN=e.GROUP_ATTRS=e.ELEMENT_STATE=e.PLOT_EVENTS=e.GEOMETRY_LIFE_CIRCLE=e.VIEW_LIFE_CIRCLE=e.GROUP_Z_INDEX=e.COMPONENT_TYPE=e.DIRECTION=e.LAYER=void 0,function(r){r.FORE="fore",r.MID="mid",r.BG="bg"}(e.LAYER||(e.LAYER={})),function(r){r.TOP="top",r.TOP_LEFT="top-left",r.TOP_RIGHT="top-right",r.RIGHT="right",r.RIGHT_TOP="right-top",r.RIGHT_BOTTOM="right-bottom",r.LEFT="left",r.LEFT_TOP="left-top",r.LEFT_BOTTOM="left-bottom",r.BOTTOM="bottom",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_RIGHT="bottom-right",r.RADIUS="radius",r.CIRCLE="circle",r.NONE="none"}(e.DIRECTION||(e.DIRECTION={})),function(r){r.AXIS="axis",r.GRID="grid",r.LEGEND="legend",r.TOOLTIP="tooltip",r.ANNOTATION="annotation",r.SLIDER="slider",r.SCROLLBAR="scrollbar",r.OTHER="other"}(e.COMPONENT_TYPE||(e.COMPONENT_TYPE={})),e.GROUP_Z_INDEX={FORE:3,MID:2,BG:1},function(r){r.BEFORE_RENDER="beforerender",r.AFTER_RENDER="afterrender",r.BEFORE_PAINT="beforepaint",r.AFTER_PAINT="afterpaint",r.BEFORE_CHANGE_DATA="beforechangedata",r.AFTER_CHANGE_DATA="afterchangedata",r.BEFORE_CLEAR="beforeclear",r.AFTER_CLEAR="afterclear",r.BEFORE_DESTROY="beforedestroy",r.BEFORE_CHANGE_SIZE="beforechangesize",r.AFTER_CHANGE_SIZE="afterchangesize"}(e.VIEW_LIFE_CIRCLE||(e.VIEW_LIFE_CIRCLE={})),function(r){r.BEFORE_DRAW_ANIMATE="beforeanimate",r.AFTER_DRAW_ANIMATE="afteranimate"}(e.GEOMETRY_LIFE_CIRCLE||(e.GEOMETRY_LIFE_CIRCLE={})),function(r){r.MOUSE_ENTER="plot:mouseenter",r.MOUSE_DOWN="plot:mousedown",r.MOUSE_MOVE="plot:mousemove",r.MOUSE_UP="plot:mouseup",r.MOUSE_LEAVE="plot:mouseleave",r.TOUCH_START="plot:touchstart",r.TOUCH_MOVE="plot:touchmove",r.TOUCH_END="plot:touchend",r.TOUCH_CANCEL="plot:touchcancel",r.CLICK="plot:click",r.DBLCLICK="plot:dblclick",r.CONTEXTMENU="plot:contextmenu",r.LEAVE="plot:leave",r.ENTER="plot:enter"}(e.PLOT_EVENTS||(e.PLOT_EVENTS={})),function(r){r.ACTIVE="active",r.INACTIVE="inactive",r.SELECTED="selected",r.DEFAULT="default"}(e.ELEMENT_STATE||(e.ELEMENT_STATE={})),e.GROUP_ATTRS=["color","shape","size"],e.FIELD_ORIGIN="_origin",e.MIN_CHART_WIDTH=1,e.MIN_CHART_HEIGHT=1,e.COMPONENT_MAX_VIEW_PERCENTAGE=.25})(Kt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.modifyCSS=e.createDom=e.removeDom=e.getChartSize=void 0;var r=Kt;function t(l){var s=getComputedStyle(l);return{width:(l.clientWidth||parseInt(s.width,10))-parseInt(s.paddingLeft,10)-parseInt(s.paddingRight,10),height:(l.clientHeight||parseInt(s.height,10))-parseInt(s.paddingTop,10)-parseInt(s.paddingBottom,10)}}function i(l){return typeof l=="number"&&!isNaN(l)}function n(l,s,u,c){var f=u,h=c;if(s){var v=t(l);f=v.width?v.width:f,h=v.height?v.height:h}return{width:Math.max(i(f)?f:r.MIN_CHART_WIDTH,r.MIN_CHART_WIDTH),height:Math.max(i(h)?h:r.MIN_CHART_HEIGHT,r.MIN_CHART_HEIGHT)}}e.getChartSize=n;function a(l){var s=l.parentNode;s&&s.removeChild(l)}e.removeDom=a;var o=vM;Object.defineProperty(e,"createDom",{enumerable:!0,get:function(){return o.createDom}}),Object.defineProperty(e,"modifyCSS",{enumerable:!0,get:function(){return o.modifyCSS}})})(h1);aK.prototype.render=function(){if(this.get("isReactElement")){var e=this.getContainer(),r=this.get("content"),t=this.get("refreshDeps"),i=Pt.isValidElement(r)?r:r(e);(this.preRefreshDeps===void 0||!Ge(this.preRefreshDeps,t))&&(VG.render(i,e),this.preRefreshDeps=t)}else{var e=this.getContainer(),n=this.get("html");pz(e);var i=pt(n)?n(e):n;Jx(i)?e.appendChild(i):Ct(i)&&e.appendChild(h1.createDom(i))}this.resetPosition()};var PM={},Qn={},DL=0,oK=1/2,lK=1/2,sK=.05,Ep=function(){function e(r){var t=r.xField,i=r.yField,n=r.adjustNames,a=n===void 0?["x","y"]:n,o=r.dimValuesMap;this.adjustNames=a,this.xField=t,this.yField=i,this.dimValuesMap=o}return e.prototype.isAdjust=function(r){return this.adjustNames.indexOf(r)>=0},e.prototype.getAdjustRange=function(r,t,i){var n=this.yField,a=i.indexOf(t),o=i.length,l,s;return!n&&this.isAdjust("y")?(l=0,s=1):o>1?(l=i[a===0?0:a-1],s=i[a===o-1?o-1:a+1],a!==0?l+=(t-l)/2:l-=(s-t)/2,a!==o-1?s-=(s-t)/2:s+=(t-i[o-2])/2):(l=t===0?0:t-.5,s=t===0?1:t+.5),{pre:l,next:s}},e.prototype.adjustData=function(r,t){var i=this,n=this.getDimValues(t);P(r,function(a,o){P(n,function(l,s){i.adjustDim(s,l,a,o)})})},e.prototype.groupData=function(r,t){return P(r,function(i){i[t]===void 0&&(i[t]=DL)}),Xi(r,t)},e.prototype.adjustDim=function(r,t,i,n){},e.prototype.getDimValues=function(r){var t=this,i=t.xField,n=t.yField,a=Qt({},this.dimValuesMap),o=[];if(i&&this.isAdjust("x")&&o.push(i),n&&this.isAdjust("y")&&o.push(n),o.forEach(function(s){a&&a[s]||(a[s]=Xn(r,s).sort(function(u,c){return u-c}))}),!n&&this.isAdjust("y")){var l="y";a[l]=[DL,1]}return a},e}(),NV={},IM=function(e){return NV[e.toLowerCase()]},Op=function(e,r){if(IM(e))throw new Error("Adjust type '"+e+"' existed.");NV[e.toLowerCase()]=r};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var FA=function(e,r){return FA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},FA(e,r)};function v1(e,r){FA(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var io=function(){return io=Object.assign||function(r){for(var t,i=1,n=arguments.length;i=0){var d=this.getIntervalOnlyOffset(n,i);v=c+d}else if(!K(u)&&K(s)&&u>=0){var d=this.getDodgeOnlyOffset(n,i);v=c+d}else if(!K(s)&&!K(u)&&s>=0&&u>=0){var d=this.getIntervalAndDodgeOffset(n,i);v=c+d}else{var p=h*o/n,x=l*p,d=1/2*(h-n*p-(n-1)*x)+((i+1)*p+i*x)-1/2*p-1/2*h;v=(c+f)/2+d}return v},r.prototype.getIntervalOnlyOffset=function(t,i){var n=this,a=n.defaultSize,o=n.intervalPadding,l=n.xDimensionLegenth,s=n.groupNum,u=n.dodgeRatio,c=n.maxColumnWidth,f=n.minColumnWidth,h=n.columnWidthRatio,v=o/l,d=(1-(s-1)*v)/s*u/(t-1),p=((1-v*(s-1))/s-d*(t-1))/t;if(p=K(h)?p:1/s/t*h,!K(c)){var x=c/l;p=Math.min(p,x)}if(!K(f)){var m=f/l;p=Math.max(p,m)}p=a?a/l:p,d=((1-(s-1)*v)/s-t*p)/(t-1);var _=((1/2+i)*p+i*d+1/2*v)*s-v/2;return _},r.prototype.getDodgeOnlyOffset=function(t,i){var n=this,a=n.defaultSize,o=n.dodgePadding,l=n.xDimensionLegenth,s=n.groupNum,u=n.marginRatio,c=n.maxColumnWidth,f=n.minColumnWidth,h=n.columnWidthRatio,v=o/l,d=1*u/(s-1),p=((1-d*(s-1))/s-v*(t-1))/t;if(p=h?1/s/t*h:p,!K(c)){var x=c/l;p=Math.min(p,x)}if(!K(f)){var m=f/l;p=Math.max(p,m)}p=a?a/l:p,d=(1-(p*t+v*(t-1))*s)/(s-1);var _=((1/2+i)*p+i*v+1/2*d)*s-d/2;return _},r.prototype.getIntervalAndDodgeOffset=function(t,i){var n=this,a=n.intervalPadding,o=n.dodgePadding,l=n.xDimensionLegenth,s=n.groupNum,u=a/l,c=o/l,f=((1-u*(s-1))/s-c*(t-1))/t,h=((1/2+i)*f+i*c+1/2*u)*s-u/2;return h},r.prototype.getDistribution=function(t){var i=this.adjustDataArray,n=this.cacheMap,a=n[t];return a||(a={},P(i,function(o,l){var s=Xn(o,t);s.length||s.push(0),P(s,function(u){a[u]||(a[u]=[]),a[u].push(l)})}),n[t]=a),a},r}(Ep);function cK(e,r){return(r-e)*Math.random()+e}var fK=function(e){v1(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=fi(t),n=qi(i);return this.adjustData(i,n),i},r.prototype.adjustDim=function(t,i,n){var a=this,o=this.groupData(n,t);return P(o,function(l,s){return a.adjustGroup(l,t,parseFloat(s),i)})},r.prototype.getAdjustOffset=function(t){var i=t.pre,n=t.next,a=(n-i)*sK;return cK(i+a,n-a)},r.prototype.adjustGroup=function(t,i,n,a){var o=this,l=this.getAdjustRange(i,n,a);return P(t,function(s){s[i]=o.getAdjustOffset(l)}),t},r}(Ep),Xw=lz,hK=function(e){v1(r,e);function r(t){var i=e.call(this,t)||this,n=t.adjustNames,a=n===void 0?["y"]:n,o=t.height,l=o===void 0?NaN:o,s=t.size,u=s===void 0?10:s,c=t.reverseOrder,f=c===void 0?!1:c;return i.adjustNames=a,i.height=l,i.size=u,i.reverseOrder=f,i}return r.prototype.process=function(t){var i=this,n=i.yField,a=i.reverseOrder,o=n?this.processStack(t):this.processOneDimStack(t);return a?this.reverse(o):o},r.prototype.reverse=function(t){return t.slice(0).reverse()},r.prototype.processStack=function(t){var i=this,n=i.xField,a=i.yField,o=i.reverseOrder,l=o?this.reverse(t):t,s=new Xw,u=new Xw;return l.map(function(c){return c.map(function(f){var h,v=I(f,n,0),d=I(f,[a]),p=v.toString();if(d=it(d)?d[1]:d,!K(d)){var x=d>=0?s:u;x.has(p)||x.set(p,0);var m=x.get(p),_=d+m;return x.set(p,_),io(io({},f),(h={},h[a]=[m,_],h))}return f})})},r.prototype.processOneDimStack=function(t){var i=this,n=this,a=n.xField,o=n.height,l=n.reverseOrder,s="y",u=l?this.reverse(t):t,c=new Xw;return u.map(function(f){return f.map(function(h){var v,d=i.size,p=h[a],x=d*2/o;c.has(p)||c.set(p,x/2);var m=c.get(p);return c.set(p,m+x),io(io({},h),(v={},v[s]=m,v))})})},r}(Ep),vK=function(e){v1(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=qi(t),n=this,a=n.xField,o=n.yField,l=this.getXValuesMaxMap(i),s=Math.max.apply(Math,Object.keys(l).map(function(u){return l[u]}));return je(t,function(u){return je(u,function(c){var f,h,v=c[o],d=c[a];if(it(v)){var p=(s-l[d])/2;return io(io({},c),(f={},f[o]=je(v,function(m){return p+m}),f))}var x=(s-v)/2;return io(io({},c),(h={},h[o]=[x,v+x],h))})})},r.prototype.getXValuesMaxMap=function(t){var i=this,n=this,a=n.xField,o=n.yField,l=Xi(t,function(s){return s[a]});return nz(l,function(s){return i.getDimMaxValue(s,o)})},r.prototype.getDimMaxValue=function(t,i){var n=je(t,function(o){return I(o,i,[])}),a=qi(n);return Math.max.apply(Math,a)},r}(Ep);Op("Dodge",uK);Op("Jitter",fK);Op("Stack",hK);Op("Symmetric",vK);var dK=Object.freeze(Object.defineProperty({__proto__:null,getAdjust:IM,registerAdjust:Op,Adjust:Ep},Symbol.toStringTag,{value:"Module"})),GV=_r(dK),$L=function(e,r){return Ct(r)?r:e.invert(e.scale(r))},Ch=function(){function e(r){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(r)}return e.prototype.mapping=function(){for(var r=this,t=[],i=0;i1?1:Number(r),i=e.length-1,n=Math.floor(i*t),a=i*t-n,o=e[n],l=n===i?o:e[n+1];return zV([Uw(o,l,a,0),Uw(o,l,a,1),Uw(o,l,a,2)])},zy,jV=function(e){if(e[0]==="#"&&e.length===7)return e;zy||(zy=_K()),zy.style.color=e;var r=document.defaultView.getComputedStyle(zy,"").getPropertyValue("color"),t=pK.exec(r),i=t[1].split(/\s*,\s*/).map(function(n){return Number(n)});return r=zV(i),r},wK=function(e){var r=Ct(e)?e.split("-"):e,t=je(r,function(i){return VV(i.indexOf("#")===-1?jV(i):i)});return function(i){return bK(t,i)}},CK=function(e){if(xK(e)){var r,t=void 0;if(e[0]==="l"){var i=gK.exec(e),n=+i[1]+90;t=i[2],r="linear-gradient("+n+"deg, "}else if(e[0]==="r"){r="radial-gradient(";var i=yK.exec(e);t=i[4]}var a=t.match(mK);return P(a,function(o,l){var s=o.split(":");r+=s[1]+" "+s[0]*100+"%",l!==a.length-1&&(r+=", ")}),r+=")",r}return e},Zo={rgb2arr:VV,gradient:wK,toRGB:sc(jV),toCSSGradient:CK},SK=Object.freeze(Object.defineProperty({__proto__:null,default:Zo},Symbol.toStringTag,{value:"Module"})),HV=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.type="color",i.names=["color"],Ct(i.values)&&(i.linear=!0),i.gradient=Zo.gradient(i.values),i}return r.prototype.getLinearValue=function(t){return this.gradient(t)},r}(Ch),YV=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.type="opacity",i.names=["opacity"],i}return r}(Ch),WV=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.names=["x","y"],i.type="position",i}return r.prototype.mapping=function(t,i){var n=this.scales,a=n[0],o=n[1];return K(t)||K(i)?[]:[it(t)?t.map(function(l){return a.scale(l)}):a.scale(t),it(i)?i.map(function(l){return o.scale(l)}):o.scale(i)]},r}(Ch),XV=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.type="shape",i.names=["shape"],i}return r.prototype.getLinearValue=function(t){var i=Math.round((this.values.length-1)*t);return this.values[i]},r}(Ch),UV=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.type="size",i.names=["size"],i}return r}(Ch),qV={};function ZV(e){return qV[e]}function Kn(e,r){qV[e]=r}var Sh=function(){function e(r){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__=r,this.initCfg(),this.init()}return e.prototype.translate=function(r){return r},e.prototype.change=function(r){Qt(this.__cfg__,r),this.init()},e.prototype.clone=function(){return this.constructor(this.__cfg__)},e.prototype.getTicks=function(){var r=this;return je(this.ticks,function(t,i){return qt(t)?t:{text:r.getText(t,i),tickValue:t,value:r.scale(t)}})},e.prototype.getText=function(r,t){var i=this.formatter,n=i?i(r,t):r;return K(n)||!pt(n.toString)?"":n.toString()},e.prototype.getConfig=function(r){return this.__cfg__[r]},e.prototype.init=function(){Qt(this,this.__cfg__),this.setDomain(),di(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},e.prototype.initCfg=function(){},e.prototype.setDomain=function(){},e.prototype.calculateTicks=function(){var r=this.tickMethod,t=[];if(Ct(r)){var i=ZV(r);if(!i)throw new Error("There is no method to to calculate ticks!");t=i(this)}else pt(r)&&(t=r(this));return t},e.prototype.rangeMin=function(){return this.range[0]},e.prototype.rangeMax=function(){return this.range[1]},e.prototype.calcPercent=function(r,t,i){return Mt(r)?(r-t)/(i-t):NaN},e.prototype.calcValue=function(r,t,i){return t+r*(i-t)},e}(),Fp=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="cat",t.isCategory=!0,t}return r.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;tthis.max?NaN:this.values[a]},r.prototype.getText=function(t){for(var i=[],n=1;n1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},r}(Sh),QV=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ll="\\d\\d?",Sl="\\d\\d",AK="\\d{3}",TK="\\d{4}",dd="[^\\s]+",KV=/\[([^]*?)\]/gm;function JV(e,r){for(var t=[],i=0,n=e.length;i-1?n:null}};function fs(e){for(var r=[],t=1;t3?0:(e-e%10!==10?1:0)*e%10]}},X0=fs({},LM),r5=function(e){return X0=fs(X0,e)},RL=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},ki=function(e,r){for(r===void 0&&(r=2),e=String(e);e.length0?"-":"+")+ki(Math.floor(Math.abs(r)/60)*100+Math.abs(r)%60,4)},Z:function(e){var r=e.getTimezoneOffset();return(r>0?"-":"+")+ki(Math.floor(Math.abs(r)/60),2)+":"+ki(Math.abs(r)%60,2)}},BL=function(e){return+e-1},NL=[null,Ll],GL=[null,dd],zL=["isPm",dd,function(e,r){var t=e.toLowerCase();return t===r.amPm[0]?0:t===r.amPm[1]?1:null}],VL=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var r=(e+"").match(/([+-]|\d\d)/gi);if(r){var t=+r[1]*60+parseInt(r[2],10);return r[0]==="+"?t:-t}return 0}],FK={D:["day",Ll],DD:["day",Sl],Do:["day",Ll+dd,function(e){return parseInt(e,10)}],M:["month",Ll,BL],MM:["month",Sl,BL],YY:["year",Sl,function(e){var r=new Date,t=+(""+r.getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",Ll,void 0,"isPm"],hh:["hour",Sl,void 0,"isPm"],H:["hour",Ll],HH:["hour",Sl],m:["minute",Ll],mm:["minute",Sl],s:["second",Ll],ss:["second",Sl],YYYY:["year",TK],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",Sl,function(e){return+e*10}],SSS:["millisecond",AK],d:NL,dd:NL,ddd:GL,dddd:GL,MMM:["month",dd,kL("monthNamesShort")],MMMM:["month",dd,kL("monthNames")],a:zL,A:zL,ZZ:VL,Z:VL},U0={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"},i5=function(e){return fs(U0,e)},n5=function(e,r,t){if(r===void 0&&(r=U0.default),t===void 0&&(t={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");r=U0[r]||r;var i=[];r=r.replace(KV,function(a,o){return i.push(o),"@@@"});var n=fs(fs({},X0),t);return r=r.replace(QV,function(a){return OK[a](e,n)}),r.replace(/@@@/g,function(){return i.shift()})};function a5(e,r,t){if(t===void 0&&(t={}),typeof r!="string")throw new Error("Invalid format in fecha parse");if(r=U0[r]||r,e.length>1e3)return null;var i=new Date,n={year:i.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],o=[],l=r.replace(KV,function(w,S){return o.push(RL(S)),"@@@"}),s={},u={};l=RL(l).replace(QV,function(w){var S=FK[w],M=S[0],O=S[1],F=S[3];if(s[M])throw new Error("Invalid format. "+M+" specified twice in format");return s[M]=!0,F&&(u[F]=!0),a.push(S),"("+O+")"}),Object.keys(u).forEach(function(w){if(!s[w])throw new Error("Invalid format. "+w+" is required in specified format")}),l=l.replace(/@@@/g,function(){return o.shift()});var c=e.match(new RegExp(l,"i"));if(!c)return null;for(var f=fs(fs({},X0),t),h=1;h11||n.month<0||n.day>31||n.day<1||n.hour>23||n.hour<0||n.minute>59||n.minute<0||n.second>59||n.second<0)return null;return m}var o5={format:n5,parse:a5,defaultI18n:LM,setGlobalDateI18n:r5,setGlobalDateMasks:i5},PK=Object.freeze(Object.defineProperty({__proto__:null,default:o5,assign:fs,format:n5,parse:a5,defaultI18n:LM,setGlobalDateI18n:r5,setGlobalDateMasks:i5},Symbol.toStringTag,{value:"Module"}));function IK(e){return function(r,t,i,n){for(var a=K(i)?0:i,o=K(n)?r.length:n;a>>1;e(r[l])>t?o=l:a=l+1}return a}}var jL="format";function l5(e,r){var t=PK[jL]||o5[jL];return t(e,r)}function q0(e){return Ct(e)&&(e.indexOf("T")>0?e=new Date(e).getTime():e=new Date(e.replace(/-/gi,"/")).getTime()),fM(e)&&(e=e.getTime()),e}var pa=1e3,$u=60*pa,ku=60*$u,Wo=24*ku,pd=Wo*31,HL=Wo*365,hv=[["HH:mm:ss",pa],["HH:mm:ss",pa*10],["HH:mm:ss",pa*30],["HH:mm",$u],["HH:mm",$u*10],["HH:mm",$u*30],["HH",ku],["HH",ku*6],["HH",ku*12],["YYYY-MM-DD",Wo],["YYYY-MM-DD",Wo*4],["YYYY-WW",Wo*7],["YYYY-MM",pd],["YYYY-MM",pd*4],["YYYY-MM",pd*6],["YYYY",Wo*380]];function LK(e,r,t){var i=(r-e)/t,n=IK(function(o){return o[1]})(hv,i)-1,a=hv[n];return n<0?a=hv[0]:n>=hv.length&&(a=nr(hv)),a}var s5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="timeCat",t}return r.prototype.translate=function(t){t=q0(t);var i=this.values.indexOf(t);return i===-1&&(Mt(t)&&t-1){var a=this.values[n],o=this.formatter;return a=o?o(a,i):l5(a,this.mask),a}return t},r.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},r.prototype.setDomain=function(){var t=this.values;P(t,function(i,n){t[n]=q0(i)}),t.sort(function(i,n){return i-n}),e.prototype.setDomain.call(this)},r}(Fp),d1=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isContinuous=!0,t}return r.prototype.scale=function(t){if(K(t))return NaN;var i=this.rangeMin(),n=this.rangeMax(),a=this.max,o=this.min;if(a===o)return i;var l=this.getScalePercent(t);return i+l*(n-i)},r.prototype.init=function(){e.prototype.init.call(this);var t=this.ticks,i=Wi(t),n=nr(t);ithis.max&&(this.max=n),K(this.minLimit)||(this.min=i),K(this.maxLimit)||(this.max=n)},r.prototype.setDomain=function(){var t=lM(this.values),i=t.min,n=t.max;K(this.min)&&(this.min=i),K(this.max)&&(this.max=n),this.min>this.max&&(this.min=i,this.max=n)},r.prototype.calculateTicks=function(){var t=this,i=e.prototype.calculateTicks.call(this);return this.nice||(i=zr(i,function(n){return n>=t.min&&n<=t.max})),i},r.prototype.getScalePercent=function(t){var i=this.max,n=this.min;return(t-n)/(i-n)},r.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},r}(Sh),Ah=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="linear",t.isLinear=!0,t}return r.prototype.invert=function(t){var i=this.getInvertPercent(t);return this.min+i*(this.max-this.min)},r.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},r}(d1);function Gl(e,r){var t=Math.E,i;return r>=0?i=Math.pow(t,Math.log(r)/e):i=Math.pow(t,Math.log(-r)/e)*-1,i}function Gn(e,r){return e===1?1:Math.log(r)/Math.log(e)}function u5(e,r,t){K(t)&&(t=Math.max.apply(null,e));var i=t;return P(e,function(n){n>0&&n1&&(i=1),i}var c5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="log",t}return r.prototype.invert=function(t){var i=this.base,n=Gn(i,this.max),a=this.rangeMin(),o=this.rangeMax()-a,l,s=this.positiveMin;if(s){if(t===0)return 0;l=Gn(i,s/i);var u=1/(n-l)*o;if(t=0?1:-1;return Math.pow(l,n)*s},r.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},r.prototype.getScalePercent=function(t){var i=this.max,n=this.min;if(i===n)return 0;var a=this.exponent,o=(Gl(a,t)-Gl(a,n))/(Gl(a,i)-Gl(a,n));return o},r}(d1),h5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="time",t}return r.prototype.getText=function(t,i){var n=this.translate(t),a=this.formatter;return a?a(n,i):l5(n,this.mask)},r.prototype.scale=function(t){var i=t;return(Ct(i)||fM(i))&&(i=this.translate(i)),e.prototype.scale.call(this,i)},r.prototype.translate=function(t){return q0(t)},r.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},r.prototype.setDomain=function(){var t=this.values,i=this.getConfig("min"),n=this.getConfig("max");if((!K(i)||!Mt(i))&&(this.min=this.translate(this.min)),(!K(n)||!Mt(n))&&(this.max=this.translate(this.max)),t&&t.length){var a=[],o=1/0,l=o,s=0;P(t,function(u){var c=q0(u);if(isNaN(c))throw new TypeError("Invalid Time: "+u+" in time scale!");o>c?(l=o,o=c):l>c&&(l=c),s1&&(this.minTickInterval=l-o),K(i)&&(this.min=o),K(n)&&(this.max=s)}},r}(Ah),DM=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="quantize",t}return r.prototype.invert=function(t){var i=this.ticks,n=i.length,a=this.getInvertPercent(t),o=Math.floor(a*(n-1));if(o>=n-1)return nr(i);if(o<0)return Wi(i);var l=i[o],s=i[o+1],u=o/(n-1),c=(o+1)/(n-1);return l+(a-u)/(c-u)*(s-l)},r.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},r.prototype.calculateTicks=function(){var t=e.prototype.calculateTicks.call(this);return this.nice||(nr(t)!==this.max&&t.push(this.max),Wi(t)!==this.min&&t.unshift(this.min)),t},r.prototype.getScalePercent=function(t){var i=this.ticks;if(tnr(i))return 1;var n=0;return P(i,function(a,o){if(t>=a)n=o;else return!1}),n/(i.length-1)},r}(d1),v5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="quantile",t}return r.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},r}(DM),d5={};function Gd(e){return d5[e]}function Jn(e,r){if(Gd(e))throw new Error("type '"+e+"' existed.");d5[e]=r}var p5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="identity",t.isIdentity=!0,t}return r.prototype.calculateTicks=function(){return this.values},r.prototype.scale=function(t){return this.values[0]!==t&&Mt(t)?t:this.range[0]},r.prototype.invert=function(t){var i=this.range;return ti[1]?NaN:this.values[0]},r}(Sh);function g5(e){var r=e.values,t=e.tickInterval,i=e.tickCount,n=e.showLast;if(Mt(t)){var a=zr(r,function(d,p){return p%t===0}),o=nr(r);return n&&nr(a)!==o&&a.push(o),a}var l=r.length,s=e.min,u=e.max;if(K(s)&&(s=0),K(u)&&(u=r.length-1),!Mt(i)||i>=l)return r.slice(s,u+1);if(i<=0||u<=0)return[];for(var c=i===1?l:Math.floor(l/(i-1)),f=[],h=s,v=0;v=u);v++)h=Math.min(s+v*c,u),v===i-1&&n?f.push(r[u]):f.push(r[h]);return f}function DK(e){var r=e.min,t=e.max,i=e.nice,n=e.tickCount,a=new $K;return a.domain([r,t]),i&&a.nice(n),a.ticks(n)}var Zw=5,YL=Math.sqrt(50),WL=Math.sqrt(10),XL=Math.sqrt(2),$K=function(){function e(){this._domain=[0,1]}return e.prototype.domain=function(r){return r?(this._domain=Array.from(r,Number),this):this._domain.slice()},e.prototype.nice=function(r){var t,i;r===void 0&&(r=Zw);var n=this._domain.slice(),a=0,o=this._domain.length-1,l=this._domain[a],s=this._domain[o],u;return s0?(l=Math.floor(l/u)*u,s=Math.ceil(s/u)*u,u=p0(l,s,r)):u<0&&(l=Math.ceil(l*u)/u,s=Math.floor(s*u)/u,u=p0(l,s,r)),u>0?(n[a]=Math.floor(l/u)*u,n[o]=Math.ceil(s/u)*u,this.domain(n)):u<0&&(n[a]=Math.ceil(l*u)/u,n[o]=Math.floor(s*u)/u,this.domain(n)),this},e.prototype.ticks=function(r){return r===void 0&&(r=Zw),kK(this._domain[0],this._domain[this._domain.length-1],r||Zw)},e}();function kK(e,r,t){var i,n=-1,a,o,l;if(r=+r,e=+e,t=+t,e===r&&t>0)return[e];if((i=r0)for(e=Math.ceil(e/l),r=Math.floor(r/l),o=new Array(a=Math.ceil(r-e+1));++n=0?(a>=YL?10:a>=WL?5:a>=XL?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=YL?10:a>=WL?5:a>=XL?2:1)}function UL(e,r,t){var i;return t==="ceil"?i=Math.ceil(e/r):t==="floor"?i=Math.floor(e/r):i=Math.round(e/r),i*r}function $M(e,r,t){var i=UL(e,t,"floor"),n=UL(r,t,"ceil");i=d0(i,t),n=d0(n,t);for(var a=[],o=Math.max((n-i)/(Math.pow(2,12)-1),t),l=i;l<=n;l=l+o){var s=d0(l,o);a.push(s)}return{min:i,max:n,ticks:a}}function kM(e,r,t){var i,n=e.minLimit,a=e.maxLimit,o=e.min,l=e.max,s=e.tickCount,u=s===void 0?5:s,c=K(n)?K(r)?o:r:n,f=K(a)?K(t)?l:t:a;if(c>f&&(i=[c,f],f=i[0],c=i[1]),u<=2)return[c,f];for(var h=(f-c)/(u-1),v=[],d=0;d=0&&(s=1),1-l/(o-1)-t+s}function VK(e,r,t){var i=gr(r),n=hM(r,e),a=1;return 1-n/(i-1)-t+a}function jK(e,r,t,i,n,a){var o=(e-1)/(a-n),l=(r-1)/(Math.max(a,i)-Math.min(t,n));return 2-Math.max(o/l,l/o)}function HK(e,r){return e>=r?2-(e-1)/(r-1):1}function YK(e,r,t,i){var n=r-e;return 1-.5*(Math.pow(r-i,2)+Math.pow(e-t,2))/Math.pow(.1*n,2)}function WK(e,r,t){var i=r-e;if(t>i){var n=(t-i)/2;return 1-Math.pow(n,2)/Math.pow(.1*i,2)}return 1}function XK(){return 1}function UK(e,r,t,i,n,a){t===void 0&&(t=5),i===void 0&&(i=!0),n===void 0&&(n=BK),a===void 0&&(a=[.25,.2,.5,.05]);var o=t<0?0:Math.round(t);if(Number.isNaN(e)||Number.isNaN(r)||typeof e!="number"||typeof r!="number"||!o)return{min:0,max:0,ticks:[]};if(r-e<1e-15||o===1)return{min:e,max:r,ticks:[e]};if(r-e>1e148){var l=t||5,s=(r-e)/l;return{min:e,max:r,ticks:Array(l).fill(null).map(function(tt,ot){return hu(e+s*ot)})}}for(var u={score:-2,lmin:0,lmax:0,lstep:0},c=1;c<1/0;){for(var f=0;fu.score&&(!i||F<=e&&L>=r)&&(u.lmin=F,u.lmax=L,u.lstep=D,u.score=U)}m+=1}d+=1}}c+=1}var B=hu(u.lmax),G=hu(u.lmin),N=hu(u.lstep),W=Math.floor(GK((B-G)/N))+1,q=new Array(W);q[0]=hu(G);for(var f=1;f0)o=Math.floor(Gn(r,i));else{var s=u5(a,r,n);o=Math.floor(Gn(r,s))}for(var u=l-o,c=Math.ceil(u/t),f=[],h=o;h=0?1:-1;return Math.pow(o,r)*l})}function KK(e,r){var t=e.length*r;return r===1?e[e.length-1]:r===0?e[0]:t%1!==0?e[Math.ceil(t)-1]:e.length%2===0?(e[t-1]+e[t])/2:e[t]}function JK(e){var r=e.tickCount,t=e.values;if(!t||!t.length)return[];for(var i=t.slice().sort(function(l,s){return l-s}),n=[],a=0;a1&&(n=n*Math.ceil(l)),i&&nHL)for(var s=Z0(t),u=Math.ceil(a/HL),c=l;c<=s+u;c=c+u)o.push(iJ(c));else if(a>pd)for(var f=Math.ceil(a/pd),h=PA(r),v=nJ(r,t),c=0;c<=v+f;c=c+f)o.push(aJ(l,c+h));else if(a>Wo)for(var d=new Date(r),p=d.getFullYear(),x=d.getMonth(),m=d.getDate(),_=Math.ceil(a/Wo),b=oJ(r,t),c=0;cku)for(var d=new Date(r),p=d.getFullYear(),x=d.getMonth(),_=d.getDate(),w=d.getHours(),S=Math.ceil(a/ku),M=lJ(r,t),c=0;c<=M+S;c=c+S)o.push(new Date(p,x,_,w+c).getTime());else if(a>$u)for(var O=sJ(r,t),F=Math.ceil(a/$u),c=0;c<=O+F;c=c+F)o.push(r+c*$u);else{var L=a;L=512&&console.warn("Notice: current ticks length("+o.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+a+") is too small, increase the value to solve the problem!"),o}Kn("cat",g5);Kn("time-cat",rJ);Kn("wilkinson-extended",qK);Kn("r-pretty",tJ);Kn("time",eJ);Kn("time-pretty",uJ);Kn("log",ZK);Kn("pow",QK);Kn("quantile",JK);Kn("d3-linear",RK);Jn("cat",Fp);Jn("category",Fp);Jn("identity",p5);Jn("linear",Ah);Jn("log",c5);Jn("pow",f5);Jn("time",h5);Jn("timeCat",s5);Jn("quantize",DM);Jn("quantile",v5);var cJ=Object.freeze(Object.defineProperty({__proto__:null,Category:Fp,Identity:p5,Linear:Ah,Log:c5,Pow:f5,Time:h5,TimeCat:s5,Quantile:v5,Quantize:DM,Scale:Sh,getScale:Gd,registerScale:Jn,getTickMethod:ZV,registerTickMethod:Kn},Symbol.toStringTag,{value:"Module"})),m5={},RM=function(e){return m5[e.toLowerCase()]},Th=function(e,r){if(RM(e))throw new Error("Attribute type '".concat(e,"' existed."));m5[e.toLowerCase()]=r};Th("Color",HV);Th("Opacity",YV);Th("Position",WV);Th("Shape",XV);Th("Size",UV);var fJ=Object.freeze(Object.defineProperty({__proto__:null,registerAttribute:Th,getAttribute:RM,Attribute:Ch,Color:HV,Opacity:YV,Position:WV,Shape:XV,Size:UV,Scale:Sh},Symbol.toStringTag,{value:"Module"})),IA=_r(fJ),Pp=function(){function e(r){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var t=r.start,i=r.end,n=r.matrix,a=n===void 0?[1,0,0,0,1,0,0,0,1]:n,o=r.isTransposed,l=o===void 0?!1:o;this.start=t,this.end=i,this.matrix=a,this.originalMatrix=qr([],a),this.isTransposed=l}return e.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},e.prototype.update=function(r){Qt(this,r),this.initial()},e.prototype.convertDim=function(r,t){var i,n=this[t],a=n.start,o=n.end;return this.isReflect(t)&&(i=[o,a],a=i[0],o=i[1]),a+r*(o-a)},e.prototype.invertDim=function(r,t){var i,n=this[t],a=n.start,o=n.end;return this.isReflect(t)&&(i=[o,a],a=i[0],o=i[1]),(r-a)/(o-a)},e.prototype.applyMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=[r,t,i];return kf(a,a,n),a},e.prototype.invertMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=Dz([0,0,0,0,0,0,0,0,0],n),o=[r,t,i];return a&&kf(o,o,a),o},e.prototype.convert=function(r){var t=this.convertPoint(r),i=t.x,n=t.y,a=this.applyMatrix(i,n,1);return{x:a[0],y:a[1]}},e.prototype.invert=function(r){var t=this.invertMatrix(r.x,r.y,1);return this.invertPoint({x:t[0],y:t[1]})},e.prototype.rotate=function(r){var t=this.matrix,i=this.center;return mu(t,t,[-i.x,-i.y]),o1(t,t,r),mu(t,t,[i.x,i.y]),this},e.prototype.reflect=function(r){return r==="x"?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},e.prototype.scale=function(r,t){var i=this.matrix,n=this.center;return mu(i,i,[-n.x,-n.y]),_M(i,i,[r,t]),mu(i,i,[n.x,n.y]),this},e.prototype.translate=function(r,t){var i=this.matrix;return mu(i,i,[r,t]),this},e.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},e.prototype.getCenter=function(){return this.center},e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.getRadius=function(){return this.radius},e.prototype.isReflect=function(r){return r==="x"?this.isReflectX:this.isReflectY},e.prototype.resetMatrix=function(r){this.matrix=r||qr([],this.originalMatrix)},e}(),x5=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.isRect=!0,i.type="cartesian",i.initial(),i}return r.prototype.initial=function(){e.prototype.initial.call(this);var t=this.start,i=this.end;this.x={start:t.x,end:i.x},this.y={start:t.y,end:i.y}},r.prototype.convertPoint=function(t){var i,n=t.x,a=t.y;return this.isTransposed&&(i=[a,n],n=i[0],a=i[1]),{x:this.convertDim(n,"x"),y:this.convertDim(a,"y")}},r.prototype.invertPoint=function(t){var i,n=this.invertDim(t.x,"x"),a=this.invertDim(t.y,"y");return this.isTransposed&&(i=[a,n],n=i[0],a=i[1]),{x:n,y:a}},r}(Pp),hJ=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.isHelix=!0,i.type="helix";var n=t.startAngle,a=n===void 0?1.25*Math.PI:n,o=t.endAngle,l=o===void 0?7.25*Math.PI:o,s=t.innerRadius,u=s===void 0?0:s,c=t.radius;return i.startAngle=a,i.endAngle=l,i.innerRadius=u,i.radius=c,i.initial(),i}return r.prototype.initial=function(){e.prototype.initial.call(this);var t=(this.endAngle-this.startAngle)/(2*Math.PI)+1,i=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(i=i*this.radius),this.d=Math.floor(i*(1-this.innerRadius)/t),this.a=this.d/(Math.PI*2),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*i,end:this.innerRadius*i+this.d*.99}},r.prototype.convertPoint=function(t){var i,n=t.x,a=t.y;this.isTransposed&&(i=[a,n],n=i[0],a=i[1]);var o=this.convertDim(n,"x"),l=this.a*o,s=this.convertDim(a,"y");return{x:this.center.x+Math.cos(o)*(l+s),y:this.center.y+Math.sin(o)*(l+s)}},r.prototype.invertPoint=function(t){var i,n=this.d+this.y.start,a=yM([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=l1(a,[1,0],!0),l=o*this.a;Yl(a)this.width/i?(l=this.width/i,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*l*n}):(l=this.height/n,this.circleCenter={x:this.center.x-(.5-a)*l*i,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=l*this.radius:(this.radius<=0||this.radius>l)&&(this.polarRadius=l):this.polarRadius=l,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},r.prototype.getRadius=function(){return this.polarRadius},r.prototype.convertPoint=function(t){var i,n=this.getCenter(),a=t.x,o=t.y;return this.isTransposed&&(i=[o,a],a=i[0],o=i[1]),a=this.convertDim(a,"x"),o=this.convertDim(o,"y"),{x:n.x+Math.cos(a)*o,y:n.y+Math.sin(a)*o}},r.prototype.invertPoint=function(t){var i,n=this.getCenter(),a=[t.x-n.x,t.y-n.y],o=this,l=o.startAngle,s=o.endAngle;this.isReflect("x")&&(i=[s,l],l=i[0],s=i[1]);var u=[1,0,0,0,1,0,0,0,1];o1(u,u,l);var c=[1,0,0];kf(c,c,u);var f=[c[0],c[1]],h=l1(f,a,s0?d:-d;var p=this.invertDim(v,"y"),x={x:0,y:0};return x.x=this.isTransposed?p:d,x.y=this.isTransposed?d:p,x},r.prototype.getCenter=function(){return this.circleCenter},r.prototype.getOneBox=function(){var t=this.startAngle,i=this.endAngle;if(Math.abs(i-t)>=Math.PI*2)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(i)],a=[0,Math.sin(t),Math.sin(i)],o=Math.min(t,i);o=0;i--)e.removeChild(r[i])}function xJ(e,r){return!!e.className.match(new RegExp("(\\s|^)"+r+"(\\s|$)"))}function zd(e){var r=e.start,t=e.end,i=Math.min(r.x,t.x),n=Math.min(r.y,t.y),a=Math.max(r.x,t.x),o=Math.max(r.y,t.y);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}function _J(e){var r=e.map(function(l){return l.x}),t=e.map(function(l){return l.y}),i=Math.min.apply(Math,r),n=Math.min.apply(Math,t),a=Math.max.apply(Math,r),o=Math.max.apply(Math,t);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}function p1(e,r,t,i){var n=e+t,a=r+i;return{x:e,y:r,width:t,height:i,minX:e,minY:r,maxX:isNaN(n)?0:n,maxY:isNaN(a)?0:a}}function Ru(e,r,t){return(1-t)*e+r*t}function Sf(e,r,t){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}function bJ(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}var K0=function(e,r,t){return t===void 0&&(t=Math.pow(Number.EPSILON,.5)),[e,r].includes(1/0)?Math.abs(e)===Math.abs(r):Math.abs(e-r)0?P(s,function(u){if(u.get("visible")){if(u.isGroup()&&u.get("children").length===0)return!0;var c=S5(u),f=u.applyToMatrix([c.minX,c.minY,1]),h=u.applyToMatrix([c.minX,c.maxY,1]),v=u.applyToMatrix([c.maxX,c.minY,1]),d=u.applyToMatrix([c.maxX,c.maxY,1]),p=Math.min(f[0],h[0],v[0],d[0]),x=Math.max(f[0],h[0],v[0],d[0]),m=Math.min(f[1],h[1],v[1],d[1]),_=Math.max(f[1],h[1],v[1],d[1]);pa&&(a=x),ml&&(l=_)}}):(n=0,a=0,o=0,l=0),i=p1(n,o,a-n,l-o)}return t?wJ(i,t):i}function CJ(e,r){if(!(!e.getClip()&&!r.getClip())){var t=r.getClip();if(!t){e.setClip(null);return}var i={type:t.get("type"),attrs:t.attr()};e.setClip(i)}}function Ni(e){return e+"px"}function A5(e,r,t,i){var n=bJ(e,r),a=i/n,o=0;return t==="start"?o=0-a:t==="end"&&(o=1+a),{x:Ru(e.x,r.x,o),y:Ru(e.y,r.y,o)}}var SJ={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},VM=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.initCfg(),i}return r.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}},r.prototype.clear=function(){},r.prototype.update=function(t){var i=this,n=this.get("defaultCfg")||{};P(t,function(a,o){var l=i.get(o),s=a;l!==a&&(qt(a)&&n[o]&&(s=ft({},n[o],a)),i.set(o,s))}),this.updateInner(t),this.afterUpdate(t)},r.prototype.updateInner=function(t){},r.prototype.afterUpdate=function(t){po(t,"visible")&&(t.visible?this.show():this.hide()),po(t,"capture")&&this.setCapture(t.capture)},r.prototype.getLayoutBBox=function(){return this.getBBox()},r.prototype.getLocationType=function(){return this.get("locationType")},r.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},r.prototype.setOffset=function(t,i){this.update({offsetX:t,offsetY:i})},r.prototype.setLocation=function(t){var i=A({},t);this.update(i)},r.prototype.getLocation=function(){var t=this,i={},n=this.get("locationType"),a=SJ[n];return P(a,function(o){i[o]=t.get(o)}),i},r.prototype.isList=function(){return!1},r.prototype.isSlider=function(){return!1},r.prototype.init=function(){},r.prototype.initCfg=function(){var t=this,i=this.get("defaultCfg");P(i,function(n,a){var o=t.get(a);if(qt(o)){var l=ft({},n,o);t.set(a,l)}})},r}(yp),Js="update_status",AJ=["visible","tip","delegateObject"],TJ=["container","group","shapesMap","isRegister","isUpdating","destroyed"],Vr=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},r.prototype.remove=function(){this.clear();var t=this.get("group");t.remove()},r.prototype.clear=function(){var t=this.get("group");t.clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},r.prototype.getChildComponentById=function(t){var i=this.getElementById(t),n=i&&i.get("component");return n},r.prototype.getElementById=function(t){return this.get("shapesMap")[t]},r.prototype.getElementByLocalId=function(t){var i=this.getElementId(t);return this.getElementById(i)},r.prototype.getElementsByName=function(t){var i=[];return P(this.get("shapesMap"),function(n){n.get("name")===t&&i.push(n)}),i},r.prototype.getContainer=function(){return this.get("container")},r.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},r.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var i=this.get("group");this.updateElements(t,i),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},r.prototype.show=function(){var t=this.get("group");t.show(),this.set("visible",!0)},r.prototype.hide=function(){var t=this.get("group");t.hide(),this.set("visible",!1)},r.prototype.setCapture=function(t){var i=this.get("group");i.set("capture",t),this.set("capture",t)},r.prototype.destroy=function(){this.removeEvent(),this.remove(),e.prototype.destroy.call(this)},r.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},r.prototype.getLayoutBBox=function(){var t=this.get("group"),i=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(i=mJ(n,i)),i},r.prototype.on=function(t,i,n){var a=this.get("group");return a.on(t,i,n),this},r.prototype.off=function(t,i){var n=this.get("group");return n&&n.off(t,i),this},r.prototype.emit=function(t,i){var n=this.get("group");n.emit(t,i)},r.prototype.init=function(){e.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},r.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},r.prototype.delegateEmit=function(t,i){var n=this.get("group");i.target=n,n.emit(t,i),BM(n,t,i)},r.prototype.createOffScreenGroup=function(){var t=this.get("group"),i=t.getGroupBase(),n=new i({delegateObject:this.getDelegateObject()});return n},r.prototype.applyOffset=function(){var t=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:i})},r.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()}))},r.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",S5(t)),t},r.prototype.addGroup=function(t,i){this.appendDelegateObject(t,i);var n=t.addGroup(i);return this.get("isRegister")&&this.registerElement(n),n},r.prototype.addShape=function(t,i){this.appendDelegateObject(t,i);var n=t.addShape(i);return this.get("isRegister")&&this.registerElement(n),n},r.prototype.addComponent=function(t,i){var n=i.id,a=i.component,o=ue(i,["id","component"]),l=new a(A(A({},o),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return l.init(),l.render(),this.get("isRegister")&&this.registerElement(l.get("group")),l},r.prototype.initEvent=function(){},r.prototype.removeEvent=function(){var t=this.get("group");t.off()},r.prototype.getElementId=function(t){var i=this.get("id"),n=this.get("name");return i+"-"+n+"-"+t},r.prototype.registerElement=function(t){var i=t.get("id");this.get("shapesMap")[i]=t},r.prototype.unregisterElement=function(t){var i=t.get("id");delete this.get("shapesMap")[i]},r.prototype.moveElementTo=function(t,i){var n=NM(i);t.attr("matrix",n)},r.prototype.addAnimation=function(t,i,n){var a=i.attr("opacity");K(a)&&(a=1),i.attr("opacity",0),i.animate({opacity:a},n)},r.prototype.removeAnimation=function(t,i,n){i.animate({opacity:0},n)},r.prototype.updateAnimation=function(t,i,n,a){i.animate(n,a)},r.prototype.updateElements=function(t,i){var n=this,a=this.get("animate"),o=this.get("animateOption"),l=t.getChildren().slice(0),s;P(l,function(u){var c=u.get("id"),f=n.getElementById(c),h=u.get("name");if(f)if(u.get("isComponent")){var v=u.get("component"),d=f.get("component"),p=e1(v.cfg,HG(oc(v.cfg),TJ));d.update(p),f.set(Js,"update")}else{var x=n.getReplaceAttrs(f,u);a&&o.update?n.updateAnimation(h,f,x,o.update):f.attr(x),u.isGroup()&&n.updateElements(u,f),P(AJ,function(w){f.set(w,u.get(w))}),CJ(f,u),s=f,f.set(Js,"update")}else{i.add(u);var m=i.getChildren();if(m.splice(m.length-1,1),s){var _=m.indexOf(s);m.splice(_+1,0,u)}else m.unshift(u);if(n.registerElement(u),u.set(Js,"add"),u.get("isComponent")){var v=u.get("component");v.set("container",i)}else u.isGroup()&&n.registerNewGroup(u);if(s=u,a){var b=n.get("isInit")?o.appear:o.enter;b&&n.addAnimation(h,u,b)}}})},r.prototype.clearUpdateStatus=function(t){var i=t.getChildren();P(i,function(n){n.set(Js,null)})},r.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},r.prototype.getDelegateObject=function(){var t,i=this.get("name"),n=(t={},t[i]=this,t.component=this,t);return n},r.prototype.appendDelegateObject=function(t,i){var n=t.get("delegateObject");i.delegateObject||(i.delegateObject={}),Qt(i.delegateObject,n)},r.prototype.getReplaceAttrs=function(t,i){var n=t.attr(),a=i.attr();return P(n,function(o,l){a[l]===void 0&&(a[l]=void 0)}),a},r.prototype.registerNewGroup=function(t){var i=this,n=t.getChildren();P(n,function(a){i.registerElement(a),a.set(Js,"add"),a.isGroup()&&i.registerNewGroup(a)})},r.prototype.deleteElements=function(){var t=this,i=this.get("shapesMap"),n=[];P(i,function(l,s){!l.get(Js)||l.destroyed?n.push([s,l]):l.set(Js,null)});var a=this.get("animate"),o=this.get("animateOption");P(n,function(l){var s=l[0],u=l[1];if(!u.destroyed){var c=u.get("name");if(a&&o.leave){var f=Qt({callback:function(){t.removeElement(u)}},o.leave);t.removeAnimation(c,u,f)}else t.removeElement(u)}delete i[s]})},r.prototype.removeElement=function(t){if(t.get("isGroup")){var i=t.get("component");i&&i.destroy()}t.remove()},r}(VM),Qw="\u2026";function MJ(e){for(var r=0,t=0;t0&&e.charCodeAt(r)<128?1:2}function EJ(e,r,t){t===void 0&&(t="tail");var i=e.length,n="";if(t==="tail"){for(var a=0,o=0;a=19968&&l<=40869?a+=2:a+=1}a>t&&(t=a,i=n)}return e[i].getBBox().width}function LA(e){if(e.length>PJ)return IJ(e);var r=0;return P(e,function(t){var i=t.getBBox(),n=i.width;r=0?h=EJ(a,f,i):h=OJ,h&&(r.attr("text",h),c=!0)}return c?r.set("tip",a):r.set("tip",null),c}function g1(e,r){var t=r.x,i=r.y,n=r.content,a=r.style,o=r.id,l=r.name,s=r.rotate,u=r.maxLength,c=r.autoEllipsis,f=r.isVertical,h=r.ellipsisPosition,v=r.background,d=e.addGroup({id:o+"-group",name:l+"-group",attrs:{x:t,y:i}}),p=d.addShape({type:"text",id:o,name:l,attrs:A({x:0,y:0,text:n},a)}),x=Q0(I(v,"padding",0));if(u&&c){var m=u-(x[1]+x[3]);gd(!f,p,m,h)}if(v){var _=I(v,"style",{}),b=p.getCanvasBBox(),w=b.minX,S=b.minY,M=b.width,O=b.height,F=d.addShape("rect",{id:o+"-bg",name:o+"-bg",attrs:A({x:w-x[3],y:S-x[0],width:M+x[1]+x[3],height:O+x[0]+x[2]},_)});F.toBack()}GM(d,t,i),C5(d,s,t,i)}var Ht={fontFamily:` BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"`,textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"},DJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:Ht.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:Ht.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:Ht.lineColor,lineWidth:1}}}})},r.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},r.prototype.renderLine=function(t){var i=this.get("start"),n=this.get("end"),a=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:A({x1:i.x,y1:i.y,x2:n.x,y2:n.y},a)})},r.prototype.getLabelPoint=function(t,i,n){var a;return n==="start"?a=0:n==="center"?a=.5:Ct(n)&&n.indexOf("%")!==-1?a=parseInt(n,10)/100:Mt(n)?a=n:a=1,(a>1||a<0)&&(a=1),{x:Ru(t.x,i.x,a),y:Ru(t.y,i.y,a)}},r.prototype.renderLabel=function(t){var i=this.get("text"),n=this.get("start"),a=this.get("end"),o=i.position,l=i.content,s=i.style,u=i.offsetX,c=i.offsetY,f=i.autoRotate,h=i.maxLength,v=i.autoEllipsis,d=i.ellipsisPosition,p=i.background,x=i.isVertical,m=x===void 0?!1:x,_=this.getLabelPoint(n,a,o),b=_.x+u,w=_.y+c,S={id:this.getElementId("line-text"),name:"annotation-line-text",x:b,y:w,content:l,style:s,maxLength:h,autoEllipsis:v,ellipsisPosition:d,background:p,isVertical:m};if(f){var M=[a.x-n.x,a.y-n.y];S.rotate=Math.atan2(M[1],M[0])}g1(t,S)},r}(Vr),$J=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{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:Ht.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Ht.fontFamily}}})},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},r.prototype.renderInner=function(t){var i=this.getLocation(),n=i.x,a=i.y,o=this.get("content"),l=this.get("style"),s=this.getElementId("text"),u=this.get("name")+"-text",c=this.get("maxLength"),f=this.get("autoEllipsis"),h=this.get("isVertical"),v=this.get("ellipsisPosition"),d=this.get("background"),p=this.get("rotate"),x={id:s,name:u,x:n,y:a,content:o,style:l,maxLength:c,autoEllipsis:f,isVertical:h,ellipsisPosition:v,background:d,rotate:p};g1(t,x)},r.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var i=this.getLocation(),n=i.x,a=i.y,o=this.get("rotate");GM(t,n,a),C5(t,o,n,a)}},r}(Vr),kJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2,style:{stroke:"#999",lineWidth:1}})},r.prototype.renderInner=function(t){this.renderArc(t)},r.prototype.getArcPath=function(){var t=this.getLocation(),i=t.center,n=t.radius,a=t.startAngle,o=t.endAngle,l=Sf(i,n,a),s=Sf(i,n,o),u=o-a>Math.PI?1:0,c=[["M",l.x,l.y]];if(o-a===Math.PI*2){var f=Sf(i,n,a+Math.PI);c.push(["A",n,n,0,u,1,f.x,f.y]),c.push(["A",n,n,0,u,1,s.x,s.y])}else c.push(["A",n,n,0,u,1,s.x,s.y]);return c},r.prototype.renderArc=function(t){var i=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:A({path:i},n)})},r}(Vr),RJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Ht.regionColor,opacity:.4}}})},r.prototype.renderInner=function(t){this.renderRegion(t)},r.prototype.renderRegion=function(t){var i=this.get("start"),n=this.get("end"),a=this.get("style"),o=zd({start:i,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:A({x:o.x,y:o.y,width:o.width,height:o.height},a)})},r}(Vr),BJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},r.prototype.renderInner=function(t){this.renderImage(t)},r.prototype.getImageAttrs=function(){var t=this.get("start"),i=this.get("end"),n=this.get("style"),a=zd({start:t,end:i}),o=this.get("src");return A({x:a.x,y:a.y,img:o,width:a.width,height:a.height},n)},r.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},r}(Vr),NJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{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:Ht.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Ht.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Ht.fontFamily}}}})},r.prototype.renderInner=function(t){I(this.get("line"),"display")&&this.renderLine(t),I(this.get("text"),"display")&&this.renderText(t),I(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},r.prototype.renderPoint=function(t){var i=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:i})},r.prototype.renderLine=function(t){var i=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:i})},r.prototype.renderText=function(t){var i=this.getShapeAttrs().text,n=i.x,a=i.y,o=i.text,l=ue(i,["x","y","text"]),s=this.get("text"),u=s.background,c=s.maxLength,f=s.autoEllipsis,h=s.isVertival,v=s.ellipsisPosition,d={x:n,y:a,id:this.getElementId("text"),name:"annotation-text",content:o,style:l,background:u,maxLength:c,autoEllipsis:f,isVertival:h,ellipsisPosition:v};g1(t,d)},r.prototype.autoAdjust=function(t){var i=this.get("direction"),n=this.get("x"),a=this.get("y"),o=I(this.get("line"),"length",0),l=this.get("coordinateBBox"),s=t.getBBox(),u=s.minX,c=s.maxX,f=s.minY,h=s.maxY,v=t.findById(this.getElementId("text-group")),d=t.findById(this.getElementId("text")),p=t.findById(this.getElementId("line"));if(!!l&&v){var x=v.attr("x"),m=v.attr("y"),_=void 0,b=void 0,w=0,S=0;if(n+u<=l.minX)if(i==="leftward")b="start",w=1;else{var M=l.minX-(n+u);x=v.attr("x")+M}else if(n+c>=l.maxX)if(i==="rightward")b="end",w=-1;else{var M=n+c-l.maxX;x=v.attr("x")-M}if(!!w&&b&&(d.attr("textAlign",b),p&&p.attr("path",[["M",0,0],["L",o*w,0]]),x=(o+2)*w),a+f<=l.minY)if(i==="upward")_="top",S=1;else{var M=l.minY-(a+f);m=v.attr("y")+M}else if(a+h>=l.maxY)if(i==="downward")_="bottom",S=-1;else{var M=a+h-l.maxY;m=v.attr("y")-M}!!S&&_&&(d.attr("textBaseline",_),p&&p.attr("path",[["M",0,0],["L",0,o*S]]),m=(o+2)*S),(x!==v.attr("x")||m!==v.attr("y"))&&GM(v,x,m)}},r.prototype.getShapeAttrs=function(){var t=I(this.get("line"),"display"),i=I(this.get("point"),"style",{}),n=I(this.get("line"),"style",{}),a=I(this.get("text"),"style",{}),o=this.get("direction"),l=t?I(this.get("line"),"length",0):0,s=0,u=0,c="top",f="start";switch(o){case"upward":u=-1,c="bottom";break;case"downward":u=1,c="top";break;case"leftward":s=-1,f="end";break;case"rightward":s=1,f="start";break}return{point:A({x:0,y:0},i),line:A({path:[["M",0,0],["L",0,l*s,l*u]]},n),text:A({x:(l+2)*s,y:(l+2)*u,text:I(this.get("text"),"content",""),textBaseline:c,textAlign:f},a)}},r}(Vr),GJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Ht.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Ht.textColor,fontFamily:Ht.fontFamily}}}})},r.prototype.renderInner=function(t){var i=I(this.get("region"),"style",{});I(this.get("text"),"style",{});var n=this.get("lineLength")||0,a=this.get("points");if(!!a.length){var o=_J(a),l=[];l.push(["M",a[0].x,o.minY-n]),a.forEach(function(u){l.push(["L",u.x,u.y])}),l.push(["L",a[a.length-1].x,a[a.length-1].y-n]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:A({path:l},i)});var s=A({id:this.getElementId("text"),name:"annotation-text",x:(o.minX+o.maxX)/2,y:o.minY-n},this.get("text"));g1(t,s)}},r}(Vr),zJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},r.prototype.renderInner=function(t){var i=this,n=this.get("start"),a=this.get("end"),o=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});P(this.get("shapes"),function(s,u){var c=s.get("type"),f=fi(s.attr());i.adjustShapeAttrs(f),i.addShape(o,{id:i.getElementId("shape-"+c+"-"+u),capture:!1,type:c,attrs:f})});var l=zd({start:n,end:a});o.setClip({type:"rect",attrs:{x:l.minX,y:l.minY,width:l.width,height:l.height}})},r.prototype.adjustShapeAttrs=function(t){var i=this.get("color");t.fill&&(t.fill=t.fillStyle=i),t.stroke=t.strokeStyle=i},r}(Vr),VJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"shape",draw:Yo})},r.prototype.renderInner=function(t){var i=this.get("render");pt(i)&&i(t)},r}(Vr),y1=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},r.prototype.getContainer=function(){return this.get("container")},r.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},r.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},r.prototype.setCapture=function(t){var i=this.getContainer(),n=t?"auto":"none";i.style.pointerEvents=n,this.set("capture",t)},r.prototype.getBBox=function(){var t=this.getContainer(),i=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return p1(i,n,t.clientWidth,t.clientHeight)},r.prototype.clear=function(){var t=this.get("container");zM(t)},r.prototype.destroy=function(){this.removeEvent(),this.removeDom(),e.prototype.destroy.call(this)},r.prototype.init=function(){e.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},r.prototype.initCapture=function(){this.setCapture(this.get("capture"))},r.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},r.prototype.initDom=function(){},r.prototype.initContainer=function(){var t=this.get("container");if(K(t)){t=this.createDom();var i=this.get("parent");Ct(i)&&(i=document.getElementById(i),this.set("parent",i)),i.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else Ct(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},r.prototype.resetStyles=function(){var t=this.get("domStyles"),i=this.get("defaultStyles");t?t=ft({},i,t):t=i,this.set("domStyles",t)},r.prototype.applyStyles=function(){var t=this.get("domStyles");if(!!t){var i=this.getContainer();this.applyChildrenStyles(i,t);var n=this.get("containerClassName");if(n&&xJ(i,n)){var a=t[n];Xr(i,a)}}},r.prototype.applyChildrenStyles=function(t,i){P(i,function(n,a){var o=t.getElementsByClassName(a);P(o,function(l){Xr(l,n)})})},r.prototype.applyStyle=function(t,i){var n=this.get("domStyles");Xr(i,n[t])},r.prototype.createDom=function(){var t=this.get("containerTpl");return qo(t)},r.prototype.initEvent=function(){},r.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},r.prototype.removeEvent=function(){},r.prototype.updateInner=function(t){po(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},r.prototype.resetPosition=function(){},r}(VM),jJ=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},r.prototype.render=function(){var t=this.getContainer(),i=this.get("html");zM(t);var n=pt(i)?i(t):i;if(Jx(n))t.appendChild(n);else if(Ct(n)||Mt(n)){var a=qo(""+n);a&&t.appendChild(a)}this.resetPosition()},r.prototype.resetPosition=function(){var t=this.getContainer(),i=this.getLocation(),n=i.x,a=i.y,o=this.get("alignX"),l=this.get("alignY"),s=this.get("offsetX"),u=this.get("offsetY"),c=dz(t),f=hz(t),h={x:n,y:a};o==="middle"?h.x-=Math.round(c/2):o==="right"&&(h.x-=Math.round(c)),l==="middle"?h.y-=Math.round(f/2):l==="bottom"&&(h.y-=Math.round(f)),s&&(h.x+=s),u&&(h.y+=u),Xr(t,{position:"absolute",left:h.x+"px",top:h.y+"px",zIndex:this.get("zIndex")})},r}(y1),T5=Object.freeze(Object.defineProperty({__proto__:null,Line:DJ,Text:$J,Arc:kJ,Region:RJ,Image:BJ,DataMarker:NJ,DataRegion:GJ,RegionFilter:zJ,Shape:VJ,Html:jJ},Symbol.toStringTag,{value:"Module"}));function Yv(e,r,t){var i=r+"Style",n=null;return P(t,function(a,o){e[o]&&a[i]&&(n||(n={}),Qt(n,a[i]))}),n}var jM=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{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:Ht.lineColor}},tickLine:{style:{lineWidth:1,stroke:Ht.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Ht.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Ht.textColor,fontFamily:Ht.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Ht.textColor,textBaseline:"middle",fontFamily:Ht.fontFamily,textAlign:"center"},iconStyle:{fill:Ht.descriptionIconFill,stroke:Ht.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Ht.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},r.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},r.prototype.isList=function(){return!0},r.prototype.getItems=function(){return this.get("ticks")},r.prototype.setItems=function(t){this.update({ticks:t})},r.prototype.updateItem=function(t,i){Qt(t,i),this.clear(),this.render()},r.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},r.prototype.setItemState=function(t,i,n){t[i]=n,this.updateTickStates(t)},r.prototype.hasState=function(t,i){return!!t[i]},r.prototype.getItemStates=function(t){var i=this.get("tickStates"),n=[];return P(i,function(a,o){t[o]&&n.push(o)}),n},r.prototype.clearItemsState=function(t){var i=this,n=this.getItemsByState(t);P(n,function(a){i.setItemState(a,t,!1)})},r.prototype.getItemsByState=function(t){var i=this,n=this.getItems();return zr(n,function(a){return i.hasState(a,t)})},r.prototype.getSidePoint=function(t,i){var n=this,a=n.getSideVector(i,t);return{x:t.x+a[0],y:t.y+a[1]}},r.prototype.getTextAnchor=function(t){var i;return Nr(t[0],0)?i="center":t[0]>0?i="start":t[0]<0&&(i="end"),i},r.prototype.getTextBaseline=function(t){var i;return Nr(t[1],0)?i="middle":t[1]>0?i="top":t[1]<0&&(i="bottom"),i},r.prototype.processOverlap=function(t){},r.prototype.drawLine=function(t){var i=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:Qt({path:i},n.style)})},r.prototype.getTickLineItems=function(t){var i=this,n=[],a=this.get("tickLine"),o=a.alignTick,l=a.length,s=1,u=t.length;return u>=2&&(s=t[1].value-t[0].value),P(t,function(c){var f=c.point;o||(f=i.getTickPoint(c.value-s/2));var h=i.getSidePoint(f,l);n.push({startPoint:f,tickValue:c.value,endPoint:h,tickId:c.id,id:"tickline-"+c.id})}),n},r.prototype.getSubTickLineItems=function(t){var i=[],n=this.get("subTickLine"),a=n.count,o=t.length;if(o>=2)for(var l=0;l0){var n=gr(i);if(n>t.threshold){var a=Math.ceil(n/t.threshold),o=i.filter(function(l,s){return s%a===0});this.set("ticks",o),this.set("originalTicks",i)}}},r.prototype.getLabelAttrs=function(t,i,n){var a=this.get("label"),o=a.offset,l=a.offsetX,s=a.offsetY,u=a.rotate,c=a.formatter,f=this.getSidePoint(t.point,o),h=this.getSideVector(o,f),v=c?c(t.name,t,i):t.name,d=a.style;d=pt(d)?I(this.get("theme"),["label","style"],{}):d;var p=Qt({x:f.x+l,y:f.y+s,text:v,textAlign:this.getTextAnchor(h),textBaseline:this.getTextBaseline(h)},d);return u&&(p.matrix=Uu(f,u)),p},r.prototype.drawLabels=function(t){var i=this,n=this.get("ticks"),a=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});P(n,function(h,v){i.addShape(a,{type:"text",name:"axis-label",id:i.getElementId("label-"+h.id),attrs:i.getLabelAttrs(h,v,n),delegateObject:{tick:h,item:h,index:v}})}),this.processOverlap(a);var o=a.getChildren(),l=I(this.get("theme"),["label","style"],{}),s=this.get("label"),u=s.style,c=s.formatter;if(pt(u)){var f=o.map(function(h){return I(h.get("delegateObject"),"tick")});P(o,function(h,v){var d=h.get("delegateObject").tick,p=c?c(d.name,d,v):d.name,x=Qt({},l,u(p,v,f));h.attr(x)})}},r.prototype.getTitleAttrs=function(){var t=this.get("title"),i=t.style,n=t.position,a=t.offset,o=t.spacing,l=o===void 0?0:o,s=t.autoRotate,u=i.fontSize,c=.5;n==="start"?c=0:n==="end"&&(c=1);var f=this.getTickPoint(c),h=this.getSidePoint(f,a||l+u/2),v=Qt({x:h.x,y:h.y,text:t.text},i),d=t.rotate,p=d;if(K(d)&&s){var x=this.getAxisVector(f),m=[1,0];p=l1(x,m,!0)}if(p){var _=Uu(h,p);v.matrix=_}return v},r.prototype.drawTitle=function(t){var i,n=this.getTitleAttrs(),a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});!((i=this.get("title"))===null||i===void 0)&&i.description&&this.drawDescriptionIcon(t,a,n.matrix)},r.prototype.drawDescriptionIcon=function(t,i,n){var a=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),o=i.getBBox(),l=o.maxX,s=o.maxY,u=o.height,c=this.get("title").iconStyle,f=4,h=u/2,v=h/6,d=l+f,p=s-u/2,x=[d+h,p-h],m=x[0],_=x[1],b=[m+h,_+h],w=b[0],S=b[1],M=[m,S+h],O=M[0],F=M[1],L=[d,_+h],D=L[0],R=L[1],H=[d+h,p-u/4],k=H[0],V=H[1],U=[k,V+v],B=U[0],G=U[1],N=[B,G+v],W=N[0],q=N[1],tt=[W,q+h*3/4],ot=tt[0],st=tt[1];this.addShape(a,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:A({path:[["M",m,_],["A",h,h,0,0,1,w,S],["A",h,h,0,0,1,O,F],["A",h,h,0,0,1,D,R],["A",h,h,0,0,1,m,_],["M",k,V],["L",B,G],["M",W,q],["L",ot,st]],lineWidth:v,matrix:n},c)}),this.addShape(a,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:d,y:p-u/2,width:u,height:u,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},r.prototype.applyTickStates=function(t,i){var n=this.getItemStates(t);if(n.length){var a=this.get("tickStates"),o=this.getElementId("label-"+t.id),l=i.findById(o);if(l){var s=Yv(t,"label",a);s&&l.attr(s)}var u=this.getElementId("tickline-"+t.id),c=i.findById(u);if(c){var f=Yv(t,"tickLine",a);f&&c.attr(f)}}},r.prototype.updateTickStates=function(t){var i=this.getItemStates(t),n=this.get("tickStates"),a=this.get("label"),o=this.getElementByLocalId("label-"+t.id),l=this.get("tickLine"),s=this.getElementByLocalId("tickline-"+t.id);if(i.length){if(o){var u=Yv(t,"label",n);u&&o.attr(u)}if(s){var c=Yv(t,"tickLine",n);c&&s.attr(c)}}else o&&o.attr(a.style),s&&s.attr(l.style)},r}(Vr);function HM(e,r,t,i){var n=r.getChildren(),a=!1;return P(n,function(o){var l=gd(e,o,t,i);a=a||l}),a}function HJ(){return M5}function YJ(e,r,t){return HM(e,r,t,"head")}function M5(e,r,t){return HM(e,r,t,"tail")}function WJ(e,r,t){return HM(e,r,t,"middle")}var XJ=Object.freeze(Object.defineProperty({__proto__:null,getDefault:HJ,ellipsisHead:YJ,ellipsisTail:M5,ellipsisMiddle:WJ},Symbol.toStringTag,{value:"Module"}));function UJ(e){var r=e.attr("matrix");return r&&r[0]!==1}function E5(e){var r=UJ(e)?yJ(e.attr("matrix")):0;return r%360}function DA(e,r,t,i){var n=!1,a=E5(r),o=Math.abs(e?t.attr("y")-r.attr("y"):t.attr("x")-r.attr("x")),l=(e?t.attr("y")>r.attr("y"):t.attr("x")>r.attr("x"))?r.getBBox():t.getBBox();if(e){var s=Math.abs(Math.cos(a));K0(s,0,Math.PI/180)?n=l.width+i>o:n=l.height/s+i>o}else{var s=Math.abs(Math.sin(a));K0(s,0,Math.PI/180)?n=l.width+i>o:n=l.height/s+i>o}return n}function Vd(e,r,t,i){var n=(i==null?void 0:i.minGap)||0,a=r.getChildren().slice().filter(function(v){return v.get("visible")});if(!a.length)return!1;var o=!1;t&&a.reverse();for(var l=a.length,s=a[0],u=s,c=1;c1){h=Math.ceil(h);for(var p=0;p2){var o=n[0],l=n[n.length-1];o.get("visible")||(o.show(),Vd(e,r,!1,i)&&(a=!0)),l.get("visible")||(l.show(),Vd(e,r,!0,i)&&(a=!0))}return a}var ttt=Object.freeze(Object.defineProperty({__proto__:null,getDefault:qJ,reserveFirst:ZJ,reserveLast:QJ,reserveBoth:KJ,equidistance:F5,equidistanceWithReverseBoth:JJ},Symbol.toStringTag,{value:"Module"}));function ett(e,r){P(e,function(t){var i=t.attr("x"),n=t.attr("y"),a=Uu({x:i,y:n},r);t.attr("matrix",a)})}function P5(e,r,t,i){var n=r.getChildren();if(!n.length||!e&&n.length<2)return!1;var a=LA(n),o=!1;if(e)o=!!t&&a>t;else{var l=Math.abs(n[1].attr("x")-n[0].attr("x"));o=a>l}if(o){var s=i(t,a);ett(n,s)}return o}function rtt(){return I5}function I5(e,r,t,i){return P5(e,r,t,function(){return Mt(i)?i:e?Ht.verticalAxisRotate:Ht.horizontalAxisRotate})}function itt(e,r,t){return P5(e,r,t,function(i,n){if(!i)return e?Ht.verticalAxisRotate:Ht.horizontalAxisRotate;if(e)return-Math.acos(i/n);var a=0;return i>n?a=Math.PI/4:(a=Math.asin(i/n),a>Math.PI/4&&(a=Math.PI/4)),a})}var ntt=Object.freeze(Object.defineProperty({__proto__:null,getDefault:rtt,fixedAngle:I5,unfixedAngle:itt},Symbol.toStringTag,{value:"Module"})),L5=Object.freeze(Object.defineProperty({__proto__:null,autoHide:ttt,autoRotate:ntt,autoEllipsis:XJ},Symbol.toStringTag,{value:"Module"})),D5=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getLinePath=function(){var t=this.get("start"),i=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",i.x,i.y]),n},r.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),i=this.get("end"),n=e.prototype.getInnerLayoutBBox.call(this),a=Math.min(t.x,i.x,n.x),o=Math.min(t.y,i.y,n.y),l=Math.max(t.x,i.x,n.maxX),s=Math.max(t.y,i.y,n.maxY);return{x:a,y:o,minX:a,minY:o,maxX:l,maxY:s,width:l-a,height:s-o}},r.prototype.isVertical=function(){var t=this.get("start"),i=this.get("end");return Nr(t.x,i.x)},r.prototype.isHorizontal=function(){var t=this.get("start"),i=this.get("end");return Nr(t.y,i.y)},r.prototype.getTickPoint=function(t){var i=this,n=i.get("start"),a=i.get("end"),o=a.x-n.x,l=a.y-n.y;return{x:n.x+o*t,y:n.y+l*t}},r.prototype.getSideVector=function(t){var i=this.getAxisVector(),n=mM([0,0],i),a=this.get("verticalFactor"),o=[n[1],n[0]*-1];return hi([0,0],o,t*a)},r.prototype.getAxisVector=function(){var t=this.get("start"),i=this.get("end");return[i.x-t.x,i.y-t.y]},r.prototype.processOverlap=function(t){var i=this,n=this.isVertical(),a=this.isHorizontal();if(!(!n&&!a)){var o=this.get("label"),l=this.get("title"),s=this.get("verticalLimitLength"),u=o.offset,c=s,f=0,h=0;l&&(f=l.style.fontSize,h=l.spacing),c&&(c=c-u-h-f);var v=this.get("overlapOrder");if(P(v,function(x){o[x]&&i.canProcessOverlap(x)&&i.autoProcessOverlap(x,o[x],t,c)}),l&&K(l.offset)){var d=t.getCanvasBBox(),p=n?d.width:d.height;l.offset=u+p+h+f/2}}},r.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?K(i.rotate):!0},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,l=this.isVertical(),s=!1,u=L5[t];if(i===!0)this.get("label"),s=u.getDefault()(l,n,a);else if(pt(i))s=i(l,n,a);else if(qt(i)){var c=i;u[c.type]&&(s=u[c.type](l,n,a,c.cfg))}else u[i]&&(s=u[i](l,n,a));if(t==="autoRotate"){if(s){var f=n.getChildren(),h=this.get("verticalFactor");P(f,function(d){var p=d.attr("textAlign");if(p==="center"){var x=h>0?"end":"start";d.attr("textAlign",x)}})}}else if(t==="autoHide"){var v=n.getChildren().slice(0);P(v,function(d){d.get("visible")||(o.get("isRegister")&&o.unregisterElement(d),d.remove())})}},r}(jM),$5=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},r.prototype.getLinePath=function(){var t=this.get("center"),i=t.x,n=t.y,a=this.get("radius"),o=a,l=this.get("startAngle"),s=this.get("endAngle"),u=[];if(Math.abs(s-l)===Math.PI*2)u=[["M",i,n-o],["A",a,o,0,1,1,i,n+o],["A",a,o,0,1,1,i,n-o],["Z"]];else{var c=this.getCirclePoint(l),f=this.getCirclePoint(s),h=Math.abs(s-l)>Math.PI?1:0,v=l>s?0:1;u=[["M",i,n],["L",c.x,c.y],["A",a,o,0,h,v,f.x,f.y],["L",i,n]]}return u},r.prototype.getTickPoint=function(t){var i=this.get("startAngle"),n=this.get("endAngle"),a=i+(n-i)*t;return this.getCirclePoint(a)},r.prototype.getSideVector=function(t,i){var n=this.get("center"),a=[i.x-n.x,i.y-n.y],o=this.get("verticalFactor"),l=Yl(a);return hi(a,a,o*t/l),a},r.prototype.getAxisVector=function(t){var i=this.get("center"),n=[t.x-i.x,t.y-i.y];return[n[1],-1*n[0]]},r.prototype.getCirclePoint=function(t,i){var n=this.get("center");return i=i||this.get("radius"),{x:n.x+Math.cos(t)*i,y:n.y+Math.sin(t)*i}},r.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?K(i.rotate):!0},r.prototype.processOverlap=function(t){var i=this,n=this.get("label"),a=this.get("title"),o=this.get("verticalLimitLength"),l=n.offset,s=o,u=0,c=0;a&&(u=a.style.fontSize,c=a.spacing),s&&(s=s-l-c-u);var f=this.get("overlapOrder");if(P(f,function(v){n[v]&&i.canProcessOverlap(v)&&i.autoProcessOverlap(v,n[v],t,s)}),a&&K(a.offset)){var h=t.getCanvasBBox().height;a.offset=l+h+c+u/2}},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,l=!1,s=L5[t];if(a>0)if(i===!0)l=s.getDefault()(!1,n,a);else if(pt(i))l=i(!1,n,a);else if(qt(i)){var u=i;s[u.type]&&(l=s[u.type](!1,n,a,u.cfg))}else s[i]&&(l=s[i](!1,n,a));if(t==="autoRotate"){if(l){var c=n.getChildren(),f=this.get("verticalFactor");P(c,function(v){var d=v.attr("textAlign");if(d==="center"){var p=f>0?"end":"start";v.attr("textAlign",p)}})}}else if(t==="autoHide"){var h=n.getChildren().slice(0);P(h,function(v){v.get("visible")||(o.get("isRegister")&&o.unregisterElement(v),v.remove())})}},r}(jM),att=Object.freeze(Object.defineProperty({__proto__:null,Line:D5,Circle:$5,Base:jM},Symbol.toStringTag,{value:"Module"})),YM=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Ht.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Ht.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Ht.fontFamily}},textBackground:{padding:5,style:{stroke:Ht.lineColor}}}})},r.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},r.prototype.renderText=function(t){var i=this.get("text"),n=i.style,a=i.autoRotate,o=i.content;if(!K(o)){var l=this.getTextPoint(),s=null;if(a){var u=this.getRotateAngle();s=Uu(l,u)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:A(A(A({},l),{text:o,matrix:s}),n)})}},r.prototype.renderLine=function(t){var i=this.getLinePath(),n=this.get("line"),a=n.style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:A({path:i},a)})},r.prototype.renderBackground=function(t){var i=this.getElementId("text"),n=t.findById(i),a=this.get("textBackground");if(a&&n){var o=n.getBBox(),l=Q0(a.padding),s=a.style,u=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:A({x:o.x-l[3],y:o.y-l[0],width:o.width+l[1]+l[3],height:o.height+l[0]+l[2],matrix:n.attr("matrix")},s)});u.toBack()}},r}(Vr),k5=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text").position,o=Math.atan2(n.y-i.y,n.x-i.x),l=a==="start"?o-Math.PI/2:o+Math.PI/2;return l},r.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text"),o=a.position,l=a.offset;return A5(i,n,o,l)},r.prototype.getLinePath=function(){var t=this.getLocation(),i=t.start,n=t.end;return[["M",i.x,i.y],["L",n.x,n.y]]},r}(YM),ott=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.startAngle,n=t.endAngle,a=this.get("text").position,o=a==="start"?i+Math.PI/2:n-Math.PI/2;return o},r.prototype.getTextPoint=function(){var t=this.get("text"),i=t.position,n=t.offset,a=this.getLocation(),o=a.center,l=a.radius,s=a.startAngle,u=a.endAngle,c=i==="start"?s:u,f=this.getRotateAngle()-Math.PI,h=Sf(o,l,c),v=Math.cos(f)*n,d=Math.sin(f)*n;return{x:h.x+v,y:h.y+d}},r.prototype.getLinePath=function(){var t=this.getLocation(),i=t.center,n=t.radius,a=t.startAngle,o=t.endAngle,l=null;if(o-a===Math.PI*2){var s=i.x,u=i.y;l=[["M",s,u-n],["A",n,n,0,1,1,s,u+n],["A",n,n,0,1,1,s,u-n],["Z"]]}else{var c=Sf(i,n,a),f=Sf(i,n,o),h=Math.abs(o-a)>Math.PI?1:0,v=a>o?0:1;l=[["M",c.x,c.y],["A",n,n,0,h,v,f.x,f.y]]}return l},r}(YM),jd="g2-crosshair",$A=jd+"-line",kA=jd+"-text",vv,ltt=(vv={},vv[""+jd]={position:"relative"},vv[""+$A]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},vv[""+kA]={position:"absolute",color:Ht.textColor,fontFamily:Ht.fontFamily},vv),stt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{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:jd,defaultStyles:ltt,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},r.prototype.render=function(){this.resetText(),this.resetPosition()},r.prototype.initCrossHair=function(){var t=this.getContainer(),i=this.get("crosshairTpl"),n=qo(i);t.appendChild(n),this.applyStyle($A,n),this.set("crosshairEl",n)},r.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text"),o=a.position,l=a.offset;return A5(i,n,o,l)},r.prototype.resetText=function(){var t=this.get("text"),i=this.get("textEl");if(t){var n=t.content;if(!i){var a=this.getContainer(),o=cM(this.get("textTpl"),t);i=qo(o),a.appendChild(i),this.applyStyle(kA,i),this.set("textEl",i)}i.innerHTML=n}else i&&i.remove()},r.prototype.isVertical=function(t,i){return t.x===i.x},r.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var i=this.get("start"),n=this.get("end"),a=Math.min(i.x,n.x),o=Math.min(i.y,n.y);this.isVertical(i,n)?Xr(t,{width:"1px",height:Ni(Math.abs(n.y-i.y))}):Xr(t,{height:"1px",width:Ni(Math.abs(n.x-i.x))}),Xr(t,{top:Ni(o),left:Ni(a)}),this.alignText()},r.prototype.alignText=function(){var t=this.get("textEl");if(t){var i=this.get("text").align,n=t.clientWidth,a=this.getTextPoint();switch(i){case"center":a.x=a.x-n/2;break;case"right":a.x=a.x-n}Xr(t,{top:Ni(a.y),left:Ni(a.x)})}},r.prototype.updateInner=function(t){po(t,"text")&&this.resetText(),e.prototype.updateInner.call(this,t)},r}(y1),RA=Object.freeze(Object.defineProperty({__proto__:null,Line:k5,Circle:ott,Base:YM,Html:stt},Symbol.toStringTag,{value:"Module"})),WM=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Ht.lineColor}}}})},r.prototype.getLineType=function(){var t=this.get("line")||this.get("defaultCfg").line;return t.type},r.prototype.renderInner=function(t){this.drawGrid(t)},r.prototype.getAlternatePath=function(t,i){var n=this.getGridPath(t),a=i.slice(0).reverse(),o=this.getGridPath(a,!0),l=this.get("closed");return l?n=n.concat(o):(o[0][0]="L",n=n.concat(o),n.push(["Z"])),n},r.prototype.getPathStyle=function(){return this.get("line").style},r.prototype.drawGrid=function(t){var i=this,n=this.get("line"),a=this.get("items"),o=this.get("alternateColor"),l=null;P(a,function(s,u){var c=s.id||u;if(n){var f=i.getPathStyle();f=pt(f)?f(s,u,a):f;var h=i.getElementId("line-"+c),v=i.getGridPath(s.points);i.addShape(t,{type:"path",name:"grid-line",id:h,attrs:Qt({path:v},f)})}if(o&&u>0){var d=i.getElementId("region-"+c),p=u%2===0;if(Ct(o))p&&i.drawAlternateRegion(d,t,l.points,s.points,o);else{var x=p?o[1]:o[0];i.drawAlternateRegion(d,t,l.points,s.points,x)}}l=s})},r.prototype.drawAlternateRegion=function(t,i,n,a,o){var l=this.getAlternatePath(n,a);this.addShape(i,{type:"path",id:t,name:"grid-region",attrs:{path:l,fill:o}})},r}(Vr);function utt(e,r,t,i){var n=t-e,a=i-r;return Math.sqrt(n*n+a*a)}var R5=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{type:"circle",center:null,closed:!0})},r.prototype.getGridPath=function(t,i){var n=this.getLineType(),a=this.get("closed"),o=[];if(t.length)if(n==="circle"){var l=this.get("center"),s=t[0],u=utt(l.x,l.y,s.x,s.y),c=i?0:1;a?(o.push(["M",l.x,l.y-u]),o.push(["A",u,u,0,0,c,l.x,l.y+u]),o.push(["A",u,u,0,0,c,l.x,l.y-u]),o.push(["Z"])):P(t,function(f,h){h===0?o.push(["M",f.x,f.y]):o.push(["A",u,u,0,0,c,f.x,f.y])})}else P(t,function(f,h){h===0?o.push(["M",f.x,f.y]):o.push(["L",f.x,f.y])}),a&&o.push(["Z"]);return o},r}(WM),B5=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{type:"line"})},r.prototype.getGridPath=function(t){var i=[];return P(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i},r}(WM),ctt=Object.freeze(Object.defineProperty({__proto__:null,Base:WM,Circle:R5,Line:B5},Symbol.toStringTag,{value:"Module"})),XM=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},r.prototype.getLayoutBBox=function(){var t=e.prototype.getLayoutBBox.call(this),i=this.get("maxWidth"),n=this.get("maxHeight"),a=t.width,o=t.height;return i&&(a=Math.min(a,i)),n&&(o=Math.min(o,n)),p1(t.minX,t.minY,a,o)},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},r.prototype.resetLocation=function(){var t=this.get("x"),i=this.get("y"),n=this.get("offsetX"),a=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:i+a})},r.prototype.applyOffset=function(){this.resetLocation()},r.prototype.getDrawPoint=function(){return this.get("currentPoint")},r.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},r.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},r.prototype.drawBackground=function(t){var i=this.get("background"),n=t.getBBox(),a=Q0(i.padding),o=A({x:0,y:0,width:n.width+a[1]+a[3],height:n.height+a[0]+a[2]},i.style),l=this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:o});l.toBack()},r.prototype.drawTitle=function(t){var i=this.get("currentPoint"),n=this.get("title"),a=n.spacing,o=n.style,l=n.text,s=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:A({text:l,x:i.x,y:i.y},o)}),u=s.getBBox();this.set("currentPoint",{x:i.x,y:u.maxY+a})},r.prototype.resetDraw=function(){var t=this.get("background"),i={x:0,y:0};if(t){var n=Q0(t.padding);i.x=n[3],i.y=n[0]}this.set("currentPoint",i)},r}(Vr),Kw={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},jy={fill:Ht.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Ht.fontFamily,fontWeight:"normal",lineHeight:12},Jw="navigation-arrow-right",tC="navigation-arrow-left",ZL={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},N5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.currentPageIndex=1,t.totalPagesCnt=1,t.pageWidth=0,t.pageHeight=0,t.startX=0,t.startY=0,t.onNavigationBack=function(){var i=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:n},100):i.attr({matrix:n})}},t.onNavigationAfter=function(){var i=t.getElementByLocalId("item-group");if(t.currentPageIndexx&&(x=O),v==="horizontal"?(m&&mu}if(l==="horizontal"){var F=this.get("maxRow")||1,L=v+(F===1?0:M),D=u-h-x.width-x.minX;this.pageHeight=L*F,this.pageWidth=D,P(s,function(H){var k=H.getBBox(),V=f||k.width;(b&&bw&&(w=k.width)}),S=w,w+=h,u&&(w=Math.min(u,w),S=Math.min(u,S)),this.pageWidth=w,this.pageHeight=c-Math.max(x.height,v+M);var R=Math.floor(this.pageHeight/(v+M));P(s,function(H,k){k!==0&&k%R===0&&(_+=1,m.x+=w,m.y=o),n.moveElementTo(H,m),H.getParent().setClip({type:"rect",attrs:{x:m.x,y:m.y,width:w,height:v}}),m.y+=v+M}),this.totalPagesCnt=_,this.moveElementTo(p,{x:a+S/2-x.width/2-x.minX,y:c-x.height-x.minY})}this.pageHeight&&this.pageWidth&&i.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),l==="horizontal"&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(_/this.get("maxRow")):this.totalPagesCnt=_,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(p),i.attr("matrix",this.getCurrentNavigationMatrix())},r.prototype.drawNavigation=function(t,i,n,a){var o={x:0,y:0},l=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),s=I(a.marker,"style",{}),u=s.size,c=u===void 0?12:u,f=ue(s,["size"]),h=this.drawArrow(l,o,tC,i==="horizontal"?"up":"left",c,f);h.on("click",this.onNavigationBack);var v=h.getBBox();o.x+=v.width+2;var d=this.addShape(l,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:A({x:o.x,y:o.y+c/2,text:n,textBaseline:"middle"},I(a.text,"style"))}),p=d.getBBox();o.x+=p.width+2;var x=this.drawArrow(l,o,Jw,i==="horizontal"?"down":"right",c,f);return x.on("click",this.onNavigationAfter),l},r.prototype.updateNavigation=function(t){var i=ft({},Kw,this.get("pageNavigator")),n=i.marker.style,a=n.fill,o=n.opacity,l=n.inactiveFill,s=n.inactiveOpacity,u=this.currentPageIndex+"/"+this.totalPagesCnt,c=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),f=t?t.findById(this.getElementId(tC)):this.getElementByLocalId(tC),h=t?t.findById(this.getElementId(Jw)):this.getElementByLocalId(Jw);c.attr("text",u),f.attr("opacity",this.currentPageIndex===1?s:o),f.attr("fill",this.currentPageIndex===1?l:a),f.attr("cursor",this.currentPageIndex===1?"not-allowed":"pointer"),h.attr("opacity",this.currentPageIndex===this.totalPagesCnt?s:o),h.attr("fill",this.currentPageIndex===this.totalPagesCnt?l:a),h.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var v=f.getBBox().maxX+2;c.attr("x",v),v+=c.getBBox().width+2,this.updateArrowPath(h,{x:v,y:0})},r.prototype.drawArrow=function(t,i,n,a,o,l){var s=i.x,u=i.y,c=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:A({size:o,direction:a,path:[["M",s+o/2,u],["L",s,u+o],["L",s+o,u+o],["Z"]],cursor:"pointer"},l)});return c.attr("matrix",Uu({x:s+o/2,y:u+o/2},ZL[a])),c},r.prototype.updateArrowPath=function(t,i){var n=i.x,a=i.y,o=t.attr(),l=o.size,s=o.direction,u=Uu({x:n+l/2,y:a+l/2},ZL[s]);t.attr("path",[["M",n+l/2,a],["L",n,a+l],["L",n+l,a+l],["Z"]]),t.attr("matrix",u)},r.prototype.getCurrentNavigationMatrix=function(){var t=this,i=t.currentPageIndex,n=t.pageWidth,a=t.pageHeight,o=this.get("layout"),l=o==="horizontal"?{x:0,y:a*(1-i)}:{x:n*(1-i),y:0};return NM(l)},r.prototype.applyItemStates=function(t,i){var n=this.getItemStates(t),a=n.length>0;if(a){var o=i.getChildren(),l=this.get("itemStates");P(o,function(s){var u=s.get("name"),c=u.split("-")[2],f=Yv(t,c,l);f&&(s.attr(f),c==="marker"&&!(s.get("isStroke")&&s.get("isFill"))&&(s.get("isStroke")&&s.attr("fill",null),s.get("isFill")&&s.attr("stroke",null)))})}},r.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),i=this.get("maxItemWidth");return i?t&&(i=t<=i?t:i):t&&(i=t),i},r}(XM),ftt=1.4,QL=.4,G5=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{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:Ht.textColor,textBaseline:"middle",fontFamily:Ht.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:Ht.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},r.prototype.isSlider=function(){return!0},r.prototype.getValue=function(){return this.getCurrentValue()},r.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},r.prototype.setRange=function(t,i){this.update({min:t,max:i})},r.prototype.setValue=function(t){var i=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:i,value:t})},r.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},r.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)},r.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},r.prototype.bindHandlersEvent=function(t){var i=this;t.on("legend-handler-min:drag",function(n){var a=i.getValueByCanvasPoint(n.x,n.y),o=i.getCurrentValue(),l=o[1];la&&(l=a),i.setValue([l,a])})},r.prototype.bindRailEvent=function(t){},r.prototype.bindTrackEvent=function(t){var i=this,n=null;t.on("legend-track:dragstart",function(a){n={x:a.x,y:a.y}}),t.on("legend-track:drag",function(a){if(!!n){var o=i.getValueByCanvasPoint(n.x,n.y),l=i.getValueByCanvasPoint(a.x,a.y),s=i.getCurrentValue(),u=s[1]-s[0],c=i.getRange(),f=l-o;f<0?s[0]+f>c.min?i.setValue([s[0]+f,s[1]+f]):i.setValue([c.min,c.min+u]):f>0&&(f>0&&s[1]+fo&&(f=o),f0&&this.changeRailLength(a,l,n[l]-v)}},r.prototype.changeRailLength=function(t,i,n){var a=t.getBBox(),o;i==="height"?o=this.getRailPath(a.x,a.y,a.width,n):o=this.getRailPath(a.x,a.y,n,a.height),t.attr("path",o)},r.prototype.changeRailPosition=function(t,i,n){var a=t.getBBox(),o=this.getRailPath(i,n,a.width,a.height);t.attr("path",o)},r.prototype.fixedHorizontal=function(t,i,n,a){var o=this.get("label"),l=o.align,s=o.spacing,u=n.getBBox(),c=t.getBBox(),f=i.getBBox(),h=u.height;this.fitRailLength(c,f,u,n),u=n.getBBox(),l==="rail"?(t.attr({x:a.x,y:a.y+h/2}),this.changeRailPosition(n,a.x+c.width+s,a.y),i.attr({x:a.x+c.width+u.width+s*2,y:a.y+h/2})):l==="top"?(t.attr({x:a.x,y:a.y}),i.attr({x:a.x+u.width,y:a.y}),this.changeRailPosition(n,a.x,a.y+c.height+s)):(this.changeRailPosition(n,a.x,a.y),t.attr({x:a.x,y:a.y+u.height+s}),i.attr({x:a.x+u.width,y:a.y+u.height+s}))},r.prototype.fixedVertail=function(t,i,n,a){var o=this.get("label"),l=o.align,s=o.spacing,u=n.getBBox(),c=t.getBBox(),f=i.getBBox();if(this.fitRailLength(c,f,u,n),u=n.getBBox(),l==="rail")t.attr({x:a.x,y:a.y}),this.changeRailPosition(n,a.x,a.y+c.height+s),i.attr({x:a.x,y:a.y+c.height+u.height+s*2});else if(l==="right")t.attr({x:a.x+u.width+s,y:a.y}),this.changeRailPosition(n,a.x,a.y),i.attr({x:a.x+u.width+s,y:a.y+u.height});else{var h=Math.max(c.width,f.width);t.attr({x:a.x,y:a.y}),this.changeRailPosition(n,a.x+h+s,a.y),i.attr({x:a.x,y:a.y+u.height})}},r}(XM),htt=Object.freeze(Object.defineProperty({__proto__:null,Category:N5,Continuous:G5,Base:XM},Symbol.toStringTag,{value:"Module"})),Nf="g2-tooltip",Gf="g2-tooltip-title",Hd="g2-tooltip-list",m1="g2-tooltip-list-item",x1="g2-tooltip-marker",_1="g2-tooltip-value",z5="g2-tooltip-name",UM="g2-tooltip-crosshair-x",qM="g2-tooltip-crosshair-y",V5=Object.freeze(Object.defineProperty({__proto__:null,CONTAINER_CLASS:Nf,TITLE_CLASS:Gf,LIST_CLASS:Hd,LIST_ITEM_CLASS:m1,MARKER_CLASS:x1,VALUE_CLASS:_1,NAME_CLASS:z5,CROSSHAIR_X:UM,CROSSHAIR_Y:qM},Symbol.toStringTag,{value:"Module"})),Va,vtt=(Va={},Va[""+Nf]={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:Ht.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Va[""+Gf]={marginBottom:"4px"},Va[""+Hd]={margin:"0px",listStyleType:"none",padding:"0px"},Va[""+m1]={listStyleType:"none",marginBottom:"4px"},Va[""+x1]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Va[""+_1]={display:"inline-block",float:"right",marginLeft:"30px"},Va[""+UM]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Va[""+qM]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Va);function dtt(e,r,t,i,n){var a={left:en.x+n.width,top:rn.y+n.height};return a}function ptt(e,r,t,i,n,a){var o=e,l=r;switch(a){case"left":o=e-i-t,l=r-n/2;break;case"right":o=e+t,l=r-n/2;break;case"top":o=e-i/2,l=r-n-t;break;case"bottom":o=e-i/2,l=r+t;break;default:o=e+t,l=r-n-t;break}return{x:o,y:l}}function gtt(e,r,t,i,n,a,o){var l=ptt(e,r,t,i,n,a);if(o){var s=dtt(l.x,l.y,i,n,o);a==="auto"?(s.right&&(l.x=Math.max(0,e-i-t)),s.top&&(l.y=Math.max(0,r-n-t))):a==="top"||a==="bottom"?(s.left&&(l.x=o.x),s.right&&(l.x=o.x+o.width-i),a==="top"&&s.top&&(l.y=r+t),a==="bottom"&&s.bottom&&(l.y=r-n-t)):(s.top&&(l.y=o.y),s.bottom&&(l.y=o.y+o.height-n),a==="left"&&s.left&&(l.x=e+t),a==="right"&&s.right&&(l.x=e-i-t))}return l}function ytt(e,r){var t=!1;return P(r,function(i){if(po(e,i))return t=!0,!1}),t}var j5=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • {name}: {value}
  • `,xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Nf,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:vtt})},r.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},r.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},r.prototype.show=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!0),Xr(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},r.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),Xr(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},r.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},r.prototype.setCrossHairsVisible=function(t){var i=t?"":"none",n=this.get("xCrosshairDom"),a=this.get("yCrosshairDom");n&&Xr(n,{display:i}),a&&Xr(a,{display:i})},r.prototype.initContainer=function(){if(e.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var t=this.getHtmlContentNode();this.get("parent").appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()}},r.prototype.updateInner=function(t){this.get("customContent")?this.renderCustomContent():(ytt(t,["title","showTitle"])&&this.resetTitle(),po(t,"items")&&this.renderItems()),e.prototype.updateInner.call(this,t)},r.prototype.initDom=function(){this.cacheDoms()},r.prototype.removeDom=function(){e.prototype.removeDom.call(this),this.clearCrosshairs()},r.prototype.resetPosition=function(){var t=this.get("x"),i=this.get("y"),n=this.get("offset"),a=this.getOffset(),o=a.offsetX,l=a.offsetY,s=this.get("position"),u=this.get("region"),c=this.getContainer(),f=this.getBBox(),h=f.width,v=f.height,d;u&&(d=zd(u));var p=gtt(t,i,n,h,v,s,d);Xr(c,{left:Ni(p.x+o),top:Ni(p.y+l)}),this.resetCrosshairs()},r.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),i=this.get("parent"),n=this.get("container");n&&n.parentNode===i?i.replaceChild(t,n):i.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},r.prototype.getHtmlContentNode=function(){var t,i=this.get("customContent");if(i){var n=i(this.get("title"),this.get("items"));Jx(n)?t=n:t=qo(n)}return t},r.prototype.cacheDoms=function(){var t=this.getContainer(),i=t.getElementsByClassName(Gf)[0],n=t.getElementsByClassName(Hd)[0];this.set("titleDom",i),this.set("listDom",n)},r.prototype.resetTitle=function(){var t=this.get("title"),i=this.get("showTitle");i&&t?this.setTitle(t):this.setTitle("")},r.prototype.setTitle=function(t){var i=this.get("titleDom");i&&(i.innerText=t)},r.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),i=this.get("crosshairs");if(!t||!i)this.clearCrosshairs();else{var n=zd(t),a=this.get("xCrosshairDom"),o=this.get("yCrosshairDom");i==="x"?(this.resetCrosshair("x",n),o&&(o.remove(),this.set("yCrosshairDom",null))):i==="y"?(this.resetCrosshair("y",n),a&&(a.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}},r.prototype.resetCrosshair=function(t,i){var n=this.checkCrosshair(t),a=this.get(t);t==="x"?Xr(n,{left:Ni(a),top:Ni(i.y),height:Ni(i.height)}):Xr(n,{top:Ni(a),left:Ni(i.x),width:Ni(i.width)})},r.prototype.checkCrosshair=function(t){var i=t+"CrosshairDom",n=t+"CrosshairTpl",a="CROSSHAIR_"+t.toUpperCase(),o=V5[a],l=this.get(i),s=this.get("parent");return l||(l=qo(this.get(n)),this.applyStyle(o,l),s.appendChild(l),this.set(i,l)),l},r.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),i=this.get("itemTpl"),n=this.get("listDom");n&&(P(t,function(a){var o=Zo.toCSSGradient(a.color),l=A(A({},a),{color:o}),s=cM(i,l),u=qo(s);n.appendChild(u)}),this.applyChildrenStyles(n,this.get("domStyles")))},r.prototype.clearItemDoms=function(){this.get("listDom")&&zM(this.get("listDom"))},r.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");t&&t.remove(),i&&i.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},r}(y1),mtt=Object.freeze(Object.defineProperty({__proto__:null,Html:j5},Symbol.toStringTag,{value:"Module"})),xtt={opacity:0},_tt={stroke:"#C5C5C5",strokeOpacity:.85},btt={fill:"#CACED4",opacity:.85};function wtt(e){return je(e,function(r,t){var i=t===0?"M":"L",n=r[0],a=r[1];return[i,n,a]})}function H5(e){return wtt(e)}function Ctt(e){if(e.length<=2)return H5(e);var r=[];P(e,function(o){Ge(o,r.slice(r.length-2))||r.push(o[0],o[1])});var t=LV(r,!1),i=Wi(e),n=i[0],a=i[1];return t.unshift(["M",n,a]),t}function Stt(e,r,t,i){i===void 0&&(i=!0);var n=new Ah({values:e}),a=new Fp({values:je(e,function(l,s){return s})}),o=je(e,function(l,s){return[a.scale(s)*r,t-n.scale(l)*t]});return i?Ctt(o):H5(o)}function Att(e,r){var t=new Ah({values:e}),i=t.max<0?t.max:Math.max(0,t.min);return r-t.scale(i)*r}function Ttt(e,r,t,i){var n=ye(e),a=Att(i,t);return n.push(["L",r,a]),n.push(["L",0,a]),n.push(["Z"]),n}var Mtt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:xtt,lineStyle:_tt,areaStyle:btt})},r.prototype.renderInner=function(t){var i=this.cfg,n=i.width,a=i.height,o=i.data,l=i.smooth,s=i.isArea,u=i.backgroundStyle,c=i.lineStyle,f=i.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:A({x:0,y:0,width:n,height:a},u)});var h=Stt(o,n,a,l);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:A({path:h},c)}),s){var v=Ttt(h,n,a,o);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:A({path:v},f)})}},r.prototype.applyOffset=function(){var t=this.cfg,i=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:i,y:n})},r}(Vr),Y5={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},KL=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"handler",x:0,y:0,width:10,height:24,style:Y5})},r.prototype.renderInner=function(t){var i=this.cfg,n=i.width,a=i.height,o=i.style,l=o.fill,s=o.stroke,u=o.radius,c=o.opacity,f=o.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:a,fill:l,stroke:s,radius:u,opacity:c,cursor:f}});var h=1/3*n,v=2/3*n,d=1/4*a,p=3/4*a;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:h,y1:d,x2:h,y2:p,stroke:s,cursor:f}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:v,y1:d,x2:v,y2:p,stroke:s,cursor:f}})},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",function(){var i=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",i),t.draw()}),this.get("group").on("mouseleave",function(){var i=t.get("style").fill;t.getElementByLocalId("background").attr("fill",i),t.draw()})},r.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},r}(Vr),Ett={fill:"#416180",opacity:.05},Ott={fill:"#5B8FF9",opacity:.15,cursor:"move"},g0=10,Ftt={width:g0,height:24},Ptt={textBaseline:"middle",fill:"#000",opacity:.45},Itt="sliderchange",W5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.onMouseDown=function(i){return function(n){t.currentTarget=i;var a=n.originalEvent;a.stopPropagation(),a.preventDefault(),t.prevX=I(a,"touches.0.pageX",a.pageX),t.prevY=I(a,"touches.0.pageY",a.pageY);var o=t.getContainerDOM();o.addEventListener("mousemove",t.onMouseMove),o.addEventListener("mouseup",t.onMouseUp),o.addEventListener("mouseleave",t.onMouseUp),o.addEventListener("touchmove",t.onMouseMove),o.addEventListener("touchend",t.onMouseUp),o.addEventListener("touchcancel",t.onMouseUp)}},t.onMouseMove=function(i){var n=t.cfg.width,a=[t.get("start"),t.get("end")];i.stopPropagation(),i.preventDefault();var o=I(i,"touches.0.pageX",i.pageX),l=I(i,"touches.0.pageY",i.pageY),s=o-t.prevX,u=t.adjustOffsetRange(s/n);t.updateStartEnd(u),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=o,t.prevY=l,t.draw(),t.emit(Itt,[t.get("start"),t.get("end")].sort()),t.delegateEmit("valuechanged",{originValue:a,value:[t.get("start"),t.get("end")]})},t.onMouseUp=function(){t.currentTarget&&(t.currentTarget=void 0);var i=t.getContainerDOM();i&&(i.removeEventListener("mousemove",t.onMouseMove),i.removeEventListener("mouseup",t.onMouseUp),i.removeEventListener("mouseleave",t.onMouseUp),i.removeEventListener("touchmove",t.onMouseMove),i.removeEventListener("touchend",t.onMouseUp),i.removeEventListener("touchcancel",t.onMouseUp))},t}return r.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var n=this.get("start"),a=this.get("end"),o=Ce(n,t,i),l=Ce(a,t,i);!this.get("isInit")&&(n!==o||a!==l)&&this.setValue([o,l])},r.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},r.prototype.setValue=function(t){var i=this.getRange();if(it(t)&&t.length===2){var n=[this.get("start"),this.get("end")];this.update({start:Ce(t[0],i.min,i.max),end:Ce(t[1],i.min,i.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},r.prototype.getValue=function(){return[this.get("start"),this.get("end")]},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:Ett,foregroundStyle:Ott,handlerStyle:Ftt,textStyle:Ptt}})},r.prototype.update=function(t){var i=t.start,n=t.end,a=A({},t);K(i)||(a.start=Ce(i,0,1)),K(n)||(a.end=Ce(n,0,1)),e.prototype.update.call(this,a),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},r.prototype.init=function(){this.set("start",Ce(this.get("start"),0,1)),this.set("end",Ce(this.get("end"),0,1)),e.prototype.init.call(this)},r.prototype.render=function(){e.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},r.prototype.renderInner=function(t){var i=this.cfg;i.start,i.end;var n=i.width,a=i.height,o=i.trendCfg,l=o===void 0?{}:o,s=i.minText,u=i.maxText,c=i.backgroundStyle,f=c===void 0?{}:c,h=i.foregroundStyle,v=h===void 0?{}:h,d=i.textStyle,p=d===void 0?{}:d,x=ft({},Y5,this.cfg.handlerStyle);gr(I(l,"data"))&&(this.trend=this.addComponent(t,A({component:Mtt,id:this.getElementId("trend"),x:0,y:0,width:n,height:a},l))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:A({x:0,y:0,width:n,height:a},f)}),this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:A({y:a/2,textAlign:"right",text:s,silent:!1},p)}),this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:A({y:a/2,textAlign:"left",text:u,silent:!1},p)}),this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:A({y:0,height:a},v)});var m=I(x,"width",g0),_=I(x,"height",24);this.minHandler=this.addComponent(t,{component:KL,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(a-_)/2,width:m,height:_,cursor:"ew-resize",style:x}),this.maxHandler=this.addComponent(t,{component:KL,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(a-_)/2,width:m,height:_,cursor:"ew-resize",style:x})},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.updateUI=function(t,i,n){var a=this.cfg,o=a.start,l=a.end,s=a.width,u=a.minText,c=a.maxText,f=a.handlerStyle,h=a.height,v=o*s,d=l*s;this.trend&&(this.trend.update({width:s,height:h}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",v),t.attr("width",d-v);var p=I(f,"width",g0);i.attr("text",u),n.attr("text",c);var x=this._dodgeText([v,d],i,n),m=x[0],_=x[1];this.minHandler&&(this.minHandler.update({x:v-p/2}),this.get("updateAutoRender")||this.minHandler.render()),P(m,function(b,w){return i.attr(w,b)}),this.maxHandler&&(this.maxHandler.update({x:d-p/2}),this.get("updateAutoRender")||this.maxHandler.render()),P(_,function(b,w){return n.attr(w,b)})},r.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 i=t.findById(this.getElementId("foreground"));i.on("mousedown",this.onMouseDown("foreground")),i.on("touchstart",this.onMouseDown("foreground"))},r.prototype.adjustOffsetRange=function(t){var i=this.cfg,n=i.start,a=i.end;switch(this.currentTarget){case"minHandler":{var o=0-n,l=1-n;return Math.min(l,Math.max(o,t))}case"maxHandler":{var o=0-a,l=1-a;return Math.min(l,Math.max(o,t))}case"foreground":{var o=0-n,l=1-a;return Math.min(l,Math.max(o,t))}}},r.prototype.updateStartEnd=function(t){var i=this.cfg,n=i.start,a=i.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":a+=t;break;case"foreground":n+=t,a+=t;break}this.set("start",n),this.set("end",a)},r.prototype._dodgeText=function(t,i,n){var a,o,l=this.cfg,s=l.handlerStyle,u=l.width,c=2,f=I(s,"width",g0),h=t[0],v=t[1],d=!1;h>v&&(a=[v,h],h=a[0],v=a[1],o=[n,i],i=o[0],n=o[1],d=!0);var p=i.getBBox(),x=n.getBBox(),m=p.width>h-c?{x:h+f/2+c,textAlign:"left"}:{x:h-f/2-c,textAlign:"right"},_=x.width>u-v-c?{x:v-f/2-c,textAlign:"right"}:{x:v+f/2+c,textAlign:"left"};return d?[_,m]:[m,_]},r.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},r.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},r}(Vr),Ltt={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},eC={default:Ltt,hover:{thumbColor:"rgba(0,0,0,0.2)"}},X5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.clearEvents=Yo,t.onStartEvent=function(i){return function(n){t.isMobile=i,n.originalEvent.preventDefault();var a=i?I(n.originalEvent,"touches.0.clientX"):n.clientX,o=i?I(n.originalEvent,"touches.0.clientY"):n.clientY;t.startPos=t.cfg.isHorizontal?a:o,t.bindLaterEvent()}},t.bindLaterEvent=function(){var i=t.getContainerDOM(),n=[];t.isMobile?n=[fu(i,"touchmove",t.onMouseMove),fu(i,"touchend",t.onMouseUp),fu(i,"touchcancel",t.onMouseUp)]:n=[fu(i,"mousemove",t.onMouseMove),fu(i,"mouseup",t.onMouseUp),fu(i,"mouseleave",t.onMouseUp)],t.clearEvents=function(){n.forEach(function(a){a.remove()})}},t.onMouseMove=function(i){var n=t.cfg,a=n.isHorizontal,o=n.thumbOffset;i.preventDefault();var l=t.isMobile?I(i,"touches.0.clientX"):i.clientX,s=t.isMobile?I(i,"touches.0.clientY"):i.clientY,u=a?l:s,c=u-t.startPos;t.startPos=u,t.updateThumbOffset(o+c)},t.onMouseUp=function(i){i.preventDefault(),t.clearEvents()},t.onTrackClick=function(i){var n=t.cfg,a=n.isHorizontal,o=n.x,l=n.y,s=n.thumbLen,u=t.getContainerDOM(),c=u.getBoundingClientRect(),f=i.clientX,h=i.clientY,v=a?f-c.left-o-s/2:h-c.top-l-s/2,d=t.validateRange(v);t.updateThumbOffset(d)},t.onThumbMouseOver=function(){var i=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t.onThumbMouseOut=function(){var i=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t}return r.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var n=this.getValue(),a=Ce(n,t,i);n!==a&&!this.get("isInit")&&this.setValue(a)},r.prototype.getRange=function(){var t=this.get("minLimit")||0,i=this.get("maxLimit")||1;return{min:t,max:i}},r.prototype.setValue=function(t){var i=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*Ce(t,i.min,i.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},r.prototype.getValue=function(){return Ce(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:eC})},r.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.renderTrackShape=function(t){var i=this.cfg,n=i.trackLen,a=i.theme,o=a===void 0?{default:{}}:a,l=ft({},eC,o).default,s=l.lineCap,u=l.trackColor,c=l.size,f=I(this.cfg,"size",c),h=this.get("isHorizontal")?{x1:0+f/2,y1:f/2,x2:n-f/2,y2:f/2,lineWidth:f,stroke:u,lineCap:s}:{x1:f/2,y1:0+f/2,x2:f/2,y2:n-f/2,lineWidth:f,stroke:u,lineCap:s};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:h})},r.prototype.renderThumbShape=function(t){var i=this.cfg,n=i.thumbOffset,a=i.thumbLen,o=i.theme,l=ft({},eC,o).default,s=l.size,u=l.lineCap,c=l.thumbColor,f=I(this.cfg,"size",s),h=this.get("isHorizontal")?{x1:n+f/2,y1:f/2,x2:n+a-f/2,y2:f/2,lineWidth:f,stroke:c,lineCap:u,cursor:"default"}:{x1:f/2,y1:n+f/2,x2:f/2,y2:n+a-f/2,lineWidth:f,stroke:c,lineCap:u,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:h})},r.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);var i=t.findById(this.getElementId("track"));i.on("click",this.onTrackClick);var n=t.findById(this.getElementId("thumb"));n.on("mouseover",this.onThumbMouseOver),n.on("mouseout",this.onThumbMouseOut)},r.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},r.prototype.validateRange=function(t){var i=this.cfg,n=i.thumbLen,a=i.trackLen,o=t;return t+n>a?o=a-n:t+na.x?a.x:r,t=ta.y?a.y:i,n=n=i&&e<=n}yr.isBetween=jtt;function Htt(e,r,t){if((0,eD.isString)(e))return e.padEnd(r,t);if((0,eD.isArray)(e)){var i=e.length;if(i=this.minX&&r.maxX<=this.maxX&&r.minY>=this.minY&&r.maxY<=this.maxY},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.add=function(){for(var r=[],t=0;tr.minX&&this.minYr.minY},e.prototype.size=function(){return this.width*this.height},e.prototype.isPointIn=function(r){return r.x>=this.minX&&r.x<=this.maxX&&r.y>=this.minY&&r.y<=this.maxY},e}();Kr.BBox=q5;var Xtt=function(e,r){var t=r.start,i=r.end;return new q5(e.x+e.width*t.x,e.y+e.height*t.y,e.width*Math.abs(i.x-t.x),e.height*Math.abs(i.y-t.y))};Kr.getRegionBBox=Xtt;function Utt(e){return[[e.minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]]}Kr.toPoints=Utt;Object.defineProperty(be,"__esModule",{value:!0});be.getCoordinateBBox=be.getCoordinateClipCfg=be.getAngleByPoint=be.isPointInCoordinate=be.getDistanceToCenter=be.isFullCircle=be.getXDimensionLength=void 0;var rC=Se,Hy=yr,qtt=Kr;function Ztt(e){if(e.isPolar&&!e.isTransposed)return(e.endAngle-e.startAngle)*e.getRadius();var r=e.convert({x:0,y:0}),t=e.convert({x:1,y:0});return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}be.getXDimensionLength=Ztt;function Qtt(e){if(e.isPolar){var r=e.startAngle,t=e.endAngle;return t-r===Math.PI*2}return!1}be.isFullCircle=Qtt;function Ktt(e,r){var t=e.getCenter();return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}be.getDistanceToCenter=Ktt;function Jtt(e,r){var t=!1;if(e)if(e.type==="theta"){var i=e.start,n=e.end;t=(0,Hy.isBetween)(r.x,i.x,n.x)&&(0,Hy.isBetween)(r.y,i.y,n.y)}else{var a=e.invert(r);t=(0,Hy.isBetween)(a.x,0,1)&&(0,Hy.isBetween)(a.y,0,1)}return t}be.isPointInCoordinate=Jtt;function tet(e,r){var t=e.getCenter();return Math.atan2(r.y-t.y,r.x-t.x)}be.getAngleByPoint=tet;function eet(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight();if(e.isPolar){var o=e.startAngle,l=e.endAngle,s=e.getCenter(),u=e.getRadius();return{type:"path",startState:{path:(0,rC.getSectorPath)(s.x,s.y,u+r,o,o)},endState:function(f){var h=(l-o)*f+o,v=(0,rC.getSectorPath)(s.x,s.y,u+r,o,h);return{path:v}},attrs:{path:(0,rC.getSectorPath)(s.x,s.y,u+r,o,l)}}}var c;return e.isTransposed?c={height:a+r*2}:c={width:n+r*2},{type:"rect",startState:{x:t.x-r,y:i.y-r,width:e.isTransposed?n+r*2:0,height:e.isTransposed?0:a+r*2},endState:c,attrs:{x:t.x-r,y:i.y-r,width:n+r*2,height:a+r*2}}}be.getCoordinateClipCfg=eet;function ret(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight(),o=Math.min(t.x,i.x),l=Math.min(t.y,i.y);return qtt.BBox.fromRange(o-r,l-r,o+n+r,l+a+r)}be.getCoordinateBBox=ret;var w1={},zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.getMean=zf.getMedian=void 0;var iet=j,iD=Y;function net(e){var r=(0,iet.__spreadArray)([],e,!0);r.sort(function(i,n){return i-n});var t=r.length;return t===0?0:t%2===1?r[(t-1)/2]:(r[t/2]+r[t/2-1])/2}zf.getMedian=net;function aet(e){var r=(0,iD.reduce)(e,function(t,i){return t+=isNaN(i)||!(0,iD.isNumber)(i)?0:i},0);return e.length===0?0:r/e.length}zf.getMean=aet;Object.defineProperty(w1,"__esModule",{value:!0});w1.getNormalizedValue=void 0;var iC=zf;function oet(e,r){if(!r)return null;var t;switch(e){case"start":return 0;case"center":return .5;case"end":return 1;case"median":{t=r.isCategory?(0,iC.getMedian)(r.values.map(function(i,n){return n})):(0,iC.getMedian)(r.values);break}case"mean":{t=r.isCategory?(r.values.length-1)/2:(0,iC.getMean)(r.values);break}case"min":t=r.isCategory?0:r[e];break;case"max":t=r.isCategory?r.values.length-1:r[e];break;default:t=e;break}return r.scale(t)}w1.getNormalizedValue=oet;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});mo.Controller=void 0;var set=Y,uet=function(){function e(r){this.visible=!0,this.components=[],this.view=r}return e.prototype.clear=function(r){(0,set.each)(this.components,function(t){t.component.destroy()}),this.components=[]},e.prototype.destroy=function(){this.clear()},e.prototype.getComponents=function(){return this.components},e.prototype.changeVisible=function(r){this.visible!==r&&(this.components.forEach(function(t){r?t.component.show():t.component.hide()}),this.visible=r)},e}();mo.Controller=uet;Object.defineProperty(PM,"__esModule",{value:!0});var Vt=j,xe=Y,cet=Qn,fet=ul,Al=Kt,nC=be,het=yr,Yy=w1,vet=mo,Wy=["regionFilter","shape"],det=function(e){(0,Vt.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.foregroundContainer=i.view.getLayer(Al.LAYER.FORE).addGroup(),i.backgroundContainer=i.view.getLayer(Al.LAYER.BG).addGroup(),i.option=[],i}return Object.defineProperty(r.prototype,"name",{get:function(){return"annotation"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.layout=function(){this.update()},r.prototype.render=function(){},r.prototype.update=function(){var t=this;this.onAfterRender(function(){var n=new Map;(0,xe.each)(t.option,function(a){if((0,xe.includes)(Wy,a.type)){var o=t.updateOrCreate(a);o&&n.set(t.getCacheKey(a),o)}}),t.cache=t.syncCache(n)});var i=new Map;(0,xe.each)(this.option,function(n){if(!(0,xe.includes)(Wy,n.type)){var a=t.updateOrCreate(n);a&&i.set(t.getCacheKey(n),a)}}),this.cache=this.syncCache(i)},r.prototype.clear=function(t){t===void 0&&(t=!1),e.prototype.clear.call(this),this.clearComponents(),this.foregroundContainer.clear(),this.backgroundContainer.clear(),t&&(this.option=[])},r.prototype.destroy=function(){this.clear(!0),this.foregroundContainer.remove(!0),this.backgroundContainer.remove(!0)},r.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},r.prototype.clearComponents=function(){this.getComponents().forEach(function(t){t.component.destroy()}),this.cache.clear()},r.prototype.onAfterRender=function(t){this.view.getOptions().animate?this.view.geometries.forEach(function(i){i.animateOption&&i.once(Al.GEOMETRY_LIFE_CIRCLE.AFTER_DRAW_ANIMATE,function(){t()})}):this.view.getRootView().once(Al.VIEW_LIFE_CIRCLE.AFTER_RENDER,function(){t()})},r.prototype.createAnnotation=function(t){var i=t.type,n=cet.Annotation[(0,xe.upperFirst)(i)];if(n){var a=this.getAnnotationTheme(i),o=this.getAnnotationCfg(i,t,a),l=new n(o);return{component:l,layer:this.isTop(o)?Al.LAYER.FORE:Al.LAYER.BG,direction:Al.DIRECTION.NONE,type:Al.COMPONENT_TYPE.ANNOTATION,extra:t}}},r.prototype.annotation=function(t){this.option.push(t)},r.prototype.arc=function(t){return this.annotation((0,Vt.__assign)({type:"arc"},t)),this},r.prototype.image=function(t){return this.annotation((0,Vt.__assign)({type:"image"},t)),this},r.prototype.line=function(t){return this.annotation((0,Vt.__assign)({type:"line"},t)),this},r.prototype.region=function(t){return this.annotation((0,Vt.__assign)({type:"region"},t)),this},r.prototype.text=function(t){return this.annotation((0,Vt.__assign)({type:"text"},t)),this},r.prototype.dataMarker=function(t){return this.annotation((0,Vt.__assign)({type:"dataMarker"},t)),this},r.prototype.dataRegion=function(t){this.annotation((0,Vt.__assign)({type:"dataRegion"},t))},r.prototype.regionFilter=function(t){this.annotation((0,Vt.__assign)({type:"regionFilter"},t))},r.prototype.shape=function(t){this.annotation((0,Vt.__assign)({type:"shape"},t))},r.prototype.html=function(t){this.annotation((0,Vt.__assign)({type:"html"},t))},r.prototype.parsePosition=function(t){var i=this.view.getXScale(),n=this.view.getScalesByDim("y"),a=(0,xe.isFunction)(t)?t.call(null,i,n):t,o=0,l=0;if((0,xe.isArray)(a)){var s=a[0],u=a[1];if((0,xe.isString)(s)&&s.indexOf("%")!==-1&&!isNaN(s.slice(0,-1)))return this.parsePercentPosition(a);o=(0,Yy.getNormalizedValue)(s,i),l=(0,Yy.getNormalizedValue)(u,Object.values(n)[0])}else if(!(0,xe.isNil)(a))for(var c=0,f=(0,xe.keys)(a);c=v){var x=n.parsePosition([d[s],d[l.field]]);x&&h.push(x)}if(d[s]===f)return!1}),h},r.prototype.parsePercentPosition=function(t){var i=parseFloat(t[0])/100,n=parseFloat(t[1])/100,a=this.view.getCoordinate(),o=a.start,l=a.end,s={x:Math.min(o.x,l.x),y:Math.min(o.y,l.y)},u=a.getWidth()*i+s.x,c=a.getHeight()*n+s.y;return{x:u,y:c}},r.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),i=t.start,n=t.end,a=t.getWidth(),o=t.getHeight(),l={x:Math.min(i.x,n.x),y:Math.min(i.y,n.y)};return{x:l.x,y:l.y,minX:l.x,minY:l.y,maxX:l.x+a,maxY:l.y+o,width:a,height:o}},r.prototype.getAnnotationCfg=function(t,i,n){var a=this,o=this.view.getCoordinate(),l=this.view.getCanvas(),s={};if((0,xe.isNil)(i))return null;if(t==="arc"){var u=i,c=u.start,f=u.end,h=(0,Vt.__rest)(u,["start","end"]),v=this.parsePosition(c),d=this.parsePosition(f),p=(0,nC.getAngleByPoint)(o,v),x=(0,nC.getAngleByPoint)(o,d);p>x&&(x=Math.PI*2+x),s=(0,Vt.__assign)((0,Vt.__assign)({},h),{center:o.getCenter(),radius:(0,nC.getDistanceToCenter)(o,v),startAngle:p,endAngle:x})}else if(t==="image"){var m=i,c=m.start,f=m.end,h=(0,Vt.__rest)(m,["start","end"]);s=(0,Vt.__assign)((0,Vt.__assign)({},h),{start:this.parsePosition(c),end:this.parsePosition(f),src:i.src})}else if(t==="line"){var _=i,c=_.start,f=_.end,h=(0,Vt.__rest)(_,["start","end"]);s=(0,Vt.__assign)((0,Vt.__assign)({},h),{start:this.parsePosition(c),end:this.parsePosition(f),text:(0,xe.get)(i,"text",null)})}else if(t==="region"){var b=i,c=b.start,f=b.end,h=(0,Vt.__rest)(b,["start","end"]);s=(0,Vt.__assign)((0,Vt.__assign)({},h),{start:this.parsePosition(c),end:this.parsePosition(f)})}else if(t==="text"){var w=this.view.getData(),S=i,M=S.position,O=S.content,h=(0,Vt.__rest)(S,["position","content"]),F=O;(0,xe.isFunction)(O)&&(F=O(w)),s=(0,Vt.__assign)((0,Vt.__assign)((0,Vt.__assign)({},this.parsePosition(M)),h),{content:F})}else if(t==="dataMarker"){var L=i,M=L.position,D=L.point,R=L.line,H=L.text,k=L.autoAdjust,V=L.direction,h=(0,Vt.__rest)(L,["position","point","line","text","autoAdjust","direction"]);s=(0,Vt.__assign)((0,Vt.__assign)((0,Vt.__assign)({},h),this.parsePosition(M)),{coordinateBBox:this.getCoordinateBBox(),point:D,line:R,text:H,autoAdjust:k,direction:V})}else if(t==="dataRegion"){var U=i,c=U.start,f=U.end,B=U.region,H=U.text,G=U.lineLength,h=(0,Vt.__rest)(U,["start","end","region","text","lineLength"]);s=(0,Vt.__assign)((0,Vt.__assign)({},h),{points:this.getRegionPoints(c,f),region:B,text:H,lineLength:G})}else if(t==="regionFilter"){var N=i,c=N.start,f=N.end,W=N.apply,q=N.color,h=(0,Vt.__rest)(N,["start","end","apply","color"]),tt=this.view.geometries,ot=[],st=function(Nt){!Nt||(Nt.isGroup()?Nt.getChildren().forEach(function(pe){return st(pe)}):ot.push(Nt))};(0,xe.each)(tt,function(Nt){W?(0,xe.contains)(W,Nt.type)&&(0,xe.each)(Nt.elements,function(pe){st(pe.shape)}):(0,xe.each)(Nt.elements,function(pe){st(pe.shape)})}),s=(0,Vt.__assign)((0,Vt.__assign)({},h),{color:q,shapes:ot,start:this.parsePosition(c),end:this.parsePosition(f)})}else if(t==="shape"){var Z=i,et=Z.render,lt=(0,Vt.__rest)(Z,["render"]),dt=function(_t){if((0,xe.isFunction)(i.render))return et(_t,a.view,{parsePosition:a.parsePosition.bind(a)})};s=(0,Vt.__assign)((0,Vt.__assign)({},lt),{render:dt})}else if(t==="html"){var ht=i,wt=ht.html,M=ht.position,lt=(0,Vt.__rest)(ht,["html","position"]),gt=function(Ut){return(0,xe.isFunction)(wt)?wt(Ut,a.view):wt};s=(0,Vt.__assign)((0,Vt.__assign)((0,Vt.__assign)({},lt),this.parsePosition(M)),{parent:l.get("el").parentNode,html:gt})}var vt=(0,xe.deepMix)({},n,(0,Vt.__assign)((0,Vt.__assign)({},s),{top:i.top,style:i.style,offsetX:i.offsetX,offsetY:i.offsetY}));return t!=="html"&&(vt.container=this.getComponentContainer(vt)),vt.animate=this.view.getOptions().animate&&vt.animate&&(0,xe.get)(i,"animate",vt.animate),vt.animateOption=(0,xe.deepMix)({},fet.DEFAULT_ANIMATE_CFG,vt.animateOption,i.animateOption),vt},r.prototype.isTop=function(t){return(0,xe.get)(t,"top",!0)},r.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},r.prototype.getAnnotationTheme=function(t){return(0,xe.get)(this.view.getTheme(),["components","annotation",t],{})},r.prototype.updateOrCreate=function(t){var i=this.cache.get(this.getCacheKey(t));if(i){var n=t.type,a=this.getAnnotationTheme(n),o=this.getAnnotationCfg(n,t,a);(0,het.omit)(o,["container"]),i.component.update(o),(0,xe.includes)(Wy,t.type)&&i.component.render()}else i=this.createAnnotation(t),i&&(i.component.init(),(0,xe.includes)(Wy,t.type)&&i.component.render());return i},r.prototype.syncCache=function(t){var i=this,n=new Map(this.cache);return t.forEach(function(a,o){n.set(o,a)}),n.forEach(function(a,o){(0,xe.find)(i.option,function(l){return o===i.getCacheKey(l)})||(a.component.destroy(),n.delete(o))}),n},r.prototype.getCacheKey=function(t){return t},r}(vet.Controller),pet=PM.default=det,BA=globalThis&&globalThis.__assign||function(){return BA=Object.assign||function(e){for(var r,t=1,i=arguments.length;t=s&&h<=s+c&&v>=u&&v<=u+f}e.inBox=i;function n(s,u){return!(u.minX>s.maxX||u.maxXs.maxY||u.maxY=0&&n<1/2*Math.PI?(l={x:o.minX,y:o.minY},s={x:o.maxX,y:o.maxY}):1/2*Math.PI<=n&&n1&&(t*=Math.sqrt(v),i*=Math.sqrt(v));var d=t*t*(h*h)+i*i*(f*f),p=d?Math.sqrt((t*t*(i*i)-d)/d):1;a===o&&(p*=-1),isNaN(p)&&(p=0);var x=i?p*t*h/i:0,m=t?p*-i*f/t:0,_=(l+u)/2+Math.cos(n)*x-Math.sin(n)*m,b=(s+c)/2+Math.sin(n)*x+Math.cos(n)*m,w=[(f-x)/t,(h-m)/i],S=[(-1*f-x)/t,(-1*h-m)/i],M=nD([1,0],w),O=nD(w,S);return NA(w,S)<=-1&&(O=Math.PI),NA(w,S)>=1&&(O=0),o===0&&O>0&&(O=O-2*Math.PI),o===1&&O<0&&(O=O+2*Math.PI),{cx:_,cy:b,rx:Xy.isSamePoint(e,[u,c])?0:t,ry:Xy.isSamePoint(e,[u,c])?0:i,startAngle:M,endAngle:M+O,xRotation:n,arcFlag:a,sweepFlag:o}}C1.default=Cet;var Ca={};Object.defineProperty(Ca,"__esModule",{value:!0});Ca.addEndArrow=Ca.addStartArrow=Ca.getShortenOffset=void 0;var aC=j,e3=Mh,J0=Math.sin,tx=Math.cos,QM=Math.atan2,qy=Math.PI;function r3(e,r,t,i,n,a,o){var l=r.stroke,s=r.lineWidth,u=t-n,c=i-a,f=QM(c,u),h=new e3.Path({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*tx(qy/6)+","+10*J0(qy/6)+" L0,0 L"+10*tx(qy/6)+",-"+10*J0(qy/6),stroke:l,lineWidth:s}});h.translate(n,a),h.rotateAtPoint(n,a,f),e.set(o?"startArrowShape":"endArrowShape",h)}function i3(e,r,t,i,n,a,o){var l=r.startArrow,s=r.endArrow,u=r.stroke,c=r.lineWidth,f=o?l:s,h=f.d,v=f.fill,d=f.stroke,p=f.lineWidth,x=aC.__rest(f,["d","fill","stroke","lineWidth"]),m=t-n,_=i-a,b=QM(_,m);h&&(n=n-tx(b)*h,a=a-J0(b)*h);var w=new e3.Path({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:aC.__assign(aC.__assign({},x),{stroke:d||u,lineWidth:p||c,fill:v})});w.translate(n,a),w.rotateAtPoint(n,a,b),e.set(o?"startArrowShape":"endArrowShape",w)}function Aet(e,r,t,i,n){var a=QM(i-r,t-e);return{dx:tx(a)*n,dy:J0(a)*n}}Ca.getShortenOffset=Aet;function Tet(e,r,t,i,n,a){typeof r.startArrow=="object"?i3(e,r,t,i,n,a,!0):r.startArrow?r3(e,r,t,i,n,a,!0):e.set("startArrowShape",null)}Ca.addStartArrow=Tet;function Met(e,r,t,i,n,a){typeof r.endArrow=="object"?i3(e,r,t,i,n,a,!1):r.endArrow?r3(e,r,t,i,n,a,!1):e.set("startArrowShape",null)}Ca.addEndArrow=Met;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.mergeView=Ne.getMergedRegion=Ne.getRefreshRegion=Ne.refreshElement=Ne.drawPath=Ne.clearChanged=Ne.checkChildrenRefresh=Ne.checkRefresh=Ne.drawChildren=Ne.applyAttrsToContext=void 0;var xu=Y,Eet=hn,aD=C1,KM=Pi,oC=Ca,oD={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function Oet(e,r){var t=r.attr();for(var i in t){var n=t[i],a=oD[i]?oD[i]:i;a==="matrix"&&n?e.transform(n[0],n[1],n[3],n[4],n[6],n[7]):a==="lineDash"&&e.setLineDash?xu.isArray(n)&&e.setLineDash(n):(a==="strokeStyle"||a==="fillStyle"?n=Eet.parseStyle(e,r,n):a==="globalAlpha"&&(n=n*e.globalAlpha),e[a]=n)}}Ne.applyAttrsToContext=Oet;function Fet(e,r,t){for(var i=0;iS?w:S,R=w>S?1:w/S,H=w>S?S/w:1;r.translate(_,b),r.rotate(F),r.scale(R,H),r.arc(0,0,D,M,O,1-L),r.scale(1/R,1/H),r.rotate(-F),r.translate(-_,-b)}break}case"Z":r.closePath();break}if(h==="Z")l=s;else{var k=f.length;l=[f[k-2],f[k-1]]}}}}Ne.drawPath=Let;function Det(e,r){var t=e.get("canvas");t&&(r==="remove"&&(e._cacheCanvasBBox=e.get("cacheCanvasBBox")),e.get("hasChanged")||(e.set("hasChanged",!0),e.cfg.parent&&e.cfg.parent.get("hasChanged")||(t.refreshElement(e,r,t),t.get("autoDraw")&&t.draw())))}Ne.refreshElement=Det;function a3(e){var r;if(e.destroyed)r=e._cacheCanvasBBox;else{var t=e.get("cacheCanvasBBox"),i=t&&!!(t.width&&t.height),n=e.getCanvasBBox(),a=n&&!!(n.width&&n.height);i&&a?r=KM.mergeRegion(t,n):i?r=t:a&&(r=n)}return r}Ne.getRefreshRegion=a3;function $et(e){if(!e.length)return null;var r=[],t=[],i=[],n=[];return xu.each(e,function(a){var o=a3(a);o&&(r.push(o.minX),t.push(o.minY),i.push(o.maxX),n.push(o.maxY))}),{minX:xu.min(r),minY:xu.min(t),maxX:xu.max(i),maxY:xu.max(n)}}Ne.getMergedRegion=$et;function ket(e,r){return!e||!r||!KM.intersectRect(e,r)?null:{minX:Math.max(e.minX,r.minX),minY:Math.max(e.minY,r.minY),maxX:Math.min(e.maxX,r.maxX),maxY:Math.min(e.maxY,r.maxY)}}Ne.mergeView=ket;var Dp={};Object.defineProperty(Dp,"__esModule",{value:!0});var Ret=j,Bet=pi,Net=Mh,Zy=Ne,dv=Y,Get=Pi,zet=function(e){Ret.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.onCanvasChange=function(t){Zy.refreshElement(this,t)},r.prototype.getShapeBase=function(){return Net},r.prototype.getGroupBase=function(){return r},r.prototype._applyClip=function(t,i){i&&(t.save(),Zy.applyAttrsToContext(t,i),i.createPath(t),t.restore(),t.clip(),i._afterDraw())},r.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,i=[],n=[];dv.each(t,function(h){var v=h.cfg.cacheCanvasBBox;v&&h.cfg.isInView&&(i.push(v.minX,v.maxX),n.push(v.minY,v.maxY))});var a=null;if(i.length){var o=dv.min(i),l=dv.max(i),s=dv.min(n),u=dv.max(n);a={minX:o,minY:s,x:o,y:s,maxX:l,maxY:u,width:l-o,height:u-s};var c=this.cfg.canvas;if(c){var f=c.getViewRange();this.set("isInView",Get.intersectRect(a,f))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",a)},r.prototype.draw=function(t,i){var n=this.cfg.children,a=i?this.cfg.refresh:!0;n.length&&a&&(t.save(),Zy.applyAttrsToContext(t,this),this._applyClip(t,this.getClip()),Zy.drawChildren(t,n,i),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},r.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},r}(Bet.AbstractGroup);Dp.default=zet;Object.defineProperty(Cn,"__esModule",{value:!0});var lC=j,Vet=pi,Qy=Pi,sC=Ne,jet=pi,Het=Mh,Yet=Dp,Wet=function(e){lC.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return lC.__assign(lC.__assign({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},r.prototype.getShapeBase=function(){return Het},r.prototype.getGroupBase=function(){return Yet.default},r.prototype.onCanvasChange=function(t){sC.refreshElement(this,t)},r.prototype.calculateBBox=function(){var t=this.get("type"),i=this.getHitLineWidth(),n=jet.getBBoxMethod(t),a=n(this),o=i/2,l=a.x-o,s=a.y-o,u=a.x+a.width+o,c=a.y+a.height+o;return{x:l,minX:l,y:s,minY:s,width:a.width+i,height:a.height+i,maxX:u,maxY:c}},r.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},r.prototype.isStroke=function(){return!!this.attrs.stroke},r.prototype._applyClip=function(t,i){i&&(t.save(),sC.applyAttrsToContext(t,i),i.createPath(t),t.restore(),t.clip(),i._afterDraw())},r.prototype.draw=function(t,i){var n=this.cfg.clipShape;if(i){if(this.cfg.refresh===!1){this.set("hasChanged",!1);return}var a=this.getCanvasBBox();if(!Qy.intersectRect(i,a)){this.set("hasChanged",!1),this.cfg.isInView&&this._afterDraw();return}}t.save(),sC.applyAttrsToContext(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},r.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},r.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var i=this.getCanvasBBox(),n=Qy.intersectRect(i,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",i):this.set("cacheCanvasBBox",null)}},r.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},r.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},r.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},r.prototype.fill=function(t){t.fill()},r.prototype.stroke=function(t){t.stroke()},r.prototype.strokeAndFill=function(t){var i=this.attrs,n=i.lineWidth,a=i.opacity,o=i.strokeOpacity,l=i.fillOpacity;this.isFill()&&(!Qy.isNil(l)&&l!==1?(t.globalAlpha=l,this.fill(t),t.globalAlpha=a):this.fill(t)),this.isStroke()&&n>0&&(!Qy.isNil(o)&&o!==1&&(t.globalAlpha=o),this.stroke(t)),this.afterDrawPath(t)},r.prototype.createPath=function(t){},r.prototype.afterDrawPath=function(t){},r.prototype.isInShape=function(t,i){var n=this.isStroke(),a=this.isFill(),o=this.getHitLineWidth();return this.isInStrokeOrPath(t,i,n,a,o)},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){return!1},r.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},r}(Vet.AbstractShape);Cn.default=Wet;var tE={};Object.defineProperty(tE,"__esModule",{value:!0});var uC=j,Xet=Cn,Uet=Pi,qet=function(e){uC.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return uC.__assign(uC.__assign({},t),{x:0,y:0,r:0})},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr(),s=l.x,u=l.y,c=l.r,f=o/2,h=Uet.distance(s,u,t,i);return a&&n?h<=c+f:a?h<=c:n?h>=c-f&&h<=c+f:!1},r.prototype.createPath=function(t){var i=this.attr(),n=i.x,a=i.y,o=i.r;t.beginPath(),t.arc(n,a,o,0,Math.PI*2,!1),t.closePath()},r}(Xet.default);tE.default=qet;var eE={};Object.defineProperty(eE,"__esModule",{value:!0});var cC=j,Zet=Cn;function Ky(e,r,t,i){return e/(t*t)+r/(i*i)}var Qet=function(e){cC.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return cC.__assign(cC.__assign({},t),{x:0,y:0,rx:0,ry:0})},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr(),s=o/2,u=l.x,c=l.y,f=l.rx,h=l.ry,v=(t-u)*(t-u),d=(i-c)*(i-c);return a&&n?Ky(v,d,f+s,h+s)<=1:a?Ky(v,d,f,h)<=1:n?Ky(v,d,f-s,h-s)>=1&&Ky(v,d,f+s,h+s)<=1:!1},r.prototype.createPath=function(t){var i=this.attr(),n=i.x,a=i.y,o=i.rx,l=i.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,a,o,l,0,0,Math.PI*2,!1);else{var s=o>l?o:l,u=o>l?1:o/l,c=o>l?l/o:1;t.save(),t.translate(n,a),t.scale(u,c),t.arc(0,0,s,0,Math.PI*2),t.restore(),t.closePath()}},r}(Zet.default);eE.default=Qet;var rE={};Object.defineProperty(rE,"__esModule",{value:!0});var fC=j,Ket=Cn,Kc=Pi;function lD(e){return e instanceof HTMLElement&&Kc.isString(e.nodeName)&&e.nodeName.toUpperCase()==="CANVAS"}var Jet=function(e){fC.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return fC.__assign(fC.__assign({},t),{x:0,y:0,width:0,height:0})},r.prototype.initAttrs=function(t){this._setImage(t.img)},r.prototype.isStroke=function(){return!1},r.prototype.isOnlyHitBox=function(){return!0},r.prototype._afterLoading=function(){if(this.get("toDraw")===!0){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},r.prototype._setImage=function(t){var i=this,n=this.attrs;if(Kc.isString(t)){var a=new Image;a.onload=function(){if(i.destroyed)return!1;i.attr("img",a),i.set("loading",!1),i._afterLoading();var o=i.get("callback");o&&o.call(i)},a.crossOrigin="Anonymous",a.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):lD(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),t==="img"&&this._setImage(i)},r.prototype.createPath=function(t){if(this.get("loading")){this.set("toDraw",!0),this.set("context",t);return}var i=this.attr(),n=i.x,a=i.y,o=i.width,l=i.height,s=i.sx,u=i.sy,c=i.swidth,f=i.sheight,h=i.img;(h instanceof Image||lD(h))&&(!Kc.isNil(s)&&!Kc.isNil(u)&&!Kc.isNil(c)&&!Kc.isNil(f)?t.drawImage(h,s,u,c,f,n,a,o,l):t.drawImage(h,n,a,o,l))},r}(Ket.default);rE.default=Jet;var iE={},xo=_r(aQ),Eh={};Object.defineProperty(Eh,"__esModule",{value:!0});var trt=xo;function ert(e,r,t,i,n,a,o){var l=Math.min(e,t),s=Math.max(e,t),u=Math.min(r,i),c=Math.max(r,i),f=n/2;return a>=l-f&&a<=s+f&&o>=u-f&&o<=c+f?trt.Line.pointToLine(e,r,t,i,a,o)<=n/2:!1}Eh.default=ert;Object.defineProperty(iE,"__esModule",{value:!0});var hC=j,sD=xo,rrt=Cn,irt=Eh,Jy=Ca,nrt=function(e){hC.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return hC.__assign(hC.__assign({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},r.prototype.initAttrs=function(t){this.setArrow()},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),this.setArrow()},r.prototype.setArrow=function(){var t=this.attr(),i=t.x1,n=t.y1,a=t.x2,o=t.y2,l=t.startArrow,s=t.endArrow;l&&Jy.addStartArrow(this,t,a,o,i,n),s&&Jy.addEndArrow(this,t,i,n,a,o)},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){if(!n||!o)return!1;var l=this.attr(),s=l.x1,u=l.y1,c=l.x2,f=l.y2;return irt.default(s,u,c,f,o,t,i)},r.prototype.createPath=function(t){var i=this.attr(),n=i.x1,a=i.y1,o=i.x2,l=i.y2,s=i.startArrow,u=i.endArrow,c={dx:0,dy:0},f={dx:0,dy:0};s&&s.d&&(c=Jy.getShortenOffset(n,a,o,l,i.startArrow.d)),u&&u.d&&(f=Jy.getShortenOffset(n,a,o,l,i.endArrow.d)),t.beginPath(),t.moveTo(n+c.dx,a+c.dy),t.lineTo(o-f.dx,l-f.dy)},r.prototype.afterDrawPath=function(t){var i=this.get("startArrowShape"),n=this.get("endArrowShape");i&&i.draw(t),n&&n.draw(t)},r.prototype.getTotalLength=function(){var t=this.attr(),i=t.x1,n=t.y1,a=t.x2,o=t.y2;return sD.Line.length(i,n,a,o)},r.prototype.getPoint=function(t){var i=this.attr(),n=i.x1,a=i.y1,o=i.x2,l=i.y2;return sD.Line.pointAt(n,a,o,l,t)},r}(rrt.default);iE.default=nrt;var nE={},S1=_r(HQ);Object.defineProperty(nE,"__esModule",{value:!0});var art=j,ort=Y,lrt=S1,srt=Cn,urt=Pi,crt=Ne,frt={circle:function(e,r,t){return[["M",e-t,r],["A",t,t,0,1,0,e+t,r],["A",t,t,0,1,0,e-t,r]]},square:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r-t],["L",e+t,r+t],["L",e-t,r+t],["Z"]]},diamond:function(e,r,t){return[["M",e-t,r],["L",e,r-t],["L",e+t,r],["L",e,r+t],["Z"]]},triangle:function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r+i],["L",e,r-i],["L",e+t,r+i],["Z"]]},"triangle-down":function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r-i],["L",e+t,r-i],["L",e,r+i],["Z"]]}},hrt=function(e){art.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.initAttrs=function(t){this._resetParamsCache()},r.prototype._resetParamsCache=function(){this.set("paramsCache",{})},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),["symbol","x","y","r","radius"].indexOf(t)!==-1&&this._resetParamsCache()},r.prototype.isOnlyHitBox=function(){return!0},r.prototype._getR=function(t){return ort.isNil(t.r)?t.radius:t.r},r.prototype._getPath=function(){var t=this.attr(),i=t.x,n=t.y,a=t.symbol||"circle",o=this._getR(t),l,s;if(urt.isFunction(a))l=a,s=l(i,n,o),s=lrt.path2Absolute(s);else{if(l=r.Symbols[a],!l)return console.warn(a+" marker is not supported."),null;s=l(i,n,o)}return s},r.prototype.createPath=function(t){var i=this._getPath(),n=this.get("paramsCache");crt.drawPath(this,t,{path:i},n)},r.Symbols=frt,r}(srt.default);nE.default=hrt;var aE={},A1={};Object.defineProperty(A1,"__esModule",{value:!0});var vrt=pi;function drt(e,r,t){var i=vrt.getOffScreenContext();return e.createPath(i),i.isPointInPath(r,t)}A1.default=drt;var T1={};Object.defineProperty(T1,"__esModule",{value:!0});var prt=1e-6;function vC(e){return Math.abs(e)0!=vC(l[1]-t)>0&&vC(r-(t-o[1])*(o[0]-l[0])/(o[1]-l[1])-o[0])<0&&(i=!i)}return i}T1.default=yrt;var oE={},ta=_r(Eq),mrt=_r(Uz),M1={};Object.defineProperty(M1,"__esModule",{value:!0});var xrt=Pi;function _rt(e,r,t,i,n,a,o,l){var s=(Math.atan2(l-r,o-e)+Math.PI*2)%(Math.PI*2);if(sn)return!1;var u={x:e+t*Math.cos(s),y:r+t*Math.sin(s)};return xrt.distance(u.x,u.y,o,l)<=a/2}M1.default=_rt;Object.defineProperty(oE,"__esModule",{value:!0});var brt=j,wrt=pi,Crt=xo,Srt=xo,Art=ta,Trt=mrt,Mrt=Pi,Ert=Eh,Ort=M1,Frt=Art.ext.transform;function Prt(e){for(var r=!1,t=e.length,i=0;ib?_:b,L=_>b?1:_/b,D=_>b?b/_:1,R=Frt(null,[["t",-x,-m],["r",-M],["s",1/L,1/D]]);Trt.transformMat3(O,O,R),a=Ort.default(0,0,F,w,S,r,O[0],O[1]);break}if(a)break}}return a}function Lrt(e){for(var r=e.length,t=[],i=[],n=[],a=0;a0&&i.push(n),{polygons:t,polylines:i}}oE.default=brt.__assign({hasArc:Prt,extractPolygons:Lrt,isPointInStroke:Irt},wrt.PathUtil);Object.defineProperty(aE,"__esModule",{value:!0});var dC=j,pC=xo,Pc=Y,Drt=Cn,uD=S1,$rt=Ne,krt=A1,Rrt=T1,tm=oE,cD=Ca;function fD(e,r,t){for(var i=!1,n=0;n=c[0]&&t<=c[1]&&(n=(t-c[0])/(c[1]-c[0]),a=f)});var l=o[a];if(Pc.isNil(l)||Pc.isNil(a))return null;var s=l.length,u=o[a+1];return pC.Cubic.pointAt(l[s-2],l[s-1],u[1],u[2],u[3],u[4],u[5],u[6],n)},r.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",tm.default.pathToCurve(t))},r.prototype._setTcache=function(){var t=0,i=0,n=[],a,o,l,s,u=this.get("curve");if(!!u){if(Pc.each(u,function(c,f){l=u[f+1],s=c.length,l&&(t+=pC.Cubic.length(c[s-2],c[s-1],l[1],l[2],l[3],l[4],l[5],l[6])||0)}),this.set("totalLength",t),t===0){this.set("tCache",[]);return}Pc.each(u,function(c,f){l=u[f+1],s=c.length,l&&(a=[],a[0]=i/t,o=pC.Cubic.length(c[s-2],c[s-1],l[1],l[2],l[3],l[4],l[5],l[6]),i+=o||0,a[1]=i/t,n.push(a))}),this.set("tCache",n)}},r.prototype.getStartTangent=function(){var t=this.getSegments(),i;if(t.length>1){var n=t[0].currentPoint,a=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([n[0]-o[0],n[1]-o[1]]),i.push([n[0],n[1]])):(i.push([a[0],a[1]]),i.push([n[0],n[1]]))}return i},r.prototype.getEndTangent=function(){var t=this.getSegments(),i=t.length,n;if(i>1){var a=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;n=[],l?(n.push([o[0]-l[0],o[1]-l[1]]),n.push([o[0],o[1]])):(n.push([a[0],a[1]]),n.push([o[0],o[1]]))}return n},r}(Drt.default);aE.default=Brt;var lE={},E1={};Object.defineProperty(E1,"__esModule",{value:!0});var hD=Eh;function Nrt(e,r,t,i,n){var a=e.length;if(a<2)return!1;for(var o=0;o=l[0]&&t<=l[1]&&(a=(t-l[0])/(l[1]-l[0]),o=s)}),vD.Line.pointAt(i[o][0],i[o][1],i[o+1][0],i[o+1][1],a)},r.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var i=this.getTotalLength();if(!(i<=0)){var n=0,a=[],o,l;yC.each(t,function(s,u){t[u+1]&&(o=[],o[0]=n/i,l=vD.Line.length(s[0],s[1],t[u+1][0],t[u+1][1]),n+=l,o[1]=n/i,a.push(o))}),this.set("tCache",a)}}},r.prototype.getStartTangent=function(){var t=this.attr().points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i},r.prototype.getEndTangent=function(){var t=this.attr().points,i=t.length-1,n=[];return n.push([t[i-1][0],t[i-1][1]]),n.push([t[i][0],t[i][1]]),n},r}(Wrt.default);sE.default=Urt;var uE={},cE={};Object.defineProperty(cE,"__esModule",{value:!0});var rm=Pi;function qrt(e,r,t,i,n,a,o){var l=n/2;return rm.inBox(e-l,r-l,t,n,a,o)||rm.inBox(e+t-l,r-l,n,i,a,o)||rm.inBox(e+l,r+i-l,t,n,a,o)||rm.inBox(e-l,r+l,n,i,a,o)}cE.default=qrt;var fE={};Object.defineProperty(fE,"__esModule",{value:!0});var im=Eh,nm=M1;function Zrt(e,r,t,i,n,a,o,l){return im.default(e+n,r,e+t-n,r,a,o,l)||im.default(e+t,r+n,e+t,r+i-n,a,o,l)||im.default(e+t-n,r+i,e+n,r+i,a,o,l)||im.default(e,r+i-n,e,r+n,a,o,l)||nm.default(e+t-n,r+n,n,1.5*Math.PI,2*Math.PI,a,o,l)||nm.default(e+t-n,r+i-n,n,0,.5*Math.PI,a,o,l)||nm.default(e+n,r+i-n,n,.5*Math.PI,Math.PI,a,o,l)||nm.default(e+n,r+n,n,Math.PI,1.5*Math.PI,a,o,l)}fE.default=Zrt;Object.defineProperty(uE,"__esModule",{value:!0});var mC=j,Qrt=Cn,Krt=hn,dD=Pi,Jrt=cE,tit=fE,eit=A1,rit=function(e){mC.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return mC.__assign(mC.__assign({},t),{x:0,y:0,width:0,height:0,radius:0})},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr(),s=l.x,u=l.y,c=l.width,f=l.height,h=l.radius;if(h){var d=!1;return n&&(d=tit.default(s,u,c,f,h,o,t,i)),!d&&a&&(d=eit.default(this,t,i)),d}else{var v=o/2;if(a&&n)return dD.inBox(s-v,u-v,c+v,f+v,t,i);if(a)return dD.inBox(s,u,c,f,t,i);if(n)return Jrt.default(s,u,c,f,o,t,i)}},r.prototype.createPath=function(t){var i=this.attr(),n=i.x,a=i.y,o=i.width,l=i.height,s=i.radius;if(t.beginPath(),s===0)t.rect(n,a,o,l);else{var u=Krt.parseRadius(s),c=u[0],f=u[1],h=u[2],v=u[3];t.moveTo(n+c,a),t.lineTo(n+o-f,a),f!==0&&t.arc(n+o-f,a+f,f,-Math.PI/2,0),t.lineTo(n+o,a+l-h),h!==0&&t.arc(n+o-h,a+l-h,h,0,Math.PI/2),t.lineTo(n+v,a+l),v!==0&&t.arc(n+v,a+l-v,v,Math.PI/2,Math.PI),t.lineTo(n,a+c),c!==0&&t.arc(n+c,a+c,c,Math.PI,Math.PI*1.5),t.closePath()}},r}(Qrt.default);uE.default=rit;var hE={};Object.defineProperty(hE,"__esModule",{value:!0});var xC=j,iit=Cn,Ic=Pi,pD=pi,nit=function(e){xC.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return xC.__assign(xC.__assign({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},r.prototype.isOnlyHitBox=function(){return!0},r.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},r.prototype._assembleFont=function(){var t=this.attrs;t.font=pD.assembleFont(t)},r.prototype._setText=function(t){var i=null;Ic.isString(t)&&t.indexOf(` `)!==-1&&(i=t.split(` `)),this.set("textArr",i)},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),t.startsWith("font")&&this._assembleFont(),t==="text"&&this._setText(i)},r.prototype._getSpaceingY=function(){var t=this.attrs,i=t.lineHeight,n=t.fontSize*1;return i?i-n:n*.14},r.prototype._drawTextArr=function(t,i,n){var a=this.attrs,o=a.textBaseline,l=a.x,s=a.y,u=a.fontSize*1,c=this._getSpaceingY(),f=pD.getTextHeight(a.text,a.fontSize,a.lineHeight),h;Ic.each(i,function(v,d){h=s+d*(c+u)-f+u,o==="middle"&&(h+=f-u-(f-u)/2),o==="top"&&(h+=f-u),Ic.isNil(v)||(n?t.fillText(v,l,h):t.strokeText(v,l,h))})},r.prototype._drawText=function(t,i){var n=this.attr(),a=n.x,o=n.y,l=this.get("textArr");if(l)this._drawTextArr(t,l,i);else{var s=n.text;Ic.isNil(s)||(i?t.fillText(s,a,o):t.strokeText(s,a,o))}},r.prototype.strokeAndFill=function(t){var i=this.attrs,n=i.lineWidth,a=i.opacity,o=i.strokeOpacity,l=i.fillOpacity;this.isStroke()&&n>0&&(!Ic.isNil(o)&&o!==1&&(t.globalAlpha=a),this.stroke(t)),this.isFill()&&(!Ic.isNil(l)&&l!==1?(t.globalAlpha=l,this.fill(t),t.globalAlpha=a):this.fill(t)),this.afterDrawPath(t)},r.prototype.fill=function(t){this._drawText(t,!0)},r.prototype.stroke=function(t){this._drawText(t,!1)},r}(iit.default);hE.default=nit;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=Cn;Object.defineProperty(e,"Base",{enumerable:!0,get:function(){return r.default}});var t=tE;Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return t.default}});var i=eE;Object.defineProperty(e,"Ellipse",{enumerable:!0,get:function(){return i.default}});var n=rE;Object.defineProperty(e,"Image",{enumerable:!0,get:function(){return n.default}});var a=iE;Object.defineProperty(e,"Line",{enumerable:!0,get:function(){return a.default}});var o=nE;Object.defineProperty(e,"Marker",{enumerable:!0,get:function(){return o.default}});var l=aE;Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return l.default}});var s=lE;Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return s.default}});var u=sE;Object.defineProperty(e,"Polyline",{enumerable:!0,get:function(){return u.default}});var c=uE;Object.defineProperty(e,"Rect",{enumerable:!0,get:function(){return c.default}});var f=hE;Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return f.default}})})(Mh);var vE={},O1={};Object.defineProperty(O1,"__esModule",{value:!0});O1.getShape=void 0;var GA=pi;function ait(e,r){if(r){var t=GA.invert(r);return GA.multiplyVec2(t,e)}return e}function o3(e,r,t){var i=e.getTotalMatrix();if(i){var n=ait([r,t,1],i),a=n[0],o=n[1];return[a,o]}return[r,t]}function gD(e,r,t){if(e.isCanvas&&e.isCanvas())return!0;if(!GA.isAllowCapture(e)||e.cfg.isInView===!1)return!1;if(e.cfg.clipShape){var i=o3(e,r,t),n=i[0],a=i[1];if(e.isClipped(n,a))return!1}var o=e.cfg.cacheCanvasBBox||e.getCanvasBBox();return r>=o.minX&&r<=o.maxX&&t>=o.minY&&t<=o.maxY}function l3(e,r,t){if(!gD(e,r,t))return null;for(var i=null,n=e.getChildren(),a=n.length,o=a-1;o>=0;o--){var l=n[o];if(l.isGroup())i=l3(l,r,t);else if(gD(l,r,t)){var s=l,u=o3(l,r,t),c=u[0],f=u[1];s.isInShape(c,f)&&(i=l)}if(i)break}return i}O1.getShape=l3;Object.defineProperty(vE,"__esModule",{value:!0});var oit=j,lit=pi,sit=O1,uit=Mh,cit=Dp,am=Pi,Tl=Ne,fit=function(e){oit.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.renderer="canvas",t.autoDraw=!0,t.localRefresh=!0,t.refreshElements=[],t.clipView=!0,t.quickHit=!1,t},r.prototype.onCanvasChange=function(t){(t==="attr"||t==="sort"||t==="changeSize")&&(this.set("refreshElements",[this]),this.draw())},r.prototype.getShapeBase=function(){return uit},r.prototype.getGroupBase=function(){return cit.default},r.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||am.getPixelRatio();return t>=1?Math.ceil(t):1},r.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},r.prototype.createDom=function(){var t=document.createElement("canvas"),i=t.getContext("2d");return this.set("context",i),t},r.prototype.setDOMSize=function(t,i){e.prototype.setDOMSize.call(this,t,i);var n=this.get("context"),a=this.get("el"),o=this.getPixelRatio();a.width=o*t,a.height=o*i,o>1&&n.scale(o,o)},r.prototype.clear=function(){e.prototype.clear.call(this),this._clearFrame();var t=this.get("context"),i=this.get("el");t.clearRect(0,0,i.width,i.height)},r.prototype.getShape=function(t,i){var n;return this.get("quickHit")?n=sit.getShape(this,t,i):n=e.prototype.getShape.call(this,t,i,null),n},r.prototype._getRefreshRegion=function(){var t=this.get("refreshElements"),i=this.getViewRange(),n;if(t.length&&t[0]===this)n=i;else if(n=Tl.getMergedRegion(t),n){n.minX=Math.floor(n.minX),n.minY=Math.floor(n.minY),n.maxX=Math.ceil(n.maxX),n.maxY=Math.ceil(n.maxY),n.maxY+=1;var a=this.get("clipView");a&&(n=Tl.mergeView(n,i))}return n},r.prototype.refreshElement=function(t){var i=this.get("refreshElements");i.push(t)},r.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(am.clearAnimationFrame(t),this.set("drawFrame",null),this.set("refreshElements",[]))},r.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},r.prototype._drawAll=function(){var t=this.get("context"),i=this.get("el"),n=this.getChildren();t.clearRect(0,0,i.width,i.height),Tl.applyAttrsToContext(t,this),Tl.drawChildren(t,n),this.set("refreshElements",[])},r.prototype._drawRegion=function(){var t=this.get("context"),i=this.get("refreshElements"),n=this.getChildren(),a=this._getRefreshRegion();a?(t.clearRect(a.minX,a.minY,a.maxX-a.minX,a.maxY-a.minY),t.save(),t.beginPath(),t.rect(a.minX,a.minY,a.maxX-a.minX,a.maxY-a.minY),t.clip(),Tl.applyAttrsToContext(t,this),Tl.checkRefresh(this,n,a),Tl.drawChildren(t,n,a),t.restore()):i.length&&Tl.clearChanged(i),am.each(i,function(o){o.get("hasChanged")&&o.set("hasChanged",!1)}),this.set("refreshElements",[])},r.prototype._startDraw=function(){var t=this,i=this.get("drawFrame");i||(i=am.requestAnimationFrame(function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)}),this.set("drawFrame",i))},r.prototype.skipDraw=function(){},r.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},r}(lit.AbstractCanvas);vE.default=fit;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.Shape=void 0;var r=j,t=Mh;e.Shape=t,r.__exportStar(pi,e);var i=vE;Object.defineProperty(e,"Canvas",{enumerable:!0,get:function(){return i.default}});var n=Dp;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return n.default}});var a=C1;Object.defineProperty(e,"getArcParams",{enumerable:!0,get:function(){return a.default}}),e.version="0.5.12"})(Lp);var hit=nM(Lp),vit=jG({__proto__:null,default:hit},[Lp]),dE={},$p={},Zi={},Wn={},mr={},ur={};Object.defineProperty(ur,"__esModule",{value:!0});ur.EVENTS=ur.SVG_ATTR_MAP=ur.SHAPE_TO_TAGS=void 0;ur.SHAPE_TO_TAGS={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"};ur.SVG_ATTR_MAP={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"};ur.EVENTS=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"];Object.defineProperty(mr,"__esModule",{value:!0});mr.moveTo=mr.sortDom=mr.createDom=mr.createSVGElement=void 0;var dit=Y,pit=ur;function s3(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}mr.createSVGElement=s3;function git(e){var r=pit.SHAPE_TO_TAGS[e.type],t=e.getParent();if(!r)throw new Error("the type "+e.type+" is not supported by svg");var i=s3(r);if(e.get("id")&&(i.id=e.get("id")),e.set("el",i),e.set("attrs",{}),t){var n=t.get("el");n||(n=t.createDom(),t.set("el",n)),n.appendChild(i)}return i}mr.createDom=git;function yit(e,r){var t=e.get("el"),i=dit.toArray(t.children).sort(r),n=document.createDocumentFragment();i.forEach(function(a){n.appendChild(a)}),t.appendChild(n)}mr.sortDom=yit;function mit(e,r){var t=e.parentNode,i=Array.from(t.childNodes).filter(function(l){return l.nodeType===1&&l.nodeName.toLowerCase()!=="defs"}),n=i[r],a=i.indexOf(e);if(n){if(a>r)t.insertBefore(e,n);else if(a0&&(i?"stroke"in n?this._setColor(t,"stroke",l):"strokeStyle"in n&&this._setColor(t,"stroke",s):this._setColor(t,"stroke",l||s),c&&h.setAttribute(tu.SVG_ATTR_MAP.strokeOpacity,c),f&&h.setAttribute(tu.SVG_ATTR_MAP.lineWidth,f))},r.prototype._setColor=function(t,i,n){var a=this.get("el");if(!n){a.setAttribute(tu.SVG_ATTR_MAP[i],"none");return}if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var o=t.find("gradient",n);o||(o=t.addGradient(n)),a.setAttribute(tu.SVG_ATTR_MAP[i],"url(#"+o+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var o=t.find("pattern",n);o||(o=t.addPattern(n)),a.setAttribute(tu.SVG_ATTR_MAP[i],"url(#"+o+")")}else a.setAttribute(tu.SVG_ATTR_MAP[i],n)},r.prototype.shadow=function(t,i){var n=this.attr(),a=i||n,o=a.shadowOffsetX,l=a.shadowOffsetY,s=a.shadowBlur,u=a.shadowColor;(o||l||s||u)&&bC.setShadow(this,t)},r.prototype.transform=function(t){var i=this.attr(),n=(t||i).matrix;n&&bC.setTransform(this)},r.prototype.isInShape=function(t,i){return this.isPointInPath(t,i)},r.prototype.isPointInPath=function(t,i){var n=this.get("el"),a=this.get("canvas"),o=a.get("el").getBoundingClientRect(),l=t+o.left,s=i+o.top,u=document.elementFromPoint(l,s);return!!(u&&u.isEqualNode(n))},r.prototype.getHitLineWidth=function(){var t=this.attrs,i=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?i+n:0},r}(Pit.AbstractShape);Zi.default=Rit;var pE={};Object.defineProperty(pE,"__esModule",{value:!0});var wC=j,Bit=Y,wD=ur,Nit=Zi,Git=function(e){wC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="circle",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return wC.__assign(wC.__assign({},t),{x:0,y:0,r:0})},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");Bit.each(i||n,function(o,l){l==="x"||l==="y"?a.setAttribute("c"+l,o):wD.SVG_ATTR_MAP[l]&&a.setAttribute(wD.SVG_ATTR_MAP[l],o)})},r}(Nit.default);pE.default=Git;var gE={};Object.defineProperty(gE,"__esModule",{value:!0});var zit=j,Vit=Y,CD=ur,jit=Zi,Hit=function(e){zit.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dom",t.canFill=!1,t.canStroke=!1,t}return r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");if(Vit.each(i||n,function(u,c){CD.SVG_ATTR_MAP[c]&&a.setAttribute(CD.SVG_ATTR_MAP[c],u)}),typeof n.html=="function"){var o=n.html.call(this,n);if(o instanceof Element||o instanceof HTMLDocument){for(var l=a.childNodes,s=l.length-1;s>=0;s--)a.removeChild(l[s]);a.appendChild(o)}else a.innerHTML=o}else a.innerHTML=n.html},r}(jit.default);gE.default=Hit;var yE={};Object.defineProperty(yE,"__esModule",{value:!0});var CC=j,Yit=Y,SD=ur,Wit=Zi,Xit=function(e){CC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ellipse",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return CC.__assign(CC.__assign({},t),{x:0,y:0,rx:0,ry:0})},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");Yit.each(i||n,function(o,l){l==="x"||l==="y"?a.setAttribute("c"+l,o):SD.SVG_ATTR_MAP[l]&&a.setAttribute(SD.SVG_ATTR_MAP[l],o)})},r}(Wit.default);yE.default=Xit;var mE={};Object.defineProperty(mE,"__esModule",{value:!0});var SC=j,AC=Y,AD=ur,Uit=Zi,qit=function(e){SC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="image",t.canFill=!1,t.canStroke=!1,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return SC.__assign(SC.__assign({},t),{x:0,y:0,width:0,height:0})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el");AC.each(i||a,function(l,s){s==="img"?n._setImage(a.img):AD.SVG_ATTR_MAP[s]&&o.setAttribute(AD.SVG_ATTR_MAP[s],l)})},r.prototype.setAttr=function(t,i){this.attrs[t]=i,t==="img"&&this._setImage(i)},r.prototype._setImage=function(t){var i=this.attr(),n=this.get("el");if(AC.isString(t))n.setAttribute("href",t);else if(t instanceof window.Image)i.width||(n.setAttribute("width",t.width),this.attr("width",t.width)),i.height||(n.setAttribute("height",t.height),this.attr("height",t.height)),n.setAttribute("href",t.src);else if(t instanceof HTMLElement&&AC.isString(t.nodeName)&&t.nodeName.toUpperCase()==="CANVAS")n.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width",""+t.width),a.setAttribute("height",""+t.height),a.getContext("2d").putImageData(t,0,0),i.width||(n.setAttribute("width",""+t.width),this.attr("width",t.width)),i.height||(n.setAttribute("height",""+t.height),this.attr("height",t.height)),n.setAttribute("href",a.toDataURL())}},r}(Uit.default);mE.default=qit;var xE={};Object.defineProperty(xE,"__esModule",{value:!0});var TC=j,TD=xo,MD=Y,Lc=ur,Zit=Zi,Qit=function(e){TC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t.canFill=!1,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return TC.__assign(TC.__assign({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");MD.each(i||n,function(o,l){if(l==="startArrow"||l==="endArrow")if(o){var s=MD.isObject(o)?t.addArrow(n,Lc.SVG_ATTR_MAP[l]):t.getDefaultArrow(n,Lc.SVG_ATTR_MAP[l]);a.setAttribute(Lc.SVG_ATTR_MAP[l],"url(#"+s+")")}else a.removeAttribute(Lc.SVG_ATTR_MAP[l]);else Lc.SVG_ATTR_MAP[l]&&a.setAttribute(Lc.SVG_ATTR_MAP[l],o)})},r.prototype.getTotalLength=function(){var t=this.attr(),i=t.x1,n=t.y1,a=t.x2,o=t.y2;return TD.Line.length(i,n,a,o)},r.prototype.getPoint=function(t){var i=this.attr(),n=i.x1,a=i.y1,o=i.x2,l=i.y2;return TD.Line.pointAt(n,a,o,l,t)},r}(Zit.default);xE.default=Qit;var _E={},bE={};Object.defineProperty(bE,"__esModule",{value:!0});var om={circle:function(e,r,t){return[["M",e,r],["m",-t,0],["a",t,t,0,1,0,t*2,0],["a",t,t,0,1,0,-t*2,0]]},square:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r-t],["L",e+t,r+t],["L",e-t,r+t],["Z"]]},diamond:function(e,r,t){return[["M",e-t,r],["L",e,r-t],["L",e+t,r],["L",e,r+t],["Z"]]},triangle:function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r+i],["L",e,r-i],["L",e+t,r+i],["z"]]},triangleDown:function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r-i],["L",e+t,r-i],["L",e,r+i],["Z"]]}};bE.default={get:function(e){return om[e]},register:function(e,r){om[e]=r},remove:function(e){delete om[e]},getAll:function(){return om}};Object.defineProperty(_E,"__esModule",{value:!0});var Kit=j,ED=Y,Jit=Zi,OD=bE,tnt=function(e){Kit.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="marker",t.canFill=!0,t.canStroke=!0,t}return r.prototype.createPath=function(t){var i=this.get("el");i.setAttribute("d",this._assembleMarker())},r.prototype._assembleMarker=function(){var t=this._getPath();return ED.isArray(t)?t.map(function(i){return i.join(" ")}).join(""):t},r.prototype._getPath=function(){var t=this.attr(),i=t.x,n=t.y,a=t.r||t.radius,o=t.symbol||"circle",l;return ED.isFunction(o)?l=o:l=OD.default.get(o),l?l(i,n,a):(console.warn(l+" symbol is not exist."),null)},r.symbolsFactory=OD.default,r}(Jit.default);_E.default=tnt;var wE={};Object.defineProperty(wE,"__esModule",{value:!0});var MC=j,EC=Y,Dc=ur,ent=Zi,rnt=function(e){MC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="path",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return MC.__assign(MC.__assign({},t),{startArrow:!1,endArrow:!1})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el");EC.each(i||a,function(l,s){if(s==="path"&&EC.isArray(l))o.setAttribute("d",n._formatPath(l));else if(s==="startArrow"||s==="endArrow")if(l){var u=EC.isObject(l)?t.addArrow(a,Dc.SVG_ATTR_MAP[s]):t.getDefaultArrow(a,Dc.SVG_ATTR_MAP[s]);o.setAttribute(Dc.SVG_ATTR_MAP[s],"url(#"+u+")")}else o.removeAttribute(Dc.SVG_ATTR_MAP[s]);else Dc.SVG_ATTR_MAP[s]&&o.setAttribute(Dc.SVG_ATTR_MAP[s],l)})},r.prototype._formatPath=function(t){var i=t.map(function(n){return n.join(" ")}).join("");return~i.indexOf("NaN")?"":i},r.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},r.prototype.getPoint=function(t){var i=this.get("el"),n=this.getTotalLength();if(n===0)return null;var a=i?i.getPointAtLength(t*n):null;return a?{x:a.x,y:a.y}:null},r}(ent.default);wE.default=rnt;var CE={};Object.defineProperty(CE,"__esModule",{value:!0});var int=j,FD=Y,PD=ur,nnt=Zi,ant=function(e){int.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polygon",t.canFill=!0,t.canStroke=!0,t}return r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");FD.each(i||n,function(o,l){l==="points"&&FD.isArray(o)&&o.length>=2?a.setAttribute("points",o.map(function(s){return s[0]+","+s[1]}).join(" ")):PD.SVG_ATTR_MAP[l]&&a.setAttribute(PD.SVG_ATTR_MAP[l],o)})},r}(nnt.default);CE.default=ant;var SE={};Object.defineProperty(SE,"__esModule",{value:!0});var OC=j,ont=xo,ID=xo,pv=Y,LD=ur,lnt=Zi,snt=function(e){OC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polyline",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return OC.__assign(OC.__assign({},t),{startArrow:!1,endArrow:!1})},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),["points"].indexOf(t)!==-1&&this._resetCache()},r.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");pv.each(i||n,function(o,l){l==="points"&&pv.isArray(o)&&o.length>=2?a.setAttribute("points",o.map(function(s){return s[0]+","+s[1]}).join(" ")):LD.SVG_ATTR_MAP[l]&&a.setAttribute(LD.SVG_ATTR_MAP[l],o)})},r.prototype.getTotalLength=function(){var t=this.attr().points,i=this.get("totalLength");return pv.isNil(i)?(this.set("totalLength",ont.Polyline.length(t)),this.get("totalLength")):i},r.prototype.getPoint=function(t){var i=this.attr().points,n=this.get("tCache");n||(this._setTcache(),n=this.get("tCache"));var a,o;return pv.each(n,function(l,s){t>=l[0]&&t<=l[1]&&(a=(t-l[0])/(l[1]-l[0]),o=s)}),ID.Line.pointAt(i[o][0],i[o][1],i[o+1][0],i[o+1][1],a)},r.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var i=this.getTotalLength();if(!(i<=0)){var n=0,a=[],o,l;pv.each(t,function(s,u){t[u+1]&&(o=[],o[0]=n/i,l=ID.Line.length(s[0],s[1],t[u+1][0],t[u+1][1]),n+=l,o[1]=n/i,a.push(o))}),this.set("tCache",a)}}},r.prototype.getStartTangent=function(){var t=this.attr().points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i},r.prototype.getEndTangent=function(){var t=this.attr().points,i=t.length-1,n=[];return n.push([t[i-1][0],t[i-1][1]]),n.push([t[i][0],t[i][1]]),n},r}(lnt.default);SE.default=snt;var AE={},Vf={};Object.defineProperty(Vf,"__esModule",{value:!0});Vf.parsePath=Vf.parseRadius=void 0;var Wv=Y,unt=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,cnt=/[^\s,]+/gi;function fnt(e){var r=0,t=0,i=0,n=0;return Wv.isArray(e)?e.length===1?r=t=i=n=e[0]:e.length===2?(r=i=e[0],t=n=e[1]):e.length===3?(r=e[0],t=n=e[1],i=e[2]):(r=e[0],t=e[1],i=e[2],n=e[3]):r=t=i=n=e,{r1:r,r2:t,r3:i,r4:n}}Vf.parseRadius=fnt;function hnt(e){if(e=e||[],Wv.isArray(e))return e;if(Wv.isString(e))return e=e.match(unt),Wv.each(e,function(r,t){if(r=r.match(cnt),r[0].length>1){var i=r[0].charAt(0);r.splice(1,0,r[0].substr(1)),r[0]=i}Wv.each(r,function(n,a){isNaN(n)||(r[a]=+n)}),e[t]=r}),e}Vf.parsePath=hnt;Object.defineProperty(AE,"__esModule",{value:!0});var FC=j,DD=Y,vnt=Zi,$D=ur,dnt=Vf,pnt=function(e){FC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rect",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return FC.__assign(FC.__assign({},t),{x:0,y:0,width:0,height:0,radius:0})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el"),l=!1,s=["x","y","width","height","radius"];DD.each(i||a,function(u,c){s.indexOf(c)!==-1&&!l?(o.setAttribute("d",n._assembleRect(a)),l=!0):s.indexOf(c)===-1&&$D.SVG_ATTR_MAP[c]&&o.setAttribute($D.SVG_ATTR_MAP[c],u)})},r.prototype._assembleRect=function(t){var i=t.x,n=t.y,a=t.width,o=t.height,l=t.radius;if(!l)return"M "+i+","+n+" l "+a+",0 l 0,"+o+" l"+-a+" 0 z";var s=dnt.parseRadius(l);DD.isArray(l)?l.length===1?s.r1=s.r2=s.r3=s.r4=l[0]:l.length===2?(s.r1=s.r3=l[0],s.r2=s.r4=l[1]):l.length===3?(s.r1=l[0],s.r2=s.r4=l[1],s.r3=l[2]):(s.r1=l[0],s.r2=l[1],s.r3=l[2],s.r4=l[3]):s.r1=s.r2=s.r3=s.r4=l;var u=[["M "+(i+s.r1)+","+n],["l "+(a-s.r1-s.r2)+",0"],["a "+s.r2+","+s.r2+",0,0,1,"+s.r2+","+s.r2],["l 0,"+(o-s.r2-s.r3)],["a "+s.r3+","+s.r3+",0,0,1,"+-s.r3+","+s.r3],["l "+(s.r3+s.r4-a)+",0"],["a "+s.r4+","+s.r4+",0,0,1,"+-s.r4+","+-s.r4],["l 0,"+(s.r4+s.r1-o)],["a "+s.r1+","+s.r1+",0,0,1,"+s.r1+","+-s.r1],["z"]];return u.join(" ")},r}(vnt.default);AE.default=pnt;var TE={},gnt=_r(N9);Object.defineProperty(TE,"__esModule",{value:!0});var PC=j,kD=Y,ynt=gnt,mnt=Wn,RD=ur,xnt=Zi,BD=.3,_nt={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},bnt={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},wnt={left:"left",start:"left",center:"middle",right:"end",end:"end"},Cnt=function(e){PC.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="text",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return PC.__assign(PC.__assign({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el");this._setFont(),kD.each(i||a,function(l,s){s==="text"?n._setText(""+l):s==="matrix"&&l?mnt.setTransform(n):RD.SVG_ATTR_MAP[s]&&o.setAttribute(RD.SVG_ATTR_MAP[s],l)}),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},r.prototype._setFont=function(){var t=this.get("el"),i=this.attr(),n=i.textBaseline,a=i.textAlign,o=ynt.detect();o&&o.name==="firefox"?t.setAttribute("dominant-baseline",bnt[n]||"alphabetic"):t.setAttribute("alignment-baseline",_nt[n]||"baseline"),t.setAttribute("text-anchor",wnt[a]||"left")},r.prototype._setText=function(t){var i=this.get("el"),n=this.attr(),a=n.x,o=n.textBaseline,l=o===void 0?"bottom":o;if(!t)i.innerHTML="";else if(~t.indexOf(` `)){var s=t.split(` `),u=s.length-1,c="";kD.each(s,function(f,h){h===0?l==="alphabetic"?c+=''+f+"":l==="top"?c+=''+f+"":l==="middle"?c+=''+f+"":l==="bottom"?c+=''+f+"":l==="hanging"&&(c+=''+f+""):c+=''+f+""}),i.innerHTML=c}else i.innerHTML=t},r}(xnt.default);TE.default=Cnt;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=Zi;Object.defineProperty(e,"Base",{enumerable:!0,get:function(){return r.default}});var t=pE;Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return t.default}});var i=gE;Object.defineProperty(e,"Dom",{enumerable:!0,get:function(){return i.default}});var n=yE;Object.defineProperty(e,"Ellipse",{enumerable:!0,get:function(){return n.default}});var a=mE;Object.defineProperty(e,"Image",{enumerable:!0,get:function(){return a.default}});var o=xE;Object.defineProperty(e,"Line",{enumerable:!0,get:function(){return o.default}});var l=_E;Object.defineProperty(e,"Marker",{enumerable:!0,get:function(){return l.default}});var s=wE;Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return s.default}});var u=CE;Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return u.default}});var c=SE;Object.defineProperty(e,"Polyline",{enumerable:!0,get:function(){return c.default}});var f=AE;Object.defineProperty(e,"Rect",{enumerable:!0,get:function(){return f.default}});var h=TE;Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return h.default}})})($p);var ME={},EE={},OE={};Object.defineProperty(OE,"__esModule",{value:!0});var rx=Y,ND=mr,Snt=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Ant=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Tnt=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function u3(e){var r=e.match(Tnt);if(!r)return"";var t="";return r.sort(function(i,n){return i=i.split(":"),n=n.split(":"),Number(i[0])-Number(n[0])}),rx.each(r,function(i){i=i.split(":"),t+=''}),t}function Mnt(e,r){var t=Snt.exec(e),i=rx.mod(rx.toRadian(parseFloat(t[1])),Math.PI*2),n=t[2],a,o;i>=0&&i<.5*Math.PI?(a={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=i&&i`;t.innerHTML=i},e}();FE.default=Lnt;var PE={};Object.defineProperty(PE,"__esModule",{value:!0});var GD=Y,zD=mr,Dnt=function(){function e(r,t){this.cfg={};var i=zD.createSVGElement("marker"),n=GD.uniqueId("marker_");i.setAttribute("id",n);var a=zD.createSVGElement("path");a.setAttribute("stroke",r.stroke||"none"),a.setAttribute("fill",r.fill||"none"),i.appendChild(a),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=a,this.id=n;var o=r[t==="marker-start"?"startArrow":"endArrow"];return this.stroke=r.stroke||"#000",o===!0?this._setDefaultPath(t,a):(this.cfg=o,this._setMarker(r.lineWidth,a)),this}return e.prototype.match=function(){return!1},e.prototype._setDefaultPath=function(r,t){var i=this.el;t.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),i.setAttribute("refX",""+10*Math.cos(Math.PI/6)),i.setAttribute("refY",""+5)},e.prototype._setMarker=function(r,t){var i=this.el,n=this.cfg.path,a=this.cfg.d;GD.isArray(n)&&(n=n.map(function(o){return o.join(" ")}).join("")),t.setAttribute("d",n),i.appendChild(t),a&&i.setAttribute("refX",""+a/r)},e.prototype.update=function(r){var t=this.child;t.attr?t.attr("fill",r):t.setAttribute("fill",r)},e}();PE.default=Dnt;var IE={};Object.defineProperty(IE,"__esModule",{value:!0});var $nt=Y,knt=mr,Rnt=function(){function e(r){this.type="clip",this.cfg={};var t=knt.createSVGElement("clipPath");this.el=t,this.id=$nt.uniqueId("clip_"),t.id=this.id;var i=r.cfg.el;return t.appendChild(i),this.cfg=r,this}return e.prototype.match=function(){return!1},e.prototype.remove=function(){var r=this.el;r.parentNode.removeChild(r)},e}();IE.default=Rnt;var LE={};Object.defineProperty(LE,"__esModule",{value:!0});var Bnt=Y,VD=mr,Nnt=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Gnt=function(){function e(r){this.cfg={};var t=VD.createSVGElement("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var i=VD.createSVGElement("image");t.appendChild(i);var n=Bnt.uniqueId("pattern_");t.id=n,this.el=t,this.id=n,this.cfg=r;var a=Nnt.exec(r),o=a[2];i.setAttribute("href",o);var l=new Image;o.match(/^data:/i)||(l.crossOrigin="Anonymous"),l.src=o;function s(){t.setAttribute("width",""+l.width),t.setAttribute("height",""+l.height)}return l.complete?s():(l.onload=s,l.src=l.src),this}return e.prototype.match=function(r,t){return this.cfg===t},e}();LE.default=Gnt;Object.defineProperty(EE,"__esModule",{value:!0});var znt=Y,Vnt=OE,jnt=FE,jD=PE,Hnt=IE,Ynt=LE,Wnt=mr,Xnt=function(){function e(r){var t=Wnt.createSVGElement("defs"),i=znt.uniqueId("defs_");t.id=i,r.appendChild(t),this.children=[],this.defaultArrow={},this.el=t,this.canvas=r}return e.prototype.find=function(r,t){for(var i=this.children,n=null,a=0;a0?1:-1:(i.x-t.x)*(t.y-r.y)>0?-1:1}Fe.getAxisFactorByRegion=yat;function mat(e,r){var t=(0,zi.get)(e,["components","axis"],{});return(0,zi.deepMix)({},(0,zi.get)(t,["common"],{}),(0,zi.deepMix)({},(0,zi.get)(t,[r],{})))}Fe.getAxisThemeCfg=mat;function xat(e,r,t){var i=(0,zi.get)(e,["components","axis"],{});return(0,zi.deepMix)({},(0,zi.get)(i,["common","title"],{}),(0,zi.deepMix)({},(0,zi.get)(i,[r,"title"],{})),t)}Fe.getAxisTitleOptions=xat;function _at(e){var r=e.x,t=e.y,i=e.circleCenter,n=t.start>t.end,a=e.isTransposed?e.convert({x:n?0:1,y:0}):e.convert({x:0,y:n?0:1}),o=[a.x-i.x,a.y-i.y],l=[1,0],s=a.y>i.y?XD.vec2.angle(o,l):XD.vec2.angle(o,l)*-1,u=s+(r.end-r.start),c=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2));return{center:i,radius:c,startAngle:s,endAngle:u}}Fe.getCircleAxisCenterRadius=_at;function bat(e,r){return(0,zi.isBoolean)(e)?e===!1?!1:{}:(0,zi.get)(e,[r])}Fe.getAxisOption=bat;function wat(e,r){return(0,zi.get)(e,"position",r)}Fe.getAxisDirection=wat;function Cat(e,r){return(0,zi.get)(r,["title","text"],(0,dat.getName)(e))}Fe.getAxisTitleText=Cat;Object.defineProperty(_o,"__esModule",{value:!0});_o.Facet=void 0;var Lo=Y,Sat=Kt,UD=Fe,Aat=function(){function e(r,t){this.destroyed=!1,this.facets=[],this.view=r,this.cfg=(0,Lo.deepMix)({},this.getDefaultCfg(),t)}return e.prototype.init=function(){this.container||(this.container=this.createContainer());var r=this.view.getData();this.facets=this.generateFacets(r)},e.prototype.render=function(){this.renderViews()},e.prototype.update=function(){},e.prototype.clear=function(){this.clearFacetViews()},e.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},e.prototype.facetToView=function(r){var t=r.region,i=r.data,n=r.padding,a=n===void 0?this.cfg.padding:n,o=this.view.createView({region:t,padding:a});o.data(i||[]),r.view=o,this.beforeEachView(o,r);var l=this.cfg.eachView;return l&&l(o,r),this.afterEachView(o,r),o},e.prototype.createContainer=function(){var r=this.view.getLayer(Sat.LAYER.FORE);return r.addGroup()},e.prototype.renderViews=function(){this.createFacetViews()},e.prototype.createFacetViews=function(){var r=this;return this.facets.map(function(t){return r.facetToView(t)})},e.prototype.clearFacetViews=function(){var r=this;(0,Lo.each)(this.facets,function(t){t.view&&(r.view.removeView(t.view),t.view=void 0)})},e.prototype.parseSpacing=function(){var r=this.view.viewBBox,t=r.width,i=r.height,n=this.cfg.spacing;return n.map(function(a,o){return(0,Lo.isNumber)(a)?a/(o===0?t:i):parseFloat(a)/100})},e.prototype.getFieldValues=function(r,t){var i=[],n={};return(0,Lo.each)(r,function(a){var o=a[t];!(0,Lo.isNil)(o)&&!n[o]&&(i.push(o),n[o]=!0)}),i},e.prototype.getRegion=function(r,t,i,n){var a=this.parseSpacing(),o=a[0],l=a[1],s=(1+o)/(t===0?1:t)-o,u=(1+l)/(r===0?1:r)-l,c={x:(s+o)*i,y:(u+l)*n},f={x:c.x+s,y:c.y+u};return{start:c,end:f}},e.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},e.prototype.getDefaultTitleCfg=function(){var r=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:r}}},e.prototype.processAxis=function(r,t){var i=r.getOptions(),n=i.coordinate,a=r.geometries,o=(0,Lo.get)(n,"type","rect");if(o==="rect"&&a.length){(0,Lo.isNil)(i.axes)&&(i.axes={});var l=i.axes,s=a[0].getXYFields(),u=s[0],c=s[1],f=(0,UD.getAxisOption)(l,u),h=(0,UD.getAxisOption)(l,c);f!==!1&&(i.axes[u]=this.getXAxisOption(u,l,f,t)),h!==!1&&(i.axes[c]=this.getYAxisOption(c,l,h,t))}},e.prototype.getFacetDataFilter=function(r){return function(t){return(0,Lo.every)(r,function(i){var n=i.field,a=i.value;return!(0,Lo.isNil)(a)&&n?t[n]===a:!0})}},e}();_o.Facet=Aat;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.registerFacet=e.getFacet=e.Facet=void 0;var r=Y,t=_o;Object.defineProperty(e,"Facet",{enumerable:!0,get:function(){return t.Facet}});var i={},n=function(o){return i[(0,r.lowerCase)(o)]};e.getFacet=n;var a=function(o,l){i[(0,r.lowerCase)(o)]=l};e.registerFacet=a})(ix);var nx={},Bp={},vn={},$E={},Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});var Tat=Y,Mat=function(){function e(r,t){this.context=r,this.cfg=t,r.addAction(this)}return e.prototype.applyCfg=function(r){(0,Tat.assign)(this,r)},e.prototype.init=function(){this.applyCfg(this.cfg)},e.prototype.destroy=function(){this.context.removeAction(this),this.context=null},e}();Fr.default=Mat;Object.defineProperty($E,"__esModule",{value:!0});var g3=j,Eat=(0,g3.__importDefault)(Fr),Oat=function(e){(0,g3.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.execute=function(){this.callback&&this.callback(this.context)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.callback=null},r}(Eat.default);$E.default=Oat;Object.defineProperty(vn,"__esModule",{value:!0});vn.createCallbackAction=y3=vn.unregisterAction=vn.registerAction=vn.getActionClass=vn.createAction=void 0;var Fat=j,Pat=(0,Fat.__importDefault)($E),Iat=Y,F1={};function Lat(e,r){var t=F1[e],i=null;if(t){var n=t.ActionClass,a=t.cfg;i=new n(r,a),i.name=e,i.init()}return i}vn.createAction=Lat;function Dat(e){var r=F1[e];return(0,Iat.get)(r,"ActionClass")}vn.getActionClass=Dat;function $at(e,r,t){F1[e]={ActionClass:r,cfg:t}}vn.registerAction=$at;function kat(e){delete F1[e]}var y3=vn.unregisterAction=kat;function Rat(e,r){var t=new Pat.default(r);return t.callback=e,t.name="callback",t}vn.createCallbackAction=Rat;var kE={},xt={},cc={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertPolarPath=e.convertNormalPath=e.getSplinePath=e.getLinePath=e.catmullRom2bezier=e.smoothBezier=void 0;var r=ta,t=Y,i=be;function n(p,x){var m=[];if(p.length){m.push(["M",p[0].x,p[0].y]);for(var _=1,b=p.length;_=S[F]?1:0,R=L>Math.PI?1:0,H=m.convert(M),k=(0,i.getDistanceToCenter)(m,H);if(k>=.5)if(L===Math.PI*2){var V={x:(M.x+S.x)/2,y:(M.y+S.y)/2},U=m.convert(V);O.push(["A",k,k,0,R,D,U.x,U.y]),O.push(["A",k,k,0,R,D,H.x,H.y])}else O.push(["A",k,k,0,R,D,H.x,H.y]);return O}function s(p){(0,t.each)(p,function(x,m){var _=x;if(_[0].toLowerCase()==="a"){var b=p[m-1],w=p[m+1];w&&w[0].toLowerCase()==="a"?b&&b[0].toLowerCase()==="l"&&(b[0]="M"):b&&b[0].toLowerCase()==="a"&&w&&w[0].toLowerCase()==="l"&&(w[0]="M")}})}var u=function(p,x,m,_){var b=[],w=!!_,S,M,O,F,L,D,R;if(w){O=_[0],F=_[1];for(var H=0,k=p.length;H=r||n.height>=r?n:null}function Gat(e,r){var t=e.event,i=t.target,n=i.getCanvasBBox();return n.width>=r||n.height>=r?i.attr("path"):null}function zat(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}xt.getCurrentElement=zat;function Vat(e){var r=e.event,t=r.target,i;return t&&(i=t.get("delegateObject")),i}xt.getDelegationObject=Vat;function jat(e){var r=e.event.gEvent;return!(r&&r.fromShape&&r.toShape&&r.fromShape.get("element")===r.toShape.get("element"))}xt.isElementChange=jat;function Hat(e){return e&&e.component&&e.component.isList()}xt.isList=Hat;function Yat(e){return e&&e.component&&e.component.isSlider()}xt.isSlider=Yat;function Wat(e){var r=e.event,t=r.target;return t&&t.get("name")==="mask"}xt.isMask=Wat;function Xat(e,r){var t=e.event.target;if(t.get("type")==="path"){var i=Gat(e,r);return i?b3(e.view,i):void 0}var n=m3(e,r);return n?RE(e.view,n):null}xt.getMaskedElements=Xat;function Uat(e,r,t){var i=m3(e,t);if(!i)return null;var n=e.view,a=VA(n,r,{x:i.x,y:i.y}),o=VA(n,r,{x:i.maxX,y:i.maxY}),l={minX:a.x,minY:a.y,maxX:o.x,maxY:o.y};return RE(r,l)}xt.getSiblingMaskElements=Uat;function Np(e){var r=e.geometries,t=[];return(0,al.each)(r,function(i){var n=i.elements;t=t.concat(n)}),e.views&&e.views.length&&(0,al.each)(e.views,function(i){t=t.concat(Np(i))}),t}xt.getElements=Np;function qat(e,r,t){var i=Np(e);return i.filter(function(n){return x3(n,r)===t})}xt.getElementsByField=qat;function Zat(e,r){var t=e.geometries,i=[];return(0,al.each)(t,function(n){var a=n.getElementsBy(function(o){return o.hasState(r)});i=i.concat(a)}),i}xt.getElementsByState=Zat;function x3(e,r){var t=e.getModel(),i=t.data,n;return(0,al.isArray)(i)?n=i[0][r]:n=i[r],n}xt.getElementValue=x3;function _3(e,r){return!(r.minX>e.maxX||r.maxXe.maxY||r.maxY=r.x&&e.y<=r.y&&e.maxY>r.y}xt.isInBox=tot;function eot(e){var r=e.parent,t=null;return r&&(t=r.views.filter(function(i){return i!==e})),t}xt.getSilbings=eot;function rot(e,r){var t=e.getCoordinate();return t.invert(r)}function VA(e,r,t){var i=rot(e,t);return r.getCoordinate().convert(i)}xt.getSiblingPoint=VA;function iot(e,r,t,i){var n=!1;return(0,al.each)(e,function(a){if(a[t]===r[t]&&a[i]===r[i])return n=!0,!1}),n}xt.isInRecords=iot;function w3(e,r){var t=e.getScaleByField(r);return!t&&e.views&&(0,al.each)(e.views,function(i){if(t=w3(i,r),t)return!1}),t}xt.getScaleByField=w3;Object.defineProperty(kE,"__esModule",{value:!0});var QD=Y,$C=xt,not=function(){function e(r){this.actions=[],this.event=null,this.cacheMap={},this.view=r}return e.prototype.cache=function(){for(var r=[],t=0;t=0&&t.splice(i,1)},e.prototype.getCurrentPoint=function(){var r=this.event;if(r)if(r.target instanceof HTMLElement){var t=this.view.getCanvas(),i=t.getPointByClient(r.clientX,r.clientY);return i}else return{x:r.x,y:r.y};return null},e.prototype.getCurrentShape=function(){return(0,QD.get)(this.event,["gEvent","shape"])},e.prototype.isInPlot=function(){var r=this.getCurrentPoint();return r?this.view.isPointInPlot(r):!1},e.prototype.isInShape=function(r){var t=this.getCurrentShape();return t?t.get("name")===r:!1},e.prototype.isInComponent=function(r){var t=(0,$C.getComponents)(this.view),i=this.getCurrentPoint();return i?!!t.find(function(n){var a=n.getBBox();return r?n.get("name")===r&&(0,$C.isInBox)(a,i):(0,$C.isInBox)(a,i)}):!1},e.prototype.destroy=function(){(0,QD.each)(this.actions.slice(),function(r){r.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},e}();kE.default=not;var P1={};Object.defineProperty(P1,"__esModule",{value:!0});var aot=function(){function e(r,t){this.view=r,this.cfg=t}return e.prototype.init=function(){this.initEvents()},e.prototype.initEvents=function(){},e.prototype.clearEvents=function(){},e.prototype.destroy=function(){this.clearEvents()},e}();P1.default=aot;Object.defineProperty(Bp,"__esModule",{value:!0});Bp.parseAction=void 0;var BE=j,yi=Y,C3=vn,oot=(0,BE.__importDefault)(kE),lot=(0,BE.__importDefault)(P1);function jA(e,r,t){var i=e.split(":"),n=i[0],a=r.getAction(n)||(0,C3.createAction)(n,r);if(!a)throw new Error("There is no action named "+n);var o=i[1];return{action:a,methodName:o,arg:t}}Bp.parseAction=jA;function KD(e){var r=e.action,t=e.methodName,i=e.arg;if(r[t])r[t](i);else throw new Error("Action("+r.name+") doesn't have a method called "+t)}var on={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},sot=function(e){(0,BE.__extends)(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.callbackCaches={},n.emitCaches={},n.steps=i,n}return r.prototype.init=function(){this.initContext(),e.prototype.init.call(this)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},r.prototype.initEvents=function(){var t=this;(0,yi.each)(this.steps,function(i,n){(0,yi.each)(i,function(a){var o=t.getActionCallback(n,a);o&&t.bindEvent(a.trigger,o)})})},r.prototype.clearEvents=function(){var t=this;(0,yi.each)(this.steps,function(i,n){(0,yi.each)(i,function(a){var o=t.getActionCallback(n,a);o&&t.offEvent(a.trigger,o)})})},r.prototype.initContext=function(){var t=this.view,i=new oot.default(t);this.context=i;var n=this.steps;(0,yi.each)(n,function(a){(0,yi.each)(a,function(o){if((0,yi.isFunction)(o.action))o.actionObject={action:(0,C3.createCallbackAction)(o.action,i),methodName:"execute"};else if((0,yi.isString)(o.action))o.actionObject=jA(o.action,i,o.arg);else if((0,yi.isArray)(o.action)){var l=o.action,s=(0,yi.isArray)(o.arg)?o.arg:[o.arg];o.actionObject=[],(0,yi.each)(l,function(u,c){o.actionObject.push(jA(u,i,s[c]))})}})})},r.prototype.isAllowStep=function(t){var i=this.currentStepName,n=this.steps;if(i===t||t===on.SHOW_ENABLE)return!0;if(t===on.PROCESSING)return i===on.START;if(t===on.START)return i!==on.PROCESSING;if(t===on.END)return i===on.PROCESSING||i===on.START;if(t===on.ROLLBACK){if(n[on.END])return i===on.END;if(i===on.START)return!0}return!1},r.prototype.isAllowExecute=function(t,i){if(this.isAllowStep(t)){var n=this.getKey(t,i);return i.once&&this.emitCaches[n]?!1:i.isEnable?i.isEnable(this.context):!0}return!1},r.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},r.prototype.afterExecute=function(t,i){t!==on.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,i);this.emitCaches[n]=!0},r.prototype.getKey=function(t,i){return t+i.trigger+i.action},r.prototype.getActionCallback=function(t,i){var n=this,a=this.context,o=this.callbackCaches,l=i.actionObject;if(i.action&&l){var s=this.getKey(t,i);if(!o[s]){var u=function(c){a.event=c,n.isAllowExecute(t,i)?((0,yi.isArray)(l)?(0,yi.each)(l,function(f){a.event=c,KD(f)}):(a.event=c,KD(l)),n.afterExecute(t,i),i.callback&&(a.event=c,i.callback(a))):a.event=null};i.debounce?o[s]=(0,yi.debounce)(u,i.debounce.wait,i.debounce.immediate):i.throttle?o[s]=(0,yi.throttle)(u,i.throttle.wait,{leading:i.throttle.leading,trailing:i.throttle.trailing}):o[s]=u}return o[s]}return null},r.prototype.bindEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.addEventListener(n[1],i):n[0]==="document"?document.addEventListener(n[1],i):this.view.on(t,i)},r.prototype.offEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.removeEventListener(n[1],i):n[0]==="document"?document.removeEventListener(n[1],i):this.view.off(t,i)},r}(lot.default);Bp.default=sot;var Gp={};(function(e){var r=$d&&$d.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.getActionClass=e.registerAction=e.createAction=e.Action=void 0;var t=Fr;Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return r(t).default}});var i=vn;Object.defineProperty(e,"createAction",{enumerable:!0,get:function(){return i.createAction}}),Object.defineProperty(e,"registerAction",{enumerable:!0,get:function(){return i.registerAction}}),Object.defineProperty(e,"getActionClass",{enumerable:!0,get:function(){return i.getActionClass}})})(Gp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getActionClass=e.registerAction=e.Action=e.Interaction=e.createInteraction=e.registerInteraction=e.getInteraction=void 0;var r=j,t=Y,i=(0,r.__importDefault)(Bp),n={};function a(c){return n[(0,t.lowerCase)(c)]}e.getInteraction=a;function o(c,f){n[(0,t.lowerCase)(c)]=f}e.registerInteraction=o;function l(c,f,h){var v=a(c);if(!v)return null;if((0,t.isPlainObject)(v)){var d=(0,t.mix)((0,t.clone)(v),h);return new i.default(f,d)}else{var p=v;return new p(f,h)}}e.createInteraction=l;var s=P1;Object.defineProperty(e,"Interaction",{enumerable:!0,get:function(){return(0,r.__importDefault)(s).default}});var u=Gp;Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return u.Action}}),Object.defineProperty(e,"registerAction",{enumerable:!0,get:function(){return u.registerAction}}),Object.defineProperty(e,"getActionClass",{enumerable:!0,get:function(){return u.getActionClass}})})(nx);var Qu={},NE={},I1={},zp={};Object.defineProperty(zp,"__esModule",{value:!0});var L1=zp.createThemeByStyleSheet=void 0,ai=j,$c=b1,uot=ta,JD=Y,cot=Se;function fot(e){return{title:{autoRotate:!0,position:"center",spacing:e.axisTitleSpacing,style:{fill:e.axisTitleTextFillColor,fontSize:e.axisTitleTextFontSize,lineHeight:e.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:e.axisLabelOffset,style:{fill:e.axisLabelFillColor,fontSize:e.axisLabelFontSize,lineHeight:e.axisLabelLineHeight,fontFamily:e.fontFamily}},line:{style:{lineWidth:e.axisLineBorder,stroke:e.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:e.axisGridBorderColor,lineWidth:e.axisGridBorder,lineDash:e.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:e.axisTickLineBorder,stroke:e.axisTickLineBorderColor},alignTick:!0,length:e.axisTickLineLength},subTickLine:null,animate:!0}}function hot(e){return{title:null,marker:{symbol:"circle",spacing:e.legendMarkerSpacing,style:{r:e.legendCircleMarkerSize,fill:e.legendMarkerColor}},itemName:{spacing:5,style:{fill:e.legendItemNameFillColor,fontFamily:e.fontFamily,fontSize:e.legendItemNameFontSize,lineHeight:e.legendItemNameLineHeight,fontWeight:e.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:e.legendPageNavigatorMarkerSize,inactiveFill:e.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:e.legendPageNavigatorMarkerInactiveFillOpacity,fill:e.legendPageNavigatorMarkerFillColor,opacity:e.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:e.legendPageNavigatorTextFillColor,fontSize:e.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:e.legendItemSpacing,itemMarginBottom:e.legendItemMarginBottom,padding:e.legendPadding}}function vot(e){var r,t={point:{default:{fill:e.pointFillColor,r:e.pointSize,stroke:e.pointBorderColor,lineWidth:e.pointBorder,fillOpacity:e.pointFillOpacity},active:{stroke:e.pointActiveBorderColor,lineWidth:e.pointActiveBorder},selected:{stroke:e.pointSelectedBorderColor,lineWidth:e.pointSelectedBorder},inactive:{fillOpacity:e.pointInactiveFillOpacity,strokeOpacity:e.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:e.hollowPointFillColor,lineWidth:e.hollowPointBorder,stroke:e.hollowPointBorderColor,strokeOpacity:e.hollowPointBorderOpacity,r:e.hollowPointSize},active:{stroke:e.hollowPointActiveBorderColor,strokeOpacity:e.hollowPointActiveBorderOpacity},selected:{lineWidth:e.hollowPointSelectedBorder,stroke:e.hollowPointSelectedBorderColor,strokeOpacity:e.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:e.hollowPointInactiveBorderOpacity}},area:{default:{fill:e.areaFillColor,fillOpacity:e.areaFillOpacity,stroke:null},active:{fillOpacity:e.areaActiveFillOpacity},selected:{fillOpacity:e.areaSelectedFillOpacity},inactive:{fillOpacity:e.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:e.hollowAreaBorderColor,lineWidth:e.hollowAreaBorder,strokeOpacity:e.hollowAreaBorderOpacity},active:{fill:null,lineWidth:e.hollowAreaActiveBorder},selected:{fill:null,lineWidth:e.hollowAreaSelectedBorder},inactive:{strokeOpacity:e.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:e.intervalFillColor,fillOpacity:e.intervalFillOpacity},active:{stroke:e.intervalActiveBorderColor,lineWidth:e.intervalActiveBorder},selected:{stroke:e.intervalSelectedBorderColor,lineWidth:e.intervalSelectedBorder},inactive:{fillOpacity:e.intervalInactiveFillOpacity,strokeOpacity:e.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:e.hollowIntervalFillColor,stroke:e.hollowIntervalBorderColor,lineWidth:e.hollowIntervalBorder,strokeOpacity:e.hollowIntervalBorderOpacity},active:{stroke:e.hollowIntervalActiveBorderColor,lineWidth:e.hollowIntervalActiveBorder,strokeOpacity:e.hollowIntervalActiveBorderOpacity},selected:{stroke:e.hollowIntervalSelectedBorderColor,lineWidth:e.hollowIntervalSelectedBorder,strokeOpacity:e.hollowIntervalSelectedBorderOpacity},inactive:{stroke:e.hollowIntervalInactiveBorderColor,lineWidth:e.hollowIntervalInactiveBorder,strokeOpacity:e.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:e.lineBorderColor,lineWidth:e.lineBorder,strokeOpacity:e.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:e.lineActiveBorder},selected:{lineWidth:e.lineSelectedBorder},inactive:{strokeOpacity:e.lineInactiveBorderOpacity}}},i=fot(e),n=hot(e);return{background:e.backgroundColor,defaultColor:e.brandColor,subColor:e.subColor,semanticRed:e.paletteSemanticRed,semanticGreen:e.paletteSemanticGreen,padding:"auto",fontFamily:e.fontFamily,columnWidthRatio:1/2,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:e.paletteQualitative10,colors20:e.paletteQualitative20,sequenceColors:e.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:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:function(a){var o=a.geometry.coordinate;if(o.isPolar&&o.isTransposed){var l=(0,cot.getAngle)(a.getModel(),o),s=l.startAngle,u=l.endAngle,c=(s+u)/2,f=7.5,h=f*Math.cos(c),v=f*Math.sin(c);return{matrix:uot.ext.transform(null,[["t",h,v]])}}return t.interval.selected}}},"hollow-rect":{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},line:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},tick:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},funnel:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}},pyramid:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},line:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},dot:{default:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,ai.__assign)((0,ai.__assign)({},t.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hvh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},polygon:{polygon:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},point:{circle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},square:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},bowtie:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},diamond:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},hexagon:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},triangle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"triangle-down":{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"hollow-circle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-square":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-bowtie":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-diamond":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-hexagon":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle-down":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},cross:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},tick:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},plus:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},hyphen:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},line:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}}},area:{area:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},smooth:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},line:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"smooth-line":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}},schema:{candle:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},box:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}}},edge:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},arc:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},violin:{violin:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hollow:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"hollow-smooth":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}}},components:{axis:{common:i,top:{position:"top",grid:null,title:null,verticalLimitLength:1/2},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:1/2},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:(0,JD.deepMix)({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,JD.deepMix)({},i.grid,{line:{type:"circle"}})}},legend:{common:n,right:{layout:"vertical",padding:e.legendVerticalPadding},left:{layout:"vertical",padding:e.legendVerticalPadding},top:{layout:"horizontal",padding:e.legendHorizontalPadding},bottom:{layout:"horizontal",padding:e.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:e.sliderRailHeight,defaultLength:e.sliderRailWidth,style:{fill:e.sliderRailFillColor,stroke:e.sliderRailBorderColor,lineWidth:e.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:e.sliderLabelTextFillColor,fontSize:e.sliderLabelTextFontSize,lineHeight:e.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily}},handler:{size:e.sliderHandlerWidth,style:{fill:e.sliderHandlerFillColor,stroke:e.sliderHandlerBorderColor}},slidable:!0,padding:n.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:e.tooltipCrosshairsBorderColor,lineWidth:e.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(r={},r[""+$c.TOOLTIP_CSS_CONST.CONTAINER_CLASS]={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:e.tooltipContainerFillColor,opacity:e.tooltipContainerFillOpacity,boxShadow:e.tooltipContainerShadow,borderRadius:e.tooltipContainerBorderRadius+"px",color:e.tooltipTextFillColor,fontSize:e.tooltipTextFontSize+"px",fontFamily:e.fontFamily,lineHeight:e.tooltipTextLineHeight+"px",padding:"0 12px 0 12px"},r[""+$c.TOOLTIP_CSS_CONST.TITLE_CLASS]={marginBottom:"12px",marginTop:"12px"},r[""+$c.TOOLTIP_CSS_CONST.LIST_CLASS]={margin:0,listStyleType:"none",padding:0},r[""+$c.TOOLTIP_CSS_CONST.LIST_ITEM_CLASS]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},r[""+$c.TOOLTIP_CSS_CONST.MARKER_CLASS]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r[""+$c.TOOLTIP_CSS_CONST.VALUE_CLASS]={display:"inline-block",float:"right",marginLeft:"30px"},r)},annotation:{arc:{style:{stroke:e.annotationArcBorderColor,lineWidth:e.annotationArcBorder},animate:!0},line:{style:{stroke:e.annotationLineBorderColor,lineDash:e.annotationLineDash,lineWidth:e.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textAlign:"start",fontFamily:e.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:e.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:e.annotationRegionBorder,stroke:e.annotationRegionBorderColor,fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:e.brandColor,lineWidth:2}},line:{style:{stroke:e.annotationLineBorderColor,lineWidth:e.annotationLineBorder},length:e.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:e.cSliderBackgroundFillColor,opacity:e.cSliderBackgroundFillOpacity},foregroundStyle:{fill:e.cSliderForegroundFillColor,opacity:e.cSliderForegroundFillOpacity},handlerStyle:{width:e.cSliderHandlerWidth,height:e.cSliderHandlerHeight,fill:e.cSliderHandlerFillColor,opacity:e.cSliderHandlerFillOpacity,stroke:e.cSliderHandlerBorderColor,lineWidth:e.cSliderHandlerBorder,radius:e.cSliderHandlerBorderRadius,highLightFill:e.cSliderHandlerHighlightFillColor},textStyle:{fill:e.cSliderTextFillColor,opacity:e.cSliderTextFillOpacity,fontSize:e.cSliderTextFontSize,lineHeight:e.cSliderTextLineHeight,fontWeight:e.cSliderTextFontWeight,stroke:e.cSliderTextBorderColor,lineWidth:e.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:e.scrollbarTrackFillColor,thumbColor:e.scrollbarThumbFillColor}},hover:{style:{thumbColor:e.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:e.labelFillColor,fontSize:e.labelFontSize,fontFamily:e.fontFamily,stroke:e.labelBorderColor,lineWidth:e.labelBorder},fillColorDark:e.labelFillColorDark,fillColorLight:e.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:e.innerLabelFillColor,fontSize:e.innerLabelFontSize,fontFamily:e.fontFamily,stroke:e.innerLabelBorderColor,lineWidth:e.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:e.overflowLabelFillColor,fontSize:e.overflowLabelFontSize,fontFamily:e.fontFamily,stroke:e.overflowLabelBorderColor,lineWidth:e.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:e.labelLineBorder}},autoRotate:!0}}}L1=zp.createThemeByStyleSheet=vot;var D1={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.antvLight=e.createLightStyleSheet=void 0;var r={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},t={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},i=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],n=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],a=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],o=function(l){l===void 0&&(l={});var s=l.backgroundColor,u=s===void 0?"transparent":s,c=l.subColor,f=c===void 0?"rgba(0,0,0,0.05)":c,h=l.paletteQualitative10,v=h===void 0?i:h,d=l.paletteQualitative20,p=d===void 0?n:d,x=l.paletteSemanticRed,m=x===void 0?"#F4664A":x,_=l.paletteSemanticGreen,b=_===void 0?"#30BF78":_,w=l.paletteSemanticYellow,S=w===void 0?"#FAAD14":w,M=l.paletteSequence,O=M===void 0?a:M,F=l.fontFamily,L=F===void 0?`"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`:F,D=l.brandColor,R=D===void 0?v[0]:D;return{backgroundColor:u,brandColor:R,subColor:f,paletteQualitative10:v,paletteQualitative20:p,paletteSemanticRed:m,paletteSemanticGreen:b,paletteSemanticYellow:S,paletteSequence:O,fontFamily:L,axisLineBorderColor:r[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:r[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisTickLineBorderColor:r[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:r[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:r[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:r[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:r[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:R,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:r[65],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:r[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:r[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:r[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:r[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:r[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:r[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:r[25],annotationArcBorderColor:r[15],annotationArcBorder:1,annotationLineBorderColor:r[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:r[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:r[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:r[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:r[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:r[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:t[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:r[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:t[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:r[25],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:R,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:t[100],pointBorderOpacity:1,pointActiveBorderColor:r[100],pointSelectedBorder:2,pointSelectedBorderColor:r[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:R,hollowPointBorderOpacity:.95,hollowPointFillColor:t[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:r[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:r[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:R,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:R,areaFillOpacity:.25,areaActiveFillColor:R,areaActiveFillOpacity:.5,areaSelectedFillColor:R,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:R,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:r[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:r[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:R,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:r[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:r[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:R,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:t[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:r[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:r[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}};e.createLightStyleSheet=o,e.antvLight=(0,e.createLightStyleSheet)()})(D1);Object.defineProperty(I1,"__esModule",{value:!0});I1.createTheme=void 0;var dot=j,pot=Y,got=zp,yot=D1;function mot(e){var r=e.styleSheet,t=r===void 0?{}:r,i=(0,dot.__rest)(e,["styleSheet"]),n=(0,yot.createLightStyleSheet)(t);return(0,pot.deepMix)({},(0,got.createThemeByStyleSheet)(n),i)}I1.createTheme=mot;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createTheme=void 0;var r=I1;Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return r.createTheme}})})(NE);Object.defineProperty(Qu,"__esModule",{value:!0});var $1=Qu.registerTheme=Qu.getTheme=void 0,HA=Y,S3=NE,xot=(0,S3.createTheme)({}),YA={default:xot};function _ot(e){return(0,HA.get)(YA,(0,HA.lowerCase)(e),YA.default)}Qu.getTheme=_ot;function bot(e,r){YA[(0,HA.lowerCase)(e)]=(0,S3.createTheme)(r)}$1=Qu.registerTheme=bot;var mn={};Object.defineProperty(mn,"__esModule",{value:!0});mn.findItemsFromViewRecurisive=mn.findItemsFromView=mn.getTooltipItems=mn.findDataByPoint=void 0;var wot=j,Sr=Y,xi=Kt,A3=Ur;function t$(e,r,t){var i=t.translate(e),n=t.translate(r);return(0,Sr.isNumberEqual)(i,n)}function Cot(e,r){var t=r.coordinate,i=r.getXScale(),n=i.range,a=n[n.length-1],o=n[0],l=t.invert(e),s=l.x;return t.isPolar&&s>(1+a)/2&&(s=o),i.translate(i.invert(s))}function e$(e,r,t){var i=t.coordinate,n=t.getYScale(),a=n.field,o=i.invert(r),l=n.invert(o.y),s=(0,Sr.find)(e,function(u){var c=u[xi.FIELD_ORIGIN];return c[a][0]<=l&&c[a][1]>=l});return s||e[e.length-1]}var Sot=(0,Sr.memoize)(function(e){if(e.isCategory)return 1;for(var r=e.values,t=r.length,i=e.translate(r[0]),n=i,a=0;an&&(n=l)}return(n-i)/(t-1)});function Aot(e,r,t){var i=r.getAttribute("position"),n=i.getFields(),a=r.scales,o=(0,Sr.isFunction)(t)||!t?n[0]:t,l=a[o],s=l?l.getText(e[o]):e[o]||o;return(0,Sr.isFunction)(t)?t(s,e):s}function Tot(e){var r=(0,Sr.values)(e.attributes);return(0,Sr.filter)(r,function(t){return(0,Sr.contains)(xi.GROUP_ATTRS,t.type)})}function T3(e){for(var r=Tot(e),t,i=0,n=r;i=w)if(F)(0,Sr.isArray)(s)||(s=[]),s.push(L);else{s=L;break}}(0,Sr.isArray)(s)&&(s=e$(s,e,t))}else{var D=void 0;if(!n.isLinear&&n.type!=="timeCat"){for(var d=0;dn.translate(O)||wn.max||wMath.abs(n.translate(D[xi.FIELD_ORIGIN][o])-w)&&(b=D)}var U=Sot(t.getXScale());return!s&&Math.abs(n.translate(b[xi.FIELD_ORIGIN][o])-w)<=U/2&&(s=b),s}mn.findDataByPoint=M3;function GE(e,r,t,i){t===void 0&&(t=""),i===void 0&&(i=!1);var n=e[xi.FIELD_ORIGIN],a=Aot(n,r,t),o=r.tooltipOption,l=r.theme.defaultColor,s=[],u,c;function f(O,F){if(i||!(0,Sr.isNil)(F)&&F!==""){var L={title:a,data:n,mappingData:e,name:O,value:F,color:e.color||l,marker:!0};s.push(L)}}if((0,Sr.isObject)(o)){var h=o.fields,v=o.callback;if(v){var d=h.map(function(O){return e[xi.FIELD_ORIGIN][O]}),p=v.apply(void 0,d),x=(0,wot.__assign)({data:e[xi.FIELD_ORIGIN],mappingData:e,title:a,color:e.color||l,marker:!0},p);s.push(x)}else for(var m=r.scales,_=0,b=h;_');D.appendChild(R);var H=(0,mv.getChartSize)(D,s,a,o),k=(0,olt.getEngine)(h),V=new k.Canvas((0,UA.__assign)({container:R,pixelRatio:v,localRefresh:p,supportCSSTransform:b},H));return i=e.call(this,{parent:null,canvas:V,backgroundGroup:V.addGroup({zIndex:yv.GROUP_Z_INDEX.BG}),middleGroup:V.addGroup({zIndex:yv.GROUP_Z_INDEX.MID}),foregroundGroup:V.addGroup({zIndex:yv.GROUP_Z_INDEX.FORE}),padding:u,appendPadding:c,visible:m,options:M,limitInPlot:O,theme:F,syncViewPadding:L})||this,i.onResize=(0,VC.debounce)(function(){i.forceFit()},300),i.ele=D,i.canvas=V,i.width=H.width,i.height=H.height,i.autoFit=s,i.localRefresh=p,i.renderer=h,i.wrapperElement=R,i.updateCanvasStyle(),i.bindAutoFit(),i.initDefaultInteractions(S),i}return r.prototype.initDefaultInteractions=function(t){var i=this;(0,VC.each)(t,function(n){i.interaction(n)})},r.prototype.aria=function(t){var i="aria-label";t===!1?this.ele.removeAttribute(i):this.ele.setAttribute(i,t.label)},r.prototype.changeSize=function(t,i){return this.width===t&&this.height===i?this:(this.emit(yv.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_SIZE),this.width=t,this.height=i,this.canvas.changeSize(t,i),this.render(!0),this.emit(yv.VIEW_LIFE_CIRCLE.AFTER_CHANGE_SIZE),this)},r.prototype.clear=function(){e.prototype.clear.call(this),this.aria(!1)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),(0,mv.removeDom)(this.wrapperElement),this.wrapperElement=null},r.prototype.changeVisible=function(t){return e.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},r.prototype.forceFit=function(){if(!this.destroyed){var t=(0,mv.getChartSize)(this.ele,!0,this.width,this.height),i=t.width,n=t.height;this.changeSize(i,n)}},r.prototype.updateCanvasStyle=function(){(0,mv.modifyCSS)(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},r.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},r.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},r}(llt.default);DE.default=slt;(function(e){var r=$d&&$d.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerComponentController=e.Event=e.registerGeometry=e.View=e.Chart=void 0;var t=DE;Object.defineProperty(e,"Chart",{enumerable:!0,get:function(){return r(t).default}});var i=ds;Object.defineProperty(e,"View",{enumerable:!0,get:function(){return r(i).default}}),Object.defineProperty(e,"registerGeometry",{enumerable:!0,get:function(){return i.registerGeometry}});var n=Vp;Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return r(n).default}});var a=xa;Object.defineProperty(e,"registerComponentController",{enumerable:!0,get:function(){return a.registerComponentController}})})(Af);var G1={};Object.defineProperty(G1,"__esModule",{value:!0});var Ua=j,Ve=Y,um=Qn,cm=be,ult=Se,clt=mn,flt=Kr,hlt=mo,jC=(0,Ua.__importDefault)(Vp);function vlt(e){for(var r=[],t=function(n){var a=e[n],o=(0,Ve.find)(r,function(l){return l.color===a.color&&l.name===a.name&&l.value===a.value&&l.title===a.title});o||r.push(a)},i=0;i1){for(var d=i[0],p=Math.abs(t.y-d[0].y),x=0,m=i;x'+l+"":l};return(0,Ua.__assign)((0,Ua.__assign)({},t),{customContent:n})},r.prototype.getTitle=function(t){var i=t[0].title||t[0].name;return this.title=i,i},r.prototype.renderTooltip=function(){var t=this.view.getCanvas(),i={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),a=new um.HtmlTooltip((0,Ua.__assign)((0,Ua.__assign)({parent:t.get("el").parentNode,region:i},n),{visible:!1,crosshairs:null}));a.init(),this.tooltip=a},r.prototype.renderTooltipMarkers=function(t,i){for(var n=this.getTooltipMarkersGroup(),a=0,o=t;a-1)return;a.push(t),(t==="active"||t==="selected")&&(s==null||s.toFront())}else{if(c===-1)return;a.splice(c,1),(t==="active"||t==="selected")&&(this.geometry.zIndexReversed?s.setZIndex(this.geometry.elements.length-this.elementIndex):s.setZIndex(this.elementIndex))}var f=o.drawShape(u,l,this.getOffscreenGroup());a.length?this.syncShapeStyle(s,f,a,null):this.syncShapeStyle(s,f,["reset"],null),f.remove(!0);var h={state:t,stateStatus:i,element:this,target:this.container};this.container.emit("statechange",h),(0,glt.propagationDelegate)(this.shape,"statechange",h)},r.prototype.clearStates=function(){var t=this,i=this.states;(0,ln.each)(i,function(n){t.setState(n,!1)}),this.states=[]},r.prototype.hasState=function(t){return this.states.includes(t)},r.prototype.getStates=function(){return this.states},r.prototype.getData=function(){return this.data},r.prototype.getModel=function(){return this.model},r.prototype.getBBox=function(){var t=this,i=t.shape,n=t.labelShape,a={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return i&&(a=i.getCanvasBBox()),n&&n.forEach(function(o){var l=o.getCanvasBBox();a.x=Math.min(l.x,a.x),a.y=Math.min(l.y,a.y),a.minX=Math.min(l.minX,a.minX),a.minY=Math.min(l.minY,a.minY),a.maxX=Math.max(l.maxX,a.maxX),a.maxY=Math.max(l.maxY,a.maxY)}),a.width=a.maxX-a.minX,a.height=a.maxY-a.minY,a},r.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,i=t.shapeType,n=t.geometry,a=t.shapeFactory,o=n.stateOption,l=a.defaultShapeType,s=a.theme[i]||a.theme[l];this.statesStyle=(0,ln.deepMix)({},s,o)}return this.statesStyle},r.prototype.getStateStyle=function(t,i){var n=this.getStatesStyle(),a=(0,ln.get)(n,[t,"style"],{}),o=a[i]||a;return(0,ln.isFunction)(o)?o(this):o},r.prototype.getAnimateCfg=function(t){var i=this,n=this.animate;if(n){var a=n[t];return a&&(0,Jc.__assign)((0,Jc.__assign)({},a),{callback:function(){var o;(0,ln.isFunction)(a.callback)&&a.callback(),(o=i.geometry)===null||o===void 0||o.emit(YC.GEOMETRY_LIFE_CIRCLE.AFTER_DRAW_ANIMATE)}})}return null},r.prototype.drawShape=function(t,i){var n;i===void 0&&(i=!1);var a=this,o=a.shapeFactory,l=a.container,s=a.shapeType;if(this.shape=o.drawShape(s,t,l),this.shape){this.setShapeInfo(this.shape,t);var u=this.shape.cfg.name;u?(0,ln.isString)(u)&&(this.shape.cfg.name=["element",u]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var c=i?"enter":"appear",f=this.getAnimateCfg(c);f&&((n=this.geometry)===null||n===void 0||n.emit(YC.GEOMETRY_LIFE_CIRCLE.BEFORE_DRAW_ANIMATE),(0,HC.doAnimate)(this.shape,f,{coordinate:o.coordinate,toAttrs:(0,Jc.__assign)({},this.shape.attr())}))}},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.setShapeInfo=function(t,i){var n=this;if(t.cfg.origin=i,t.cfg.element=this,t.isGroup()){var a=t.get("children");a.forEach(function(o){n.setShapeInfo(o,i)})}},r.prototype.syncShapeStyle=function(t,i,n,a,o){var l=this,s;if(n===void 0&&(n=[]),o===void 0&&(o=0),!(!t||!i)){var u=t.get("clipShape"),c=i.get("clipShape");if(this.syncShapeStyle(u,c,n,a),t.isGroup())for(var f=t.get("children"),h=i.get("children"),v=0;v=0?a=i:n<=0?a=n:a=0,a},r.prototype.createAttrOption=function(t,i,n){if((0,Ft.isNil)(i)||(0,Ft.isObject)(i))(0,Ft.isObject)(i)&&(0,Ft.isEqual)(Object.keys(i),["values"])?(0,Ft.set)(this.attributeOption,t,{fields:i.values}):(0,Ft.set)(this.attributeOption,t,i);else{var a={};(0,Ft.isNumber)(i)?a.values=[i]:a.fields=(0,_v.parseFields)(i),n&&((0,Ft.isFunction)(n)?a.callback=n:a.values=n),(0,Ft.set)(this.attributeOption,t,a)}},r.prototype.initAttributes=function(){var t=this,i=this,n=i.attributes,a=i.attributeOption,o=i.theme,l=i.shapeType;this.groupScales=[];var s={},u=function(h){if(a.hasOwnProperty(h)){var v=a[h];if(!v)return{value:void 0};var d=(0,vf.__assign)({},v),p=d.callback,x=d.values,m=d.fields,_=m===void 0?[]:m,b=_.map(function(S){var M=t.scales[S];return M.isCategory&&!s[S]&&Ha.GROUP_ATTRS.includes(h)&&(t.groupScales.push(M),s[S]=!0),M});d.scales=b,h!=="position"&&b.length===1&&b[0].type==="identity"?d.values=b[0].values:!p&&!x&&(h==="size"?d.values=o.sizes:h==="shape"?d.values=o.shapes[l]||[]:h==="color"&&(b.length?d.values=b[0].values.length<=10?o.colors10:o.colors20:d.values=o.colors10));var w=(0,Blt.getAttribute)(h);n[h]=new w(d)}};for(var c in a){var f=u(c);if(typeof f=="object")return f.value}},r.prototype.processData=function(t){this.hasSorted=!1;for(var i=this.getAttribute("position").scales,n=i.filter(function(S){return S.isCategory}),a=this.groupData(t),o=[],l=0,s=a.length;ll&&(l=f)}var h=this.scaleDefs,v={};ot.max&&!(0,Ft.get)(h,[a,"max"])&&(v.max=l),t.change(v)},r.prototype.beforeMapping=function(t){var i=t;if(this.sortable&&this.sort(i),this.generatePoints)for(var n=0,a=i.length;n1)for(var h=0;h0})}Ai.checkShapeOverlap=rst;var H1={};Object.defineProperty(H1,"__esModule",{value:!0});H1.updateLabel=void 0;var d$=Y,ist=ul,nst=Se;function I3(e,r,t){var i=t.data,n=t.origin,a=t.animateCfg,o=t.coordinate,l=(0,d$.get)(a,"update");e.set("data",i),e.set("origin",n),e.set("animateCfg",a),e.set("coordinate",o),e.set("visible",r.get("visible")),e.getChildren().forEach(function(s,u){var c=r.getChildByIndex(u);if(!c)e.removeChild(s),s.remove(!0);else{s.set("data",i),s.set("origin",n),s.set("animateCfg",a),s.set("coordinate",o);var f=(0,nst.getReplaceAttrs)(s,c);l?(0,ist.doAnimate)(s,l,{toAttrs:f,coordinate:o}):s.attr(f),c.isGroup()&&I3(s,c,t)}}),(0,d$.each)(r.getChildren(),function(s,u){u>=e.getCount()&&(s.destroyed||e.add(s))})}H1.updateLabel=I3;Object.defineProperty(YE,"__esModule",{value:!0});var la=j,tr=Y,p$=ul,ast=jn,ost=Ai,lst=Se,g$=Ar,sst=Kt,ust=H1,cst=function(){function e(r){this.shapesMap={},this.lastShapesMap={};var t=r.layout,i=r.container;this.layout=t,this.container=i}return e.prototype.render=function(r,t,i){var n=this;i===void 0&&(i=!1),this.shapesMap={};var a=this.container,o=this.createOffscreenGroup();if(r.length){for(var l=0,s=r;l0||i===1?u[l]=n*s:u[l]=n*s*-1,u},e.prototype.getLabelPoint=function(r,t,i){var n=this.getCoordinate(),a=r.content.length;function o(x,m,_){_===void 0&&(_=!1);var b=x;return(0,Ee.isArray)(b)&&(r.content.length===1?_?b=m$(b):b.length<=2?b=b[x.length-1]:b=m$(b):b=b[m]),b}var l={content:r.content[i],x:0,y:0,start:{x:0,y:0},color:"#fff"},s=(0,Ee.isArray)(t.shape)?t.shape[0]:t.shape,u=s==="funnel"||s==="pyramid";if(this.geometry.type==="polygon"){var c=(0,hst.getPolygonCentroid)(t.x,t.y);l.x=c[0],l.y=c[1]}else this.geometry.type==="interval"&&!u?(l.x=o(t.x,i,!0),l.y=o(t.y,i)):(l.x=o(t.x,i),l.y=o(t.y,i));if(u){var f=(0,Ee.get)(t,"nextPoints"),h=(0,Ee.get)(t,"points");if(f){var v=n.convert(h[1]),d=n.convert(f[1]);l.x=(v.x+d.x)/2,l.y=(v.y+d.y)/2}else if(s==="pyramid"){var v=n.convert(h[1]),d=n.convert(h[2]);l.x=(v.x+d.x)/2,l.y=(v.y+d.y)/2}}r.position&&this.setLabelPosition(l,t,i,r.position);var p=this.getLabelOffsetPoint(r,i,a);return l.start={x:l.x,y:l.y},l.x+=p.x,l.y+=p.y,l.color=t.color,l},e.prototype.getLabelAlign=function(r,t,i){var n="center",a=this.getCoordinate();if(a.isTransposed){var o=r.offset;o<0?n="right":o===0?n="center":n="left",i>1&&t===0&&(n==="right"?n="left":n==="left"&&(n="right"))}return n},e.prototype.getLabelId=function(r){var t=this.geometry,i=t.type,n=t.getXScale(),a=t.getYScale(),o=r[y$.FIELD_ORIGIN],l=t.getElementId(r);return i==="line"||i==="area"?l+=" "+o[n.field]:i==="path"&&(l+=" "+o[n.field]+"-"+o[a.field]),l},e.prototype.getLabelsRenderer=function(){var r=this.geometry,t=r.labelsContainer,i=r.labelOption,n=r.canvasRegion,a=r.animateOption,o=this.geometry.coordinate,l=this.labelsRenderer;return l||(l=new vst.default({container:t,layout:(0,Ee.get)(i,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=l),l.region=n,l.animate=a?(0,fst.getDefaultAnimateCfg)("label",o):!1,l},e.prototype.getLabelCfgs=function(r){var t=this,i=this.geometry,n=i.labelOption,a=i.scales,o=i.coordinate,l=n,s=l.fields,u=l.callback,c=l.cfg,f=s.map(function(v){return a[v]}),h=[];return(0,Ee.each)(r,function(v,d){var p=v[y$.FIELD_ORIGIN],x=t.getLabelText(p,f),m;if(u){var _=s.map(function(O){return p[O]});if(m=u.apply(void 0,_),(0,Ee.isNil)(m)){h.push(null);return}}var b=(0,Xv.__assign)((0,Xv.__assign)({id:t.getLabelId(v),elementId:t.geometry.getElementId(v),data:p,mappingData:v,coordinate:o},c),m);(0,Ee.isFunction)(b.position)&&(b.position=b.position(p,v,d));var w=t.getLabelOffset(b.offset||0),S=t.getDefaultLabelCfg(w,b.position);b=(0,Ee.deepMix)({},S,b),b.offset=t.getLabelOffset(b.offset||0);var M=b.content;(0,Ee.isFunction)(M)?b.content=M(p,v,d):(0,Ee.isUndefined)(M)&&(b.content=x[0]),h.push(b)}),h},e.prototype.getLabelText=function(r,t){var i=[];return(0,Ee.each)(t,function(n){var a=r[n.field];(0,Ee.isArray)(a)?a=a.map(function(o){return n.getText(o)}):a=n.getText(a),(0,Ee.isNil)(a)||a===""?i.push(null):i.push(a)}),i},e.prototype.getOffsetVector=function(r){r===void 0&&(r=0);var t=this.getCoordinate(),i=0;return(0,Ee.isNumber)(r)&&(i=r),t.isTransposed?t.applyMatrix(i,0):t.applyMatrix(0,i)},e.prototype.getGeometryShapes=function(){var r=this.geometry,t={};return(0,Ee.each)(r.elementsMap,function(i,n){t[n]=i.shape}),(0,Ee.each)(r.getOffscreenGroup().getChildren(),function(i){var n=r.getElementId(i.get("origin").mappingData);t[n]=i}),t},e}(),L3=Fh.default=dst,D3={};Object.defineProperty(D3,"__esModule",{value:!0});var Xp={};Object.defineProperty(Xp,"__esModule",{value:!0});Xp.getMappingValue=void 0;var pst=j;function gst(e,r,t){if(!e)return t;var i;if(e.callback&&e.callback.length>1){var n=Array(e.callback.length-1).fill("");i=e.mapping.apply(e,(0,pst.__spreadArray)([r],n,!1)).join("")}else i=e.mapping(r).join("");return i||t}Xp.getMappingValue=gst;var _a={},Ps={};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.MarkerSymbols=void 0;Ps.MarkerSymbols={hexagon:function(e,r,t){var i=t/2*Math.sqrt(3);return[["M",e,r-t],["L",e+i,r-t/2],["L",e+i,r+t/2],["L",e,r+t],["L",e-i,r+t/2],["L",e-i,r-t/2],["Z"]]},bowtie:function(e,r,t){var i=t-1.5;return[["M",e-t,r-i],["L",e+t,r+i],["L",e+t,r-i],["L",e-t,r+i],["Z"]]},cross:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r+t],["M",e+t,r-t],["L",e-t,r+t]]},tick:function(e,r,t){return[["M",e-t/2,r-t],["L",e+t/2,r-t],["M",e,r-t],["L",e,r+t],["M",e-t/2,r+t],["L",e+t/2,r+t]]},plus:function(e,r,t){return[["M",e-t,r],["L",e+t,r],["M",e,r-t],["L",e,r+t]]},hyphen:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},line:function(e,r,t){return[["M",e,r-t],["L",e,r+t]]}};Object.defineProperty(_a,"__esModule",{value:!0});_a.getLegendThemeCfg=_a.getCustomLegendItems=_a.getLegendItems=_a.getLegendLayout=void 0;var x$=j,lr=Y,_$=Kt,b$=Xp,yst=yr,w$=Ps,mst=["line","cross","tick","plus","hyphen"];function xst(e,r){return(0,lr.isFunction)(r)?r(e):(0,lr.deepMix)({},e,r)}function _st(e,r){var t=e.symbol;if((0,lr.isString)(t)&&mst.indexOf(t)!==-1){var i=(0,lr.get)(e,"style",{}),n=(0,lr.get)(i,"lineWidth",1),a=i.stroke||i.fill||r;e.style=(0,lr.deepMix)({},e.style,{lineWidth:n,stroke:a,fill:null})}}function $3(e){var r=e.symbol;(0,lr.isString)(r)&&w$.MarkerSymbols[r]&&(e.symbol=w$.MarkerSymbols[r])}function bst(e){return e.startsWith(_$.DIRECTION.LEFT)||e.startsWith(_$.DIRECTION.RIGHT)?"vertical":"horizontal"}_a.getLegendLayout=bst;function wst(e,r,t,i,n){var a=t.getScale(t.type);if(a.isCategory){var o=a.field,l=r.getAttribute("color"),s=r.getAttribute("shape"),u=e.getTheme().defaultColor,c=r.coordinate.isPolar;return a.getTicks().map(function(f,h){var v,d=f.text,p=f.value,x=d,m=a.invert(p),_=e.filterFieldData(o,[(v={},v[o]=m,v)]).length===0;(0,lr.each)(e.views,function(O){var F;O.filterFieldData(o,[(F={},F[o]=m,F)]).length||(_=!0)});var b=(0,b$.getMappingValue)(l,m,u),w=(0,b$.getMappingValue)(s,m,"point"),S=r.getShapeMarker(w,{color:b,isInPolar:c}),M=n;return(0,lr.isFunction)(M)&&(M=M(x,h,(0,x$.__assign)({name:x,value:m},(0,lr.deepMix)({},i,S)))),S=(0,lr.deepMix)({},i,S,(0,yst.omit)((0,x$.__assign)({},M),["style"])),_st(S,b),M&&M.style&&(S.style=xst(S.style,M.style)),$3(S),{id:m,name:x,value:m,marker:S,unchecked:_}})}return[]}_a.getLegendItems=wst;function Cst(e,r,t){return t.map(function(i,n){var a=r;(0,lr.isFunction)(a)&&(a=a(i.name,n,(0,lr.deepMix)({},e,i)));var o=(0,lr.isFunction)(i.marker)?i.marker(i.name,n,(0,lr.deepMix)({},e,i)):i.marker,l=(0,lr.deepMix)({},e,a,o);return $3(l),i.marker=l,i})}_a.getCustomLegendItems=Cst;function Sst(e,r){var t=(0,lr.get)(e,["components","legend"],{});return(0,lr.deepMix)({},(0,lr.get)(t,["common"],{}),(0,lr.deepMix)({},(0,lr.get)(t,[r],{})))}_a.getLegendThemeCfg=Sst;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Scale=e.Coordinate=e.DIRECTION=e.LAYER=e.getAnimation=e.registerAnimation=e.getEngine=e.registerEngine=e.registerTheme=e.getTheme=e.registerFacet=e.getFacet=e.getActionClass=e.registerAction=e.registerInteraction=e.getInteraction=e.getGeometryLabelLayout=e.getGeometryLabel=e.registerGeometryLabelLayout=e.registerGeometryLabel=e.getShapeFactory=e.registerShapeFactory=e.registerShape=e.registerGeometry=e.registerComponentController=e.InteractionAction=e.Facet=e.Action=e.Interaction=e.GeometryLabel=e.Element=e.Geometry=e.TooltipController=e.ComponentController=e.Event=e.View=e.Chart=e.VERSION=void 0;var r=j;e.VERSION="4.1.32";var t=Af;Object.defineProperty(e,"Chart",{enumerable:!0,get:function(){return t.Chart}}),Object.defineProperty(e,"View",{enumerable:!0,get:function(){return t.View}}),Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return t.Event}});var i=mo;Object.defineProperty(e,"ComponentController",{enumerable:!0,get:function(){return i.Controller}});var n=G1;Object.defineProperty(e,"TooltipController",{enumerable:!0,get:function(){return(0,r.__importDefault)(n).default}});var a=Pa;Object.defineProperty(e,"Geometry",{enumerable:!0,get:function(){return(0,r.__importDefault)(a).default}});var o=Hp;Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return(0,r.__importDefault)(o).default}});var l=Fh;Object.defineProperty(e,"GeometryLabel",{enumerable:!0,get:function(){return(0,r.__importDefault)(l).default}});var s=nx;Object.defineProperty(e,"Interaction",{enumerable:!0,get:function(){return s.Interaction}}),Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return s.Action}});var u=ix;Object.defineProperty(e,"Facet",{enumerable:!0,get:function(){return u.Facet}});var c=Fr;Object.defineProperty(e,"InteractionAction",{enumerable:!0,get:function(){return(0,r.__importDefault)(c).default}});var f=Af;Object.defineProperty(e,"registerComponentController",{enumerable:!0,get:function(){return f.registerComponentController}});var h=Af;Object.defineProperty(e,"registerGeometry",{enumerable:!0,get:function(){return h.registerGeometry}});var v=re;Object.defineProperty(e,"registerShape",{enumerable:!0,get:function(){return v.registerShape}}),Object.defineProperty(e,"registerShapeFactory",{enumerable:!0,get:function(){return v.registerShapeFactory}}),Object.defineProperty(e,"getShapeFactory",{enumerable:!0,get:function(){return v.getShapeFactory}});var d=jn;Object.defineProperty(e,"registerGeometryLabel",{enumerable:!0,get:function(){return d.registerGeometryLabel}}),Object.defineProperty(e,"registerGeometryLabelLayout",{enumerable:!0,get:function(){return d.registerGeometryLabelLayout}}),Object.defineProperty(e,"getGeometryLabel",{enumerable:!0,get:function(){return d.getGeometryLabel}}),Object.defineProperty(e,"getGeometryLabelLayout",{enumerable:!0,get:function(){return d.getGeometryLabelLayout}});var p=nx;Object.defineProperty(e,"getInteraction",{enumerable:!0,get:function(){return p.getInteraction}}),Object.defineProperty(e,"registerInteraction",{enumerable:!0,get:function(){return p.registerInteraction}}),Object.defineProperty(e,"registerAction",{enumerable:!0,get:function(){return p.registerAction}}),Object.defineProperty(e,"getActionClass",{enumerable:!0,get:function(){return p.getActionClass}});var x=ix;Object.defineProperty(e,"getFacet",{enumerable:!0,get:function(){return x.getFacet}}),Object.defineProperty(e,"registerFacet",{enumerable:!0,get:function(){return x.registerFacet}});var m=Qu;Object.defineProperty(e,"getTheme",{enumerable:!0,get:function(){return m.getTheme}}),Object.defineProperty(e,"registerTheme",{enumerable:!0,get:function(){return m.registerTheme}});var _=Zu;Object.defineProperty(e,"registerEngine",{enumerable:!0,get:function(){return _.registerEngine}}),Object.defineProperty(e,"getEngine",{enumerable:!0,get:function(){return _.getEngine}});var b=qu;Object.defineProperty(e,"registerAnimation",{enumerable:!0,get:function(){return b.registerAnimation}}),Object.defineProperty(e,"getAnimation",{enumerable:!0,get:function(){return b.getAnimation}});var w=Kt;Object.defineProperty(e,"LAYER",{enumerable:!0,get:function(){return w.LAYER}}),Object.defineProperty(e,"DIRECTION",{enumerable:!0,get:function(){return w.DIRECTION}}),(0,r.__importStar)(D3);var S=Qn;Object.defineProperty(e,"Coordinate",{enumerable:!0,get:function(){return S.Coordinate}}),Object.defineProperty(e,"Scale",{enumerable:!0,get:function(){return S.Scale}});var M=Xp,O=_a,F=Se,L=Ar,D=mn,R=xt;e.Util={getLegendItems:O.getLegendItems,translate:L.translate,rotate:L.rotate,zoom:L.zoom,transform:L.transform,getAngle:F.getAngle,getSectorPath:F.getSectorPath,polarToCartesian:F.polarToCartesian,getDelegationObject:R.getDelegationObject,getTooltipItems:D.getTooltipItems,getMappingValue:M.getMappingValue}})(ut);var k3={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.setGlobal=e.GLOBAL=void 0;var r=Y;e.GLOBAL={locale:"en-US"};function t(i){r.each(i,function(n,a){return e.GLOBAL[a]=n})}e.setGlobal=t})(k3);var df=[1,1.2,1.5,2,2.2,2.4,2.5,3,4,5,6,7.5,8,10],Ast=5,Tst=function(e){var r=e||{},t=r.tickCount,i=r.tickInterval,n=e||{},a=n.min,o=n.max;a=isNaN(a)?0:a,o=isNaN(o)?0:o;var l=t&&t>=2?t:Ast,s=i||Est({tickCount:l,max:o,min:a}),u=Math.floor(a/s)*s;if(i){var c=Math.abs(Math.ceil((o-u)/i))+1;l=Math.max(l,c)}for(var f=[],h=0,v=ZA(s);hMst&&(r=parseFloat(r.toFixed(t))),r}for(;e>10;)r=r*10,e=e/10;return r}function Est(e){var r=e.tickCount,t=e.min,i=e.max;if(t===i)return 1*C$(i);for(var n=(i-t)/(r-1),a=C$(n),o=n/a,l=i/a,s=t/a,u=0,c=0;c=i}function ZA(e){var r=e.toString(),t=r.indexOf("."),i=r.indexOf("e-"),n=i>=0?parseInt(r.substr(i+2),10):r.substr(t+1).length;return n>20&&(n=20),n}function B3(e,r){return parseFloat(e.toFixed(r))}var Fst=globalThis&&globalThis.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])},e(r,t)};return function(r,t){e(r,t);function i(){this.constructor=r}r.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Kn("linear-strict-tick-method",Tst);var Pst=function(e){Fst(r,e);function r(t){var i=e.call(this,t)||this;return i.type="linear-strict",i}return r.prototype.initCfg=function(){e.prototype.initCfg.call(this),this.tickMethod="linear-strict-tick-method"},r.prototype.calculateTicks=function(){var t=this.nice;this.nice=!0;var i=e.prototype.calculateTicks.call(this);return this.nice=t,i.length&&(this.min=i[0],this.max=i[i.length-1]),i},r}(Ah);Gd("linear-strict")||Jn("linear-strict",Pst);var jf={};Object.defineProperty(jf,"__esModule",{value:!0});var N3=jf.fadeOut=G3=jf.fadeIn=void 0,WC=Y;function Ist(e,r,t){var i={fillOpacity:(0,WC.isNil)(e.attr("fillOpacity"))?1:e.attr("fillOpacity"),strokeOpacity:(0,WC.isNil)(e.attr("strokeOpacity"))?1:e.attr("strokeOpacity"),opacity:(0,WC.isNil)(e.attr("opacity"))?1:e.attr("opacity")};e.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),e.animate(i,r)}var G3=jf.fadeIn=Ist;function Lst(e,r,t){var i={fillOpacity:0,strokeOpacity:0,opacity:0},n=r.easing,a=r.duration,o=r.delay;e.animate(i,a,n,function(){e.remove(!0)},o)}N3=jf.fadeOut=Lst;var Kl={},Hf={};Object.defineProperty(Hf,"__esModule",{value:!0});Hf.doScaleAnimate=Hf.transformShape=void 0;var Rc=ta;function z3(e,r,t){var i,n=r[0],a=r[1];return e.applyToMatrix([n,a,1]),t==="x"?(e.setMatrix(Rc.ext.transform(e.getMatrix(),[["t",-n,-a],["s",.01,1],["t",n,a]])),i=Rc.ext.transform(e.getMatrix(),[["t",-n,-a],["s",100,1],["t",n,a]])):t==="y"?(e.setMatrix(Rc.ext.transform(e.getMatrix(),[["t",-n,-a],["s",1,.01],["t",n,a]])),i=Rc.ext.transform(e.getMatrix(),[["t",-n,-a],["s",1,100],["t",n,a]])):t==="xy"&&(e.setMatrix(Rc.ext.transform(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]])),i=Rc.ext.transform(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])),i}Hf.transformShape=z3;function Dst(e,r,t,i,n){var a=t.start,o=t.end,l=t.getWidth(),s=t.getHeight(),u,c;n==="y"?(u=a.x+l/2,c=i.ya.x?i.x:a.x,c=a.y+s/2):n==="xy"&&(t.isPolar?(u=t.getCenter().x,c=t.getCenter().y):(u=(a.x+o.x)/2,c=(a.y+o.y)/2));var f=z3(e,[u,c],n);e.animate({matrix:f},r)}Hf.doScaleAnimate=Dst;Object.defineProperty(Kl,"__esModule",{value:!0});var V3=Kl.growInXY=H3=Kl.growInY=j3=Kl.growInX=void 0,WE=Hf;function $st(e,r,t){var i=t.coordinate,n=t.minYPoint;(0,WE.doScaleAnimate)(e,r,i,n,"x")}var j3=Kl.growInX=$st;function kst(e,r,t){var i=t.coordinate,n=t.minYPoint;(0,WE.doScaleAnimate)(e,r,i,n,"y")}var H3=Kl.growInY=kst;function Rst(e,r,t){var i=t.coordinate,n=t.minYPoint;(0,WE.doScaleAnimate)(e,r,i,n,"xy")}V3=Kl.growInXY=Rst;var Y1={};Object.defineProperty(Y1,"__esModule",{value:!0});var XE=Y1.pathIn=void 0;function Bst(e,r,t){var i=e.getTotalLength();e.attr("lineDash",[i]),e.animate(function(n){return{lineDashOffset:(1-n)*i}},r)}XE=Y1.pathIn=Bst;var W1={};Object.defineProperty(W1,"__esModule",{value:!0});var Y3=W1.positionUpdate=void 0;function Nst(e,r,t){var i=t.toAttrs,n=i.x,a=i.y;delete i.x,delete i.y,e.attr(i),e.animate({x:n,y:a},r)}Y3=W1.positionUpdate=Nst;var Yf={};Object.defineProperty(Yf,"__esModule",{value:!0});var W3=Yf.scaleInY=X3=Yf.scaleInX=void 0,ax=ta;function Gst(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=n.points,o=a[0].y-a[1].y>0?i.maxX:i.minX,l=(i.minY+i.maxY)/2;e.applyToMatrix([o,l,1]);var s=ax.ext.transform(e.getMatrix(),[["t",-o,-l],["s",.01,1],["t",o,l]]);e.setMatrix(s),e.animate({matrix:ax.ext.transform(e.getMatrix(),[["t",-o,-l],["s",100,1],["t",o,l]])},r)}var X3=Yf.scaleInX=Gst;function zst(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=(i.minX+i.maxX)/2,o=n.points,l=o[0].y-o[1].y<=0?i.maxY:i.minY;e.applyToMatrix([a,l,1]);var s=ax.ext.transform(e.getMatrix(),[["t",-a,-l],["s",1,.01],["t",a,l]]);e.setMatrix(s),e.animate({matrix:ax.ext.transform(e.getMatrix(),[["t",-a,-l],["s",1,100],["t",a,l]])},r)}W3=Yf.scaleInY=zst;var X1={};function Vst(){return window?window.devicePixelRatio:1}function U3(e,r,t,i){var n=e-t,a=r-i;return Math.sqrt(n*n+a*a)}function Au(e,r,t,i,n,a){return n>=e&&n<=e+t&&a>=r&&a<=r+i}function Yd(e,r){return!(r.minX>e.maxX||r.maxXe.maxY||r.maxY=0&&n<1/2*Math.PI?(l={x:o.minX,y:o.minY},s={x:o.maxX,y:o.maxY}):1/2*Math.PI<=n&&n1&&(t*=Math.sqrt(v),i*=Math.sqrt(v));var d=t*t*(h*h)+i*i*(f*f),p=d?Math.sqrt((t*t*(i*i)-d)/d):1;a===o&&(p*=-1),isNaN(p)&&(p=0);var x=i?p*t*h/i:0,m=t?p*-i*f/t:0,_=(l+u)/2+Math.cos(n)*x-Math.sin(n)*m,b=(s+c)/2+Math.sin(n)*x+Math.cos(n)*m,w=[(f-x)/t,(h-m)/i],S=[(-1*f-x)/t,(-1*h-m)/i],M=A$([1,0],w),O=A$(w,S);return QA(w,S)<=-1&&(O=Math.PI),QA(w,S)>=1&&(O=0),o===0&&O>0&&(O=O-2*Math.PI),o===1&&O<0&&(O=O+2*Math.PI),{cx:_,cy:b,rx:S$(e,[u,c])?0:t,ry:S$(e,[u,c])?0:i,startAngle:M,endAngle:M+O,xRotation:n,arcFlag:a,sweepFlag:o}}var lx=Math.sin,sx=Math.cos,UE=Math.atan2,hm=Math.PI;function Q3(e,r,t,i,n,a,o){var l=r.stroke,s=r.lineWidth,u=t-n,c=i-a,f=UE(c,u),h=new JE({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*sx(hm/6)+","+10*lx(hm/6)+" L0,0 L"+10*sx(hm/6)+",-"+10*lx(hm/6),stroke:l,lineWidth:s}});h.translate(n,a),h.rotateAtPoint(n,a,f),e.set(o?"startArrowShape":"endArrowShape",h)}function K3(e,r,t,i,n,a,o){var l=r.startArrow,s=r.endArrow,u=r.stroke,c=r.lineWidth,f=o?l:s,h=f.d,v=f.fill,d=f.stroke,p=f.lineWidth,x=ue(f,["d","fill","stroke","lineWidth"]),m=t-n,_=i-a,b=UE(_,m);h&&(n=n-sx(b)*h,a=a-lx(b)*h);var w=new JE({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:A(A({},x),{stroke:d||u,lineWidth:p||c,fill:v})});w.translate(n,a),w.rotateAtPoint(n,a,b),e.set(o?"startArrowShape":"endArrowShape",w)}function Bu(e,r,t,i,n){var a=UE(i-r,t-e);return{dx:sx(a)*n,dy:lx(a)*n}}function qE(e,r,t,i,n,a){typeof r.startArrow=="object"?K3(e,r,t,i,n,a,!0):r.startArrow?Q3(e,r,t,i,n,a,!0):e.set("startArrowShape",null)}function ZE(e,r,t,i,n,a){typeof r.endArrow=="object"?K3(e,r,t,i,n,a,!1):r.endArrow?Q3(e,r,t,i,n,a,!1):e.set("startArrowShape",null)}var T$={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function Wf(e,r){var t=r.attr();for(var i in t){var n=t[i],a=T$[i]?T$[i]:i;a==="matrix"&&n?e.transform(n[0],n[1],n[3],n[4],n[6],n[7]):a==="lineDash"&&e.setLineDash?it(n)&&e.setLineDash(n):(a==="strokeStyle"||a==="fillStyle"?n=Zst(e,r,n):a==="globalAlpha"&&(n=n*e.globalAlpha),e[a]=n)}}function KA(e,r,t){for(var i=0;iS?w:S,R=w>S?1:w/S,H=w>S?S/w:1;r.translate(_,b),r.rotate(F),r.scale(R,H),r.arc(0,0,D,M,O,1-L),r.scale(1/R,1/H),r.rotate(-F),r.translate(-_,-b)}break}case"Z":r.closePath();break}if(h==="Z")l=s;else{var k=f.length;l=[f[k-2],f[k-1]]}}}}function ej(e,r){var t=e.get("canvas");t&&(r==="remove"&&(e._cacheCanvasBBox=e.get("cacheCanvasBBox")),e.get("hasChanged")||(e.set("hasChanged",!0),e.cfg.parent&&e.cfg.parent.get("hasChanged")||(t.refreshElement(e,r,t),t.get("autoDraw")&&t.draw())))}function tut(e){var r;if(e.destroyed)r=e._cacheCanvasBBox;else{var t=e.get("cacheCanvasBBox"),i=t&&!!(t.width&&t.height),n=e.getCanvasBBox(),a=n&&!!(n.width&&n.height);i&&a?r=jst(t,n):i?r=t:a&&(r=n)}return r}function eut(e){if(!e.length)return null;var r=[],t=[],i=[],n=[];return P(e,function(a){var o=tut(a);o&&(r.push(o.minX),t.push(o.minY),i.push(o.maxX),n.push(o.maxY))}),{minX:Ei(r),minY:Ei(t),maxX:vi(i),maxY:vi(n)}}function rut(e,r){return!e||!r||!Yd(e,r)?null:{minX:Math.max(e.minX,r.minX),minY:Math.max(e.minY,r.minY),maxX:Math.min(e.maxX,r.maxX),maxY:Math.min(e.maxY,r.maxY)}}var KE=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.onCanvasChange=function(t){ej(this,t)},r.prototype.getShapeBase=function(){return Xx},r.prototype.getGroupBase=function(){return r},r.prototype._applyClip=function(t,i){i&&(t.save(),Wf(t,i),i.createPath(t),t.restore(),t.clip(),i._afterDraw())},r.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,i=[],n=[];P(t,function(h){var v=h.cfg.cacheCanvasBBox;v&&h.cfg.isInView&&(i.push(v.minX,v.maxX),n.push(v.minY,v.maxY))});var a=null;if(i.length){var o=Ei(i),l=vi(i),s=Ei(n),u=vi(n);a={minX:o,minY:s,x:o,y:s,maxX:l,maxY:u,width:l-o,height:u-s};var c=this.cfg.canvas;if(c){var f=c.getViewRange();this.set("isInView",Yd(a,f))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",a)},r.prototype.draw=function(t,i){var n=this.cfg.children,a=i?this.cfg.refresh:!0;n.length&&a&&(t.save(),Wf(t,this),this._applyClip(t,this.getClip()),KA(t,n,i),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},r.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},r}(bp),iut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},r.prototype.getShapeBase=function(){return Xx},r.prototype.getGroupBase=function(){return KE},r.prototype.onCanvasChange=function(t){ej(this,t)},r.prototype.calculateBBox=function(){var t=this.get("type"),i=this.getHitLineWidth(),n=Cp(t),a=n(this),o=i/2,l=a.x-o,s=a.y-o,u=a.x+a.width+o,c=a.y+a.height+o;return{x:l,minX:l,y:s,minY:s,width:a.width+i,height:a.height+i,maxX:u,maxY:c}},r.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},r.prototype.isStroke=function(){return!!this.attrs.stroke},r.prototype._applyClip=function(t,i){i&&(t.save(),Wf(t,i),i.createPath(t),t.restore(),t.clip(),i._afterDraw())},r.prototype.draw=function(t,i){var n=this.cfg.clipShape;if(i){if(this.cfg.refresh===!1){this.set("hasChanged",!1);return}var a=this.getCanvasBBox();if(!Yd(i,a)){this.set("hasChanged",!1),this.cfg.isInView&&this._afterDraw();return}}t.save(),Wf(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},r.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},r.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var i=this.getCanvasBBox(),n=Yd(i,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",i):this.set("cacheCanvasBBox",null)}},r.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},r.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},r.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},r.prototype.fill=function(t){t.fill()},r.prototype.stroke=function(t){t.stroke()},r.prototype.strokeAndFill=function(t){var i=this.attrs,n=i.lineWidth,a=i.opacity,o=i.strokeOpacity,l=i.fillOpacity;this.isFill()&&(!K(l)&&l!==1?(t.globalAlpha=l,this.fill(t),t.globalAlpha=a):this.fill(t)),this.isStroke()&&n>0&&(!K(o)&&o!==1&&(t.globalAlpha=o),this.stroke(t)),this.afterDrawPath(t)},r.prototype.createPath=function(t){},r.prototype.afterDrawPath=function(t){},r.prototype.isInShape=function(t,i){var n=this.isStroke(),a=this.isFill(),o=this.getHitLineWidth();return this.isInStrokeOrPath(t,i,n,a,o)},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){return!1},r.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},r}(wp),Ia=iut,nut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,r:0})},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr(),s=l.x,u=l.y,c=l.r,f=o/2,h=U3(s,u,t,i);return a&&n?h<=c+f:a?h<=c:n?h>=c-f&&h<=c+f:!1},r.prototype.createPath=function(t){var i=this.attr(),n=i.x,a=i.y,o=i.r;t.beginPath(),t.arc(n,a,o,0,Math.PI*2,!1),t.closePath()},r}(Ia),aut=nut;function vm(e,r,t,i){return e/(t*t)+r/(i*i)}var out=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,rx:0,ry:0})},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr(),s=o/2,u=l.x,c=l.y,f=l.rx,h=l.ry,v=(t-u)*(t-u),d=(i-c)*(i-c);return a&&n?vm(v,d,f+s,h+s)<=1:a?vm(v,d,f,h)<=1:n?vm(v,d,f-s,h-s)>=1&&vm(v,d,f+s,h+s)<=1:!1},r.prototype.createPath=function(t){var i=this.attr(),n=i.x,a=i.y,o=i.rx,l=i.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,a,o,l,0,0,Math.PI*2,!1);else{var s=o>l?o:l,u=o>l?1:o/l,c=o>l?l/o:1;t.save(),t.translate(n,a),t.scale(u,c),t.arc(0,0,s,0,Math.PI*2),t.restore(),t.closePath()}},r}(Ia),lut=out;function M$(e){return e instanceof HTMLElement&&Ct(e.nodeName)&&e.nodeName.toUpperCase()==="CANVAS"}var sut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,width:0,height:0})},r.prototype.initAttrs=function(t){this._setImage(t.img)},r.prototype.isStroke=function(){return!1},r.prototype.isOnlyHitBox=function(){return!0},r.prototype._afterLoading=function(){if(this.get("toDraw")===!0){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},r.prototype._setImage=function(t){var i=this,n=this.attrs;if(Ct(t)){var a=new Image;a.onload=function(){if(i.destroyed)return!1;i.attr("img",a),i.set("loading",!1),i._afterLoading();var o=i.get("callback");o&&o.call(i)},a.crossOrigin="Anonymous",a.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):M$(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),t==="img"&&this._setImage(i)},r.prototype.createPath=function(t){if(this.get("loading")){this.set("toDraw",!0),this.set("context",t);return}var i=this.attr(),n=i.x,a=i.y,o=i.width,l=i.height,s=i.sx,u=i.sy,c=i.swidth,f=i.sheight,h=i.img;(h instanceof Image||M$(h))&&(!K(s)&&!K(u)&&!K(c)&&!K(f)?t.drawImage(h,s,u,c,f,n,a,o,l):t.drawImage(h,n,a,o,l))},r}(Ia),uut=sut;function Xl(e,r,t,i,n,a,o){var l=Math.min(e,t),s=Math.max(e,t),u=Math.min(r,i),c=Math.max(r,i),f=n/2;return a>=l-f&&a<=s+f&&o>=u-f&&o<=c+f?Mr.pointToLine(e,r,t,i,a,o)<=n/2:!1}var cut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},r.prototype.initAttrs=function(t){this.setArrow()},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),this.setArrow()},r.prototype.setArrow=function(){var t=this.attr(),i=t.x1,n=t.y1,a=t.x2,o=t.y2,l=t.startArrow,s=t.endArrow;l&&qE(this,t,a,o,i,n),s&&ZE(this,t,i,n,a,o)},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){if(!n||!o)return!1;var l=this.attr(),s=l.x1,u=l.y1,c=l.x2,f=l.y2;return Xl(s,u,c,f,o,t,i)},r.prototype.createPath=function(t){var i=this.attr(),n=i.x1,a=i.y1,o=i.x2,l=i.y2,s=i.startArrow,u=i.endArrow,c={dx:0,dy:0},f={dx:0,dy:0};s&&s.d&&(c=Bu(n,a,o,l,i.startArrow.d)),u&&u.d&&(f=Bu(n,a,o,l,i.endArrow.d)),t.beginPath(),t.moveTo(n+c.dx,a+c.dy),t.lineTo(o-f.dx,l-f.dy)},r.prototype.afterDrawPath=function(t){var i=this.get("startArrowShape"),n=this.get("endArrowShape");i&&i.draw(t),n&&n.draw(t)},r.prototype.getTotalLength=function(){var t=this.attr(),i=t.x1,n=t.y1,a=t.x2,o=t.y2;return Mr.length(i,n,a,o)},r.prototype.getPoint=function(t){var i=this.attr(),n=i.x1,a=i.y1,o=i.x2,l=i.y2;return Mr.pointAt(n,a,o,l,t)},r}(Ia),fut=cut,hut={circle:function(e,r,t){return[["M",e-t,r],["A",t,t,0,1,0,e+t,r],["A",t,t,0,1,0,e-t,r]]},square:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r-t],["L",e+t,r+t],["L",e-t,r+t],["Z"]]},diamond:function(e,r,t){return[["M",e-t,r],["L",e,r-t],["L",e+t,r],["L",e,r+t],["Z"]]},triangle:function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r+i],["L",e,r-i],["L",e+t,r+i],["Z"]]},"triangle-down":function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r-i],["L",e+t,r-i],["L",e,r+i],["Z"]]}},vut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.initAttrs=function(t){this._resetParamsCache()},r.prototype._resetParamsCache=function(){this.set("paramsCache",{})},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),["symbol","x","y","r","radius"].indexOf(t)!==-1&&this._resetParamsCache()},r.prototype.isOnlyHitBox=function(){return!0},r.prototype._getR=function(t){return K(t.r)?t.radius:t.r},r.prototype._getPath=function(){var t=this.attr(),i=t.x,n=t.y,a=t.symbol||"circle",o=this._getR(t),l,s;if(pt(a))l=a,s=l(i,n,o),s=f1(s);else{if(l=r.Symbols[a],!l)return console.warn(a+" marker is not supported."),null;s=l(i,n,o)}return s},r.prototype.createPath=function(t){var i=this._getPath(),n=this.get("paramsCache");tj(this,t,{path:i},n)},r.Symbols=hut,r}(Ia),dut=vut;function rj(e,r,t){var i=Ap();return e.createPath(i),i.isPointInPath(r,t)}var put=1e-6;function XC(e){return Math.abs(e)0!=XC(l[1]-t)>0&&XC(r-(t-o[1])*(o[0]-l[0])/(o[1]-l[1])-o[0])<0&&(i=!i)}return i}function Uv(e,r,t,i,n,a,o,l){var s=(Math.atan2(l-r,o-e)+Math.PI*2)%(Math.PI*2);if(sn)return!1;var u={x:e+t*Math.cos(s),y:r+t*Math.sin(s)};return U3(u.x,u.y,o,l)<=a/2}var yut=rr;function mut(e){for(var r=!1,t=e.length,i=0;ib?_:b,L=_>b?1:_/b,D=_>b?b/_:1,R=yut(null,[["t",-x,-m],["r",-M],["s",1/L,1/D]]);kf(O,O,R),a=Uv(0,0,F,w,S,r,O[0],O[1]);break}if(a)break}}return a}function _ut(e){for(var r=e.length,t=[],i=[],n=[],a=0;a0&&i.push(n),{polygons:t,polylines:i}}var dm=A({hasArc:mut,extractPolygons:_ut,isPointInStroke:xut},a1);function E$(e,r,t){for(var i=!1,n=0;n=c[0]&&t<=c[1]&&(n=(t-c[0])/(c[1]-c[0]),a=f)});var l=o[a];if(K(l)||K(a))return null;var s=l.length,u=o[a+1];return Cf.pointAt(l[s-2],l[s-1],u[1],u[2],u[3],u[4],u[5],u[6],n)},r.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",dm.pathToCurve(t))},r.prototype._setTcache=function(){var t=0,i=0,n=[],a,o,l,s,u=this.get("curve");if(!!u){if(P(u,function(c,f){l=u[f+1],s=c.length,l&&(t+=Cf.length(c[s-2],c[s-1],l[1],l[2],l[3],l[4],l[5],l[6])||0)}),this.set("totalLength",t),t===0){this.set("tCache",[]);return}P(u,function(c,f){l=u[f+1],s=c.length,l&&(a=[],a[0]=i/t,o=Cf.length(c[s-2],c[s-1],l[1],l[2],l[3],l[4],l[5],l[6]),i+=o||0,a[1]=i/t,n.push(a))}),this.set("tCache",n)}},r.prototype.getStartTangent=function(){var t=this.getSegments(),i;if(t.length>1){var n=t[0].currentPoint,a=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([n[0]-o[0],n[1]-o[1]]),i.push([n[0],n[1]])):(i.push([a[0],a[1]]),i.push([n[0],n[1]]))}return i},r.prototype.getEndTangent=function(){var t=this.getSegments(),i=t.length,n;if(i>1){var a=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;n=[],l?(n.push([o[0]-l[0],o[1]-l[1]]),n.push([o[0],o[1]])):(n.push([a[0],a[1]]),n.push([o[0],o[1]]))}return n},r}(Ia),JE=but;function nj(e,r,t,i,n){var a=e.length;if(a<2)return!1;for(var o=0;o=l[0]&&t<=l[1]&&(a=(t-l[0])/(l[1]-l[0]),o=s)}),Mr.pointAt(i[o][0],i[o][1],i[o+1][0],i[o+1][1],a)},r.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var i=this.getTotalLength();if(!(i<=0)){var n=0,a=[],o,l;P(t,function(s,u){t[u+1]&&(o=[],o[0]=n/i,l=Mr.length(s[0],s[1],t[u+1][0],t[u+1][1]),n+=l,o[1]=n/i,a.push(o))}),this.set("tCache",a)}}},r.prototype.getStartTangent=function(){var t=this.attr().points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i},r.prototype.getEndTangent=function(){var t=this.attr().points,i=t.length-1,n=[];return n.push([t[i-1][0],t[i-1][1]]),n.push([t[i][0],t[i][1]]),n},r}(Ia),Aut=Sut;function Tut(e,r,t,i,n,a,o){var l=n/2;return Au(e-l,r-l,t,n,a,o)||Au(e+t-l,r-l,n,i,a,o)||Au(e+l,r+i-l,t,n,a,o)||Au(e-l,r+l,n,i,a,o)}function Mut(e,r,t,i,n,a,o,l){return Xl(e+n,r,e+t-n,r,a,o,l)||Xl(e+t,r+n,e+t,r+i-n,a,o,l)||Xl(e+t-n,r+i,e+n,r+i,a,o,l)||Xl(e,r+i-n,e,r+n,a,o,l)||Uv(e+t-n,r+n,n,1.5*Math.PI,2*Math.PI,a,o,l)||Uv(e+t-n,r+i-n,n,0,.5*Math.PI,a,o,l)||Uv(e+n,r+i-n,n,.5*Math.PI,Math.PI,a,o,l)||Uv(e+n,r+n,n,Math.PI,1.5*Math.PI,a,o,l)}var Eut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,width:0,height:0,radius:0})},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr(),s=l.x,u=l.y,c=l.width,f=l.height,h=l.radius;if(h){var d=!1;return n&&(d=Mut(s,u,c,f,h,o,t,i)),!d&&a&&(d=rj(this,t,i)),d}else{var v=o/2;if(a&&n)return Au(s-v,u-v,c+v,f+v,t,i);if(a)return Au(s,u,c,f,t,i);if(n)return Tut(s,u,c,f,o,t,i)}},r.prototype.createPath=function(t){var i=this.attr(),n=i.x,a=i.y,o=i.width,l=i.height,s=i.radius;if(t.beginPath(),s===0)t.rect(n,a,o,l);else{var u=Qst(s),c=u[0],f=u[1],h=u[2],v=u[3];t.moveTo(n+c,a),t.lineTo(n+o-f,a),f!==0&&t.arc(n+o-f,a+f,f,-Math.PI/2,0),t.lineTo(n+o,a+l-h),h!==0&&t.arc(n+o-h,a+l-h,h,0,Math.PI/2),t.lineTo(n+v,a+l),v!==0&&t.arc(n+v,a+l-v,v,Math.PI/2,Math.PI),t.lineTo(n,a+c),c!==0&&t.arc(n+c,a+c,c,Math.PI,Math.PI*1.5),t.closePath()}},r}(Ia),Out=Eut,Fut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},r.prototype.isOnlyHitBox=function(){return!0},r.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},r.prototype._assembleFont=function(){var t=this.attrs;t.font=Mp(t)},r.prototype._setText=function(t){var i=null;Ct(t)&&t.indexOf(` `)!==-1&&(i=t.split(` `)),this.set("textArr",i)},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),t.startsWith("font")&&this._assembleFont(),t==="text"&&this._setText(i)},r.prototype._getSpaceingY=function(){var t=this.attrs,i=t.lineHeight,n=t.fontSize*1;return i?i-n:n*.14},r.prototype._drawTextArr=function(t,i,n){var a=this.attrs,o=a.textBaseline,l=a.x,s=a.y,u=a.fontSize*1,c=this._getSpaceingY(),f=Tp(a.text,a.fontSize,a.lineHeight),h;P(i,function(v,d){h=s+d*(c+u)-f+u,o==="middle"&&(h+=f-u-(f-u)/2),o==="top"&&(h+=f-u),K(v)||(n?t.fillText(v,l,h):t.strokeText(v,l,h))})},r.prototype._drawText=function(t,i){var n=this.attr(),a=n.x,o=n.y,l=this.get("textArr");if(l)this._drawTextArr(t,l,i);else{var s=n.text;K(s)||(i?t.fillText(s,a,o):t.strokeText(s,a,o))}},r.prototype.strokeAndFill=function(t){var i=this.attrs,n=i.lineWidth,a=i.opacity,o=i.strokeOpacity,l=i.fillOpacity;this.isStroke()&&n>0&&(!K(o)&&o!==1&&(t.globalAlpha=a),this.stroke(t)),this.isFill()&&(!K(l)&&l!==1?(t.globalAlpha=l,this.fill(t),t.globalAlpha=a):this.fill(t)),this.afterDrawPath(t)},r.prototype.fill=function(t){this._drawText(t,!0)},r.prototype.stroke=function(t){this._drawText(t,!1)},r}(Ia),Put=Fut;function Iut(e,r){if(r){var t=mp(r);return ro(t,e)}return e}function aj(e,r,t){var i=e.getTotalMatrix();if(i){var n=Iut([r,t,1],i),a=n[0],o=n[1];return[a,o]}return[r,t]}function O$(e,r,t){if(e.isCanvas&&e.isCanvas())return!0;if(!$f(e)||e.cfg.isInView===!1)return!1;if(e.cfg.clipShape){var i=aj(e,r,t),n=i[0],a=i[1];if(e.isClipped(n,a))return!1}var o=e.cfg.cacheCanvasBBox||e.getCanvasBBox();return r>=o.minX&&r<=o.maxX&&t>=o.minY&&t<=o.maxY}function oj(e,r,t){if(!O$(e,r,t))return null;for(var i=null,n=e.getChildren(),a=n.length,o=a-1;o>=0;o--){var l=n[o];if(l.isGroup())i=oj(l,r,t);else if(O$(l,r,t)){var s=l,u=aj(l,r,t),c=u[0],f=u[1];s.isInShape(c,f)&&(i=l)}if(i)break}return i}var lj=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.renderer="canvas",t.autoDraw=!0,t.localRefresh=!0,t.refreshElements=[],t.clipView=!0,t.quickHit=!1,t},r.prototype.onCanvasChange=function(t){(t==="attr"||t==="sort"||t==="changeSize")&&(this.set("refreshElements",[this]),this.draw())},r.prototype.getShapeBase=function(){return Xx},r.prototype.getGroupBase=function(){return KE},r.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||Vst();return t>=1?Math.ceil(t):1},r.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},r.prototype.createDom=function(){var t=document.createElement("canvas"),i=t.getContext("2d");return this.set("context",i),t},r.prototype.setDOMSize=function(t,i){e.prototype.setDOMSize.call(this,t,i);var n=this.get("context"),a=this.get("el"),o=this.getPixelRatio();a.width=o*t,a.height=o*i,o>1&&n.scale(o,o)},r.prototype.clear=function(){e.prototype.clear.call(this),this._clearFrame();var t=this.get("context"),i=this.get("el");t.clearRect(0,0,i.width,i.height)},r.prototype.getShape=function(t,i){var n;return this.get("quickHit")?n=oj(this,t,i):n=e.prototype.getShape.call(this,t,i,null),n},r.prototype._getRefreshRegion=function(){var t=this.get("refreshElements"),i=this.getViewRange(),n;if(t.length&&t[0]===this)n=i;else if(n=eut(t),n){n.minX=Math.floor(n.minX),n.minY=Math.floor(n.minY),n.maxX=Math.ceil(n.maxX),n.maxY=Math.ceil(n.maxY),n.maxY+=1;var a=this.get("clipView");a&&(n=rut(n,i))}return n},r.prototype.refreshElement=function(t){var i=this.get("refreshElements");i.push(t)},r.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(rz(t),this.set("drawFrame",null),this.set("refreshElements",[]))},r.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},r.prototype._drawAll=function(){var t=this.get("context"),i=this.get("el"),n=this.getChildren();t.clearRect(0,0,i.width,i.height),Wf(t,this),KA(t,n),this.set("refreshElements",[])},r.prototype._drawRegion=function(){var t=this.get("context"),i=this.get("refreshElements"),n=this.getChildren(),a=this._getRefreshRegion();a?(t.clearRect(a.minX,a.minY,a.maxX-a.minX,a.maxY-a.minY),t.save(),t.beginPath(),t.rect(a.minX,a.minY,a.maxX-a.minX,a.maxY-a.minY),t.clip(),Wf(t,this),Kst(this,n,a),KA(t,n,a),t.restore()):i.length&&J3(i),P(i,function(o){o.get("hasChanged")&&o.set("hasChanged",!1)}),this.set("refreshElements",[])},r.prototype._startDraw=function(){var t=this,i=this.get("drawFrame");i||(i=ez(function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)}),this.set("drawFrame",i))},r.prototype.skipDraw=function(){},r.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},r}(_p),Lut="0.5.12",sj=Object.freeze(Object.defineProperty({__proto__:null,Shape:Xx,version:Lut,Canvas:lj,Group:KE,getArcParams:ox,Event:bh,Base:yp,AbstractCanvas:_p,AbstractGroup:bp,AbstractShape:wp,getBBoxMethod:Cp,registerBBox:wn,getTextHeight:Tp,assembleFont:Mp,isAllowCapture:$f,multiplyVec2:ro,invert:mp,getOffScreenContext:Ap,registerEasing:MM,PathUtil:a1},Symbol.toStringTag,{value:"Module"})),uj=_r(sj);Object.defineProperty(X1,"__esModule",{value:!0});var cj=X1.sectorPathUpdate=void 0,pm=j,Dut=uj,Tu=Y,F$=Se;function P$(e,r){var t,i=(0,Dut.getArcParams)(e,r),n=i.startAngle,a=i.endAngle;return!(0,Tu.isNumberEqual)(n,-Math.PI*.5)&&n<-Math.PI*.5&&(n+=Math.PI*2),!(0,Tu.isNumberEqual)(a,-Math.PI*.5)&&a<-Math.PI*.5&&(a+=Math.PI*2),r[5]===0&&(t=[a,n],n=t[0],a=t[1]),(0,Tu.isNumberEqual)(n,Math.PI*1.5)&&(n=Math.PI*-.5),(0,Tu.isNumberEqual)(a,Math.PI*-.5)&&(a=Math.PI*1.5),{startAngle:n,endAngle:a}}function I$(e){var r;return e[0]==="M"||e[0]==="L"?r=[e[1],e[2]]:(e[0]==="a"||e[0]==="A"||e[0]==="C")&&(r=[e[e.length-2],e[e.length-1]]),r}function L$(e){var r,t,i,n=e.filter(function(b){return b[0]==="A"||b[0]==="a"});if(n.length===0)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var a=n[0],o=n.length>1?n[1]:n[0],l=e.indexOf(a),s=e.indexOf(o),u=I$(e[l-1]),c=I$(e[s-1]),f=P$(u,a),h=f.startAngle,v=f.endAngle,d=P$(c,o),p=d.startAngle,x=d.endAngle;(0,Tu.isNumberEqual)(h,p)&&(0,Tu.isNumberEqual)(v,x)?(t=h,i=v):(t=Math.min(h,p),i=Math.max(v,x));var m=a[1],_=n[n.length-1][1];return m<_?(r=[_,m],m=r[0],_=r[1]):m===_&&(_=0),{startAngle:t,endAngle:i,radius:m,innerRadius:_}}function $ut(e,r,t){var i=t.toAttrs,n=t.coordinate,a=i.path||[],o=a.map(function(_){return _[0]});if(!(a.length<1)){var l=L$(a),s=l.startAngle,u=l.endAngle,c=l.radius,f=l.innerRadius,h=L$(e.attr("path")),v=h.startAngle,d=h.endAngle,p=n.getCenter(),x=s-v,m=u-d;if(x===0&&m===0){e.attr("path",a);return}e.animate(function(_){var b=v+_*x,w=d+_*m;return(0,pm.__assign)((0,pm.__assign)({},i),{path:(0,Tu.isEqual)(o,["M","A","A","Z"])?(0,F$.getArcPath)(p.x,p.y,c,b,w):(0,F$.getSectorPath)(p.x,p.y,c,b,w,f)})},(0,pm.__assign)((0,pm.__assign)({},r),{callback:function(){e.attr("path",a)}}))}}cj=X1.sectorPathUpdate=$ut;var U1={};Object.defineProperty(U1,"__esModule",{value:!0});var fj=U1.waveIn=void 0,D$=j,kut=be;function Rut(e,r,t){var i=(0,kut.getCoordinateClipCfg)(t.coordinate,20),n=i.type,a=i.startState,o=i.endState,l=e.setClip({type:n,attrs:a});l.animate(o,(0,D$.__assign)((0,D$.__assign)({},r),{callback:function(){e&&!e.get("destroyed")&&e.set("clipShape",null),l.remove(!0)}}))}fj=U1.waveIn=Rut;var Xf={};Object.defineProperty(Xf,"__esModule",{value:!0});var hj=Xf.zoomOut=vj=Xf.zoomIn=void 0,$$=j,UC=ta,But=Y;function tO(e,r,t){if(e.isGroup())(0,But.each)(e.getChildren(),function(l){tO(l,r,t)});else{var i=e.getBBox(),n=(i.minX+i.maxX)/2,a=(i.minY+i.maxY)/2;if(e.applyToMatrix([n,a,1]),t==="zoomIn"){var o=UC.ext.transform(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]]);e.setMatrix(o),e.animate({matrix:UC.ext.transform(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])},r)}else e.animate({matrix:UC.ext.transform(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]])},(0,$$.__assign)((0,$$.__assign)({},r),{callback:function(){e.remove(!0)}}))}}function Nut(e,r,t){tO(e,r,"zoomIn")}var vj=Xf.zoomIn=Nut;function Gut(e,r,t){tO(e,r,"zoomOut")}hj=Xf.zoomOut=Gut;ut.registerAnimation("fade-in",G3);ut.registerAnimation("fade-out",N3);ut.registerAnimation("grow-in-x",j3);ut.registerAnimation("grow-in-xy",V3);ut.registerAnimation("grow-in-y",H3);ut.registerAnimation("scale-in-x",X3);ut.registerAnimation("scale-in-y",W3);ut.registerAnimation("wave-in",fj);ut.registerAnimation("zoom-in",vj);ut.registerAnimation("zoom-out",hj);ut.registerAnimation("position-update",Y3);ut.registerAnimation("sector-path-update",cj);ut.registerAnimation("path-in",XE);var eO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.antvDark=e.createDarkStyleSheet=void 0;var r={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},t={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},i=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],n=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],a=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],o=function(l){l===void 0&&(l={});var s=l.backgroundColor,u=s===void 0?"#141414":s,c=l.subColor,f=c===void 0?"rgba(255,255,255,0.05)":c,h=l.paletteQualitative10,v=h===void 0?i:h,d=l.paletteQualitative20,p=d===void 0?n:d,x=l.paletteSemanticRed,m=x===void 0?"#F4664A":x,_=l.paletteSemanticGreen,b=_===void 0?"#30BF78":_,w=l.paletteSemanticYellow,S=w===void 0?"#FAAD14":w,M=l.paletteSequence,O=M===void 0?a:M,F=l.fontFamily,L=F===void 0?`"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`:F,D=l.brandColor,R=D===void 0?v[0]:D;return{backgroundColor:u,brandColor:R,subColor:f,paletteQualitative10:v,paletteQualitative20:p,paletteSemanticRed:m,paletteSemanticGreen:b,paletteSemanticYellow:S,paletteSequence:O,fontFamily:L,axisLineBorderColor:t[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:t[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisTickLineBorderColor:t[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:t[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:t[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:t[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:t[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:i[0],legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:t[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendSpacing:16,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:t[45],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:t[45],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:t[65],legendPageNavigatorTextFontSize:12,sliderRailFillColor:t[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:t[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:r[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:r[25],annotationArcBorderColor:t[15],annotationArcBorder:1,annotationLineBorderColor:t[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:t[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:t[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:t[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:t[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:t[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:r[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:t[65],overflowLabelFillColorDark:"#2c3542",overflowLabelFillColorLight:"#ffffff",overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:r[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:t[25],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:"#fff",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(255,255,255,0.65)",scrollbarThumbFillColor:"rgba(0,0,0,0.35)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.45)",pointFillColor:i[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:r[100],pointBorderOpacity:1,pointActiveBorderColor:t[100],pointSelectedBorder:2,pointSelectedBorderColor:t[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:i[0],hollowPointBorderOpacity:.95,hollowPointFillColor:r[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:t[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:t[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:i[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:i[0],areaFillOpacity:.25,areaActiveFillColor:i[0],areaActiveFillOpacity:.5,areaSelectedFillColor:i[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:i[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:t[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:t[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:i[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:t[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:t[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:i[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:r[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:t[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:t[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}};e.createDarkStyleSheet=o,e.antvDark=(0,e.createDarkStyleSheet)()})(eO);$1("dark",L1(eO.antvDark));$1("default",L1(D1.antvLight));$1("light",L1(D1.antvLight));var zut=function(e,r){return e===void 0&&(e=[]),r===void 0&&(r=[]),e.length!==r.length||e.some(function(t,i){return!Object.is(t,r[i])})},k$={error:null},Vut=function(e){h8(r,e);function r(){for(var i,n=arguments.length,a=new Array(n),o=0;or)t.insertBefore(e,n);else if(a0&&(i?"stroke"in n?this._setColor(t,"stroke",l):"strokeStyle"in n&&this._setColor(t,"stroke",s):this._setColor(t,"stroke",l||s),c&&h.setAttribute(ee.strokeOpacity,c),f&&h.setAttribute(ee.lineWidth,f))},r.prototype._setColor=function(t,i,n){var a=this.get("el");if(!n){a.setAttribute(ee[i],"none");return}if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var o=t.find("gradient",n);o||(o=t.addGradient(n)),a.setAttribute(ee[i],"url(#"+o+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var o=t.find("pattern",n);o||(o=t.addPattern(n)),a.setAttribute(ee[i],"url(#"+o+")")}else a.setAttribute(ee[i],n)},r.prototype.shadow=function(t,i){var n=this.attr(),a=i||n,o=a.shadowOffsetX,l=a.shadowOffsetY,s=a.shadowBlur,u=a.shadowColor;(o||l||s||u)&&ict(this,t)},r.prototype.transform=function(t){var i=this.attr(),n=(t||i).matrix;n&&Up(this)},r.prototype.isInShape=function(t,i){return this.isPointInPath(t,i)},r.prototype.isPointInPath=function(t,i){var n=this.get("el"),a=this.get("canvas"),o=a.get("el").getBoundingClientRect(),l=t+o.left,s=i+o.top,u=document.elementFromPoint(l,s);return!!(u&&u.isEqualNode(n))},r.prototype.getHitLineWidth=function(){var t=this.attrs,i=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?i+n:0},r}(wp),ea=nct,act=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="circle",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,r:0})},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");P(i||n,function(o,l){l==="x"||l==="y"?a.setAttribute("c"+l,o):ee[l]&&a.setAttribute(ee[l],o)})},r}(ea),oct=act,lct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dom",t.canFill=!1,t.canStroke=!1,t}return r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");if(P(i||n,function(u,c){ee[c]&&a.setAttribute(ee[c],u)}),typeof n.html=="function"){var o=n.html.call(this,n);if(o instanceof Element||o instanceof HTMLDocument){for(var l=a.childNodes,s=l.length-1;s>=0;s--)a.removeChild(l[s]);a.appendChild(o)}else a.innerHTML=o}else a.innerHTML=n.html},r}(ea),sct=lct,uct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ellipse",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,rx:0,ry:0})},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");P(i||n,function(o,l){l==="x"||l==="y"?a.setAttribute("c"+l,o):ee[l]&&a.setAttribute(ee[l],o)})},r}(ea),cct=uct,fct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="image",t.canFill=!1,t.canStroke=!1,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,width:0,height:0})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el");P(i||a,function(l,s){s==="img"?n._setImage(a.img):ee[s]&&o.setAttribute(ee[s],l)})},r.prototype.setAttr=function(t,i){this.attrs[t]=i,t==="img"&&this._setImage(i)},r.prototype._setImage=function(t){var i=this.attr(),n=this.get("el");if(Ct(t))n.setAttribute("href",t);else if(t instanceof window.Image)i.width||(n.setAttribute("width",t.width),this.attr("width",t.width)),i.height||(n.setAttribute("height",t.height),this.attr("height",t.height)),n.setAttribute("href",t.src);else if(t instanceof HTMLElement&&Ct(t.nodeName)&&t.nodeName.toUpperCase()==="CANVAS")n.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width",""+t.width),a.setAttribute("height",""+t.height),a.getContext("2d").putImageData(t,0,0),i.width||(n.setAttribute("width",""+t.width),this.attr("width",t.width)),i.height||(n.setAttribute("height",""+t.height),this.attr("height",t.height)),n.setAttribute("href",a.toDataURL())}},r}(ea),hct=fct,vct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t.canFill=!1,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");P(i||n,function(o,l){if(l==="startArrow"||l==="endArrow")if(o){var s=qt(o)?t.addArrow(n,ee[l]):t.getDefaultArrow(n,ee[l]);a.setAttribute(ee[l],"url(#"+s+")")}else a.removeAttribute(ee[l]);else ee[l]&&a.setAttribute(ee[l],o)})},r.prototype.getTotalLength=function(){var t=this.attr(),i=t.x1,n=t.y1,a=t.x2,o=t.y2;return Mr.length(i,n,a,o)},r.prototype.getPoint=function(t){var i=this.attr(),n=i.x1,a=i.y1,o=i.x2,l=i.y2;return Mr.pointAt(n,a,o,l,t)},r}(ea),dct=vct,gm={circle:function(e,r,t){return[["M",e,r],["m",-t,0],["a",t,t,0,1,0,t*2,0],["a",t,t,0,1,0,-t*2,0]]},square:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r-t],["L",e+t,r+t],["L",e-t,r+t],["Z"]]},diamond:function(e,r,t){return[["M",e-t,r],["L",e,r-t],["L",e+t,r],["L",e,r+t],["Z"]]},triangle:function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r+i],["L",e,r-i],["L",e+t,r+i],["z"]]},triangleDown:function(e,r,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r-i],["L",e+t,r-i],["L",e,r+i],["Z"]]}},R$={get:function(e){return gm[e]},register:function(e,r){gm[e]=r},remove:function(e){delete gm[e]},getAll:function(){return gm}},pct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="marker",t.canFill=!0,t.canStroke=!0,t}return r.prototype.createPath=function(t){var i=this.get("el");i.setAttribute("d",this._assembleMarker())},r.prototype._assembleMarker=function(){var t=this._getPath();return it(t)?t.map(function(i){return i.join(" ")}).join(""):t},r.prototype._getPath=function(){var t=this.attr(),i=t.x,n=t.y,a=t.r||t.radius,o=t.symbol||"circle",l;return pt(o)?l=o:l=R$.get(o),l?l(i,n,a):(console.warn(l+" symbol is not exist."),null)},r.symbolsFactory=R$,r}(ea),gct=pct,yct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="path",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{startArrow:!1,endArrow:!1})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el");P(i||a,function(l,s){if(s==="path"&&it(l))o.setAttribute("d",n._formatPath(l));else if(s==="startArrow"||s==="endArrow")if(l){var u=qt(l)?t.addArrow(a,ee[s]):t.getDefaultArrow(a,ee[s]);o.setAttribute(ee[s],"url(#"+u+")")}else o.removeAttribute(ee[s]);else ee[s]&&o.setAttribute(ee[s],l)})},r.prototype._formatPath=function(t){var i=t.map(function(n){return n.join(" ")}).join("");return~i.indexOf("NaN")?"":i},r.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},r.prototype.getPoint=function(t){var i=this.get("el"),n=this.getTotalLength();if(n===0)return null;var a=i?i.getPointAtLength(t*n):null;return a?{x:a.x,y:a.y}:null},r}(ea),mct=yct,xct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polygon",t.canFill=!0,t.canStroke=!0,t}return r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");P(i||n,function(o,l){l==="points"&&it(o)&&o.length>=2?a.setAttribute("points",o.map(function(s){return s[0]+","+s[1]}).join(" ")):ee[l]&&a.setAttribute(ee[l],o)})},r}(ea),_ct=xct,bct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polyline",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{startArrow:!1,endArrow:!1})},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),["points"].indexOf(t)!==-1&&this._resetCache()},r.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");P(i||n,function(o,l){l==="points"&&it(o)&&o.length>=2?a.setAttribute("points",o.map(function(s){return s[0]+","+s[1]}).join(" ")):ee[l]&&a.setAttribute(ee[l],o)})},r.prototype.getTotalLength=function(){var t=this.attr().points,i=this.get("totalLength");return K(i)?(this.set("totalLength",u1.length(t)),this.get("totalLength")):i},r.prototype.getPoint=function(t){var i=this.attr().points,n=this.get("tCache");n||(this._setTcache(),n=this.get("tCache"));var a,o;return P(n,function(l,s){t>=l[0]&&t<=l[1]&&(a=(t-l[0])/(l[1]-l[0]),o=s)}),Mr.pointAt(i[o][0],i[o][1],i[o+1][0],i[o+1][1],a)},r.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var i=this.getTotalLength();if(!(i<=0)){var n=0,a=[],o,l;P(t,function(s,u){t[u+1]&&(o=[],o[0]=n/i,l=Mr.length(s[0],s[1],t[u+1][0],t[u+1][1]),n+=l,o[1]=n/i,a.push(o))}),this.set("tCache",a)}}},r.prototype.getStartTangent=function(){var t=this.attr().points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i},r.prototype.getEndTangent=function(){var t=this.attr().points,i=t.length-1,n=[];return n.push([t[i-1][0],t[i-1][1]]),n.push([t[i][0],t[i][1]]),n},r}(ea),wct=bct;function Cct(e){var r=0,t=0,i=0,n=0;return it(e)?e.length===1?r=t=i=n=e[0]:e.length===2?(r=i=e[0],t=n=e[1]):e.length===3?(r=e[0],t=n=e[1],i=e[2]):(r=e[0],t=e[1],i=e[2],n=e[3]):r=t=i=n=e,{r1:r,r2:t,r3:i,r4:n}}var Sct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rect",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,width:0,height:0,radius:0})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el"),l=!1,s=["x","y","width","height","radius"];P(i||a,function(u,c){s.indexOf(c)!==-1&&!l?(o.setAttribute("d",n._assembleRect(a)),l=!0):s.indexOf(c)===-1&&ee[c]&&o.setAttribute(ee[c],u)})},r.prototype._assembleRect=function(t){var i=t.x,n=t.y,a=t.width,o=t.height,l=t.radius;if(!l)return"M "+i+","+n+" l "+a+",0 l 0,"+o+" l"+-a+" 0 z";var s=Cct(l);it(l)?l.length===1?s.r1=s.r2=s.r3=s.r4=l[0]:l.length===2?(s.r1=s.r3=l[0],s.r2=s.r4=l[1]):l.length===3?(s.r1=l[0],s.r2=s.r4=l[1],s.r3=l[2]):(s.r1=l[0],s.r2=l[1],s.r3=l[2],s.r4=l[3]):s.r1=s.r2=s.r3=s.r4=l;var u=[["M "+(i+s.r1)+","+n],["l "+(a-s.r1-s.r2)+",0"],["a "+s.r2+","+s.r2+",0,0,1,"+s.r2+","+s.r2],["l 0,"+(o-s.r2-s.r3)],["a "+s.r3+","+s.r3+",0,0,1,"+-s.r3+","+s.r3],["l "+(s.r3+s.r4-a)+",0"],["a "+s.r4+","+s.r4+",0,0,1,"+-s.r4+","+-s.r4],["l 0,"+(s.r4+s.r1-o)],["a "+s.r1+","+s.r1+",0,0,1,"+s.r1+","+-s.r1],["z"]];return u.join(" ")},r}(ea),Act=Sct,B$=.3,Tct={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},Mct={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},Ect={left:"left",start:"left",center:"middle",right:"end",end:"end"},Oct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="text",t.canFill=!0,t.canStroke=!0,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return A(A({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},r.prototype.createPath=function(t,i){var n=this,a=this.attr(),o=this.get("el");this._setFont(),P(i||a,function(l,s){s==="text"?n._setText(""+l):s==="matrix"&&l?Up(n):ee[s]&&o.setAttribute(ee[s],l)}),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},r.prototype._setFont=function(){var t=this.get("el"),i=this.attr(),n=i.textBaseline,a=i.textAlign,o=gM();o&&o.name==="firefox"?t.setAttribute("dominant-baseline",Mct[n]||"alphabetic"):t.setAttribute("alignment-baseline",Tct[n]||"baseline"),t.setAttribute("text-anchor",Ect[a]||"left")},r.prototype._setText=function(t){var i=this.get("el"),n=this.attr(),a=n.x,o=n.textBaseline,l=o===void 0?"bottom":o;if(!t)i.innerHTML="";else if(~t.indexOf(` `)){var s=t.split(` `),u=s.length-1,c="";P(s,function(f,h){h===0?l==="alphabetic"?c+=''+f+"":l==="top"?c+=''+f+"":l==="middle"?c+=''+f+"":l==="bottom"?c+=''+f+"":l==="hanging"&&(c+=''+f+""):c+=''+f+""}),i.innerHTML=c}else i.innerHTML=t},r}(ea),Fct=Oct,Pct=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Ict=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Lct=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function _j(e){var r=e.match(Lct);if(!r)return"";var t="";return r.sort(function(i,n){return i=i.split(":"),n=n.split(":"),Number(i[0])-Number(n[0])}),P(r,function(i){i=i.split(":"),t+=''}),t}function Dct(e,r){var t=Pct.exec(e),i=Qx(Kx(parseFloat(t[1])),Math.PI*2),n=t[2],a,o;i>=0&&i<.5*Math.PI?(a={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=i&&i`;t.innerHTML=i},e}(),N$=function(){function e(r,t){this.cfg={};var i=qn("marker"),n=Fa("marker_");i.setAttribute("id",n);var a=qn("path");a.setAttribute("stroke",r.stroke||"none"),a.setAttribute("fill",r.fill||"none"),i.appendChild(a),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=a,this.id=n;var o=r[t==="marker-start"?"startArrow":"endArrow"];return this.stroke=r.stroke||"#000",o===!0?this._setDefaultPath(t,a):(this.cfg=o,this._setMarker(r.lineWidth,a)),this}return e.prototype.match=function(){return!1},e.prototype._setDefaultPath=function(r,t){var i=this.el;t.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),i.setAttribute("refX",""+10*Math.cos(Math.PI/6)),i.setAttribute("refY",""+5)},e.prototype._setMarker=function(r,t){var i=this.el,n=this.cfg.path,a=this.cfg.d;it(n)&&(n=n.map(function(o){return o.join(" ")}).join("")),t.setAttribute("d",n),i.appendChild(t),a&&i.setAttribute("refX",""+a/r)},e.prototype.update=function(r){var t=this.child;t.attr?t.attr("fill",r):t.setAttribute("fill",r)},e}(),Gct=function(){function e(r){this.type="clip",this.cfg={};var t=qn("clipPath");this.el=t,this.id=Fa("clip_"),t.id=this.id;var i=r.cfg.el;return t.appendChild(i),this.cfg=r,this}return e.prototype.match=function(){return!1},e.prototype.remove=function(){var r=this.el;r.parentNode.removeChild(r)},e}(),zct=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Vct=function(){function e(r){this.cfg={};var t=qn("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var i=qn("image");t.appendChild(i);var n=Fa("pattern_");t.id=n,this.el=t,this.id=n,this.cfg=r;var a=zct.exec(r),o=a[2];i.setAttribute("href",o);var l=new Image;o.match(/^data:/i)||(l.crossOrigin="Anonymous"),l.src=o;function s(){t.setAttribute("width",""+l.width),t.setAttribute("height",""+l.height)}return l.complete?s():(l.onload=s,l.src=l.src),this}return e.prototype.match=function(r,t){return this.cfg===t},e}(),jct=function(){function e(r){var t=qn("defs"),i=Fa("defs_");t.id=i,r.appendChild(t),this.children=[],this.defaultArrow={},this.el=t,this.canvas=r}return e.prototype.find=function(r,t){for(var i=this.children,n=null,a=0;a0&&(v[0][0]="L")),a=a.concat(v)}),a.push(["Z"])}return a}function xft(e,r,t,i,n){for(var a=(0,yft.getStyle)(e,r,!r,"lineWidth"),o=e.connectNulls,l=e.isInCircle,s=e.points,u=e.showSinglePoint,c=(0,gft.getPathPoints)(s,o,u),f=[],h=0,v=c.length;ho&&(o=s),s=i[0]}));for(var d=this.scales[h],p=0,x=t;pr&&(t=t?r/(1+i/t):0,i=r-t),n+a>r&&(n=n?r/(1+a/n):0,a=r-n),[t||0,i||0,n||0,a||0]}pr.parseRadius=pf;function Gft(e,r,t){var i=[];if(t.isRect){var n=t.isTransposed?{x:t.start.x,y:r[0].y}:{x:r[0].x,y:t.start.y},a=t.isTransposed?{x:t.end.x,y:r[2].y}:{x:r[3].x,y:t.end.y},o=(0,Ud.get)(e,["background","style","radius"]);if(o){var l=t.isTransposed?Math.abs(r[0].y-r[2].y):r[2].x-r[1].x,s=t.isTransposed?t.getWidth():t.getHeight(),u=pf(o,Math.min(l,s)),c=u[0],f=u[1],h=u[2],v=u[3];i.push(["M",n.x,a.y+c]),c!==0&&i.push(["A",c,c,0,0,1,n.x+c,a.y]),i.push(["L",a.x-f,a.y]),f!==0&&i.push(["A",f,f,0,0,1,a.x,a.y+f]),i.push(["L",a.x,n.y-h]),h!==0&&i.push(["A",h,h,0,0,1,a.x-h,n.y]),i.push(["L",n.x+v,n.y]),v!==0&&i.push(["A",v,v,0,0,1,n.x,n.y-v])}else i.push(["M",n.x,n.y]),i.push(["L",a.x,n.y]),i.push(["L",a.x,a.y]),i.push(["L",n.x,a.y]),i.push(["L",n.x,n.y]);i.push(["z"])}if(t.isPolar){var d=t.getCenter(),p=(0,ZC.getAngle)(e,t),x=p.startAngle,m=p.endAngle;if(t.type!=="theta"&&!t.isTransposed)i=(0,ZC.getSectorPath)(d.x,d.y,t.getRadius(),x,m);else{var _=function(S){return Math.pow(S,2)},c=Math.sqrt(_(d.x-r[0].x)+_(d.y-r[0].y)),f=Math.sqrt(_(d.x-r[2].x)+_(d.y-r[2].y));i=(0,ZC.getSectorPath)(d.x,d.y,c,t.startAngle,t.endAngle,f)}}return i}pr.getBackgroundRectPath=Gft;function zft(e,r,t){var i=t.getWidth(),n=t.getHeight(),a=t.type==="rect",o=[],l=(e[2].x-e[1].x)/2,s=t.isTransposed?l*n/i:l*i/n;return r==="round"?(a?(o.push(["M",e[0].x,e[0].y+s]),o.push(["L",e[1].x,e[1].y-s]),o.push(["A",l,l,0,0,1,e[2].x,e[2].y-s]),o.push(["L",e[3].x,e[3].y+s]),o.push(["A",l,l,0,0,1,e[0].x,e[0].y+s])):(o.push(["M",e[0].x,e[0].y]),o.push(["L",e[1].x,e[1].y]),o.push(["A",l,l,0,0,1,e[2].x,e[2].y]),o.push(["L",e[3].x,e[3].y]),o.push(["A",l,l,0,0,1,e[0].x,e[0].y])),o.push(["z"])):o=Dj(e),o}pr.getIntervalRectPath=zft;function Vft(e,r,t){var i=[];return(0,Ud.isNil)(r)?t?i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",(e[2].x+e[3].x)/2,(e[2].y+e[3].y)/2],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",e[2].x,e[2].y],["L",e[3].x,e[3].y],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",r[1].x,r[1].y],["L",r[0].x,r[0].y],["Z"]),i}pr.getFunnelPath=Vft;function jft(e,r,t){var i,n,a,o,l=e[0],s=e[1],u=e[2],c=e[3],f=[0,0,0,0],h=f[0],v=f[1],d=f[2],p=f[3];l.ye[1].x?(c=e[0],l=e[1],s=e[2],u=e[3],a=pf(t,Math.min(c.x-l.x,l.y-s.y)),h=a[0],p=a[1],d=a[2],v=a[3]):(o=pf(t,Math.min(c.x-l.x,l.y-s.y)),v=o[0],d=o[1],p=o[2],h=o[3]));var x=[];return x.push(["M",s.x,s.y+h]),h!==0&&x.push(["A",h,h,0,0,1,s.x+h,s.y]),x.push(["L",u.x-v,u.y]),v!==0&&x.push(["A",v,v,0,0,1,u.x,u.y+v]),x.push(["L",c.x,c.y-d]),d!==0&&x.push(["A",d,d,0,0,1,c.x-d,c.y]),x.push(["L",l.x+p,l.y]),p!==0&&x.push(["A",p,p,0,0,1,l.x,l.y-p]),x.push(["L",s.x,s.y+h]),x.push(["z"]),x}pr.getRectWithCornerRadius=jft;Object.defineProperty(Lj,"__esModule",{value:!0});var mm=j,$j=re,Hft=Oh,U$=ke,y0=pr,Yft=(0,$j.registerShapeFactory)("interval",{defaultShapeType:"rect",getDefaultPoints:function(e){return(0,y0.getRectPoints)(e)}});(0,$j.registerShape)("interval","rect",{draw:function(e,r){var t=(0,U$.getStyle)(e,!1,!0),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=(0,U$.getBackgroundRectStyle)(e),o=(0,y0.getBackgroundRectPath)(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:(0,mm.__assign)((0,mm.__assign)({},a),{path:o}),zIndex:-1,name:Hft.BACKGROUND_SHAPE})}var l;t.radius&&this.coordinate.isRect?l=(0,y0.getRectWithCornerRadius)(this.parsePoints(e.points),this.coordinate,t.radius):l=this.parsePath((0,y0.getIntervalRectPath)(e.points,t.lineCap,this.coordinate));var s=i.addShape("path",{attrs:(0,mm.__assign)((0,mm.__assign)({},t),{path:l}),name:"interval"});return n?i:s},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,fill:r}}:{symbol:"square",style:{r:4,fill:r}}}});Lj.default=Yft;var Ih={};Object.defineProperty(Ih,"__esModule",{value:!0});Ih.getDefaultSize=void 0;var Vl=Y,Wft=be;function Xft(e,r){var t=e.length,i=e;(0,Vl.isString)(i[0])&&(i=e.map(function(l){return r.translate(l)}));for(var n=i[1]-i[0],a=2;ao&&(n=o)}return n}function Uft(e,r){if(r){var t=(0,Vl.flatten)(e),i=(0,Vl.valuesOfKey)(t,r);return i.length}return e.length}function qft(e){var r=e.theme,t=e.coordinate,i=e.getXScale(),n=i.values,a=e.beforeMappingData,o=n.length,l=(0,Wft.getXDimensionLength)(e.coordinate),s=e.intervalPadding,u=e.dodgePadding,c=e.maxColumnWidth||r.maxColumnWidth,f=e.minColumnWidth||r.minColumnWidth,h=e.columnWidthRatio||r.columnWidthRatio,v=e.multiplePieWidthRatio||r.multiplePieWidthRatio,d=e.roseWidthRatio||r.roseWidthRatio;if(i.isLinear&&n.length>1){n.sort();var p=Xft(n,i);o=(i.max-i.min)/p,n.length>o&&(o=n.length)}var x=i.range,m=1/o,_=1;if(t.isPolar?t.isTransposed&&o>1?_=v:_=d:(i.isLinear&&(m*=x[1]-x[0]),_=h),!(0,Vl.isNil)(s)&&s>=0){var b=s/l;m=(1-(o-1)*b)/o}else m*=_;if(e.getAdjust("dodge")){var w=e.getAdjust("dodge"),S=w.dodgeBy,M=Uft(a,S);if(!(0,Vl.isNil)(u)&&u>=0){var O=u/l;m=(m-O*(M-1))/M}else!(0,Vl.isNil)(s)&&s>=0&&(m*=_),m=m/M;m=m>=0?m:0}if(!(0,Vl.isNil)(c)&&c>=0){var F=c/l;m>F&&(m=F)}if(!(0,Vl.isNil)(f)&&f>=0){var L=f/l;m0&&!(0,q$.get)(i,[n,"min"])&&t.change({min:0}),o<=0&&!(0,q$.get)(i,[n,"max"])&&t.change({max:0}))}},r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return i.background=this.background,i},r}(Qft.default),eht=uO.default=tht,cO={};Object.defineProperty(cO,"__esModule",{value:!0});var Rj=j,rht=(0,Rj.__importDefault)(qp),iht=function(e){(0,Rj.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="line";var n=t.sortable,a=n===void 0?!1:n;return i.sortable=a,i}return r}(rht.default),nht=cO.default=iht,fO={},Bj={},uo={};Object.defineProperty(uo,"__esModule",{value:!0});uo.drawPoints=uo.HOLLOW_SHAPES=uo.SHAPES=void 0;var Bc=j,Z$=Ps,aht=ke;uo.SHAPES=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"];uo.HOLLOW_SHAPES=["cross","tick","plus","hyphen","line"];function oht(e,r,t,i,n){var a=(0,aht.getStyle)(r,n,!n,"r"),o=e.parsePoints(r.points),l=o[0];if(r.isStack)l=o[1];else if(o.length>1){for(var s=t.addGroup(),u=0,c=o;u2?"weight":"normal",a;if(e.isInCircle){var o={x:0,y:1};return n==="normal"?a=Xht(i[0],i[1],o):(t.fill=t.stroke,a=Uht(i,o)),a=this.parsePath(a),r.addShape("path",{attrs:(0,Nc.__assign)((0,Nc.__assign)({},t),{path:a})})}else{if(n==="normal")return i=this.parsePoints(i),a=(0,Hht.getArcPath)((i[1].x+i[0].x)/2,i[0].y,Math.abs(i[1].x-i[0].x)/2,Math.PI,Math.PI*2),r.addShape("path",{attrs:(0,Nc.__assign)((0,Nc.__assign)({},t),{path:a})});var l=(0,qd.getCPath)(i[1],i[3]),s=(0,qd.getCPath)(i[2],i[0]);return a=[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],l,["L",i[3].x,i[3].y],["L",i[2].x,i[2].y],s,["Z"]],a=this.parsePath(a),t.fill=t.stroke,r.addShape("path",{attrs:(0,Nc.__assign)((0,Nc.__assign)({},t),{path:a})})}},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var rk=j,qht=re,Zht=ke,Qht=Ku;function Kht(e,r){var t=(0,Qht.getCPath)(e,r),i=[["M",e.x,e.y]];return i.push(t),i}(0,qht.registerShape)("edge","smooth",{draw:function(e,r){var t=(0,Zht.getStyle)(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(Kht(i[0],i[1]));return r.addShape("path",{attrs:(0,rk.__assign)((0,rk.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var ik=j,Jht=Y,tvt=re,evt=ke,_m=1/3;function rvt(e,r){var t=[];t.push({x:e.x,y:e.y*(1-_m)+r.y*_m}),t.push({x:r.x,y:e.y*(1-_m)+r.y*_m}),t.push(r);var i=[["M",e.x,e.y]];return(0,Jht.each)(t,function(n){i.push(["L",n.x,n.y])}),i}(0,tvt.registerShape)("edge","vhv",{draw:function(e,r){var t=(0,evt.getStyle)(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(rvt(i[0],i[1]));return r.addShape("path",{attrs:(0,ik.__assign)((0,ik.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var nk=j,ivt=re,nvt=ke,ak=pr;(0,ivt.registerShape)("interval","funnel",{getPoints:function(e){return e.size=e.size*2,(0,ak.getRectPoints)(e)},draw:function(e,r){var t=(0,nvt.getStyle)(e,!1,!0),i=this.parsePath((0,ak.getFunnelPath)(e.points,e.nextPoints,!1)),n=r.addShape("path",{attrs:(0,nk.__assign)((0,nk.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});var bm=j,avt=re,ovt=Oh,ok=ke,lk=pr;(0,avt.registerShape)("interval","hollow-rect",{draw:function(e,r){var t=(0,ok.getStyle)(e,!0,!1),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=(0,ok.getBackgroundRectStyle)(e),o=(0,lk.getBackgroundRectPath)(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:(0,bm.__assign)((0,bm.__assign)({},a),{path:o}),zIndex:-1,name:ovt.BACKGROUND_SHAPE})}var l=this.parsePath((0,lk.getRectPath)(e.points)),s=i.addShape("path",{attrs:(0,bm.__assign)((0,bm.__assign)({},t),{path:l}),name:"interval"});return n?i:s},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,stroke:r,fill:null}}:{symbol:"square",style:{r:4,stroke:r,fill:null}}}});var QC=j,sk=Y,lvt=re,svt=ke,uvt=pr,cvt=yr;function fvt(e){var r=e.x,t=e.y,i=e.y0;return(0,sk.isArray)(t)?t.map(function(n,a){return{x:(0,sk.isArray)(r)?r[a]:r,y:n}}):[{x:r,y:i},{x:r,y:t}]}(0,lvt.registerShape)("interval","line",{getPoints:function(e){return fvt(e)},draw:function(e,r){var t=(0,svt.getStyle)(e,!0,!1,"lineWidth"),i=(0,cvt.omit)((0,QC.__assign)({},t),["fill"]),n=this.parsePath((0,uvt.getRectPath)(e.points,!1)),a=r.addShape("path",{attrs:(0,QC.__assign)((0,QC.__assign)({},i),{path:n}),name:"interval"});return a},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t,i-n],["L",t,i+n]]},style:{r:5,stroke:r}}}});var uk=j,hvt=re,vvt=ke,ck=pr;(0,hvt.registerShape)("interval","pyramid",{getPoints:function(e){return e.size=e.size*2,(0,ck.getRectPoints)(e)},draw:function(e,r){var t=(0,vvt.getStyle)(e,!1,!0),i=this.parsePath((0,ck.getFunnelPath)(e.points,e.nextPoints,!0)),n=r.addShape("path",{attrs:(0,uk.__assign)((0,uk.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});var fk=j,dvt=Y,pvt=re,gvt=ke;function yvt(e){var r=e.x,t=e.y,i=e.y0,n=e.size,a,o;(0,dvt.isArray)(t)?(a=t[0],o=t[1]):(a=i,o=t);var l=r+n/2,s=r-n/2;return[{x:r,y:a},{x:r,y:o},{x:s,y:a},{x:l,y:a},{x:s,y:o},{x:l,y:o}]}function mvt(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y]]}(0,pvt.registerShape)("interval","tick",{getPoints:function(e){return yvt(e)},draw:function(e,r){var t=(0,gvt.getStyle)(e,!0,!1),i=this.parsePath(mvt(e.points)),n=r.addShape("path",{attrs:(0,fk.__assign)((0,fk.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t-n/2,i-n],["L",t+n/2,i-n],["M",t,i-n],["L",t,i+n],["M",t-n/2,i+n],["L",t+n/2,i+n]]},style:{r:5,stroke:r}}}});var hk=j,pO=Y,xvt=re,_vt=xn,bvt=ke,wvt=Zp,Cvt=function(e,r,t){var i=e.x,n=e.y,a=r.x,o=r.y,l;switch(t){case"hv":l=[{x:a,y:n}];break;case"vh":l=[{x:i,y:o}];break;case"hvh":var s=(a+i)/2;l=[{x:s,y:n},{x:s,y:o}];break;case"vhv":var u=(n+o)/2;l=[{x:i,y:u},{x:a,y:u}];break}return l};function Svt(e,r){var t=[];return(0,pO.each)(e,function(i,n){var a=e[n+1];if(t.push(i),a){var o=Cvt(i,a,r);t=t.concat(o)}}),t}function Avt(e){return e.map(function(r,t){return t===0?["M",r.x,r.y]:["L",r.x,r.y]})}function Tvt(e,r){var t=(0,_vt.getPathPoints)(e.points,e.connectNulls,e.showSinglePoint),i=[];return(0,pO.each)(t,function(n){var a=Svt(n,r);i=i.concat(Avt(a))}),(0,hk.__assign)((0,hk.__assign)({},(0,bvt.getStyle)(e,!0,!1,"lineWidth")),{path:i})}(0,pO.each)(["hv","vh","hvh","vhv"],function(e){(0,xvt.registerShape)("line",e,{draw:function(r,t){var i=Tvt(r,e),n=t.addShape({type:"path",attrs:i,name:"line"});return n},getMarker:function(r){return(0,wvt.getLineMarker)(r,e)}})});var Mvt=Y,Evt=Ps,Ovt=re,vk=uo;(0,Mvt.each)(vk.HOLLOW_SHAPES,function(e){(0,Ovt.registerShape)("point",e,{draw:function(r,t){return(0,vk.drawPoints)(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:Evt.MarkerSymbols[e],style:{r:4.5,stroke:t,fill:null}}}})});var Fvt=re,Pvt=ke;(0,Fvt.registerShape)("point","image",{draw:function(e,r){var t=(0,Pvt.getStyle)(e,!1,!1,"r").r,i=this.parsePoints(e.points),n=i[0];if(e.isStack)n=i[1];else if(i.length>1){for(var a=r.addGroup(),o=0,l=i;o1?r[1]:t,a=r.length>3?r[3]:i,o=r.length>2?r[2]:n;return{min:t,max:i,min1:n,max1:a,median:o}}function yk(e,r,t){var i=t/2,n;if((0,rT.isArray)(r)){var a=gk(r),o=a.min,l=a.max,s=a.median,u=a.min1,c=a.max1,f=e-i,h=e+i;n=[[f,l],[h,l],[e,l],[e,c],[f,u],[f,c],[h,c],[h,u],[e,u],[e,o],[f,o],[h,o],[f,s],[h,s]]}else{r=(0,rT.isNil)(r)?.5:r;var v=gk(e),o=v.min,l=v.max,s=v.median,u=v.min1,c=v.max1,d=r-i,p=r+i;n=[[o,d],[o,p],[o,r],[u,r],[u,d],[u,p],[c,p],[c,d],[c,r],[l,r],[l,d],[l,p],[s,d],[s,p]]}return n.map(function(x){return{x:x[0],y:x[1]}})}function Rvt(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y],["L",e[6].x,e[6].y],["L",e[7].x,e[7].y],["L",e[4].x,e[4].y],["Z"],["M",e[8].x,e[8].y],["L",e[9].x,e[9].y],["M",e[10].x,e[10].y],["L",e[11].x,e[11].y],["M",e[12].x,e[12].y],["L",e[13].x,e[13].y]]}(0,$vt.registerShape)("schema","box",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return yk(r,t,i)},draw:function(e,r){var t=(0,kvt.getStyle)(e,!0,!1),i=this.parsePath(Rvt(e.points)),n=r.addShape("path",{attrs:(0,pk.__assign)((0,pk.__assign)({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i-6,i-3,i,i+3,i+6],o=yk(t,a,n);return[["M",o[0].x+1,o[0].y],["L",o[1].x-1,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["M",o[4].x,o[4].y],["L",o[5].x,o[5].y],["L",o[6].x,o[6].y],["L",o[7].x,o[7].y],["L",o[4].x,o[4].y],["Z"],["M",o[8].x,o[8].y],["L",o[9].x,o[9].y],["M",o[10].x+1,o[10].y],["L",o[11].x-1,o[11].y],["M",o[12].x,o[12].y],["L",o[13].x,o[13].y]]},style:{r:6,lineWidth:1,stroke:r}}}});var mk=j,Bvt=Y,Nvt=yr,Gvt=re,zvt=ke;function Vvt(e){var r=(0,Bvt.isArray)(e)?e:[e],t=r.sort(function(i,n){return n-i});return(0,Nvt.padEnd)(t,4,t[t.length-1])}function xk(e,r,t){var i=Vvt(r);return[{x:e,y:i[0]},{x:e,y:i[1]},{x:e-t/2,y:i[2]},{x:e-t/2,y:i[1]},{x:e+t/2,y:i[1]},{x:e+t/2,y:i[2]},{x:e,y:i[2]},{x:e,y:i[3]}]}function jvt(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["L",e[4].x,e[4].y],["L",e[5].x,e[5].y],["Z"],["M",e[6].x,e[6].y],["L",e[7].x,e[7].y]]}(0,Gvt.registerShape)("schema","candle",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return xk(r,t,i)},draw:function(e,r){var t=(0,zvt.getStyle)(e,!0,!0),i=this.parsePath(jvt(e.points)),n=r.addShape("path",{attrs:(0,mk.__assign)((0,mk.__assign)({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i+7.5,i+3,i-3,i-7.5],o=xk(t,a,n);return[["M",o[0].x,o[0].y],["L",o[1].x,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["L",o[4].x,o[4].y],["L",o[5].x,o[5].y],["Z"],["M",o[6].x,o[6].y],["L",o[7].x,o[7].y]]},style:{lineWidth:1,stroke:r,fill:r,r:6}}}});var _k=j,Uj=Y,Hvt=re,Yvt=ke;function Wvt(e,r){var t=Math.abs(e[0].x-e[2].x),i=Math.abs(e[0].y-e[2].y),n=Math.min(t,i);r&&(n=(0,Uj.clamp)(r,0,Math.min(t,i))),n=n/2;var a=(e[0].x+e[2].x)/2,o=(e[0].y+e[2].y)/2;return{x:a-n,y:o-n,width:n*2,height:n*2}}(0,Hvt.registerShape)("polygon","square",{draw:function(e,r){if(!(0,Uj.isEmpty)(e.points)){var t=(0,Yvt.getStyle)(e,!0,!0),i=this.parsePoints(e.points);return r.addShape("rect",{attrs:(0,_k.__assign)((0,_k.__assign)({},t),Wvt(i,e.size)),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});var bk=j,Xvt=re,Uvt=xn,qvt=ke;(0,Xvt.registerShape)("violin","smooth",{draw:function(e,r){var t=(0,qvt.getStyle)(e,!0,!0),i=this.parsePath((0,Uvt.getSmoothViolinPath)(e.points));return r.addShape("path",{attrs:(0,bk.__assign)((0,bk.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{stroke:null,r:4,fill:r}}}});var fx=j,qj=re,Zj=xn,Qj=ke;(0,qj.registerShape)("violin","hollow",{draw:function(e,r){var t=(0,Qj.getStyle)(e,!0,!1),i=this.parsePath((0,Zj.getViolinPath)(e.points));return r.addShape("path",{attrs:(0,fx.__assign)((0,fx.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}});(0,qj.registerShape)("violin","hollow-smooth",{draw:function(e,r){var t=(0,Qj.getStyle)(e,!0,!1),i=this.parsePath((0,Zj.getSmoothViolinPath)(e.points));return r.addShape("path",{attrs:(0,fx.__assign)((0,fx.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}});var gO={};Object.defineProperty(gO,"__esModule",{value:!0});var Dl=j,Rn=Y,Zvt=(0,Dl.__importDefault)(Fh),Qvt=function(e){(0,Dl.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelValueDir=function(t){var i="y",n=t.points;return n[0][i]<=n[2][i]?1:-1},r.prototype.getLabelOffsetPoint=function(t,i,n,a){var o,l=e.prototype.getLabelOffsetPoint.call(this,t,i,n),s=this.getCoordinate(),u=s.isTransposed,c=u?"x":"y",f=this.getLabelValueDir(t.mappingData);return l=(0,Dl.__assign)((0,Dl.__assign)({},l),(o={},o[c]=l[c]*f,o)),s.isReflect("x")&&(l=(0,Dl.__assign)((0,Dl.__assign)({},l),{x:l.x*-1})),s.isReflect("y")&&(l=(0,Dl.__assign)((0,Dl.__assign)({},l),{y:l.y*-1})),l},r.prototype.getThemedLabelCfg=function(t){var i=this.geometry,n=this.getDefaultLabelCfg(),a=i.theme;return(0,Rn.deepMix)({},n,a.labels,t.position==="middle"?{offset:0}:{},t)},r.prototype.setLabelPosition=function(t,i,n,a){var o=this.getCoordinate(),l=o.isTransposed,s=i.points,u=o.convert(s[0]),c=o.convert(s[2]),f=this.getLabelValueDir(i),h,v,d,p,x=(0,Rn.isArray)(i.shape)?i.shape[0]:i.shape;if(x==="funnel"||x==="pyramid"){var m=(0,Rn.get)(i,"nextPoints"),_=(0,Rn.get)(i,"points");if(m){var b=o.convert(_[0]),w=o.convert(_[1]),S=o.convert(m[0]),M=o.convert(m[1]);l?(h=Math.min(S.y,b.y),d=Math.max(S.y,b.y),v=(w.x+M.x)/2,p=(b.x+S.x)/2):(h=Math.min((w.y+M.y)/2,(b.y+S.y)/2),d=Math.max((w.y+M.y)/2,(b.y+S.y)/2),v=M.x,p=b.x)}else h=Math.min(c.y,u.y),d=Math.max(c.y,u.y),v=c.x,p=u.x}else h=Math.min(c.y,u.y),d=Math.max(c.y,u.y),v=c.x,p=u.x;switch(a){case"right":t.x=v,t.y=(h+d)/2,t.textAlign=(0,Rn.get)(t,"textAlign",f>0?"left":"right");break;case"left":t.x=p,t.y=(h+d)/2,t.textAlign=(0,Rn.get)(t,"textAlign",f>0?"left":"right");break;case"bottom":l&&(t.x=(v+p)/2),t.y=d,t.textAlign=(0,Rn.get)(t,"textAlign","center"),t.textBaseline=(0,Rn.get)(t,"textBaseline",f>0?"bottom":"top");break;case"middle":l&&(t.x=(v+p)/2),t.y=(h+d)/2,t.textAlign=(0,Rn.get)(t,"textAlign","center"),t.textBaseline=(0,Rn.get)(t,"textBaseline","middle");break;case"top":l&&(t.x=(v+p)/2),t.y=h,t.textAlign=(0,Rn.get)(t,"textAlign","center"),t.textBaseline=(0,Rn.get)(t,"textBaseline",f>0?"bottom":"top");break}},r}(Zvt.default),Kj=gO.default=Qvt,yO={},q1={};Object.defineProperty(q1,"__esModule",{value:!0});var tf=j,Do=Y,Kvt=be,Jvt=be,tdt=(0,tf.__importDefault)(Fh),wm=Math.PI/2,edt=function(e){(0,tf.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelOffset=function(t){var i=this.getCoordinate(),n=0;if((0,Do.isNumber)(t))n=t;else if((0,Do.isString)(t)&&t.indexOf("%")!==-1){var a=i.getRadius();i.innerRadius>0&&(a=a*(1-i.innerRadius)),n=parseFloat(t)*.01*a}return n},r.prototype.getLabelItems=function(t){var i=e.prototype.getLabelItems.call(this,t),n=this.geometry.getYScale();return(0,Do.map)(i,function(a){if(a&&n){var o=n.scale((0,Do.get)(a.data,n.field));return(0,tf.__assign)((0,tf.__assign)({},a),{percent:o})}return a})},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n;if(t.labelEmit)n=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(!i.isTransposed)n="center";else{var a=i.getCenter(),o=t.offset;Math.abs(t.x-a.x)<1?n="center":t.angle>Math.PI||t.angle<=0?n=o>0?"left":"right":n=o>0?"right":"left"}return n},r.prototype.getLabelPoint=function(t,i,n){var a=1,o,l=t.content[n];this.isToMiddle(i)?o=this.getMiddlePoint(i.points):(t.content.length===1&&n===0?n=1:n===0&&(a=-1),o=this.getArcPoint(i,n));var s=t.offset*a,u=this.getPointAngle(o),c=t.labelEmit,f=this.getCirclePoint(u,s,o,c);return f.r===0?f.content="":(f.content=l,f.angle=u,f.color=i.color),f.rotate=t.autoRotate?this.getLabelRotate(u,s,c):t.rotate,f.start={x:o.x,y:o.y},f},r.prototype.getArcPoint=function(t,i){return i===void 0&&(i=0),!(0,Do.isArray)(t.x)&&!(0,Do.isArray)(t.y)?{x:t.x,y:t.y}:{x:(0,Do.isArray)(t.x)?t.x[i]:t.x,y:(0,Do.isArray)(t.y)?t.y[i]:t.y}},r.prototype.getPointAngle=function(t){return(0,Jvt.getAngleByPoint)(this.getCoordinate(),t)},r.prototype.getCirclePoint=function(t,i,n,a){var o=this.getCoordinate(),l=o.getCenter(),s=(0,Kvt.getDistanceToCenter)(o,n);if(s===0)return(0,tf.__assign)((0,tf.__assign)({},l),{r:s});var u=t;if(o.isTransposed&&s>i&&!a){var c=Math.asin(i/(2*s));u=t+c*2}else s=s+i;return{x:l.x+s*Math.cos(u),y:l.y+s*Math.sin(u),r:s}},r.prototype.getLabelRotate=function(t,i,n){var a=t+wm;return n&&(a-=wm),a&&(a>wm?a=a-Math.PI:a<-wm&&(a=a+Math.PI)),a},r.prototype.getMiddlePoint=function(t){var i=this.getCoordinate(),n=t.length,a={x:0,y:0};return(0,Do.each)(t,function(o){a.x+=o.x,a.y+=o.y}),a.x/=n,a.y/=n,a=i.convert(a),a},r.prototype.isToMiddle=function(t){return t.x.length>2},r}(tdt.default),rdt=q1.default=edt;Object.defineProperty(yO,"__esModule",{value:!0});var _0=j,Cm=Y,wk=be,idt=Se,ndt=(0,_0.__importDefault)(q1),adt=function(e){(0,_0.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return r.prototype.getDefaultLabelCfg=function(t,i){var n=e.prototype.getDefaultLabelCfg.call(this,t,i);return(0,Cm.deepMix)({},n,(0,Cm.get)(this.geometry.theme,"pieLabels",{}))},r.prototype.getLabelOffset=function(t){return e.prototype.getLabelOffset.call(this,t)||0},r.prototype.getLabelRotate=function(t,i,n){var a;return i<0&&(a=t,a>Math.PI/2&&(a=a-Math.PI),a<-Math.PI/2&&(a=a+Math.PI)),a},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n=i.getCenter(),a;return t.angle<=Math.PI/2&&t.x>=n.x?a="left":a="right",t.offset<=0&&(a==="right"?a="left":a="right"),a},r.prototype.getArcPoint=function(t){return t},r.prototype.getPointAngle=function(t){var i=this.getCoordinate(),n={x:(0,Cm.isArray)(t.x)?t.x[0]:t.x,y:t.y[0]},a={x:(0,Cm.isArray)(t.x)?t.x[1]:t.x,y:t.y[1]},o,l=(0,wk.getAngleByPoint)(i,n);if(t.points&&t.points[0].y===t.points[1].y)o=l;else{var s=(0,wk.getAngleByPoint)(i,a);l>=s&&(s=s+Math.PI*2),o=l+(s-l)/2}return o},r.prototype.getCirclePoint=function(t,i){var n=this.getCoordinate(),a=n.getCenter(),o=n.getRadius()+i;return(0,_0.__assign)((0,_0.__assign)({},(0,idt.polarToCartesian)(a.x,a.y,o,t)),{angle:t,r:o})},r}(ndt.default),Jj=yO.default=adt,Z1={};Object.defineProperty(Z1,"__esModule",{value:!0});var tH=Z1.distribute=void 0,qv=Y,Ck=Se,Sk=4;function odt(e,r,t,i,n,a){var o=!0,l=i.start,s=i.end,u=Math.min(l.y,s.y),c=Math.abs(l.y-s.y),f,h=0,v=Number.MIN_VALUE,d=r.map(function(S){return S.y>h&&(h=S.y),S.yc&&(c=h-u);o;)for(d.forEach(function(S){var M=(Math.min.apply(v,S.targets)+Math.max.apply(v,S.targets))/2;S.pos=Math.min(Math.max(v,M-S.size/2),c-S.size)}),o=!1,f=d.length;f--;)if(f>0){var p=d[f-1],x=d[f];p.pos+p.size>x.pos&&(p.size+=x.size,p.targets=p.targets.concat(x.targets),p.pos+p.size>c&&(p.pos=c-p.size),d.splice(f,1),o=!0)}f=0,d.forEach(function(S){var M=u+t/2;S.targets.forEach(function(){r[f].y=S.pos+M,M+=t,f++})});for(var m={},_=0,b=e;_0){var s=14,u=o+n,c=u*2+s*2,f={start:a.start,end:a.end},h=[[],[]];e.forEach(function(v){!v||(v.textAlign==="right"?h[0].push(v):h[1].push(v))}),h.forEach(function(v,d){var p=c/s;v.length>p&&(v.sort(function(x,m){return m["..percent"]-x["..percent"]}),v.splice(p,v.length-p)),v.sort(function(x,m){return x.y-m.y}),odt(r,v,s,f,l,d)})}(0,qv.each)(e,function(v){if(v&&v.labelLine){var d=v.offset,p=v.angle,x=(0,Ck.polarToCartesian)(l.x,l.y,o,p),m=(0,Ck.polarToCartesian)(l.x,l.y,o+d/2,p),_=v.x+(0,qv.get)(v,"offsetX",0),b=v.y+(0,qv.get)(v,"offsetY",0),w={x:_-Math.cos(p)*Sk,y:b-Math.sin(p)*Sk};(0,qv.isObject)(v.labelLine)||(v.labelLine={}),v.labelLine.path=["M "+x.x,x.y+" Q"+m.x,m.y+" "+w.x,w.y].join(",")}})}}tH=Z1.distribute=ldt;var Q1={},Qp={};Object.defineProperty(Qp,"__esModule",{value:!0});Qp.antiCollision=void 0;function sdt(e,r,t){var i=e.filter(function(d){return!d.invisible});i.sort(function(d,p){return d.y-p.y});var n=!0,a=t.minY,o=t.maxY,l=Math.abs(a-o),s,u=0,c=Number.MIN_VALUE,f=i.map(function(d){return d.y>u&&(u=d.y),d.yl&&(l=u-a);n;)for(f.forEach(function(d){var p=(Math.min.apply(c,d.targets)+Math.max.apply(c,d.targets))/2;d.pos=Math.min(Math.max(c,p-d.size/2),l-d.size),d.pos=Math.max(0,d.pos)}),n=!1,s=f.length;s--;)if(s>0){var h=f[s-1],v=f[s];h.pos+h.size>v.pos&&(h.size+=v.size,h.targets=h.targets.concat(v.targets),h.pos+h.size>l&&(h.pos=l-h.size),f.splice(s,1),n=!0)}s=0,f.forEach(function(d){var p=a+r/2;d.targets.forEach(function(){i[s].y=d.pos+p,p+=r,s++})})}Qp.antiCollision=sdt;Object.defineProperty(Q1,"__esModule",{value:!0});Q1.pieOuterLabelLayout=void 0;var zn=Y,Sm=Se,udt=Qp,Ak=4;function cdt(e,r){var t=r.getCenter(),i=r.getRadius();if(e&&e.labelLine){var n=e.angle,a=e.offset,o=(0,Sm.polarToCartesian)(t.x,t.y,i,n),l=e.x+(0,zn.get)(e,"offsetX",0)*(Math.cos(n)>0?1:-1),s=e.y+(0,zn.get)(e,"offsetY",0)*(Math.sin(n)>0?1:-1),u={x:l-Math.cos(n)*Ak,y:s-Math.sin(n)*Ak},c=e.labelLine.smooth,f=[],h=u.x-t.x,v=u.y-t.y,d=Math.atan(v/h);if(h<0&&(d+=Math.PI),c===!1){(0,zn.isObject)(e.labelLine)||(e.labelLine={});var p=0;(n<0&&n>-Math.PI/2||n>Math.PI*1.5)&&u.y>o.y&&(p=1),n>=0&&no.y&&(p=1),n>=Math.PI/2&&nu.y&&(p=1),(n<-Math.PI/2||n>=Math.PI&&nu.y&&(p=1);var x=a/2>4?4:Math.max(a/2-1,0),m=(0,Sm.polarToCartesian)(t.x,t.y,i+x,n),_=(0,Sm.polarToCartesian)(t.x,t.y,i+a/2,d),b=0;f.push("M "+o.x+" "+o.y),f.push("L "+m.x+" "+m.y),f.push("A "+t.x+" "+t.y+" 0 "+b+" "+p+" "+_.x+" "+_.y),f.push("L "+u.x+" "+u.y)}else{var m=(0,Sm.polarToCartesian)(t.x,t.y,i+(a/2>4?4:Math.max(a/2-1,0)),n),w=o.xMath.pow(Math.E,-16)&&f.push.apply(f,["C",u.x+w*4,u.y,2*m.x-o.x,2*m.y-o.y,o.x,o.y]),f.push("L "+o.x+" "+o.y)}e.labelLine.path=f.join(" ")}}function fdt(e,r,t,i){var n=(0,zn.filter)(e,function(M){return!(0,zn.isNil)(M)}),a=r[0]&&r[0].get("coordinate");if(!!a){for(var o=a.getCenter(),l=a.getRadius(),s={},u=0,c=r;uF&&(M.sort(function(L,D){return D.percent-L.percent}),(0,zn.each)(M,function(L,D){D+1>F&&(s[L.id].set("visible",!1),L.invisible=!0)})),(0,udt.antiCollision)(M,h,S)}),(0,zn.each)(x,function(M,O){(0,zn.each)(M,function(F){var L=O===p,D=s[F.id],R=D.getChildByIndex(0);if(R){var H=l+v,k=F.y-o.y,V=Math.pow(H,2),U=Math.pow(k,2),B=V-U>0?V-U:0,G=Math.sqrt(B),N=Math.abs(Math.cos(F.angle)*H);L?F.x=o.x+Math.max(G,N):F.x=o.x-Math.max(G,N)}R&&(R.attr("y",F.y),R.attr("x",F.x)),cdt(F,a)})})}}}Q1.pieOuterLabelLayout=fdt;var K1={};Object.defineProperty(K1,"__esModule",{value:!0});K1.pieSpiderLabelLayout=void 0;var un=Y,iT=Se,hdt=Qp,vdt=Ar,nT=4,ddt=4,Tk=4;function pdt(e,r,t){var i=r.getCenter(),n=r.getRadius(),a={x:e.x-(t?Tk:-Tk),y:e.y},o=(0,iT.polarToCartesian)(i.x,i.y,n+nT,e.angle),l={x:a.x,y:a.y},s={x:o.x,y:o.y},u=(0,iT.polarToCartesian)(i.x,i.y,n,e.angle),c="";if(a.y!==o.y){var f=t?4:-4;l.y=a.y,e.angle<0&&e.angle>=-Math.PI/2&&(l.x=Math.max(o.x,a.x-f),a.y0&&e.angleo.y?s.y=l.y:(s.y=o.y,s.x=Math.max(s.x,l.x-f))),e.angle>Math.PI/2&&(l.x=Math.min(o.x,a.x-f),a.y>o.y?s.y=l.y:(s.y=o.y,s.x=Math.min(s.x,l.x-f))),e.angle<-Math.PI/2&&(l.x=Math.min(o.x,a.x-f),a.ya.x||M.x===a.x&&M.y>a.y,L=(0,un.isNil)(M.offsetX)?ddt:M.offsetX,D=(0,iT.polarToCartesian)(a.x,a.y,o+nT,M.angle),R=h+L;M.x=a.x+(F?1:-1)*(o+R),M.y=D.y}});var v=n.start,d=n.end,p="left",x="right",m=(0,un.groupBy)(e,function(M){return M.x_&&(_=Math.min(O,Math.abs(v.y-d.y)))});var b={minX:v.x,maxX:d.x,minY:a.y-_/2,maxY:a.y+_/2};(0,un.each)(m,function(M,O){var F=_/f;M.length>F&&(M.sort(function(L,D){return D.percent-L.percent}),(0,un.each)(M,function(L,D){D>F&&(l[L.id].set("visible",!1),L.invisible=!0)})),(0,hdt.antiCollision)(M,f,b)});var w=b.minY,S=b.maxY;(0,un.each)(m,function(M,O){var F=O===x;(0,un.each)(M,function(L){var D=(0,un.get)(l,L&&[L.id]);if(!!D){if(L.yS){D.set("visible",!1);return}var R=D.getChildByIndex(0),H=R.getCanvasBBox(),k={x:F?H.x:H.maxX,y:H.y+H.height/2};(0,vdt.translate)(R,L.x-k.x,L.y-k.y),L.labelLine&&pdt(L,n,F)}})})}}K1.pieSpiderLabelLayout=gdt;var J1={};Object.defineProperty(J1,"__esModule",{value:!0});var eH=J1.limitInCanvas=void 0,ydt=Y,mdt=Ar;function xdt(e,r,t,i){(0,ydt.each)(r,function(n){var a=i.minX,o=i.minY,l=i.maxX,s=i.maxY,u=n.getCanvasBBox(),c=u.minX,f=u.minY,h=u.maxX,v=u.maxY,d=u.x,p=u.y,x=u.width,m=u.height,_=d,b=p;(cl?_=l-x:h>l&&(_=_-(h-l)),f>s?b=s-m:v>s&&(b=b-(v-s)),(_!==d||b!==p)&&(0,mdt.translate)(n,_-d,b-p)})}eH=J1.limitInCanvas=xdt;var t_={};Object.defineProperty(t_,"__esModule",{value:!0});var rH=t_.limitInShape=void 0,_dt=Y;function bdt(e,r,t,i){(0,_dt.each)(r,function(n,a){var o=n.getCanvasBBox(),l=t[a].getBBox();(o.minXl.maxX||o.maxY>l.maxY)&&n.remove(!0)})}rH=t_.limitInShape=bdt;var Uf={};Object.defineProperty(Uf,"__esModule",{value:!0});var iH=Uf.overlap=oH=Uf.fixedOverlap=void 0,nH=Y,wdt=100,aH=function(){function e(r){r===void 0&&(r={}),this.bitmap={};var t=r.xGap,i=t===void 0?1:t,n=r.yGap,a=n===void 0?8:n;this.xGap=i,this.yGap=a}return e.prototype.hasGap=function(r){for(var t=!0,i=this.bitmap,n=Math.round(r.minX),a=Math.round(r.maxX),o=Math.round(r.minY),l=Math.round(r.maxY),s=n;s<=a;s+=1){if(!i[s]){i[s]={};continue}if(s===n||s===a){for(var u=o;u<=l;u++)if(i[s][u]){t=!1;break}}else if(i[s][o]||i[s][l]){t=!1;break}}return t},e.prototype.fillGap=function(r){for(var t=this.bitmap,i=Math.round(r.minX),n=Math.round(r.maxX),a=Math.round(r.minY),o=Math.round(r.maxY),l=i;l<=n;l+=1)t[l]||(t[l]={});for(var l=i;l<=n;l+=this.xGap){for(var s=a;s<=o;s+=this.yGap)t[l][s]=!0;t[l][o]=!0}if(this.yGap!==1)for(var l=a;l<=o;l+=1)t[i][l]=!0,t[n][l]=!0;if(this.xGap!==1)for(var l=i;l<=n;l+=1)t[l][a]=!0,t[l][o]=!0},e.prototype.destroy=function(){this.bitmap={}},e}();function Cdt(e,r,t){t===void 0&&(t=wdt);var i=-1,n=e.attr(),a=n.x,o=n.y,l=e.getCanvasBBox(),s=Math.sqrt(l.width*l.width+l.height*l.height),u,c=-i,f=0,h=0,v=function(m){var _=m*.1;return[_*Math.cos(_),_*Math.sin(_)]};if(r.hasGap(l))return r.fillGap(l),!0;for(var d=!1,p=0,x={};Math.min(Math.abs(f),Math.abs(h))4)return[];var r=function(n,a){return[a.x-n.x,a.y-n.y]},t=r(e[0],e[1]),i=r(e[1],e[2]);return[t,i]}function Am(e,r,t){r===void 0&&(r=0),t===void 0&&(t={x:0,y:0});var i=e.x,n=e.y;return{x:(i-t.x)*Math.cos(-r)+(n-t.y)*Math.sin(-r)+t.x,y:(t.x-i)*Math.sin(-r)+(n-t.y)*Math.cos(-r)+t.y}}function Ok(e){var r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],t=e.rotation;return t?[Am(r[0],t,r[0]),Am(r[1],t,r[0]),Am(r[2],t,r[0]),Am(r[3],t,r[0])]:r}function Fk(e,r){if(e.length>4)return{min:0,max:0};var t=[];return e.forEach(function(i){t.push(Odt([i.x,i.y],r))}),{min:Math.min.apply(Math,t),max:Math.max.apply(Math,t)}}function Fdt(e,r){return e.max>r.min&&e.mine.x+e.width+t||r.x+r.widthe.y+e.height+t||r.y+r.height=a.height:o.width>=a.width}function Gdt(e,r,t){var i=!!e.getAdjust("stack");return i||r.every(function(n,a){var o=t[a];return Ndt(e,n,o)})}function zdt(e,r,t){var i=e.coordinate,n=aT.BBox.fromObject(t.getBBox()),a=(0,sH.findLabelTextShape)(r);i.isTransposed?a.attr({x:n.minX+n.width/2,textAlign:"center"}):a.attr({y:n.minY+n.height/2,textBaseline:"middle"})}function Vdt(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=Gdt(a,r,t);o&&t.forEach(function(l,s){var u=r[s];zdt(a,u,l)})}}}n_.intervalAdjustPosition=Vdt;var a_={};Object.defineProperty(a_,"__esModule",{value:!0});a_.intervalHideOverlap=void 0;var du=Y,jdt=Ai;function Hdt(e){var r=500,t=[],i=Math.max(Math.floor(e.length/r),1);return(0,du.each)(e,function(n,a){a%i===0?t.push(n):n.set("visible",!1)}),t}function Ydt(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=Hdt(r),l=a.getXYFields()[0],s=[],u=[],c=(0,du.groupBy)(o,function(p){return p.get("data")[l]}),f=(0,du.uniq)((0,du.map)(o,function(p){return p.get("data")[l]})),h;o.forEach(function(p){p.set("visible",!0)});var v=function(p){p&&(p.length&&u.push(p.pop()),u.push.apply(u,p))};for((0,du.size)(f)>0&&(h=f.shift(),v(c[h])),(0,du.size)(f)>0&&(h=f.pop(),v(c[h])),(0,du.each)(f.reverse(),function(p){v(c[p])});u.length>0;){var d=u.shift();d.get("visible")&&((0,jdt.checkShapeOverlap)(d,s)?d.set("visible",!1):s.push(d))}}}}a_.intervalHideOverlap=Ydt;var o_={};Object.defineProperty(o_,"__esModule",{value:!0});o_.pointAdjustPosition=void 0;var KC=Y,oT=Ai;function Wdt(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,n),i}function uH(e,r,t){return e.some(function(i){return t(i,r)})}function Xdt(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function Rk(e,r){return uH(e,r,function(t,i){var n=(0,oT.findLabelTextShape)(t),a=(0,oT.findLabelTextShape)(i);return Xdt(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function Udt(e,r,t,i,n){var a,o;if(t.length!==0){var l=(a=t[0])===null||a===void 0?void 0:a.get("element"),s=l==null?void 0:l.geometry;if(!(!s||s.type!=="point")){var u=s.getXYFields(),c=u[0],f=u[1],h=(0,KC.groupBy)(r,function(p){return p.get("data")[c]}),v=[],d=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,KC.map)((0,KC.keys)(h).reverse(),function(p){for(var x=Wdt(s,h[p]);x.length;){var m=x.shift(),_=(0,oT.findLabelTextShape)(m);if(uH(v,m,function(S,M){return S.get("data")[c]===M.get("data")[c]&&S.get("data")[f]===M.get("data")[f]})){_.set("visible",!1);continue}var b=Rk(v,m),w=!1;if(b&&(_.attr("y",_.attr("y")+2*d),w=Rk(v,m)),w){_.set("visible",!1);continue}v.push(m)}})}}}o_.pointAdjustPosition=Udt;var l_={};Object.defineProperty(l_,"__esModule",{value:!0});l_.pathAdjustPosition=void 0;var JC=Y,lT=Ai;function qdt(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,n),i}function cH(e,r,t){return e.some(function(i){return t(i,r)})}function Zdt(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function Bk(e,r){return cH(e,r,function(t,i){var n=(0,lT.findLabelTextShape)(t),a=(0,lT.findLabelTextShape)(i);return Zdt(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function Qdt(e,r,t,i,n){var a,o;if(t.length!==0){var l=(a=t[0])===null||a===void 0?void 0:a.get("element"),s=l==null?void 0:l.geometry;if(!(!s||["path","line","area"].indexOf(s.type)<0)){var u=s.getXYFields(),c=u[0],f=u[1],h=(0,JC.groupBy)(r,function(p){return p.get("data")[c]}),v=[],d=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,JC.map)((0,JC.keys)(h).reverse(),function(p){for(var x=qdt(s,h[p]);x.length;){var m=x.shift(),_=(0,lT.findLabelTextShape)(m);if(cH(v,m,function(S,M){return S.get("data")[c]===M.get("data")[c]&&S.get("data")[f]===M.get("data")[f]})){_.set("visible",!1);continue}var b=Bk(v,m),w=!1;if(b&&(_.attr("y",_.attr("y")+2*d),w=Bk(v,m)),w){_.set("visible",!1);continue}v.push(m)}})}}}l_.pathAdjustPosition=Qdt;var s_={},fH={},u_={};Object.defineProperty(u_,"__esModule",{value:!0});u_.getCanvasContext=void 0;var tS;function Kdt(){return tS||(tS=document.createElement("canvas").getContext("2d")),tS}u_.getCanvasContext=Kdt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEllipsisText=e.measureTextWidth=void 0;var r=j,t=Y,i=u_;e.measureTextWidth=(0,t.memoize)(function(a,o){o===void 0&&(o={});var l=o.fontSize,s=o.fontFamily,u=o.fontWeight,c=o.fontStyle,f=o.fontVariant,h=(0,i.getCanvasContext)();return h.font=[c,f,u,l+"px",s].join(" "),h.measureText((0,t.isString)(a)?a:"").width},function(a,o){return o===void 0&&(o={}),(0,r.__spreadArray)([a],(0,t.values)(o),!0).join("")});var n=function(a,o,l){var s=16,u=(0,e.measureTextWidth)("...",l),c;(0,t.isString)(a)?c=a:c=(0,t.toString)(a);var f=o,h=[],v,d;if((0,e.measureTextWidth)(a,l)<=o)return a;for(;v=c.substr(0,s),d=(0,e.measureTextWidth)(v,l),!(d+u>f&&d>f);)if(h.push(v),f-=d,c=c.substr(s),!c)return h.join("");for(;v=c.substr(0,1),d=(0,e.measureTextWidth)(v,l),!(d+u>f);)if(h.push(v),f-=d,c=c.substr(1),!c)return h.join("");return h.join("")+"..."};e.getEllipsisText=n})(fH);Object.defineProperty(s_,"__esModule",{value:!0});s_.limitInPlot=void 0;var Nk=Y,Jdt=be,tpt=fH,ept=Ar;function rpt(e,r,t,i,n){if(!(r.length<=0)){var a=(n==null?void 0:n.direction)||["top","right","bottom","left"],o=(n==null?void 0:n.action)||"translate",l=(n==null?void 0:n.margin)||0,s=r[0].get("coordinate");if(!!s){var u=(0,Jdt.getCoordinateBBox)(s,l),c=u.minX,f=u.minY,h=u.maxX,v=u.maxY;(0,Nk.each)(r,function(d){var p=d.getCanvasBBox(),x=p.minX,m=p.minY,_=p.maxX,b=p.maxY,w=p.x,S=p.y,M=p.width,O=p.height,F=w,L=S;if(a.indexOf("left")>=0&&(x=0&&(m=0&&(x>h?F=h-M:_>h&&(F=F-(_-h))),a.indexOf("bottom")>=0&&(m>v?L=v-O:b>v&&(L=L-(b-v))),F!==w||L!==S){var D=F-w;if(o==="translate")(0,ept.translate)(d,D,L-S);else if(o==="ellipsis"){var R=d.findAll(function(H){return H.get("type")==="text"});R.forEach(function(H){var k=(0,Nk.pick)(H.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),V=H.getCanvasBBox(),U=(0,tpt.getEllipsisText)(H.attr("text"),V.width-Math.abs(D),k);H.attr("text",U)})}else d.hide()}})}}}s_.limitInPlot=rpt;var mO={},Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.getAnglePoint=Ma.getFactTitleConfig=void 0;var Ml=Kt;function ipt(e){return[Ml.DIRECTION.TOP,Ml.DIRECTION.BOTTOM].includes(e)?{offsetX:0,offsetY:e===Ml.DIRECTION.TOP?-8:8,style:{textAlign:"center",textBaseline:e===Ml.DIRECTION.TOP?"bottom":"top"}}:[Ml.DIRECTION.LEFT,Ml.DIRECTION.RIGHT].includes(e)?{offsetX:e===Ml.DIRECTION.LEFT?-8:8,offsetY:0,style:{textAlign:e===Ml.DIRECTION.LEFT?"right":"left",textBaseline:"middle",rotate:Math.PI/2}}:{}}Ma.getFactTitleConfig=ipt;function npt(e,r,t){return{x:e.x+r*Math.cos(t),y:e.y+r*Math.sin(t)}}Ma.getAnglePoint=npt;Object.defineProperty(mO,"__esModule",{value:!0});var apt=j,wv=Y,opt=Kt,Tm=Ma,lpt=_o,spt=function(e){(0,apt.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,wv.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"circle",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.getRegion=function(t,i){var n=.5,a={x:.5,y:.5},o=Math.PI*2/t,l=-1*Math.PI/2+o*i,s=n/(1+1/Math.sin(o/2)),u=(0,Tm.getAnglePoint)(a,n-s,l),c=Math.PI*5/4,f=Math.PI*1/4;return{start:(0,Tm.getAnglePoint)(u,s,c),end:(0,Tm.getAnglePoint)(u,s,f)}},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg,a=n.fields,o=n.type,l=a[0];if(!l)throw new Error("No `fields` specified!");var s=this.getFieldValues(t,l),u=s.length,c=[];return s.forEach(function(f,h){var v=[{field:l,value:f,values:s}],d=(0,wv.filter)(t,i.getFacetDataFilter(v)),p={type:o,data:d,region:i.getRegion(u,h),columnValue:f,columnField:l,columnIndex:h,columnValuesLength:u,rowValue:null,rowField:null,rowIndex:0,rowValuesLength:1};c.push(p)}),c},r.prototype.getXAxisOption=function(t,i,n,a){return n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;(0,wv.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,wv.get)(t.cfg.title,"formatter"),l=(0,wv.deepMix)({position:["50%","0%"],content:o?o(n):n},(0,Tm.getFactTitleConfig)(opt.DIRECTION.TOP),t.cfg.title);a.annotation().text(l)})},r}(lpt.Facet),upt=mO.default=spt,xO={};Object.defineProperty(xO,"__esModule",{value:!0});var Cv=j,Sv=Y,cpt=Kt,fpt=Ma,hpt=_o,vpt=function(e){(0,Cv.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,Sv.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"list",cols:null,showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg.fields,a=this.cfg.cols,o=n[0];if(!o)throw new Error("No `fields` specified!");var l=this.getFieldValues(t,o),s=l.length;a=a||s;var u=this.getPageCount(s,a),c=[];return l.forEach(function(f,h){var v=i.getRowCol(h,a),d=v.row,p=v.col,x=[{field:o,value:f,values:l}],m=(0,Sv.filter)(t,i.getFacetDataFilter(x)),_={type:i.cfg.type,data:m,region:i.getRegion(u,a,p,d),columnValue:f,rowValue:f,columnField:o,rowField:null,columnIndex:p,rowIndex:d,columnValuesLength:a,rowValuesLength:u,total:s};c.push(_)}),c},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1&&a.columnValuesLength*a.rowIndex+a.columnIndex+1+a.columnValuesLength<=a.total?(0,Cv.__assign)((0,Cv.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,Cv.__assign)((0,Cv.__assign)({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;(0,Sv.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,Sv.get)(t.cfg.title,"formatter"),l=(0,Sv.deepMix)({position:["50%","0%"],content:o?o(n):n},(0,fpt.getFactTitleConfig)(cpt.DIRECTION.TOP),t.cfg.title);a.annotation().text(l)})},r.prototype.getPageCount=function(t,i){return Math.floor((t+i-1)/i)},r.prototype.getRowCol=function(t,i){var n=Math.floor(t/i),a=t%i;return{row:n,col:a}},r}(hpt.Facet),dpt=xO.default=vpt,_O={};Object.defineProperty(_O,"__esModule",{value:!0});var eu=j,Gc=Y,Gk=Kt,zk=Ma,ppt=_o,gpt=function(e){(0,eu.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,Gc.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"matrix",showTitle:!1,columnTitle:(0,eu.__assign)({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,eu.__assign)({},e.prototype.getDefaultTitleCfg.call(this))})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){for(var i=this.cfg,n=i.fields,a=i.type,o=n.length,l=o,s=[],u=0;u=0;l--)for(var s=this.getFacetsByLevel(t,l),u=0,c=s;u-1?(0,Upt.isBetween)(d,c,f):!0}),this.view.render(!0)}},r.prototype.getComponents=function(){return this.slider?[this.slider]:[]},r.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},r}(qpt.Controller),Qpt=TO.default=Zpt,MO={};Object.defineProperty(MO,"__esModule",{value:!0});var oi=j,Kpt=mo,Jpt=Qn,tgt=Kr,Om=gs,mi=Kt,li=Y,egt=yr,Fm=0,tR=8,rgt=32,igt=20,ngt=function(e){(0,oi.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=li.noop,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=n.ratio,o=i.getValidScrollbarCfg().animate;i.ratio=(0,li.clamp)(a,0,1);var l=i.view.getOptions().animate;o||i.view.animate(!1),i.changeViewData(i.getScrollRange(),!0),i.view.animate(l)},i.container=i.view.getLayer(mi.LAYER.FORE).addGroup(),i.onChangeFn=(0,li.throttle)(i.onValueChange,20,{leading:!0}),i.trackLen=0,i.thumbLen=0,i.ratio=0,i.view.on(mi.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(mi.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(mi.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(mi.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.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)},r.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 i=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),a=this.scrollbar.component.getLayoutBBox(),o=new tgt.BBox(a.x,a.y,Math.min(a.width,i),a.height).expand(n),l=this.getScrollbarComponentCfg(),s=void 0,u=void 0;if(l.isHorizontal){var c=(0,Om.directionToPosition)(this.view.viewBBox,o,mi.DIRECTION.BOTTOM);c[0];var f=c[1],h=(0,Om.directionToPosition)(this.view.coordinateBBox,o,mi.DIRECTION.BOTTOM),v=h[0];h[1],s=v,u=f}else{var d=(0,Om.directionToPosition)(this.view.viewBBox,o,mi.DIRECTION.RIGHT);d[0];var f=d[1],p=(0,Om.directionToPosition)(this.view.viewBBox,o,mi.DIRECTION.RIGHT),v=p[0];p[1],s=v,u=f}s+=n[3],u+=n[0],this.trackLen?this.scrollbar.component.update((0,oi.__assign)((0,oi.__assign)({},l),{x:s,y:u,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,oi.__assign)((0,oi.__assign)({},l),{x:s,y:u})),this.view.viewBBox=this.view.viewBBox.cut(o,l.isHorizontal?mi.DIRECTION.BOTTOM:mi.DIRECTION.RIGHT)}},r.prototype.update=function(){this.render()},r.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},r.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=[]},r.prototype.setValue=function(t){this.onValueChange({ratio:t})},r.prototype.getValue=function(){return this.ratio},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,li.get)(t,["components","scrollbar","common"],{})},r.prototype.getScrollbarTheme=function(t){var i=(0,li.get)(this.view.getTheme(),["components","scrollbar"]),n=t||{},a=n.thumbHighlightColor,o=(0,oi.__rest)(n,["thumbHighlightColor"]);return{default:(0,li.deepMix)({},(0,li.get)(i,["default","style"],{}),o),hover:(0,li.deepMix)({},(0,li.get)(i,["hover","style"],{}),{thumbColor:a})}},r.prototype.measureScrollbar=function(){var t=this.view.getXScale(),i=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),a=n.trackLen,o=n.thumbLen;this.trackLen=a,this.thumbLen=o,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=i},r.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,li.clamp)(this.ratio,0,1)),i=Math.min(t+this.step-1,this.cnt-1);return[t,i]},r.prototype.changeViewData=function(t,i){var n=this,a=t[0],o=t[1],l=this.getValidScrollbarCfg().type,s=l!=="vertical",u=(0,li.valuesOfKey)(this.data,this.xScaleCfg.field),c=s?u:u.reverse();this.yScalesCfg.forEach(function(f){n.view.scale(f.field,{formatter:f.formatter,type:f.type,min:f.min,max:f.max})}),this.view.filter(this.xScaleCfg.field,function(f){var h=c.indexOf(f);return h>-1?(0,egt.isBetween)(h,a,o):!0}),this.view.render(!0)},r.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,i=t!=="vertical",n=new Jpt.Scrollbar((0,oi.__assign)((0,oi.__assign)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return n.init(),{component:n,layer:mi.LAYER.FORE,direction:i?mi.DIRECTION.BOTTOM:mi.DIRECTION.RIGHT,type:mi.COMPONENT_TYPE.SCROLLBAR}},r.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),i=this.trackLen?(0,oi.__assign)((0,oi.__assign)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,oi.__assign)({},t);return this.scrollbar.component.update(i),this.scrollbar},r.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,i=this.getValidScrollbarCfg(),n=i.type,a=i.categorySize,o=n!=="vertical";return Math.floor((o?t.width:t.height)/a)},r.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),i=this.getScrollbarData(),n=(0,li.valuesOfKey)(i,t.field);return(0,li.size)(n)},r.prototype.getScrollbarComponentCfg=function(){var t=this.view,i=t.coordinateBBox,n=t.viewBBox,a=this.getValidScrollbarCfg(),o=a.type,l=a.padding,s=a.width,u=a.height,c=a.style,f=o!=="vertical",h=l[0],v=l[1],d=l[2],p=l[3],x=f?{x:i.minX+p,y:n.maxY-u-d}:{x:n.maxX-s-v,y:i.minY+h},m=this.getStep(),_=this.getCnt(),b=f?i.width-p-v:i.height-h-d,w=Math.max(b*(0,li.clamp)(m/_,0,1),igt);return(0,oi.__assign)((0,oi.__assign)({},this.getThemeOptions()),{x:x.x,y:x.y,size:f?u:s,isHorizontal:f,trackLen:b,thumbLen:w,thumbOffset:0,theme:this.getScrollbarTheme(c)})},r.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:rgt,width:tR,height:tR,padding:[0,0,0,0],animate:!0,style:{}};return(0,li.isObject)(this.option)&&(t=(0,oi.__assign)((0,oi.__assign)({},t),this.option)),(!(0,li.isObject)(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[Fm,0,Fm,0]:[0,Fm,0,Fm]),t},r.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),i=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&i.type==="vertical"&&(n=(0,oi.__spreadArray)([],n,!0).reverse()),n},r}(Kpt.Controller);MO.default=ngt;var Kp={};Object.defineProperty(Kp,"__esModule",{value:!0});Kp.getItemsOfView=void 0;var b0=j,fn=Y,agt=mn,nS=Se,ogt=(0,b0.__importDefault)(Fr),lgt={fill:"#CCD6EC",opacity:.3};function dH(e,r,t){var i=(0,agt.findItemsFromViewRecurisive)(e,r,t);if(i.length){i=(0,fn.flatten)(i);for(var n=0,a=i;n1){for(var d=i[0],p=Math.abs(r.y-d[0].y),x=0,m=i;xv.maxY&&(v=W)):(W.minXv.maxX&&(v=W)),d.x=Math.min(W.minX,d.minX),d.y=Math.min(W.minY,d.minY),d.width=Math.max(W.maxX,d.maxX)-d.x,d.height=Math.max(W.maxY,d.maxY)-d.y});var p=i.backgroundGroup,x=i.coordinateBBox,m=void 0;if(f.isRect){var _=i.getXScale(),b=t||{},w=b.appendRatio,S=b.appendWidth;(0,fn.isNil)(S)&&(w=(0,fn.isNil)(w)?_.isLinear?0:.25:w,S=f.isTransposed?w*v.height:w*h.width);var M=void 0,O=void 0,F=void 0,L=void 0;f.isTransposed?(M=x.minX,O=Math.min(v.minY,h.minY)-S,F=x.width,L=d.height+S*2):(M=Math.min(h.minX,v.minX)-S,O=x.minY,F=d.width+S*2,L=x.height),m=[["M",M,O],["L",M+F,O],["L",M+F,O+L],["L",M,O+L],["Z"]]}else{var D=(0,fn.head)(u),R=(0,fn.last)(u),H=(0,nS.getAngle)(D.getModel(),f).startAngle,k=(0,nS.getAngle)(R.getModel(),f).endAngle,V=f.getCenter(),U=f.getRadius(),B=f.innerRadius*U;m=(0,nS.getSectorPath)(V.x,V.y,U,H,k,B)}if(this.regionPath)this.regionPath.attr("path",m),this.regionPath.show();else{var G=(0,fn.get)(t,"style",lgt);this.regionPath=p.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,b0.__assign)((0,b0.__assign)({},G),{path:m})})}}}},r.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},r.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),e.prototype.destroy.call(this)},r}(ogt.default),ugt=Kp.default=sgt,EO={},c_={};Object.defineProperty(c_,"__esModule",{value:!0});var pH=j,eR=Y,cgt=(0,pH.__importDefault)(Fr),fgt=function(e){(0,pH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.show=function(){var t=this.context,i=t.event,n=t.view,a=n.isTooltipLocked();if(!a){var o=this.timeStamp,l=+new Date,s=(0,eR.get)(t.view.getOptions(),"tooltip.showDelay",16);if(l-o>s){var u=this.location,c={x:i.x,y:i.y};(!u||!(0,eR.isEqual)(u,c))&&this.showTooltip(n,c),this.timeStamp=l,this.location=c}}},r.prototype.hide=function(){var t=this.context.view,i=t.getController("tooltip"),n=this.context.event,a=n.clientX,o=n.clientY;i.isCursorEntered({x:a,y:o})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},r.prototype.showTooltip=function(t,i){t.showTooltip(i)},r.prototype.hideTooltip=function(t){t.hideTooltip()},r}(cgt.default),gH=c_.default=fgt;Object.defineProperty(EO,"__esModule",{value:!0});var yH=j,rR=Y,aS=xt,hgt=(0,yH.__importDefault)(c_),vgt=function(e){(0,yH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.showTooltip=function(t,i){var n=(0,aS.getSilbings)(t);(0,rR.each)(n,function(a){var o=(0,aS.getSiblingPoint)(t,a,i);a.showTooltip(o)})},r.prototype.hideTooltip=function(t){var i=(0,aS.getSilbings)(t);(0,rR.each)(i,function(n){n.hideTooltip()})},r}(hgt.default),dgt=EO.default=vgt,OO={};Object.defineProperty(OO,"__esModule",{value:!0});var w0=j,oS=Y,iR=b1,pgt=(0,w0.__importDefault)(Fr),ggt=Qn,ygt=function(e){(0,w0.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.show=function(){var t=this.context,i=t.event,n=this.timeStamp,a=+new Date;if(a-n>16){var o=this.location,l={x:i.x,y:i.y};(!o||!(0,oS.isEqual)(o,l))&&this.showTooltip(l),this.timeStamp=a,this.location=l}},r.prototype.hide=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var i=this.context,n=i.event,a=n.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=a.get("tip");this.tooltip.update((0,w0.__assign)({title:o},t)),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=this.context.view,n=i.canvas,a={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=i.getTheme(),l=(0,oS.get)(o,["components","tooltip","domStyles"],{}),s=new ggt.HtmlTooltip({parent:n.get("el").parentNode,region:a,visible:!1,crosshairs:null,domStyles:(0,w0.__assign)({},(0,oS.deepMix)({},l,(t={},t[iR.TOOLTIP_CSS_CONST.CONTAINER_CLASS]={"max-width":"50%"},t[iR.TOOLTIP_CSS_CONST.TITLE_CLASS]={"word-break":"break-all"},t)))});s.init(),s.setCapture(!1),this.tooltip=s},r}(pgt.default),mgt=OO.default=ygt,FO={},Jp={},tg={};Object.defineProperty(tg,"__esModule",{value:!0});var mH=j,xgt=Y,_gt=(0,mH.__importDefault)(Fr),bgt=xt,wgt=function(e){(0,mH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t}return r.prototype.hasState=function(t){return t.hasState(this.stateName)},r.prototype.setElementState=function(t,i){t.setState(this.stateName,i)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},r.prototype.clearViewState=function(t){var i=this,n=(0,bgt.getElementsByState)(t,this.stateName);(0,xgt.each)(n,function(a){i.setElementState(a,!1)})},r}(_gt.default);tg.default=wgt;Object.defineProperty(Jp,"__esModule",{value:!0});var xH=j,sT=Y,Fl=xt,Cgt=(0,xH.__importDefault)(tg);function nR(e){return(0,sT.get)(e.get("delegateObject"),"item")}var Sgt=function(e){(0,xH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return r.prototype.isItemIgnore=function(t,i){var n=this.ignoreListItemStates,a=n.filter(function(o){return i.hasState(t,o)});return!!a.length},r.prototype.setStateByComponent=function(t,i,n){var a=this.context.view,o=t.get("field"),l=(0,Fl.getElements)(a);this.setElementsStateByItem(l,o,i,n)},r.prototype.setStateByElement=function(t,i){this.setElementState(t,i)},r.prototype.isMathItem=function(t,i,n){var a=this.context.view,o=(0,Fl.getScaleByField)(a,i),l=(0,Fl.getElementValue)(t,i);return!(0,sT.isNil)(l)&&n.name===o.getText(l)},r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this;(0,sT.each)(t,function(l){o.isMathItem(l,i,n)&&l.setState(o.stateName,a)})},r.prototype.setStateEnable=function(t){var i=(0,Fl.getCurrentElement)(this.context);if(i)(0,Fl.isElementChange)(this.context)&&this.setStateByElement(i,t);else{var n=(0,Fl.getDelegationObject)(this.context);if((0,Fl.isList)(n)){var a=n.item,o=n.component;if(a&&o&&!this.isItemIgnore(a,o)){var l=this.context.event.gEvent;if(l&&l.fromShape&&l.toShape&&nR(l.fromShape)===nR(l.toShape))return;this.setStateByComponent(o,a,t)}}}},r.prototype.toggle=function(){var t=(0,Fl.getCurrentElement)(this.context);if(t){var i=t.hasState(this.stateName);this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(Cgt.default);Jp.default=Sgt;Object.defineProperty(FO,"__esModule",{value:!0});var _H=j,Agt=(0,_H.__importDefault)(Jp),Tgt=function(e){(0,_H.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(Agt.default),Mgt=FO.default=Tgt,PO={};Object.defineProperty(PO,"__esModule",{value:!0});var C0=j,Egt=(0,C0.__importDefault)(Fr),Mv=xt,lS=Y,Ogt=function(e){(0,C0.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.cache={},t}return r.prototype.getColorScale=function(t,i){var n=i.geometry.getAttribute("color");if(!n)return null;var a=t.getScaleByField(n.getFields()[0]);return a},r.prototype.getLinkPath=function(t,i){var n=this.context.view,a=n.getCoordinate().isTransposed,o=t.shape.getCanvasBBox(),l=i.shape.getCanvasBBox(),s=a?[["M",o.minX,o.minY],["L",l.minX,l.maxY],["L",l.maxX,l.maxY],["L",o.maxX,o.minY],["Z"]]:[["M",o.maxX,o.minY],["L",l.minX,l.minY],["L",l.minX,l.maxY],["L",o.maxX,o.maxY],["Z"]];return s},r.prototype.addLinkShape=function(t,i,n,a){var o={opacity:.4,fill:i.shape.attr("fill")};t.addShape({type:"path",attrs:(0,C0.__assign)((0,C0.__assign)({},(0,lS.deepMix)({},o,(0,lS.isFunction)(a)?a(o,i):a)),{path:this.getLinkPath(i,n)})})},r.prototype.linkByElement=function(t,i){var n=this,a=this.context.view,o=this.getColorScale(a,t);if(!!o){var l=(0,Mv.getElementValue)(t,o.field);if(!this.cache[l]){var s=(0,Mv.getElementsByField)(a,o.field,l),u=this.linkGroup,c=u.addGroup();this.cache[l]=c;var f=s.length;(0,lS.each)(s,function(h,v){if(v=0},i)},r}(Zgt.default),OH=ng.default=Qgt,kO={};Object.defineProperty(kO,"__esModule",{value:!0});var FH=j,Kgt=xt,oR=ys,Jgt=(0,FH.__importDefault)(rg),tyt=function(e){(0,FH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.highlight=function(){this.setState()},r.prototype.setElementState=function(t,i){var n=this.context.view,a=(0,Kgt.getElements)(n);(0,oR.setHighlightBy)(a,function(o){return t===o},i)},r.prototype.clear=function(){var t=this.context.view;(0,oR.clearHighlight)(t)},r}(Jgt.default),eyt=kO.default=tyt,RO={};Object.defineProperty(RO,"__esModule",{value:!0});var PH=j,ryt=(0,PH.__importDefault)(eg),iyt=function(e){(0,PH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(ryt.default),nyt=RO.default=iyt,BO={};Object.defineProperty(BO,"__esModule",{value:!0});var IH=j,ayt=(0,IH.__importDefault)(Jp),oyt=function(e){(0,IH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(ayt.default),lyt=BO.default=oyt,NO={};Object.defineProperty(NO,"__esModule",{value:!0});var LH=j,syt=(0,LH.__importDefault)(rg),uyt=function(e){(0,LH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(syt.default),cyt=NO.default=uyt,GO={},fc={};Object.defineProperty(fc,"__esModule",{value:!0});var DH=j,Dm=Y,fyt=(0,DH.__importDefault)(Fr),hyt=xt,Pl=xt,vyt=function(e){(0,DH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return r.prototype.getTriggerListInfo=function(){var t=(0,Pl.getDelegationObject)(this.context),i=null;return(0,Pl.isList)(t)&&(i={item:t.item,list:t.component}),i},r.prototype.getAllowComponents=function(){var t=this,i=this.context.view,n=(0,hyt.getComponents)(i),a=[];return(0,Dm.each)(n,function(o){o.isList()&&t.allowSetStateByElement(o)&&a.push(o)}),a},r.prototype.hasState=function(t,i){return t.hasState(i,this.stateName)},r.prototype.clearAllComponentsState=function(){var t=this,i=this.getAllowComponents();(0,Dm.each)(i,function(n){n.clearItemsState(t.stateName)})},r.prototype.allowSetStateByElement=function(t){var i=t.get("field");if(!i)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(this.cfg.componentNames.indexOf(n)===-1)return!1}var a=this.context.view,o=(0,Pl.getScaleByField)(a,i);return o&&o.isCategory},r.prototype.allowSetStateByItem=function(t,i){var n=this.ignoreItemStates;if(n.length){var a=n.filter(function(o){return i.hasState(t,o)});return a.length===0}return!0},r.prototype.setStateByElement=function(t,i,n){var a=t.get("field"),o=this.context.view,l=(0,Pl.getScaleByField)(o,a),s=(0,Pl.getElementValue)(i,a),u=l.getText(s);this.setItemsState(t,u,n)},r.prototype.setStateEnable=function(t){var i=this,n=(0,Pl.getCurrentElement)(this.context);if(n){var a=this.getAllowComponents();(0,Dm.each)(a,function(u){i.setStateByElement(u,n,t)})}else{var o=(0,Pl.getDelegationObject)(this.context);if((0,Pl.isList)(o)){var l=o.item,s=o.component;this.allowSetStateByElement(s)&&this.allowSetStateByItem(l,s)&&this.setItemState(s,l,t)}}},r.prototype.setItemsState=function(t,i,n){var a=this,o=t.getItems();(0,Dm.each)(o,function(l){l.name===i&&a.setItemState(t,l,n)})},r.prototype.setItemState=function(t,i,n){t.setItemState(i,this.stateName,n)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.reset=function(){this.setStateEnable(!1)},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=this.hasState(i,n);this.setItemState(i,n,!a)}},r.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},r}(fyt.default);fc.default=vyt;Object.defineProperty(GO,"__esModule",{value:!0});var $H=j,dyt=(0,$H.__importDefault)(fc),pyt=function(e){(0,$H.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(dyt.default),gyt=GO.default=pyt,zO={},f_={};Object.defineProperty(f_,"__esModule",{value:!0});f_.clearList=void 0;var yyt=Y,lR="inactive",sR="active";function myt(e){var r=e.getItems();(0,yyt.each)(r,function(t){e.hasState(t,sR)&&e.setItemState(t,sR,!1),e.hasState(t,lR)&&e.setItemState(t,lR,!1)})}f_.clearList=myt;Object.defineProperty(zO,"__esModule",{value:!0});var kH=j,$m=Y,xyt=f_,_yt=(0,kH.__importDefault)(fc),Ev="inactive",au="active",byt=function(e){(0,kH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=au,t.ignoreItemStates=["unchecked"],t}return r.prototype.setItemsState=function(t,i,n){this.setHighlightBy(t,function(a){return a.name===i},n)},r.prototype.setItemState=function(t,i,n){t.getItems(),this.setHighlightBy(t,function(a){return a===i},n)},r.prototype.setHighlightBy=function(t,i,n){var a=t.getItems();if(n)(0,$m.each)(a,function(s){i(s)?(t.hasState(s,Ev)&&t.setItemState(s,Ev,!1),t.setItemState(s,au,!0)):t.hasState(s,au)||t.setItemState(s,Ev,!0)});else{var o=t.getItemsByState(au),l=!0;(0,$m.each)(o,function(s){if(!i(s))return l=!1,!1}),l?this.clear():(0,$m.each)(a,function(s){i(s)&&(t.hasState(s,au)&&t.setItemState(s,au,!1),t.setItemState(s,Ev,!0))})}},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)(0,xyt.clearList)(t.list);else{var i=this.getAllowComponents();(0,$m.each)(i,function(n){n.clearItemsState(au),n.clearItemsState(Ev)})}},r}(_yt.default),RH=zO.default=byt,VO={};Object.defineProperty(VO,"__esModule",{value:!0});var BH=j,wyt=(0,BH.__importDefault)(fc),Cyt=function(e){(0,BH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(wyt.default),Syt=VO.default=Cyt,jO={};Object.defineProperty(jO,"__esModule",{value:!0});var NH=j,Ayt=(0,NH.__importDefault)(fc),Tyt=function(e){(0,NH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="unchecked",t}return r.prototype.unchecked=function(){this.setState()},r}(Ayt.default),Myt=jO.default=Tyt,HO={};Object.defineProperty(HO,"__esModule",{value:!0});var GH=j,cS=Y,Eyt=(0,GH.__importDefault)(fc),Vc="unchecked",km="checked",Oyt=function(e){(0,GH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=km,t}return r.prototype.setItemState=function(t,i,n){this.setCheckedBy(t,function(a){return a===i},n)},r.prototype.setCheckedBy=function(t,i,n){var a=t.getItems();n&&(0,cS.each)(a,function(o){i(o)?(t.hasState(o,Vc)&&t.setItemState(o,Vc,!1),t.setItemState(o,km,!0)):t.hasState(o,km)||t.setItemState(o,Vc,!0)})},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=!(0,cS.some)(i.getItems(),function(o){return i.hasState(o,Vc)});a||i.hasState(n,Vc)?this.setItemState(i,n,!0):this.reset()}},r.prototype.checked=function(){this.setState()},r.prototype.reset=function(){var t=this.getAllowComponents();(0,cS.each)(t,function(i){i.clearItemsState(km),i.clearItemsState(Vc)})},r}(Eyt.default);HO.default=Oyt;var YO={},ag={};Object.defineProperty(ag,"__esModule",{value:!0});var uT=j,uR=Y,Fyt=(0,uT.__importDefault)(Fr),Pyt=function(e){(0,uT.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.emitEvent=function(t){var i="mask:"+t,n=this.context.view,a=this.context.event;n.emit(i,{target:this.maskShape,shape:this.maskShape,points:this.points,x:a.x,y:a.y})},r.prototype.createMask=function(){var t=this.context.view,i=this.getMaskAttrs(),n=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,uT.__assign)({fill:"#C5D4EB",opacity:.3},i)});return n},r.prototype.getMaskPath=function(){return[]},r.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},r.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(t==null?void 0:t.maskStyle),this.emitEvent("start")},r.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},r.prototype.move=function(){if(!(!this.moving||!this.maskShape)){var t=this.getCurrentPoint(),i=this.preMovePoint,n=t.x-i.x,a=t.y-i.y,o=this.points;(0,uR.each)(o,function(l){l.x+=n,l.y+=a}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},r.prototype.updateMask=function(t){var i=(0,uR.deepMix)({},this.getMaskAttrs(),t);this.maskShape.attr(i)},r.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},r.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},r.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},r.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},r.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,e.prototype.destroy.call(this)},r}(Fyt.default);ag.default=Pyt;Object.defineProperty(YO,"__esModule",{value:!0});var zH=j,Iyt=Y,Lyt=xt,Dyt=(0,zH.__importDefault)(ag),$yt=function(e){(0,zH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="circle",t}return r.prototype.getMaskAttrs=function(){var t=this.points,i=(0,Iyt.last)(this.points),n=0,a=0,o=0;if(t.length){var l=t[0];n=(0,Lyt.distance)(l,i)/2,a=(i.x+l.x)/2,o=(i.y+l.y)/2}return{x:a,y:o,r:n}},r}(Dyt.default);YO.default=$yt;var WO={},h_={};Object.defineProperty(h_,"__esModule",{value:!0});var VH=j,cR=Y,kyt=(0,VH.__importDefault)(ag),Ryt=function(e){(0,VH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return r.prototype.getRegion=function(){var t=this.points;return{start:(0,cR.head)(t),end:(0,cR.last)(t)}},r.prototype.getMaskAttrs=function(){var t=this.getRegion(),i=t.start,n=t.end,a=Math.min(i.x,n.x),o=Math.min(i.y,n.y),l=Math.abs(n.x-i.x),s=Math.abs(n.y-i.y);return{x:a,y:o,width:l,height:s}},r}(kyt.default);h_.default=Ryt;Object.defineProperty(WO,"__esModule",{value:!0});var jH=j,hx=Y,Byt=(0,jH.__importDefault)(h_);function fR(e){e.x=(0,hx.clamp)(e.x,0,1),e.y=(0,hx.clamp)(e.y,0,1)}var Nyt=function(e){(0,jH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return r.prototype.getRegion=function(){var t=null,i=null,n=this.points,a=this.dim,o=this.context.view.getCoordinate(),l=o.invert((0,hx.head)(n)),s=o.invert((0,hx.last)(n));return this.inPlot&&(fR(l),fR(s)),a==="x"?(t=o.convert({x:l.x,y:0}),i=o.convert({x:s.x,y:1})):(t=o.convert({x:0,y:l.y}),i=o.convert({x:1,y:s.y})),{start:t,end:i}},r}(Byt.default);WO.default=Nyt;var v_={};Object.defineProperty(v_,"__esModule",{value:!0});var HH=j,Gyt=Y,zyt=(0,HH.__importDefault)(ag),Vyt=function(e){(0,HH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points,i=[];return t.length&&((0,Gyt.each)(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i.push(["L",t[0].x,t[0].y])),i},r.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},r.prototype.addPoint=function(){this.resize()},r}(zyt.default);v_.default=Vyt;var XO={};Object.defineProperty(XO,"__esModule",{value:!0});var YH=j,jyt=xt,Hyt=(0,YH.__importDefault)(v_),Yyt=function(e){(0,YH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points;return(0,jyt.getSpline)(t,!0)},r}(Hyt.default);XO.default=Yyt;var UO={};Object.defineProperty(UO,"__esModule",{value:!0});var WH=j,Wyt=(0,WH.__importDefault)(Fr),Xyt=function(e){(0,WH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setCursor=function(t){var i=this.context.view;i.getCanvas().setCursor(t)},r.prototype.default=function(){this.setCursor("default")},r.prototype.pointer=function(){this.setCursor("pointer")},r.prototype.move=function(){this.setCursor("move")},r.prototype.crosshair=function(){this.setCursor("crosshair")},r.prototype.wait=function(){this.setCursor("wait")},r.prototype.help=function(){this.setCursor("help")},r.prototype.text=function(){this.setCursor("text")},r.prototype.eResize=function(){this.setCursor("e-resize")},r.prototype.wResize=function(){this.setCursor("w-resize")},r.prototype.nResize=function(){this.setCursor("n-resize")},r.prototype.sResize=function(){this.setCursor("s-resize")},r.prototype.neResize=function(){this.setCursor("ne-resize")},r.prototype.nwResize=function(){this.setCursor("nw-resize")},r.prototype.seResize=function(){this.setCursor("se-resize")},r.prototype.swResize=function(){this.setCursor("sw-resize")},r.prototype.nsResize=function(){this.setCursor("ns-resize")},r.prototype.ewResize=function(){this.setCursor("ew-resize")},r}(Wyt.default),Uyt=UO.default=Xyt,qO={};Object.defineProperty(qO,"__esModule",{value:!0});var XH=j,qyt=Y,Zyt=(0,XH.__importDefault)(Fr),Rm=xt,Qyt=function(e){(0,XH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=this;t.getScaleByField(i)&&t.filter(i,n),t.views&&t.views.length&&(0,qyt.each)(t.views,function(o){a.filterView(o,i,n)})},r.prototype.filter=function(){var t=(0,Rm.getDelegationObject)(this.context);if(t){var i=this.context.view,n=t.component,a=n.get("field");if((0,Rm.isList)(t)){if(a){var o=n.getItemsByState("unchecked"),l=(0,Rm.getScaleByField)(i,a),s=o.map(function(h){return h.name});s.length?this.filterView(i,a,function(h){var v=l.getText(h);return!s.includes(v)}):this.filterView(i,a,null),i.render(!0)}}else if((0,Rm.isSlider)(t)){var u=n.getValue(),c=u[0],f=u[1];this.filterView(i,a,function(h){return h>=c&&h<=f}),i.render(!0)}}},r}(Zyt.default),Kyt=qO.default=Qyt,Lh={};Object.defineProperty(Lh,"__esModule",{value:!0});Lh.BRUSH_FILTER_EVENTS=void 0;var UH=j,Bm=Af,Jyt=(0,UH.__importDefault)(Fr),tmt=xt;function hR(e,r,t,i){var n=Math.min(t[r],i[r]),a=Math.max(t[r],i[r]),o=e.range,l=o[0],s=o[1];if(ns&&(a=s),n===s&&a===s)return null;var u=e.invert(n),c=e.invert(a);if(e.isCategory){var f=e.values.indexOf(u),h=e.values.indexOf(c),v=e.values.slice(f,h+1);return function(d){return v.includes(d)}}else return function(d){return d>=u&&d<=c}}var cn;(function(e){e.FILTER="brush-filter-processing",e.RESET="brush-filter-reset",e.BEFORE_FILTER="brush-filter:beforefilter",e.AFTER_FILTER="brush-filter:afterfilter",e.BEFORE_RESET="brush-filter:beforereset",e.AFTER_RESET="brush-filter:afterreset"})(cn||(cn={}));Lh.BRUSH_FILTER_EVENTS=cn;var emt=function(e){(0,UH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},r.prototype.filter=function(){var t,i;if((0,tmt.isMask)(this.context)){var n=this.context.event.target,a=n.getCanvasBBox();t={x:a.x,y:a.y},i={x:a.maxX,y:a.maxY}}else{if(!this.isStarted)return;t=this.startPoint,i=this.context.getCurrentPoint()}if(!(Math.abs(t.x-i.x)<5||Math.abs(t.x-i.y)<5)){var o=this.context,l=o.view,s=o.event,u={view:l,event:s,dims:this.dims};l.emit(cn.BEFORE_FILTER,Bm.Event.fromData(l,cn.BEFORE_FILTER,u));var c=l.getCoordinate(),f=c.invert(i),h=c.invert(t);if(this.hasDim("x")){var v=l.getXScale(),d=hR(v,"x",f,h);this.filterView(l,v.field,d)}if(this.hasDim("y")){var p=l.getYScales()[0],d=hR(p,"y",f,h);this.filterView(l,p.field,d)}this.reRender(l,{source:cn.FILTER}),l.emit(cn.AFTER_FILTER,Bm.Event.fromData(l,cn.AFTER_FILTER,u))}},r.prototype.end=function(){this.isStarted=!1},r.prototype.reset=function(){var t=this.context.view;if(t.emit(cn.BEFORE_RESET,Bm.Event.fromData(t,cn.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var i=t.getXScale();this.filterView(t,i.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:cn.RESET}),t.emit(cn.AFTER_RESET,Bm.Event.fromData(t,cn.AFTER_RESET,{}))},r.prototype.filterView=function(t,i,n){t.filter(i,n)},r.prototype.reRender=function(t,i){t.render(!0,i)},r}(Jyt.default);Lh.default=emt;var ZO={};Object.defineProperty(ZO,"__esModule",{value:!0});var qH=j,vR=Y,rmt=(0,qH.__importDefault)(Lh),dR=xt,imt=function(e){(0,qH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=(0,dR.getSilbings)(t);(0,vR.each)(a,function(o){o.filter(i,n)})},r.prototype.reRender=function(t){var i=(0,dR.getSilbings)(t);(0,vR.each)(i,function(n){n.render(!0)})},r}(rmt.default);ZO.default=imt;var QO={};Object.defineProperty(QO,"__esModule",{value:!0});var ZH=j,Nm=Y,nmt=(0,ZH.__importDefault)(Fr),Ya=xt,amt=function(e){(0,ZH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filter=function(){var t=(0,Ya.getDelegationObject)(this.context),i=this.context.view,n=(0,Ya.getElements)(i);if((0,Ya.isMask)(this.context)){var a=(0,Ya.getMaskedElements)(this.context,10);a&&(0,Nm.each)(n,function(d){a.includes(d)?d.show():d.hide()})}else if(t){var o=t.component,l=o.get("field");if((0,Ya.isList)(t)){if(l){var s=o.getItemsByState("unchecked"),u=(0,Ya.getScaleByField)(i,l),c=s.map(function(d){return d.name});(0,Nm.each)(n,function(d){var p=(0,Ya.getElementValue)(d,l),x=u.getText(p);c.indexOf(x)>=0?d.hide():d.show()})}}else if((0,Ya.isSlider)(t)){var f=o.getValue(),h=f[0],v=f[1];(0,Nm.each)(n,function(d){var p=(0,Ya.getElementValue)(d,l);p>=h&&p<=v?d.show():d.hide()})}}},r.prototype.clear=function(){var t=(0,Ya.getElements)(this.context.view);(0,Nm.each)(t,function(i){i.show()})},r.prototype.reset=function(){this.clear()},r}(nmt.default);QO.default=amt;var KO={};Object.defineProperty(KO,"__esModule",{value:!0});var QH=j,jc=Y,omt=(0,QH.__importDefault)(Fr),Wa=xt,lmt=function(e){(0,QH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.byRecord=!1,t}return r.prototype.filter=function(){(0,Wa.isMask)(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},r.prototype.filterByRecord=function(){var t=this.context.view,i=(0,Wa.getMaskedElements)(this.context,10);if(!!i){var n=t.getXScale().field,a=t.getYScales()[0].field,o=i.map(function(s){return s.getModel().data}),l=(0,Wa.getSilbings)(t);(0,jc.each)(l,function(s){var u=(0,Wa.getElements)(s);(0,jc.each)(u,function(c){var f=c.getModel().data;(0,Wa.isInRecords)(o,f,n,a)?c.show():c.hide()})})}},r.prototype.filterByBBox=function(){var t=this,i=this.context.view,n=(0,Wa.getSilbings)(i);(0,jc.each)(n,function(a){var o=(0,Wa.getSiblingMaskElements)(t.context,a,10),l=(0,Wa.getElements)(a);o&&(0,jc.each)(l,function(s){o.includes(s)?s.show():s.hide()})})},r.prototype.reset=function(){var t=(0,Wa.getSilbings)(this.context.view);(0,jc.each)(t,function(i){var n=(0,Wa.getElements)(i);(0,jc.each)(n,function(a){a.show()})})},r}(omt.default);KO.default=lmt;var JO={};Object.defineProperty(JO,"__esModule",{value:!0});var S0=j,smt=ta,umt=Y,cmt=ps,fmt=(0,S0.__importDefault)(Fr),hmt=10,vmt=5,dmt=function(e){(0,S0.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.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"}},t}return r.prototype.getButtonCfg=function(){return(0,umt.deepMix)(this.buttonCfg,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),n=i.addShape({type:"text",name:"button-text",attrs:(0,S0.__assign)({text:t.text},t.textStyle)}),a=n.getBBox(),o=(0,cmt.parsePadding)(t.padding),l=i.addShape({type:"rect",name:"button-rect",attrs:(0,S0.__assign)({x:a.x-o[3],y:a.y-o[0],width:a.width+o[1]+o[3],height:a.height+o[0]+o[2]},t.style)});l.toBack(),i.on("mouseenter",function(){l.attr(t.activeStyle)}),i.on("mouseleave",function(){l.attr(t.style)}),this.buttonGroup=i},r.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),n=i.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),l=smt.ext.transform(null,[["t",n.x-o.width-hmt,n.y+o.height+vmt]]);a.setMatrix(l)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(fmt.default);JO.default=dmt;var tF={};Object.defineProperty(tF,"__esModule",{value:!0});var KH=j,pmt=(0,KH.__importDefault)(Fr),gmt=xt,ymt=4,mmt=function(e){(0,KH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},r.prototype.drag=function(){if(!!this.startPoint){var t=this.context.getCurrentPoint(),i=this.context.view,n=this.context.event;this.dragStart?i.emit("drag",{target:n.target,x:n.x,y:n.y}):(0,gmt.distance)(t,this.startPoint)>ymt&&(i.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},r.prototype.end=function(){if(this.dragStart){var t=this.context.view,i=this.context.event;t.emit("dragend",{target:i.target,x:i.x,y:i.y})}this.starting=!1,this.dragStart=!1},r}(pmt.default);tF.default=mmt;var eF={};Object.defineProperty(eF,"__esModule",{value:!0});var xmt=j,_mt=ta,bmt=Gp,wmt=xt,Cmt=5,Smt=function(e){(0,xmt.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},r.prototype.move=function(){if(!!this.starting){var t=this.startPoint,i=this.context.getCurrentPoint(),n=(0,wmt.distance)(t,i);if(n>Cmt&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var a=this.context.view,o=_mt.ext.transform(this.startMatrix,[["t",i.x-t.x,i.y-t.y]]);a.backgroundGroup.setMatrix(o),a.foregroundGroup.setMatrix(o),a.middleGroup.setMatrix(o)}}},r.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},r.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},r}(bmt.Action);eF.default=Smt;var rF={},d_={};Object.defineProperty(d_,"__esModule",{value:!0});var Amt=j,Tmt=Gp,pR="x",gR="y",Mmt=function(e){(0,Amt.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=[pR,gR],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.getScale=function(t){var i=this.context.view;return t==="x"?i.getXScale():i.getYScales()[0]},r.prototype.resetDim=function(t){var i=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);i.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},r.prototype.reset=function(){this.resetDim(pR),this.resetDim(gR);var t=this.context.view;t.render(!0)},r}(Tmt.Action);d_.default=Mmt;Object.defineProperty(rF,"__esModule",{value:!0});var JH=j,yR=Y,Emt=(0,JH.__importDefault)(d_),Omt=function(e){(0,JH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return r.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var i=this.dims;(0,yR.each)(i,function(n){var a=t.getScale(n),o=a.min,l=a.max,s=a.values;t.startCache[n]={min:o,max:l,values:s}})},r.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},r.prototype.translate=function(){var t=this;if(!!this.starting){var i=this.startPoint,n=this.context.view.getCoordinate(),a=this.context.getCurrentPoint(),o=n.invert(i),l=n.invert(a),s=l.x-o.x,u=l.y-o.y,c=this.context.view,f=this.dims;(0,yR.each)(f,function(h){t.translateDim(h,{x:s*-1,y:u*-1})}),c.render(!0)}},r.prototype.translateDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,i)}},r.prototype.translateLinear=function(t,i,n){var a=this.context.view,o=this.startCache[t],l=o.min,s=o.max,u=s-l,c=n[t]*u;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:l,max:s}),a.scale(i.field,{nice:!1,min:l+c,max:s+c})},r.prototype.reset=function(){e.prototype.reset.call(this),this.startPoint=null,this.starting=!1},r}(Emt.default);rF.default=Omt;var iF={};Object.defineProperty(iF,"__esModule",{value:!0});var tY=j,Fmt=Y,Pmt=(0,tY.__importDefault)(d_),Imt=function(e){(0,tY.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.zoomRatio=.05,t}return r.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},r.prototype.zoom=function(t){var i=this,n=this.dims;(0,Fmt.each)(n,function(a){i.zoomDim(a,t)}),this.context.view.render(!0)},r.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},r.prototype.zoomDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,i)}},r.prototype.zoomLinear=function(t,i,n){var a=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:i.min,max:i.max});var o=this.cacheScaleDefs[t],l=o.max-o.min,s=i.min,u=i.max,c=n*l,f=s-c,h=u+c,v=h-f,d=v/l;h>f&&d<100&&d>.01&&a.scale(i.field,{nice:!1,min:s-c,max:u+c})},r}(Pmt.default);iF.default=Imt;var nF={};Object.defineProperty(nF,"__esModule",{value:!0});var Lmt=j,Gm=Y,Dmt=Gp;function $mt(e){var r=e.gEvent.originalEvent;return r.deltaY>0}var kmt=1,Rmt=function(e){(0,Lmt.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.scroll=function(t){var i=this.context,n=i.view,a=i.event;if(!!n.getOptions().scrollbar){var o=(t==null?void 0:t.wheelDelta)||kmt,l=n.getController("scrollbar"),s=n.getXScale(),u=n.getOptions().data,c=(0,Gm.size)((0,Gm.valuesOfKey)(u,s.field)),f=(0,Gm.size)(s.values),h=l.getValue(),v=Math.floor((c-f)*h),d=v+($mt(a)?o:-o),p=o/(c-f)/1e4,x=(0,Gm.clamp)(d/(c-f)+p,0,1);l.setValue(x)}},r}(Dmt.Action);nF.default=Rmt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ELEMENT_RANGE_HIGHLIGHT_EVENTS=e.BRUSH_FILTER_EVENTS=e.VIEW_LIFE_CIRCLE=void 0;var r=j,t=ut,i=eO,n=zp;(0,t.registerTheme)("dark",(0,n.createThemeByStyleSheet)(i.antvDark));var a=(0,r.__importStar)(uj),o=(0,r.__importStar)(Yct),l=ut;(0,l.registerEngine)("canvas",a),(0,l.registerEngine)("svg",o);var s=ut,u=(0,r.__importDefault)(iO),c=(0,r.__importDefault)(lO),f=(0,r.__importDefault)(sO),h=(0,r.__importDefault)(uO),v=(0,r.__importDefault)(cO),d=(0,r.__importDefault)(qp),p=(0,r.__importDefault)(fO),x=(0,r.__importDefault)(hO),m=(0,r.__importDefault)(vO),_=(0,r.__importDefault)(dO);(0,s.registerGeometry)("Polygon",x.default),(0,s.registerGeometry)("Interval",h.default),(0,s.registerGeometry)("Schema",m.default),(0,s.registerGeometry)("Path",d.default),(0,s.registerGeometry)("Point",p.default),(0,s.registerGeometry)("Line",v.default),(0,s.registerGeometry)("Area",u.default),(0,s.registerGeometry)("Edge",c.default),(0,s.registerGeometry)("Heatmap",f.default),(0,s.registerGeometry)("Violin",_.default);var b=ut,w=(0,r.__importDefault)(Fh),S=(0,r.__importDefault)(gO),M=(0,r.__importDefault)(yO),O=(0,r.__importDefault)(q1);(0,b.registerGeometryLabel)("base",w.default),(0,b.registerGeometryLabel)("interval",S.default),(0,b.registerGeometryLabel)("pie",M.default),(0,b.registerGeometryLabel)("polar",O.default);var F=ut,L=Z1,D=Q1,R=K1,H=J1,k=t_,V=Uf,U=e_,B=r_,G=n_,N=a_,W=o_,q=l_,tt=s_;(0,F.registerGeometryLabelLayout)("overlap",V.overlap),(0,F.registerGeometryLabelLayout)("distribute",L.distribute),(0,F.registerGeometryLabelLayout)("fixed-overlap",V.fixedOverlap),(0,F.registerGeometryLabelLayout)("hide-overlap",U.hideOverlap),(0,F.registerGeometryLabelLayout)("limit-in-shape",k.limitInShape),(0,F.registerGeometryLabelLayout)("limit-in-canvas",H.limitInCanvas),(0,F.registerGeometryLabelLayout)("limit-in-plot",tt.limitInPlot),(0,F.registerGeometryLabelLayout)("pie-outer",D.pieOuterLabelLayout),(0,F.registerGeometryLabelLayout)("adjust-color",B.adjustColor),(0,F.registerGeometryLabelLayout)("interval-adjust-position",G.intervalAdjustPosition),(0,F.registerGeometryLabelLayout)("interval-hide-overlap",N.intervalHideOverlap),(0,F.registerGeometryLabelLayout)("point-adjust-position",W.pointAdjustPosition),(0,F.registerGeometryLabelLayout)("pie-spider",R.pieSpiderLabelLayout),(0,F.registerGeometryLabelLayout)("path-adjust-position",q.pathAdjustPosition);var ot=jf,st=Kl,Z=Y1,et=W1,lt=Yf,dt=X1,ht=U1,wt=Xf,gt=ut;(0,gt.registerAnimation)("fade-in",ot.fadeIn),(0,gt.registerAnimation)("fade-out",ot.fadeOut),(0,gt.registerAnimation)("grow-in-x",st.growInX),(0,gt.registerAnimation)("grow-in-xy",st.growInXY),(0,gt.registerAnimation)("grow-in-y",st.growInY),(0,gt.registerAnimation)("scale-in-x",lt.scaleInX),(0,gt.registerAnimation)("scale-in-y",lt.scaleInY),(0,gt.registerAnimation)("wave-in",ht.waveIn),(0,gt.registerAnimation)("zoom-in",wt.zoomIn),(0,gt.registerAnimation)("zoom-out",wt.zoomOut),(0,gt.registerAnimation)("position-update",et.positionUpdate),(0,gt.registerAnimation)("sector-path-update",dt.sectorPathUpdate),(0,gt.registerAnimation)("path-in",Z.pathIn);var vt=ut,_t=(0,r.__importDefault)(mO),Bt=(0,r.__importDefault)(xO),Ut=(0,r.__importDefault)(_O),Nt=(0,r.__importDefault)(bO),pe=(0,r.__importDefault)(wO),cr=(0,r.__importDefault)(CO);(0,vt.registerFacet)("rect",pe.default),(0,vt.registerFacet)("mirror",Nt.default),(0,vt.registerFacet)("list",Bt.default),(0,vt.registerFacet)("matrix",Ut.default),(0,vt.registerFacet)("circle",_t.default),(0,vt.registerFacet)("tree",cr.default);var ar=ut,Ji=(0,r.__importDefault)(PM),Lr=(0,r.__importDefault)(SO),tn=(0,r.__importDefault)(AO),jr=(0,r.__importDefault)(TO),Hr=(0,r.__importDefault)(G1),Ke=(0,r.__importDefault)(MO);(0,ar.registerComponentController)("axis",Lr.default),(0,ar.registerComponentController)("legend",tn.default),(0,ar.registerComponentController)("tooltip",Hr.default),(0,ar.registerComponentController)("annotation",Ji.default),(0,ar.registerComponentController)("slider",jr.default),(0,ar.registerComponentController)("scrollbar",Ke.default);var At=ut,gi=(0,r.__importDefault)(Kp),Hh=(0,r.__importDefault)(EO),xc=(0,r.__importDefault)(c_),Yh=(0,r.__importDefault)(OO),_c=(0,r.__importDefault)(FO),Rs=(0,r.__importDefault)(PO),vl=(0,r.__importDefault)(IO),So=(0,r.__importDefault)(LO),Bs=(0,r.__importDefault)(ig),Pg=(0,r.__importDefault)(DO),$b=(0,r.__importDefault)($O),Wh=(0,r.__importStar)(ng);Object.defineProperty(e,"ELEMENT_RANGE_HIGHLIGHT_EVENTS",{enumerable:!0,get:function(){return Wh.ELEMENT_RANGE_HIGHLIGHT_EVENTS}});var kb=(0,r.__importDefault)(kO),Rb=(0,r.__importDefault)(RO),Xh=(0,r.__importDefault)(BO),Ig=(0,r.__importDefault)(NO),Bb=(0,r.__importDefault)(GO),Uh=(0,r.__importDefault)(zO),Nb=(0,r.__importDefault)(VO),Lg=(0,r.__importDefault)(jO),Gb=(0,r.__importDefault)(HO),zb=(0,r.__importDefault)(YO),bc=(0,r.__importDefault)(WO),qh=(0,r.__importDefault)(v_),dl=(0,r.__importDefault)(h_),Re=(0,r.__importDefault)(XO),Ue=(0,r.__importDefault)(UO),Ra=(0,r.__importDefault)(qO),or=(0,r.__importStar)(Lh);Object.defineProperty(e,"BRUSH_FILTER_EVENTS",{enumerable:!0,get:function(){return or.BRUSH_FILTER_EVENTS}});var Dr=(0,r.__importDefault)(ZO),Ao=(0,r.__importDefault)(QO),To=(0,r.__importDefault)(KO),ei=(0,r.__importDefault)(JO),wc=(0,r.__importDefault)(tF),Dg=(0,r.__importDefault)(eF),$g=(0,r.__importDefault)(rF),Cc=(0,r.__importDefault)(iF),kg=(0,r.__importDefault)(nF);(0,At.registerAction)("tooltip",xc.default),(0,At.registerAction)("sibling-tooltip",Hh.default),(0,At.registerAction)("ellipsis-text",Yh.default),(0,At.registerAction)("element-active",_c.default),(0,At.registerAction)("element-single-active",So.default),(0,At.registerAction)("element-range-active",vl.default),(0,At.registerAction)("element-highlight",Bs.default),(0,At.registerAction)("element-highlight-by-x",$b.default),(0,At.registerAction)("element-highlight-by-color",Pg.default),(0,At.registerAction)("element-single-highlight",kb.default),(0,At.registerAction)("element-range-highlight",Wh.default),(0,At.registerAction)("element-sibling-highlight",Wh.default,{effectSiblings:!0,effectByRecord:!0}),(0,At.registerAction)("element-selected",Xh.default),(0,At.registerAction)("element-single-selected",Ig.default),(0,At.registerAction)("element-range-selected",Rb.default),(0,At.registerAction)("element-link-by-color",Rs.default),(0,At.registerAction)("active-region",gi.default),(0,At.registerAction)("list-active",Bb.default),(0,At.registerAction)("list-selected",Nb.default),(0,At.registerAction)("list-highlight",Uh.default),(0,At.registerAction)("list-unchecked",Lg.default),(0,At.registerAction)("list-checked",Gb.default),(0,At.registerAction)("legend-item-highlight",Uh.default,{componentNames:["legend"]}),(0,At.registerAction)("axis-label-highlight",Uh.default,{componentNames:["axis"]}),(0,At.registerAction)("rect-mask",dl.default),(0,At.registerAction)("x-rect-mask",bc.default,{dim:"x"}),(0,At.registerAction)("y-rect-mask",bc.default,{dim:"y"}),(0,At.registerAction)("circle-mask",zb.default),(0,At.registerAction)("path-mask",qh.default),(0,At.registerAction)("smooth-path-mask",Re.default),(0,At.registerAction)("cursor",Ue.default),(0,At.registerAction)("data-filter",Ra.default),(0,At.registerAction)("brush",or.default),(0,At.registerAction)("brush-x",or.default,{dims:["x"]}),(0,At.registerAction)("brush-y",or.default,{dims:["y"]}),(0,At.registerAction)("sibling-filter",Dr.default),(0,At.registerAction)("sibling-x-filter",Dr.default),(0,At.registerAction)("sibling-y-filter",Dr.default),(0,At.registerAction)("element-filter",Ao.default),(0,At.registerAction)("element-sibling-filter",To.default),(0,At.registerAction)("element-sibling-filter-record",To.default,{byRecord:!0}),(0,At.registerAction)("view-drag",wc.default),(0,At.registerAction)("view-move",Dg.default),(0,At.registerAction)("scale-translate",$g.default),(0,At.registerAction)("scale-zoom",Cc.default),(0,At.registerAction)("reset-button",ei.default,{name:"reset-button",text:"reset"}),(0,At.registerAction)("mousewheel-scroll",kg.default);var Le=ut;function En(ri){return ri.isInPlot()}(0,Le.registerInteraction)("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"}]}),(0,Le.registerInteraction)("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:touchend",action:"ellipsis-text:hide"}]}),(0,Le.registerInteraction)("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),(0,Le.registerInteraction)("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),(0,Le.registerInteraction)("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),(0,Le.registerInteraction)("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),(0,Le.registerInteraction)("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),(0,Le.registerInteraction)("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"]}]}),(0,Le.registerInteraction)("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"]}]}),(0,Le.registerInteraction)("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"]}]}),(0,Le.registerInteraction)("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"]}]}),(0,Le.registerInteraction)("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(ri){return!ri.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(ri){return!ri.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),(0,Le.registerInteraction)("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:En,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:En,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:En,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"]}]}),(0,Le.registerInteraction)("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"]}]}),(0,Le.registerInteraction)("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:En,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:En,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:En,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),(0,Le.registerInteraction)("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:En,action:"path-mask:start"},{trigger:"mousedown",isEnable:En,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"}]}),(0,Le.registerInteraction)("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),(0,Le.registerInteraction)("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","data-filter:filter"]}]}),(0,Le.registerInteraction)("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),(0,Le.registerInteraction)("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),(0,Le.registerInteraction)("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","element-filter:filter"]}]}),(0,Le.registerInteraction)("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]});function Zh(ri){return ri.gEvent.preventDefault(),ri.gEvent.originalEvent.deltaY>0}(0,Le.registerInteraction)("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(ri){return Zh(ri.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(ri){return!Zh(ri.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),(0,Le.registerInteraction)("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),(0,Le.registerInteraction)("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var Rg=Kt;Object.defineProperty(e,"VIEW_LIFE_CIRCLE",{enumerable:!0,get:function(){return Rg.VIEW_LIFE_CIRCLE}}),(0,r.__exportStar)(ut,e)})(pj);var eY={exports:{}},rY={exports:{}},iY={exports:{}},nY={};/** @license React v0.19.1 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){var r,t,i,n,a;if(typeof window=="undefined"||typeof MessageChannel!="function"){var o=null,l=null,s=function(){if(o!==null)try{var Z=e.unstable_now();o(!0,Z),o=null}catch(et){throw setTimeout(s,0),et}},u=Date.now();e.unstable_now=function(){return Date.now()-u},r=function(Z){o!==null?setTimeout(r,0,Z):(o=Z,setTimeout(s,0))},t=function(Z,et){l=setTimeout(Z,et)},i=function(){clearTimeout(l)},n=function(){return!1},a=e.unstable_forceFrameRate=function(){}}else{var c=window.performance,f=window.Date,h=window.setTimeout,v=window.clearTimeout;if(typeof console!="undefined"){var d=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof d!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof c=="object"&&typeof c.now=="function")e.unstable_now=function(){return c.now()};else{var p=f.now();e.unstable_now=function(){return f.now()-p}}var x=!1,m=null,_=-1,b=5,w=0;n=function(){return e.unstable_now()>=w},a=function(){},e.unstable_forceFrameRate=function(Z){0>Z||125>>1,ht=Z[dt];if(ht!==void 0&&0D(gt,lt))_t!==void 0&&0>D(_t,gt)?(Z[dt]=_t,Z[vt]=lt,dt=vt):(Z[dt]=gt,Z[wt]=lt,dt=wt);else if(_t!==void 0&&0>D(_t,lt))Z[dt]=_t,Z[vt]=lt,dt=vt;else break t}}return et}return null}function D(Z,et){var lt=Z.sortIndex-et.sortIndex;return lt!==0?lt:Z.id-et.id}var R=[],H=[],k=1,V=null,U=3,B=!1,G=!1,N=!1;function W(Z){for(var et=F(H);et!==null;){if(et.callback===null)L(H);else if(et.startTime<=Z)L(H),et.sortIndex=et.expirationTime,O(R,et);else break;et=F(H)}}function q(Z){if(N=!1,W(Z),!G)if(F(R)!==null)G=!0,r(tt);else{var et=F(H);et!==null&&t(q,et.startTime-Z)}}function tt(Z,et){G=!1,N&&(N=!1,i()),B=!0;var lt=U;try{for(W(et),V=F(R);V!==null&&(!(V.expirationTime>et)||Z&&!n());){var dt=V.callback;if(dt!==null){V.callback=null,U=V.priorityLevel;var ht=dt(V.expirationTime<=et);et=e.unstable_now(),typeof ht=="function"?V.callback=ht:V===F(R)&&L(R),W(et)}else L(R);V=F(R)}if(V!==null)var wt=!0;else{var gt=F(H);gt!==null&&t(q,gt.startTime-et),wt=!1}return wt}finally{V=null,U=lt,B=!1}}function ot(Z){switch(Z){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var st=a;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Z){Z.callback=null},e.unstable_continueExecution=function(){G||B||(G=!0,r(tt))},e.unstable_getCurrentPriorityLevel=function(){return U},e.unstable_getFirstCallbackNode=function(){return F(R)},e.unstable_next=function(Z){switch(U){case 1:case 2:case 3:var et=3;break;default:et=U}var lt=U;U=et;try{return Z()}finally{U=lt}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=st,e.unstable_runWithPriority=function(Z,et){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var lt=U;U=Z;try{return et()}finally{U=lt}},e.unstable_scheduleCallback=function(Z,et,lt){var dt=e.unstable_now();if(typeof lt=="object"&<!==null){var ht=lt.delay;ht=typeof ht=="number"&&0dt?(Z.sortIndex=ht,O(H,Z),F(R)===null&&Z===F(H)&&(N?i():N=!0,t(q,ht-dt))):(Z.sortIndex=lt,O(R,Z),G||B||(G=!0,r(tt))),Z},e.unstable_shouldYield=function(){var Z=e.unstable_now();W(Z);var et=F(R);return et!==V&&V!==null&&et!==null&&et.callback!==null&&et.startTime<=Z&&et.expirationTimedl||(g.current=qh[dl],qh[dl]=null,dl--)}function Ue(g,y){dl++,qh[dl]=g.current,g.current=y}var Ra={},or={current:Ra},Dr={current:!1},Ao=Ra;function To(g,y){var C=g.type.contextTypes;if(!C)return Ra;var T=g.stateNode;if(T&&T.__reactInternalMemoizedUnmaskedChildContext===y)return T.__reactInternalMemoizedMaskedChildContext;var E={},$;for($ in C)E[$]=y[$];return T&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=y,g.__reactInternalMemoizedMaskedChildContext=E),E}function ei(g){return g=g.childContextTypes,g!=null}function wc(){Re(Dr),Re(or)}function Dg(g,y,C){if(or.current!==Ra)throw Error(o(168));Ue(or,y),Ue(Dr,C)}function $g(g,y,C){var T=g.stateNode;if(g=y.childContextTypes,typeof T.getChildContext!="function")return C;T=T.getChildContext();for(var E in T)if(!(E in g))throw Error(o(108,D(y)||"Unknown",E));return i({},C,{},T)}function Cc(g){return g=(g=g.stateNode)&&g.__reactInternalMemoizedMergedChildContext||Ra,Ao=or.current,Ue(or,g),Ue(Dr,Dr.current),!0}function kg(g,y,C){var T=g.stateNode;if(!T)throw Error(o(169));C?(g=$g(g,y,Ao),T.__reactInternalMemoizedMergedChildContext=g,Re(Dr),Re(or),Ue(or,g)):Re(Dr),Ue(Dr,C)}var Le=a.unstable_runWithPriority,En=a.unstable_scheduleCallback,Zh=a.unstable_cancelCallback,Rg=a.unstable_requestPaint,ri=a.unstable_now,PU=a.unstable_getCurrentPriorityLevel,Bg=a.unstable_ImmediatePriority,hI=a.unstable_UserBlockingPriority,vI=a.unstable_NormalPriority,dI=a.unstable_LowPriority,pI=a.unstable_IdlePriority,gI={},IU=a.unstable_shouldYield,LU=Rg!==void 0?Rg:function(){},Mo=null,Ng=null,Vb=!1,yI=ri(),On=1e4>yI?ri:function(){return ri()-yI};function Gg(){switch(PU()){case Bg:return 99;case hI:return 98;case vI:return 97;case dI:return 96;case pI:return 95;default:throw Error(o(332))}}function mI(g){switch(g){case 99:return Bg;case 98:return hI;case 97:return vI;case 96:return dI;case 95:return pI;default:throw Error(o(332))}}function ia(g,y){return g=mI(g),Le(g,y)}function xI(g,y,C){return g=mI(g),En(g,y,C)}function _I(g){return Mo===null?(Mo=[g],Ng=En(Bg,bI)):Mo.push(g),gI}function Fn(){if(Ng!==null){var g=Ng;Ng=null,Zh(g)}bI()}function bI(){if(!Vb&&Mo!==null){Vb=!0;var g=0;try{var y=Mo;ia(99,function(){for(;g=y&&(Na=!0),g.firstContext=null)}function Pn(g,y){if(Hg!==g&&y!==!1&&y!==0)if((typeof y!="number"||y===1073741823)&&(Hg=g,y=1073741823),y={context:g,observedBits:y,next:null},Sc===null){if(jg===null)throw Error(o(308));Sc=y,jg.dependencies={expirationTime:0,firstContext:y,responders:null}}else Sc=Sc.next=y;return vt?g._currentValue:g._currentValue2}var pl=!1;function Yb(g){g.updateQueue={baseState:g.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function Wb(g,y){g=g.updateQueue,y.updateQueue===g&&(y.updateQueue={baseState:g.baseState,baseQueue:g.baseQueue,shared:g.shared,effects:g.effects})}function gl(g,y){return g={expirationTime:g,suspenseConfig:y,tag:0,payload:null,callback:null,next:null},g.next=g}function yl(g,y){if(g=g.updateQueue,g!==null){g=g.shared;var C=g.pending;C===null?y.next=y:(y.next=C.next,C.next=y),g.pending=y}}function SI(g,y){var C=g.alternate;C!==null&&Wb(C,g),g=g.updateQueue,C=g.baseQueue,C===null?(g.baseQueue=y.next=y,y.next=y):(y.next=C.next,C.next=y)}function Kh(g,y,C,T){var E=g.updateQueue;pl=!1;var $=E.baseQueue,z=E.shared.pending;if(z!==null){if($!==null){var nt=$.next;$.next=z.next,z.next=nt}$=z,E.shared.pending=null,nt=g.alternate,nt!==null&&(nt=nt.updateQueue,nt!==null&&(nt.baseQueue=z))}if($!==null){nt=$.next;var yt=E.baseState,bt=0,Te=null,Wt=null,oe=null;if(nt!==null){var we=nt;do{if(z=we.expirationTime,zbt&&(bt=z)}else{oe!==null&&(oe=oe.next={expirationTime:1073741823,suspenseConfig:we.suspenseConfig,tag:we.tag,payload:we.payload,callback:we.callback,next:null}),m2(z,we.suspenseConfig);t:{var hr=g,rt=we;switch(z=y,an=C,rt.tag){case 1:if(hr=rt.payload,typeof hr=="function"){yt=hr.call(an,yt,z);break t}yt=hr;break t;case 3:hr.effectTag=hr.effectTag&-4097|64;case 0:if(hr=rt.payload,z=typeof hr=="function"?hr.call(an,yt,z):hr,z==null)break t;yt=i({},yt,z);break t;case 2:pl=!0}}we.callback!==null&&(g.effectTag|=32,z=E.effects,z===null?E.effects=[we]:z.push(we))}if(we=we.next,we===null||we===nt){if(z=E.shared.pending,z===null)break;we=$.next=z.next,z.next=nt,E.baseQueue=$=z,E.shared.pending=null}}while(1)}oe===null?Te=yt:oe.next=Wt,E.baseState=Te,E.baseQueue=oe,_y(bt),g.expirationTime=bt,g.memoizedState=yt}}function AI(g,y,C){if(g=y.effects,y.effects=null,g!==null)for(y=0;yMe?(vr=zt,zt=null):vr=zt.sibling;var fe=oe(rt,zt,at[Me],St);if(fe===null){zt===null&&(zt=vr);break}g&&zt&&fe.alternate===null&&y(rt,zt),Q=$(fe,Q,Me),Be===null?$t=fe:Be.sibling=fe,Be=fe,zt=vr}if(Me===at.length)return C(rt,zt),$t;if(zt===null){for(;MeMe?(vr=zt,zt=null):vr=zt.sibling;var bl=oe(rt,zt,fe.value,St);if(bl===null){zt===null&&(zt=vr);break}g&&zt&&bl.alternate===null&&y(rt,zt),Q=$(bl,Q,Me),Be===null?$t=bl:Be.sibling=bl,Be=bl,zt=vr}if(fe.done)return C(rt,zt),$t;if(zt===null){for(;!fe.done;Me++,fe=at.next())fe=Wt(rt,fe.value,St),fe!==null&&(Q=$(fe,Q,Me),Be===null?$t=fe:Be.sibling=fe,Be=fe);return $t}for(zt=T(rt,zt);!fe.done;Me++,fe=at.next())fe=we(zt,rt,Me,fe.value,St),fe!==null&&(g&&fe.alternate!==null&&zt.delete(fe.key===null?Me:fe.key),Q=$(fe,Q,Me),Be===null?$t=fe:Be.sibling=fe,Be=fe);return g&&zt.forEach(function(c8){return y(rt,c8)}),$t}return function(rt,Q,at,St){var $t=typeof at=="object"&&at!==null&&at.type===f&&at.key===null;$t&&(at=at.props.children);var Be=typeof at=="object"&&at!==null;if(Be)switch(at.$$typeof){case u:t:{for(Be=at.key,$t=Q;$t!==null;){if($t.key===Be){switch($t.tag){case 7:if(at.type===f){C(rt,$t.sibling),Q=E($t,at.props.children),Q.return=rt,rt=Q;break t}break;default:if($t.elementType===at.type){C(rt,$t.sibling),Q=E($t,at.props),Q.ref=tv(rt,$t,at),Q.return=rt,rt=Q;break t}}C(rt,$t);break}else y(rt,$t);$t=$t.sibling}at.type===f?(Q=_l(at.props.children,rt.mode,St,at.key),Q.return=rt,rt=Q):(St=wy(at.type,at.key,at.props,null,rt.mode,St),St.ref=tv(rt,Q,at),St.return=rt,rt=St)}return z(rt);case c:t:{for($t=at.key;Q!==null;){if(Q.key===$t)if(Q.tag===4&&Q.stateNode.containerInfo===at.containerInfo&&Q.stateNode.implementation===at.implementation){C(rt,Q.sibling),Q=E(Q,at.children||[]),Q.return=rt,rt=Q;break t}else{C(rt,Q);break}else y(rt,Q);Q=Q.sibling}Q=Ow(at,rt.mode,St),Q.return=rt,rt=Q}return z(rt)}if(typeof at=="string"||typeof at=="number")return at=""+at,Q!==null&&Q.tag===6?(C(rt,Q.sibling),Q=E(Q,at),Q.return=rt,rt=Q):(C(rt,Q),Q=Ew(at,rt.mode,St),Q.return=rt,rt=Q),z(rt);if(Xg(at))return an(rt,Q,at,St);if(F(at))return hr(rt,Q,at,St);if(Be&&Ug(rt,at),typeof at=="undefined"&&!$t)switch(rt.tag){case 1:case 0:throw rt=rt.type,Error(o(152,rt.displayName||rt.name||"Component"))}return C(rt,Q)}}var Tc=FI(!0),Ub=FI(!1),ev={},In={current:ev},rv={current:ev},Mc={current:ev};function Ba(g){if(g===ev)throw Error(o(174));return g}function qb(g,y){Ue(Mc,y),Ue(rv,g),Ue(In,ev),g=G(y),Re(In),Ue(In,g)}function Ec(){Re(In),Re(rv),Re(Mc)}function PI(g){var y=Ba(Mc.current),C=Ba(In.current);y=N(C,g.type,y),C!==y&&(Ue(rv,g),Ue(In,y))}function Zb(g){rv.current===g&&(Re(In),Re(rv))}var Je={current:0};function qg(g){for(var y=g;y!==null;){if(y.tag===13){var C=y.memoizedState;if(C!==null&&(C=C.dehydrated,C===null||kb(C)||Rb(C)))return y}else if(y.tag===19&&y.memoizedProps.revealOrder!==void 0){if((y.effectTag&64)!==0)return y}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===g)break;for(;y.sibling===null;){if(y.return===null||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}return null}function Qb(g,y){return{responder:g,props:y}}var Zg=l.ReactCurrentDispatcher,Ln=l.ReactCurrentBatchConfig,ml=0,br=null,ii=null,ni=null,Qg=!1;function en(){throw Error(o(321))}function Kb(g,y){if(y===null)return!1;for(var C=0;C$))throw Error(o(301));$+=1,ni=ii=null,y.updateQueue=null,Zg.current=BU,g=C(T,E)}while(y.expirationTime===ml)}if(Zg.current=ry,y=ii!==null&&ii.next!==null,ml=0,ni=ii=br=null,Qg=!1,y)throw Error(o(300));return g}function Oc(){var g={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ni===null?br.memoizedState=ni=g:ni=ni.next=g,ni}function Fc(){if(ii===null){var g=br.alternate;g=g!==null?g.memoizedState:null}else g=ii.next;var y=ni===null?br.memoizedState:ni.next;if(y!==null)ni=y,ii=g;else{if(g===null)throw Error(o(310));ii=g,g={memoizedState:ii.memoizedState,baseState:ii.baseState,baseQueue:ii.baseQueue,queue:ii.queue,next:null},ni===null?br.memoizedState=ni=g:ni=ni.next=g}return ni}function Gs(g,y){return typeof y=="function"?y(g):y}function Kg(g){var y=Fc(),C=y.queue;if(C===null)throw Error(o(311));C.lastRenderedReducer=g;var T=ii,E=T.baseQueue,$=C.pending;if($!==null){if(E!==null){var z=E.next;E.next=$.next,$.next=z}T.baseQueue=E=$,C.pending=null}if(E!==null){E=E.next,T=T.baseState;var nt=z=$=null,yt=E;do{var bt=yt.expirationTime;if(btbr.expirationTime&&(br.expirationTime=bt,_y(bt))}else nt!==null&&(nt=nt.next={expirationTime:1073741823,suspenseConfig:yt.suspenseConfig,action:yt.action,eagerReducer:yt.eagerReducer,eagerState:yt.eagerState,next:null}),m2(bt,yt.suspenseConfig),T=yt.eagerReducer===g?yt.eagerState:g(T,yt.action);yt=yt.next}while(yt!==null&&yt!==E);nt===null?$=T:nt.next=z,Ns(T,y.memoizedState)||(Na=!0),y.memoizedState=T,y.baseState=$,y.baseQueue=nt,C.lastRenderedState=T}return[y.memoizedState,C.dispatch]}function Jg(g){var y=Fc(),C=y.queue;if(C===null)throw Error(o(311));C.lastRenderedReducer=g;var T=C.dispatch,E=C.pending,$=y.memoizedState;if(E!==null){C.pending=null;var z=E=E.next;do $=g($,z.action),z=z.next;while(z!==E);Ns($,y.memoizedState)||(Na=!0),y.memoizedState=$,y.baseQueue===null&&(y.baseState=$),C.lastRenderedState=$}return[$,T]}function tw(g){var y=Oc();return typeof g=="function"&&(g=g()),y.memoizedState=y.baseState=g,g=y.queue={pending:null,dispatch:null,lastRenderedReducer:Gs,lastRenderedState:g},g=g.dispatch=NI.bind(null,br,g),[y.memoizedState,g]}function ew(g,y,C,T){return g={tag:g,create:y,destroy:C,deps:T,next:null},y=br.updateQueue,y===null?(y={lastEffect:null},br.updateQueue=y,y.lastEffect=g.next=g):(C=y.lastEffect,C===null?y.lastEffect=g.next=g:(T=C.next,C.next=g,g.next=T,y.lastEffect=g)),g}function II(){return Fc().memoizedState}function rw(g,y,C,T){var E=Oc();br.effectTag|=g,E.memoizedState=ew(1|y,C,void 0,T===void 0?null:T)}function iw(g,y,C,T){var E=Fc();T=T===void 0?null:T;var $=void 0;if(ii!==null){var z=ii.memoizedState;if($=z.destroy,T!==null&&Kb(T,z.deps)){ew(y,C,$,T);return}}br.effectTag|=g,E.memoizedState=ew(1|y,C,$,T)}function LI(g,y){return rw(516,4,g,y)}function ty(g,y){return iw(516,4,g,y)}function DI(g,y){return iw(4,2,g,y)}function $I(g,y){if(typeof y=="function")return g=g(),y(g),function(){y(null)};if(y!=null)return g=g(),y.current=g,function(){y.current=null}}function kI(g,y,C){return C=C!=null?C.concat([g]):null,iw(4,2,$I.bind(null,y,g),C)}function nw(){}function RI(g,y){return Oc().memoizedState=[g,y===void 0?null:y],g}function ey(g,y){var C=Fc();y=y===void 0?null:y;var T=C.memoizedState;return T!==null&&y!==null&&Kb(y,T[1])?T[0]:(C.memoizedState=[g,y],g)}function BI(g,y){var C=Fc();y=y===void 0?null:y;var T=C.memoizedState;return T!==null&&y!==null&&Kb(y,T[1])?T[0]:(g=g(),C.memoizedState=[g,y],g)}function aw(g,y,C){var T=Gg();ia(98>T?98:T,function(){g(!0)}),ia(97T.tailExpiration&&1y)&&Hs.set(g,y)))}}function my(g,y){g.expirationTimeg?C:g,2>=g&&y!==g?0:g}function $i(g){if(g.lastExpiredTime!==0)g.callbackExpirationTime=1073741823,g.callbackPriority=99,g.callbackNode=_I(Cw.bind(null,g));else{var y=xy(g),C=g.callbackNode;if(y===0)C!==null&&(g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90);else{var T=oa();if(y===1073741823?T=99:y===1||y===2?T=95:(T=10*(1073741821-y)-10*(1073741821-T),T=0>=T?99:250>=T?98:5250>=T?97:95),C!==null){var E=g.callbackPriority;if(g.callbackExpirationTime===y&&E>=T)return;C!==gI&&Zh(C)}g.callbackExpirationTime=y,g.callbackPriority=T,y=y===1073741823?_I(Cw.bind(null,g)):xI(T,v2.bind(null,g),{timeout:10*(1073741821-y)-On()}),g.callbackNode=y}}}function v2(g,y){if(yy=0,y)return y=oa(),Cy(g,y),$i(g),null;var C=xy(g);if(C!==0){if(y=g.callbackNode,(Rt&(Dn|aa))!==fr)throw Error(o(327));if(Us(),g===nn&&C===Di||Ws(g,C),Xt!==null){var T=Rt;Rt|=Dn;var E=y2();do try{KU();break}catch(nt){g2(g,nt)}while(1);if(jb(),Rt=T,sy.current=E,$r===uy)throw y=hy,Ws(g,C),Qs(g,C),$i(g),y;if(Xt===null)switch(E=g.finishedWork=g.current.alternate,g.finishedExpirationTime=C,T=$r,nn=null,T){case js:case uy:throw Error(o(345));case f2:Cy(g,2=C){g.lastPingedTime=C,Ws(g,C);break}}if($=xy(g),$!==0&&$!==C)break;if(T!==0&&T!==C){g.lastPingedTime=T;break}g.timeoutHandle=ht(Xs.bind(null,g),E);break}Xs(g);break;case fy:if(Qs(g,C),T=g.lastSuspendedTime,C===T&&(g.nextKnownPendingLevel=Sw(E)),dy&&(E=g.lastPingedTime,E===0||E>=C)){g.lastPingedTime=C,Ws(g,C);break}if(E=xy(g),E!==0&&E!==C)break;if(T!==0&&T!==C){g.lastPingedTime=T;break}if(av!==1073741823?T=10*(1073741821-av)-On():Fo===1073741823?T=0:(T=10*(1073741821-Fo)-5e3,E=On(),C=10*(1073741821-C)-E,T=E-T,0>T&&(T=0),T=(120>T?120:480>T?480:1080>T?1080:1920>T?1920:3e3>T?3e3:4320>T?4320:1960*UU(T/1960))-T,C=T?T=0:(E=z.busyDelayMs|0,$=On()-(10*(1073741821-$)-(z.timeoutMs|0||5e3)),T=$<=E?0:E+T-$),10 component higher in the tree to provide a loading indicator or placeholder to display.`+bc(z))}$r!==xw&&($r=f2),nt=hw(nt,z),Wt=$;do{switch(Wt.tag){case 3:yt=nt,Wt.effectTag|=4096,Wt.expirationTime=y;var $t=s2(Wt,yt,y);SI(Wt,$t);break t;case 1:yt=nt;var Be=Wt.type,zt=Wt.stateNode;if((Wt.effectTag&64)===0&&(typeof Be.getDerivedStateFromError=="function"||zt!==null&&typeof zt.componentDidCatch=="function"&&(xl===null||!xl.has(zt)))){Wt.effectTag|=4096,Wt.expirationTime=y;var Me=u2(Wt,yt,y);SI(Wt,Me);break t}}Wt=Wt.return}while(Wt!==null)}Xt=_2(Xt)}catch(vr){y=vr;continue}break}while(1)}function y2(){var g=sy.current;return sy.current=ry,g===null?ry:g}function m2(g,y){gov&&(ov=g)}function QU(){for(;Xt!==null;)Xt=x2(Xt)}function KU(){for(;Xt!==null&&!IU();)Xt=x2(Xt)}function x2(g){var y=w2(g.alternate,g,Di);return g.memoizedProps=g.pendingProps,y===null&&(y=_2(g)),c2.current=null,y}function _2(g){Xt=g;do{var y=Xt.alternate;if(g=Xt.return,(Xt.effectTag&2048)===0){if(y=GU(y,Xt,Di),Di===1||Xt.childExpirationTime!==1){for(var C=0,T=Xt.child;T!==null;){var E=T.expirationTime,$=T.childExpirationTime;E>C&&(C=E),$>C&&(C=$),T=T.sibling}Xt.childExpirationTime=C}if(y!==null)return y;g!==null&&(g.effectTag&2048)===0&&(g.firstEffect===null&&(g.firstEffect=Xt.firstEffect),Xt.lastEffect!==null&&(g.lastEffect!==null&&(g.lastEffect.nextEffect=Xt.firstEffect),g.lastEffect=Xt.lastEffect),1g?y:g}function Xs(g){var y=Gg();return ia(99,JU.bind(null,g,y)),null}function JU(g,y){do Us();while(lv!==null);if((Rt&(Dn|aa))!==fr)throw Error(o(327));var C=g.finishedWork,T=g.finishedExpirationTime;if(C===null)return null;if(g.finishedWork=null,g.finishedExpirationTime=0,C===g.current)throw Error(o(177));g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90,g.nextKnownPendingLevel=0;var E=Sw(C);if(g.firstPendingTime=E,T<=g.lastSuspendedTime?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:T<=g.firstSuspendedTime&&(g.firstSuspendedTime=T-1),T<=g.lastPingedTime&&(g.lastPingedTime=0),T<=g.lastExpiredTime&&(g.lastExpiredTime=0),g===nn&&(Xt=nn=null,Di=0),1=C?qI(g,y,C):(Ue(Je,Je.current&1),y=Oo(g,y,C),y!==null?y.sibling:null);Ue(Je,Je.current&1);break;case 19:if(T=y.childExpirationTime>=C,(g.effectTag&64)!==0){if(T)return QI(g,y,C);y.effectTag|=64}if(E=y.memoizedState,E!==null&&(E.rendering=null,E.tail=null),Ue(Je,Je.current),!T)return null}return Oo(g,y,C)}Na=!1}}else Na=!1;switch(y.expirationTime=0,y.tag){case 2:if(T=y.type,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,E=To(y,or.current),Ac(y,C),E=Jb(null,y,T,g,E,C),y.effectTag|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0){if(y.tag=1,y.memoizedState=null,y.updateQueue=null,ei(T)){var $=!0;Cc(y)}else $=!1;y.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Yb(y);var z=T.getDerivedStateFromProps;typeof z=="function"&&Yg(y,T,z,g),E.updater=Wg,y.stateNode=E,E._reactInternalFiber=y,Xb(y,T,g,C),y=uw(null,y,T,!0,$,C)}else y.tag=0,rn(null,y,E,C),y=y.child;return y;case 16:t:{if(E=y.elementType,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,L(E),E._status!==1)throw E._result;switch(E=E._result,y.type=E,$=y.tag=o8(E),g=na(E,g),$){case 0:y=sw(null,y,E,g,C);break t;case 1:y=XI(null,y,E,g,C);break t;case 11:y=jI(null,y,E,g,C);break t;case 14:y=HI(null,y,E,na(E.type,g),T,C);break t}throw Error(o(306,E,""))}return y;case 0:return T=y.type,E=y.pendingProps,E=y.elementType===T?E:na(T,E),sw(g,y,T,E,C);case 1:return T=y.type,E=y.pendingProps,E=y.elementType===T?E:na(T,E),XI(g,y,T,E,C);case 3:if(UI(y),T=y.updateQueue,g===null||T===null)throw Error(o(282));if(T=y.pendingProps,E=y.memoizedState,E=E!==null?E.element:null,Wb(g,y),Kh(y,T,null,C),T=y.memoizedState.element,T===E)lw(),y=Oo(g,y,C);else{if((E=y.stateNode.hydrate)&&(Ut?(zs=Ig(y.stateNode.containerInfo),Eo=y,E=Vs=!0):E=!1),E)for(C=Ub(y,null,T,C),y.child=C;C;)C.effectTag=C.effectTag&-3|1024,C=C.sibling;else rn(g,y,T,C),lw();y=y.child}return y;case 5:return PI(y),g===null&&ow(y),T=y.type,E=y.pendingProps,$=g!==null?g.memoizedProps:null,z=E.children,et(T,E)?z=null:$!==null&&et(T,$)&&(y.effectTag|=16),WI(g,y),y.mode&4&&C!==1&<(T,E)?(y.expirationTime=y.childExpirationTime=1,y=null):(rn(g,y,z,C),y=y.child),y;case 6:return g===null&&ow(y),null;case 13:return qI(g,y,C);case 4:return qb(y,y.stateNode.containerInfo),T=y.pendingProps,g===null?y.child=Tc(y,null,T,C):rn(g,y,T,C),y.child;case 11:return T=y.type,E=y.pendingProps,E=y.elementType===T?E:na(T,E),jI(g,y,T,E,C);case 7:return rn(g,y,y.pendingProps,C),y.child;case 8:return rn(g,y,y.pendingProps.children,C),y.child;case 12:return rn(g,y,y.pendingProps.children,C),y.child;case 10:t:{if(T=y.type._context,E=y.pendingProps,z=y.memoizedProps,$=E.value,wI(y,$),z!==null){var nt=z.value;if($=Ns(nt,$)?0:(typeof T._calculateChangedBits=="function"?T._calculateChangedBits(nt,$):1073741823)|0,$===0){if(z.children===E.children&&!Dr.current){y=Oo(g,y,C);break t}}else for(nt=y.child,nt!==null&&(nt.return=y);nt!==null;){var yt=nt.dependencies;if(yt!==null){z=nt.child;for(var bt=yt.firstContext;bt!==null;){if(bt.context===T&&(bt.observedBits&$)!==0){nt.tag===1&&(bt=gl(C,null),bt.tag=2,yl(nt,bt)),nt.expirationTime=y&&g<=y}function Qs(g,y){var C=g.firstSuspendedTime,T=g.lastSuspendedTime;Cy||C===0)&&(g.lastSuspendedTime=y),y<=g.lastPingedTime&&(g.lastPingedTime=0),y<=g.lastExpiredTime&&(g.lastExpiredTime=0)}function S2(g,y){y>g.firstPendingTime&&(g.firstPendingTime=y);var C=g.firstSuspendedTime;C!==0&&(y>=C?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:y>=g.lastSuspendedTime&&(g.lastSuspendedTime=y+1),y>g.nextKnownPendingLevel&&(g.nextKnownPendingLevel=y))}function Cy(g,y){var C=g.lastExpiredTime;(C===0||C>y)&&(g.lastExpiredTime=y)}var Sy=null;function s8(g){if(Sy===null)try{var y=("require"+Math.random()).slice(0,7);Sy=(e&&e[y])("timers").setImmediate}catch{Sy=function(T){var E=new MessageChannel;E.port1.onmessage=T,E.port2.postMessage(void 0)}}return Sy(g)}function A2(g){var y=g._reactInternalFiber;if(y===void 0)throw typeof g.render=="function"?Error(o(188)):Error(o(268,Object.keys(g)));return g=V(y),g===null?null:g.stateNode}function T2(g,y){g=g.memoizedState,g!==null&&g.dehydrated!==null&&g.retryTime=Math.abs(e[n])?t+=r-i+e[n]:t+=e[n]-i+r,r=i;return r+t}var hY={};Object.defineProperty(hY,"__esModule",{value:!0});var E0t=Dh,O0t=lF,F0t=Object.prototype.hasOwnProperty;function P0t(e,r){if(!r||!E0t.default(e))return{};for(var t={},i=O0t.default(r)?r:function(l){return l[r]},n,a=0;an[o])return 1}return 0}:$h(r)&&(t=function(i,n){return i[r]n[r]?1:0}),e.sort(t)}function D0t(e,r,t){t===void 0&&(t=[]);var i=e;t&&t.length&&(i=L0t(e,t));var n;Sa(r)?n=r:sr(r)?n=function(o){return"_"+r.map(function(l){return o[l]}).join("-")}:$h(r)&&(n=function(o){return"_"+o[r]});var a=I0t(i,n);return a}var fT=globalThis&&globalThis.__assign||function(){return fT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t=i?(e/i).toFixed(r).replace(/\.?0*$/,"")+"\u4EBF":e>=t?(e/t).toFixed(r).replace(/\.?0*$/,"")+"\u4E07":e.toFixed(r).replace(/\.?0*$/,"")},R0t=function(e,r){return r===void 0&&(r=","),typeof e=="number"?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,r):e},vY={};Object.defineProperty(vY,"__esModule",{value:!0});var B0t=Is,N0t=function(e){return B0t.default(e,"Boolean")},G0t=vY.default=N0t,hT=globalThis&&globalThis.__assign||function(){return hT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t0})},j0t=function(){return Nu.some(function(e){return e.skippedTargets.length>0})},wR="ResizeObserver loop completed with undelivered notifications.",H0t=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:wR}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=wR),window.dispatchEvent(e)},Kd;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Kd||(Kd={}));var Gu=function(e){return Object.freeze(e)},Y0t=function(){function e(r,t){this.inlineSize=r,this.blockSize=t,Gu(this)}return e}(),dY=function(){function e(r,t,i,n){return this.x=r,this.y=t,this.width=i,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Gu(this)}return e.prototype.toJSON=function(){var r=this,t=r.x,i=r.y,n=r.top,a=r.right,o=r.bottom,l=r.left,s=r.width,u=r.height;return{x:t,y:i,top:n,right:a,bottom:o,left:l,width:s,height:u}},e.fromRect=function(r){return new e(r.x,r.y,r.width,r.height)},e}(),sF=function(e){return e instanceof SVGElement&&"getBBox"in e},pY=function(e){if(sF(e)){var r=e.getBBox(),t=r.width,i=r.height;return!t&&!i}var n=e,a=n.offsetWidth,o=n.offsetHeight;return!(a||o||e.getClientRects().length)},CR=function(e){var r;if(e instanceof Element)return!0;var t=(r=e==null?void 0:e.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(t&&e instanceof t.Element)},W0t=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},bd=typeof window!="undefined"?window:{},Vm=new WeakMap,SR=/auto|scroll/,X0t=/^tb|vertical/,U0t=/msie|trident/i.test(bd.navigator&&bd.navigator.userAgent),Xa=function(e){return parseFloat(e||"0")},Ef=function(e,r,t){return e===void 0&&(e=0),r===void 0&&(r=0),t===void 0&&(t=!1),new Y0t((t?r:e)||0,(t?e:r)||0)},AR=Gu({devicePixelContentBoxSize:Ef(),borderBoxSize:Ef(),contentBoxSize:Ef(),contentRect:new dY(0,0,0,0)}),gY=function(e,r){if(r===void 0&&(r=!1),Vm.has(e)&&!r)return Vm.get(e);if(pY(e))return Vm.set(e,AR),AR;var t=getComputedStyle(e),i=sF(e)&&e.ownerSVGElement&&e.getBBox(),n=!U0t&&t.boxSizing==="border-box",a=X0t.test(t.writingMode||""),o=!i&&SR.test(t.overflowY||""),l=!i&&SR.test(t.overflowX||""),s=i?0:Xa(t.paddingTop),u=i?0:Xa(t.paddingRight),c=i?0:Xa(t.paddingBottom),f=i?0:Xa(t.paddingLeft),h=i?0:Xa(t.borderTopWidth),v=i?0:Xa(t.borderRightWidth),d=i?0:Xa(t.borderBottomWidth),p=i?0:Xa(t.borderLeftWidth),x=f+u,m=s+c,_=p+v,b=h+d,w=l?e.offsetHeight-b-e.clientHeight:0,S=o?e.offsetWidth-_-e.clientWidth:0,M=n?x+_:0,O=n?m+b:0,F=i?i.width:Xa(t.width)-M-S,L=i?i.height:Xa(t.height)-O-w,D=F+x+S+_,R=L+m+w+b,H=Gu({devicePixelContentBoxSize:Ef(Math.round(F*devicePixelRatio),Math.round(L*devicePixelRatio),a),borderBoxSize:Ef(D,R,a),contentBoxSize:Ef(F,L,a),contentRect:new dY(f,s,F,L)});return Vm.set(e,H),H},yY=function(e,r,t){var i=gY(e,t),n=i.borderBoxSize,a=i.contentBoxSize,o=i.devicePixelContentBoxSize;switch(r){case Kd.DEVICE_PIXEL_CONTENT_BOX:return o;case Kd.BORDER_BOX:return n;default:return a}},q0t=function(){function e(r){var t=gY(r);this.target=r,this.contentRect=t.contentRect,this.borderBoxSize=Gu([t.borderBoxSize]),this.contentBoxSize=Gu([t.contentBoxSize]),this.devicePixelContentBoxSize=Gu([t.devicePixelContentBoxSize])}return e}(),mY=function(e){if(pY(e))return 1/0;for(var r=0,t=e.parentNode;t;)r+=1,t=t.parentNode;return r},Z0t=function(){var e=1/0,r=[];Nu.forEach(function(o){if(o.activeTargets.length!==0){var l=[];o.activeTargets.forEach(function(u){var c=new q0t(u.target),f=mY(u.target);l.push(c),u.lastReportedSize=yY(u.target,u.observedBox),fe?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Q0t=function(){var e=0;for(TR(e);V0t();)e=Z0t(),TR(e);return j0t()&&H0t(),e>0},fS,xY=[],K0t=function(){return xY.splice(0).forEach(function(e){return e()})},J0t=function(e){if(!fS){var r=0,t=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return K0t()}).observe(t,i),fS=function(){t.textContent="".concat(r?r--:r++)}}xY.push(e),fS()},txt=function(e){J0t(function(){requestAnimationFrame(e)})},A0=0,ext=function(){return!!A0},rxt=250,ixt={attributes:!0,characterData:!0,childList:!0,subtree:!0},MR=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ER=function(e){return e===void 0&&(e=0),Date.now()+e},hS=!1,nxt=function(){function e(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return e.prototype.run=function(r){var t=this;if(r===void 0&&(r=rxt),!hS){hS=!0;var i=ER(r);txt(function(){var n=!1;try{n=Q0t()}finally{if(hS=!1,r=i-ER(),!ext())return;n?t.run(1e3):r>0?t.run(r):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var r=this,t=function(){return r.observer&&r.observer.observe(document.body,ixt)};document.body?t():bd.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),MR.forEach(function(t){return bd.addEventListener(t,r.listener,!0)}))},e.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),MR.forEach(function(t){return bd.removeEventListener(t,r.listener,!0)}),this.stopped=!0)},e}(),dT=new nxt,OR=function(e){!A0&&e>0&&dT.start(),A0+=e,!A0&&dT.stop()},axt=function(e){return!sF(e)&&!W0t(e)&&getComputedStyle(e).display==="inline"},oxt=function(){function e(r,t){this.target=r,this.observedBox=t||Kd.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var r=yY(this.target,this.observedBox,!0);return axt(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},e}(),lxt=function(){function e(r,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=t}return e}(),jm=new WeakMap,FR=function(e,r){for(var t=0;t=0&&(a&&Nu.splice(Nu.indexOf(i),1),i.observationTargets.splice(n,1),OR(-1))},e.disconnect=function(r){var t=this,i=jm.get(r);i.observationTargets.slice().forEach(function(n){return t.unobserve(r,n.target)}),i.activeTargets.splice(0,i.activeTargets.length)},e}(),_Y=function(){function e(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Hm.connect(this,r)}return e.prototype.observe=function(r,t){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!CR(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Hm.observe(this,r,t)},e.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!CR(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Hm.unobserve(this,r)},e.prototype.disconnect=function(){Hm.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),PR=globalThis&&globalThis.__assign||function(){return PR=Object.assign||function(e){for(var r,t=1,i=arguments.length;t=0&&i!==this.chartHelper.chart.width||n>=0&&n!==this.chartHelper.chart.height){var o=i||this.chartHelper.chart.width,l=n||this.chartHelper.chart.height;this.chartHelper.chart.changeSize(o,l),this.chartHelper.chart.emit("resize")}else this.chartHelper.render();else this.chartHelper.render()},r.prototype.componentWillUnmount=function(){this.chartHelper.destory(),this.resizeObserver.unobserve(this.props.container)},r.prototype.getG2Instance=function(){return this.chartHelper.chart},r.prototype.render=function(){var t=this,i=this.props,n=i.placeholder,a=i.data,o=i.errorContent,l=this.props.ErrorBoundaryProps;if((a===void 0||a.length===0)&&n){this.chartHelper.destory();var s=n===!0?Pt.createElement("div",{style:{position:"relative",top:"48%",color:"#aaa",textAlign:"center"}},"\u6682\u65E0\u6570\u636E"):n;return Pt.createElement(Wd,wd({},l),s)}return this.chartHelper.update(this.props),o?l=wd({fallback:o},l):l={FallbackComponent:dj},Pt.createElement(Wd,wd({},l,{key:this.chartHelper.key,onError:function(){for(var u=[],c=0;c0){var v="median";switch(h.type){case"max":v=Zx(s,function(p){return p[u]})[u];break;case"mean":v=fY(s.map(function(p){return p[u]}))/s.length;break;default:v=uM(s,function(p){return p[u]})[u];break}var d=Vo(Vo({start:["min",v],end:["max",v],style:h.lineStyle,text:{content:v}},h),{type:"line"});I(r,"annotations")||jt(r,"annotations",[]),r.annotations.push(d),jt(r,"point",!1)}});var c=I(r,"interactions",[]),f=c.find(function(h){return h.type==="slider"});return f&&K(r.slider)&&(r.slider=f.cfg),r},WR=function(e,r,t){var i=gx(I(r,"events",[])),n=gx(I(t,"events",[]));i.forEach(function(a){e.off(a[1],r.events[a[0]])}),n.forEach(function(a){e.on(a[1],t.events[a[0]])})},f1t=function(e){var r=I(e,"events",{}),t={};return["onTitleClick","onTitleDblClick","onTitleMouseleave","onTitleMousemove","onTitleMousedown","onTitleMouseup","onTitleMouseenter"].forEach(function(i){r[i]&&(t[i.replace("Title","")]=r[i])}),t},h1t=function(e){var r=I(e,"events",{}),t={};return["onDescriptionClick","onDescriptionDblClick","onDescriptionMouseleave","onDescriptionMousemove","onDescriptionMousedown","onDescriptionMouseup","onDescriptionMouseenter"].forEach(function(i){r[i]&&(t[i.replace("Description","")]=r[i])}),t},mT=function(e,r){if(qt(e)&&qt(r)){var t=Object.keys(e),i=Object.keys(r);if(t.length!==i.length)return!1;for(var n=!0,a=0;a"},key:(s===0?"top":"bottom")+"-statistic"},mf.pick(l,["offsetX","offsetY","rotate","style","formatter"])))}})};ba.renderGaugeStatistic=function(e,r,t){var i=r.statistic,n=i.title,a=i.content;[n,a].forEach(function(o){if(!!o){var l=co.isFunction(o.style)?o.style(t):o.style;e.annotation().html(yx.__assign({position:["50%","100%"],html:function(s,u){var c=u.getCoordinate(),f=u.views[0].getCoordinate(),h=f.getCenter(),v=f.getRadius(),d=Math.max(Math.sin(f.startAngle),Math.sin(f.endAngle))*v,p=h.y+d-c.y.start-parseFloat(co.get(l,"fontSize",0)),x=c.getRadius()*c.innerRadius*2;pF(s,yx.__assign({width:x+"px",transform:"translate(-50%, "+p+"px)"},dF(l)));var m=u.getData();if(o.customHtml)return o.customHtml(s,u,t,m);var _=o.content;return o.formatter&&(_=o.formatter(t,m)),_?co.isString(_)?_:""+_:"
    "}},mf.pick(o,["offsetX","offsetY","rotate","style","formatter"])))}})};var C_={},S_={};Object.defineProperty(S_,"__esModule",{value:!0});S_.getCanvasContext=void 0;var pS;function F1t(){return pS||(pS=document.createElement("canvas").getContext("2d")),pS}S_.getCanvasContext=F1t;Object.defineProperty(C_,"__esModule",{value:!0});C_.measureTextWidth=void 0;var P1t=j,gS=Y,I1t=S_;C_.measureTextWidth=gS.memoize(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=i===void 0?"sans-serif":i,a=r.fontWeight,o=r.fontStyle,l=r.fontVariant,s=I1t.getCanvasContext();s.font=[o,a,l,t+"px",n].join(" ");var u=s.measureText(gS.isString(e)?e:"");return u.width},function(e,r){return r===void 0&&(r={}),P1t.__spreadArrays([e],gS.values(r)).join("")});var _s={};Object.defineProperty(_s,"__esModule",{value:!0});_s.isBetween=_s.isRealNumber=void 0;function L1t(e){return typeof e=="number"&&!isNaN(e)}_s.isRealNumber=L1t;function D1t(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=i&&e<=n}_s.isBetween=D1t;var fo={};Object.defineProperty(fo,"__esModule",{value:!0});fo.processIllegalData=fo.transformDataToNodeLinkData=fo.adjustYMetaByZero=void 0;var yS=j,Zv=Y,UR=vF,$1t=ug;function k1t(e,r){var t=e.filter(function(a){var o=Zv.get(a,[r]);return Zv.isNumber(o)&&!isNaN(o)}),i=t.every(function(a){return Zv.get(a,[r])>=0}),n=t.every(function(a){return Zv.get(a,[r])<=0});return i?{min:0}:n?{max:0}:{}}fo.adjustYMetaByZero=k1t;function R1t(e,r,t,i,n){if(n===void 0&&(n=[]),!Array.isArray(e))return{nodes:[],links:[]};var a=[],o={},l=-1;return e.forEach(function(s){var u=s[r],c=s[t],f=s[i],h=$1t.pick(s,n);o[u]||(o[u]=yS.__assign({id:++l,name:u},h)),o[c]||(o[c]=yS.__assign({id:++l,name:c},h)),a.push(yS.__assign({source:o[u].id,target:o[c].id,value:f},h))}),{nodes:Object.values(o).sort(function(s,u){return s.id-u.id}),links:a}}fo.transformDataToNodeLinkData=R1t;function B1t(e,r){var t=Zv.filter(e,function(i){var n=i[r];return n===null||typeof n=="number"&&!isNaN(n)});return UR.log(UR.LEVEL.WARN,t.length===e.length,"illegal data existed in chart data."),t}fo.processIllegalData=B1t;var ho={};Object.defineProperty(ho,"__esModule",{value:!0});ho.resolveAllPadding=ho.getAdjustAppendPadding=ho.normalPadding=void 0;var qR=Y;function gF(e){if(qR.isNumber(e))return[e,e,e,e];if(qR.isArray(e)){var r=e.length;if(r===1)return[e[0],e[0],e[0],e[0]];if(r===2)return[e[0],e[1],e[0],e[1]];if(r===3)return[e[0],e[1],e[2],e[1]];if(r===4)return e}return[0,0,0,0]}ho.normalPadding=gF;function N1t(e,r,t){r===void 0&&(r="bottom"),t===void 0&&(t=25);var i=gF(e),n=[r.startsWith("top")?t:0,r.startsWith("right")?t:0,r.startsWith("bottom")?t:0,r.startsWith("left")?t:0];return[i[0]+n[0],i[1]+n[1],i[2]+n[2],i[3]+n[3]]}ho.getAdjustAppendPadding=N1t;function G1t(e){var r=e.map(function(i){return gF(i)}),t=[0,0,0,0];return r.length>0&&(t=t.map(function(i,n){return r.forEach(function(a,o){i+=r[o][n]}),i})),t}ho.resolveAllPadding=G1t;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=j,t=m_;Object.defineProperty(e,"flow",{enumerable:!0,get:function(){return t.flow}});var i=ug;Object.defineProperty(e,"pick",{enumerable:!0,get:function(){return i.pick}});var n=x_;Object.defineProperty(e,"template",{enumerable:!0,get:function(){return n.template}});var a=vF;Object.defineProperty(e,"log",{enumerable:!0,get:function(){return a.log}}),Object.defineProperty(e,"invariant",{enumerable:!0,get:function(){return a.invariant}}),Object.defineProperty(e,"LEVEL",{enumerable:!0,get:function(){return a.LEVEL}});var o=__;Object.defineProperty(e,"getContainerSize",{enumerable:!0,get:function(){return o.getContainerSize}}),r.__exportStar(ao,e);var l=Qo;Object.defineProperty(e,"findViewById",{enumerable:!0,get:function(){return l.findViewById}}),Object.defineProperty(e,"getViews",{enumerable:!0,get:function(){return l.getViews}}),Object.defineProperty(e,"getSiblingViews",{enumerable:!0,get:function(){return l.getSiblingViews}});var s=b_;Object.defineProperty(e,"transformLabel",{enumerable:!0,get:function(){return s.transformLabel}});var u=IY;Object.defineProperty(e,"getSplinePath",{enumerable:!0,get:function(){return u.getSplinePath}});var c=cg;Object.defineProperty(e,"deepAssign",{enumerable:!0,get:function(){return c.deepAssign}});var f=w_;Object.defineProperty(e,"kebabCase",{enumerable:!0,get:function(){return f.kebabCase}});var h=ba;Object.defineProperty(e,"renderStatistic",{enumerable:!0,get:function(){return h.renderStatistic}}),Object.defineProperty(e,"renderGaugeStatistic",{enumerable:!0,get:function(){return h.renderGaugeStatistic}});var v=C_;Object.defineProperty(e,"measureTextWidth",{enumerable:!0,get:function(){return v.measureTextWidth}});var d=_s;Object.defineProperty(e,"isBetween",{enumerable:!0,get:function(){return d.isBetween}}),Object.defineProperty(e,"isRealNumber",{enumerable:!0,get:function(){return d.isRealNumber}}),r.__exportStar(fo,e),r.__exportStar(ho,e)})(mt);Object.defineProperty(xs,"__esModule",{value:!0});xs.getLocale=yF=xs.registerLocale=void 0;var mS=Y,z1t=mt,V1t=k3,T0={};function j1t(e,r){T0[e]=r}var yF=xs.registerLocale=j1t;function H1t(e){return{get:function(r,t){return z1t.template(mS.get(T0[e],r)||mS.get(T0[V1t.GLOBAL.locale],r)||mS.get(T0["en-US"],r)||r,t)}}}xs.getLocale=H1t;var mF={};Object.defineProperty(mF,"__esModule",{value:!0});var $Y=mF.EN_US_LOCALE=void 0;$Y=mF.EN_US_LOCALE={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}};var xF={};Object.defineProperty(xF,"__esModule",{value:!0});var kY=xF.ZH_CN_LOCALE=void 0;kY=xF.ZH_CN_LOCALE={locale:"zh-CN",general:{increase:"\u589E\u52A0",decrease:"\u51CF\u5C11",root:"\u521D\u59CB"},statistic:{total:"\u603B\u8BA1"},conversionTag:{label:"\u8F6C\u5316\u7387"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"\u603B\u8BA1"}};var Y1t=globalThis&&globalThis.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])},e(r,t)};return function(r,t){e(r,t);function i(){this.constructor=r}r.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Yr=globalThis&&globalThis.__assign||function(){return Yr=Object.assign||function(e){for(var r,t=1,i=arguments.length;t1&&L(st)}},[w.current,S.current,F,M.current]),H=Wr.exports.useCallback(t1(R,500),[R]),k=Pt.isValidElement(h)?function(){return h}:h;if(p&&!b.data){var V=p===!0?W1t:p;return wi(Wd,{...Yr({FallbackComponent:k},x),children:wi("div",{style:{width:n.width||"100%",height:n.height||400,textAlign:"center",position:"relative"},children:V})})}var U=vT(o,!1),B=vT(l,!1),G=Yr(Yr({},U1t),U.style),N=Yr(Yr(Yr({},X1t),B.style),{top:G.height}),W=c!==void 0?c:u;return Wr.exports.useEffect(function(){return W?w.current?(R(),D.current=new _Y(H),D.current.observe(w.current)):L(0):w.current&&(R(),D.current&&D.current.unobserve(w.current)),function(){D.current&&w.current&&D.current.unobserve(w.current)}},[w.current,W]),wi(Wd,{...Yr({FallbackComponent:k},x),children:p8("div",{...Yr({ref:function(q){w.current=q,m&&(pt(a)?a(q):a&&(a.current=q))},className:"bizcharts-plot"},d,{style:{position:"relative",height:n.height||"100%",width:n.width||"100%"}}),children:[U.visible&&wi("div",{...Yr({ref:S},f1t(b),{className:"bizcharts-plot-title",style:G}),children:U.text}),B.visible&&wi("div",{...Yr({ref:M},h1t(b),{className:"bizcharts-plot-description",style:N}),children:B.text}),!!F&&wi(Z1t,{...Yr({appendPadding:[10,5,10,10],autoFit:W,ref:m?void 0:a},b,{PlotClass:e,containerStyle:Yr(Yr({},v),{height:F})})})]})})});return i.displayName=r||e.name,i}var _F={},ae={},Ye;(function(e){e.FORE="fore",e.MID="mid",e.BG="bg"})(Ye||(Ye={}));var ct;(function(e){e.TOP="top",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.RIGHT="right",e.RIGHT_TOP="right-top",e.RIGHT_BOTTOM="right-bottom",e.LEFT="left",e.LEFT_TOP="left-top",e.LEFT_BOTTOM="left-bottom",e.BOTTOM="bottom",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e.RADIUS="radius",e.CIRCLE="circle",e.NONE="none"})(ct||(ct={}));var Tr;(function(e){e.AXIS="axis",e.GRID="grid",e.LEGEND="legend",e.TOOLTIP="tooltip",e.ANNOTATION="annotation",e.SLIDER="slider",e.SCROLLBAR="scrollbar",e.OTHER="other"})(Tr||(Tr={}));var Of={FORE:3,MID:2,BG:1},Gt;(function(e){e.BEFORE_RENDER="beforerender",e.AFTER_RENDER="afterrender",e.BEFORE_PAINT="beforepaint",e.AFTER_PAINT="afterpaint",e.BEFORE_CHANGE_DATA="beforechangedata",e.AFTER_CHANGE_DATA="afterchangedata",e.BEFORE_CLEAR="beforeclear",e.AFTER_CLEAR="afterclear",e.BEFORE_DESTROY="beforedestroy",e.BEFORE_CHANGE_SIZE="beforechangesize",e.AFTER_CHANGE_SIZE="afterchangesize"})(Gt||(Gt={}));var Ff;(function(e){e.BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate"})(Ff||(Ff={}));var Ri;(function(e){e.MOUSE_ENTER="plot:mouseenter",e.MOUSE_DOWN="plot:mousedown",e.MOUSE_MOVE="plot:mousemove",e.MOUSE_UP="plot:mouseup",e.MOUSE_LEAVE="plot:mouseleave",e.TOUCH_START="plot:touchstart",e.TOUCH_MOVE="plot:touchmove",e.TOUCH_END="plot:touchend",e.TOUCH_CANCEL="plot:touchcancel",e.CLICK="plot:click",e.DBLCLICK="plot:dblclick",e.CONTEXTMENU="plot:contextmenu",e.LEAVE="plot:leave",e.ENTER="plot:enter"})(Ri||(Ri={}));var mx;(function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default"})(mx||(mx={}));var Qv=["color","shape","size"],de="_origin",ZR=1,QR=1,KR=.25,BY={};function NY(e){var r=BY[e];if(!r)throw new Error("G engine '"+e+"' is not exist, please register it at first.");return r}function bF(e,r){BY[e]=r}function Q1t(e){var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function JR(e){return typeof e=="number"&&!isNaN(e)}function tB(e,r,t,i){var n=t,a=i;if(r){var o=Q1t(e);n=o.width?o.width:n,a=o.height?o.height:a}return{width:Math.max(JR(n)?n:ZR,ZR),height:Math.max(JR(a)?a:QR,QR)}}function K1t(e){var r=e.parentNode;r&&r.removeChild(e)}var wF=function(e){X(r,e);function r(t){var i=e.call(this)||this;i.destroyed=!1;var n=t.visible,a=n===void 0?!0:n;return i.visible=a,i}return r.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},r.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},r.prototype.destroy=function(){this.off(),this.destroyed=!0},r.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},r}(gp),J1t=D5,t_t=$5,e_t=B5,r_t=R5,eB=N5,i_t=G5,GY=j5;function n_t(e){if(di(e))return null;var r=e[0].x,t=e[0].x,i=e[0].y,n=e[0].y;return P(e,function(a){r=r>a.x?a.x:r,t=ta.y?a.y:i,n=n=i&&e<=n}function o_t(e,r,t){if(Ct(e))return e.padEnd(r,t);if(it(e)){var i=e.length;if(i=this.minX&&r.maxX<=this.maxX&&r.minY>=this.minY&&r.maxY<=this.maxY},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.add=function(){for(var r=[],t=0;tr.minX&&this.minYr.minY},e.prototype.size=function(){return this.width*this.height},e.prototype.isPointIn=function(r){return r.x>=this.minX&&r.x<=this.maxX&&r.y>=this.minY&&r.y<=this.maxY},e}();function l_t(e){return[[e.minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]]}function fg(e){if(e.isPolar&&!e.isTransposed)return(e.endAngle-e.startAngle)*e.getRadius();var r=e.convert({x:0,y:0}),t=e.convert({x:1,y:0});return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function s_t(e){if(e.isPolar){var r=e.startAngle,t=e.endAngle;return t-r===Math.PI*2}return!1}function A_(e,r){var t=e.getCenter();return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function _T(e,r){var t=!1;if(e)if(e.type==="theta"){var i=e.start,n=e.end;t=xf(r.x,i.x,n.x)&&xf(r.y,i.y,n.y)}else{var a=e.invert(r);t=xf(a.x,0,1)&&xf(a.y,0,1)}return t}function Kf(e,r){var t=e.getCenter();return Math.atan2(r.y-t.y,r.x-t.x)}function jY(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight();if(e.isPolar){var o=e.startAngle,l=e.endAngle,s=e.getCenter(),u=e.getRadius();return{type:"path",startState:{path:ts(s.x,s.y,u+r,o,o)},endState:function(f){var h=(l-o)*f+o,v=ts(s.x,s.y,u+r,o,h);return{path:v}},attrs:{path:ts(s.x,s.y,u+r,o,l)}}}var c;return e.isTransposed?c={height:a+r*2}:c={width:n+r*2},{type:"rect",startState:{x:t.x-r,y:i.y-r,width:e.isTransposed?n+r*2:0,height:e.isTransposed?0:a+r*2},endState:c,attrs:{x:t.x-r,y:i.y-r,width:n+r*2,height:a+r*2}}}function u_t(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight(),o=Math.min(t.x,i.x),l=Math.min(t.y,i.y);return Mi.fromRange(o-r,l-r,o+n+r,l+a+r)}var c_t=/^(?:(?!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 f_t(e){var r="linear";return c_t.test(e)?r="timeCat":Ct(e)&&(r="cat"),r}function h_t(e,r,t){var i=r||[];if(Mt(e)||K(YG(i,e))&&di(t)){var n=Gd("identity");return new n({field:e.toString(),values:[e]})}var a=Xn(i,e),o=I(t,"type",f_t(a[0])),l=Gd(o);return new l(A({field:e,values:a},t))}function v_t(e,r){if(e.type!=="identity"&&r.type!=="identity"){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);e.change(t)}}function rp(e){return e.alias||e.field}function HY(e,r,t){var i=e.values,n=i.length,a;if(n===1)a=[.5,1];else{var o=1,l=0;s_t(r)?r.isTransposed?(o=I(t,"widthRatio.multiplePie",1/1.3),l=1/n*o,a=[l/2,1-l/2]):a=[0,1-1/n]:(l=1/n/2,a=[l,1-l])}return a}function d_t(e){var r=e.values.filter(function(t){return!K(t)&&!isNaN(t)});return Math.max.apply(Math,qr(qr([],r,!1),[K(e.max)?-1/0:e.max],!1))}function p_t(e){var r,t;switch(e){case ct.TOP:r={x:0,y:1},t={x:1,y:1};break;case ct.RIGHT:r={x:1,y:0},t={x:1,y:1};break;case ct.BOTTOM:r={x:0,y:0},t={x:1,y:0};break;case ct.LEFT:r={x:0,y:0},t={x:0,y:1};break;default:r=t={x:0,y:0}}return{start:r,end:t}}function g_t(e){var r,t;return e.isTransposed?(r={x:0,y:0},t={x:1,y:0}):(r={x:0,y:0},t={x:0,y:1}),{start:r,end:t}}function Um(e,r){var t={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?t=p_t(r):e.isPolar&&(t=g_t(e));var i=t.start,n=t.end;return{start:e.convert(i),end:e.convert(n)}}function YY(e){var r=e.start,t=e.end;return r.x===t.x}function nB(e,r){var t=e.start,i=e.end,n=YY(e);return n?(t.y-i.y)*(r.x-t.x)>0?1:-1:(i.x-t.x)*(t.y-r.y)>0?-1:1}function qm(e,r){var t=I(e,["components","axis"],{});return ft({},I(t,["common"],{}),ft({},I(t,[r],{})))}function aB(e,r,t){var i=I(e,["components","axis"],{});return ft({},I(i,["common","title"],{}),ft({},I(i,[r,"title"],{})),t)}function _S(e){var r=e.x,t=e.y,i=e.circleCenter,n=t.start>t.end,a=e.isTransposed?e.convert({x:n?0:1,y:0}):e.convert({x:0,y:n?0:1}),o=[a.x-i.x,a.y-i.y],l=[1,0],s=a.y>i.y?z0(o,l):z0(o,l)*-1,u=s+(r.end-r.start),c=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2));return{center:i,radius:c,startAngle:s,endAngle:u}}function xx(e,r){return Hu(e)?e===!1?!1:{}:I(e,[r])}function oB(e,r){return I(e,"position",r)}function lB(e,r){return I(r,["title","text"],rp(e))}var hc=function(){function e(r,t){this.destroyed=!1,this.facets=[],this.view=r,this.cfg=ft({},this.getDefaultCfg(),t)}return e.prototype.init=function(){this.container||(this.container=this.createContainer());var r=this.view.getData();this.facets=this.generateFacets(r)},e.prototype.render=function(){this.renderViews()},e.prototype.update=function(){},e.prototype.clear=function(){this.clearFacetViews()},e.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},e.prototype.facetToView=function(r){var t=r.region,i=r.data,n=r.padding,a=n===void 0?this.cfg.padding:n,o=this.view.createView({region:t,padding:a});o.data(i||[]),r.view=o,this.beforeEachView(o,r);var l=this.cfg.eachView;return l&&l(o,r),this.afterEachView(o,r),o},e.prototype.createContainer=function(){var r=this.view.getLayer(Ye.FORE);return r.addGroup()},e.prototype.renderViews=function(){this.createFacetViews()},e.prototype.createFacetViews=function(){var r=this;return this.facets.map(function(t){return r.facetToView(t)})},e.prototype.clearFacetViews=function(){var r=this;P(this.facets,function(t){t.view&&(r.view.removeView(t.view),t.view=void 0)})},e.prototype.parseSpacing=function(){var r=this.view.viewBBox,t=r.width,i=r.height,n=this.cfg.spacing;return n.map(function(a,o){return Mt(a)?a/(o===0?t:i):parseFloat(a)/100})},e.prototype.getFieldValues=function(r,t){var i=[],n={};return P(r,function(a){var o=a[t];!K(o)&&!n[o]&&(i.push(o),n[o]=!0)}),i},e.prototype.getRegion=function(r,t,i,n){var a=this.parseSpacing(),o=a[0],l=a[1],s=(1+o)/(t===0?1:t)-o,u=(1+l)/(r===0?1:r)-l,c={x:(s+o)*i,y:(u+l)*n},f={x:c.x+s,y:c.y+u};return{start:c,end:f}},e.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},e.prototype.getDefaultTitleCfg=function(){var r=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:r}}},e.prototype.processAxis=function(r,t){var i=r.getOptions(),n=i.coordinate,a=r.geometries,o=I(n,"type","rect");if(o==="rect"&&a.length){K(i.axes)&&(i.axes={});var l=i.axes,s=a[0].getXYFields(),u=s[0],c=s[1],f=xx(l,u),h=xx(l,c);f!==!1&&(i.axes[u]=this.getXAxisOption(u,l,f,t)),h!==!1&&(i.axes[c]=this.getYAxisOption(c,l,h,t))}},e.prototype.getFacetDataFilter=function(r){return function(t){return qx(r,function(i){var n=i.field,a=i.value;return!K(a)&&n?t[n]===a:!0})}},e}(),WY={},XY=function(e){return WY[lc(e)]},vc=function(e,r){WY[lc(e)]=r},Ie=function(){function e(r,t){this.context=r,this.cfg=t,r.addAction(this)}return e.prototype.applyCfg=function(r){Qt(this,r)},e.prototype.init=function(){this.applyCfg(this.cfg)},e.prototype.destroy=function(){this.context.removeAction(this),this.context=null},e}(),y_t=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.execute=function(){this.callback&&this.callback(this.context)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.callback=null},r}(Ie),CF={};function m_t(e,r){var t=CF[e],i=null;if(t){var n=t.ActionClass,a=t.cfg;i=new n(r,a),i.name=e,i.init()}return i}function hg(e){var r=CF[e];return I(r,"ActionClass")}function Et(e,r,t){CF[e]={ActionClass:r,cfg:t}}function x_t(e,r){var t=new y_t(r);return t.callback=e,t.name="callback",t}function __t(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var i=1,n=e.length;i=o[u]?1:0,h=c>Math.PI?1:0,v=t.convert(l),d=A_(t,v);if(d>=.5)if(c===Math.PI*2){var p={x:(l.x+o.x)/2,y:(l.y+o.y)/2},x=t.convert(p);s.push(["A",d,d,0,h,f,x.x,x.y]),s.push(["A",d,d,0,h,f,v.x,v.y])}else s.push(["A",d,d,0,h,f,v.x,v.y]);return s}function w_t(e){P(e,function(r,t){var i=r;if(i[0].toLowerCase()==="a"){var n=e[t-1],a=e[t+1];a&&a[0].toLowerCase()==="a"?n&&n[0].toLowerCase()==="l"&&(n[0]="M"):n&&n[0].toLowerCase()==="a"&&a&&a[0].toLowerCase()==="l"&&(a[0]="M")}})}var C_t=function(e,r,t,i){var n=[],a=!!i,o,l,s,u,c,f,h;if(a){s=i[0],u=i[1];for(var v=0,d=e.length;v=r||n.height>=r?n:null}function T_t(e,r){var t=e.event,i=t.target,n=i.getCanvasBBox();return n.width>=r||n.height>=r?i.attr("path"):null}function bs(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}function Jf(e){var r=e.event,t=r.target,i;return t&&(i=t.get("delegateObject")),i}function QY(e){var r=e.event.gEvent;return!(r&&r.fromShape&&r.toShape&&r.fromShape.get("element")===r.toShape.get("element"))}function ip(e){return e&&e.component&&e.component.isList()}function KY(e){return e&&e.component&&e.component.isSlider()}function np(e){var r=e.event,t=r.target;return t&&t.get("name")==="mask"}function SF(e,r){var t=e.event.target;if(t.get("type")==="path"){var i=T_t(e,r);return i?O_t(e.view,i):void 0}var n=ZY(e,r);return n?AF(e.view,n):null}function JY(e,r,t){var i=ZY(e,t);if(!i)return null;var n=e.view,a=wT(n,r,{x:i.x,y:i.y}),o=wT(n,r,{x:i.maxX,y:i.maxY}),l={minX:a.x,minY:a.y,maxX:o.x,maxY:o.y};return AF(r,l)}function Gr(e){var r=e.geometries,t=[];return P(r,function(i){var n=i.elements;t=t.concat(n)}),e.views&&e.views.length&&P(e.views,function(i){t=t.concat(Gr(i))}),t}function M_t(e,r,t){var i=Gr(e);return i.filter(function(n){return Ea(n,r)===t})}function tW(e,r){var t=e.geometries,i=[];return P(t,function(n){var a=n.getElementsBy(function(o){return o.hasState(r)});i=i.concat(a)}),i}function Ea(e,r){var t=e.getModel(),i=t.data,n;return it(i)?n=i[0][r]:n=i[r],n}function E_t(e,r){return!(r.minX>e.maxX||r.maxXe.maxY||r.maxY=r.x&&e.y<=r.y&&e.maxY>r.y}function vo(e){var r=e.parent,t=null;return r&&(t=r.views.filter(function(i){return i!==e})),t}function P_t(e,r){var t=e.getCoordinate();return t.invert(r)}function wT(e,r,t){var i=P_t(e,t);return r.getCoordinate().convert(i)}function rW(e,r,t,i){var n=!1;return P(e,function(a){if(a[t]===r[t]&&a[i]===r[i])return n=!0,!1}),n}function th(e,r){var t=e.getScaleByField(r);return!t&&e.views&&P(e.views,function(i){if(t=th(i,r),t)return!1}),t}var I_t=function(){function e(r){this.actions=[],this.event=null,this.cacheMap={},this.view=r}return e.prototype.cache=function(){for(var r=[],t=0;t=0&&t.splice(i,1)},e.prototype.getCurrentPoint=function(){var r=this.event;if(r)if(r.target instanceof HTMLElement){var t=this.view.getCanvas(),i=t.getPointByClient(r.clientX,r.clientY);return i}else return{x:r.x,y:r.y};return null},e.prototype.getCurrentShape=function(){return I(this.event,["gEvent","shape"])},e.prototype.isInPlot=function(){var r=this.getCurrentPoint();return r?this.view.isPointInPlot(r):!1},e.prototype.isInShape=function(r){var t=this.getCurrentShape();return t?t.get("name")===r:!1},e.prototype.isInComponent=function(r){var t=eW(this.view),i=this.getCurrentPoint();return i?!!t.find(function(n){var a=n.getBBox();return r?n.get("name")===r&&uB(a,i):uB(a,i)}):!1},e.prototype.destroy=function(){P(this.actions.slice(),function(r){r.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},e}(),iW=function(){function e(r,t){this.view=r,this.cfg=t}return e.prototype.init=function(){this.initEvents()},e.prototype.initEvents=function(){},e.prototype.clearEvents=function(){},e.prototype.destroy=function(){this.clearEvents()},e}();function cB(e,r,t){var i=e.split(":"),n=i[0],a=r.getAction(n)||m_t(n,r);if(!a)throw new Error("There is no action named "+n);var o=i[1];return{action:a,methodName:o,arg:t}}function fB(e){var r=e.action,t=e.methodName,i=e.arg;if(r[t])r[t](i);else throw new Error("Action("+r.name+") doesn't have a method called "+t)}var sn={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},L_t=function(e){X(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.callbackCaches={},n.emitCaches={},n.steps=i,n}return r.prototype.init=function(){this.initContext(),e.prototype.init.call(this)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},r.prototype.initEvents=function(){var t=this;P(this.steps,function(i,n){P(i,function(a){var o=t.getActionCallback(n,a);o&&t.bindEvent(a.trigger,o)})})},r.prototype.clearEvents=function(){var t=this;P(this.steps,function(i,n){P(i,function(a){var o=t.getActionCallback(n,a);o&&t.offEvent(a.trigger,o)})})},r.prototype.initContext=function(){var t=this.view,i=new I_t(t);this.context=i;var n=this.steps;P(n,function(a){P(a,function(o){if(pt(o.action))o.actionObject={action:x_t(o.action,i),methodName:"execute"};else if(Ct(o.action))o.actionObject=cB(o.action,i,o.arg);else if(it(o.action)){var l=o.action,s=it(o.arg)?o.arg:[o.arg];o.actionObject=[],P(l,function(u,c){o.actionObject.push(cB(u,i,s[c]))})}})})},r.prototype.isAllowStep=function(t){var i=this.currentStepName,n=this.steps;if(i===t||t===sn.SHOW_ENABLE)return!0;if(t===sn.PROCESSING)return i===sn.START;if(t===sn.START)return i!==sn.PROCESSING;if(t===sn.END)return i===sn.PROCESSING||i===sn.START;if(t===sn.ROLLBACK){if(n[sn.END])return i===sn.END;if(i===sn.START)return!0}return!1},r.prototype.isAllowExecute=function(t,i){if(this.isAllowStep(t)){var n=this.getKey(t,i);return i.once&&this.emitCaches[n]?!1:i.isEnable?i.isEnable(this.context):!0}return!1},r.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},r.prototype.afterExecute=function(t,i){t!==sn.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,i);this.emitCaches[n]=!0},r.prototype.getKey=function(t,i){return t+i.trigger+i.action},r.prototype.getActionCallback=function(t,i){var n=this,a=this.context,o=this.callbackCaches,l=i.actionObject;if(i.action&&l){var s=this.getKey(t,i);if(!o[s]){var u=function(c){a.event=c,n.isAllowExecute(t,i)?(it(l)?P(l,function(f){a.event=c,fB(f)}):(a.event=c,fB(l)),n.afterExecute(t,i),i.callback&&(a.event=c,i.callback(a))):a.event=null};i.debounce?o[s]=t1(u,i.debounce.wait,i.debounce.immediate):i.throttle?o[s]=i1(u,i.throttle.wait,{leading:i.throttle.leading,trailing:i.throttle.trailing}):o[s]=u}return o[s]}return null},r.prototype.bindEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.addEventListener(n[1],i):n[0]==="document"?document.addEventListener(n[1],i):this.view.on(t,i)},r.prototype.offEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.removeEventListener(n[1],i):n[0]==="document"?document.removeEventListener(n[1],i):this.view.off(t,i)},r}(iW),nW={};function aW(e){return nW[lc(e)]}function Lt(e,r){nW[lc(e)]=r}function D_t(e,r,t){var i=aW(e);if(!i)return null;if(wa(i)){var n=Qt(fi(i),t);return new L_t(r,n)}else{var a=i;return new a(r,t)}}function $_t(e){return{title:{autoRotate:!0,position:"center",spacing:e.axisTitleSpacing,style:{fill:e.axisTitleTextFillColor,fontSize:e.axisTitleTextFontSize,lineHeight:e.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:e.axisLabelOffset,style:{fill:e.axisLabelFillColor,fontSize:e.axisLabelFontSize,lineHeight:e.axisLabelLineHeight,fontFamily:e.fontFamily}},line:{style:{lineWidth:e.axisLineBorder,stroke:e.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:e.axisGridBorderColor,lineWidth:e.axisGridBorder,lineDash:e.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:e.axisTickLineBorder,stroke:e.axisTickLineBorderColor},alignTick:!0,length:e.axisTickLineLength},subTickLine:null,animate:!0}}function k_t(e){return{title:null,marker:{symbol:"circle",spacing:e.legendMarkerSpacing,style:{r:e.legendCircleMarkerSize,fill:e.legendMarkerColor}},itemName:{spacing:5,style:{fill:e.legendItemNameFillColor,fontFamily:e.fontFamily,fontSize:e.legendItemNameFontSize,lineHeight:e.legendItemNameLineHeight,fontWeight:e.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:e.legendPageNavigatorMarkerSize,inactiveFill:e.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:e.legendPageNavigatorMarkerInactiveFillOpacity,fill:e.legendPageNavigatorMarkerFillColor,opacity:e.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:e.legendPageNavigatorTextFillColor,fontSize:e.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:e.legendItemSpacing,itemMarginBottom:e.legendItemMarginBottom,padding:e.legendPadding}}function oW(e){var r,t={point:{default:{fill:e.pointFillColor,r:e.pointSize,stroke:e.pointBorderColor,lineWidth:e.pointBorder,fillOpacity:e.pointFillOpacity},active:{stroke:e.pointActiveBorderColor,lineWidth:e.pointActiveBorder},selected:{stroke:e.pointSelectedBorderColor,lineWidth:e.pointSelectedBorder},inactive:{fillOpacity:e.pointInactiveFillOpacity,strokeOpacity:e.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:e.hollowPointFillColor,lineWidth:e.hollowPointBorder,stroke:e.hollowPointBorderColor,strokeOpacity:e.hollowPointBorderOpacity,r:e.hollowPointSize},active:{stroke:e.hollowPointActiveBorderColor,strokeOpacity:e.hollowPointActiveBorderOpacity},selected:{lineWidth:e.hollowPointSelectedBorder,stroke:e.hollowPointSelectedBorderColor,strokeOpacity:e.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:e.hollowPointInactiveBorderOpacity}},area:{default:{fill:e.areaFillColor,fillOpacity:e.areaFillOpacity,stroke:null},active:{fillOpacity:e.areaActiveFillOpacity},selected:{fillOpacity:e.areaSelectedFillOpacity},inactive:{fillOpacity:e.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:e.hollowAreaBorderColor,lineWidth:e.hollowAreaBorder,strokeOpacity:e.hollowAreaBorderOpacity},active:{fill:null,lineWidth:e.hollowAreaActiveBorder},selected:{fill:null,lineWidth:e.hollowAreaSelectedBorder},inactive:{strokeOpacity:e.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:e.intervalFillColor,fillOpacity:e.intervalFillOpacity},active:{stroke:e.intervalActiveBorderColor,lineWidth:e.intervalActiveBorder},selected:{stroke:e.intervalSelectedBorderColor,lineWidth:e.intervalSelectedBorder},inactive:{fillOpacity:e.intervalInactiveFillOpacity,strokeOpacity:e.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:e.hollowIntervalFillColor,stroke:e.hollowIntervalBorderColor,lineWidth:e.hollowIntervalBorder,strokeOpacity:e.hollowIntervalBorderOpacity},active:{stroke:e.hollowIntervalActiveBorderColor,lineWidth:e.hollowIntervalActiveBorder,strokeOpacity:e.hollowIntervalActiveBorderOpacity},selected:{stroke:e.hollowIntervalSelectedBorderColor,lineWidth:e.hollowIntervalSelectedBorder,strokeOpacity:e.hollowIntervalSelectedBorderOpacity},inactive:{stroke:e.hollowIntervalInactiveBorderColor,lineWidth:e.hollowIntervalInactiveBorder,strokeOpacity:e.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:e.lineBorderColor,lineWidth:e.lineBorder,strokeOpacity:e.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:e.lineActiveBorder},selected:{lineWidth:e.lineSelectedBorder},inactive:{strokeOpacity:e.lineInactiveBorderOpacity}}},i=$_t(e),n=k_t(e);return{background:e.backgroundColor,defaultColor:e.brandColor,subColor:e.subColor,semanticRed:e.paletteSemanticRed,semanticGreen:e.paletteSemanticGreen,padding:"auto",fontFamily:e.fontFamily,columnWidthRatio:1/2,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:e.paletteQualitative10,colors20:e.paletteQualitative20,sequenceColors:e.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:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:function(a){var o=a.geometry.coordinate;if(o.isPolar&&o.isTransposed){var l=ep(a.getModel(),o),s=l.startAngle,u=l.endAngle,c=(s+u)/2,f=7.5,h=f*Math.cos(c),v=f*Math.sin(c);return{matrix:rr(null,[["t",h,v]])}}return t.interval.selected}}},"hollow-rect":{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},line:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},tick:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},funnel:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}},pyramid:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},line:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},dot:{default:{style:A(A({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:A(A({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:A(A({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:A(A({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:A(A({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:A(A({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:A(A({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:A(A({},t.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hvh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},polygon:{polygon:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},point:{circle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},square:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},bowtie:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},diamond:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},hexagon:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},triangle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"triangle-down":{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"hollow-circle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-square":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-bowtie":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-diamond":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-hexagon":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle-down":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},cross:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},tick:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},plus:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},hyphen:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},line:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}}},area:{area:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},smooth:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},line:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"smooth-line":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}},schema:{candle:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},box:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}}},edge:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},arc:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},violin:{violin:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hollow:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"hollow-smooth":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}}},components:{axis:{common:i,top:{position:"top",grid:null,title:null,verticalLimitLength:1/2},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:1/2},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:ft({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:ft({},i.grid,{line:{type:"circle"}})}},legend:{common:n,right:{layout:"vertical",padding:e.legendVerticalPadding},left:{layout:"vertical",padding:e.legendVerticalPadding},top:{layout:"horizontal",padding:e.legendHorizontalPadding},bottom:{layout:"horizontal",padding:e.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:e.sliderRailHeight,defaultLength:e.sliderRailWidth,style:{fill:e.sliderRailFillColor,stroke:e.sliderRailBorderColor,lineWidth:e.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:e.sliderLabelTextFillColor,fontSize:e.sliderLabelTextFontSize,lineHeight:e.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily}},handler:{size:e.sliderHandlerWidth,style:{fill:e.sliderHandlerFillColor,stroke:e.sliderHandlerBorderColor}},slidable:!0,padding:n.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:e.tooltipCrosshairsBorderColor,lineWidth:e.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(r={},r[""+Nf]={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:e.tooltipContainerFillColor,opacity:e.tooltipContainerFillOpacity,boxShadow:e.tooltipContainerShadow,borderRadius:e.tooltipContainerBorderRadius+"px",color:e.tooltipTextFillColor,fontSize:e.tooltipTextFontSize+"px",fontFamily:e.fontFamily,lineHeight:e.tooltipTextLineHeight+"px",padding:"0 12px 0 12px"},r[""+Gf]={marginBottom:"12px",marginTop:"12px"},r[""+Hd]={margin:0,listStyleType:"none",padding:0},r[""+m1]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},r[""+x1]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r[""+_1]={display:"inline-block",float:"right",marginLeft:"30px"},r)},annotation:{arc:{style:{stroke:e.annotationArcBorderColor,lineWidth:e.annotationArcBorder},animate:!0},line:{style:{stroke:e.annotationLineBorderColor,lineDash:e.annotationLineDash,lineWidth:e.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textAlign:"start",fontFamily:e.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:e.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:e.annotationRegionBorder,stroke:e.annotationRegionBorderColor,fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:e.brandColor,lineWidth:2}},line:{style:{stroke:e.annotationLineBorderColor,lineWidth:e.annotationLineBorder},length:e.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:e.cSliderBackgroundFillColor,opacity:e.cSliderBackgroundFillOpacity},foregroundStyle:{fill:e.cSliderForegroundFillColor,opacity:e.cSliderForegroundFillOpacity},handlerStyle:{width:e.cSliderHandlerWidth,height:e.cSliderHandlerHeight,fill:e.cSliderHandlerFillColor,opacity:e.cSliderHandlerFillOpacity,stroke:e.cSliderHandlerBorderColor,lineWidth:e.cSliderHandlerBorder,radius:e.cSliderHandlerBorderRadius,highLightFill:e.cSliderHandlerHighlightFillColor},textStyle:{fill:e.cSliderTextFillColor,opacity:e.cSliderTextFillOpacity,fontSize:e.cSliderTextFontSize,lineHeight:e.cSliderTextLineHeight,fontWeight:e.cSliderTextFontWeight,stroke:e.cSliderTextBorderColor,lineWidth:e.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:e.scrollbarTrackFillColor,thumbColor:e.scrollbarThumbFillColor}},hover:{style:{thumbColor:e.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:e.labelFillColor,fontSize:e.labelFontSize,fontFamily:e.fontFamily,stroke:e.labelBorderColor,lineWidth:e.labelBorder},fillColorDark:e.labelFillColorDark,fillColorLight:e.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:e.innerLabelFillColor,fontSize:e.innerLabelFontSize,fontFamily:e.fontFamily,stroke:e.innerLabelBorderColor,lineWidth:e.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:e.overflowLabelFillColor,fontSize:e.overflowLabelFontSize,fontFamily:e.fontFamily,stroke:e.overflowLabelBorderColor,lineWidth:e.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:e.labelLineBorder}},autoRotate:!0}}}var le={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},Ov={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},R_t=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],B_t=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],N_t=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],lW=function(e){e===void 0&&(e={});var r=e.backgroundColor,t=r===void 0?"transparent":r,i=e.subColor,n=i===void 0?"rgba(0,0,0,0.05)":i,a=e.paletteQualitative10,o=a===void 0?R_t:a,l=e.paletteQualitative20,s=l===void 0?B_t:l,u=e.paletteSemanticRed,c=u===void 0?"#F4664A":u,f=e.paletteSemanticGreen,h=f===void 0?"#30BF78":f,v=e.paletteSemanticYellow,d=v===void 0?"#FAAD14":v,p=e.paletteSequence,x=p===void 0?N_t:p,m=e.fontFamily,_=m===void 0?`"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`:m,b=e.brandColor,w=b===void 0?o[0]:b;return{backgroundColor:t,brandColor:w,subColor:n,paletteQualitative10:o,paletteQualitative20:s,paletteSemanticRed:c,paletteSemanticGreen:h,paletteSemanticYellow:d,paletteSequence:x,fontFamily:_,axisLineBorderColor:le[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:le[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisTickLineBorderColor:le[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:le[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:le[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:le[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:le[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:w,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:le[65],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:le[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:le[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:le[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:le[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:le[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:le[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:le[25],annotationArcBorderColor:le[15],annotationArcBorder:1,annotationLineBorderColor:le[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:le[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:le[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:le[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:le[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:le[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Ov[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:le[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Ov[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:le[25],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:w,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Ov[100],pointBorderOpacity:1,pointActiveBorderColor:le[100],pointSelectedBorder:2,pointSelectedBorderColor:le[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:w,hollowPointBorderOpacity:.95,hollowPointFillColor:Ov[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:le[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:le[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:w,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:w,areaFillOpacity:.25,areaActiveFillColor:w,areaActiveFillOpacity:.5,areaSelectedFillColor:w,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:w,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:le[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:le[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:w,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:le[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:le[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:w,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Ov[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:le[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:le[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}};lW();function bx(e){var r=e.styleSheet,t=r===void 0?{}:r,i=ue(e,["styleSheet"]),n=lW(t);return ft({},oW(n),i)}var G_t=bx({}),CT={default:G_t};function es(e){return I(CT,lc(e),CT.default)}function sW(e,r){CT[lc(e)]=bx(r)}function hB(e,r,t){var i=t.translate(e),n=t.translate(r);return Nr(i,n)}function z_t(e,r){var t=r.coordinate,i=r.getXScale(),n=i.range,a=n[n.length-1],o=n[0],l=t.invert(e),s=l.x;return t.isPolar&&s>(1+a)/2&&(s=o),i.translate(i.invert(s))}function vB(e,r,t){var i=t.coordinate,n=t.getYScale(),a=n.field,o=i.invert(r),l=n.invert(o.y),s=Yn(e,function(u){var c=u[de];return c[a][0]<=l&&c[a][1]>=l});return s||e[e.length-1]}var V_t=sc(function(e){if(e.isCategory)return 1;for(var r=e.values,t=r.length,i=e.translate(r[0]),n=i,a=0;an&&(n=l)}return(n-i)/(t-1)});function j_t(e,r,t){var i=r.getAttribute("position"),n=i.getFields(),a=r.scales,o=pt(t)||!t?n[0]:t,l=a[o],s=l?l.getText(e[o]):e[o]||o;return pt(t)?t(s,e):s}function H_t(e){var r=_h(e.attributes);return zr(r,function(t){return eo(Qv,t.type)})}function uW(e){for(var r=H_t(e),t,i=0,n=r;i=w)if(F)it(s)||(s=[]),s.push(L);else{s=L;break}}it(s)&&(s=vB(s,e,t))}else{var D=void 0;if(!n.isLinear&&n.type!=="timeCat"){for(var d=0;dn.translate(O)||wn.max||wMath.abs(n.translate(D[de][o])-w)&&(b=D)}var U=V_t(t.getXScale());return!s&&Math.abs(n.translate(b[de][o])-w)<=U/2&&(s=b),s}function MF(e,r,t,i){t===void 0&&(t=""),i===void 0&&(i=!1);var n=e[de],a=j_t(n,r,t),o=r.tooltipOption,l=r.theme.defaultColor,s=[],u,c;function f(O,F){if(i||!K(F)&&F!==""){var L={title:a,data:n,mappingData:e,name:O,value:F,color:e.color||l,marker:!0};s.push(L)}}if(qt(o)){var h=o.fields,v=o.callback;if(v){var d=h.map(function(O){return e[de][O]}),p=v.apply(void 0,d),x=A({data:e[de],mappingData:e,title:a,color:e.color||l,marker:!0},p);s.push(x)}else for(var m=r.scales,_=0,b=h;_');D.appendChild(R);var H=tB(D,s,a,o),k=NY(h),V=new k.Canvas(A({container:R,pixelRatio:v,localRefresh:p,supportCSSTransform:b},H));return i=e.call(this,{parent:null,canvas:V,backgroundGroup:V.addGroup({zIndex:Of.BG}),middleGroup:V.addGroup({zIndex:Of.MID}),foregroundGroup:V.addGroup({zIndex:Of.FORE}),padding:u,appendPadding:c,visible:m,options:M,limitInPlot:O,theme:F,syncViewPadding:L})||this,i.onResize=t1(function(){i.forceFit()},300),i.ele=D,i.canvas=V,i.width=H.width,i.height=H.height,i.autoFit=s,i.localRefresh=p,i.renderer=h,i.wrapperElement=R,i.updateCanvasStyle(),i.bindAutoFit(),i.initDefaultInteractions(S),i}return r.prototype.initDefaultInteractions=function(t){var i=this;P(t,function(n){i.interaction(n)})},r.prototype.aria=function(t){var i="aria-label";t===!1?this.ele.removeAttribute(i):this.ele.setAttribute(i,t.label)},r.prototype.changeSize=function(t,i){return this.width===t&&this.height===i?this:(this.emit(Gt.BEFORE_CHANGE_SIZE),this.width=t,this.height=i,this.canvas.changeSize(t,i),this.render(!0),this.emit(Gt.AFTER_CHANGE_SIZE),this)},r.prototype.clear=function(){e.prototype.clear.call(this),this.aria(!1)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),K1t(this.wrapperElement),this.wrapperElement=null},r.prototype.changeVisible=function(t){return e.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},r.prototype.forceFit=function(){if(!this.destroyed){var t=tB(this.ele,!0,this.width,this.height),i=t.width,n=t.height;this.changeSize(i,n)}},r.prototype.updateCanvasStyle=function(){Xr(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},r.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},r.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},r}(FF),dc=function(){function e(r){this.visible=!0,this.components=[],this.view=r}return e.prototype.clear=function(r){P(this.components,function(t){t.component.destroy()}),this.components=[]},e.prototype.destroy=function(){this.clear()},e.prototype.getComponents=function(){return this.components},e.prototype.changeVisible=function(r){this.visible!==r&&(this.components.forEach(function(t){r?t.component.show():t.component.hide()}),this.visible=r)},e}();function rbt(e){for(var r=[],t=function(n){var a=e[n],o=Yn(r,function(l){return l.color===a.color&&l.name===a.name&&l.value===a.value&&l.title===a.title});o||r.push(a)},i=0;i1){for(var d=i[0],p=Math.abs(t.y-d[0].y),x=0,m=i;x'+l+"":l};return A(A({},t),{customContent:n})},r.prototype.getTitle=function(t){var i=t[0].title||t[0].name;return this.title=i,i},r.prototype.renderTooltip=function(){var t=this.view.getCanvas(),i={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),a=new GY(A(A({parent:t.get("el").parentNode,region:i},n),{visible:!1,crosshairs:null}));a.init(),this.tooltip=a},r.prototype.renderTooltipMarkers=function(t,i){for(var n=this.getTooltipMarkersGroup(),a=0,o=t;a-1)return;a.push(t),(t==="active"||t==="selected")&&(s==null||s.toFront())}else{if(c===-1)return;a.splice(c,1),(t==="active"||t==="selected")&&(this.geometry.zIndexReversed?s.setZIndex(this.geometry.elements.length-this.elementIndex):s.setZIndex(this.elementIndex))}var f=o.drawShape(u,l,this.getOffscreenGroup());a.length?this.syncShapeStyle(s,f,a,null):this.syncShapeStyle(s,f,["reset"],null),f.remove(!0);var h={state:t,stateStatus:i,element:this,target:this.container};this.container.emit("statechange",h),BM(this.shape,"statechange",h)},r.prototype.clearStates=function(){var t=this,i=this.states;P(i,function(n){t.setState(n,!1)}),this.states=[]},r.prototype.hasState=function(t){return this.states.includes(t)},r.prototype.getStates=function(){return this.states},r.prototype.getData=function(){return this.data},r.prototype.getModel=function(){return this.model},r.prototype.getBBox=function(){var t=this,i=t.shape,n=t.labelShape,a={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return i&&(a=i.getCanvasBBox()),n&&n.forEach(function(o){var l=o.getCanvasBBox();a.x=Math.min(l.x,a.x),a.y=Math.min(l.y,a.y),a.minX=Math.min(l.minX,a.minX),a.minY=Math.min(l.minY,a.minY),a.maxX=Math.max(l.maxX,a.maxX),a.maxY=Math.max(l.maxY,a.maxY)}),a.width=a.maxX-a.minX,a.height=a.maxY-a.minY,a},r.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,i=t.shapeType,n=t.geometry,a=t.shapeFactory,o=n.stateOption,l=a.defaultShapeType,s=a.theme[i]||a.theme[l];this.statesStyle=ft({},s,o)}return this.statesStyle},r.prototype.getStateStyle=function(t,i){var n=this.getStatesStyle(),a=I(n,[t,"style"],{}),o=a[i]||a;return pt(o)?o(this):o},r.prototype.getAnimateCfg=function(t){var i=this,n=this.animate;if(n){var a=n[t];return a&&A(A({},a),{callback:function(){var o;pt(a.callback)&&a.callback(),(o=i.geometry)===null||o===void 0||o.emit(Ff.AFTER_DRAW_ANIMATE)}})}return null},r.prototype.drawShape=function(t,i){var n;i===void 0&&(i=!1);var a=this,o=a.shapeFactory,l=a.container,s=a.shapeType;if(this.shape=o.drawShape(s,t,l),this.shape){this.setShapeInfo(this.shape,t);var u=this.shape.cfg.name;u?Ct(u)&&(this.shape.cfg.name=["element",u]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var c=i?"enter":"appear",f=this.getAnimateCfg(c);f&&((n=this.geometry)===null||n===void 0||n.emit(Ff.BEFORE_DRAW_ANIMATE),Pf(this.shape,f,{coordinate:o.coordinate,toAttrs:A({},this.shape.attr())}))}},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.setShapeInfo=function(t,i){var n=this;if(t.cfg.origin=i,t.cfg.element=this,t.isGroup()){var a=t.get("children");a.forEach(function(o){n.setShapeInfo(o,i)})}},r.prototype.syncShapeStyle=function(t,i,n,a,o){var l=this,s;if(n===void 0&&(n=[]),o===void 0&&(o=0),!(!t||!i)){var u=t.get("clipShape"),c=i.get("clipShape");if(this.syncShapeStyle(u,c,n,a),t.isGroup())for(var f=t.get("children"),h=i.get("children"),v=0;v=0?a=i:n<=0?a=n:a=0,a},r.prototype.createAttrOption=function(t,i,n){if(K(i)||qt(i))qt(i)&&Ge(Object.keys(i),["values"])?jt(this.attributeOption,t,{fields:i.values}):jt(this.attributeOption,t,i);else{var a={};Mt(i)?a.values=[i]:a.fields=Fv(i),n&&(pt(n)?a.callback=n:a.values=n),jt(this.attributeOption,t,a)}},r.prototype.initAttributes=function(){var t=this,i=this,n=i.attributes,a=i.attributeOption,o=i.theme,l=i.shapeType;this.groupScales=[];var s={},u=function(h){if(a.hasOwnProperty(h)){var v=a[h];if(!v)return{value:void 0};var d=A({},v),p=d.callback,x=d.values,m=d.fields,_=m===void 0?[]:m,b=_.map(function(S){var M=t.scales[S];return M.isCategory&&!s[S]&&Qv.includes(h)&&(t.groupScales.push(M),s[S]=!0),M});d.scales=b,h!=="position"&&b.length===1&&b[0].type==="identity"?d.values=b[0].values:!p&&!x&&(h==="size"?d.values=o.sizes:h==="shape"?d.values=o.shapes[l]||[]:h==="color"&&(b.length?d.values=b[0].values.length<=10?o.colors10:o.colors20:d.values=o.colors10));var w=RM(h);n[h]=new w(d)}};for(var c in a){var f=u(c);if(typeof f=="object")return f.value}},r.prototype.processData=function(t){this.hasSorted=!1;for(var i=this.getAttribute("position").scales,n=i.filter(function(S){return S.isCategory}),a=this.groupData(t),o=[],l=0,s=a.length;ll&&(l=f)}var h=this.scaleDefs,v={};ot.max&&!I(h,[a,"max"])&&(v.max=l),t.change(v)},r.prototype.beforeMapping=function(t){var i=t;if(this.sortable&&this.sort(i),this.generatePoints)for(var n=0,a=i.length;n1)for(var h=0;h0})}function _W(e,r,t){var i=t.data,n=t.origin,a=t.animateCfg,o=t.coordinate,l=I(a,"update");e.set("data",i),e.set("origin",n),e.set("animateCfg",a),e.set("coordinate",o),e.set("visible",r.get("visible")),e.getChildren().forEach(function(s,u){var c=r.getChildByIndex(u);if(!c)e.removeChild(s),s.remove(!0);else{s.set("data",i),s.set("origin",n),s.set("animateCfg",a),s.set("coordinate",o);var f=VY(s,c);l?Pf(s,l,{toAttrs:f,coordinate:o}):s.attr(f),c.isGroup()&&_W(s,c,t)}}),P(r.getChildren(),function(s,u){u>=e.getCount()&&(s.destroyed||e.add(s))})}var dbt=function(){function e(r){this.shapesMap={},this.lastShapesMap={};var t=r.layout,i=r.container;this.layout=t,this.container=i}return e.prototype.render=function(r,t,i){var n=this;i===void 0&&(i=!1),this.shapesMap={};var a=this.container,o=this.createOffscreenGroup();if(r.length){for(var l=0,s=r;l0||i===1?u[l]=n*s:u[l]=n*s*-1,u},e.prototype.getLabelPoint=function(r,t,i){var n=this.getCoordinate(),a=r.content.length;function o(x,m,_){_===void 0&&(_=!1);var b=x;return it(b)&&(r.content.length===1?_?b=yB(b):b.length<=2?b=b[x.length-1]:b=yB(b):b=b[m]),b}var l={content:r.content[i],x:0,y:0,start:{x:0,y:0},color:"#fff"},s=it(t.shape)?t.shape[0]:t.shape,u=s==="funnel"||s==="pyramid";if(this.geometry.type==="polygon"){var c=a_t(t.x,t.y);l.x=c[0],l.y=c[1]}else this.geometry.type==="interval"&&!u?(l.x=o(t.x,i,!0),l.y=o(t.y,i)):(l.x=o(t.x,i),l.y=o(t.y,i));if(u){var f=I(t,"nextPoints"),h=I(t,"points");if(f){var v=n.convert(h[1]),d=n.convert(f[1]);l.x=(v.x+d.x)/2,l.y=(v.y+d.y)/2}else if(s==="pyramid"){var v=n.convert(h[1]),d=n.convert(h[2]);l.x=(v.x+d.x)/2,l.y=(v.y+d.y)/2}}r.position&&this.setLabelPosition(l,t,i,r.position);var p=this.getLabelOffsetPoint(r,i,a);return l.start={x:l.x,y:l.y},l.x+=p.x,l.y+=p.y,l.color=t.color,l},e.prototype.getLabelAlign=function(r,t,i){var n="center",a=this.getCoordinate();if(a.isTransposed){var o=r.offset;o<0?n="right":o===0?n="center":n="left",i>1&&t===0&&(n==="right"?n="left":n==="left"&&(n="right"))}return n},e.prototype.getLabelId=function(r){var t=this.geometry,i=t.type,n=t.getXScale(),a=t.getYScale(),o=r[de],l=t.getElementId(r);return i==="line"||i==="area"?l+=" "+o[n.field]:i==="path"&&(l+=" "+o[n.field]+"-"+o[a.field]),l},e.prototype.getLabelsRenderer=function(){var r=this.geometry,t=r.labelsContainer,i=r.labelOption,n=r.canvasRegion,a=r.animateOption,o=this.geometry.coordinate,l=this.labelsRenderer;return l||(l=new dbt({container:t,layout:I(i,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=l),l.region=n,l.animate=a?vW("label",o):!1,l},e.prototype.getLabelCfgs=function(r){var t=this,i=this.geometry,n=i.labelOption,a=i.scales,o=i.coordinate,l=n,s=l.fields,u=l.callback,c=l.cfg,f=s.map(function(v){return a[v]}),h=[];return P(r,function(v,d){var p=v[de],x=t.getLabelText(p,f),m;if(u){var _=s.map(function(O){return p[O]});if(m=u.apply(void 0,_),K(m)){h.push(null);return}}var b=A(A({id:t.getLabelId(v),elementId:t.geometry.getElementId(v),data:p,mappingData:v,coordinate:o},c),m);pt(b.position)&&(b.position=b.position(p,v,d));var w=t.getLabelOffset(b.offset||0),S=t.getDefaultLabelCfg(w,b.position);b=ft({},S,b),b.offset=t.getLabelOffset(b.offset||0);var M=b.content;pt(M)?b.content=M(p,v,d):Hl(M)&&(b.content=x[0]),h.push(b)}),h},e.prototype.getLabelText=function(r,t){var i=[];return P(t,function(n){var a=r[n.field];it(a)?a=a.map(function(o){return n.getText(o)}):a=n.getText(a),K(a)||a===""?i.push(null):i.push(a)}),i},e.prototype.getOffsetVector=function(r){r===void 0&&(r=0);var t=this.getCoordinate(),i=0;return Mt(r)&&(i=r),t.isTransposed?t.applyMatrix(i,0):t.applyMatrix(0,i)},e.prototype.getGeometryShapes=function(){var r=this.geometry,t={};return P(r.elementsMap,function(i,n){t[n]=i.shape}),P(r.getOffscreenGroup().getChildren(),function(i){var n=r.getElementId(i.get("origin").mappingData);t[n]=i}),t},e}();function MT(e,r,t){if(!e)return t;var i;if(e.callback&&e.callback.length>1){var n=Array(e.callback.length-1).fill("");i=e.mapping.apply(e,qr([r],n,!1)).join("")}else i=e.mapping(r).join("");return i||t}var Ju={hexagon:function(e,r,t){var i=t/2*Math.sqrt(3);return[["M",e,r-t],["L",e+i,r-t/2],["L",e+i,r+t/2],["L",e,r+t],["L",e-i,r+t/2],["L",e-i,r-t/2],["Z"]]},bowtie:function(e,r,t){var i=t-1.5;return[["M",e-t,r-i],["L",e+t,r+i],["L",e+t,r-i],["L",e-t,r+i],["Z"]]},cross:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r+t],["M",e+t,r-t],["L",e-t,r+t]]},tick:function(e,r,t){return[["M",e-t/2,r-t],["L",e+t/2,r-t],["M",e,r-t],["L",e,r+t],["M",e-t/2,r+t],["L",e+t/2,r+t]]},plus:function(e,r,t){return[["M",e-t,r],["L",e+t,r],["M",e,r-t],["L",e,r+t]]},hyphen:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},line:function(e,r,t){return[["M",e,r-t],["L",e,r+t]]}},pbt=["line","cross","tick","plus","hyphen"];function gbt(e,r){return pt(r)?r(e):ft({},e,r)}function ybt(e,r){var t=e.symbol;if(Ct(t)&&pbt.indexOf(t)!==-1){var i=I(e,"style",{}),n=I(i,"lineWidth",1),a=i.stroke||i.fill||r;e.style=ft({},e.style,{lineWidth:n,stroke:a,fill:null})}}function bW(e){var r=e.symbol;Ct(r)&&Ju[r]&&(e.symbol=Ju[r])}function bS(e){return e.startsWith(ct.LEFT)||e.startsWith(ct.RIGHT)?"vertical":"horizontal"}function wW(e,r,t,i,n){var a=t.getScale(t.type);if(a.isCategory){var o=a.field,l=r.getAttribute("color"),s=r.getAttribute("shape"),u=e.getTheme().defaultColor,c=r.coordinate.isPolar;return a.getTicks().map(function(f,h){var v,d=f.text,p=f.value,x=d,m=a.invert(p),_=e.filterFieldData(o,[(v={},v[o]=m,v)]).length===0;P(e.views,function(O){var F;O.filterFieldData(o,[(F={},F[o]=m,F)]).length||(_=!0)});var b=MT(l,m,u),w=MT(s,m,"point"),S=r.getShapeMarker(w,{color:b,isInPolar:c}),M=n;return pt(M)&&(M=M(x,h,A({name:x,value:m},ft({},i,S)))),S=ft({},i,S,Gi(A({},M),["style"])),ybt(S,b),M&&M.style&&(S.style=gbt(S.style,M.style)),bW(S),{id:m,name:x,value:m,marker:S,unchecked:_}})}return[]}function mbt(e,r,t){return t.map(function(i,n){var a=r;pt(a)&&(a=a(i.name,n,ft({},e,i)));var o=pt(i.marker)?i.marker(i.name,n,ft({},e,i)):i.marker,l=ft({},e,a,o);return bW(l),i.marker=l,i})}function mB(e,r){var t=I(e,["components","legend"],{});return ft({},I(t,["common"],{}),ft({},I(t,[r],{})))}var xbt="4.1.32",Oi={getLegendItems:wW,translate:dg,rotate:kF,zoom:fbt,transform:T_,getAngle:ep,getSectorPath:ts,polarToCartesian:ir,getDelegationObject:Jf,getTooltipItems:MF,getMappingValue:MT},ou={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},he={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},fa=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],_bt=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],bbt=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],wbt=function(e){e===void 0&&(e={});var r=e.backgroundColor,t=r===void 0?"#141414":r,i=e.subColor,n=i===void 0?"rgba(255,255,255,0.05)":i,a=e.paletteQualitative10,o=a===void 0?fa:a,l=e.paletteQualitative20,s=l===void 0?_bt:l,u=e.paletteSemanticRed,c=u===void 0?"#F4664A":u,f=e.paletteSemanticGreen,h=f===void 0?"#30BF78":f,v=e.paletteSemanticYellow,d=v===void 0?"#FAAD14":v,p=e.paletteSequence,x=p===void 0?bbt:p,m=e.fontFamily,_=m===void 0?`"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`:m,b=e.brandColor,w=b===void 0?o[0]:b;return{backgroundColor:t,brandColor:w,subColor:n,paletteQualitative10:o,paletteQualitative20:s,paletteSemanticRed:c,paletteSemanticGreen:h,paletteSemanticYellow:d,paletteSequence:x,fontFamily:_,axisLineBorderColor:he[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:he[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisTickLineBorderColor:he[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:he[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:he[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:he[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:he[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:fa[0],legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:he[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendSpacing:16,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:he[45],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:he[45],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:he[65],legendPageNavigatorTextFontSize:12,sliderRailFillColor:he[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:he[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:ou[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:ou[25],annotationArcBorderColor:he[15],annotationArcBorder:1,annotationLineBorderColor:he[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:he[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:he[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:he[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:he[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:he[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:ou[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:he[65],overflowLabelFillColorDark:"#2c3542",overflowLabelFillColorLight:"#ffffff",overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:ou[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:he[25],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:"#fff",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(255,255,255,0.65)",scrollbarThumbFillColor:"rgba(0,0,0,0.35)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.45)",pointFillColor:fa[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:ou[100],pointBorderOpacity:1,pointActiveBorderColor:he[100],pointSelectedBorder:2,pointSelectedBorderColor:he[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:fa[0],hollowPointBorderOpacity:.95,hollowPointFillColor:ou[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:he[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:he[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:fa[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:fa[0],areaFillOpacity:.25,areaActiveFillColor:fa[0],areaActiveFillOpacity:.5,areaSelectedFillColor:fa[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:fa[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:he[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:he[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:fa[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:he[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:he[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:fa[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:ou[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:he[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:he[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}},Cbt=wbt();function wS(e){return e?!1:e==null||isNaN(e)}function xB(e){if(it(e))return wS(e[1].y);var r=e.y;return it(r)?wS(r[0]):wS(r)}function RF(e,r,t){if(r===void 0&&(r=!1),t===void 0&&(t=!0),!e.length||e.length===1&&!t)return[];if(r){for(var i=[],n=0,a=e.length;n0&&(v[0][0]="L")),a=a.concat(v)}),a.push(["Z"])}return a}function M_(e,r,t,i,n){for(var a=Ze(e,r,!r,"lineWidth"),o=e.connectNulls,l=e.isInCircle,s=e.points,u=e.showSinglePoint,c=RF(s,o,u),f=[],h=0,v=c.length;ho&&(o=s),s=i[0]}));for(var d=this.scales[h],p=0,x=t;pr&&(t=t?r/(1+i/t):0,i=r-t),n+a>r&&(n=n?r/(1+a/n):0,a=r-n),[t||0,i||0,n||0,a||0]}function EW(e,r,t){var i=[];if(t.isRect){var n=t.isTransposed?{x:t.start.x,y:r[0].y}:{x:r[0].x,y:t.start.y},a=t.isTransposed?{x:t.end.x,y:r[2].y}:{x:r[3].x,y:t.end.y},o=I(e,["background","style","radius"]);if(o){var l=t.isTransposed?Math.abs(r[0].y-r[2].y):r[2].x-r[1].x,s=t.isTransposed?t.getWidth():t.getHeight(),u=Kv(o,Math.min(l,s)),c=u[0],f=u[1],h=u[2],v=u[3];i.push(["M",n.x,a.y+c]),c!==0&&i.push(["A",c,c,0,0,1,n.x+c,a.y]),i.push(["L",a.x-f,a.y]),f!==0&&i.push(["A",f,f,0,0,1,a.x,a.y+f]),i.push(["L",a.x,n.y-h]),h!==0&&i.push(["A",h,h,0,0,1,a.x-h,n.y]),i.push(["L",n.x+v,n.y]),v!==0&&i.push(["A",v,v,0,0,1,n.x,n.y-v])}else i.push(["M",n.x,n.y]),i.push(["L",a.x,n.y]),i.push(["L",a.x,a.y]),i.push(["L",n.x,a.y]),i.push(["L",n.x,n.y]);i.push(["z"])}if(t.isPolar){var d=t.getCenter(),p=ep(e,t),x=p.startAngle,m=p.endAngle;if(t.type!=="theta"&&!t.isTransposed)i=ts(d.x,d.y,t.getRadius(),x,m);else{var _=function(S){return Math.pow(S,2)},c=Math.sqrt(_(d.x-r[0].x)+_(d.y-r[0].y)),f=Math.sqrt(_(d.x-r[2].x)+_(d.y-r[2].y));i=ts(d.x,d.y,c,t.startAngle,t.endAngle,f)}}return i}function Ibt(e,r,t){var i=t.getWidth(),n=t.getHeight(),a=t.type==="rect",o=[],l=(e[2].x-e[1].x)/2,s=t.isTransposed?l*n/i:l*i/n;return r==="round"?(a?(o.push(["M",e[0].x,e[0].y+s]),o.push(["L",e[1].x,e[1].y-s]),o.push(["A",l,l,0,0,1,e[2].x,e[2].y-s]),o.push(["L",e[3].x,e[3].y+s]),o.push(["A",l,l,0,0,1,e[0].x,e[0].y+s])):(o.push(["M",e[0].x,e[0].y]),o.push(["L",e[1].x,e[1].y]),o.push(["A",l,l,0,0,1,e[2].x,e[2].y]),o.push(["L",e[3].x,e[3].y]),o.push(["A",l,l,0,0,1,e[0].x,e[0].y])),o.push(["z"])):o=zF(e),o}function OW(e,r,t){var i=[];return K(r)?t?i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",(e[2].x+e[3].x)/2,(e[2].y+e[3].y)/2],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",e[2].x,e[2].y],["L",e[3].x,e[3].y],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",r[1].x,r[1].y],["L",r[0].x,r[0].y],["Z"]),i}function Lbt(e,r,t){var i,n,a,o,l=e[0],s=e[1],u=e[2],c=e[3],f=[0,0,0,0],h=f[0],v=f[1],d=f[2],p=f[3];l.ye[1].x?(c=e[0],l=e[1],s=e[2],u=e[3],a=Kv(t,Math.min(c.x-l.x,l.y-s.y)),h=a[0],p=a[1],d=a[2],v=a[3]):(o=Kv(t,Math.min(c.x-l.x,l.y-s.y)),v=o[0],d=o[1],p=o[2],h=o[3]));var x=[];return x.push(["M",s.x,s.y+h]),h!==0&&x.push(["A",h,h,0,0,1,s.x+h,s.y]),x.push(["L",u.x-v,u.y]),v!==0&&x.push(["A",v,v,0,0,1,u.x,u.y+v]),x.push(["L",c.x,c.y-d]),d!==0&&x.push(["A",d,d,0,0,1,c.x-d,c.y]),x.push(["L",l.x+p,l.y]),p!==0&&x.push(["A",p,p,0,0,1,l.x,l.y-p]),x.push(["L",s.x,s.y+h]),x.push(["z"]),x}cl("interval",{defaultShapeType:"rect",getDefaultPoints:function(e){return GF(e)}});Jt("interval","rect",{draw:function(e,r){var t=Ze(e,!1,!0),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=AW(e),o=EW(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:A(A({},a),{path:o}),zIndex:-1,name:LF})}var l;t.radius&&this.coordinate.isRect?l=Lbt(this.parsePoints(e.points),this.coordinate,t.radius):l=this.parsePath(Ibt(e.points,t.lineCap,this.coordinate));var s=i.addShape("path",{attrs:A(A({},t),{path:l}),name:"interval"});return n?i:s},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,fill:r}}:{symbol:"square",style:{r:4,fill:r}}}});function Dbt(e,r){var t=e.length,i=e;Ct(i[0])&&(i=e.map(function(l){return r.translate(l)}));for(var n=i[1]-i[0],a=2;ao&&(n=o)}return n}function $bt(e,r){if(r){var t=qi(e),i=Xn(t,r);return i.length}return e.length}function VF(e){var r=e.theme,t=e.coordinate,i=e.getXScale(),n=i.values,a=e.beforeMappingData,o=n.length,l=fg(e.coordinate),s=e.intervalPadding,u=e.dodgePadding,c=e.maxColumnWidth||r.maxColumnWidth,f=e.minColumnWidth||r.minColumnWidth,h=e.columnWidthRatio||r.columnWidthRatio,v=e.multiplePieWidthRatio||r.multiplePieWidthRatio,d=e.roseWidthRatio||r.roseWidthRatio;if(i.isLinear&&n.length>1){n.sort();var p=Dbt(n,i);o=(i.max-i.min)/p,n.length>o&&(o=n.length)}var x=i.range,m=1/o,_=1;if(t.isPolar?t.isTransposed&&o>1?_=v:_=d:(i.isLinear&&(m*=x[1]-x[0]),_=h),!K(s)&&s>=0){var b=s/l;m=(1-(o-1)*b)/o}else m*=_;if(e.getAdjust("dodge")){var w=e.getAdjust("dodge"),S=w.dodgeBy,M=$bt(a,S);if(!K(u)&&u>=0){var O=u/l;m=(m-O*(M-1))/M}else!K(s)&&s>=0&&(m*=_),m=m/M;m=m>=0?m:0}if(!K(c)&&c>=0){var F=c/l;m>F&&(m=F)}if(!K(f)&&f>=0){var L=f/l;m0&&!I(i,[n,"min"])&&t.change({min:0}),o<=0&&!I(i,[n,"max"])&&t.change({max:0}))}},r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return i.background=this.background,i},r}(fl),Rbt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.type="line";var n=t.sortable,a=n===void 0?!1:n;return i.sortable=a,i}return r}(NF),FW=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],Bbt=["cross","tick","plus","hyphen","line"];function jF(e,r,t,i,n){var a=Ze(r,n,!n,"r"),o=e.parsePoints(r.points),l=o[0];if(r.isStack)l=o[1];else if(o.length>1){for(var s=t.addGroup(),u=0,c=o;u2?"weight":"normal",a;if(e.isInCircle){var o={x:0,y:1};return n==="normal"?a=Ybt(i[0],i[1],o):(t.fill=t.stroke,a=Wbt(i,o)),a=this.parsePath(a),r.addShape("path",{attrs:A(A({},t),{path:a})})}else{if(n==="normal")return i=this.parsePoints(i),a=zY((i[1].x+i[0].x)/2,i[0].y,Math.abs(i[1].x-i[0].x)/2,Math.PI,Math.PI*2),r.addShape("path",{attrs:A(A({},t),{path:a})});var l=OT(i[1],i[3]),s=OT(i[2],i[0]);return a=[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],l,["L",i[3].x,i[3].y],["L",i[2].x,i[2].y],s,["Z"]],a=this.parsePath(a),t.fill=t.stroke,r.addShape("path",{attrs:A(A({},t),{path:a})})}},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});function Xbt(e,r){var t=OT(e,r),i=[["M",e.x,e.y]];return i.push(t),i}Jt("edge","smooth",{draw:function(e,r){var t=Ze(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(Xbt(i[0],i[1]));return r.addShape("path",{attrs:A(A({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var Zm=1/3;function Ubt(e,r){var t=[];t.push({x:e.x,y:e.y*(1-Zm)+r.y*Zm}),t.push({x:r.x,y:e.y*(1-Zm)+r.y*Zm}),t.push(r);var i=[["M",e.x,e.y]];return P(t,function(n){i.push(["L",n.x,n.y])}),i}Jt("edge","vhv",{draw:function(e,r){var t=Ze(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(Ubt(i[0],i[1]));return r.addShape("path",{attrs:A(A({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});Jt("interval","funnel",{getPoints:function(e){return e.size=e.size*2,GF(e)},draw:function(e,r){var t=Ze(e,!1,!0),i=this.parsePath(OW(e.points,e.nextPoints,!1)),n=r.addShape("path",{attrs:A(A({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});Jt("interval","hollow-rect",{draw:function(e,r){var t=Ze(e,!0,!1),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=AW(e),o=EW(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:A(A({},a),{path:o}),zIndex:-1,name:LF})}var l=this.parsePath(zF(e.points)),s=i.addShape("path",{attrs:A(A({},t),{path:l}),name:"interval"});return n?i:s},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,stroke:r,fill:null}}:{symbol:"square",style:{r:4,stroke:r,fill:null}}}});function qbt(e){var r=e.x,t=e.y,i=e.y0;return it(t)?t.map(function(n,a){return{x:it(r)?r[a]:r,y:n}}):[{x:r,y:i},{x:r,y:t}]}Jt("interval","line",{getPoints:function(e){return qbt(e)},draw:function(e,r){var t=Ze(e,!0,!1,"lineWidth"),i=Gi(A({},t),["fill"]),n=this.parsePath(zF(e.points,!1)),a=r.addShape("path",{attrs:A(A({},i),{path:n}),name:"interval"});return a},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t,i-n],["L",t,i+n]]},style:{r:5,stroke:r}}}});Jt("interval","pyramid",{getPoints:function(e){return e.size=e.size*2,GF(e)},draw:function(e,r){var t=Ze(e,!1,!0),i=this.parsePath(OW(e.points,e.nextPoints,!0)),n=r.addShape("path",{attrs:A(A({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});function Zbt(e){var r=e.x,t=e.y,i=e.y0,n=e.size,a,o;it(t)?(a=t[0],o=t[1]):(a=i,o=t);var l=r+n/2,s=r-n/2;return[{x:r,y:a},{x:r,y:o},{x:s,y:a},{x:l,y:a},{x:s,y:o},{x:l,y:o}]}function Qbt(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y]]}Jt("interval","tick",{getPoints:function(e){return Zbt(e)},draw:function(e,r){var t=Ze(e,!0,!1),i=this.parsePath(Qbt(e.points)),n=r.addShape("path",{attrs:A(A({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t-n/2,i-n],["L",t+n/2,i-n],["M",t,i-n],["L",t,i+n],["M",t-n/2,i+n],["L",t+n/2,i+n]]},style:{r:5,stroke:r}}}});var Kbt=function(e,r,t){var i=e.x,n=e.y,a=r.x,o=r.y,l;switch(t){case"hv":l=[{x:a,y:n}];break;case"vh":l=[{x:i,y:o}];break;case"hvh":var s=(a+i)/2;l=[{x:s,y:n},{x:s,y:o}];break;case"vhv":var u=(n+o)/2;l=[{x:i,y:u},{x:a,y:u}];break}return l};function Jbt(e,r){var t=[];return P(e,function(i,n){var a=e[n+1];if(t.push(i),a){var o=Kbt(i,a,r);t=t.concat(o)}}),t}function twt(e){return e.map(function(r,t){return t===0?["M",r.x,r.y]:["L",r.x,r.y]})}function ewt(e,r){var t=RF(e.points,e.connectNulls,e.showSinglePoint),i=[];return P(t,function(n){var a=Jbt(n,r);i=i.concat(twt(a))}),A(A({},Ze(e,!0,!1,"lineWidth")),{path:i})}P(["hv","vh","hvh","vhv"],function(e){Jt("line",e,{draw:function(r,t){var i=ewt(r,e),n=t.addShape({type:"path",attrs:i,name:"line"});return n},getMarker:function(r){return TW(r,e)}})});P(Bbt,function(e){Jt("point",e,{draw:function(r,t){return jF(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:Ju[e],style:{r:4.5,stroke:t,fill:null}}}})});Jt("point","image",{draw:function(e,r){var t=Ze(e,!1,!1,"r").r,i=this.parsePoints(e.points),n=i[0];if(e.isStack)n=i[1];else if(i.length>1){for(var a=r.addGroup(),o=0,l=i;o1?r[1]:t,a=r.length>3?r[3]:i,o=r.length>2?r[2]:n;return{min:t,max:i,min1:n,max1:a,median:o}}function bB(e,r,t){var i=t/2,n;if(it(r)){var a=_B(r),o=a.min,l=a.max,s=a.median,u=a.min1,c=a.max1,f=e-i,h=e+i;n=[[f,l],[h,l],[e,l],[e,c],[f,u],[f,c],[h,c],[h,u],[e,u],[e,o],[f,o],[h,o],[f,s],[h,s]]}else{r=K(r)?.5:r;var v=_B(e),o=v.min,l=v.max,s=v.median,u=v.min1,c=v.max1,d=r-i,p=r+i;n=[[o,d],[o,p],[o,r],[u,r],[u,d],[u,p],[c,p],[c,d],[c,r],[l,r],[l,d],[l,p],[s,d],[s,p]]}return n.map(function(x){return{x:x[0],y:x[1]}})}function rwt(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y],["L",e[6].x,e[6].y],["L",e[7].x,e[7].y],["L",e[4].x,e[4].y],["Z"],["M",e[8].x,e[8].y],["L",e[9].x,e[9].y],["M",e[10].x,e[10].y],["L",e[11].x,e[11].y],["M",e[12].x,e[12].y],["L",e[13].x,e[13].y]]}Jt("schema","box",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return bB(r,t,i)},draw:function(e,r){var t=Ze(e,!0,!1),i=this.parsePath(rwt(e.points)),n=r.addShape("path",{attrs:A(A({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i-6,i-3,i,i+3,i+6],o=bB(t,a,n);return[["M",o[0].x+1,o[0].y],["L",o[1].x-1,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["M",o[4].x,o[4].y],["L",o[5].x,o[5].y],["L",o[6].x,o[6].y],["L",o[7].x,o[7].y],["L",o[4].x,o[4].y],["Z"],["M",o[8].x,o[8].y],["L",o[9].x,o[9].y],["M",o[10].x+1,o[10].y],["L",o[11].x-1,o[11].y],["M",o[12].x,o[12].y],["L",o[13].x,o[13].y]]},style:{r:6,lineWidth:1,stroke:r}}}});function iwt(e){var r=it(e)?e:[e],t=r.sort(function(i,n){return n-i});return o_t(t,4,t[t.length-1])}function wB(e,r,t){var i=iwt(r);return[{x:e,y:i[0]},{x:e,y:i[1]},{x:e-t/2,y:i[2]},{x:e-t/2,y:i[1]},{x:e+t/2,y:i[1]},{x:e+t/2,y:i[2]},{x:e,y:i[2]},{x:e,y:i[3]}]}function nwt(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["L",e[4].x,e[4].y],["L",e[5].x,e[5].y],["Z"],["M",e[6].x,e[6].y],["L",e[7].x,e[7].y]]}Jt("schema","candle",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return wB(r,t,i)},draw:function(e,r){var t=Ze(e,!0,!0),i=this.parsePath(nwt(e.points)),n=r.addShape("path",{attrs:A(A({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i+7.5,i+3,i-3,i-7.5],o=wB(t,a,n);return[["M",o[0].x,o[0].y],["L",o[1].x,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["L",o[4].x,o[4].y],["L",o[5].x,o[5].y],["Z"],["M",o[6].x,o[6].y],["L",o[7].x,o[7].y]]},style:{lineWidth:1,stroke:r,fill:r,r:6}}}});function awt(e,r){var t=Math.abs(e[0].x-e[2].x),i=Math.abs(e[0].y-e[2].y),n=Math.min(t,i);r&&(n=Ce(r,0,Math.min(t,i))),n=n/2;var a=(e[0].x+e[2].x)/2,o=(e[0].y+e[2].y)/2;return{x:a-n,y:o-n,width:n*2,height:n*2}}Jt("polygon","square",{draw:function(e,r){if(!di(e.points)){var t=Ze(e,!0,!0),i=this.parsePoints(e.points);return r.addShape("rect",{attrs:A(A({},t),awt(i,e.size)),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});Jt("violin","smooth",{draw:function(e,r){var t=Ze(e,!0,!0),i=this.parsePath(SW(e.points));return r.addShape("path",{attrs:A(A({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{stroke:null,r:4,fill:r}}}});Jt("violin","hollow",{draw:function(e,r){var t=Ze(e,!0,!1),i=this.parsePath(CW(e.points));return r.addShape("path",{attrs:A(A({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}});Jt("violin","hollow-smooth",{draw:function(e,r){var t=Ze(e,!0,!1),i=this.parsePath(SW(e.points));return r.addShape("path",{attrs:A(A({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}});var owt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelValueDir=function(t){var i="y",n=t.points;return n[0][i]<=n[2][i]?1:-1},r.prototype.getLabelOffsetPoint=function(t,i,n,a){var o,l=e.prototype.getLabelOffsetPoint.call(this,t,i,n),s=this.getCoordinate(),u=s.isTransposed,c=u?"x":"y",f=this.getLabelValueDir(t.mappingData);return l=A(A({},l),(o={},o[c]=l[c]*f,o)),s.isReflect("x")&&(l=A(A({},l),{x:l.x*-1})),s.isReflect("y")&&(l=A(A({},l),{y:l.y*-1})),l},r.prototype.getThemedLabelCfg=function(t){var i=this.geometry,n=this.getDefaultLabelCfg(),a=i.theme;return ft({},n,a.labels,t.position==="middle"?{offset:0}:{},t)},r.prototype.setLabelPosition=function(t,i,n,a){var o=this.getCoordinate(),l=o.isTransposed,s=i.points,u=o.convert(s[0]),c=o.convert(s[2]),f=this.getLabelValueDir(i),h,v,d,p,x=it(i.shape)?i.shape[0]:i.shape;if(x==="funnel"||x==="pyramid"){var m=I(i,"nextPoints"),_=I(i,"points");if(m){var b=o.convert(_[0]),w=o.convert(_[1]),S=o.convert(m[0]),M=o.convert(m[1]);l?(h=Math.min(S.y,b.y),d=Math.max(S.y,b.y),v=(w.x+M.x)/2,p=(b.x+S.x)/2):(h=Math.min((w.y+M.y)/2,(b.y+S.y)/2),d=Math.max((w.y+M.y)/2,(b.y+S.y)/2),v=M.x,p=b.x)}else h=Math.min(c.y,u.y),d=Math.max(c.y,u.y),v=c.x,p=u.x}else h=Math.min(c.y,u.y),d=Math.max(c.y,u.y),v=c.x,p=u.x;switch(a){case"right":t.x=v,t.y=(h+d)/2,t.textAlign=I(t,"textAlign",f>0?"left":"right");break;case"left":t.x=p,t.y=(h+d)/2,t.textAlign=I(t,"textAlign",f>0?"left":"right");break;case"bottom":l&&(t.x=(v+p)/2),t.y=d,t.textAlign=I(t,"textAlign","center"),t.textBaseline=I(t,"textBaseline",f>0?"bottom":"top");break;case"middle":l&&(t.x=(v+p)/2),t.y=(h+d)/2,t.textAlign=I(t,"textAlign","center"),t.textBaseline=I(t,"textBaseline","middle");break;case"top":l&&(t.x=(v+p)/2),t.y=h,t.textAlign=I(t,"textAlign","center"),t.textBaseline=I(t,"textBaseline",f>0?"bottom":"top");break}},r}(pg),Qm=Math.PI/2,PW=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelOffset=function(t){var i=this.getCoordinate(),n=0;if(Mt(t))n=t;else if(Ct(t)&&t.indexOf("%")!==-1){var a=i.getRadius();i.innerRadius>0&&(a=a*(1-i.innerRadius)),n=parseFloat(t)*.01*a}return n},r.prototype.getLabelItems=function(t){var i=e.prototype.getLabelItems.call(this,t),n=this.geometry.getYScale();return je(i,function(a){if(a&&n){var o=n.scale(I(a.data,n.field));return A(A({},a),{percent:o})}return a})},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n;if(t.labelEmit)n=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(!i.isTransposed)n="center";else{var a=i.getCenter(),o=t.offset;Math.abs(t.x-a.x)<1?n="center":t.angle>Math.PI||t.angle<=0?n=o>0?"left":"right":n=o>0?"right":"left"}return n},r.prototype.getLabelPoint=function(t,i,n){var a=1,o,l=t.content[n];this.isToMiddle(i)?o=this.getMiddlePoint(i.points):(t.content.length===1&&n===0?n=1:n===0&&(a=-1),o=this.getArcPoint(i,n));var s=t.offset*a,u=this.getPointAngle(o),c=t.labelEmit,f=this.getCirclePoint(u,s,o,c);return f.r===0?f.content="":(f.content=l,f.angle=u,f.color=i.color),f.rotate=t.autoRotate?this.getLabelRotate(u,s,c):t.rotate,f.start={x:o.x,y:o.y},f},r.prototype.getArcPoint=function(t,i){return i===void 0&&(i=0),!it(t.x)&&!it(t.y)?{x:t.x,y:t.y}:{x:it(t.x)?t.x[i]:t.x,y:it(t.y)?t.y[i]:t.y}},r.prototype.getPointAngle=function(t){return Kf(this.getCoordinate(),t)},r.prototype.getCirclePoint=function(t,i,n,a){var o=this.getCoordinate(),l=o.getCenter(),s=A_(o,n);if(s===0)return A(A({},l),{r:s});var u=t;if(o.isTransposed&&s>i&&!a){var c=Math.asin(i/(2*s));u=t+c*2}else s=s+i;return{x:l.x+s*Math.cos(u),y:l.y+s*Math.sin(u),r:s}},r.prototype.getLabelRotate=function(t,i,n){var a=t+Qm;return n&&(a-=Qm),a&&(a>Qm?a=a-Math.PI:a<-Qm&&(a=a+Math.PI)),a},r.prototype.getMiddlePoint=function(t){var i=this.getCoordinate(),n=t.length,a={x:0,y:0};return P(t,function(o){a.x+=o.x,a.y+=o.y}),a.x/=n,a.y/=n,a=i.convert(a),a},r.prototype.isToMiddle=function(t){return t.x.length>2},r}(pg),lwt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return r.prototype.getDefaultLabelCfg=function(t,i){var n=e.prototype.getDefaultLabelCfg.call(this,t,i);return ft({},n,I(this.geometry.theme,"pieLabels",{}))},r.prototype.getLabelOffset=function(t){return e.prototype.getLabelOffset.call(this,t)||0},r.prototype.getLabelRotate=function(t,i,n){var a;return i<0&&(a=t,a>Math.PI/2&&(a=a-Math.PI),a<-Math.PI/2&&(a=a+Math.PI)),a},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n=i.getCenter(),a;return t.angle<=Math.PI/2&&t.x>=n.x?a="left":a="right",t.offset<=0&&(a==="right"?a="left":a="right"),a},r.prototype.getArcPoint=function(t){return t},r.prototype.getPointAngle=function(t){var i=this.getCoordinate(),n={x:it(t.x)?t.x[0]:t.x,y:t.y[0]},a={x:it(t.x)?t.x[1]:t.x,y:t.y[1]},o,l=Kf(i,n);if(t.points&&t.points[0].y===t.points[1].y)o=l;else{var s=Kf(i,a);l>=s&&(s=s+Math.PI*2),o=l+(s-l)/2}return o},r.prototype.getCirclePoint=function(t,i){var n=this.getCoordinate(),a=n.getCenter(),o=n.getRadius()+i;return A(A({},ir(a.x,a.y,o,t)),{angle:t,r:o})},r}(PW),CB=4;function swt(e,r,t,i,n,a){var o=!0,l=i.start,s=i.end,u=Math.min(l.y,s.y),c=Math.abs(l.y-s.y),f,h=0,v=Number.MIN_VALUE,d=r.map(function(S){return S.y>h&&(h=S.y),S.yc&&(c=h-u);o;)for(d.forEach(function(S){var M=(Math.min.apply(v,S.targets)+Math.max.apply(v,S.targets))/2;S.pos=Math.min(Math.max(v,M-S.size/2),c-S.size)}),o=!1,f=d.length;f--;)if(f>0){var p=d[f-1],x=d[f];p.pos+p.size>x.pos&&(p.size+=x.size,p.targets=p.targets.concat(x.targets),p.pos+p.size>c&&(p.pos=c-p.size),d.splice(f,1),o=!0)}f=0,d.forEach(function(S){var M=u+t/2;S.targets.forEach(function(){r[f].y=S.pos+M,M+=t,f++})});for(var m={},_=0,b=e;_0){var s=14,u=o+n,c=u*2+s*2,f={start:a.start,end:a.end},h=[[],[]];e.forEach(function(v){!v||(v.textAlign==="right"?h[0].push(v):h[1].push(v))}),h.forEach(function(v,d){var p=c/s;v.length>p&&(v.sort(function(x,m){return m["..percent"]-x["..percent"]}),v.splice(p,v.length-p)),v.sort(function(x,m){return x.y-m.y}),swt(r,v,s,f,l,d)})}P(e,function(v){if(v&&v.labelLine){var d=v.offset,p=v.angle,x=ir(l.x,l.y,o,p),m=ir(l.x,l.y,o+d/2,p),_=v.x+I(v,"offsetX",0),b=v.y+I(v,"offsetY",0),w={x:_-Math.cos(p)*CB,y:b-Math.sin(p)*CB};qt(v.labelLine)||(v.labelLine={}),v.labelLine.path=["M "+x.x,x.y+" Q"+m.x,m.y+" "+w.x,w.y].join(",")}})}}function IW(e,r,t){var i=e.filter(function(d){return!d.invisible});i.sort(function(d,p){return d.y-p.y});var n=!0,a=t.minY,o=t.maxY,l=Math.abs(a-o),s,u=0,c=Number.MIN_VALUE,f=i.map(function(d){return d.y>u&&(u=d.y),d.yl&&(l=u-a);n;)for(f.forEach(function(d){var p=(Math.min.apply(c,d.targets)+Math.max.apply(c,d.targets))/2;d.pos=Math.min(Math.max(c,p-d.size/2),l-d.size),d.pos=Math.max(0,d.pos)}),n=!1,s=f.length;s--;)if(s>0){var h=f[s-1],v=f[s];h.pos+h.size>v.pos&&(h.size+=v.size,h.targets=h.targets.concat(v.targets),h.pos+h.size>l&&(h.pos=l-h.size),f.splice(s,1),n=!0)}s=0,f.forEach(function(d){var p=a+r/2;d.targets.forEach(function(){i[s].y=d.pos+p,p+=r,s++})})}var SB=4;function cwt(e,r){var t=r.getCenter(),i=r.getRadius();if(e&&e.labelLine){var n=e.angle,a=e.offset,o=ir(t.x,t.y,i,n),l=e.x+I(e,"offsetX",0)*(Math.cos(n)>0?1:-1),s=e.y+I(e,"offsetY",0)*(Math.sin(n)>0?1:-1),u={x:l-Math.cos(n)*SB,y:s-Math.sin(n)*SB},c=e.labelLine.smooth,f=[],h=u.x-t.x,v=u.y-t.y,d=Math.atan(v/h);if(h<0&&(d+=Math.PI),c===!1){qt(e.labelLine)||(e.labelLine={});var p=0;(n<0&&n>-Math.PI/2||n>Math.PI*1.5)&&u.y>o.y&&(p=1),n>=0&&no.y&&(p=1),n>=Math.PI/2&&nu.y&&(p=1),(n<-Math.PI/2||n>=Math.PI&&nu.y&&(p=1);var x=a/2>4?4:Math.max(a/2-1,0),m=ir(t.x,t.y,i+x,n),_=ir(t.x,t.y,i+a/2,d),b=0;f.push("M "+o.x+" "+o.y),f.push("L "+m.x+" "+m.y),f.push("A "+t.x+" "+t.y+" 0 "+b+" "+p+" "+_.x+" "+_.y),f.push("L "+u.x+" "+u.y)}else{var m=ir(t.x,t.y,i+(a/2>4?4:Math.max(a/2-1,0)),n),w=o.xMath.pow(Math.E,-16)&&f.push.apply(f,["C",u.x+w*4,u.y,2*m.x-o.x,2*m.y-o.y,o.x,o.y]),f.push("L "+o.x+" "+o.y)}e.labelLine.path=f.join(" ")}}function fwt(e,r,t,i){var n=zr(e,function(M){return!K(M)}),a=r[0]&&r[0].get("coordinate");if(!!a){for(var o=a.getCenter(),l=a.getRadius(),s={},u=0,c=r;uF&&(M.sort(function(L,D){return D.percent-L.percent}),P(M,function(L,D){D+1>F&&(s[L.id].set("visible",!1),L.invisible=!0)})),IW(M,h,S)}),P(x,function(M,O){P(M,function(F){var L=O===p,D=s[F.id],R=D.getChildByIndex(0);if(R){var H=l+v,k=F.y-o.y,V=Math.pow(H,2),U=Math.pow(k,2),B=V-U>0?V-U:0,G=Math.sqrt(B),N=Math.abs(Math.cos(F.angle)*H);L?F.x=o.x+Math.max(G,N):F.x=o.x-Math.max(G,N)}R&&(R.attr("y",F.y),R.attr("x",F.x)),cwt(F,a)})})}}}var PT=4,hwt=4,AB=4;function vwt(e,r,t){var i=r.getCenter(),n=r.getRadius(),a={x:e.x-(t?AB:-AB),y:e.y},o=ir(i.x,i.y,n+PT,e.angle),l={x:a.x,y:a.y},s={x:o.x,y:o.y},u=ir(i.x,i.y,n,e.angle),c="";if(a.y!==o.y){var f=t?4:-4;l.y=a.y,e.angle<0&&e.angle>=-Math.PI/2&&(l.x=Math.max(o.x,a.x-f),a.y0&&e.angleo.y?s.y=l.y:(s.y=o.y,s.x=Math.max(s.x,l.x-f))),e.angle>Math.PI/2&&(l.x=Math.min(o.x,a.x-f),a.y>o.y?s.y=l.y:(s.y=o.y,s.x=Math.min(s.x,l.x-f))),e.angle<-Math.PI/2&&(l.x=Math.min(o.x,a.x-f),a.ya.x||M.x===a.x&&M.y>a.y,L=K(M.offsetX)?hwt:M.offsetX,D=ir(a.x,a.y,o+PT,M.angle),R=h+L;M.x=a.x+(F?1:-1)*(o+R),M.y=D.y}});var v=n.start,d=n.end,p="left",x="right",m=Xi(e,function(M){return M.x_&&(_=Math.min(O,Math.abs(v.y-d.y)))});var b={minX:v.x,maxX:d.x,minY:a.y-_/2,maxY:a.y+_/2};P(m,function(M,O){var F=_/f;M.length>F&&(M.sort(function(L,D){return D.percent-L.percent}),P(M,function(L,D){D>F&&(l[L.id].set("visible",!1),L.invisible=!0)})),IW(M,f,b)});var w=b.minY,S=b.maxY;P(m,function(M,O){var F=O===x;P(M,function(L){var D=I(l,L&&[L.id]);if(!!D){if(L.yS){D.set("visible",!1);return}var R=D.getChildByIndex(0),H=R.getCanvasBBox(),k={x:F?H.x:H.maxX,y:H.y+H.height/2};dg(R,L.x-k.x,L.y-k.y),L.labelLine&&vwt(L,n,F)}})})}}function pwt(e,r,t,i){P(r,function(n){var a=i.minX,o=i.minY,l=i.maxX,s=i.maxY,u=n.getCanvasBBox(),c=u.minX,f=u.minY,h=u.maxX,v=u.maxY,d=u.x,p=u.y,x=u.width,m=u.height,_=d,b=p;(cl?_=l-x:h>l&&(_=_-(h-l)),f>s?b=s-m:v>s&&(b=b-(v-s)),(_!==d||b!==p)&&dg(n,_-d,b-p)})}function gwt(e,r,t,i){P(r,function(n,a){var o=n.getCanvasBBox(),l=t[a].getBBox();(o.minXl.maxX||o.maxY>l.maxY)&&n.remove(!0)})}var ywt=100,LW=function(){function e(r){r===void 0&&(r={}),this.bitmap={};var t=r.xGap,i=t===void 0?1:t,n=r.yGap,a=n===void 0?8:n;this.xGap=i,this.yGap=a}return e.prototype.hasGap=function(r){for(var t=!0,i=this.bitmap,n=Math.round(r.minX),a=Math.round(r.maxX),o=Math.round(r.minY),l=Math.round(r.maxY),s=n;s<=a;s+=1){if(!i[s]){i[s]={};continue}if(s===n||s===a){for(var u=o;u<=l;u++)if(i[s][u]){t=!1;break}}else if(i[s][o]||i[s][l]){t=!1;break}}return t},e.prototype.fillGap=function(r){for(var t=this.bitmap,i=Math.round(r.minX),n=Math.round(r.maxX),a=Math.round(r.minY),o=Math.round(r.maxY),l=i;l<=n;l+=1)t[l]||(t[l]={});for(var l=i;l<=n;l+=this.xGap){for(var s=a;s<=o;s+=this.yGap)t[l][s]=!0;t[l][o]=!0}if(this.yGap!==1)for(var l=a;l<=o;l+=1)t[i][l]=!0,t[n][l]=!0;if(this.xGap!==1)for(var l=i;l<=n;l+=1)t[l][a]=!0,t[l][o]=!0},e.prototype.destroy=function(){this.bitmap={}},e}();function mwt(e,r,t){t===void 0&&(t=ywt);var i=-1,n=e.attr(),a=n.x,o=n.y,l=e.getCanvasBBox(),s=Math.sqrt(l.width*l.width+l.height*l.height),u,c=-i,f=0,h=0,v=function(m){var _=m*.1;return[_*Math.cos(_),_*Math.sin(_)]};if(r.hasGap(l))return r.fillGap(l),!0;for(var d=!1,p=0,x={};Math.min(Math.abs(f),Math.abs(h))4)return[];var r=function(n,a){return[a.x-n.x,a.y-n.y]},t=r(e[0],e[1]),i=r(e[1],e[2]);return[t,i]}function Km(e,r,t){r===void 0&&(r=0),t===void 0&&(t={x:0,y:0});var i=e.x,n=e.y;return{x:(i-t.x)*Math.cos(-r)+(n-t.y)*Math.sin(-r)+t.x,y:(t.x-i)*Math.sin(-r)+(n-t.y)*Math.cos(-r)+t.y}}function MB(e){var r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],t=e.rotation;return t?[Km(r[0],t,r[0]),Km(r[1],t,r[0]),Km(r[2],t,r[0]),Km(r[3],t,r[0])]:r}function EB(e,r){if(e.length>4)return{min:0,max:0};var t=[];return e.forEach(function(i){t.push(wwt([i.x,i.y],r))}),{min:Math.min.apply(Math,t),max:Math.max.apply(Math,t)}}function Cwt(e,r){return e.max>r.min&&e.mine.x+e.width+t||r.x+r.widthe.y+e.height+t||r.y+r.height=a.height:o.width>=a.width}function Pwt(e,r,t){var i=!!e.getAdjust("stack");return i||r.every(function(n,a){var o=t[a];return Fwt(e,n,o)})}function Iwt(e,r,t){var i=e.coordinate,n=Mi.fromObject(t.getBBox()),a=ws(r);i.isTransposed?a.attr({x:n.minX+n.width/2,textAlign:"center"}):a.attr({y:n.minY+n.height/2,textBaseline:"middle"})}function Lwt(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=Pwt(a,r,t);o&&t.forEach(function(l,s){var u=r[s];Iwt(a,u,l)})}}}function Dwt(e){var r=500,t=[],i=Math.max(Math.floor(e.length/r),1);return P(e,function(n,a){a%i===0?t.push(n):n.set("visible",!1)}),t}function $wt(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=Dwt(r),l=a.getXYFields()[0],s=[],u=[],c=Xi(o,function(p){return p.get("data")[l]}),f=ss(je(o,function(p){return p.get("data")[l]})),h;o.forEach(function(p){p.set("visible",!0)});var v=function(p){p&&(p.length&&u.push(p.pop()),u.push.apply(u,p))};for(gr(f)>0&&(h=f.shift(),v(c[h])),gr(f)>0&&(h=f.pop(),v(c[h])),P(f.reverse(),function(p){v(c[p])});u.length>0;){var d=u.shift();d.get("visible")&&(vbt(d,s)?d.set("visible",!1):s.push(d))}}}}function kwt(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,n),i}function DW(e,r,t){return e.some(function(i){return t(i,r)})}function Rwt(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function PB(e,r){return DW(e,r,function(t,i){var n=ws(t),a=ws(i);return Rwt(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function Bwt(e,r,t,i,n){var a,o;if(t.length!==0){var l=(a=t[0])===null||a===void 0?void 0:a.get("element"),s=l==null?void 0:l.geometry;if(!(!s||s.type!=="point")){var u=s.getXYFields(),c=u[0],f=u[1],h=Xi(r,function(p){return p.get("data")[c]}),v=[],d=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;je(oc(h).reverse(),function(p){for(var x=kwt(s,h[p]);x.length;){var m=x.shift(),_=ws(m);if(DW(v,m,function(S,M){return S.get("data")[c]===M.get("data")[c]&&S.get("data")[f]===M.get("data")[f]})){_.set("visible",!1);continue}var b=PB(v,m),w=!1;if(b&&(_.attr("y",_.attr("y")+2*d),w=PB(v,m)),w){_.set("visible",!1);continue}v.push(m)}})}}}function Nwt(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,n),i}function $W(e,r,t){return e.some(function(i){return t(i,r)})}function Gwt(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function IB(e,r){return $W(e,r,function(t,i){var n=ws(t),a=ws(i);return Gwt(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function zwt(e,r,t,i,n){var a,o;if(t.length!==0){var l=(a=t[0])===null||a===void 0?void 0:a.get("element"),s=l==null?void 0:l.geometry;if(!(!s||["path","line","area"].indexOf(s.type)<0)){var u=s.getXYFields(),c=u[0],f=u[1],h=Xi(r,function(p){return p.get("data")[c]}),v=[],d=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;je(oc(h).reverse(),function(p){for(var x=Nwt(s,h[p]);x.length;){var m=x.shift(),_=ws(m);if($W(v,m,function(S,M){return S.get("data")[c]===M.get("data")[c]&&S.get("data")[f]===M.get("data")[f]})){_.set("visible",!1);continue}var b=IB(v,m),w=!1;if(b&&(_.attr("y",_.attr("y")+2*d),w=IB(v,m)),w){_.set("visible",!1);continue}v.push(m)}})}}}var CS;function Vwt(){return CS||(CS=document.createElement("canvas").getContext("2d")),CS}var Jm=sc(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=r.fontWeight,a=r.fontStyle,o=r.fontVariant,l=Vwt();return l.font=[a,o,n,t+"px",i].join(" "),l.measureText(Ct(e)?e:"").width},function(e,r){return r===void 0&&(r={}),qr([e],_h(r),!0).join("")}),jwt=function(e,r,t){var i=16,n=Jm("...",t),a;Ct(e)?a=e:a=Es(e);var o=r,l=[],s,u;if(Jm(e,t)<=r)return e;for(;s=a.substr(0,i),u=Jm(s,t),!(u+n>o&&u>o);)if(l.push(s),o-=u,a=a.substr(i),!a)return l.join("");for(;s=a.substr(0,1),u=Jm(s,t),!(u+n>o);)if(l.push(s),o-=u,a=a.substr(1),!a)return l.join("");return l.join("")+"..."};function Hwt(e,r,t,i,n){if(!(r.length<=0)){var a=(n==null?void 0:n.direction)||["top","right","bottom","left"],o=(n==null?void 0:n.action)||"translate",l=(n==null?void 0:n.margin)||0,s=r[0].get("coordinate");if(!!s){var u=u_t(s,l),c=u.minX,f=u.minY,h=u.maxX,v=u.maxY;P(r,function(d){var p=d.getCanvasBBox(),x=p.minX,m=p.minY,_=p.maxX,b=p.maxY,w=p.x,S=p.y,M=p.width,O=p.height,F=w,L=S;if(a.indexOf("left")>=0&&(x=0&&(m=0&&(x>h?F=h-M:_>h&&(F=F-(_-h))),a.indexOf("bottom")>=0&&(m>v?L=v-O:b>v&&(L=L-(b-v))),F!==w||L!==S){var D=F-w;if(o==="translate")dg(d,D,L-S);else if(o==="ellipsis"){var R=d.findAll(function(H){return H.get("type")==="text"});R.forEach(function(H){var k=e1(H.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),V=H.getCanvasBBox(),U=jwt(H.attr("text"),V.width-Math.abs(D),k);H.attr("text",U)})}else d.hide()}})}}}function Ywt(e,r,t){var i={fillOpacity:K(e.attr("fillOpacity"))?1:e.attr("fillOpacity"),strokeOpacity:K(e.attr("strokeOpacity"))?1:e.attr("strokeOpacity"),opacity:K(e.attr("opacity"))?1:e.attr("opacity")};e.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),e.animate(i,r)}function Wwt(e,r,t){var i={fillOpacity:0,strokeOpacity:0,opacity:0},n=r.easing,a=r.duration,o=r.delay;e.animate(i,a,n,function(){e.remove(!0)},o)}function Xwt(e,r,t){var i,n=r[0],a=r[1];return e.applyToMatrix([n,a,1]),t==="x"?(e.setMatrix(rr(e.getMatrix(),[["t",-n,-a],["s",.01,1],["t",n,a]])),i=rr(e.getMatrix(),[["t",-n,-a],["s",100,1],["t",n,a]])):t==="y"?(e.setMatrix(rr(e.getMatrix(),[["t",-n,-a],["s",1,.01],["t",n,a]])),i=rr(e.getMatrix(),[["t",-n,-a],["s",1,100],["t",n,a]])):t==="xy"&&(e.setMatrix(rr(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]])),i=rr(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])),i}function HF(e,r,t,i,n){var a=t.start,o=t.end,l=t.getWidth(),s=t.getHeight(),u,c;n==="y"?(u=a.x+l/2,c=i.ya.x?i.x:a.x,c=a.y+s/2):n==="xy"&&(t.isPolar?(u=t.getCenter().x,c=t.getCenter().y):(u=(a.x+o.x)/2,c=(a.y+o.y)/2));var f=Xwt(e,[u,c],n);e.animate({matrix:f},r)}function Uwt(e,r,t){var i=t.coordinate,n=t.minYPoint;HF(e,r,i,n,"x")}function qwt(e,r,t){var i=t.coordinate,n=t.minYPoint;HF(e,r,i,n,"y")}function Zwt(e,r,t){var i=t.coordinate,n=t.minYPoint;HF(e,r,i,n,"xy")}function Qwt(e,r,t){var i=e.getTotalLength();e.attr("lineDash",[i]),e.animate(function(n){return{lineDashOffset:(1-n)*i}},r)}function Kwt(e,r,t){var i=t.toAttrs,n=i.x,a=i.y;delete i.x,delete i.y,e.attr(i),e.animate({x:n,y:a},r)}function Jwt(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=n.points,o=a[0].y-a[1].y>0?i.maxX:i.minX,l=(i.minY+i.maxY)/2;e.applyToMatrix([o,l,1]);var s=rr(e.getMatrix(),[["t",-o,-l],["s",.01,1],["t",o,l]]);e.setMatrix(s),e.animate({matrix:rr(e.getMatrix(),[["t",-o,-l],["s",100,1],["t",o,l]])},r)}function tCt(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=(i.minX+i.maxX)/2,o=n.points,l=o[0].y-o[1].y<=0?i.maxY:i.minY;e.applyToMatrix([a,l,1]);var s=rr(e.getMatrix(),[["t",-a,-l],["s",1,.01],["t",a,l]]);e.setMatrix(s),e.animate({matrix:rr(e.getMatrix(),[["t",-a,-l],["s",1,100],["t",a,l]])},r)}function LB(e,r){var t,i=ox(e,r),n=i.startAngle,a=i.endAngle;return!Nr(n,-Math.PI*.5)&&n<-Math.PI*.5&&(n+=Math.PI*2),!Nr(a,-Math.PI*.5)&&a<-Math.PI*.5&&(a+=Math.PI*2),r[5]===0&&(t=[a,n],n=t[0],a=t[1]),Nr(n,Math.PI*1.5)&&(n=Math.PI*-.5),Nr(a,Math.PI*-.5)&&(a=Math.PI*1.5),{startAngle:n,endAngle:a}}function DB(e){var r;return e[0]==="M"||e[0]==="L"?r=[e[1],e[2]]:(e[0]==="a"||e[0]==="A"||e[0]==="C")&&(r=[e[e.length-2],e[e.length-1]]),r}function $B(e){var r,t,i,n=e.filter(function(b){return b[0]==="A"||b[0]==="a"});if(n.length===0)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var a=n[0],o=n.length>1?n[1]:n[0],l=e.indexOf(a),s=e.indexOf(o),u=DB(e[l-1]),c=DB(e[s-1]),f=LB(u,a),h=f.startAngle,v=f.endAngle,d=LB(c,o),p=d.startAngle,x=d.endAngle;Nr(h,p)&&Nr(v,x)?(t=h,i=v):(t=Math.min(h,p),i=Math.max(v,x));var m=a[1],_=n[n.length-1][1];return m<_?(r=[_,m],m=r[0],_=r[1]):m===_&&(_=0),{startAngle:t,endAngle:i,radius:m,innerRadius:_}}function eCt(e,r,t){var i=t.toAttrs,n=t.coordinate,a=i.path||[],o=a.map(function(_){return _[0]});if(!(a.length<1)){var l=$B(a),s=l.startAngle,u=l.endAngle,c=l.radius,f=l.innerRadius,h=$B(e.attr("path")),v=h.startAngle,d=h.endAngle,p=n.getCenter(),x=s-v,m=u-d;if(x===0&&m===0){e.attr("path",a);return}e.animate(function(_){var b=v+_*x,w=d+_*m;return A(A({},i),{path:Ge(o,["M","A","A","Z"])?zY(p.x,p.y,c,b,w):ts(p.x,p.y,c,b,w,f)})},A(A({},r),{callback:function(){e.attr("path",a)}}))}}function rCt(e,r,t){var i=jY(t.coordinate,20),n=i.type,a=i.startState,o=i.endState,l=e.setClip({type:n,attrs:a});l.animate(o,A(A({},r),{callback:function(){e&&!e.get("destroyed")&&e.set("clipShape",null),l.remove(!0)}}))}function YF(e,r,t){if(e.isGroup())P(e.getChildren(),function(l){YF(l,r,t)});else{var i=e.getBBox(),n=(i.minX+i.maxX)/2,a=(i.minY+i.maxY)/2;if(e.applyToMatrix([n,a,1]),t==="zoomIn"){var o=rr(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]]);e.setMatrix(o),e.animate({matrix:rr(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])},r)}else e.animate({matrix:rr(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]])},A(A({},r),{callback:function(){e.remove(!0)}}))}}function iCt(e,r,t){YF(e,r,"zoomIn")}function nCt(e,r,t){YF(e,r,"zoomOut")}function ll(e){return[ct.TOP,ct.BOTTOM].includes(e)?{offsetX:0,offsetY:e===ct.TOP?-8:8,style:{textAlign:"center",textBaseline:e===ct.TOP?"bottom":"top"}}:[ct.LEFT,ct.RIGHT].includes(e)?{offsetX:e===ct.LEFT?-8:8,offsetY:0,style:{textAlign:e===ct.LEFT?"right":"left",textBaseline:"middle",rotate:Math.PI/2}}:{}}function SS(e,r,t){return{x:e.x+r*Math.cos(t),y:e.y+r*Math.sin(t)}}var aCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return ft({},e.prototype.getDefaultCfg.call(this),{type:"circle",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.getRegion=function(t,i){var n=.5,a={x:.5,y:.5},o=Math.PI*2/t,l=-1*Math.PI/2+o*i,s=n/(1+1/Math.sin(o/2)),u=SS(a,n-s,l),c=Math.PI*5/4,f=Math.PI*1/4;return{start:SS(u,s,c),end:SS(u,s,f)}},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg,a=n.fields,o=n.type,l=a[0];if(!l)throw new Error("No `fields` specified!");var s=this.getFieldValues(t,l),u=s.length,c=[];return s.forEach(function(f,h){var v=[{field:l,value:f,values:s}],d=zr(t,i.getFacetDataFilter(v)),p={type:o,data:d,region:i.getRegion(u,h),columnValue:f,columnField:l,columnIndex:h,columnValuesLength:u,rowValue:null,rowField:null,rowIndex:0,rowValuesLength:1};c.push(p)}),c},r.prototype.getXAxisOption=function(t,i,n,a){return n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;P(this.facets,function(i){var n=i.columnValue,a=i.view,o=I(t.cfg.title,"formatter"),l=ft({position:["50%","0%"],content:o?o(n):n},ll(ct.TOP),t.cfg.title);a.annotation().text(l)})},r}(hc),oCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return ft({},e.prototype.getDefaultCfg.call(this),{type:"list",cols:null,showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg.fields,a=this.cfg.cols,o=n[0];if(!o)throw new Error("No `fields` specified!");var l=this.getFieldValues(t,o),s=l.length;a=a||s;var u=this.getPageCount(s,a),c=[];return l.forEach(function(f,h){var v=i.getRowCol(h,a),d=v.row,p=v.col,x=[{field:o,value:f,values:l}],m=zr(t,i.getFacetDataFilter(x)),_={type:i.cfg.type,data:m,region:i.getRegion(u,a,p,d),columnValue:f,rowValue:f,columnField:o,rowField:null,columnIndex:p,rowIndex:d,columnValuesLength:a,rowValuesLength:u,total:s};c.push(_)}),c},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1&&a.columnValuesLength*a.rowIndex+a.columnIndex+1+a.columnValuesLength<=a.total?A(A({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?A(A({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;P(this.facets,function(i){var n=i.columnValue,a=i.view,o=I(t.cfg.title,"formatter"),l=ft({position:["50%","0%"],content:o?o(n):n},ll(ct.TOP),t.cfg.title);a.annotation().text(l)})},r.prototype.getPageCount=function(t,i){return Math.floor((t+i-1)/i)},r.prototype.getRowCol=function(t,i){var n=Math.floor(t/i),a=t%i;return{row:n,col:a}},r}(hc),lCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return ft({},e.prototype.getDefaultCfg.call(this),{type:"matrix",showTitle:!1,columnTitle:A({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:A({},e.prototype.getDefaultTitleCfg.call(this))})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){for(var i=this.cfg,n=i.fields,a=i.type,o=n.length,l=o,s=[],u=0;u=0;l--)for(var s=this.getFacetsByLevel(t,l),u=0,c=s;u=v){var x=n.parsePosition([d[s],d[l.field]]);x&&h.push(x)}if(d[s]===f)return!1}),h},r.prototype.parsePercentPosition=function(t){var i=parseFloat(t[0])/100,n=parseFloat(t[1])/100,a=this.view.getCoordinate(),o=a.start,l=a.end,s={x:Math.min(o.x,l.x),y:Math.min(o.y,l.y)},u=a.getWidth()*i+s.x,c=a.getHeight()*n+s.y;return{x:u,y:c}},r.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),i=t.start,n=t.end,a=t.getWidth(),o=t.getHeight(),l={x:Math.min(i.x,n.x),y:Math.min(i.y,n.y)};return{x:l.x,y:l.y,minX:l.x,minY:l.y,maxX:l.x+a,maxY:l.y+o,width:a,height:o}},r.prototype.getAnnotationCfg=function(t,i,n){var a=this,o=this.view.getCoordinate(),l=this.view.getCanvas(),s={};if(K(i))return null;if(t==="arc"){var u=i,c=u.start,f=u.end,h=ue(u,["start","end"]),v=this.parsePosition(c),d=this.parsePosition(f),p=Kf(o,v),x=Kf(o,d);p>x&&(x=Math.PI*2+x),s=A(A({},h),{center:o.getCenter(),radius:A_(o,v),startAngle:p,endAngle:x})}else if(t==="image"){var m=i,c=m.start,f=m.end,h=ue(m,["start","end"]);s=A(A({},h),{start:this.parsePosition(c),end:this.parsePosition(f),src:i.src})}else if(t==="line"){var _=i,c=_.start,f=_.end,h=ue(_,["start","end"]);s=A(A({},h),{start:this.parsePosition(c),end:this.parsePosition(f),text:I(i,"text",null)})}else if(t==="region"){var b=i,c=b.start,f=b.end,h=ue(b,["start","end"]);s=A(A({},h),{start:this.parsePosition(c),end:this.parsePosition(f)})}else if(t==="text"){var w=this.view.getData(),S=i,M=S.position,O=S.content,h=ue(S,["position","content"]),F=O;pt(O)&&(F=O(w)),s=A(A(A({},this.parsePosition(M)),h),{content:F})}else if(t==="dataMarker"){var L=i,M=L.position,D=L.point,R=L.line,H=L.text,k=L.autoAdjust,V=L.direction,h=ue(L,["position","point","line","text","autoAdjust","direction"]);s=A(A(A({},h),this.parsePosition(M)),{coordinateBBox:this.getCoordinateBBox(),point:D,line:R,text:H,autoAdjust:k,direction:V})}else if(t==="dataRegion"){var U=i,c=U.start,f=U.end,B=U.region,H=U.text,G=U.lineLength,h=ue(U,["start","end","region","text","lineLength"]);s=A(A({},h),{points:this.getRegionPoints(c,f),region:B,text:H,lineLength:G})}else if(t==="regionFilter"){var N=i,c=N.start,f=N.end,W=N.apply,q=N.color,h=ue(N,["start","end","apply","color"]),tt=this.view.geometries,ot=[],st=function(Nt){!Nt||(Nt.isGroup()?Nt.getChildren().forEach(function(pe){return st(pe)}):ot.push(Nt))};P(tt,function(Nt){W?eo(W,Nt.type)&&P(Nt.elements,function(pe){st(pe.shape)}):P(Nt.elements,function(pe){st(pe.shape)})}),s=A(A({},h),{color:q,shapes:ot,start:this.parsePosition(c),end:this.parsePosition(f)})}else if(t==="shape"){var Z=i,et=Z.render,lt=ue(Z,["render"]),dt=function(_t){if(pt(i.render))return et(_t,a.view,{parsePosition:a.parsePosition.bind(a)})};s=A(A({},lt),{render:dt})}else if(t==="html"){var ht=i,wt=ht.html,M=ht.position,lt=ue(ht,["html","position"]),gt=function(Ut){return pt(wt)?wt(Ut,a.view):wt};s=A(A(A({},lt),this.parsePosition(M)),{parent:l.get("el").parentNode,html:gt})}var vt=ft({},n,A(A({},s),{top:i.top,style:i.style,offsetX:i.offsetX,offsetY:i.offsetY}));return t!=="html"&&(vt.container=this.getComponentContainer(vt)),vt.animate=this.view.getOptions().animate&&vt.animate&&I(i,"animate",vt.animate),vt.animateOption=ft({},eh,vt.animateOption,i.animateOption),vt},r.prototype.isTop=function(t){return I(t,"top",!0)},r.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},r.prototype.getAnnotationTheme=function(t){return I(this.view.getTheme(),["components","annotation",t],{})},r.prototype.updateOrCreate=function(t){var i=this.cache.get(this.getCacheKey(t));if(i){var n=t.type,a=this.getAnnotationTheme(n),o=this.getAnnotationCfg(n,t,a);Gi(o,["container"]),i.component.update(o),eo(e0,t.type)&&i.component.render()}else i=this.createAnnotation(t),i&&(i.component.init(),eo(e0,t.type)&&i.component.render());return i},r.prototype.syncCache=function(t){var i=this,n=new Map(this.cache);return t.forEach(function(a,o){n.set(o,a)}),n.forEach(function(a,o){Yn(i.option,function(l){return o===i.getCacheKey(l)})||(a.component.destroy(),n.delete(o))}),n},r.prototype.getCacheKey=function(t){return t},r}(dc);function RB(e,r){var t=ft({},I(e,["components","axis","common"]),I(e,["components","axis",r]));return I(t,["grid"],{})}function r0(e,r,t,i){var n=[],a=r.getTicks();return e.isPolar&&a.push({value:1,text:"",tickValue:""}),a.reduce(function(o,l,s){var u=l.value;if(i)n.push({points:[e.convert(t==="y"?{x:0,y:u}:{x:u,y:0}),e.convert(t==="y"?{x:1,y:u}:{x:u,y:1})]});else if(s){var c=o.value,f=(c+u)/2;n.push({points:[e.convert(t==="y"?{x:0,y:f}:{x:f,y:0}),e.convert(t==="y"?{x:1,y:f}:{x:f,y:1})]})}return l},a[0]),n}function AS(e,r,t,i,n){var a=r.values.length,o=[],l=t.getTicks();return l.reduce(function(s,u){var c=s?s.value:u.value,f=u.value,h=(c+f)/2;return n==="x"?o.push({points:[e.convert({x:i?f:h,y:0}),e.convert({x:i?f:h,y:1})]}):o.push({points:je(Array(a+1),function(v,d){return e.convert({x:d/a,y:i?f:h})})}),u},l[0]),o}function BB(e,r){var t=I(r,"grid");if(t===null)return!1;var i=I(e,"grid");return!(t===void 0&&i===null)}var Il=["container"],NB=A(A({},eh),{appear:null}),vCt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.gridContainer=i.view.getLayer(Ye.BG).addGroup(),i.gridForeContainer=i.view.getLayer(Ye.FORE).addGroup(),i.axisContainer=i.view.getLayer(Ye.BG).addGroup(),i.axisForeContainer=i.view.getLayer(Ye.FORE).addGroup(),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.render=function(){this.update()},r.prototype.layout=function(){var t=this,i=this.view.getCoordinate();P(this.getComponents(),function(n){var a=n.component,o=n.direction,l=n.type,s=n.extra,u=s.dim,c=s.scale,f=s.alignTick,h;if(l===Tr.AXIS)i.isPolar?u==="x"?h=i.isTransposed?Um(i,o):_S(i):u==="y"&&(h=i.isTransposed?_S(i):Um(i,o)):h=Um(i,o);else if(l===Tr.GRID)if(i.isPolar){var v=void 0;i.isTransposed?v=u==="x"?AS(i,t.view.getYScales()[0],c,f,u):r0(i,c,u,f):v=u==="x"?r0(i,c,u,f):AS(i,t.view.getXScale(),c,f,u),h={items:v,center:t.view.getCoordinate().getCenter()}}else h={items:r0(i,c,u,f)};a.update(h)})},r.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var i=new Map;this.cache.forEach(function(n,a){t.has(a)?i.set(a,n):n.component.destroy()}),this.cache=i},r.prototype.clear=function(){e.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},r.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},r.prototype.updateXAxes=function(t){var i=this.view.getXScale();if(!(!i||i.isIdentity)){var n=xx(this.option,i.field);if(n!==!1){var a=oB(n,ct.BOTTOM),o=Ye.BG,l="x",s=this.view.getCoordinate(),u=this.getId("axis",i.field),c=this.getId("grid",i.field);if(s.isRect){var f=this.cache.get(u);if(f){var h=this.getLineAxisCfg(i,n,a);Gi(h,Il),f.component.update(h),t.set(u,f)}else f=this.createLineAxis(i,n,o,a,l),this.cache.set(u,f),t.set(u,f);var v=this.cache.get(c);if(v){var h=this.getLineGridCfg(i,n,a,l);Gi(h,Il),v.component.update(h),t.set(c,v)}else v=this.createLineGrid(i,n,o,a,l),v&&(this.cache.set(c,v),t.set(c,v))}else if(s.isPolar){var f=this.cache.get(u);if(f){var h=s.isTransposed?this.getLineAxisCfg(i,n,ct.RADIUS):this.getCircleAxisCfg(i,n,a);Gi(h,Il),f.component.update(h),t.set(u,f)}else{if(s.isTransposed){if(Hl(n))return;f=this.createLineAxis(i,n,o,ct.RADIUS,l)}else f=this.createCircleAxis(i,n,o,a,l);this.cache.set(u,f),t.set(u,f)}var v=this.cache.get(c);if(v){var h=s.isTransposed?this.getCircleGridCfg(i,n,ct.RADIUS,l):this.getLineGridCfg(i,n,ct.CIRCLE,l);Gi(h,Il),v.component.update(h),t.set(c,v)}else{if(s.isTransposed){if(Hl(n))return;v=this.createCircleGrid(i,n,o,ct.RADIUS,l)}else v=this.createLineGrid(i,n,o,ct.CIRCLE,l);v&&(this.cache.set(c,v),t.set(c,v))}}}}},r.prototype.updateYAxes=function(t){var i=this,n=this.view.getYScales();P(n,function(a,o){if(!(!a||a.isIdentity)){var l=a.field,s=xx(i.option,l);if(s!==!1){var u=Ye.BG,c="y",f=i.getId("axis",l),h=i.getId("grid",l),v=i.view.getCoordinate();if(v.isRect){var d=oB(s,o===0?ct.LEFT:ct.RIGHT),p=i.cache.get(f);if(p){var x=i.getLineAxisCfg(a,s,d);Gi(x,Il),p.component.update(x),t.set(f,p)}else p=i.createLineAxis(a,s,u,d,c),i.cache.set(f,p),t.set(f,p);var m=i.cache.get(h);if(m){var x=i.getLineGridCfg(a,s,d,c);Gi(x,Il),m.component.update(x),t.set(h,m)}else m=i.createLineGrid(a,s,u,d,c),m&&(i.cache.set(h,m),t.set(h,m))}else if(v.isPolar){var p=i.cache.get(f);if(p){var x=v.isTransposed?i.getCircleAxisCfg(a,s,ct.CIRCLE):i.getLineAxisCfg(a,s,ct.RADIUS);Gi(x,Il),p.component.update(x),t.set(f,p)}else{if(v.isTransposed){if(Hl(s))return;p=i.createCircleAxis(a,s,u,ct.CIRCLE,c)}else p=i.createLineAxis(a,s,u,ct.RADIUS,c);i.cache.set(f,p),t.set(f,p)}var m=i.cache.get(h);if(m){var x=v.isTransposed?i.getLineGridCfg(a,s,ct.CIRCLE,c):i.getCircleGridCfg(a,s,ct.RADIUS,c);Gi(x,Il),m.component.update(x),t.set(h,m)}else{if(v.isTransposed){if(Hl(s))return;m=i.createLineGrid(a,s,u,ct.CIRCLE,c)}else m=i.createCircleGrid(a,s,u,ct.RADIUS,c);m&&(i.cache.set(h,m),t.set(h,m))}}}}})},r.prototype.createLineAxis=function(t,i,n,a,o){var l={component:new J1t(this.getLineAxisCfg(t,i,a)),layer:n,direction:a===ct.RADIUS?ct.NONE:a,type:Tr.AXIS,extra:{dim:o,scale:t}};return l.component.set("field",t.field),l.component.init(),l},r.prototype.createLineGrid=function(t,i,n,a,o){var l=this.getLineGridCfg(t,i,a,o);if(l){var s={component:new e_t(l),layer:n,direction:ct.NONE,type:Tr.GRID,extra:{dim:o,scale:t,alignTick:I(l,"alignTick",!0)}};return s.component.init(),s}},r.prototype.createCircleAxis=function(t,i,n,a,o){var l={component:new t_t(this.getCircleAxisCfg(t,i,a)),layer:n,direction:a,type:Tr.AXIS,extra:{dim:o,scale:t}};return l.component.set("field",t.field),l.component.init(),l},r.prototype.createCircleGrid=function(t,i,n,a,o){var l=this.getCircleGridCfg(t,i,a,o);if(l){var s={component:new r_t(l),layer:n,direction:ct.NONE,type:Tr.GRID,extra:{dim:o,scale:t,alignTick:I(l,"alignTick",!0)}};return s.component.init(),s}},r.prototype.getLineAxisCfg=function(t,i,n){var a=I(i,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),l=Um(o,n),s=lB(t,i),u=qm(this.view.getTheme(),n),c=I(i,["title"])?ft({title:{style:{text:s}}},{title:aB(this.view.getTheme(),n,i.title)},i):i,f=ft(A(A({container:a},l),{ticks:t.getTicks().map(function(b){return{id:""+b.tickValue,name:b.text,value:b.value}}),verticalFactor:o.isPolar?nB(l,o.getCenter())*-1:nB(l,o.getCenter()),theme:u}),u,c),h=this.getAnimateCfg(f),v=h.animate,d=h.animateOption;f.animateOption=d,f.animate=v;var p=YY(l),x=I(f,"verticalLimitLength",p?1/3:1/2);if(x<=1){var m=this.view.getCanvas().get("width"),_=this.view.getCanvas().get("height");f.verticalLimitLength=x*(p?m:_)}return f},r.prototype.getLineGridCfg=function(t,i,n,a){if(!!BB(qm(this.view.getTheme(),n),i)){var o=RB(this.view.getTheme(),n),l=ft({container:I(i,["top"])?this.gridForeContainer:this.gridContainer},o,I(i,"grid"),this.getAnimateCfg(i));return l.items=r0(this.view.getCoordinate(),t,a,I(l,"alignTick",!0)),l}},r.prototype.getCircleAxisCfg=function(t,i,n){var a=I(i,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),l=t.getTicks().map(function(p){return{id:""+p.tickValue,name:p.text,value:p.value}});!t.isCategory&&Math.abs(o.endAngle-o.startAngle)===Math.PI*2&&l.pop();var s=lB(t,i),u=qm(this.view.getTheme(),ct.CIRCLE),c=I(i,["title"])?ft({title:{style:{text:s}}},{title:aB(this.view.getTheme(),n,i.title)},i):i,f=ft(A(A({container:a},_S(this.view.getCoordinate())),{ticks:l,verticalFactor:1,theme:u}),u,c),h=this.getAnimateCfg(f),v=h.animate,d=h.animateOption;return f.animate=v,f.animateOption=d,f},r.prototype.getCircleGridCfg=function(t,i,n,a){if(!!BB(qm(this.view.getTheme(),n),i)){var o=RB(this.view.getTheme(),ct.RADIUS),l=ft({container:I(i,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,I(i,"grid"),this.getAnimateCfg(i)),s=I(l,"alignTick",!0),u=a==="x"?this.view.getYScales()[0]:this.view.getXScale();return l.items=AS(this.view.getCoordinate(),u,t,s,a),l}},r.prototype.getId=function(t,i){var n=this.view.getCoordinate();return t+"-"+i+"-"+n.type},r.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&I(t,"animate"),animateOption:t&&t.animateOption?ft({},NB,t.animateOption):NB}},r}(dc);function Ul(e,r,t){return t===ct.TOP?[e.minX+e.width/2-r.width/2,e.minY]:t===ct.BOTTOM?[e.minX+e.width/2-r.width/2,e.maxY-r.height]:t===ct.LEFT?[e.minX,e.minY+e.height/2-r.height/2]:t===ct.RIGHT?[e.maxX-r.width,e.minY+e.height/2-r.height/2]:t===ct.TOP_LEFT||t===ct.LEFT_TOP?[e.tl.x,e.tl.y]:t===ct.TOP_RIGHT||t===ct.RIGHT_TOP?[e.tr.x-r.width,e.tr.y]:t===ct.BOTTOM_LEFT||t===ct.LEFT_BOTTOM?[e.bl.x,e.bl.y-r.height]:t===ct.BOTTOM_RIGHT||t===ct.RIGHT_BOTTOM?[e.br.x-r.width,e.br.y-r.height]:[0,0]}function GB(e,r){return Hu(e)?e===!1?!1:{}:I(e,[r],e)}function i0(e){return I(e,"position",ct.BOTTOM)}var dCt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.container=i.view.getLayer(Ye.FORE).addGroup(),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.render=function(){this.update()},r.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,P(this.components,function(i){var n=i.component,a=i.direction,o=bS(a),l=n.get("maxWidthRatio"),s=n.get("maxHeightRatio"),u=t.getCategoryLegendSizeCfg(o,l,s),c=n.get("maxWidth"),f=n.get("maxHeight");n.update({maxWidth:Math.min(u.maxWidth,c||0),maxHeight:Math.min(u.maxHeight,f||0)});var h=n.get("padding"),v=n.getLayoutBBox(),d=new Mi(v.x,v.y,v.width,v.height).expand(h),p=Ul(t.view.viewBBox,d,a),x=p[0],m=p[1],_=Ul(t.layoutBBox,d,a),b=_[0],w=_[1],S=0,M=0;a.startsWith("top")||a.startsWith("bottom")?(S=x,M=w):(S=b,M=m),n.setLocation({x:S+h[3],y:M+h[0]}),t.layoutBBox=t.layoutBBox.cut(d,a)})},r.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var i={},n=function(h,v,d){var p=t.getId(d.field),x=t.getComponentById(p);if(x){var m=void 0,_=GB(t.option,d.field);_!==!1&&(I(_,"custom")?m=t.getCategoryCfg(h,v,d,_,!0):d.isLinear?m=t.getContinuousCfg(h,v,d,_):d.isCategory&&(m=t.getCategoryCfg(h,v,d,_))),m&&(Gi(m,["container"]),x.direction=i0(_),x.component.update(m),i[p]=!0)}else{var b=t.createFieldLegend(h,v,d);b&&(b.component.init(),t.components.push(b),i[p]=!0)}};if(I(this.option,"custom")){var a="global-custom",o=this.getComponentById(a);if(o){var l=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);Gi(l,["container"]),o.component.update(l),i[a]=!0}else{var s=this.createCustomLegend(void 0,void 0,void 0,this.option);if(s){s.init();var u=Ye.FORE,c=i0(this.option);this.components.push({id:a,component:s,layer:u,direction:c,type:Tr.LEGEND,extra:void 0}),i[a]=!0}}}else this.loopLegends(n);var f=[];P(this.getComponents(),function(h){i[h.id]?f.push(h):h.component.destroy()}),this.components=f},r.prototype.clear=function(){e.prototype.clear.call(this),this.container.clear()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.container.remove(!0)},r.prototype.getGeometries=function(t){var i=this,n=t.geometries;return P(t.views,function(a){n=n.concat(i.getGeometries(a))}),n},r.prototype.loopLegends=function(t){var i=this.view.getRootView()===this.view;if(!!i){var n=this.getGeometries(this.view),a={};P(n,function(o){var l=o.getGroupAttributes();P(l,function(s){var u=s.getScale(s.type);!u||u.type==="identity"||a[u.field]||(t(o,s,u),a[u.field]=!0)})})}},r.prototype.createFieldLegend=function(t,i,n){var a,o=GB(this.option,n.field),l=Ye.FORE,s=i0(o);if(o!==!1&&(I(o,"custom")?a=this.createCustomLegend(t,i,n,o):n.isLinear?a=this.createContinuousLegend(t,i,n,o):n.isCategory&&(a=this.createCategoryLegend(t,i,n,o))),a)return a.set("field",n.field),{id:this.getId(n.field),component:a,layer:l,direction:s,type:Tr.LEGEND,extra:{scale:n}}},r.prototype.createCustomLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a,!0);return new eB(o)},r.prototype.createContinuousLegend=function(t,i,n,a){var o=this.getContinuousCfg(t,i,n,Gi(a,["value"]));return new i_t(o)},r.prototype.createCategoryLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a);return new eB(o)},r.prototype.getContinuousCfg=function(t,i,n,a){var o=n.getTicks(),l=Yn(o,function(p){return p.value===0}),s=Yn(o,function(p){return p.value===1}),u=o.map(function(p){var x=p.value,m=p.tickValue,_=i.mapping(n.invert(x)).join("");return{value:m,attrValue:_,color:_,scaleValue:x}});l||u.push({value:n.min,attrValue:i.mapping(n.invert(0)).join(""),color:i.mapping(n.invert(0)).join(""),scaleValue:0}),s||u.push({value:n.max,attrValue:i.mapping(n.invert(1)).join(""),color:i.mapping(n.invert(1)).join(""),scaleValue:1}),u.sort(function(p,x){return p.value-x.value});var c={min:Wi(u).value,max:nr(u).value,colors:[],rail:{type:i.type},track:{}};i.type==="size"&&(c.track={style:{fill:i.type==="size"?this.view.getTheme().defaultColor:void 0}}),i.type==="color"&&(c.colors=u.map(function(p){return p.attrValue}));var f=this.container,h=i0(a),v=bS(h),d=I(a,"title");return d&&(d=ft({text:rp(n)},d)),c.container=f,c.layout=v,c.title=d,c.animateOption=eh,this.mergeLegendCfg(c,a,"continuous")},r.prototype.getCategoryCfg=function(t,i,n,a,o){var l=this.container,s=I(a,"position",ct.BOTTOM),u=mB(this.view.getTheme(),s),c=I(u,["marker"]),f=I(a,"marker"),h=bS(s),v=I(u,["pageNavigator"]),d=I(a,"pageNavigator"),p=o?mbt(c,f,a.items):wW(this.view,t,i,c,f),x=I(a,"title");x&&(x=ft({text:n?rp(n):""},x));var m=I(a,"maxWidthRatio"),_=I(a,"maxHeightRatio"),b=this.getCategoryLegendSizeCfg(h,m,_);b.container=l,b.layout=h,b.items=p,b.title=x,b.animateOption=eh,b.pageNavigator=ft({},v,d);var w=this.mergeLegendCfg(b,a,s);w.reversed&&w.items.reverse();var S=I(w,"maxItemWidth");return S&&S<=1&&(w.maxItemWidth=this.view.viewBBox.width*S),w},r.prototype.mergeLegendCfg=function(t,i,n){var a=n.split("-")[0],o=mB(this.view.getTheme(),a);return ft({},o,t,i)},r.prototype.getId=function(t){return this.name+"-"+t},r.prototype.getComponentById=function(t){return Yn(this.components,function(i){return i.id===t})},r.prototype.getCategoryLegendSizeCfg=function(t,i,n){i===void 0&&(i=KR),n===void 0&&(n=KR);var a=this.view.viewBBox,o=a.width,l=a.height;return t==="vertical"?{maxWidth:o*i,maxHeight:l}:{maxWidth:o,maxHeight:l*n}},r}(dc),pCt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=Yo,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=n[0],o=n[1];i.start=a,i.end=o,i.changeViewData(a,o)},i.container=i.view.getLayer(Ye.FORE).addGroup(),i.onChangeFn=i1(i.onValueChange,20,{leading:!0}),i.width=0,i.view.on(Gt.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(Gt.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(Gt.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(Gt.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),i=t.start,n=t.end;K(this.start)&&(this.start=i,this.end=n);var a=this.view.getOptions().data;this.option&&!di(a)?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)},r.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 i=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),a=n[0];n[1],n[2];var o=n[3],l=this.slider.component.getLayoutBBox(),s=new Mi(l.x,l.y,Math.min(l.width,i),l.height).expand(n),u=this.getMinMaxText(this.start,this.end),c=u.minText,f=u.maxText,h=Ul(this.view.viewBBox,s,ct.BOTTOM);h[0];var v=h[1],d=Ul(this.view.coordinateBBox,s,ct.BOTTOM),p=d[0];d[1],this.slider.component.update(A(A({},this.getSliderCfg()),{x:p+o,y:v+a,width:this.width,start:this.start,end:this.end,minText:c,maxText:f})),this.view.viewBBox=this.view.viewBBox.cut(s,ct.BOTTOM)}},r.prototype.update=function(){this.render()},r.prototype.createSlider=function(){var t=this.getSliderCfg(),i=new W5(A({container:this.container},t));return i.init(),{component:i,layer:Ye.FORE,direction:ct.BOTTOM,type:Tr.SLIDER}},r.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var i=this.getMinMaxText(this.start,this.end),n=i.minText,a=i.maxText;t=A(A({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:a})}return this.slider.component.update(t),this.slider},r.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},r.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if(qt(this.option)){var i=A({data:this.getData()},I(this.option,"trendCfg",{}));t=ft({},t,this.getThemeOptions(),this.option),t=A(A({},t),{trendCfg:i})}return t.start=Ce(Math.min(K(t.start)?0:t.start,K(t.end)?1:t.end),0,1),t.end=Ce(Math.max(K(t.start)?0:t.start,K(t.end)?1:t.end),0,1),t},r.prototype.getData=function(){var t=this.view.getOptions().data,i=this.view.getYScales()[0],n=this.view.getGroupScales();if(n.length){var a=n[0],o=a.field,l=a.ticks;return t.reduce(function(s,u){return u[o]===l[0]&&s.push(u[i.field]),s},[])}return t.map(function(s){return s[i.field]||0})},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return I(t,["components","slider","common"],{})},r.prototype.getMinMaxText=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=Xn(n,a.field),l=o,s=gr(n);if(!a||!s)return{};var u=gr(l),c=Math.floor(t*(u-1)),f=Math.floor(i*(u-1)),h=I(l,[c]),v=I(l,[f]),d=this.getSliderCfg().formatter;return d&&(h=d(h,n[c],c),v=d(v,n[f],f)),{minText:h,maxText:v}},r.prototype.changeViewData=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=gr(n);if(!(!a||!o)){var l=Xn(n,a.field),s=l,u=gr(s),c=Math.floor(t*(u-1)),f=Math.floor(i*(u-1));this.view.filter(a.field,function(h,v){var d=s.indexOf(h);return d>-1?xf(d,c,f):!0}),this.view.render(!0)}},r.prototype.getComponents=function(){return this.slider?[this.slider]:[]},r.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},r}(dc),n0=0,zB=8,gCt=32,yCt=20,mCt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=Yo,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=n.ratio,o=i.getValidScrollbarCfg().animate;i.ratio=Ce(a,0,1);var l=i.view.getOptions().animate;o||i.view.animate(!1),i.changeViewData(i.getScrollRange(),!0),i.view.animate(l)},i.container=i.view.getLayer(Ye.FORE).addGroup(),i.onChangeFn=i1(i.onValueChange,20,{leading:!0}),i.trackLen=0,i.thumbLen=0,i.ratio=0,i.view.on(Gt.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(Gt.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(Gt.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(Gt.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.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)},r.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 i=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),a=this.scrollbar.component.getLayoutBBox(),o=new Mi(a.x,a.y,Math.min(a.width,i),a.height).expand(n),l=this.getScrollbarComponentCfg(),s=void 0,u=void 0;if(l.isHorizontal){var c=Ul(this.view.viewBBox,o,ct.BOTTOM);c[0];var f=c[1],h=Ul(this.view.coordinateBBox,o,ct.BOTTOM),v=h[0];h[1],s=v,u=f}else{var d=Ul(this.view.viewBBox,o,ct.RIGHT);d[0];var f=d[1],p=Ul(this.view.viewBBox,o,ct.RIGHT),v=p[0];p[1],s=v,u=f}s+=n[3],u+=n[0],this.trackLen?this.scrollbar.component.update(A(A({},l),{x:s,y:u,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update(A(A({},l),{x:s,y:u})),this.view.viewBBox=this.view.viewBBox.cut(o,l.isHorizontal?ct.BOTTOM:ct.RIGHT)}},r.prototype.update=function(){this.render()},r.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},r.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=[]},r.prototype.setValue=function(t){this.onValueChange({ratio:t})},r.prototype.getValue=function(){return this.ratio},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return I(t,["components","scrollbar","common"],{})},r.prototype.getScrollbarTheme=function(t){var i=I(this.view.getTheme(),["components","scrollbar"]),n=t||{},a=n.thumbHighlightColor,o=ue(n,["thumbHighlightColor"]);return{default:ft({},I(i,["default","style"],{}),o),hover:ft({},I(i,["hover","style"],{}),{thumbColor:a})}},r.prototype.measureScrollbar=function(){var t=this.view.getXScale(),i=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),a=n.trackLen,o=n.thumbLen;this.trackLen=a,this.thumbLen=o,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=i},r.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*Ce(this.ratio,0,1)),i=Math.min(t+this.step-1,this.cnt-1);return[t,i]},r.prototype.changeViewData=function(t,i){var n=this,a=t[0],o=t[1],l=this.getValidScrollbarCfg().type,s=l!=="vertical",u=Xn(this.data,this.xScaleCfg.field),c=s?u:u.reverse();this.yScalesCfg.forEach(function(f){n.view.scale(f.field,{formatter:f.formatter,type:f.type,min:f.min,max:f.max})}),this.view.filter(this.xScaleCfg.field,function(f){var h=c.indexOf(f);return h>-1?xf(h,a,o):!0}),this.view.render(!0)},r.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,i=t!=="vertical",n=new X5(A(A({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return n.init(),{component:n,layer:Ye.FORE,direction:i?ct.BOTTOM:ct.RIGHT,type:Tr.SCROLLBAR}},r.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),i=this.trackLen?A(A({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):A({},t);return this.scrollbar.component.update(i),this.scrollbar},r.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,i=this.getValidScrollbarCfg(),n=i.type,a=i.categorySize,o=n!=="vertical";return Math.floor((o?t.width:t.height)/a)},r.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),i=this.getScrollbarData(),n=Xn(i,t.field);return gr(n)},r.prototype.getScrollbarComponentCfg=function(){var t=this.view,i=t.coordinateBBox,n=t.viewBBox,a=this.getValidScrollbarCfg(),o=a.type,l=a.padding,s=a.width,u=a.height,c=a.style,f=o!=="vertical",h=l[0],v=l[1],d=l[2],p=l[3],x=f?{x:i.minX+p,y:n.maxY-u-d}:{x:n.maxX-s-v,y:i.minY+h},m=this.getStep(),_=this.getCnt(),b=f?i.width-p-v:i.height-h-d,w=Math.max(b*Ce(m/_,0,1),yCt);return A(A({},this.getThemeOptions()),{x:x.x,y:x.y,size:f?u:s,isHorizontal:f,trackLen:b,thumbLen:w,thumbOffset:0,theme:this.getScrollbarTheme(c)})},r.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:gCt,width:zB,height:zB,padding:[0,0,0,0],animate:!0,style:{}};return qt(this.option)&&(t=A(A({},t),this.option)),(!qt(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[n0,0,n0,0]:[0,n0,0,n0]),t},r.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),i=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&i.type==="vertical"&&(n=qr([],n,!0).reverse()),n},r}(dc),xCt={fill:"#CCD6EC",opacity:.3};function _Ct(e,r,t){var i=X_t(e,r,t);if(i.length){i=qi(i);for(var n=0,a=i;n1){for(var d=i[0],p=Math.abs(r.y-d[0].y),x=0,m=i;xv.maxY&&(v=W)):(W.minXv.maxX&&(v=W)),d.x=Math.min(W.minX,d.minX),d.y=Math.min(W.minY,d.minY),d.width=Math.max(W.maxX,d.maxX)-d.x,d.height=Math.max(W.maxY,d.maxY)-d.y});var p=i.backgroundGroup,x=i.coordinateBBox,m=void 0;if(f.isRect){var _=i.getXScale(),b=t||{},w=b.appendRatio,S=b.appendWidth;K(S)&&(w=K(w)?_.isLinear?0:.25:w,S=f.isTransposed?w*v.height:w*h.width);var M=void 0,O=void 0,F=void 0,L=void 0;f.isTransposed?(M=x.minX,O=Math.min(v.minY,h.minY)-S,F=x.width,L=d.height+S*2):(M=Math.min(h.minX,v.minX)-S,O=x.minY,F=d.width+S*2,L=x.height),m=[["M",M,O],["L",M+F,O],["L",M+F,O+L],["L",M,O+L],["Z"]]}else{var D=Wi(u),R=nr(u),H=ep(D.getModel(),f).startAngle,k=ep(R.getModel(),f).endAngle,V=f.getCenter(),U=f.getRadius(),B=f.innerRadius*U;m=ts(V.x,V.y,U,H,k,B)}if(this.regionPath)this.regionPath.attr("path",m),this.regionPath.show();else{var G=I(t,"style",xCt);this.regionPath=p.addShape({type:"path",name:"active-region",capture:!1,attrs:A(A({},G),{path:m})})}}}},r.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},r.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),e.prototype.destroy.call(this)},r}(Ie),kW=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.show=function(){var t=this.context,i=t.event,n=t.view,a=n.isTooltipLocked();if(!a){var o=this.timeStamp,l=+new Date,s=I(t.view.getOptions(),"tooltip.showDelay",16);if(l-o>s){var u=this.location,c={x:i.x,y:i.y};(!u||!Ge(u,c))&&this.showTooltip(n,c),this.timeStamp=l,this.location=c}}},r.prototype.hide=function(){var t=this.context.view,i=t.getController("tooltip"),n=this.context.event,a=n.clientX,o=n.clientY;i.isCursorEntered({x:a,y:o})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},r.prototype.showTooltip=function(t,i){t.showTooltip(i)},r.prototype.hideTooltip=function(t){t.hideTooltip()},r}(Ie),wCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.showTooltip=function(t,i){var n=vo(t);P(n,function(a){var o=wT(t,a,i);a.showTooltip(o)})},r.prototype.hideTooltip=function(t){var i=vo(t);P(i,function(n){n.hideTooltip()})},r}(kW),CCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.show=function(){var t=this.context,i=t.event,n=this.timeStamp,a=+new Date;if(a-n>16){var o=this.location,l={x:i.x,y:i.y};(!o||!Ge(o,l))&&this.showTooltip(l),this.timeStamp=a,this.location=l}},r.prototype.hide=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var i=this.context,n=i.event,a=n.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=a.get("tip");this.tooltip.update(A({title:o},t)),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=this.context.view,n=i.canvas,a={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=i.getTheme(),l=I(o,["components","tooltip","domStyles"],{}),s=new GY({parent:n.get("el").parentNode,region:a,visible:!1,crosshairs:null,domStyles:A({},ft({},l,(t={},t[Nf]={"max-width":"50%"},t[Gf]={"word-break":"break-all"},t)))});s.init(),s.setCapture(!1),this.tooltip=s},r}(Ie),WF=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t}return r.prototype.hasState=function(t){return t.hasState(this.stateName)},r.prototype.setElementState=function(t,i){t.setState(this.stateName,i)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},r.prototype.clearViewState=function(t){var i=this,n=tW(t,this.stateName);P(n,function(a){i.setElementState(a,!1)})},r}(Ie);function VB(e){return I(e.get("delegateObject"),"item")}var XF=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return r.prototype.isItemIgnore=function(t,i){var n=this.ignoreListItemStates,a=n.filter(function(o){return i.hasState(t,o)});return!!a.length},r.prototype.setStateByComponent=function(t,i,n){var a=this.context.view,o=t.get("field"),l=Gr(a);this.setElementsStateByItem(l,o,i,n)},r.prototype.setStateByElement=function(t,i){this.setElementState(t,i)},r.prototype.isMathItem=function(t,i,n){var a=this.context.view,o=th(a,i),l=Ea(t,i);return!K(l)&&n.name===o.getText(l)},r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this;P(t,function(l){o.isMathItem(l,i,n)&&l.setState(o.stateName,a)})},r.prototype.setStateEnable=function(t){var i=bs(this.context);if(i)QY(this.context)&&this.setStateByElement(i,t);else{var n=Jf(this.context);if(ip(n)){var a=n.item,o=n.component;if(a&&o&&!this.isItemIgnore(a,o)){var l=this.context.event.gEvent;if(l&&l.fromShape&&l.toShape&&VB(l.fromShape)===VB(l.toShape))return;this.setStateByComponent(o,a,t)}}}},r.prototype.toggle=function(){var t=bs(this.context);if(t){var i=t.hasState(this.stateName);this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(WF),SCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(XF),ACt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.cache={},t}return r.prototype.getColorScale=function(t,i){var n=i.geometry.getAttribute("color");if(!n)return null;var a=t.getScaleByField(n.getFields()[0]);return a},r.prototype.getLinkPath=function(t,i){var n=this.context.view,a=n.getCoordinate().isTransposed,o=t.shape.getCanvasBBox(),l=i.shape.getCanvasBBox(),s=a?[["M",o.minX,o.minY],["L",l.minX,l.maxY],["L",l.maxX,l.maxY],["L",o.maxX,o.minY],["Z"]]:[["M",o.maxX,o.minY],["L",l.minX,l.minY],["L",l.minX,l.maxY],["L",o.maxX,o.maxY],["Z"]];return s},r.prototype.addLinkShape=function(t,i,n,a){var o={opacity:.4,fill:i.shape.attr("fill")};t.addShape({type:"path",attrs:A(A({},ft({},o,pt(a)?a(o,i):a)),{path:this.getLinkPath(i,n)})})},r.prototype.linkByElement=function(t,i){var n=this,a=this.context.view,o=this.getColorScale(a,t);if(!!o){var l=Ea(t,o.field);if(!this.cache[l]){var s=M_t(a,o.field,l),u=this.linkGroup,c=u.addGroup();this.cache[l]=c;var f=s.length;P(s,function(h,v){if(v=0},i)},r}(UF),FCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.highlight=function(){this.setState()},r.prototype.setElementState=function(t,i){var n=this.context.view,a=Gr(n);RW(a,function(o){return t===o},i)},r.prototype.clear=function(){var t=this.context.view;ZF(t)},r}(qF),PCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(UF),ICt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(XF),LCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(qF),gg=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return r.prototype.getTriggerListInfo=function(){var t=Jf(this.context),i=null;return ip(t)&&(i={item:t.item,list:t.component}),i},r.prototype.getAllowComponents=function(){var t=this,i=this.context.view,n=eW(i),a=[];return P(n,function(o){o.isList()&&t.allowSetStateByElement(o)&&a.push(o)}),a},r.prototype.hasState=function(t,i){return t.hasState(i,this.stateName)},r.prototype.clearAllComponentsState=function(){var t=this,i=this.getAllowComponents();P(i,function(n){n.clearItemsState(t.stateName)})},r.prototype.allowSetStateByElement=function(t){var i=t.get("field");if(!i)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(this.cfg.componentNames.indexOf(n)===-1)return!1}var a=this.context.view,o=th(a,i);return o&&o.isCategory},r.prototype.allowSetStateByItem=function(t,i){var n=this.ignoreItemStates;if(n.length){var a=n.filter(function(o){return i.hasState(t,o)});return a.length===0}return!0},r.prototype.setStateByElement=function(t,i,n){var a=t.get("field"),o=this.context.view,l=th(o,a),s=Ea(i,a),u=l.getText(s);this.setItemsState(t,u,n)},r.prototype.setStateEnable=function(t){var i=this,n=bs(this.context);if(n){var a=this.getAllowComponents();P(a,function(u){i.setStateByElement(u,n,t)})}else{var o=Jf(this.context);if(ip(o)){var l=o.item,s=o.component;this.allowSetStateByElement(s)&&this.allowSetStateByItem(l,s)&&this.setItemState(s,l,t)}}},r.prototype.setItemsState=function(t,i,n){var a=this,o=t.getItems();P(o,function(l){l.name===i&&a.setItemState(t,l,n)})},r.prototype.setItemState=function(t,i,n){t.setItemState(i,this.stateName,n)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.reset=function(){this.setStateEnable(!1)},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=this.hasState(i,n);this.setItemState(i,n,!a)}},r.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},r}(Ie),DCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(gg),jB="inactive",HB="active";function $Ct(e){var r=e.getItems();P(r,function(t){e.hasState(t,HB)&&e.setItemState(t,HB,!1),e.hasState(t,jB)&&e.setItemState(t,jB,!1)})}var Pv="inactive",lu="active",KF=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=lu,t.ignoreItemStates=["unchecked"],t}return r.prototype.setItemsState=function(t,i,n){this.setHighlightBy(t,function(a){return a.name===i},n)},r.prototype.setItemState=function(t,i,n){t.getItems(),this.setHighlightBy(t,function(a){return a===i},n)},r.prototype.setHighlightBy=function(t,i,n){var a=t.getItems();if(n)P(a,function(s){i(s)?(t.hasState(s,Pv)&&t.setItemState(s,Pv,!1),t.setItemState(s,lu,!0)):t.hasState(s,lu)||t.setItemState(s,Pv,!0)});else{var o=t.getItemsByState(lu),l=!0;P(o,function(s){if(!i(s))return l=!1,!1}),l?this.clear():P(a,function(s){i(s)&&(t.hasState(s,lu)&&t.setItemState(s,lu,!1),t.setItemState(s,Pv,!0))})}},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)$Ct(t.list);else{var i=this.getAllowComponents();P(i,function(n){n.clearItemsState(lu),n.clearItemsState(Pv)})}},r}(gg),kCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(gg),RCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="unchecked",t}return r.prototype.unchecked=function(){this.setState()},r}(gg),Hc="unchecked",a0="checked",BCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=a0,t}return r.prototype.setItemState=function(t,i,n){this.setCheckedBy(t,function(a){return a===i},n)},r.prototype.setCheckedBy=function(t,i,n){var a=t.getItems();n&&P(a,function(o){i(o)?(t.hasState(o,Hc)&&t.setItemState(o,Hc,!1),t.setItemState(o,a0,!0)):t.hasState(o,a0)||t.setItemState(o,Hc,!0)})},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=!pp(i.getItems(),function(o){return i.hasState(o,Hc)});a||i.hasState(n,Hc)?this.setItemState(i,n,!0):this.reset()}},r.prototype.checked=function(){this.setState()},r.prototype.reset=function(){var t=this.getAllowComponents();P(t,function(i){i.clearItemsState(a0),i.clearItemsState(Hc)})},r}(gg),JF=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.emitEvent=function(t){var i="mask:"+t,n=this.context.view,a=this.context.event;n.emit(i,{target:this.maskShape,shape:this.maskShape,points:this.points,x:a.x,y:a.y})},r.prototype.createMask=function(){var t=this.context.view,i=this.getMaskAttrs(),n=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:A({fill:"#C5D4EB",opacity:.3},i)});return n},r.prototype.getMaskPath=function(){return[]},r.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},r.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(t==null?void 0:t.maskStyle),this.emitEvent("start")},r.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},r.prototype.move=function(){if(!(!this.moving||!this.maskShape)){var t=this.getCurrentPoint(),i=this.preMovePoint,n=t.x-i.x,a=t.y-i.y,o=this.points;P(o,function(l){l.x+=n,l.y+=a}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},r.prototype.updateMask=function(t){var i=ft({},this.getMaskAttrs(),t);this.maskShape.attr(i)},r.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},r.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},r.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},r.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},r.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,e.prototype.destroy.call(this)},r}(Ie),NCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="circle",t}return r.prototype.getMaskAttrs=function(){var t=this.points,i=nr(this.points),n=0,a=0,o=0;if(t.length){var l=t[0];n=TF(l,i)/2,a=(i.x+l.x)/2,o=(i.y+l.y)/2}return{x:a,y:o,r:n}},r}(JF),NW=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return r.prototype.getRegion=function(){var t=this.points;return{start:Wi(t),end:nr(t)}},r.prototype.getMaskAttrs=function(){var t=this.getRegion(),i=t.start,n=t.end,a=Math.min(i.x,n.x),o=Math.min(i.y,n.y),l=Math.abs(n.x-i.x),s=Math.abs(n.y-i.y);return{x:a,y:o,width:l,height:s}},r}(JF);function YB(e){e.x=Ce(e.x,0,1),e.y=Ce(e.y,0,1)}var GW=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return r.prototype.getRegion=function(){var t=null,i=null,n=this.points,a=this.dim,o=this.context.view.getCoordinate(),l=o.invert(Wi(n)),s=o.invert(nr(n));return this.inPlot&&(YB(l),YB(s)),a==="x"?(t=o.convert({x:l.x,y:0}),i=o.convert({x:s.x,y:1})):(t=o.convert({x:0,y:l.y}),i=o.convert({x:1,y:s.y})),{start:t,end:i}},r}(NW),zW=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points,i=[];return t.length&&(P(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i.push(["L",t[0].x,t[0].y])),i},r.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},r.prototype.addPoint=function(){this.resize()},r}(JF),GCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points;return F_t(t,!0)},r}(zW),zCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setCursor=function(t){var i=this.context.view;i.getCanvas().setCursor(t)},r.prototype.default=function(){this.setCursor("default")},r.prototype.pointer=function(){this.setCursor("pointer")},r.prototype.move=function(){this.setCursor("move")},r.prototype.crosshair=function(){this.setCursor("crosshair")},r.prototype.wait=function(){this.setCursor("wait")},r.prototype.help=function(){this.setCursor("help")},r.prototype.text=function(){this.setCursor("text")},r.prototype.eResize=function(){this.setCursor("e-resize")},r.prototype.wResize=function(){this.setCursor("w-resize")},r.prototype.nResize=function(){this.setCursor("n-resize")},r.prototype.sResize=function(){this.setCursor("s-resize")},r.prototype.neResize=function(){this.setCursor("ne-resize")},r.prototype.nwResize=function(){this.setCursor("nw-resize")},r.prototype.seResize=function(){this.setCursor("se-resize")},r.prototype.swResize=function(){this.setCursor("sw-resize")},r.prototype.nsResize=function(){this.setCursor("ns-resize")},r.prototype.ewResize=function(){this.setCursor("ew-resize")},r}(Ie),VCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=this;t.getScaleByField(i)&&t.filter(i,n),t.views&&t.views.length&&P(t.views,function(o){a.filterView(o,i,n)})},r.prototype.filter=function(){var t=Jf(this.context);if(t){var i=this.context.view,n=t.component,a=n.get("field");if(ip(t)){if(a){var o=n.getItemsByState("unchecked"),l=th(i,a),s=o.map(function(h){return h.name});s.length?this.filterView(i,a,function(h){var v=l.getText(h);return!s.includes(v)}):this.filterView(i,a,null),i.render(!0)}}else if(KY(t)){var u=n.getValue(),c=u[0],f=u[1];this.filterView(i,a,function(h){return h>=c&&h<=f}),i.render(!0)}}},r}(Ie);function WB(e,r,t,i){var n=Math.min(t[r],i[r]),a=Math.max(t[r],i[r]),o=e.range,l=o[0],s=o[1];if(ns&&(a=s),n===s&&a===s)return null;var u=e.invert(n),c=e.invert(a);if(e.isCategory){var f=e.values.indexOf(u),h=e.values.indexOf(c),v=e.values.slice(f,h+1);return function(d){return v.includes(d)}}else return function(d){return d>=u&&d<=c}}var _i;(function(e){e.FILTER="brush-filter-processing",e.RESET="brush-filter-reset",e.BEFORE_FILTER="brush-filter:beforefilter",e.AFTER_FILTER="brush-filter:afterfilter",e.BEFORE_RESET="brush-filter:beforereset",e.AFTER_RESET="brush-filter:afterreset"})(_i||(_i={}));var E_=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},r.prototype.filter=function(){var t,i;if(np(this.context)){var n=this.context.event.target,a=n.getCanvasBBox();t={x:a.x,y:a.y},i={x:a.maxX,y:a.maxY}}else{if(!this.isStarted)return;t=this.startPoint,i=this.context.getCurrentPoint()}if(!(Math.abs(t.x-i.x)<5||Math.abs(t.x-i.y)<5)){var o=this.context,l=o.view,s=o.event,u={view:l,event:s,dims:this.dims};l.emit(_i.BEFORE_FILTER,$e.fromData(l,_i.BEFORE_FILTER,u));var c=l.getCoordinate(),f=c.invert(i),h=c.invert(t);if(this.hasDim("x")){var v=l.getXScale(),d=WB(v,"x",f,h);this.filterView(l,v.field,d)}if(this.hasDim("y")){var p=l.getYScales()[0],d=WB(p,"y",f,h);this.filterView(l,p.field,d)}this.reRender(l,{source:_i.FILTER}),l.emit(_i.AFTER_FILTER,$e.fromData(l,_i.AFTER_FILTER,u))}},r.prototype.end=function(){this.isStarted=!1},r.prototype.reset=function(){var t=this.context.view;if(t.emit(_i.BEFORE_RESET,$e.fromData(t,_i.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var i=t.getXScale();this.filterView(t,i.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:_i.RESET}),t.emit(_i.AFTER_RESET,$e.fromData(t,_i.AFTER_RESET,{}))},r.prototype.filterView=function(t,i,n){t.filter(i,n)},r.prototype.reRender=function(t,i){t.render(!0,i)},r}(Ie),tP=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=vo(t);P(a,function(o){o.filter(i,n)})},r.prototype.reRender=function(t){var i=vo(t);P(i,function(n){n.render(!0)})},r}(E_),jCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filter=function(){var t=Jf(this.context),i=this.context.view,n=Gr(i);if(np(this.context)){var a=SF(this.context,10);a&&P(n,function(d){a.includes(d)?d.show():d.hide()})}else if(t){var o=t.component,l=o.get("field");if(ip(t)){if(l){var s=o.getItemsByState("unchecked"),u=th(i,l),c=s.map(function(d){return d.name});P(n,function(d){var p=Ea(d,l),x=u.getText(p);c.indexOf(x)>=0?d.hide():d.show()})}}else if(KY(t)){var f=o.getValue(),h=f[0],v=f[1];P(n,function(d){var p=Ea(d,l);p>=h&&p<=v?d.show():d.hide()})}}},r.prototype.clear=function(){var t=Gr(this.context.view);P(t,function(i){i.show()})},r.prototype.reset=function(){this.clear()},r}(Ie),VW=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.byRecord=!1,t}return r.prototype.filter=function(){np(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},r.prototype.filterByRecord=function(){var t=this.context.view,i=SF(this.context,10);if(!!i){var n=t.getXScale().field,a=t.getYScales()[0].field,o=i.map(function(s){return s.getModel().data}),l=vo(t);P(l,function(s){var u=Gr(s);P(u,function(c){var f=c.getModel().data;rW(o,f,n,a)?c.show():c.hide()})})}},r.prototype.filterByBBox=function(){var t=this,i=this.context.view,n=vo(i);P(n,function(a){var o=JY(t.context,a,10),l=Gr(a);o&&P(l,function(s){o.includes(s)?s.show():s.hide()})})},r.prototype.reset=function(){var t=vo(this.context.view);P(t,function(i){var n=Gr(i);P(n,function(a){a.show()})})},r}(Ie),HCt=10,YCt=5,WCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.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"}},t}return r.prototype.getButtonCfg=function(){return ft(this.buttonCfg,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),n=i.addShape({type:"text",name:"button-text",attrs:A({text:t.text},t.textStyle)}),a=n.getBBox(),o=EF(t.padding),l=i.addShape({type:"rect",name:"button-rect",attrs:A({x:a.x-o[3],y:a.y-o[0],width:a.width+o[1]+o[3],height:a.height+o[0]+o[2]},t.style)});l.toBack(),i.on("mouseenter",function(){l.attr(t.activeStyle)}),i.on("mouseleave",function(){l.attr(t.style)}),this.buttonGroup=i},r.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),n=i.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),l=rr(null,[["t",n.x-o.width-HCt,n.y+o.height+YCt]]);a.setMatrix(l)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(Ie),XCt=4,UCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},r.prototype.drag=function(){if(!!this.startPoint){var t=this.context.getCurrentPoint(),i=this.context.view,n=this.context.event;this.dragStart?i.emit("drag",{target:n.target,x:n.x,y:n.y}):TF(t,this.startPoint)>XCt&&(i.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},r.prototype.end=function(){if(this.dragStart){var t=this.context.view,i=this.context.event;t.emit("dragend",{target:i.target,x:i.x,y:i.y})}this.starting=!1,this.dragStart=!1},r}(Ie),qCt=5,ZCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},r.prototype.move=function(){if(!!this.starting){var t=this.startPoint,i=this.context.getCurrentPoint(),n=TF(t,i);if(n>qCt&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var a=this.context.view,o=rr(this.startMatrix,[["t",i.x-t.x,i.y-t.y]]);a.backgroundGroup.setMatrix(o),a.foregroundGroup.setMatrix(o),a.middleGroup.setMatrix(o)}}},r.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},r.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},r}(Ie),XB="x",UB="y",jW=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=[XB,UB],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.getScale=function(t){var i=this.context.view;return t==="x"?i.getXScale():i.getYScales()[0]},r.prototype.resetDim=function(t){var i=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);i.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},r.prototype.reset=function(){this.resetDim(XB),this.resetDim(UB);var t=this.context.view;t.render(!0)},r}(Ie),QCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return r.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var i=this.dims;P(i,function(n){var a=t.getScale(n),o=a.min,l=a.max,s=a.values;t.startCache[n]={min:o,max:l,values:s}})},r.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},r.prototype.translate=function(){var t=this;if(!!this.starting){var i=this.startPoint,n=this.context.view.getCoordinate(),a=this.context.getCurrentPoint(),o=n.invert(i),l=n.invert(a),s=l.x-o.x,u=l.y-o.y,c=this.context.view,f=this.dims;P(f,function(h){t.translateDim(h,{x:s*-1,y:u*-1})}),c.render(!0)}},r.prototype.translateDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,i)}},r.prototype.translateLinear=function(t,i,n){var a=this.context.view,o=this.startCache[t],l=o.min,s=o.max,u=s-l,c=n[t]*u;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:l,max:s}),a.scale(i.field,{nice:!1,min:l+c,max:s+c})},r.prototype.reset=function(){e.prototype.reset.call(this),this.startPoint=null,this.starting=!1},r}(jW),KCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.zoomRatio=.05,t}return r.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},r.prototype.zoom=function(t){var i=this,n=this.dims;P(n,function(a){i.zoomDim(a,t)}),this.context.view.render(!0)},r.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},r.prototype.zoomDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,i)}},r.prototype.zoomLinear=function(t,i,n){var a=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:i.min,max:i.max});var o=this.cacheScaleDefs[t],l=o.max-o.min,s=i.min,u=i.max,c=n*l,f=s-c,h=u+c,v=h-f,d=v/l;h>f&&d<100&&d>.01&&a.scale(i.field,{nice:!1,min:s-c,max:u+c})},r}(jW);function JCt(e){var r=e.gEvent.originalEvent;return r.deltaY>0}var tSt=1,eSt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.scroll=function(t){var i=this.context,n=i.view,a=i.event;if(!!n.getOptions().scrollbar){var o=(t==null?void 0:t.wheelDelta)||tSt,l=n.getController("scrollbar"),s=n.getXScale(),u=n.getOptions().data,c=gr(Xn(u,s.field)),f=gr(s.values),h=l.getValue(),v=Math.floor((c-f)*h),d=v+(JCt(a)?o:-o),p=o/(c-f)/1e4,x=Ce(d/(c-f)+p,0,1);l.setValue(x)}},r}(Ie);sW("dark",oW(Cbt));bF("canvas",sj);bF("svg",wj);ka("Polygon",zbt);ka("Interval",kbt);ka("Schema",Vbt);ka("Path",NF);ka("Point",Nbt);ka("Line",Rbt);ka("Area",Obt);ka("Edge",Fbt);ka("Heatmap",Pbt);ka("Violin",Hbt);kh("base",pg);kh("interval",owt);kh("pie",lwt);kh("polar",PW);Ii("overlap",bwt);Ii("distribute",uwt);Ii("fixed-overlap",_wt);Ii("hide-overlap",Mwt);Ii("limit-in-shape",gwt);Ii("limit-in-canvas",pwt);Ii("limit-in-plot",Hwt);Ii("pie-outer",fwt);Ii("adjust-color",Owt);Ii("interval-adjust-position",Lwt);Ii("interval-hide-overlap",$wt);Ii("point-adjust-position",Bwt);Ii("pie-spider",dwt);Ii("path-adjust-position",zwt);Qi("fade-in",Ywt);Qi("fade-out",Wwt);Qi("grow-in-x",Uwt);Qi("grow-in-xy",Zwt);Qi("grow-in-y",qwt);Qi("scale-in-x",Jwt);Qi("scale-in-y",tCt);Qi("wave-in",rCt);Qi("zoom-in",iCt);Qi("zoom-out",nCt);Qi("position-update",Kwt);Qi("sector-path-update",eCt);Qi("path-in",Qwt);vc("rect",uCt);vc("mirror",sCt);vc("list",oCt);vc("matrix",lCt);vc("circle",aCt);vc("tree",cCt);Ls("axis",vCt);Ls("legend",dCt);Ls("tooltip",PF);Ls("annotation",hCt);Ls("slider",pCt);Ls("scrollbar",mCt);Et("tooltip",kW);Et("sibling-tooltip",wCt);Et("ellipsis-text",CCt);Et("element-active",SCt);Et("element-single-active",MCt);Et("element-range-active",TCt);Et("element-highlight",QF);Et("element-highlight-by-x",OCt);Et("element-highlight-by-color",ECt);Et("element-single-highlight",FCt);Et("element-range-highlight",BW);Et("element-sibling-highlight",BW,{effectSiblings:!0,effectByRecord:!0});Et("element-selected",ICt);Et("element-single-selected",LCt);Et("element-range-selected",PCt);Et("element-link-by-color",ACt);Et("active-region",bCt);Et("list-active",DCt);Et("list-selected",kCt);Et("list-highlight",KF);Et("list-unchecked",RCt);Et("list-checked",BCt);Et("legend-item-highlight",KF,{componentNames:["legend"]});Et("axis-label-highlight",KF,{componentNames:["axis"]});Et("rect-mask",NW);Et("x-rect-mask",GW,{dim:"x"});Et("y-rect-mask",GW,{dim:"y"});Et("circle-mask",NCt);Et("path-mask",zW);Et("smooth-path-mask",GCt);Et("cursor",zCt);Et("data-filter",VCt);Et("brush",E_);Et("brush-x",E_,{dims:["x"]});Et("brush-y",E_,{dims:["y"]});Et("sibling-filter",tP);Et("sibling-x-filter",tP);Et("sibling-y-filter",tP);Et("element-filter",jCt);Et("element-sibling-filter",VW);Et("element-sibling-filter-record",VW,{byRecord:!0});Et("view-drag",UCt);Et("view-move",ZCt);Et("scale-translate",QCt);Et("scale-zoom",KCt);Et("reset-button",WCt,{name:"reset-button",text:"reset"});Et("mousewheel-scroll",eSt);function rs(e){return e.isInPlot()}Lt("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"}]});Lt("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:touchend",action:"ellipsis-text:hide"}]});Lt("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]});Lt("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]});Lt("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]});Lt("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]});Lt("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]});Lt("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"]}]});Lt("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"]}]});Lt("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"]}]});Lt("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"]}]});Lt("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(e){return!e.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(e){return!e.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]});Lt("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:rs,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:rs,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:rs,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"]}]});Lt("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"]}]});Lt("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:rs,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:rs,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:rs,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]});Lt("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:rs,action:"path-mask:start"},{trigger:"mousedown",isEnable:rs,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"}]});Lt("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]});Lt("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","data-filter:filter"]}]});Lt("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]});Lt("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]});Lt("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","element-filter:filter"]}]});Lt("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]});function qB(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}Lt("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return qB(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!qB(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]});Lt("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]});Lt("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var rSt=Object.freeze(Object.defineProperty({__proto__:null,get BRUSH_FILTER_EVENTS(){return _i},get ELEMENT_RANGE_HIGHLIGHT_EVENTS(){return da},get VIEW_LIFE_CIRCLE(){return Gt},Chart:fW,View:FF,Event:$e,ComponentController:dc,TooltipController:PF,Geometry:fl,Element:DF,GeometryLabel:pg,Interaction:iW,Action:Ie,Facet:hc,InteractionAction:Ie,registerComponentController:Ls,registerGeometry:ka,registerShape:Jt,registerShapeFactory:cl,getShapeFactory:AT,registerGeometryLabel:kh,registerGeometryLabelLayout:Ii,getGeometryLabel:gW,getGeometryLabelLayout:yW,getInteraction:aW,registerInteraction:Lt,registerAction:Et,getActionClass:hg,getFacet:XY,registerFacet:vc,getTheme:es,registerTheme:sW,registerEngine:bF,getEngine:NY,registerAnimation:Qi,getAnimation:IF,get LAYER(){return Ye},get DIRECTION(){return ct},Coordinate:Pp,Scale:Sh,VERSION:xbt,Util:Oi},Symbol.toStringTag,{value:"Module"})),me=_r(rSt),is={},rh={},HW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=1,t=function(){return"".concat(r++)};e.default=t})(HW);var O_={},F_={},eP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var o=this,l=arguments.length,s=new Array(l),u=0;u
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},e.DEFAULT_OPTIONS={appendPadding:2,tooltip:r.__assign({},e.DEFAULT_TOOLTIP_OPTIONS),animation:{}}})(Bh);var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.adaptor=Cs.meta=void 0;var rf=Qe,Td=mt,ES=Pr,bu=Bh,i4=hl,KAt=fo;function JAt(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.areaStyle,o=t.point,l=t.line,s=o==null?void 0:o.state,u=i4.getTinyData(i);r.data(u);var c=Td.deepAssign({},e,{options:{xField:bu.X_FIELD,yField:bu.Y_FIELD,area:{color:n,style:a},line:l,point:o}}),f=Td.deepAssign({},c,{options:{tooltip:!1}}),h=Td.deepAssign({},c,{options:{tooltip:!1,state:s}});return ES.area(c),ES.line(f),ES.point(h),r.axis(!1),r.legend(!1),e}function n4(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.data,l=i4.getTinyData(o);return Td.flow(rf.scale((r={},r[bu.X_FIELD]=n,r[bu.Y_FIELD]=a,r),(t={},t[bu.X_FIELD]={type:"cat"},t[bu.Y_FIELD]=KAt.adjustYMetaByZero(l,bu.Y_FIELD),t)))(e)}Cs.meta=n4;function tTt(e){return Td.flow(rf.pattern("areaStyle"),JAt,n4,rf.tooltip,rf.theme,rf.animation,rf.annotation())(e)}Cs.adaptor=tTt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.meta=void 0;var r=Qe,t=mt,i=Pr,n=Bh,a=hl,o=Cs;Object.defineProperty(e,"meta",{enumerable:!0,get:function(){return o.meta}});function l(u){var c=u.chart,f=u.options,h=f.data,v=f.color,d=f.columnStyle,p=f.columnWidthRatio,x=a.getTinyData(h);c.data(x);var m=t.deepAssign({},u,{options:{xField:n.X_FIELD,yField:n.Y_FIELD,widthRatio:p,interval:{style:d,color:v}}});return i.interval(m),c.axis(!1),c.legend(!1),c.interaction("element-active"),u}function s(u){return t.flow(r.theme,r.pattern("columnStyle"),l,o.meta,r.tooltip,r.animation,r.annotation())(u)}e.adaptor=s})(r4);var a4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.DEFAULT_TOOLTIP_OPTIONS=void 0;var r=j,t=Y;e.DEFAULT_TOOLTIP_OPTIONS={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(i,n){return""+t.get(n,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},e.DEFAULT_OPTIONS={appendPadding:2,tooltip:r.__assign({},e.DEFAULT_TOOLTIP_OPTIONS),animation:{}}})(a4);Object.defineProperty(nP,"__esModule",{value:!0});var o4=nP.TinyColumn=void 0,eTt=j,rTt=ae,iTt=hl,iN=r4,nTt=a4,aTt=function(e){eTt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return r.getDefaultOptions=function(){return nTt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;iN.meta({chart:n,options:a}),n.changeData(iTt.getTinyData(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return iN.adaptor},r}(rTt.Plot);o4=nP.TinyColumn=aTt;var oTt=function(e){var r=He(e);if(!K(r.yField)){var t=r.data.map(function(i){return i[r.yField]}).filter(function(i){return!K(i)});t&&t.length&&ve(r,"data",t)}return ve(r,"tooltip",!1),r},lTt=Zt(o4,"TinyColumnChart",oTt),aP={},z_={};Object.defineProperty(z_,"__esModule",{value:!0});z_.DEFAULT_OPTIONS=void 0;var sTt=j,uTt=Bh;z_.DEFAULT_OPTIONS={appendPadding:2,tooltip:sTt.__assign({},uTt.DEFAULT_TOOLTIP_OPTIONS),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}};Object.defineProperty(aP,"__esModule",{value:!0});var l4=aP.TinyArea=void 0,cTt=j,fTt=ae,hTt=hl,nN=Cs,vTt=z_,dTt=function(e){cTt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return r.getDefaultOptions=function(){return vTt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;nN.meta({chart:n,options:a}),n.changeData(hTt.getTinyData(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return nN.adaptor},r}(fTt.Plot);l4=aP.TinyArea=dTt;var kT=globalThis&&globalThis.__assign||function(){return kT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t1?(this.historyCache=c,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},u.prototype.getButtonCfg=function(){var c=this.context.view,f=i.get(c,["interactions","drill-down","cfg","drillDownConfig"]);return n.deepAssign(this.breadCrumbCfg,f==null?void 0:f.breadCrumb,this.cfg)},u.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},u.prototype.drawBreadCrumbGroup=function(){var c=this,f=this.getButtonCfg(),h=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:e.BREAD_CRUMB_NAME});var v=0;h.forEach(function(d,p){var x=c.breadCrumbGroup.addShape({type:"text",id:d.id,name:e.BREAD_CRUMB_NAME+"_"+d.name+"_text",attrs:r.__assign(r.__assign({text:p===0&&!i.isNil(f.rootText)?f.rootText:d.name},f.textStyle),{x:v,y:0})}),m=x.getBBox();if(v+=m.width+a,x.on("click",function(w){var S,M=w.target.get("id");if(M!==((S=i.last(h))===null||S===void 0?void 0:S.id)){var O=h.slice(0,h.findIndex(function(F){return F.id===M})+1);c.backTo(O)}}),x.on("mouseenter",function(w){var S,M=w.target.get("id");M!==((S=i.last(h))===null||S===void 0?void 0:S.id)?x.attr(f.activeTextStyle):x.attr({cursor:"default"})}),x.on("mouseleave",function(){x.attr(f.textStyle)}),p=0;)r+=t[i].value;e.value=r}function ZTt(){return this.eachAfter(qTt)}function QTt(e,r){let t=-1;for(const i of this)e.call(r,i,++t,this);return this}function KTt(e,r){for(var t=this,i=[t],n,a,o=-1;t=i.pop();)if(e.call(r,t,++o,this),n=t.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function JTt(e,r){for(var t=this,i=[t],n=[],a,o,l,s=-1;t=i.pop();)if(n.push(t),a=t.children)for(o=0,l=a.length;o=0;)t+=i[n].value;r.value=t})}function rMt(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})}function iMt(e){for(var r=this,t=nMt(r,e),i=[r];r!==t;)r=r.parent,i.push(r);for(var n=i.length;e!==t;)i.splice(n,0,e),e=e.parent;return i}function nMt(e,r){if(e===r)return e;var t=e.ancestors(),i=r.ancestors(),n=null;for(e=t.pop(),r=i.pop();e===r;)n=e,e=t.pop(),r=i.pop();return n}function aMt(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r}function oMt(){return Array.from(this)}function lMt(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e}function sMt(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}function*uMt(){var e=this,r,t=[e],i,n,a;do for(r=t.reverse(),t=[];e=r.pop();)if(yield e,i=e.children)for(n=0,a=i.length;n=0;--l)n.push(a=o[l]=new oh(o[l])),a.parent=i,a.depth=i.depth+1;return t.eachBefore(m4)}function cMt(){return Nh(this).eachBefore(vMt)}function fMt(e){return e.children}function hMt(e){return Array.isArray(e)?e[1]:null}function vMt(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function m4(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function oh(e){this.data=e,this.depth=this.height=0,this.parent=null}oh.prototype=Nh.prototype={constructor:oh,count:ZTt,each:QTt,eachAfter:JTt,eachBefore:KTt,find:tMt,sum:eMt,sort:rMt,path:iMt,ancestors:aMt,descendants:oMt,leaves:lMt,links:sMt,copy:cMt,[Symbol.iterator]:uMt};function dMt(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function pMt(e){for(var r=e.length,t,i;r;)i=Math.random()*r--|0,t=e[r],e[r]=e[i],e[i]=t;return e}function x4(e){for(var r=0,t=(e=pMt(Array.from(e))).length,i=[],n,a;r0&&t*t>i*i+n*n}function FS(e,r){for(var t=0;ts?(n=(u+s-a)/(2*u),l=Math.sqrt(Math.max(0,s/u-n*n)),t.x=e.x-n*i-l*o,t.y=e.y-n*o+l*i):(n=(u+a-s)/(2*u),l=Math.sqrt(Math.max(0,a/u-n*n)),t.x=r.x+n*i-l*o,t.y=r.y+n*o+l*i)):(t.x=r.x+t.r,t.y=r.y)}function sN(e,r){var t=e.r+r.r-1e-6,i=r.x-e.x,n=r.y-e.y;return t>0&&t*t>i*i+n*n}function uN(e){var r=e._,t=e.next._,i=r.r+t.r,n=(r.x*t.r+t.x*r.r)/i,a=(r.y*t.r+t.y*r.r)/i;return n*n+a*a}function u0(e){this._=e,this.next=null,this.previous=null}function w4(e){if(!(n=(e=dMt(e)).length))return 0;var r,t,i,n,a,o,l,s,u,c,f;if(r=e[0],r.x=0,r.y=0,!(n>1))return r.r;if(t=e[1],r.x=-t.r,t.x=r.r,t.y=0,!(n>2))return r.r+t.r;lN(t,r,i=e[2]),r=new u0(r),t=new u0(t),i=new u0(i),r.next=i.previous=t,t.next=r.previous=i,i.next=t.previous=r;t:for(l=3;l0)throw new Error("cycle");return s}return t.id=function(i){return arguments.length?(e=Ax(i),t):e},t.parentId=function(i){return arguments.length?(r=Ax(i),t):r},t}function TMt(e,r){return e.parent===r.parent?1:2}function IS(e){var r=e.children;return r?r[0]:e.t}function LS(e){var r=e.children;return r?r[r.length-1]:e.t}function MMt(e,r,t){var i=t/(r.i-e.i);r.c-=i,r.s+=t,e.c+=i,r.z+=t,r.m+=t}function EMt(e){for(var r=0,t=0,i=e.children,n=i.length,a;--n>=0;)a=i[n],a.z+=r,a.m+=r,r+=a.s+(t+=a.c)}function OMt(e,r,t){return e.a.parent===r.parent?e.a:t}function E0(e,r){this._=e,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=r}E0.prototype=Object.create(oh.prototype);function FMt(e){for(var r=new E0(e,0),t,i=[r],n,a,o,l;t=i.pop();)if(a=t._.children)for(t.children=new Array(l=a.length),o=l-1;o>=0;--o)i.push(n=t.children[o]=new E0(a[o],o)),n.parent=t;return(r.parent=new E0(null,0)).children=[r],r}function PMt(){var e=TMt,r=1,t=1,i=null;function n(u){var c=FMt(u);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),i)u.eachBefore(s);else{var f=u,h=u,v=u;u.eachBefore(function(_){_.xh.x&&(h=_),_.depth>v.depth&&(v=_)});var d=f===h?1:e(f,h)/2,p=d-f.x,x=r/(h.x+d+p),m=t/(v.depth||1);u.eachBefore(function(_){_.x=(_.x+p)*x,_.y=_.depth*m})}return u}function a(u){var c=u.children,f=u.parent.children,h=u.i?f[u.i-1]:null;if(c){EMt(u);var v=(c[0].z+c[c.length-1].z)/2;h?(u.z=h.z+e(u._,h._),u.m=u.z-v):u.z=v}else h&&(u.z=h.z+e(u._,h._));u.parent.A=l(u,h,u.parent.A||f[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function l(u,c,f){if(c){for(var h=u,v=u,d=c,p=h.parent.children[0],x=h.m,m=v.m,_=d.m,b=p.m,w;d=LS(d),h=IS(h),d&&h;)p=IS(p),v=LS(v),v.a=u,w=d.z+_-h.z-x+e(d._,h._),w>0&&(MMt(OMt(d,u,f),u,w),x+=w,m+=w),_+=d.m,x+=h.m,b+=p.m,m+=v.m;d&&!LS(v)&&(v.t=d,v.m+=_-m),h&&!IS(p)&&(p.t=h,p.m+=x-b,f=u)}return f}function s(u){u.x*=r,u.y=u.depth*t}return n.separation=function(u){return arguments.length?(e=u,n):e},n.size=function(u){return arguments.length?(i=!1,r=+u[0],t=+u[1],n):i?null:[r,t]},n.nodeSize=function(u){return arguments.length?(i=!0,r=+u[0],t=+u[1],n):i?[r,t]:null},n}function H_(e,r,t,i,n){for(var a=e.children,o,l=-1,s=a.length,u=e.value&&(n-t)/e.value;++l_&&(_=u),M=x*x*S,b=Math.max(_/M,M/m),b>w){x-=u;break}w=b}o.push(s={value:x,dice:v1?i:1)},t}(T4);function O4(){var e=E4,r=!1,t=1,i=1,n=[0],a=wu,o=wu,l=wu,s=wu,u=wu;function c(h){return h.x0=h.y0=0,h.x1=t,h.y1=i,h.eachBefore(f),n=[0],r&&h.eachBefore(S4),h}function f(h){var v=n[h.depth],d=h.x0+v,p=h.y0+v,x=h.x1-v,m=h.y1-v;x=h-1){var _=a[f];_.x0=d,_.y0=p,_.x1=x,_.y1=m;return}for(var b=u[f],w=v/2+b,S=f+1,M=h-1;S>>1;u[O]m-p){var D=v?(d*L+x*F)/v:x;c(f,S,F,d,p,D,m),c(S,h,L,D,p,x,m)}else{var R=v?(p*L+m*F)/v:m;c(f,S,F,d,p,x,R),c(S,h,L,d,R,x,m)}}}function LMt(e,r,t,i,n){(e.depth&1?H_:xg)(e,r,t,i,n)}var DMt=function e(r){function t(i,n,a,o,l){if((s=i._squarify)&&s.ratio===r)for(var s,u,c,f,h=-1,v,d=s.length,p=i.value;++h1?i:1)},t}(T4),RT=Object.freeze(Object.defineProperty({__proto__:null,cluster:UTt,hierarchy:Nh,pack:C4,packSiblings:xMt,packEnclose:x4,partition:A4,stratify:AMt,tree:PMt,treemap:O4,treemapBinary:IMt,treemapDice:xg,treemapSlice:H_,treemapSliceDice:LMt,treemapSquarify:E4,treemapResquarify:DMt},Symbol.toStringTag,{value:"Module"})),$Mt=_r(RT),F4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getAllNodes=e.getField=e.NODE_ANCESTORS_FIELD=e.CHILD_NODE_COUNT=e.NODE_INDEX_FIELD=void 0;var r=Y;e.NODE_INDEX_FIELD="nodeIndex",e.CHILD_NODE_COUNT="childNodeCount",e.NODE_ANCESTORS_FIELD="nodeAncestor";var t="Invalid field: it must be a string!";function i(a,o){var l=a.field,s=a.fields;if(r.isString(l))return l;if(r.isArray(l))return console.warn(t),l[0];if(console.warn(t+" will try to get fields instead."),r.isString(s))return s;if(r.isArray(s)&&s.length)return s[0];if(o)return o;throw new TypeError(t)}e.getField=i;function n(a){var o=[];if(a&&a.each){var l,s;a.each(function(u){var c,f;u.parent!==l?(l=u.parent,s=0):s+=1;var h=r.filter((((c=u.ancestors)===null||c===void 0?void 0:c.call(u))||[]).map(function(v){return o.find(function(d){return d.name===v.name})||v}),function(v){var d=v.depth;return d>0&&d0}hP.isParentNode=BT;function gN(e){var r=e.view.getCoordinate(),t=r.innerRadius;if(t){var i=e.event,n=i.x,a=i.y,o=r.center,l=o.x,s=o.y,u=r.getRadius()*t,c=Math.sqrt(Math.pow(l-n,2)+Math.pow(s-a,2));return cr)delete e.children;else{var i=e.children;i&&i.length&&i.forEach(function(n){R4(n,r,t+1)})}},lEt=function(e){var r=He(e),t=I(r,"maxLevel",2);if(!K(t)&&!(t<1)){var i=I(r,"data",{});R4(i,t),jt(r,"data",i),jt(r,"maxLevel",t)}return r},sEt=Zt(k4,"TreemapChart",lEt),uEt=Zt(sP,"StepLineChart",function(e){return e.stepType=e.stepType||e.step||"hv",y4(e)}),vP={},_n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.getDataWhetherPecentage=_n.getDeepPercent=_n.percent=void 0;var Mx=j,_f=Y,Ex=_s;function B4(e,r,t,i){var n=_f.reduce(e,function(a,o){var l=o[t],s=a.has(l)?a.get(l):0,u=o[r];return s=Ex.isRealNumber(u)?s+u:s,a.set(l,s),a},new Map);return _f.map(e,function(a){var o,l=a[r],s=a[t],u=Ex.isRealNumber(l)?l/n.get(s):0;return Mx.__assign(Mx.__assign({},a),(o={},o[i]=u,o))})}_n.percent=B4;function cEt(e,r,t,i){var n=_f.reduce(e,function(a,o){var l=_f.reduce(t,function(c,f){return""+c+o[f]},""),s=a.has(l)?a.get(l):0,u=o[r];return s=Ex.isRealNumber(u)?s+u:s,a.set(l,s),a},new Map);return _f.map(e,function(a){var o,l=a[r],s=_f.reduce(t,function(c,f){return""+c+a[f]},""),u=Ex.isRealNumber(l)?l/n.get(s):0;return Mx.__assign(Mx.__assign({},a),(o={},o[i]=u,o))})}_n.getDeepPercent=cEt;function fEt(e,r,t,i,n){return n?B4(e,r,t,i):e}_n.getDataWhetherPecentage=fEt;var N4={},Aa={},X_={},_g={};Object.defineProperty(_g,"__esModule",{value:!0});_g.conversionTagFormatter=void 0;var yN=Y;function hEt(e,r){return!yN.isNumber(e)||!yN.isNumber(r)?"-":e===r?"100%":e===0?"\u221E":r===0?"-\u221E":(100*r/e).toFixed(2)+"%"}_g.conversionTagFormatter=hEt;Object.defineProperty(X_,"__esModule",{value:!0});X_.conversionTag=void 0;var Ox=j,O0=Y,vEt=me,G4=mt,dEt=_g;function pEt(e,r){return G4.deepAssign({size:r?32:80,spacing:r?8:12,offset:r?32:0,arrow:e.arrow!==!1&&{headSize:12,style:{fill:"rgba(0, 0, 0, 0.05)"}},text:e.text!==!1&&{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.85)",textAlign:"center",textBaseline:"middle"},formatter:dEt.conversionTagFormatter}},e)}function Fx(e,r){return O0.map(r.getModel().points,function(t){return e.convertPoint(t)})}function gEt(e,r,t){var i=e.view,n=e.geometry,a=e.group,o=e.options,l=e.horizontal,s=o.offset,u=o.size,c=o.arrow,f=i.getCoordinate(),h=Fx(f,r)[l?3:0],v=Fx(f,t)[l?0:3],d=v.y-h.y,p=v.x-h.x;if(typeof c!="boolean"){var x=c.headSize,m=o.spacing,_;l?(p-x)/2b){var S=w/p.length,M=Math.max(1,Math.ceil(b/S)-1),O=p.slice(0,M)+"...";_.attr("text",O)}}}}function mEt(e,r,t){gEt(e,r,t),yEt(e,r,t)}function xEt(e,r,t){return r===void 0&&(r=!0),t===void 0&&(t=!1),function(i){var n=i.options,a=i.chart,o=n.conversionTag,l=n.theme;return o&&!t&&(a.theme(G4.deepAssign({},O0.isObject(l)?l:vEt.getTheme(l),{columnWidthRatio:1/3})),a.annotation().shape({render:function(s,u){var c=s.addGroup({id:a.id+"-conversion-tag-group",name:"conversion-tag-group"}),f=O0.find(a.geometries,function(d){return d.type==="interval"}),h={view:u,geometry:f,group:c,field:e,horizontal:r,options:pEt(o,r)},v=r?f.elements:f.elements.slice().reverse();O0.each(v,function(d,p){p>0&&mEt(h,v[p-1],d)})}})),i}}X_.conversionTag=xEt;var U_={};Object.defineProperty(U_,"__esModule",{value:!0});U_.connectedArea=void 0;var z4=me,zu={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},dP=function(e,r){return e==="hover"?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:r}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:r}]}]};z4.registerInteraction(zu.hover,{start:dP(zu.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]});z4.registerInteraction(zu.click,{start:dP(zu.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function _Et(e){return e===void 0&&(e=!1),function(r){var t=r.chart,i=r.options,n=i.connectedArea,a=function(){t.removeInteraction(zu.hover),t.removeInteraction(zu.click)};if(!e&&n){var o=n.trigger||"hover";a(),t.interaction(zu[o],{start:dP(o,n.style)})}else a();return r}}U_.connectedArea=_Et;var bg={},q_={},V4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonAction=e.BUTTON_ACTION_CONFIG=void 0;var r=j,t=me,i=Y,n=mt,a=10,o=5;e.BUTTON_ACTION_CONFIG={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}};var l=function(s){r.__extends(u,s);function u(){var c=s!==null&&s.apply(this,arguments)||this;return c.buttonGroup=null,c.buttonCfg=r.__assign({name:"button"},e.BUTTON_ACTION_CONFIG),c}return u.prototype.getButtonCfg=function(){var c=this.context.view,f=i.get(c,["interactions","filter-action","cfg","buttonConfig"]);return n.deepAssign(this.buttonCfg,f,this.cfg)},u.prototype.drawButton=function(){var c=this.getButtonCfg(),f=this.context.view.foregroundGroup.addGroup({name:c.name}),h=this.drawText(f);this.drawBackground(f,h.getBBox()),this.buttonGroup=f},u.prototype.drawText=function(c){var f,h=this.getButtonCfg();return c.addShape({type:"text",name:"button-text",attrs:r.__assign({text:h.text},(f=h.textStyle)===null||f===void 0?void 0:f.default)})},u.prototype.drawBackground=function(c,f){var h,v=this.getButtonCfg(),d=n.normalPadding(v.padding),p=c.addShape({type:"rect",name:"button-rect",attrs:r.__assign({x:f.x-d[3],y:f.y-d[0],width:f.width+d[1]+d[3],height:f.height+d[0]+d[2]},(h=v.buttonStyle)===null||h===void 0?void 0:h.default)});return p.toBack(),c.on("mouseenter",function(){var x;p.attr((x=v.buttonStyle)===null||x===void 0?void 0:x.active)}),c.on("mouseleave",function(){var x;p.attr((x=v.buttonStyle)===null||x===void 0?void 0:x.default)}),p},u.prototype.resetPosition=function(){var c=this.context.view,f=c.getCoordinate(),h=f.convert({x:1,y:1}),v=this.buttonGroup,d=v.getBBox(),p=t.Util.transform(null,[["t",h.x-d.width-a,h.y+d.height+o]]);v.setMatrix(p)},u.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},u.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},u.prototype.destroy=function(){var c=this.buttonGroup;c&&c.remove(),s.prototype.destroy.call(this)},u}(t.Action);e.ButtonAction=l})(V4);Object.defineProperty(q_,"__esModule",{value:!0});q_.getInteractionCfg=void 0;var $s=me,bEt=V4;$s.registerAction("brush-reset-button",bEt.ButtonAction,{name:"brush-reset-button"});$s.registerInteraction("filter-action",{});function ko(e){return e.isInPlot()}function pc(e,r,t){var i=r||"rect";switch(e){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ko,action:["brush:start",i+"-mask:start",i+"-mask:show"],arg:[null,{maskStyle:t==null?void 0:t.style}]}],processing:[{trigger:"mousemove",isEnable:ko,action:[i+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ko,action:["brush:filter","brush:end",i+"-mask:end",i+"-mask:hide","brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{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(n){return!n.isInShape("mask")},action:[i+"-mask:start",i+"-mask:show"],arg:[{maskStyle:t==null?void 0:t.style}]},{trigger:"mask:dragstart",action:[i+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[i+"-mask:resize"]},{trigger:"mask:drag",action:[i+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[i+"-mask:end"]},{trigger:"mask:dragend",action:[i+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(n){return!n.isInPlot()},action:["element-range-highlight:clear",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",i+"-mask:hide"]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ko,action:["brush-x:start",i+"-mask:start",i+"-mask:show"],arg:[null,{maskStyle:t==null?void 0:t.style}]}],processing:[{trigger:"mousemove",isEnable:ko,action:[i+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ko,action:["brush-x:filter","brush-x:end",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{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(n){return!n.isInShape("mask")},action:[i+"-mask:start",i+"-mask:show"],arg:[{maskStyle:t==null?void 0:t.style}]},{trigger:"mask:dragstart",action:[i+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[i+"-mask:resize"]},{trigger:"mask:drag",action:[i+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[i+"-mask:end"]},{trigger:"mask:dragend",action:[i+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(n){return!n.isInPlot()},action:["element-range-highlight:clear",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",i+"-mask:hide"]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ko,action:["brush-y:start",i+"-mask:start",i+"-mask:show"],arg:[null,{maskStyle:t==null?void 0:t.style}]}],processing:[{trigger:"mousemove",isEnable:ko,action:[i+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ko,action:["brush-y:filter","brush-y:end",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{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(n){return!n.isInShape("mask")},action:[i+"-mask:start",i+"-mask:show"],arg:[{maskStyle:t==null?void 0:t.style}]},{trigger:"mask:dragstart",action:[i+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[i+"-mask:resize"]},{trigger:"mask:drag",action:[i+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[i+"-mask:end"]},{trigger:"mask:dragend",action:[i+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(n){return!n.isInPlot()},action:["element-range-highlight:clear",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",i+"-mask:hide"]}]};default:return{}}}q_.getInteractionCfg=pc;$s.registerInteraction("brush",pc("brush"));$s.registerInteraction("brush-highlight",pc("brush-highlight"));$s.registerInteraction("brush-x",pc("brush-x","x-rect"));$s.registerInteraction("brush-y",pc("brush-y","y-rect"));$s.registerInteraction("brush-x-highlight",pc("brush-x-highlight","x-rect"));$s.registerInteraction("brush-y-highlight",pc("brush-y-highlight","y-rect"));Object.defineProperty(bg,"__esModule",{value:!0});bg.brushInteraction=void 0;var wEt=Y,CEt=q_,SEt=mt,mN=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function AEt(e){var r=e.options,t=r.brush,i=wEt.filter(r.interactions||[],function(n){return mN.indexOf(n.type)===-1});return t!=null&&t.enabled&&(mN.forEach(function(n){var a,o=!1;switch(t.type){case"x-rect":o=n===(t.action==="highlight"?"brush-x-highlight":"brush-x");break;case"y-rect":o=n===(t.action==="highlight"?"brush-y-highlight":"brush-y");break;default:o=n===(t.action==="highlight"?"brush-highlight":"brush");break}var l={type:n,enable:o};(((a=t.mask)===null||a===void 0?void 0:a.style)||t.type)&&(l.cfg=CEt.getInteractionCfg(n,t.type,t.mask)),i.push(l)}),(t==null?void 0:t.action)!=="highlight"&&i.push({type:"filter-action",cfg:{buttonConfig:t.button}})),SEt.deepAssign({},e,{options:{interactions:i}})}bg.brushInteraction=AEt;Object.defineProperty(Aa,"__esModule",{value:!0});Aa.adaptor=Aa.legend=Aa.meta=void 0;var gn=j,kS=Y,No=Qe,TEt=X_,MEt=U_,EEt=Pr,OEt=Ds,FEt=bg,ec=mt,xN=_n;function PEt(e){var r=e.options,t=r.legend,i=r.seriesField,n=r.isStack;return i?t!==!1&&(t=gn.__assign({position:n?"right-top":"top-left"},t)):t=!1,e.options.legend=t,e}function IEt(e){var r=e.chart,t=e.options,i=t.data,n=t.columnStyle,a=t.color,o=t.columnWidthRatio,l=t.isPercent,s=t.isGroup,u=t.isStack,c=t.xField,f=t.yField,h=t.seriesField,v=t.groupField,d=t.tooltip,p=t.shape,x=l&&s&&u?xN.getDeepPercent(i,f,[c,v],f):xN.getDataWhetherPecentage(i,f,c,f,l),m=[];u&&h&&!s?x.forEach(function(w){var S=m.find(function(M){return M[c]===w[c]&&M[h]===w[h]});S?S[f]+=w[f]||0:m.push(gn.__assign({},w))}):m=x,r.data(m);var _=l?gn.__assign({formatter:function(w){return{name:s&&u?w[h]+" - "+w[v]:w[h]||w[c],value:(Number(w[f])*100).toFixed(2)+"%"}}},d):d,b=ec.deepAssign({},e,{options:{data:m,widthRatio:o,tooltip:_,interval:{shape:p,style:n,color:a}}});return EEt.interval(b),b}function j4(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,l=i.yField,s=i.data,u=i.isPercent,c=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return ec.flow(No.scale((r={},r[o]=n,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=gn.__assign(gn.__assign({},ec.adjustYMetaByZero(s,l)),c),t)))(e)}Aa.meta=j4;function LEt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function H4(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i&&n?r.legend(n,i):i===!1&&r.legend(!1),e}Aa.legend=H4;function DEt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=t.isRange,o=ec.findGeometry(r,"interval");if(!i)o.label(!1);else{var l=i.callback,s=gn.__rest(i,["callback"]);o.label({fields:[n],callback:l,cfg:gn.__assign({layout:s!=null&&s.position?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},ec.transformLabel(a?gn.__assign({content:function(u){var c;return(c=u[n])===null||c===void 0?void 0:c.join("-")}},s):s))})}return e}function $Et(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.isGroup,a=t.isStack,o=t.groupField,l=t.data,s=t.xField,u=t.yField,c=t.seriesField;if(i===!1)r.tooltip(!1);else{var f=i;if(n&&a){var h=(f==null?void 0:f.formatter)||function(v){return{name:v[c]+" - "+v[o],value:v[u]}};f=gn.__assign(gn.__assign({},f),{customItems:function(v){var d=[];return kS.each(v,function(p){var x=kS.filter(l,function(m){return kS.isMatch(m,ec.pick(p.data,[s,c]))});x.forEach(function(m){d.push(gn.__assign(gn.__assign(gn.__assign({},p),{value:m[u],data:m,mappingData:{_origin:m}}),h(m)))})}),d}})}r.tooltip(f)}return e}function kEt(e,r){r===void 0&&(r=!1);var t=e.options,i=t.seriesField;return ec.flow(PEt,No.theme,OEt.pattern("columnStyle"),No.state,IEt,j4,LEt,H4,$Et,No.slider,No.scrollbar,DEt,FEt.brushInteraction,No.interaction,No.animation,No.annotation(),TEt.conversionTag(t.yField,!r,!!i),MEt.connectedArea(!t.isStack),No.limitInPlot)(e)}Aa.adaptor=kEt;var wg={};Object.defineProperty(wg,"__esModule",{value:!0});wg.transformBarData=void 0;function REt(e){return e&&e.slice().reverse()}wg.transformBarData=REt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=void 0;var r=j,t=Aa,i=wg,n=Aa;Object.defineProperty(e,"meta",{enumerable:!0,get:function(){return n.meta}});function a(o){var l=o.chart,s=o.options,u=s.xField,c=s.yField,f=s.xAxis,h=s.yAxis,v=s.barStyle,d=s.barWidthRatio,p=s.label,x=s.data,m=s.seriesField,_=s.isStack,b=s.minBarWidth,w=s.maxBarWidth;p&&!p.position&&(p.position="left",p.layout||(p.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]));var S=s.legend;m?S!==!1&&(S=r.__assign({position:_?"top-left":"right-top",reversed:!_},S||{})):S=!1,o.options.legend=S;var M=s.tooltip;return m&&M!==!1&&(M=r.__assign({reversed:!_},M||{})),o.options.tooltip=M,l.coordinate().transpose(),t.adaptor({chart:l,options:r.__assign(r.__assign({},s),{label:p,xField:c,yField:u,xAxis:h,yAxis:f,columnStyle:v,columnWidthRatio:d,minColumnWidth:b,maxColumnWidth:w,columnBackground:s.barBackground,data:i.transformBarData(x)})},!0)}e.adaptor=a})(N4);var Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.DEFAULT_OPTIONS=void 0;var BEt=ae,NEt=mt;Z_.DEFAULT_OPTIONS=NEt.deepAssign({},BEt.Plot.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},interactions:[{type:"active-region"}]});Object.defineProperty(vP,"__esModule",{value:!0});var Gh=vP.Bar=void 0,RS=j,GEt=ae,zEt=_n,_N=N4,VEt=Z_,jEt=wg,HEt=function(e){RS.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bar",t}return r.getDefaultOptions=function(){return VEt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options,o=a.xField,l=a.yField,s=a.isPercent,u=RS.__assign(RS.__assign({},a),{xField:l,yField:o});_N.meta({chart:n,options:u}),n.changeData(zEt.getDataWhetherPecentage(jEt.transformBarData(t),o,l,o,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return _N.adaptor},r}(GEt.Plot);Gh=vP.Bar=HEt;var YEt=globalThis&&globalThis.__rest||function(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n0?t:r:r<0?r:t;case"outer":return t=12,Px.isString(r)&&r.endsWith("%")?parseFloat(r)*.01<0?t:r:r>0?r:t;default:return r}}Jo.adaptOffset=EOt;function OOt(e,r){return Px.every(TOt.processIllegalData(e,r),function(t){return t[r]===0})}Jo.isAllZero=OOt;var W4={},rb={},Sg={};Object.defineProperty(Sg,"__esModule",{value:!0});Sg.transform=void 0;var CN=j,FOt=me,POt=[1,0,0,0,1,0,0,0,1];function IOt(e,r){var t=r?CN.__spreadArrays(r):CN.__spreadArrays(POt);return FOt.Util.transform(t,e)}Sg.transform=IOt;Object.defineProperty(rb,"__esModule",{value:!0});rb.PieLegendAction=void 0;var LOt=j,BS=me,DOt=Y,SN=Sg,$Ot=function(e){LOt.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=BS.Util.getDelegationObject(this.context);if(t){var i=this.context.view,n=t.component,a=t.item,o=n.get("field");if(o){var l=i.geometries[0].elements;return l.filter(function(s){return s.getModel().data[o]===a.value})}}return[]},r.prototype.getActiveElementLabels=function(){var t=this.context.view,i=this.getActiveElements(),n=t.geometries[0].labelsContainer.getChildren();return n.filter(function(a){return i.find(function(o){return DOt.isEqual(o.getData(),a.get("data"))})})},r.prototype.transfrom=function(t){t===void 0&&(t=7.5);var i=this.getActiveElements(),n=this.getActiveElementLabels();i.forEach(function(a,o){var l=n[o],s=a.geometry.coordinate;if(s.isPolar&&s.isTransposed){var u=BS.Util.getAngle(a.getModel(),s),c=u.startAngle,f=u.endAngle,h=(c+f)/2,v=t,d=v*Math.cos(h),p=v*Math.sin(h);a.shape.setMatrix(SN.transform([["t",d,p]])),l.setMatrix(SN.transform([["t",d,p]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(BS.Action);rb.PieLegendAction=$Ot;var ib={},nb={};Object.defineProperty(nb,"__esModule",{value:!0});nb.getCurrentElement=void 0;function kOt(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}nb.getCurrentElement=kOt;Object.defineProperty(ib,"__esModule",{value:!0});ib.StatisticAction=void 0;var ROt=j,AN=me,Lv=Y,BOt=ba,NOt=nb,GOt=function(e){ROt.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAnnotations=function(t){var i=t||this.context.view;return i.getController("annotation").option},r.prototype.getInitialAnnotation=function(){return this.initialAnnotation},r.prototype.init=function(){var t=this,i=this.context.view;i.removeInteraction("tooltip"),i.on("afterchangesize",function(){var n=t.getAnnotations(i);t.initialAnnotation=n})},r.prototype.change=function(t){var i=this.context,n=i.view,a=i.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=Lv.get(a,["data","data"]);if(a.type.match("legend-item")){var l=AN.Util.getDelegationObject(this.context),s=n.getGroupedFields()[0];if(l&&s){var u=l.item;o=n.getData().find(function(v){return v[s]===u.value})}}if(o){var c=Lv.get(t,"annotations",[]),f=Lv.get(t,"statistic",{});n.getController("annotation").clear(!0),Lv.each(c,function(v){typeof v=="object"&&n.annotation()[v.type](v)}),BOt.renderStatistic(n,{statistic:f,plotType:"pie"},o),n.render(!0)}var h=NOt.getCurrentElement(this.context);h&&h.shape.toFront()},r.prototype.reset=function(){var t=this.context.view,i=t.getController("annotation");i.clear(!0);var n=this.getInitialAnnotation();Lv.each(n,function(a){t.annotation()[a.type](a)}),t.render(!0)},r}(AN.Action);ib.StatisticAction=GOt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PIE_STATISTIC=void 0;var r=me,t=rb,i=ib;e.PIE_STATISTIC="pie-statistic",r.registerAction(e.PIE_STATISTIC,i.StatisticAction),r.registerInteraction("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),r.registerAction("pie-legend",t.PieLegendAction),r.registerInteraction("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]})})(W4);Object.defineProperty(oo,"__esModule",{value:!0});oo.adaptor=oo.interaction=oo.pieAnnotation=oo.transformStatisticOptions=void 0;var jo=j,Si=Y,ed=Qe,zOt=xr,TN=Pr,VOt=Ds,jOt=xs,Ti=mt,HOt=Cg,ab=Jo,YOt=W4;function WOt(e){var r=e.chart,t=e.options,i=t.data,n=t.angleField,a=t.colorField,o=t.color,l=t.pieStyle,s=Ti.processIllegalData(i,n);if(ab.isAllZero(s,n)){var u="$$percentage$$";s=s.map(function(f){var h;return jo.__assign(jo.__assign({},f),(h={},h[u]=1/s.length,h))}),r.data(s);var c=Ti.deepAssign({},e,{options:{xField:"1",yField:u,seriesField:a,isStack:!0,interval:{color:o,style:l},args:{zIndexReversed:!0}}});TN.interval(c)}else{r.data(s);var c=Ti.deepAssign({},e,{options:{xField:"1",yField:n,seriesField:a,isStack:!0,interval:{color:o,style:l},args:{zIndexReversed:!0}}});TN.interval(c)}return e}function XOt(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.colorField,o=Ti.deepAssign({},n);return t.scale(o,(r={},r[a]={type:"cat"},r)),e}function UOt(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"theta",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function qOt(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.angleField,o=r.geometries[0];if(!i)o.label(!1);else{var l=i.callback,s=jo.__rest(i,["callback"]),u=Ti.transformLabel(s);if(u.content){var c=u.content;u.content=function(d,p,x){var m=d[n],_=d[a],b=r.getScaleByField(a),w=b==null?void 0:b.scale(_);return Si.isFunction(c)?c(jo.__assign(jo.__assign({},d),{percent:w}),p,x):Si.isString(c)?Ti.template(c,{value:_,name:m,percentage:Si.isNumber(w)&&!Si.isNil(_)?(w*100).toFixed(2)+"%":null}):c}}var f={inner:"",outer:"pie-outer",spider:"pie-spider"},h=u.type?f[u.type]:"pie-outer",v=u.layout?Si.isArray(u.layout)?u.layout:[u.layout]:[];u.layout=(h?[{type:h}]:[]).concat(v),o.label({fields:n?[a,n]:[a],callback:l,cfg:jo.__assign(jo.__assign({},u),{offset:ab.adaptOffset(u.type,u.offset),type:"pie"})})}return e}function xP(e){var r=e.innerRadius,t=e.statistic,i=e.angleField,n=e.colorField,a=e.meta,o=e.locale,l=jOt.getLocale(o);if(r&&t){var s=Ti.deepAssign({},HOt.DEFAULT_OPTIONS.statistic,t),u=s.title,c=s.content;return u!==!1&&(u=Ti.deepAssign({},{formatter:function(f){return f?f[n]:Si.isNil(u.content)?l.get(["statistic","total"]):u.content}},u)),c!==!1&&(c=Ti.deepAssign({},{formatter:function(f,h){var v=f?f[i]:ab.getTotalValue(h,i),d=Si.get(a,[i,"formatter"])||function(p){return p};return f||Si.isNil(c.content)?d(v):c.content}},c)),Ti.deepAssign({},{statistic:{title:u,content:c}},e)}return e}oo.transformStatisticOptions=xP;function X4(e){var r=e.chart,t=e.options,i=xP(t),n=i.innerRadius,a=i.statistic;return r.getController("annotation").clear(!0),Ti.flow(ed.annotation())(e),n&&a&&Ti.renderStatistic(r,{statistic:a,plotType:"pie"}),e}oo.pieAnnotation=X4;function ZOt(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.colorField,a=t.angleField,o=t.data;if(i===!1)r.tooltip(i);else if(r.tooltip(Ti.deepAssign({},i,{shared:!1})),ab.isAllZero(o,a)){var l=Si.get(i,"fields"),s=Si.get(i,"formatter");Si.isEmpty(Si.get(i,"fields"))&&(l=[n,a],s=s||function(u){return{name:u[n],value:Si.toString(u[a])}}),r.geometries[0].tooltip(l.join("*"),zOt.getMappingFunction(l,s))}return e}function U4(e){var r=e.chart,t=e.options,i=xP(t),n=i.interactions,a=i.statistic,o=i.annotations;return Si.each(n,function(l){var s,u;if(l.enable===!1)r.removeInteraction(l.type);else if(l.type==="pie-statistic-active"){var c=[];!((s=l.cfg)===null||s===void 0)&&s.start||(c=[{trigger:"element:mouseenter",action:YOt.PIE_STATISTIC+":change",arg:{statistic:a,annotations:o}}]),Si.each((u=l.cfg)===null||u===void 0?void 0:u.start,function(f){c.push(jo.__assign(jo.__assign({},f),{arg:{statistic:a,annotations:o}}))}),r.interaction(l.type,Ti.deepAssign({},l.cfg,{start:c}))}else r.interaction(l.type,l.cfg||{})}),e}oo.interaction=U4;function QOt(e){return Ti.flow(VOt.pattern("pieStyle"),WOt,XOt,ed.theme,UOt,ed.legend,ZOt,qOt,ed.state,X4,U4,ed.animation)(e)}oo.adaptor=QOt;Object.defineProperty(mP,"__esModule",{value:!0});var _P=mP.Pie=void 0,KOt=j,Wc=me,JOt=ae,MN=mt,EN=oo,tFt=Cg,ON=Jo,eFt=function(e){KOt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pie",t}return r.getDefaultOptions=function(){return tFt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.chart.emit(Wc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,Wc.Event.fromData(this.chart,Wc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null));var i=this.options,n=this.options.angleField,a=MN.processIllegalData(i.data,n),o=MN.processIllegalData(t,n);ON.isAllZero(a,n)||ON.isAllZero(o,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),EN.pieAnnotation({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(Wc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,Wc.Event.fromData(this.chart,Wc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return EN.adaptor},r}(JOt.Plot);_P=mP.Pie=eFt;var rFt=Zt(_P,"PieChart",He),bP={},ob={};Object.defineProperty(ob,"__esModule",{value:!0});ob.adaptor=void 0;var iFt=j,nFt=Y,q4=mt,wP=mt,kl=Qe,aFt=xr,oFt=Li;function lFt(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.xField,o=t.yField,l=t.colorField,s=t.sizeField,u=t.sizeRatio,c=t.shape,f=t.color,h=t.tooltip,v=t.heatmapStyle;r.data(i);var d="polygon";n==="density"&&(d="heatmap");var p=oFt.getTooltipMapping(h,[a,o,l]),x=p.fields,m=p.formatter,_=1;return(u||u===0)&&(!c&&!s?console.warn("sizeRatio is not in effect: Must define shape or sizeField first"):u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):_=u),aFt.geometry(q4.deepAssign({},e,{options:{type:d,colorField:l,tooltipFields:x,shapeField:s||"",label:void 0,mapping:{tooltip:m,shape:c&&(s?function(b){var w=i.map(function(O){return O[s]}),S=Math.min.apply(Math,w),M=Math.max.apply(Math,w);return[c,(nFt.get(b,s)-S)/(M-S),_]}:function(){return[c,1,_]}),color:f||l&&r.getTheme().sequenceColors.join("-"),style:v}}})),e}function sFt(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return wP.flow(kl.scale((r={},r[a]=i,r[o]=n,r)))(e)}function uFt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function cFt(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.sizeField,o=t.sizeLegend,l=i!==!1;return n&&r.legend(n,l?i:!1),a&&r.legend(a,o===void 0?i:o),!l&&!o&&r.legend(!1),e}function fFt(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.type,o=q4.findGeometry(r,a==="density"?"heatmap":"polygon");if(!i)o.label(!1);else if(n){var l=i.callback,s=iFt.__rest(i,["callback"]);o.label({fields:[n],callback:l,cfg:wP.transformLabel(s)})}return e}function hFt(e){var r=e.chart,t=e.options,i=t.coordinate,n=t.reflect;return i&&r.coordinate({type:i.type||"rect",cfg:i.cfg}),n&&r.coordinate().reflect(n),e}function vFt(e){return wP.flow(kl.theme,kl.pattern("heatmapStyle"),sFt,hFt,lFt,uFt,cFt,kl.tooltip,fFt,kl.annotation(),kl.interaction,kl.animation,kl.state)(e)}ob.adaptor=vFt;var lb={};Object.defineProperty(lb,"__esModule",{value:!0});lb.DEFAULT_OPTIONS=void 0;var dFt=ae,pFt=mt;lb.DEFAULT_OPTIONS=pFt.deepAssign({},dFt.Plot.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});var NS=j,gFt=me;gFt.registerShape("polygon","circle",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s)/2,c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),p=r.addShape("circle",{attrs:NS.__assign(NS.__assign(NS.__assign({x:n,y:a,r:v},e.defaultStyle),e.style),{fill:d})});return p}});var GS=j,yFt=me;yFt.registerShape("polygon","square",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s),c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),p=r.addShape("rect",{attrs:GS.__assign(GS.__assign(GS.__assign({x:n-v/2,y:a-v/2,width:v,height:v},e.defaultStyle),e.style),{fill:d})});return p}});Object.defineProperty(bP,"__esModule",{value:!0});var sb=bP.Heatmap=void 0,mFt=j,xFt=ae,_Ft=ob,bFt=lb,wFt=function(e){mFt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t}return r.getDefaultOptions=function(){return bFt.DEFAULT_OPTIONS},r.prototype.getSchemaAdaptor=function(){return _Ft.adaptor},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(xFt.Plot);sb=bP.Heatmap=wFt;var CFt=Zt(sb,"DensityHeatmapChartChart",function(e){var r=He(e);return $a([{sourceKey:"radius",targetKey:"sizeRatio",notice:"radius \u8BF7\u4F7F\u7528sizeRatio\u66FF\u4EE3"}],r),jt(r,"type","density"),r}),SFt=globalThis&&globalThis.__rest||function(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n>5,F0=1<<11;function EFt(e){return e.text}function OFt(){return"serif"}function FN(){return"normal"}function FFt(e){return e.value}function PFt(){return~~(Math.random()*2)*90}function IFt(){return 1}function LFt(e,r,t,i){if(!r.sprite){var n=e.context,a=e.ratio;n.clearRect(0,0,(rd<<5)/a,F0/a);var o=0,l=0,s=0,u=t.length;for(--i;++i>5<<5,f=~~Math.max(Math.abs(p+x),Math.abs(p-x))}else c=c+31>>5<<5;if(f>s&&(s=f),o+c>=rd<<5&&(o=0,l+=s,s=0),l+f>=F0)break;n.translate((o+(c>>1))/a,(l+(f>>1))/a),r.rotate&&n.rotate(r.rotate*zS),n.fillText(r.text,0,0),r.padding&&(n.lineWidth=2*r.padding,n.strokeText(r.text,0,0)),n.restore(),r.width=c,r.height=f,r.xoff=o,r.yoff=l,r.x1=c>>1,r.y1=f>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,o+=c}for(var _=n.getImageData(0,0,(rd<<5)/a,F0/a).data,b=[];--i>=0;)if(r=t[i],!!r.hasText){for(var c=r.width,w=c>>5,f=r.y1-r.y0,S=0;S>5),D=_[(l+F)*(rd<<5)+(o+S)<<2]?1<<31-S%32:0;b[L]|=D,M|=D}M?O=F:(r.y0++,f--,F--,l++)}r.y1=r.y0+O,r.sprite=b.slice(0,(r.y1-r.y0)*w)}}}function DFt(e,r,t){t>>=5;for(var i=e.sprite,n=e.width>>5,a=e.x-(n<<4),o=a&127,l=32-o,s=e.y1-e.y0,u=(e.y+e.y0)*t+(a>>5),c,f=0;f>>o:0))&r[u+h])return!0;u+=t}return!1}function $Ft(e,r){var t=e[0],i=e[1];r.x+r.x0i.x&&(i.x=r.x+r.x1),r.y+r.y1>i.y&&(i.y=r.y+r.y1)}function kFt(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0r[0].y&&e.y+e.y0>5)*e[1]),w=s.length,S=[],M=s.map(function(D,R,H){return D.text=c.call(this,D,R,H),D.font=r.call(this,D,R,H),D.style=f.call(this,D,R,H),D.weight=i.call(this,D,R,H),D.rotate=n.call(this,D,R,H),D.size=~~t.call(this,D,R,H),D.padding=a.call(this,D,R,H),D}).sort(function(D,R){return R.size-D.size}),O=-1,F=v.board?[{x:0,y:0},{x,y:m}]:null;L();function L(){for(var D=Date.now();Date.now()-D>1,R.y=m*(l()+.5)>>1,LFt(_,R,M,O),R.hasText&&p(b,R,F)&&(S.push(R),F?v.hasImage||$Ft(F,R):F=[{x:R.x+R.x0,y:R.y+R.y0},{x:R.x+R.x1,y:R.y+R.y1}],R.x-=e[0]>>1,R.y-=e[1]>>1)}v._tags=S,v._bounds=F}return v};function d(x){x.width=x.height=1;var m=Math.sqrt(x.getContext("2d").getImageData(0,0,1,1).data.length>>2);x.width=(rd<<5)/m,x.height=F0/m;var _=x.getContext("2d");return _.fillStyle=_.strokeStyle="red",_.textAlign="center",{context:_,ratio:m}}function p(x,m,_){for(var b=m.x,w=m.y,S=Math.sqrt(e[0]*e[0]+e[1]*e[1]),M=o(e),O=l()<.5?1:-1,F,L=-O,D,R;(F=M(L+=O))&&(D=~~F[0],R=~~F[1],!(Math.min(Math.abs(D),Math.abs(R))>=S));)if(m.x=b+D,m.y=w+R,!(m.x+m.x0<0||m.y+m.y0<0||m.x+m.x1>e[0]||m.y+m.y1>e[1])&&(!_||!DFt(m,x,e[0]))&&(!_||kFt(m,_))){for(var H=m.sprite,k=m.width>>5,V=e[0]>>5,U=m.x-(k<<4),B=U&127,G=32-B,N=m.y1-m.y0,W=void 0,q=(m.y+m.y0)*V+(U>>5),tt=0;tt>>B:0);q+=V}return delete m.sprite,!0}return!1}return v.createMask=function(x){var m=document.createElement("canvas"),_=e[0],b=e[1];if(!(!_||!b)){var w=_>>5,S=PN((_>>5)*b);m.width=_,m.height=b;var M=m.getContext("2d");M.drawImage(x,0,0,x.width,x.height,0,0,_,b);for(var O=M.getImageData(0,0,_,b).data,F=0;F>5),R=F*_+L<<2,H=O[R]>=250&&O[R+1]>=250&&O[R+2]>=250,k=H?1<<31-L%32:0;S[D]|=k}v.board=S,v.hasImage=!0}},v.timeInterval=function(x){u=x==null?1/0:x},v.words=function(x){s=x},v.size=function(x){e=[+x[0],+x[1]]},v.font=function(x){r=pu(x)},v.fontWeight=function(x){i=pu(x)},v.rotate=function(x){n=pu(x)},v.spiral=function(x){o=NFt[x]||x},v.fontSize=function(x){t=pu(x)},v.padding=function(x){a=pu(x)},v.random=function(x){l=pu(x)},v}Object.defineProperty(yn,"__esModule",{value:!0});yn.getSingleKeyValues=yn.getFontSizeMapping=yn.processImageMask=yn.getSize=yn.transform=void 0;var VS=j,ap=Y,IN=ho,Fu=mt,Dv=ns;function zFt(e){var r=e.options,t=e.chart,i=t,n=i.width,a=i.height,o=i.padding,l=i.appendPadding,s=i.ele,u=r.data,c=r.imageMask,f=r.wordField,h=r.weightField,v=r.colorField,d=r.wordStyle,p=r.timeInterval,x=r.random,m=r.spiral,_=r.autoFit,b=_===void 0?!0:_,w=r.placementStrategy;if(!u||!u.length)return[];var S=d.fontFamily,M=d.fontWeight,O=d.padding,F=d.fontSize,L=tX(u,h),D=[WFt(L),XFt(L)],R=u.map(function(V){return{text:V[f],value:V[h],color:V[v],datum:V}}),H={imageMask:c,font:S,fontSize:J4(F,D),fontWeight:M,size:K4({width:n,height:a,padding:o,appendPadding:l,autoFit:b,container:s}),padding:O,timeInterval:p,random:x,spiral:m,rotate:HFt(r)};if(ap.isFunction(w)){var k=R.map(function(V,U,B){return VS.__assign(VS.__assign(VS.__assign({},V),{hasText:!!V.text,font:Dv.functor(H.font)(V,U,B),weight:Dv.functor(H.fontWeight)(V,U,B),rotate:Dv.functor(H.rotate)(V,U,B),size:Dv.functor(H.fontSize)(V,U,B),style:"normal"}),w.call(t,V,U,B))});return k.push({text:"",value:0,x:0,y:0,opacity:0}),k.push({text:"",value:0,x:H.size[0],y:H.size[1],opacity:0}),k}return Dv.wordCloud(R,H)}yn.transform=zFt;function K4(e){var r=e.width,t=e.height,i=e.container,n=e.autoFit,a=e.padding,o=e.appendPadding;if(n){var l=Fu.getContainerSize(i);r=l.width,t=l.height}r=r||400,t=t||400;var s=VFt({padding:a,appendPadding:o}),u=s[0],c=s[1],f=s[2],h=s[3],v=[r-(h+c),t-(u+f)];return v}yn.getSize=K4;function VFt(e){var r=IN.normalPadding(e.padding),t=IN.normalPadding(e.appendPadding),i=r[0]+t[0],n=r[1]+t[1],a=r[2]+t[2],o=r[3]+t[3];return[i,n,a,o]}function jFt(e){return new Promise(function(r,t){if(e instanceof HTMLImageElement){r(e);return}if(ap.isString(e)){var i=new Image;i.crossOrigin="anonymous",i.src=e,i.onload=function(){r(i)},i.onerror=function(){Fu.log(Fu.LEVEL.ERROR,!1,"image %s load failed !!!",e),t()};return}Fu.log(Fu.LEVEL.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}yn.processImageMask=jFt;function J4(e,r){if(ap.isFunction(e))return e;if(ap.isArray(e)){var t=e[0],i=e[1];if(!r)return function(){return(i+t)/2};var n=r[0],a=r[1];return a===n?function(){return(i+t)/2}:function(l){var s=l.value;return(i-t)/(a-n)*(s-n)+t}}return function(){return e}}yn.getFontSizeMapping=J4;function tX(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}yn.getSingleKeyValues=tX;function HFt(e){var r=YFt(e),t=r.rotation,i=r.rotationSteps;if(!ap.isArray(t))return t;var n=t[0],a=t[1],o=i===1?0:(a-n)/(i-1);return function(){return a===n?a:Math.floor(Math.random()*i)*o}}function YFt(e){var r=e.wordStyle.rotationSteps;return r<1&&(Fu.log(Fu.LEVEL.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function WFt(e){return Math.min.apply(Math,e)}function XFt(e){return Math.max.apply(Math,e)}var AP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.WORD_CLOUD_COLOR_FIELD=void 0;var r=ae,t=mt;e.WORD_CLOUD_COLOR_FIELD="color",e.DEFAULT_OPTIONS=t.deepAssign({},r.Plot.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",e.WORD_CLOUD_COLOR_FIELD],formatter:function(i){return{name:i.text,value:i.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}})})(AP);Object.defineProperty(sh,"__esModule",{value:!0});sh.adaptor=sh.legend=void 0;var UFt=j,LN=Y,of=Qe,TP=mt,qFt=Pr,ZFt=yn,eX=AP;function QFt(e){var r=e.chart,t=e.options,i=t.colorField,n=t.color,a=ZFt.transform(e);r.data(a);var o=TP.deepAssign({},e,{options:{xField:"x",yField:"y",seriesField:i&&eX.WORD_CLOUD_COLOR_FIELD,rawFields:LN.isFunction(n)&&UFt.__spreadArrays(LN.get(t,"rawFields",[]),["datum"]),point:{color:n,shape:"word-cloud"}}}),l=qFt.point(o).ext;return l.geometry.label(!1),r.coordinate().reflect("y"),r.axis(!1),e}function KFt(e){return TP.flow(of.scale({x:{nice:!1},y:{nice:!1}}))(e)}function rX(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField;return i===!1?r.legend(!1):n&&r.legend(eX.WORD_CLOUD_COLOR_FIELD,i),e}sh.legend=rX;function JFt(e){TP.flow(QFt,KFt,of.tooltip,rX,of.interaction,of.animation,of.theme,of.state)(e)}sh.adaptor=JFt;var DN=j,$N=me;$N.registerShape("point","word-cloud",{draw:function(e,r){var t=e.x,i=e.y,n=r.addShape("text",{attrs:DN.__assign(DN.__assign({},tPt(e)),{x:t,y:i})}),a=e.data.rotate;return typeof a=="number"&&$N.Util.rotate(n,a*Math.PI/180),n}});function tPt(e){return{fontSize:e.data.size,text:e.data.text,textAlign:"center",fontFamily:e.data.font,fontWeight:e.data.weight,fill:e.color||e.defaultStyle.stroke,textBaseline:"alphabetic"}}Object.defineProperty(CP,"__esModule",{value:!0});var iX=CP.WordCloud=void 0,jS=j,ePt=ae,rPt=sh,iPt=AP,kN=yn,nPt=function(e){jS.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="word-cloud",t}return r.getDefaultOptions=function(){return iPt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(kN.transform({chart:this.chart,options:this.options}))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){var t=this;return new Promise(function(i){var n=t.options.imageMask;if(!n){e.prototype.render.call(t),i();return}var a=function(o){t.options=jS.__assign(jS.__assign({},t.options),{imageMask:o||null}),e.prototype.render.call(t),i()};kN.processImageMask(n).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return rPt.adaptor},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r}(ePt.Plot);iX=CP.WordCloud=nPt;var NT=globalThis&&globalThis.__assign||function(){return NT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t=0){var S=w.chart,M=es();_&&Object.assign(M.geometries.point["hollow-circle"].active.style,_),S.on("afterrender",function(){S.geometries.length&&S.geometries[0].elements.forEach(function(O,F){F===s&&O.setState("active",!0)})}),S.on("plot:mousemove",function(O){if(!O.data){p&&p(void 0,void 0,O.event);return}var F=O.data.data,L=F.datum,D=F.x,R=F.y,H=F.width,k=F.height;p&&p(L,{x:D,y:R,w:H,h:k},O.event)}),S.on("plot:click",function(O){if(!O.data){x&&x(void 0,void 0,O.event);return}var F=O.data.data,L=F.datum,D=F.x,R=F.y,H=F.width,k=F.height;x&&x(L,{x:D,y:R,w:H,h:k},O.event)})}}},m)}),MP={},uh={};Object.defineProperty(uh,"__esModule",{value:!0});uh.adaptor=uh.legend=void 0;var oPt=j,HS=Y,ql=mt,Rl=Qe,lPt=Pr;function sPt(e){var r=e.chart,t=e.options,i=t.data,n=t.sectorStyle,a=t.color;return r.data(i),ql.flow(lPt.interval)(ql.deepAssign({},e,{options:{marginRatio:1,interval:{style:n,color:a}}})),e}function uPt(e){var r=e.chart,t=e.options,i=t.label,n=t.xField,a=ql.findGeometry(r,"interval");if(i===!1)a.label(!1);else if(HS.isObject(i)){var o=i.callback,l=i.fields,s=oPt.__rest(i,["callback","fields"]),u=s.offset,c=s.layout;(u===void 0||u>=0)&&(c=c?HS.isArray(c)?c:[c]:[],s.layout=HS.filter(c,function(f){return f.type!=="limit-in-shape"}),s.layout.length||delete s.layout),a.label({fields:l||[n],callback:o,cfg:ql.transformLabel(s)})}else ql.log(ql.LEVEL.WARN,i===null,"the label option must be an Object."),a.label({fields:[n]});return e}function nX(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i===!1?r.legend(!1):n&&r.legend(n,i),e}uh.legend=nX;function cPt(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function fPt(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return ql.flow(Rl.scale((r={},r[a]=i,r[o]=n,r)))(e)}function hPt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i?r.axis(a,i):r.axis(a,!1),n?r.axis(o,n):r.axis(o,!1),e}function vPt(e){ql.flow(Rl.pattern("sectorStyle"),sPt,fPt,uPt,cPt,hPt,nX,Rl.tooltip,Rl.interaction,Rl.animation,Rl.theme,Rl.annotation(),Rl.state)(e)}uh.adaptor=vPt;var ub={};Object.defineProperty(ub,"__esModule",{value:!0});ub.DEFAULT_OPTIONS=void 0;var dPt=ae,pPt=mt;ub.DEFAULT_OPTIONS=pPt.deepAssign({},dPt.Plot.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right"},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});Object.defineProperty(MP,"__esModule",{value:!0});var cb=MP.Rose=void 0,gPt=j,yPt=ae,mPt=uh,xPt=ub,_Pt=function(e){gPt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rose",t}return r.getDefaultOptions=function(){return xPt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return mPt.adaptor},r}(yPt.Plot);cb=MP.Rose=_Pt;var bPt=[{sourceKey:"colorField",targetKey:"seriesField",notice:"colorField \u662F g2@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528seriesField\u66FF\u4EE3"},{sourceKey:"categoryField",targetKey:"xField",notice:"categoryField \u662F g2@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528xField\u66FF\u4EE3"},{sourceKey:"radiusField",targetKey:"yField",notice:"radiusField \u662F g2@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528yFeild\u66FF\u4EE3"}],wPt=function(e){var r=He(e);return $a(bPt,r),kt(r,"tooltip.visible")===!1&&ve(r,"tooltip",!1),kt(r,"label.visible")===!1&&ve(r,"label",!1),kt(r,"label.type")==="inner"&&(r.label.offset=-15,delete r.label.type),kt(r,"label.type")==="outer"&&delete r.label.type,r},CPt=Zt(cb,"RoseChart",wPt),aX={},ch={},Ag={},gc={};(function(e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.PLOYGON_Y=e.PLOYGON_X=e.FUNNEL_TOTAL_PERCENT=e.FUNNEL_CONVERSATION=e.FUNNEL_MAPPING_VALUE=e.FUNNEL_PERCENT=void 0,e.FUNNEL_PERCENT="$$percentage$$",e.FUNNEL_MAPPING_VALUE="$$mappingValue$$",e.FUNNEL_CONVERSATION="$$conversion$$",e.FUNNEL_TOTAL_PERCENT="$$totalPercentage$$",e.PLOYGON_X="$$x$$",e.PLOYGON_Y="$$y$$",e.DEFAULT_OPTIONS={appendPadding:[0,80],minSize:0,maxSize:1,meta:(r={},r[e.FUNNEL_MAPPING_VALUE]={min:0,max:1,nice:!1},r),label:{style:{fill:"#fff",fontSize:12}},tooltip:{showTitle:!1,showMarkers:!1,shared:!1},conversionTag:{offsetX:10,offsetY:0,style:{fontSize:12,fill:"rgba(0,0,0,0.45)"}}}})(gc);var Ss={};Object.defineProperty(Ss,"__esModule",{value:!0});Ss.conversionTagComponent=Ss.transformData=void 0;var SPt=j,gu=Y,P0=gc;function APt(e,r,t){var i=[],n=t.yField,a=t.maxSize,o=t.minSize,l=gu.get(gu.maxBy(r,n),[n]),s=gu.isNumber(a)?a:1,u=gu.isNumber(o)?o:0;return i=gu.map(e,function(c,f){var h=(c[n]||0)/l;return c[P0.FUNNEL_PERCENT]=h,c[P0.FUNNEL_MAPPING_VALUE]=(s-u)*h+u,c[P0.FUNNEL_CONVERSATION]=[gu.get(e,[f-1,n]),c[n]],c}),i}Ss.transformData=APt;function TPt(e){return function(r){var t=r.chart,i=r.options,n=i.conversionTag,a=t.getOptions().data;if(n){var o=n.formatter;a.forEach(function(l,s){if(!(s<=0||Number.isNaN(l[P0.FUNNEL_MAPPING_VALUE]))){var u=e(l,s,a,{top:!0,text:{content:gu.isFunction(o)?o(l,a):o,offsetX:n.offsetX,offsetY:n.offsetY,position:"end",autoRotate:!1,style:SPt.__assign({textAlign:"start",textBaseline:"middle"},n.style)}});t.annotation().line(u)}})}return r}}Ss.conversionTagComponent=TPt;Object.defineProperty(Ag,"__esModule",{value:!0});Ag.basicFunnel=void 0;var BN=j,MPt=Y,oX=mt,EPt=Li,OPt=xr,I0=gc,lX=Ss;function FPt(e){var r=e.chart,t=e.options,i=t.data,n=i===void 0?[]:i,a=t.yField,o=t.maxSize,l=t.minSize,s=lX.transformData(n,n,{yField:a,maxSize:o,minSize:l});return r.data(s),e}function PPt(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.color,o=t.tooltip,l=t.label,s=t.shape,u=s===void 0?"funnel":s,c=t.funnelStyle,f=t.state,h=EPt.getTooltipMapping(o,[i,n]),v=h.fields,d=h.formatter;OPt.geometry({chart:r,options:{type:"interval",xField:i,yField:I0.FUNNEL_MAPPING_VALUE,colorField:i,tooltipFields:MPt.isArray(v)&&v.concat([I0.FUNNEL_PERCENT,I0.FUNNEL_CONVERSATION]),mapping:{shape:u,tooltip:d,color:a,style:c},label:l,state:f}});var p=oX.findGeometry(e.chart,"interval");return p.adjust("symmetric"),e}function IPt(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[]:[["transpose"],["scale",1,-1]]}),e}function LPt(e){var r=e.options,t=r.maxSize,i=function(n,a,o,l){var s=t-(t-n[I0.FUNNEL_MAPPING_VALUE])/2;return BN.__assign(BN.__assign({},l),{start:[a-.5,s],end:[a-.5,s+.05]})};return lX.conversionTagComponent(i)(e),e}function DPt(e){return oX.flow(FPt,PPt,IPt,LPt)(e)}Ag.basicFunnel=DPt;var fb={};Object.defineProperty(fb,"__esModule",{value:!0});fb.compareFunnel=void 0;var $Pt=Y,Ix=mt,kPt=Li,RPt=xr,Ed=gc,sX=Ss;function BPt(e){var r,t=e.chart,i=e.options,n=i.data,a=n===void 0?[]:n,o=i.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function NPt(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.color,l=t.compareField,s=t.isTransposed,u=t.tooltip,c=t.maxSize,f=t.minSize,h=t.label,v=t.funnelStyle,d=t.state;return r.facet("mirror",{fields:[l],transpose:!s,padding:s?0:[32,0,0,0],eachView:function(p,x){var m=s?x.rowIndex:x.columnIndex;s||p.coordinate({type:"rect",actions:[["transpose"],["scale",m===0?-1:1,-1]]});var _=sX.transformData(x.data,i,{yField:a,maxSize:c,minSize:f});p.data(_);var b=kPt.getTooltipMapping(u,[n,a,l]),w=b.fields,S=b.formatter,M=s?{offset:m===0?10:-23,position:m===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:m===0?"end":"start"}};RPt.geometry({chart:p,options:{type:"interval",xField:n,yField:Ed.FUNNEL_MAPPING_VALUE,colorField:n,tooltipFields:$Pt.isArray(w)&&w.concat([Ed.FUNNEL_PERCENT,Ed.FUNNEL_CONVERSATION]),mapping:{shape:"funnel",tooltip:S,color:o,style:v},label:h===!1?!1:Ix.deepAssign({},M,h),state:d}})}}),e}function GPt(e){var r=e.chart,t=e.options,i=t.conversionTag,n=t.isTransposed;return r.once("beforepaint",function(){r.views.forEach(function(a,o){var l=function(s,u,c,f){var h=o===0?-1:1;return Ix.deepAssign({},f,{start:[u-.5,s[Ed.FUNNEL_MAPPING_VALUE]],end:[u-.5,s[Ed.FUNNEL_MAPPING_VALUE]+.05],text:n?{style:{textAlign:"start"}}:{offsetX:i!==!1?h*i.offsetX:0,style:{textAlign:o===0?"end":"start"}}})};sX.conversionTagComponent(l)(Ix.deepAssign({},{chart:a,options:t}))})}),e}function zPt(e){return Ix.flow(BPt,NPt,GPt)(e)}fb.compareFunnel=zPt;var hb={};Object.defineProperty(hb,"__esModule",{value:!0});hb.facetFunnel=void 0;var uX=mt,VPt=Ag;function jPt(e){var r,t=e.chart,i=e.options,n=i.data,a=n===void 0?[]:n,o=i.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function HPt(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.isTransposed;return r.facet("rect",{fields:[i],padding:[n?0:32,10,0,10],eachView:function(a,o){VPt.basicFunnel(uX.deepAssign({},e,{chart:a,options:{data:o.data}}))}}),e}function YPt(e){return uX.flow(jPt,HPt)(e)}hb.facetFunnel=YPt;var vb={};Object.defineProperty(vb,"__esModule",{value:!0});vb.dynamicHeightFunnel=void 0;var NN=j,id=Y,WPt=mt,ui=gc,XPt=xr,UPt=Li,qPt=Ss;function ZPt(e){var r=e.chart,t=e.options,i=t.data,n=i===void 0?[]:i,a=t.yField,o=id.reduce(n,function(u,c){return u+(c[a]||0)},0),l=id.maxBy(n,a)[a],s=id.map(n,function(u,c){var f=[],h=[];if(u[ui.FUNNEL_TOTAL_PERCENT]=(u[a]||0)/o,c){var v=n[c-1][ui.PLOYGON_X],d=n[c-1][ui.PLOYGON_Y];f[0]=v[3],h[0]=d[3],f[1]=v[2],h[1]=d[2]}else f[0]=-.5,h[0]=1,f[1]=.5,h[1]=1;return h[2]=h[1]-u[ui.FUNNEL_TOTAL_PERCENT],f[2]=(h[2]+1)/4,h[3]=h[2],f[3]=-f[2],u[ui.PLOYGON_X]=f,u[ui.PLOYGON_Y]=h,u[ui.FUNNEL_PERCENT]=(u[a]||0)/l,u[ui.FUNNEL_CONVERSATION]=[id.get(n,[c-1,a]),u[a]],u});return r.data(s),e}function QPt(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.color,o=t.tooltip,l=t.label,s=t.funnelStyle,u=t.state,c=UPt.getTooltipMapping(o,[i,n]),f=c.fields,h=c.formatter;return XPt.geometry({chart:r,options:{type:"polygon",xField:ui.PLOYGON_X,yField:ui.PLOYGON_Y,colorField:i,tooltipFields:id.isArray(f)&&f.concat([ui.FUNNEL_PERCENT,ui.FUNNEL_CONVERSATION]),label:l,state:u,mapping:{tooltip:h,color:a,style:s}}}),e}function KPt(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[["transpose"],["reflect","x"]]:[]}),e}function JPt(e){var r=function(t,i,n,a){return NN.__assign(NN.__assign({},a),{start:[t[ui.PLOYGON_X][1],t[ui.PLOYGON_Y][1]],end:[t[ui.PLOYGON_X][1]+.05,t[ui.PLOYGON_Y][1]]})};return qPt.conversionTagComponent(r)(e),e}function tIt(e){return WPt.flow(ZPt,QPt,KPt,JPt)(e)}vb.dynamicHeightFunnel=tIt;Object.defineProperty(ch,"__esModule",{value:!0});ch.adaptor=ch.meta=void 0;var GN=Y,lf=Qe,eIt=xs,Lx=mt,rIt=_g,iIt=Ag,nIt=fb,aIt=hb,oIt=vb,$v=gc;function lIt(e){var r=e.options,t=r.compareField,i=r.xField,n=r.yField,a=r.locale,o=r.funnelStyle,l=r.data,s=eIt.getLocale(a),u={label:t?{fields:[i,n,t,$v.FUNNEL_PERCENT,$v.FUNNEL_CONVERSATION],formatter:function(f){return""+f[n]}}:{fields:[i,n,$v.FUNNEL_PERCENT,$v.FUNNEL_CONVERSATION],offset:0,position:"middle",formatter:function(f){return f[i]+" "+f[n]}},tooltip:{title:i,formatter:function(f){return{name:f[i],value:f[n]}}},conversionTag:{formatter:function(f){return s.get(["conversionTag","label"])+": "+rIt.conversionTagFormatter.apply(void 0,f[$v.FUNNEL_CONVERSATION])}}},c;return(t||o)&&(c=function(f){return Lx.deepAssign({},t&&{lineWidth:1,stroke:"#fff"},GN.isFunction(o)?o(f):o)}),Lx.deepAssign({options:u},e,{options:{funnelStyle:c,data:GN.clone(l)}})}function sIt(e){var r=e.options,t=r.compareField,i=r.dynamicHeight,n=r.seriesField;return n?aIt.facetFunnel(e):t?nIt.compareFunnel(e):i?oIt.dynamicHeightFunnel(e):iIt.basicFunnel(e)}function cX(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Lx.flow(lf.scale((r={},r[a]=i,r[o]=n,r)))(e)}ch.meta=cX;function uIt(e){var r=e.chart;return r.axis(!1),e}function cIt(e){var r=e.chart,t=e.options,i=t.legend;return i===!1?r.legend(!1):r.legend(i),e}function fIt(e){return Lx.flow(lIt,sIt,cX,uIt,lf.tooltip,lf.interaction,cIt,lf.animation,lf.theme,lf.annotation())(e)}ch.adaptor=fIt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Funnel=e.FUNNEL_CONVERSATION_FIELD=void 0;var r=j,t=Y,i=ae,n=mt,a=ch,o=gc;Object.defineProperty(e,"FUNNEL_CONVERSATION_FIELD",{enumerable:!0,get:function(){return o.FUNNEL_CONVERSATION}});var l=function(s){r.__extends(u,s);function u(){var c=s!==null&&s.apply(this,arguments)||this;return c.type="funnel",c}return u.getDefaultOptions=function(){return o.DEFAULT_OPTIONS},u.prototype.getDefaultOptions=function(){return u.getDefaultOptions()},u.prototype.getSchemaAdaptor=function(){return a.adaptor},u.prototype.setState=function(c,f,h){h===void 0&&(h=!0);var v=n.getAllElementsRecursively(this.chart);t.each(v,function(d){f(d.getData())&&d.setState(c,h)})},u.prototype.getStates=function(){var c=n.getAllElementsRecursively(this.chart),f=[];return t.each(c,function(h){var v=h.getData(),d=h.getStates();t.each(d,function(p){f.push({data:v,state:p,geometry:h.geometry,element:h})})}),f},u.CONVERSATION_FIELD=o.FUNNEL_CONVERSATION,u.PERCENT_FIELD=o.FUNNEL_PERCENT,u.TOTAL_PERCENT_FIELD=o.FUNNEL_TOTAL_PERCENT,u}(i.Plot);e.Funnel=l})(aX);var hIt=Zt(aX.Funnel,"FunnelChart",function(e){var r=He(e);return $a([{sourceKey:"transpose",targetKey:"isTransposed",notice:"transpose \u5373\u5C06\u5E9F\u5F03 \u8BF7\u4F7F\u7528isTransposed\u66FF\u4EE3"}],r),r}),Dx=globalThis&&globalThis.__assign||function(){return Dx=Object.assign||function(e){for(var r,t=1,i=arguments.length;t0){var l=this.view.geometries[0],s=l.dataArray,u=o[0].name,c=[];return s.forEach(function(f){f.forEach(function(h){var v=kx.Util.getTooltipItems(h,l),d=v[0];if(!n&&d&&d.name===u){var p=zN.isNil(a)?u:a;c.push(sf.__assign(sf.__assign({},d),{name:d.title,title:p}))}else if(n&&d){var p=zN.isNil(a)?d.name||u:a;c.push(sf.__assign(sf.__assign({},d),{name:d.title,title:p}))}})}),c}return[]},r}(kx.TooltipController);fh.RadarTooltipController=fX;kx.registerComponentController("radar-tooltip",fX);var AIt=function(e){sf.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},r.prototype.show=function(){var t=this.context.event,i=this.getTooltipController();i.showTooltip({x:t.x,y:t.y})},r.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},r.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},r}(kx.Action);fh.RadarTooltipAction=AIt;var hX=me,TIt=fh;hX.registerAction("radar-tooltip",TIt.RadarTooltipAction);hX.registerInteraction("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});Object.defineProperty(EP,"__esModule",{value:!0});var vX=EP.Radar=void 0,MIt=j,EIt=ae,OIt=mt,FIt=db,PIt=function(e){MIt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radar",t}return r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return OIt.deepAssign({},e.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},r.prototype.getSchemaAdaptor=function(){return FIt.adaptor},r}(EIt.Plot);vX=EP.Radar=PIt;var Od=globalThis&&globalThis.__assign||function(){return Od=Object.assign||function(e){for(var r,t=1,i=arguments.length;t0;)u-=Math.PI*2;u=u/Math.PI/2*t;var c=a-e+u-e*2;s.push(["M",c,r]);for(var f=0,h=0;h1?s/(i-1):l.max),!t&&!i){var c=u2t(o);u=s/c}var f={},h=ha.groupBy(a,n);ha.isEmpty(h)?ha.each(a,function(d){var p=d[r],x=XN(p,u,i),m=x[0]+"-"+x[1];ha.hasKey(f,m)||(f[m]={range:x,count:0}),f[m].count+=1}):Object.keys(h).forEach(function(d){ha.each(h[d],function(p){var x=p[r],m=XN(x,u,i),_=m[0]+"-"+m[1],b=_+"-"+d;ha.hasKey(f,b)||(f[b]={range:m,count:0},f[b][n]=d),f[b].count+=1})});var v=[];return ha.each(f,function(d){v.push(d)}),v}Mg.binHistogram=c2t;var gb={},tl={};Object.defineProperty(tl,"__esModule",{value:!0});tl.DEFAULT_OPTIONS=tl.HISTOGRAM_Y_FIELD=tl.HISTOGRAM_X_FIELD=void 0;var f2t=ae,h2t=mt;tl.HISTOGRAM_X_FIELD="range";tl.HISTOGRAM_Y_FIELD="count";tl.DEFAULT_OPTIONS=h2t.deepAssign({},f2t.Plot.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});Object.defineProperty(gb,"__esModule",{value:!0});gb.adaptor=void 0;var v2t=j,uf=Qe,d2t=Ds,gX=mt,PP=mt,p2t=Pr,g2t=Mg,Xo=tl;function y2t(e){var r=e.chart,t=e.options,i=t.data,n=t.binField,a=t.binNumber,o=t.binWidth,l=t.color,s=t.stackField,u=t.legend,c=t.columnStyle,f=g2t.binHistogram(i,n,o,a,s);r.data(f);var h=gX.deepAssign({},e,{options:{xField:Xo.HISTOGRAM_X_FIELD,yField:Xo.HISTOGRAM_Y_FIELD,seriesField:s,isStack:!0,interval:{color:l,style:c}}});return p2t.interval(h),u&&s&&r.legend(s,u),e}function m2t(e){var r,t=e.options,i=t.xAxis,n=t.yAxis;return PP.flow(uf.scale((r={},r[Xo.HISTOGRAM_X_FIELD]=i,r[Xo.HISTOGRAM_Y_FIELD]=n,r)))(e)}function x2t(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis;return i===!1?r.axis(Xo.HISTOGRAM_X_FIELD,!1):r.axis(Xo.HISTOGRAM_X_FIELD,i),n===!1?r.axis(Xo.HISTOGRAM_Y_FIELD,!1):r.axis(Xo.HISTOGRAM_Y_FIELD,n),e}function _2t(e){var r=e.chart,t=e.options,i=t.label,n=gX.findGeometry(r,"interval");if(!i)n.label(!1);else{var a=i.callback,o=v2t.__rest(i,["callback"]);n.label({fields:[Xo.HISTOGRAM_Y_FIELD],callback:a,cfg:PP.transformLabel(o)})}return e}function b2t(e){return PP.flow(uf.theme,d2t.pattern("columnStyle"),y2t,m2t,x2t,uf.state,_2t,uf.tooltip,uf.interaction,uf.animation)(e)}gb.adaptor=b2t;Object.defineProperty(FP,"__esModule",{value:!0});var yX=FP.Histogram=void 0,w2t=j,C2t=ae,S2t=Mg,A2t=gb,T2t=tl,M2t=function(e){w2t.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="histogram",t}return r.getDefaultOptions=function(){return T2t.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.binField,a=i.binNumber,o=i.binWidth,l=i.stackField;this.chart.changeData(S2t.binHistogram(t,n,o,a,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return A2t.adaptor},r}(C2t.Plot);yX=FP.Histogram=M2t;var E2t=Zt(yX,"HistogramChart"),VT=globalThis&&globalThis.__assign||function(){return VT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t0?c:f},d=el.deepAssign({},e,{options:{xField:n,yField:bi.Y_FIELD,seriesField:n,rawFields:[a,bi.DIFF_FIELD,bi.IS_TOTAL,bi.Y_FIELD],widthRatio:s,interval:{style:u,shape:"waterfall",color:v}}}),p=R2t.interval(d).ext,x=p.geometry;return x.customInfo({leaderLine:l}),e}function z2t(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,l=i.yField,s=i.meta,u=el.deepAssign({},{alias:l},bf.get(s,l));return el.flow(cf.scale((r={},r[o]=n,r[l]=a,r[bi.Y_FIELD]=a,r),el.deepAssign({},s,(t={},t[bi.Y_FIELD]=u,t[bi.DIFF_FIELD]=u,t[bi.ABSOLUTE_FIELD]=u,t))))(e)}function V2t(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?(r.axis(o,!1),r.axis(bi.Y_FIELD,!1)):(r.axis(o,n),r.axis(bi.Y_FIELD,n)),e}function j2t(e){var r=e.chart,t=e.options,i=t.legend,n=t.total,a=t.risingFill,o=t.fallingFill,l=t.locale,s=_X.getLocale(l);if(i===!1)r.legend(!1);else{var u=[{name:s.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:s.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:o}}}];n&&u.push({name:n.label||"",value:"total",marker:{symbol:"square",style:el.deepAssign({},{r:5},bf.get(n,"style"))}}),r.legend(el.deepAssign({},{custom:!0,position:"top",items:u},i)),r.removeInteraction("legend-filter")}return e}function H2t(e){var r=e.chart,t=e.options,i=t.label,n=t.labelMode,a=t.xField,o=el.findGeometry(r,"interval");if(!i)o.label(!1);else{var l=i.callback,s=xX.__rest(i,["callback"]);o.label({fields:n==="absolute"?[bi.ABSOLUTE_FIELD,a]:[bi.DIFF_FIELD,a],callback:l,cfg:el.transformLabel(s)})}return e}function bX(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.xField,a=t.yField;if(i!==!1){r.tooltip(xX.__assign({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},i));var o=r.geometries[0];i!=null&&i.formatter?o.tooltip(n+"*"+a,i.formatter):o.tooltip(a)}else r.tooltip(!1);return e}vh.tooltip=bX;function Y2t(e){return el.flow(N2t,cf.theme,G2t,z2t,V2t,j2t,bX,H2t,cf.state,cf.interaction,cf.animation,cf.annotation())(e)}vh.adaptor=Y2t;Object.defineProperty(IP,"__esModule",{value:!0});var wX=IP.Waterfall=void 0,W2t=j,X2t=ae,U2t=vh,q2t=Vi,Z2t=rc,Q2t=function(e){W2t.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="waterfall",t}return r.getDefaultOptions=function(){return q2t.DEFAULT_OPTIONS},r.prototype.changeData=function(t){var i=this.options,n=i.xField,a=i.yField,o=i.total;this.updateOption({data:t}),this.chart.changeData(Z2t.transformData(t,n,a,o))},r.prototype.getSchemaAdaptor=function(){return U2t.adaptor},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(X2t.Plot);wX=IP.Waterfall=Q2t;var K2t=Zt(wX,"WaterfallChart"),LP={},lo={},as={},Qa={exports:{}};(function(e,r){(function(t,i){i(r)})($d,function(t){function i(k,V){return n(k)||a(k,V)||o()}function n(k){if(Array.isArray(k))return k}function a(k,V){var U=[],B=!0,G=!1,N=void 0;try{for(var W=k[Symbol.iterator](),q;!(B=(q=W.next()).done)&&(U.push(q.value),!(V&&U.length===V));B=!0);}catch(tt){G=!0,N=tt}finally{try{!B&&W.return!=null&&W.return()}finally{if(G)throw N}}return U}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function l(k,V,U,B){k=k.filter(function(dt,ht){var wt=V(dt,ht),gt=U(dt,ht);return wt!=null&&isFinite(wt)&>!=null&&isFinite(gt)}),B&&k.sort(function(dt,ht){return V(dt)-V(ht)});for(var G=k.length,N=new Float64Array(G),W=new Float64Array(G),q=0,tt=0,ot,st,Z,et=0;etG&&(st.splice(lt+1,0,gt),et=!0)}return et}}function v(k,V,U,B){var G=B-k*k,N=Math.abs(G)<1e-24?0:(U-k*V)/G,W=V-N*k;return[W,N]}function d(){var k=function(N){return N[0]},V=function(N){return N[1]},U;function B(G){var N=0,W=0,q=0,tt=0,ot=0,st=0,Z=U?+U[0]:1/0,et=U?+U[1]:-1/0;s(G,k,V,function(_t,Bt){var Ut=Math.log(Bt),Nt=_t*Bt;++N,W+=(Bt-W)/N,tt+=(Nt-tt)/N,st+=(_t*Nt-st)/N,q+=(Bt*Ut-q)/N,ot+=(Nt*Ut-ot)/N,U||(_tet&&(et=_t))});var lt=v(tt/W,q/W,ot/W,st/W),dt=i(lt,2),ht=dt[0],wt=dt[1];ht=Math.exp(ht);var gt=function(Bt){return ht*Math.exp(wt*Bt)},vt=h(Z,et,gt);return vt.a=ht,vt.b=wt,vt.predict=gt,vt.rSquared=u(G,k,V,W,gt),vt}return B.domain=function(G){return arguments.length?(U=G,B):U},B.x=function(G){return arguments.length?(k=G,B):k},B.y=function(G){return arguments.length?(V=G,B):V},B}function p(){var k=function(N){return N[0]},V=function(N){return N[1]},U;function B(G){var N=0,W=0,q=0,tt=0,ot=0,st=U?+U[0]:1/0,Z=U?+U[1]:-1/0;s(G,k,V,function(vt,_t){++N,W+=(vt-W)/N,q+=(_t-q)/N,tt+=(vt*_t-tt)/N,ot+=(vt*vt-ot)/N,U||(vtZ&&(Z=vt))});var et=v(W,q,tt,ot),lt=i(et,2),dt=lt[0],ht=lt[1],wt=function(_t){return ht*_t+dt},gt=[[st,wt(st)],[Z,wt(Z)]];return gt.a=ht,gt.b=dt,gt.predict=wt,gt.rSquared=u(G,k,V,q,wt),gt}return B.domain=function(G){return arguments.length?(U=G,B):U},B.x=function(G){return arguments.length?(k=G,B):k},B.y=function(G){return arguments.length?(V=G,B):V},B}function x(k){k.sort(function(U,B){return U-B});var V=k.length/2;return V%1===0?(k[V-1]+k[V])/2:k[Math.floor(V)]}var m=2,_=1e-12;function b(){var k=function(N){return N[0]},V=function(N){return N[1]},U=.3;function B(G){for(var N=l(G,k,V,!0),W=i(N,4),q=W[0],tt=W[1],ot=W[2],st=W[3],Z=q.length,et=Math.max(2,~~(U*Z)),lt=new Float64Array(Z),dt=new Float64Array(Z),ht=new Float64Array(Z).fill(1),wt=-1;++wt<=m;){for(var gt=[0,et-1],vt=0;vtq[Ut]-_t?Bt:Ut,pe=0,cr=0,ar=0,Ji=0,Lr=0,tn=1/Math.abs(q[Nt]-_t||1),jr=Bt;jr<=Ut;++jr){var Hr=q[jr],Ke=tt[jr],At=w(Math.abs(_t-Hr)*tn)*ht[jr],gi=Hr*At;pe+=At,cr+=gi,ar+=Ke*At,Ji+=Ke*gi,Lr+=Hr*gi}var Hh=v(cr/pe,ar/pe,Ji/pe,Lr/pe),xc=i(Hh,2),Yh=xc[0],_c=xc[1];lt[vt]=Yh+_c*_t,dt[vt]=Math.abs(tt[vt]-lt[vt]),S(q,vt+1,gt)}if(wt===m)break;var Rs=x(dt);if(Math.abs(Rs)<_)break;for(var vl=0,So,Bs;vl=1?_:(Bs=1-So*So)*Bs}return M(q,lt,ot,st)}return B.bandwidth=function(G){return arguments.length?(U=G,B):U},B.x=function(G){return arguments.length?(k=G,B):k},B.y=function(G){return arguments.length?(V=G,B):V},B}function w(k){return(k=1-k*k*k)*k*k}function S(k,V,U){var B=k[V],G=U[0],N=U[1]+1;if(!(N>=k.length))for(;V>G&&k[N]-B<=B-k[G];)U[0]=++G,U[1]=N,++N}function M(k,V,U,B){for(var G=k.length,N=[],W=0,q=0,tt=[],ot;Wet&&(et=Bt))});var dt=v(q,tt,ot,st),ht=i(dt,2),wt=ht[0],gt=ht[1],vt=function(Ut){return gt*Math.log(Ut)/lt+wt},_t=h(Z,et,vt);return _t.a=gt,_t.b=wt,_t.predict=vt,_t.rSquared=u(N,k,V,tt,vt),_t}return G.domain=function(N){return arguments.length?(B=N,G):B},G.x=function(N){return arguments.length?(k=N,G):k},G.y=function(N){return arguments.length?(V=N,G):V},G.base=function(N){return arguments.length?(U=N,G):U},G}function F(){var k=function(N){return N[0]},V=function(N){return N[1]},U;function B(G){var N=l(G,k,V),W=i(N,4),q=W[0],tt=W[1],ot=W[2],st=W[3],Z=q.length,et=0,lt=0,dt=0,ht=0,wt=0,gt,vt,_t,Bt;for(gt=0;gtcr&&(cr=At))});var ar=dt-et*et,Ji=et*ar-lt*lt,Lr=(wt*et-ht*lt)/Ji,tn=(ht*ar-wt*lt)/Ji,jr=-Lr*et,Hr=function(gi){return gi=gi-ot,Lr*gi*gi+tn*gi+jr+st},Ke=h(pe,cr,Hr);return Ke.a=Lr,Ke.b=tn-2*Lr*ot,Ke.c=jr-tn*ot+Lr*ot*ot+st,Ke.predict=Hr,Ke.rSquared=u(G,k,V,Ut,Hr),Ke}return B.domain=function(G){return arguments.length?(U=G,B):U},B.x=function(G){return arguments.length?(k=G,B):k},B.y=function(G){return arguments.length?(V=G,B):V},B}function L(){var k=function(W){return W[0]},V=function(W){return W[1]},U=3,B;function G(N){if(U===1){var W=p().x(k).y(V).domain(B)(N);return W.coefficients=[W.b,W.a],delete W.a,delete W.b,W}if(U===2){var q=F().x(k).y(V).domain(B)(N);return q.coefficients=[q.c,q.b,q.a],delete q.a,delete q.b,delete q.c,q}var tt=l(N,k,V),ot=i(tt,4),st=ot[0],Z=ot[1],et=ot[2],lt=ot[3],dt=st.length,ht=[],wt=[],gt=U+1,vt=0,_t=0,Bt=B?+B[0]:1/0,Ut=B?+B[1]:-1/0;s(N,k,V,function(Hr,Ke){++_t,vt+=(Ke-vt)/_t,B||(HrUt&&(Ut=Hr))});var Nt,pe,cr,ar,Ji;for(Nt=0;Nt=0;--N)for(q=V[N],tt=1,G[N]+=q,W=1;W<=N;++W)tt*=(N+1-W)/W,G[N-W]+=q*Math.pow(U,W)*tt;return G[0]+=B,G}function R(k){var V=k.length-1,U=[],B,G,N,W,q;for(B=0;BMath.abs(k[B][W])&&(W=G);for(N=B;N=B;N--)k[N][G]-=k[N][B]*k[B][G]/k[B][B]}for(G=V-1;G>=0;--G){for(q=0,N=G+1;Net&&(et=_t))});var lt=v(W,q,tt,ot),dt=i(lt,2),ht=dt[0],wt=dt[1];ht=Math.exp(ht);var gt=function(Bt){return ht*Math.pow(Bt,wt)},vt=h(Z,et,gt);return vt.a=ht,vt.b=wt,vt.predict=gt,vt.rSquared=u(G,k,V,st,gt),vt}return B.domain=function(G){return arguments.length?(U=G,B):U},B.x=function(G){return arguments.length?(k=G,B):k},B.y=function(G){return arguments.length?(V=G,B):V},B}t.regressionExp=d,t.regressionLinear=p,t.regressionLoess=b,t.regressionLog=O,t.regressionPoly=L,t.regressionPow=H,t.regressionQuad=F,Object.defineProperty(t,"__esModule",{value:!0})})})(Qa,Qa.exports);Object.defineProperty(as,"__esModule",{value:!0});as.getMeta=as.getPath=as.getQuadrantDefaultConfig=void 0;var Uc=j,uu=Qa.exports,Go=Y,J2t=mt,tLt={exp:uu.regressionExp,linear:uu.regressionLinear,loess:uu.regressionLoess,log:uu.regressionLog,poly:uu.regressionPoly,pow:uu.regressionPow,quad:uu.regressionQuad};function eLt(e,r){var t=10,i={regionStyle:[{position:{start:[e,"max"],end:["max",r]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[e,r]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",r],end:[e,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[e,r],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",r],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",r],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return i}as.getQuadrantDefaultConfig=eLt;var rLt=function(e,r){var t=r.view,i=r.options,n=i.xField,a=i.yField,o=t.getScaleByField(n),l=t.getScaleByField(a),s=e.map(function(u){return t.getCoordinate().convert({x:o.scale(u[0]),y:l.scale(u[1])})});return J2t.getSplinePath(s,!1)};as.getPath=function(e){var r=e.options,t=r.xField,i=r.yField,n=r.data,a=r.regressionLine,o=a.type,l=o===void 0?"linear":o,s=a.algorithm,u;if(s)u=Go.isArray(s)?s:s(n);else{var c=tLt[l]().x(function(f){return f[t]}).y(function(f){return f[i]});u=c(n)}return rLt(u,e)};as.getMeta=function(e){var r,t=e.meta,i=t===void 0?{}:t,n=e.xField,a=e.yField,o=e.data,l=o[0][n],s=o[0][a],u=l>0,c=s>0;function f(h,v){var d=Go.get(i,[h]);function p(m){return Go.get(d,m)}var x={};return v==="x"?(Go.isNumber(l)&&(Go.isNumber(p("min"))||(x.min=u?0:l*2),Go.isNumber(p("max"))||(x.max=u?l*2:0)),x):(Go.isNumber(s)&&(Go.isNumber(p("min"))||(x.min=c?0:s*2),Go.isNumber(p("max"))||(x.max=c?s*2:0)),x)}return Uc.__assign(Uc.__assign({},i),(r={},r[n]=Uc.__assign(Uc.__assign({},i[n]),f(n,"x")),r[a]=Uc.__assign(Uc.__assign({},i[a]),f(a,"y")),r))};Object.defineProperty(lo,"__esModule",{value:!0});lo.adaptor=lo.tooltip=lo.meta=lo.transformOptions=void 0;var os=j,iLt=Y,ya=mt,nLt=Pr,aLt=bg,Pd=Qe,jT=mt,DP=as;function CX(e){var r=e.data,t=r===void 0?[]:r,i=e.xField,n=e.yField;if(t.length){for(var a=!0,o=!0,l=t[0],s=void 0,u=1;u1?i+"_"+p:""+i},x[t]=t?f[t]:String(h),x[i]=d,x))}),l.push((v={tKey:""+a},v[t]=t?f[t]:String(h),v[a]=f[a],v)),s.push(f[n],f[i],f[a])});var u=Math.min.apply(Math,s.flat(1/0)),c=Math.max.apply(Math,s.flat(1/0));return u=u>0?0:u,o==="vertical"&&l.reverse(),{min:u,max:c,ds:l}}Eg.transformData=wLt;Object.defineProperty(dh,"__esModule",{value:!0});dh.adaptor=dh.meta=void 0;var Id=j,kr=Y,ad=Qe,ls=mt,qS=Pr,CLt=Eg;function SLt(e){var r=e.chart,t=e.options,i=t.bulletStyle,n=t.targetField,a=t.rangeField,o=t.measureField,l=t.xField,s=t.color,u=t.layout,c=t.size,f=t.label,h=CLt.transformData(t),v=h.min,d=h.max,p=h.ds;r.data(p);var x=ls.deepAssign({},e,{options:{xField:l,yField:a,seriesField:"rKey",isStack:!0,label:kr.get(f,"range"),interval:{color:kr.get(s,"range"),style:kr.get(i,"range"),size:kr.get(c,"range")}}});qS.interval(x),r.geometries[0].tooltip(!1);var m=ls.deepAssign({},e,{options:{xField:l,yField:o,seriesField:"mKey",isStack:!0,label:kr.get(f,"measure"),interval:{color:kr.get(s,"measure"),style:kr.get(i,"measure"),size:kr.get(c,"measure")}}});qS.interval(m);var _=ls.deepAssign({},e,{options:{xField:l,yField:n,seriesField:"tKey",label:kr.get(f,"target"),point:{color:kr.get(s,"target"),style:kr.get(i,"target"),size:kr.isFunction(kr.get(c,"target"))?function(b){return kr.get(c,"target")(b)/2}:kr.get(c,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return qS.point(_),u==="horizontal"&&r.coordinate().transpose(),Id.__assign(Id.__assign({},e),{ext:{data:{min:v,max:d}}})}function TX(e){var r,t,i=e.options,n=e.ext,a=i.xAxis,o=i.yAxis,l=i.targetField,s=i.rangeField,u=i.measureField,c=i.xField,f=n.data;return ls.flow(ad.scale((r={},r[c]=a,r[u]=o,r),(t={},t[u]={min:f==null?void 0:f.min,max:f==null?void 0:f.max,sync:!0},t[l]={sync:""+u},t[s]={sync:""+u},t)))(e)}dh.meta=TX;function ALt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.measureField,l=t.rangeField,s=t.targetField;return r.axis(""+l,!1),r.axis(""+s,!1),i===!1?r.axis(""+a,!1):r.axis(""+a,i),n===!1?r.axis(""+o,!1):r.axis(""+o,n),e}function TLt(e){var r=e.chart,t=e.options,i=t.legend;return r.removeInteraction("legend-filter"),r.legend(i),r.legend("rKey",!1),r.legend("mKey",!1),r.legend("tKey",!1),e}function MLt(e){var r=e.chart,t=e.options,i=t.label,n=t.measureField,a=t.targetField,o=t.rangeField,l=r.geometries,s=l[0],u=l[1],c=l[2];return kr.get(i,"range")?s.label(""+o,Id.__assign({layout:[{type:"limit-in-plot"}]},ls.transformLabel(i.range))):s.label(!1),kr.get(i,"measure")?u.label(""+n,Id.__assign({layout:[{type:"limit-in-plot"}]},ls.transformLabel(i.measure))):u.label(!1),kr.get(i,"target")?c.label(""+a,Id.__assign({layout:[{type:"limit-in-plot"}]},ls.transformLabel(i.target))):c.label(!1),e}function ELt(e){ls.flow(SLt,TX,ALt,TLt,ad.theme,MLt,ad.tooltip,ad.interaction,ad.animation)(e)}dh.adaptor=ELt;var mb={};Object.defineProperty(mb,"__esModule",{value:!0});mb.DEFAULT_OPTIONS=void 0;var OLt=ae,FLt=mt;mb.DEFAULT_OPTIONS=FLt.deepAssign({},OLt.Plot.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}});Object.defineProperty(kP,"__esModule",{value:!0});var MX=kP.Bullet=void 0,PLt=j,ILt=ae,qN=dh,LLt=Eg,DLt=mb,$Lt=function(e){PLt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bullet",t}return r.getDefaultOptions=function(){return DLt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=LLt.transformData(this.options),n=i.min,a=i.max,o=i.ds;qN.meta({options:this.options,ext:{data:{min:n,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return qN.adaptor},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(ILt.Plot);MX=kP.Bullet=$Lt;var Cu=globalThis&&globalThis.__assign||function(){return Cu=Object.assign||function(e){for(var r,t=1,i=arguments.length;t"},key:(s===0?"top":"bottom")+"-statistic"},se(l,["offsetX","offsetY","rotate","style","formatter"])))}})},qLt=function(e,r,t){var i=r.statistic,n=i.title,a=i.content;[n,a].forEach(function(o){if(!!o){var l=pt(o.style)?o.style(t):o.style;e.annotation().html(A({position:["50%","100%"],html:function(s,u){var c=u.getCoordinate(),f=u.views[0].getCoordinate(),h=f.getCenter(),v=f.getRadius(),d=Math.max(Math.sin(f.startAngle),Math.sin(f.endAngle))*v,p=h.y+d-c.y.start-parseFloat(I(l,"fontSize",0)),x=c.getRadius()*c.innerRadius*2;IX(s,A({width:x+"px",transform:"translate(-50%, "+p+"px)"},PX(l)));var m=u.getData();if(o.customHtml)return o.customHtml(s,u,t,m);var _=o.content;return o.formatter&&(_=o.formatter(t,m)),_?Ct(_)?_:""+_:"
    "}},se(o,["offsetX","offsetY","rotate","style","formatter"])))}})},ZS;function ZLt(){return ZS||(ZS=document.createElement("canvas").getContext("2d")),ZS}sc(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=i===void 0?"sans-serif":i,a=r.fontWeight,o=r.fontStyle,l=r.fontVariant,s=ZLt();s.font=[o,a,l,t+"px",n].join(" ");var u=s.measureText(Ct(e)?e:"");return u.width},function(e,r){return r===void 0&&(r={}),ye([e],_h(r)).join("")});function ic(e){return typeof e=="number"&&!isNaN(e)}function QLt(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=i&&e<=n}function RP(e,r){var t=e.filter(function(a){var o=I(a,[r]);return Mt(o)&&!isNaN(o)}),i=t.every(function(a){return I(a,[r])>=0}),n=t.every(function(a){return I(a,[r])<=0});return i?{min:0}:n?{max:0}:{}}function LX(e,r,t,i,n){if(n===void 0&&(n=[]),!Array.isArray(e))return{nodes:[],links:[]};var a=[],o={},l=-1;return e.forEach(function(s){var u=s[r],c=s[t],f=s[i],h=se(s,n);o[u]||(o[u]=A({id:++l,name:u},h)),o[c]||(o[c]=A({id:++l,name:c},h)),a.push(A({source:o[u].id,target:o[c].id,value:f},h))}),{nodes:Object.values(o).sort(function(s,u){return s.id-u.id}),links:a}}function ph(e,r){var t=zr(e,function(i){var n=i[r];return n===null||typeof n=="number"&&!isNaN(n)});return sl(Oa.WARN,t.length===e.length,"illegal data existed in chart data."),t}function As(e){if(Mt(e))return[e,e,e,e];if(it(e)){var r=e.length;if(r===1)return[e[0],e[0],e[0],e[0]];if(r===2)return[e[0],e[1],e[0],e[1]];if(r===3)return[e[0],e[1],e[2],e[1]];if(r===4)return e}return[0,0,0,0]}function _b(e,r,t){r===void 0&&(r="bottom"),t===void 0&&(t=25);var i=As(e),n=[r.startsWith("top")?t:0,r.startsWith("right")?t:0,r.startsWith("bottom")?t:0,r.startsWith("left")?t:0];return[i[0]+n[0],i[1]+n[1],i[2]+n[2],i[3]+n[3]]}function BP(e){var r=e.map(function(i){return As(i)}),t=[0,0,0,0];return r.length>0&&(t=t.map(function(i,n){return r.forEach(function(a,o){i+=r[o][n]}),i})),t}var KLt={locale:"en-US"},L0={};function DX(e,r){L0[e]=r}function bb(e){return{get:function(r,t){return EX(I(L0[e],r)||I(L0[KLt.locale],r)||I(L0["en-US"],r)||r,t)}}}var JLt={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},tDt={locale:"zh-CN",general:{increase:"\u589E\u52A0",decrease:"\u51CF\u5C11",root:"\u521D\u59CB"},statistic:{total:"\u603B\u8BA1"},conversionTag:{label:"\u8F6C\u5316\u7387"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"\u603B\u8BA1"}},JN="data-chart-source-type",$X=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],Dt=function(e){X(r,e);function r(t,i){var n=e.call(this)||this;return n.container=typeof t=="string"?document.getElementById(t):t,n.options=J({},n.getDefaultOptions(),i),n.createG2(),n.bindEvents(),n}return r.getDefaultOptions=function(){return{renderer:"canvas",xAxis:{nice:!0,label:{autoRotate:!1,autoHide:{type:"equidistance",cfg:{minGap:6}}}},yAxis:{nice:!0,label:{autoHide:!0,autoRotate:!1}},animation:!0}},r.prototype.createG2=function(){var t=this.options,i=t.width,n=t.height,a=t.defaultInteractions;this.chart=new fW(A(A(A(A({container:this.container,autoFit:!1},this.getChartSize(i,n)),{localRefresh:!1}),se(this.options,$X)),{defaultInteractions:a})),this.container.setAttribute(JN,"G2Plot")},r.prototype.getChartSize=function(t,i){var n=HT(this.container);return{width:t||n.width||400,height:i||n.height||400}},r.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",function(i){i!=null&&i.type&&t.emit(i.type,i)})},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},r.prototype.update=function(t){this.updateOption(t),this.render()},r.prototype.updateOption=function(t){this.options=J({},this.options,t)},r.prototype.setState=function(t,i,n){n===void 0&&(n=!0);var a=op(this.chart);P(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=op(this.chart),i=[];return P(t,function(n){var a=n.getData(),o=n.getStates();P(o,function(l){i.push({data:a,state:l,geometry:n.geometry,element:n})})}),i},r.prototype.changeData=function(t){this.update({data:t})},r.prototype.changeSize=function(t,i){this.chart.changeSize(t,i)},r.prototype.addAnnotations=function(t){var i=ye(t),n=this.chart.getController("annotation"),a=n.getComponents().map(function(s){return s.extra});n.clear(!0);for(var o=function(s){var u=a[s],c=i.findIndex(function(f){return f.id&&f.id===u.id});c!==-1&&(u=J({},u,i[c]),i.splice(c,1)),n.annotation(u)},l=0;lb){var S=w/p.length,M=Math.max(1,Math.ceil(b/S)-1),O=p.slice(0,M)+"...";_.attr("text",O)}}}}function FDt(e,r,t){EDt(e,r,t),ODt(e,r,t)}function PDt(e,r,t){return r===void 0&&(r=!0),t===void 0&&(t=!1),function(i){var n=i.options,a=i.chart,o=n.conversionTag,l=n.theme;return o&&!t&&(a.theme(J({},qt(l)?l:es(l),{columnWidthRatio:1/3})),a.annotation().shape({render:function(s,u){var c=s.addGroup({id:a.id+"-conversion-tag-group",name:"conversion-tag-group"}),f=Yn(a.geometries,function(d){return d.type==="interval"}),h={view:u,geometry:f,group:c,field:e,horizontal:r,options:MDt(o,r)},v=r?f.elements:f.elements.slice().reverse();P(v,function(d,p){p>0&&FDt(h,v[p-1],d)})}})),i}}var ju={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},jP=function(e,r){return e==="hover"?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:r}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:r}]}]};Lt(ju.hover,{start:jP(ju.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]});Lt(ju.click,{start:jP(ju.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function IDt(e){return e===void 0&&(e=!1),function(r){var t=r.chart,i=r.options,n=i.connectedArea,a=function(){t.removeInteraction(ju.hover),t.removeInteraction(ju.click)};if(!e&&n){var o=n.trigger||"hover";a(),t.interaction(ju[o],{start:jP(o,n.style)})}else a();return r}}var LDt=10,DDt=5,$Dt={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}},kDt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg=A({name:"button"},$Dt),t}return r.prototype.getButtonCfg=function(){var t=this.context.view,i=I(t,["interactions","filter-action","cfg","buttonConfig"]);return J(this.buttonCfg,i,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),n=this.drawText(i);this.drawBackground(i,n.getBBox()),this.buttonGroup=i},r.prototype.drawText=function(t){var i,n=this.getButtonCfg();return t.addShape({type:"text",name:"button-text",attrs:A({text:n.text},(i=n.textStyle)===null||i===void 0?void 0:i.default)})},r.prototype.drawBackground=function(t,i){var n,a=this.getButtonCfg(),o=As(a.padding),l=t.addShape({type:"rect",name:"button-rect",attrs:A({x:i.x-o[3],y:i.y-o[0],width:i.width+o[1]+o[3],height:i.height+o[0]+o[2]},(n=a.buttonStyle)===null||n===void 0?void 0:n.default)});return l.toBack(),t.on("mouseenter",function(){var s;l.attr((s=a.buttonStyle)===null||s===void 0?void 0:s.active)}),t.on("mouseleave",function(){var s;l.attr((s=a.buttonStyle)===null||s===void 0?void 0:s.default)}),l},r.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),n=i.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),l=Oi.transform(null,[["t",n.x-o.width-LDt,n.y+o.height+DDt]]);a.setMatrix(l)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(Ie);Et("brush-reset-button",kDt,{name:"brush-reset-button"});Lt("filter-action",{});function Ro(e){return e.isInPlot()}function yc(e,r,t){var i=r||"rect";switch(e){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Ro,action:["brush:start",i+"-mask:start",i+"-mask:show"],arg:[null,{maskStyle:t==null?void 0:t.style}]}],processing:[{trigger:"mousemove",isEnable:Ro,action:[i+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Ro,action:["brush:filter","brush:end",i+"-mask:end",i+"-mask:hide","brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{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(n){return!n.isInShape("mask")},action:[i+"-mask:start",i+"-mask:show"],arg:[{maskStyle:t==null?void 0:t.style}]},{trigger:"mask:dragstart",action:[i+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[i+"-mask:resize"]},{trigger:"mask:drag",action:[i+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[i+"-mask:end"]},{trigger:"mask:dragend",action:[i+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(n){return!n.isInPlot()},action:["element-range-highlight:clear",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",i+"-mask:hide"]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Ro,action:["brush-x:start",i+"-mask:start",i+"-mask:show"],arg:[null,{maskStyle:t==null?void 0:t.style}]}],processing:[{trigger:"mousemove",isEnable:Ro,action:[i+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Ro,action:["brush-x:filter","brush-x:end",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{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(n){return!n.isInShape("mask")},action:[i+"-mask:start",i+"-mask:show"],arg:[{maskStyle:t==null?void 0:t.style}]},{trigger:"mask:dragstart",action:[i+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[i+"-mask:resize"]},{trigger:"mask:drag",action:[i+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[i+"-mask:end"]},{trigger:"mask:dragend",action:[i+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(n){return!n.isInPlot()},action:["element-range-highlight:clear",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",i+"-mask:hide"]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Ro,action:["brush-y:start",i+"-mask:start",i+"-mask:show"],arg:[null,{maskStyle:t==null?void 0:t.style}]}],processing:[{trigger:"mousemove",isEnable:Ro,action:[i+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Ro,action:["brush-y:filter","brush-y:end",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{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(n){return!n.isInShape("mask")},action:[i+"-mask:start",i+"-mask:show"],arg:[{maskStyle:t==null?void 0:t.style}]},{trigger:"mask:dragstart",action:[i+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[i+"-mask:resize"]},{trigger:"mask:drag",action:[i+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[i+"-mask:end"]},{trigger:"mask:dragend",action:[i+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(n){return!n.isInPlot()},action:["element-range-highlight:clear",i+"-mask:end",i+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",i+"-mask:hide"]}]};default:return{}}}Lt("brush",yc("brush"));Lt("brush-highlight",yc("brush-highlight"));Lt("brush-x",yc("brush-x","x-rect"));Lt("brush-y",yc("brush-y","y-rect"));Lt("brush-x-highlight",yc("brush-x-highlight","x-rect"));Lt("brush-y-highlight",yc("brush-y-highlight","y-rect"));var tG=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function YX(e){var r=e.options,t=r.brush,i=zr(r.interactions||[],function(n){return tG.indexOf(n.type)===-1});return t!=null&&t.enabled&&(tG.forEach(function(n){var a,o=!1;switch(t.type){case"x-rect":o=n===(t.action==="highlight"?"brush-x-highlight":"brush-x");break;case"y-rect":o=n===(t.action==="highlight"?"brush-y-highlight":"brush-y");break;default:o=n===(t.action==="highlight"?"brush-highlight":"brush");break}var l={type:n,enable:o};(((a=t.mask)===null||a===void 0?void 0:a.style)||t.type)&&(l.cfg=yc(n,t.type,t.mask)),i.push(l)}),(t==null?void 0:t.action)!=="highlight"&&i.push({type:"filter-action",cfg:{buttonConfig:t.button}})),J({},e,{options:{interactions:i}})}function RDt(e){var r=e.options,t=r.legend,i=r.seriesField,n=r.isStack;return i?t!==!1&&(t=A({position:n?"right-top":"top-left"},t)):t=!1,e.options.legend=t,e}function BDt(e){var r=e.chart,t=e.options,i=t.data,n=t.columnStyle,a=t.color,o=t.columnWidthRatio,l=t.isPercent,s=t.isGroup,u=t.isStack,c=t.xField,f=t.yField,h=t.seriesField,v=t.groupField,d=t.tooltip,p=t.shape,x=l&&s&&u?bDt(i,f,[c,v],f):Fg(i,f,c,f,l),m=[];u&&h&&!s?x.forEach(function(w){var S=m.find(function(M){return M[c]===w[c]&&M[h]===w[h]});S?S[f]+=w[f]||0:m.push(A({},w))}):m=x,r.data(m);var _=l?A({formatter:function(w){return{name:s&&u?w[h]+" - "+w[v]:w[h]||w[c],value:(Number(w[f])*100).toFixed(2)+"%"}}},d):d,b=J({},e,{options:{data:m,widthRatio:o,tooltip:_,interval:{shape:p,style:n,color:a}}});return ti(b),b}function HP(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,l=i.yField,s=i.data,u=i.isPercent,c=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return It(We((r={},r[o]=n,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=A(A({},RP(s,l)),c),t)))(e)}function NDt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function GDt(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i&&n?r.legend(n,i):i===!1&&r.legend(!1),e}function zDt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=t.isRange,o=Jr(r,"interval");if(!i)o.label(!1);else{var l=i.callback,s=ue(i,["callback"]);o.label({fields:[n],callback:l,cfg:A({layout:s!=null&&s.position?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},Or(a?A({content:function(u){var c;return(c=u[n])===null||c===void 0?void 0:c.join("-")}},s):s))})}return e}function VDt(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.isGroup,a=t.isStack,o=t.groupField,l=t.data,s=t.xField,u=t.yField,c=t.seriesField;if(i===!1)r.tooltip(!1);else{var f=i;if(n&&a){var h=(f==null?void 0:f.formatter)||function(v){return{name:v[c]+" - "+v[o],value:v[u]}};f=A(A({},f),{customItems:function(v){var d=[];return P(v,function(p){var x=zr(l,function(m){return aM(m,se(p.data,[s,c]))});x.forEach(function(m){d.push(A(A(A({},p),{value:m[u],data:m,mappingData:{_origin:m}}),h(m)))})}),d}})}r.tooltip(f)}return e}function Mb(e,r){r===void 0&&(r=!1);var t=e.options,i=t.seriesField;return It(RDt,ie,Sn("columnStyle"),ks,BDt,HP,NDt,GDt,VDt,Cb,fDt,zDt,YX,Ae,ce,Xe(),PDt(t.yField,!r,!!i),IDt(!t.isStack),nc)(e)}var jDt=J({},Dt.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},interactions:[{type:"active-region"}]}),HDt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="column",t}return r.getDefaultOptions=function(){return jDt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.yField,a=i.xField,o=i.isPercent,l=this,s=l.chart,u=l.options;HP({chart:s,options:u}),this.chart.changeData(Fg(t,n,a,n,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Mb},r}(Dt);function WX(e){return e&&e.slice().reverse()}function XX(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.xAxis,o=t.yAxis,l=t.barStyle,s=t.barWidthRatio,u=t.label,c=t.data,f=t.seriesField,h=t.isStack,v=t.minBarWidth,d=t.maxBarWidth;u&&!u.position&&(u.position="left",u.layout||(u.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]));var p=t.legend;f?p!==!1&&(p=A({position:h?"top-left":"right-top",reversed:!h},p||{})):p=!1,e.options.legend=p;var x=t.tooltip;return f&&x!==!1&&(x=A({reversed:!h},x||{})),e.options.tooltip=x,r.coordinate().transpose(),Mb({chart:r,options:A(A({},t),{label:u,xField:n,yField:i,xAxis:o,yAxis:a,columnStyle:l,columnWidthRatio:s,minColumnWidth:v,maxColumnWidth:d,columnBackground:t.barBackground,data:WX(c)})},!0)}var YDt=J({},Dt.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},interactions:[{type:"active-region"}]}),WDt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bar",t}return r.getDefaultOptions=function(){return YDt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options,o=a.xField,l=a.yField,s=a.isPercent,u=A(A({},a),{xField:l,yField:o});HP({chart:n,options:u}),n.changeData(Fg(WX(t),o,l,o,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return XX},r}(Dt),UX=J({},Dt.getDefaultOptions(),{legend:{position:"right"},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}});function XDt(e,r){var t=null;return P(e,function(i){typeof i[r]=="number"&&(t+=i[r])}),t}function UDt(e,r){var t;switch(e){case"inner":return t="-30%",Ct(r)&&r.endsWith("%")?parseFloat(r)*.01>0?t:r:r<0?r:t;case"outer":return t=12,Ct(r)&&r.endsWith("%")?parseFloat(r)*.01<0?t:r:r>0?r:t;default:return r}}function zx(e,r){return qx(ph(e,r),function(t){return t[r]===0})}var qDt=[1,0,0,0,1,0,0,0,1];function YT(e,r){var t=r?ye(r):ye(qDt);return Oi.transform(t,e)}var ZDt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=Oi.getDelegationObject(this.context);if(t){var i=this.context.view,n=t.component,a=t.item,o=n.get("field");if(o){var l=i.geometries[0].elements;return l.filter(function(s){return s.getModel().data[o]===a.value})}}return[]},r.prototype.getActiveElementLabels=function(){var t=this.context.view,i=this.getActiveElements(),n=t.geometries[0].labelsContainer.getChildren();return n.filter(function(a){return i.find(function(o){return Ge(o.getData(),a.get("data"))})})},r.prototype.transfrom=function(t){t===void 0&&(t=7.5);var i=this.getActiveElements(),n=this.getActiveElementLabels();i.forEach(function(a,o){var l=n[o],s=a.geometry.coordinate;if(s.isPolar&&s.isTransposed){var u=Oi.getAngle(a.getModel(),s),c=u.startAngle,f=u.endAngle,h=(c+f)/2,v=t,d=v*Math.cos(h),p=v*Math.sin(h);a.shape.setMatrix(YT([["t",d,p]])),l.setMatrix(YT([["t",d,p]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(Ie);function QDt(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}var KDt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAnnotations=function(t){var i=t||this.context.view;return i.getController("annotation").option},r.prototype.getInitialAnnotation=function(){return this.initialAnnotation},r.prototype.init=function(){var t=this,i=this.context.view;i.removeInteraction("tooltip"),i.on("afterchangesize",function(){var n=t.getAnnotations(i);t.initialAnnotation=n})},r.prototype.change=function(t){var i=this.context,n=i.view,a=i.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=I(a,["data","data"]);if(a.type.match("legend-item")){var l=Oi.getDelegationObject(this.context),s=n.getGroupedFields()[0];if(l&&s){var u=l.item;o=n.getData().find(function(v){return v[s]===u.value})}}if(o){var c=I(t,"annotations",[]),f=I(t,"statistic",{});n.getController("annotation").clear(!0),P(c,function(v){typeof v=="object"&&n.annotation()[v.type](v)}),xb(n,{statistic:f,plotType:"pie"},o),n.render(!0)}var h=QDt(this.context);h&&h.shape.toFront()},r.prototype.reset=function(){var t=this.context.view,i=t.getController("annotation");i.clear(!0);var n=this.getInitialAnnotation();P(n,function(a){t.annotation()[a.type](a)}),t.render(!0)},r}(Ie),qX="pie-statistic";Et(qX,KDt);Lt("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]});Et("pie-legend",ZDt);Lt("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function JDt(e){var r=e.chart,t=e.options,i=t.data,n=t.angleField,a=t.colorField,o=t.color,l=t.pieStyle,s=ph(i,n);if(zx(s,n)){var u="$$percentage$$";s=s.map(function(f){var h;return A(A({},f),(h={},h[u]=1/s.length,h))}),r.data(s);var c=J({},e,{options:{xField:"1",yField:u,seriesField:a,isStack:!0,interval:{color:o,style:l},args:{zIndexReversed:!0}}});ti(c)}else{r.data(s);var c=J({},e,{options:{xField:"1",yField:n,seriesField:a,isStack:!0,interval:{color:o,style:l},args:{zIndexReversed:!0}}});ti(c)}return e}function t$t(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.colorField,o=J({},n);return t.scale(o,(r={},r[a]={type:"cat"},r)),e}function e$t(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"theta",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function r$t(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.angleField,o=r.geometries[0];if(!i)o.label(!1);else{var l=i.callback,s=ue(i,["callback"]),u=Or(s);if(u.content){var c=u.content;u.content=function(d,p,x){var m=d[n],_=d[a],b=r.getScaleByField(a),w=b==null?void 0:b.scale(_);return pt(c)?c(A(A({},d),{percent:w}),p,x):Ct(c)?EX(c,{value:_,name:m,percentage:Mt(w)&&!K(_)?(w*100).toFixed(2)+"%":null}):c}}var f={inner:"",outer:"pie-outer",spider:"pie-spider"},h=u.type?f[u.type]:"pie-outer",v=u.layout?it(u.layout)?u.layout:[u.layout]:[];u.layout=(h?[{type:h}]:[]).concat(v),o.label({fields:n?[a,n]:[a],callback:l,cfg:A(A({},u),{offset:UDt(u.type,u.offset),type:"pie"})})}return e}function ZX(e){var r=e.innerRadius,t=e.statistic,i=e.angleField,n=e.colorField,a=e.meta,o=e.locale,l=bb(o);if(r&&t){var s=J({},UX.statistic,t),u=s.title,c=s.content;return u!==!1&&(u=J({},{formatter:function(f){return f?f[n]:K(u.content)?l.get(["statistic","total"]):u.content}},u)),c!==!1&&(c=J({},{formatter:function(f,h){var v=f?f[i]:XDt(h,i),d=I(a,[i,"formatter"])||function(p){return p};return f||K(c.content)?d(v):c.content}},c)),J({},{statistic:{title:u,content:c}},e)}return e}function QX(e){var r=e.chart,t=e.options,i=ZX(t),n=i.innerRadius,a=i.statistic;return r.getController("annotation").clear(!0),It(Xe())(e),n&&a&&xb(r,{statistic:a,plotType:"pie"}),e}function i$t(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.colorField,a=t.angleField,o=t.data;if(i===!1)r.tooltip(i);else if(r.tooltip(J({},i,{shared:!1})),zx(o,a)){var l=I(i,"fields"),s=I(i,"formatter");di(I(i,"fields"))&&(l=[n,a],s=s||function(u){return{name:u[n],value:Es(u[a])}}),r.geometries[0].tooltip(l.join("*"),ff(l,s))}return e}function n$t(e){var r=e.chart,t=e.options,i=ZX(t),n=i.interactions,a=i.statistic,o=i.annotations;return P(n,function(l){var s,u;if(l.enable===!1)r.removeInteraction(l.type);else if(l.type==="pie-statistic-active"){var c=[];!((s=l.cfg)===null||s===void 0)&&s.start||(c=[{trigger:"element:mouseenter",action:qX+":change",arg:{statistic:a,annotations:o}}]),P((u=l.cfg)===null||u===void 0?void 0:u.start,function(f){c.push(A(A({},f),{arg:{statistic:a,annotations:o}}))}),r.interaction(l.type,J({},l.cfg,{start:c}))}else r.interaction(l.type,l.cfg||{})}),e}function KX(e){return It(Sn("pieStyle"),JDt,t$t,ie,e$t,Og,i$t,r$t,ks,QX,n$t,ce)(e)}var a$t=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pie",t}return r.getDefaultOptions=function(){return UX},r.prototype.changeData=function(t){this.chart.emit(Gt.BEFORE_CHANGE_DATA,$e.fromData(this.chart,Gt.BEFORE_CHANGE_DATA,null));var i=this.options,n=this.options.angleField,a=ph(i.data,n),o=ph(t,n);zx(a,n)||zx(o,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),QX({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(Gt.AFTER_CHANGE_DATA,$e.fromData(this.chart,Gt.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return KX},r}(Dt);function o$t(e){var r=e.chart,t=e.options,i=t.data,n=t.sectorStyle,a=t.color;return r.data(i),It(ti)(J({},e,{options:{marginRatio:1,interval:{style:n,color:a}}})),e}function l$t(e){var r=e.chart,t=e.options,i=t.label,n=t.xField,a=Jr(r,"interval");if(i===!1)a.label(!1);else if(qt(i)){var o=i.callback,l=i.fields,s=ue(i,["callback","fields"]),u=s.offset,c=s.layout;(u===void 0||u>=0)&&(c=c?it(c)?c:[c]:[],s.layout=zr(c,function(f){return f.type!=="limit-in-shape"}),s.layout.length||delete s.layout),a.label({fields:l||[n],callback:o,cfg:Or(s)})}else sl(Oa.WARN,i===null,"the label option must be an Object."),a.label({fields:[n]});return e}function s$t(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i===!1?r.legend(!1):n&&r.legend(n,i),e}function u$t(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function c$t(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return It(We((r={},r[a]=i,r[o]=n,r)))(e)}function f$t(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i?r.axis(a,i):r.axis(a,!1),n?r.axis(o,n):r.axis(o,!1),e}function h$t(e){It(Sn("sectorStyle"),o$t,c$t,l$t,u$t,f$t,s$t,Ir,Ae,ce,ie,Xe(),ks)(e)}var v$t=J({},Dt.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right"},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rose",t}return r.getDefaultOptions=function(){return v$t},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return h$t},r})(Dt);var d$t={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function p$t(e,r){return r=Qt({},d$t,r),g$t(e,r)}function g$t(e,r){var t=O$t();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(s){K(r[s])||t[s](r[s])}),t.words(e),r.imageMask&&t.createMask(r.imageMask);var i=t.start(),n=i._tags;n.forEach(function(s){s.x+=r.size[0]/2,s.y+=r.size[1]/2});var a=r.size,o=a[0],l=a[1];return n.push({text:"",value:0,x:0,y:0,opacity:0}),n.push({text:"",value:0,x:o,y:l,opacity:0}),n}var QS=Math.PI/180,ld=1<<11>>5,D0=1<<11;function y$t(e){return e.text}function m$t(){return"serif"}function eG(){return"normal"}function x$t(e){return e.value}function _$t(){return~~(Math.random()*2)*90}function b$t(){return 1}function w$t(e,r,t,i){if(!r.sprite){var n=e.context,a=e.ratio;n.clearRect(0,0,(ld<<5)/a,D0/a);var o=0,l=0,s=0,u=t.length;for(--i;++i>5<<5,f=~~Math.max(Math.abs(p+x),Math.abs(p-x))}else c=c+31>>5<<5;if(f>s&&(s=f),o+c>=ld<<5&&(o=0,l+=s,s=0),l+f>=D0)break;n.translate((o+(c>>1))/a,(l+(f>>1))/a),r.rotate&&n.rotate(r.rotate*QS),n.fillText(r.text,0,0),r.padding&&(n.lineWidth=2*r.padding,n.strokeText(r.text,0,0)),n.restore(),r.width=c,r.height=f,r.xoff=o,r.yoff=l,r.x1=c>>1,r.y1=f>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,o+=c}for(var _=n.getImageData(0,0,(ld<<5)/a,D0/a).data,b=[];--i>=0;)if(r=t[i],!!r.hasText){for(var c=r.width,w=c>>5,f=r.y1-r.y0,S=0;S>5),D=_[(l+F)*(ld<<5)+(o+S)<<2]?1<<31-S%32:0;b[L]|=D,M|=D}M?O=F:(r.y0++,f--,F--,l++)}r.y1=r.y0+O,r.sprite=b.slice(0,(r.y1-r.y0)*w)}}}function C$t(e,r,t){t>>=5;for(var i=e.sprite,n=e.width>>5,a=e.x-(n<<4),o=a&127,l=32-o,s=e.y1-e.y0,u=(e.y+e.y0)*t+(a>>5),c,f=0;f>>o:0))&r[u+h])return!0;u+=t}return!1}function S$t(e,r){var t=e[0],i=e[1];r.x+r.x0i.x&&(i.x=r.x+r.x1),r.y+r.y1>i.y&&(i.y=r.y+r.y1)}function A$t(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0r[0].y&&e.y+e.y0>5)*e[1]),w=s.length,S=[],M=s.map(function(D,R,H){return D.text=c.call(this,D,R,H),D.font=r.call(this,D,R,H),D.style=f.call(this,D,R,H),D.weight=i.call(this,D,R,H),D.rotate=n.call(this,D,R,H),D.size=~~t.call(this,D,R,H),D.padding=a.call(this,D,R,H),D}).sort(function(D,R){return R.size-D.size}),O=-1,F=v.board?[{x:0,y:0},{x,y:m}]:null;L();function L(){for(var D=Date.now();Date.now()-D>1,R.y=m*(l()+.5)>>1,w$t(_,R,M,O),R.hasText&&p(b,R,F)&&(S.push(R),F?v.hasImage||S$t(F,R):F=[{x:R.x+R.x0,y:R.y+R.y0},{x:R.x+R.x1,y:R.y+R.y1}],R.x-=e[0]>>1,R.y-=e[1]>>1)}v._tags=S,v._bounds=F}return v};function d(x){x.width=x.height=1;var m=Math.sqrt(x.getContext("2d").getImageData(0,0,1,1).data.length>>2);x.width=(ld<<5)/m,x.height=D0/m;var _=x.getContext("2d");return _.fillStyle=_.strokeStyle="red",_.textAlign="center",{context:_,ratio:m}}function p(x,m,_){for(var b=m.x,w=m.y,S=Math.sqrt(e[0]*e[0]+e[1]*e[1]),M=o(e),O=l()<.5?1:-1,F,L=-O,D,R;(F=M(L+=O))&&(D=~~F[0],R=~~F[1],!(Math.min(Math.abs(D),Math.abs(R))>=S));)if(m.x=b+D,m.y=w+R,!(m.x+m.x0<0||m.y+m.y0<0||m.x+m.x1>e[0]||m.y+m.y1>e[1])&&(!_||!C$t(m,x,e[0]))&&(!_||A$t(m,_))){for(var H=m.sprite,k=m.width>>5,V=e[0]>>5,U=m.x-(k<<4),B=U&127,G=32-B,N=m.y1-m.y0,W=void 0,q=(m.y+m.y0)*V+(U>>5),tt=0;tt>>B:0);q+=V}return delete m.sprite,!0}return!1}return v.createMask=function(x){var m=document.createElement("canvas"),_=e[0],b=e[1];if(!(!_||!b)){var w=_>>5,S=rG((_>>5)*b);m.width=_,m.height=b;var M=m.getContext("2d");M.drawImage(x,0,0,x.width,x.height,0,0,_,b);for(var O=M.getImageData(0,0,_,b).data,F=0;F>5),R=F*_+L<<2,H=O[R]>=250&&O[R+1]>=250&&O[R+2]>=250,k=H?1<<31-L%32:0;S[D]|=k}v.board=S,v.hasImage=!0}},v.timeInterval=function(x){u=x==null?1/0:x},v.words=function(x){s=x},v.size=function(x){e=[+x[0],+x[1]]},v.font=function(x){r=to(x)},v.fontWeight=function(x){i=to(x)},v.rotate=function(x){n=to(x)},v.spiral=function(x){o=E$t[x]||x},v.fontSize=function(x){t=to(x)},v.padding=function(x){a=to(x)},v.random=function(x){l=to(x)},v}function t6(e){var r=e.options,t=e.chart,i=t,n=i.width,a=i.height,o=i.padding,l=i.appendPadding,s=i.ele,u=r.data,c=r.imageMask,f=r.wordField,h=r.weightField,v=r.colorField,d=r.wordStyle,p=r.timeInterval,x=r.random,m=r.spiral,_=r.autoFit,b=_===void 0?!0:_,w=r.placementStrategy;if(!u||!u.length)return[];var S=d.fontFamily,M=d.fontWeight,O=d.padding,F=d.fontSize,L=D$t(u,h),D=[R$t(L),B$t(L)],R=u.map(function(V){return{text:V[f],value:V[h],color:V[v],datum:V}}),H={imageMask:c,font:S,fontSize:L$t(F,D),fontWeight:M,size:F$t({width:n,height:a,padding:o,appendPadding:l,autoFit:b,container:s}),padding:O,timeInterval:p,random:x,spiral:m,rotate:$$t(r)};if(pt(w)){var k=R.map(function(V,U,B){return A(A(A({},V),{hasText:!!V.text,font:to(H.font)(V,U,B),weight:to(H.fontWeight)(V,U,B),rotate:to(H.rotate)(V,U,B),size:to(H.fontSize)(V,U,B),style:"normal"}),w.call(t,V,U,B))});return k.push({text:"",value:0,x:0,y:0,opacity:0}),k.push({text:"",value:0,x:H.size[0],y:H.size[1],opacity:0}),k}return p$t(R,H)}function F$t(e){var r=e.width,t=e.height,i=e.container,n=e.autoFit,a=e.padding,o=e.appendPadding;if(n){var l=HT(i);r=l.width,t=l.height}r=r||400,t=t||400;var s=P$t({padding:a,appendPadding:o}),u=s[0],c=s[1],f=s[2],h=s[3],v=[r-(h+c),t-(u+f)];return v}function P$t(e){var r=As(e.padding),t=As(e.appendPadding),i=r[0]+t[0],n=r[1]+t[1],a=r[2]+t[2],o=r[3]+t[3];return[i,n,a,o]}function I$t(e){return new Promise(function(r,t){if(e instanceof HTMLImageElement){r(e);return}if(Ct(e)){var i=new Image;i.crossOrigin="anonymous",i.src=e,i.onload=function(){r(i)},i.onerror=function(){sl(Oa.ERROR,!1,"image %s load failed !!!",e),t()};return}sl(Oa.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function L$t(e,r){if(pt(e))return e;if(it(e)){var t=e[0],i=e[1];if(!r)return function(){return(i+t)/2};var n=r[0],a=r[1];return a===n?function(){return(i+t)/2}:function(l){var s=l.value;return(i-t)/(a-n)*(s-n)+t}}return function(){return e}}function D$t(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function $$t(e){var r=k$t(e),t=r.rotation,i=r.rotationSteps;if(!it(t))return t;var n=t[0],a=t[1],o=i===1?0:(a-n)/(i-1);return function(){return a===n?a:Math.floor(Math.random()*i)*o}}function k$t(e){var r=e.wordStyle.rotationSteps;return r<1&&(sl(Oa.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function R$t(e){return Math.min.apply(Math,e)}function B$t(e){return Math.max.apply(Math,e)}var YP="color",N$t=J({},Dt.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",YP],formatter:function(e){return{name:e.text,value:e.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}});function G$t(e){var r=e.chart,t=e.options,i=t.colorField,n=t.color,a=t6(e);r.data(a);var o=J({},e,{options:{xField:"x",yField:"y",seriesField:i&&YP,rawFields:pt(n)&&ye(I(t,"rawFields",[]),["datum"]),point:{color:n,shape:"word-cloud"}}}),l=An(o).ext;return l.geometry.label(!1),r.coordinate().reflect("y"),r.axis(!1),e}function z$t(e){return It(We({x:{nice:!1},y:{nice:!1}}))(e)}function V$t(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField;return i===!1?r.legend(!1):n&&r.legend(YP,i),e}function j$t(e){It(G$t,z$t,Ir,V$t,Ae,ce,ie,ks)(e)}Jt("point","word-cloud",{draw:function(e,r){var t=e.x,i=e.y,n=r.addShape("text",{attrs:A(A({},H$t(e)),{x:t,y:i})}),a=e.data.rotate;return typeof a=="number"&&Oi.rotate(n,a*Math.PI/180),n}});function H$t(e){return{fontSize:e.data.size,text:e.data.text,textAlign:"center",fontFamily:e.data.font,fontWeight:e.data.weight,fill:e.color||e.defaultStyle.stroke,textBaseline:"alphabetic"}}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="word-cloud",t}return r.getDefaultOptions=function(){return N$t},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(t6({chart:this.chart,options:this.options}))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){var t=this;return new Promise(function(i){var n=t.options.imageMask;if(!n){e.prototype.render.call(t),i();return}var a=function(o){t.options=A(A({},t.options),{imageMask:o||null}),e.prototype.render.call(t),i()};I$t(n).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return j$t},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r})(Dt);var Y$t={exp:Qa.exports.regressionExp,linear:Qa.exports.regressionLinear,loess:Qa.exports.regressionLoess,log:Qa.exports.regressionLog,poly:Qa.exports.regressionPoly,pow:Qa.exports.regressionPow,quad:Qa.exports.regressionQuad};function W$t(e,r){var t=10,i={regionStyle:[{position:{start:[e,"max"],end:["max",r]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[e,r]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",r],end:[e,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[e,r],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",r],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",r],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return i}var X$t=function(e,r){var t=r.view,i=r.options,n=i.xField,a=i.yField,o=t.getScaleByField(n),l=t.getScaleByField(a),s=e.map(function(u){return t.getCoordinate().convert({x:o.scale(u[0]),y:l.scale(u[1])})});return HLt(s,!1)},U$t=function(e){var r=e.options,t=r.xField,i=r.yField,n=r.data,a=r.regressionLine,o=a.type,l=o===void 0?"linear":o,s=a.algorithm,u;if(s)u=it(s)?s:s(n);else{var c=Y$t[l]().x(function(f){return f[t]}).y(function(f){return f[i]});u=c(n)}return X$t(u,e)},q$t=function(e){var r,t=e.meta,i=t===void 0?{}:t,n=e.xField,a=e.yField,o=e.data,l=o[0][n],s=o[0][a],u=l>0,c=s>0;function f(h,v){var d=I(i,[h]);function p(m){return I(d,m)}var x={};return v==="x"?(Mt(l)&&(Mt(p("min"))||(x.min=u?0:l*2),Mt(p("max"))||(x.max=u?l*2:0)),x):(Mt(s)&&(Mt(p("min"))||(x.min=c?0:s*2),Mt(p("max"))||(x.max=c?s*2:0)),x)}return A(A({},i),(r={},r[n]=A(A({},i[n]),f(n,"x")),r[a]=A(A({},i[a]),f(a,"y")),r))};function e6(e){var r=e.data,t=r===void 0?[]:r,i=e.xField,n=e.yField;if(t.length){for(var a=!0,o=!0,l=t[0],s=void 0,u=1;u0){var l=this.view.geometries[0],s=l.dataArray,u=o[0].name,c=[];return s.forEach(function(f){f.forEach(function(h){var v=Oi.getTooltipItems(h,l),d=v[0];if(!n&&d&&d.name===u){var p=K(a)?u:a;c.push(A(A({},d),{name:d.title,title:p}))}else if(n&&d){var p=K(a)?d.name||u:a;c.push(A(A({},d),{name:d.title,title:p}))}})}),c}return[]},r}(PF);Ls("radar-tooltip",fkt);var hkt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},r.prototype.show=function(){var t=this.context.event,i=this.getTooltipController();i.showTooltip({x:t.x,y:t.y})},r.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},r.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},r}(Ie);Et("radar-tooltip",hkt);Lt("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radar",t}return r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return J({},e.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},r.prototype.getSchemaAdaptor=function(){return ckt},r})(Dt);var gh;(function(e){e.Left="Left",e.Right="Right"})(gh||(gh={}));var ac;(function(e){e.Line="line",e.Column="column"})(ac||(ac={}));var Tn="left-axes-view",Mn="right-axes-view",i6={nice:!0,label:{autoHide:!0,autoRotate:!1}},vkt=A(A({},i6),{position:"left"}),dkt=A(A({},i6),{position:"right",grid:null});function WT(e){return I(e,"geometry")===ac.Line}function WP(e){return I(e,"geometry")===ac.Column}function iG(e,r,t){return WP(t)?J({},{geometry:ac.Column,label:t.label&&t.isRange?{content:function(i){var n;return(n=i[r])===null||n===void 0?void 0:n.join("-")}}:void 0},t):A({geometry:ac.Line},t)}function nG(e,r){var t=e[0],i=e[1];if(it(r)){var n=r[0],a=r[1];return[n,a]}var o=I(r,t),l=I(r,i);return[o,l]}function aG(e,r){return r===gh.Left?e===!1?!1:J({},vkt,e):r===gh.Right?e===!1?!1:J({},dkt,e):e}function oG(e){var r=e.view,t=e.geometryOption,i=e.yField,n=e.legend,a=I(n,"marker"),o=Jr(r,WT(t)?"line":"interval");if(!t.seriesField){var l=I(r,"options.scales."+i+".alias")||i,s=o.getAttribute("color"),u=r.getTheme().defaultColor;s&&(u=Oi.getMappingValue(s,l,I(s,["values",0],u)));var c=(pt(a)?a:!di(a)&&J({},{style:{stroke:u,fill:u}},a))||(WT(t)?{symbol:function(h,v,d){return[["M",h-d,v],["L",h+d,v]]},style:{lineWidth:2,r:6,stroke:u}}:{symbol:"square",style:{fill:u}});return[{value:i,name:l,marker:c,isGeometry:!0,viewId:r.id}]}var f=o.getGroupAttributes();return Zr(f,function(h,v){var d=Oi.getLegendItems(r,o,v,r.getTheme(),a);return h.concat(d)},[])}function pkt(e){var r=e.options,t=e.chart,i=r.geometryOption,n=i.isStack,a=i.color,o=i.seriesField,l=i.groupField,s=i.isGroup,u=["xField","yField"];if(WT(i)){Vh(J({},e,{options:A(A(A({},se(r,u)),i),{line:{color:i.color,style:i.lineStyle}})})),An(J({},e,{options:A(A(A({},se(r,u)),i),{point:i.point&&A({color:a,shape:"circle"},i.point)})}));var c=[];s&&c.push({type:"dodge",dodgeBy:l||o,customOffset:0}),n&&c.push({type:"stack"}),c.length&&P(t.geometries,function(f){f.adjust(c)})}return WP(i)&&Mb(J({},e,{options:A(A(A({},se(r,u)),i),{widthRatio:i.columnWidthRatio,interval:A(A({},se(i,["color"])),{style:i.columnStyle})})})),e}var lG=function(e,r){var t=r[0],i=r[1],n=e.getOptions().data,a=e.getXScale(),o=gr(n);if(!(!a||!o)){var l=Xn(n,a.field),s=l,u=gr(s),c=Math.floor(t*(u-1)),f=Math.floor(i*(u-1));e.filter(a.field,function(h){var v=s.indexOf(h);return v>-1?QLt(v,c,f):!0}),e.render(!0)}};function gkt(e){var r,t=e.options,i=t.geometryOptions,n=i===void 0?[]:i,a=t.xField,o=t.yField,l=qx(n,function(s){var u=s.geometry;return u===ac.Line||u===void 0});return J({},{options:{geometryOptions:[],meta:(r={},r[a]={type:"cat",sync:!0,range:l?[0,1]:void 0},r),tooltip:{showMarkers:l,showCrosshairs:l,shared:!0,crosshairs:{type:"x"}},interactions:l?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},e,{options:{yAxis:nG(o,t.yAxis),geometryOptions:[iG(a,o[0],n[0]),iG(a,o[1],n[1])],annotations:nG(o,t.annotations)}})}function ykt(e){var r,t,i=e.chart,n=e.options,a=n.geometryOptions,o={line:0,column:1},l=[{type:(r=a[0])===null||r===void 0?void 0:r.geometry,id:Tn},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:Mn}];return l.sort(function(s,u){return-o[s.type]+o[u.type]}).forEach(function(s){return i.createView({id:s.id})}),e}function mkt(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.geometryOptions,o=t.data,l=t.tooltip,s=[A(A({},a[0]),{id:Tn,data:o[0],yField:n[0]}),A(A({},a[1]),{id:Mn,data:o[1],yField:n[1]})];return s.forEach(function(u){var c=u.id,f=u.data,h=u.yField,v=WP(u)&&u.isPercent,d=v?VX(f,h,i,h):f,p=Yt(r,c).data(d),x=v?A({formatter:function(m){return{name:m[u.seriesField]||h,value:(Number(m[h])*100).toFixed(2)+"%"}}},l):l;pkt({chart:p,options:{xField:i,yField:h,tooltip:x,geometryOption:u}})}),e}function xkt(e){var r,t=e.chart,i=e.options,n=i.geometryOptions,a=((r=t.getTheme())===null||r===void 0?void 0:r.colors10)||[],o=0;return t.once("beforepaint",function(){P(n,function(l,s){var u=Yt(t,s===0?Tn:Mn);if(!l.color){var c=u.getGroupScales(),f=I(c,[0,"values","length"],1),h=a.slice(o,o+f).concat(s===0?[]:a);u.geometries.forEach(function(v){l.seriesField?v.color(l.seriesField,h):v.color(h[0])}),o+=f}}),t.render(!0)}),e}function _kt(e){var r,t,i=e.chart,n=e.options,a=n.xAxis,o=n.yAxis,l=n.xField,s=n.yField;return We((r={},r[l]=a,r[s[0]]=o[0],r))(J({},e,{chart:Yt(i,Tn)})),We((t={},t[l]=a,t[s[1]]=o[1],t))(J({},e,{chart:Yt(i,Mn)})),e}function bkt(e){var r=e.chart,t=e.options,i=Yt(r,Tn),n=Yt(r,Mn),a=t.xField,o=t.yField,l=t.xAxis,s=t.yAxis;return r.axis(a,!1),r.axis(o[0],!1),r.axis(o[1],!1),i.axis(a,l),i.axis(o[0],aG(s[0],gh.Left)),n.axis(a,!1),n.axis(o[1],aG(s[1],gh.Right)),e}function wkt(e){var r=e.chart,t=e.options,i=t.tooltip,n=Yt(r,Tn),a=Yt(r,Mn);return r.tooltip(i),n.tooltip({shared:!0}),a.tooltip({shared:!0}),e}function Ckt(e){var r=e.chart;return Ae(J({},e,{chart:Yt(r,Tn)})),Ae(J({},e,{chart:Yt(r,Mn)})),e}function Skt(e){var r=e.chart,t=e.options,i=t.annotations,n=I(i,[0]),a=I(i,[1]);return Xe(n)(J({},e,{chart:Yt(r,Tn),options:{annotations:n}})),Xe(a)(J({},e,{chart:Yt(r,Mn),options:{annotations:a}})),e}function Akt(e){var r=e.chart;return ie(J({},e,{chart:Yt(r,Tn)})),ie(J({},e,{chart:Yt(r,Mn)})),ie(e),e}function Tkt(e){var r=e.chart;return ce(J({},e,{chart:Yt(r,Tn)})),ce(J({},e,{chart:Yt(r,Mn)})),e}function Mkt(e){var r=e.chart,t=e.options,i=t.yAxis;return nc(J({},e,{chart:Yt(r,Tn),options:{yAxis:i[0]}})),nc(J({},e,{chart:Yt(r,Mn),options:{yAxis:i[1]}})),e}function Ekt(e){var r=e.chart,t=e.options,i=t.legend,n=t.geometryOptions,a=t.yField,o=t.data,l=Yt(r,Tn),s=Yt(r,Mn);if(i===!1)r.legend(!1);else if(qt(i)&&i.custom===!0)r.legend(i);else{var u=I(n,[0,"legend"],i),c=I(n,[1,"legend"],i);r.once("beforepaint",function(){var f=o[0].length?oG({view:l,geometryOption:n[0],yField:a[0],legend:u}):[],h=o[1].length?oG({view:s,geometryOption:n[1],yField:a[1],legend:c}):[];r.legend(J({},i,{custom:!0,items:f.concat(h)}))}),n[0].seriesField&&l.legend(n[0].seriesField,u),n[1].seriesField&&s.legend(n[1].seriesField,c),r.on("legend-item:click",function(f){var h=I(f,"gEvent.delegateObject",{});if(h&&h.item){var v=h.item,d=v.value,p=v.isGeometry,x=v.viewId;if(p){var m=oM(a,function(w){return w===d});if(m>-1){var _=I(Yt(r,x),"geometries");P(_,function(w){w.changeVisible(!h.item.unchecked)})}}else{var b=I(r.getController("legend"),"option.items",[]);P(r.views,function(w){var S=w.getGroupScales();P(S,function(M){M.values&&M.values.indexOf(d)>-1&&w.filter(M.field,function(O){var F=Yn(b,function(L){return L.value===O});return!F.unchecked})}),r.render(!0)})}}})}return e}function Okt(e){var r=e.chart,t=e.options,i=t.slider,n=Yt(r,Tn),a=Yt(r,Mn);return i&&(n.option("slider",i),n.on("slider:valuechanged",function(o){var l=o.event,s=l.value,u=l.originValue;Ge(s,u)||lG(a,s)}),r.once("afterpaint",function(){if(!Hu(i)){var o=i.start,l=i.end;(o||l)&&lG(a,[o,l])}})),e}function Fkt(e){return It(gkt,ykt,Akt,mkt,_kt,bkt,Mkt,wkt,Ckt,Skt,Tkt,xkt,Ekt,Okt)(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dual-axes",t}return r.prototype.getDefaultOptions=function(){return J({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return Fkt},r})(Dt);var lp="x",If="y",n6={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return""+I(r,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},Pkt={appendPadding:2,tooltip:A({},n6),animation:{}};function mc(e){return je(e||[],function(r,t){return{x:""+t,y:r}})}function Ikt(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.areaStyle,o=t.point,l=t.line,s=o==null?void 0:o.state,u=mc(i);r.data(u);var c=J({},e,{options:{xField:lp,yField:If,area:{color:n,style:a},line:l,point:o}}),f=J({},c,{options:{tooltip:!1}}),h=J({},c,{options:{tooltip:!1,state:s}});return Sb(c),Vh(f),An(h),r.axis(!1),r.legend(!1),e}function jh(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.data,l=mc(o);return It(We((r={},r[lp]=n,r[If]=a,r),(t={},t[lp]={type:"cat"},t[If]=RP(l,If),t)))(e)}function a6(e){return It(Sn("areaStyle"),Ikt,jh,Ir,ie,ce,Xe())(e)}function Lkt(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.lineStyle,o=t.point,l=o==null?void 0:o.state,s=mc(i);r.data(s);var u=J({},e,{options:{xField:lp,yField:If,line:{color:n,style:a},point:o}}),c=J({},u,{options:{tooltip:!1,state:l}});return Vh(u),An(c),r.axis(!1),r.legend(!1),e}function o6(e){return It(Lkt,jh,ie,Ir,ce,Xe())(e)}var Dkt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return r.getDefaultOptions=function(){return Pkt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;jh({chart:n,options:a}),n.changeData(mc(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return o6},r}(Dt);function $kt(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.columnStyle,o=t.columnWidthRatio,l=mc(i);r.data(l);var s=J({},e,{options:{xField:lp,yField:If,widthRatio:o,interval:{style:a,color:n}}});return ti(s),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function l6(e){return It(ie,Sn("columnStyle"),$kt,jh,Ir,ce,Xe())(e)}var kkt={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return""+I(r,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},Rkt={appendPadding:2,tooltip:A({},kkt),animation:{}},Bkt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return r.getDefaultOptions=function(){return Rkt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;jh({chart:n,options:a}),n.changeData(mc(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return l6},r}(Dt),Nkt={appendPadding:2,tooltip:A({},n6),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},Gkt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return r.getDefaultOptions=function(){return Nkt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;jh({chart:n,options:a}),n.changeData(mc(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return a6},r}(Dt);function sG(e,r,t){if(t===1)return[0,r];var i=Math.floor(e/r);return[r*i,r*(i+1)]}function zkt(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function s6(e,r,t,i,n){var a=fi(e);ZG(a,r);var o=Xn(a,r),l=lM(o),s=l.max-l.min,u=t;if(!t&&i&&(u=i>1?s/(i-1):l.max),!t&&!i){var c=zkt(o);u=s/c}var f={},h=Xi(a,n);di(h)?P(a,function(d){var p=d[r],x=sG(p,u,i),m=x[0]+"-"+x[1];po(f,m)||(f[m]={range:x,count:0}),f[m].count+=1}):Object.keys(h).forEach(function(d){P(h[d],function(p){var x=p[r],m=sG(x,u,i),_=m[0]+"-"+m[1],b=_+"-"+d;po(f,b)||(f[b]={range:m,count:0},f[b][n]=d),f[b].count+=1})});var v=[];return P(f,function(d){v.push(d)}),v}var Vx="range",sp="count",Vkt=J({},Dt.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function jkt(e){var r=e.chart,t=e.options,i=t.data,n=t.binField,a=t.binNumber,o=t.binWidth,l=t.color,s=t.stackField,u=t.legend,c=t.columnStyle,f=s6(i,n,o,a,s);r.data(f);var h=J({},e,{options:{xField:Vx,yField:sp,seriesField:s,isStack:!0,interval:{color:l,style:c}}});return ti(h),u&&s&&r.legend(s,u),e}function Hkt(e){var r,t=e.options,i=t.xAxis,n=t.yAxis;return It(We((r={},r[Vx]=i,r[sp]=n,r)))(e)}function Ykt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis;return i===!1?r.axis(Vx,!1):r.axis(Vx,i),n===!1?r.axis(sp,!1):r.axis(sp,n),e}function Wkt(e){var r=e.chart,t=e.options,i=t.label,n=Jr(r,"interval");if(!i)n.label(!1);else{var a=i.callback,o=ue(i,["callback"]);n.label({fields:[sp],callback:a,cfg:Or(o)})}return e}function u6(e){return It(ie,Sn("columnStyle"),jkt,Hkt,Ykt,ks,Wkt,Ir,Ae,ce)(e)}var Xkt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="histogram",t}return r.getDefaultOptions=function(){return Vkt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.binField,a=i.binNumber,o=i.binWidth,l=i.stackField;this.chart.changeData(s6(t,n,o,a,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return u6},r}(Dt),c6=["#FAAD14","#E8EDF3"],Ukt={percent:.2,color:c6,animation:{}};function XP(e){var r=Ce(ic(e)?e:0,0,1);return[{type:"current",percent:r},{type:"target",percent:1-r}]}function f6(e){var r=e.chart,t=e.options,i=t.percent,n=t.progressStyle,a=t.color,o=t.barWidthRatio;r.data(XP(i));var l=J({},e,{options:{xField:"1",yField:"percent",seriesField:"type",isStack:!0,widthRatio:o,interval:{style:n,color:Ct(a)?[a,c6[1]]:a},args:{zIndexReversed:!0}}});return ti(l),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function qkt(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function h6(e){return It(f6,We({}),qkt,ce,ie,Xe())(e)}var Zkt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="process",t}return r.getDefaultOptions=function(){return Ukt},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(XP(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return h6},r}(Dt);function Qkt(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius;return r.coordinate("theta",{innerRadius:i,radius:n}),e}function v6(e,r){var t=e.chart,i=e.options,n=i.innerRadius,a=i.statistic,o=i.percent,l=i.meta;if(t.getController("annotation").clear(!0),n&&a){var s=I(l,["percent","formatter"])||function(c){return(c*100).toFixed(2)+"%"},u=a.content;u&&(u=J({},u,{content:K(u.content)?s(o):u.content})),xb(t,{statistic:A(A({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return r&&t.render(!0),e}function d6(e){return It(f6,We({}),Qkt,v6,ce,ie,Xe())(e)}var Kkt={percent:.2,innerRadius:.8,radius:.98,color:["#FAAD14","#E8EDF3"],statistic:{title:!1,content:{style:{fontSize:"14px",fontWeight:300,fill:"#4D4D4D",textAlign:"center",textBaseline:"middle"}}},animation:{}},Jkt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ring-process",t}return r.getDefaultOptions=function(){return Kkt},r.prototype.changeData=function(t){this.chart.emit(Gt.BEFORE_CHANGE_DATA,$e.fromData(this.chart,Gt.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(XP(t)),v6({chart:this.chart,options:this.options},!0),this.chart.emit(Gt.AFTER_CHANGE_DATA,$e.fromData(this.chart,Gt.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return d6},r}(Dt);function tRt(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.xField,o=t.yField,l=t.colorField,s=t.sizeField,u=t.sizeRatio,c=t.shape,f=t.color,h=t.tooltip,v=t.heatmapStyle;r.data(i);var d="polygon";n==="density"&&(d="heatmap");var p=ra(h,[a,o,l]),x=p.fields,m=p.formatter,_=1;return(u||u===0)&&(!c&&!s?console.warn("sizeRatio is not in effect: Must define shape or sizeField first"):u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):_=u),Ki(J({},e,{options:{type:d,colorField:l,tooltipFields:x,shapeField:s||"",label:void 0,mapping:{tooltip:m,shape:c&&(s?function(b){var w=i.map(function(O){return O[s]}),S=Math.min.apply(Math,w),M=Math.max.apply(Math,w);return[c,(I(b,s)-S)/(M-S),_]}:function(){return[c,1,_]}),color:f||l&&r.getTheme().sequenceColors.join("-"),style:v}}})),e}function eRt(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return It(We((r={},r[a]=i,r[o]=n,r)))(e)}function rRt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function iRt(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.sizeField,o=t.sizeLegend,l=i!==!1;return n&&r.legend(n,l?i:!1),a&&r.legend(a,o===void 0?i:o),!l&&!o&&r.legend(!1),e}function nRt(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.type,o=Jr(r,a==="density"?"heatmap":"polygon");if(!i)o.label(!1);else if(n){var l=i.callback,s=ue(i,["callback"]);o.label({fields:[n],callback:l,cfg:Or(s)})}return e}function aRt(e){var r=e.chart,t=e.options,i=t.coordinate,n=t.reflect;return i&&r.coordinate({type:i.type||"rect",cfg:i.cfg}),n&&r.coordinate().reflect(n),e}function oRt(e){return It(ie,Sn("heatmapStyle"),eRt,aRt,tRt,rRt,iRt,Ir,nRt,Xe(),Ae,ce,ks)(e)}var lRt=J({},Dt.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});Jt("polygon","circle",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s)/2,c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),p=r.addShape("circle",{attrs:A(A(A({x:n,y:a,r:v},e.defaultStyle),e.style),{fill:d})});return p}});Jt("polygon","square",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s),c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),p=r.addShape("rect",{attrs:A(A(A({x:n-v/2,y:a-v/2,width:v,height:v},e.defaultStyle),e.style),{fill:d})});return p}});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t}return r.getDefaultOptions=function(){return lRt},r.prototype.getSchemaAdaptor=function(){return oRt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(Dt);var KS,yh="$$range$$",sRt="low-q1-median-q3-high",uRt="$$y_outliers$$",p6="outliers_view",cRt=J({},Dt.getDefaultOptions(),{meta:(KS={},KS[yh]={min:0,alias:sRt},KS),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),g6=function(e,r){var t=e;if(Array.isArray(r)){var i=r[0],n=r[1],a=r[2],o=r[3],l=r[4];t=je(e,function(s){return s[yh]=[s[i],s[n],s[a],s[o],s[l]],s})}return t};function fRt(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.groupField,o=t.color,l=t.tooltip,s=t.boxStyle;r.data(g6(t.data,n));var u=it(n)?yh:n,c=n?it(n)?n:[n]:[],f=l;f!==!1&&(f=J({},{fields:it(n)?n:[]},f));var h=VP(J({},e,{options:{xField:i,yField:u,seriesField:a,tooltip:f,rawFields:c,label:!1,schema:{shape:"box",color:o,style:s}}})).ext;return a&&h.geometry.adjust("dodge"),e}function hRt(e){var r=e.chart,t=e.options,i=t.xField,n=t.data,a=t.outliersField,o=t.outliersStyle,l=t.padding,s=t.label;if(!a)return e;var u=r.createView({padding:l,id:p6}),c=n.reduce(function(f,h){var v=h[a];return v.forEach(function(d){var p;return f.push(A(A({},h),(p={},p[a]=d,p)))}),f},[]);return u.data(c),An({chart:u,options:{xField:i,yField:a,point:{shape:"circle",style:o},label:s}}),u.axis(!1),e}function vRt(e){var r,t,i=e.chart,n=e.options,a=n.meta,o=n.xAxis,l=n.yAxis,s=n.xField,u=n.yField,c=n.outliersField,f=Array.isArray(u)?yh:u,h={};if(c){var v=uRt;h=(r={},r[c]={sync:v,nice:!0},r[f]={sync:v,nice:!0},r)}var d=J(h,a,(t={},t[s]=se(o,ji),t[f]=se(l,ji),t));return i.scale(d),e}function dRt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,l=Array.isArray(o)?yh:o;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(yh,!1):r.axis(l,n),e}function pRt(e){var r=e.chart,t=e.options,i=t.legend,n=t.groupField;return n?i?r.legend(n,i):r.legend(n,{position:"bottom"}):r.legend(!1),e}function gRt(e){return It(fRt,hRt,vRt,dRt,pRt,Ir,Ae,ce,ie)(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="box",t}return r.getDefaultOptions=function(){return cRt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField,n=this.chart.views.find(function(a){return a.id===p6});n&&n.data(t),this.chart.changeData(g6(t,i))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return gRt},r})(Dt);var y6={exports:{}},m6={exports:{}};(function(e){var r=e.exports;e.exports.isNumber=function(t){return typeof t=="number"},e.exports.findMin=function(t){if(t.length===0)return 1/0;for(var i=t[0],n=1;n=m.length)){var k=Math.max(H-f,0),V=H,U=Math.min(H+f,m.length-1),B=k-(H-f),G=H+f-U,N=w[-f-1+B]||0,W=w[-f-1+G]||0,q=S/(S-N-W);B>0&&(O+=q*(B-1)*M);var tt=Math.max(0,H-f+1);a.inside(0,m.length-1,tt)&&(m[tt].y+=q*1*M),a.inside(0,m.length-1,V+1)&&(m[V+1].y-=q*2*M),a.inside(0,m.length-1,U+1)&&(m[U+1].y+=q*1*M)}});var F=O,L=0,D=0;return m.forEach(function(R){L+=R.y,F+=L,R.y=F,D+=F}),D>0&&m.forEach(function(R){R.y/=D}),m};function l(s,u){for(var c={},f=0,h=-u;h<=u;h++)f+=s(h/u),c[h]=f;return c}e.exports.getExpectedValueFromPdf=function(s){if(!(!s||s.length===0)){var u=0;return s.forEach(function(c){u+=c.x*c.y}),u}},e.exports.getXWithLeftTailArea=function(s,u){if(!(!s||s.length===0)){for(var c=0,f=0,h=0;h=u));h++);return s[f].x}},e.exports.getPerplexity=function(s){if(!(!s||s.length===0)){var u=0;return s.forEach(function(c){var f=Math.log(c.y);isFinite(f)&&(u+=c.y*f)}),u=-u/i,Math.pow(2,u)}}})(y6);var yRt=y6.exports;function uG(e,r){var t=e.length*r;if(e.length===0)throw new Error("quantile requires at least one data point.");if(r<0||r>1)throw new Error("quantiles must be between 0 and 1");return r===1?e[e.length-1]:r===0?e[0]:t%1!==0?e[Math.ceil(t)-1]:e.length%2===0?(e[t-1]+e[t])/2:e[t]}function Bv(e,r,t){var i=e[r];e[r]=e[t],e[t]=i}function k0(e,r,t,i){for(t=t||0,i=i||e.length-1;i>t;){if(i-t>600){var n=i-t+1,a=r-t+1,o=Math.log(n),l=.5*Math.exp(2*o/3),s=.5*Math.sqrt(o*l*(n-l)/n);a-n/2<0&&(s*=-1);var u=Math.max(t,Math.floor(r-a*l/n+s)),c=Math.min(i,Math.floor(r+(n-a)*l/n+s));k0(e,r,u,c)}var f=e[r],h=t,v=i;for(Bv(e,t,r),e[i]>f&&Bv(e,t,i);hf;)v--}e[t]===f?Bv(e,t,v):(v++,Bv(e,v,i)),v<=r&&(t=v+1),r<=v&&(i=v-1)}}function Nv(e,r){var t=e.slice();if(Array.isArray(r)){mRt(t,r);for(var i=[],n=0;nr?r:e},lighten:function(e,r){return e>r?e:r},dodge:function(e,r){return e===255?255:(e=255*(r/255)/(1-e/255),e>255?255:e)},burn:function(e,r){return r===255?255:e===0?0:255*(1-Math.min(1,(1-r/255)/(e/255)))}},$Rt=function(e){if(!hG[e])throw new Error("unknown blend mode "+e);return hG[e]};function kRt(e,r,t){t===void 0&&(t="normal");var i=DRt($Rt(t))(f0(e),f0(r)),n=f0(e),a=n[0],o=n[1],l=n[2],s=n[3],u=f0(r),c=u[0],f=u[1],h=u[2],v=u[3],d=Number((s+v*(1-s)).toFixed(2)),p=Math.round((s*(1-v)*(a/255)+s*v*(i[0]/255)+(1-s)*v*(c/255))/d*255),x=Math.round((s*(1-v)*(o/255)+s*v*(i[1]/255)+(1-s)*v*(f/255))/d*255),m=Math.round((s*(1-v)*(l/255)+s*v*(i[2]/255)+(1-s)*v*(h/255))/d*255);return"rgba("+p+", "+x+", "+m+", "+d+")"}function f0(e){var r=e.replace("/s+/g",""),t;return typeof r=="string"&&!r.startsWith("rgba")&&!r.startsWith("#")?t=Zo.rgb2arr(Zo.toRGB(r)).concat([1]):(r.startsWith("rgba")&&(t=r.replace("rgba(","").replace(")","").split(",")),r.startsWith("#")&&(t=Zo.rgb2arr(r).concat([1])),t.map(function(i,n){return n===3?Number(i):i|0}))}function RRt(e,r,t,i){i=i||{};var n=i.maxIterations||100,a=i.tolerance||1e-10,o=e(r),l=e(t),s=t-r;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return r;if(l===0)return t;for(var u=0;u=0&&(r=c),Math.abs(s)=d[v-1].fx){var R=!1;if(w.fx>D.fx?(Ho(S,1+c,b,-c,D),S.fx=e(S),S.fx=1)break;for(p=1;pl+a*n*s||u>=m)x=n;else{if(Math.abs(f)<=-o*s)return n;f*(x-p)>=0&&(x=p),p=n,m=u}return 0}for(var d=0;d<10;++d){if(Ho(i.x,1,t.x,n,r),u=i.fx=e(i.x,i.fxprime),f=Lf(i.fxprime,r),u>l+a*n*s||d&&u>=c)return v(h,n,c);if(Math.abs(f)<=-o*s)return n;if(f>=0)return v(n,h,u);c=u,h=n,n*=2}return n}function NRt(e,r,t){var i={x:r.slice(),fx:0,fxprime:r.slice()},n={x:r.slice(),fx:0,fxprime:r.slice()},a=r.slice(),o,l,s=1,u;t=t||{},u=t.maxIterations||r.length*20,i.fx=e(i.x,i.fxprime),o=i.fxprime.slice(),qT(o,i.fxprime,-1);for(var c=0;c1){var s=O6(i);for(o=0;o-1){var p=e[f.parentIndex[d]],x=Math.atan2(f.x-p.x,f.y-p.y),m=Math.atan2(c.x-p.x,c.y-p.y),_=m-x;_<0&&(_+=2*Math.PI);var b=m-_/2,w=Ta(h,{x:p.x+p.radius*Math.sin(b),y:p.y+p.radius*Math.cos(b)});w>p.radius*2&&(w=p.radius*2),(v===null||v.width>w)&&(v={circle:p,width:w,p1:f,p2:c})}v!==null&&(l.push(v),n+=ZT(v.circle.radius,v.width),c=f)}}else{var S=e[0];for(o=1;oMath.abs(S.radius-e[o].radius)){M=!0;break}M?n=a=0:(n=S.radius*S.radius*Math.PI,l.push({circle:S,p1:{x:S.x,y:S.y+S.radius},p2:{x:S.x-T6,y:S.y+S.radius},width:S.radius*2}))}return a/=2,r&&(r.area=n+a,r.arcArea=n,r.polygonArea=a,r.arcs=l,r.innerPoints=i,r.intersectionPoints=t),n+a}function GRt(e,r){for(var t=0;tr[t].radius+T6)return!1;return!0}function zRt(e){for(var r=[],t=0;t=e+r)return 0;if(t<=Math.abs(e-r))return Math.PI*Math.min(e,r)*Math.min(e,r);var i=e-(t*t-r*r+e*e)/(2*t),n=r-(t*t-e*e+r*r)/(2*t);return ZT(e,i)+ZT(r,n)}function E6(e,r){var t=Ta(e,r),i=e.radius,n=r.radius;if(t>=i+n||t<=Math.abs(i-n))return[];var a=(i*i-n*n+t*t)/(2*t),o=Math.sqrt(i*i-a*a),l=e.x+a*(r.x-e.x)/t,s=e.y+a*(r.y-e.y)/t,u=-(r.y-e.y)*(o/t),c=-(r.x-e.x)*(o/t);return[{x:l+u,y:s-c},{x:l-u,y:s+c}]}function O6(e){for(var r={x:0,y:0},t=0;tu?1:-1}),i=0;i=Math.min(r[o].size,r[l].size)?f=1:a.size<=1e-10&&(f=-1),n[o][l]=n[l][o]=f}),{distances:i,constraints:n}}function YRt(e,r,t,i){var n=0,a;for(a=0;a0&&d<=f||h<0&&d>=f||(n+=2*p*p,r[2*a]+=4*p*(o-u),r[2*a+1]+=4*p*(l-c),r[2*s]+=4*p*(u-o),r[2*s+1]+=4*p*(c-l))}return n}function WRt(e,r){var t=URt(e,r),i=r.lossFunction||ZP;if(e.length>=8){var n=XRt(e,r),a=i(n,e),o=i(t,e);a+1e-8=Math.min(i[c].size,i[f].size)&&(u=0),n[c].push({set:f,size:s.size,weight:u}),n[f].push({set:c,size:s.size,weight:u})}var h=[];for(a in n)if(n.hasOwnProperty(a)){for(var v=0,o=0;o=o&&(a=t[i],o=l)}var s=A6(function(h){return-1*JS({x:h[0],y:h[1]},e,r)},[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:s[0],y:s[1]},c=!0;for(i=0;ie[i].radius){c=!1;break}for(i=0;i0&&console.log("WARNING: area "+a+" not represented on screen")}return t}function JRt(e,r,t){var i=[],n=e-t,a=r;return i.push("M",n,a),i.push("A",t,t,0,1,0,n+2*t,a),i.push("A",t,t,0,1,0,n,a),i.join(" ")}function tBt(e){var r={};qP(e,r);var t=r.arcs;if(t.length===0)return"M 0 0";if(t.length==1){var i=t[0].circle;return JRt(i.x,i.y,i.radius)}else{for(var n=[` M`,t[0].p2.x,t[0].p2.y],a=0;al;n.push(` A`,l,l,0,s?1:0,1,o.p1.x,o.p1.y)}return n.join(" ")}}var rl="id",KT="path",eBt={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(e){return{name:e.id,value:e.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]},rBt=sc(function(e,r,t,i){var n=new Map,a=e.length;return r.forEach(function(o,l){if(o[i].length===1)n.set(o[rl],e[(l+a)%a]);else{var s=o[i].map(function(u){return n.get(u)});n.set(o[rl],s.slice(1).reduce(function(u,c){return kRt(u,c,t)},s[0]))}}),n},function(){for(var e=[],r=0;r0;)u-=Math.PI*2;u=u/Math.PI/2*t;var c=a-e+u-e*2;s.push(["M",c,r]);for(var f=0,h=0;h1?i+"_"+p:""+i},x[t]=t?f[t]:String(h),x[i]=d,x))}),l.push((v={tKey:""+a},v[t]=t?f[t]:String(h),v[a]=f[a],v)),s.push(f[n],f[i],f[a])});var u=Math.min.apply(Math,s.flat(1/0)),c=Math.max.apply(Math,s.flat(1/0));return u=u>0?0:u,o==="vertical"&&l.reverse(),{min:u,max:c,ds:l}}function gNt(e){var r=e.chart,t=e.options,i=t.bulletStyle,n=t.targetField,a=t.rangeField,o=t.measureField,l=t.xField,s=t.color,u=t.layout,c=t.size,f=t.label,h=z6(t),v=h.min,d=h.max,p=h.ds;r.data(p);var x=J({},e,{options:{xField:l,yField:a,seriesField:"rKey",isStack:!0,label:I(f,"range"),interval:{color:I(s,"range"),style:I(i,"range"),size:I(c,"range")}}});ti(x),r.geometries[0].tooltip(!1);var m=J({},e,{options:{xField:l,yField:o,seriesField:"mKey",isStack:!0,label:I(f,"measure"),interval:{color:I(s,"measure"),style:I(i,"measure"),size:I(c,"measure")}}});ti(m);var _=J({},e,{options:{xField:l,yField:n,seriesField:"tKey",label:I(f,"target"),point:{color:I(s,"target"),style:I(i,"target"),size:pt(I(c,"target"))?function(b){return I(c,"target")(b)/2}:I(c,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return An(_),u==="horizontal"&&r.coordinate().transpose(),A(A({},e),{ext:{data:{min:v,max:d}}})}function V6(e){var r,t,i=e.options,n=e.ext,a=i.xAxis,o=i.yAxis,l=i.targetField,s=i.rangeField,u=i.measureField,c=i.xField,f=n.data;return It(We((r={},r[c]=a,r[u]=o,r),(t={},t[u]={min:f==null?void 0:f.min,max:f==null?void 0:f.max,sync:!0},t[l]={sync:""+u},t[s]={sync:""+u},t)))(e)}function yNt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.measureField,l=t.rangeField,s=t.targetField;return r.axis(""+l,!1),r.axis(""+s,!1),i===!1?r.axis(""+a,!1):r.axis(""+a,i),n===!1?r.axis(""+o,!1):r.axis(""+o,n),e}function mNt(e){var r=e.chart,t=e.options,i=t.legend;return r.removeInteraction("legend-filter"),r.legend(i),r.legend("rKey",!1),r.legend("mKey",!1),r.legend("tKey",!1),e}function xNt(e){var r=e.chart,t=e.options,i=t.label,n=t.measureField,a=t.targetField,o=t.rangeField,l=r.geometries,s=l[0],u=l[1],c=l[2];return I(i,"range")?s.label(""+o,A({layout:[{type:"limit-in-plot"}]},Or(i.range))):s.label(!1),I(i,"measure")?u.label(""+n,A({layout:[{type:"limit-in-plot"}]},Or(i.measure))):u.label(!1),I(i,"target")?c.label(""+a,A({layout:[{type:"limit-in-plot"}]},Or(i.target))):c.label(!1),e}function _Nt(e){It(gNt,V6,yNt,mNt,ie,xNt,Ir,Ae,ce)(e)}var bNt=J({},Dt.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bullet",t}return r.getDefaultOptions=function(){return bNt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=z6(this.options),n=i.min,a=i.max,o=i.ds;V6({options:this.options,ext:{data:{min:n,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return _Nt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(Dt);var j6="nodeIndex",H6="childNodeCount",KP="nodeAncestor",eA="Invalid field: it must be a string!";function JP(e,r){var t=e.field,i=e.fields;if(Ct(t))return t;if(it(t))return console.warn(eA),t[0];if(console.warn(eA+" will try to get fields instead."),Ct(i))return i;if(it(i)&&i.length)return i[0];if(r)return r;throw new TypeError(eA)}function tI(e){var r=[];if(e&&e.each){var t,i;e.each(function(n){var a,o;n.parent!==t?(t=n.parent,i=0):i+=1;var l=zr((((a=n.ancestors)===null||a===void 0?void 0:a.call(n))||[]).map(function(s){return r.find(function(u){return u.name===s.name})||s}),function(s){var u=s.depth;return u>0&&u1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},r.prototype.getButtonCfg=function(){var t=this.context.view,i=I(t,["interactions","drill-down","cfg","drillDownConfig"]);return J(this.breadCrumbCfg,i==null?void 0:i.breadCrumb,this.cfg)},r.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},r.prototype.drawBreadCrumbGroup=function(){var t=this,i=this.getButtonCfg(),n=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:mG});var a=0;n.forEach(function(o,l){var s=t.breadCrumbGroup.addShape({type:"text",id:o.id,name:mG+"_"+o.name+"_text",attrs:A(A({text:l===0&&!K(i.rootText)?i.rootText:o.name},i.textStyle),{x:a,y:0})}),u=s.getBBox();if(a+=u.width+gG,s.on("click",function(h){var v,d=h.target.get("id");if(d!==((v=nr(n))===null||v===void 0?void 0:v.id)){var p=n.slice(0,n.findIndex(function(x){return x.id===d})+1);t.backTo(p)}}),s.on("mouseenter",function(h){var v,d=h.target.get("id");d!==((v=nr(n))===null||v===void 0?void 0:v.id)?s.attr(i.activeTextStyle):s.attr({cursor:"default"})}),s.on("mouseleave",function(){s.attr(i.textStyle)}),l0&&h.depth>o)return null;for(var b=h.data.name,w=A({},h);w.depth>1;)b=((d=w.parent.data)===null||d===void 0?void 0:d.name)+" / "+b,w=w.parent;var S=A(A(A({},se(h.data,ye(i||[],[a.field]))),(v={},v[hp]=b,v[eI]=w.data.name,v)),h);s&&(S[s]=h.data[s]||((x=(p=h.parent)===null||p===void 0?void 0:p.data)===null||x===void 0?void 0:x[s])),t&&(S[t]=h.data[t]||((_=(m=h.parent)===null||m===void 0?void 0:m.data)===null||_===void 0?void 0:_[t])),S.ext=a,S[vp]={hierarchyConfig:a,colorField:t,rawFields:i},f.push(S)}),f}function PNt(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=n===void 0?eI:n,o=t.sunburstStyle,l=t.rawFields,s=l===void 0?[]:l,u=X6(t);r.data(u);var c;return o&&(c=function(f){return J({},{fillOpacity:Math.pow(.85,f.depth)},pt(o)?o(f):o)}),Ab(J({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:ss(ye(wNt,s)),polygon:{color:i,style:c}}})),e}function INt(e){var r=e.chart;return r.axis(!1),e}function LNt(e){var r=e.chart;return r.legend(!1),e}function DNt(e){var r=e.chart,t=e.options,i=t.label,n=Jr(r,"polygon");if(!i)n.label(!1);else{var a=i.fields,o=a===void 0?["name"]:a,l=i.callback,s=ue(i,["fields","callback"]);n.label({fields:o,callback:l,cfg:Or(s)})}return e}function $Nt(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius,a=t.reflect,o=r.coordinate({type:"polar",cfg:{innerRadius:i,radius:n}});return a&&o.reflect(a),e}function kNt(e){var r,t=e.options,i=t.hierarchyConfig,n=t.meta;return It(We({},(r={},r[Y6]=I(n,I(i,["field"],"value")),r)))(e)}function RNt(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;I(i,"fields")||(n=J({},{customItems:function(a){return a.map(function(o){var l=I(r.getOptions(),"scales"),s=I(l,[hp,"formatter"],function(c){return c}),u=I(l,[Y6,"formatter"],function(c){return c});return A(A({},o),{name:s(o.data[hp]),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function BNt(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return r!=null&&r.enabled?J({},e,{interactions:ye(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:X6}}])}):e}function NNt(e){var r=e.chart,t=e.options,i=t.drilldown;return Ae({chart:r,options:BNt(t)}),i!=null&&i.enabled&&(r.appendPadding=_b(r.appendPadding,I(i,["breadCrumb","position"]))),e}function GNt(e){return It(ie,Sn("sunburstStyle"),PNt,INt,kNt,LNt,$Nt,RNt,DNt,NNt,ce,Xe())(e)}function xG(e){var r=I(e,["event","data","data"],{});return it(r.children)&&r.children.length>0}function _G(e){var r=e.view.getCoordinate(),t=r.innerRadius;if(t){var i=e.event,n=i.x,a=i.y,o=r.center,l=o.x,s=o.y,u=r.getRadius()*t,c=Math.sqrt(Math.pow(l-n,2)+Math.pow(s-a,2));return c0&&l<1){var h=c-u;f=h/a/(l/(1-l)+1-1/a)}for(var v=f/(1-l)*l,d=r.addGroup(),p=this.coordinate.getCenter(),x=this.coordinate.getRadius(),m=Oi.getAngle(e,this.coordinate),_=m.startAngle,b=m.endAngle,w=_;w0?c:f},d=J({},e,{options:{xField:n,yField:Hn,seriesField:n,rawFields:[a,Fb,tM,Hn],widthRatio:s,interval:{style:u,shape:"waterfall",color:v}}}),p=ti(d).ext,x=p.geometry;return x.customInfo({leaderLine:l}),e}function tGt(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,l=i.yField,s=i.meta,u=J({},{alias:l},I(s,l));return It(We((r={},r[o]=n,r[l]=a,r[Hn]=a,r),J({},s,(t={},t[Hn]=u,t[Fb]=u,t[rI]=u,t))))(e)}function eGt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?(r.axis(o,!1),r.axis(Hn,!1)):(r.axis(o,n),r.axis(Hn,n)),e}function rGt(e){var r=e.chart,t=e.options,i=t.legend,n=t.total,a=t.risingFill,o=t.fallingFill,l=t.locale,s=bb(l);if(i===!1)r.legend(!1);else{var u=[{name:s.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:s.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:o}}}];n&&u.push({name:n.label||"",value:"total",marker:{symbol:"square",style:J({},{r:5},I(n,"style"))}}),r.legend(J({},{custom:!0,position:"top",items:u},i)),r.removeInteraction("legend-filter")}return e}function iGt(e){var r=e.chart,t=e.options,i=t.label,n=t.labelMode,a=t.xField,o=Jr(r,"interval");if(!i)o.label(!1);else{var l=i.callback,s=ue(i,["callback"]);o.label({fields:n==="absolute"?[rI,a]:[Fb,a],callback:l,cfg:Or(s)})}return e}function nGt(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.xField,a=t.yField;if(i!==!1){r.tooltip(A({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},i));var o=r.geometries[0];i!=null&&i.formatter?o.tooltip(n+"*"+a,i.formatter):o.tooltip(a)}else r.tooltip(!1);return e}function aGt(e){return It(KNt,ie,JNt,tGt,eGt,rGt,nGt,iGt,ks,Ae,ce,Xe())(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="waterfall",t}return r.getDefaultOptions=function(){return UNt},r.prototype.changeData=function(t){var i=this.options,n=i.xField,a=i.yField,o=i.total;this.updateOption({data:t}),this.chart.changeData(eU(t,n,a,o))},r.prototype.getSchemaAdaptor=function(){return aGt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(Dt);function oGt(e,r,t){var i=t.map(function(o){return o[r]}).filter(function(o){return o!==void 0}),n=i.length>0?Math.max.apply(Math,i):0,a=Math.abs(e)%360;return a?n*360/a:n}function lGt(e,r,t){var i=[];return e.forEach(function(n){var a=i.find(function(o){return o[r]===n[r]});a?a[t]+=n[t]||null:i.push(A({},n))}),i}function sGt(e){var r=e.chart,t=e.options,i=t.barStyle,n=t.color,a=t.tooltip,o=t.colorField,l=t.type,s=t.xField,u=t.yField,c=t.data,f=ph(c,u);r.data(f);var h=J({},e,{options:{tooltip:a,seriesField:o,interval:{style:i,color:n,shape:l==="line"?"line":"intervel"},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return ti(h),l==="line"&&An({chart:r,options:{xField:s,yField:u,seriesField:o,point:{shape:"circle",color:n}}}),e}function rU(e){var r,t=e.options,i=t.yField,n=t.xField,a=t.data,o=t.isStack,l=t.isGroup,s=t.colorField,u=t.maxAngle,c=o&&!l&&s?lGt(a,n,i):a,f=ph(c,i);return It(We((r={},r[i]={min:0,max:oGt(u,i,f)},r)))(e)}function uGt(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}).transpose(),e}function cGt(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis;return r.axis(i,n),e}function fGt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Jr(r,"interval");if(!i)a.label(!1);else{var o=i.callback,l=ue(i,["callback"]);a.label({fields:[n],callback:o,cfg:A(A({},Or(l)),{type:"polar"})})}return e}function hGt(e){return It(Sn("barStyle"),sGt,rU,cGt,uGt,Ae,ce,ie,Ir,Og,Xe(),fGt)(e)}var vGt=J({},Dt.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radial-bar",t}return r.getDefaultOptions=function(){return vGt},r.prototype.changeData=function(t){this.updateOption({data:t}),rU({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return hGt},r})(Dt);var go="first-axes-view",yo="second-axes-view",Iu="series-field-key";function iU(e,r,t,i,n){var a=[];r.forEach(function(f){i.forEach(function(h){var v,d=(v={},v[e]=h[e],v[t]=f,v[f]=h[f],v);a.push(d)})});var o=Object.values(Xi(a,t)),l=o[0],s=l===void 0?[]:l,u=o[1],c=u===void 0?[]:u;return n?[s.reverse(),c.reverse()]:[s,c]}function Uo(e){return e!=="vertical"}function dGt(e,r,t){var i=r[0],n=r[1],a=i.autoPadding,o=n.autoPadding,l=e.__axisPosition,s=l.layout,u=l.position;if(Uo(s)&&u==="top"&&(i.autoPadding=t.instance(a.top,0,a.bottom,a.left),n.autoPadding=t.instance(o.top,a.left,o.bottom,0)),Uo(s)&&u==="bottom"&&(i.autoPadding=t.instance(a.top,a.right/2+5,a.bottom,a.left),n.autoPadding=t.instance(o.top,o.right,o.bottom,a.right/2+5)),!Uo(s)&&u==="bottom"){var c=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,a.bottom/2+5,c),n.autoPadding=t.instance(a.bottom/2+5,o.right,o.bottom,c)}if(!Uo(s)&&u==="top"){var c=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,0,c),n.autoPadding=t.instance(0,o.right,a.top,c)}}function pGt(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.color,l=t.barStyle,s=t.widthRatio,u=t.legend,c=t.layout,f=iU(n,a,Iu,i,Uo(c));u?r.legend(Iu,u):u===!1&&r.legend(!1);var h,v,d=f[0],p=f[1];Uo(c)?(h=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:go}),h.coordinate().transpose().reflect("x"),v=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:yo}),v.coordinate().transpose(),h.data(d),v.data(p)):(h=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:go}),v=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:yo}),v.coordinate().reflect("y"),h.data(d),v.data(p));var x=J({},e,{chart:h,options:{widthRatio:s,xField:n,yField:a[0],seriesField:Iu,interval:{color:o,style:l}}});ti(x);var m=J({},e,{chart:v,options:{xField:n,yField:a[1],seriesField:Iu,widthRatio:s,interval:{color:o,style:l}}});return ti(m),e}function gGt(e){var r,t,i,n=e.options,a=e.chart,o=n.xAxis,l=n.yAxis,s=n.xField,u=n.yField,c=Yt(a,go),f=Yt(a,yo),h={};return oc((n==null?void 0:n.meta)||{}).map(function(v){I(n==null?void 0:n.meta,[v,"alias"])&&(h[v]=n.meta[v].alias)}),a.scale((r={},r[Iu]={sync:!0,formatter:function(v){return I(h,v,v)}},r)),We((t={},t[s]=o,t[u[0]]=l[u[0]],t))(J({},e,{chart:c})),We((i={},i[s]=o,i[u[1]]=l[u[1]],i))(J({},e,{chart:f})),e}function yGt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,l=t.layout,s=Yt(r,go),u=Yt(r,yo);return(i==null?void 0:i.position)==="bottom"?u.axis(a,A(A({},i),{label:{formatter:function(){return""}}})):u.axis(a,!1),i===!1?s.axis(a,!1):s.axis(a,A({position:Uo(l)?"top":"bottom"},i)),n===!1?(s.axis(o[0],!1),u.axis(o[1],!1)):(s.axis(o[0],n[o[0]]),u.axis(o[1],n[o[1]])),r.__axisPosition={position:s.getOptions().axes[a].position,layout:l},e}function mGt(e){var r=e.chart;return Ae(J({},e,{chart:Yt(r,go)})),Ae(J({},e,{chart:Yt(r,yo)})),e}function xGt(e){var r=e.chart,t=e.options,i=t.yField,n=t.yAxis;return nc(J({},e,{chart:Yt(r,go),options:{yAxis:n[i[0]]}})),nc(J({},e,{chart:Yt(r,yo),options:{yAxis:n[i[1]]}})),e}function _Gt(e){var r=e.chart;return ie(J({},e,{chart:Yt(r,go)})),ie(J({},e,{chart:Yt(r,yo)})),e}function bGt(e){var r=e.chart;return ce(J({},e,{chart:Yt(r,go)})),ce(J({},e,{chart:Yt(r,yo)})),e}function wGt(e){var r=this,t,i,n=e.chart,a=e.options,o=a.label,l=a.yField,s=a.layout,u=Yt(n,go),c=Yt(n,yo),f=Jr(u,"interval"),h=Jr(c,"interval");if(!o)f.label(!1),h.label(!1);else{var v=o.callback,d=ue(o,["callback"]);d.position||(d.position="middle"),d.offset===void 0&&(d.offset=2);var p=A({},d);if(Uo(s)){var x=((t=p.style)===null||t===void 0?void 0:t.textAlign)||(d.position==="middle"?"center":"left");d.style=J({},d.style,{textAlign:x});var m={left:"right",right:"left",center:"center"};p.style=J({},p.style,{textAlign:m[x]})}else{var _={top:"bottom",bottom:"top",middle:"middle"};typeof d.position=="string"?d.position=_[d.position]:typeof d.position=="function"&&(d.position=function(){for(var S=[],M=0;MN)throw new Error("circular link");W=q,q=new Set}if(u)for(var ot=Math.max(iA(G,function(et){return et.depth})+1,0),st=void 0,Z=0;ZN)throw new Error("circular link");W=q,q=new Set}}function w(B){for(var G=B.nodes,N=Math.max(iA(G,function(ht){return ht.depth})+1,0),W=(t-e-n)/(N-1),q=new Array(N).fill(0).map(function(){return[]}),tt=0,ot=G;tt0){var Bt=(et/lt-Z.y0)*G;Z.y0+=Bt,Z.y1+=Bt,H(Z)}}c===void 0&&tt.sort(Hx),tt.length&&L(tt,N)}}function F(B,G,N){for(var W=B.length,q=W-2;q>=0;--q){for(var tt=B[q],ot=0,st=tt;ot0){var Bt=(et/lt-Z.y0)*G;Z.y0+=Bt,Z.y1+=Bt,H(Z)}}c===void 0&&tt.sort(Hx),tt.length&&L(tt,N)}}function L(B,G){var N=B.length>>1,W=B[N];R(B,W.y0-o,N-1,G),D(B,W.y1+o,N+1,G),R(B,i,B.length-1,G),D(B,r,0,G)}function D(B,G,N,W){for(;N1e-6&&(q.y0+=tt,q.y1+=tt),G=q.y1+o}}function R(B,G,N,W){for(;N>=0;--N){var q=B[N],tt=(q.y1-G)*W;tt>1e-6&&(q.y0-=tt,q.y1-=tt),G=q.y0-o}}function H(B){var G=B.sourceLinks,N=B.targetLinks;if(f===void 0){for(var W=0,q=N;W "+n,value:a}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},r.prototype.changeData=function(t){this.updateOption({data:t});var i=oU(this.options,this.chart.width,this.chart.height),n=i.nodes,a=i.edges,o=Yt(this.chart,oI),l=Yt(this.chart,lI);o.changeData(n),l.changeData(a)},r.prototype.getSchemaAdaptor=function(){return ezt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(Dt);var izt={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(e){return e.id},source:function(e){return e.source},target:function(e){return e.target},sourceWeight:function(e){return e.value||1},targetWeight:function(e){return e.value||1},sortBy:null};function nzt(e,r,t){P(e,function(i,n){i.inEdges=r.filter(function(a){return""+t.target(a)==""+n}),i.outEdges=r.filter(function(a){return""+t.source(a)==""+n}),i.edges=i.outEdges.concat(i.inEdges),i.frequency=i.edges.length,i.value=0,i.inEdges.forEach(function(a){i.value+=t.targetWeight(a)}),i.outEdges.forEach(function(a){i.value+=t.sourceWeight(a)})})}function azt(e,r){var t={weight:function(n,a){return a.value-n.value},frequency:function(n,a){return a.frequency-n.frequency},id:function(n,a){return(""+r.id(n)).localeCompare(""+r.id(a))}},i=t[r.sortBy];!i&&pt(r.sortBy)&&(i=r.sortBy),i&&e.sort(i)}function ozt(e,r){var t=e.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(r.weight){var i=r.nodePaddingRatio;if(i<0||i>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var n=i/(2*t),a=r.nodeWidthRatio;if(a<=0||a>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var o=0;e.forEach(function(s){o+=s.value}),e.forEach(function(s){s.weight=s.value/o,s.width=s.weight*(1-i),s.height=a}),e.forEach(function(s,u){for(var c=0,f=u-1;f>=0;f--)c+=e[f].width+2*n;var h=s.minX=n+c,v=s.maxX=s.minX+s.width,d=s.minY=r.y-a/2,p=s.maxY=d+a;s.x=[h,v,v,h],s.y=[d,d,p,p]})}else{var l=1/t;e.forEach(function(s,u){s.x=(u+.5)*l,s.y=r.y})}return e}function lzt(e,r,t){if(t.weight){var i={};P(e,function(n,a){i[a]=n.value}),r.forEach(function(n){var a=t.source(n),o=t.target(n),l=e[a],s=e[o];if(l&&s){var u=i[a],c=t.sourceWeight(n),f=l.minX+(l.value-u)/l.value*l.width,h=f+c/l.value*l.width;i[a]-=c;var v=i[o],d=t.targetWeight(n),p=s.minX+(s.value-v)/s.value*s.width,x=p+d/s.value*s.width;i[o]-=d;var m=t.y;n.x=[f,h,p,x],n.y=[m,m,m,m],n.source=l,n.target=s}})}else r.forEach(function(n){var a=e[t.source(n)],o=e[t.target(n)];a&&o&&(n.x=[a.x,o.x],n.y=[a.y,o.y],n.source=a,n.target=o)});return r}function szt(e){return Qt({},izt,e)}function uzt(e,r){var t=szt(e),i={},n=r.nodes,a=r.links;n.forEach(function(s){var u=t.id(s);i[u]=s}),nzt(i,a,t),azt(n,t);var o=ozt(n,t),l=lzt(i,a,t);return{nodes:o,links:l}}var lU="x",sU="y",uU="name",cU="source",czt={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(e,r){var t=(e[0]+e[1])/2,i=t>.5?-4:4;return{labelEmit:!0,style:{fill:"#8c8c8c"},offsetX:i,content:r}}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!I(e,[0,"data","isNode"])},formatter:function(e){var r=e.source,t=e.target,i=e.value;return{name:r+" -> "+t,value:i}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function fzt(e){var r=e.options,t=r.data,i=r.sourceField,n=r.targetField,a=r.weightField,o=r.nodePaddingRatio,l=r.nodeWidthRatio,s=r.rawFields,u=s===void 0?[]:s,c=LX(t,i,n,a),f=uzt({weight:!0,nodePaddingRatio:o,nodeWidthRatio:l},c),h=f.nodes,v=f.links,d=h.map(function(x){return A(A({},se(x,ye(["id","x","y","name"],u))),{isNode:!0})}),p=v.map(function(x){return A(A({source:x.source.name,target:x.target.name,name:x.source.name||x.target.name},se(x,ye(["x","y","value"],u))),{isNode:!1})});return A(A({},e),{ext:A(A({},e.ext),{chordData:{nodesData:d,edgesData:p}})})}function hzt(e){var r,t=e.chart;return t.scale((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},r[uU]={sync:"color"},r[cU]={sync:"color"},r)),e}function vzt(e){var r=e.chart;return r.axis(!1),e}function dzt(e){var r=e.chart;return r.legend(!1),e}function pzt(e){var r=e.chart,t=e.options,i=t.tooltip;return r.tooltip(i),e}function gzt(e){var r=e.chart;return r.coordinate("polar").reflect("y"),e}function yzt(e){var r=e.chart,t=e.options,i=e.ext.chordData.nodesData,n=t.nodeStyle,a=t.label,o=t.tooltip,l=r.createView();return l.data(i),Ab({chart:l,options:{xField:lU,yField:sU,seriesField:uU,polygon:{style:n},label:a,tooltip:o}}),e}function mzt(e){var r=e.chart,t=e.options,i=e.ext.chordData.edgesData,n=t.edgeStyle,a=t.tooltip,o=r.createView();o.data(i);var l={xField:lU,yField:sU,seriesField:cU,edge:{style:n,shape:"arc"},tooltip:a};return BX({chart:o,options:l}),e}function xzt(e){var r=e.chart,t=e.options,i=t.animation;return typeof i=="boolean"?r.animate(i):r.animate(!0),P(GLt(r),function(n){n.animate(i)}),e}function _zt(e){return It(ie,fzt,gzt,hzt,vzt,dzt,pzt,mzt,yzt,Ae,ks,xzt)(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="chord",t}return r.getDefaultOptions=function(){return czt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return _zt},r})(Dt);var bzt={field:"value",as:["x","y","r"],sort:function(e,r){return r.value-e.value}};function wzt(e,r){r=Qt({},bzt,r);var t=r.as;if(!it(t)||t.length!==3)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');var i;try{i=JP(r)}catch(u){console.warn(u)}var n=function(u){return C4().size(r.size).padding(r.padding)(Nh(u).sum(function(c){return c[i]}).sort(r.sort))},a=n(e),o=t[0],l=t[1],s=t[2];return a.each(function(u){u[o]=u.x,u[l]=u.y,u[s]=u.r}),tI(a)}function fU(e){var r=e.data,t=e.hierarchyConfig,i=e.rawFields,n=i===void 0?[]:i,a=e.enableDrillDown,o=wzt(r,A(A({},t),{field:"value",as:["x","y","r"]})),l=[];return o.forEach(function(s){for(var u,c=s.data.name,f=A({},s);f.depth>1;)c=((u=f.parent.data)===null||u===void 0?void 0:u.name)+" / "+c,f=f.parent;if(a&&s.depth>2)return null;var h=J({},s.data,A(A(A({},se(s.data,n)),{path:c}),s));h.ext=t,h[vp]={hierarchyConfig:t,rawFields:n,enableDrillDown:a},l.push(h)}),l}function hU(e,r,t){var i=BP([e,r]),n=i[0],a=i[1],o=i[2],l=i[3],s=t.width,u=t.height,c=s-(l+a),f=u-(n+o),h=Math.min(c,f),v=(c-h)/2,d=(f-h)/2,p=n+d,x=a+v,m=o+d,_=l+v,b=[p,x,m,_],w=h<0?0:h;return{finalPadding:b,finalSize:w}}var Czt=["x","y","r","name","value","path","depth"],Szt={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}};function Azt(e){var r=e.chart,t=Math.min(r.viewBBox.width,r.viewBBox.height);return J({options:{size:function(i){var n=i.r;return n*t}}},e)}function Tzt(e){var r=e.options,t=e.chart,i=t.viewBBox,n=r.padding,a=r.appendPadding,o=r.drilldown,l=a;if(o!=null&&o.enabled){var s=_b(t.appendPadding,I(o,["breadCrumb","position"]));l=BP([s,a])}var u=hU(n,l,i).finalPadding;return t.padding=u,t.appendPadding=0,e}function Mzt(e){var r=e.chart,t=e.options,i=r.padding,n=r.appendPadding,a=t.color,o=t.colorField,l=t.pointStyle,s=t.hierarchyConfig,u=t.sizeField,c=t.rawFields,f=c===void 0?[]:c,h=t.drilldown,v=fU({data:t.data,hierarchyConfig:s,enableDrillDown:h==null?void 0:h.enabled,rawFields:f});r.data(v);var d=r.viewBBox,p=hU(i,n,d).finalSize,x=function(m){var _=m.r;return _*p};return u&&(x=function(m){return m[u]*p}),An(J({},e,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:ye(Czt,f),point:{color:a,style:l,shape:"circle",size:x}}})),e}function Ezt(e){return It(We({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function Ozt(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;I(i,"fields")||(n=J({},{customItems:function(a){return a.map(function(o){var l=I(r.getOptions(),"scales"),s=I(l,["name","formatter"],function(c){return c}),u=I(l,["value","formatter"],function(c){return c});return A(A({},o),{name:s(o.data.name),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function Fzt(e){var r=e.chart;return r.axis(!1),e}function Pzt(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return r!=null&&r.enabled?J({},e,{interactions:ye(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:fU,enableDrillDown:!0}}])}):e}function Izt(e){var r=e.chart,t=e.options;return Ae({chart:r,options:Pzt(t)}),e}function Lzt(e){return It(Sn("pointStyle"),Azt,Tzt,ie,Ezt,Mzt,Fzt,Og,Ozt,Izt,ce,Xe())(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="circle-packing",t}return r.getDefaultOptions=function(){return Szt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Lzt},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r})(Dt);(function(e){X(r,e);function r(t,i,n,a){var o=e.call(this,t,J({},a,i))||this;return o.type="g2-plot",o.defaultOptions=a,o.adaptor=n,o}return r.prototype.getDefaultOptions=function(){return this.defaultOptions},r.prototype.getSchemaAdaptor=function(){return this.adaptor},r})(Dt);var Dzt={line:zX,pie:KX,column:Mb,bar:XX,area:jX,gauge:tU,"tiny-line":o6,"tiny-column":l6,"tiny-area":a6,"ring-progress":d6,progress:h6,scatter:r6,histogram:u6,funnel:B6},$zt={line:_Dt,pie:a$t,column:HDt,bar:WDt,area:TDt,gauge:XNt,"tiny-line":Dkt,"tiny-column":Bkt,"tiny-area":Gkt,"ring-progress":Jkt,progress:Zkt,scatter:nkt,histogram:Xkt,funnel:eNt},kzt={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function vU(e,r,t){var i=$zt[e];if(!i){console.error("could not find "+e+" plot");return}var n=Dzt[e];n({chart:r,options:J({},i.getDefaultOptions(),I(kzt,e,{}),t)})}function Rzt(e){var r=e.chart,t=e.options,i=t.views,n=t.legend;return P(i,function(a){var o=a.region,l=a.data,s=a.meta,u=a.axes,c=a.coordinate,f=a.interactions,h=a.annotations,v=a.tooltip,d=a.geometries,p=r.createView({region:o});p.data(l);var x={};u&&P(u,function(m,_){x[_]=se(m,ji)}),x=J({},s,x),p.scale(x),u?P(u,function(m,_){p.axis(_,m)}):p.axis(!1),p.coordinate(c),P(d,function(m){var _=Ki({chart:p,options:m}).ext,b=m.adjust;b&&_.geometry.adjust(b)}),P(f,function(m){m.enable===!1?p.removeInteraction(m.type):p.interaction(m.type,m.cfg)}),P(h,function(m){p.annotation()[m.type](A({},m))}),typeof a.animation=="boolean"?p.animate(!1):(p.animate(!0),P(p.geometries,function(m){m.animate(a.animation)})),v&&(p.interaction("tooltip"),p.tooltip(v))}),n?P(n,function(a,o){r.legend(o,a)}):r.legend(!1),r.tooltip(t.tooltip),e}function Bzt(e){var r=e.chart,t=e.options,i=t.plots;return P(i,function(n){var a=n.type,o=n.region,l=n.options,s=l===void 0?{}:l,u=s.tooltip,c=r.createView(A({region:o},se(s,$X)));u&&c.interaction("tooltip"),vU(a,c,s)}),e}function Nzt(e){return It(ce,Rzt,Bzt,Ae,ce,ie,Ir)(e)}function Gzt(e,r){var t=e.getModel(),i=t.data,n;return it(i)?n=i[0][r]:n=i[r],n}function zzt(e){var r=Nx(e);P(r,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}var Vzt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAssociationItems=function(t,i){var n,a=this.context.event,o=i||{},l=o.linkField,s=o.dim,u=[];if(!((n=a.data)===null||n===void 0)&&n.data){var c=a.data.data;P(t,function(f){var h,v,d=l;if(s==="x"?d=f.getXScale().field:s==="y"?d=(h=f.getYScales().find(function(x){return x.field===d}))===null||h===void 0?void 0:h.field:d||(d=(v=f.getGroupScales()[0])===null||v===void 0?void 0:v.field),!!d){var p=je(Nx(f),function(x){var m=!1,_=!1,b=it(c)?I(c[0],d):I(c,d);return Gzt(x,d)===b?m=!0:_=!0,{element:x,view:f,active:m,inactive:_}});u.push.apply(u,p)}})}return u},r.prototype.showTooltip=function(t){var i=ZN(this.context.view),n=this.getAssociationItems(i,t);P(n,function(a){if(a.active){var o=a.element.shape.getCanvasBBox();a.view.showTooltip({x:o.minX+o.width/2,y:o.minY+o.height/2})}})},r.prototype.hideTooltip=function(){var t=ZN(this.context.view);P(t,function(i){i.hideTooltip()})},r.prototype.active=function(t){var i=od(this.context.view),n=this.getAssociationItems(i,t);P(n,function(a){var o=a.active,l=a.element;o&&l.setState("active",!0)})},r.prototype.selected=function(t){var i=od(this.context.view),n=this.getAssociationItems(i,t);P(n,function(a){var o=a.active,l=a.element;o&&l.setState("selected",!0)})},r.prototype.highlight=function(t){var i=od(this.context.view),n=this.getAssociationItems(i,t);P(n,function(a){var o=a.inactive,l=a.element;o&&l.setState("inactive",!0)})},r.prototype.reset=function(){var t=od(this.context.view);P(t,function(i){zzt(i)})},r}(Ie);Et("association",Vzt);Lt("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]});Lt("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]});Lt("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]});Lt("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="mix",t}return r.prototype.getSchemaAdaptor=function(){return Nzt},r})(Dt);function jzt(e,r){var t=r.data,i=r.coordinate,n=r.interactions,a=r.annotations,o=r.animation,l=r.tooltip,s=r.axes,u=r.meta,c=r.geometries;t&&e.data(t);var f={};s&&P(s,function(h,v){f[v]=se(h,ji)}),f=J({},u,f),e.scale(f),i&&e.coordinate(i),s===!1?e.axis(!1):P(s,function(h,v){e.axis(v,h)}),P(c,function(h){var v=Ki({chart:e,options:h}).ext,d=h.adjust;d&&v.geometry.adjust(d)}),P(n,function(h){h.enable===!1?e.removeInteraction(h.type):e.interaction(h.type,h.cfg)}),P(a,function(h){e.annotation()[h.type](A({},h))}),typeof o=="boolean"?e.animate(!1):(e.animate(!0),P(e.geometries,function(h){h.animate(o)})),l?(e.interaction("tooltip"),e.tooltip(l)):l===!1&&e.removeInteraction("tooltip")}function Hzt(e){var r=e.chart,t=e.options,i=t.type,n=t.data,a=t.fields,o=t.eachView,l=r1(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return r.data(n),r.facet(i,A(A({},l),{fields:a,eachView:function(s,u){var c=o(s,u);if(c.geometries)jzt(s,c);else{var f=c,h=f.options;h.tooltip&&s.interaction("tooltip"),vU(f.type,s,h)}}})),e}function Yzt(e){var r=e.chart,t=e.options,i=t.axes,n=t.meta,a=t.tooltip,o=t.coordinate,l=t.theme,s=t.legend,u=t.interactions,c=t.annotations,f={};return i&&P(i,function(h,v){f[v]=se(h,ji)}),f=J({},n,f),r.scale(f),r.coordinate(o),i?P(i,function(h,v){r.axis(v,h)}):r.axis(!1),a?(r.interaction("tooltip"),r.tooltip(a)):a===!1&&r.removeInteraction("tooltip"),r.legend(s),l&&r.theme(l),P(u,function(h){h.enable===!1?r.removeInteraction(h.type):r.interaction(h.type,h.cfg)}),P(c,function(h){r.annotation()[h.type](A({},h))}),e}function Wzt(e){return It(ie,Hzt,Yzt)(e)}var Xzt={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}};(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return Xzt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Wzt},r})(Dt);var EG;(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"})(EG||(EG={}));DX("en-US",JLt);DX("zh-CN",tDt);var Yx=globalThis&&globalThis.__assign||function(){return Yx=Object.assign||function(e){for(var r,t=1,i=arguments.length;t0&&l<1){var h=c-u;f=h/a/(l/(1-l)+1-1/a)}for(var v=f/(1-l)*l,d=r.addGroup(),p=this.coordinate.getCenter(),x=this.coordinate.getRadius(),m=aA.Util.getAngle(e,this.coordinate),_=m.startAngle,b=m.endAngle,w=_;w-1?bVt.isBetween(v,c,f):!0}),e.render(!0)}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.adaptor=Oe.slider=Oe.legend=Oe.limitInPlot=Oe.animation=Oe.theme=Oe.annotation=Oe.interaction=Oe.tooltip=Oe.axis=Oe.meta=Oe.color=Oe.transformOptions=void 0;var Gv=j,Br=Y,bn=Qe,wVt=_n,Fi=mt,qe=Qo,Lu=Hi,GG=Ib,CVt=Lb,zG=Db,iM=cI,ze=fI;function mU(e){var r,t=e.options,i=t.geometryOptions,n=i===void 0?[]:i,a=t.xField,o=t.yField,l=Br.every(n,function(s){var u=s.geometry;return u===iM.DualAxesGeometry.Line||u===void 0});return Fi.deepAssign({},{options:{geometryOptions:[],meta:(r={},r[a]={type:"cat",sync:!0,range:l?[0,1]:void 0},r),tooltip:{showMarkers:l,showCrosshairs:l,shared:!0,crosshairs:{type:"x"}},interactions:l?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},e,{options:{yAxis:Lu.transformObjectToArray(o,t.yAxis),geometryOptions:[Lu.getGeometryOption(a,o[0],n[0]),Lu.getGeometryOption(a,o[1],n[1])],annotations:Lu.transformObjectToArray(o,t.annotations)}})}Oe.transformOptions=mU;function SVt(e){var r,t,i=e.chart,n=e.options,a=n.geometryOptions,o={line:0,column:1},l=[{type:(r=a[0])===null||r===void 0?void 0:r.geometry,id:ze.LEFT_AXES_VIEW},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:ze.RIGHT_AXES_VIEW}];return l.sort(function(s,u){return-o[s.type]+o[u.type]}).forEach(function(s){return i.createView({id:s.id})}),e}function AVt(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.geometryOptions,o=t.data,l=t.tooltip,s=[Gv.__assign(Gv.__assign({},a[0]),{id:ze.LEFT_AXES_VIEW,data:o[0],yField:n[0]}),Gv.__assign(Gv.__assign({},a[1]),{id:ze.RIGHT_AXES_VIEW,data:o[1],yField:n[1]})];return s.forEach(function(u){var c=u.id,f=u.data,h=u.yField,v=Lu.isColumn(u)&&u.isPercent,d=v?wVt.percent(f,h,i,h):f,p=qe.findViewById(r,c).data(d),x=v?Gv.__assign({formatter:function(m){return{name:m[u.seriesField]||h,value:(Number(m[h])*100).toFixed(2)+"%"}}},l):l;CVt.drawSingleGeometry({chart:p,options:{xField:i,yField:h,tooltip:x,geometryOption:u}})}),e}function xU(e){var r,t=e.chart,i=e.options,n=i.geometryOptions,a=((r=t.getTheme())===null||r===void 0?void 0:r.colors10)||[],o=0;return t.once("beforepaint",function(){Br.each(n,function(l,s){var u=qe.findViewById(t,s===0?ze.LEFT_AXES_VIEW:ze.RIGHT_AXES_VIEW);if(!l.color){var c=u.getGroupScales(),f=Br.get(c,[0,"values","length"],1),h=a.slice(o,o+f).concat(s===0?[]:a);u.geometries.forEach(function(v){l.seriesField?v.color(l.seriesField,h):v.color(h[0])}),o+=f}}),t.render(!0)}),e}Oe.color=xU;function _U(e){var r,t,i=e.chart,n=e.options,a=n.xAxis,o=n.yAxis,l=n.xField,s=n.yField;return bn.scale((r={},r[l]=a,r[s[0]]=o[0],r))(Fi.deepAssign({},e,{chart:qe.findViewById(i,ze.LEFT_AXES_VIEW)})),bn.scale((t={},t[l]=a,t[s[1]]=o[1],t))(Fi.deepAssign({},e,{chart:qe.findViewById(i,ze.RIGHT_AXES_VIEW)})),e}Oe.meta=_U;function bU(e){var r=e.chart,t=e.options,i=qe.findViewById(r,ze.LEFT_AXES_VIEW),n=qe.findViewById(r,ze.RIGHT_AXES_VIEW),a=t.xField,o=t.yField,l=t.xAxis,s=t.yAxis;return r.axis(a,!1),r.axis(o[0],!1),r.axis(o[1],!1),i.axis(a,l),i.axis(o[0],Lu.getYAxisWithDefault(s[0],iM.AxisType.Left)),n.axis(a,!1),n.axis(o[1],Lu.getYAxisWithDefault(s[1],iM.AxisType.Right)),e}Oe.axis=bU;function wU(e){var r=e.chart,t=e.options,i=t.tooltip,n=qe.findViewById(r,ze.LEFT_AXES_VIEW),a=qe.findViewById(r,ze.RIGHT_AXES_VIEW);return r.tooltip(i),n.tooltip({shared:!0}),a.tooltip({shared:!0}),e}Oe.tooltip=wU;function CU(e){var r=e.chart;return bn.interaction(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.LEFT_AXES_VIEW)})),bn.interaction(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.RIGHT_AXES_VIEW)})),e}Oe.interaction=CU;function SU(e){var r=e.chart,t=e.options,i=t.annotations,n=Br.get(i,[0]),a=Br.get(i,[1]);return bn.annotation(n)(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.LEFT_AXES_VIEW),options:{annotations:n}})),bn.annotation(a)(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.RIGHT_AXES_VIEW),options:{annotations:a}})),e}Oe.annotation=SU;function AU(e){var r=e.chart;return bn.theme(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.LEFT_AXES_VIEW)})),bn.theme(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.RIGHT_AXES_VIEW)})),bn.theme(e),e}Oe.theme=AU;function TU(e){var r=e.chart;return bn.animation(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.LEFT_AXES_VIEW)})),bn.animation(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.RIGHT_AXES_VIEW)})),e}Oe.animation=TU;function MU(e){var r=e.chart,t=e.options,i=t.yAxis;return bn.limitInPlot(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.LEFT_AXES_VIEW),options:{yAxis:i[0]}})),bn.limitInPlot(Fi.deepAssign({},e,{chart:qe.findViewById(r,ze.RIGHT_AXES_VIEW),options:{yAxis:i[1]}})),e}Oe.limitInPlot=MU;function EU(e){var r=e.chart,t=e.options,i=t.legend,n=t.geometryOptions,a=t.yField,o=t.data,l=qe.findViewById(r,ze.LEFT_AXES_VIEW),s=qe.findViewById(r,ze.RIGHT_AXES_VIEW);if(i===!1)r.legend(!1);else if(Br.isObject(i)&&i.custom===!0)r.legend(i);else{var u=Br.get(n,[0,"legend"],i),c=Br.get(n,[1,"legend"],i);r.once("beforepaint",function(){var f=o[0].length?GG.getViewLegendItems({view:l,geometryOption:n[0],yField:a[0],legend:u}):[],h=o[1].length?GG.getViewLegendItems({view:s,geometryOption:n[1],yField:a[1],legend:c}):[];r.legend(Fi.deepAssign({},i,{custom:!0,items:f.concat(h)}))}),n[0].seriesField&&l.legend(n[0].seriesField,u),n[1].seriesField&&s.legend(n[1].seriesField,c),r.on("legend-item:click",function(f){var h=Br.get(f,"gEvent.delegateObject",{});if(h&&h.item){var v=h.item,d=v.value,p=v.isGeometry,x=v.viewId;if(p){var m=Br.findIndex(a,function(w){return w===d});if(m>-1){var _=Br.get(qe.findViewById(r,x),"geometries");Br.each(_,function(w){w.changeVisible(!h.item.unchecked)})}}else{var b=Br.get(r.getController("legend"),"option.items",[]);Br.each(r.views,function(w){var S=w.getGroupScales();Br.each(S,function(M){M.values&&M.values.indexOf(d)>-1&&w.filter(M.field,function(O){var F=Br.find(b,function(L){return L.value===O});return!F.unchecked})}),r.render(!0)})}}})}return e}Oe.legend=EU;function OU(e){var r=e.chart,t=e.options,i=t.slider,n=qe.findViewById(r,ze.LEFT_AXES_VIEW),a=qe.findViewById(r,ze.RIGHT_AXES_VIEW);return i&&(n.option("slider",i),n.on("slider:valuechanged",function(o){var l=o.event,s=l.value,u=l.originValue;Br.isEqual(s,u)||zG.doSliderFilter(a,s)}),r.once("afterpaint",function(){if(!Br.isBoolean(i)){var o=i.start,l=i.end;(o||l)&&zG.doSliderFilter(a,[o,l])}})),e}Oe.slider=OU;function TVt(e){return Fi.flow(mU,SVt,AU,AVt,_U,bU,MU,wU,CU,SU,TU,xU,EU,OU)(e)}Oe.adaptor=TVt;Object.defineProperty(uI,"__esModule",{value:!0});var FU=uI.DualAxes=void 0,MVt=j,EVt=ae,OVt=mt,FVt=Oe,PVt=function(e){MVt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dual-axes",t}return r.prototype.getDefaultOptions=function(){return OVt.deepAssign({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return FVt.adaptor},r}(EVt.Plot);FU=uI.DualAxes=PVt;var IVt=Zt(FU,"DualAxesChart"),LVt=Object.freeze(Object.defineProperty({__proto__:null,LineChart:GTt,TreemapChart:sEt,StepLineChart:uEt,BarChart:WEt,StackedBarChart:XEt,GroupedBarChart:ZEt,PercentStackedBarChart:QEt,RangeBarChart:KEt,AreaChart:oOt,StackedAreaChart:lOt,PercentStackedAreaChart:sOt,ColumnChart:mOt,GroupedColumnChart:_Ot,StackedColumnChart:bOt,RangeColumnChart:wOt,PercentStackedColumnChart:COt,PieChart:rFt,DensityHeatmapChart:CFt,HeatmapChart:AFt,WordCloudChart:aPt,RoseChart:CPt,FunnelChart:hIt,StackedRoseChart:pIt,GroupedRoseChart:mIt,RadarChart:kIt,LiquidChart:s2t,HistogramChart:E2t,DonutChart:F2t,WaterfallChart:K2t,ScatterChart:_Lt,BubbleChart:bLt,BulletChart:RLt,CalendarChart:qzt,GaugeChart:fVt,DualAxesChart:IVt},Symbol.toStringTag,{value:"Module"})),Wx=globalThis&&globalThis.__assign||function(){return Wx=Object.assign||function(e){for(var r,t=1,i=arguments.length;t