1
0
Fork 0
internet-everythings-agricu.../public/admin/assets/index.e5d3dc9e.js

136 lines
1.6 MiB

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<e.length;i++){var n=e[i];r(n,i)&&t.push(n)}return t},HG=function(e,r){return r===void 0&&(r=[]),zr(e,function(t){return!eo(r,t)})},g8={}.toString,Zn=function(e,r){return g8.call(e)==="[object "+r+"]"},pt=function(e){return Zn(e,"Function")},K=function(e){return e==null},it=function(e){return Array.isArray?Array.isArray(e):Zn(e,"Array")},qt=function(e){var r=typeof e;return e!==null&&r==="object"||r==="function"};function P(e,r){if(!!e){var t;if(it(e))for(var i=0,n=e.length;i<n&&(t=r(e[i],i),t!==!1);i++);else if(qt(e)){for(var a in e)if(e.hasOwnProperty(a)&&(t=r(e[a],a),t===!1))break}}}var oc=Object.keys?function(e){return Object.keys(e)}:function(e){var r=[];return P(e,function(t,i){pt(e)&&i==="prototype"||r.push(i)}),r};function aM(e,r){var t=oc(r),i=t.length;if(K(e))return!i;for(var n=0;n<i;n+=1){var a=t[n];if(r[a]!==e[a]||!(a in e))return!1}return!0}var G0=function(e){return typeof e=="object"&&e!==null},wa=function(e){if(!G0(e)||!Zn(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r};function Yn(e,r){if(!it(e))return null;var t;if(pt(r)&&(t=r),wa(r)&&(t=function(n){return aM(n,r)}),t){for(var i=0;i<e.length;i+=1)if(t(e[i]))return e[i]}return null}function oM(e,r,t){t===void 0&&(t=0);for(var i=t;i<e.length;i++)if(r(e[i],i))return i;return-1}var YG=function(e,r){for(var t=null,i=0;i<e.length;i++){var n=e[i],a=n[r];if(!K(a)){it(a)?t=a[0]:t=a;break}}return t},qi=function(e){if(!it(e))return[];for(var r=[],t=0;t<e.length;t++)r=r.concat(e[t]);return r},WG=function(e,r){if(r===void 0&&(r=[]),!it(e))r.push(e);else for(var t=0;t<e.length;t+=1)WG(e[t],r);return r},vi=function(e){if(!!it(e))return e.reduce(function(r,t){return Math.max(r,t)},e[0])},Ei=function(e){if(!!it(e))return e.reduce(function(r,t){return Math.min(r,t)},e[0])},lM=function(e){var r=e.filter(function(o){return!isNaN(o)});if(!r.length)return{min:0,max:0};if(it(e[0])){for(var t=[],i=0;i<e.length;i++)t=t.concat(e[i]);r=t}var n=vi(r),a=Ei(r);return{min:a,max:n}},XG=Array.prototype,y8=XG.splice,m8=XG.indexOf,x8=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0;i<r.length;i++)for(var n=r[i],a=-1;(a=m8.call(e,n))>-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;++i<a;){var o=e[i];r(o,i,e)&&(t.push(o),n.push(i))}return UG(e,n),t},Ct=function(e){return Zn(e,"String")};function ZG(e,r){var t;if(pt(r))t=function(n,a){return r(n)-r(a)};else{var i=[];Ct(r)?i.push(r):it(r)&&(i=r),t=function(n,a){for(var o=0;o<i.length;o+=1){var l=i[o];if(n[l]>a[l])return 1;if(n[l]<a[l])return-1}return 0}}return e.sort(t),e}function ss(e,r){r===void 0&&(r=new Map);var t=[];if(Array.isArray(e))for(var i=0,n=e.length;i<n;i++){var a=e[i];r.has(a)||(t.push(a),r.set(a,!0))}return t}var b8=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return ss([].concat.apply([],e))},Xn=function(e,r){for(var t=[],i={},n=0;n<e.length;n++){var a=e[n],o=a[r];if(!K(o)){it(o)||(o=[o]);for(var l=0;l<o.length;l++){var s=o[l];i[s]||(t.push(s),i[s]=!0)}}}return t};function Wi(e){if(Ui(e))return e[0]}function nr(e){if(Ui(e)){var r=e;return r[r.length-1]}}function w8(e,r){return it(e)||Ct(e)?e[0]===r:!1}function C8(e,r){return it(e)||Ct(e)?e[e.length-1]===r:!1}var qx=function(e,r){for(var t=0;t<e.length;t++)if(!r(e[t],t))return!1;return!0},pp=function(e,r){for(var t=0;t<e.length;t++)if(r(e[t],t))return!0;return!1},S8=Object.prototype.hasOwnProperty;function Xi(e,r){if(!r||!it(e))return{};for(var t={},i=pt(r)?r:function(l){return l[r]},n,a=0;a<e.length;a++){var o=e[a];n=i(o),S8.call(t,n)?t[n].push(o):t[n]=[o]}return t}function sM(e,r){if(!r)return{0:e};if(!pt(r)){var t=it(r)?r:r.replace(/\s+/g,"").split("*");r=function(i){for(var n="_",a=0,o=t.length;a<o;a++)n+=i[t[a]]&&i[t[a]].toString();return n}}return Xi(e,r)}var QG=function(e,r){if(!r)return[e];var t=sM(e,r),i=[];for(var n in t)i.push(t[n]);return i};function A8(e,r){return e["_wrap_"+r]}function T8(e,r){if(e["_wrap_"+r])return e["_wrap_"+r];var t=function(i){e[r](i)};return e["_wrap_"+r]=t,t}var P2={};function M8(e){var r=P2[e];if(!r){for(var t=e.toString(16),i=t.length;i<6;i++)t="0"+t;r="#"+t,P2[e]=r}return r}function E8(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 Ce=function(e,r,t){return e<r?r:e>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)<t}var D8=function(e){return Mt(e)&&e%2!==0},$8=function(e){return Mt(e)&&e>0},Zx=function(e,r){if(!!it(e)){for(var t,i=-1/0,n=0;n<e.length;n++){var a=e[n],o=pt(r)?r(a):a[r];o>i&&(t=a,i=o)}return t}},uM=function(e,r){if(!!it(e)){for(var t,i=1/0,n=0;n<e.length;n++){var a=e[n],o=pt(r)?r(a):a[r];o<i&&(t=a,i=o)}return t}},Qx=function(e,r){return(e%r+r)%r},k8=180/Math.PI,R8=function(e){return k8*e},B8=parseInt,N8=Math.PI/180,Kx=function(e){return N8*e},po=function(e,r){return e.hasOwnProperty(r)},_h=Object.values?function(e){return Object.values(e)}:function(e){var r=[];return P(e,function(t,i){pt(e)&&i==="prototype"||r.push(t)}),r},G8=function(e,r){return eo(_h(e),r)},Es=function(e){return K(e)?"":e.toString()},lc=function(e){return Es(e).toLowerCase()},z8=function(e){var r=Es(e);return r.charAt(0).toLowerCase()+r.substring(1)};function cM(e,r){return!e||!r?e:e.replace(/\\?\{([^{}]+)\}/g,function(t,i){return t.charAt(0)==="\\"?t.slice(1):r[i]===void 0?"":r[i]})}var V8=function(e){return Es(e).toUpperCase()},Os=function(e){var r=Es(e);return r.charAt(0).toUpperCase()+r.substring(1)},j8={}.toString,KG=function(e){return j8.call(e).replace(/^\[object /,"").replace(/]$/,"")},H8=function(e){return Zn(e,"Arguments")},Hu=function(e){return Zn(e,"Boolean")},fM=function(e){return Zn(e,"Date")},Y8=function(e){return Zn(e,"Error")};function W8(e){return Mt(e)&&isFinite(e)}var JG=function(e){return e===null},X8=Object.prototype,tz=function(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||X8;return e===t},U8=function(e){return Zn(e,"RegExp")},Hl=function(e){return e===void 0},Jx=function(e){return e instanceof Element||e instanceof HTMLDocument};function ez(e){var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)};return r(e)}function rz(e){var r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout;r(e)}function Lw(e,r){for(var t in r)r.hasOwnProperty(t)&&t!=="constructor"&&r[t]!==void 0&&(e[t]=r[t])}function Qt(e,r,t,i){return r&&Lw(e,r),t&&Lw(e,t),i&&Lw(e,i),e}var q8=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var t=e[0],i=1;i<e.length;i++){var n=e[i];pt(n)&&(n=n.prototype),Qt(t.prototype,n)}},fi=function(e){if(typeof e!="object"||e===null)return e;var r;if(it(e)){r=[];for(var t=0,i=e.length;t<i;t++)typeof e[t]=="object"&&e[t]!=null?r[t]=fi(e[t]):r[t]=e[t]}else{r={};for(var n in e)typeof e[n]=="object"&&e[n]!=null?r[n]=fi(e[n]):r[n]=e[n]}return r};function t1(e,r,t){var i;return function(){var n=this,a=arguments,o=function(){i=null,t||e.apply(n,a)},l=t&&!i;clearTimeout(i),i=setTimeout(o,r),l&&e.apply(n,a)}}var sc=function(e,r){if(!pt(e))throw new TypeError("Expected a function");var t=function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var a=r?r.apply(this,i):i[0],o=t.cache;if(o.has(a))return o.get(a);var l=e.apply(this,i);return o.set(a,l),l};return t.cache=new Map,t},Z8=5;function iz(e,r,t,i){t=t||0,i=i||Z8;for(var n in r)if(r.hasOwnProperty(n)){var a=r[n];a!==null&&wa(a)?(wa(e[n])||(e[n]={}),t<i?iz(e[n],a,t+1,i):e[n]=r[n]):it(a)?(e[n]=[],e[n]=e[n].concat(a)):a!==void 0&&(e[n]=a)}}var ft=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0;i<r.length;i+=1)iz(e,r[i]);return e},Q8=function(e,r,t,i){pt(r)||(t=r,r=e,e=function(){});var n=Object.create?function(o,l){return Object.create(o,{constructor:{value:l}})}:function(o,l){function s(){}s.prototype=o;var u=new s;return u.constructor=l,u},a=n(r.prototype,e);return e.prototype=Qt(a,e.prototype),e.superclass=n(r.prototype,r),Qt(a,t),Qt(e,i),e},hM=function(e,r){if(!Ui(e))return-1;var t=Array.prototype.indexOf;if(t)return t.call(e,r);for(var i=-1,n=0;n<e.length;n++)if(e[n]===r){i=n;break}return i},K8=Object.prototype.hasOwnProperty;function di(e){if(K(e))return!0;if(Ui(e))return!e.length;var r=KG(e);if(r==="Map"||r==="Set")return!e.size;if(tz(e))return!Object.keys(e).length;for(var t in e)if(K8.call(e,t))return!1;return!0}var Ge=function(e,r){if(e===r)return!0;if(!e||!r||Ct(e)||Ct(r))return!1;if(Ui(e)||Ui(r)){if(e.length!==r.length)return!1;for(var t=!0,i=0;i<e.length&&(t=Ge(e[i],r[i]),!!t);i++);return t}if(G0(e)||G0(r)){var n=Object.keys(e),a=Object.keys(r);if(n.length!==a.length)return!1;for(var t=!0,i=0;i<n.length&&(t=Ge(e[n[i]],r[n[i]]),!!t);i++);return t}return!1},J8=function(e,r,t){return pt(t)?!!t(e,r):Ge(e,r)},je=function(e,r){if(!Ui(e))return e;for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(r(n,i))}return t},t9=function(e){return e},nz=function(e,r){r===void 0&&(r=t9);var t={};return qt(e)&&!K(e)&&Object.keys(e).forEach(function(i){t[i]=r(e[i],i)}),t},I=function(e,r,t){for(var i=0,n=Ct(r)?r.split("."):r;e&&i<n.length;)e=e[n[i++]];return e===void 0||i<n.length?t:e},jt=function(e,r,t){var i=e,n=Ct(r)?r.split("."):r;return n.forEach(function(a,o){o<n.length-1?(qt(i[a])||(i[a]=Mt(n[o+1])?[]:{}),i=i[a]):i[a]=t}),e},e9=Object.prototype.hasOwnProperty,e1=function(e,r){if(e===null||!wa(e))return{};var t={};return P(r,function(i){e9.call(e,i)&&(t[i]=e[i])}),t},r1=function(e,r){return Zr(e,function(t,i,n){return r.includes(n)||(t[n]=i),t},{})},i1=function(e,r,t){var i,n,a,o,l=0;t||(t={});var s=function(){l=t.leading===!1?0:Date.now(),i=null,o=e.apply(n,a),i||(n=a=null)},u=function(){var c=Date.now();!l&&t.leading===!1&&(l=c);var f=r-(c-l);return n=this,a=arguments,f<=0||f>r?(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)<t};function yz(e,r){var t=Math.max(e.minX,r.minX),i=Math.max(e.minY,r.minY),n=Math.min(e.maxX,r.maxX),a=Math.min(e.maxY,r.maxY);return n1(t,i,n-t,a-i)}te.intersectBBox=yz;function h9(e,r){var t=Math.min(e.minX,r.minX),i=Math.min(e.minY,r.minY),n=Math.max(e.maxX,r.maxX),a=Math.max(e.maxY,r.maxY);return n1(t,i,n-t,a-i)}te.mergeBBox=h9;function mz(e){var r=e.getClip(),t=r&&r.getBBox(),i;if(!e.isGroup())i=e.getBBox();else{var n=1/0,a=-1/0,o=1/0,l=-1/0,s=e.getChildren();s.length>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]);p<n&&(n=p),x>a&&(a=x),m<o&&(o=m),_>l&&(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;h<v;h++){if(r.push(c=[]),f=e[h],l=f[0],l!==l.toUpperCase())switch(c[0]=l.toUpperCase(),c[0]){case"A":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+f[6]+t,c[7]=+f[7]+i;break;case"V":c[1]=+f[1]+i;break;case"H":c[1]=+f[1]+t;break;case"R":s=[t,i].concat(f.slice(1));for(var d=2,p=s.length;d<p;d++)s[d]=+s[d]+t,s[++d]=+s[d]+i;r.pop(),r=r.concat(cA(s,u));break;case"O":r.pop(),s=Oy(t,i,f[1],f[2]),s.push(s[0]),r=r.concat(s);break;case"U":r.pop(),r=r.concat(Oy(t,i,f[1],f[2],f[3])),c=["U"].concat(r[r.length-1].slice(-2));break;case"M":n=+f[1]+t,a=+f[2]+i;break;default:for(var d=1,p=f.length;d<p;d++)c[d]=+f[d]+(d%2?t:i)}else if(l==="R")s=[t,i].concat(f.slice(1)),r.pop(),r=r.concat(cA(s,u)),c=["R"].concat(f.slice(-2));else if(l==="O")r.pop(),s=Oy(t,i,f[1],f[2]),s.push(s[0]),r=r.concat(s);else if(l==="U")r.pop(),r=r.concat(Oy(t,i,f[1],f[2],f[3])),c=["U"].concat(r[r.length-1].slice(-2));else for(var x=0,m=f.length;x<m;x++)c[x]=f[x];if(l=l.toUpperCase(),l!=="O")switch(c[0]){case"Z":t=+n,i=+a;break;case"H":t=c[1];break;case"V":i=c[1];break;case"M":n=c[c.length-2],a=c[c.length-1];break;default:t=c[c.length-2],i=c[c.length-1]}}return r},Fy=function(e,r,t,i){return[e,r,t,i,t,i]},I2=function(e,r,t,i,n,a){var o=.3333333333333333,l=2/3;return[o*e+l*t,o*r+l*i,o*n+l*t,o*a+l*i,n,a]},xz=function(e,r,t,i,n,a,o,l,s,u){t===i&&(t+=1);var c=Math.PI*120/180,f=Math.PI/180*(+n||0),h=[],v,d,p,x,m,_=function(dt,ht,wt){var gt=dt*Math.cos(wt)-ht*Math.sin(wt),vt=dt*Math.sin(wt)+ht*Math.cos(wt);return{x:gt,y:vt}};if(u)d=u[0],p=u[1],x=u[2],m=u[3];else{v=_(e,r,-f),e=v.x,r=v.y,v=_(l,s,-f),l=v.x,s=v.y,e===l&&r===s&&(l+=1,s+=1);var b=(e-l)/2,w=(r-s)/2,S=b*b/(t*t)+w*w/(i*i);S>1&&(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=e<x?Math.PI-d:d,p=l<x?Math.PI-p:p,d<0&&(d=Math.PI*2+d),p<0&&(p=Math.PI*2+p),o&&d>p&&(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;et<lt;et++)Z[et]=et%2?_(h[et-1],h[et],f).y:_(h[et],h[et+1],f).x;return Z},hA=function(e,r){var t=fA(e),i=r&&fA(r),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=[],l=[],s="",u="",c,f=function(b,w,S){var M,O;if(!b)return["C",w.x,w.y,w.x,w.y,w.x,w.y];switch(!(b[0]in{T:1,Q:1})&&(w.qx=w.qy=null),b[0]){case"M":w.X=b[1],w.Y=b[2];break;case"A":b=["C"].concat(xz.apply(0,[w.x,w.y].concat(b.slice(1))));break;case"S":S==="C"||S==="S"?(M=w.x*2-w.bx,O=w.y*2-w.by):(M=w.x,O=w.y),b=["C",M,O].concat(b.slice(1));break;case"T":S==="Q"||S==="T"?(w.qx=w.x*2-w.qx,w.qy=w.y*2-w.qy):(w.qx=w.x,w.qy=w.y),b=["C"].concat(I2(w.x,w.y,w.qx,w.qy,b[1],b[2]));break;case"Q":w.qx=b[1],w.qy=b[2],b=["C"].concat(I2(w.x,w.y,b[1],b[2],b[3],b[4]));break;case"L":b=["C"].concat(Fy(w.x,w.y,b[1],b[2]));break;case"H":b=["C"].concat(Fy(w.x,w.y,b[1],w.y));break;case"V":b=["C"].concat(Fy(w.x,w.y,w.x,b[1]));break;case"Z":b=["C"].concat(Fy(w.x,w.y,w.X,w.Y));break}return b},h=function(b,w){if(b[w].length>7){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;d<c;d++){t[d]&&(s=t[d][0]),s!=="C"&&(o[d]=s,d&&(u=o[d-1])),t[d]=f(t[d],n,u),o[d]!=="A"&&s==="C"&&(o[d]="C"),h(t,d),i&&(i[d]&&(s=i[d][0]),s!=="C"&&(l[d]=s,d&&(u=l[d-1])),i[d]=f(i[d],a,u),l[d]!=="A"&&s==="C"&&(l[d]="C"),h(i,d)),v(t,i,n,a,d),v(i,t,a,n,d);var p=t[d],x=i&&i[d],m=p.length,_=i&&x.length;n.x=p[m-2],n.y=p[m-1],n.bx=parseFloat(p[m-4])||n.x,n.by=parseFloat(p[m-3])||n.y,a.bx=i&&(parseFloat(x[_-4])||a.x),a.by=i&&(parseFloat(x[_-3])||a.y),a.x=i&&x[_-2],a.y=i&&x[_-1]}return i?[t,i]:t},m9=/,?([a-z]),?/gi,_z=function(e){return e.join(",").replace(m9,"$1")},L2=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},D2=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;d<c;d++){var p=u*f[d]+u,x=L2(p,e,t,n,o),m=L2(p,r,i,a,l),_=x*x+m*m;v+=h[d]*Math.sqrt(_)}return u*v},x9=function(e,r,t,i,n,a,o,l){for(var s=[],u=[[],[]],c,f,h,v,d=0;d<2;++d){if(d===0?(f=6*e-12*t+6*n,c=-3*e+9*t-9*n+3*o,h=3*t-3*e):(f=6*r-12*i+6*a,c=-3*r+9*i-9*a+3*l,h=3*i-3*r),Math.abs(c)<1e-12){if(Math.abs(f)<1e-12)continue;v=-h/f,v>0&&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.min(n,o)||Math.min(e,t)>Math.max(n,o)||Math.max(r,i)<Math.min(a,l)||Math.min(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.x<r.x2&&e.x>r.x||r.x<e.x2&&r.x>e.x)&&(e.y<r.y2&&e.y>r.y||r.y<e.y2&&r.y>e.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<l+1;v++){var d=k2.apply(0,e.concat(v/l));u.push({x:d.x,y:d.y,t:v/l})}for(var v=0;v<s+1;v++){var d=k2.apply(0,r.concat(v/s));c.push({x:d.x,y:d.y,t:v/s})}for(var v=0;v<l;v++)for(var p=0;p<s;p++){var x=u[v],m=u[v+1],_=c[p],b=c[p+1],w=Math.abs(m.x-x.x)<.001?"y":"x",S=Math.abs(b.x-_.x)<.001?"y":"x",M=_9(x.x,x.y,m.x,m.y,_.x,_.y,b.x,b.y);if(M){if(f[M.x.toFixed(4)]===M.y.toFixed(4))continue;f[M.x.toFixed(4)]=M.y.toFixed(4);var O=x.t+Math.abs((M[w]-x[w])/(m[w]-x[w]))*(m.t-x.t),F=_.t+Math.abs((M[S]-_[S])/(b[S]-_[S]))*(b.t-_.t);O>=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<p;d++){var x=e[d];if(x[0]==="M")i=l=x[1],n=s=x[2];else{x[0]==="C"?(f=[i,n].concat(x.slice(1)),i=f[6],n=f[7]):(f=[i,n,i,n,l,s,l,s],i=l,n=s);for(var m=0,_=r.length;m<_;m++){var b=r[m];if(b[0]==="M")a=u=b[1],o=c=b[2];else{b[0]==="C"?(h=[a,o].concat(b.slice(1)),a=h[6],o=h[7]):(h=[a,o,a,o,u,c,u,c],a=u,o=c);var w=w9(f,h,t);if(t)v+=w;else{for(var S=0,M=w.length;S<M;S++)w[S].segment1=d,w[S].segment2=m,w[S].bez1=f,w[S].bez2=h;v=v.concat(w)}}}}}return v},S9=function(e,r){return C9(e,r)};function A9(e,r){var t=[],i=[];function n(a,o){if(a.length===1)t.push(a[0]),i.push(a[0]);else{for(var l=[],s=0;s<a.length-1;s++)s===0&&t.push(a[0]),s===a.length-2&&i.push(a[s+1]),l[s]=[(1-o)*a[s][0]+o*a[s+1][0],(1-o)*a[s][1]+o*a[s+1][1]];n(l,o)}}return e.length&&n(e,r),{left:t,right:i.reverse()}}function T9(e,r,t){var i=[[e[1],e[2]]];t=t||2;var n=[];r[0]==="A"?(i.push(r[6]),i.push(r[7])):r[0]==="C"?(i.push([r[1],r[2]]),i.push([r[3],r[4]]),i.push([r[5],r[6]])):r[0]==="S"||r[0]==="Q"?(i.push([r[1],r[2]]),i.push([r[3],r[4]])):i.push([r[1],r[2]]);for(var a=i,o=1/t,l=0;l<t-1;l++){var s=o/(1-o*l),u=A9(a,s);n.push(u.left),a=u.right}n.push(a);var c=n.map(function(f){var h=[];return f.length===4&&(h.push("C"),h=h.concat(f[2])),f.length>=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<i-t;o++)e.push(e[0]);return e}for(var o=0;o<i;o++){var l=Math.floor(n*o);a[l]=(a[l]||0)+1}var s=a.reduce(function(u,c,f){return f===t?u.concat(e[t]):u.concat(M9(e[f],e[f+1],c))},[]);return s.unshift(e[0]),(r[i]==="Z"||r[i]==="z")&&s.push("Z"),s},O9=function(e,r){if(e.length!==r.length)return!1;var t=!0;return P(e,function(i,n){if(i!==r[n])return t=!1,!1}),t};function F9(e,r,t){var i=null,n=t;return r<n&&(n=r,i="add"),e<n&&(n=e,i="del"),{type:i,min:n}}var P9=function(e,r){var t=e.length,i=r.length,n,a,o=0;if(t===0||i===0)return null;for(var l=[],s=0;s<=t;s++)l[s]=[],l[s][0]={min:s};for(var u=0;u<=i;u++)l[0][u]={min:u};for(var s=1;s<=t;s++){n=e[s-1];for(var u=1;u<=i;u++){a=r[u-1],O9(n,a)?o=0:o=1;var c=l[s-1][u].min+1,f=l[s][u-1].min+1,h=l[s-1][u-1].min+o;l[s][u]=F9(c,f,h)}}return l},wz=function(e,r){var t=P9(e,r),i=e.length,n=r.length,a=[],o=1,l=1;if(t[i][n].min!==i){for(var s=1;s<=i;s++){var u=t[s][s].min;l=s;for(var c=o;c<=n;c++)t[s][c].min<u&&(u=t[s][c].min,l=c);o=l,t[s][o].type&&a.push({index:s-1,type:t[s][o].type})}for(var s=a.length-1;s>=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(i<n)for(var s=0;s<f;s++)e[i-1][0]==="z"||e[i-1][0]==="Z"?e.splice(i-2,0,e[i-2]):e.push(e[i-1]),i+=1;return e};function $w(e,r,t){for(var i=[].concat(e),n,a=1/(t+1),o=Cz(r)[0],l=1;l<=t;l++)a*=l,n=Math.floor(e.length*a),n===0?i.unshift([o[0]*a+e[n][0]*(1-a),o[1]*a+e[n][1]*(1-a)]):i.splice(n,0,[o[0]*a+e[n][0]*(1-a),o[1]*a+e[n][1]*(1-a)]);return i}function Cz(e){var r=[];switch(e[0]){case"M":r.push([e[1],e[2]]);break;case"L":r.push([e[1],e[2]]);break;case"A":r.push([e[6],e[7]]);break;case"Q":r.push([e[3],e[4]]),r.push([e[1],e[2]]);break;case"T":r.push([e[1],e[2]]);break;case"C":r.push([e[5],e[6]]),r.push([e[1],e[2]]),r.push([e[3],e[4]]);break;case"S":r.push([e[3],e[4]]),r.push([e[1],e[2]]);break;case"H":r.push([e[1],e[1]]);break;case"V":r.push([e[1],e[1]]);break}return r}var dA=function(e,r){if(e.length<=1)return e;for(var t,i=0;i<r.length;i++)if(e[i][0]!==r[i][0])switch(t=Cz(e[i]),r[i][0]){case"M":e[i]=["M"].concat(t[0]);break;case"L":e[i]=["L"].concat(t[0]);break;case"A":e[i]=[].concat(r[i]),e[i][6]=t[0][0],e[i][7]=t[0][1];break;case"Q":if(t.length<2)if(i>0)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;n<arguments.length;n++)i[n-1]=arguments[n];var a=this._events[r]||[],o=this._events[I9]||[],l=function(s){for(var u=s.length,c=0;c<u;c++)if(!!s[c]){var f=s[c],h=f.callback,v=f.once;v&&(s.splice(c,1),s.length===0&&delete t._events[r],u--,c--),h.apply(t,i)}};l(a),l(o)},e.prototype.off=function(r,t){if(!r)this._events={};else if(!t)delete this._events[r];else{for(var i=this._events[r]||[],n=i.length,a=0;a<n;a++)i[a].callback===t&&(i.splice(a,1),n--,a--);i.length===0&&delete this._events[r]}return this},e.prototype.getEvents=function(){return this._events},e}(),L9=Object.freeze(Object.defineProperty({__proto__:null,default:gp},Symbol.toStringTag,{value:"Module"}));function Sz(e,r){var t=e.indexOf(r);t!==-1&&e.splice(t,1)}var R2=typeof window!="undefined"&&typeof window.document!="undefined";function Az(e,r){if(e.isCanvas())return!0;for(var t=r.getParent(),i=!1;t;){if(t===e){i=!0;break}t=t.getParent()}return i}function $f(e){return e.cfg.visible&&e.cfg.capture}var yp=function(e){X(r,e);function r(t){var i=e.call(this)||this;i.destroyed=!1;var n=i.getDefaultCfg();return i.cfg=Qt(n,t),i}return r.prototype.getDefaultCfg=function(){return{}},r.prototype.get=function(t){return this.cfg[t]},r.prototype.set=function(t,i){this.cfg[t]=i},r.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},r}(gp),B2=globalThis&&globalThis.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var i=0,n=r.length,a;i<n;i++)(a||!(i in r))&&(a||(a=Array.prototype.slice.call(r,0,i)),a[i]=r[i]);return e.concat(a||Array.prototype.slice.call(r))},Tz=function(){function e(r,t,i){this.name=r,this.version=t,this.os=i,this.type="browser"}return e}(),Mz=function(){function e(r){this.version=r,this.type="node",this.name="node",this.os=process.platform}return e}(),Ez=function(){function e(r,t,i,n){this.name=r,this.version=t,this.os=i,this.bot=n,this.type="bot-device"}return e}(),Oz=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),Fz=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),D9=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,$9=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,N2=3,k9=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",D9]],G2=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function gM(e){return e?pA(e):typeof document=="undefined"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"?new Fz:typeof navigator!="undefined"?pA(navigator.userAgent):Lz()}function Pz(e){return e!==""&&k9.reduce(function(r,t){var i=t[0],n=t[1];if(r)return r;var a=n.exec(e);return!!a&&[i,a]},!1)}function R9(e){var r=Pz(e);return r?r[0]:null}function pA(e){var r=Pz(e);if(!r)return null;var t=r[0],i=r[1];if(t==="searchbot")return new Oz;var n=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);n?n.length<N2&&(n=B2(B2([],n,!0),B9(N2-n.length),!0)):n=[];var a=n.join("."),o=Iz(e),l=$9.exec(e);return l&&l[1]?new Ez(t,a,o,l[1]):new Tz(t,a,o)}function Iz(e){for(var r=0,t=G2.length;r<t;r++){var i=G2[r],n=i[0],a=i[1],o=a.exec(e);if(o)return n}return null}function Lz(){var e=typeof process!="undefined"&&process.version;return e?new Mz(process.version.slice(1)):null}function B9(e){for(var r=[],t=0;t<e;t++)r.push("0");return r}var N9=Object.freeze(Object.defineProperty({__proto__:null,BrowserInfo:Tz,NodeInfo:Mz,SearchBotDeviceInfo:Ez,BotInfo:Oz,ReactNativeInfo:Fz,detect:gM,browserName:R9,parseUserAgent:pA,detectOS:Iz,getNodeVersion:Lz},Symbol.toStringTag,{value:"Module"})),Bi=1e-6,Un=typeof Float32Array!="undefined"?Float32Array:Array,gA=Math.random;Math.hypot||(Math.hypot=function(){for(var e=0,r=arguments.length;r--;)e+=arguments[r]*arguments[r];return Math.sqrt(e)});function G9(){var e=new Un(9);return Un!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function z9(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[4],e[4]=r[5],e[5]=r[6],e[6]=r[8],e[7]=r[9],e[8]=r[10],e}function V9(e){var r=new Un(9);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r}function j9(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function H9(e,r,t,i,n,a,o,l,s){var u=new Un(9);return u[0]=e,u[1]=r,u[2]=t,u[3]=i,u[4]=n,u[5]=a,u[6]=o,u[7]=l,u[8]=s,u}function Y9(e,r,t,i,n,a,o,l,s,u){return e[0]=r,e[1]=t,e[2]=i,e[3]=n,e[4]=a,e[5]=o,e[6]=l,e[7]=s,e[8]=u,e}function W9(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function X9(e,r){if(e===r){var t=r[1],i=r[2],n=r[5];e[1]=r[3],e[2]=r[6],e[3]=t,e[5]=r[7],e[6]=i,e[7]=n}else e[0]=r[0],e[1]=r[3],e[2]=r[6],e[3]=r[1],e[4]=r[4],e[5]=r[7],e[6]=r[2],e[7]=r[5],e[8]=r[8];return e}function Dz(e,r){var t=r[0],i=r[1],n=r[2],a=r[3],o=r[4],l=r[5],s=r[6],u=r[7],c=r[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,e[0]=f*d,e[1]=(-c*i+n*u)*d,e[2]=(l*i-n*o)*d,e[3]=h*d,e[4]=(c*t-n*s)*d,e[5]=(-l*t+n*a)*d,e[6]=v*d,e[7]=(-u*t+i*s)*d,e[8]=(o*t-i*a)*d,e):null}function U9(e,r){var t=r[0],i=r[1],n=r[2],a=r[3],o=r[4],l=r[5],s=r[6],u=r[7],c=r[8];return e[0]=o*c-l*u,e[1]=n*u-i*c,e[2]=i*l-n*o,e[3]=l*s-a*c,e[4]=t*c-n*s,e[5]=n*a-t*l,e[6]=a*u-o*s,e[7]=i*s-t*u,e[8]=t*o-i*a,e}function q9(e){var r=e[0],t=e[1],i=e[2],n=e[3],a=e[4],o=e[5],l=e[6],s=e[7],u=e[8];return r*(u*a-o*s)+t*(-u*n+o*l)+i*(s*n-a*l)}function wh(e,r,t){var i=r[0],n=r[1],a=r[2],o=r[3],l=r[4],s=r[5],u=r[6],c=r[7],f=r[8],h=t[0],v=t[1],d=t[2],p=t[3],x=t[4],m=t[5],_=t[6],b=t[7],w=t[8];return e[0]=h*i+v*o+d*u,e[1]=h*n+v*l+d*c,e[2]=h*a+v*s+d*f,e[3]=p*i+x*o+m*u,e[4]=p*n+x*l+m*c,e[5]=p*a+x*s+m*f,e[6]=_*i+b*o+w*u,e[7]=_*n+b*l+w*c,e[8]=_*a+b*s+w*f,e}function Z9(e,r,t){var i=r[0],n=r[1],a=r[2],o=r[3],l=r[4],s=r[5],u=r[6],c=r[7],f=r[8],h=t[0],v=t[1];return e[0]=i,e[1]=n,e[2]=a,e[3]=o,e[4]=l,e[5]=s,e[6]=h*i+v*o+u,e[7]=h*n+v*l+c,e[8]=h*a+v*s+f,e}function Q9(e,r,t){var i=r[0],n=r[1],a=r[2],o=r[3],l=r[4],s=r[5],u=r[6],c=r[7],f=r[8],h=Math.sin(t),v=Math.cos(t);return e[0]=v*i+h*o,e[1]=v*n+h*l,e[2]=v*a+h*s,e[3]=v*o-h*i,e[4]=v*l-h*n,e[5]=v*s-h*a,e[6]=u,e[7]=c,e[8]=f,e}function K9(e,r,t){var i=t[0],n=t[1];return e[0]=i*r[0],e[1]=i*r[1],e[2]=i*r[2],e[3]=n*r[3],e[4]=n*r[4],e[5]=n*r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function $z(e,r){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=r[0],e[7]=r[1],e[8]=1,e}function kz(e,r){var t=Math.sin(r),i=Math.cos(r);return e[0]=i,e[1]=t,e[2]=0,e[3]=-t,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Rz(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=r[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function J9(e,r){return e[0]=r[0],e[1]=r[1],e[2]=0,e[3]=r[2],e[4]=r[3],e[5]=0,e[6]=r[4],e[7]=r[5],e[8]=1,e}function t7(e,r){var t=r[0],i=r[1],n=r[2],a=r[3],o=t+t,l=i+i,s=n+n,u=t*o,c=i*o,f=i*l,h=n*o,v=n*l,d=n*s,p=a*o,x=a*l,m=a*s;return e[0]=1-f-d,e[3]=c-m,e[6]=h+x,e[1]=c+m,e[4]=1-u-d,e[7]=v-p,e[2]=h-x,e[5]=v+p,e[8]=1-u-f,e}function e7(e,r){var t=r[0],i=r[1],n=r[2],a=r[3],o=r[4],l=r[5],s=r[6],u=r[7],c=r[8],f=r[9],h=r[10],v=r[11],d=r[12],p=r[13],x=r[14],m=r[15],_=t*l-i*o,b=t*s-n*o,w=t*u-a*o,S=i*s-n*l,M=i*u-a*l,O=n*u-a*s,F=c*p-f*d,L=c*x-h*d,D=c*m-v*d,R=f*x-h*p,H=f*m-v*p,k=h*m-v*x,V=_*k-b*H+w*R+S*D-M*L+O*F;return V?(V=1/V,e[0]=(l*k-s*H+u*R)*V,e[1]=(s*D-o*k-u*L)*V,e[2]=(o*H-l*D+u*F)*V,e[3]=(n*H-i*k-a*R)*V,e[4]=(t*k-n*D+a*L)*V,e[5]=(i*D-t*H-a*F)*V,e[6]=(p*O-x*M+m*S)*V,e[7]=(x*w-d*O-m*b)*V,e[8]=(d*M-p*w+m*_)*V,e):null}function r7(e,r,t){return e[0]=2/r,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/t,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function i7(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function n7(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function a7(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e[3]=r[3]+t[3],e[4]=r[4]+t[4],e[5]=r[5]+t[5],e[6]=r[6]+t[6],e[7]=r[7]+t[7],e[8]=r[8]+t[8],e}function Bz(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e[3]=r[3]-t[3],e[4]=r[4]-t[4],e[5]=r[5]-t[5],e[6]=r[6]-t[6],e[7]=r[7]-t[7],e[8]=r[8]-t[8],e}function o7(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e[4]=r[4]*t,e[5]=r[5]*t,e[6]=r[6]*t,e[7]=r[7]*t,e[8]=r[8]*t,e}function l7(e,r,t,i){return e[0]=r[0]+t[0]*i,e[1]=r[1]+t[1]*i,e[2]=r[2]+t[2]*i,e[3]=r[3]+t[3]*i,e[4]=r[4]+t[4]*i,e[5]=r[5]+t[5]*i,e[6]=r[6]+t[6]*i,e[7]=r[7]+t[7]*i,e[8]=r[8]+t[8]*i,e}function s7(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]}function u7(e,r){var 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=r[0],h=r[1],v=r[2],d=r[3],p=r[4],x=r[5],m=r[6],_=r[7],b=r[8];return Math.abs(t-f)<=Bi*Math.max(1,Math.abs(t),Math.abs(f))&&Math.abs(i-h)<=Bi*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-v)<=Bi*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-d)<=Bi*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-p)<=Bi*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(l-x)<=Bi*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(s-m)<=Bi*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(u-_)<=Bi*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(c-b)<=Bi*Math.max(1,Math.abs(c),Math.abs(b))}var c7=wh,f7=Bz,h7=Object.freeze(Object.defineProperty({__proto__:null,create:G9,fromMat4:z9,clone:V9,copy:j9,fromValues:H9,set:Y9,identity:W9,transpose:X9,invert:Dz,adjoint:U9,determinant:q9,multiply:wh,translate:Z9,rotate:Q9,scale:K9,fromTranslation:$z,fromRotation:kz,fromScaling:Rz,fromMat2d:J9,fromQuat:t7,normalFromMat4:e7,projection:r7,str:i7,frob:n7,add:a7,subtract:Bz,multiplyScalar:o7,multiplyScalarAndAdd:l7,exactEquals:s7,equals:u7,mul:c7,sub:f7},Symbol.toStringTag,{value:"Module"}));function Nz(){var e=new Un(3);return Un!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function v7(e){var r=new Un(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function Gz(e){var r=e[0],t=e[1],i=e[2];return Math.hypot(r,t,i)}function d7(e,r,t){var i=new Un(3);return i[0]=e,i[1]=r,i[2]=t,i}function p7(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function g7(e,r,t,i){return e[0]=r,e[1]=t,e[2]=i,e}function y7(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e}function zz(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e}function Vz(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e[2]=r[2]*t[2],e}function jz(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e[2]=r[2]/t[2],e}function m7(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e[2]=Math.ceil(r[2]),e}function x7(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e[2]=Math.floor(r[2]),e}function _7(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e[2]=Math.min(r[2],t[2]),e}function b7(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e[2]=Math.max(r[2],t[2]),e}function w7(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e[2]=Math.round(r[2]),e}function C7(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e}function S7(e,r,t,i){return e[0]=r[0]+t[0]*i,e[1]=r[1]+t[1]*i,e[2]=r[2]+t[2]*i,e}function Hz(e,r){var t=r[0]-e[0],i=r[1]-e[1],n=r[2]-e[2];return Math.hypot(t,i,n)}function Yz(e,r){var t=r[0]-e[0],i=r[1]-e[1],n=r[2]-e[2];return t*t+i*i+n*n}function Wz(e){var r=e[0],t=e[1],i=e[2];return r*r+t*t+i*i}function A7(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e}function T7(e,r){return e[0]=1/r[0],e[1]=1/r[1],e[2]=1/r[2],e}function M7(e,r){var t=r[0],i=r[1],n=r[2],a=t*t+i*i+n*n;return a>0&&(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;l<s;l+=t)e[0]=r[l],e[1]=r[l+1],e[2]=r[l+2],a(e,e,o),r[l]=e[0],r[l+1]=e[1],r[l+2]=e[2];return r}}(),Uz=Object.freeze(Object.defineProperty({__proto__:null,create:Nz,clone:v7,length:Gz,fromValues:d7,copy:p7,set:g7,add:y7,subtract:zz,multiply:Vz,divide:jz,ceil:m7,floor:x7,min:_7,max:b7,round:w7,scale:C7,scaleAndAdd:S7,distance:Hz,squaredDistance:Yz,squaredLength:Wz,negate:A7,inverse:T7,normalize:M7,dot:Xz,cross:E7,lerp:O7,hermite:F7,bezier:P7,random:I7,transformMat4:L7,transformMat3:kf,transformQuat:D7,rotateX:$7,rotateY:k7,rotateZ:R7,angle:B7,zero:N7,str:G7,exactEquals:z7,equals:V7,sub:j7,mul:H7,div:Y7,dist:W7,sqrDist:X7,len:U7,sqrLen:q7,forEach:Z7},Symbol.toStringTag,{value:"Module"}));function qz(){var e=new Un(2);return Un!=Float32Array&&(e[0]=0,e[1]=0),e}function Q7(e){var r=new Un(2);return r[0]=e[0],r[1]=e[1],r}function K7(e,r){var t=new Un(2);return t[0]=e,t[1]=r,t}function J7(e,r){return e[0]=r[0],e[1]=r[1],e}function tq(e,r,t){return e[0]=r,e[1]=t,e}function ma(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e}function yM(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e}function Zz(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e}function Qz(e,r,t){return e[0]=r[0]/t[0],e[1]=r[1]/t[1],e}function eq(e,r){return e[0]=Math.ceil(r[0]),e[1]=Math.ceil(r[1]),e}function rq(e,r){return e[0]=Math.floor(r[0]),e[1]=Math.floor(r[1]),e}function wr(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e}function Cr(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e}function iq(e,r){return e[0]=Math.round(r[0]),e[1]=Math.round(r[1]),e}function hi(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e}function nq(e,r,t,i){return e[0]=r[0]+t[0]*i,e[1]=r[1]+t[1]*i,e}function us(e,r){var t=r[0]-e[0],i=r[1]-e[1];return Math.hypot(t,i)}function Kz(e,r){var t=r[0]-e[0],i=r[1]-e[1];return t*t+i*i}function Yl(e){var r=e[0],t=e[1];return Math.hypot(r,t)}function Jz(e){var r=e[0],t=e[1];return r*r+t*t}function aq(e,r){return e[0]=-r[0],e[1]=-r[1],e}function oq(e,r){return e[0]=1/r[0],e[1]=1/r[1],e}function mM(e,r){var t=r[0],i=r[1],n=t*t+i*i;return n>0&&(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<s;l+=t)e[0]=r[l],e[1]=r[l+1],a(e,e,o),r[l]=e[0],r[l+1]=e[1];return r}}(),Sq=Object.freeze(Object.defineProperty({__proto__:null,create:qz,clone:Q7,fromValues:K7,copy:J7,set:tq,add:ma,subtract:yM,multiply:Zz,divide:Qz,ceil:eq,floor:rq,min:wr,max:Cr,round:iq,scale:hi,scaleAndAdd:nq,distance:us,squaredDistance:Kz,length:Yl,squaredLength:Jz,negate:aq,inverse:oq,normalize:mM,dot:xM,cross:lq,lerp:sq,random:uq,transformMat2:cq,transformMat2d:fq,transformMat3:tV,transformMat4:hq,rotate:vq,angle:z0,zero:dq,str:pq,exactEquals:eV,equals:gq,len:yq,sub:Ql,mul:mq,div:xq,dist:_q,sqrDist:bq,sqrLen:wq,forEach:Cq},Symbol.toStringTag,{value:"Module"}));function mu(e,r,t){var i=[0,0,0,0,0,0,0,0,0];return $z(i,t),wh(e,i,r)}function o1(e,r,t){var i=[0,0,0,0,0,0,0,0,0];return kz(i,t),wh(e,i,r)}function _M(e,r,t){var i=[0,0,0,0,0,0,0,0,0];return Rz(i,t),wh(e,i,r)}function Aq(e,r,t){return wh(e,t,r)}function rr(e,r){for(var t=e?[].concat(e):[1,0,0,0,1,0,0,0,1],i=0,n=r.length;i<n;i++){var a=r[i];switch(a[0]){case"t":mu(t,t,[a[1],a[2]]);break;case"s":_M(t,t,[a[1],a[2]]);break;case"r":o1(t,t,a[1]);break;case"m":Aq(t,t,a[1]);break}}return t}function rV(e,r){return e[0]*r[1]-r[0]*e[1]}function l1(e,r,t){var i=z0(e,r),n=rV(e,r)>=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;t<e.length;t++)it(e[t])?r.push([].concat(e[t])):r.push(e[t]);return r}function Dq(e,r){var t={},i=r.attrs;for(var n in e)t[n]=i[n];return t}function $q(e,r){var t={},i=r.attr();return P(e,function(n,a){Fq.indexOf(a)===-1&&!Ge(i[a],n)&&(t[a]=n)}),t}function kq(e,r){if(r.onFrame)return e;var t=r.startTime,i=r.delay,n=r.duration,a=Object.prototype.hasOwnProperty;return P(e,function(o){t+i<o.startTime+o.delay+o.duration&&n>o.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;n<arguments.length;n++)i[n]=arguments[n];var a=i[0],o=i[1];if(!a)return this.attrs;if(qt(a)){for(var l in a)this.setAttr(l,a[l]);return this.afterAttrsChange(a),this}return i.length===2?(this.setAttr(a,o),this.afterAttrsChange((t={},t[a]=o,t)),this):this.attrs[a]},r.prototype.isClipped=function(t,i){var n=this.getClip();return n&&!n.isHit(t,i)},r.prototype.setAttr=function(t,i){var n=this.attrs[t];n!==i&&(this.attrs[t]=i,this.onAttrChange(t,i,n))},r.prototype.onAttrChange=function(t,i,n){t==="matrix"&&this.set("totalMatrix",null)},r.prototype.afterAttrsChange=function(t){if(this.cfg.isClipShape){var i=this.cfg.applyTo;i&&i.onCanvasChange("clip")}else this.onCanvasChange("attr")},r.prototype.show=function(){return this.set("visible",!0),this.onCanvasChange("show"),this},r.prototype.hide=function(){return this.set("visible",!1),this.onCanvasChange("hide"),this},r.prototype.setZIndex=function(t){this.set("zIndex",t);var i=this.getParent();return i&&i.sort(),this},r.prototype.toFront=function(){var t=this.getParent();if(!!t){var i=t.getChildren();this.get("el");var n=i.indexOf(this);i.splice(n,1),i.push(this),this.onCanvasChange("zIndex")}},r.prototype.toBack=function(){var t=this.getParent();if(!!t){var i=t.getChildren();this.get("el");var n=i.indexOf(this);i.splice(n,1),i.unshift(this),this.onCanvasChange("zIndex")}},r.prototype.remove=function(t){t===void 0&&(t=!0);var i=this.getParent();i?(Sz(i.getChildren(),this),i.get("clearing")||this.onCanvasChange("remove")):this.onCanvasChange("remove"),t&&this.destroy()},r.prototype.resetMatrix=function(){this.attr(kw,this.getDefaultMatrix()),this.onCanvasChange("matrix")},r.prototype.getMatrix=function(){return this.attr(kw)},r.prototype.setMatrix=function(t){this.attr(kw,t),this.onCanvasChange("matrix")},r.prototype.getTotalMatrix=function(){var t=this.cfg.totalMatrix;if(!t){var i=this.attr("matrix"),n=this.cfg.parentMatrix;n&&i?t=z2(n,i):t=i||n,this.set("totalMatrix",t)}return t},r.prototype.applyMatrix=function(t){var i=this.attr("matrix"),n=null;t&&i?n=z2(t,i):n=i||t,this.set("totalMatrix",n),this.set("parentMatrix",t)},r.prototype.getDefaultMatrix=function(){return null},r.prototype.applyToMatrix=function(t){var i=this.attr("matrix");return i?ro(i,t):t},r.prototype.invertFromMatrix=function(t){var i=this.attr("matrix");if(i){var n=mp(i);if(n)return ro(n,t)}return t},r.prototype.setClip=function(t){var i=this.getCanvas(),n=null;if(t){var a=this.getShapeBase(),o=Os(t.type),l=a[o];l&&(n=new l({type:t.type,isClipShape:!0,applyTo:this,attrs:t.attrs,canvas:i}))}return this.set("clipShape",n),this.onCanvasChange("clip"),n},r.prototype.getClip=function(){var t=this.cfg.clipShape;return t||null},r.prototype.clone=function(){var t=this,i=this.attrs,n={};P(i,function(l,s){it(i[s])?n[s]=Lq(i[s]):n[s]=i[s]});var a=this.constructor,o=new a({attrs:n});return P(Oq,function(l){o.set(l,t.get(l))}),o},r.prototype.destroy=function(){var t=this.destroyed;t||(this.attrs={},e.prototype.destroy.call(this))},r.prototype.isAnimatePaused=function(){return this.get("_pause").isPaused},r.prototype.animate=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(!(!this.get("timeline")&&!this.get("canvas"))){this.set("animating",!0);var n=this.get("timeline");n||(n=this.get("canvas").get("timeline"),this.set("timeline",n));var a=this.get("animations")||[];n.timer||n.initTimer();var o=t[0],l=t[1],s=t[2],u=s===void 0?"easeLinear":s,c=t[3],f=c===void 0?Yo:c,h=t[4],v=h===void 0?0:h,d,p,x,m,_;pt(o)?(d=o,o={}):qt(o)&&o.onFrame&&(d=o.onFrame,p=o.repeat),qt(l)?(_=l,l=_.duration,u=_.easing||"easeLinear",v=_.delay||0,p=_.repeat||p||!1,f=_.callback||Yo,x=_.pauseCallback||Yo,m=_.resumeCallback||Yo):(Mt(f)&&(v=f,f=null),pt(u)?(f=u,u="easeLinear"):u=u||"easeLinear");var b=$q(o,this),w={fromAttrs:Dq(b,this),toAttrs:b,duration:l,easing:u,repeat:p,callback:f,pauseCallback:x,resumeCallback:m,delay:v,startTime:n.getTime(),id:Fa(),onFrame:d,pathFormatted:!1};a.length>0?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;u<a.length;u++){var c=l(u);if(c==="break")break}},r.prototype.emitDelegateEvent=function(t,i,n){var a=this.getEvents(),o=i+Pq+n.type;(a[o]||a[Iq])&&(n.name=o,n.currentTarget=t,n.delegateTarget=this,n.delegateObject=t.get("delegateObject"),this.emit(o,n))},r.prototype.translate=function(t,i){t===void 0&&(t=0),i===void 0&&(i=0);var n=this.getMatrix(),a=cv(n,[["t",t,i]]);return this.setMatrix(a),this},r.prototype.move=function(t,i){var n=this.attr("x")||0,a=this.attr("y")||0;return this.translate(t-n,i-a),this},r.prototype.moveTo=function(t,i){return this.move(t,i)},r.prototype.scale=function(t,i){var n=this.getMatrix(),a=cv(n,[["s",t,i||t]]);return this.setMatrix(a),this},r.prototype.rotate=function(t){var i=this.getMatrix(),n=cv(i,[["r",t]]);return this.setMatrix(n),this},r.prototype.rotateAtStart=function(t){var i=this.attr(),n=i.x,a=i.y,o=this.getMatrix(),l=cv(o,[["t",-n,-a],["r",t],["t",n,a]]);return this.setMatrix(l),this},r.prototype.rotateAtPoint=function(t,i,n){var a=this.getMatrix(),o=cv(a,[["t",-t,-i],["r",n],["t",t,i]]);return this.setMatrix(o),this},r}(yp),V2={},yA="_INDEX";function nV(e,r){if(e.set("canvas",r),e.isGroup()){var t=e.get("children");t.length&&t.forEach(function(i){nV(i,r)})}}function aV(e,r){if(e.set("timeline",r),e.isGroup()){var t=e.get("children");t.length&&t.forEach(function(i){aV(i,r)})}}function Rq(e,r,t){t===void 0&&(t=!0),t?r.destroy():(r.set("parent",null),r.set("canvas",null)),Sz(e.getChildren(),r)}function Bq(e){return function(r,t){var i=e(r,t);return i===0?r[yA]-t[yA]:i}}var oV=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isCanvas=function(){return!1},r.prototype.getBBox=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.getBBox(),c=u.minX,f=u.maxX,h=u.minY,v=u.maxY;c<t&&(t=c),f>i&&(i=f),h<n&&(n=h),v>a&&(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;c<t&&(t=c),f>i&&(i=f),h<n&&(n=h),v>a&&(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<arguments.length;i++)t[i]=arguments[i];var n=t[0],a=t[1];qt(n)?a=n:a.type=n;var o=V2[a.type];o||(o=Os(a.type),V2[a.type]=o);var l=this.getShapeBase(),s=new l[o](a);return this.add(s),s},r.prototype.addGroup=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=t[0],a=t[1],o;if(pt(n))a?o=new n(a):o=new n({parent:this});else{var l=n||{},s=this.getGroupBase();o=new s(l)}return this.add(o),o},r.prototype.getCanvas=function(){var t;return this.isCanvas()?t=this:t=this.get("canvas"),t},r.prototype.getShape=function(t,i,n){if(!$f(this))return null;var a=this.getChildren(),o;if(this.isCanvas())o=this._findShape(a,t,i,n);else{var l=[t,i,1];l=this.invertFromMatrix(l),this.isClipped(l[0],l[1])||(o=this._findShape(a,l[0],l[1],n))}return o},r.prototype._findShape=function(t,i,n,a){for(var o=null,l=t.length-1;l>=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+(t<i)*6:t===a?o=(i-r)/l+2:o=(r-t)/l+4,l/=s<.5?a+n:2-a-n,o*=60):l=s>0&&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;n<t;++n)i[n]=e[n]*(1-a)+r[n]*a;return i}}function pV(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nZ(e,r){return(pV(r)?dV:gV)(e,r)}function gV(e,r){var t=r?r.length:0,i=e?Math.min(t,e.length):0,n=new Array(i),a=new Array(t),o;for(o=0;o<i;++o)n[o]=W0(e[o],r[o]);for(;o<t;++o)a[o]=r[o];return function(l){for(o=0;o<i;++o)a[o]=n[o](l);return a}}function aZ(e,r){var t=new Date;return e=+e,r=+r,function(i){return t.setTime(e*(1-i)+r*i),t}}function _A(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}function oZ(e,r){var t={},i={},n;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(n in r)n in e?t[n]=W0(e[n],r[n]):i[n]=r[n];return function(a){for(n in t)i[n]=t[n](a);return i}}var bA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bw=new RegExp(bA.source,"g");function lZ(e){return function(){return e}}function sZ(e){return function(r){return e(r)+""}}function uZ(e,r){var t=bA.lastIndex=Bw.lastIndex=0,i,n,a,o=-1,l=[],s=[];for(e=e+"",r=r+"";(i=bA.exec(e))&&(n=Bw.exec(r));)(a=n.index)>t&&(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 t<r.length&&(a=r.slice(t),l[o]?l[o]+=a:l[++o]=a),l.length<2?s[0]?sZ(s[0].x):lZ(r):(r=s.length,function(u){for(var c=0,f;c<r;++c)l[(f=s[c]).i]=f.x(u);return l.join("")})}function W0(e,r){var t=typeof r,i;return r==null||t==="boolean"?wM(r):(t==="number"?_A:t==="string"?(i=Wu(r))?(r=i,K2):uZ:r instanceof Wu?K2:r instanceof Date?aZ:pV(r)?dV:Array.isArray(r)?gV:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?oZ:_A)(e,r)}function cZ(e){return+e}function fZ(e){return e*e}function hZ(e){return e*(2-e)}function J2(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function vZ(e){return e*e*e}function dZ(e){return--e*e*e+1}function tL(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var CM=3,pZ=function e(r){r=+r;function t(i){return Math.pow(i,r)}return t.exponent=e,t}(CM),gZ=function e(r){r=+r;function t(i){return 1-Math.pow(1-i,r)}return t.exponent=e,t}(CM),eL=function e(r){r=+r;function t(i){return((i*=2)<=1?Math.pow(i,r):2-Math.pow(2-i,r))/2}return t.exponent=e,t}(CM),yV=Math.PI,mV=yV/2;function yZ(e){return+e==1?1:1-Math.cos(e*mV)}function mZ(e){return Math.sin(e*mV)}function rL(e){return(1-Math.cos(yV*e))/2}function cs(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function xZ(e){return cs(1-+e)}function _Z(e){return 1-cs(e)}function iL(e){return((e*=2)<=1?cs(1-e):2-cs(e-1))/2}function bZ(e){return 1-Math.sqrt(1-e*e)}function wZ(e){return Math.sqrt(1- --e*e)}function nL(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var wA=4/11,CZ=6/11,SZ=8/11,AZ=3/4,TZ=9/11,MZ=10/11,EZ=15/16,OZ=21/22,FZ=63/64,Ly=1/wA/wA;function PZ(e){return 1-Nd(1-e)}function Nd(e){return(e=+e)<wA?Ly*e*e:e<SZ?Ly*(e-=CZ)*e+AZ:e<MZ?Ly*(e-=TZ)*e+EZ:Ly*(e-=OZ)*e+FZ}function IZ(e){return((e*=2)<=1?1-Nd(1-e):Nd(e-1)+1)/2}var SM=1.70158,LZ=function e(r){r=+r;function t(i){return(i=+i)*i*(r*(i-1)+i)}return t.overshoot=e,t}(SM),DZ=function e(r){r=+r;function t(i){return--i*i*((i+1)*r+i)+1}return t.overshoot=e,t}(SM),aL=function e(r){r=+r;function t(i){return((i*=2)<1?i*i*((r+1)*i-r):(i-=2)*i*((r+1)*i+r)+2)/2}return t.overshoot=e,t}(SM),Bf=2*Math.PI,AM=1,TM=.3,$Z=function e(r,t){var i=Math.asin(1/(r=Math.max(1,r)))*(t/=Bf);function n(a){return r*cs(- --a)*Math.sin((i-a)/t)}return n.amplitude=function(a){return e(a,t*Bf)},n.period=function(a){return e(r,a)},n}(AM,TM),oL=function e(r,t){var i=Math.asin(1/(r=Math.max(1,r)))*(t/=Bf);function n(a){return 1-r*cs(a=+a)*Math.sin((a+i)/t)}return n.amplitude=function(a){return e(a,t*Bf)},n.period=function(a){return e(r,a)},n}(AM,TM),kZ=function e(r,t){var i=Math.asin(1/(r=Math.max(1,r)))*(t/=Bf);function n(a){return((a=a*2-1)<0?r*cs(-a)*Math.sin((i-a)/t):2-r*cs(a)*Math.sin((i+a)/t))/2}return n.amplitude=function(a){return e(a,t*Bf)},n.period=function(a){return e(r,a)},n}(AM,TM),RZ=Object.freeze(Object.defineProperty({__proto__:null,easeLinear:cZ,easeQuad:J2,easeQuadIn:fZ,easeQuadOut:hZ,easeQuadInOut:J2,easeCubic:tL,easeCubicIn:vZ,easeCubicOut:dZ,easeCubicInOut:tL,easePoly:eL,easePolyIn:pZ,easePolyOut:gZ,easePolyInOut:eL,easeSin:rL,easeSinIn:yZ,easeSinOut:mZ,easeSinInOut:rL,easeExp:iL,easeExpIn:xZ,easeExpOut:_Z,easeExpInOut:iL,easeCircle:nL,easeCircleIn:bZ,easeCircleOut:wZ,easeCircleInOut:nL,easeBounce:Nd,easeBounceIn:PZ,easeBounceOut:Nd,easeBounceInOut:IZ,easeBack:aL,easeBackIn:LZ,easeBackOut:DZ,easeBackInOut:aL,easeElastic:oL,easeElasticIn:$Z,easeElasticOut:oL,easeElasticInOut:kZ},Symbol.toStringTag,{value:"Module"})),xV={};function BZ(e){return xV[e.toLowerCase()]||RZ[e]}function MM(e,r){xV[e.toLowerCase()]=r}var NZ=function(e){return["fill","stroke","fillStyle","strokeStyle"].includes(e)},GZ=function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)},lL=[1,0,0,0,1,0,0,0,1];function zZ(e,r,t){var i={},n=r.fromAttrs,a=r.toAttrs;if(!e.destroyed){var o;for(var l in a)if(!Ge(n[l],a[l]))if(l==="path"){var s=a[l],u=n[l];s.length>u.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;c<s.length;c++){for(var f=s[c],h=u[c],v=[],d=0;d<f.length;d++)Mt(f[d])&&h&&Mt(h[d])?(o=W0(h[d],f[d]),v.push(o(t))):v.push(f[d]);i[l].push(v)}}else if(l==="matrix"){var p=nZ(n[l]||lL,a[l]||lL),x=p(t);i[l]=x}else NZ(l)&&GZ(a[l])?i[l]=a[l]:pt(a[l])||(o=W0(n[l],a[l]),i[l]=o(t));e.attr(i)}}function VZ(e,r,t){var i=r.startTime,n=r.delay;if(t<i+n||r._paused)return!1;var a,o=r.duration,l=r.easing,s=BZ(l);if(t=t-i-r.delay,r.repeat)a=t%o/o,a=s(a);else if(a=t/o,a<1)a=s(a);else return r.onFrame?e.attr(r.onFrame(1)):e.attr(r.toAttrs),!0;if(r.onFrame){var u=r.onFrame(a);e.attr(u)}else zZ(e,r,a);return!1}var jZ=function(){function e(r){this.animators=[],this.current=0,this.timer=null,this.canvas=r}return e.prototype.initTimer=function(){var r=this,t=!1,i,n,a;this.timer=cV(function(o){if(r.current=o,r.animators.length>0){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<i.length;n++){var a=i[n];t.add(a.clone())}return t},r}(oV),wp=function(e){X(r,e);function r(t){return e.call(this,t)||this}return r.prototype._isInBBox=function(t,i){var n=this.getBBox();return n.minX<=t&&n.maxX>=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<l&&(o=v,l=p)}if(o===0)return{x:e[0],y:r[0]};if(o===1){var x=e.length;return{x:e[x-1],y:r[x-1]}}l=1/0;for(var h=0;h<32&&!(f<ZZ);h++){var m=o-f,_=o+f,d=[n.apply(null,e.concat([m])),n.apply(null,r.concat([m]))],p=Qr(s[0],s[1],d[0],d[1]);if(m>=0&&p<l)o=m,l=p;else{var b=[n.apply(null,e.concat([_])),n.apply(null,r.concat([_]))],w=Qr(s[0],s[1],b[0],b[1]);_<=1&&w<l?(o=_,l=w):f*=.5}}return{x:n.apply(null,e.concat([o])),y:n.apply(null,r.concat([o]))}}function QZ(e,r){for(var t=0,i=e.length,n=0;n<i;n++){var a=e[n],o=r[n],l=e[(n+1)%i],s=r[(n+1)%i];t+=Qr(a,o,l,s)}return t/2}function Bl(e,r,t,i){var n=1-i;return n*n*e+2*i*n*r+i*i*t}function vL(e,r,t){var i=e+t-2*r;if(fd(i,0))return[.5];var n=(e-r)/i;return n<=1&&n>=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;h<c.length;h++)s.push(Nl(e,t,n,o,c[h]));for(var h=0;h<f.length;h++)u.push(Nl(r,i,a,l,f[h]));return uc(s,u)},length:function(e,r,t,i,n,a,o,l){return SA(e,r,t,i,n,a,o,l,3)},nearestPoint:function(e,r,t,i,n,a,o,l,s,u,c){return CV([e,t,n,o],[r,i,a,l],s,u,Nl,c)},pointDistance:function(e,r,t,i,n,a,o,l,s,u,c){var f=this.nearestPoint(e,r,t,i,n,a,o,l,s,u,c);return Qr(f.x,f.y,s,u)},interpolationAt:Nl,pointAt:function(e,r,t,i,n,a,o,l,s){return{x:Nl(e,t,n,o,s),y:Nl(r,i,a,l,s)}},divide:function(e,r,t,i,n,a,o,l,s){return AV(e,r,t,i,n,a,o,l,s)},tangentAngle:function(e,r,t,i,n,a,o,l,s){var u=pL(e,t,n,o,s),c=pL(r,i,a,l,s);return Sp(Math.atan2(c,u))}};function gL(e,r){var t=Math.abs(e);return r>0?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;a<o?a<h&&h<o&&c.push(h):o<h&&h<a&&c.push(h)}for(var f=0;f<c.length;f++){var v=yL(e,r,t,i,n,c[f]);v<s&&(s=v),v>u&&(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;a<o?a<_&&_<o&&m.push(_):o<_&&_<a&&m.push(_)}for(var f=0;f<m.length;f++){var b=mL(e,r,t,i,n,m[f]);b<p&&(p=b),b>x&&(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);v<a?h=xL(t,i,a):v>o&&(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;i<e.length-1;i++){var n=e[i],a=e[i+1],o=Qr(n[0],n[1],a[0],a[1]),l={from:n,to:a,length:o};t.push(l),r+=o}return{segments:t,totalLength:r}}function EV(e){if(e.length<2)return 0;for(var r=0,t=0;t<e.length-1;t++){var i=e[t],n=e[t+1];r+=Qr(i[0],i[1],n[0],n[1])}return r}function OV(e,r){if(r>1||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<i.length;l++){var s=i[l],u=s.from,c=s.to,f=s.length/n;if(r>=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<i.length;l++){var s=i[l],u=s.from,c=s.to,f=s.length/n;if(r>=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;n<e.length-1;n++){var a=e[n],o=e[n+1],l=Mr.pointDistance(a[0],a[1],o[0],o[1],r,t);l<i&&(i=l)}return i}var u1={box:function(e){for(var r=[],t=[],i=0;i<e.length;i++){var n=e[i];r.push(n[0]),t.push(n[1])}return uc(r,t)},length:function(e){return EV(e)},pointAt:function(e,r){return OV(e,r)},pointDistance:function(e,r,t){return PV(e,r,t)},tangentAngle:function(e,r){return FV(e,r)}};function Dy(e){var r=e.slice(0);return e.length&&r.push(e[0]),r}var nQ={box:function(e){return u1.box(e)},length:function(e){return EV(Dy(e))},pointAt:function(e,r){return OV(Dy(e),r)},pointDistance:function(e,r,t){return PV(Dy(e),r,t)},tangentAngle:function(e,r){return FV(Dy(e),r)}},aQ=Object.freeze(Object.defineProperty({__proto__:null,Quad:EM,Cubic:Cf,Arc:TV,Line:Mr,Polygon:nQ,Polyline:u1,Util:qZ},Symbol.toStringTag,{value:"Module"}));function bL(e,r){return!e||!r?e||r:{minX:Math.min(e.minX,r.minX),minY:Math.min(e.minY,r.minY),maxX:Math.max(e.maxX,r.maxX),maxY:Math.max(e.maxY,r.maxY)}}function OM(e,r){var t=e.get("startArrowShape"),i=e.get("endArrowShape"),n=null,a=null;return t&&(n=t.getCanvasBBox(),r=bL(r,n)),i&&(a=i.getCanvasBBox(),r=bL(r,a)),r}function oQ(e){for(var r=e.attr(),t=r.points,i=[],n=[],a=0;a<t.length;a++){var o=t[a];i.push(o[0]),n.push(o[1])}var l=uc(i,n),s=l.x,u=l.y,c=l.width,f=l.height,h={minX:s,minY:u,maxX:s+c,maxY:u+f};return h=OM(e,h),{x:h.minX,y:h.minY,width:h.maxX-h.minX,height:h.maxY-h.minY}}function lQ(e){for(var r=e.attr(),t=r.points,i=[],n=[],a=0;a<t.length;a++){var o=t[a];i.push(o[0]),n.push(o[1])}return uc(i,n)}var Gw=null;function Ap(){if(!Gw){var e=document.createElement("canvas");e.width=1,e.height=1,Gw=e.getContext("2d")}return Gw}function Tp(e,r,t){var i=1;if(Ct(e)&&(i=e.split(`
`).length),i>1){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;i<o&&(i=o)})}else i=t.measureText(e).width;return t.restore(),i}function Mp(e){var r=e.fontSize,t=e.fontFamily,i=e.fontWeight,n=e.fontStyle,a=e.fontVariant;return[n,a,i,r+"px",t].join(" ").trim()}function cQ(e){var r=e.attr(),t=r.x,i=r.y,n=r.text,a=r.fontSize,o=r.lineHeight,l=r.font;l||(l=Mp(r));var s=uQ(n,l),u;if(!s)u={x:t,y:i,width:0,height:0};else{var c=r.textAlign,f=r.textBaseline,h=Tp(n,a,o),v={x:t,y:i-h};c&&(c==="end"||c==="right"?v.x-=s:c==="center"&&(v.x-=s/2)),f&&(f==="top"?v.y+=h:f==="middle"&&(v.y+=h/2)),u={x:v.x,y:v.y,width:s,height:h}}return u}var fQ=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig,hQ=/[^\s\,]+/ig;function IV(e){var r=e||[];if(it(r))return r;if(Ct(r))return r=r.match(fQ),P(r,function(t,i){if(t=t.match(hQ),t[0].length>1){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<d;v+=1){var p=e[v];s=wr([0,0],s,p),u=Cr([0,0],u,p)}}for(var v=0,x=e.length;v<x;v+=1){var p=e[v];if(v===0&&!t)h=p;else if(v===x-1&&!t)f=p,n.push(h),n.push(f);else{var m=[v?v-1:x-1,v-1][t?0:1];o=e[m],l=e[t?(v+1)%x:v+1];var _=[0,0];_=Ql(_,l,o),_=hi(_,_,r);var b=us(p,o),w=us(p,l),S=b+w;S!==0&&(b/=S,w/=S);var M=hi([0,0],_,-b),O=hi([0,0],_,w);f=ma([0,0],p,M),c=ma([0,0],p,O),c=wr([0,0],c,Cr([0,0],l,p)),c=Cr([0,0],c,wr([0,0],l,p)),M=Ql([0,0],c,p),M=hi([0,0],M,-b/w),f=ma([0,0],p,M),f=wr([0,0],f,Cr([0,0],o,p)),f=Cr([0,0],f,wr([0,0],o,p)),O=Ql([0,0],p,f),O=hi([0,0],O,w/b),c=ma([0,0],p,O),a&&(f=Cr([0,0],f,s),f=wr([0,0],f,u),c=Cr([0,0],c,s),c=wr([0,0],c,u)),n.push(h),n.push(f),h=c}}return t&&n.push(n.shift()),n}function LV(e,r,t){r===void 0&&(r=!1),t===void 0&&(t=[[0,0],[1,1]]);for(var i=!!r,n=[],a=0,o=e.length;a<o;a+=2)n.push([e[a],e[a+1]]);for(var l=vQ(n,.4,i,t),s=n.length,u=[],c,f,h,a=0;a<s-1;a+=1)c=l[a*2],f=l[a*2+1],h=n[a+1],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]]);return i&&(c=l[s],f=l[s+1],h=n[0],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]])),u}function dQ(e,r){var t=[],i=[];function n(a,o){if(a.length===1)t.push(a[0]),i.push(a[0]);else{for(var l=[],s=0;s<a.length-1;s++)s===0&&t.push(a[0]),s===a.length-2&&i.push(a[s+1]),l[s]=[(1-o)*a[s][0]+o*a[s+1][0],(1-o)*a[s][1]+o*a[s+1][1]];n(l,o)}}return e.length&&n(e,r),{left:t,right:i.reverse()}}function pQ(e,r,t){var i=[[e[1],e[2]]];t=t||2;var n=[];r[0]==="A"?(i.push(r[6]),i.push(r[7])):r[0]==="C"?(i.push([r[1],r[2]]),i.push([r[3],r[4]]),i.push([r[5],r[6]])):r[0]==="S"||r[0]==="Q"?(i.push([r[1],r[2]]),i.push([r[3],r[4]])):i.push([r[1],r[2]]);for(var a=i,o=1/t,l=0;l<t-1;l++){var s=o/(1-o*l),u=dQ(a,s);n.push(u.left),a=u.right}n.push(a);var c=n.map(function(f){var h=[];return f.length===4&&(h.push("C"),h=h.concat(f[2])),f.length>=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<i-t;o++)e.push(e[0]);return e}for(var o=0;o<i;o++){var l=Math.floor(n*o);a[l]=(a[l]||0)+1}var s=a.reduce(function(u,c,f){return f===t?u.concat(e[t]):u.concat(gQ(e[f],e[f+1],c))},[]);return s.unshift(e[0]),(r[i]==="Z"||r[i]==="z")&&s.push("Z"),s}function mQ(e,r,t){var i=null,n=t;return r<n&&(n=r,i="add"),e<n&&(n=e,i="del"),{type:i,min:n}}var xQ=function(e,r){var t=e.length,i=r.length,n,a,o=0;if(t===0||i===0)return null;for(var l=[],s=0;s<=t;s++)l[s]=[],l[s][0]={min:s};for(var u=0;u<=i;u++)l[0][u]={min:u};for(var s=1;s<=t;s++){n=e[s-1];for(var u=1;u<=i;u++){a=r[u-1],Ge(n,a)?o=0:o=1;var c=l[s-1][u].min+1,f=l[s][u-1].min+1,h=l[s-1][u-1].min+o;l[s][u]=mQ(c,f,h)}}return l};function _Q(e,r){var t=xQ(e,r),i=e.length,n=r.length,a=[],o=1,l=1;if(t[i][n]!==i){for(var s=1;s<=i;s++){var u=t[s][s].min;l=s;for(var c=o;c<=n;c++)t[s][c].min<u&&(u=t[s][c].min,l=c);o=l,t[s][o].type&&a.push({index:s-1,type:t[s][o].type})}for(var s=a.length-1;s>=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,i<n)for(var s=0;s<n-i;s++)e[i-1][0]==="z"||e[i-1][0]==="Z"?e.splice(i-2,0,e[i-2]):e.push(e[i-1]);return e}function DV(e){var r=[];switch(e[0]){case"M":r.push([e[1],e[2]]);break;case"L":r.push([e[1],e[2]]);break;case"A":r.push([e[6],e[7]]);break;case"Q":r.push([e[3],e[4]]),r.push([e[1],e[2]]);break;case"T":r.push([e[1],e[2]]);break;case"C":r.push([e[5],e[6]]),r.push([e[1],e[2]]),r.push([e[3],e[4]]);break;case"S":r.push([e[3],e[4]]),r.push([e[1],e[2]]);break;case"H":r.push([e[1],e[1]]);break;case"V":r.push([e[1],e[1]]);break}return r}function zw(e,r,t){for(var i=[].concat(e),n,a=1/(t+1),o=DV(r)[0],l=1;l<=t;l++)a*=l,n=Math.floor(e.length*a),n===0?i.unshift([o[0]*a+e[n][0]*(1-a),o[1]*a+e[n][1]*(1-a)]):i.splice(n,0,[o[0]*a+e[n][0]*(1-a),o[1]*a+e[n][1]*(1-a)]);return i}function bQ(e,r){if(e.length<=1)return e;for(var t,i=0;i<r.length;i++)if(e[i][0]!==r[i][0])switch(t=DV(e[i]),r[i][0]){case"M":e[i]=["M"].concat(t[0]);break;case"L":e[i]=["L"].concat(t[0]);break;case"A":e[i]=[].concat(r[i]),e[i][6]=t[0][0],e[i][7]=t[0][1];break;case"Q":if(t.length<2)if(i>0)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<r.length;i++){var n=r[i][0];if(SQ.test(n)||["V","H","T","S"].indexOf(n)>=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;i<h;i++){var v=r[i],d=a[i-1],p=[],n=v[0],x=n.toUpperCase();if(n!==x)switch(p[0]=x,x){case"A":p[1]=v[1],p[2]=v[2],p[3]=v[3],p[4]=v[4],p[5]=v[5],p[6]=+v[6]+o,p[7]=+v[7]+l;break;case"V":p[1]=+v[1]+l;break;case"H":p[1]=+v[1]+o;break;case"M":s=+v[1]+o,u=+v[2]+l,p[1]=s,p[2]=u;break;default:for(var m=1,_=v.length;m<_;m++)p[m]=+v[m]+(m%2?o:l)}else p=r[i];switch(x){case"Z":o=+s,l=+u;break;case"H":o=p[1],p=["L",o,l];break;case"V":l=p[1],p=["L",o,l];break;case"T":o=p[1],l=p[2];var b=wL([d[1],d[2]],[d[3],d[4]]);p=["Q",b[0],b[1],o,l];break;case"S":o=p[p.length-2],l=p[p.length-1];var w=d.length,S=wL([d[w-4],d[w-3]],[d[w-2],d[w-1]]);p=["C",S[0],S[1],p[1],p[2],o,l];break;case"M":s=p[p.length-2],u=p[p.length-1];break;default:o=p[p.length-2],l=p[p.length-1]}a.push(p)}return a}var vd=Math.PI*2,Vw=function(e,r,t,i,n,a,o){var l=e.x,s=e.y;l*=r,s*=t;var u=i*l-n*s,c=n*l+i*s;return{x:u+a,y:c+o}},AQ=function(e,r){var t=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(e),n=Math.sin(e),a=Math.cos(e+r),o=Math.sin(e+r);return[{x:i-n*t,y:n+i*t},{x:a+o*t,y:o-a*t},{x:a,y:o}]},CL=function(e,r,t,i){var n=e*i-r*t<0?-1:1,a=e*t+r*i;return a>1&&(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;D<L;D++)v.push(AQ(M,O)),M+=O;return v.map(function(R){var H=Vw(R[0],a,o,p,d,w,S),k=H.x,V=H.y,U=Vw(R[1],a,o,p,d,w,S),B=U.x,G=U.y,N=Vw(R[2],a,o,p,d,w,S),W=N.x,q=N.y;return{x1:k,y1:V,x2:B,y2:G,x:W,y:q}})};function EQ(e,r,t,i,n,a,o,l,s){var u=MQ({px:e,py:r,cx:l,cy:s,rx:t,ry:i,xAxisRotation:n,largeArcFlag:a,sweepFlag:o});return u.reduce(function(c,f){var h=f.x1,v=f.y1,d=f.x2,p=f.y2,x=f.x,m=f.y;return c.push(h,v,d,p,x,m),c},[])}function OQ(e,r,t,i,n,a){var o=.3333333333333333,l=2/3;return[o*e+l*t,o*r+l*i,o*n+l*t,o*a+l*i,n,a]}function $y(e,r,t,i){return[e,r,t,i,t,i]}function FQ(e,r){"TQ".indexOf(e[0])<0&&(r.qx=null,r.qy=null);var t=e.slice(1),i=t[0],n=t[1];switch(e[0]){case"M":return r.x=i,r.y=n,e;case"A":return["C"].concat(EQ.apply(0,[r.x1,r.y1].concat(e.slice(1))));case"Q":return r.qx=i,r.qy=n,["C"].concat(OQ.apply(0,[r.x1,r.y1].concat(e.slice(1))));case"L":return["C"].concat($y(r.x1,r.y1,e[1],e[2]));case"H":return["C"].concat($y(r.x1,r.y1,e[1],r.y1));case"V":return["C"].concat($y(r.x1,r.y1,r.x1,e[1]));case"Z":return["C"].concat($y(r.x1,r.y1,r.x,r.y))}return e}function AA(e,r){r===void 0&&(r=!1);for(var t=f1(e),i={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},n=[],a="",o=t.length,l,s,u=[],c=0;c<o;c+=1)t[c]&&(a=t[c][0]),n[c]=a,t[c]=FQ(t[c],i),PQ(t,n,c),o=t.length,a==="Z"&&u.push(c),l=t[c],s=l.length,i.x1=+l[s-2],i.y1=+l[s-1],i.x2=+l[s-4]||i.x1,i.y2=+l[s-3]||i.y1;return r?[t,u]:t}function PQ(e,r,t){if(e[t].length>7){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;d<c;d++){var p=u*f[d]+u,x=SL(p,e,t,n,o),m=SL(p,r,i,a,l),_=x*x+m*m;v+=h[d]*Math.sqrt(_)}return u*v},IQ=function(e,r,t,i,n,a,o,l){for(var s=[],u=[[],[]],c,f,h,v,d=0;d<2;++d){if(d===0?(f=6*e-12*t+6*n,c=-3*e+9*t-9*n+3*o,h=3*t-3*e):(f=6*r-12*i+6*a,c=-3*r+9*i-9*a+3*l,h=3*i-3*r),Math.abs(c)<1e-12){if(Math.abs(f)<1e-12)continue;v=-h/f,v>0&&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.min(n,o)||Math.min(e,t)>Math.max(n,o)||Math.max(r,i)<Math.min(a,l)||Math.min(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.x<r.x2&&e.x>r.x||r.x<e.x2&&r.x>e.x)&&(e.y<r.y2&&e.y>r.y||r.y<e.y2&&r.y>e.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<l+1;v++){var d=ML.apply(0,e.concat(v/l));u.push({x:d.x,y:d.y,t:v/l})}for(var v=0;v<s+1;v++){var d=ML.apply(0,r.concat(v/s));c.push({x:d.x,y:d.y,t:v/s})}for(var v=0;v<l;v++)for(var p=0;p<s;p++){var x=u[v],m=u[v+1],_=c[p],b=c[p+1],w=Math.abs(m.x-x.x)<.001?"y":"x",S=Math.abs(b.x-_.x)<.001?"y":"x",M=LQ(x.x,x.y,m.x,m.y,_.x,_.y,b.x,b.y);if(M){if(f[M.x.toFixed(4)]===M.y.toFixed(4))continue;f[M.x.toFixed(4)]=M.y.toFixed(4);var O=x.t+Math.abs((M[w]-x[w])/(m[w]-x[w]))*(m.t-x.t),F=_.t+Math.abs((M[S]-_[S])/(b[S]-_[S]))*(b.t-_.t);O>=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;d<p;d++){var x=e[d];if(x[0]==="M")i=l=x[1],n=s=x[2];else{x[0]==="C"?(f=[i,n].concat(x.slice(1)),i=f[6],n=f[7]):(f=[i,n,i,n,l,s,l,s],i=l,n=s);for(var m=0,_=r.length;m<_;m++){var b=r[m];if(b[0]==="M")a=u=b[1],o=c=b[2];else{b[0]==="C"?(h=[a,o].concat(b.slice(1)),a=h[6],o=h[7]):(h=[a,o,a,o,u,c,u,c],a=u,o=c);var w=$Q(f,h,t);if(t)v+=w;else{for(var S=0,M=w.length;S<M;S++)w[S].segment1=d,w[S].segment2=m,w[S].bez1=f,w[S].bez2=h;v=v.concat(w)}}}}}return v};function RQ(e,r){return kQ(e,r)}var BQ=/,?([a-z]),?/gi;function NQ(e){return e.join(",").replace(BQ,"$1")}function ky(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function MA(e,r){return ky(e)*ky(r)?(e[0]*r[0]+e[1]*r[1])/(ky(e)*ky(r)):1}function EL(e,r){return(e[0]*r[1]<e[1]*r[0]?-1:1)*Math.acos(MA(e,r))}function EA(e,r){return e[0]===r[0]&&e[1]===r[1]}function kV(e,r){var t=r[1],i=r[2],n=Qx(Kx(r[3]),Math.PI*2),a=r[4],o=r[5],l=e[0],s=e[1],u=r[6],c=r[7],f=Math.cos(n)*(l-u)/2+Math.sin(n)*(s-c)/2,h=-1*Math.sin(n)*(l-u)/2+Math.cos(n)*(s-c)/2,v=f*f/(t*t)+h*h/(i*i);v>1&&(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<o;l++){var s=e[l];i=e[l+1];var u=s[0],c={command:u,prePoint:t,params:s,startTangent:null,endTangent:null};switch(u){case"M":n=[s[1],s[2]],a=l;break;case"A":var f=kV(t,s);c.arcParams=f;break}if(u==="Z")t=n,i=e[a+1];else{var h=s.length;t=[s[h-2],s[h-1]]}i&&i[0]==="Z"&&(i=e[a],r[a]&&(r[a].prePoint=t)),c.currentPoint=t,r[a]&&EA(t,r[a].currentPoint)&&(r[a].prePoint=c.prePoint);var v=i?[i[i.length-2],i[i.length-1]]:null;c.nextPoint=v;var d=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[d[0]-t[0],d[1]-t[1]],c.endTangent=[t[0]-d[0],t[1]-d[1]];else if(u==="Q"){var p=[s[1],s[2]];c.startTangent=[d[0]-p[0],d[1]-p[1]],c.endTangent=[t[0]-p[0],t[1]-p[1]]}else if(u==="T"){var x=r[l-1],p=OL(x.currentPoint,d);x.command==="Q"?(c.command="Q",c.startTangent=[d[0]-p[0],d[1]-p[1]],c.endTangent=[t[0]-p[0],t[1]-p[1]]):(c.command="TL",c.startTangent=[d[0]-t[0],d[1]-t[1]],c.endTangent=[t[0]-d[0],t[1]-d[1]])}else if(u==="C"){var m=[s[1],s[2]],_=[s[3],s[4]];c.startTangent=[d[0]-m[0],d[1]-m[1]],c.endTangent=[t[0]-_[0],t[1]-_[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[m[0]-_[0],m[1]-_[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[_[0]-m[0],_[1]-m[1]])}else if(u==="S"){var x=r[l-1],m=OL(x.currentPoint,d),_=[s[1],s[2]];x.command==="C"?(c.command="C",c.startTangent=[d[0]-m[0],d[1]-m[1]],c.endTangent=[t[0]-_[0],t[1]-_[1]]):(c.command="SQ",c.startTangent=[d[0]-_[0],d[1]-_[1]],c.endTangent=[t[0]-_[0],t[1]-_[1]])}else if(u==="A"){var b=.001,w=c.arcParams||{},S=w.cx,M=S===void 0?0:S,O=w.cy,F=O===void 0?0:O,L=w.rx,D=L===void 0?0:L,R=w.ry,H=R===void 0?0:R,k=w.sweepFlag,V=k===void 0?0:k,U=w.startAngle,B=U===void 0?0:U,G=w.endAngle,N=G===void 0?0:G;V===0&&(b*=-1);var W=D*Math.cos(B-b)+M,q=H*Math.sin(B-b)+F;c.startTangent=[W-n[0],q-n[1]];var tt=D*Math.cos(B+N+b)+M,ot=H*Math.sin(B+N-b)+F;c.endTangent=[d[0]-tt,d[1]-ot]}r.push(c)}return r}var FL=function(e,r,t){return e>=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)<GQ?0:e<0?-1:1}function zQ(e,r,t){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])&&Math.min(e[0],r[0])<=t[0]&&t[0]<=Math.max(e[0],r[0])&&Math.min(e[1],r[1])<=t[1]&&t[1]<=Math.max(e[1],r[1])}function OA(e,r,t){var i=!1,n=e.length;if(n<=2)return!1;for(var a=0;a<n;a++){var o=e[a],l=e[(a+1)%n];if(zQ(o,l,[r,t]))return!0;jw(o[1]-t)>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;i<t-1;i++){var n=e[i],a=e[i+1];r.push({from:{x:n[0],y:n[1]},to:{x:a[0],y:a[1]}})}if(r.length>1){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.maxX<e.minX||r.minY>e.maxY||r.maxY<e.minY)}function BV(e,r){if(e.length<2||r.length<2)return!1;var t=IL(e),i=IL(r);if(!jQ(t,i))return!1;var n=!1;if(P(r,function(s){if(OA(e,s[0],s[1]))return n=!0,!1}),n||(P(e,function(s){if(OA(r,s[0],s[1]))return n=!0,!1}),n))return!0;var a=PL(e),o=PL(r),l=!1;return P(o,function(s){if(VQ(a,s))return l=!0,!1}),l}var HQ=Object.freeze(Object.defineProperty({__proto__:null,parsePath:IV,catmullRom2Bezier:LV,fillPath:yQ,fillPathByDiff:_Q,formatPath:bQ,pathIntersection:RQ,parsePathArray:NQ,parsePathString:c1,path2Curve:AA,path2Absolute:f1,reactPath:$V,getArcParams:kV,path2Segments:FM,getLineIntersect:RV,isPolygonsIntersect:BV,isPointInPolygon:OA},Symbol.toStringTag,{value:"Module"}));function YQ(e,r){for(var t=[],i=[],n=[],a=0;a<e.length;a++){var o=e[a],l=o.currentPoint,s=o.params,u=o.prePoint,c=void 0;switch(o.command){case"Q":c=EM.box(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=Cf.box(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=o.arcParams;c=TV.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:t.push(l[0]),i.push(l[1]);break}c&&(o.box=c,t.push(c.x,c.x+c.width),i.push(c.y,c.y+c.height)),r&&(o.command==="L"||o.command==="M")&&o.prePoint&&o.nextPoint&&n.push(o)}t=t.filter(function(m){return!Number.isNaN(m)&&m!==1/0&&m!==-1/0}),i=i.filter(function(m){return!Number.isNaN(m)&&m!==1/0&&m!==-1/0});var h=Ei(t),v=Ei(i),d=vi(t),p=vi(i);if(n.length===0)return{x:h,y:v,width:d-h,height:p-v};for(var a=0;a<n.length;a++){var o=n[a],l=o.currentPoint,x=void 0;l[0]===h?(x=Ry(o,r),h=h-x.xExtra):l[0]===d&&(x=Ry(o,r),d=d+x.xExtra),l[1]===v?(x=Ry(o,r),v=v-x.yExtra):l[1]===p&&(x=Ry(o,r),p=p+x.yExtra)}return{x:h,y:v,width:d-h,height:p-v}}function Ry(e,r){var t=e.prePoint,i=e.currentPoint,n=e.nextPoint,a=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),o=Math.pow(i[0]-n[0],2)+Math.pow(i[1]-n[1],2),l=Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2),s=Math.acos((a+o-l)/(2*Math.sqrt(a)*Math.sqrt(o)));if(!s||Math.sin(s)===0||Nr(s,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(n[1]-i[1],n[0]-i[0])),c=Math.abs(Math.atan2(n[0]-i[0],n[1]-i[1]));u=u>Math.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:"<div></div>",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:'<div class="g2-html-annotation" style="position:absolute"></div>',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<n;i++){t=arguments[i];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},io.apply(this,arguments)},uK=function(e){v1(r,e);function r(t){var i=e.call(this,t)||this;i.cacheMap={},i.adjustDataArray=[],i.mergeData=[];var n=t.marginRatio,a=n===void 0?oK:n,o=t.dodgeRatio,l=o===void 0?lK:o,s=t.dodgeBy,u=t.intervalPadding,c=t.dodgePadding,f=t.xDimensionLength,h=t.groupNum,v=t.defaultSize,d=t.maxColumnWidth,p=t.minColumnWidth,x=t.columnWidthRatio,m=t.customOffset;return i.marginRatio=a,i.dodgeRatio=l,i.dodgeBy=s,i.intervalPadding=u,i.dodgePadding=c,i.xDimensionLegenth=f,i.groupNum=h,i.defaultSize=v,i.maxColumnWidth=d,i.minColumnWidth=p,i.columnWidthRatio=x,i.customOffset=m,i}return r.prototype.process=function(t){var i=fi(t),n=qi(i),a=this.dodgeBy,o=a?QG(n,a):i;return this.cacheMap={},this.adjustDataArray=o,this.mergeData=n,this.adjustData(o,n),this.adjustDataArray=[],this.mergeData=[],i},r.prototype.adjustDim=function(t,i,n,a){var o=this,l=this.customOffset,s=this.getDistribution(t),u=this.groupData(n,t);return P(u,function(c,f){var h;i.length===1?h={pre:i[0]-1,next:i[0]+1}:h=o.getAdjustRange(t,parseFloat(f),i),P(c,function(v){var d=v[t],p=s[d],x=p.indexOf(a);if(K(l))v[t]=o.getDodgeOffset(h,x,p.length);else{var m=h.pre,_=h.next;v[t]=pt(l)?l(v,h):(m+_)/2+l}})}),[]},r.prototype.getDodgeOffset=function(t,i,n){var a=this,o=a.dodgeRatio,l=a.marginRatio,s=a.intervalPadding,u=a.dodgePadding,c=t.pre,f=t.next,h=f-c,v;if(!K(s)&&K(u)&&s>=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;i<arguments.length;i++)t[i]=arguments[i];var n=t.map(function(a,o){return r._toOriginParam(a,r.scales[o])});return this.callback.apply(this,n)},e.prototype.getLinearValue=function(r){var t=this.values.length-1,i=Math.floor(t*r),n=t*r-i,a=this.values[i],o=i===t?a:this.values[i+1];return a+(o-a)*n},e.prototype.getNames=function(){for(var r=this.scales,t=this.names,i=Math.min(r.length,t.length),n=[],a=0;a<i;a+=1)n.push(t[a]);return n},e.prototype.getFields=function(){return this.scales.map(function(r){return r.field})},e.prototype.getScale=function(r){return this.scales[this.names.indexOf(r)]},e.prototype.defaultCallback=function(){for(var r=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.length===0?this.values:t.map(function(n,a){var o=r.scales[a];return o.type==="identity"?o.values[0]:r._getAttributeValue(o,n)})},e.prototype._parseCfg=function(r){var t=this,i=r.type,n=i===void 0?"base":i,a=r.names,o=a===void 0?[]:a,l=r.scales,s=l===void 0?[]:l,u=r.values,c=u===void 0?[]:u,f=r.callback;this.type=n,this.scales=s,this.values=c,this.names=o,this.callback=function(){for(var h=[],v=0;v<arguments.length;v++)h[v]=arguments[v];if(f){var d=f.apply(void 0,h);if(!K(d))return[d]}return t.defaultCallback.apply(t,h)}},e.prototype._getAttributeValue=function(r,t){if(r.isCategory&&!this.linear){var i=r.translate(t);return this.values[i%this.values.length]}var n=r.scale(t);return this.getLinearValue(n)},e.prototype._toOriginParam=function(r,t){return t.isLinear?r:it(r)?r.map(function(i){return $L(t,i)}):$L(t,r)},e}(),pK=/rgba?\(([\s.,0-9]+)\)/,gK=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,yK=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,mK=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,xK=function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)},_K=function(){var e=document.createElement("i");return e.title="Web Colour Picker",e.style.display="none",document.body.appendChild(e),e},Uw=function(e,r,t,i){return e[i]+(r[i]-e[i])*t};function zV(e){return"#"+qw(e[0])+qw(e[1])+qw(e[2])}var VV=function(e){return[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16)]},qw=function(e){var r=Math.round(e).toString(16);return r.length===1?"0"+r:r},bK=function(e,r){var t=isNaN(Number(r))||r<0?0:r>1?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;t<this.values.length;t++)this.translateIndexMap.set(this.values[t],t)}},r.prototype.translate=function(t){this.buildIndexMap();var i=this.translateIndexMap.get(t);return i===void 0&&(i=Mt(t)?t:NaN),i},r.prototype.scale=function(t){var i=this.translate(t),n=this.calcPercent(i,this.min,this.max);return this.calcValue(n,this.rangeMin(),this.rangeMax())},r.prototype.invert=function(t){var i=this.max-this.min,n=this.calcPercent(t,this.rangeMin(),this.rangeMax()),a=Math.round(i*n)+this.min;return a<this.min||a>this.max?NaN:this.values[a]},r.prototype.getText=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var a=t;return Mt(t)&&!this.values.includes(t)&&(a=this.values[a]),e.prototype.getText.apply(this,ye([a],i))},r.prototype.initCfg=function(){this.tickMethod="cat"},r.prototype.setDomain=function(){if(K(this.getConfig("min"))&&(this.min=0),K(this.getConfig("max"))){var t=this.values.length;this.max=t>1?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<n;i++)t.push(e[i].substr(0,r));return t}var kL=function(e){return function(r,t){var i=t[e].map(function(a){return a.toLowerCase()}),n=i.indexOf(r.toLowerCase());return n>-1?n:null}};function fs(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0,n=r;i<n.length;i++){var a=n[i];for(var o in a)e[o]=a[o]}return e}var t5=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],e5=["January","February","March","April","May","June","July","August","September","October","November","December"],MK=JV(e5,3),EK=JV(t5,3),LM={dayNamesShort:EK,dayNames:t5,monthNamesShort:MK,monthNames:e5,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?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.length<r;)e="0"+e;return e},OK={D:function(e){return String(e.getDate())},DD:function(e){return ki(e.getDate())},Do:function(e,r){return r.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return ki(e.getDay())},ddd:function(e,r){return r.dayNamesShort[e.getDay()]},dddd:function(e,r){return r.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return ki(e.getMonth()+1)},MMM:function(e,r){return r.monthNamesShort[e.getMonth()]},MMMM:function(e,r){return r.monthNames[e.getMonth()]},YY:function(e){return ki(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return ki(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return ki(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return ki(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return ki(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return ki(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return ki(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return ki(e.getMilliseconds(),3)},a:function(e,r){return e.getHours()<12?r.amPm[0]:r.amPm[1]},A:function(e,r){return e.getHours()<12?r.amPm[0].toUpperCase():r.amPm[1].toUpperCase()},ZZ:function(e){var r=e.getTimezoneOffset();return(r>0?"-":"+")+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;h<c.length;h++){var v=a[h-1],d=v[0],p=v[2],x=p?p(c[h],f):+c[h];if(x==null)return null;n[d]=x}n.isPm===1&&n.hour!=null&&+n.hour!=12?n.hour=+n.hour+12:n.isPm===0&&+n.hour==12&&(n.hour=0);var m;if(n.timezoneOffset==null){m=new Date(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond);for(var _=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],h=0,b=_.length;h<b;h++)if(s[_[h][0]]&&n[_[h][0]]!==m[_[h][1]]())return null}else if(m=new Date(Date.UTC(n.year,n.month,n.day,n.hour,n.minute-n.timezoneOffset,n.second,n.millisecond)),n.month>11||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<o;){var l=a+o>>>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<this.values.length?i=t:i=NaN),i},r.prototype.getText=function(t,i){var n=this.translate(t);if(n>-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);i<this.min&&(this.min=i),n>this.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&&n<i&&(i=n)}),i===t&&(i=t/r),i>1&&(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<u)return t/u*s}else l=Gn(i,this.min);var c=(t-a)/o,f=c*(n-l)+l;return Math.pow(i,f)},r.prototype.initCfg=function(){this.tickMethod="log",this.base=10,this.tickCount=6,this.nice=!0},r.prototype.setDomain=function(){e.prototype.setDomain.call(this);var t=this.min;if(t<0)throw new Error("When you use log scale, the minimum value must be greater than zero!");t===0&&(this.positiveMin=u5(this.values,this.base,this.max))},r.prototype.getScalePercent=function(t){var i=this.max,n=this.min;if(i===n||t<=0)return 0;var a=this.base,o=this.positiveMin;o&&(n=o*1/a);var l;return t<o?l=t/o/(Gn(a,i)-Gn(a,n)):l=(Gn(a,t)-Gn(a,n))/(Gn(a,i)-Gn(a,n)),l},r}(d1),f5=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pow",t}return r.prototype.invert=function(t){var i=this.getInvertPercent(t),n=this.exponent,a=Gl(n,this.max),o=Gl(n,this.min),l=i*(a-o)+o,s=l>=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),s<c&&(s=c),a.push(c)}),t.length>1&&(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(t<Wi(i))return 0;if(t>nr(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 t<i[0]||t>i[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<i&&!(h>=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 s<l&&(t=[s,l],l=t[0],s=t[1],i=[o,a],a=i[0],o=i[1]),u=p0(l,s,r),u>0?(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=r<e)&&(a=e,e=r,r=a),(l=p0(e,r,t))===0||!isFinite(l))return[];if(l>0)for(e=Math.ceil(e/l),r=Math.floor(r/l),o=new Array(a=Math.ceil(r-e+1));++n<a;)o[n]=(e+n)*l;else for(e=Math.floor(e*l),r=Math.ceil(r*l),o=new Array(a=Math.ceil(e-r+1));++n<a;)o[n]=(e-n)/l;return i&&o.reverse(),o}function p0(e,r,t){var i=(r-e)/Math.max(0,t),n=Math.floor(Math.log(i)/Math.LN10),a=i/Math.pow(10,n);return 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<u;d++)v.push(c+h*d);return v}function RK(e){var r=e.min,t=e.max,i=e.tickInterval,n=e.minLimit,a=e.maxLimit,o=DK(e);return!K(n)||!K(a)?kM(e,Wi(o),nr(o)):i?$M(r,t,i).ticks:o}function hu(e){return Math.abs(e)<1e-15?e:parseFloat(e.toFixed(15))}var BK=[1,5,2,2.5,4,3],qL=Number.EPSILON*100;function NK(e,r){return(e%r+r)%r}function GK(e){return Math.round(e*1e12)/1e12}function zK(e,r,t,i,n,a){var o=gr(r),l=hM(r,e),s=0,u=NK(i,a);return(u<qL||a-u<qL)&&i<=0&&n>=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;f<n.length;f+=1){var h=n[f],v=VK(h,n,c);if(a[0]*v+a[1]+a[2]+a[3]<u.score){c=1/0;break}for(var d=2;d<1/0;){var p=HK(d,o);if(a[0]*v+a[1]+a[2]*p+a[3]<u.score)break;for(var x=(r-e)/(d+1)/c/h,m=Math.ceil(Math.log10(x));m<1/0;){var _=c*h*Math.pow(10,m),b=WK(e,r,_*(d-1));if(a[0]*v+a[1]*b+a[2]*p+a[3]<u.score)break;var w=Math.floor(r/_)*c-(d-1)*c,S=Math.ceil(e/_)*c;if(w<=S)for(var l=S-w,M=0;M<=l;M+=1){var O=w+M,F=O*(_/c),L=F+_*(d-1),D=_,R=zK(h,n,c,F,L,D),H=YK(e,r,F,L),k=jK(d,o,e,r,F,L),V=XK(),U=a[0]*R+a[1]*H+a[2]*k+a[3]*V;U>u.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;f<W;f++)q[f]=hu(q[f-1]+N);return{min:Math.min(e,Wi(q)),max:Math.max(r,nr(q)),ticks:q}}function qK(e){var r=e.min,t=e.max,i=e.tickCount,n=e.nice,a=e.tickInterval,o=e.minLimit,l=e.maxLimit,s=UK(r,t,i,n).ticks;return!K(o)||!K(l)?kM(e,Wi(s),nr(s)):a?$M(r,t,a).ticks:s}function ZK(e){var r=e.base,t=e.tickCount,i=e.min,n=e.max,a=e.values,o,l=Gn(r,n);if(i>0)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<l+c;h=h+c)f.push(Math.pow(r,h));return i<=0&&f.unshift(0),f}function y5(e,r,t){if(t===void 0&&(t=5),e===r)return{max:r,min:e,ticks:[e]};var i=t<0?0:Math.round(t);if(i===0)return{max:r,min:e,ticks:[]};var n=1.5,a=.5+1.5*n,o=r-e,l=o/i,s=Math.pow(10,Math.floor(Math.log10(l))),u=s;2*s-l<n*(l-u)&&(u=2*s,5*s-l<a*(l-u)&&(u=5*s,10*s-l<n*(l-u)&&(u=10*s)));for(var c=Math.ceil(r/u),f=Math.floor(e/u),h=Math.max(c*u,r),v=Math.min(f*u,e),d=Math.floor((h-v)/u)+1,p=new Array(d),x=0;x<d;x++)p[x]=hu(v+x*u);return{min:v,max:h,ticks:p}}function QK(e){var r=e.exponent,t=e.tickCount,i=Math.ceil(Gl(r,e.max)),n=Math.floor(Gl(r,e.min)),a=y5(n,i,t).ticks;return a.map(function(o){var l=o>=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;a<r;a++){var o=a/(r-1);n.push(KK(i,o))}return n}function tJ(e){var r=e.min,t=e.max,i=e.tickCount,n=e.tickInterval,a=e.minLimit,o=e.maxLimit,l=y5(r,t,i).ticks;return!K(a)||!K(o)?kM(e,Wi(l),nr(l)):n?$M(r,t,n).ticks:l}function eJ(e){var r=e.min,t=e.max,i=e.minTickInterval,n=e.tickInterval,a=e.tickCount;if(n)a=Math.ceil((t-r)/n);else{n=LK(r,t,a)[1];var o=(t-r)/n,l=o/a;l>1&&(n=n*Math.ceil(l)),i&&n<i&&(n=i)}n=Math.max(Math.floor((t-r)/(Math.pow(2,12)-1)),n);for(var s=[],u=r;u<t+n;u+=n)s.push(u);return s}function rJ(e){var r=g5(A({showLast:!0},e));return r}function Z0(e){return new Date(e).getFullYear()}function iJ(e){return new Date(e,0,1).getTime()}function PA(e){return new Date(e).getMonth()}function nJ(e,r){var t=Z0(e),i=Z0(r),n=PA(e),a=PA(r);return(i-t)*12+(a-n)%12}function aJ(e,r){return new Date(e,r,1).getTime()}function oJ(e,r){return Math.ceil((r-e)/Wo)}function lJ(e,r){return Math.ceil((r-e)/ku)}function sJ(e,r){return Math.ceil((r-e)/(60*1e3))}function uJ(e){var r=e.min,t=e.max,i=e.minTickInterval,n=e.tickCount,a=e.tickInterval,o=[];a||(a=(t-r)/n,i&&a<i&&(a=i)),a=Math.max(Math.floor((t-r)/(Math.pow(2,12)-1)),a);var l=Z0(r);if(a>HL)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;c<b+_;c=c+_)o.push(new Date(p,x,m+c).getTime());else if(a>ku)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<pa&&(L=pa);for(var D=Math.floor(r/pa)*pa,R=Math.ceil((t-r)/pa),H=Math.ceil(L/pa),c=0;c<R+H;c=c+H)o.push(D+c*pa)}return o.length>=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)<l&&(l=Yl(a));var s=Math.floor((Yl(a)-l)/n);o=2*s*Math.PI+o;var u=this.a*o,c=Yl(a)-u;c=Nr(c,0)?0:c;var f=this.invertDim(o,"x"),h=this.invertDim(c,"y");return f=Nr(f,0)?0:f,h=Nr(h,0)?0:h,this.isTransposed&&(i=[h,f],f=i[0],h=i[1]),{x:f,y:h}},r}(Pp),vJ=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.isPolar=!0,i.type="polar";var n=t.startAngle,a=n===void 0?-Math.PI/2:n,o=t.endAngle,l=o===void 0?Math.PI*3/2: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(){for(e.prototype.initial.call(this);this.endAngle<this.startAngle;)this.endAngle+=Math.PI*2;var t=this.getOneBox(),i=t.maxX-t.minX,n=t.maxY-t.minY,a=Math.abs(t.minX)/i,o=Math.abs(t.minY)/n,l;this.height/n>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,s<l);Nr(h,Math.PI*2)&&(h=0);var v=Yl(a),d=h/(s-l);d=s-l>0?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<Math.max(t,i);o+=Math.PI/18)n.push(Math.cos(o)),a.push(Math.sin(o));return{minX:Math.min.apply(Math,n),maxX:Math.max.apply(Math,n),minY:Math.min.apply(Math,a),maxY:Math.max.apply(Math,a)}},r}(Pp),_5={},b5=function(e){return _5[e.toLowerCase()]},Ip=function(e,r){_5[e.toLowerCase()]=r};Ip("rect",x5);Ip("cartesian",x5);Ip("polar",vJ);Ip("helix",hJ);var dJ=Object.freeze(Object.defineProperty({__proto__:null,getCoordinate:b5,registerCoordinate:Ip,Coordinate:Pp},Symbol.toStringTag,{value:"Module"})),pJ=_r(dJ),gJ=_r(cJ);function BM(e,r,t){var i=new bh(r,t);i.target=e,i.propagationPath.push(e),e.emitDelegation(r,i);for(var n=e.getParent();n;)n.emitDelegation(r,i),i.propagationPath.push(n),n=n.getParent()}var w5=[1,0,0,0,1,0,0,0,1];function Uu(e,r,t){if(t===void 0&&(t=w5),!r)return null;var i=rr(t,[["t",-e.x,-e.y],["r",r],["t",e.x,e.y]]);return i}function NM(e,r){return!e.x&&!e.y?null:rr(r||w5,[["t",e.x,e.y]])}function yJ(e){var r=[1,0,0],t=[0,0,0];return kf(t,r,e),Math.atan2(t[1],t[0])}function Vy(e,r){var t=[0,0];return tV(t,r,e),t}function mJ(e,r){var t=Vy(e,[r.minX,r.minY]),i=Vy(e,[r.maxX,r.minY]),n=Vy(e,[r.minX,r.maxY]),a=Vy(e,[r.maxX,r.maxY]),o=Math.min(t[0],i[0],n[0],a[0]),l=Math.max(t[0],i[0],n[0],a[0]),s=Math.min(t[1],i[1],n[1],a[1]),u=Math.max(t[1],i[1],n[1],a[1]);return{x:o,y:s,minX:o,minY:s,maxX:l,maxY:u,width:l-o,height:u-s}}function C5(e,r,t,i){if(r){var n=Uu({x:t,y:i},r,e.getMatrix());e.setMatrix(n)}}function GM(e,r,t){var i=NM({x:r,y:t});e.attr("matrix",i)}function Q0(e){var r=0,t=0,i=0,n=0;return Mt(e)?r=t=i=n=e:it(e)&&(r=e[0],i=K(e[1])?e[0]:e[1],n=K(e[2])?e[0]:e[2],t=K(e[3])?i:e[3]),[r,i,n,t]}function zM(e){for(var r=e.childNodes,t=r.length,i=t-1;i>=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)<t};function wJ(e,r){var t=Math.max(e.minX,r.minX),i=Math.max(e.minY,r.minY),n=Math.min(e.maxX,r.maxX),a=Math.min(e.maxY,r.maxY);return p1(t,i,n-t,a-i)}function S5(e){var r=e.getClip(),t=r&&r.getBBox(),i;if(!e.isGroup())i=e.getBBox();else{var n=1/0,a=-1/0,o=1/0,l=-1/0,s=e.getChildren();s.length>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]);p<n&&(n=p),x>a&&(a=x),m<o&&(o=m),_>l&&(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;t<e.length;t++)r+=vu(e,t);return r}function vu(e,r){return e.charCodeAt(r)>0&&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<r;){var l=vu(e,o);if(a+l<=r)n+=e[o],a+=vu(e,o),o++;else break}n+=Qw}else if(t==="head"){for(var a=0,o=i-1;a<r;){var l=vu(e,o);if(a+l<=r)n+=e[o],a+=vu(e,o),o--;else break}n=Qw+n}else{for(var s="",u="",a=0,c=0,f=i-1;a<r;){var h=vu(e,c),v=!1;h+a<=r&&(s+=e[c],c++,a+=h,v=!0);var d=vu(e,f);if(d+a<=r&&(u=e[f]+u,a+=d,f--,v=!0),!v)break}n=s+Qw+u}return n}var OJ="\u2026",FJ=2,PJ=400;function IJ(e){for(var r=e.map(function(s){var u=s.attr("text");return K(u)?"":""+u}),t=0,i=0,n=0;n<r.length;n+=1){for(var a=0,o=0;o<=r[n].length;o+=1){var l=r[n].charCodeAt(o);l>=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<n&&(r=n)}),r}function LJ(e,r){var t=r.getCanvasBBox();return e?t.width:t.height}function gd(e,r,t,i){var n;i===void 0&&(i="tail");var a=(n=r.attr("text"))!==null&&n!==void 0?n:"";if(i==="tail"){var o=e1(r.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),l=oz(a,t,o,"\u2026");return a!==l?(r.attr("text",l),r.set("tip",a),!0):(r.set("tip",null),!1)}var s=LJ(e,r),u=MJ(a),c=!1;if(t<s){var f=Math.floor(t/s*u)-FJ,h=void 0;f>=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:"<div></div>",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:'<div class="g2-html-annotation" style="position:absolute"></div>',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;l<o-1;l++)for(var s=t[l],u=t[l+1],c=0;c<a;c++){var f=(c+1)/(a+1),h=(1-f)*s.tickValue+f*u.tickValue,v=this.getTickPoint(h),d=this.getSidePoint(v,n.length);i.push({startPoint:v,endPoint:d,tickValue:h,id:"sub-"+s.id+"-"+c})}return i},r.prototype.getTickLineAttrs=function(t,i,n,a){var o=this.get(i).style,l={points:[t.startPoint,t.endPoint]},s=I(this.get("theme"),["tickLine","style"],{});o=pt(o)?Qt({},s,o(l,n,a)):o;var u=t.startPoint,c=t.endPoint;return A({x1:u.x,y1:u.y,x2:c.x,y2:c.y},o)},r.prototype.drawTick=function(t,i,n,a,o){this.addShape(i,{type:"line",id:this.getElementId(t.id),name:"axis-"+n,attrs:this.getTickLineAttrs(t,n,a,o)})},r.prototype.drawTickLines=function(t){var i=this,n=this.get("ticks"),a=this.get("subTickLine"),o=this.getTickLineItems(n),l=this.addGroup(t,{name:"axis-tickline-group",id:this.getElementId("tickline-group")}),s=this.get("tickLine");if(P(o,function(c,f){if(s.displayWithLabel){var h=i.getElementId("label-"+c.tickId);t.findById(h)&&i.drawTick(c,l,"tickLine",f,o)}else i.drawTick(c,l,"tickLine",f,o)}),a){var u=this.getSubTickLineItems(o);P(u,function(c,f){i.drawTick(c,l,"subTickLine",f,u)})}},r.prototype.processTicks=function(){var t=this,i=this.get("ticks");P(i,function(n){n.point=t.getTickPoint(n.value),K(n.id)&&(n.id=n.name)})},r.prototype.drawTicks=function(t){var i=this;this.optimizeTicks(),this.processTicks(),this.get("label")&&this.drawLabels(t),this.get("tickLine")&&this.drawTickLines(t);var n=this.get("ticks");P(n,function(a){i.applyTickStates(a,t)})},r.prototype.optimizeTicks=function(){var t=this.get("optimize"),i=this.get("ticks");if(t&&t.enable&&t.threshold>0){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;c<l;c++){var f=a[c];f.getBBox();var h=DA(e,u,f,n);h?(f.hide(),o=!0):u=f}return o}function O5(e,r,t){var i=(t==null?void 0:t.minGap)||0,n=r.getChildren().slice();if(n.length<2)return!1;var a=!1,o=n[0],l=o.getBBox(),s=n[1],u=n.length,c=E5(o),f=Math.abs(e?s.attr("y")-o.attr("y"):s.attr("x")-o.attr("x")),h=0;if(e){var v=Math.abs(Math.cos(c));if(K0(v,0,Math.PI/180)){var d=LA(n);h=(d+i)/f}else h=(l.height/v+i)/f}else{var v=Math.abs(Math.sin(c));if(K0(v,0,Math.PI/180)){var d=LA(n);h=(d+i)/f}else h=(l.height/v+i)/f}if(h>1){h=Math.ceil(h);for(var p=0;p<u;p++)p%h!==0&&(n[p].hide(),a=!0)}return a}function qJ(){return F5}function ZJ(e,r,t,i){return Vd(e,r,!1,i)}function QJ(e,r,t,i){return Vd(e,r,!0,i)}function KJ(e,r,t,i){var n=(i==null?void 0:i.minGap)||0,a=r.getChildren().slice();if(a.length<=2)return!1;for(var o=!1,l=a.length,s=a[0],u=a[l-1],c=s,f=1;f<l-1;f++){var h=a[f];h.getBBox();var v=DA(e,c,h,n);v?(h.hide(),o=!0):c=h}var d=DA(e,c,u,n);return d&&(c.hide(),o=!0),o}function F5(e,r,t,i){var n=O5(e,r,i);return Vd(e,r,!1)&&(n=!0),n}function JJ(e,r,t,i){var n=r.getChildren().slice(),a=O5(e,r,i);if(n.length>2){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:'<div class="'+jd+'"></div>',crosshairTpl:'<div class="'+$A+'"></div>',textTpl:'<span class="'+kA+'">{content}</span>',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.currentPageIndex<t.totalPagesCnt){t.currentPageIndex+=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:n},100):i.attr({matrix:n})}},t}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return A(A({},t),{name:"legend",type:"category",itemSpacing:24,itemMarginBottom:8,maxItemWidth:null,itemWidth:null,itemHeight:null,itemName:{},itemValue:null,maxWidth:null,maxHeight:null,marker:{},radio:null,items:[],itemStates:{},itemBackground:{},pageNavigator:{},defaultCfg:{title:{spacing:5,style:{fill:Ht.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}},background:{padding:5,style:{stroke:Ht.lineColor}},itemBackground:{style:{opacity:0,fill:"#fff"}},pageNavigator:Kw,itemName:{spacing:16,style:jy},marker:{spacing:8,style:{r:6,symbol:"circle"}},itemValue:{alignRight:!1,formatter:null,style:jy,spacing:6},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:Ht.uncheckedColor},markerStyle:{fill:Ht.uncheckedColor,stroke:Ht.uncheckedColor}},inactive:{nameStyle:{fill:Ht.uncheckedColor},markerStyle:{opacity:.2}}}}})},r.prototype.isList=function(){return!0},r.prototype.getItems=function(){return this.get("items")},r.prototype.setItems=function(t){this.update({items:t})},r.prototype.updateItem=function(t,i){Qt(t,i),this.clear(),this.render()},r.prototype.clearItems=function(){var t=this.getElementByLocalId("item-group");t&&t.clear()},r.prototype.setItemState=function(t,i,n){t[i]=n;var a=this.getElementByLocalId("item-"+t.id);if(a){var o=this.getItems(),l=o.indexOf(t),s=this.createOffScreenGroup(),u=this.drawItem(t,l,this.getItemHeight(),s);this.updateElements(u,a),this.clearUpdateStatus(a)}},r.prototype.hasState=function(t,i){return!!t[i]},r.prototype.getItemStates=function(t){var i=this.get("itemStates"),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.drawLegendContent=function(t){this.processItems(),this.drawItems(t)},r.prototype.processItems=function(){var t=this.get("items");P(t,function(i){i.id||(i.id=i.name)})},r.prototype.drawItems=function(t){var i=this,n=this.addGroup(t,{id:this.getElementId("item-container-group"),name:"legend-item-container-group"}),a=this.addGroup(n,{id:this.getElementId("item-group"),name:"legend-item-group"}),o=this.getItemHeight(),l=this.get("itemWidth"),s=this.get("itemSpacing"),u=this.get("itemMarginBottom"),c=this.get("currentPoint"),f=c.x,h=c.y,v=this.get("layout"),d=this.get("items"),p=!1,x=0,m=this.get("maxWidth"),_=this.get("maxHeight");P(d,function(b,w){var S=i.drawItem(b,w,o,a),M=S.getBBox(),O=l||M.width;O>x&&(x=O),v==="horizontal"?(m&&m<c.x+O-f&&(p=!0,c.x=f,c.y+=o+u),i.moveElementTo(S,c),c.x+=O+s):(_&&_<c.y+o+u-h&&(p=!0,c.x+=x+s,c.y=h,x=0),i.moveElementTo(S,c),c.y+=o+u)}),p&&this.get("flipPage")&&(this.pageHeight=0,this.pageWidth=0,this.totalPagesCnt=1,this.startX=f,this.startY=h,this.adjustNavigation(t,a))},r.prototype.getItemHeight=function(){var t=this.get("itemHeight");if(!t){var i=(this.get("itemName")||{}).style;if(pt(i)){var n=this.getItems();n.forEach(function(a,o){var l=A(A({},jy),i(a,o,n)).fontSize;t<l&&(t=l)})}else i&&(t=i.fontSize)}return t},r.prototype.drawMarker=function(t,i,n,a){var o=A(A(A({x:0,y:a/2},i.style),{symbol:I(n.marker,"symbol","circle")}),I(n.marker,"style",{})),l=this.addShape(t,{type:"marker",id:this.getElementId("item-"+n.id+"-marker"),name:"legend-item-marker",attrs:o}),s=l.getBBox();l.attr("x",s.width/2);var u=l.attr(),c=u.stroke,f=u.fill;return c&&l.set("isStroke",!0),f&&l.set("isFill",!0),l},r.prototype.drawItemText=function(t,i,n,a,o,l,s){var u=n.formatter,c=n.style,f=A(A({x:l,y:o/2,text:u?u(a[i],a,s):a[i]},jy),pt(c)?c(a,s,this.getItems()):c);return this.addShape(t,{type:"text",id:this.getElementId("item-"+a.id+"-"+i),name:"legend-item-"+i,attrs:f})},r.prototype.drawRadio=function(t,i,n,a,o){var l,s,u=i.style||{},c=(l=u.r)!==null&&l!==void 0?l:a/2,f=c*3.6/8,h=[o+c,a/2-c],v=h[0],d=h[1],p=[v+c,d+c],x=p[0],m=p[1],_=[v,m+c],b=_[0],w=_[1],S=[o,d+c],M=S[0],O=S[1],F=n.showRadio,L=A(A({path:[["M",v,d],["A",c,c,0,0,1,x,m],["L",x-f,m],["L",x,m],["A",c,c,0,0,1,b,w],["L",b,w-f],["L",b,w],["A",c,c,0,0,1,M,O],["L",M+f,O],["L",M,O],["A",c,c,0,0,1,v,d],["L",v,d+f]],stroke:"#000000",fill:"#ffffff"},u),{opacity:F?(s=u==null?void 0:u.opacity)!==null&&s!==void 0?s:.45:0}),D=this.addShape(t,{type:"path",id:this.getElementId("item-"+n.id+"-radio"),name:"legend-item-radio",attrs:L});return D.set("tip",i.tip),D},r.prototype.drawItem=function(t,i,n,a){var o="item-"+t.id,l=this.addGroup(a,{name:"legend-item-container",id:this.getElementId("item-container-"+o),delegateObject:{item:t,index:i}}),s=this.addGroup(l,{name:"legend-item",id:this.getElementId(o),delegateObject:{item:t,index:i}}),u=this.get("marker"),c=this.get("itemName"),f=this.get("itemValue"),h=this.get("itemBackground"),v=this.get("radio"),d=this.getLimitItemWidth(),p=0;if(u){var x=this.drawMarker(s,u,t,n),m=u.spacing,_=I(t,["marker","spacing"]);Mt(_)&&(m=_),p=x.getBBox().maxX+m}if(c){var b=this.drawItemText(s,"name",c,t,n,p,i);d&&gd(!0,b,Ce(d-p,0,d)),p=b.getBBox().maxX+c.spacing}if(f){var w=this.drawItemText(s,"value",f,t,n,p,i);d&&(f.alignRight?(w.attr({textAlign:"right",x:d}),gd(!0,w,Ce(d-p,0,d),"head")):gd(!0,w,Ce(d-p,0,d))),p=w.getBBox().maxX+f.spacing}if(v&&this.drawRadio(s,v,t,n,p),h){var S=s.getBBox(),M=this.addShape(s,{type:"rect",name:"legend-item-background",id:this.getElementId(o+"-background"),attrs:A({x:0,y:0,width:S.width,height:n},h.style)});M.toBack()}return this.applyItemStates(t,s),s},r.prototype.adjustNavigation=function(t,i){var n=this,a=this.startX,o=this.startY,l=this.get("layout"),s=i.findAll(function(H){return H.get("name")==="legend-item"}),u=this.get("maxWidth"),c=this.get("maxHeight"),f=this.get("itemWidth"),h=this.get("itemSpacing"),v=this.getItemHeight(),d=ft({},Kw,this.get("pageNavigator")),p=this.drawNavigation(t,l,"00/00",d),x=p.getBBox(),m={x:a,y:o},_=1,b=0,w=0,S=0,M=this.get("itemMarginBottom");function O(H,k){var V=H.getBBox(),U=f||V.width,B=k.x+U+h+x.width;return B>u}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&&b<m.x+V+h||O(H,m))&&(_===1&&(b=m.x+h,n.moveElementTo(p,{x:D,y:m.y+v/2-x.height/2-x.minY})),_+=1,m.x=a,m.y+=L),n.moveElementTo(H,m),H.getParent().setClip({type:"rect",attrs:{x:m.x,y:m.y,width:V+h,height:v}}),m.x+=V+h})}else{P(s,function(H){var k=H.getBBox();k.width>w&&(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];l<a&&(l=a),i.setValue([a,l])}),t.on("legend-handler-max:drag",function(n){var a=i.getValueByCanvasPoint(n.x,n.y),o=i.getCurrentValue(),l=o[0];l>a&&(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]+f<c.max?i.setValue([s[0]+f,s[1]+f]):i.setValue([c.max-u,c.max])),n={x:a.x,y:a.y}}}),t.on("legend-track:dragend",function(a){n=null})},r.prototype.drawLabels=function(t){this.drawLabel("min",t),this.drawLabel("max",t)},r.prototype.drawLabel=function(t,i){var n=this.get("label"),a=n.style,o=n.align,l=n.formatter,s=this.get(t),u=this.getLabelAlignAttrs(t,o),c="label-"+t;this.addShape(i,{type:"text",id:this.getElementId(c),name:"legend-label-"+t,attrs:A(A({x:0,y:0,text:pt(l)?l(s):s},a),u)})},r.prototype.getLabelAlignAttrs=function(t,i){var n=this.isVertical(),a="center",o="middle";return n?(a="start",i!=="rail"?t==="min"?o="top":o="bottom":o="top"):i!=="rail"?(o="top",t==="min"?a="start":a="end"):(a="start",o="middle"),{textAlign:a,textBaseline:o}},r.prototype.getRailPath=function(t,i,n,a){var o=this.get("rail"),l=o.size,s=o.defaultLength,u=o.type,c=this.isVertical(),f=s,h=n,v=a;h||(h=c?l:f),v||(v=c?f:l);var d=[];return u==="color"?(d.push(["M",t,i]),d.push(["L",t+h,i]),d.push(["L",t+h,i+v]),d.push(["L",t,i+v]),d.push(["Z"])):(d.push(["M",t+h,i]),d.push(["L",t+h,i+v]),d.push(["L",t,i+v]),d.push(["Z"])),d},r.prototype.drawRail=function(t){var i=this.get("rail"),n=i.style;this.addShape(t,{type:"path",id:this.getElementId("rail"),name:"legend-rail",attrs:A({path:this.getRailPath(0,0)},n)})},r.prototype.getTrackColor=function(t){var i=t.length;if(!i)return null;if(i===1)return t[0];var n;this.isVertical()?n="l(90)":n="l(0)";for(var a=0;a<i;a++){var o=a/(i-1);n+=" "+o+":"+t[a]}return n},r.prototype.getTrackPath=function(t){var i=this.getRailShape(t),n=i.attr("path");return fi(n)},r.prototype.getClipTrackAttrs=function(t){var i=this.getCurrentValue(),n=i[0],a=i[1],o=this.getRailBBox(t),l=this.getPointByValue(n,t),s=this.getPointByValue(a,t),u=this.isVertical(),c,f,h,v;return u?(c=o.minX,f=l.y,h=o.width,v=s.y-l.y):(c=l.x,f=o.minY,h=s.x-l.x,v=o.height),{x:c,y:f,width:h,height:v}},r.prototype.getTrackAttrs=function(t){var i=this.get("track"),n=this.get("colors"),a=this.getTrackPath(t);return Qt({path:a,fill:this.getTrackColor(n)},i.style)},r.prototype.resetTrackClip=function(t){var i=t||this.get("group"),n=this.getElementId("track"),a=i.findById(n),o=a.getClip(),l=this.getClipTrackAttrs(t);o?o.attr(l):a.setClip({type:"rect",attrs:l})},r.prototype.resetTrack=function(t){var i=this.getElementId("track"),n=t.findById(i),a=this.getTrackAttrs(t);n?n.attr(a):this.addShape(t,{type:"path",id:i,draggable:this.get("slidable"),name:"legend-track",attrs:a})},r.prototype.getPointByValue=function(t,i){var n=this.getRange(),a=n.min,o=n.max,l=(t-a)/(o-a),s=this.getRailBBox(i),u=this.isVertical(),c={x:0,y:0};return u?(c.x=s.minX+s.width/2,c.y=Ru(s.minY,s.maxY,l)):(c.x=Ru(s.minX,s.maxX,l),c.y=s.minY+s.height/2),c},r.prototype.getRailShape=function(t){var i=t||this.get("group");return i.findById(this.getElementId("rail"))},r.prototype.getRailBBox=function(t){var i=this.getRailShape(t),n=i.getBBox();return n},r.prototype.getRailCanvasBBox=function(){var t=this.get("group"),i=t.findById(this.getElementId("rail")),n=i.getCanvasBBox();return n},r.prototype.isVertical=function(){return this.get("layout")==="vertical"},r.prototype.getValueByCanvasPoint=function(t,i){var n=this.getRange(),a=n.min,o=n.max,l=this.getRailCanvasBBox(),s=this.isVertical(),u=this.get("step"),c;s?c=(i-l.minY)/l.height:c=(t-l.minX)/l.width;var f=Ru(a,o,c);if(u){var h=Math.round((f-a)/u);f=a+h*u}return f>o&&(f=o),f<a&&(f=a),f},r.prototype.getCurrentValue=function(){var t=this.get("value");if(!t){var i=this.get("values");return i?[Math.max(Math.min.apply(Math,ye(i,[this.get("max")])),this.get("min")),Math.min(Math.max.apply(Math,ye(i,[this.get("min")])),this.get("max"))]:[this.get("min"),this.get("max")]}return t},r.prototype.resetHandlers=function(t){var i=this.getCurrentValue(),n=i[0],a=i[1];this.resetHandler(t,"min",n),this.resetHandler(t,"max",a)},r.prototype.getHandlerPath=function(t,i){var n=this.isVertical(),a=[],o=t.size,l=i.x,s=i.y,u=o*ftt,c=o/2,f=o/6;if(n){var h=l+u*QL;a.push(["M",l,s]),a.push(["L",h,s+c]),a.push(["L",l+u,s+c]),a.push(["L",l+u,s-c]),a.push(["L",h,s-c]),a.push(["Z"]),a.push(["M",h,s+f]),a.push(["L",l+u-2,s+f]),a.push(["M",h,s-f]),a.push(["L",l+u-2,s-f])}else{var v=s+u*QL;a.push(["M",l,s]),a.push(["L",l-c,v]),a.push(["L",l-c,s+u]),a.push(["L",l+c,s+u]),a.push(["L",l+c,v]),a.push(["Z"]),a.push(["M",l-f,v]),a.push(["L",l-f,s+u-2]),a.push(["M",l+f,v]),a.push(["L",l+f,s+u-2])}return a},r.prototype.resetHandler=function(t,i,n){var a=this.getPointByValue(n,t),o=this.get("handler"),l=this.getHandlerPath(o,a),s=this.getElementId("handler-"+i),u=t.findById(s),c=this.isVertical();u?u.attr("path",l):this.addShape(t,{type:"path",name:"legend-handler-"+i,draggable:!0,id:s,attrs:A(A({path:l},o.style),{cursor:c?"ns-resize":"ew-resize"})})},r.prototype.fixedElements=function(t){var i=t.findById(this.getElementId("rail")),n=t.findById(this.getElementId("label-min")),a=t.findById(this.getElementId("label-max")),o=this.getDrawPoint();this.isVertical()?this.fixedVertail(n,a,i,o):this.fixedHorizontal(n,a,i,o)},r.prototype.fitRailLength=function(t,i,n,a){var o=this.isVertical(),l=o?"height":"width",s=this.get("label"),u=s.align,c=s.spacing,f=this.get("max"+Os(l));if(f){var h=u==="rail"?n[l]+t[l]+i[l]+c*2:n[l],v=h-f;v>0&&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:e<n.x,right:e+t>n.x+n.width,top:r<n.y,bottom:r+i>n.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:'<div class="'+Nf+'"><div class="'+Gf+'"></div><ul class="'+Hd+'"></ul></div>',itemTpl:'<li class="'+m1+`" data-index={index}>
<span class="`+x1+`" style="background:{color}"></span>
<span class="`+z5+`">{name}</span>:
<span class="`+_1+`">{value}</span>
</li>`,xCrosshairTpl:'<div class="'+UM+'"></div>',yCrosshairTpl:'<div class="'+qM+'"></div>',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+n<n&&(o=0),o},r.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},r.prototype.updateThumbOffset=function(t){var i=this.cfg,n=i.thumbOffset,a=i.isHorizontal,o=i.thumbLen,l=i.size,s=this.validateRange(t);if(s!==n){var u=this.getElementByLocalId("thumb");a?u.attr({x1:s+l/2,x2:s+o-l/2}):u.attr({y1:s+l/2,y2:s+o-l/2}),this.emitOffsetChange(s)}},r.prototype.emitOffsetChange=function(t){var i=this.cfg,n=i.thumbOffset,a=i.trackLen,o=i.thumbLen;this.cfg.thumbOffset=t,this.emit("scrollchange",{thumbOffset:t,ratio:Ce(t/(a-o),0,1)}),this.delegateEmit("valuechange",{originalValue:n,value:t})},r}(Vr),Dtt=Object.freeze(Object.defineProperty({__proto__:null,Axis:att,Annotation:T5,Grid:ctt,Legend:htt,Tooltip:mtt,Crosshair:RA,TOOLTIP_CSS_CONST:V5,Component:VM,GroupComponent:Vr,HtmlComponent:y1,Slider:W5,Scrollbar:X5,propagationDelegate:BM},Symbol.toStringTag,{value:"Module"})),b1=_r(Dtt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbar=e.Slider=e.HtmlTooltip=e.ContinuousLegend=e.CategoryLegend=e.CircleGrid=e.LineGrid=e.CircleAxis=e.LineAxis=e.Annotation=e.Crosshair=e.Component=e.GroupComponent=e.HtmlComponent=e.Scale=e.registerScale=e.getScale=e.Coordinate=e.registerCoordinate=e.getCoordinate=e.Color=e.Attribute=e.getAttribute=e.Adjust=e.getAdjust=e.registerAdjust=e.AbstractShape=e.AbstractGroup=e.Event=void 0;var r=pi;Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return r.Event}}),Object.defineProperty(e,"AbstractGroup",{enumerable:!0,get:function(){return r.AbstractGroup}}),Object.defineProperty(e,"AbstractShape",{enumerable:!0,get:function(){return r.AbstractShape}});var t=GV;Object.defineProperty(e,"registerAdjust",{enumerable:!0,get:function(){return t.registerAdjust}}),Object.defineProperty(e,"getAdjust",{enumerable:!0,get:function(){return t.getAdjust}}),Object.defineProperty(e,"Adjust",{enumerable:!0,get:function(){return t.Adjust}});var i=IA;Object.defineProperty(e,"getAttribute",{enumerable:!0,get:function(){return i.getAttribute}}),Object.defineProperty(e,"Attribute",{enumerable:!0,get:function(){return i.Attribute}});var n=IA;Object.defineProperty(e,"Color",{enumerable:!0,get:function(){return n.Color}});var a=pJ;Object.defineProperty(e,"getCoordinate",{enumerable:!0,get:function(){return a.getCoordinate}}),Object.defineProperty(e,"registerCoordinate",{enumerable:!0,get:function(){return a.registerCoordinate}}),Object.defineProperty(e,"Coordinate",{enumerable:!0,get:function(){return a.Coordinate}});var o=gJ;Object.defineProperty(e,"getScale",{enumerable:!0,get:function(){return o.getScale}}),Object.defineProperty(e,"registerScale",{enumerable:!0,get:function(){return o.registerScale}}),Object.defineProperty(e,"Scale",{enumerable:!0,get:function(){return o.Scale}});var l=b1;Object.defineProperty(e,"Annotation",{enumerable:!0,get:function(){return l.Annotation}}),Object.defineProperty(e,"Component",{enumerable:!0,get:function(){return l.Component}}),Object.defineProperty(e,"Crosshair",{enumerable:!0,get:function(){return l.Crosshair}}),Object.defineProperty(e,"GroupComponent",{enumerable:!0,get:function(){return l.GroupComponent}}),Object.defineProperty(e,"HtmlComponent",{enumerable:!0,get:function(){return l.HtmlComponent}}),Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return l.Slider}}),Object.defineProperty(e,"Scrollbar",{enumerable:!0,get:function(){return l.Scrollbar}});var s=l.Axis.Line,u=l.Axis.Circle;e.LineAxis=s,e.CircleAxis=u;var c=l.Grid.Line,f=l.Grid.Circle;e.LineGrid=c,e.CircleGrid=f;var h=l.Legend.Category,v=l.Legend.Continuous;e.CategoryLegend=h,e.ContinuousLegend=v;var d=l.Tooltip.Html;e.HtmlTooltip=d})(Qn);var ul={},qu={};Object.defineProperty(qu,"__esModule",{value:!0});qu.registerAnimation=qu.getAnimation=void 0;var U5={};function $tt(e){return U5[e.toLowerCase()]}qu.getAnimation=$tt;function ktt(e,r){U5[e.toLowerCase()]=r}qu.registerAnimation=ktt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.doGroupAppearAnimate=e.doAnimate=e.getDefaultAnimateCfg=e.DEFAULT_ANIMATE_CFG=void 0;var r=j,t=Y,i=Kt,n=qu;e.DEFAULT_ANIMATE_CFG={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}};var a={interval:function(f){return{enter:{animation:f.isRect?f.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:f.isPolar&&f.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},o={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(f){var h;return f.isRect?h=f.isTransposed?"grow-in-x":"grow-in-y":(h="grow-in-xy",f.isPolar&&f.isTransposed&&(h="wave-in")),{animation:h}},schema:function(f){var h;return f.isRect?h=f.isTransposed?"grow-in-x":"grow-in-y":h="grow-in-xy",{animation:h}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function l(f,h){return{delay:(0,t.isFunction)(f.delay)?f.delay(h):f.delay,easing:(0,t.isFunction)(f.easing)?f.easing(h):f.easing,duration:(0,t.isFunction)(f.duration)?f.duration(h):f.duration,callback:f.callback,repeat:f.repeat}}function s(f,h,v){var d=a[f];return d&&((0,t.isFunction)(d)&&(d=d(h)),d=(0,t.deepMix)({},e.DEFAULT_ANIMATE_CFG,d),v)?d[v]:d}e.getDefaultAnimateCfg=s;function u(f,h,v){var d=(0,t.get)(f.get("origin"),"data",i.FIELD_ORIGIN),p=h.animation,x=l(h,d);if(p){var m=(0,n.getAnimation)(p);m&&m(f,x,v)}else f.animate(v.toAttrs,x)}e.doAnimate=u;function c(f,h,v,d,p){if(o[v]){var x=o[v](d),m=(0,n.getAnimation)((0,t.get)(x,"animation",""));if(m){var _=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},e.DEFAULT_ANIMATE_CFG.appear),x),h);f.stopAnimate(),m(f,_,{coordinate:d,minYPoint:p,toAttrs:null})}}}e.doGroupAppearAnimate=c})(ul);var be={},Se={};Object.defineProperty(Se,"__esModule",{value:!0});Se.getReplaceAttrs=Se.getPolygonCentroid=Se.getAngle=Se.getArcPath=Se.getSectorPath=Se.polarToCartesian=void 0;var hs=Y;function Rtt(e){if((0,hs.isEmpty)(e))return null;var r=e[0].x,t=e[0].x,i=e[0].y,n=e[0].y;return(0,hs.each)(e,function(a){r=r>a.x?a.x:r,t=t<a.x?a.x:t,i=i>a.y?a.y:i,n=n<a.y?a.y:n}),{minX:r,maxX:t,minY:i,maxY:n,centerX:(r+t)/2,centerY:(i+n)/2}}function JL(e){return Array.from(new Set(e)).length===1}function tD(e){return((0,hs.min)(e)+(0,hs.max)(e))/2}function Ka(e,r,t,i){return{x:e+t*Math.cos(i),y:r+t*Math.sin(i)}}Se.polarToCartesian=Ka;function Btt(e,r,t,i,n,a){a===void 0&&(a=0);var o=Ka(e,r,t,i),l=Ka(e,r,t,n),s=Ka(e,r,a,i),u=Ka(e,r,a,n);if(n-i===Math.PI*2){var c=Ka(e,r,t,i+Math.PI),f=Ka(e,r,a,i+Math.PI),h=[["M",o.x,o.y],["A",t,t,0,1,1,c.x,c.y],["A",t,t,0,1,1,l.x,l.y],["M",s.x,s.y]];return a&&(h.push(["A",a,a,0,1,0,f.x,f.y]),h.push(["A",a,a,0,1,0,u.x,u.y])),h.push(["M",o.x,o.y]),h.push(["Z"]),h}var v=n-i<=Math.PI?0:1,d=[["M",o.x,o.y],["A",t,t,0,v,1,l.x,l.y],["L",u.x,u.y]];return a&&d.push(["A",a,a,0,v,0,s.x,s.y]),d.push(["L",o.x,o.y]),d.push(["Z"]),d}Se.getSectorPath=Btt;function Ntt(e,r,t,i,n){var a=Ka(e,r,t,i),o=Ka(e,r,t,n);if((0,hs.isNumberEqual)(n-i,Math.PI*2)){var l=Ka(e,r,t,i+Math.PI);return[["M",a.x,a.y],["A",t,t,0,1,1,l.x,l.y],["A",t,t,0,1,1,a.x,a.y],["A",t,t,0,1,0,l.x,l.y],["A",t,t,0,1,0,a.x,a.y],["Z"]]}var s=n-i<=Math.PI?0:1;return[["M",a.x,a.y],["A",t,t,0,s,1,o.x,o.y]]}Se.getArcPath=Ntt;function Gtt(e,r){var t=e.points,i=Rtt(t),n,a,o=r.startAngle,l=r.endAngle,s=l-o;return r.isTransposed?(n=i.maxY*s,a=i.minY*s):(n=i.maxX*s,a=i.minX*s),n+=o,a+=o,{startAngle:a,endAngle:n}}Se.getAngle=Gtt;function ztt(e,r){if((0,hs.isNumber)(e)&&(0,hs.isNumber)(r))return[e,r];if(e=e,r=r,JL(e)||JL(r))return[tD(e),tD(r)];for(var t=-1,i=0,n=0,a,o=e.length-1,l,s=0;++t<e.length;)a=o,o=t,s+=l=e[a]*r[o]-e[o]*r[a],i+=(e[a]+e[o])*l,n+=(r[a]+r[o])*l;return s*=3,[i/s,n/s]}Se.getPolygonCentroid=ztt;function Vtt(e,r){var t=e.attr(),i=r.attr();return(0,hs.each)(t,function(n,a){i[a]===void 0&&(i[a]=void 0)}),i}Se.getReplaceAttrs=Vtt;var yr={};Object.defineProperty(yr,"__esModule",{value:!0});yr.uniq=yr.omit=yr.padEnd=yr.isBetween=void 0;var eD=Y;function jtt(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=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<r)for(var n=r-i,a=0;a<n;a++)e.push(t)}return e}yr.padEnd=Htt;function Ytt(e,r){return typeof e=="object"&&r.forEach(function(t){delete e[t]}),e}yr.omit=Ytt;function Wtt(e,r,t){r===void 0&&(r=[]),t===void 0&&(t=new Map);for(var i=0,n=e;i<n.length;i++){var a=n[i];t.has(a)||(r.push(a),t.set(a,!0))}return r}yr.uniq=Wtt;var Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.toPoints=Kr.getRegionBBox=Kr.BBox=void 0;var rD=Y,$n=Kt,q5=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=r,this.y=t,this.height=n,this.width=i}return e.fromRange=function(r,t,i,n){return new e(r,t,i-r,n-t)},e.fromObject=function(r){return new e(r.minX,r.minY,r.width,r.height)},Object.defineProperty(e.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(r){return this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height},e.prototype.contains=function(r){return r.minX>=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;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return(0,rD.each)(r,function(n){i.x=Math.min(n.x,i.x),i.y=Math.min(n.y,i.y),i.width=Math.max(n.maxX,i.maxX)-i.x,i.height=Math.max(n.maxY,i.maxY)-i.y}),i},e.prototype.merge=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return(0,rD.each)(r,function(n){i.x=Math.max(n.x,i.x),i.y=Math.max(n.y,i.y),i.width=Math.min(n.maxX,i.maxX)-i.x,i.height=Math.min(n.maxY,i.maxY)-i.y}),i},e.prototype.cut=function(r,t){var i=r.width,n=r.height;switch(t){case $n.DIRECTION.TOP:case $n.DIRECTION.TOP_LEFT:case $n.DIRECTION.TOP_RIGHT:return e.fromRange(this.minX,this.minY+n,this.maxX,this.maxY);case $n.DIRECTION.RIGHT:case $n.DIRECTION.RIGHT_TOP:case $n.DIRECTION.RIGHT_BOTTOM:return e.fromRange(this.minX,this.minY,this.maxX-i,this.maxY);case $n.DIRECTION.BOTTOM:case $n.DIRECTION.BOTTOM_LEFT:case $n.DIRECTION.BOTTOM_RIGHT:return e.fromRange(this.minX,this.minY,this.maxX,this.maxY-n);case $n.DIRECTION.LEFT:case $n.DIRECTION.LEFT_TOP:case $n.DIRECTION.LEFT_BOTTOM:return e.fromRange(this.minX+i,this.minY,this.maxX,this.maxY);default:return this}},e.prototype.shrink=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return new e(this.x+a,this.y+t,this.width-a-i,this.height-t-n)},e.prototype.expand=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return new e(this.x-a,this.y-t,this.width+a+i,this.height+t+n)},e.prototype.exceed=function(r){return[Math.max(-this.minY+r.minY,0),Math.max(this.maxX-r.maxX,0),Math.max(this.maxY-r.maxY,0),Math.max(-this.minX+r.minX,0)]},e.prototype.collide=function(r){return this.minX<r.maxX&&this.maxX>r.minX&&this.minY<r.maxY&&this.maxY>r.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<f.length;c++){var h=f[c],v=a[h];h===i.field&&(o=(0,Yy.getNormalizedValue)(v,i)),n[h]&&(l=(0,Yy.getNormalizedValue)(v,n[h]))}return this.view.getCoordinate().convert({x:o,y:l})},r.prototype.getRegionPoints=function(t,i){var n=this,a=this.view.getXScale(),o=this.view.getScalesByDim("y"),l=Object.values(o)[0],s=a.field,u=this.view.getData(),c=(0,xe.isArray)(t)?t[0]:t[s],f=(0,xe.isArray)(i)?i[0]:i[s],h=[],v;return(0,xe.each)(u,function(d,p){if(d[s]===c&&(v=p),p>=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<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},BA.apply(this,arguments)},Fs=Pt.createContext(null);Fs.displayName="ChartViewContext";var get=Fs.Consumer;function yet(e){return function(r){return Pt.createElement(get,null,function(t){return Pt.createElement(e,BA({chartView:t},r))})}}var Lp={},Mh={},Cn={},Pi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isSamePoint=e.mergeRegion=e.intersectRect=e.inBox=e.distance=e.getPixelRatio=void 0;function r(){return window?window.devicePixelRatio:1}e.getPixelRatio=r;function t(s,u,c,f){var h=s-c,v=u-f;return Math.sqrt(h*h+v*v)}e.distance=t;function i(s,u,c,f,h,v){return h>=s&&h<=s+c&&v>=u&&v<=u+f}e.inBox=i;function n(s,u){return!(u.minX>s.maxX||u.maxX<s.minX||u.minY>s.maxY||u.maxY<s.minY)}e.intersectRect=n;function a(s,u){return!s||!u?s||u:{minX:Math.min(s.minX,u.minX),minY:Math.min(s.minY,u.minY),maxX:Math.max(s.maxX,u.maxX),maxY:Math.max(s.maxY,u.maxY)}}e.mergeRegion=a;function o(s,u){return s[0]===u[0]&&s[1]===u[1]}e.isSamePoint=o;var l=Y;Object.defineProperty(e,"isNil",{enumerable:!0,get:function(){return l.isNil}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return l.isString}}),Object.defineProperty(e,"isFunction",{enumerable:!0,get:function(){return l.isFunction}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return l.isArray}}),Object.defineProperty(e,"each",{enumerable:!0,get:function(){return l.each}}),Object.defineProperty(e,"toRadian",{enumerable:!0,get:function(){return l.toRadian}}),Object.defineProperty(e,"mod",{enumerable:!0,get:function(){return l.mod}}),Object.defineProperty(e,"isNumberEqual",{enumerable:!0,get:function(){return l.isNumberEqual}}),Object.defineProperty(e,"requestAnimationFrame",{enumerable:!0,get:function(){return l.requestAnimationFrame}}),Object.defineProperty(e,"clearAnimationFrame",{enumerable:!0,get:function(){return l.clearAnimationFrame}})})(Pi);var Ne={},hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.parseRadius=hn.parseStyle=hn.parsePattern=hn.parseRadialGradient=hn.parseLineGradient=void 0;var ZM=Pi,met=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,xet=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,_et=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Z5=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Q5(e,r){var t=e.match(Z5);ZM.each(t,function(i){var n=i.split(":");r.addColorStop(n[0],n[1])})}function K5(e,r,t){var i=met.exec(t),n=parseFloat(i[1])%360*(Math.PI/180),a=i[2],o=r.getBBox(),l,s;n>=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&&n<Math.PI?(l={x:o.maxX,y:o.minY},s={x:o.minX,y:o.maxY}):Math.PI<=n&&n<3/2*Math.PI?(l={x:o.maxX,y:o.maxY},s={x:o.minX,y:o.minY}):(l={x:o.minX,y:o.maxY},s={x:o.maxX,y:o.minY});var u=Math.tan(n),c=u*u,f=(s.x-l.x+u*(s.y-l.y))/(c+1)+l.x,h=u*(s.x-l.x+u*(s.y-l.y))/(c+1)+l.y,v=e.createLinearGradient(l.x,l.y,f,h);return Q5(a,v),v}hn.parseLineGradient=K5;function J5(e,r,t){var i=xet.exec(t),n=parseFloat(i[1]),a=parseFloat(i[2]),o=parseFloat(i[3]),l=i[4];if(o===0){var s=l.match(Z5);return s[s.length-1].split(":")[1]}var u=r.getBBox(),c=u.maxX-u.minX,f=u.maxY-u.minY,h=Math.sqrt(c*c+f*f)/2,v=e.createRadialGradient(u.minX+c*n,u.minY+f*a,0,u.minX+c/2,u.minY+f/2,o*h);return Q5(l,v),v}hn.parseRadialGradient=J5;function t3(e,r,t){if(r.get("patternSource")&&r.get("patternSource")===t)return r.get("pattern");var i,n,a=_et.exec(t),o=a[1],l=a[2];function s(){i=e.createPattern(n,o),r.set("pattern",i),r.set("patternSource",t)}switch(o){case"a":o="repeat";break;case"x":o="repeat-x";break;case"y":o="repeat-y";break;case"n":o="no-repeat";break;default:o="no-repeat"}return n=new Image,l.match(/^data:/i)||(n.crossOrigin="Anonymous"),n.src=l,n.complete?s():(n.onload=s,n.src=n.src),i}hn.parsePattern=t3;function bet(e,r,t){var i=r.getBBox();if(isNaN(i.x)||isNaN(i.y)||isNaN(i.width)||isNaN(i.height))return t;if(ZM.isString(t)){if(t[1]==="("||t[2]==="("){if(t[0]==="l")return K5(e,r,t);if(t[0]==="r")return J5(e,r,t);if(t[0]==="p")return t3(e,r,t)}return t}if(t instanceof CanvasPattern)return t}hn.parseStyle=bet;function wet(e){var r=0,t=0,i=0,n=0;return ZM.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,[r,t,i,n]}hn.parseRadius=wet;var C1={};Object.defineProperty(C1,"__esModule",{value:!0});var Xy=Pi;function Uy(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function NA(e,r){return Uy(e)*Uy(r)?(e[0]*r[0]+e[1]*r[1])/(Uy(e)*Uy(r)):1}function nD(e,r){return(e[0]*r[1]<e[1]*r[0]?-1:1)*Math.acos(NA(e,r))}function Cet(e,r){var t=r[1],i=r[2],n=Xy.mod(Xy.toRadian(r[3]),Math.PI*2),a=r[4],o=r[5],l=e[0],s=e[1],u=r[6],c=r[7],f=Math.cos(n)*(l-u)/2+Math.sin(n)*(s-c)/2,h=-1*Math.sin(n)*(l-u)/2+Math.cos(n)*(s-c)/2,v=f*f/(t*t)+h*h/(i*i);v>1&&(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;i<r.length;i++){var n=r[i];n.cfg.visible?n.draw(e,t):n.skipDraw()}}Ne.drawChildren=Fet;function Pet(e,r,t){var i=e.get("refreshElements");xu.each(i,function(n){if(n!==e)for(var a=n.cfg.parent;a&&a!==e&&!a.cfg.refresh;)a.cfg.refresh=!0,a=a.cfg.parent}),i[0]===e?JM(r):ex(r,t)}Ne.checkRefresh=Pet;function ex(e,r){for(var t=0;t<e.length;t++){var i=e[t];if(i.cfg.visible)if(i.cfg.hasChanged)i.cfg.refresh=!0,i.isGroup()&&JM(i.cfg.children);else if(i.cfg.refresh)i.isGroup()&&ex(i.cfg.children,r);else{var n=Iet(i,r);i.cfg.refresh=n,n&&i.isGroup()&&ex(i.cfg.children,r)}}}Ne.checkChildrenRefresh=ex;function n3(e){for(var r=0;r<e.length;r++){var t=e[r];t.cfg.hasChanged=!1,t.isGroup()&&!t.destroyed&&n3(t.cfg.children)}}Ne.clearChanged=n3;function JM(e,r){for(var t=0;t<e.length;t++){var i=e[t];!i.cfg.visible||(i.cfg.refresh=!0,i.isGroup()&&JM(i.get("children")))}}function Iet(e,r){var t=e.cfg.cacheCanvasBBox,i=e.cfg.isInView&&t&&KM.intersectRect(t,r);return i}function Let(e,r,t,i){var n=t.path,a=t.startArrow,o=t.endArrow;if(!!n){var l=[0,0],s=[0,0],u={dx:0,dy:0};r.beginPath();for(var c=0;c<n.length;c++){var f=n[c],h=f[0];if(c===0&&a&&a.d){var v=e.getStartTangent();u=oC.getShortenOffset(v[0][0],v[0][1],v[1][0],v[1][1],a.d)}else if(c===n.length-2&&n[c+1][0]==="Z"&&o&&o.d){var d=n[c+1];if(d[0]==="Z"){var v=e.getEndTangent();u=oC.getShortenOffset(v[0][0],v[0][1],v[1][0],v[1][1],o.d)}}else if(c===n.length-1&&o&&o.d&&n[0]!=="Z"){var v=e.getEndTangent();u=oC.getShortenOffset(v[0][0],v[0][1],v[1][0],v[1][1],o.d)}var p=u.dx,x=u.dy;switch(h){case"M":r.moveTo(f[1]-p,f[2]-x),s=[f[1],f[2]];break;case"L":r.lineTo(f[1]-p,f[2]-x);break;case"Q":r.quadraticCurveTo(f[1],f[2],f[3]-p,f[4]-x);break;case"C":r.bezierCurveTo(f[1],f[2],f[3],f[4],f[5]-p,f[6]-x);break;case"A":{var m=void 0;i?(m=i[c],m||(m=aD.default(l,f),i[c]=m)):m=aD.default(l,f);var _=m.cx,b=m.cy,w=m.rx,S=m.ry,M=m.startAngle,O=m.endAngle,F=m.xRotation,L=m.sweepFlag;if(r.ellipse)r.ellipse(_,b,w,S,F,M,O,1-L);else{var D=w>S?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)<prt?0:e<0?-1:1}function grt(e,r,t){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])&&Math.min(e[0],r[0])<=t[0]&&t[0]<=Math.max(e[0],r[0])&&Math.min(e[1],r[1])<=t[1]&&t[1]<=Math.max(e[1],r[1])}function yrt(e,r,t){var i=!1,n=e.length;if(n<=2)return!1;for(var a=0;a<n;a++){var o=e[a],l=e[(a+1)%n];if(grt(o,l,[r,t]))return!0;vC(o[1]-t)>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(s<i||s>n)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;i<t;i++){var n=e[i],a=n[0];if(a==="C"||a==="A"||a==="Q"){r=!0;break}}return r}function Irt(e,r,t,i,n){for(var a=!1,o=r/2,l=0;l<e.length;l++){var s=e[l],u=s.currentPoint,c=s.params,f=s.prePoint,h=s.box;if(!(h&&!Mrt.inBox(h.x-o,h.y-o,h.width+r,h.height+r,t,i))){switch(s.command){case"L":case"Z":a=Ert.default(f[0],f[1],u[0],u[1],r,t,i);break;case"Q":var v=Crt.Quad.pointDistance(f[0],f[1],c[1],c[2],c[3],c[4],t,i);a=v<=r/2;break;case"C":var d=Srt.Cubic.pointDistance(f[0],f[1],c[1],c[2],c[3],c[4],c[5],c[6],t,i,n);a=d<=r/2;break;case"A":var p=s.arcParams,x=p.cx,m=p.cy,_=p.rx,b=p.ry,w=p.startAngle,S=p.endAngle,M=p.xRotation,O=[t,i,1],F=_>b?_: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;a<r;a++){var o=e[a],l=o[0];l==="M"?(n.length&&(i.push(n),n=[]),n.push([o[1],o[2]])):l==="Z"?n.length&&(t.push(n),n=[]):n.push([o[1],o[2]])}return n.length>0&&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<e.length;n++){var a=e[n];if(i=Rrt.default(a,r,t),i)break}return i}var Brt=function(e){dC.__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 dC.__assign(dC.__assign({},t),{startArrow:!1,endArrow:!1})},r.prototype.initAttrs=function(t){this._setPathArr(t.path),this.setArrow()},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),t==="path"&&this._setPathArr(i),this.setArrow()},r.prototype._setPathArr=function(t){this.attrs.path=uD.path2Absolute(t);var i=tm.default.hasArc(t);this.set("hasArc",i),this.set("paramsCache",{}),this.set("segments",null),this.set("curve",null),this.set("tCache",null),this.set("totalLength",null)},r.prototype.getSegments=function(){var t=this.get("segements");return t||(t=uD.path2Segments(this.attr("path")),this.set("segments",t)),t},r.prototype.setArrow=function(){var t=this.attr(),i=t.startArrow,n=t.endArrow;if(i){var a=this.getStartTangent();cD.addStartArrow(this,t,a[0][0],a[0][1],a[1][0],a[1][1])}if(n){var a=this.getEndTangent();cD.addEndArrow(this,t,a[0][0],a[0][1],a[1][0],a[1][1])}},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.getSegments(),s=this.get("hasArc"),u=!1;if(n){var c=this.getTotalLength();u=tm.default.isPointInStroke(l,o,t,i,c)}if(!u&&a)if(s)u=krt.default(this,t,i);else{var f=this.attr("path"),h=tm.default.extractPolygons(f);u=fD(h.polygons,t,i)||fD(h.polylines,t,i)}return u},r.prototype.createPath=function(t){var i=this.attr(),n=this.get("paramsCache");$rt.drawPath(this,t,i,n)},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.get("totalLength");return Pc.isNil(t)?(this._calculateCurve(),this._setTcache(),this.get("totalLength")):t},r.prototype.getPoint=function(t){var i=this.get("tCache");i||(this._calculateCurve(),this._setTcache(),i=this.get("tCache"));var n,a,o=this.get("curve");if(!i||i.length===0)return o?{x:o[0][1],y:o[0][2]}:null;Pc.each(i,function(c,f){t>=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<a-1;o++){var l=e[o][0],s=e[o][1],u=e[o+1][0],c=e[o+1][1];if(hD.default(l,s,u,c,r,t,i))return!0}if(n){var f=e[0],h=e[a-1];if(hD.default(f[0],f[1],h[0],h[1],r,t,i))return!0}return!1}E1.default=Nrt;Object.defineProperty(lE,"__esModule",{value:!0});var Grt=j,zrt=Cn,Vrt=E1,jrt=T1,Hrt=function(e){Grt.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr().points,s=!1;return n&&(s=Vrt.default(l,o,t,i,!0)),!s&&a&&(s=jrt.default(l,t,i)),s},r.prototype.createPath=function(t){var i=this.attr(),n=i.points;if(!(n.length<2)){t.beginPath();for(var a=0;a<n.length;a++){var o=n[a];a===0?t.moveTo(o[0],o[1]):t.lineTo(o[0],o[1])}t.closePath()}},r}(zrt.default);lE.default=Hrt;var sE={};Object.defineProperty(sE,"__esModule",{value:!0});var gC=j,vD=xo,Yrt=xo,yC=Y,Wrt=Cn,Xrt=E1,em=Ca,Urt=function(e){gC.__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 gC.__assign(gC.__assign({},t),{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(),["points"].indexOf(t)!==-1&&this._resetCache()},r.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},r.prototype.setArrow=function(){var t=this.attr(),i=this.attrs,n=i.points,a=i.startArrow,o=i.endArrow,l=n.length,s=n[0][0],u=n[0][1],c=n[l-1][0],f=n[l-1][1];a&&em.addStartArrow(this,t,n[1][0],n[1][1],s,u),o&&em.addEndArrow(this,t,n[l-2][0],n[l-2][1],c,f)},r.prototype.isFill=function(){return!1},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){if(!n||!o)return!1;var l=this.attr().points;return Xrt.default(l,o,t,i,!1)},r.prototype.isStroke=function(){return!0},r.prototype.createPath=function(t){var i=this.attr(),n=i.points,a=i.startArrow,o=i.endArrow,l=n.length;if(!(n.length<2)){var s=n[0][0],u=n[0][1],c=n[l-1][0],f=n[l-1][1];if(a&&a.d){var h=em.getShortenOffset(s,u,n[1][0],n[1][1],a.d);s+=h.dx,u+=h.dy}if(o&&o.d){var h=em.getShortenOffset(n[l-2][0],n[l-2][1],c,f,o.d);c-=h.dx,f-=h.dy}t.beginPath(),t.moveTo(s,u);for(var v=0;v<l-1;v++){var d=n[v];t.lineTo(d[0],d[1])}t.lineTo(c,f)}},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().points,i=this.get("totalLength");return yC.isNil(i)?(this.set("totalLength",Yrt.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 yC.each(n,function(l,s){t>=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(a<r){var o=i[r+1];o?t.insertBefore(e,o):t.appendChild(e)}}else t.appendChild(e)}mr.moveTo=mit;Object.defineProperty(Wn,"__esModule",{value:!0});Wn.setClip=Wn.setTransform=Wn.setShadow=void 0;var xit=mr;function _it(e,r){var t=e.cfg.el,i=e.attr(),n={dx:i.shadowOffsetX,dy:i.shadowOffsetY,blur:i.shadowBlur,color:i.shadowColor};if(!n.dx&&!n.dy&&!n.blur&&!n.color)t.removeAttribute("filter");else{var a=r.find("filter",n);a||(a=r.addShadow(n)),t.setAttribute("filter","url(#"+a+")")}}Wn.setShadow=_it;function bit(e){var r=e.attr().matrix;if(r){for(var t=e.cfg.el,i=[],n=0;n<9;n+=3)i.push(r[n]+","+r[n+1]);i=i.join(","),i.indexOf("NaN")===-1?t.setAttribute("transform","matrix("+i+")"):console.warn("invalid matrix:",r)}}Wn.setTransform=bit;function wit(e,r){var t=e.getClip(),i=e.get("el");if(!t)i.removeAttribute("clip-path");else if(t&&!i.hasAttribute("clip-path")){xit.createDom(t),t.createPath(r);var n=r.addClip(t);i.setAttribute("clip-path","url(#"+n+")")}}Wn.setClip=wit;var vs={};Object.defineProperty(vs,"__esModule",{value:!0});vs.refreshElement=vs.drawChildren=void 0;var yD=Wn,mD=mr;function Cit(e,r){r.forEach(function(t){t.draw(e)})}vs.drawChildren=Cit;function Sit(e,r){var t=e.get("canvas");if(t&&t.get("autoDraw")){var i=t.get("context"),n=e.getParent(),a=n?n.getChildren():[t],o=e.get("el");if(r==="remove"){var l=e.get("isClipShape");if(l){var s=o&&o.parentNode,u=s&&s.parentNode;s&&u&&u.removeChild(s)}else o&&o.parentNode&&o.parentNode.removeChild(o)}else if(r==="show")o.setAttribute("visibility","visible");else if(r==="hide")o.setAttribute("visibility","hidden");else if(r==="zIndex")mD.moveTo(o,a.indexOf(e));else if(r==="sort"){var c=e.get("children");c&&c.length&&mD.sortDom(e,function(f,h){return c.indexOf(f)-c.indexOf(h)?1:0})}else r==="clear"?o&&(o.innerHTML=""):r==="matrix"?yD.setTransform(e):r==="clip"?yD.setClip(e,i):r==="attr"||r==="add"&&e.draw(i)}}vs.refreshElement=Sit;var kp={};Object.defineProperty(kp,"__esModule",{value:!0});var Ait=j,Tit=pi,Mit=Y,Eit=$p,xD=vs,_D=Wn,bD=ur,Oit=mr,Fit=function(e){Ait.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isEntityGroup=function(){return!0},r.prototype.createDom=function(){var t=Oit.createSVGElement("g");this.set("el",t);var i=this.getParent();if(i){var n=i.get("el");n||(n=i.createDom(),i.set("el",n)),n.appendChild(t)}return t},r.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t);var i=this.get("canvas");if(i&&i.get("autoDraw")){var n=i.get("context");this.createPath(n,t)}},r.prototype.onCanvasChange=function(t){xD.refreshElement(this,t)},r.prototype.getShapeBase=function(){return Eit},r.prototype.getGroupBase=function(){return r},r.prototype.draw=function(t){var i=this.getChildren(),n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||this.createDom(),_D.setClip(this,t),this.createPath(t),i.length&&xD.drawChildren(t,i))},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");Mit.each(i||n,function(o,l){bD.SVG_ATTR_MAP[l]&&a.setAttribute(bD.SVG_ATTR_MAP[l],o)}),_D.setTransform(this)},r}(Tit.AbstractGroup);kp.default=Fit;Object.defineProperty(Zi,"__esModule",{value:!0});var _C=j,Pit=pi,bC=Wn,Iit=mr,Lit=vs,tu=ur,Dit=$p,$it=kp,kit=pi,Rit=function(e){_C.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="svg",t.canFill=!1,t.canStroke=!1,t}return r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return _C.__assign(_C.__assign({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},r.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t);var i=this.get("canvas");if(i&&i.get("autoDraw")){var n=i.get("context");this.draw(n,t)}},r.prototype.getShapeBase=function(){return Dit},r.prototype.getGroupBase=function(){return $it.default},r.prototype.onCanvasChange=function(t){Lit.refreshElement(this,t)},r.prototype.calculateBBox=function(){var t=this.get("el"),i=null;if(t)i=t.getBBox();else{var n=kit.getBBoxMethod(this.get("type"));n&&(i=n(this))}if(i){var a=i.x,o=i.y,l=i.width,s=i.height,u=this.getHitLineWidth(),c=u/2,f=a-c,h=o-c,v=a+l+c,d=o+s+c;return{x:f,y:h,minX:f,minY:h,maxX:v,maxY:d,width:l+u,height:s+u}}return{x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}},r.prototype.isFill=function(){var t=this.attr(),i=t.fill,n=t.fillStyle;return(i||n||this.isClipShape())&&this.canFill},r.prototype.isStroke=function(){var t=this.attr(),i=t.stroke,n=t.strokeStyle;return(i||n)&&this.canStroke},r.prototype.draw=function(t,i){var n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||Iit.createDom(this),bC.setClip(this,t),this.createPath(t,i),this.shadow(t,i),this.strokeAndFill(t,i),this.transform(i))},r.prototype.createPath=function(t,i){},r.prototype.strokeAndFill=function(t,i){var n=i||this.attr(),a=n.fill,o=n.fillStyle,l=n.stroke,s=n.strokeStyle,u=n.fillOpacity,c=n.strokeOpacity,f=n.lineWidth,h=this.get("el");this.canFill&&(i?"fill"in n?this._setColor(t,"fill",a):"fillStyle"in n&&this._setColor(t,"fill",o):this._setColor(t,"fill",a||o),u&&h.setAttribute(tu.SVG_ATTR_MAP.fillOpacity,u)),this.canStroke&&f>0&&(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+='<tspan x="'+a+'" dy="'+-u+'em">'+f+"</tspan>":l==="top"?c+='<tspan x="'+a+'" dy="0.9em">'+f+"</tspan>":l==="middle"?c+='<tspan x="'+a+'" dy="'+-(u-1)/2+'em">'+f+"</tspan>":l==="bottom"?c+='<tspan x="'+a+'" dy="-'+(u+BD)+'em">'+f+"</tspan>":l==="hanging"&&(c+='<tspan x="'+a+'" dy="'+(-(u-1)-BD)+'em">'+f+"</tspan>"):c+='<tspan x="'+a+'" dy="1em">'+f+"</tspan>"}),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+='<stop offset="'+i[0]+'" stop-color="'+i[1]+'"></stop>'}),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<Math.PI?(a={x:1,y:0},o={x:0,y:1}):Math.PI<=i&&i<1.5*Math.PI?(a={x:1,y:1},o={x:0,y:0}):(a={x:0,y:1},o={x:1,y:0});var l=Math.tan(i),s=l*l,u=(o.x-a.x+l*(o.y-a.y))/(s+1)+a.x,c=l*(o.x-a.x+l*(o.y-a.y))/(s+1)+a.y;r.setAttribute("x1",a.x),r.setAttribute("y1",a.y),r.setAttribute("x2",u),r.setAttribute("y2",c),r.innerHTML=u3(n)}function Ent(e,r){var t=Ant.exec(e),i=parseFloat(t[1]),n=parseFloat(t[2]),a=parseFloat(t[3]),o=t[4];r.setAttribute("cx",i),r.setAttribute("cy",n),r.setAttribute("r",a),r.innerHTML=u3(o)}var Ont=function(){function e(r){this.cfg={};var t=null,i=rx.uniqueId("gradient_");return r.toLowerCase()[0]==="l"?(t=ND.createSVGElement("linearGradient"),Mnt(r,t)):(t=ND.createSVGElement("radialGradient"),Ent(r,t)),t.setAttribute("id",i),this.el=t,this.id=i,this.cfg=r,this}return e.prototype.match=function(r,t){return this.cfg===t},e}();OE.default=Ont;var FE={};Object.defineProperty(FE,"__esModule",{value:!0});var IC=Y,Fnt=mr,Pnt={shadowColor:"color",shadowOpacity:"opacity",shadowBlur:"blur",shadowOffsetX:"dx",shadowOffsetY:"dy"},Int={x:"-40%",y:"-40%",width:"200%",height:"200%"},Lnt=function(){function e(r){this.type="filter",this.cfg={},this.type="filter";var t=Fnt.createSVGElement("filter");return IC.each(Int,function(i,n){t.setAttribute(n,i)}),this.el=t,this.id=IC.uniqueId("filter_"),this.el.id=this.id,this.cfg=r,this._parseShadow(r,t),this}return e.prototype.match=function(r,t){if(this.type!==r)return!1;var i=!0,n=this.cfg;return IC.each(Object.keys(n),function(a){if(n[a]!==t[a])return i=!1,!1}),i},e.prototype.update=function(r,t){var i=this.cfg;return i[Pnt[r]]=t,this._parseShadow(i,this.el),this},e.prototype._parseShadow=function(r,t){var i=`<feDropShadow
dx="`+(r.dx||0)+`"
dy="`+(r.dy||0)+`"
stdDeviation="`+(r.blur?r.blur/10:0)+`"
flood-color="`+(r.color?r.color:"#000")+`"
flood-opacity="`+(r.opacity?r.opacity:1)+`"
/>`;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;a<i.length;a++)if(i[a].match(r,t)){n=i[a].id;break}return n},e.prototype.findById=function(r){for(var t=this.children,i=null,n=0;n<t.length;n++)if(t[n].id===r){i=t[n];break}return i},e.prototype.add=function(r){this.children.push(r),r.canvas=this.canvas,r.parent=this},e.prototype.getDefaultArrow=function(r,t){var i=r.stroke||r.strokeStyle;if(this.defaultArrow[i])return this.defaultArrow[i].id;var n=new jD.default(r,t);return this.defaultArrow[i]=n,this.el.appendChild(n.el),this.add(n),n.id},e.prototype.addGradient=function(r){var t=new Vnt.default(r);return this.el.appendChild(t.el),this.add(t),t.id},e.prototype.addArrow=function(r,t){var i=new jD.default(r,t);return this.el.appendChild(i.el),this.add(i),i.id},e.prototype.addShadow=function(r){var t=new jnt.default(r);return this.el.appendChild(t.el),this.add(t),t.id},e.prototype.addPattern=function(r){var t=new Ynt.default(r);return this.el.appendChild(t.el),this.add(t),t.id},e.prototype.addClip=function(r){var t=new Hnt.default(r);return this.el.appendChild(t.el),this.add(t),t.id},e}();EE.default=Xnt;Object.defineProperty(ME,"__esModule",{value:!0});var LC=j,Unt=pi,HD=ur,qnt=vs,DC=Wn,YD=mr,Znt=$p,Qnt=kp,Knt=EE,Jnt=function(e){LC.__extends(r,e);function r(t){return e.call(this,LC.__assign(LC.__assign({},t),{autoDraw:!0,renderer:"svg"}))||this}return r.prototype.getShapeBase=function(){return Znt},r.prototype.getGroupBase=function(){return Qnt.default},r.prototype.getShape=function(t,i,n){var a=n.target||n.srcElement;if(!HD.SHAPE_TO_TAGS[a.tagName]){for(var o=a.parentNode;o&&!HD.SHAPE_TO_TAGS[o.tagName];)o=o.parentNode;a=o}return this.find(function(l){return l.get("el")===a})},r.prototype.createDom=function(){var t=YD.createSVGElement("svg"),i=new Knt.default(t);return t.setAttribute("width",""+this.get("width")),t.setAttribute("height",""+this.get("height")),this.set("context",i),t},r.prototype.onCanvasChange=function(t){var i=this.get("context"),n=this.get("el");if(t==="sort"){var a=this.get("children");a&&a.length&&YD.sortDom(this,function(l,s){return a.indexOf(l)-a.indexOf(s)?1:0})}else if(t==="clear"){if(n){n.innerHTML="";var o=i.el;o.innerHTML="",n.appendChild(o)}}else t==="matrix"?DC.setTransform(this):t==="clip"?DC.setClip(this,i):t==="changeSize"&&(n.setAttribute("width",""+this.get("width")),n.setAttribute("height",""+this.get("height")))},r.prototype.draw=function(){var t=this.get("context"),i=this.getChildren();DC.setClip(this,t),i.length&&qnt.drawChildren(t,i)},r}(Unt.AbstractCanvas);ME.default=Jnt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.Shape=void 0;var r=j,t=$p;e.Shape=t,r.__exportStar(pi,e);var i=ME;Object.defineProperty(e,"Canvas",{enumerable:!0,get:function(){return i.default}});var n=kp;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return n.default}}),e.version="0.5.6"})(dE);var tat=nM(dE),eat=jG({__proto__:null,default:tat},[dE]),ut={},Af={},DE={},Zu={};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.registerEngine=Zu.getEngine=void 0;var c3={};function rat(e){var r=c3[e];if(!r)throw new Error("G engine '"+e+"' is not exist, please register it at first.");return r}Zu.getEngine=rat;function iat(e,r){c3[e]=r}Zu.registerEngine=iat;var ds={},Rp={},f3=_r(L9);Object.defineProperty(Rp,"__esModule",{value:!0});var h3=j,nat=(0,h3.__importDefault)(f3),aat=function(e){(0,h3.__extends)(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}(nat.default);Rp.default=aat;var ix={},_o={},Fe={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.getMaxScale=Ur.getDefaultCategoryScaleRange=Ur.getName=Ur.syncScale=Ur.createScaleByField=void 0;var zA=j,Ja=Y,WD=Qn,oat=be,lat=/^(?:(?!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 sat(e){var r="linear";return lat.test(e)?r="timeCat":(0,Ja.isString)(e)&&(r="cat"),r}function uat(e,r,t){var i=r||[];if((0,Ja.isNumber)(e)||(0,Ja.isNil)((0,Ja.firstValue)(i,e))&&(0,Ja.isEmpty)(t)){var n=(0,WD.getScale)("identity");return new n({field:e.toString(),values:[e]})}var a=(0,Ja.valuesOfKey)(i,e),o=(0,Ja.get)(t,"type",sat(a[0])),l=(0,WD.getScale)(o);return new l((0,zA.__assign)({field:e,values:a},t))}Ur.createScaleByField=uat;function cat(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)}}Ur.syncScale=cat;function fat(e){return e.alias||e.field}Ur.getName=fat;function hat(e,r,t){var i=e.values,n=i.length,a;if(n===1)a=[.5,1];else{var o=1,l=0;(0,oat.isFullCircle)(r)?r.isTransposed?(o=(0,Ja.get)(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}Ur.getDefaultCategoryScaleRange=hat;function vat(e){var r=e.values.filter(function(t){return!(0,Ja.isNil)(t)&&!isNaN(t)});return Math.max.apply(Math,(0,zA.__spreadArray)((0,zA.__spreadArray)([],r,!1),[(0,Ja.isNil)(e.max)?-1/0:e.max],!1))}Ur.getMaxScale=vat;Object.defineProperty(Fe,"__esModule",{value:!0});Fe.getAxisTitleText=Fe.getAxisDirection=Fe.getAxisOption=Fe.getCircleAxisCenterRadius=Fe.getAxisTitleOptions=Fe.getAxisThemeCfg=Fe.getAxisFactorByRegion=Fe.isVertical=Fe.getAxisFactor=Fe.getAxisRegion=Fe.getCircleAxisRelativeRegion=Fe.getLineAxisRelativeRegion=void 0;var zi=Y,Wl=Kt,dat=Ur,XD=ta;function v3(e){var r,t;switch(e){case Wl.DIRECTION.TOP:r={x:0,y:1},t={x:1,y:1};break;case Wl.DIRECTION.RIGHT:r={x:1,y:0},t={x:1,y:1};break;case Wl.DIRECTION.BOTTOM:r={x:0,y:0},t={x:1,y:0};break;case Wl.DIRECTION.LEFT:r={x:0,y:0},t={x:0,y:1};break;default:r=t={x:0,y:0}}return{start:r,end:t}}Fe.getLineAxisRelativeRegion=v3;function d3(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}}Fe.getCircleAxisRelativeRegion=d3;function pat(e,r){var t={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?t=v3(r):e.isPolar&&(t=d3(e));var i=t.start,n=t.end;return{start:e.convert(i),end:e.convert(n)}}Fe.getAxisRegion=pat;function gat(e,r){if(e.isRect)return e.isTransposed?[Wl.DIRECTION.RIGHT,Wl.DIRECTION.BOTTOM].includes(r)?1:-1:[Wl.DIRECTION.BOTTOM,Wl.DIRECTION.RIGHT].includes(r)?-1:1;if(e.isPolar){var t=e.x.start;return t<0?-1:1}return 1}Fe.getAxisFactor=gat;function p3(e){var r=e.start,t=e.end;return r.x===t.x}Fe.isVertical=p3;function yat(e,r){var t=e.start,i=e.end,n=p3(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}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;_<b;_+=1){var w=p[_];m.push(["L",w.x,w.y])}x&&m.push(["Z"])}return m}function a(p,x){for(var m=[p[0]],_=1,b=p.length;_<b;_=_+2){var w=x.convert({x:p[_],y:p[_+1]});m.push(w.x,w.y)}return m}function o(p,x){var m=x.isTransposed,_=p[1],b=p[6],w=p[7],S=x.convert({x:b,y:w}),M=m?0:1;return["A",_,_,0,0,M,S.x,S.y]}function l(p,x,m){var _=m.isTransposed,b=m.startAngle,w=m.endAngle,S=p[0].toLowerCase()==="a"?{x:p[6],y:p[7]}:{x:p[1],y:p[2]},M={x:x[1],y:x[2]},O=[],F=_?"y":"x",L=Math.abs(M[F]-S[F])*(w-b),D=M[F]>=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<k;H++){var V=p[H];O=r.vec2.min([0,0],O,V),F=r.vec2.max([0,0],F,V)}}for(var H=0,U=p.length;H<U;H++){var V=p[H];if(H===0&&!m)R=V;else if(H===U-1&&!m)D=V,b.push(R),b.push(D);else{S=p[m?H?H-1:U-1:H-1],M=p[m?(H+1)%U:H+1];var B=[0,0];B=r.vec2.sub(B,M,S),B=r.vec2.scale(B,B,x);var G=r.vec2.distance(V,S),N=r.vec2.distance(V,M),W=G+N;W!==0&&(G/=W,N/=W);var q=r.vec2.scale([0,0],B,-G),tt=r.vec2.scale([0,0],B,N);D=r.vec2.add([0,0],V,q),L=r.vec2.add([0,0],V,tt),L=r.vec2.min([0,0],L,r.vec2.max([0,0],M,V)),L=r.vec2.max([0,0],L,r.vec2.min([0,0],M,V)),q=r.vec2.sub([0,0],L,V),q=r.vec2.scale([0,0],q,-G/N),D=r.vec2.add([0,0],V,q),D=r.vec2.min([0,0],D,r.vec2.max([0,0],S,V)),D=r.vec2.max([0,0],D,r.vec2.min([0,0],S,V)),tt=r.vec2.sub([0,0],V,D),tt=r.vec2.scale([0,0],tt,N/G),L=r.vec2.add([0,0],V,tt),w&&(D=r.vec2.max([0,0],D,O),D=r.vec2.min([0,0],D,F),L=r.vec2.max([0,0],L,O),L=r.vec2.min([0,0],L,F)),b.push(R),b.push(D),R=L}}return m&&b.push(b.shift()),b};e.smoothBezier=u;function c(p,x,m){for(var _=!!x,b=[],w=0,S=p.length;w<S;w+=2)b.push([p[w],p[w+1]]);for(var M=(0,e.smoothBezier)(b,.4,_,m),O=b.length,F=[],L,D,R,w=0;w<O-1;w++)L=M[w*2],D=M[w*2+1],R=b[w+1],F.push(["C",L[0],L[1],D[0],D[1],R[0],R[1]]);return _&&(L=M[O],D=M[O+1],R=b[0],F.push(["C",L[0],L[1],D[0],D[1],R[0],R[1]])),F}e.catmullRom2bezier=c;function f(p,x){return n(p,x)}e.getLinePath=f;function h(p,x,m){var _=[],b=p[0],w=null;if(p.length<=2)return f(p,x);for(var S=0,M=p.length;S<M;S++){var O=p[S];(!w||!(w.x===O.x&&w.y===O.y))&&(_.push(O.x),_.push(O.y),w=O)}var F=m||[[0,0],[1,1]],L=c(_,x,F);return L.unshift(["M",b.x,b.y]),L}e.getSplinePath=h;function v(p,x){var m=[];return(0,t.each)(x,function(_){var b=_[0];switch(b.toLowerCase()){case"m":case"l":case"c":m.push(a(_,p));break;case"a":m.push(o(_,p));break;case"z":default:m.push(_);break}}),m}e.convertNormalPath=v;function d(p,x){var m=[],_,b,w,S;return(0,t.each)(x,function(M,O){var F=M[0];switch(F.toLowerCase()){case"m":case"c":case"q":m.push(a(M,p));break;case"l":_=x[O-1],b=M,w=p.isTransposed,S=w?_[_.length-2]===b[1]:_[_.length-1]===b[2],S?m=m.concat(l(_,b,p)):m.push(a(M,p));break;case"a":m.push(o(M,p));break;case"z":default:m.push(M);break}}),s(m),m}e.convertPolarPath=d})(cc);Object.defineProperty(xt,"__esModule",{value:!0});xt.getScaleByField=xt.isInRecords=xt.getSiblingPoint=xt.getSilbings=xt.isInBox=xt.getSpline=xt.distance=xt.getComponents=xt.getElementsByPath=xt.getIntersectElements=xt.intersectRect=xt.getElementValue=xt.getElementsByState=xt.getElementsByField=xt.getElements=xt.getSiblingMaskElements=xt.getMaskedElements=xt.isMask=xt.isSlider=xt.isList=xt.isElementChange=xt.getDelegationObject=xt.getCurrentElement=void 0;var al=Y,qD=cc,Bat=Kr,Nat=S1;function m3(e,r){var t=e.event,i=t.target,n=i.getCanvasBBox();return n.width>=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.maxX<e.minX||r.minY>e.maxY||r.maxY<e.minY)}xt.intersectRect=_3;function RE(e,r){var t=Np(e),i=[];return(0,al.each)(t,function(n){var a=n.shape,o=a.getCanvasBBox();_3(r,o)&&i.push(n)}),i}xt.getIntersectElements=RE;function ZD(e){var r=[];return(0,al.each)(e,function(t){var i=t[0];if(i!=="A")for(var n=1;n<t.length;n=n+2)r.push([t[n],t[n+1]]);else{var a=t.length;r.push([t[a-2],t[a-1]])}}),r}function b3(e,r){var t=Np(e),i=ZD(r),n=t.filter(function(a){var o=a.shape,l;if(o.get("type")==="path")l=ZD(o.attr("path"));else{var s=o.getCanvasBBox();l=(0,Bat.toPoints)(s)}return(0,Nat.isPolygonsIntersect)(i,l)});return n}xt.getElementsByPath=b3;function Qat(e){return e.getComponents().map(function(r){return r.component})}xt.getComponents=Qat;function Kat(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}xt.distance=Kat;function Jat(e,r){if(e.length<=2)return(0,qD.getLinePath)(e,!1);var t=e[0],i=[];(0,al.each)(e,function(a){i.push(a.x),i.push(a.y)});var n=(0,qD.catmullRom2bezier)(i,r,null);return n.unshift(["M",t.x,t.y]),n}xt.getSpline=Jat;function tot(e,r){return e.x<=r.x&&e.maxX>=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<arguments.length;t++)r[t]=arguments[t];if(r.length===1)return this.cacheMap[r[0]];r.length===2&&(this.cacheMap[r[0]]=r[1])},e.prototype.getAction=function(r){return this.actions.find(function(t){return t.name===r})},e.prototype.addAction=function(r){this.actions.push(r)},e.prototype.removeAction=function(r){var t=this.actions,i=this.actions.indexOf(r);i>=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;a<t;a++){var o=r[a],l=e.translate(o);l<i&&(i=l),l>n&&(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<n.length;i++){var a=n[i],o=a.getScale(a.type);if(o&&o.isLinear){t=o;break}}var l=e.getXScale(),s=e.getYScale();return t||s||l}function Mot(e,r){var t=r.field,i=e[t];if((0,Sr.isArray)(i)){var n=i.map(function(a){return r.getText(a)});return n.join("-")}return r.getText(i)}function Eot(e,r){var t,i=r.getGroupScales();if(i.length&&(t=i[0]),t){var n=t.field;return t.getText(e[n])}var a=T3(r);return(0,A3.getName)(a)}function M3(e,r,t){if(r.length===0)return null;var i=t.type,n=t.getXScale(),a=t.getYScale(),o=n.field,l=a.field,s=null;if(i==="heatmap"||i==="point"){for(var u=t.coordinate,c=u.invert(e),f=n.invert(c.x),h=a.invert(c.y),v=1/0,d=0;d<r.length;d++){var p=r[d],x=p[xi.FIELD_ORIGIN],m=Math.pow(x[o]-f,2)+Math.pow(x[l]-h,2);m<v&&(v=m,s=p)}return s}var _=r[0],b=r[r.length-1],w=Cot(e,t),S=_[xi.FIELD_ORIGIN][o],M=_[xi.FIELD_ORIGIN][l],O=b[xi.FIELD_ORIGIN][o],F=a.isLinear&&(0,Sr.isArray)(M);if((0,Sr.isArray)(S)){for(var d=0;d<r.length;d++){var L=r[d],x=L[xi.FIELD_ORIGIN];if(n.translate(x[o][0])<=w&&n.translate(x[o][1])>=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;d<r.length;d++){var L=r[d],x=L[xi.FIELD_ORIGIN];if(t$(x[o],w,n))if(F)(0,Sr.isArray)(s)||(s=[]),s.push(L);else{s=L;break}else n.translate(x[o])<=w&&(b=L,D=r[d+1])}(0,Sr.isArray)(s)&&(s=e$(s,e,t))}else{if((w>n.translate(O)||w<n.translate(S))&&(w>n.max||w<n.min))return null;for(var R=0,H=r.length-1,k=void 0;R<=H;){k=Math.floor((R+H)/2);var V=r[k][xi.FIELD_ORIGIN][o];if(t$(V,w,n))return r[k];n.translate(V)<=n.translate(w)?(R=k+1,b=r[k],D=r[k+1]):(H===0&&(b=r[0]),H=k-1)}}b&&D&&Math.abs(n.translate(b[xi.FIELD_ORIGIN][o])-w)>Math.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;_<b.length;_++){var w=b[_];if(!(0,Sr.isNil)(n[w])){var S=m[w];u=(0,A3.getName)(S),c=S.getText(n[w]),f(u,c)}}}else{var M=T3(r);c=Mot(n,M),u=Eot(n,r),f(u,c)}return s}mn.getTooltipItems=GE;function r$(e,r,t,i){var n=i.showNil,a=[],o=e.dataArray;if(!(0,Sr.isEmpty)(o)){e.sort(o);for(var l=0,s=o;l<s.length;l++){var u=s[l],c=M3(r,u,e);if(c){var f=e.getElementId(c),h=e.elementsMap[f];if(e.type==="heatmap"||h.visible){var v=GE(c,e,t,n);v.length&&a.push(v)}}}}return a}function i$(e,r,t,i){var n=i.showNil,a=[],o=e.container,l=o.getShape(r.x,r.y);if(l&&l.get("visible")&&l.get("origin")){var s=l.get("origin").mappingData,u=GE(s,e,t,n);u.length&&a.push(u)}return a}function WA(e,r,t){for(var i=[],n=e.geometries,a=t.shared,o=t.title,l=t.reversed,s=0,u=n;s<u.length;s++){var c=u[s];if(c.visible&&c.tooltipOption!==!1){var f=c.type,h=void 0;["point","edge","polygon"].includes(f)?h=i$(c,r,o,t):["area","line","path","heatmap"].includes(f)||a!==!1?h=r$(c,r,o,t):h=i$(c,r,o,t),h.length&&(l&&h.reverse(),i.push(h))}}return i}mn.findItemsFromView=WA;function Oot(e,r,t){for(var i=WA(e,r,t),n=0,a=e.views;n<a.length;n++){var o=a[n];i=i.concat(WA(o,r,t))}return i}mn.findItemsFromViewRecurisive=Oot;var ps={};Object.defineProperty(ps,"__esModule",{value:!0});ps.parsePadding=ps.isAutoPadding=void 0;var lm=j,XA=Y;function Fot(e){return!(0,XA.isNumber)(e)&&!(0,XA.isArray)(e)}ps.isAutoPadding=Fot;function Pot(e){e===void 0&&(e=0);var r=(0,XA.isArray)(e)?e:[e];switch(r.length){case 0:r=[0,0,0,0];break;case 1:r=new Array(4).fill(r[0]);break;case 2:r=(0,lm.__spreadArray)((0,lm.__spreadArray)([],r,!0),r,!0);break;case 3:r=(0,lm.__spreadArray)((0,lm.__spreadArray)([],r,!0),[r[1]],!1);break;default:r=r.slice(0,4);break}return r}ps.parsePadding=Pot;var xa={};Object.defineProperty(xa,"__esModule",{value:!0});xa.getComponentController=xa.getComponentControllerNames=xa.unregisterComponentController=xa.registerComponentController=void 0;var k1={};function Iot(e,r){k1[e]=r}xa.registerComponentController=Iot;function Lot(e){delete k1[e]}xa.unregisterComponentController=Lot;function Dot(){return Object.keys(k1)}xa.getComponentControllerNames=Dot;function $ot(e){return k1[e]}xa.getComponentController=$ot;var zE={};Object.defineProperty(zE,"__esModule",{value:!0});var n$=j,kC=Y,kot=Qn,Rot=function(){function e(r){this.option=this.wrapperOption(r)}return e.prototype.update=function(r){return this.option=this.wrapperOption(r),this},e.prototype.hasAction=function(r){var t=this.option.actions;return(0,kC.some)(t,function(i){return i[0]===r})},e.prototype.create=function(r,t){var i=this.option,n=i.type,a=i.cfg,o=n==="theta",l=(0,n$.__assign)({start:r,end:t},a),s=(0,kot.getCoordinate)(o?"polar":n);return this.coordinate=new s(l),this.coordinate.type=n,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},e.prototype.adjust=function(r,t){return this.coordinate.update({start:r,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},e.prototype.rotate=function(r){return this.option.actions.push(["rotate",r]),this},e.prototype.reflect=function(r){return this.option.actions.push(["reflect",r]),this},e.prototype.scale=function(r,t){return this.option.actions.push(["scale",r,t]),this},e.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},e.prototype.getOption=function(){return this.option},e.prototype.getCoordinate=function(){return this.coordinate},e.prototype.wrapperOption=function(r){return(0,n$.__assign)({type:"rect",actions:[],cfg:{}},r)},e.prototype.execActions=function(r){var t=this,i=this.option.actions;(0,kC.each)(i,function(n){var a,o=n[0],l=n.slice(1),s=(0,kC.isNil)(r)?!0:r.includes(o);s&&(a=t.coordinate)[o].apply(a,l)})},e}();zE.default=Rot;var Vp={};Object.defineProperty(Vp,"__esModule",{value:!0});var Bot=Qn,Not=function(){function e(r,t,i){this.view=r,this.gEvent=t,this.data=i,this.type=t.type}return e.fromData=function(r,t,i){return new e(r,new Bot.Event(t,{}),i)},Object.defineProperty(e.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[Event (type="+this.type+")]"},e.prototype.clone=function(){return new e(this.view,this.gEvent,this.data)},e}();Vp.default=Not;var VE={};Object.defineProperty(VE,"__esModule",{value:!0});function Got(e){var r=e.getController("axis"),t=e.getController("legend"),i=e.getController("annotation"),n=e.getController("slider"),a=e.getController("scrollbar");[r,n,a,t,i].forEach(function(o){o&&o.layout()})}VE.default=Got;var R1={};Object.defineProperty(R1,"__esModule",{value:!0});R1.ScalePool=void 0;var ja=Y,RC=Ur,zot=function(){function e(){this.scales=new Map,this.syncScales=new Map}return e.prototype.createScale=function(r,t,i,n){var a=i,o=this.getScaleMeta(n);if(t.length===0&&o){var l=o.scale,s={type:l.type};l.isCategory&&(s.values=l.values),a=(0,ja.deepMix)(s,o.scaleDef,i)}var u=(0,RC.createScaleByField)(r,t,a);return this.cacheScale(u,i,n),u},e.prototype.sync=function(r,t){var i=this;this.syncScales.forEach(function(n,a){var o=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,s=[];(0,ja.each)(n,function(u){var c=i.getScale(u);l=(0,ja.isNumber)(c.max)?Math.max(l,c.max):l,o=(0,ja.isNumber)(c.min)?Math.min(o,c.min):o,(0,ja.each)(c.values,function(f){s.includes(f)||s.push(f)})}),(0,ja.each)(n,function(u){var c=i.getScale(u);if(c.isContinuous)c.change({min:o,max:l,values:s});else if(c.isCategory){var f=c.range,h=i.getScaleMeta(u);s&&!(0,ja.get)(h,["scaleDef","range"])&&(f=(0,RC.getDefaultCategoryScaleRange)((0,ja.deepMix)({},c,{values:s}),r,t)),c.change({values:s,range:f})}})})},e.prototype.cacheScale=function(r,t,i){var n=this.getScaleMeta(i);n&&n.scale.type===r.type?((0,RC.syncScale)(n.scale,r),n.scaleDef=t):(n={key:i,scale:r,scaleDef:t},this.scales.set(i,n));var a=this.getSyncKey(n);if(n.syncKey=a,this.removeFromSyncScales(i),a){var o=this.syncScales.get(a);o||(o=[],this.syncScales.set(a,o)),o.push(i)}},e.prototype.getScale=function(r){var t=this.getScaleMeta(r);if(!t){var i=(0,ja.last)(r.split("-")),n=this.syncScales.get(i);n&&n.length&&(t=this.getScaleMeta(n[0]))}return t&&t.scale},e.prototype.deleteScale=function(r){var t=this.getScaleMeta(r);if(t){var i=t.syncKey,n=this.syncScales.get(i);if(n&&n.length){var a=n.indexOf(r);a!==-1&&n.splice(a,1)}}this.scales.delete(r)},e.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},e.prototype.removeFromSyncScales=function(r){var t=this;this.syncScales.forEach(function(i,n){var a=i.indexOf(r);if(a!==-1)return i.splice(a,1),i.length===0&&t.syncScales.delete(n),!1})},e.prototype.getSyncKey=function(r){var t=r.scale,i=r.scaleDef,n=t.field,a=(0,ja.get)(i,["sync"]);return a===!0?n:a===!1?void 0:a},e.prototype.getScaleMeta=function(r){return this.scales.get(r)},e}();R1.ScalePool=zot;var jp={};Object.defineProperty(jp,"__esModule",{value:!0});jp.PaddingCal=void 0;var Vot=j,kn=Kt,jot=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.top=r,this.right=t,this.bottom=i,this.left=n}return e.instance=function(r,t,i,n){return r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),new e(r,t,i,n)},e.prototype.max=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return this.top=Math.max(this.top,t),this.right=Math.max(this.right,i),this.bottom=Math.max(this.bottom,n),this.left=Math.max(this.left,a),this},e.prototype.shrink=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return this.top+=t,this.right+=i,this.bottom+=n,this.left+=a,this},e.prototype.inc=function(r,t){var i=r.width,n=r.height;switch(t){case kn.DIRECTION.TOP:case kn.DIRECTION.TOP_LEFT:case kn.DIRECTION.TOP_RIGHT:this.top+=n;break;case kn.DIRECTION.RIGHT:case kn.DIRECTION.RIGHT_TOP:case kn.DIRECTION.RIGHT_BOTTOM:this.right+=i;break;case kn.DIRECTION.BOTTOM:case kn.DIRECTION.BOTTOM_LEFT:case kn.DIRECTION.BOTTOM_RIGHT:this.bottom+=n;break;case kn.DIRECTION.LEFT:case kn.DIRECTION.LEFT_TOP:case kn.DIRECTION.LEFT_BOTTOM:this.left+=i;break}return this},e.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},e.prototype.clone=function(){return new(e.bind.apply(e,(0,Vot.__spreadArray)([void 0],this.getPadding(),!1)))},e}();jp.PaddingCal=jot;var B1={};Object.defineProperty(B1,"__esModule",{value:!0});B1.calculatePadding=void 0;var Hot=j,sm=Y,kc=Kt,BC=Kr,a$=ps,NC=jp;function Yot(e){var r=e.padding;if(!(0,a$.isAutoPadding)(r))return new(NC.PaddingCal.bind.apply(NC.PaddingCal,(0,Hot.__spreadArray)([void 0],(0,a$.parsePadding)(r),!1)));var t=e.viewBBox,i=new NC.PaddingCal,n=[],a=[],o=[];return(0,sm.each)(e.getComponents(),function(l){var s=l.type;s===kc.COMPONENT_TYPE.AXIS?n.push(l):[kc.COMPONENT_TYPE.LEGEND,kc.COMPONENT_TYPE.SLIDER,kc.COMPONENT_TYPE.SCROLLBAR].includes(s)?a.push(l):s!==kc.COMPONENT_TYPE.GRID&&s!==kc.COMPONENT_TYPE.TOOLTIP&&o.push(l)}),(0,sm.each)(n,function(l){var s=l.component,u=s.getLayoutBBox(),c=new BC.BBox(u.x,u.y,u.width,u.height),f=c.exceed(t);i.max(f)}),(0,sm.each)(a,function(l){var s=l.component,u=l.direction,c=s.getLayoutBBox(),f=s.get("padding"),h=new BC.BBox(c.x,c.y,c.width,c.height).expand(f);i.inc(h,u)}),(0,sm.each)(o,function(l){var s=l.component,u=l.direction,c=s.getLayoutBBox(),f=new BC.BBox(c.x,c.y,c.width,c.height);i.inc(f,u)}),i}B1.calculatePadding=Yot;var N1={};Object.defineProperty(N1,"__esModule",{value:!0});N1.defaultSyncViewPadding=void 0;function Wot(e,r,t){var i=t.instance();r.forEach(function(n){n.autoPadding=i.max(n.autoPadding.getPadding())})}N1.defaultSyncViewPadding=Wot;Object.defineProperty(ds,"__esModule",{value:!0});ds.registerGeometry=ds.View=void 0;var Rr=j,Tt=Y,ge=Kt,Xot=(0,Rr.__importDefault)(Rp),Uot=ix,qot=nx,GC=Qu,o$=Kr,l$=be,zC=yr,Zot=mn,Qot=ps,Kot=Ur,s$=NE,u$=xa,Jot=(0,Rr.__importDefault)(zE),gv=(0,Rr.__importDefault)(Vp),tlt=(0,Rr.__importDefault)(VE),elt=R1,rlt=jp,ilt=B1,nlt=N1,jE=function(e){(0,Rr.__extends)(r,e);function r(t){var i=e.call(this,{visible:t.visible})||this;i.views=[],i.geometries=[],i.controllers=[],i.interactions={},i.limitInPlot=!1,i.options={data:[],animate:!0},i.usedControllers=(0,u$.getComponentControllerNames)(),i.scalePool=new elt.ScalePool,i.layoutFunc=tlt.default,i.isPreMouseInPlot=!1,i.isDataChanged=!1,i.isCoordinateChanged=!1,i.createdScaleKeys=new Map,i.onCanvasEvent=function(b){var w=b.name;if(!w.includes(":")){var S=i.createViewEvent(b);i.doPlotEvent(S),i.emit(w,S)}},i.onDelegateEvents=function(b){var w=b.name;if(!!w.includes(":")){var S=i.createViewEvent(b);i.emit(w,S)}};var n=t.id,a=n===void 0?(0,Tt.uniqueId)("view"):n,o=t.parent,l=t.canvas,s=t.backgroundGroup,u=t.middleGroup,c=t.foregroundGroup,f=t.region,h=f===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:f,v=t.padding,d=t.appendPadding,p=t.theme,x=t.options,m=t.limitInPlot,_=t.syncViewPadding;return i.parent=o,i.canvas=l,i.backgroundGroup=s,i.middleGroup=u,i.foregroundGroup=c,i.region=h,i.padding=v,i.appendPadding=d,i.options=(0,Rr.__assign)((0,Rr.__assign)({},i.options),x),i.limitInPlot=m,i.id=a,i.syncViewPadding=_,i.themeObject=(0,Tt.isObject)(p)?(0,Tt.deepMix)({},(0,GC.getTheme)("default"),(0,s$.createTheme)(p)):(0,GC.getTheme)(p),i.init(),i}return r.prototype.setLayout=function(t){this.layoutFunc=t},r.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},r.prototype.render=function(t,i){t===void 0&&(t=!1),this.emit(ge.VIEW_LIFE_CIRCLE.BEFORE_RENDER,gv.default.fromData(this,ge.VIEW_LIFE_CIRCLE.BEFORE_RENDER,i)),this.paint(t),this.emit(ge.VIEW_LIFE_CIRCLE.AFTER_RENDER,gv.default.fromData(this,ge.VIEW_LIFE_CIRCLE.AFTER_RENDER,i)),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this;this.emit(ge.VIEW_LIFE_CIRCLE.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var i=this.geometries,n=0;n<i.length;n++)i[n].clear(),i[n].container.remove(!0),i[n].labelsContainer.remove(!0);this.geometries=[];for(var a=this.controllers,n=0;n<a.length;n++)a[n].name==="annotation"?a[n].clear(!0):a[n].clear();this.createdScaleKeys.forEach(function(l,s){t.getRootView().scalePool.deleteScale(s)}),this.createdScaleKeys.clear();for(var o=this.views,n=0;n<o.length;n++)o[n].clear();this.emit(ge.VIEW_LIFE_CIRCLE.AFTER_CLEAR)},r.prototype.destroy=function(){this.emit(ge.VIEW_LIFE_CIRCLE.BEFORE_DESTROY);var t=this.interactions;(0,Tt.each)(t,function(l){l&&l.destroy()}),this.clear();for(var i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];o.destroy()}this.backgroundGroup.remove(!0),this.middleGroup.remove(!0),this.foregroundGroup.remove(!0),e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.geometries,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}for(var l=this.controllers,n=0,a=l.length;n<a;n++){var s=l[n];s.changeVisible(t)}return this.foregroundGroup.set("visible",t),this.middleGroup.set("visible",t),this.backgroundGroup.set("visible",t),this.getCanvas().draw(),this},r.prototype.data=function(t){return(0,Tt.set)(this.options,"data",t),this.isDataChanged=!0,this},r.prototype.source=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.data() instead."),this.data(t)},r.prototype.filter=function(t,i){return(0,Tt.isFunction)(i)?((0,Tt.set)(this.options,["filters",t],i),this):(!i&&(0,Tt.get)(this.options,["filters",t])&&delete this.options.filters[t],this)},r.prototype.axis=function(t,i){return(0,Tt.isBoolean)(t)?(0,Tt.set)(this.options,["axes"],t):(0,Tt.set)(this.options,["axes",t],i),this},r.prototype.legend=function(t,i){return(0,Tt.isBoolean)(t)?(0,Tt.set)(this.options,["legends"],t):(0,Tt.isString)(t)?((0,Tt.set)(this.options,["legends",t],i),(0,Tt.isPlainObject)(i)&&(i==null?void 0:i.selected)&&(0,Tt.set)(this.options,["filters",t],function(n){var a;return(a=i==null?void 0:i.selected[n])!==null&&a!==void 0?a:!0})):(0,Tt.set)(this.options,["legends"],t),this},r.prototype.scale=function(t,i){var n=this;return(0,Tt.isString)(t)?(0,Tt.set)(this.options,["scales",t],i):(0,Tt.isObject)(t)&&(0,Tt.each)(t,function(a,o){(0,Tt.set)(n.options,["scales",o],a)}),this},r.prototype.tooltip=function(t){return(0,Tt.set)(this.options,"tooltip",t),this},r.prototype.annotation=function(){return this.getController("annotation")},r.prototype.guide=function(){return console.warn("This method will be removed at G2 V4.1. Please use chart.annotation() instead."),this.annotation()},r.prototype.coordinate=function(t,i){return(0,Tt.isString)(t)?(0,Tt.set)(this.options,"coordinate",{type:t,cfg:i}):(0,Tt.set)(this.options,"coordinate",t),this.coordinateController.update(this.options.coordinate),this.coordinateController},r.prototype.coord=function(t,i){return console.warn("This method will be removed at G2 V4.1. Please use chart.coordinate() instead."),this.coordinate(t,i)},r.prototype.facet=function(t,i){this.facetInstance&&this.facetInstance.destroy();var n=(0,Uot.getFacet)(t);if(!n)throw new Error("facet '"+t+"' is not exist!");return this.facetInstance=new n(this,(0,Rr.__assign)((0,Rr.__assign)({},i),{type:t})),this},r.prototype.animate=function(t){return(0,Tt.set)(this.options,"animate",t),this},r.prototype.updateOptions=function(t){return this.clear(),(0,Tt.mix)(this.options,t),this.views.forEach(function(i){return i.destroy()}),this.views=[],this.initOptions(),this.coordinateBBox=this.viewBBox,this},r.prototype.option=function(t,i){if(r.prototype[t])throw new Error(`Can't use built in variable name "`+t+'", please change another one.');return(0,Tt.set)(this.options,t,i),this},r.prototype.theme=function(t){return this.themeObject=(0,Tt.isObject)(t)?(0,Tt.deepMix)({},this.themeObject,(0,s$.createTheme)(t)):(0,GC.getTheme)(t),this},r.prototype.interaction=function(t,i){var n=this.interactions[t];n&&n.destroy();var a=(0,qot.createInteraction)(t,this,i);return a&&(a.init(),this.interactions[t]=a),this},r.prototype.removeInteraction=function(t){var i=this.interactions[t];i&&(i.destroy(),this.interactions[t]=void 0)},r.prototype.changeData=function(t){this.isDataChanged=!0,this.emit(ge.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,gv.default.fromData(this,ge.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null)),this.data(t),this.paint(!0);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.changeData(t)}this.emit(ge.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,gv.default.fromData(this,ge.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},r.prototype.createView=function(t){this.parent&&this.parent.parent&&console.warn("The view nesting recursive feature will be removed at G2 V4.1. Please avoid to use it.");var i={data:this.options.data,scales:(0,Tt.clone)(this.options.scales),axes:(0,Tt.clone)(this.options.axes),coordinate:(0,Tt.clone)(this.coordinateController.getOption()),tooltip:(0,Tt.clone)(this.options.tooltip),legends:(0,Tt.clone)(this.options.legends),animate:this.options.animate,visible:this.visible},n=new r((0,Rr.__assign)((0,Rr.__assign)({parent:this,canvas:this.canvas,backgroundGroup:this.backgroundGroup.addGroup({zIndex:ge.GROUP_Z_INDEX.BG}),middleGroup:this.middleGroup.addGroup({zIndex:ge.GROUP_Z_INDEX.MID}),foregroundGroup:this.foregroundGroup.addGroup({zIndex:ge.GROUP_Z_INDEX.FORE}),theme:this.themeObject,padding:this.padding},t),{options:(0,Rr.__assign)((0,Rr.__assign)({},i),(0,Tt.get)(t,"options",{}))}));return this.views.push(n),n},r.prototype.view=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.createView() instead."),this.createView(t)},r.prototype.removeView=function(t){var i=(0,Tt.remove)(this.views,function(n){return n===t})[0];return i&&i.destroy(),i},r.prototype.getCoordinate=function(){return this.coordinateInstance},r.prototype.getTheme=function(){return this.themeObject},r.prototype.getXScale=function(){var t=this.geometries[0];return t?t.getXScale():null},r.prototype.getYScales=function(){var t={},i=[];return this.geometries.forEach(function(n){var a=n.getYScale(),o=a.field;t[o]||(t[o]=!0,i.push(a))}),i},r.prototype.getScalesByDim=function(t){for(var i=this.geometries,n={},a=0,o=i.length;a<o;a++){var l=i[a],s=t==="x"?l.getXScale():l.getYScale();s&&!n[s.field]&&(n[s.field]=s)}return n},r.prototype.getScale=function(t,i){var n=i||this.getScaleKey(t);return this.getRootView().scalePool.getScale(n)},r.prototype.getScaleByField=function(t,i){return this.getScale(t,i)},r.prototype.getOptions=function(){return this.options},r.prototype.getData=function(){return this.filteredData},r.prototype.getOriginalData=function(){return this.options.data},r.prototype.getPadding=function(){return this.autoPadding.getPadding()},r.prototype.getGeometries=function(){return this.geometries},r.prototype.getElements=function(){return(0,Tt.reduce)(this.geometries,function(t,i){return t.concat(i.getElements())},[])},r.prototype.getElementsBy=function(t){return this.getElements().filter(function(i){return t(i)})},r.prototype.getLayer=function(t){return t===ge.LAYER.BG?this.backgroundGroup:t===ge.LAYER.MID?this.middleGroup:t===ge.LAYER.FORE?this.foregroundGroup:this.foregroundGroup},r.prototype.isPointInPlot=function(t){return(0,l$.isPointInCoordinate)(this.getCoordinate(),t)},r.prototype.getLegendAttributes=function(){return(0,Tt.flatten)(this.geometries.map(function(t){return t.getGroupAttributes()}))},r.prototype.getGroupScales=function(){var t=this.geometries.map(function(i){return i.getGroupScales()});return(0,zC.uniq)((0,Tt.flatten)(t))},r.prototype.getCanvas=function(){return this.getRootView().canvas},r.prototype.getRootView=function(){for(var t=this;;){if(t.parent){t=t.parent;continue}break}return t},r.prototype.getXY=function(t){var i=this.getCoordinate(),n=this.getScalesByDim("x"),a=this.getScalesByDim("y"),o,l;if((0,Tt.each)(t,function(s,u){n[u]&&(o=n[u].scale(s)),a[u]&&(l=a[u].scale(s))}),!(0,Tt.isNil)(o)&&!(0,Tt.isNil)(l))return i.convert({x:o,y:l})},r.prototype.getController=function(t){return(0,Tt.find)(this.controllers,function(i){return i.name===t})},r.prototype.showTooltip=function(t){var i=this.getController("tooltip");return i&&i.showTooltip(t),this},r.prototype.hideTooltip=function(){var t=this.getController("tooltip");return t&&t.hideTooltip(),this},r.prototype.lockTooltip=function(){var t=this.getController("tooltip");return t&&t.lockTooltip(),this},r.prototype.unlockTooltip=function(){var t=this.getController("tooltip");return t&&t.unlockTooltip(),this},r.prototype.isTooltipLocked=function(){var t=this.getController("tooltip");return t&&t.isTooltipLocked()},r.prototype.getTooltipItems=function(t){var i=this.getController("tooltip");return i?i.getTooltipItems(t):[]},r.prototype.getSnapRecords=function(t){for(var i=this.geometries,n=[],a=0,o=i.length;a<o;a++){var l=i[a],s=l.dataArray;l.sort(s);for(var u=void 0,c=0,f=s.length;c<f;c++){var h=s[c];u=(0,Zot.findDataByPoint)(t,h,l),u&&n.push(u)}}for(var v=this.views,a=0,o=v.length;a<o;a++){var d=v[a],p=d.getSnapRecords(t);n=n.concat(p)}return n},r.prototype.getComponents=function(){for(var t=[],i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];t=t.concat(o.getComponents())}return t},r.prototype.filterData=function(t){var i=this.options.filters;return(0,Tt.size)(i)===0?t:(0,Tt.filter)(t,function(n,a){var o=Object.keys(i);return o.every(function(l){var s=i[l];return s(n[l],n,a)})})},r.prototype.filterFieldData=function(t,i){var n=this.options.filters,a=(0,Tt.get)(n,t);return(0,Tt.isUndefined)(a)?i:i.filter(function(o,l){return a(o[t],o,l)})},r.prototype.adjustCoordinate=function(){var t=this.getCoordinate(),i=t.start,n=t.end,a=this.coordinateBBox.bl,o=this.coordinateBBox.tr;if((0,Tt.isEqual)(i,a)&&(0,Tt.isEqual)(n,o)){this.isCoordinateChanged=!1;return}this.isCoordinateChanged=!0,this.coordinateInstance=this.coordinateController.adjust(a,o)},r.prototype.paint=function(t){this.renderDataRecursive(t),this.syncScale(),this.emit(ge.VIEW_LIFE_CIRCLE.BEFORE_PAINT),this.renderPaddingRecursive(t),this.renderLayoutRecursive(t),this.renderBackgroundStyleShape(),this.renderPaintRecursive(t),this.emit(ge.VIEW_LIFE_CIRCLE.AFTER_PAINT),this.isDataChanged=!1},r.prototype.renderBackgroundStyleShape=function(){if(!this.parent){var t=(0,Tt.get)(this.themeObject,"background");if(t){this.backgroundStyleRectShape||(this.backgroundStyleRectShape=this.backgroundGroup.addShape("rect",{attrs:{},zIndex:-1,capture:!1}),this.backgroundStyleRectShape.toBack());var i=this.viewBBox,n=i.x,a=i.y,o=i.width,l=i.height;this.backgroundStyleRectShape.attr({fill:t,x:n,y:a,width:o,height:l})}else this.backgroundStyleRectShape&&(this.backgroundStyleRectShape.remove(!0),this.backgroundStyleRectShape=void 0)}},r.prototype.renderPaddingRecursive=function(t){this.calculateViewBBox(),this.adjustCoordinate(),this.initComponents(t),this.autoPadding=(0,ilt.calculatePadding)(this).shrink((0,Qot.parsePadding)(this.appendPadding)),this.coordinateBBox=this.viewBBox.shrink(this.autoPadding.getPadding()),this.adjustCoordinate();for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.renderPaddingRecursive(t)}},r.prototype.renderLayoutRecursive=function(t){var i=this.syncViewPadding===!0?nlt.defaultSyncViewPadding:(0,Tt.isFunction)(this.syncViewPadding)?this.syncViewPadding:void 0;i&&(i(this,this.views,rlt.PaddingCal),this.views.forEach(function(s){s.coordinateBBox=s.viewBBox.shrink(s.autoPadding.getPadding()),s.adjustCoordinate()})),this.doLayout();for(var n=this.views,a=0,o=n.length;a<o;a++){var l=n[a];l.renderLayoutRecursive(t)}},r.prototype.renderPaintRecursive=function(t){var i=this.middleGroup;if(this.limitInPlot){var n=(0,l$.getCoordinateClipCfg)(this.coordinateInstance),a=n.type,o=n.attrs;i.setClip({type:a,attrs:o})}else i.setClip(void 0);this.paintGeometries(t),this.renderComponents(t);for(var l=this.views,s=0,u=l.length;s<u;s++){var c=l[s];c.renderPaintRecursive(t)}},r.prototype.createScale=function(t,i,n,a){var o=(0,Tt.get)(this.options.scales,[t]),l=(0,Rr.__assign)((0,Rr.__assign)({},o),n);return this.parent?this.parent.createScale(t,i,l,a):this.scalePool.createScale(t,i,l,a)},r.prototype.renderDataRecursive=function(t){this.doFilterData(),this.createCoordinate(),this.initGeometries(t),this.renderFacet(t);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.renderDataRecursive(t)}},r.prototype.calculateViewBBox=function(){var t,i,n,a;if(this.parent){var o=this.parent.coordinateBBox;t=o.x,i=o.y,n=o.width,a=o.height}else t=0,i=0,n=this.canvas.get("width"),a=this.canvas.get("height");var l=this.region,s=l.start,u=l.end,c=new o$.BBox(t+n*s.x,i+a*s.y,n*(u.x-s.x),a*(u.y-s.y));(!this.viewBBox||!this.viewBBox.isEqual(c))&&(this.viewBBox=new o$.BBox(t+n*s.x,i+a*s.y,n*(u.x-s.x),a*(u.y-s.y))),this.coordinateBBox=this.viewBBox},r.prototype.initEvents=function(){this.foregroundGroup.on("*",this.onDelegateEvents),this.middleGroup.on("*",this.onDelegateEvents),this.backgroundGroup.on("*",this.onDelegateEvents),this.canvas.on("*",this.onCanvasEvent)},r.prototype.initComponentController=function(){for(var t=this.usedControllers,i=0,n=t.length;i<n;i++){var a=t[i],o=(0,u$.getComponentController)(a);o&&this.controllers.push(new o(this))}},r.prototype.createViewEvent=function(t){var i=t.shape,n=t.name,a=i?i.get("origin"):null,o=new gv.default(this,t,a);return o.type=n,o},r.prototype.doPlotEvent=function(t){var i=t.type,n=t.x,a=t.y,o={x:n,y:a},l=["mousedown","mouseup","mousemove","mouseleave","mousewheel","touchstart","touchmove","touchend","touchcancel","click","dblclick","contextmenu"];if(l.includes(i)){var s=this.isPointInPlot(o),u=t.clone();if(s){var c="plot:"+i;u.type=c,this.emit(c,u),(i==="mouseleave"||i==="touchend")&&(this.isPreMouseInPlot=!1)}i==="mousemove"||i==="touchmove"?(this.isPreMouseInPlot&&!s?(i==="mousemove"&&(u.type=ge.PLOT_EVENTS.MOUSE_LEAVE,this.emit(ge.PLOT_EVENTS.MOUSE_LEAVE,u)),u.type=ge.PLOT_EVENTS.LEAVE,this.emit(ge.PLOT_EVENTS.LEAVE,u)):!this.isPreMouseInPlot&&s&&(i==="mousemove"&&(u.type=ge.PLOT_EVENTS.MOUSE_ENTER,this.emit(ge.PLOT_EVENTS.MOUSE_ENTER,u)),u.type=ge.PLOT_EVENTS.ENTER,this.emit(ge.PLOT_EVENTS.ENTER,u)),this.isPreMouseInPlot=s):(i==="mouseleave"||i==="touchend")&&this.isPreMouseInPlot&&(i==="mouseleave"&&(u.type=ge.PLOT_EVENTS.MOUSE_LEAVE,this.emit(ge.PLOT_EVENTS.MOUSE_LEAVE,u)),u.type=ge.PLOT_EVENTS.LEAVE,this.emit(ge.PLOT_EVENTS.LEAVE,u),this.isPreMouseInPlot=!1)}},r.prototype.doFilterData=function(){var t=this.options.data;this.filteredData=this.filterData(t)},r.prototype.initGeometries=function(t){this.createOrUpdateScales();for(var i=this.getCoordinate(),n=(0,Tt.get)(this.options,"scales",{}),a=this.geometries,o=0,l=a.length;o<l;o++){var s=a[o];s.scales=this.getGeometryScales();var u={coordinate:i,scaleDefs:n,data:this.filteredData,theme:this.themeObject,isDataChanged:this.isDataChanged,isCoordinateChanged:this.isCoordinateChanged};t?s.update(u):s.init(u)}this.adjustScales()},r.prototype.createOrUpdateScales=function(){for(var t=this.getScaleFields(),i=this.getGroupedFields(),n=this.getOptions(),a=n.data,o=n.scales,l=o===void 0?{}:o,s=this.filteredData,u=0,c=t.length;u<c;u++){var f=t[u],h=l[f],v=this.getScaleKey(f);this.createScale(f,i.includes(f)?a:s,h,v),this.createdScaleKeys.set(v,!0)}},r.prototype.syncScale=function(){this.getRootView().scalePool.sync(this.getCoordinate(),this.theme)},r.prototype.getGeometryScales=function(){for(var t=this.getScaleFields(),i={},n=0;n<t.length;n++){var a=t[n];i[a]=this.getScaleByField(a)}return i},r.prototype.getScaleFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],l=o.getScaleFields();(0,zC.uniq)(l,t,i)}return t},r.prototype.getGroupedFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],l=o.getGroupFields();(0,zC.uniq)(l,t,i)}return t},r.prototype.adjustScales=function(){this.adjustCategoryScaleRange()},r.prototype.adjustCategoryScaleRange=function(){var t=this,i=(0,Rr.__spreadArray)([this.getXScale()],this.getYScales(),!0).filter(function(o){return!!o}),n=this.getCoordinate(),a=this.options.scales;(0,Tt.each)(i,function(o){var l=o.field,s=o.values,u=o.isCategory,c=o.isIdentity;(u||c)&&s&&!(0,Tt.get)(a,[l,"range"])&&(o.range=(0,Kot.getDefaultCategoryScaleRange)(o,n,t.theme))})},r.prototype.initComponents=function(t){for(var i=this.controllers,n=0;n<i.length;n++){var a=i[n];t?a.update():(a.clear(),a.render())}},r.prototype.doLayout=function(){this.layoutFunc(this)},r.prototype.createCoordinate=function(){var t=this.coordinateBBox.bl,i=this.coordinateBBox.tr;this.coordinateInstance=this.coordinateController.create(t,i)},r.prototype.paintGeometries=function(t){for(var i=this.options.animate,n=this.getCoordinate(),a={x:this.viewBBox.x,y:this.viewBBox.y,minX:this.viewBBox.minX,minY:this.viewBBox.minY,maxX:this.viewBBox.maxX,maxY:this.viewBBox.maxY,width:this.viewBBox.width,height:this.viewBBox.height},o=this.geometries,l=0;l<o.length;l++){var s=o[l];s.coordinate=n,s.canvasRegion=a,i||s.animate(!1),s.paint(t)}},r.prototype.renderComponents=function(t){for(var i=0;i<this.getComponents().length;i++){var n=this.getComponents()[i];n.component.render()}},r.prototype.renderFacet=function(t){this.facetInstance&&(t?this.facetInstance.update():(this.facetInstance.clear(),this.facetInstance.init(),this.facetInstance.render()))},r.prototype.initOptions=function(){var t=this,i=this.options,n=i.geometries,a=n===void 0?[]:n,o=i.interactions,l=o===void 0?[]:o,s=i.views,u=s===void 0?[]:s,c=i.annotations,f=c===void 0?[]:c,h=i.coordinate,v=i.events,d=i.facets;this.coordinateController?h&&this.coordinateController.update(h):this.coordinateController=new Jot.default(h);for(var p=0;p<a.length;p++){var x=a[p];this.createGeometry(x)}for(var m=0;m<l.length;m++){var _=l[m],b=_.type,w=_.cfg;this.interaction(b,w)}for(var S=0;S<u.length;S++){var M=u[S];this.createView(M)}for(var O=this.getController("annotation"),F=0;F<f.length;F++){var L=f[F];O.annotation(L)}v&&(0,Tt.each)(v,function(D,R){t.on(R,D)}),d&&(0,Tt.each)(d,function(D){var R=D.type,H=(0,Rr.__rest)(D,["type"]);t.facet(R,H)})},r.prototype.createGeometry=function(t){var i=t.type,n=t.cfg,a=n===void 0?{}:n;if(this[i]){var o=this[i](a);(0,Tt.each)(t,function(l,s){(0,Tt.isFunction)(o[s])&&o[s](l)})}},r.prototype.getScaleKey=function(t){return this.id+"-"+t},r}(Xot.default);ds.View=jE;function alt(e,r){jE.prototype[e.toLowerCase()]=function(t){t===void 0&&(t={});var i=(0,Rr.__assign)({container:this.middleGroup.addGroup(),labelsContainer:this.foregroundGroup.addGroup()},t),n=new r(i);return this.geometries.push(n),n}}ds.registerGeometry=alt;ds.default=jE;Object.defineProperty(DE,"__esModule",{value:!0});var UA=j,VC=Y,yv=Kt,olt=Zu,mv=h1,llt=(0,UA.__importDefault)(ds),slt=function(e){(0,UA.__extends)(r,e);function r(t){var i=this,n=t.container,a=t.width,o=t.height,l=t.autoFit,s=l===void 0?!1:l,u=t.padding,c=t.appendPadding,f=t.renderer,h=f===void 0?"canvas":f,v=t.pixelRatio,d=t.localRefresh,p=d===void 0?!0:d,x=t.visible,m=x===void 0?!0:x,_=t.supportCSSTransform,b=_===void 0?!1:_,w=t.defaultInteractions,S=w===void 0?["tooltip","legend-filter","legend-active","continuous-filter","ellipsis-text"]:w,M=t.options,O=t.limitInPlot,F=t.theme,L=t.syncViewPadding,D=(0,VC.isString)(n)?document.getElementById(n):n,R=(0,mv.createDom)('<div style="position:relative;"></div>');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;i<e.length;i++)t(i);return r}var dlt=function(e){(0,Ua.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isLocked=!1,t}return Object.defineProperty(r.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.isVisible=function(){var t=this.view.getOptions().tooltip;return t!==!1},r.prototype.render=function(){},r.prototype.showTooltip=function(t){if(this.point=t,!!this.isVisible()){var i=this.view,n=this.getTooltipItems(t);if(!n.length){this.hideTooltip();return}var a=this.getTitle(n),o={x:n[0].x,y:n[0].y};i.emit("tooltip:show",jC.default.fromData(i,"tooltip:show",(0,Ua.__assign)({items:n,title:a},t)));var l=this.getTooltipCfg(),s=l.follow,u=l.showMarkers,c=l.showCrosshairs,f=l.showContent,h=l.marker,v=this.items,d=this.title;if(!(0,Ve.isEqual)(d,a)||!(0,Ve.isEqual)(v,n)?(i.emit("tooltip:change",jC.default.fromData(i,"tooltip:change",(0,Ua.__assign)({items:n,title:a},t))),((0,Ve.isFunction)(f)?f(n):f)&&(this.tooltip||this.renderTooltip(),this.tooltip.update((0,Ve.mix)({},l,{items:this.getItemsAfterProcess(n),title:a},s?t:{})),this.tooltip.show()),u&&this.renderTooltipMarkers(n,h)):(this.tooltip&&s&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()),this.items=n,this.title=a,c){var p=(0,Ve.get)(l,["crosshairs","follow"],!1);this.renderCrosshairs(p?t:o,l)}}},r.prototype.hideTooltip=function(){var t=this.getTooltipCfg().follow;if(!t){this.point=null;return}var i=this.tooltipMarkersGroup;i&&i.hide();var n=this.xCrosshair,a=this.yCrosshair;n&&n.hide(),a&&a.hide();var o=this.tooltip;o&&o.hide(),this.view.emit("tooltip:hide",jC.default.fromData(this.view,"tooltip:hide",{})),this.point=null},r.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},r.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},r.prototype.isTooltipLocked=function(){return this.isLocked},r.prototype.clear=function(){var t=this,i=t.tooltip,n=t.xCrosshair,a=t.yCrosshair,o=t.tooltipMarkersGroup;i&&(i.hide(),i.clear()),n&&n.clear(),a&&a.clear(),o&&o.clear(),i!=null&&i.get("customContent")&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},r.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},r.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},r.prototype.changeVisible=function(t){if(this.visible!==t){var i=this,n=i.tooltip,a=i.tooltipMarkersGroup,o=i.xCrosshair,l=i.yCrosshair;t?(n&&n.show(),a&&a.show(),o&&o.show(),l&&l.show()):(n&&n.hide(),a&&a.hide(),o&&o.hide(),l&&l.hide()),this.visible=t}},r.prototype.getTooltipItems=function(t){var i=this.findItemsFromView(this.view,t);if(i.length){i=(0,Ve.flatten)(i);for(var n=0,a=i;n<a.length;n++)for(var o=a[n],l=0,s=o;l<s.length;l++){var u=s[l],c=u.mappingData,f=c.x,h=c.y;u.x=(0,Ve.isArray)(f)?f[f.length-1]:f,u.y=(0,Ve.isArray)(h)?h[h.length-1]:h}var v=this.getTooltipCfg().shared;if(v===!1&&i.length>1){for(var d=i[0],p=Math.abs(t.y-d[0].y),x=0,m=i;x<m.length;x++){var _=m[x],b=Math.abs(t.y-_[0].y);b<=p&&(d=_,p=b)}i=[d]}return vlt((0,Ve.flatten)(i))}return[]},r.prototype.layout=function(){},r.prototype.update=function(){if(this.point&&this.showTooltip(this.point),this.tooltip){var t=this.view.getCanvas();this.tooltip.set("region",{start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}})}},r.prototype.isCursorEntered=function(t){if(this.tooltip){var i=this.tooltip.getContainer(),n=this.tooltip.get("capture");if(i&&n){var a=i.getBoundingClientRect(),o=a.x,l=a.y,s=a.width,u=a.height;return new flt.BBox(o,l,s,u).isPointIn(t)}}return!1},r.prototype.getTooltipCfg=function(){var t=this.view,i=t.getOptions().tooltip,n=this.processCustomContent(i),a=t.getTheme(),o=(0,Ve.get)(a,["components","tooltip"],{}),l=(0,Ve.get)(n,"enterable",o.enterable);return(0,Ve.deepMix)({},o,n,{capture:!!(l||this.isLocked)})},r.prototype.processCustomContent=function(t){if((0,Ve.isBoolean)(t)||!(0,Ve.get)(t,"customContent"))return t;var i=t.customContent,n=function(a,o){var l=i(a,o)||"";return(0,Ve.isString)(l)?'<div class="g2-tooltip">'+l+"</div>":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<o.length;a++){var l=o[a],s=l.x,u=l.y,c=(0,Ua.__assign)((0,Ua.__assign)({fill:l.color,symbol:"circle",shadowColor:l.color},i),{x:s,y:u});n.addShape("marker",{attrs:c})}},r.prototype.renderCrosshairs=function(t,i){var n=(0,Ve.get)(i,["crosshairs","type"],"x");n==="x"?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,i)):n==="y"?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,i)):n==="xy"&&(this.renderXCrosshairs(t,i),this.renderYCrosshairs(t,i))},r.prototype.renderXCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate();if(!!(0,cm.isPointInCoordinate)(n,t)){var a,o;if(n.isRect)n.isTransposed?(a={x:n.start.x,y:t.y},o={x:n.end.x,y:t.y}):(a={x:t.x,y:n.end.y},o={x:t.x,y:n.start.y});else{var l=(0,cm.getAngleByPoint)(n,t),s=n.getCenter(),u=n.getRadius();o=(0,ult.polarToCartesian)(s.x,s.y,u,l),a=s}var c=(0,Ve.deepMix)({start:a,end:o,container:this.getTooltipCrosshairsGroup()},(0,Ve.get)(i,"crosshairs",{}),this.getCrosshairsText("x",t,i));delete c.type;var f=this.xCrosshair;f?f.update(c):(f=new um.Crosshair.Line(c),f.init()),f.render(),f.show(),this.xCrosshair=f}},r.prototype.renderYCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate();if(!!(0,cm.isPointInCoordinate)(n,t)){var a,o;if(n.isRect){var l=void 0,s=void 0;n.isTransposed?(l={x:t.x,y:n.end.y},s={x:t.x,y:n.start.y}):(l={x:n.start.x,y:t.y},s={x:n.end.x,y:t.y}),a={start:l,end:s},o="Line"}else a={center:n.getCenter(),radius:(0,cm.getDistanceToCenter)(n,t),startAngle:n.startAngle,endAngle:n.endAngle},o="Circle";a=(0,Ve.deepMix)({container:this.getTooltipCrosshairsGroup()},a,(0,Ve.get)(i,"crosshairs",{}),this.getCrosshairsText("y",t,i)),delete a.type;var u=this.yCrosshair;u?n.isRect&&u.get("type")==="circle"||!n.isRect&&u.get("type")==="line"?(u=new um.Crosshair[o](a),u.init()):u.update(a):(u=new um.Crosshair[o](a),u.init()),u.render(),u.show(),this.yCrosshair=u}},r.prototype.getCrosshairsText=function(t,i,n){var a=(0,Ve.get)(n,["crosshairs","text"]),o=(0,Ve.get)(n,["crosshairs","follow"]),l=this.items;if(a){var s=this.getViewWithGeometry(this.view),u=l[0],c=s.getXScale(),f=s.getYScales()[0],h=void 0,v=void 0;if(o){var d=this.view.getCoordinate().invert(i);h=c.invert(d.x),v=f.invert(d.y)}else h=u.data[c.field],v=u.data[f.field];var p=t==="x"?h:v;return(0,Ve.isFunction)(a)?a=a(t,p,l,i):a.content=p,{text:a}}},r.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},r.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):(t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"}),t.toFront(),this.tooltipMarkersGroup=t),t},r.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},r.prototype.findItemsFromView=function(t,i){if(t.getOptions().tooltip===!1)return[];for(var n=this.getTooltipCfg(),a=(0,clt.findItemsFromView)(t,i,n),o=0,l=t.views;o<l.length;o++){var s=l[o];a=a.concat(this.findItemsFromView(s,i))}return a},r.prototype.getViewWithGeometry=function(t){var i=this;return t.geometries.length?t:(0,Ve.find)(t.views,function(n){return i.getViewWithGeometry(n)})},r.prototype.getItemsAfterProcess=function(t){var i=this.getTooltipCfg().customItems,n=i||function(a){return a};return n(t)},r}(hlt.Controller),plt=G1.default=dlt,Pa={},Hp={},Oh={};Object.defineProperty(Oh,"__esModule",{value:!0});Oh.BACKGROUND_SHAPE=void 0;Oh.BACKGROUND_SHAPE="element-background";Object.defineProperty(Hp,"__esModule",{value:!0});var Jc=j,ln=Y,glt=b1,HC=ul,ylt=(0,Jc.__importDefault)(Rp),mlt=Se,YC=Kt,xlt=Oh,_lt=function(e){(0,Jc.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.states=[];var n=t.shapeFactory,a=t.container,o=t.offscreenGroup,l=t.elementIndex,s=t.visible,u=s===void 0?!0:s;return i.shapeFactory=n,i.container=a,i.offscreenGroup=o,i.visible=u,i.elementIndex=l,i}return r.prototype.draw=function(t,i){i===void 0&&(i=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,i),this.visible===!1&&this.changeVisible(!1)},r.prototype.update=function(t){var i=this,n=i.shapeFactory,a=i.shape;if(!!a){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(a,t);var o=this.getOffscreenGroup(),l=n.drawShape(this.shapeType,t,o);l.cfg.data=this.data,l.cfg.origin=t,l.cfg.element=this,this.syncShapeStyle(a,l,this.getStates(),this.getAnimateCfg("update"))}},r.prototype.destroy=function(){var t=this,i=t.shapeFactory,n=t.shape;if(n){var a=this.getAnimateCfg("leave");a?(0,HC.doAnimate)(n,a,{coordinate:i.coordinate,toAttrs:(0,Jc.__assign)({},n.attr())}):n.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=void 0,this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach(function(i){i.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(i){i.hide()}))},r.prototype.setState=function(t,i){var n=this,a=n.states,o=n.shapeFactory,l=n.model,s=n.shape,u=n.shapeType,c=a.indexOf(t);if(i){if(c>-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<f.length;v++)this.syncShapeStyle(f[v],h[v],n,a,o+v);else{if(!(0,ln.isEmpty)(n)&&!(0,ln.isEqual)(n,["reset"])){var d=t.get("name");(0,ln.isArray)(d)&&(d=d[1]),(0,ln.each)(n,function(x){if(i.get("name")!==xlt.BACKGROUND_SHAPE){var m=l.getStateStyle(x,d||o);i.attr(m)}})}var p=(0,mlt.getReplaceAttrs)(t,i);this.animate?a?((s=this.geometry)===null||s===void 0||s.emit(YC.GEOMETRY_LIFE_CIRCLE.BEFORE_DRAW_ANIMATE),(0,HC.doAnimate)(t,a,{coordinate:this.shapeFactory.coordinate,toAttrs:p,shapeModel:this.model})):(0,ln.isEmpty)(n)?t.attr(p):(t.stopAnimate(),t.animate(p,{duration:300})):t.attr(p)}}},r.prototype.getShapeType=function(t){var i=(0,ln.get)(t,"shape");return(0,ln.isArray)(i)?i[0]:i},r}(ylt.default);Hp.default=_lt;var jn={};Object.defineProperty(jn,"__esModule",{value:!0});jn.registerGeometryLabelLayout=jn.getGeometryLabelLayout=jn.registerGeometryLabel=jn.getGeometryLabel=void 0;var E3={},O3={};function blt(e){return E3[e.toLowerCase()]}jn.getGeometryLabel=blt;function wlt(e,r){E3[e.toLowerCase()]=r}jn.registerGeometryLabel=wlt;function Clt(e){return O3[e.toLowerCase()]}jn.getGeometryLabelLayout=Clt;function Slt(e,r){O3[e.toLowerCase()]=r}jn.registerGeometryLabelLayout=Slt;var re={};Object.defineProperty(re,"__esModule",{value:!0});re.getShapeFactory=re.registerShape=re.registerShapeFactory=void 0;var yd=j,Alt=S1,Tf=Y,c$=cc,Tlt={coordinate:null,defaultShapeType:null,theme:null,getShapePoints:function(e,r){var t=this.getShape(e);return t.getPoints?t.getPoints(r):this.getDefaultPoints(r)},getShape:function(e){var r=this[e]||this[this.defaultShapeType];return r.coordinate=this.coordinate,r},getDefaultPoints:function(){return[]},getDefaultStyle:function(e){return(0,Tf.get)(e,[this.defaultShapeType,"default","style"],{})},getMarker:function(e,r){var t=this.getShape(e);if(!t.getMarker){var i=this.defaultShapeType;t=this.getShape(i)}var n=this.theme,a=(0,Tf.get)(n,[e,"default"],{}),o=t.getMarker(r);return(0,Tf.deepMix)({},a,o)},drawShape:function(e,r,t){var i=this.getShape(e);return i.draw(r,t)}},Mlt={coordinate:null,parsePath:function(e){var r=this.coordinate,t=(0,Alt.parsePathString)(e);return r.isPolar?t=(0,c$.convertPolarPath)(r,t):t=(0,c$.convertNormalPath)(r,t),t},parsePoint:function(e){var r=this.coordinate;return r.convert(e)},parsePoints:function(e){var r=this.coordinate;return e.map(function(t){return r.convert(t)})},draw:function(e,r){}},HE={};function Elt(e,r){var t=(0,Tf.upperFirst)(e),i=(0,yd.__assign)((0,yd.__assign)((0,yd.__assign)({},Tlt),r),{geometryType:e});return HE[t]=i,i}re.registerShapeFactory=Elt;function Olt(e,r,t){var i=(0,Tf.upperFirst)(e),n=HE[i],a=(0,yd.__assign)((0,yd.__assign)({},Mlt),t);return n[r]=a,a}re.registerShape=Olt;function Flt(e){var r=(0,Tf.upperFirst)(e);return HE[r]}re.getShapeFactory=Flt;var z1={};Object.defineProperty(z1,"__esModule",{value:!0});z1.group=void 0;var Plt=Y;function Ilt(e,r,t){if(t===void 0&&(t={}),!r)return[e];var i=(0,Plt.groupToMap)(e,r),n=[];if(r.length===1&&t[r[0]])for(var a=t[r[0]],o=0,l=a;o<l.length;o++){var s=l[o],u=i["_"+s];u&&n.push(u)}else for(var c in i)if(i.hasOwnProperty(c)){var f=i[c];n.push(f)}return n}z1.group=Ilt;var Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.isModelChange=void 0;var f$=Y;function Llt(e,r){return(0,f$.some)(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],function(t){return!(0,f$.isEqual)(e[t],r[t])})}Yp.isModelChange=Llt;var V1={};Object.defineProperty(V1,"__esModule",{value:!0});V1.parseFields=void 0;var Dlt=Y;function $lt(e){return(0,Dlt.isArray)(e)?e:e.split("*")}V1.parseFields=$lt;var Wp={};Object.defineProperty(Wp,"__esModule",{value:!0});Wp.diff=void 0;function klt(e,r){for(var t=[],i=[],n=[],a=new Map,o=0;o<r.length;o++){var l=r[o];e[l]?i.push(l):t.push(l),a.set(l,!0)}return Object.keys(e).forEach(function(s){a.has(s)||n.push(s)}),{added:t,updated:i,removed:n}}Wp.diff=klt;Object.defineProperty(Pa,"__esModule",{value:!0});var vf=j,Rlt=GV,Blt=IA,Ft=Y,h$=ul,Nlt=(0,vf.__importDefault)(Rp),Ha=Kt,xv=yr,Glt=(0,vf.__importDefault)(Hp),zlt=jn,v$=re,Vlt=z1,jlt=Yp,_v=V1,Hlt=Wp,Ylt=be;function Wlt(e,r){var t=[];return(0,Ft.each)(r,function(i,n){var a=n.split(" ")[0];a===e&&t.push(i)}),t}var Xlt=function(e){(0,vf.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="base",i.attributes={},i.elements=[],i.elementsMap={},i.animateOption=!0,i.attributeOption={},i.lastElementsMap={},i.generatePoints=!1,i.beforeMappingData=null,i.adjusts={},i.idFields=[],i.hasSorted=!1,i.isCoordinateChanged=!1;var n=t.container,a=t.labelsContainer,o=t.coordinate,l=t.data,s=t.sortable,u=s===void 0?!1:s,c=t.visible,f=c===void 0?!0:c,h=t.theme,v=t.scales,d=v===void 0?{}:v,p=t.scaleDefs,x=p===void 0?{}:p,m=t.intervalPadding,_=t.dodgePadding,b=t.maxColumnWidth,w=t.minColumnWidth,S=t.columnWidthRatio,M=t.roseWidthRatio,O=t.multiplePieWidthRatio,F=t.zIndexReversed;return i.container=n,i.labelsContainer=a,i.coordinate=o,i.data=l,i.sortable=u,i.visible=f,i.userTheme=h,i.scales=d,i.scaleDefs=x,i.intervalPadding=m,i.dodgePadding=_,i.maxColumnWidth=b,i.minColumnWidth=w,i.columnWidthRatio=S,i.roseWidthRatio=M,i.multiplePieWidthRatio=O,i.zIndexReversed=F,i}return r.prototype.position=function(t){var i=t;(0,Ft.isPlainObject)(t)||(i={fields:(0,_v.parseFields)(t)});var n=(0,Ft.get)(i,"fields");return n.length===1&&(n.unshift("1"),(0,Ft.set)(i,"fields",n)),(0,Ft.set)(this.attributeOption,"position",i),this},r.prototype.color=function(t,i){return this.createAttrOption("color",t,i),this},r.prototype.shape=function(t,i){return this.createAttrOption("shape",t,i),this},r.prototype.size=function(t,i){return this.createAttrOption("size",t,i),this},r.prototype.adjust=function(t){var i=t;return((0,Ft.isString)(t)||(0,Ft.isPlainObject)(t))&&(i=[t]),(0,Ft.each)(i,function(n,a){(0,Ft.isObject)(n)||(i[a]={type:n})}),this.adjustOption=i,this},r.prototype.style=function(t,i){if((0,Ft.isString)(t)){var n=(0,_v.parseFields)(t);this.styleOption={fields:n,callback:i}}else{var a=t,n=a.fields,o=a.callback,l=a.cfg;n||o||l?this.styleOption=t:this.styleOption={cfg:t}}return this},r.prototype.tooltip=function(t,i){if((0,Ft.isString)(t)){var n=(0,_v.parseFields)(t);this.tooltipOption={fields:n,callback:i}}else this.tooltipOption=t;return this},r.prototype.animate=function(t){return this.animateOption=t,this},r.prototype.label=function(t,i,n){if((0,Ft.isString)(t)){var a={},o=(0,_v.parseFields)(t);a.fields=o,(0,Ft.isFunction)(i)?a.callback=i:(0,Ft.isPlainObject)(i)&&(a.cfg=i),n&&(a.cfg=n),this.labelOption=a}else this.labelOption=t;return this},r.prototype.state=function(t){return this.stateOption=t,this},r.prototype.customInfo=function(t){return this.customOption=t,this},r.prototype.init=function(t){t===void 0&&(t={}),this.setCfg(t),this.initAttributes(),this.processData(this.data),this.adjustScale()},r.prototype.update=function(t){t===void 0&&(t={});var i=t.data,n=t.isDataChanged,a=t.isCoordinateChanged,o=this,l=o.attributeOption,s=o.lastAttributeOption;(0,Ft.isEqual)(l,s)?i&&(n||!(0,Ft.isEqual)(i,this.data))?(this.setCfg(t),this.initAttributes(),this.processData(i)):this.setCfg(t):this.init(t),this.adjustScale(),this.isCoordinateChanged=a},r.prototype.paint=function(t){t===void 0&&(t=!1),this.animateOption&&(this.animateOption=(0,Ft.deepMix)({},(0,h$.getDefaultAnimateCfg)(this.type,this.coordinate),this.animateOption)),this.defaultSize=void 0,this.elementsMap={},this.elements=[];var i=this.getOffscreenGroup();i.clear();var n=this.beforeMappingData,a=this.beforeMapping(n);this.dataArray=new Array(a.length);for(var o=0;o<a.length;o++){var l=a[o];this.dataArray[o]=this.mapping(l)}if(this.updateElements(this.dataArray,t),this.lastElementsMap=this.elementsMap,this.canDoGroupAnimation(t)){var s=this.container,u=this.type,c=this.coordinate,f=(0,Ft.get)(this.animateOption,"appear"),h=this.getYScale(),v=c.convert({x:0,y:h.scale(this.getYMinValue())});(0,h$.doGroupAppearAnimate)(s,f,u,c,v)}this.labelOption&&this.renderLabels((0,Ft.flatten)(this.dataArray),t),this.lastAttributeOption=(0,vf.__assign)({},this.attributeOption),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this,i=t.container,n=t.geometryLabel,a=t.offscreenGroup;i&&i.clear(),n&&n.clear(),a&&a.clear(),this.scaleDefs=void 0,this.attributes={},this.scales={},this.elementsMap={},this.lastElementsMap={},this.elements=[],this.adjusts={},this.dataArray=null,this.beforeMappingData=null,this.lastAttributeOption=void 0,this.defaultSize=void 0,this.idFields=[],this.groupScales=void 0,this.hasSorted=!1,this.isCoordinateChanged=!1},r.prototype.destroy=function(){this.clear();var t=this.container;t.remove(!0),this.offscreenGroup&&(this.offscreenGroup.remove(!0),this.offscreenGroup=null),this.geometryLabel&&(this.geometryLabel.destroy(),this.geometryLabel=null),this.theme=void 0,this.shapeFactory=void 0,e.prototype.destroy.call(this)},r.prototype.getGroupScales=function(){return this.groupScales},r.prototype.getAttribute=function(t){return this.attributes[t]},r.prototype.getXScale=function(){return this.getAttribute("position").scales[0]},r.prototype.getYScale=function(){return this.getAttribute("position").scales[1]},r.prototype.getGroupAttributes=function(){var t=[];return(0,Ft.each)(this.attributes,function(i){Ha.GROUP_ATTRS.includes(i.type)&&t.push(i)}),t},r.prototype.getDefaultValue=function(t){var i,n=this.getAttribute(t);return n&&(0,Ft.isEmpty)(n.scales)&&(i=n.values[0]),i},r.prototype.getAttributeValues=function(t,i){for(var n=[],a=t.scales,o=0,l=a.length;o<l;o++){var s=a[o],u=s.field;s.isIdentity?n.push(s.values):n.push(i[u])}return t.mapping.apply(t,n)},r.prototype.getAdjust=function(t){return this.adjusts[t]},r.prototype.getCoordinate=function(){return this.coordinate},r.prototype.getData=function(){return this.data},r.prototype.getShapeMarker=function(t,i){var n=this.getShapeFactory();return n.getMarker(t,i)},r.prototype.getElementsBy=function(t){return this.elements.filter(function(i){return t(i)})},r.prototype.getElements=function(){return this.elements},r.prototype.getElementId=function(t){t=(0,Ft.isArray)(t)?t[0]:t;var i=t[Ha.FIELD_ORIGIN];if(this.idFields.length){for(var n=i[this.idFields[0]],a=1;a<this.idFields.length;a++)n+="-"+i[this.idFields[a]];return n}var o=this.type,l=this.getXScale(),s=this.getYScale(),u=l.field||"x",c=s.field||"y",f=i[c],h;l.type==="identity"?h=l.values[0]:h=i[u];var v;o==="interval"||o==="schema"?v=""+h:o==="line"||o==="area"||o==="path"?v=o:v=h+"-"+f;var d=this.groupScales;(0,Ft.isEmpty)(d)&&(d=(0,Ft.get)(this.getAttribute("color"),"scales",[]));for(var a=0,p=d.length;a<p;a++){var x=d[a],m=x.field;v=v+"-"+i[m]}var _=this.getAdjust("dodge");if(_){var b=_.dodgeBy;b&&(v=v+"-"+i[b])}return this.getAdjust("jitter")&&(v=v+"-"+t.x+"-"+t.y),v},r.prototype.getScaleFields=function(){var t=[],i=new Map,n=this,a=n.attributeOption,o=n.labelOption,l=n.tooltipOption;for(var s in a)if(a.hasOwnProperty(s)){var u=a[s];u.fields?(0,xv.uniq)(u.fields,t,i):u.values&&(0,xv.uniq)(u.values,t,i)}return o&&o.fields&&(0,xv.uniq)(o.fields,t,i),(0,Ft.isObject)(l)&&l.fields&&(0,xv.uniq)(l.fields,t,i),t},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.elements,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}t?(this.container&&this.container.show(),this.labelsContainer&&this.labelsContainer.show()):(this.container&&this.container.hide(),this.labelsContainer&&this.labelsContainer.hide())},r.prototype.getFields=function(){var t=new Map,i=[];return Object.values(this.attributeOption).forEach(function(n){var a=(n==null?void 0:n.fields)||[];a.forEach(function(o){t.has(o)||i.push(o),t.set(o,!0)})},[]),i},r.prototype.getGroupFields=function(){for(var t=[],i=new Map,n=0,a=Ha.GROUP_ATTRS.length;n<a;n++){var o=Ha.GROUP_ATTRS[n],l=this.attributeOption[o];l&&l.fields&&(0,xv.uniq)(l.fields,t,i)}return t},r.prototype.getXYFields=function(){var t=this.attributeOption.position.fields,i=t[0],n=t[1];return[i,n]},r.prototype.getXField=function(){return(0,Ft.get)(this.getXYFields(),[0])},r.prototype.getYField=function(){return(0,Ft.get)(this.getXYFields(),[1])},r.prototype.getShapes=function(){return this.elements.map(function(t){return t.shape})},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.sort=function(t){if(!this.hasSorted)for(var i=this.getXScale(),n=i.field,a=0;a<t.length;a++){var o=t[a];o.sort(function(l,s){return i.translate(l[Ha.FIELD_ORIGIN][n])-i.translate(s[Ha.FIELD_ORIGIN][n])})}this.hasSorted=!0},r.prototype.adjustScale=function(){var t=this.getYScale();t&&this.getAdjust("stack")&&this.updateStackRange(t,this.beforeMappingData)},r.prototype.getShapeFactory=function(){var t=this.shapeType;if(!!(0,v$.getShapeFactory)(t))return this.shapeFactory||(this.shapeFactory=(0,Ft.clone)((0,v$.getShapeFactory)(t))),this.shapeFactory.coordinate=this.coordinate,this.shapeFactory.theme=this.theme.geometries[t]||{},this.shapeFactory},r.prototype.createShapePointsCfg=function(t){var i=this.getXScale(),n=this.getYScale(),a=this.normalizeValues(t[i.field],i),o;return n?o=this.normalizeValues(t[n.field],n):o=t.y?t.y:.1,{x:a,y:o,y0:n?n.scale(this.getYMinValue()):void 0}},r.prototype.createElement=function(t,i,n){n===void 0&&(n=!1);var a=this.container,o=this.getDrawCfg(t),l=this.getShapeFactory(),s=new Glt.default({shapeFactory:l,container:a,offscreenGroup:this.getOffscreenGroup(),elementIndex:i});return s.animate=this.animateOption,s.geometry=this,s.draw(o,n),s},r.prototype.getDrawCfg=function(t){var i=t[Ha.FIELD_ORIGIN],n={mappingData:t,data:i,x:t.x,y:t.y,color:t.color,size:t.size,isInCircle:this.coordinate.isPolar,customInfo:this.customOption},a=t.shape;!a&&this.getShapeFactory()&&(a=this.getShapeFactory().defaultShapeType),n.shape=a;var o=this.theme.geometries[this.shapeType];n.defaultStyle=(0,Ft.get)(o,[a,"default"],{}).style,!n.defaultStyle&&this.getShapeFactory()&&(n.defaultStyle=this.getShapeFactory().getDefaultStyle(o));var l=this.styleOption;return l&&(n.style=this.getStyleCfg(l,i)),this.generatePoints&&(n.points=t.points,n.nextPoints=t.nextPoints),n},r.prototype.updateElements=function(t,i){i===void 0&&(i=!1);for(var n=new Map,a=[],o=new Map,l=0,s=0;s<t.length;s++)for(var u=t[s],c=0;c<u.length;c++){var f=u[c],h=this.getElementId(f),v=n.has(h)?h+"-"+s+"-"+c:h;a.push(v),n.set(v,f),o.set(v,l),l++}this.elements=new Array(l);for(var d=(0,Hlt.diff)(this.lastElementsMap,a),p=d.added,x=d.updated,m=d.removed,_=0,b=p;_<b.length;_++){var h=b[_],f=n.get(h),s=o.get(h),w=this.createElement(f,s,i);this.elements[s]=w,this.elementsMap[h]=w,w.shape&&w.shape.setZIndex(this.zIndexReversed?this.elements.length-s:s)}for(var S=0,M=x;S<M.length;S++){var h=M[S],w=this.lastElementsMap[h],f=n.get(h),O=this.getDrawCfg(f),F=w.getModel(),s=o.get(h);(this.isCoordinateChanged||(0,jlt.isModelChange)(O,F))&&(w.animate=this.animateOption,w.update(O)),this.elements[s]=w,this.elementsMap[h]=w,w.shape&&w.shape.setZIndex(this.zIndexReversed?this.elements.length-s:s)}for(var L=0,D=m;L<D.length;L++){var h=D[L],w=this.lastElementsMap[h];w.animate=this.animateOption,w.destroy()}},r.prototype.getLabelType=function(){var t=this,i=t.labelOption,n=t.coordinate,a=t.type,o=n.type,l=n.isTransposed,s=(0,Ft.get)(i,["cfg","type"]);return s||(o==="polar"?s=l?"pie":"polar":o==="theta"?s="pie":a==="interval"||a==="polygon"?s="interval":s="base"),s},r.prototype.getYMinValue=function(){var t=this.getYScale(),i=t.min,n=t.max,a;return i>=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;l<s;l++){for(var u=a[l],c=[],f=0,h=u.length;f<h;f++){var v=u[f],d={};for(var p in v)d[p]=v[p];d[Ha.FIELD_ORIGIN]=v;for(var x=0,m=n;x<m.length;x++){var _=m[x],b=_.field;d[b]=_.translate(d[b])}c.push(d)}o.push(c)}var w=this.adjustData(o);return this.beforeMappingData=w,w},r.prototype.adjustData=function(t){var i=this.adjustOption,n=this,a=n.intervalPadding,o=n.dodgePadding,l=n.theme,s=this.maxColumnWidth||l.maxColumnWidth,u=this.minColumnWidth||l.minColumnWidth,c=this.columnWidthRatio||l.columnWidthRatio,f=t;if(i){var h=this.getXScale(),v=this.getYScale(),d=h.field,p=v?v.field:null,x=(0,Ylt.getXDimensionLength)(this.coordinate),m=h.values.length,_=this.getAttribute("size"),b=void 0;_&&(b=_.values[0]);for(var w=0,S=i.length;w<S;w++){var M=i[w],O=(0,vf.__assign)({xField:d,yField:p,intervalPadding:a,dodgePadding:o,xDimensionLength:x,groupNum:m,defaultSize:b,maxColumnWidth:s,minColumnWidth:u,columnWidthRatio:c},M),F=M.type;if(F==="dodge"){var L=[];if(h.isCategory||h.type==="identity")L.push("x");else if(!v)L.push("y");else throw new Error("dodge is not support linear attribute, please use category attribute!");O.adjustNames=L,O.dodgeRatio=c}else if(F==="stack"){var D=this.coordinate;if(!v){O.height=D.getHeight();var R=this.getDefaultValue("size")||3;O.size=R}!D.isTransposed&&(0,Ft.isNil)(O.reverseOrder)&&(O.reverseOrder=!0)}var H=(0,Rlt.getAdjust)(F),k=new H(O);f=k.process(f),this.adjusts[F]=k}}return f},r.prototype.groupData=function(t){for(var i=this.getGroupScales(),n=this.scaleDefs,a={},o=[],l=0;l<i.length;l++){var s=i[l],u=s.field;o.push(u),(0,Ft.get)(n,[u,"values"])&&(a[u]=n[u].values)}return(0,Vlt.group)(t,o,a)},r.prototype.updateStackRange=function(t,i){for(var n=(0,Ft.flatten)(i),a=t.field,o=t.min,l=t.max,s=0;s<n.length;s++){var u=n[s],c=Math.min.apply(null,u[a]),f=Math.max.apply(null,u[a]);c<o&&(o=c),f>l&&(l=f)}var h=this.scaleDefs,v={};o<t.min&&!(0,Ft.get)(h,[a,"min"])&&(v.min=o),l>t.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;n<a;n++){var o=i[n];this.generateShapePoints(o);var l=i[n+1];l&&(this.generateShapePoints(l),o[0].nextPoints=l[0].points)}return i},r.prototype.generateShapePoints=function(t){for(var i=this.getShapeFactory(),n=this.getAttribute("shape"),a=0;a<t.length;a++){var o=t[a],l=this.createShapePointsCfg(o),s=n?this.getAttributeValues(n,o):null,u=i.getShapePoints(s,l);o.points=u}},r.prototype.normalizeValues=function(t,i){var n=[];if((0,Ft.isArray)(t))for(var a=0;a<t.length;a++){var o=t[a];n.push(i.scale(o))}else n=i.scale(t);return n},r.prototype.mapping=function(t){for(var i=this.attributes,n=[],a=0;a<t.length;a++){var o=t[a],l={_origin:o[Ha.FIELD_ORIGIN],points:o.points,nextPoints:o.nextPoints};for(var s in i)if(i.hasOwnProperty(s)){var u=i[s],c=u.names,f=this.getAttributeValues(u,o);if(c.length>1)for(var h=0;h<f.length;h+=1){var v=f[h],d=c[h];l[d]=(0,Ft.isArray)(v)&&v.length===1?v[0]:v}else l[c[0]]=f.length===1?f[0]:f}this.convertPoint(l),n.push(l)}return n},r.prototype.convertPoint=function(t){var i=t.x,n=t.y,a,o,l,s=this.coordinate;if((0,Ft.isArray)(i)&&(0,Ft.isArray)(n)){a=[],o=[];for(var u=0,c=0,f=i.length,h=n.length;u<f&&c<h;u+=1,c+=1)l=s.convert({x:i[u],y:n[c]}),a.push(l.x),o.push(l.y)}else if((0,Ft.isArray)(n)){o=[];for(var v=0;v<n.length;v++){var d=n[v];l=s.convert({x:i,y:d}),a&&a!==l.x?((0,Ft.isArray)(a)||(a=[a]),a.push(l.x)):a=l.x,o.push(l.y)}}else if((0,Ft.isArray)(i)){a=[];for(var v=0;v<i.length;v++){var p=i[v];l=s.convert({x:p,y:n}),o&&o!==l.y?((0,Ft.isArray)(o)||(o=[o]),o.push(l.y)):o=l.y,a.push(l.x)}}else{var x=s.convert({x:i,y:n});a=x.x,o=x.y}t.x=a,t.y=o},r.prototype.getStyleCfg=function(t,i){var n=t.fields,a=n===void 0?[]:n,o=t.callback,l=t.cfg;if(l)return l;var s=a.map(function(u){return i[u]});return o.apply(void 0,s)},r.prototype.setCfg=function(t){var i=this,n=t.coordinate,a=t.data,o=t.theme,l=t.scaleDefs;n&&(this.coordinate=n),a&&(this.data=a),l&&(this.scaleDefs=l,this.idFields=[],(0,Ft.each)(l,function(s,u){s&&s.key&&i.idFields.push(u)})),o&&(this.theme=this.userTheme?(0,Ft.deepMix)({},o,this.userTheme):o)},r.prototype.renderLabels=function(t,i){i===void 0&&(i=!1);var n=this.geometryLabel;if(!n){var a=this.getLabelType(),o=(0,zlt.getGeometryLabel)(a);n=new o(this),this.geometryLabel=n}n.render(t,i);var l=n.labelsRenderer.shapesMap;(0,Ft.each)(this.elementsMap,function(s,u){var c=Wlt(u,l);if(c.length){s.labelShape=c;for(var f=0;f<c.length;f++)for(var h=c[f],v=h.getChildren(),d=0;d<v.length;d++){var p=v[d];p.cfg.name=["element","label"],p.cfg.element=s}}})},r.prototype.canDoGroupAnimation=function(t){return!t&&this.animateOption&&((0,Ft.get)(this.animateOption,"appear")===void 0||(0,Ft.get)(this.animateOption,"appear")&&(0,Ft.get)(this.animateOption,["appear","animation"])===void 0)},r}(Nlt.default);Pa.default=Xlt;var Fh={},YE={},Ai={},Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.zoom=Ar.getIdentityMatrix=Ar.rotate=Ar.getRotateMatrix=Ar.translate=Ar.transform=void 0;var Ult=ta,j1=Ult.ext.transform;Ar.transform=j1;function qlt(e,r,t){var i=j1(e.getMatrix(),[["t",r,t]]);e.setMatrix(i)}Ar.translate=qlt;function F3(e,r){var t=e.attr(),i=t.x,n=t.y,a=j1(e.getMatrix(),[["t",-i,-n],["r",r],["t",i,n]]);return a}Ar.getRotateMatrix=F3;function Zlt(e,r){var t=F3(e,r);e.setMatrix(t)}Ar.rotate=Zlt;function Qlt(){return[1,0,0,0,1,0,0,0,1]}Ar.getIdentityMatrix=Qlt;function Klt(e,r){var t=e.getBBox(),i=(t.minX+t.maxX)/2,n=(t.minY+t.maxY)/2;e.applyToMatrix([i,n,1]);var a=j1(e.getMatrix(),[["t",-i,-n],["s",r,r],["t",i,n]]);e.setMatrix(a)}Ar.zoom=Klt;Object.defineProperty(Ai,"__esModule",{value:!0});Ai.checkShapeOverlap=Ai.getOverlapArea=Ai.getlLabelBackgroundInfo=Ai.findLabelTextShape=void 0;var qA=Y,Jlt=Ar;function tst(e){return e.find(function(r){return r.get("type")==="text"})}Ai.findLabelTextShape=tst;function est(e,r,t){t===void 0&&(t=[0,0,0,0]);var i=e.getChildren()[0];if(i){var n=i.clone();r!=null&&r.rotate&&(0,Jlt.rotate)(n,-r.rotate);var a=n.getCanvasBBox(),o=a.x,l=a.y,s=a.width,u=a.height;n.destroy();var c=t;return(0,qA.isNil)(c)?c=[2,2,2,2]:(0,qA.isNumber)(c)&&(c=new Array(4).fill(c)),{x:o-c[3],y:l-c[0],width:s+c[1]+c[3],height:u+c[0]+c[2],rotation:(r==null?void 0:r.rotate)||0}}}Ai.getlLabelBackgroundInfo=est;function P3(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}Ai.getOverlapArea=P3;function rst(e,r){var t=e.getBBox();return(0,qA.some)(r,function(i){var n=i.getBBox();return P3(t,n,2)>0})}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;l<s.length;l++){var u=s[l];u&&this.renderLabel(u,o)}this.doLayout(r,t),this.renderLabelLine(r),this.renderLabelBackground(r),this.adjustLabel(r)}var c=this.lastShapesMap,f=this.shapesMap;(0,tr.each)(f,function(h,v){if(h.destroyed)delete f[v];else{if(c[v]){var d=h.get("data"),p=h.get("origin"),x=h.get("coordinate"),m=h.get("animateCfg"),_=c[v];(0,ust.updateLabel)(_,f[v],{data:d,origin:p,animateCfg:m,coordinate:x}),n.shapesMap[v]=_}else{a.add(h);var b=(0,tr.get)(h.get("animateCfg"),i?"enter":"appear");b&&(0,p$.doAnimate)(h,b,{toAttrs:(0,la.__assign)({},h.attr()),coordinate:h.get("coordinate")})}delete c[v]}}),(0,tr.each)(c,function(h){var v=(0,tr.get)(h.get("animateCfg"),"leave");v?(0,p$.doAnimate)(h,v,{toAttrs:null,coordinate:h.get("coordinate")}):h.remove(!0)}),this.lastShapesMap=f,o.destroy()},e.prototype.clear=function(){this.container.clear(),this.shapesMap={},this.lastShapesMap={}},e.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null,this.lastShapesMap=null},e.prototype.renderLabel=function(r,t){var i=r.id,n=r.elementId,a=r.data,o=r.mappingData,l=r.coordinate,s=r.animate,u=r.content,c={id:i,elementId:n,data:a,origin:(0,la.__assign)((0,la.__assign)({},o),{data:o[sst.FIELD_ORIGIN]}),coordinate:l},f=t.addGroup((0,la.__assign)({name:"label",animateCfg:this.animate===!1||s===null||s===!1?!1:(0,tr.deepMix)({},this.animate,s)},c)),h;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var v=u.getCanvasBBox(),d=v.width,p=v.height,x=(0,tr.get)(r,"textAlign","left"),m=r.x,_=r.y-p/2;x==="center"?m=m-d/2:(x==="right"||x==="end")&&(m=m-d),(0,g$.translate)(u,m,_),h=u,f.add(u)}else{var b=(0,tr.get)(r,["style","fill"]);h=f.addShape("text",(0,la.__assign)({attrs:(0,la.__assign)((0,la.__assign)({x:r.x,y:r.y,textAlign:r.textAlign,textBaseline:(0,tr.get)(r,"textBaseline","middle"),text:r.content},r.style),{fill:(0,tr.isNull)(b)?r.color:b})},c))}r.rotate&&(0,g$.rotate)(h,r.rotate),this.shapesMap[i]=f},e.prototype.doLayout=function(r,t){var i=this;if(this.layout){var n=(0,tr.isArray)(this.layout)?this.layout:[this.layout];(0,tr.each)(n,function(a){var o=(0,ast.getGeometryLabelLayout)((0,tr.get)(a,"type",""));if(o){var l=[],s=[];(0,tr.each)(i.shapesMap,function(u,c){l.push(u),s.push(t[u.get("elementId")])}),o(r,l,s,i.region,a.cfg)}})}},e.prototype.renderLabelLine=function(r){var t=this;(0,tr.each)(r,function(i){var n=(0,tr.get)(i,"coordinate");if(!(!i||!n)){var a=n.getCenter(),o=n.getRadius();if(!!i.labelLine){var l=(0,tr.get)(i,"labelLine",{}),s=i.id,u=l.path;if(!u){var c=(0,lst.polarToCartesian)(a.x,a.y,o,i.angle);u=[["M",c.x,c.y],["L",i.x,i.y]]}var f=t.shapesMap[s];f.destroyed||f.addShape("path",{capture:!1,attrs:(0,la.__assign)({path:u,stroke:i.color?i.color:(0,tr.get)(i,["style","fill"],"#000"),fill:null},l.style),id:s,origin:i.mappingData,data:i.data,coordinate:i.coordinate})}}})},e.prototype.renderLabelBackground=function(r){var t=this;(0,tr.each)(r,function(i){var n=(0,tr.get)(i,"coordinate"),a=(0,tr.get)(i,"background");if(!(!a||!n)){var o=i.id,l=t.shapesMap[o];if(!l.destroyed){var s=l.getChildren()[0];if(s){var u=(0,ost.getlLabelBackgroundInfo)(l,i,a.padding),c=u.rotation,f=(0,la.__rest)(u,["rotation"]),h=l.addShape("rect",{attrs:(0,la.__assign)((0,la.__assign)({},f),a.style||{}),id:o,origin:i.mappingData,data:i.data,coordinate:i.coordinate});if(h.setZIndex(-1),c){var v=s.getMatrix();h.setMatrix(v)}}}}})},e.prototype.createOffscreenGroup=function(){var r=this.container,t=r.getGroupBase(),i=new t({});return i},e.prototype.adjustLabel=function(r){var t=this;(0,tr.each)(r,function(i){if(i){var n=i.id,a=t.shapesMap[n];if(!a.destroyed){var o=a.findAll(function(l){return l.get("type")!=="path"});(0,tr.each)(o,function(l){l&&(i.offsetX&&l.attr("x",l.attr("x")+i.offsetX),i.offsetY&&l.attr("y",l.attr("y")+i.offsetY))})}}})},e}();YE.default=cst;Object.defineProperty(Fh,"__esModule",{value:!0});var Xv=j,Ee=Y,y$=Kt,fst=ul,hst=Se,vst=(0,Xv.__importDefault)(YE);function m$(e){var r=0;return(0,Ee.each)(e,function(t){r+=t}),r/e.length}var dst=function(){function e(r){this.geometry=r}return e.prototype.getLabelItems=function(r){var t=this,i=[],n=this.getLabelCfgs(r);return(0,Ee.each)(r,function(a,o){var l=n[o];if(!l||(0,Ee.isNil)(a.x)||(0,Ee.isNil)(a.y)){i.push(null);return}var s=(0,Ee.isArray)(l.content)?l.content:[l.content];l.content=s;var u=s.length;(0,Ee.each)(s,function(c,f){if((0,Ee.isNil)(c)||c===""){i.push(null);return}var h=(0,Xv.__assign)((0,Xv.__assign)({},l),t.getLabelPoint(l,a,f));h.textAlign||(h.textAlign=t.getLabelAlign(h,f,u)),h.offset<=0&&(h.labelLine=null),i.push(h)})}),i},e.prototype.render=function(r,t){t===void 0&&(t=!1);var i=this.getLabelItems(r),n=this.getLabelsRenderer(),a=this.getGeometryShapes();n.render(i,a,t)},e.prototype.clear=function(){var r=this.labelsRenderer;r&&r.clear()},e.prototype.destroy=function(){var r=this.labelsRenderer;r&&r.destroy(),this.labelsRenderer=null},e.prototype.getCoordinate=function(){return this.geometry.coordinate},e.prototype.getDefaultLabelCfg=function(r,t){var i=this.geometry,n=i.type,a=i.theme;return n==="polygon"||n==="interval"&&t==="middle"||r<0&&!["line","point","path"].includes(n)?(0,Ee.get)(a,"innerLabels",{}):(0,Ee.get)(a,"labels",{})},e.prototype.getThemedLabelCfg=function(r){var t=this.geometry,i=this.getDefaultLabelCfg(),n=t.type,a=t.theme,o;return n==="polygon"||r.offset<0&&!["line","point","path"].includes(n)?o=(0,Ee.deepMix)({},i,a.innerLabels,r):o=(0,Ee.deepMix)({},i,a.labels,r),o},e.prototype.setLabelPosition=function(r,t,i,n){},e.prototype.getLabelOffset=function(r){var t=this.getCoordinate(),i=this.getOffsetVector(r);return t.isTransposed?i[0]:i[1]},e.prototype.getLabelOffsetPoint=function(r,t,i){var n=r.offset,a=this.getCoordinate(),o=a.isTransposed,l=o?"x":"y",s=o?1:-1,u={x:0,y:0};return t>0||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);h<l;)f.push(B3(u+h*s,v)),h++;return f},Mst=12;function C$(e){e=Math.abs(e);var r=1;if(e===0)return r;if(e<1){for(var t=0;e<1;)r=r/10,e=e*10,t++;return r.toString().length>Mst&&(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<df.length;c++){var f=df[c];if(o<=f){u=c;break}}var h=R3(u,r,s,l),v=ZA(h)+ZA(a);return B3(h*a,v)}function R3(e,r,t,i){for(var n=!1,a=df[e],o=e;o<df.length;o++)if(Ost({interval:df[o],tickCount:r,max:i,min:t})){a=df[o],n=!0;break}return n?a:10*R3(0,r,t/10,i/10)}function Ost(e){var r=e.interval,t=e.tickCount,i=e.max,n=e.min,a=Math.floor(n/r)*r;return a+(t-1)*r>=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.y<a.y?i.y:a.y):n==="x"?(u=i.x>a.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.maxX<e.minX||r.minY>e.maxY||r.maxY<e.minY)}function jst(e,r){return!e||!r?e||r:{minX:Math.min(e.minX,r.minX),minY:Math.min(e.minY,r.minY),maxX:Math.max(e.maxX,r.maxX),maxY:Math.max(e.maxY,r.maxY)}}function S$(e,r){return e[0]===r[0]&&e[1]===r[1]}var Hst=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Yst=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Wst=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,q3=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Z3(e,r){var t=e.match(q3);P(t,function(i){var n=i.split(":");r.addColorStop(n[0],n[1])})}function Xst(e,r,t){var i=Hst.exec(t),n=parseFloat(i[1])%360*(Math.PI/180),a=i[2],o=r.getBBox(),l,s;n>=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&&n<Math.PI?(l={x:o.maxX,y:o.minY},s={x:o.minX,y:o.maxY}):Math.PI<=n&&n<3/2*Math.PI?(l={x:o.maxX,y:o.maxY},s={x:o.minX,y:o.minY}):(l={x:o.minX,y:o.maxY},s={x:o.maxX,y:o.minY});var u=Math.tan(n),c=u*u,f=(s.x-l.x+u*(s.y-l.y))/(c+1)+l.x,h=u*(s.x-l.x+u*(s.y-l.y))/(c+1)+l.y,v=e.createLinearGradient(l.x,l.y,f,h);return Z3(a,v),v}function Ust(e,r,t){var i=Yst.exec(t),n=parseFloat(i[1]),a=parseFloat(i[2]),o=parseFloat(i[3]),l=i[4];if(o===0){var s=l.match(q3);return s[s.length-1].split(":")[1]}var u=r.getBBox(),c=u.maxX-u.minX,f=u.maxY-u.minY,h=Math.sqrt(c*c+f*f)/2,v=e.createRadialGradient(u.minX+c*n,u.minY+f*a,0,u.minX+c/2,u.minY+f/2,o*h);return Z3(l,v),v}function qst(e,r,t){if(r.get("patternSource")&&r.get("patternSource")===t)return r.get("pattern");var i,n,a=Wst.exec(t),o=a[1],l=a[2];function s(){i=e.createPattern(n,o),r.set("pattern",i),r.set("patternSource",t)}switch(o){case"a":o="repeat";break;case"x":o="repeat-x";break;case"y":o="repeat-y";break;case"n":o="no-repeat";break;default:o="no-repeat"}return n=new Image,l.match(/^data:/i)||(n.crossOrigin="Anonymous"),n.src=l,n.complete?s():(n.onload=s,n.src=n.src),i}function Zst(e,r,t){var i=r.getBBox();if(isNaN(i.x)||isNaN(i.y)||isNaN(i.width)||isNaN(i.height))return t;if(Ct(t)){if(t[1]==="("||t[2]==="("){if(t[0]==="l")return Xst(e,r,t);if(t[0]==="r")return Ust(e,r,t);if(t[0]==="p")return qst(e,r,t)}return t}if(t instanceof CanvasPattern)return t}function Qst(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,[r,t,i,n]}function fm(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function QA(e,r){return fm(e)*fm(r)?(e[0]*r[0]+e[1]*r[1])/(fm(e)*fm(r)):1}function A$(e,r){return(e[0]*r[1]<e[1]*r[0]?-1:1)*Math.acos(QA(e,r))}function ox(e,r){var t=r[1],i=r[2],n=Qx(Kx(r[3]),Math.PI*2),a=r[4],o=r[5],l=e[0],s=e[1],u=r[6],c=r[7],f=Math.cos(n)*(l-u)/2+Math.sin(n)*(s-c)/2,h=-1*Math.sin(n)*(l-u)/2+Math.cos(n)*(s-c)/2,v=f*f/(t*t)+h*h/(i*i);v>1&&(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;i<r.length;i++){var n=r[i];n.cfg.visible?n.draw(e,t):n.skipDraw()}}function Kst(e,r,t){var i=e.get("refreshElements");P(i,function(n){if(n!==e)for(var a=n.cfg.parent;a&&a!==e&&!a.cfg.refresh;)a.cfg.refresh=!0,a=a.cfg.parent}),i[0]===e?QE(r):JA(r,t)}function JA(e,r){for(var t=0;t<e.length;t++){var i=e[t];if(i.cfg.visible)if(i.cfg.hasChanged)i.cfg.refresh=!0,i.isGroup()&&QE(i.cfg.children);else if(i.cfg.refresh)i.isGroup()&&JA(i.cfg.children,r);else{var n=Jst(i,r);i.cfg.refresh=n,n&&i.isGroup()&&JA(i.cfg.children,r)}}}function J3(e){for(var r=0;r<e.length;r++){var t=e[r];t.cfg.hasChanged=!1,t.isGroup()&&!t.destroyed&&J3(t.cfg.children)}}function QE(e,r){for(var t=0;t<e.length;t++){var i=e[t];!i.cfg.visible||(i.cfg.refresh=!0,i.isGroup()&&QE(i.get("children")))}}function Jst(e,r){var t=e.cfg.cacheCanvasBBox,i=e.cfg.isInView&&t&&Yd(t,r);return i}function tj(e,r,t,i){var n=t.path,a=t.startArrow,o=t.endArrow;if(!!n){var l=[0,0],s=[0,0],u={dx:0,dy:0};r.beginPath();for(var c=0;c<n.length;c++){var f=n[c],h=f[0];if(c===0&&a&&a.d){var v=e.getStartTangent();u=Bu(v[0][0],v[0][1],v[1][0],v[1][1],a.d)}else if(c===n.length-2&&n[c+1][0]==="Z"&&o&&o.d){var d=n[c+1];if(d[0]==="Z"){var v=e.getEndTangent();u=Bu(v[0][0],v[0][1],v[1][0],v[1][1],o.d)}}else if(c===n.length-1&&o&&o.d&&n[0]!=="Z"){var v=e.getEndTangent();u=Bu(v[0][0],v[0][1],v[1][0],v[1][1],o.d)}var p=u.dx,x=u.dy;switch(h){case"M":r.moveTo(f[1]-p,f[2]-x),s=[f[1],f[2]];break;case"L":r.lineTo(f[1]-p,f[2]-x);break;case"Q":r.quadraticCurveTo(f[1],f[2],f[3]-p,f[4]-x);break;case"C":r.bezierCurveTo(f[1],f[2],f[3],f[4],f[5]-p,f[6]-x);break;case"A":{var m=void 0;i?(m=i[c],m||(m=ox(l,f),i[c]=m)):m=ox(l,f);var _=m.cx,b=m.cy,w=m.rx,S=m.ry,M=m.startAngle,O=m.endAngle,F=m.xRotation,L=m.sweepFlag;if(r.ellipse)r.ellipse(_,b,w,S,F,M,O,1-L);else{var D=w>S?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)<put?0:e<0?-1:1}function gut(e,r,t){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])&&Math.min(e[0],r[0])<=t[0]&&t[0]<=Math.max(e[0],r[0])&&Math.min(e[1],r[1])<=t[1]&&t[1]<=Math.max(e[1],r[1])}function ij(e,r,t){var i=!1,n=e.length;if(n<=2)return!1;for(var a=0;a<n;a++){var o=e[a],l=e[(a+1)%n];if(gut(o,l,[r,t]))return!0;XC(o[1]-t)>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(s<i||s>n)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;i<t;i++){var n=e[i],a=n[0];if(a==="C"||a==="A"||a==="Q"){r=!0;break}}return r}function xut(e,r,t,i,n){for(var a=!1,o=r/2,l=0;l<e.length;l++){var s=e[l],u=s.currentPoint,c=s.params,f=s.prePoint,h=s.box;if(!(h&&!Au(h.x-o,h.y-o,h.width+r,h.height+r,t,i))){switch(s.command){case"L":case"Z":a=Xl(f[0],f[1],u[0],u[1],r,t,i);break;case"Q":var v=EM.pointDistance(f[0],f[1],c[1],c[2],c[3],c[4],t,i);a=v<=r/2;break;case"C":var d=Cf.pointDistance(f[0],f[1],c[1],c[2],c[3],c[4],c[5],c[6],t,i,n);a=d<=r/2;break;case"A":var p=s.arcParams,x=p.cx,m=p.cy,_=p.rx,b=p.ry,w=p.startAngle,S=p.endAngle,M=p.xRotation,O=[t,i,1],F=_>b?_: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;a<r;a++){var o=e[a],l=o[0];l==="M"?(n.length&&(i.push(n),n=[]),n.push([o[1],o[2]])):l==="Z"?n.length&&(t.push(n),n=[]):n.push([o[1],o[2]])}return n.length>0&&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<e.length;n++){var a=e[n];if(i=ij(a,r,t),i)break}return i}var but=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),{startArrow:!1,endArrow:!1})},r.prototype.initAttrs=function(t){this._setPathArr(t.path),this.setArrow()},r.prototype.onAttrChange=function(t,i,n){e.prototype.onAttrChange.call(this,t,i,n),t==="path"&&this._setPathArr(i),this.setArrow()},r.prototype._setPathArr=function(t){this.attrs.path=f1(t);var i=dm.hasArc(t);this.set("hasArc",i),this.set("paramsCache",{}),this.set("segments",null),this.set("curve",null),this.set("tCache",null),this.set("totalLength",null)},r.prototype.getSegments=function(){var t=this.get("segements");return t||(t=FM(this.attr("path")),this.set("segments",t)),t},r.prototype.setArrow=function(){var t=this.attr(),i=t.startArrow,n=t.endArrow;if(i){var a=this.getStartTangent();qE(this,t,a[0][0],a[0][1],a[1][0],a[1][1])}if(n){var a=this.getEndTangent();ZE(this,t,a[0][0],a[0][1],a[1][0],a[1][1])}},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.getSegments(),s=this.get("hasArc"),u=!1;if(n){var c=this.getTotalLength();u=dm.isPointInStroke(l,o,t,i,c)}if(!u&&a)if(s)u=rj(this,t,i);else{var f=this.attr("path"),h=dm.extractPolygons(f);u=E$(h.polygons,t,i)||E$(h.polylines,t,i)}return u},r.prototype.createPath=function(t){var i=this.attr(),n=this.get("paramsCache");tj(this,t,i,n)},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.get("totalLength");return K(t)?(this._calculateCurve(),this._setTcache(),this.get("totalLength")):t},r.prototype.getPoint=function(t){var i=this.get("tCache");i||(this._calculateCurve(),this._setTcache(),i=this.get("tCache"));var n,a,o=this.get("curve");if(!i||i.length===0)return o?{x:o[0][1],y:o[0][2]}:null;P(i,function(c,f){t>=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<a-1;o++){var l=e[o][0],s=e[o][1],u=e[o+1][0],c=e[o+1][1];if(Xl(l,s,u,c,r,t,i))return!0}if(n){var f=e[0],h=e[a-1];if(Xl(f[0],f[1],h[0],h[1],r,t,i))return!0}return!1}var wut=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isInStrokeOrPath=function(t,i,n,a,o){var l=this.attr().points,s=!1;return n&&(s=nj(l,o,t,i,!0)),!s&&a&&(s=ij(l,t,i)),s},r.prototype.createPath=function(t){var i=this.attr(),n=i.points;if(!(n.length<2)){t.beginPath();for(var a=0;a<n.length;a++){var o=n[a];a===0?t.moveTo(o[0],o[1]):t.lineTo(o[0],o[1])}t.closePath()}},r}(Ia),Cut=wut,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),{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(),["points"].indexOf(t)!==-1&&this._resetCache()},r.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},r.prototype.setArrow=function(){var t=this.attr(),i=this.attrs,n=i.points,a=i.startArrow,o=i.endArrow,l=n.length,s=n[0][0],u=n[0][1],c=n[l-1][0],f=n[l-1][1];a&&qE(this,t,n[1][0],n[1][1],s,u),o&&ZE(this,t,n[l-2][0],n[l-2][1],c,f)},r.prototype.isFill=function(){return!1},r.prototype.isInStrokeOrPath=function(t,i,n,a,o){if(!n||!o)return!1;var l=this.attr().points;return nj(l,o,t,i,!1)},r.prototype.isStroke=function(){return!0},r.prototype.createPath=function(t){var i=this.attr(),n=i.points,a=i.startArrow,o=i.endArrow,l=n.length;if(!(n.length<2)){var s=n[0][0],u=n[0][1],c=n[l-1][0],f=n[l-1][1];if(a&&a.d){var h=Bu(s,u,n[1][0],n[1][1],a.d);s+=h.dx,u+=h.dy}if(o&&o.d){var h=Bu(n[l-2][0],n[l-2][1],c,f,o.d);c-=h.dx,f-=h.dy}t.beginPath(),t.moveTo(s,u);for(var v=0;v<l-1;v++){var d=n[v];t.lineTo(d[0],d[1])}t.lineTo(c,f)}},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().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}(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;o<n;o++)a[o]=arguments[o];return i=e.call.apply(e,[this].concat(a))||this,i.state=k$,i.updatedWithError=!1,i.resetErrorBoundary=function(){for(var l,s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];i.props.onReset==null||(l=i.props).onReset.apply(l,u),i.reset()},i}r.getDerivedStateFromError=function(n){return{error:n}};var t=r.prototype;return t.reset=function(){this.updatedWithError=!1,this.setState(k$)},t.componentDidCatch=function(n,a){var o,l;(o=(l=this.props).onError)==null||o.call(l,n,a)},t.componentDidUpdate=function(n){var a=this.state.error,o=this.props.resetKeys;if(a!==null&&!this.updatedWithError){this.updatedWithError=!0;return}if(a!==null&&zut(n.resetKeys,o)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,n.resetKeys,o),this.reset()}},t.render=function(){var n=this.state.error,a=this.props,o=a.fallbackRender,l=a.FallbackComponent,s=a.fallback;if(n!==null){var u={error:n,resetErrorBoundary:this.resetErrorBoundary};if(Pt.isValidElement(s))return s;if(typeof o=="function")return o(u);if(l)return Pt.createElement(l,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(Pt.Component),jut=function(e){var r=e.error;return Pt.createElement("div",{className:"bizcharts-error",role:"alert"},Pt.createElement("p",null,"BizCharts something went wrong:"),Pt.createElement("pre",null,r.message))};function dj(e){return jut(e)}var Wd=Vut;ut.registerEngine("canvas",vit);ut.registerEngine("svg",eat);var Hut=Lp.Canvas.prototype.getPointByClient;Lp.Canvas.prototype.getPointByClient=function(e,r){var t=Hut.call(this,e,r),i=this.get("el"),n=i.getBoundingClientRect(),a=this.get("width"),o=this.get("height"),l=n.width,s=n.height;return{x:t.x/(l/a),y:t.y/(s/o)}};var Yut=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)}}(),zl=globalThis&&globalThis.__assign||function(){return zl=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zl.apply(this,arguments)};ut.registerComponentController("annotation",pet);var La=function(e){Yut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="line",t}return r.prototype.componentDidMount=function(){var t=this.getChartIns();this.id=Fa("annotation"),this.annotation=t.annotation(),this.annotationType==="ReactElement"?this.annotation.annotation(zl({type:"html",isReactElement:!0},this.props)):this.annotation.annotation(zl({type:this.annotationType},this.props)),this.annotation.option[this.annotation.option.length-1].__id=this.id},r.prototype.componentDidUpdate=function(){var t=this,i=null;this.annotation.option.forEach(function(n,a){n.__id===t.id&&(i=a)}),this.annotationType==="ReactElement"?this.annotation.option[i]=zl(zl({type:"html",isReactElement:!0},this.props),{__id:this.id}):this.annotation.option[i]=zl(zl({type:this.annotationType},this.props),{__id:this.id})},r.prototype.componentWillUnmount=function(){var t=this,i=null;!this.annotation||(this.annotation.option.forEach(function(n,a){n.__id===t.id&&(i=a)}),i!==null&&this.annotation.option.splice(i,1),this.annotation=null)},r.prototype.getChartIns=function(){return this.context},r.prototype.render=function(){return Pt.createElement(Pt.Fragment,null)},r}(Pt.Component);La.contextType=Fs;var Wut=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)}}();(function(e){Wut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="arc",t}return r})(La);var Xut=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)}}();(function(e){Xut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="dataMarker",t}return r})(La);var Uut=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)}}();(function(e){Uut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="dataRegion",t}return r})(La);var qut=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)}}();(function(e){qut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="regionFilter",t}return r})(La);var Zut=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)}}();(function(e){Zut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="html",t}return r})(La);var Qut=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)}}();(function(e){Qut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="ReactElement",t}return r})(La);var Kut=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)}}();(function(e){Kut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="image",t}return r})(La);var Jut=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)}}();(function(e){Jut(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="line",t}return r})(La);var tct=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)}}();(function(e){tct(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="region",t}return r})(La);var ect=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)}}();(function(e){ect(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.annotationType="text",t}return r})(La);var pj={},tT={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},ee={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"};function qn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function gj(e){var r=tT[e.type],t=e.getParent();if(!r)throw new Error("the type "+e.type+" is not supported by svg");var i=qn(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}function yj(e,r){var t=e.get("el"),i=az(t.children).sort(r),n=document.createDocumentFragment();i.forEach(function(a){n.appendChild(a)}),t.appendChild(n)}function rct(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(a<r){var o=i[r+1];o?t.insertBefore(e,o):t.appendChild(e)}}else t.appendChild(e)}function ict(e,r){var t=e.cfg.el,i=e.attr(),n={dx:i.shadowOffsetX,dy:i.shadowOffsetY,blur:i.shadowBlur,color:i.shadowColor};if(!n.dx&&!n.dy&&!n.blur&&!n.color)t.removeAttribute("filter");else{var a=r.find("filter",n);a||(a=r.addShadow(n)),t.setAttribute("filter","url(#"+a+")")}}function Up(e){var r=e.attr().matrix;if(r){for(var t=e.cfg.el,i=[],n=0;n<9;n+=3)i.push(r[n]+","+r[n+1]);i=i.join(","),i.indexOf("NaN")===-1?t.setAttribute("transform","matrix("+i+")"):console.warn("invalid matrix:",r)}}function Xd(e,r){var t=e.getClip(),i=e.get("el");if(!t)i.removeAttribute("clip-path");else if(t&&!i.hasAttribute("clip-path")){gj(t),t.createPath(r);var n=r.addClip(t);i.setAttribute("clip-path","url(#"+n+")")}}function mj(e,r){r.forEach(function(t){t.draw(e)})}function xj(e,r){var t=e.get("canvas");if(t&&t.get("autoDraw")){var i=t.get("context"),n=e.getParent(),a=n?n.getChildren():[t],o=e.get("el");if(r==="remove"){var l=e.get("isClipShape");if(l){var s=o&&o.parentNode,u=s&&s.parentNode;s&&u&&u.removeChild(s)}else o&&o.parentNode&&o.parentNode.removeChild(o)}else if(r==="show")o.setAttribute("visibility","visible");else if(r==="hide")o.setAttribute("visibility","hidden");else if(r==="zIndex")rct(o,a.indexOf(e));else if(r==="sort"){var c=e.get("children");c&&c.length&&yj(e,function(f,h){return c.indexOf(f)-c.indexOf(h)?1:0})}else r==="clear"?o&&(o.innerHTML=""):r==="matrix"?Up(e):r==="clip"?Xd(e,i):r==="attr"||r==="add"&&e.draw(i)}}var rO=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isEntityGroup=function(){return!0},r.prototype.createDom=function(){var t=qn("g");this.set("el",t);var i=this.getParent();if(i){var n=i.get("el");n||(n=i.createDom(),i.set("el",n)),n.appendChild(t)}return t},r.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t);var i=this.get("canvas");if(i&&i.get("autoDraw")){var n=i.get("context");this.createPath(n,t)}},r.prototype.onCanvasChange=function(t){xj(this,t)},r.prototype.getShapeBase=function(){return Ux},r.prototype.getGroupBase=function(){return r},r.prototype.draw=function(t){var i=this.getChildren(),n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||this.createDom(),Xd(this,t),this.createPath(t),i.length&&mj(t,i))},r.prototype.createPath=function(t,i){var n=this.attr(),a=this.get("el");P(i||n,function(o,l){ee[l]&&a.setAttribute(ee[l],o)}),Up(this)},r}(bp),nct=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="svg",t.canFill=!1,t.canStroke=!1,t}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.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t);var i=this.get("canvas");if(i&&i.get("autoDraw")){var n=i.get("context");this.draw(n,t)}},r.prototype.getShapeBase=function(){return Ux},r.prototype.getGroupBase=function(){return rO},r.prototype.onCanvasChange=function(t){xj(this,t)},r.prototype.calculateBBox=function(){var t=this.get("el"),i=null;if(t)i=t.getBBox();else{var n=Cp(this.get("type"));n&&(i=n(this))}if(i){var a=i.x,o=i.y,l=i.width,s=i.height,u=this.getHitLineWidth(),c=u/2,f=a-c,h=o-c,v=a+l+c,d=o+s+c;return{x:f,y:h,minX:f,minY:h,maxX:v,maxY:d,width:l+u,height:s+u}}return{x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}},r.prototype.isFill=function(){var t=this.attr(),i=t.fill,n=t.fillStyle;return(i||n||this.isClipShape())&&this.canFill},r.prototype.isStroke=function(){var t=this.attr(),i=t.stroke,n=t.strokeStyle;return(i||n)&&this.canStroke},r.prototype.draw=function(t,i){var n=this.get("el");this.get("destroyed")?n&&n.parentNode.removeChild(n):(n||gj(this),Xd(this,t),this.createPath(t,i),this.shadow(t,i),this.strokeAndFill(t,i),this.transform(i))},r.prototype.createPath=function(t,i){},r.prototype.strokeAndFill=function(t,i){var n=i||this.attr(),a=n.fill,o=n.fillStyle,l=n.stroke,s=n.strokeStyle,u=n.fillOpacity,c=n.strokeOpacity,f=n.lineWidth,h=this.get("el");this.canFill&&(i?"fill"in n?this._setColor(t,"fill",a):"fillStyle"in n&&this._setColor(t,"fill",o):this._setColor(t,"fill",a||o),u&&h.setAttribute(ee.fillOpacity,u)),this.canStroke&&f>0&&(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+='<tspan x="'+a+'" dy="'+-u+'em">'+f+"</tspan>":l==="top"?c+='<tspan x="'+a+'" dy="0.9em">'+f+"</tspan>":l==="middle"?c+='<tspan x="'+a+'" dy="'+-(u-1)/2+'em">'+f+"</tspan>":l==="bottom"?c+='<tspan x="'+a+'" dy="-'+(u+B$)+'em">'+f+"</tspan>":l==="hanging"&&(c+='<tspan x="'+a+'" dy="'+(-(u-1)-B$)+'em">'+f+"</tspan>"):c+='<tspan x="'+a+'" dy="1em">'+f+"</tspan>"}),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+='<stop offset="'+i[0]+'" stop-color="'+i[1]+'"></stop>'}),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<Math.PI?(a={x:1,y:0},o={x:0,y:1}):Math.PI<=i&&i<1.5*Math.PI?(a={x:1,y:1},o={x:0,y:0}):(a={x:0,y:1},o={x:1,y:0});var l=Math.tan(i),s=l*l,u=(o.x-a.x+l*(o.y-a.y))/(s+1)+a.x,c=l*(o.x-a.x+l*(o.y-a.y))/(s+1)+a.y;r.setAttribute("x1",a.x),r.setAttribute("y1",a.y),r.setAttribute("x2",u),r.setAttribute("y2",c),r.innerHTML=_j(n)}function $ct(e,r){var t=Ict.exec(e),i=parseFloat(t[1]),n=parseFloat(t[2]),a=parseFloat(t[3]),o=t[4];r.setAttribute("cx",i),r.setAttribute("cy",n),r.setAttribute("r",a),r.innerHTML=_j(o)}var kct=function(){function e(r){this.cfg={};var t=null,i=Fa("gradient_");return r.toLowerCase()[0]==="l"?(t=qn("linearGradient"),Dct(r,t)):(t=qn("radialGradient"),$ct(r,t)),t.setAttribute("id",i),this.el=t,this.id=i,this.cfg=r,this}return e.prototype.match=function(r,t){return this.cfg===t},e}(),Rct={shadowColor:"color",shadowOpacity:"opacity",shadowBlur:"blur",shadowOffsetX:"dx",shadowOffsetY:"dy"},Bct={x:"-40%",y:"-40%",width:"200%",height:"200%"},Nct=function(){function e(r){this.type="filter",this.cfg={},this.type="filter";var t=qn("filter");return P(Bct,function(i,n){t.setAttribute(n,i)}),this.el=t,this.id=Fa("filter_"),this.el.id=this.id,this.cfg=r,this._parseShadow(r,t),this}return e.prototype.match=function(r,t){if(this.type!==r)return!1;var i=!0,n=this.cfg;return P(Object.keys(n),function(a){if(n[a]!==t[a])return i=!1,!1}),i},e.prototype.update=function(r,t){var i=this.cfg;return i[Rct[r]]=t,this._parseShadow(i,this.el),this},e.prototype._parseShadow=function(r,t){var i=`<feDropShadow
dx="`+(r.dx||0)+`"
dy="`+(r.dy||0)+`"
stdDeviation="`+(r.blur?r.blur/10:0)+`"
flood-color="`+(r.color?r.color:"#000")+`"
flood-opacity="`+(r.opacity?r.opacity:1)+`"
/>`;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;a<i.length;a++)if(i[a].match(r,t)){n=i[a].id;break}return n},e.prototype.findById=function(r){for(var t=this.children,i=null,n=0;n<t.length;n++)if(t[n].id===r){i=t[n];break}return i},e.prototype.add=function(r){this.children.push(r),r.canvas=this.canvas,r.parent=this},e.prototype.getDefaultArrow=function(r,t){var i=r.stroke||r.strokeStyle;if(this.defaultArrow[i])return this.defaultArrow[i].id;var n=new N$(r,t);return this.defaultArrow[i]=n,this.el.appendChild(n.el),this.add(n),n.id},e.prototype.addGradient=function(r){var t=new kct(r);return this.el.appendChild(t.el),this.add(t),t.id},e.prototype.addArrow=function(r,t){var i=new N$(r,t);return this.el.appendChild(i.el),this.add(i),i.id},e.prototype.addShadow=function(r){var t=new Nct(r);return this.el.appendChild(t.el),this.add(t),t.id},e.prototype.addPattern=function(r){var t=new Vct(r);return this.el.appendChild(t.el),this.add(t),t.id},e.prototype.addClip=function(r){var t=new Gct(r);return this.el.appendChild(t.el),this.add(t),t.id},e}(),bj=function(e){X(r,e);function r(t){return e.call(this,A(A({},t),{autoDraw:!0,renderer:"svg"}))||this}return r.prototype.getShapeBase=function(){return Ux},r.prototype.getGroupBase=function(){return rO},r.prototype.getShape=function(t,i,n){var a=n.target||n.srcElement;if(!tT[a.tagName]){for(var o=a.parentNode;o&&!tT[o.tagName];)o=o.parentNode;a=o}return this.find(function(l){return l.get("el")===a})},r.prototype.createDom=function(){var t=qn("svg"),i=new jct(t);return t.setAttribute("width",""+this.get("width")),t.setAttribute("height",""+this.get("height")),this.set("context",i),t},r.prototype.onCanvasChange=function(t){var i=this.get("context"),n=this.get("el");if(t==="sort"){var a=this.get("children");a&&a.length&&yj(this,function(l,s){return a.indexOf(l)-a.indexOf(s)?1:0})}else if(t==="clear"){if(n){n.innerHTML="";var o=i.el;o.innerHTML="",n.appendChild(o)}}else t==="matrix"?Up(this):t==="clip"?Xd(this,i):t==="changeSize"&&(n.setAttribute("width",""+this.get("width")),n.setAttribute("height",""+this.get("height")))},r.prototype.draw=function(){var t=this.get("context"),i=this.getChildren();Xd(this,t),i.length&&mj(t,i)},r}(_p),Hct="0.5.6",wj=Object.freeze(Object.defineProperty({__proto__:null,Shape:Ux,version:Hct,Canvas:bj,Group:rO,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"})),Yct=_r(wj),iO={},qp={},Cj={},xn={};Object.defineProperty(xn,"__esModule",{value:!0});xn.getSmoothViolinPath=xn.getViolinPath=xn.getPathPoints=void 0;var G$=Y,z$=cc;function qC(e){return e?!1:e==null||isNaN(e)}function V$(e){if((0,G$.isArray)(e))return qC(e[1].y);var r=e.y;return(0,G$.isArray)(r)?qC(r[0]):qC(r)}function Wct(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;n<a;n++){var o=e[n];V$(o)||i.push(o)}return[i]}for(var l=[],s=[],n=0,a=e.length;n<a;n++){var o=e[n];V$(o)?s.length&&(s.length===1&&!t||l.push(s),s=[]):s.push(o)}return s.length&&l.push(s),l}xn.getPathPoints=Wct;function Xct(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return a&&(r.push(["L",a.x,a.y]),r.push(["z"])),r}xn.getViolinPath=Xct;function Uct(e){for(var r=e.length/2,t=[],i=[],n=0;n<e.length;n++)n<r?t.push(e[n]):i.push(e[n]);var a=(0,z$.getSplinePath)(t,!1),o=(0,z$.getSplinePath)(i,!1);i.length&&a.push(["L",i[0].x,i[0].y]),o.shift();var l=a.concat(o);return t.length&&l.push(["L",t[0].x,t[0].y]),l.push(["z"]),l}xn.getSmoothViolinPath=Uct;var ke={};Object.defineProperty(ke,"__esModule",{value:!0});ke.getBackgroundRectStyle=ke.getStyle=void 0;var j$=j,ux=Y;function qct(e,r,t,i){i===void 0&&(i="");var n=e.style,a=n===void 0?{}:n,o=e.defaultStyle,l=e.color,s=e.size,u=(0,j$.__assign)((0,j$.__assign)({},o),a);return l&&(r&&(a.stroke||(u.stroke=l)),t&&(a.fill||(u.fill=l))),i&&(0,ux.isNil)(a[i])&&!(0,ux.isNil)(s)&&(u[i]=s),u}ke.getStyle=qct;function Zct(e){return(0,ux.deepMix)({},{fill:"#CCD6EC",fillOpacity:.3},(0,ux.get)(e,["background","style"]))}ke.getBackgroundRectStyle=Zct;var Ph={};Object.defineProperty(Ph,"__esModule",{value:!0});Ph.splitPoints=void 0;var H$=Y;function Qct(e){var r=e.x,t=(0,H$.isArray)(e.y)?e.y:[e.y];return t.map(function(i,n){return{x:(0,H$.isArray)(r)?r[n]:r,y:i}})}Ph.splitPoints=Qct;var Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});Zp.getLineMarker=void 0;var Kct={line:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dot:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dash:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},smooth:function(e,r,t){return[["M",e-t,r],["A",t/2,t/2,0,1,1,e,r],["A",t/2,t/2,0,1,0,e+t,r]]},hv:function(e,r,t){return[["M",e-t-1,r-2.5],["L",e,r-2.5],["L",e,r+2.5],["L",e+t+1,r+2.5]]},vh:function(e,r,t){return[["M",e-t-1,r+2.5],["L",e,r+2.5],["L",e,r-2.5],["L",e+t+1,r-2.5]]},hvh:function(e,r,t){return[["M",e-(t+1),r+2.5],["L",e-t/2,r+2.5],["L",e-t/2,r-2.5],["L",e+t/2,r-2.5],["L",e+t/2,r+2.5],["L",e+t+1,r+2.5]]},vhv:function(e,r){return[["M",e-5,r+2.5],["L",e-5,r],["L",e,r],["L",e,r-3],["L",e,r+3],["L",e+6.5,r+3]]}};function Jct(e,r){var t=e.color;return{symbol:Kct[r],style:{lineWidth:2,r:6,stroke:t}}}Zp.getLineMarker=Jct;Object.defineProperty(Cj,"__esModule",{value:!0});var nO=Y,Sj=re,tft=xn,eft=ke,Y$=cc,rft=Ph,ift=Zp;function nft(e,r,t){for(var i=e.isStack,n=e.connectNulls,a=e.isInCircle,o=e.showSinglePoint,l=(0,eft.getStyle)(e,!0,!1,"lineWidth"),s=(0,tft.getPathPoints)(e.points,n,o),u=[],c=0,f=s.length;c<f;c++){var h=s[c];u=u.concat(oft(h,a,i,r,t,l))}return l.path=u,l}function eT(e,r,t,i,n){if(e.length===1)return[["M",e[0].x,e[0].y-n.lineWidth/2],["L",e[0].x,e[0].y],["L",e[0].x,e[0].y+n.lineWidth/2]];var a;return t?(r&&e.length&&e.push({x:e[0].x,y:e[0].y}),a=(0,Y$.getSplinePath)(e,!1,i)):(a=(0,Y$.getLinePath)(e,!1),r&&a.push(["Z"])),a}function aft(e,r,t,i,n,a){var o=[],l=[];(0,nO.each)(e,function(c){var f=(0,rft.splitPoints)(c);o.push(f[1]),l.push(f[0])});var s=eT(o,r,i,n,a),u=eT(l,r,i,n,a);return t?s:s.concat(u)}function oft(e,r,t,i,n,a){if(e.length){var o=e[0];return(0,nO.isArray)(o.y)?aft(e,r,t,i,n,a):eT(e,r,i,n,a)}return[]}var lft=(0,Sj.registerShapeFactory)("line",{defaultShapeType:"line"});(0,nO.each)(["line","dot","dash","smooth"],function(e){(0,Sj.registerShape)("line",e,{draw:function(r,t){var i=e==="smooth",n;if(i){var a=this.coordinate,o=a.start,l=a.end;n=[[o.x,l.y],[l.x,o.y]]}var s=nft(r,i,n),u=t.addShape({type:"path",attrs:s,name:"line",capture:!i});return u},getMarker:function(r){return(0,ift.getLineMarker)(r,e)}})});Cj.default=lft;Object.defineProperty(qp,"__esModule",{value:!0});var aO=j,sft=Kt,uft=(0,aO.__importDefault)(Pa),cft=(0,aO.__importDefault)(Hp),fft=Yp,hft=Wp,vft=function(e){(0,aO.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="path",i.shapeType="line";var n=t.connectNulls,a=n===void 0?!1:n,o=t.showSinglePoint,l=o===void 0?!0:o;return i.connectNulls=a,i.showSinglePoint=l,i}return r.prototype.updateElements=function(t,i){i===void 0&&(i=!1);for(var n=new Map,a=new Map,o=[],l=0,s=0;s<t.length;s++){var u=t[s],c=this.getElementId(u);o.push(c),n.set(c,u),a.set(c,l),l++}this.elements=new Array(l);for(var f=(0,hft.diff)(this.lastElementsMap,o),h=f.added,v=f.updated,d=f.removed,p=0,x=h;p<x.length;p++){var c=x[p],u=n.get(c),m=this.getShapeFactory(),_=this.getShapeInfo(u),s=a.get(c),b=new cft.default({shapeFactory:m,container:this.container,offscreenGroup:this.getOffscreenGroup(),elementIndex:s});b.geometry=this,b.animate=this.animateOption,b.draw(_,i),this.elementsMap[c]=b,this.elements[s]=b}for(var w=0,S=v;w<S.length;w++){var c=S[w],u=n.get(c),b=this.lastElementsMap[c],s=a.get(c),_=this.getShapeInfo(u),M=b.getModel();(this.isCoordinateChanged||(0,fft.isModelChange)(M,_))&&(b.animate=this.animateOption,b.update(_)),this.elementsMap[c]=b,this.elements[s]=b}for(var O=0,F=d;O<F.length;O++){var c=F[O],b=this.lastElementsMap[c];b.animate=this.animateOption,b.destroy()}},r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var l=t[a];i.push({x:l.x,y:l.y}),n.push(l[sft.FIELD_ORIGIN])}return{points:i,data:n}},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=this.getPointsAndData(t),a=n.points,o=n.data;return i.mappingData=t,i.data=o,i.isStack=!!this.getAdjust("stack"),i.points=a,i.connectNulls=this.connectNulls,i.showSinglePoint=this.showSinglePoint,i},r}(uft.default),dft=qp.default=vft,Aj={},ol={};Object.defineProperty(ol,"__esModule",{value:!0});var Tj=ol.getConstraint=oO=ol.getShapeAttrs=void 0,pft=Y,gft=xn,yft=ke,W$=cc;function mft(e,r,t,i,n){var a=[];if(e.length){for(var o=[],l=[],s=0,u=e.length;s<u;s++){var c=e[s];o.push(c[1]),l.push(c[0])}l=l.reverse(),(0,pft.each)([o,l],function(f,h){var v=[],d=i.parsePoints(f),p=d[0];o.length===1&&l.length===1?v=h===0?[["M",p.x-.5,p.y],["L",p.x+.5,p.y]]:[["L",p.x+.5,p.y],["L",p.x-.5,p.y]]:(r&&d.push({x:p.x,y:p.y}),t?v=(0,W$.getSplinePath)(d,!1,n):v=(0,W$.getLinePath)(d,!1),h>0&&(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;h<v;h++){var d=c[h];f=f.concat(mft(d,l,t,i,n))}return a.path=f,a}var oO=ol.getShapeAttrs=xft;function _ft(e){var r=e.start,t=e.end;return[[r.x,t.y],[t.x,r.y]]}Tj=ol.getConstraint=_ft;Object.defineProperty(Aj,"__esModule",{value:!0});var bft=Y,Mj=re,wft=ol,Cft=(0,Mj.registerShapeFactory)("area",{defaultShapeType:"area",getDefaultPoints:function(e){var r=e.x,t=e.y0,i=(0,bft.isArray)(e.y)?e.y:[t,e.y];return i.map(function(n){return{x:r,y:n}})}});(0,Mj.registerShape)("area","area",{draw:function(e,r){var t=(0,wft.getShapeAttrs)(e,!1,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r}}}});Aj.default=Cft;Object.defineProperty(iO,"__esModule",{value:!0});var Ej=j,Sft=Kt,Aft=(0,Ej.__importDefault)(qp),Tft=function(e){(0,Ej.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="area",i.shapeType="area",i.generatePoints=!0,i.startOnZero=!0;var n=t.startOnZero,a=n===void 0?!0:n,o=t.sortable,l=o===void 0?!1:o,s=t.showSinglePoint,u=s===void 0?!1:s;return i.startOnZero=a,i.sortable=l,i.showSinglePoint=u,i}return r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var l=t[a];i.push(l.points),n.push(l[Sft.FIELD_ORIGIN])}return{points:i,data:n}},r.prototype.getYMinValue=function(){if(this.startOnZero)return e.prototype.getYMinValue.call(this);var t=this.getYScale();return t.min},r}(Aft.default),Mft=iO.default=Tft,lO={},Oj={};Object.defineProperty(Oj,"__esModule",{value:!0});var X$=j,Fj=re,Eft=ke,Oft=cc,Fft=Ph,Pft=(0,Fj.registerShapeFactory)("edge",{defaultShapeType:"line",getDefaultPoints:function(e){return(0,Fft.splitPoints)(e)}});(0,Fj.registerShape)("edge","line",{draw:function(e,r){var t=(0,Eft.getStyle)(e,!0,!1,"lineWidth"),i=(0,Oft.getLinePath)(this.parsePoints(e.points),this.coordinate.isPolar);return r.addShape("path",{attrs:(0,X$.__assign)((0,X$.__assign)({},t),{path:i})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});Oj.default=Pft;Object.defineProperty(lO,"__esModule",{value:!0});var Pj=j,Ift=(0,Pj.__importDefault)(Pa),Lft=function(e){(0,Pj.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="edge",t.shapeType="edge",t.generatePoints=!0,t}return r}(Ift.default),Dft=lO.default=Lft,sO={},Ij=_r(SK);Object.defineProperty(sO,"__esModule",{value:!0});var md=j,$ft=(0,md.__importDefault)(Ij),ym=Y,bv=Kt,kft=(0,md.__importDefault)(Pa),Rft=function(e){(0,md.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t.paletteCache={},t}return r.prototype.updateElements=function(t,i){for(var n=0;n<t.length;n++){var a=t[n],o=this.prepareRange(a),l=this.prepareSize(),s=(0,ym.get)(this.styleOption,["cfg","shadowBlur"]);(0,ym.isNumber)(s)||(s=l/2),this.prepareGreyScaleBlurredCircle(l,s),this.drawWithRange(a,o,l,s)}},r.prototype.color=function(t,i){return this.createAttrOption("color",t,typeof i!="function"?i:""),this},r.prototype.clear=function(){e.prototype.clear.call(this),this.clearShadowCanvasCtx(),this.paletteCache={}},r.prototype.prepareRange=function(t){var i=this.getAttribute("color"),n=i.getFields()[0],a=1/0,o=-1/0;return t.forEach(function(l){var s=l[bv.FIELD_ORIGIN][n];s>o&&(o=s),s<a&&(a=s)}),a===o&&(a=o-1),[a,o]},r.prototype.prepareSize=function(){var t=this.getDefaultValue("size");return(0,ym.isNumber)(t)||(t=this.getDefaultSize()),t},r.prototype.prepareGreyScaleBlurredCircle=function(t,i){var n=this.getGrayScaleBlurredCanvas(),a=t+i,o=n.getContext("2d");n.width=n.height=a*2,o.clearRect(0,0,n.width,n.height),o.shadowOffsetX=o.shadowOffsetY=a*2,o.shadowBlur=i,o.shadowColor="black",o.beginPath(),o.arc(-a,-a,t,0,Math.PI*2,!0),o.closePath(),o.fill()},r.prototype.drawWithRange=function(t,i,n,a){var o=this.coordinate,l=o.start,s=o.end,u=this.coordinate.getWidth(),c=this.coordinate.getHeight(),f=this.getAttribute("color"),h=f.getFields()[0];this.clearShadowCanvasCtx();var v=this.getShadowCanvasCtx();i&&(t=t.filter(function(F){return F[bv.FIELD_ORIGIN][h]<=i[1]&&F[bv.FIELD_ORIGIN][h]>=i[0]}));for(var d=this.scales[h],p=0,x=t;p<x.length;p++){var m=x[p],_=this.getDrawCfg(m),b=_.x,w=_.y,S=d.scale(m[bv.FIELD_ORIGIN][h]);this.drawGrayScaleBlurredCircle(b-l.x,w-s.y,n+a,S,v)}var M=v.getImageData(0,0,u,c);this.clearShadowCanvasCtx(),this.colorize(M),v.putImageData(M,0,0);var O=this.getImageShape();O.attr("x",l.x),O.attr("y",s.y),O.attr("width",u),O.attr("height",c),O.attr("img",v.canvas),O.set("origin",this.getShapeInfo(t))},r.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),i=this.coordinate;return Math.min(i.getWidth()/(t.scales[0].ticks.length*4),i.getHeight()/(t.scales[1].ticks.length*4))},r.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},r.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},r.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},r.prototype.drawGrayScaleBlurredCircle=function(t,i,n,a,o){var l=this.getGrayScaleBlurredCanvas();o.globalAlpha=a,o.drawImage(l,t-n,i-n)},r.prototype.colorize=function(t){for(var i=this.getAttribute("color"),n=t.data,a=this.paletteCache,o=3;o<n.length;o+=4){var l=n[o];if((0,ym.isNumber)(l)){var s=a[l]?a[l]:$ft.default.rgb2arr(i.gradient(l/256));n[o-3]=s[0],n[o-2]=s[1],n[o-1]=s[2],n[o]=l}}},r.prototype.getImageShape=function(){var t=this.imageShape;if(t)return t;var i=this.container;return t=i.addShape({type:"image",attrs:{}}),this.imageShape=t,t},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=t.map(function(a){return a[bv.FIELD_ORIGIN]});return(0,md.__assign)((0,md.__assign)({},i),{mappingData:t,data:n})},r}(kft.default),Bft=sO.default=Rft,uO={},Lj={},pr={};Object.defineProperty(pr,"__esModule",{value:!0});pr.getRectWithCornerRadius=pr.getFunnelPath=pr.getIntervalRectPath=pr.getBackgroundRectPath=pr.parseRadius=pr.getRectPath=pr.getRectPoints=void 0;var Ud=Y,ZC=Se;function Nft(e){var r=e.x,t=e.y,i=e.y0,n=e.size,a,o;(0,Ud.isArray)(t)?(a=t[0],o=t[1]):(a=i,o=t);var l,s;(0,Ud.isArray)(r)?(l=r[0],s=r[1]):(l=r-n/2,s=r+n/2);var u=[{x:l,y:a},{x:l,y:o}];return u.push({x:s,y:o},{x:s,y:a}),u}pr.getRectPoints=Nft;function Dj(e,r){r===void 0&&(r=!0);var t=[],i=e[0];t.push(["M",i.x,i.y]);for(var n=1,a=e.length;n<a;n++)t.push(["L",e[n].x,e[n].y]);return r&&(t.push(["L",i.x,i.y]),t.push(["z"])),t}pr.getRectPath=Dj;function pf(e,r){var t=0,i=0,n=0,a=0;return(0,Ud.isArray)(e)?e.length===1?t=i=n=a=e[0]:e.length===2?(t=n=e[0],i=a=e[1]):e.length===3?(t=e[0],i=a=e[1],n=e[2]):(t=e[0],i=e[1],n=e[2],a=e[3]):t=i=n=a=e,t+i>r&&(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.y<s.y?(s=e[0],l=e[1],c=e[2],u=e[3],i=pf(t,Math.min(c.x-l.x,l.y-s.y)),p=i[0],d=i[1],v=i[2],h=i[3]):(n=pf(t,Math.min(c.x-l.x,l.y-s.y)),h=n[0],v=n[1],d=n[2],p=n[3]),r.isTransposed&&(l=e[0],c=e[1],u=e[2],s=e[3],e[0].x>e[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;a<t;a++){var o=i[a]-i[a-1];n>o&&(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;m<L&&(m=L)}return m}Ih.getDefaultSize=qft;Object.defineProperty(uO,"__esModule",{value:!0});var kj=j,q$=Y,Zft=be,Qft=(0,kj.__importDefault)(Pa),Kft=Ih,Jft=Ur,tht=function(e){(0,kj.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="interval",i.shapeType="interval",i.generatePoints=!0;var n=t.background;return i.background=n,i}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,l=(0,Zft.getXDimensionLength)(o);n=n/l}else this.defaultSize||(this.defaultSize=(0,Kft.getDefaultSize)(this)),n=this.defaultSize;return i.size=n,i},r.prototype.adjustScale=function(){e.prototype.adjustScale.call(this);var t=this.getYScale();if(this.coordinate.type==="theta")t.change({nice:!1,min:0,max:(0,Jft.getMaxScale)(t)});else{var i=this.scaleDefs,n=t.field,a=t.min,o=t.max,l=t.type;l!=="time"&&(a>0&&!(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;u<c.length;u++){var f=c[u];s.addShape({type:"marker",attrs:(0,Bc.__assign)((0,Bc.__assign)((0,Bc.__assign)({},a),{symbol:Z$.MarkerSymbols[i]||i}),f)})}return s}return t.addShape({type:"marker",attrs:(0,Bc.__assign)((0,Bc.__assign)((0,Bc.__assign)({},a),{symbol:Z$.MarkerSymbols[i]||i}),l)})}uo.drawPoints=oht;Object.defineProperty(Bj,"__esModule",{value:!0});var lht=Y,sht=Ps,Nj=re,uht=Ph,Q$=uo,cht=(0,Nj.registerShapeFactory)("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return(0,uht.splitPoints)(e)}});(0,lht.each)(Q$.SHAPES,function(e){(0,Nj.registerShape)("point","hollow-"+e,{draw:function(r,t){return(0,Q$.drawPoints)(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:sht.MarkerSymbols[e]||e,style:{r:4.5,stroke:t,fill:null}}}})});Bj.default=cht;Object.defineProperty(fO,"__esModule",{value:!0});var m0=j,fht=(0,m0.__importDefault)(Pa),hht=function(e){(0,m0.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return(0,m0.__assign)((0,m0.__assign)({},i),{isStack:!!this.getAdjust("stack")})},r}(fht.default),vht=fO.default=hht,hO={},Gj={};Object.defineProperty(Gj,"__esModule",{value:!0});var K$=j,cx=Y,zj=re,dht=ke;function pht(e){for(var r=e[0],t=1,i=[["M",r.x,r.y]];t<e.length;){var n=e[t];(n.x!==e[t-1].x||n.y!==e[t-1].y)&&(i.push(["L",n.x,n.y]),n.x===r.x&&n.y===r.y&&t<e.length-1&&(r=e[t+1],i.push(["Z"]),i.push(["M",r.x,r.y]),t++)),t++}return(0,cx.isEqual)((0,cx.last)(i),r)||i.push(["L",r.x,r.y]),i.push(["Z"]),i}var ght=(0,zj.registerShapeFactory)("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(e){var r=[];return(0,cx.each)(e.x,function(t,i){var n=e.y[i];r.push({x:t,y:n})}),r}});(0,zj.registerShape)("polygon","polygon",{draw:function(e,r){if(!(0,cx.isEmpty)(e.points)){var t=(0,dht.getStyle)(e,!0,!0),i=this.parsePath(pht(e.points));return r.addShape("path",{attrs:(0,K$.__assign)((0,K$.__assign)({},t),{path:i}),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});Gj.default=ght;Object.defineProperty(hO,"__esModule",{value:!0});var Vj=j,xm=Y,yht=(0,Vj.__importDefault)(Pa),mht=function(e){(0,Vj.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polygon",t.shapeType="polygon",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n=i.x,a=i.y,o;if(!((0,xm.isArray)(n)&&(0,xm.isArray)(a))){var l=this.getXScale(),s=this.getYScale(),u=l.values.length,c=s.values.length,f=.5*1/u,h=.5*1/c;l.isCategory&&s.isCategory?(n=[n-f,n-f,n+f,n+f],a=[a-h,a+h,a+h,a-h]):(0,xm.isArray)(n)?(o=n,n=[o[0],o[0],o[1],o[1]],a=[a-h/2,a+h/2,a+h/2,a-h/2]):(0,xm.isArray)(a)&&(o=a,a=[o[0],o[1],o[1],o[0]],n=[n-f/2,n-f/2,n+f/2,n+f/2]),i.x=n,i.y=a}return i},r}(yht.default),xht=hO.default=mht,vO={},jj={};Object.defineProperty(jj,"__esModule",{value:!0});var _ht=re,bht=(0,_ht.registerShapeFactory)("schema",{defaultShapeType:""});jj.default=bht;Object.defineProperty(vO,"__esModule",{value:!0});var Hj=j,wht=be,Cht=(0,Hj.__importDefault)(Pa),Sht=Ih,Aht=function(e){(0,Hj.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="schema",t.shapeType="schema",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,l=(0,wht.getXDimensionLength)(o);n=n/l}else this.defaultSize||(this.defaultSize=(0,Sht.getDefaultSize)(this)),n=this.defaultSize;return i.size=n,i},r}(Cht.default),Tht=vO.default=Aht,dO={},Yj={};Object.defineProperty(Yj,"__esModule",{value:!0});var J$=j,x0=Y,Wj=re,Mht=xn,Eht=ke;function Oht(e){if(!(0,x0.isArray)(e))return[];var r=(0,x0.max)(e);return(0,x0.map)(e,function(t){return t/r})}var Fht=(0,Wj.registerShapeFactory)("violin",{defaultShapeType:"violin",getDefaultPoints:function(e){var r=e.size/2,t=[],i=Oht(e._size);return(0,x0.each)(e.y,function(n,a){var o=i[a]*r,l=a===0,s=a===e.y.length-1;t.push({isMin:l,isMax:s,x:e.x-o,y:n}),t.unshift({isMin:l,isMax:s,x:e.x+o,y:n})}),t}});(0,Wj.registerShape)("violin","violin",{draw:function(e,r){var t=(0,Eht.getStyle)(e,!0,!0),i=this.parsePath((0,Mht.getViolinPath)(e.points));return r.addShape("path",{attrs:(0,J$.__assign)((0,J$.__assign)({},t),{path:i}),name:"violin"})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:r}}}});Yj.default=Fht;Object.defineProperty(dO,"__esModule",{value:!0});var Xj=j,Pht=Y,Iht=Kt,Lht=be,Dht=Ih,$ht=(0,Xj.__importDefault)(Pa),kht=function(e){(0,Xj.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t.shapeType="violin",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,l=(0,Lht.getXDimensionLength)(o);n=n/l}else this.defaultSize||(this.defaultSize=(0,Dht.getDefaultSize)(this)),n=this.defaultSize;return i.size=n,i._size=(0,Pht.get)(t[Iht.FIELD_ORIGIN],[this._sizeField]),i},r.prototype.initAttributes=function(){var t=this.attributeOption,i=t.size?t.size.fields[0]:this._sizeField?this._sizeField:"size";this._sizeField=i,delete t.size,e.prototype.initAttributes.call(this)},r}($ht.default);dO.default=kht;var Rht=re,Bht=ol;(0,Rht.registerShape)("area","line",{draw:function(e,r){var t=(0,Bht.getShapeAttrs)(e,!0,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}});var Nht=re,tk=ol;(0,Nht.registerShape)("area","smooth",{draw:function(e,r){var t=this.coordinate,i=(0,tk.getShapeAttrs)(e,!1,!0,this,(0,tk.getConstraint)(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r}}}});var Ght=re,ek=ol;(0,Ght.registerShape)("area","smooth-line",{draw:function(e,r){var t=this.coordinate,i=(0,ek.getShapeAttrs)(e,!0,!0,this,(0,ek.getConstraint)(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}});var Ku={};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.getQPath=Ku.getCPath=void 0;var zht=Y;function Vht(e,r){return["C",e.x*1/2+r.x*1/2,e.y,e.x*1/2+r.x*1/2,r.y,r.x,r.y]}Ku.getCPath=Vht;function jht(e,r){var t=[];t.push({x:r.x,y:r.y}),t.push(e);var i=["Q"];return(0,zht.each)(t,function(n){i.push(n.x,n.y)}),i}Ku.getQPath=jht;var Nc=j,Hht=Se,Yht=re,Wht=ke,qd=Ku;function Xht(e,r,t){var i=(0,qd.getQPath)(r,t),n=[["M",e.x,e.y]];return n.push(i),n}function Uht(e,r){var t=(0,qd.getQPath)(e[1],r),i=(0,qd.getQPath)(e[3],r),n=[["M",e[0].x,e[0].y]];return n.push(i),n.push(["L",e[3].x,e[3].y]),n.push(["L",e[2].x,e[2].y]),n.push(t),n.push(["L",e[1].x,e[1].y]),n.push(["L",e[0].x,e[0].y]),n.push(["Z"]),n}(0,Yht.registerShape)("edge","arc",{draw:function(e,r){var t=(0,Wht.getStyle)(e,!0,!1,"lineWidth"),i=e.points,n=i.length>2?"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;o<l.length;o++){var s=l[o];a.addShape("image",{attrs:{x:s.x-t/2,y:s.y-t,width:t,height:t,img:e.shape[1]}})}return a}return r.addShape("image",{attrs:{x:n.x-t/2,y:n.y-t,width:t,height:t,img:e.shape[1]}})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4.5,fill:r}}}});var Ivt=Y,Lvt=Ps,Dvt=re,dk=uo;(0,Ivt.each)(dk.SHAPES,function(e){(0,Dvt.registerShape)("point",e,{draw:function(r,t){return(0,dk.drawPoints)(this,r,t,e,!1)},getMarker:function(r){var t=r.color;return{symbol:Lvt.MarkerSymbols[e]||e,style:{r:4.5,fill:t}}}})});var pk=j,rT=Y,$vt=re,kvt=ke;function gk(e){var r=(0,rT.isArray)(e)?e:[e],t=r[0],i=r[r.length-1],n=r.length>1?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.y<v&&(v=S.y),{size:t,targets:[S.y-u]}});for(v-=u,h-u>c&&(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;_<b.length;_++){var w=b[_];m[w.get("id")]=w}r.forEach(function(S){var M=S.r*S.r,O=Math.pow(Math.abs(S.y-n.y),2);if(M<O)S.x=n.x;else{var F=Math.sqrt(M-O);a?S.x=n.x+F:S.x=n.x-F}var L=m[S.id];L.attr("x",S.x),L.attr("y",S.y);var D=(0,qv.find)(L.getChildren(),function(R){return R.get("type")==="text"});D&&(D.attr("y",S.y),D.attr("x",S.x))})}function ldt(e,r,t,i){if(!(!e.length||!r.length)){var n=e[0]?e[0].offset:0,a=r[0].get("coordinate"),o=a.getRadius(),l=a.getCenter();if(n>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.y<c&&(c=d.y),{content:d.content,size:r,targets:[d.y-a],pos:null}});for(c-=a,u-a>l&&(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&&n<Math.PI/2&&u.y>o.y&&(p=1),n>=Math.PI/2&&n<Math.PI&&o.y>u.y&&(p=1),(n<-Math.PI/2||n>=Math.PI&&n<Math.PI*1.5)&&o.y>u.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.x<t.x?1:-1;f.push("M "+u.x+" "+u.y);var S=(o.y-t.y)/(o.x-t.x),M=(u.y-t.y)/(u.x-t.x);Math.abs(S-M)>Math.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;u<c.length;u++){var f=c[u];s[f.get("id")]=f}var h=(0,zn.get)(n[0],"labelHeight",14),v=(0,zn.get)(n[0],"offset",0);if(!(v<=0)){var d="left",p="right",x=(0,zn.groupBy)(n,function(M){return M.x<o.x?d:p}),m=a.start,_=a.end,b=Math.min((l+v+h)*2,a.getHeight()),w=b/2,S={minX:m.x,maxX:_.x,minY:o.y-w,maxY:o.y+w};(0,zn.each)(x,function(M,O){var F=Math.floor(b/h);M.length>F&&(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.y<o.y?s.y=l.y:(s.y=o.y,s.x=Math.max(s.x,l.x-f))),e.angle>0&&e.angle<Math.PI/2&&(l.x=Math.max(o.x,a.x-f),a.y>o.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.y<o.y?s.y=l.y:(s.y=o.y,s.x=Math.min(s.x,l.x-f)))}c=["M "+a.x+","+a.y,"L "+l.x+","+l.y,"L "+s.x+","+s.y,"L "+o.x+","+o.y,"L "+u.x+","+u.y].join(" "),e.labelLine=(0,un.deepMix)({},e.labelLine,{path:c})}function gdt(e,r,t,i){var n=r[0]&&r[0].get("coordinate");if(!!n){for(var a=n.getCenter(),o=n.getRadius(),l={},s=0,u=r;s<u.length;s++){var c=u[s];l[c.get("id")]=c}var f=(0,un.get)(e[0],"labelHeight",14),h=Math.max((0,un.get)(e[0],"offset",0),nT);(0,un.each)(e,function(M){var O=(0,un.get)(l,[M.id]);if(!!O){var F=M.x>a.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<a.x?p:x}),_=(o+h)*2+f;(0,un.each)(m,function(M){var O=M.length*f;O>_&&(_=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.y<w||L.y>S){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;(c<a||h<a)&&(_=a),(f<o||v<o)&&(b=o),c>l?_=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.minX<l.minX||o.minY<l.minY||o.maxX>l.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))<s&&p<t;)if(u=v(c+=i),f=~~u[0],h=~~u[1],!(!f&&!h||x[f+"-"+h])&&(e.attr({x:a+f,y:o+h}),f+h<0&&e.attr("textAlign","right"),p++,r.hasGap(e.getCanvasBBox()))){r.fillGap(e.getCanvasBBox()),d=!0,x[f+"-"+h]=!0;break}return d}function Sdt(e,r,t,i){var n=e.getCanvasBBox(),a=n.width,o=n.height,l={x:r,y:t,textAlign:"center"};switch(i){case 0:l.y-=o+1,l.x+=1,l.textAlign="left";break;case 1:l.y-=o+1,l.x-=1,l.textAlign="right";break;case 2:l.y+=o+1,l.x-=1,l.textAlign="right";break;case 3:l.y+=o+1,l.x+=1,l.textAlign="left";break;case 5:l.y-=o*2+2;break;case 6:l.y+=o*2+2;break;case 7:l.x+=a+1,l.textAlign="left";break;case 8:l.x-=a+1,l.textAlign="right";break}return e.attr(l),e.getCanvasBBox()}function Adt(e,r,t,i){var n=new aH;(0,nH.each)(r,function(a){var o=a.find(function(l){return l.get("type")==="text"});Cdt(o,n)||a.remove(!0)}),n.destroy()}var oH=Uf.fixedOverlap=Adt;function Tdt(e,r,t,i){var n=new aH;(0,nH.each)(r,function(a){for(var o=a.find(function(v){return v.get("type")==="text"}),l=o.attr(),s=l.x,u=l.y,c=!1,f=0;f<=8;f++){var h=Sdt(o,s,u,f);if(n.hasGap(h)){n.fillGap(h),c=!0;break}}c||a.remove(!0)}),n.destroy()}iH=Uf.overlap=Tdt;var e_={},qf={};Object.defineProperty(qf,"__esModule",{value:!0});qf.isIntersect=qf.isIntersectRect=void 0;var Mk=j,Mdt=Y,Edt=ta,Odt=Edt.vec2.dot;function Ek(e){if(e.length>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.min<r.max}function Pdt(e){return(0,Mdt.isNumber)(e)&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0}function Pk(e){return Object.values(e).every(Pdt)}function lH(e,r,t){return t===void 0&&(t=0),!(r.x>e.x+e.width+t||r.x+r.width<e.x-t||r.y>e.y+e.height+t||r.y+r.height<e.y-t)}qf.isIntersectRect=lH;function Idt(e,r){if(!Pk(e)||!Pk(r))return!1;if(!e.rotation&&!r.rotation)return lH(e,r);for(var t=Ok(e),i=Ok(r),n=(0,Mk.__spreadArray)((0,Mk.__spreadArray)([],Ek(t),!0),Ek(i),!0),a=0;a<n.length;a++){var o=n[a],l=Fk(t,o),s=Fk(i,o);if(!Fdt(l,s))return!1}return!0}qf.isIntersect=Idt;Object.defineProperty(e_,"__esModule",{value:!0});e_.hideOverlap=void 0;var Ik=Y,Ldt=qf,Lk=Ai;function Ddt(e,r,t,i){for(var n=0;n<r.length;n++){var a=r[n];if(r[n].get("visible"))for(var o=n+1;o<r.length;o++){var l=r[o];if(a&&l&&a!==l&&l.get("visible")){var s=(0,Lk.getlLabelBackgroundInfo)(a,e[n],(0,Ik.get)(e[n],"background.padding")),u=(0,Lk.getlLabelBackgroundInfo)(l,e[o],(0,Ik.get)(e[o],"background.padding"));(0,Ldt.isIntersect)(s,u)&&r[o].set("visible",!1)}}}}e_.hideOverlap=Ddt;var r_={},i_={};Object.defineProperty(i_,"__esModule",{value:!0});i_.isContrastColorWhite=void 0;var $dt=j,Dk=(0,$dt.__importDefault)(Ij),$k={"#5B8FF9":!0},kdt=function(e){var r=Dk.default.toRGB(e).toUpperCase();if($k[r])return $k[r];var t=Dk.default.rgb2arr(r),i=t[0],n=t[1],a=t[2],o=(i*299+n*587+a*114)/1e3<128;return o};i_.isContrastColorWhite=kdt;Object.defineProperty(r_,"__esModule",{value:!0});r_.adjustColor=void 0;var kk=Kr,Rdt=i_;function Bdt(e,r,t){if(t.length!==0){var i=t[0].get("element"),n=i.geometry.theme,a=n.labels||{},o=a.fillColorLight,l=a.fillColorDark;t.forEach(function(s,u){var c=r[u],f=c.find(function(m){return m.get("type")==="text"}),h=kk.BBox.fromObject(s.getBBox()),v=kk.BBox.fromObject(f.getCanvasBBox()),d=!h.contains(v),p=s.attr("fill"),x=(0,Rdt.isContrastColorWhite)(p);d?f.attr(n.overflowLabels.style):x?o&&f.attr("fill",o):l&&f.attr("fill",l)})}}r_.adjustColor=Bdt;var n_={};Object.defineProperty(n_,"__esModule",{value:!0});n_.intervalAdjustPosition=void 0;var aT=Kr,sH=Ai;function Ndt(e,r,t){var i=e.coordinate,n=(0,sH.findLabelTextShape)(r),a=aT.BBox.fromObject(n.getCanvasBBox()),o=aT.BBox.fromObject(t.getBBox());return i.isTransposed?o.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<c||_<c)&&(F=c),a.indexOf("top")>=0&&(m<f||b<f)&&(L=f),a.indexOf("right")>=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<l;u++)for(var c=n[u],f=0;f<o;f++){var h=n[f],v={type:a,data:t,region:this.getRegion(o,l,u,f),columnValue:c,rowValue:h,columnField:c,rowField:h,columnIndex:u,rowIndex:f,columnValuesLength:l,rowValuesLength:o};s.push(v)}return s},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,eu.__assign)((0,eu.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,eu.__assign)((0,eu.__assign)({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;(0,Gc.each)(this.facets,function(i,n){var a=i.columnIndex,o=i.rowIndex,l=i.columnValuesLength;i.rowValuesLength;var s=i.columnValue,u=i.rowValue,c=i.view;if(o===0){var f=(0,Gc.get)(t.cfg.columnTitle,"formatter"),h=(0,Gc.deepMix)({position:["50%","0%"],content:f?f(s):s},(0,zk.getFactTitleConfig)(Gk.DIRECTION.TOP),t.cfg.columnTitle);c.annotation().text(h)}if(a===l-1){var f=(0,Gc.get)(t.cfg.rowTitle,"formatter"),h=(0,Gc.deepMix)({position:["100%","50%"],content:f?f(u):u},(0,zk.getFactTitleConfig)(Gk.DIRECTION.RIGHT),t.cfg.rowTitle);c.annotation().text(h)}})},r}(ppt.Facet),ypt=_O.default=gpt,bO={};Object.defineProperty(bO,"__esModule",{value:!0});var eS=j,zc=Y,Vk=Kt,jk=Ma,mpt=_o,xpt=function(e){(0,eS.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,zc.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"mirror",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this),transpose:!1})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.beforeEachView=function(t,i){this.cfg.transpose?i.columnIndex%2===0?t.coordinate().transpose().reflect("x"):t.coordinate().transpose():i.rowIndex%2!==0&&t.coordinate().reflect("y")},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.generateFacets=function(t){var i=this,n=this.cfg.fields[0],a=[],o=1,l=1,s=[""],u=[""],c,f;return this.cfg.transpose?(c=n,s=this.getFieldValues(t,c).slice(0,2),o=s.length):(f=n,u=this.getFieldValues(t,f).slice(0,2),l=u.length),s.forEach(function(h,v){u.forEach(function(d,p){var x=[{field:c,value:h,values:s},{field:f,value:d,values:u}],m=(0,zc.filter)(t,i.getFacetDataFilter(x)),_={type:i.cfg.type,data:m,region:i.getRegion(l,o,v,p),columnValue:h,rowValue:d,columnField:c,rowField:f,columnIndex:v,rowIndex:p,columnValuesLength:o,rowValuesLength:l};a.push(_)})}),a},r.prototype.getXAxisOption=function(t,i,n,a){return a.columnIndex===1||a.rowIndex===1?(0,eS.__assign)((0,eS.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;(0,zc.each)(this.facets,function(i,n){var a=i.columnValue,o=i.rowValue,l=i.view,s=(0,zc.get)(t.cfg.title,"formatter");if(t.cfg.transpose){var u=(0,zc.deepMix)({position:["50%","0%"],content:s?s(a):a},(0,jk.getFactTitleConfig)(Vk.DIRECTION.TOP),t.cfg.title);l.annotation().text(u)}else{var u=(0,zc.deepMix)({position:["100%","50%"],content:s?s(o):o},(0,jk.getFactTitleConfig)(Vk.DIRECTION.RIGHT),t.cfg.title);l.annotation().text(u)}})},r}(mpt.Facet),_pt=bO.default=xpt,wO={};Object.defineProperty(wO,"__esModule",{value:!0});var sa=j,ru=Y,Hk=Kt,Yk=Ma,bpt=_o,wpt=function(e){(0,sa.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.getDefaultCfg=function(){return(0,ru.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"rect",columnTitle:(0,sa.__assign)({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,sa.__assign)({},e.prototype.getDefaultTitleCfg.call(this))})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.generateFacets=function(t){var i=this,n=this.cfg.fields,a=n[0],o=n[1],l=[],s=1,u=1,c=[""],f=[""];return a&&(c=this.getFieldValues(t,a),s=c.length),o&&(f=this.getFieldValues(t,o),u=f.length),c.forEach(function(h,v){f.forEach(function(d,p){var x=[{field:a,value:h,values:c},{field:o,value:d,values:f}],m=(0,ru.filter)(t,i.getFacetDataFilter(x)),_={type:i.cfg.type,data:m,region:i.getRegion(u,s,v,p),columnValue:h,rowValue:d,columnField:a,rowField:o,columnIndex:v,rowIndex:p,columnValuesLength:s,rowValuesLength:u};l.push(_)})}),l},r.prototype.renderTitle=function(){var t=this;(0,ru.each)(this.facets,function(i,n){var a=i.columnIndex,o=i.rowIndex,l=i.columnValuesLength,s=i.columnValue,u=i.rowValue,c=i.view;if(o===0){var f=(0,ru.get)(t.cfg.columnTitle,"formatter"),h=(0,ru.deepMix)({position:["50%","0%"],content:f?f(s):s},(0,Yk.getFactTitleConfig)(Hk.DIRECTION.TOP),t.cfg.columnTitle);c.annotation().text(h)}if(a===l-1){var f=(0,ru.get)(t.cfg.rowTitle,"formatter"),h=(0,ru.deepMix)({position:["100%","50%"],content:f?f(u):u},(0,Yk.getFactTitleConfig)(Hk.DIRECTION.RIGHT),t.cfg.rowTitle);c.annotation().text(h)}})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,sa.__assign)((0,sa.__assign)({},n),{title:null,label:null}):a.columnIndex!==Math.floor((a.columnValuesLength-1)/2)?(0,sa.__assign)((0,sa.__assign)({},n),{title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,sa.__assign)((0,sa.__assign)({},n),{title:null,label:null}):a.rowIndex!==Math.floor((a.rowValuesLength-1)/2)?(0,sa.__assign)((0,sa.__assign)({},n),{title:null}):n},r}(bpt.Facet),Cpt=wO.default=wpt,CO={};Object.defineProperty(CO,"__esModule",{value:!0});var Av=j,Tv=Y,Wk=Kt,Spt=Ma,Apt=_o,Tpt=function(e){(0,Av.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.afterChartRender=function(){t.facets&&t.cfg.line&&(t.container.clear(),t.drawLines(t.facets))},t}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.init=function(){e.prototype.init.call(this),this.view.on(Wk.VIEW_LIFE_CIRCLE.AFTER_RENDER,this.afterChartRender)},r.prototype.getDefaultCfg=function(){return(0,Tv.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"tree",line:{style:{lineWidth:1,stroke:"#ddd"},smooth:!1},showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.generateFacets=function(t){var i=this.cfg.fields;if(!i.length)throw new Error("Please specify for the fields for rootFacet!");var n=[],a={type:this.cfg.type,data:t,region:null,rowValuesLength:this.getRows(),columnValuesLength:1,rowIndex:0,columnIndex:0,rowField:"",columnField:"",rowValue:"",columnValue:""};return n.push(a),a.children=this.getChildFacets(t,1,n),this.setRegion(n),n},r.prototype.setRegion=function(t){var i=this;this.forceColIndex(t),t.forEach(function(n){n.region=i.getRegion(n.rowValuesLength,n.columnValuesLength,n.columnIndex,n.rowIndex)})},r.prototype.getRegion=function(t,i,n,a){var o=1/i,l=1/t,s={x:o*n,y:l*a},u={x:s.x+o,y:s.y+l*2/3};return{start:s,end:u}},r.prototype.forceColIndex=function(t){var i=this,n=[],a=0;t.forEach(function(h){i.isLeaf(h)&&(n.push(h),h.columnIndex=a,a++)}),n.forEach(function(h){h.columnValuesLength=n.length});for(var o=this.cfg.fields.length,l=o-1;l>=0;l--)for(var s=this.getFacetsByLevel(t,l),u=0,c=s;u<c.length;u++){var f=c[u];this.isLeaf(f)||(f.originColIndex=f.columnIndex,f.columnIndex=this.getRegionIndex(f.children),f.columnValuesLength=n.length)}},r.prototype.getFacetsByLevel=function(t,i){var n=[];return t.forEach(function(a){a.rowIndex===i&&n.push(a)}),n},r.prototype.getRegionIndex=function(t){var i=t[0],n=t[t.length-1];return(n.columnIndex-i.columnIndex)/2+i.columnIndex},r.prototype.isLeaf=function(t){return!t.children||!t.children.length},r.prototype.getRows=function(){return this.cfg.fields.length+1},r.prototype.getChildFacets=function(t,i,n){var a=this,o=this.cfg.fields,l=o.length;if(!(l<i)){var s=[],u=o[i-1],c=this.getFieldValues(t,u);return c.forEach(function(f,h){var v=[{field:u,value:f,values:c}],d=t.filter(a.getFacetDataFilter(v));if(d.length){var p={type:a.cfg.type,data:d,region:null,columnValue:f,rowValue:"",columnField:u,rowField:"",columnIndex:h,rowValuesLength:a.getRows(),columnValuesLength:1,rowIndex:i,children:a.getChildFacets(d,i+1,n)};s.push(p),n.push(p)}}),s}},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.renderTitle=function(){var t=this;(0,Tv.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,Tv.get)(t.cfg.title,"formatter"),l=(0,Tv.deepMix)({position:["50%","0%"],content:o?o(n):n},(0,Spt.getFactTitleConfig)(Wk.DIRECTION.TOP),t.cfg.title);a.annotation().text(l)})},r.prototype.drawLines=function(t){var i=this;t.forEach(function(n){if(!i.isLeaf(n)){var a=n.children;i.addFacetLines(n,a)}})},r.prototype.addFacetLines=function(t,i){var n=this,a=t.view,o=a.coordinateBBox,l={x:o.x+o.width/2,y:o.y+o.height};i.forEach(function(s){var u=s.view.coordinateBBox,c={x:u.bl.x+(u.tr.x-u.bl.x)/2,y:u.tr.y},f={x:l.x,y:l.y+(c.y-l.y)/2},h={x:c.x,y:f.y};n.drawLine([l,f,h,c])})},r.prototype.getPath=function(t){var i=[],n=this.cfg.line.smooth;return n?(i.push(["M",t[0].x,t[0].y]),i.push(["C",t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y])):t.forEach(function(a,o){o===0?i.push(["M",a.x,a.y]):i.push(["L",a.x,a.y])}),i},r.prototype.drawLine=function(t){var i=this.getPath(t),n=this.cfg.line.style;this.container.addShape("path",{attrs:(0,Tv.assign)({path:i},n)})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,Av.__assign)((0,Av.__assign)({},n),{title:null,label:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.originColIndex!==0&&a.columnIndex!==0?(0,Av.__assign)((0,Av.__assign)({},n),{title:null,label:null}):n},r}(Apt.Facet),Mpt=CO.default=Tpt,SO={},no={};Object.defineProperty(no,"__esModule",{value:!0});no.showGrid=no.getCircleGridItems=no.getLineGridItems=no.getGridThemeCfg=void 0;var Mu=Y;function Ept(e,r){var t=(0,Mu.deepMix)({},(0,Mu.get)(e,["components","axis","common"]),(0,Mu.get)(e,["components","axis",r]));return(0,Mu.get)(t,["grid"],{})}no.getGridThemeCfg=Ept;function Opt(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}no.getLineGridItems=Opt;function Fpt(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:(0,Mu.map)(Array(a+1),function(v,d){return e.convert({x:d/a,y:i?f:h})})}),u},l[0]),o}no.getCircleGridItems=Fpt;function Ppt(e,r){var t=(0,Mu.get)(r,"grid");if(t===null)return!1;var i=(0,Mu.get)(e,"grid");return!(t===void 0&&i===null)}no.showGrid=Ppt;Object.defineProperty(SO,"__esModule",{value:!0});var _u=j,De=Y,ne=Kt,Mm=Qn,Ipt=ul,dr=Fe,Xk=Fe,ua=no,El=yr,Lpt=mo,Ol=["container"],Uk=(0,_u.__assign)((0,_u.__assign)({},Ipt.DEFAULT_ANIMATE_CFG),{appear:null}),Dpt=function(e){(0,_u.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.gridContainer=i.view.getLayer(ne.LAYER.BG).addGroup(),i.gridForeContainer=i.view.getLayer(ne.LAYER.FORE).addGroup(),i.axisContainer=i.view.getLayer(ne.LAYER.BG).addGroup(),i.axisForeContainer=i.view.getLayer(ne.LAYER.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();(0,De.each)(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===ne.COMPONENT_TYPE.AXIS)i.isPolar?u==="x"?h=i.isTransposed?(0,dr.getAxisRegion)(i,o):(0,dr.getCircleAxisCenterRadius)(i):u==="y"&&(h=i.isTransposed?(0,dr.getCircleAxisCenterRadius)(i):(0,dr.getAxisRegion)(i,o)):h=(0,dr.getAxisRegion)(i,o);else if(l===ne.COMPONENT_TYPE.GRID)if(i.isPolar){var v=void 0;i.isTransposed?v=u==="x"?(0,ua.getCircleGridItems)(i,t.view.getYScales()[0],c,f,u):(0,ua.getLineGridItems)(i,c,u,f):v=u==="x"?(0,ua.getLineGridItems)(i,c,u,f):(0,ua.getCircleGridItems)(i,t.view.getXScale(),c,f,u),h={items:v,center:t.view.getCoordinate().getCenter()}}else h={items:(0,ua.getLineGridItems)(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=(0,Xk.getAxisOption)(this.option,i.field);if(n!==!1){var a=(0,dr.getAxisDirection)(n,ne.DIRECTION.BOTTOM),o=ne.LAYER.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);(0,El.omit)(h,Ol),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);(0,El.omit)(h,Ol),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,ne.DIRECTION.RADIUS):this.getCircleAxisCfg(i,n,a);(0,El.omit)(h,Ol),f.component.update(h),t.set(u,f)}else{if(s.isTransposed){if((0,De.isUndefined)(n))return;f=this.createLineAxis(i,n,o,ne.DIRECTION.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,ne.DIRECTION.RADIUS,l):this.getLineGridCfg(i,n,ne.DIRECTION.CIRCLE,l);(0,El.omit)(h,Ol),v.component.update(h),t.set(c,v)}else{if(s.isTransposed){if((0,De.isUndefined)(n))return;v=this.createCircleGrid(i,n,o,ne.DIRECTION.RADIUS,l)}else v=this.createLineGrid(i,n,o,ne.DIRECTION.CIRCLE,l);v&&(this.cache.set(c,v),t.set(c,v))}}}}},r.prototype.updateYAxes=function(t){var i=this,n=this.view.getYScales();(0,De.each)(n,function(a,o){if(!(!a||a.isIdentity)){var l=a.field,s=(0,Xk.getAxisOption)(i.option,l);if(s!==!1){var u=ne.LAYER.BG,c="y",f=i.getId("axis",l),h=i.getId("grid",l),v=i.view.getCoordinate();if(v.isRect){var d=(0,dr.getAxisDirection)(s,o===0?ne.DIRECTION.LEFT:ne.DIRECTION.RIGHT),p=i.cache.get(f);if(p){var x=i.getLineAxisCfg(a,s,d);(0,El.omit)(x,Ol),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);(0,El.omit)(x,Ol),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,ne.DIRECTION.CIRCLE):i.getLineAxisCfg(a,s,ne.DIRECTION.RADIUS);(0,El.omit)(x,Ol),p.component.update(x),t.set(f,p)}else{if(v.isTransposed){if((0,De.isUndefined)(s))return;p=i.createCircleAxis(a,s,u,ne.DIRECTION.CIRCLE,c)}else p=i.createLineAxis(a,s,u,ne.DIRECTION.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,ne.DIRECTION.CIRCLE,c):i.getCircleGridCfg(a,s,ne.DIRECTION.RADIUS,c);(0,El.omit)(x,Ol),m.component.update(x),t.set(h,m)}else{if(v.isTransposed){if((0,De.isUndefined)(s))return;m=i.createLineGrid(a,s,u,ne.DIRECTION.CIRCLE,c)}else m=i.createCircleGrid(a,s,u,ne.DIRECTION.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 Mm.LineAxis(this.getLineAxisCfg(t,i,a)),layer:n,direction:a===ne.DIRECTION.RADIUS?ne.DIRECTION.NONE:a,type:ne.COMPONENT_TYPE.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 Mm.LineGrid(l),layer:n,direction:ne.DIRECTION.NONE,type:ne.COMPONENT_TYPE.GRID,extra:{dim:o,scale:t,alignTick:(0,De.get)(l,"alignTick",!0)}};return s.component.init(),s}},r.prototype.createCircleAxis=function(t,i,n,a,o){var l={component:new Mm.CircleAxis(this.getCircleAxisCfg(t,i,a)),layer:n,direction:a,type:ne.COMPONENT_TYPE.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 Mm.CircleGrid(l),layer:n,direction:ne.DIRECTION.NONE,type:ne.COMPONENT_TYPE.GRID,extra:{dim:o,scale:t,alignTick:(0,De.get)(l,"alignTick",!0)}};return s.component.init(),s}},r.prototype.getLineAxisCfg=function(t,i,n){var a=(0,De.get)(i,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),l=(0,dr.getAxisRegion)(o,n),s=(0,dr.getAxisTitleText)(t,i),u=(0,dr.getAxisThemeCfg)(this.view.getTheme(),n),c=(0,De.get)(i,["title"])?(0,De.deepMix)({title:{style:{text:s}}},{title:(0,dr.getAxisTitleOptions)(this.view.getTheme(),n,i.title)},i):i,f=(0,De.deepMix)((0,_u.__assign)((0,_u.__assign)({container:a},l),{ticks:t.getTicks().map(function(b){return{id:""+b.tickValue,name:b.text,value:b.value}}),verticalFactor:o.isPolar?(0,dr.getAxisFactorByRegion)(l,o.getCenter())*-1:(0,dr.getAxisFactorByRegion)(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=(0,dr.isVertical)(l),x=(0,De.get)(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(!!(0,ua.showGrid)((0,dr.getAxisThemeCfg)(this.view.getTheme(),n),i)){var o=(0,ua.getGridThemeCfg)(this.view.getTheme(),n),l=(0,De.deepMix)({container:(0,De.get)(i,["top"])?this.gridForeContainer:this.gridContainer},o,(0,De.get)(i,"grid"),this.getAnimateCfg(i));return l.items=(0,ua.getLineGridItems)(this.view.getCoordinate(),t,a,(0,De.get)(l,"alignTick",!0)),l}},r.prototype.getCircleAxisCfg=function(t,i,n){var a=(0,De.get)(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=(0,dr.getAxisTitleText)(t,i),u=(0,dr.getAxisThemeCfg)(this.view.getTheme(),ne.DIRECTION.CIRCLE),c=(0,De.get)(i,["title"])?(0,De.deepMix)({title:{style:{text:s}}},{title:(0,dr.getAxisTitleOptions)(this.view.getTheme(),n,i.title)},i):i,f=(0,De.deepMix)((0,_u.__assign)((0,_u.__assign)({container:a},(0,dr.getCircleAxisCenterRadius)(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(!!(0,ua.showGrid)((0,dr.getAxisThemeCfg)(this.view.getTheme(),n),i)){var o=(0,ua.getGridThemeCfg)(this.view.getTheme(),ne.DIRECTION.RADIUS),l=(0,De.deepMix)({container:(0,De.get)(i,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,(0,De.get)(i,"grid"),this.getAnimateCfg(i)),s=(0,De.get)(l,"alignTick",!0),u=a==="x"?this.view.getYScales()[0]:this.view.getXScale();return l.items=(0,ua.getCircleGridItems)(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&&(0,De.get)(t,"animate"),animateOption:t&&t.animateOption?(0,De.deepMix)({},Uk,t.animateOption):Uk}},r}(Lpt.Controller),$pt=SO.default=Dpt,AO={},gs={};Object.defineProperty(gs,"__esModule",{value:!0});gs.getTranslateDirection=gs.directionToPosition=void 0;var Pe=Kt;function kpt(e,r,t){return t===Pe.DIRECTION.TOP?[e.minX+e.width/2-r.width/2,e.minY]:t===Pe.DIRECTION.BOTTOM?[e.minX+e.width/2-r.width/2,e.maxY-r.height]:t===Pe.DIRECTION.LEFT?[e.minX,e.minY+e.height/2-r.height/2]:t===Pe.DIRECTION.RIGHT?[e.maxX-r.width,e.minY+e.height/2-r.height/2]:t===Pe.DIRECTION.TOP_LEFT||t===Pe.DIRECTION.LEFT_TOP?[e.tl.x,e.tl.y]:t===Pe.DIRECTION.TOP_RIGHT||t===Pe.DIRECTION.RIGHT_TOP?[e.tr.x-r.width,e.tr.y]:t===Pe.DIRECTION.BOTTOM_LEFT||t===Pe.DIRECTION.LEFT_BOTTOM?[e.bl.x,e.bl.y-r.height]:t===Pe.DIRECTION.BOTTOM_RIGHT||t===Pe.DIRECTION.RIGHT_BOTTOM?[e.br.x-r.width,e.br.y-r.height]:[0,0]}gs.directionToPosition=kpt;function Rpt(e,r){if(r.isTransposed)switch(e){case Pe.DIRECTION.BOTTOM:return Pe.DIRECTION.LEFT;case Pe.DIRECTION.LEFT:return Pe.DIRECTION.BOTTOM;case Pe.DIRECTION.RIGHT:return Pe.DIRECTION.TOP;case Pe.DIRECTION.TOP:return Pe.DIRECTION.RIGHT}return e}function hH(e){return e===Pe.DIRECTION.LEFT?Pe.DIRECTION.RIGHT:e===Pe.DIRECTION.RIGHT?Pe.DIRECTION.LEFT:e}function vH(e){return e===Pe.DIRECTION.TOP?Pe.DIRECTION.BOTTOM:e===Pe.DIRECTION.BOTTOM?Pe.DIRECTION.TOP:e}function Bpt(e,r){var t=r.matrix[0],i=r.matrix[4],n=e;return t<0&&(n=hH(n)),i<0&&(n=vH(n)),n}function Npt(e,r){var t=e;return r.isReflect("x")&&(t=hH(t)),r.isReflect("y")&&(t=vH(t)),t}function Gpt(e,r){var t=e;return t=Rpt(t,r),t=Bpt(t,r),t=Npt(t,r),t}gs.getTranslateDirection=Gpt;Object.defineProperty(AO,"__esModule",{value:!0});var zpt=j,_e=Y,Bo=Kt,rS=Qn,qk=ul,Vpt=Kr,Zk=gs,iS=yr,iu=_a,Qk=Ur,jpt=mo;function Kk(e,r){return(0,_e.isBoolean)(e)?e===!1?!1:{}:(0,_e.get)(e,[r],e)}function Em(e){return(0,_e.get)(e,"position",Bo.DIRECTION.BOTTOM)}var Hpt=function(e){(0,zpt.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.container=i.view.getLayer(Bo.LAYER.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,(0,_e.each)(this.components,function(i){var n=i.component,a=i.direction,o=(0,iu.getLegendLayout)(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 Vpt.BBox(v.x,v.y,v.width,v.height).expand(h),p=(0,Zk.directionToPosition)(t.view.viewBBox,d,a),x=p[0],m=p[1],_=(0,Zk.directionToPosition)(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,_=Kk(t.option,d.field);_!==!1&&((0,_e.get)(_,"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&&((0,iS.omit)(m,["container"]),x.direction=Em(_),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((0,_e.get)(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);(0,iS.omit)(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=Bo.LAYER.FORE,c=Em(this.option);this.components.push({id:a,component:s,layer:u,direction:c,type:Bo.COMPONENT_TYPE.LEGEND,extra:void 0}),i[a]=!0}}}else this.loopLegends(n);var f=[];(0,_e.each)(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(0,_e.each)(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={};(0,_e.each)(n,function(o){var l=o.getGroupAttributes();(0,_e.each)(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=Kk(this.option,n.field),l=Bo.LAYER.FORE,s=Em(o);if(o!==!1&&((0,_e.get)(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:Bo.COMPONENT_TYPE.LEGEND,extra:{scale:n}}},r.prototype.createCustomLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a,!0);return new rS.CategoryLegend(o)},r.prototype.createContinuousLegend=function(t,i,n,a){var o=this.getContinuousCfg(t,i,n,(0,iS.omit)(a,["value"]));return new rS.ContinuousLegend(o)},r.prototype.createCategoryLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a);return new rS.CategoryLegend(o)},r.prototype.getContinuousCfg=function(t,i,n,a){var o=n.getTicks(),l=(0,_e.find)(o,function(p){return p.value===0}),s=(0,_e.find)(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:(0,_e.head)(u).value,max:(0,_e.last)(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=Em(a),v=(0,iu.getLegendLayout)(h),d=(0,_e.get)(a,"title");return d&&(d=(0,_e.deepMix)({text:(0,Qk.getName)(n)},d)),c.container=f,c.layout=v,c.title=d,c.animateOption=qk.DEFAULT_ANIMATE_CFG,this.mergeLegendCfg(c,a,"continuous")},r.prototype.getCategoryCfg=function(t,i,n,a,o){var l=this.container,s=(0,_e.get)(a,"position",Bo.DIRECTION.BOTTOM),u=(0,iu.getLegendThemeCfg)(this.view.getTheme(),s),c=(0,_e.get)(u,["marker"]),f=(0,_e.get)(a,"marker"),h=(0,iu.getLegendLayout)(s),v=(0,_e.get)(u,["pageNavigator"]),d=(0,_e.get)(a,"pageNavigator"),p=o?(0,iu.getCustomLegendItems)(c,f,a.items):(0,iu.getLegendItems)(this.view,t,i,c,f),x=(0,_e.get)(a,"title");x&&(x=(0,_e.deepMix)({text:n?(0,Qk.getName)(n):""},x));var m=(0,_e.get)(a,"maxWidthRatio"),_=(0,_e.get)(a,"maxHeightRatio"),b=this.getCategoryLegendSizeCfg(h,m,_);b.container=l,b.layout=h,b.items=p,b.title=x,b.animateOption=qk.DEFAULT_ANIMATE_CFG,b.pageNavigator=(0,_e.deepMix)({},v,d);var w=this.mergeLegendCfg(b,a,s);w.reversed&&w.items.reverse();var S=(0,_e.get)(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=(0,iu.getLegendThemeCfg)(this.view.getTheme(),a);return(0,_e.deepMix)({},o,t,i)},r.prototype.getId=function(t){return this.name+"-"+t},r.prototype.getComponentById=function(t){return(0,_e.find)(this.components,function(i){return i.id===t})},r.prototype.getCategoryLegendSizeCfg=function(t,i,n){i===void 0&&(i=Bo.COMPONENT_MAX_VIEW_PERCENTAGE),n===void 0&&(n=Bo.COMPONENT_MAX_VIEW_PERCENTAGE);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}(jpt.Controller),Ypt=AO.default=Hpt,TO={};Object.defineProperty(TO,"__esModule",{value:!0});var $o=j,er=Y,ca=Kt,Wpt=Qn,Xpt=Kr,Jk=gs,Upt=yr,qpt=mo,Zpt=function(e){(0,$o.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=er.noop,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(ca.LAYER.FORE).addGroup(),i.onChangeFn=(0,er.throttle)(i.onValueChange,20,{leading:!0}),i.width=0,i.view.on(ca.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(ca.VIEW_LIFE_CIRCLE.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(ca.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(ca.VIEW_LIFE_CIRCLE.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;(0,er.isNil)(this.start)&&(this.start=i,this.end=n);var a=this.view.getOptions().data;this.option&&!(0,er.isEmpty)(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 Xpt.BBox(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=(0,Jk.directionToPosition)(this.view.viewBBox,s,ca.DIRECTION.BOTTOM);h[0];var v=h[1],d=(0,Jk.directionToPosition)(this.view.coordinateBBox,s,ca.DIRECTION.BOTTOM),p=d[0];d[1],this.slider.component.update((0,$o.__assign)((0,$o.__assign)({},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,ca.DIRECTION.BOTTOM)}},r.prototype.update=function(){this.render()},r.prototype.createSlider=function(){var t=this.getSliderCfg(),i=new Wpt.Slider((0,$o.__assign)({container:this.container},t));return i.init(),{component:i,layer:ca.LAYER.FORE,direction:ca.DIRECTION.BOTTOM,type:ca.COMPONENT_TYPE.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=(0,$o.__assign)((0,$o.__assign)({},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((0,er.isObject)(this.option)){var i=(0,$o.__assign)({data:this.getData()},(0,er.get)(this.option,"trendCfg",{}));t=(0,er.deepMix)({},t,this.getThemeOptions(),this.option),t=(0,$o.__assign)((0,$o.__assign)({},t),{trendCfg:i})}return t.start=(0,er.clamp)(Math.min((0,er.isNil)(t.start)?0:t.start,(0,er.isNil)(t.end)?1:t.end),0,1),t.end=(0,er.clamp)(Math.max((0,er.isNil)(t.start)?0:t.start,(0,er.isNil)(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(0,er.get)(t,["components","slider","common"],{})},r.prototype.getMinMaxText=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=(0,er.valuesOfKey)(n,a.field),l=o,s=(0,er.size)(n);if(!a||!s)return{};var u=(0,er.size)(l),c=Math.floor(t*(u-1)),f=Math.floor(i*(u-1)),h=(0,er.get)(l,[c]),v=(0,er.get)(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=(0,er.size)(n);if(!(!a||!o)){var l=(0,er.valuesOfKey)(n,a.field),s=l,u=(0,er.size)(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?(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;n<a.length;n++)for(var o=a[n],l=0,s=o;l<s.length;l++){var u=s[l],c=u.mappingData,f=c.x,h=c.y;u.x=(0,fn.isArray)(f)?f[f.length-1]:f,u.y=(0,fn.isArray)(h)?h[h.length-1]:h}var v=t.shared;if(v===!1&&i.length>1){for(var d=i[0],p=Math.abs(r.y-d[0].y),x=0,m=i;x<m.length;x++){var _=m[x],b=Math.abs(r.y-_[0].y);b<=p&&(d=_,p=b)}i=[d]}return(0,fn.uniq)((0,fn.flatten)(i))}return[]}Kp.getItemsOfView=dH;var sgt=function(e){(0,b0.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.show=function(t){var i=this.context.view,n=this.context.event,a=i.getController("tooltip").getTooltipCfg(),o=dH(i,{x:n.x,y:n.y},a);if(!(0,fn.isEqual)(o,this.items)&&(this.items=o,o.length)){var l=i.getXScale().field,s=o[0].data[l],u=[],c=i.geometries;if((0,fn.each)(c,function(N){if(N.type==="interval"||N.type==="schema"){var W=N.getElementsBy(function(q){var tt=q.getData();return tt[l]===s});u=u.concat(W)}}),u.length){var f=i.getCoordinate(),h=u[0].shape.getCanvasBBox(),v=u[0].shape.getCanvasBBox(),d=h;(0,fn.each)(u,function(N){var W=N.shape.getCanvasBBox();f.isTransposed?(W.minY<h.minY&&(h=W),W.maxY>v.maxY&&(v=W)):(W.minX<h.minX&&(h=W),W.maxX>v.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<f-1){var d=s[v+1];n.addLinkShape(c,h,d,i)}})}}},r.prototype.removeLink=function(t){var i=this.getColorScale(this.context.view,t);if(!!i){var n=(0,Mv.getElementValue)(t,i.field);this.cache[n]&&(this.cache[n].remove(),this.cache[n]=null)}},r.prototype.link=function(t){var i=this.context;this.linkGroup||(this.linkGroup=i.view.foregroundGroup.addGroup({id:"link-by-color-group",capture:!1}));var n=(0,Mv.getCurrentElement)(i);n&&this.linkByElement(n,t==null?void 0:t.style)},r.prototype.unlink=function(){var t=(0,Mv.getCurrentElement)(this.context);t&&this.removeLink(t)},r.prototype.clear=function(){this.linkGroup&&this.linkGroup.clear(),this.cache={}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.linkGroup&&this.linkGroup.remove()},r}(Egt.default),Fgt=PO.default=Ogt,IO={},eg={};Object.defineProperty(eg,"__esModule",{value:!0});var bH=j,Pm=Y,Bn=xt,Pgt=(0,bH.__importDefault)(tg),Igt=function(e){(0,bH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.endPoint=null,t.isStarted=!1,t.effectSiblings=!1,t.effectByRecord=!1,t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.start=function(){this.clear(),this.startPoint=this.getCurrentPoint(),this.isStarted=!0},r.prototype.getIntersectElements=function(){var t=null;if((0,Bn.isMask)(this.context))t=(0,Bn.getMaskedElements)(this.context,10);else{var i=this.startPoint,n=this.isStarted?this.getCurrentPoint():this.endPoint;if(!i||!n)return;var a={minX:Math.min(i.x,n.x),minY:Math.min(i.y,n.y),maxX:Math.max(i.x,n.x),maxY:Math.max(i.y,n.y)},o=this.context.view;t=(0,Bn.getIntersectElements)(o,a)}return t},r.prototype.setStateEnable=function(t){if(this.effectSiblings&&!this.effectByRecord)this.setSiblingsState(t);else{var i=(0,Bn.getElements)(this.context.view),n=this.getIntersectElements();n&&n.length?this.effectByRecord?this.setSiblingsStateByRecord(n,t):this.setElementsState(n,t,i):this.clear()}},r.prototype.setSiblingsStateByRecord=function(t,i){var n=this,a=this.context.view,o=(0,Bn.getSilbings)(a),l=t.map(function(c){return c.getModel().data}),s=a.getXScale().field,u=a.getYScales()[0].field;(0,Pm.each)(o,function(c){var f=(0,Bn.getElements)(c),h=f.filter(function(v){var d=v.getModel().data;return(0,Bn.isInRecords)(l,d,s,u)});n.setElementsState(h,i,f)})},r.prototype.setSiblingsState=function(t){var i=this,n=this.context.view,a=(0,Bn.getSilbings)(n);(0,Bn.isMask)(this.context)&&(0,Pm.each)(a,function(o){var l=(0,Bn.getElements)(o),s=(0,Bn.getSiblingMaskElements)(i.context,o,10);s&&s.length?i.setElementsState(s,t,l):i.clearViewState(o)})},r.prototype.setElementsState=function(t,i,n){var a=this;(0,Pm.each)(n,function(o){t.includes(o)?a.setElementState(o,i):a.setElementState(o,!1)})},r.prototype.end=function(){this.isStarted=!1,this.endPoint=this.getCurrentPoint()},r.prototype.clear=function(){var t=this,i=this.context.view;if(this.effectSiblings){var n=(0,Bn.getSilbings)(i);(0,Pm.each)(n,function(a){t.clearViewState(a)})}else this.clearViewState(i)},r}(Pgt.default);eg.default=Igt;Object.defineProperty(IO,"__esModule",{value:!0});var wH=j,Lgt=(0,wH.__importDefault)(eg),Dgt=function(e){(0,wH.__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}(Lgt.default),$gt=IO.default=Dgt,LO={},rg={};Object.defineProperty(rg,"__esModule",{value:!0});var CH=j,sS=xt,kgt=(0,CH.__importDefault)(tg),Rgt=function(e){(0,CH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateEnable=function(t){var i=(0,sS.getCurrentElement)(this.context);if(i){if(!(0,sS.isElementChange)(this.context))return;t?(this.clear(),this.setElementState(i,!0)):this.hasState(i)&&this.setElementState(i,!1)}},r.prototype.toggle=function(){var t=(0,sS.getCurrentElement)(this.context);if(t){var i=this.hasState(t);i||this.clear(),this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(kgt.default);rg.default=Rgt;Object.defineProperty(LO,"__esModule",{value:!0});var SH=j,Bgt=(0,SH.__importDefault)(rg),Ngt=function(e){(0,SH.__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}(Bgt.default),Ggt=LO.default=Ngt,ig={},ys={};Object.defineProperty(ys,"__esModule",{value:!0});ys.setHighlightBy=ys.clearHighlight=void 0;var AH=Y,zgt=xt,xd="inactive",_d="active";function Vgt(e){var r=(0,zgt.getElements)(e);(0,AH.each)(r,function(t){t.hasState(_d)&&t.setState(_d,!1),t.hasState(xd)&&t.setState(xd,!1)})}ys.clearHighlight=Vgt;function jgt(e,r,t){(0,AH.each)(e,function(i){r(i)?(i.hasState(xd)&&i.setState(xd,!1),i.setState(_d,t)):(i.hasState(_d)&&i.setState(_d,!1),i.setState(xd,t))})}ys.setHighlightBy=jgt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.STATUS_ACTIVE=e.STATUS_UNACTIVE=void 0;var r=j,t=Y,i=xt,n=ys,a=(0,r.__importDefault)(Jp),o=Kt;e.STATUS_UNACTIVE=o.ELEMENT_STATE.INACTIVE,e.STATUS_ACTIVE=o.ELEMENT_STATE.ACTIVE;var l=function(s){(0,r.__extends)(u,s);function u(){var c=s!==null&&s.apply(this,arguments)||this;return c.stateName=e.STATUS_ACTIVE,c}return u.prototype.setElementsStateByItem=function(c,f,h,v){var d=this,p=function(x){return d.isMathItem(x,f,h)};this.setHighlightBy(c,p,v)},u.prototype.setElementHighlight=function(c,f){f(c)?(c.hasState(e.STATUS_UNACTIVE)&&c.setState(e.STATUS_UNACTIVE,!1),c.setState(e.STATUS_ACTIVE,!0)):c.hasState(e.STATUS_ACTIVE)||c.setState(e.STATUS_UNACTIVE,!0)},u.prototype.setHighlightBy=function(c,f,h){var v=this;if(h)(0,t.each)(c,function(x){v.setElementHighlight(x,f)});else{var d=(0,i.getElementsByState)(this.context.view,e.STATUS_ACTIVE),p=!0;(0,t.each)(d,function(x){if(!f(x))return p=!1,!1}),p?this.clear():(0,t.each)(c,function(x){f(x)&&(x.hasState(e.STATUS_ACTIVE)&&x.setState(e.STATUS_ACTIVE,!1),x.setState(e.STATUS_UNACTIVE,!0))})}},u.prototype.setElementState=function(c,f){var h=this.context.view,v=(0,i.getElements)(h);this.setHighlightBy(v,function(d){return c===d},f)},u.prototype.highlight=function(){this.setState()},u.prototype.clear=function(){var c=this.context.view;(0,n.clearHighlight)(c)},u}(a.default);e.default=l})(ig);var Hgt=nM(ig),DO={};Object.defineProperty(DO,"__esModule",{value:!0});var TH=j,uS=xt,Ygt=(0,TH.__importDefault)(ig),Wgt=function(e){(0,TH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=t.geometry.getAttribute("color");if(!!a){var o=n.getScaleByField(a.getFields()[0]),l=(0,uS.getElementValue)(t,o.field),s=(0,uS.getElements)(n),u=s.filter(function(c){return(0,uS.getElementValue)(c,o.field)===l});this.setHighlightBy(s,function(c){return u.includes(c)},i)}},r}(Ygt.default),Xgt=DO.default=Wgt,$O={};Object.defineProperty($O,"__esModule",{value:!0});var MH=j,Im=xt,nu=(0,MH.__importStar)(ig),Ugt=function(e){(0,MH.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(nu.STATUS_UNACTIVE)&&t.setState(nu.STATUS_UNACTIVE,!1),t.setState(nu.STATUS_ACTIVE,!0)):(t.setState(nu.STATUS_UNACTIVE,!0),t.hasState(nu.STATUS_ACTIVE)&&t.setState(nu.STATUS_ACTIVE,!1))},r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=n.getXScale(),o=(0,Im.getElementValue)(t,a.field),l=(0,Im.getElements)(n),s=l.filter(function(u){return(0,Im.getElementValue)(u,a.field)===o});this.setHighlightBy(l,function(u){return s.includes(u)},i)},r.prototype.toggle=function(){var t=(0,Im.getCurrentElement)(this.context);if(t){var i=t.hasState(this.stateName);this.setStateByElement(t,!i)}},r}(nu.default),qgt=$O.default=Ugt,ng={};Object.defineProperty(ng,"__esModule",{value:!0});ng.ELEMENT_RANGE_HIGHLIGHT_EVENTS=void 0;var EH=j,Lm=Af,aR=ys,Zgt=(0,EH.__importDefault)(eg),va;(function(e){e.BEFORE_HIGHLIGHT="element-range-highlight:beforehighlight",e.AFTER_HIGHLIGHT="element-range-highlight:afterhighlight",e.BEFORE_CLEAR="element-range-highlight:beforeclear",e.AFTER_CLEAR="element-range-highlight:afterclear"})(va||(va={}));ng.ELEMENT_RANGE_HIGHLIGHT_EVENTS=va;var Qgt=function(e){(0,EH.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.clearViewState=function(t){(0,aR.clearHighlight)(t)},r.prototype.highlight=function(){var t=this.context,i=t.view,n=t.event,a=this.getIntersectElements(),o={view:i,event:n,highlightElements:a};i.emit(va.BEFORE_HIGHLIGHT,Lm.Event.fromData(i,va.BEFORE_HIGHLIGHT,o)),this.setState(),i.emit(va.AFTER_HIGHLIGHT,Lm.Event.fromData(i,va.AFTER_HIGHLIGHT,o))},r.prototype.clear=function(){var t=this.context.view;t.emit(va.BEFORE_CLEAR,Lm.Event.fromData(t,va.BEFORE_CLEAR,{})),e.prototype.clear.call(this),t.emit(va.AFTER_CLEAR,Lm.Event.fromData(t,va.AFTER_CLEAR,{}))},r.prototype.setElementsState=function(t,i,n){(0,aR.setHighlightBy)(n,function(a){return t.indexOf(a)>=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(n<l&&(n=l),a>s&&(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<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):b=0<Z?Math.floor(1e3/Z):5};var S=new MessageChannel,M=S.port2;S.port1.onmessage=function(){if(m!==null){var Z=e.unstable_now();w=Z+b;try{m(!0,Z)?M.postMessage(null):(x=!1,m=null)}catch(et){throw M.postMessage(null),et}}else x=!1},r=function(Z){m=Z,x||(x=!0,M.postMessage(null))},t=function(Z,et){_=h(function(){Z(e.unstable_now())},et)},i=function(){v(_),_=-1}}function O(Z,et){var lt=Z.length;Z.push(et);t:for(;;){var dt=lt-1>>>1,ht=Z[dt];if(ht!==void 0&&0<D(ht,et))Z[dt]=et,Z[lt]=ht,lt=dt;else break t}}function F(Z){return Z=Z[0],Z===void 0?null:Z}function L(Z){var et=Z[0];if(et!==void 0){var lt=Z.pop();if(lt!==et){Z[0]=lt;t:for(var dt=0,ht=Z.length;dt<ht;){var wt=2*(dt+1)-1,gt=Z[wt],vt=wt+1,_t=Z[vt];if(gt!==void 0&&0>D(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"&&lt!==null){var ht=lt.delay;ht=typeof ht=="number"&&0<ht?dt+ht:dt,lt=typeof lt.timeout=="number"?lt.timeout:ot(Z)}else lt=ot(Z),ht=dt;return lt=ht+lt,Z={id:k++,callback:et,priorityLevel:Z,startTime:ht,expirationTime:lt,sortIndex:-1},ht>dt?(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.expirationTime<V.expirationTime||n()},e.unstable_wrapCallback=function(Z){var et=U;return function(){var lt=U;U=et;try{return Z.apply(this,arguments)}finally{U=lt}}}})(nY);iY.exports=nY;/** @license React v0.25.1
* react-reconciler.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){e.exports=function r(t){var i=v8,n=Wr.exports,a=iY.exports;function o(g){for(var y="https://reactjs.org/docs/error-decoder.html?invariant="+g,C=1;C<arguments.length;C++)y+="&args[]="+encodeURIComponent(arguments[C]);return"Minified React error #"+g+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;l.hasOwnProperty("ReactCurrentDispatcher")||(l.ReactCurrentDispatcher={current:null}),l.hasOwnProperty("ReactCurrentBatchConfig")||(l.ReactCurrentBatchConfig={suspense:null});var s=typeof Symbol=="function"&&Symbol.for,u=s?Symbol.for("react.element"):60103,c=s?Symbol.for("react.portal"):60106,f=s?Symbol.for("react.fragment"):60107,h=s?Symbol.for("react.strict_mode"):60108,v=s?Symbol.for("react.profiler"):60114,d=s?Symbol.for("react.provider"):60109,p=s?Symbol.for("react.context"):60110,x=s?Symbol.for("react.concurrent_mode"):60111,m=s?Symbol.for("react.forward_ref"):60112,_=s?Symbol.for("react.suspense"):60113,b=s?Symbol.for("react.suspense_list"):60120,w=s?Symbol.for("react.memo"):60115,S=s?Symbol.for("react.lazy"):60116,M=s?Symbol.for("react.block"):60121,O=typeof Symbol=="function"&&Symbol.iterator;function F(g){return g===null||typeof g!="object"?null:(g=O&&g[O]||g["@@iterator"],typeof g=="function"?g:null)}function L(g){if(g._status===-1){g._status=0;var y=g._ctor;y=y(),g._result=y,y.then(function(C){g._status===0&&(C=C.default,g._status=1,g._result=C)},function(C){g._status===0&&(g._status=2,g._result=C)})}}function D(g){if(g==null)return null;if(typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case f:return"Fragment";case c:return"Portal";case v:return"Profiler";case h:return"StrictMode";case _:return"Suspense";case b:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case p:return"Context.Consumer";case d:return"Context.Provider";case m:var y=g.render;return y=y.displayName||y.name||"",g.displayName||(y!==""?"ForwardRef("+y+")":"ForwardRef");case w:return D(g.type);case M:return D(g.render);case S:if(g=g._status===1?g._result:null)return D(g)}return null}function R(g){var y=g,C=g;if(g.alternate)for(;y.return;)y=y.return;else{g=y;do y=g,(y.effectTag&1026)!==0&&(C=y.return),g=y.return;while(g)}return y.tag===3?C:null}function H(g){if(R(g)!==g)throw Error(o(188))}function k(g){var y=g.alternate;if(!y){if(y=R(g),y===null)throw Error(o(188));return y!==g?null:g}for(var C=g,T=y;;){var E=C.return;if(E===null)break;var $=E.alternate;if($===null){if(T=E.return,T!==null){C=T;continue}break}if(E.child===$.child){for($=E.child;$;){if($===C)return H(E),g;if($===T)return H(E),y;$=$.sibling}throw Error(o(188))}if(C.return!==T.return)C=E,T=$;else{for(var z=!1,nt=E.child;nt;){if(nt===C){z=!0,C=E,T=$;break}if(nt===T){z=!0,T=E,C=$;break}nt=nt.sibling}if(!z){for(nt=$.child;nt;){if(nt===C){z=!0,C=$,T=E;break}if(nt===T){z=!0,T=$,C=E;break}nt=nt.sibling}if(!z)throw Error(o(189))}}if(C.alternate!==T)throw Error(o(190))}if(C.tag!==3)throw Error(o(188));return C.stateNode.current===C?g:y}function V(g){if(g=k(g),!g)return null;for(var y=g;;){if(y.tag===5||y.tag===6)return y;if(y.child)y.child.return=y,y=y.child;else{if(y===g)break;for(;!y.sibling;){if(!y.return||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}}return null}function U(g){if(g=k(g),!g)return null;for(var y=g;;){if(y.tag===5||y.tag===6)return y;if(y.child&&y.tag!==4)y.child.return=y,y=y.child;else{if(y===g)break;for(;!y.sibling;){if(!y.return||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}}return null}var B=t.getPublicInstance,G=t.getRootHostContext,N=t.getChildHostContext,W=t.prepareForCommit,q=t.resetAfterCommit,tt=t.createInstance,ot=t.appendInitialChild,st=t.finalizeInitialChildren,Z=t.prepareUpdate,et=t.shouldSetTextContent,lt=t.shouldDeprioritizeSubtree,dt=t.createTextInstance,ht=t.setTimeout,wt=t.clearTimeout,gt=t.noTimeout,vt=t.isPrimaryRenderer,_t=t.supportsMutation,Bt=t.supportsPersistence,Ut=t.supportsHydration,Nt=t.appendChild,pe=t.appendChildToContainer,cr=t.commitTextUpdate,ar=t.commitMount,Ji=t.commitUpdate,Lr=t.insertBefore,tn=t.insertInContainerBefore,jr=t.removeChild,Hr=t.removeChildFromContainer,Ke=t.resetTextContent,At=t.hideInstance,gi=t.hideTextInstance,Hh=t.unhideInstance,xc=t.unhideTextInstance,Yh=t.cloneInstance,_c=t.createContainerChildSet,Rs=t.appendChildToContainerChildSet,vl=t.finalizeContainerChildren,So=t.replaceContainerChildren,Bs=t.cloneHiddenInstance,Pg=t.cloneHiddenTextInstance,$b=t.canHydrateInstance,Wh=t.canHydrateTextInstance,kb=t.isSuspenseInstancePending,Rb=t.isSuspenseInstanceFallback,Xh=t.getNextHydratableSibling,Ig=t.getFirstHydratableChild,Bb=t.hydrateInstance,Uh=t.hydrateTextInstance,Nb=t.getNextHydratableInstanceAfterSuspenseInstance,Lg=t.commitHydratedContainer,Gb=t.commitHydratedSuspenseInstance,zb=/^(.*)[\\\/]/;function bc(g){var y="";do{t:switch(g.tag){case 3:case 4:case 6:case 7:case 10:case 9:var C="";break t;default:var T=g._debugOwner,E=g._debugSource,$=D(g.type);C=null,T&&(C=D(T.type)),T=$,$="",E?$=" (at "+E.fileName.replace(zb,"")+":"+E.lineNumber+")":C&&($=" (created by "+C+")"),C=`
in `+(T||"Unknown")+$}y+=C,g=g.return}while(g);return y}var qh=[],dl=-1;function Re(g){0>dl||(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.length;g++){var C=y[g];do C=C(!0);while(C!==null)}}),Mo=null}catch(C){throw Mo!==null&&(Mo=Mo.slice(g+1)),En(Bg,Fn),C}finally{Vb=!1}}}function Qh(g,y,C){return C/=10,1073741821-(((1073741821-g+y/10)/C|0)+1)*C}function DU(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var Ns=typeof Object.is=="function"?Object.is:DU,$U=Object.prototype.hasOwnProperty;function zg(g,y){if(Ns(g,y))return!0;if(typeof g!="object"||g===null||typeof y!="object"||y===null)return!1;var C=Object.keys(g),T=Object.keys(y);if(C.length!==T.length)return!1;for(T=0;T<C.length;T++)if(!$U.call(y,C[T])||!Ns(g[C[T]],y[C[T]]))return!1;return!0}function na(g,y){if(g&&g.defaultProps){y=i({},y),g=g.defaultProps;for(var C in g)y[C]===void 0&&(y[C]=g[C])}return y}var Vg={current:null},jg=null,Sc=null,Hg=null;function jb(){Hg=Sc=jg=null}function wI(g,y){g=g.type._context,vt?(Ue(Vg,g._currentValue),g._currentValue=y):(Ue(Vg,g._currentValue2),g._currentValue2=y)}function Hb(g){var y=Vg.current;Re(Vg),g=g.type._context,vt?g._currentValue=y:g._currentValue2=y}function CI(g,y){for(;g!==null;){var C=g.alternate;if(g.childExpirationTime<y)g.childExpirationTime=y,C!==null&&C.childExpirationTime<y&&(C.childExpirationTime=y);else if(C!==null&&C.childExpirationTime<y)C.childExpirationTime=y;else break;g=g.return}}function Ac(g,y){jg=g,Hg=Sc=null,g=g.dependencies,g!==null&&g.firstContext!==null&&(g.expirationTime>=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,z<T){var an={expirationTime:we.expirationTime,suspenseConfig:we.suspenseConfig,tag:we.tag,payload:we.payload,callback:we.callback,next:null};oe===null?(Wt=oe=an,Te=yt):oe=oe.next=an,z>bt&&(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;y<g.length;y++){var T=g[y],E=T.callback;if(E!==null){if(T.callback=null,T=E,E=C,typeof T!="function")throw Error(o(191,T));T.call(E)}}}var Jh=l.ReactCurrentBatchConfig,TI=new n.Component().refs;function Yg(g,y,C,T){y=g.memoizedState,C=C(T,y),C=C==null?y:i({},y,C),g.memoizedState=C,g.expirationTime===0&&(g.updateQueue.baseState=C)}var Wg={isMounted:function(g){return(g=g._reactInternalFiber)?R(g)===g:!1},enqueueSetState:function(g,y,C){g=g._reactInternalFiber;var T=oa(),E=Jh.suspense;T=Ys(T,g,E),E=gl(T,E),E.payload=y,C!=null&&(E.callback=C),yl(g,E),Po(g,T)},enqueueReplaceState:function(g,y,C){g=g._reactInternalFiber;var T=oa(),E=Jh.suspense;T=Ys(T,g,E),E=gl(T,E),E.tag=1,E.payload=y,C!=null&&(E.callback=C),yl(g,E),Po(g,T)},enqueueForceUpdate:function(g,y){g=g._reactInternalFiber;var C=oa(),T=Jh.suspense;C=Ys(C,g,T),T=gl(C,T),T.tag=2,y!=null&&(T.callback=y),yl(g,T),Po(g,C)}};function MI(g,y,C,T,E,$,z){return g=g.stateNode,typeof g.shouldComponentUpdate=="function"?g.shouldComponentUpdate(T,$,z):y.prototype&&y.prototype.isPureReactComponent?!zg(C,T)||!zg(E,$):!0}function EI(g,y,C){var T=!1,E=Ra,$=y.contextType;return typeof $=="object"&&$!==null?$=Pn($):(E=ei(y)?Ao:or.current,T=y.contextTypes,$=(T=T!=null)?To(g,E):Ra),y=new y(C,$),g.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Wg,g.stateNode=y,y._reactInternalFiber=g,T&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=E,g.__reactInternalMemoizedMaskedChildContext=$),y}function OI(g,y,C,T){g=y.state,typeof y.componentWillReceiveProps=="function"&&y.componentWillReceiveProps(C,T),typeof y.UNSAFE_componentWillReceiveProps=="function"&&y.UNSAFE_componentWillReceiveProps(C,T),y.state!==g&&Wg.enqueueReplaceState(y,y.state,null)}function Xb(g,y,C,T){var E=g.stateNode;E.props=C,E.state=g.memoizedState,E.refs=TI,Yb(g);var $=y.contextType;typeof $=="object"&&$!==null?E.context=Pn($):($=ei(y)?Ao:or.current,E.context=To(g,$)),Kh(g,C,E,T),E.state=g.memoizedState,$=y.getDerivedStateFromProps,typeof $=="function"&&(Yg(g,y,$,C),E.state=g.memoizedState),typeof y.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(y=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),y!==E.state&&Wg.enqueueReplaceState(E,E.state,null),Kh(g,C,E,T),E.state=g.memoizedState),typeof E.componentDidMount=="function"&&(g.effectTag|=4)}var Xg=Array.isArray;function tv(g,y,C){if(g=C.ref,g!==null&&typeof g!="function"&&typeof g!="object"){if(C._owner){if(C=C._owner,C){if(C.tag!==1)throw Error(o(309));var T=C.stateNode}if(!T)throw Error(o(147,g));var E=""+g;return y!==null&&y.ref!==null&&typeof y.ref=="function"&&y.ref._stringRef===E?y.ref:(y=function($){var z=T.refs;z===TI&&(z=T.refs={}),$===null?delete z[E]:z[E]=$},y._stringRef=E,y)}if(typeof g!="string")throw Error(o(284));if(!C._owner)throw Error(o(290,g))}return g}function Ug(g,y){if(g.type!=="textarea")throw Error(o(31,Object.prototype.toString.call(y)==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":y,""))}function FI(g){function y(rt,Q){if(g){var at=rt.lastEffect;at!==null?(at.nextEffect=Q,rt.lastEffect=Q):rt.firstEffect=rt.lastEffect=Q,Q.nextEffect=null,Q.effectTag=8}}function C(rt,Q){if(!g)return null;for(;Q!==null;)y(rt,Q),Q=Q.sibling;return null}function T(rt,Q){for(rt=new Map;Q!==null;)Q.key!==null?rt.set(Q.key,Q):rt.set(Q.index,Q),Q=Q.sibling;return rt}function E(rt,Q){return rt=Zs(rt,Q),rt.index=0,rt.sibling=null,rt}function $(rt,Q,at){return rt.index=at,g?(at=rt.alternate,at!==null?(at=at.index,at<Q?(rt.effectTag=2,Q):at):(rt.effectTag=2,Q)):Q}function z(rt){return g&&rt.alternate===null&&(rt.effectTag=2),rt}function nt(rt,Q,at,St){return Q===null||Q.tag!==6?(Q=Ew(at,rt.mode,St),Q.return=rt,Q):(Q=E(Q,at),Q.return=rt,Q)}function yt(rt,Q,at,St){return Q!==null&&Q.elementType===at.type?(St=E(Q,at.props),St.ref=tv(rt,Q,at),St.return=rt,St):(St=wy(at.type,at.key,at.props,null,rt.mode,St),St.ref=tv(rt,Q,at),St.return=rt,St)}function bt(rt,Q,at,St){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==at.containerInfo||Q.stateNode.implementation!==at.implementation?(Q=Ow(at,rt.mode,St),Q.return=rt,Q):(Q=E(Q,at.children||[]),Q.return=rt,Q)}function Te(rt,Q,at,St,$t){return Q===null||Q.tag!==7?(Q=_l(at,rt.mode,St,$t),Q.return=rt,Q):(Q=E(Q,at),Q.return=rt,Q)}function Wt(rt,Q,at){if(typeof Q=="string"||typeof Q=="number")return Q=Ew(""+Q,rt.mode,at),Q.return=rt,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case u:return at=wy(Q.type,Q.key,Q.props,null,rt.mode,at),at.ref=tv(rt,null,Q),at.return=rt,at;case c:return Q=Ow(Q,rt.mode,at),Q.return=rt,Q}if(Xg(Q)||F(Q))return Q=_l(Q,rt.mode,at,null),Q.return=rt,Q;Ug(rt,Q)}return null}function oe(rt,Q,at,St){var $t=Q!==null?Q.key:null;if(typeof at=="string"||typeof at=="number")return $t!==null?null:nt(rt,Q,""+at,St);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case u:return at.key===$t?at.type===f?Te(rt,Q,at.props.children,St,$t):yt(rt,Q,at,St):null;case c:return at.key===$t?bt(rt,Q,at,St):null}if(Xg(at)||F(at))return $t!==null?null:Te(rt,Q,at,St,null);Ug(rt,at)}return null}function we(rt,Q,at,St,$t){if(typeof St=="string"||typeof St=="number")return rt=rt.get(at)||null,nt(Q,rt,""+St,$t);if(typeof St=="object"&&St!==null){switch(St.$$typeof){case u:return rt=rt.get(St.key===null?at:St.key)||null,St.type===f?Te(Q,rt,St.props.children,$t,St.key):yt(Q,rt,St,$t);case c:return rt=rt.get(St.key===null?at:St.key)||null,bt(Q,rt,St,$t)}if(Xg(St)||F(St))return rt=rt.get(at)||null,Te(Q,rt,St,$t,null);Ug(Q,St)}return null}function an(rt,Q,at,St){for(var $t=null,Be=null,zt=Q,Me=Q=0,vr=null;zt!==null&&Me<at.length;Me++){zt.index>Me?(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(;Me<at.length;Me++)zt=Wt(rt,at[Me],St),zt!==null&&(Q=$(zt,Q,Me),Be===null?$t=zt:Be.sibling=zt,Be=zt);return $t}for(zt=T(rt,zt);Me<at.length;Me++)vr=we(zt,rt,Me,at[Me],St),vr!==null&&(g&&vr.alternate!==null&&zt.delete(vr.key===null?Me:vr.key),Q=$(vr,Q,Me),Be===null?$t=vr:Be.sibling=vr,Be=vr);return g&&zt.forEach(function(bl){return y(rt,bl)}),$t}function hr(rt,Q,at,St){var $t=F(at);if(typeof $t!="function")throw Error(o(150));if(at=$t.call(at),at==null)throw Error(o(151));for(var Be=$t=null,zt=Q,Me=Q=0,vr=null,fe=at.next();zt!==null&&!fe.done;Me++,fe=at.next()){zt.index>Me?(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<y.length&&C<g.length;C++)if(!Ns(g[C],y[C]))return!1;return!0}function Jb(g,y,C,T,E,$){if(ml=$,br=y,y.memoizedState=null,y.updateQueue=null,y.expirationTime=0,Zg.current=g===null||g.memoizedState===null?kU:RU,g=C(T,E),y.expirationTime===ml){$=0;do{if(y.expirationTime=0,!(25>$))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(bt<ml){var Te={expirationTime:yt.expirationTime,suspenseConfig:yt.suspenseConfig,action:yt.action,eagerReducer:yt.eagerReducer,eagerState:yt.eagerState,next:null};nt===null?(z=nt=Te,$=T):nt=nt.next=Te,bt>br.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(97<T?97:T,function(){var E=Ln.suspense;Ln.suspense=y===void 0?null:y;try{g(!1),C()}finally{Ln.suspense=E}})}function NI(g,y,C){var T=oa(),E=Jh.suspense;T=Ys(T,g,E),E={expirationTime:T,suspenseConfig:E,action:C,eagerReducer:null,eagerState:null,next:null};var $=y.pending;if($===null?E.next=E:(E.next=$.next,$.next=E),y.pending=E,$=g.alternate,g===br||$!==null&&$===br)Qg=!0,E.expirationTime=ml,br.expirationTime=ml;else{if(g.expirationTime===0&&($===null||$.expirationTime===0)&&($=y.lastRenderedReducer,$!==null))try{var z=y.lastRenderedState,nt=$(z,C);if(E.eagerReducer=$,E.eagerState=nt,Ns(nt,z))return}catch{}finally{}Po(g,T)}}var ry={readContext:Pn,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useResponder:en,useDeferredValue:en,useTransition:en},kU={readContext:Pn,useCallback:RI,useContext:Pn,useEffect:LI,useImperativeHandle:function(g,y,C){return C=C!=null?C.concat([g]):null,rw(4,2,$I.bind(null,y,g),C)},useLayoutEffect:function(g,y){return rw(4,2,g,y)},useMemo:function(g,y){var C=Oc();return y=y===void 0?null:y,g=g(),C.memoizedState=[g,y],g},useReducer:function(g,y,C){var T=Oc();return y=C!==void 0?C(y):y,T.memoizedState=T.baseState=y,g=T.queue={pending:null,dispatch:null,lastRenderedReducer:g,lastRenderedState:y},g=g.dispatch=NI.bind(null,br,g),[T.memoizedState,g]},useRef:function(g){var y=Oc();return g={current:g},y.memoizedState=g},useState:tw,useDebugValue:nw,useResponder:Qb,useDeferredValue:function(g,y){var C=tw(g),T=C[0],E=C[1];return LI(function(){var $=Ln.suspense;Ln.suspense=y===void 0?null:y;try{E(g)}finally{Ln.suspense=$}},[g,y]),T},useTransition:function(g){var y=tw(!1),C=y[0];return y=y[1],[RI(aw.bind(null,y,g),[y,g]),C]}},RU={readContext:Pn,useCallback:ey,useContext:Pn,useEffect:ty,useImperativeHandle:kI,useLayoutEffect:DI,useMemo:BI,useReducer:Kg,useRef:II,useState:function(){return Kg(Gs)},useDebugValue:nw,useResponder:Qb,useDeferredValue:function(g,y){var C=Kg(Gs),T=C[0],E=C[1];return ty(function(){var $=Ln.suspense;Ln.suspense=y===void 0?null:y;try{E(g)}finally{Ln.suspense=$}},[g,y]),T},useTransition:function(g){var y=Kg(Gs),C=y[0];return y=y[1],[ey(aw.bind(null,y,g),[y,g]),C]}},BU={readContext:Pn,useCallback:ey,useContext:Pn,useEffect:ty,useImperativeHandle:kI,useLayoutEffect:DI,useMemo:BI,useReducer:Jg,useRef:II,useState:function(){return Jg(Gs)},useDebugValue:nw,useResponder:Qb,useDeferredValue:function(g,y){var C=Jg(Gs),T=C[0],E=C[1];return ty(function(){var $=Ln.suspense;Ln.suspense=y===void 0?null:y;try{E(g)}finally{Ln.suspense=$}},[g,y]),T},useTransition:function(g){var y=Jg(Gs),C=y[0];return y=y[1],[ey(aw.bind(null,y,g),[y,g]),C]}},Eo=null,zs=null,Vs=!1;function GI(g,y){var C=za(5,null,null,0);C.elementType="DELETED",C.type="DELETED",C.stateNode=y,C.return=g,C.effectTag=8,g.lastEffect!==null?(g.lastEffect.nextEffect=C,g.lastEffect=C):g.firstEffect=g.lastEffect=C}function zI(g,y){switch(g.tag){case 5:return y=$b(y,g.type,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 6:return y=Wh(y,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 13:return!1;default:return!1}}function ow(g){if(Vs){var y=zs;if(y){var C=y;if(!zI(g,y)){if(y=Xh(C),!y||!zI(g,y)){g.effectTag=g.effectTag&-1025|2,Vs=!1,Eo=g;return}GI(Eo,C)}Eo=g,zs=Ig(y)}else g.effectTag=g.effectTag&-1025|2,Vs=!1,Eo=g}}function VI(g){for(g=g.return;g!==null&&g.tag!==5&&g.tag!==3&&g.tag!==13;)g=g.return;Eo=g}function iy(g){if(!Ut||g!==Eo)return!1;if(!Vs)return VI(g),Vs=!0,!1;var y=g.type;if(g.tag!==5||y!=="head"&&y!=="body"&&!et(y,g.memoizedProps))for(y=zs;y;)GI(g,y),y=Xh(y);if(VI(g),g.tag===13){if(!Ut)throw Error(o(316));if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(o(317));zs=Nb(g)}else zs=Eo?Xh(g.stateNode):null;return!0}function lw(){Ut&&(zs=Eo=null,Vs=!1)}var NU=l.ReactCurrentOwner,Na=!1;function rn(g,y,C,T){y.child=g===null?Ub(y,null,C,T):Tc(y,g.child,C,T)}function jI(g,y,C,T,E){C=C.render;var $=y.ref;return Ac(y,E),T=Jb(g,y,C,T,$,E),g!==null&&!Na?(y.updateQueue=g.updateQueue,y.effectTag&=-517,g.expirationTime<=E&&(g.expirationTime=0),Oo(g,y,E)):(y.effectTag|=1,rn(g,y,T,E),y.child)}function HI(g,y,C,T,E,$){if(g===null){var z=C.type;return typeof z=="function"&&!Mw(z)&&z.defaultProps===void 0&&C.compare===null&&C.defaultProps===void 0?(y.tag=15,y.type=z,YI(g,y,z,T,E,$)):(g=wy(C.type,null,T,null,y.mode,$),g.ref=y.ref,g.return=y,y.child=g)}return z=g.child,E<$&&(E=z.memoizedProps,C=C.compare,C=C!==null?C:zg,C(E,T)&&g.ref===y.ref)?Oo(g,y,$):(y.effectTag|=1,g=Zs(z,T),g.ref=y.ref,g.return=y,y.child=g)}function YI(g,y,C,T,E,$){return g!==null&&zg(g.memoizedProps,T)&&g.ref===y.ref&&(Na=!1,E<$)?(y.expirationTime=g.expirationTime,Oo(g,y,$)):sw(g,y,C,T,$)}function WI(g,y){var C=y.ref;(g===null&&C!==null||g!==null&&g.ref!==C)&&(y.effectTag|=128)}function sw(g,y,C,T,E){var $=ei(C)?Ao:or.current;return $=To(y,$),Ac(y,E),C=Jb(g,y,C,T,$,E),g!==null&&!Na?(y.updateQueue=g.updateQueue,y.effectTag&=-517,g.expirationTime<=E&&(g.expirationTime=0),Oo(g,y,E)):(y.effectTag|=1,rn(g,y,C,E),y.child)}function XI(g,y,C,T,E){if(ei(C)){var $=!0;Cc(y)}else $=!1;if(Ac(y,E),y.stateNode===null)g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),EI(y,C,T),Xb(y,C,T,E),T=!0;else if(g===null){var z=y.stateNode,nt=y.memoizedProps;z.props=nt;var yt=z.context,bt=C.contextType;typeof bt=="object"&&bt!==null?bt=Pn(bt):(bt=ei(C)?Ao:or.current,bt=To(y,bt));var Te=C.getDerivedStateFromProps,Wt=typeof Te=="function"||typeof z.getSnapshotBeforeUpdate=="function";Wt||typeof z.UNSAFE_componentWillReceiveProps!="function"&&typeof z.componentWillReceiveProps!="function"||(nt!==T||yt!==bt)&&OI(y,z,T,bt),pl=!1;var oe=y.memoizedState;z.state=oe,Kh(y,T,z,E),yt=y.memoizedState,nt!==T||oe!==yt||Dr.current||pl?(typeof Te=="function"&&(Yg(y,C,Te,T),yt=y.memoizedState),(nt=pl||MI(y,C,nt,T,oe,yt,bt))?(Wt||typeof z.UNSAFE_componentWillMount!="function"&&typeof z.componentWillMount!="function"||(typeof z.componentWillMount=="function"&&z.componentWillMount(),typeof z.UNSAFE_componentWillMount=="function"&&z.UNSAFE_componentWillMount()),typeof z.componentDidMount=="function"&&(y.effectTag|=4)):(typeof z.componentDidMount=="function"&&(y.effectTag|=4),y.memoizedProps=T,y.memoizedState=yt),z.props=T,z.state=yt,z.context=bt,T=nt):(typeof z.componentDidMount=="function"&&(y.effectTag|=4),T=!1)}else z=y.stateNode,Wb(g,y),nt=y.memoizedProps,z.props=y.type===y.elementType?nt:na(y.type,nt),yt=z.context,bt=C.contextType,typeof bt=="object"&&bt!==null?bt=Pn(bt):(bt=ei(C)?Ao:or.current,bt=To(y,bt)),Te=C.getDerivedStateFromProps,(Wt=typeof Te=="function"||typeof z.getSnapshotBeforeUpdate=="function")||typeof z.UNSAFE_componentWillReceiveProps!="function"&&typeof z.componentWillReceiveProps!="function"||(nt!==T||yt!==bt)&&OI(y,z,T,bt),pl=!1,yt=y.memoizedState,z.state=yt,Kh(y,T,z,E),oe=y.memoizedState,nt!==T||yt!==oe||Dr.current||pl?(typeof Te=="function"&&(Yg(y,C,Te,T),oe=y.memoizedState),(Te=pl||MI(y,C,nt,T,yt,oe,bt))?(Wt||typeof z.UNSAFE_componentWillUpdate!="function"&&typeof z.componentWillUpdate!="function"||(typeof z.componentWillUpdate=="function"&&z.componentWillUpdate(T,oe,bt),typeof z.UNSAFE_componentWillUpdate=="function"&&z.UNSAFE_componentWillUpdate(T,oe,bt)),typeof z.componentDidUpdate=="function"&&(y.effectTag|=4),typeof z.getSnapshotBeforeUpdate=="function"&&(y.effectTag|=256)):(typeof z.componentDidUpdate!="function"||nt===g.memoizedProps&&yt===g.memoizedState||(y.effectTag|=4),typeof z.getSnapshotBeforeUpdate!="function"||nt===g.memoizedProps&&yt===g.memoizedState||(y.effectTag|=256),y.memoizedProps=T,y.memoizedState=oe),z.props=T,z.state=oe,z.context=bt,T=Te):(typeof z.componentDidUpdate!="function"||nt===g.memoizedProps&&yt===g.memoizedState||(y.effectTag|=4),typeof z.getSnapshotBeforeUpdate!="function"||nt===g.memoizedProps&&yt===g.memoizedState||(y.effectTag|=256),T=!1);return uw(g,y,C,T,$,E)}function uw(g,y,C,T,E,$){WI(g,y);var z=(y.effectTag&64)!==0;if(!T&&!z)return E&&kg(y,C,!1),Oo(g,y,$);T=y.stateNode,NU.current=y;var nt=z&&typeof C.getDerivedStateFromError!="function"?null:T.render();return y.effectTag|=1,g!==null&&z?(y.child=Tc(y,g.child,null,$),y.child=Tc(y,null,nt,$)):rn(g,y,nt,$),y.memoizedState=T.state,E&&kg(y,C,!0),y.child}function UI(g){var y=g.stateNode;y.pendingContext?Dg(g,y.pendingContext,y.pendingContext!==y.context):y.context&&Dg(g,y.context,!1),qb(g,y.containerInfo)}var cw={dehydrated:null,retryTime:0};function qI(g,y,C){var T=y.mode,E=y.pendingProps,$=Je.current,z=!1,nt;if((nt=(y.effectTag&64)!==0)||(nt=($&2)!==0&&(g===null||g.memoizedState!==null)),nt?(z=!0,y.effectTag&=-65):g!==null&&g.memoizedState===null||E.fallback===void 0||E.unstable_avoidThisFallback===!0||($|=1),Ue(Je,$&1),g===null){if(E.fallback!==void 0&&ow(y),z){if(z=E.fallback,E=_l(null,T,0,null),E.return=y,(y.mode&2)===0)for(g=y.memoizedState!==null?y.child.child:y.child,E.child=g;g!==null;)g.return=E,g=g.sibling;return C=_l(z,T,C,null),C.return=y,E.sibling=C,y.memoizedState=cw,y.child=E,C}return T=E.children,y.memoizedState=null,y.child=Ub(y,null,T,C)}if(g.memoizedState!==null){if(g=g.child,T=g.sibling,z){if(E=E.fallback,C=Zs(g,g.pendingProps),C.return=y,(y.mode&2)===0&&(z=y.memoizedState!==null?y.child.child:y.child,z!==g.child))for(C.child=z;z!==null;)z.return=C,z=z.sibling;return T=Zs(T,E),T.return=y,C.sibling=T,C.childExpirationTime=0,y.memoizedState=cw,y.child=C,T}return C=Tc(y,g.child,E.children,C),y.memoizedState=null,y.child=C}if(g=g.child,z){if(z=E.fallback,E=_l(null,T,0,null),E.return=y,E.child=g,g!==null&&(g.return=E),(y.mode&2)===0)for(g=y.memoizedState!==null?y.child.child:y.child,E.child=g;g!==null;)g.return=E,g=g.sibling;return C=_l(z,T,C,null),C.return=y,E.sibling=C,C.effectTag|=2,E.childExpirationTime=0,y.memoizedState=cw,y.child=E,C}return y.memoizedState=null,y.child=Tc(y,g,E.children,C)}function ZI(g,y){g.expirationTime<y&&(g.expirationTime=y);var C=g.alternate;C!==null&&C.expirationTime<y&&(C.expirationTime=y),CI(g.return,y)}function fw(g,y,C,T,E,$){var z=g.memoizedState;z===null?g.memoizedState={isBackwards:y,rendering:null,renderingStartTime:0,last:T,tail:C,tailExpiration:0,tailMode:E,lastEffect:$}:(z.isBackwards=y,z.rendering=null,z.renderingStartTime=0,z.last=T,z.tail=C,z.tailExpiration=0,z.tailMode=E,z.lastEffect=$)}function QI(g,y,C){var T=y.pendingProps,E=T.revealOrder,$=T.tail;if(rn(g,y,T.children,C),T=Je.current,(T&2)!==0)T=T&1|2,y.effectTag|=64;else{if(g!==null&&(g.effectTag&64)!==0)t:for(g=y.child;g!==null;){if(g.tag===13)g.memoizedState!==null&&ZI(g,C);else if(g.tag===19)ZI(g,C);else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===y)break t;for(;g.sibling===null;){if(g.return===null||g.return===y)break t;g=g.return}g.sibling.return=g.return,g=g.sibling}T&=1}if(Ue(Je,T),(y.mode&2)===0)y.memoizedState=null;else switch(E){case"forwards":for(C=y.child,E=null;C!==null;)g=C.alternate,g!==null&&qg(g)===null&&(E=C),C=C.sibling;C=E,C===null?(E=y.child,y.child=null):(E=C.sibling,C.sibling=null),fw(y,!1,E,C,$,y.lastEffect);break;case"backwards":for(C=null,E=y.child,y.child=null;E!==null;){if(g=E.alternate,g!==null&&qg(g)===null){y.child=E;break}g=E.sibling,E.sibling=C,C=E,E=g}fw(y,!0,C,null,$,y.lastEffect);break;case"together":fw(y,!1,null,null,void 0,y.lastEffect);break;default:y.memoizedState=null}return y.child}function Oo(g,y,C){g!==null&&(y.dependencies=g.dependencies);var T=y.expirationTime;if(T!==0&&_y(T),y.childExpirationTime<C)return null;if(g!==null&&y.child!==g.child)throw Error(o(153));if(y.child!==null){for(g=y.child,C=Zs(g,g.pendingProps),y.child=C,C.return=y;g.sibling!==null;)g=g.sibling,C=C.sibling=Zs(g,g.pendingProps),C.return=y;C.sibling=null}return y.child}function Ga(g){g.effectTag|=4}var iv,nv,ny,ay;if(_t)iv=function(g,y){for(var C=y.child;C!==null;){if(C.tag===5||C.tag===6)ot(g,C.stateNode);else if(C.tag!==4&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===y)break;for(;C.sibling===null;){if(C.return===null||C.return===y)return;C=C.return}C.sibling.return=C.return,C=C.sibling}},nv=function(){},ny=function(g,y,C,T,E){if(g=g.memoizedProps,g!==T){var $=y.stateNode,z=Ba(In.current);C=Z($,C,g,T,E,z),(y.updateQueue=C)&&Ga(y)}},ay=function(g,y,C,T){C!==T&&Ga(y)};else if(Bt){iv=function(g,y,C,T){for(var E=y.child;E!==null;){if(E.tag===5){var $=E.stateNode;C&&T&&($=Bs($,E.type,E.memoizedProps,E)),ot(g,$)}else if(E.tag===6)$=E.stateNode,C&&T&&($=Pg($,E.memoizedProps,E)),ot(g,$);else if(E.tag!==4){if(E.tag===13&&(E.effectTag&4)!==0&&($=E.memoizedState!==null)){var z=E.child;if(z!==null&&(z.child!==null&&(z.child.return=z,iv(g,z,!0,$)),$=z.sibling,$!==null)){$.return=E,E=$;continue}}if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===y)break;for(;E.sibling===null;){if(E.return===null||E.return===y)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};var KI=function(g,y,C,T){for(var E=y.child;E!==null;){if(E.tag===5){var $=E.stateNode;C&&T&&($=Bs($,E.type,E.memoizedProps,E)),Rs(g,$)}else if(E.tag===6)$=E.stateNode,C&&T&&($=Pg($,E.memoizedProps,E)),Rs(g,$);else if(E.tag!==4){if(E.tag===13&&(E.effectTag&4)!==0&&($=E.memoizedState!==null)){var z=E.child;if(z!==null&&(z.child!==null&&(z.child.return=z,KI(g,z,!0,$)),$=z.sibling,$!==null)){$.return=E,E=$;continue}}if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===y)break;for(;E.sibling===null;){if(E.return===null||E.return===y)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};nv=function(g){var y=g.stateNode;if(g.firstEffect!==null){var C=y.containerInfo,T=_c(C);KI(T,g,!1,!1),y.pendingChildren=T,Ga(g),vl(C,T)}},ny=function(g,y,C,T,E){var $=g.stateNode,z=g.memoizedProps;if((g=y.firstEffect===null)&&z===T)y.stateNode=$;else{var nt=y.stateNode,yt=Ba(In.current),bt=null;z!==T&&(bt=Z(nt,C,z,T,E,yt)),g&&bt===null?y.stateNode=$:($=Yh($,bt,C,z,T,y,g,nt),st($,C,T,E,yt)&&Ga(y),y.stateNode=$,g?Ga(y):iv($,y,!1,!1))}},ay=function(g,y,C,T){C!==T?(g=Ba(Mc.current),C=Ba(In.current),y.stateNode=dt(T,g,C,y),Ga(y)):y.stateNode=g.stateNode}}else nv=function(){},ny=function(){},ay=function(){};function oy(g,y){switch(g.tailMode){case"hidden":y=g.tail;for(var C=null;y!==null;)y.alternate!==null&&(C=y),y=y.sibling;C===null?g.tail=null:C.sibling=null;break;case"collapsed":C=g.tail;for(var T=null;C!==null;)C.alternate!==null&&(T=C),C=C.sibling;T===null?y||g.tail===null?g.tail=null:g.tail.sibling=null:T.sibling=null}}function GU(g,y,C){var T=y.pendingProps;switch(y.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return ei(y.type)&&wc(),null;case 3:return Ec(),Re(Dr),Re(or),T=y.stateNode,T.pendingContext&&(T.context=T.pendingContext,T.pendingContext=null),(g===null||g.child===null)&&iy(y)&&Ga(y),nv(y),null;case 5:Zb(y);var E=Ba(Mc.current);if(C=y.type,g!==null&&y.stateNode!=null)ny(g,y,C,T,E),g.ref!==y.ref&&(y.effectTag|=128);else{if(!T){if(y.stateNode===null)throw Error(o(166));return null}if(g=Ba(In.current),iy(y)){if(!Ut)throw Error(o(175));g=Bb(y.stateNode,y.type,y.memoizedProps,E,g,y),y.updateQueue=g,g!==null&&Ga(y)}else{var $=tt(C,T,E,g,y);iv($,y,!1,!1),y.stateNode=$,st($,C,T,E,g)&&Ga(y)}y.ref!==null&&(y.effectTag|=128)}return null;case 6:if(g&&y.stateNode!=null)ay(g,y,g.memoizedProps,T);else{if(typeof T!="string"&&y.stateNode===null)throw Error(o(166));if(g=Ba(Mc.current),E=Ba(In.current),iy(y)){if(!Ut)throw Error(o(176));Uh(y.stateNode,y.memoizedProps,y)&&Ga(y)}else y.stateNode=dt(T,g,E,y)}return null;case 13:return Re(Je),T=y.memoizedState,(y.effectTag&64)!==0?(y.expirationTime=C,y):(T=T!==null,E=!1,g===null?y.memoizedProps.fallback!==void 0&&iy(y):(C=g.memoizedState,E=C!==null,T||C===null||(C=g.child.sibling,C!==null&&($=y.firstEffect,$!==null?(y.firstEffect=C,C.nextEffect=$):(y.firstEffect=y.lastEffect=C,C.nextEffect=null),C.effectTag=8))),T&&!E&&(y.mode&2)!==0&&(g===null&&y.memoizedProps.unstable_avoidThisFallback!==!0||(Je.current&1)!==0?$r===js&&($r=cy):(($r===js||$r===cy)&&($r=fy),ov!==0&&nn!==null&&(Qs(nn,Di),S2(nn,ov)))),Bt&&T&&(y.effectTag|=4),_t&&(T||E)&&(y.effectTag|=4),null);case 4:return Ec(),nv(y),null;case 10:return Hb(y),null;case 17:return ei(y.type)&&wc(),null;case 19:if(Re(Je),T=y.memoizedState,T===null)return null;if(E=(y.effectTag&64)!==0,$=T.rendering,$===null){if(E)oy(T,!1);else if($r!==js||g!==null&&(g.effectTag&64)!==0)for(g=y.child;g!==null;){if($=qg(g),$!==null){for(y.effectTag|=64,oy(T,!1),g=$.updateQueue,g!==null&&(y.updateQueue=g,y.effectTag|=4),T.lastEffect===null&&(y.firstEffect=null),y.lastEffect=T.lastEffect,g=C,T=y.child;T!==null;)E=T,C=g,E.effectTag&=2,E.nextEffect=null,E.firstEffect=null,E.lastEffect=null,$=E.alternate,$===null?(E.childExpirationTime=0,E.expirationTime=C,E.child=null,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null):(E.childExpirationTime=$.childExpirationTime,E.expirationTime=$.expirationTime,E.child=$.child,E.memoizedProps=$.memoizedProps,E.memoizedState=$.memoizedState,E.updateQueue=$.updateQueue,C=$.dependencies,E.dependencies=C===null?null:{expirationTime:C.expirationTime,firstContext:C.firstContext,responders:C.responders}),T=T.sibling;return Ue(Je,Je.current&1|2),y.child}g=g.sibling}}else{if(!E)if(g=qg($),g!==null){if(y.effectTag|=64,E=!0,g=g.updateQueue,g!==null&&(y.updateQueue=g,y.effectTag|=4),oy(T,!0),T.tail===null&&T.tailMode==="hidden"&&!$.alternate)return y=y.lastEffect=T.lastEffect,y!==null&&(y.nextEffect=null),null}else 2*On()-T.renderingStartTime>T.tailExpiration&&1<C&&(y.effectTag|=64,E=!0,oy(T,!1),y.expirationTime=y.childExpirationTime=C-1);T.isBackwards?($.sibling=y.child,y.child=$):(g=T.last,g!==null?g.sibling=$:y.child=$,T.last=$)}return T.tail!==null?(T.tailExpiration===0&&(T.tailExpiration=On()+500),g=T.tail,T.rendering=g,T.tail=g.sibling,T.lastEffect=y.lastEffect,T.renderingStartTime=On(),g.sibling=null,y=Je.current,Ue(Je,E?y&1|2:y&1),g):null}throw Error(o(156,y.tag))}function zU(g){switch(g.tag){case 1:ei(g.type)&&wc();var y=g.effectTag;return y&4096?(g.effectTag=y&-4097|64,g):null;case 3:if(Ec(),Re(Dr),Re(or),y=g.effectTag,(y&64)!==0)throw Error(o(285));return g.effectTag=y&-4097|64,g;case 5:return Zb(g),null;case 13:return Re(Je),y=g.effectTag,y&4096?(g.effectTag=y&-4097|64,g):null;case 19:return Re(Je),null;case 4:return Ec(),null;case 10:return Hb(g),null;default:return null}}function hw(g,y){return{value:g,source:y,stack:bc(y)}}var VU=typeof WeakSet=="function"?WeakSet:Set;function vw(g,y){var C=y.source,T=y.stack;T===null&&C!==null&&(T=bc(C)),C!==null&&D(C.type),y=y.value,g!==null&&g.tag===1&&D(g.type);try{console.error(y)}catch(E){setTimeout(function(){throw E})}}function jU(g,y){try{y.props=g.memoizedProps,y.state=g.memoizedState,y.componentWillUnmount()}catch(C){qs(g,C)}}function JI(g){var y=g.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(C){qs(g,C)}else y.current=null}function HU(g,y){switch(y.tag){case 0:case 11:case 15:case 22:return;case 1:if(y.effectTag&256&&g!==null){var C=g.memoizedProps,T=g.memoizedState;g=y.stateNode,y=g.getSnapshotBeforeUpdate(y.elementType===y.type?C:na(y.type,C),T),g.__reactInternalSnapshotBeforeUpdate=y}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(o(163))}function dw(g,y){if(y=y.updateQueue,y=y!==null?y.lastEffect:null,y!==null){var C=y=y.next;do{if((C.tag&g)===g){var T=C.destroy;C.destroy=void 0,T!==void 0&&T()}C=C.next}while(C!==y)}}function t2(g,y){if(y=y.updateQueue,y=y!==null?y.lastEffect:null,y!==null){var C=y=y.next;do{if((C.tag&g)===g){var T=C.create;C.destroy=T()}C=C.next}while(C!==y)}}function YU(g,y,C){switch(C.tag){case 0:case 11:case 15:case 22:t2(3,C);return;case 1:if(g=C.stateNode,C.effectTag&4)if(y===null)g.componentDidMount();else{var T=C.elementType===C.type?y.memoizedProps:na(C.type,y.memoizedProps);g.componentDidUpdate(T,y.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}y=C.updateQueue,y!==null&&AI(C,y,g);return;case 3:if(y=C.updateQueue,y!==null){if(g=null,C.child!==null)switch(C.child.tag){case 5:g=B(C.child.stateNode);break;case 1:g=C.child.stateNode}AI(C,y,g)}return;case 5:g=C.stateNode,y===null&&C.effectTag&4&&ar(g,C.type,C.memoizedProps,C);return;case 6:return;case 4:return;case 12:return;case 13:Ut&&C.memoizedState===null&&(C=C.alternate,C!==null&&(C=C.memoizedState,C!==null&&(C=C.dehydrated,C!==null&&Gb(C))));return;case 19:case 17:case 20:case 21:return}throw Error(o(163))}function e2(g,y,C){switch(typeof Tw=="function"&&Tw(y),y.tag){case 0:case 11:case 14:case 15:case 22:if(g=y.updateQueue,g!==null&&(g=g.lastEffect,g!==null)){var T=g.next;ia(97<C?97:C,function(){var E=T;do{var $=E.destroy;if($!==void 0){var z=y;try{$()}catch(nt){qs(z,nt)}}E=E.next}while(E!==T)})}break;case 1:JI(y),C=y.stateNode,typeof C.componentWillUnmount=="function"&&jU(y,C);break;case 5:JI(y);break;case 4:_t?o2(g,y,C):Bt&&WU(y)}}function r2(g,y,C){for(var T=y;;)if(e2(g,T,C),T.child===null||_t&&T.tag===4){if(T===y)break;for(;T.sibling===null;){if(T.return===null||T.return===y)return;T=T.return}T.sibling.return=T.return,T=T.sibling}else T.child.return=T,T=T.child}function i2(g){var y=g.alternate;g.return=null,g.child=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.alternate=null,g.firstEffect=null,g.lastEffect=null,g.pendingProps=null,g.memoizedProps=null,g.stateNode=null,y!==null&&i2(y)}function WU(g){if(Bt){g=g.stateNode.containerInfo;var y=_c(g);So(g,y)}}function n2(g){return g.tag===5||g.tag===3||g.tag===4}function a2(g){if(_t){t:{for(var y=g.return;y!==null;){if(n2(y)){var C=y;break t}y=y.return}throw Error(o(160))}switch(y=C.stateNode,C.tag){case 5:var T=!1;break;case 3:y=y.containerInfo,T=!0;break;case 4:y=y.containerInfo,T=!0;break;default:throw Error(o(161))}C.effectTag&16&&(Ke(y),C.effectTag&=-17);t:e:for(C=g;;){for(;C.sibling===null;){if(C.return===null||n2(C.return)){C=null;break t}C=C.return}for(C.sibling.return=C.return,C=C.sibling;C.tag!==5&&C.tag!==6&&C.tag!==18;){if(C.effectTag&2||C.child===null||C.tag===4)continue e;C.child.return=C,C=C.child}if(!(C.effectTag&2)){C=C.stateNode;break t}}T?pw(g,C,y):gw(g,C,y)}}function pw(g,y,C){var T=g.tag,E=T===5||T===6;if(E)g=E?g.stateNode:g.stateNode.instance,y?tn(C,g,y):pe(C,g);else if(T!==4&&(g=g.child,g!==null))for(pw(g,y,C),g=g.sibling;g!==null;)pw(g,y,C),g=g.sibling}function gw(g,y,C){var T=g.tag,E=T===5||T===6;if(E)g=E?g.stateNode:g.stateNode.instance,y?Lr(C,g,y):Nt(C,g);else if(T!==4&&(g=g.child,g!==null))for(gw(g,y,C),g=g.sibling;g!==null;)gw(g,y,C),g=g.sibling}function o2(g,y,C){for(var T=y,E=!1,$,z;;){if(!E){E=T.return;t:for(;;){if(E===null)throw Error(o(160));switch($=E.stateNode,E.tag){case 5:z=!1;break t;case 3:$=$.containerInfo,z=!0;break t;case 4:$=$.containerInfo,z=!0;break t}E=E.return}E=!0}if(T.tag===5||T.tag===6)r2(g,T,C),z?Hr($,T.stateNode):jr($,T.stateNode);else if(T.tag===4){if(T.child!==null){$=T.stateNode.containerInfo,z=!0,T.child.return=T,T=T.child;continue}}else if(e2(g,T,C),T.child!==null){T.child.return=T,T=T.child;continue}if(T===y)break;for(;T.sibling===null;){if(T.return===null||T.return===y)return;T=T.return,T.tag===4&&(E=!1)}T.sibling.return=T.return,T=T.sibling}}function yw(g,y){if(_t){switch(y.tag){case 0:case 11:case 14:case 15:case 22:dw(3,y);return;case 1:return;case 5:var C=y.stateNode;if(C!=null){var T=y.memoizedProps;g=g!==null?g.memoizedProps:T;var E=y.type,$=y.updateQueue;y.updateQueue=null,$!==null&&Ji(C,$,E,g,T,y)}return;case 6:if(y.stateNode===null)throw Error(o(162));C=y.memoizedProps,cr(y.stateNode,g!==null?g.memoizedProps:C,C);return;case 3:Ut&&(y=y.stateNode,y.hydrate&&(y.hydrate=!1,Lg(y.containerInfo)));return;case 12:return;case 13:l2(y),ly(y);return;case 19:ly(y);return;case 17:return}throw Error(o(163))}switch(y.tag){case 0:case 11:case 14:case 15:case 22:dw(3,y);return;case 12:return;case 13:l2(y),ly(y);return;case 19:ly(y);return;case 3:Ut&&(C=y.stateNode,C.hydrate&&(C.hydrate=!1,Lg(C.containerInfo)))}t:if(Bt){switch(y.tag){case 1:case 5:case 6:case 20:break t;case 3:case 4:y=y.stateNode,So(y.containerInfo,y.pendingChildren);break t}throw Error(o(163))}}function l2(g){var y=g;if(g.memoizedState===null)var C=!1;else C=!0,y=g.child,_w=On();if(_t&&y!==null){t:if(g=y,_t)for(y=g;;){if(y.tag===5){var T=y.stateNode;C?At(T):Hh(y.stateNode,y.memoizedProps)}else if(y.tag===6)T=y.stateNode,C?gi(T):xc(T,y.memoizedProps);else if(y.tag===13&&y.memoizedState!==null&&y.memoizedState.dehydrated===null){T=y.child.sibling,T.return=y,y=T;continue}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===g)break t;for(;y.sibling===null;){if(y.return===null||y.return===g)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}}}function ly(g){var y=g.updateQueue;if(y!==null){g.updateQueue=null;var C=g.stateNode;C===null&&(C=g.stateNode=new VU),y.forEach(function(T){var E=i8.bind(null,g,T);C.has(T)||(C.add(T),T.then(E,E))})}}var XU=typeof WeakMap=="function"?WeakMap:Map;function s2(g,y,C){C=gl(C,null),C.tag=3,C.payload={element:null};var T=y.value;return C.callback=function(){py||(py=!0,bw=T),vw(g,y)},C}function u2(g,y,C){C=gl(C,null),C.tag=3;var T=g.type.getDerivedStateFromError;if(typeof T=="function"){var E=y.value;C.payload=function(){return vw(g,y),T(E)}}var $=g.stateNode;return $!==null&&typeof $.componentDidCatch=="function"&&(C.callback=function(){typeof T!="function"&&(xl===null?xl=new Set([this]):xl.add(this),vw(g,y));var z=y.stack;this.componentDidCatch(y.value,{componentStack:z!==null?z:""})}),C}var UU=Math.ceil,sy=l.ReactCurrentDispatcher,c2=l.ReactCurrentOwner,fr=0,mw=8,Dn=16,aa=32,js=0,uy=1,f2=2,cy=3,fy=4,xw=5,Rt=fr,nn=null,Xt=null,Di=0,$r=js,hy=null,Fo=1073741823,av=1073741823,vy=null,ov=0,dy=!1,_w=0,h2=500,Ot=null,py=!1,bw=null,xl=null,gy=!1,lv=null,sv=90,Hs=null,uv=0,ww=null,yy=0;function oa(){return(Rt&(Dn|aa))!==fr?1073741821-(On()/10|0):yy!==0?yy:yy=1073741821-(On()/10|0)}function Ys(g,y,C){if(y=y.mode,(y&2)===0)return 1073741823;var T=Gg();if((y&4)===0)return T===99?1073741823:1073741822;if((Rt&Dn)!==fr)return Di;if(C!==null)g=Qh(g,C.timeoutMs|0||5e3,250);else switch(T){case 99:g=1073741823;break;case 98:g=Qh(g,150,100);break;case 97:case 96:g=Qh(g,5e3,250);break;case 95:g=2;break;default:throw Error(o(326))}return nn!==null&&g===Di&&--g,g}function Po(g,y){if(50<uv)throw uv=0,ww=null,Error(o(185));if(g=my(g,y),g!==null){var C=Gg();y===1073741823?(Rt&mw)!==fr&&(Rt&(Dn|aa))===fr?Cw(g):($i(g),Rt===fr&&Fn()):$i(g),(Rt&4)===fr||C!==98&&C!==99||(Hs===null?Hs=new Map([[g,y]]):(C=Hs.get(g),(C===void 0||C>y)&&Hs.set(g,y)))}}function my(g,y){g.expirationTime<y&&(g.expirationTime=y);var C=g.alternate;C!==null&&C.expirationTime<y&&(C.expirationTime=y);var T=g.return,E=null;if(T===null&&g.tag===3)E=g.stateNode;else for(;T!==null;){if(C=T.alternate,T.childExpirationTime<y&&(T.childExpirationTime=y),C!==null&&C.childExpirationTime<y&&(C.childExpirationTime=y),T.return===null&&T.tag===3){E=T.stateNode;break}T=T.return}return E!==null&&(nn===E&&(_y(y),$r===fy&&Qs(E,Di)),S2(E,y)),E}function xy(g){var y=g.lastExpiredTime;if(y!==0||(y=g.firstPendingTime,!C2(g,y)))return y;var C=g.lastPingedTime;return g=g.nextKnownPendingLevel,g=C>g?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?2:C);break;case cy:if(Qs(g,C),T=g.lastSuspendedTime,C===T&&(g.nextKnownPendingLevel=Sw(E)),Fo===1073741823&&(E=_w+h2-On(),10<E)){if(dy){var $=g.lastPingedTime;if($===0||$>=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=C)),10<T){g.timeoutHandle=ht(Xs.bind(null,g),T);break}Xs(g);break;case xw:if(Fo!==1073741823&&vy!==null){$=Fo;var z=vy;if(T=z.busyMinDurationMs|0,0>=T?T=0:(E=z.busyDelayMs|0,$=On()-(10*(1073741821-$)-(z.timeoutMs|0||5e3)),T=$<=E?0:E+T-$),10<T){Qs(g,C),g.timeoutHandle=ht(Xs.bind(null,g),T);break}}Xs(g);break;default:throw Error(o(329))}if($i(g),g.callbackNode===y)return v2.bind(null,g)}}return null}function Cw(g){var y=g.lastExpiredTime;if(y=y!==0?y:1073741823,(Rt&(Dn|aa))!==fr)throw Error(o(327));if(Us(),g===nn&&y===Di||Ws(g,y),Xt!==null){var C=Rt;Rt|=Dn;var T=y2();do try{QU();break}catch(E){g2(g,E)}while(1);if(jb(),Rt=C,sy.current=T,$r===uy)throw C=hy,Ws(g,y),Qs(g,y),$i(g),C;if(Xt!==null)throw Error(o(261));g.finishedWork=g.current.alternate,g.finishedExpirationTime=y,nn=null,Xs(g),$i(g)}return null}function qU(g,y){Cy(g,y),$i(g),(Rt&(Dn|aa))===fr&&Fn()}function ZU(){if(Hs!==null){var g=Hs;Hs=null,g.forEach(function(y,C){Cy(C,y),$i(C)}),Fn()}}function d2(g,y){var C=Rt;Rt|=1;try{return g(y)}finally{Rt=C,Rt===fr&&Fn()}}function p2(g,y){if((Rt&(Dn|aa))!==fr)throw Error(o(187));var C=Rt;Rt|=1;try{return ia(99,g.bind(null,y))}finally{Rt=C,Fn()}}function Ws(g,y){g.finishedWork=null,g.finishedExpirationTime=0;var C=g.timeoutHandle;if(C!==gt&&(g.timeoutHandle=gt,wt(C)),Xt!==null)for(C=Xt.return;C!==null;){var T=C;switch(T.tag){case 1:T=T.type.childContextTypes,T!=null&&wc();break;case 3:Ec(),Re(Dr),Re(or);break;case 5:Zb(T);break;case 4:Ec();break;case 13:Re(Je);break;case 19:Re(Je);break;case 10:Hb(T)}C=C.return}nn=g,Xt=Zs(g.current,null),Di=y,$r=js,hy=null,av=Fo=1073741823,vy=null,ov=0,dy=!1}function g2(g,y){do{try{if(jb(),Zg.current=ry,Qg)for(var C=br.memoizedState;C!==null;){var T=C.queue;T!==null&&(T.pending=null),C=C.next}if(ml=0,ni=ii=br=null,Qg=!1,Xt===null||Xt.return===null)return $r=uy,hy=y,Xt=null;t:{var E=g,$=Xt.return,z=Xt,nt=y;if(y=Di,z.effectTag|=2048,z.firstEffect=z.lastEffect=null,nt!==null&&typeof nt=="object"&&typeof nt.then=="function"){var yt=nt;if((z.mode&2)===0){var bt=z.alternate;bt?(z.updateQueue=bt.updateQueue,z.memoizedState=bt.memoizedState,z.expirationTime=bt.expirationTime):(z.updateQueue=null,z.memoizedState=null)}var Te=(Je.current&1)!==0,Wt=$;do{var oe;if(oe=Wt.tag===13){var we=Wt.memoizedState;if(we!==null)oe=we.dehydrated!==null;else{var an=Wt.memoizedProps;oe=an.fallback===void 0?!1:an.unstable_avoidThisFallback!==!0?!0:!Te}}if(oe){var hr=Wt.updateQueue;if(hr===null){var rt=new Set;rt.add(yt),Wt.updateQueue=rt}else hr.add(yt);if((Wt.mode&2)===0){if(Wt.effectTag|=64,z.effectTag&=-2981,z.tag===1)if(z.alternate===null)z.tag=17;else{var Q=gl(1073741823,null);Q.tag=2,yl(z,Q)}z.expirationTime=1073741823;break t}nt=void 0,z=y;var at=E.pingCache;if(at===null?(at=E.pingCache=new XU,nt=new Set,at.set(yt,nt)):(nt=at.get(yt),nt===void 0&&(nt=new Set,at.set(yt,nt))),!nt.has(z)){nt.add(z);var St=r8.bind(null,E,yt,z);yt.then(St,St)}Wt.effectTag|=4096,Wt.expirationTime=y;break t}Wt=Wt.return}while(Wt!==null);nt=Error((D(z.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
Add a <Suspense fallback=...> 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){g<Fo&&2<g&&(Fo=g),y!==null&&g<av&&2<g&&(av=g,vy=y)}function _y(g){g>ov&&(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),1<Xt.effectTag&&(g.lastEffect!==null?g.lastEffect.nextEffect=Xt:g.firstEffect=Xt,g.lastEffect=Xt))}else{if(y=zU(Xt),y!==null)return y.effectTag&=2047,y;g!==null&&(g.firstEffect=g.lastEffect=null,g.effectTag|=2048)}if(y=Xt.sibling,y!==null)return y;Xt=g}while(Xt!==null);return $r===js&&($r=xw),null}function Sw(g){var y=g.expirationTime;return g=g.childExpirationTime,y>g?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.effectTag?C.lastEffect!==null?(C.lastEffect.nextEffect=C,E=C.firstEffect):E=C:E=C.firstEffect,E!==null){var $=Rt;Rt|=aa,c2.current=null,W(g.containerInfo),Ot=E;do try{t8()}catch(Q){if(Ot===null)throw Error(o(330));qs(Ot,Q),Ot=Ot.nextEffect}while(Ot!==null);Ot=E;do try{for(var z=g,nt=y;Ot!==null;){var yt=Ot.effectTag;if(yt&16&&_t&&Ke(Ot.stateNode),yt&128){var bt=Ot.alternate;if(bt!==null){var Te=bt.ref;Te!==null&&(typeof Te=="function"?Te(null):Te.current=null)}}switch(yt&1038){case 2:a2(Ot),Ot.effectTag&=-3;break;case 6:a2(Ot),Ot.effectTag&=-3,yw(Ot.alternate,Ot);break;case 1024:Ot.effectTag&=-1025;break;case 1028:Ot.effectTag&=-1025,yw(Ot.alternate,Ot);break;case 4:yw(Ot.alternate,Ot);break;case 8:var Wt=z,oe=Ot,we=nt;_t?o2(Wt,oe,we):r2(Wt,oe,we),i2(oe)}Ot=Ot.nextEffect}}catch(Q){if(Ot===null)throw Error(o(330));qs(Ot,Q),Ot=Ot.nextEffect}while(Ot!==null);q(g.containerInfo),g.current=C,Ot=E;do try{for(yt=g;Ot!==null;){var an=Ot.effectTag;if(an&36&&YU(yt,Ot.alternate,Ot),an&128){bt=void 0;var hr=Ot.ref;if(hr!==null){var rt=Ot.stateNode;switch(Ot.tag){case 5:bt=B(rt);break;default:bt=rt}typeof hr=="function"?hr(bt):hr.current=bt}}Ot=Ot.nextEffect}}catch(Q){if(Ot===null)throw Error(o(330));qs(Ot,Q),Ot=Ot.nextEffect}while(Ot!==null);Ot=null,LU(),Rt=$}else g.current=C;if(gy)gy=!1,lv=g,sv=y;else for(Ot=E;Ot!==null;)y=Ot.nextEffect,Ot.nextEffect=null,Ot=y;if(y=g.firstPendingTime,y===0&&(xl=null),y===1073741823?g===ww?uv++:(uv=0,ww=g):uv=0,typeof Aw=="function"&&Aw(C.stateNode,T),$i(g),py)throw py=!1,g=bw,bw=null,g;return(Rt&mw)!==fr||Fn(),null}function t8(){for(;Ot!==null;){var g=Ot.effectTag;(g&256)!==0&&HU(Ot.alternate,Ot),(g&512)===0||gy||(gy=!0,xI(97,function(){return Us(),null})),Ot=Ot.nextEffect}}function Us(){if(sv!==90){var g=97<sv?97:sv;return sv=90,ia(g,e8)}}function e8(){if(lv===null)return!1;var g=lv;if(lv=null,(Rt&(Dn|aa))!==fr)throw Error(o(331));var y=Rt;for(Rt|=aa,g=g.current.firstEffect;g!==null;){try{var C=g;if((C.effectTag&512)!==0)switch(C.tag){case 0:case 11:case 15:case 22:dw(5,C),t2(5,C)}}catch(T){if(g===null)throw Error(o(330));qs(g,T)}C=g.nextEffect,g.nextEffect=null,g=C}return Rt=y,Fn(),!0}function b2(g,y,C){y=hw(C,y),y=s2(g,y,1073741823),yl(g,y),g=my(g,1073741823),g!==null&&$i(g)}function qs(g,y){if(g.tag===3)b2(g,g,y);else for(var C=g.return;C!==null;){if(C.tag===3){b2(C,g,y);break}else if(C.tag===1){var T=C.stateNode;if(typeof C.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(xl===null||!xl.has(T))){g=hw(y,g),g=u2(C,g,1073741823),yl(C,g),C=my(C,1073741823),C!==null&&$i(C);break}}C=C.return}}function r8(g,y,C){var T=g.pingCache;T!==null&&T.delete(y),nn===g&&Di===C?$r===fy||$r===cy&&Fo===1073741823&&On()-_w<h2?Ws(g,Di):dy=!0:C2(g,C)&&(y=g.lastPingedTime,y!==0&&y<C||(g.lastPingedTime=C,$i(g)))}function i8(g,y){var C=g.stateNode;C!==null&&C.delete(y),y=0,y===0&&(y=oa(),y=Ys(y,g,null)),g=my(g,y),g!==null&&$i(g)}var w2;w2=function(g,y,C){var T=y.expirationTime;if(g!==null){var E=y.pendingProps;if(g.memoizedProps!==E||Dr.current)Na=!0;else{if(T<C){switch(Na=!1,y.tag){case 3:UI(y),lw();break;case 5:if(PI(y),y.mode&4&&C!==1&&lt(y.type,E))return y.expirationTime=y.childExpirationTime=1,null;break;case 1:ei(y.type)&&Cc(y);break;case 4:qb(y,y.stateNode.containerInfo);break;case 10:wI(y,y.memoizedProps.value);break;case 13:if(y.memoizedState!==null)return T=y.child.childExpirationTime,T!==0&&T>=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&&lt(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<C&&(nt.expirationTime=C),bt=nt.alternate,bt!==null&&bt.expirationTime<C&&(bt.expirationTime=C),CI(nt.return,C),yt.expirationTime<C&&(yt.expirationTime=C);break}bt=bt.next}}else z=nt.tag===10&&nt.type===y.type?null:nt.child;if(z!==null)z.return=nt;else for(z=nt;z!==null;){if(z===y){z=null;break}if(nt=z.sibling,nt!==null){nt.return=z.return,z=nt;break}z=z.return}nt=z}}rn(g,y,E.children,C),y=y.child}return y;case 9:return E=y.type,$=y.pendingProps,T=$.children,Ac(y,C),E=Pn(E,$.unstable_observedBits),T=T(E),y.effectTag|=1,rn(g,y,T,C),y.child;case 14:return E=y.type,$=na(E,y.pendingProps),$=na(E.type,$),HI(g,y,E,$,T,C);case 15:return YI(g,y,y.type,y.pendingProps,T,C);case 17:return T=y.type,E=y.pendingProps,E=y.elementType===T?E:na(T,E),g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),y.tag=1,ei(T)?(g=!0,Cc(y)):g=!1,Ac(y,C),EI(y,T,E),Xb(y,T,E,C),uw(null,y,T,!0,g,C);case 19:return QI(g,y,C)}throw Error(o(156,y.tag))};var by={current:!1},Aw=null,Tw=null;function n8(g){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")return!1;var y=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(y.isDisabled||!y.supportsFiber)return!0;try{var C=y.inject(g);Aw=function(T){try{y.onCommitFiberRoot(C,T,void 0,(T.current.effectTag&64)===64)}catch{}},Tw=function(T){try{y.onCommitFiberUnmount(C,T)}catch{}}}catch{}return!0}function a8(g,y,C,T){this.tag=g,this.key=C,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=y,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function za(g,y,C,T){return new a8(g,y,C,T)}function Mw(g){return g=g.prototype,!(!g||!g.isReactComponent)}function o8(g){if(typeof g=="function")return Mw(g)?1:0;if(g!=null){if(g=g.$$typeof,g===m)return 11;if(g===w)return 14}return 2}function Zs(g,y){var C=g.alternate;return C===null?(C=za(g.tag,y,g.key,g.mode),C.elementType=g.elementType,C.type=g.type,C.stateNode=g.stateNode,C.alternate=g,g.alternate=C):(C.pendingProps=y,C.effectTag=0,C.nextEffect=null,C.firstEffect=null,C.lastEffect=null),C.childExpirationTime=g.childExpirationTime,C.expirationTime=g.expirationTime,C.child=g.child,C.memoizedProps=g.memoizedProps,C.memoizedState=g.memoizedState,C.updateQueue=g.updateQueue,y=g.dependencies,C.dependencies=y===null?null:{expirationTime:y.expirationTime,firstContext:y.firstContext,responders:y.responders},C.sibling=g.sibling,C.index=g.index,C.ref=g.ref,C}function wy(g,y,C,T,E,$){var z=2;if(T=g,typeof g=="function")Mw(g)&&(z=1);else if(typeof g=="string")z=5;else t:switch(g){case f:return _l(C.children,E,$,y);case x:z=8,E|=7;break;case h:z=8,E|=1;break;case v:return g=za(12,C,y,E|8),g.elementType=v,g.type=v,g.expirationTime=$,g;case _:return g=za(13,C,y,E),g.type=_,g.elementType=_,g.expirationTime=$,g;case b:return g=za(19,C,y,E),g.elementType=b,g.expirationTime=$,g;default:if(typeof g=="object"&&g!==null)switch(g.$$typeof){case d:z=10;break t;case p:z=9;break t;case m:z=11;break t;case w:z=14;break t;case S:z=16,T=null;break t;case M:z=22;break t}throw Error(o(130,g==null?g:typeof g,""))}return y=za(z,C,y,E),y.elementType=g,y.type=T,y.expirationTime=$,y}function _l(g,y,C,T){return g=za(7,g,T,y),g.expirationTime=C,g}function Ew(g,y,C){return g=za(6,g,null,y),g.expirationTime=C,g}function Ow(g,y,C){return y=za(4,g.children!==null?g.children:[],g.key,y),y.expirationTime=C,y.stateNode={containerInfo:g.containerInfo,pendingChildren:null,implementation:g.implementation},y}function l8(g,y,C){this.tag=y,this.current=null,this.containerInfo=g,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=gt,this.pendingContext=this.context=null,this.hydrate=C,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function C2(g,y){var C=g.firstSuspendedTime;return g=g.lastSuspendedTime,C!==0&&C>=y&&g<=y}function Qs(g,y){var C=g.firstSuspendedTime,T=g.lastSuspendedTime;C<y&&(g.firstSuspendedTime=y),(T>y||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<y&&(g.retryTime=y)}function Ay(g,y){T2(g,y),(g=g.alternate)&&T2(g,y)}var Fw=l.IsSomeRendererActing,M2=typeof a.unstable_flushAllWithoutAsserting=="function",Pw=a.unstable_flushAllWithoutAsserting||function(){for(var g=!1;Us();)g=!0;return g};function E2(g){try{Pw(),s8(function(){Pw()?E2(g):g()})}catch(y){g(y)}}var Ty=0,O2=!1,Iw={__proto__:null,createContainer:function(g,y,C){return g=new l8(g,y,C),y=za(3,null,null,y===2?7:y===1?3:0),g.current=y,y.stateNode=g,Yb(y),g},updateContainer:function(g,y,C,T){var E=y.current,$=oa(),z=Jh.suspense;$=Ys($,E,z);t:if(C){C=C._reactInternalFiber;e:{if(R(C)!==C||C.tag!==1)throw Error(o(170));var nt=C;do{switch(nt.tag){case 3:nt=nt.stateNode.context;break e;case 1:if(ei(nt.type)){nt=nt.stateNode.__reactInternalMemoizedMergedChildContext;break e}}nt=nt.return}while(nt!==null);throw Error(o(171))}if(C.tag===1){var yt=C.type;if(ei(yt)){C=$g(C,yt,nt);break t}}C=nt}else C=Ra;return y.context===null?y.context=C:y.pendingContext=C,y=gl($,z),y.payload={element:g},T=T===void 0?null:T,T!==null&&(y.callback=T),yl(E,y),Po(E,$),$},batchedEventUpdates:function(g,y){var C=Rt;Rt|=2;try{return g(y)}finally{Rt=C,Rt===fr&&Fn()}},batchedUpdates:d2,unbatchedUpdates:function(g,y){var C=Rt;Rt&=-2,Rt|=mw;try{return g(y)}finally{Rt=C,Rt===fr&&Fn()}},deferredUpdates:function(g){return ia(97,g)},syncUpdates:function(g,y,C,T){return ia(99,g.bind(null,y,C,T))},discreteUpdates:function(g,y,C,T,E){var $=Rt;Rt|=4;try{return ia(98,g.bind(null,y,C,T,E))}finally{Rt=$,Rt===fr&&Fn()}},flushDiscreteUpdates:function(){(Rt&(1|Dn|aa))===fr&&(ZU(),Us())},flushControlled:function(g){var y=Rt;Rt|=1;try{ia(99,g)}finally{Rt=y,Rt===fr&&Fn()}},flushSync:p2,flushPassiveEffects:Us,IsThisRendererActing:by,getPublicRootInstance:function(g){if(g=g.current,!g.child)return null;switch(g.child.tag){case 5:return B(g.child.stateNode);default:return g.child.stateNode}},attemptSynchronousHydration:function(g){switch(g.tag){case 3:var y=g.stateNode;y.hydrate&&qU(y,y.firstPendingTime);break;case 13:p2(function(){return Po(g,1073741823)}),y=Qh(oa(),150,100),Ay(g,y)}},attemptUserBlockingHydration:function(g){if(g.tag===13){var y=Qh(oa(),150,100);Po(g,y),Ay(g,y)}},attemptContinuousHydration:function(g){g.tag===13&&(Po(g,3),Ay(g,3))},attemptHydrationAtCurrentPriority:function(g){if(g.tag===13){var y=oa();y=Ys(y,g,null),Po(g,y),Ay(g,y)}},findHostInstance:A2,findHostInstanceWithWarning:function(g){return A2(g)},findHostInstanceWithNoPortals:function(g){return g=U(g),g===null?null:g.tag===20?g.stateNode.instance:g.stateNode},shouldSuspend:function(){return!1},injectIntoDevTools:function(g){var y=g.findFiberByHostInstance;return n8(i({},g,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:function(C){return C=V(C),C===null?null:C.stateNode},findFiberByHostInstance:function(C){return y?y(C):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))},act:function(g){function y(){Ty--,Fw.current=C,by.current=T}O2===!1&&(O2=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),Ty++;var C=Fw.current,T=by.current;Fw.current=!0,by.current=!0;try{var E=d2(g)}catch($){throw y(),$}if(E!==null&&typeof E=="object"&&typeof E.then=="function")return{then:function($,z){E.then(function(){1<Ty||M2===!0&&C===!0?(y(),$()):E2(function(nt){y(),nt?z(nt):$()})},function(nt){y(),z(nt)})}};try{Ty!==1||M2!==!1&&C!==!1||Pw(),y()}catch($){throw y(),$}return{then:function($){$()}}}},F2=Iw&&Iw.default||Iw;e.exports=F2.default||F2;var u8=e.exports;return e.exports=r,u8}})(rY);eY.exports=rY.exports;var Bmt=eY.exports,cT=globalThis&&globalThis.__assign||function(){return cT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cT.apply(this,arguments)},og=Pt.createContext(null);og.displayName="GroupContext";function Da(e){var r=Pt.forwardRef(function(t,i){return Pt.createElement(og.Consumer,null,function(n){return Pt.createElement(e,cT({ref:i,group:n},t))})});return r.displayName=e.name,r}var Nmt={},Gmt={getRootHostContext:function(){},getChildHostContext:function(){},createInstance:function(){},finalizeInitialChildren:function(){return!1},hideTextInstance:function(){},getPublicInstance:function(e){return e},hideInstance:function(){},unhideInstance:function(){},createTextInstance:function(){},prepareUpdate:function(){return Nmt},shouldDeprioritizeSubtree:function(){return!1},appendInitialChild:function(){},appendChildToContainer:function(){},removeChildFromContainer:function(){},prepareForCommit:function(){},resetAfterCommit:function(){},shouldSetTextContent:function(){return!1},supportsMutation:!0,appendChild:function(){}};Bmt(Gmt);var vx=globalThis&&globalThis.__assign||function(){return vx=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vx.apply(this,arguments)},zmt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t};function aF(e,r){r===void 0&&(r="ChartContainer");var t=Pt.forwardRef(function(i,n){var a=Wr.exports.useRef(),o=Wr.exports.useState(!1),l=o[0],s=o[1],u=i,c=u.className,f=c===void 0?"bizcharts":c,h=u.containerStyle,v=zmt(u,["className","containerStyle"]);return Wr.exports.useEffect(function(){s(!0)},[]),wi("div",{ref:a,className:f,style:vx({position:"relative",height:i.height||"100%",width:i.width||"100%"},h),children:l?wi(e,{...vx({ref:n,container:a.current},v)}):wi(d8,{})})});return t.displayName=r||e.name,t}var mR=globalThis&&globalThis.__assign||function(){return mR=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mR.apply(this,arguments)},aY=Pt.createContext(null);aY.displayName="CanvasContext";var Vmt=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)}}(),Zd=globalThis&&globalThis.__assign||function(){return Zd=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zd.apply(this,arguments)},jmt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},Hmt=function(){function e(){}return e.prototype.createInstance=function(r){r.children;var t=r.renderer,i=jmt(r,["children","renderer"]);t==="svg"?this.instance=new bj(Zd({},i)):this.instance=new lj(Zd({},i))},e.prototype.update=function(r){this.instance||this.createInstance(r)},e.prototype.draw=function(){!this.instance||this.instance.draw()},e.prototype.destory=function(){this.instance&&(this.instance.remove(),this.instance=null)},e}(),Ymt=function(e){Vmt(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new Hmt,i}return r.prototype.componentDidMount=function(){this.helper.draw()},r.prototype.componentWillUnmount=function(){this.helper.destory()},r.prototype.getInstance=function(){return this.helper.instance},r.prototype.render=function(){return this.helper.update(this.props),Pt.createElement(Wd,Zd({},this.props.ErrorBoundaryProps),Pt.createElement(aY.Provider,{value:this.helper},Pt.createElement(og.Provider,{value:this.helper.instance},Pt.createElement(Pt.Fragment,null,this.props.children))))},r}(Pt.Component);aF(Ymt);var oY={},oF={},Dh={},Is={};Object.defineProperty(Is,"__esModule",{value:!0});var Wmt={}.toString,Xmt=function(e,r){return Wmt.call(e)==="[object "+r+"]"};Is.default=Xmt;Object.defineProperty(Dh,"__esModule",{value:!0});var Umt=Is,sr=Dh.default=function(e){return Array.isArray?Array.isArray(e):Umt.default(e,"Array")},p_={};Object.defineProperty(p_,"__esModule",{value:!0});var dx=p_.default=function(e){var r=typeof e;return e!==null&&r==="object"||r==="function"};Object.defineProperty(oF,"__esModule",{value:!0});var qmt=Dh,Zmt=p_;function Qmt(e,r){if(!!e){var t;if(qmt.default(e))for(var i=0,n=e.length;i<n&&(t=r(e[i],i),t!==!1);i++);else if(Zmt.default(e)){for(var a in e)if(e.hasOwnProperty(a)&&(t=r(e[a],a),t===!1))break}}}var ms=oF.default=Qmt;Object.defineProperty(oY,"__esModule",{value:!0});var Kmt=oF,Zf=oY.default=Kmt.default,lF={};Object.defineProperty(lF,"__esModule",{value:!0});var Jmt=Is,Sa=lF.default=function(e){return Jmt.default(e,"Function")},lY={};Object.defineProperty(lY,"__esModule",{value:!0});function t0t(e,r,t){var i;return function(){var n=this,a=arguments,o=function(){i=null,t||e.apply(n,a)},l=t&&!i;clearTimeout(i),i=setTimeout(o,r),l&&e.apply(n,a)}}var sY=lY.default=t0t,uY={};Object.defineProperty(uY,"__esModule",{value:!0});var zm={},Qd=uY.default=function(e){return e=e||"g",zm[e]?zm[e]+=1:zm[e]=1,e+zm[e]},cY={onClick:"click",onMousedown:"mousedown",onMouseup:"mouseup",onDblclick:"dblclick",onMouseout:"mouseout",onMouseover:"mouseover",onMousemove:"mousemove",onMouseleave:"mouseleave",onMouseenter:"mouseenter",onTouchstart:"touchstart",onTouchmove:"touchmove",onTouchend:"touchend",onDragenter:"dragenter",onDragover:"dragover",onDragleave:"dragleave",onDrop:"drop",onContextmenu:"contextmenu"},e0t=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)}}(),r0t=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},i0t=function(e){e0t(r,e);function r(t){var i=e.call(this,t)||this;i.state={isReady:!1},i.handleRender=sY(function(){if(i.instance)i.forceUpdate();else{var l=i.props,s=l.group,u=l.zIndex,c=l.name;i.instance=s.chart.canvas.addGroup({zIndex:u,name:c}),s.chart.canvas.sort(),i.setState({isReady:!0})}},300),i.configGroup=function(l){var s,u=l.rotate,c=l.animate,f=l.rotateAtPoint,h=l.scale,v=l.translate,d=l.move;if(u&&i.instance.rotate(u),sr(f)&&(s=i.instance).rotateAtPoint.apply(s,f),h&&i.instance.rotate(h),v&&i.instance.translate(v[0],v[1]),d&&i.instance.move(d.x,d.y),c){var p=c.toAttrs,x=r0t(c,["toAttrs"]);i.instance.animate(p,x)}},i.bindEvents=function(){i.instance.off(),Zf(cY,function(l,s){Sa(i.props[s])&&i.instance.on(l,i.props[s])})};var n=t.group,a=t.zIndex,o=t.name;return i.id=Qd("group"),n.isChartCanvas?n.chart.on("afterrender",i.handleRender):(i.instance=n.addGroup({zIndex:a,name:o}),i.configGroup(t)),i}return r.prototype.componentWillUnmount=function(){var t=this.props.group;t.isChartCanvas&&t.chart.off("afterrender",this.handleRender),this.instance&&this.instance.remove(!0)},r.prototype.getInstance=function(){return this.instance},r.prototype.render=function(){var t=this.props.group;return this.instance&&(this.instance.clear(),this.bindEvents()),t.isChartCanvas&&this.state.isReady||!t.isChartCanvas?Pt.createElement(og.Provider,{value:this.instance},Pt.createElement(Pt.Fragment,{key:Qd(this.id)},this.props.children)):Pt.createElement(Pt.Fragment,null)},r.defaultProps={zIndex:3},r}(Pt.Component);Da(i0t);var lg={};Object.defineProperty(lg,"__esModule",{value:!0});var n0t=Is,$h=lg.default=function(e){return n0t.default(e,"String")},Jl=function(e,r){var t={};return ms(e,function(i,n){var a=!1;r.forEach(function(o){($h(o)&&o===n||o instanceof RegExp&&n.match(o))&&(a=!0)}),a||(t[n]=i)}),t},Mf=["children","hooks","ref"],Qf=function(e){var r=[],t=function(i){if(r.push(i),r.includes(i)||typeof i!="object"||i===null)return i;var n;if(sr(i)){n=[];for(var a=0,o=i.length;a<o;a++)typeof i[a]=="object"&&i[a]!=null?n[a]=t(i[a]):n[a]=i[a]}else n={},Zf(i,function(l,s){typeof l=="object"&&l!=null?n[s]=t(l):n[s]=l});return n};return t(e)},xR=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},a0t=globalThis&&globalThis.__spreadArrays||function(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var i=Array(e),n=0,r=0;r<t;r++)for(var a=arguments[r],o=0,l=a.length;o<l;o++,n++)i[n]=a[o];return i},bo=function(){function e(r){this.shape=r}return e.prototype.createInstance=function(r){this.instance=r.group.addShape(this.shape,Jl(r,["group","ctx"]))},e.prototype.destroy=function(){this.instance&&(this.instance.remove(!0),this.instance=null)},e.prototype.update=function(r){var t=this,i=Jl(r,a0t(Mf));this.destroy(),this.createInstance(i);var n=i.attrs,a=i.animate,o=i.isClipShape,l=i.visible,s=i.matrix,u=xR(i,["attrs","animate","isClipShape","visible","matrix"]);if(this.instance.attr(n),a){var c=a.toAttrs,f=xR(a,["toAttrs"]);this.instance.animate(c,f)}o&&this.instance.isClipShape(),l===!1&&this.instance.hide(),s&&this.instance.setMatrix(s),Zf(cY,function(h,v){Sa(u[v])&&t.instance.on(h,u[v])}),this.config=Qf(i)},e}(),o0t=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)}}(),wo=function(e){o0t(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.componentWillUnmount=function(){this.helper.destroy()},r.prototype.getInstance=function(){return this.helper.instance},r.prototype.render=function(){return this.helper.update(this.props),null},r}(Pt.Component),l0t=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)}}(),s0t=function(e){l0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("circle"),i}return r}(wo);Da(s0t);var u0t=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)}}(),c0t=function(e){u0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("ellipse"),i}return r}(wo);Da(c0t);var f0t=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)}}(),h0t=function(e){f0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("image"),i}return r}(wo);Da(h0t);var v0t=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)}}(),d0t=function(e){v0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("line"),i}return r}(wo);Da(d0t);var p0t=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)}}(),g0t=function(e){p0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("marker"),i}return r}(wo);Da(g0t);var y0t=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)}}(),m0t=function(e){y0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("path"),i}return r}(wo);Da(m0t);var x0t=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)}}(),_0t=function(e){x0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("polygon"),i}return r}(wo);Da(_0t);var b0t=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)}}(),w0t=function(e){b0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("polyline"),i}return r}(wo);Da(w0t);var C0t=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)}}(),S0t=function(e){C0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("rect"),i}return r}(wo);Da(S0t);var A0t=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)}}(),T0t=function(e){A0t(r,e);function r(t){var i=e.call(this,t)||this;return i.helper=new bo("text"),i}return r}(wo);Da(T0t);var px=globalThis&&globalThis.__assign||function(){return px=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},px.apply(this,arguments)},M0t=function(e,r,t,i){var n=[];return e.forEach(function(a){r.forEach(function(o){var l;n.push(px(px({},a),(l={},l[t]=o,l[i]=a[o],l)))})}),n};function fY(e){if(e.length===0)return 0;for(var r=e[0],t=0,i,n=1;n<e.length;n++)i=r+e[n],Math.abs(r)>=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;a<e.length;a++){var o=e[a];n=i(o),F0t.call(t,n)?t[n].push(o):t[n]=[o]}return t}var I0t=hY.default=P0t;function L0t(e,r){r===void 0&&(r=[]);var t;return Sa(r)?t=r:sr(r)?t=function(i,n){for(var a=0;a<r.length;a++){var o=r[a];if(i[o]<n[o])return-1;if(i[o]>n[o])return 1}return 0}:$h(r)&&(t=function(i,n){return i[r]<n[r]?-1: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;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fT.apply(this,arguments)},$0t=function(e,r,t,i){var n=[],a=i?D0t(e,i):{_data:e};return Zf(a,function(o){var l=fY(o.map(function(s){return s[r]}));Zf(o,function(s){var u=fT({},s);l===0?u[t]=0:u[t]=s[r]/l,n.push(u)})}),n},k0t=function(e,r){r===void 0&&(r=2);var t=1e4,i=1e8;return e>=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;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hT.apply(this,arguments)},vT=function(e,r){return r===void 0&&(r=!0),$h(e)||Pt.isValidElement(e)?{visible:!0,text:e}:G0t(e)?{visible:e}:dx(e)?hT({visible:!0},e):{visible:r}};function _R(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function bR(e){return sr(e)?e.length:dx(e)?Object.keys(e).length:0}function sg(e,r){if(_R(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null||sr(e)!==sr(r)||bR(e)!==bR(r))return!1;var t=!0;return ms(e,function(i,n){return _R(i,r[n])?!0:(t=!1,t)}),t}var z0t=Object.freeze(Object.defineProperty({__proto__:null,fold:M0t,percentage:$0t,minifyNum:k0t,splitBySeparator:R0t,visibleHelper:vT,cloneDeep:Qf,shallowEqual:sg},Symbol.toStringTag,{value:"Module"})),Nu=[],V0t=function(){return Nu.some(function(e){return e.activeTargets.length>0})},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),f<e&&(e=f)}),r.push(function(){o.callback.call(o.observer,l,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var t=0,i=r;t<i.length;t++){var n=i[t];n()}return e},TR=function(e){Nu.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(mY(n.target)>e?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<e.length;t+=1)if(e[t].target===r)return t;return-1},Hm=function(){function e(){}return e.connect=function(r,t){var i=new lxt(r,t);jm.set(r,i)},e.observe=function(r,t,i){var n=jm.get(r),a=n.observationTargets.length===0;FR(n.observationTargets,t)<0&&(a&&Nu.push(n),n.observationTargets.push(new oxt(t,i&&i.box)),OR(1),dT.schedule())},e.unobserve=function(r,t){var i=jm.get(r),n=FR(i.observationTargets,t),a=i.observationTargets.length===1;n>=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<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},PR.apply(this,arguments)},g_=Pt.createContext(null);g_.displayName="RootChartContext";var bY={},y_={};Object.defineProperty(y_,"__esModule",{value:!0});var sxt=function(e){return typeof e=="object"&&e!==null};y_.default=sxt;var uF={};Object.defineProperty(uF,"__esModule",{value:!0});var uxt=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)};uF.default=uxt;Object.defineProperty(bY,"__esModule",{value:!0});var IR=y_,LR=uF,DR=lg,pT=function(e,r){if(e===r)return!0;if(!e||!r||DR.default(e)||DR.default(r))return!1;if(LR.default(e)||LR.default(r)){if(e.length!==r.length)return!1;for(var t=!0,i=0;i<e.length&&(t=pT(e[i],r[i]),!!t);i++);return t}if(IR.default(e)||IR.default(r)){var n=Object.keys(e),a=Object.keys(r);if(n.length!==a.length)return!1;for(var t=!0,i=0;i<n.length&&(t=pT(e[n[i]],r[n[i]]),!!t);i++);return t}return!1},cxt=bY.default=pT,fxt=["mousedown","mouseup","dblclick","mouseenter","mouseout","mouseover","mousemove","mouseleave","contextmenu","click","show","hide","change"],hxt=new RegExp("^on(.*)(?=("+fxt.map(function(e){return e.replace(/^\S/,function(r){return r.toUpperCase()})}).join("|")+"))"),gx=function(e){var r=[];return Zf(e,function(t,i){var n=i.match(/^on(.*)/);if(n){var a=i.match(hxt);if(a){var o=a[1].replace(/([A-Z])/g,"-$1").toLowerCase();o=o.replace("column","interval"),o?r.push([i,o.replace("-","")+":"+a[2].toLowerCase()]):r.push([i,a[2].toLowerCase()])}else r.push([i,n[1].toLowerCase()])}}),r},vxt=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)}}(),gT=globalThis&&globalThis.__assign||function(){return gT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gT.apply(this,arguments)},Ym=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},Wm=globalThis&&globalThis.__spreadArrays||function(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var i=Array(e),n=0,r=0;r<t;r++)for(var a=arguments[r],o=0,l=a.length;o<l;o++,n++)i[n]=a[o];return i},dxt=function(e){return e&&e.rows?e.rows:e},pxt=function(e){vxt(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.config={},t}return r.prototype.createInstance=function(t){this.chart=new ut.Chart(gT({},t)),this.key=Qd("bx-chart"),this.chart.emit("initialed"),this.isNewInstance=!0,this.extendGroup={isChartCanvas:!0,chart:this.chart}},r.prototype.render=function(){if(!!this.chart)try{this.isNewInstance?(this.chart.render(),this.onGetG2Instance(),this.chart.unbindAutoFit(),this.isNewInstance=!1):this.chart.forceReRender?this.chart.render():this.chart.render(!0),this.chart.emit("processElemens")}catch(t){this.emit("renderError",t),this.destory(),console&&console.error(t==null?void 0:t.stack)}},r.prototype.onGetG2Instance=function(){Sa(this.config.onGetG2Instance)&&this.config.onGetG2Instance(this.chart)},r.prototype.shouldReCreateInstance=function(t){if(!this.chart||t.forceUpdate)return!0;var i=this.config,n=i.data,a=Ym(i,["data"]),o=t.data,l=Ym(t,["data"]);if(sr(this.config.data)&&n.length===0&&sr(o)&&o.length!==0)return!0;var s=Wm(Mf,["scale","width","height","container","_container","_interactions","placeholder",/^on/,/^\_on/]);return!cxt(Jl(a,Wm(s)),Jl(l,Wm(s)))},r.prototype.update=function(t){var i=this,n=Qf(this.adapterOptions(t));this.shouldReCreateInstance(n)&&(this.destory(),this.createInstance(n)),n.pure&&(this.chart.axis(!1),this.chart.tooltip(!1),this.chart.legend(!1),this.chart.isPure=!0);var a=gx(this.config),o=gx(n),l=n.data,s=n.interactions,u=Ym(n,["data","interactions"]),c=this.config,f=c.data,h=c.interactions,v=h===void 0?[]:h;if(this.isNewInstance||a.forEach(function(b){i.chart.off(b[1],i.config["_"+b[0]])}),o.forEach(function(b){n["_"+b[0]]=function(w){n[b[0]](w,i.chart)},i.chart.on(b[1],n["_"+b[0]])}),sr(f)&&f.length){var d=!0;if(n.notCompareData&&(d=!1),f.length!==l.length?d=!1:f.forEach(function(b,w){sg(b,l[w])||(d=!1)}),!d){this.chart.isDataChanged=!0,this.chart.emit(Kt.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA),this.chart.data(l);for(var p=this.chart.views,x=0,m=p.length;x<m;x++){var _=p[x];_.changeData(l)}this.chart.emit(Kt.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA)}}else this.chart.data(l);this.chart.scale(u.scale),u.animate===!1?this.chart.animate(!1):this.chart.animate(!0),v.forEach(function(b){i.chart.removeInteraction(b)}),s.forEach(function(b){i.chart.interaction(b)}),ms(this.config.filter,function(b,w){sr(b)?i.chart.filter(b[0],null):i.chart.filter(w,null)}),ms(n.filter,function(b,w){sr(b)?i.chart.filter(b[0],b[1]):i.chart.filter(w,b)}),this.chart.theme(n.theme),this.config=n},r.prototype.adapterOptions=function(t){var i=t.data,n=Ym(t,["data"]),a=Jl(n,Wm(Mf));return a.forceFit,a.data=dxt(i)||[],a},r.prototype.destory=function(){if(!!this.chart){this.extendGroup=null;var t=this.chart;t.destroy(),t=null,this.chart=null,this.config={}}},r}(gp),gxt=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)}}(),wd=globalThis&&globalThis.__assign||function(){return wd=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wd.apply(this,arguments)},yxt=function(e){gxt(r,e);function r(t){var i=e.call(this,t)||this;return i.isRootView=!0,i.resize=sY(function(){var n=i.chartHelper.chart;if(i.props.autoFit&&i.chartHelper.chart){var a=h1.getChartSize(i.props.container,i.props.autoFit,n.width,n.height),o=a.width,l=a.height;(n.width!==o||n.height!==l)&&(n.changeSize(o,l),n.emit("resize"))}},300),i.resizeObserver=new _Y(i.resize),i.resizeObserver.observe(t.container),i.chartHelper=new pxt,i}return r.prototype.componentDidMount=function(){this.isError?this.chartHelper.destory():this.chartHelper.render()},r.prototype.componentDidUpdate=function(){if(this.isError){this.chartHelper.destory();return}var t=this.props,i=t.width,n=t.height,a=t.autoFit;if(!a&&this.chartHelper.chart)if(i>=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;c<arguments.length;c++)u[c]=arguments[c];t.isError=!0,pt(l.onError)&&l.onError.apply(l,u)},onReset:function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];t.isError=!1,pt(l.onReset)&&l.onReset.apply(l,u)},resetKeys:[this.chartHelper.key],fallback:o}),Pt.createElement(g_.Provider,{value:this.chartHelper},Pt.createElement(Fs.Provider,{value:this.chartHelper.chart},Pt.createElement(og.Provider,{value:this.chartHelper.extendGroup},this.props.children))))},r.defaultProps={placeholder:!1,visible:!0,interactions:[],filter:[]},r}(Pt.Component),$Vt=aF(yxt),wY={},cF={};Object.defineProperty(cF,"__esModule",{value:!0});var mxt=y_,xxt=Is,_xt=function(e){if(!mxt.default(e)||!xxt.default(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r};cF.default=_xt;Object.defineProperty(wY,"__esModule",{value:!0});var bxt=Dh,$R=cF,wxt=5;function CY(e,r,t,i){t=t||0,i=i||wxt;for(var n in r)if(r.hasOwnProperty(n)){var a=r[n];a!==null&&$R.default(a)?($R.default(e[n])||(e[n]={}),t<i?CY(e[n],a,t+1,i):e[n]=r[n]):bxt.default(a)?(e[n]=[],e[n]=e[n].concat(a)):a!==void 0&&(e[n]=a)}}var Cxt=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0;i<r.length;i+=1)CY(e,r[i]);return e},Sxt=wY.default=Cxt,gf=globalThis&&globalThis.__assign||function(){return gf=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gf.apply(this,arguments)},Axt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},Txt=function(){function e(r){this.config={},this.isRootView=!1,this.chart=r}return e.prototype.creatViewInstance=function(r){this.view=this.chart.createView(this.processOptions(r)),this.view.rootChart=this.chart},e.prototype.getView=function(){return this.view},e.prototype.update=function(r){var t=this,i=this.config.data,n=r.scale,a=r.animate,o=r.filter,l=r.visible,s=r.data,u=s===void 0?[]:s;if(u.rows&&(Df(!u.rows),u=u.rows),(!this.view||sr(i)&&i.length===0)&&(this.destroy(),this.creatViewInstance(r)),sr(i)){this.view.changeData(u);var c=!0;i.length!==u.length?c=!1:i.forEach(function(f,h){sg(f,u[h])||(c=!1)}),c||this.view.changeData(u)}else this.view.data(u);this.view.scale(n),this.view.animate(a),ms(this.config.filter,function(f,h){sr(f)?t.view.filter(f[0],null):t.view.filter(h,null)}),ms(o,function(f,h){sr(f)?t.view.filter(f[0],f[1]):t.view.filter(h,f)}),l?this.view.show():this.view.hide(),this.config=gf(gf({},r),{data:u})},e.prototype.destroy=function(){this.view&&(this.view.destroy(),this.view=null),this.config={}},e.prototype.processOptions=function(r){var t=r.region,i=r.start,n=r.end,a=Axt(r,["region","start","end"]),o=Sxt({start:{x:0,y:0},end:{x:1,y:1}},{start:i,end:n},t);return gf(gf({},a),{region:o})},e}(),Mxt=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)}}(),Ext=function(e){Mxt(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.name="view",t}return r.prototype.componentWillUnmount=function(){this.viewHelper.destroy(),this.viewHelper=null},r.prototype.render=function(){return this.viewHelper||(this.viewHelper=new Txt(this.context.chart)),this.viewHelper.update(this.props),Pt.createElement(Fs.Provider,{value:this.viewHelper.view},Pt.createElement(Pt.Fragment,null,this.props.children))},r.defaultProps={visible:!0,preInteractions:[],filter:[]},r}(Pt.Component);Ext.contextType=g_;function fF(){return Pt.useContext(Fs)}var SY={};Object.defineProperty(SY,"__esModule",{value:!0});var Oxt=lg,kt=SY.default=function(e,r,t){for(var i=0,n=Oxt.default(r)?r.split("."):r;e&&i<n.length;)e=e[n[i++]];return e===void 0||i<n.length?t:e},AY={};Object.defineProperty(AY,"__esModule",{value:!0});function Fxt(e,r){if(e)for(var t in r)r.hasOwnProperty(t)&&(e.style[t]=r[t]);return e}var Pxt=AY.default=Fxt,Ixt=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)}}(),yf=globalThis&&globalThis.__assign||function(){return yf=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yf.apply(this,arguments)},Lxt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},kR="g2-tooltip",Dxt=function(e){Ixt(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.renderInnder=function(i){var n=i.data,a=n.title,o=n.items,l=n.x,s=n.y;VG.render(t.props.children(a,o,l,s,i),t.getElement())},t}return r.prototype.componentWillUnmount=function(){var t=this.props.chartView;this.element&&this.element.remove(),t.getController("tooltip").clear(),t.off("tooltip:change",this.renderInnder)},r.prototype.getElement=function(){return this.element||(this.element=document.createElement("div"),this.element.classList.add("bizcharts-tooltip"),this.element.classList.add("g2-tooltip"),this.element.style.width="auto",this.element.style.height="auto"),this.element},r.prototype.overwriteCfg=function(){var t=this,i=this.props,n=i.chartView;i.children;var a=i.domStyles,o=a===void 0?{}:a,l=Lxt(i,["chartView","children","domStyles"]);n.tooltip(yf(yf({inPlot:!1,domStyles:o},l),{customContent:function(){return t.getElement()}})),n.on("tooltip:change",this.renderInnder);var s=kt(ut.getTheme(),["components","tooltip","domStyles",kR],{});Pxt(this.element,yf(yf({},s),o[kR]))},r.prototype.render=function(){return this.overwriteCfg(),null},r}(Pt.Component),$xt=yet(Dxt),kxt=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)}}(),Xm={},Rxt=function(){function e(r){this.cfg={shared:!0},this.chartMap={},this.state={},this.id=Fa("bx-action"),this.type=r||"tooltip"}return e.prototype.connect=function(r,t,i){return this.chartMap[r]={chart:t,pointFinder:i},t.interaction("connect-"+this.type+"-"+this.id),this.type==="tooltip"&&this.cfg.shared&&I(t,["options","tooltip","shared"])===void 0&&jt(t,["options","tooltip","shared"],!0),this},e.prototype.unConnect=function(r){this.chartMap[r].chart.removeInteraction("connect-"+this.type+"-"+this.id),delete this.chartMap[r]},e.prototype.destroy=function(){y3("connect-"+this.type+"-"+this.id)},e}(),Bxt=function(){var e=new Rxt("tooltip");return ut.registerAction("connect-tooltip-"+e.id,function(r){kxt(t,r);function t(){var i=r!==null&&r.apply(this,arguments)||this;return i.CM=e,i}return t.prototype.showTooltip=function(i,n){var a=i.getTooltipItems(n)||n;P(this.CM.chartMap,function(o){var l=o.chart,s=o.pointFinder;if(!(l.destroyed||!l.visible))if(s){var u=s(a,l);u&&l.showTooltip(u)}else l.showTooltip(n)})},t.prototype.hideTooltip=function(){P(this.CM.chartMap,function(i){var n=i.chart;return n.hideTooltip()})},t}(gH)),ut.registerInteraction("connect-tooltip-"+e.id,{start:[{trigger:"plot:mousemove",action:"connect-tooltip-"+e.id+":show"}],end:[{trigger:"plot:mouseleave",action:"connect-tooltip-"+e.id+":hide"}]}),e},RR=function(e,r,t,i,n){var a=Xm[e];if(t===null&&a){a.unConnect(r);return}a?a.connect(r,t,n):(Xm[e]=Bxt(),Xm[e].cfg.shared=!!i,Xm[e].connect(r,t,n))};ut.registerAction("tooltip",gH);ut.registerAction("sibling-tooltip",dgt);ut.registerAction("active-region",ugt);ut.registerAction("ellipsis-text",mgt);ut.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"}]});ut.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"}]});ut.registerInteraction("tooltip-click",{start:[{trigger:"plot:click",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchstart",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:leave",action:"tooltip:hide"}]});var BR=function(e){var r=e.view.isTooltipLocked();r?e.view.unlockTooltip():e.view.lockTooltip()};ut.registerInteraction("tooltip-lock",{start:[{trigger:"plot:click",action:BR},{trigger:"plot:touchstart",action:BR},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:mousemove",action:"tooltip:show"}],end:[{trigger:"plot:click",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]});ut.registerInteraction("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]});var Jd=globalThis&&globalThis.__assign||function(){return Jd=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jd.apply(this,arguments)},TY=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t};ut.registerComponentController("tooltip",plt);var Nxt=function(e){var r=e.visible,t=r===void 0?!0:r,i=e.children;return t&&Sa(i)},Gxt=function(e){var r=e.visible,t=r===void 0?!0:r;e.children;var i=TY(e,["visible","children"]),n=fF();return n.getController("tooltip").clear(),t===!0?n.tooltip(Jd({customContent:null,showMarkers:!1},i)):n.tooltip(!1),null};function zxt(e){var r=e.children,t=e.triggerOn,i=e.onShow,n=e.onChange,a=e.onHide,o=e.lock,l=e.linkage,s=TY(e,["children","triggerOn","onShow","onChange","onHide","lock","linkage"]),u=fF();u.removeInteraction("tooltip"),u.removeInteraction("tooltip-click"),u.removeInteraction("tooltip-lock"),t==="click"?u.interaction("tooltip-click"):o?u.interaction("tooltip-lock"):u.interaction("tooltip");var c=Wr.exports.useRef(Qd("tooltip"));Wr.exports.useEffect(function(){sr(l)?RR(l[0],c.current,u,s.shared,l[1]):$h(l)&&RR(l,c.current,u,s.shared)},[l,u]);var f=Wr.exports.useCallback(function(d){Sa(i)&&i(d,u)},[]),h=Wr.exports.useCallback(function(d){Sa(n)&&n(d,u)},[]),v=Wr.exports.useCallback(function(d){Sa(a)&&a(d,u)},[]);return u.off("tooltip:show",f),u.on("tooltip:show",f),u.off("tooltip:change",h),u.on("tooltip:change",h),u.off("tooltip:hide",v),u.on("tooltip:hide",v),Nxt(e)?wi($xt,{...Jd({},s),children:r}):wi(Gxt,{...Jd({},e)})}zxt.defaultProps={showMarkers:!1,triggerOn:"hover"};ut.registerAction("list-active",gyt);ut.registerAction("list-selected",Syt);ut.registerAction("list-highlight",RH);ut.registerAction("list-unchecked",Myt);ut.registerAction("data-filter",Kyt);ut.registerAction("legend-item-highlight",RH,{componentNames:["legend"]});ut.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"]}]});ut.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"]}]});ut.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"},{trigger:"legend-item:click",action:"data-filter:filter"}]});globalThis&&globalThis.__rest;ut.registerComponentController("legend",Ypt);var MY={};Object.defineProperty(MY,"__esModule",{value:!0});var Vxt=function(e){return e==null},si=MY.default=Vxt,NR=globalThis&&globalThis.__assign||function(){return NR=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},NR.apply(this,arguments)};globalThis&&globalThis.__rest;var EY={};Object.defineProperty(EY,"__esModule",{value:!0});var jxt=Dh,yT=function(e){if(typeof e!="object"||e===null)return e;var r;if(jxt.default(e)){r=[];for(var t=0,i=e.length;t<i;t++)typeof e[t]=="object"&&e[t]!=null?r[t]=yT(e[t]):r[t]=e[t]}else{r={};for(var n in e)typeof e[n]=="object"&&e[n]!=null?r[n]=yT(e[n]):r[n]=e[n]}return r},Hxt=EY.default=yT,Yxt=function(e,r){var t=Hxt(e);return r.forEach(function(i){t[i]===!0?t[i]={}:t[i]===!1&&(t[i]=null)}),t},Wxt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t};ut.registerComponentController("axis",$pt);var GR=function(e){return e===void 0},Xxt=function(e){return Yxt(e,["title","line","tickLine","subTickLine","label","grid"])};function kVt(e){var r=e.name,t=e.visible,i=t===void 0?!0:t,n=Wxt(e,["name","visible"]),a=fF(),o=Xxt(n);return i?GR(r)?a.axis(!0):a.axis(r,o):GR(r)?a.axis(!1):a.axis(r,!1),null}var zR=globalThis&&globalThis.__assign||function(){return zR=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zR.apply(this,arguments)};globalThis&&globalThis.__rest;ut.registerFacet("rect",Cpt);ut.registerFacet("mirror",_pt);ut.registerFacet("list",dpt);ut.registerFacet("matrix",ypt);ut.registerFacet("circle",upt);ut.registerFacet("tree",Mpt);ut.registerComponentController("slider",Qpt);var vS=function(e,r,t,i){if(e===null){ms(t,function(o){var l=r[o];l!==void 0&&(sr(l)||(l=[l]),i(l,o))});return}var n,a;ms(t,function(o){n=e[o],a=r[o],sg(a,n)||(sr(a)||(a=[a]),i(a,o))})};globalThis&&globalThis.__rest;ut.registerGeometryLabel("base",L3);ut.registerGeometryLabel("interval",Kj);ut.registerGeometryLabel("pie",Jj);ut.registerGeometryLabel("polar",rdt);ut.registerGeometryLabelLayout("overlap",iH);ut.registerGeometryLabelLayout("distribute",tH);ut.registerGeometryLabelLayout("fixed-overlap",oH);ut.registerGeometryLabelLayout("limit-in-shape",rH);ut.registerGeometryLabelLayout("limit-in-canvas",eH);ut.registerAction("cursor",Uyt);ut.registerAction("element-active",Mgt);ut.registerAction("element-single-active",Ggt);ut.registerAction("element-range-active",$gt);ut.registerAction("element-highlight",Hgt);ut.registerAction("element-highlight-by-x",qgt);ut.registerAction("element-highlight-by-color",Xgt);ut.registerAction("element-single-highlight",eyt);ut.registerAction("element-range-highlight",OH);ut.registerAction("element-sibling-highlight",OH,{effectSiblings:!0,effectByRecord:!0});ut.registerAction("element-selected",lyt);ut.registerAction("element-single-selected",cyt);ut.registerAction("element-range-selected",nyt);ut.registerAction("element-link-by-color",Fgt);ut.registerInteraction("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]});ut.registerInteraction("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]});ut.registerInteraction("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]});ut.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"}]});ut.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"}]});var Uxt=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)}}();ut.registerGeometryLabel("base",L3);var qxt=["line","area"],Zxt=function(){function e(){this.config={}}return e.prototype.setView=function(r){this.view=r,this.rootChart=r.rootChart||r},e.prototype.createGeomInstance=function(r,t){this.geom=this.view[r](t);var i=t.sortable;this.geom.__beforeMapping=this.geom.beforeMapping,this.geom.beforeMapping=function(n){var a=this.getXScale();return i!==!1&&n&&n[0]&&qxt.includes(r)&&["time","timeCat"].includes(a.type)&&this.sort(n),this.__beforeMapping(n)},this.GemoBaseClassName=r},e.prototype.update=function(r,t){var i=this;this.geom||(this.setView(t.context),this.createGeomInstance(t.GemoBaseClassName,r),this.interactionTypes=t.interactionTypes),vS(this.config,r,["position","shape","color","label","style","tooltip","size","animate","state","customInfo"],function(n,a){var o;Df(!(a==="label"&&n[0]===!0)),(o=i.geom)[a].apply(o,n)}),vS(this.config,r,["adjust"],function(n,a){$h(n[0])?i.geom[a](n[0]):i.geom[a](n)}),this.geom.state(r.state||{}),this.rootChart.on("processElemens",function(){Sa(r.setElements)&&r.setElements(i.geom.elements)}),vS(this.config,r,this.interactionTypes,function(n,a){n[0]?i.rootChart.interaction(a):i.rootChart.removeInteraction(a)}),this.config=Qf(r)},e.prototype.destroy=function(){this.geom&&(this.geom.destroy(),this.geom=null),this.config={}},e}(),Co=function(e){Uxt(r,e);function r(t){var i=e.call(this,t)||this;return i.interactionTypes=[],i.geomHelper=new Zxt,i}return r.prototype.componentWillUnmount=function(){this.geomHelper.destroy()},r.prototype.render=function(){var t=this;return this.geomHelper.update(this.props,this),Pt.createElement(Pt.Fragment,null,Pt.Children.map(this.props.children,function(i){return Pt.isValidElement(i)?Pt.cloneElement(i,{parentInstance:t.geomHelper.geom}):Pt.createElement(Pt.Fragment,null)}))},r}(Pt.Component);Co.contextType=Fs;var Qxt=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)}}();ut.registerGeometry("Area",Mft);var RVt=function(e){Qxt(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="area",t}return r}(Co),Kxt=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)}}();ut.registerGeometry("Edge",Dft);(function(e){Kxt(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="edge",t}return r})(Co);var Jxt=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)}}();ut.registerGeometry("Heatmap",Bft);(function(e){Jxt(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="heatmap",t}return r})(Co);var t1t=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)}}();ut.registerGeometry("Interval",eht);ut.registerGeometryLabel("interval",Kj);ut.registerGeometryLabel("pie",Jj);ut.registerInteraction("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]});(function(e){t1t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.interactionTypes=["active-region","element-highlight"],t.GemoBaseClassName="interval",t}return r})(Co);var e1t=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)}}();ut.registerGeometry("Line",nht);var BVt=function(e){e1t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="line",t}return r}(Co),r1t=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)}}();ut.registerGeometry("Point",vht);(function(e){r1t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="point",t}return r})(Co);var i1t=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)}}();ut.registerGeometry("Polygon",xht);(function(e){i1t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="polygon",t}return r})(Co);var n1t=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)}}();ut.registerGeometry("Schema",Tht);(function(e){n1t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="schema",t}return r})(Co);var a1t=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)}}();ut.registerAnimation("path-in",XE);ut.registerGeometry("Path",dft);(function(e){a1t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.GemoBaseClassName="path",t}return r})(Co);var OY={},hF={};Object.defineProperty(hF,"__esModule",{value:!0});var o1t=Is,l1t=function(e){return o1t.default(e,"Number")};hF.default=l1t;Object.defineProperty(OY,"__esModule",{value:!0});var s1t=p_,u1t=lg,c1t=hF,ve=OY.default=function(e,r,t){var i=e,n=u1t.default(r)?r.split("."):r;return n.forEach(function(a,o){o<n.length-1?(s1t.default(i[a])||(i[a]=c1t.default(n[o+1])?[]:{}),i=i[a]):i[a]=t}),e},VR=globalThis&&globalThis.__assign||function(){return VR=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},VR.apply(this,arguments)};globalThis&&globalThis.__rest;ut.registerShape("area","gradient",{draw:function(e,r){var t=oO(e,!1,!1,this),i=t.fill,n=Wu(i);n&&(t.fill="l (90) 0:"+Xu(n.r,n.g,n.b,1).formatRgb()+" 1:"+Xu(n.r,n.g,n.b,.1).formatRgb());var a=r.addShape({type:"path",attrs:t,name:"area"});return a}});ut.registerShape("area","gradient-smooth",{draw:function(e,r){var t=this.coordinate,i=oO(e,!1,!0,this,Tj(t)),n=i.fill,a=Wu(n);a&&(i.fill="l (90) 0:"+Xu(a.r,a.g,a.b,1).formatRgb()+" 1:"+Xu(a.r,a.g,a.b,.1).formatRgb());var o=r.addShape({type:"path",attrs:i,name:"area"});return o}});var jR=globalThis&&globalThis.__assign||function(){return jR=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jR.apply(this,arguments)};globalThis&&globalThis.__rest;var HR=globalThis&&globalThis.__assign||function(){return HR=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},HR.apply(this,arguments)};function dS(e,r){return r===void 0&&(r={}),{width:Mt(r.width)?r.width:e.clientWidth,height:Mt(r.height)?r.height:e.clientHeight}}var Vo=globalThis&&globalThis.__assign||function(){return Vo=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vo.apply(this,arguments)},$a=function(e,r){e.forEach(function(t){var i=t.sourceKey,n=t.targetKey;t.notice;var a=I(r,i);a&&jt(r,n,a)})},YR=function(e,r){var t=I(e,r);if(t===!1||t===null){e[r]=null;return}if(t!==void 0){if(t===!0){e[r]={};return}if(!!qt(t)){Er(t,"line",null),Er(t,"grid",null),Er(t,"label",null),Er(t,"tickLine",null),Er(t,"title",null);var i=I(t,"label");if(i&&qt(i)){var n=i.suffix;n&&jt(i,"formatter",function(s){return""+s+n});var a=i.offsetX,o=i.offsetY,l=i.offset;K(l)&&(!K(a)||!K(o))&&(r==="xAxis"&&jt(i,"offset",K(a)?o:a),r==="yAxis"&&jt(i,"offset",K(o)?a:o))}e[r]=Vo(Vo({},t),{label:i})}}},Er=function(e,r,t){t===void 0&&(t=!1);var i=I(e,r+".visible");return(i===!1||i===null)&&jt(e,r,t),i},He=function(e){var r=Vo({},e);Er(r,"tooltip");var t=Er(r,"legend");if(t){Er(r,"legend.title");var i=I(r,"legend.position");i&&jt(r,"legend.position",{"top-center":"top","right-center":"right","left-center":"left","bottom-center":"bottom"}[i]||i)}var n=I(r,"legend.formatter");if(n){var a=I(r,"legend.itemName",{});jt(r,"legend.itemName",Vo(Vo({},a),{formatter:n}))}var o=I(r,"legend.text");o&&jt(r,"legend.itemName",o),Er(r,"label"),YR(r,"xAxis"),YR(r,"yAxis");var l=I(r,"guideLine",[]),s=I(r,"data",[]),u=I(r,"yField","y");l.forEach(function(h){if(s.length>0){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<t.length&&(n=mT(e[t[a]],r[t[a]]),!!n);a++);return n}if(it(e)&&it(r)){if(e.length!==r.length)return!1;for(var n=!0,a=0;a<e.length&&(n=mT(e[a],r[a]),!!n);a++);return n}return e===r?!0:(!e||!r,!1)},xs={},mt={},m_={};Object.defineProperty(m_,"__esModule",{value:!0});m_.flow=void 0;function v1t(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.reduce(function(i,n){return n(i)},t)}}m_.flow=v1t;var ug={};Object.defineProperty(ug,"__esModule",{value:!0});ug.pick=void 0;function d1t(e,r){var t={};return e!==null&&typeof e=="object"&&r.forEach(function(i){var n=e[i];n!==void 0&&(t[i]=n)}),t}ug.pick=d1t;var x_={};Object.defineProperty(x_,"__esModule",{value:!0});x_.template=void 0;var p1t=Y;function g1t(e,r){return r?p1t.reduce(r,function(t,i,n){return t.replace(new RegExp("{\\s*"+n+"\\s*}","g"),i)},e):e}x_.template=g1t;var vF={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.invariant=e.LEVEL=void 0;var r=j;(function(o){o.ERROR="error",o.WARN="warn",o.INFO="log"})(e.LEVEL||(e.LEVEL={}));var t="AntV/G2Plot";function i(o){for(var l=[],s=1;s<arguments.length;s++)l[s-1]=arguments[s];var u=0;return t+": "+o.replace(/%s/g,function(){return""+l[u++]})}function n(o,l){for(var s=[],u=2;u<arguments.length;u++)s[u-2]=arguments[u];if(!o){var c=new Error(i.apply(void 0,r.__spreadArrays([l],s)));throw c.name=t,c}}e.invariant=n;function a(o,l,s){for(var u=[],c=3;c<arguments.length;c++)u[c-3]=arguments[c];l||console[o](i.apply(void 0,r.__spreadArrays([s],u)))}e.log=a})(vF);var __={};Object.defineProperty(__,"__esModule",{value:!0});__.getContainerSize=void 0;function y1t(e){if(!e)return{width:0,height:0};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)}}__.getContainerSize=y1t;var ao={};Object.defineProperty(ao,"__esModule",{value:!0});ao.getAllGeometriesRecursively=ao.getAllElementsRecursively=ao.getAllElements=ao.findGeometry=void 0;var tp=Y;function m1t(e,r){return e.geometries.find(function(t){return t.type===r})}ao.findGeometry=m1t;function xT(e){return tp.reduce(e.geometries,function(r,t){return r.concat(t.elements)},[])}ao.getAllElements=xT;function FY(e){return tp.get(e,["views","length"],0)<=0?xT(e):tp.reduce(e.views,function(r,t){return r.concat(FY(t))},xT(e))}ao.getAllElementsRecursively=FY;function x1t(e){return tp.get(e,["views","length"],0)<=0?e.geometries:tp.reduce(e.views,function(r,t){return r.concat(t.geometries)},e.geometries)}ao.getAllGeometriesRecursively=x1t;var Qo={};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.getSiblingViews=Qo.getViews=Qo.findViewById=void 0;function _1t(e,r){return e.views.find(function(t){return t.id===r})}Qo.findViewById=_1t;function PY(e){var r=e.parent;return r?r.views:[]}Qo.getViews=PY;function b1t(e){return PY(e).filter(function(r){return r!==e})}Qo.getSiblingViews=b1t;var b_={};Object.defineProperty(b_,"__esModule",{value:!0});b_.transformLabel=void 0;var w1t=j,C1t=Y;function S1t(e){if(!C1t.isType(e,"Object"))return e;var r=w1t.__assign({},e);return r.formatter&&!r.content&&(r.content=r.formatter),r}b_.transformLabel=S1t;var IY={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getSplinePath=e.catmullRom2bezier=e.smoothBezier=e.points2Path=void 0;var r=ta;function t(a,o){var l=[];if(a.length){l.push(["M",a[0].x,a[0].y]);for(var s=1,u=a.length;s<u;s+=1){var c=a[s];l.push(["L",c.x,c.y])}o&&l.push(["Z"])}return l}e.points2Path=t,e.smoothBezier=function(a,o,l,s){var u=[],c,f,h=!!s,v,d;if(h){v=[1/0,1/0],d=[-1/0,-1/0];for(var p=0,x=a.length;p<x;p++){var m=a[p];v=r.vec2.min([0,0],v,m),d=r.vec2.max([0,0],d,m)}v=r.vec2.min([0,0],v,s[0]),d=r.vec2.max([0,0],d,s[1])}for(var p=0,_=a.length;p<_;p++){var m=a[p];if(l)c=a[p?p-1:_-1],f=a[(p+1)%_];else if(p===0||p===_-1){u.push(m);continue}else c=a[p-1],f=a[p+1];var b=[0,0];b=r.vec2.sub(b,f,c),b=r.vec2.scale(b,b,o);var w=r.vec2.distance(m,c),S=r.vec2.distance(m,f),M=w+S;M!==0&&(w/=M,S/=M);var O=r.vec2.scale([0,0],b,-w),F=r.vec2.scale([0,0],b,S),L=r.vec2.add([0,0],m,O),D=r.vec2.add([0,0],m,F);h&&(L=r.vec2.max([0,0],L,v),L=r.vec2.min([0,0],L,d),D=r.vec2.max([0,0],D,v),D=r.vec2.min([0,0],D,d)),u.push(L),u.push(D)}return l&&u.push(u.shift()),u};function i(a,o,l){for(var s=!!o,u=[],c=0,f=a.length;c<f;c+=2)u.push([a[c],a[c+1]]);for(var h=e.smoothBezier(u,.4,s,l),v=u.length,d=[],p,x,m,c=0;c<v-1;c++)p=h[c*2],x=h[c*2+1],m=u[c+1],d.push(["C",p[0],p[1],x[0],x[1],m[0],m[1]]);return s&&(p=h[v],x=h[v+1],m=u[0],d.push(["C",p[0],p[1],x[0],x[1],m[0],m[1]])),d}e.catmullRom2bezier=i;function n(a,o,l){var s=[],u=a[0],c=null;if(a.length<=2)return t(a,o);for(var f=0,h=a.length;f<h;f++){var v=a[f];(!c||!(c.x===v.x&&c.y===v.y))&&(s.push(v.x),s.push(v.y),c=v)}var d=l||[[0,0],[1,1]],p=i(s,o,d);return p.unshift(["M",u.x,u.y]),p}e.getSplinePath=n})(IY);var cg={};Object.defineProperty(cg,"__esModule",{value:!0});cg.deepAssign=void 0;var A1t=5,T1t={}.toString,LY=function(e,r){return T1t.call(e)==="[object "+r+"]"},M1t=function(e){return LY(e,"Array")},E1t=function(e){return typeof e=="object"&&e!==null},XR=function(e){if(!E1t(e)||!LY(e,"Object"))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},DY=function(e,r,t,i){t=t||0,i=i||A1t;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];a?XR(a)?(XR(e[n])||(e[n]={}),t<i?DY(e[n],a,t+1,i):e[n]=r[n]):M1t(a)?(e[n]=[],e[n]=e[n].concat(a)):e[n]=a:e[n]=a}};cg.deepAssign=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0;i<r.length;i+=1)DY(e,r[i]);return e};var w_={};Object.defineProperty(w_,"__esModule",{value:!0});w_.kebabCase=void 0;function O1t(e){if(!e)return e;var r=e.match(/(([A-Z]{0,1}[a-z]*[^A-Z])|([A-Z]{1}))/g);return r.map(function(t){return t.toLowerCase()}).join("-")}w_.kebabCase=O1t;var ba={};Object.defineProperty(ba,"__esModule",{value:!0});ba.renderGaugeStatistic=ba.renderStatistic=ba.setStatisticContainerStyle=ba.adapteStyle=void 0;var yx=j,co=Y,mf=mt;function dF(e){var r={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex",justifyContent:"center",alignItems:"center"},t=["stroke","lineWidth","shadowColor","strokeOpacity","shadowBlur","shadowOffsetX","shadowOffsetY","fill"];co.get(e,"fill")&&(r.color=e.fill);var i=mf.pick(e,t),n=i.shadowColor,a=i.shadowBlur,o=a===void 0?0:a,l=i.shadowOffsetX,s=l===void 0?0:l,u=i.shadowOffsetY,c=u===void 0?0:u;r["text-shadow"]=""+[n,s+"px",c+"px",o+"px"].join(" ");var f=mf.pick(e,t),h=f.stroke,v=f.lineWidth,d=v===void 0?0:v;return r["-webkit-text-stroke"]=""+[d+"px",h].join(" "),co.each(e,function(p,x){["fontSize"].includes(x)&&co.isNumber(p)?r[mf.kebabCase(x)]=p+"px":x&&!t.includes(x)&&(r[mf.kebabCase(x)]=""+p)}),r}ba.adapteStyle=dF;function pF(e,r){e.style["pointer-events"]="none",co.each(r,function(t,i){i&&t&&(e.style[i]=t)})}ba.setStatisticContainerStyle=pF;ba.renderStatistic=function(e,r,t){var i=r.statistic,n=r.plotType,a=i.title,o=i.content;[a,o].forEach(function(l,s){if(!!l){var u="";s===0?u=o?"translate(-50%, -100%)":"translate(-50%, -50%)":u=a?"translate(-50%, 0)":"translate(-50%, -50%)";var c=co.isFunction(l.style)?l.style(t):l.style;e.annotation().html(yx.__assign({position:["50%","50%"],html:function(f,h){var v=h.getCoordinate(),d=0;if(n==="pie"||n==="ring-progress")d=v.getRadius()*v.innerRadius*2;else if(n==="liquid"){var p=co.get(h.geometries,[0,"elements",0,"shape"]);if(p){var x=p.find(function(w){return w.get("name")==="wrap"}),m=x.getCanvasBBox().width;d=m}}else d||(d=v.getWidth());pF(f,yx.__assign({width:d+"px",transform:u},dF(c)));var _=h.getData();if(l.customHtml)return l.customHtml(f,h,t,_);var b=l.content;return l.formatter&&(b=l.formatter(t,_)),b?co.isString(b)?b:""+b:"<div></div>"},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(_)?_:""+_:"<div></div>"}},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;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yr.apply(this,arguments)},RY=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},xS=globalThis&&globalThis.__spreadArrays||function(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var i=Array(e),n=0,r=0;r<t;r++)for(var a=arguments[r],o=0,l=a.length;o<l;o++,n++)i[n]=a[o];return i};yF("en-US",$Y);yF("zh-CN",kY);var W1t=wi("div",{style:{position:"absolute",top:"48%",left:"50%",color:"#aaa",textAlign:"center"},children:"\u6682\u65E0\u6570\u636E"}),X1t={padding:"8px 24px 10px 10px",fontFamily:"PingFang SC",fontSize:12,color:"grey",textAlign:"left",lineHeight:"16px"},U1t={padding:"10px 0 0 10px",fontFamily:"PingFang SC",fontSize:18,color:"black",textAlign:"left",lineHeight:"20px"},q1t=function(e){Y1t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t._context={chart:null},t}return r.prototype.componentDidMount=function(){this.props.children&&this.g2Instance.chart&&this.g2Instance.chart.render(),WR(this.g2Instance,{},this.props),this.g2Instance.data=this.props.data,this.preConfig=Qf(Jl(this.props,xS(Mf,["container","PlotClass","onGetG2Instance","data"])))},r.prototype.componentDidUpdate=function(t){this.props.children&&this.g2Instance.chart&&this.g2Instance.chart.render(),WR(this.g2Instance,t,this.props)},r.prototype.componentWillUnmount=function(){var t=this;this.g2Instance&&setTimeout(function(){t.g2Instance.destroy(),t.g2Instance=null,t._context.chart=null},0)},r.prototype.getG2Instance=function(){return this.g2Instance},r.prototype.getChartView=function(){return this.g2Instance.chart},r.prototype.checkInstanceReady=function(){var t=Jl(this.props,xS(Mf,["container","PlotClass","onGetG2Instance","data"]));this.g2Instance?this.shouldReCreate()?(this.g2Instance.destroy(),this.initInstance(),this.g2Instance.render()):this.diffConfig()?this.g2Instance.update(Yr(Yr({},t),{data:this.props.data})):this.diffData()&&this.g2Instance.changeData(this.props.data):(this.initInstance(),this.g2Instance.render()),this.preConfig=Qf(t),this.g2Instance.data=this.props.data},r.prototype.initInstance=function(){var t=this.props,i=t.container,n=t.PlotClass,a=t.onGetG2Instance;t.children;var o=RY(t,["container","PlotClass","onGetG2Instance","children"]);this.g2Instance=new n(i,o),this._context.chart=this.g2Instance,Sa(a)&&a(this.g2Instance)},r.prototype.diffConfig=function(){var t=this.preConfig||{},i=Jl(this.props,xS(Mf,["container","PlotClass","onGetG2Instance","data"]));return!mT(t,i)},r.prototype.diffData=function(){var t=this.g2Instance.data,i=this.props.data;if(!it(t)||!it(i))return!t===i;if(t.length!==i.length)return!0;var n=!0;return t.forEach(function(a,o){sg(a,i[o])||(n=!1)}),!n},r.prototype.shouldReCreate=function(){var t=this.props.forceUpdate;return!!t},r.prototype.render=function(){this.checkInstanceReady();var t=this.getChartView();return wi(g_.Provider,{value:this._context,children:wi(Fs.Provider,{value:t,children:wi("div",{children:this.props.children},Qd("plot-chart"))})})},r}(Pt.Component),Z1t=aF(q1t);function Zt(e,r,t){t===void 0&&(t=function(n){return n});var i=Pt.forwardRef(function(n,a){var o=n.title,l=n.description,s=n.autoFit,u=s===void 0?!0:s,c=n.forceFit,f=n.errorContent,h=f===void 0?dj:f,v=n.containerStyle,d=n.containerProps,p=n.placeholder,x=n.ErrorBoundaryProps,m=n.isMaterial,_=RY(n,["title","description","autoFit","forceFit","errorContent","containerStyle","containerProps","placeholder","ErrorBoundaryProps","isMaterial"]),b=t(_),w=Wr.exports.useRef(),S=Wr.exports.useRef(),M=Wr.exports.useRef(),O=Wr.exports.useState(0),F=O[0],L=O[1],D=Wr.exports.useRef(),R=Wr.exports.useCallback(function(){if(!!w.current){var q=dS(w.current,n),tt=S.current?dS(S.current):{width:0,height:0},ot=M.current?dS(M.current):{width:0,height:0},st=q.height-tt.height-ot.height;st===0&&(st=350),st<20&&(st=20),Math.abs(F-st)>1&&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=t<a.x?a.x:t,i=i>a.y?a.y:i,n=n<a.y?a.y:n}),{minX:r,maxX:t,minY:i,maxY:n,centerX:(r+t)/2,centerY:(i+n)/2}}function rB(e){return Array.from(new Set(e)).length===1}function iB(e){return(Ei(e)+vi(e))/2}function ir(e,r,t,i){return{x:e+t*Math.cos(i),y:r+t*Math.sin(i)}}function ts(e,r,t,i,n,a){a===void 0&&(a=0);var o=ir(e,r,t,i),l=ir(e,r,t,n),s=ir(e,r,a,i),u=ir(e,r,a,n);if(n-i===Math.PI*2){var c=ir(e,r,t,i+Math.PI),f=ir(e,r,a,i+Math.PI),h=[["M",o.x,o.y],["A",t,t,0,1,1,c.x,c.y],["A",t,t,0,1,1,l.x,l.y],["M",s.x,s.y]];return a&&(h.push(["A",a,a,0,1,0,f.x,f.y]),h.push(["A",a,a,0,1,0,u.x,u.y])),h.push(["M",o.x,o.y]),h.push(["Z"]),h}var v=n-i<=Math.PI?0:1,d=[["M",o.x,o.y],["A",t,t,0,v,1,l.x,l.y],["L",u.x,u.y]];return a&&d.push(["A",a,a,0,v,0,s.x,s.y]),d.push(["L",o.x,o.y]),d.push(["Z"]),d}function zY(e,r,t,i,n){var a=ir(e,r,t,i),o=ir(e,r,t,n);if(Nr(n-i,Math.PI*2)){var l=ir(e,r,t,i+Math.PI);return[["M",a.x,a.y],["A",t,t,0,1,1,l.x,l.y],["A",t,t,0,1,1,a.x,a.y],["A",t,t,0,1,0,l.x,l.y],["A",t,t,0,1,0,a.x,a.y],["Z"]]}var s=n-i<=Math.PI?0:1;return[["M",a.x,a.y],["A",t,t,0,s,1,o.x,o.y]]}function ep(e,r){var t=e.points,i=n_t(t),n,a,o=r.startAngle,l=r.endAngle,s=l-o;return r.isTransposed?(n=i.maxY*s,a=i.minY*s):(n=i.maxX*s,a=i.minX*s),n+=o,a+=o,{startAngle:a,endAngle:n}}function a_t(e,r){if(Mt(e)&&Mt(r))return[e,r];if(e=e,r=r,rB(e)||rB(r))return[iB(e),iB(r)];for(var t=-1,i=0,n=0,a,o=e.length-1,l,s=0;++t<e.length;)a=o,o=t,s+=l=e[a]*r[o]-e[o]*r[a],i+=(e[a]+e[o])*l,n+=(r[a]+r[o])*l;return s*=3,[i/s,n/s]}function VY(e,r){var t=e.attr(),i=r.attr();return P(t,function(n,a){i[a]===void 0&&(i[a]=void 0)}),i}function xf(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=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<r)for(var n=r-i,a=0;a<n;a++)e.push(t)}return e}function Gi(e,r){return typeof e=="object"&&r.forEach(function(t){delete e[t]}),e}function jl(e,r,t){r===void 0&&(r=[]),t===void 0&&(t=new Map);for(var i=0,n=e;i<n.length;i++){var a=n[i];t.has(a)||(r.push(a),t.set(a,!0))}return r}var Mi=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=r,this.y=t,this.height=n,this.width=i}return e.fromRange=function(r,t,i,n){return new e(r,t,i-r,n-t)},e.fromObject=function(r){return new e(r.minX,r.minY,r.width,r.height)},Object.defineProperty(e.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(r){return this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height},e.prototype.contains=function(r){return r.minX>=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;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return P(r,function(n){i.x=Math.min(n.x,i.x),i.y=Math.min(n.y,i.y),i.width=Math.max(n.maxX,i.maxX)-i.x,i.height=Math.max(n.maxY,i.maxY)-i.y}),i},e.prototype.merge=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return P(r,function(n){i.x=Math.max(n.x,i.x),i.y=Math.max(n.y,i.y),i.width=Math.min(n.maxX,i.maxX)-i.x,i.height=Math.min(n.maxY,i.maxY)-i.y}),i},e.prototype.cut=function(r,t){var i=r.width,n=r.height;switch(t){case ct.TOP:case ct.TOP_LEFT:case ct.TOP_RIGHT:return e.fromRange(this.minX,this.minY+n,this.maxX,this.maxY);case ct.RIGHT:case ct.RIGHT_TOP:case ct.RIGHT_BOTTOM:return e.fromRange(this.minX,this.minY,this.maxX-i,this.maxY);case ct.BOTTOM:case ct.BOTTOM_LEFT:case ct.BOTTOM_RIGHT:return e.fromRange(this.minX,this.minY,this.maxX,this.maxY-n);case ct.LEFT:case ct.LEFT_TOP:case ct.LEFT_BOTTOM:return e.fromRange(this.minX+i,this.minY,this.maxX,this.maxY);default:return this}},e.prototype.shrink=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return new e(this.x+a,this.y+t,this.width-a-i,this.height-t-n)},e.prototype.expand=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return new e(this.x-a,this.y-t,this.width+a+i,this.height+t+n)},e.prototype.exceed=function(r){return[Math.max(-this.minY+r.minY,0),Math.max(this.maxX-r.maxX,0),Math.max(this.maxY-r.maxY,0),Math.max(-this.minX+r.minX,0)]},e.prototype.collide=function(r){return this.minX<r.maxX&&this.maxX>r.minX&&this.minY<r.maxY&&this.maxY>r.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<n;i+=1){var a=e[i];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}function bT(e,r){for(var t=[e[0]],i=1,n=e.length;i<n;i=i+2){var a=r.convert({x:e[i],y:e[i+1]});t.push(a.x,a.y)}return t}function UY(e,r){var t=r.isTransposed,i=e[1],n=e[6],a=e[7],o=r.convert({x:n,y:a}),l=t?0:1;return["A",i,i,0,0,l,o.x,o.y]}function b_t(e,r,t){var i=t.isTransposed,n=t.startAngle,a=t.endAngle,o=e[0].toLowerCase()==="a"?{x:e[6],y:e[7]}:{x:e[1],y:e[2]},l={x:r[1],y:r[2]},s=[],u=i?"y":"x",c=Math.abs(l[u]-o[u])*(a-n),f=l[u]>=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<d;v++){var p=e[v];s=wr([0,0],s,p),u=Cr([0,0],u,p)}}for(var v=0,x=e.length;v<x;v++){var p=e[v];if(v===0&&!t)h=p;else if(v===x-1&&!t)f=p,n.push(h),n.push(f);else{o=e[t?v?v-1:x-1:v-1],l=e[t?(v+1)%x:v+1];var m=[0,0];m=Ql(m,l,o),m=hi(m,m,r);var _=us(p,o),b=us(p,l),w=_+b;w!==0&&(_/=w,b/=w);var S=hi([0,0],m,-_),M=hi([0,0],m,b);f=ma([0,0],p,S),c=ma([0,0],p,M),c=wr([0,0],c,Cr([0,0],l,p)),c=Cr([0,0],c,wr([0,0],l,p)),S=Ql([0,0],c,p),S=hi([0,0],S,-_/b),f=ma([0,0],p,S),f=wr([0,0],f,Cr([0,0],o,p)),f=Cr([0,0],f,wr([0,0],o,p)),M=Ql([0,0],p,f),M=hi([0,0],M,b/_),c=ma([0,0],p,M),a&&(f=Cr([0,0],f,s),f=wr([0,0],f,u),c=Cr([0,0],c,s),c=wr([0,0],c,u)),n.push(h),n.push(f),h=c}}return t&&n.push(n.shift()),n};function qY(e,r,t){for(var i=!!r,n=[],a=0,o=e.length;a<o;a+=2)n.push([e[a],e[a+1]]);for(var l=C_t(n,.4,i,t),s=n.length,u=[],c,f,h,a=0;a<s-1;a++)c=l[a*2],f=l[a*2+1],h=n[a+1],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]]);return i&&(c=l[s],f=l[s+1],h=n[0],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]])),u}function vg(e,r){return __t(e,r)}function _x(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return vg(e,r);for(var o=0,l=e.length;o<l;o++){var s=e[o];(!a||!(a.x===s.x&&a.y===s.y))&&(i.push(s.x),i.push(s.y),a=s)}var u=t||[[0,0],[1,1]],c=qY(i,r,u);return c.unshift(["M",n.x,n.y]),c}function S_t(e,r){var t=[];return P(r,function(i){var n=i[0];switch(n.toLowerCase()){case"m":case"l":case"c":t.push(bT(i,e));break;case"a":t.push(UY(i,e));break;case"z":default:t.push(i);break}}),t}function A_t(e,r){var t=[],i,n,a,o;return P(r,function(l,s){var u=l[0];switch(u.toLowerCase()){case"m":case"c":case"q":t.push(bT(l,e));break;case"l":i=r[s-1],n=l,a=e.isTransposed,o=a?i[i.length-2]===n[1]:i[i.length-1]===n[2],o?t=t.concat(b_t(i,n,e)):t.push(bT(l,e));break;case"a":t.push(UY(l,e));break;case"z":default:t.push(l);break}}),w_t(t),t}function ZY(e,r){var t=e.event,i=t.target,n=i.getCanvasBBox();return n.width>=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.maxX<e.minX||r.minY>e.maxY||r.maxY<e.minY)}function AF(e,r){var t=Gr(e),i=[];return P(t,function(n){var a=n.shape,o=a.getCanvasBBox();E_t(r,o)&&i.push(n)}),i}function sB(e){var r=[];return P(e,function(t){var i=t[0];if(i!=="A")for(var n=1;n<t.length;n=n+2)r.push([t[n],t[n+1]]);else{var a=t.length;r.push([t[a-2],t[a-1]])}}),r}function O_t(e,r){var t=Gr(e),i=sB(r),n=t.filter(function(a){var o=a.shape,l;if(o.get("type")==="path")l=sB(o.attr("path"));else{var s=o.getCanvasBBox();l=l_t(s)}return BV(i,l)});return n}function eW(e){return e.getComponents().map(function(r){return r.component})}function TF(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}function F_t(e,r){if(e.length<=2)return vg(e,!1);var t=e[0],i=[];P(e,function(a){i.push(a.x),i.push(a.y)});var n=qY(i,r,null);return n.unshift(["M",t.x,t.y]),n}function uB(e,r){return e.x<=r.x&&e.maxX>=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<arguments.length;t++)r[t]=arguments[t];if(r.length===1)return this.cacheMap[r[0]];r.length===2&&(this.cacheMap[r[0]]=r[1])},e.prototype.getAction=function(r){return this.actions.find(function(t){return t.name===r})},e.prototype.addAction=function(r){this.actions.push(r)},e.prototype.removeAction=function(r){var t=this.actions,i=this.actions.indexOf(r);i>=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;a<t;a++){var o=r[a],l=e.translate(o);l<i&&(i=l),l>n&&(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<n.length;i++){var a=n[i],o=a.getScale(a.type);if(o&&o.isLinear){t=o;break}}var l=e.getXScale(),s=e.getYScale();return t||s||l}function Y_t(e,r){var t=r.field,i=e[t];if(it(i)){var n=i.map(function(a){return r.getText(a)});return n.join("-")}return r.getText(i)}function W_t(e,r){var t,i=r.getGroupScales();if(i.length&&(t=i[0]),t){var n=t.field;return t.getText(e[n])}var a=uW(r);return rp(a)}function cW(e,r,t){if(r.length===0)return null;var i=t.type,n=t.getXScale(),a=t.getYScale(),o=n.field,l=a.field,s=null;if(i==="heatmap"||i==="point"){for(var u=t.coordinate,c=u.invert(e),f=n.invert(c.x),h=a.invert(c.y),v=1/0,d=0;d<r.length;d++){var p=r[d],x=p[de],m=Math.pow(x[o]-f,2)+Math.pow(x[l]-h,2);m<v&&(v=m,s=p)}return s}var _=r[0],b=r[r.length-1],w=z_t(e,t),S=_[de][o],M=_[de][l],O=b[de][o],F=a.isLinear&&it(M);if(it(S)){for(var d=0;d<r.length;d++){var L=r[d],x=L[de];if(n.translate(x[o][0])<=w&&n.translate(x[o][1])>=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;d<r.length;d++){var L=r[d],x=L[de];if(hB(x[o],w,n))if(F)it(s)||(s=[]),s.push(L);else{s=L;break}else n.translate(x[o])<=w&&(b=L,D=r[d+1])}it(s)&&(s=vB(s,e,t))}else{if((w>n.translate(O)||w<n.translate(S))&&(w>n.max||w<n.min))return null;for(var R=0,H=r.length-1,k=void 0;R<=H;){k=Math.floor((R+H)/2);var V=r[k][de][o];if(hB(V,w,n))return r[k];n.translate(V)<=n.translate(w)?(R=k+1,b=r[k],D=r[k+1]):(H===0&&(b=r[0]),H=k-1)}}b&&D&&Math.abs(n.translate(b[de][o])-w)>Math.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;_<b.length;_++){var w=b[_];if(!K(n[w])){var S=m[w];u=rp(S),c=S.getText(n[w]),f(u,c)}}}else{var M=uW(r);c=Y_t(n,M),u=W_t(n,r),f(u,c)}return s}function dB(e,r,t,i){var n=i.showNil,a=[],o=e.dataArray;if(!di(o)){e.sort(o);for(var l=0,s=o;l<s.length;l++){var u=s[l],c=cW(r,u,e);if(c){var f=e.getElementId(c),h=e.elementsMap[f];if(e.type==="heatmap"||h.visible){var v=MF(c,e,t,n);v.length&&a.push(v)}}}}return a}function pB(e,r,t,i){var n=i.showNil,a=[],o=e.container,l=o.getShape(r.x,r.y);if(l&&l.get("visible")&&l.get("origin")){var s=l.get("origin").mappingData,u=MF(s,e,t,n);u.length&&a.push(u)}return a}function ST(e,r,t){for(var i=[],n=e.geometries,a=t.shared,o=t.title,l=t.reversed,s=0,u=n;s<u.length;s++){var c=u[s];if(c.visible&&c.tooltipOption!==!1){var f=c.type,h=void 0;["point","edge","polygon"].includes(f)?h=pB(c,r,o,t):["area","line","path","heatmap"].includes(f)||a!==!1?h=dB(c,r,o,t):h=pB(c,r,o,t),h.length&&(l&&h.reverse(),i.push(h))}}return i}function X_t(e,r,t){for(var i=ST(e,r,t),n=0,a=e.views;n<a.length;n++){var o=a[n];i=i.concat(ST(o,r,t))}return i}function U_t(e){return!Mt(e)&&!it(e)}function EF(e){e===void 0&&(e=0);var r=it(e)?e:[e];switch(r.length){case 0:r=[0,0,0,0];break;case 1:r=new Array(4).fill(r[0]);break;case 2:r=qr(qr([],r,!0),r,!0);break;case 3:r=qr(qr([],r,!0),[r[1]],!1);break;default:r=r.slice(0,4);break}return r}var OF={};function Ls(e,r){OF[e]=r}function q_t(){return Object.keys(OF)}function Z_t(e){return OF[e]}var Q_t=function(){function e(r){this.option=this.wrapperOption(r)}return e.prototype.update=function(r){return this.option=this.wrapperOption(r),this},e.prototype.hasAction=function(r){var t=this.option.actions;return pp(t,function(i){return i[0]===r})},e.prototype.create=function(r,t){var i=this.option,n=i.type,a=i.cfg,o=n==="theta",l=A({start:r,end:t},a),s=b5(o?"polar":n);return this.coordinate=new s(l),this.coordinate.type=n,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},e.prototype.adjust=function(r,t){return this.coordinate.update({start:r,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},e.prototype.rotate=function(r){return this.option.actions.push(["rotate",r]),this},e.prototype.reflect=function(r){return this.option.actions.push(["reflect",r]),this},e.prototype.scale=function(r,t){return this.option.actions.push(["scale",r,t]),this},e.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},e.prototype.getOption=function(){return this.option},e.prototype.getCoordinate=function(){return this.coordinate},e.prototype.wrapperOption=function(r){return A({type:"rect",actions:[],cfg:{}},r)},e.prototype.execActions=function(r){var t=this,i=this.option.actions;P(i,function(n){var a,o=n[0],l=n.slice(1),s=K(r)?!0:r.includes(o);s&&(a=t.coordinate)[o].apply(a,l)})},e}(),$e=function(){function e(r,t,i){this.view=r,this.gEvent=t,this.data=i,this.type=t.type}return e.fromData=function(r,t,i){return new e(r,new bh(t,{}),i)},Object.defineProperty(e.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[Event (type="+this.type+")]"},e.prototype.clone=function(){return new e(this.view,this.gEvent,this.data)},e}();function K_t(e){var r=e.getController("axis"),t=e.getController("legend"),i=e.getController("annotation"),n=e.getController("slider"),a=e.getController("scrollbar");[r,n,a,t,i].forEach(function(o){o&&o.layout()})}var J_t=function(){function e(){this.scales=new Map,this.syncScales=new Map}return e.prototype.createScale=function(r,t,i,n){var a=i,o=this.getScaleMeta(n);if(t.length===0&&o){var l=o.scale,s={type:l.type};l.isCategory&&(s.values=l.values),a=ft(s,o.scaleDef,i)}var u=h_t(r,t,a);return this.cacheScale(u,i,n),u},e.prototype.sync=function(r,t){var i=this;this.syncScales.forEach(function(n,a){var o=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,s=[];P(n,function(u){var c=i.getScale(u);l=Mt(c.max)?Math.max(l,c.max):l,o=Mt(c.min)?Math.min(o,c.min):o,P(c.values,function(f){s.includes(f)||s.push(f)})}),P(n,function(u){var c=i.getScale(u);if(c.isContinuous)c.change({min:o,max:l,values:s});else if(c.isCategory){var f=c.range,h=i.getScaleMeta(u);s&&!I(h,["scaleDef","range"])&&(f=HY(ft({},c,{values:s}),r,t)),c.change({values:s,range:f})}})})},e.prototype.cacheScale=function(r,t,i){var n=this.getScaleMeta(i);n&&n.scale.type===r.type?(v_t(n.scale,r),n.scaleDef=t):(n={key:i,scale:r,scaleDef:t},this.scales.set(i,n));var a=this.getSyncKey(n);if(n.syncKey=a,this.removeFromSyncScales(i),a){var o=this.syncScales.get(a);o||(o=[],this.syncScales.set(a,o)),o.push(i)}},e.prototype.getScale=function(r){var t=this.getScaleMeta(r);if(!t){var i=nr(r.split("-")),n=this.syncScales.get(i);n&&n.length&&(t=this.getScaleMeta(n[0]))}return t&&t.scale},e.prototype.deleteScale=function(r){var t=this.getScaleMeta(r);if(t){var i=t.syncKey,n=this.syncScales.get(i);if(n&&n.length){var a=n.indexOf(r);a!==-1&&n.splice(a,1)}}this.scales.delete(r)},e.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},e.prototype.removeFromSyncScales=function(r){var t=this;this.syncScales.forEach(function(i,n){var a=i.indexOf(r);if(a!==-1)return i.splice(a,1),i.length===0&&t.syncScales.delete(n),!1})},e.prototype.getSyncKey=function(r){var t=r.scale,i=r.scaleDef,n=t.field,a=I(i,["sync"]);return a===!0?n:a===!1?void 0:a},e.prototype.getScaleMeta=function(r){return this.scales.get(r)},e}(),M0=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.top=r,this.right=t,this.bottom=i,this.left=n}return e.instance=function(r,t,i,n){return r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),new e(r,t,i,n)},e.prototype.max=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return this.top=Math.max(this.top,t),this.right=Math.max(this.right,i),this.bottom=Math.max(this.bottom,n),this.left=Math.max(this.left,a),this},e.prototype.shrink=function(r){var t=r[0],i=r[1],n=r[2],a=r[3];return this.top+=t,this.right+=i,this.bottom+=n,this.left+=a,this},e.prototype.inc=function(r,t){var i=r.width,n=r.height;switch(t){case ct.TOP:case ct.TOP_LEFT:case ct.TOP_RIGHT:this.top+=n;break;case ct.RIGHT:case ct.RIGHT_TOP:case ct.RIGHT_BOTTOM:this.right+=i;break;case ct.BOTTOM:case ct.BOTTOM_LEFT:case ct.BOTTOM_RIGHT:this.bottom+=n;break;case ct.LEFT:case ct.LEFT_TOP:case ct.LEFT_BOTTOM:this.left+=i;break}return this},e.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},e.prototype.clone=function(){return new(e.bind.apply(e,qr([void 0],this.getPadding(),!1)))},e}();function tbt(e){var r=e.padding;if(!U_t(r))return new(M0.bind.apply(M0,qr([void 0],EF(r),!1)));var t=e.viewBBox,i=new M0,n=[],a=[],o=[];return P(e.getComponents(),function(l){var s=l.type;s===Tr.AXIS?n.push(l):[Tr.LEGEND,Tr.SLIDER,Tr.SCROLLBAR].includes(s)?a.push(l):s!==Tr.GRID&&s!==Tr.TOOLTIP&&o.push(l)}),P(n,function(l){var s=l.component,u=s.getLayoutBBox(),c=new Mi(u.x,u.y,u.width,u.height),f=c.exceed(t);i.max(f)}),P(a,function(l){var s=l.component,u=l.direction,c=s.getLayoutBBox(),f=s.get("padding"),h=new Mi(c.x,c.y,c.width,c.height).expand(f);i.inc(h,u)}),P(o,function(l){var s=l.component,u=l.direction,c=s.getLayoutBBox(),f=new Mi(c.x,c.y,c.width,c.height);i.inc(f,u)}),i}function ebt(e,r,t){var i=t.instance();r.forEach(function(n){n.autoPadding=i.max(n.autoPadding.getPadding())})}var FF=function(e){X(r,e);function r(t){var i=e.call(this,{visible:t.visible})||this;i.views=[],i.geometries=[],i.controllers=[],i.interactions={},i.limitInPlot=!1,i.options={data:[],animate:!0},i.usedControllers=q_t(),i.scalePool=new J_t,i.layoutFunc=K_t,i.isPreMouseInPlot=!1,i.isDataChanged=!1,i.isCoordinateChanged=!1,i.createdScaleKeys=new Map,i.onCanvasEvent=function(b){var w=b.name;if(!w.includes(":")){var S=i.createViewEvent(b);i.doPlotEvent(S),i.emit(w,S)}},i.onDelegateEvents=function(b){var w=b.name;if(!!w.includes(":")){var S=i.createViewEvent(b);i.emit(w,S)}};var n=t.id,a=n===void 0?Fa("view"):n,o=t.parent,l=t.canvas,s=t.backgroundGroup,u=t.middleGroup,c=t.foregroundGroup,f=t.region,h=f===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:f,v=t.padding,d=t.appendPadding,p=t.theme,x=t.options,m=t.limitInPlot,_=t.syncViewPadding;return i.parent=o,i.canvas=l,i.backgroundGroup=s,i.middleGroup=u,i.foregroundGroup=c,i.region=h,i.padding=v,i.appendPadding=d,i.options=A(A({},i.options),x),i.limitInPlot=m,i.id=a,i.syncViewPadding=_,i.themeObject=qt(p)?ft({},es("default"),bx(p)):es(p),i.init(),i}return r.prototype.setLayout=function(t){this.layoutFunc=t},r.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},r.prototype.render=function(t,i){t===void 0&&(t=!1),this.emit(Gt.BEFORE_RENDER,$e.fromData(this,Gt.BEFORE_RENDER,i)),this.paint(t),this.emit(Gt.AFTER_RENDER,$e.fromData(this,Gt.AFTER_RENDER,i)),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this;this.emit(Gt.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var i=this.geometries,n=0;n<i.length;n++)i[n].clear(),i[n].container.remove(!0),i[n].labelsContainer.remove(!0);this.geometries=[];for(var a=this.controllers,n=0;n<a.length;n++)a[n].name==="annotation"?a[n].clear(!0):a[n].clear();this.createdScaleKeys.forEach(function(l,s){t.getRootView().scalePool.deleteScale(s)}),this.createdScaleKeys.clear();for(var o=this.views,n=0;n<o.length;n++)o[n].clear();this.emit(Gt.AFTER_CLEAR)},r.prototype.destroy=function(){this.emit(Gt.BEFORE_DESTROY);var t=this.interactions;P(t,function(l){l&&l.destroy()}),this.clear();for(var i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];o.destroy()}this.backgroundGroup.remove(!0),this.middleGroup.remove(!0),this.foregroundGroup.remove(!0),e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.geometries,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}for(var l=this.controllers,n=0,a=l.length;n<a;n++){var s=l[n];s.changeVisible(t)}return this.foregroundGroup.set("visible",t),this.middleGroup.set("visible",t),this.backgroundGroup.set("visible",t),this.getCanvas().draw(),this},r.prototype.data=function(t){return jt(this.options,"data",t),this.isDataChanged=!0,this},r.prototype.source=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.data() instead."),this.data(t)},r.prototype.filter=function(t,i){return pt(i)?(jt(this.options,["filters",t],i),this):(!i&&I(this.options,["filters",t])&&delete this.options.filters[t],this)},r.prototype.axis=function(t,i){return Hu(t)?jt(this.options,["axes"],t):jt(this.options,["axes",t],i),this},r.prototype.legend=function(t,i){return Hu(t)?jt(this.options,["legends"],t):Ct(t)?(jt(this.options,["legends",t],i),wa(i)&&(i==null?void 0:i.selected)&&jt(this.options,["filters",t],function(n){var a;return(a=i==null?void 0:i.selected[n])!==null&&a!==void 0?a:!0})):jt(this.options,["legends"],t),this},r.prototype.scale=function(t,i){var n=this;return Ct(t)?jt(this.options,["scales",t],i):qt(t)&&P(t,function(a,o){jt(n.options,["scales",o],a)}),this},r.prototype.tooltip=function(t){return jt(this.options,"tooltip",t),this},r.prototype.annotation=function(){return this.getController("annotation")},r.prototype.guide=function(){return console.warn("This method will be removed at G2 V4.1. Please use chart.annotation() instead."),this.annotation()},r.prototype.coordinate=function(t,i){return Ct(t)?jt(this.options,"coordinate",{type:t,cfg:i}):jt(this.options,"coordinate",t),this.coordinateController.update(this.options.coordinate),this.coordinateController},r.prototype.coord=function(t,i){return console.warn("This method will be removed at G2 V4.1. Please use chart.coordinate() instead."),this.coordinate(t,i)},r.prototype.facet=function(t,i){this.facetInstance&&this.facetInstance.destroy();var n=XY(t);if(!n)throw new Error("facet '"+t+"' is not exist!");return this.facetInstance=new n(this,A(A({},i),{type:t})),this},r.prototype.animate=function(t){return jt(this.options,"animate",t),this},r.prototype.updateOptions=function(t){return this.clear(),Qt(this.options,t),this.views.forEach(function(i){return i.destroy()}),this.views=[],this.initOptions(),this.coordinateBBox=this.viewBBox,this},r.prototype.option=function(t,i){if(r.prototype[t])throw new Error(`Can't use built in variable name "`+t+'", please change another one.');return jt(this.options,t,i),this},r.prototype.theme=function(t){return this.themeObject=qt(t)?ft({},this.themeObject,bx(t)):es(t),this},r.prototype.interaction=function(t,i){var n=this.interactions[t];n&&n.destroy();var a=D_t(t,this,i);return a&&(a.init(),this.interactions[t]=a),this},r.prototype.removeInteraction=function(t){var i=this.interactions[t];i&&(i.destroy(),this.interactions[t]=void 0)},r.prototype.changeData=function(t){this.isDataChanged=!0,this.emit(Gt.BEFORE_CHANGE_DATA,$e.fromData(this,Gt.BEFORE_CHANGE_DATA,null)),this.data(t),this.paint(!0);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.changeData(t)}this.emit(Gt.AFTER_CHANGE_DATA,$e.fromData(this,Gt.AFTER_CHANGE_DATA,null))},r.prototype.createView=function(t){this.parent&&this.parent.parent&&console.warn("The view nesting recursive feature will be removed at G2 V4.1. Please avoid to use it.");var i={data:this.options.data,scales:fi(this.options.scales),axes:fi(this.options.axes),coordinate:fi(this.coordinateController.getOption()),tooltip:fi(this.options.tooltip),legends:fi(this.options.legends),animate:this.options.animate,visible:this.visible},n=new r(A(A({parent:this,canvas:this.canvas,backgroundGroup:this.backgroundGroup.addGroup({zIndex:Of.BG}),middleGroup:this.middleGroup.addGroup({zIndex:Of.MID}),foregroundGroup:this.foregroundGroup.addGroup({zIndex:Of.FORE}),theme:this.themeObject,padding:this.padding},t),{options:A(A({},i),I(t,"options",{}))}));return this.views.push(n),n},r.prototype.view=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.createView() instead."),this.createView(t)},r.prototype.removeView=function(t){var i=qG(this.views,function(n){return n===t})[0];return i&&i.destroy(),i},r.prototype.getCoordinate=function(){return this.coordinateInstance},r.prototype.getTheme=function(){return this.themeObject},r.prototype.getXScale=function(){var t=this.geometries[0];return t?t.getXScale():null},r.prototype.getYScales=function(){var t={},i=[];return this.geometries.forEach(function(n){var a=n.getYScale(),o=a.field;t[o]||(t[o]=!0,i.push(a))}),i},r.prototype.getScalesByDim=function(t){for(var i=this.geometries,n={},a=0,o=i.length;a<o;a++){var l=i[a],s=t==="x"?l.getXScale():l.getYScale();s&&!n[s.field]&&(n[s.field]=s)}return n},r.prototype.getScale=function(t,i){var n=i||this.getScaleKey(t);return this.getRootView().scalePool.getScale(n)},r.prototype.getScaleByField=function(t,i){return this.getScale(t,i)},r.prototype.getOptions=function(){return this.options},r.prototype.getData=function(){return this.filteredData},r.prototype.getOriginalData=function(){return this.options.data},r.prototype.getPadding=function(){return this.autoPadding.getPadding()},r.prototype.getGeometries=function(){return this.geometries},r.prototype.getElements=function(){return Zr(this.geometries,function(t,i){return t.concat(i.getElements())},[])},r.prototype.getElementsBy=function(t){return this.getElements().filter(function(i){return t(i)})},r.prototype.getLayer=function(t){return t===Ye.BG?this.backgroundGroup:t===Ye.MID?this.middleGroup:t===Ye.FORE?this.foregroundGroup:this.foregroundGroup},r.prototype.isPointInPlot=function(t){return _T(this.getCoordinate(),t)},r.prototype.getLegendAttributes=function(){return qi(this.geometries.map(function(t){return t.getGroupAttributes()}))},r.prototype.getGroupScales=function(){var t=this.geometries.map(function(i){return i.getGroupScales()});return jl(qi(t))},r.prototype.getCanvas=function(){return this.getRootView().canvas},r.prototype.getRootView=function(){for(var t=this;;){if(t.parent){t=t.parent;continue}break}return t},r.prototype.getXY=function(t){var i=this.getCoordinate(),n=this.getScalesByDim("x"),a=this.getScalesByDim("y"),o,l;if(P(t,function(s,u){n[u]&&(o=n[u].scale(s)),a[u]&&(l=a[u].scale(s))}),!K(o)&&!K(l))return i.convert({x:o,y:l})},r.prototype.getController=function(t){return Yn(this.controllers,function(i){return i.name===t})},r.prototype.showTooltip=function(t){var i=this.getController("tooltip");return i&&i.showTooltip(t),this},r.prototype.hideTooltip=function(){var t=this.getController("tooltip");return t&&t.hideTooltip(),this},r.prototype.lockTooltip=function(){var t=this.getController("tooltip");return t&&t.lockTooltip(),this},r.prototype.unlockTooltip=function(){var t=this.getController("tooltip");return t&&t.unlockTooltip(),this},r.prototype.isTooltipLocked=function(){var t=this.getController("tooltip");return t&&t.isTooltipLocked()},r.prototype.getTooltipItems=function(t){var i=this.getController("tooltip");return i?i.getTooltipItems(t):[]},r.prototype.getSnapRecords=function(t){for(var i=this.geometries,n=[],a=0,o=i.length;a<o;a++){var l=i[a],s=l.dataArray;l.sort(s);for(var u=void 0,c=0,f=s.length;c<f;c++){var h=s[c];u=cW(t,h,l),u&&n.push(u)}}for(var v=this.views,a=0,o=v.length;a<o;a++){var d=v[a],p=d.getSnapRecords(t);n=n.concat(p)}return n},r.prototype.getComponents=function(){for(var t=[],i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];t=t.concat(o.getComponents())}return t},r.prototype.filterData=function(t){var i=this.options.filters;return gr(i)===0?t:zr(t,function(n,a){var o=Object.keys(i);return o.every(function(l){var s=i[l];return s(n[l],n,a)})})},r.prototype.filterFieldData=function(t,i){var n=this.options.filters,a=I(n,t);return Hl(a)?i:i.filter(function(o,l){return a(o[t],o,l)})},r.prototype.adjustCoordinate=function(){var t=this.getCoordinate(),i=t.start,n=t.end,a=this.coordinateBBox.bl,o=this.coordinateBBox.tr;if(Ge(i,a)&&Ge(n,o)){this.isCoordinateChanged=!1;return}this.isCoordinateChanged=!0,this.coordinateInstance=this.coordinateController.adjust(a,o)},r.prototype.paint=function(t){this.renderDataRecursive(t),this.syncScale(),this.emit(Gt.BEFORE_PAINT),this.renderPaddingRecursive(t),this.renderLayoutRecursive(t),this.renderBackgroundStyleShape(),this.renderPaintRecursive(t),this.emit(Gt.AFTER_PAINT),this.isDataChanged=!1},r.prototype.renderBackgroundStyleShape=function(){if(!this.parent){var t=I(this.themeObject,"background");if(t){this.backgroundStyleRectShape||(this.backgroundStyleRectShape=this.backgroundGroup.addShape("rect",{attrs:{},zIndex:-1,capture:!1}),this.backgroundStyleRectShape.toBack());var i=this.viewBBox,n=i.x,a=i.y,o=i.width,l=i.height;this.backgroundStyleRectShape.attr({fill:t,x:n,y:a,width:o,height:l})}else this.backgroundStyleRectShape&&(this.backgroundStyleRectShape.remove(!0),this.backgroundStyleRectShape=void 0)}},r.prototype.renderPaddingRecursive=function(t){this.calculateViewBBox(),this.adjustCoordinate(),this.initComponents(t),this.autoPadding=tbt(this).shrink(EF(this.appendPadding)),this.coordinateBBox=this.viewBBox.shrink(this.autoPadding.getPadding()),this.adjustCoordinate();for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.renderPaddingRecursive(t)}},r.prototype.renderLayoutRecursive=function(t){var i=this.syncViewPadding===!0?ebt:pt(this.syncViewPadding)?this.syncViewPadding:void 0;i&&(i(this,this.views,M0),this.views.forEach(function(s){s.coordinateBBox=s.viewBBox.shrink(s.autoPadding.getPadding()),s.adjustCoordinate()})),this.doLayout();for(var n=this.views,a=0,o=n.length;a<o;a++){var l=n[a];l.renderLayoutRecursive(t)}},r.prototype.renderPaintRecursive=function(t){var i=this.middleGroup;if(this.limitInPlot){var n=jY(this.coordinateInstance),a=n.type,o=n.attrs;i.setClip({type:a,attrs:o})}else i.setClip(void 0);this.paintGeometries(t),this.renderComponents(t);for(var l=this.views,s=0,u=l.length;s<u;s++){var c=l[s];c.renderPaintRecursive(t)}},r.prototype.createScale=function(t,i,n,a){var o=I(this.options.scales,[t]),l=A(A({},o),n);return this.parent?this.parent.createScale(t,i,l,a):this.scalePool.createScale(t,i,l,a)},r.prototype.renderDataRecursive=function(t){this.doFilterData(),this.createCoordinate(),this.initGeometries(t),this.renderFacet(t);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.renderDataRecursive(t)}},r.prototype.calculateViewBBox=function(){var t,i,n,a;if(this.parent){var o=this.parent.coordinateBBox;t=o.x,i=o.y,n=o.width,a=o.height}else t=0,i=0,n=this.canvas.get("width"),a=this.canvas.get("height");var l=this.region,s=l.start,u=l.end,c=new Mi(t+n*s.x,i+a*s.y,n*(u.x-s.x),a*(u.y-s.y));(!this.viewBBox||!this.viewBBox.isEqual(c))&&(this.viewBBox=new Mi(t+n*s.x,i+a*s.y,n*(u.x-s.x),a*(u.y-s.y))),this.coordinateBBox=this.viewBBox},r.prototype.initEvents=function(){this.foregroundGroup.on("*",this.onDelegateEvents),this.middleGroup.on("*",this.onDelegateEvents),this.backgroundGroup.on("*",this.onDelegateEvents),this.canvas.on("*",this.onCanvasEvent)},r.prototype.initComponentController=function(){for(var t=this.usedControllers,i=0,n=t.length;i<n;i++){var a=t[i],o=Z_t(a);o&&this.controllers.push(new o(this))}},r.prototype.createViewEvent=function(t){var i=t.shape,n=t.name,a=i?i.get("origin"):null,o=new $e(this,t,a);return o.type=n,o},r.prototype.doPlotEvent=function(t){var i=t.type,n=t.x,a=t.y,o={x:n,y:a},l=["mousedown","mouseup","mousemove","mouseleave","mousewheel","touchstart","touchmove","touchend","touchcancel","click","dblclick","contextmenu"];if(l.includes(i)){var s=this.isPointInPlot(o),u=t.clone();if(s){var c="plot:"+i;u.type=c,this.emit(c,u),(i==="mouseleave"||i==="touchend")&&(this.isPreMouseInPlot=!1)}i==="mousemove"||i==="touchmove"?(this.isPreMouseInPlot&&!s?(i==="mousemove"&&(u.type=Ri.MOUSE_LEAVE,this.emit(Ri.MOUSE_LEAVE,u)),u.type=Ri.LEAVE,this.emit(Ri.LEAVE,u)):!this.isPreMouseInPlot&&s&&(i==="mousemove"&&(u.type=Ri.MOUSE_ENTER,this.emit(Ri.MOUSE_ENTER,u)),u.type=Ri.ENTER,this.emit(Ri.ENTER,u)),this.isPreMouseInPlot=s):(i==="mouseleave"||i==="touchend")&&this.isPreMouseInPlot&&(i==="mouseleave"&&(u.type=Ri.MOUSE_LEAVE,this.emit(Ri.MOUSE_LEAVE,u)),u.type=Ri.LEAVE,this.emit(Ri.LEAVE,u),this.isPreMouseInPlot=!1)}},r.prototype.doFilterData=function(){var t=this.options.data;this.filteredData=this.filterData(t)},r.prototype.initGeometries=function(t){this.createOrUpdateScales();for(var i=this.getCoordinate(),n=I(this.options,"scales",{}),a=this.geometries,o=0,l=a.length;o<l;o++){var s=a[o];s.scales=this.getGeometryScales();var u={coordinate:i,scaleDefs:n,data:this.filteredData,theme:this.themeObject,isDataChanged:this.isDataChanged,isCoordinateChanged:this.isCoordinateChanged};t?s.update(u):s.init(u)}this.adjustScales()},r.prototype.createOrUpdateScales=function(){for(var t=this.getScaleFields(),i=this.getGroupedFields(),n=this.getOptions(),a=n.data,o=n.scales,l=o===void 0?{}:o,s=this.filteredData,u=0,c=t.length;u<c;u++){var f=t[u],h=l[f],v=this.getScaleKey(f);this.createScale(f,i.includes(f)?a:s,h,v),this.createdScaleKeys.set(v,!0)}},r.prototype.syncScale=function(){this.getRootView().scalePool.sync(this.getCoordinate(),this.theme)},r.prototype.getGeometryScales=function(){for(var t=this.getScaleFields(),i={},n=0;n<t.length;n++){var a=t[n];i[a]=this.getScaleByField(a)}return i},r.prototype.getScaleFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],l=o.getScaleFields();jl(l,t,i)}return t},r.prototype.getGroupedFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],l=o.getGroupFields();jl(l,t,i)}return t},r.prototype.adjustScales=function(){this.adjustCategoryScaleRange()},r.prototype.adjustCategoryScaleRange=function(){var t=this,i=qr([this.getXScale()],this.getYScales(),!0).filter(function(o){return!!o}),n=this.getCoordinate(),a=this.options.scales;P(i,function(o){var l=o.field,s=o.values,u=o.isCategory,c=o.isIdentity;(u||c)&&s&&!I(a,[l,"range"])&&(o.range=HY(o,n,t.theme))})},r.prototype.initComponents=function(t){for(var i=this.controllers,n=0;n<i.length;n++){var a=i[n];t?a.update():(a.clear(),a.render())}},r.prototype.doLayout=function(){this.layoutFunc(this)},r.prototype.createCoordinate=function(){var t=this.coordinateBBox.bl,i=this.coordinateBBox.tr;this.coordinateInstance=this.coordinateController.create(t,i)},r.prototype.paintGeometries=function(t){for(var i=this.options.animate,n=this.getCoordinate(),a={x:this.viewBBox.x,y:this.viewBBox.y,minX:this.viewBBox.minX,minY:this.viewBBox.minY,maxX:this.viewBBox.maxX,maxY:this.viewBBox.maxY,width:this.viewBBox.width,height:this.viewBBox.height},o=this.geometries,l=0;l<o.length;l++){var s=o[l];s.coordinate=n,s.canvasRegion=a,i||s.animate(!1),s.paint(t)}},r.prototype.renderComponents=function(t){for(var i=0;i<this.getComponents().length;i++){var n=this.getComponents()[i];n.component.render()}},r.prototype.renderFacet=function(t){this.facetInstance&&(t?this.facetInstance.update():(this.facetInstance.clear(),this.facetInstance.init(),this.facetInstance.render()))},r.prototype.initOptions=function(){var t=this,i=this.options,n=i.geometries,a=n===void 0?[]:n,o=i.interactions,l=o===void 0?[]:o,s=i.views,u=s===void 0?[]:s,c=i.annotations,f=c===void 0?[]:c,h=i.coordinate,v=i.events,d=i.facets;this.coordinateController?h&&this.coordinateController.update(h):this.coordinateController=new Q_t(h);for(var p=0;p<a.length;p++){var x=a[p];this.createGeometry(x)}for(var m=0;m<l.length;m++){var _=l[m],b=_.type,w=_.cfg;this.interaction(b,w)}for(var S=0;S<u.length;S++){var M=u[S];this.createView(M)}for(var O=this.getController("annotation"),F=0;F<f.length;F++){var L=f[F];O.annotation(L)}v&&P(v,function(D,R){t.on(R,D)}),d&&P(d,function(D){var R=D.type,H=ue(D,["type"]);t.facet(R,H)})},r.prototype.createGeometry=function(t){var i=t.type,n=t.cfg,a=n===void 0?{}:n;if(this[i]){var o=this[i](a);P(t,function(l,s){pt(o[s])&&o[s](l)})}},r.prototype.getScaleKey=function(t){return this.id+"-"+t},r}(wF);function ka(e,r){FF.prototype[e.toLowerCase()]=function(t){t===void 0&&(t={});var i=A({container:this.middleGroup.addGroup(),labelsContainer:this.foregroundGroup.addGroup()},t),n=new r(i);return this.geometries.push(n),n}}var fW=function(e){X(r,e);function r(t){var i=this,n=t.container,a=t.width,o=t.height,l=t.autoFit,s=l===void 0?!1:l,u=t.padding,c=t.appendPadding,f=t.renderer,h=f===void 0?"canvas":f,v=t.pixelRatio,d=t.localRefresh,p=d===void 0?!0:d,x=t.visible,m=x===void 0?!0:x,_=t.supportCSSTransform,b=_===void 0?!1:_,w=t.defaultInteractions,S=w===void 0?["tooltip","legend-filter","legend-active","continuous-filter","ellipsis-text"]:w,M=t.options,O=t.limitInPlot,F=t.theme,L=t.syncViewPadding,D=Ct(n)?document.getElementById(n):n,R=qo('<div style="position:relative;"></div>');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;i<e.length;i++)t(i);return r}var PF=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isLocked=!1,t}return Object.defineProperty(r.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.isVisible=function(){var t=this.view.getOptions().tooltip;return t!==!1},r.prototype.render=function(){},r.prototype.showTooltip=function(t){if(this.point=t,!!this.isVisible()){var i=this.view,n=this.getTooltipItems(t);if(!n.length){this.hideTooltip();return}var a=this.getTitle(n),o={x:n[0].x,y:n[0].y};i.emit("tooltip:show",$e.fromData(i,"tooltip:show",A({items:n,title:a},t)));var l=this.getTooltipCfg(),s=l.follow,u=l.showMarkers,c=l.showCrosshairs,f=l.showContent,h=l.marker,v=this.items,d=this.title;if(!Ge(d,a)||!Ge(v,n)?(i.emit("tooltip:change",$e.fromData(i,"tooltip:change",A({items:n,title:a},t))),(pt(f)?f(n):f)&&(this.tooltip||this.renderTooltip(),this.tooltip.update(Qt({},l,{items:this.getItemsAfterProcess(n),title:a},s?t:{})),this.tooltip.show()),u&&this.renderTooltipMarkers(n,h)):(this.tooltip&&s&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()),this.items=n,this.title=a,c){var p=I(l,["crosshairs","follow"],!1);this.renderCrosshairs(p?t:o,l)}}},r.prototype.hideTooltip=function(){var t=this.getTooltipCfg().follow;if(!t){this.point=null;return}var i=this.tooltipMarkersGroup;i&&i.hide();var n=this.xCrosshair,a=this.yCrosshair;n&&n.hide(),a&&a.hide();var o=this.tooltip;o&&o.hide(),this.view.emit("tooltip:hide",$e.fromData(this.view,"tooltip:hide",{})),this.point=null},r.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},r.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},r.prototype.isTooltipLocked=function(){return this.isLocked},r.prototype.clear=function(){var t=this,i=t.tooltip,n=t.xCrosshair,a=t.yCrosshair,o=t.tooltipMarkersGroup;i&&(i.hide(),i.clear()),n&&n.clear(),a&&a.clear(),o&&o.clear(),i!=null&&i.get("customContent")&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},r.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},r.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},r.prototype.changeVisible=function(t){if(this.visible!==t){var i=this,n=i.tooltip,a=i.tooltipMarkersGroup,o=i.xCrosshair,l=i.yCrosshair;t?(n&&n.show(),a&&a.show(),o&&o.show(),l&&l.show()):(n&&n.hide(),a&&a.hide(),o&&o.hide(),l&&l.hide()),this.visible=t}},r.prototype.getTooltipItems=function(t){var i=this.findItemsFromView(this.view,t);if(i.length){i=qi(i);for(var n=0,a=i;n<a.length;n++)for(var o=a[n],l=0,s=o;l<s.length;l++){var u=s[l],c=u.mappingData,f=c.x,h=c.y;u.x=it(f)?f[f.length-1]:f,u.y=it(h)?h[h.length-1]:h}var v=this.getTooltipCfg().shared;if(v===!1&&i.length>1){for(var d=i[0],p=Math.abs(t.y-d[0].y),x=0,m=i;x<m.length;x++){var _=m[x],b=Math.abs(t.y-_[0].y);b<=p&&(d=_,p=b)}i=[d]}return rbt(qi(i))}return[]},r.prototype.layout=function(){},r.prototype.update=function(){if(this.point&&this.showTooltip(this.point),this.tooltip){var t=this.view.getCanvas();this.tooltip.set("region",{start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}})}},r.prototype.isCursorEntered=function(t){if(this.tooltip){var i=this.tooltip.getContainer(),n=this.tooltip.get("capture");if(i&&n){var a=i.getBoundingClientRect(),o=a.x,l=a.y,s=a.width,u=a.height;return new Mi(o,l,s,u).isPointIn(t)}}return!1},r.prototype.getTooltipCfg=function(){var t=this.view,i=t.getOptions().tooltip,n=this.processCustomContent(i),a=t.getTheme(),o=I(a,["components","tooltip"],{}),l=I(n,"enterable",o.enterable);return ft({},o,n,{capture:!!(l||this.isLocked)})},r.prototype.processCustomContent=function(t){if(Hu(t)||!I(t,"customContent"))return t;var i=t.customContent,n=function(a,o){var l=i(a,o)||"";return Ct(l)?'<div class="g2-tooltip">'+l+"</div>":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<o.length;a++){var l=o[a],s=l.x,u=l.y,c=A(A({fill:l.color,symbol:"circle",shadowColor:l.color},i),{x:s,y:u});n.addShape("marker",{attrs:c})}},r.prototype.renderCrosshairs=function(t,i){var n=I(i,["crosshairs","type"],"x");n==="x"?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,i)):n==="y"?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,i)):n==="xy"&&(this.renderXCrosshairs(t,i),this.renderYCrosshairs(t,i))},r.prototype.renderXCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate();if(!!_T(n,t)){var a,o;if(n.isRect)n.isTransposed?(a={x:n.start.x,y:t.y},o={x:n.end.x,y:t.y}):(a={x:t.x,y:n.end.y},o={x:t.x,y:n.start.y});else{var l=Kf(n,t),s=n.getCenter(),u=n.getRadius();o=ir(s.x,s.y,u,l),a=s}var c=ft({start:a,end:o,container:this.getTooltipCrosshairsGroup()},I(i,"crosshairs",{}),this.getCrosshairsText("x",t,i));delete c.type;var f=this.xCrosshair;f?f.update(c):(f=new k5(c),f.init()),f.render(),f.show(),this.xCrosshair=f}},r.prototype.renderYCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate();if(!!_T(n,t)){var a,o;if(n.isRect){var l=void 0,s=void 0;n.isTransposed?(l={x:t.x,y:n.end.y},s={x:t.x,y:n.start.y}):(l={x:n.start.x,y:t.y},s={x:n.end.x,y:t.y}),a={start:l,end:s},o="Line"}else a={center:n.getCenter(),radius:A_(n,t),startAngle:n.startAngle,endAngle:n.endAngle},o="Circle";a=ft({container:this.getTooltipCrosshairsGroup()},a,I(i,"crosshairs",{}),this.getCrosshairsText("y",t,i)),delete a.type;var u=this.yCrosshair;u?n.isRect&&u.get("type")==="circle"||!n.isRect&&u.get("type")==="line"?(u=new RA[o](a),u.init()):u.update(a):(u=new RA[o](a),u.init()),u.render(),u.show(),this.yCrosshair=u}},r.prototype.getCrosshairsText=function(t,i,n){var a=I(n,["crosshairs","text"]),o=I(n,["crosshairs","follow"]),l=this.items;if(a){var s=this.getViewWithGeometry(this.view),u=l[0],c=s.getXScale(),f=s.getYScales()[0],h=void 0,v=void 0;if(o){var d=this.view.getCoordinate().invert(i);h=c.invert(d.x),v=f.invert(d.y)}else h=u.data[c.field],v=u.data[f.field];var p=t==="x"?h:v;return pt(a)?a=a(t,p,l,i):a.content=p,{text:a}}},r.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},r.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):(t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"}),t.toFront(),this.tooltipMarkersGroup=t),t},r.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},r.prototype.findItemsFromView=function(t,i){if(t.getOptions().tooltip===!1)return[];for(var n=this.getTooltipCfg(),a=ST(t,i,n),o=0,l=t.views;o<l.length;o++){var s=l[o];a=a.concat(this.findItemsFromView(s,i))}return a},r.prototype.getViewWithGeometry=function(t){var i=this;return t.geometries.length?t:Yn(t.views,function(n){return i.getViewWithGeometry(n)})},r.prototype.getItemsAfterProcess=function(t){var i=this.getTooltipCfg().customItems,n=i||function(a){return a};return n(t)},r}(dc),hW={};function IF(e){return hW[e.toLowerCase()]}function Qi(e,r){hW[e.toLowerCase()]=r}var eh={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},ibt={interval:function(e){return{enter:{animation:e.isRect?e.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:e.isPolar&&e.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},gB={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(e){var r;return e.isRect?r=e.isTransposed?"grow-in-x":"grow-in-y":(r="grow-in-xy",e.isPolar&&e.isTransposed&&(r="wave-in")),{animation:r}},schema:function(e){var r;return e.isRect?r=e.isTransposed?"grow-in-x":"grow-in-y":r="grow-in-xy",{animation:r}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function nbt(e,r){return{delay:pt(e.delay)?e.delay(r):e.delay,easing:pt(e.easing)?e.easing(r):e.easing,duration:pt(e.duration)?e.duration(r):e.duration,callback:e.callback,repeat:e.repeat}}function vW(e,r,t){var i=ibt[e];return i&&(pt(i)&&(i=i(r)),i=ft({},eh,i),t)?i[t]:i}function Pf(e,r,t){var i=I(e.get("origin"),"data",de),n=r.animation,a=nbt(r,i);if(n){var o=IF(n);o&&o(e,a,t)}else e.animate(t.toAttrs,a)}function abt(e,r,t,i,n){if(gB[t]){var a=gB[t](i),o=IF(I(a,"animation",""));if(o){var l=A(A(A({},eh.appear),a),r);e.stopAnimate(),o(e,l,{coordinate:i,minYPoint:n,toAttrs:null})}}}var LF="element-background",DF=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.states=[];var n=t.shapeFactory,a=t.container,o=t.offscreenGroup,l=t.elementIndex,s=t.visible,u=s===void 0?!0:s;return i.shapeFactory=n,i.container=a,i.offscreenGroup=o,i.visible=u,i.elementIndex=l,i}return r.prototype.draw=function(t,i){i===void 0&&(i=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,i),this.visible===!1&&this.changeVisible(!1)},r.prototype.update=function(t){var i=this,n=i.shapeFactory,a=i.shape;if(!!a){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(a,t);var o=this.getOffscreenGroup(),l=n.drawShape(this.shapeType,t,o);l.cfg.data=this.data,l.cfg.origin=t,l.cfg.element=this,this.syncShapeStyle(a,l,this.getStates(),this.getAnimateCfg("update"))}},r.prototype.destroy=function(){var t=this,i=t.shapeFactory,n=t.shape;if(n){var a=this.getAnimateCfg("leave");a?Pf(n,a,{coordinate:i.coordinate,toAttrs:A({},n.attr())}):n.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=void 0,this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach(function(i){i.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(i){i.hide()}))},r.prototype.setState=function(t,i){var n=this,a=n.states,o=n.shapeFactory,l=n.model,s=n.shape,u=n.shapeType,c=a.indexOf(t);if(i){if(c>-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<f.length;v++)this.syncShapeStyle(f[v],h[v],n,a,o+v);else{if(!di(n)&&!Ge(n,["reset"])){var d=t.get("name");it(d)&&(d=d[1]),P(n,function(x){if(i.get("name")!==LF){var m=l.getStateStyle(x,d||o);i.attr(m)}})}var p=VY(t,i);this.animate?a?((s=this.geometry)===null||s===void 0||s.emit(Ff.BEFORE_DRAW_ANIMATE),Pf(t,a,{coordinate:this.shapeFactory.coordinate,toAttrs:p,shapeModel:this.model})):di(n)?t.attr(p):(t.stopAnimate(),t.animate(p,{duration:300})):t.attr(p)}}},r.prototype.getShapeType=function(t){var i=I(t,"shape");return it(i)?i[0]:i},r}(wF),dW={},pW={};function gW(e){return dW[e.toLowerCase()]}function kh(e,r){dW[e.toLowerCase()]=r}function yW(e){return pW[e.toLowerCase()]}function Ii(e,r){pW[e.toLowerCase()]=r}var obt={coordinate:null,defaultShapeType:null,theme:null,getShapePoints:function(e,r){var t=this.getShape(e);return t.getPoints?t.getPoints(r):this.getDefaultPoints(r)},getShape:function(e){var r=this[e]||this[this.defaultShapeType];return r.coordinate=this.coordinate,r},getDefaultPoints:function(){return[]},getDefaultStyle:function(e){return I(e,[this.defaultShapeType,"default","style"],{})},getMarker:function(e,r){var t=this.getShape(e);if(!t.getMarker){var i=this.defaultShapeType;t=this.getShape(i)}var n=this.theme,a=I(n,[e,"default"],{}),o=t.getMarker(r);return ft({},a,o)},drawShape:function(e,r,t){var i=this.getShape(e);return i.draw(r,t)}},lbt={coordinate:null,parsePath:function(e){var r=this.coordinate,t=c1(e);return r.isPolar?t=A_t(r,t):t=S_t(r,t),t},parsePoint:function(e){var r=this.coordinate;return r.convert(e)},parsePoints:function(e){var r=this.coordinate;return e.map(function(t){return r.convert(t)})},draw:function(e,r){}},$F={};function cl(e,r){var t=Os(e),i=A(A(A({},obt),r),{geometryType:e});return $F[t]=i,i}function Jt(e,r,t){var i=Os(e),n=$F[i],a=A(A({},lbt),t);return n[r]=a,a}function AT(e){var r=Os(e);return $F[r]}function sbt(e,r,t){if(t===void 0&&(t={}),!r)return[e];var i=sM(e,r),n=[];if(r.length===1&&t[r[0]])for(var a=t[r[0]],o=0,l=a;o<l.length;o++){var s=l[o],u=i["_"+s];u&&n.push(u)}else for(var c in i)if(i.hasOwnProperty(c)){var f=i[c];n.push(f)}return n}function mW(e,r){return pp(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],function(t){return!Ge(e[t],r[t])})}function Fv(e){return it(e)?e:e.split("*")}function xW(e,r){for(var t=[],i=[],n=[],a=new Map,o=0;o<r.length;o++){var l=r[o];e[l]?i.push(l):t.push(l),a.set(l,!0)}return Object.keys(e).forEach(function(s){a.has(s)||n.push(s)}),{added:t,updated:i,removed:n}}function ubt(e,r){var t=[];return P(r,function(i,n){var a=n.split(" ")[0];a===e&&t.push(i)}),t}var fl=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.type="base",i.attributes={},i.elements=[],i.elementsMap={},i.animateOption=!0,i.attributeOption={},i.lastElementsMap={},i.generatePoints=!1,i.beforeMappingData=null,i.adjusts={},i.idFields=[],i.hasSorted=!1,i.isCoordinateChanged=!1;var n=t.container,a=t.labelsContainer,o=t.coordinate,l=t.data,s=t.sortable,u=s===void 0?!1:s,c=t.visible,f=c===void 0?!0:c,h=t.theme,v=t.scales,d=v===void 0?{}:v,p=t.scaleDefs,x=p===void 0?{}:p,m=t.intervalPadding,_=t.dodgePadding,b=t.maxColumnWidth,w=t.minColumnWidth,S=t.columnWidthRatio,M=t.roseWidthRatio,O=t.multiplePieWidthRatio,F=t.zIndexReversed;return i.container=n,i.labelsContainer=a,i.coordinate=o,i.data=l,i.sortable=u,i.visible=f,i.userTheme=h,i.scales=d,i.scaleDefs=x,i.intervalPadding=m,i.dodgePadding=_,i.maxColumnWidth=b,i.minColumnWidth=w,i.columnWidthRatio=S,i.roseWidthRatio=M,i.multiplePieWidthRatio=O,i.zIndexReversed=F,i}return r.prototype.position=function(t){var i=t;wa(t)||(i={fields:Fv(t)});var n=I(i,"fields");return n.length===1&&(n.unshift("1"),jt(i,"fields",n)),jt(this.attributeOption,"position",i),this},r.prototype.color=function(t,i){return this.createAttrOption("color",t,i),this},r.prototype.shape=function(t,i){return this.createAttrOption("shape",t,i),this},r.prototype.size=function(t,i){return this.createAttrOption("size",t,i),this},r.prototype.adjust=function(t){var i=t;return(Ct(t)||wa(t))&&(i=[t]),P(i,function(n,a){qt(n)||(i[a]={type:n})}),this.adjustOption=i,this},r.prototype.style=function(t,i){if(Ct(t)){var n=Fv(t);this.styleOption={fields:n,callback:i}}else{var a=t,n=a.fields,o=a.callback,l=a.cfg;n||o||l?this.styleOption=t:this.styleOption={cfg:t}}return this},r.prototype.tooltip=function(t,i){if(Ct(t)){var n=Fv(t);this.tooltipOption={fields:n,callback:i}}else this.tooltipOption=t;return this},r.prototype.animate=function(t){return this.animateOption=t,this},r.prototype.label=function(t,i,n){if(Ct(t)){var a={},o=Fv(t);a.fields=o,pt(i)?a.callback=i:wa(i)&&(a.cfg=i),n&&(a.cfg=n),this.labelOption=a}else this.labelOption=t;return this},r.prototype.state=function(t){return this.stateOption=t,this},r.prototype.customInfo=function(t){return this.customOption=t,this},r.prototype.init=function(t){t===void 0&&(t={}),this.setCfg(t),this.initAttributes(),this.processData(this.data),this.adjustScale()},r.prototype.update=function(t){t===void 0&&(t={});var i=t.data,n=t.isDataChanged,a=t.isCoordinateChanged,o=this,l=o.attributeOption,s=o.lastAttributeOption;Ge(l,s)?i&&(n||!Ge(i,this.data))?(this.setCfg(t),this.initAttributes(),this.processData(i)):this.setCfg(t):this.init(t),this.adjustScale(),this.isCoordinateChanged=a},r.prototype.paint=function(t){t===void 0&&(t=!1),this.animateOption&&(this.animateOption=ft({},vW(this.type,this.coordinate),this.animateOption)),this.defaultSize=void 0,this.elementsMap={},this.elements=[];var i=this.getOffscreenGroup();i.clear();var n=this.beforeMappingData,a=this.beforeMapping(n);this.dataArray=new Array(a.length);for(var o=0;o<a.length;o++){var l=a[o];this.dataArray[o]=this.mapping(l)}if(this.updateElements(this.dataArray,t),this.lastElementsMap=this.elementsMap,this.canDoGroupAnimation(t)){var s=this.container,u=this.type,c=this.coordinate,f=I(this.animateOption,"appear"),h=this.getYScale(),v=c.convert({x:0,y:h.scale(this.getYMinValue())});abt(s,f,u,c,v)}this.labelOption&&this.renderLabels(qi(this.dataArray),t),this.lastAttributeOption=A({},this.attributeOption),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this,i=t.container,n=t.geometryLabel,a=t.offscreenGroup;i&&i.clear(),n&&n.clear(),a&&a.clear(),this.scaleDefs=void 0,this.attributes={},this.scales={},this.elementsMap={},this.lastElementsMap={},this.elements=[],this.adjusts={},this.dataArray=null,this.beforeMappingData=null,this.lastAttributeOption=void 0,this.defaultSize=void 0,this.idFields=[],this.groupScales=void 0,this.hasSorted=!1,this.isCoordinateChanged=!1},r.prototype.destroy=function(){this.clear();var t=this.container;t.remove(!0),this.offscreenGroup&&(this.offscreenGroup.remove(!0),this.offscreenGroup=null),this.geometryLabel&&(this.geometryLabel.destroy(),this.geometryLabel=null),this.theme=void 0,this.shapeFactory=void 0,e.prototype.destroy.call(this)},r.prototype.getGroupScales=function(){return this.groupScales},r.prototype.getAttribute=function(t){return this.attributes[t]},r.prototype.getXScale=function(){return this.getAttribute("position").scales[0]},r.prototype.getYScale=function(){return this.getAttribute("position").scales[1]},r.prototype.getGroupAttributes=function(){var t=[];return P(this.attributes,function(i){Qv.includes(i.type)&&t.push(i)}),t},r.prototype.getDefaultValue=function(t){var i,n=this.getAttribute(t);return n&&di(n.scales)&&(i=n.values[0]),i},r.prototype.getAttributeValues=function(t,i){for(var n=[],a=t.scales,o=0,l=a.length;o<l;o++){var s=a[o],u=s.field;s.isIdentity?n.push(s.values):n.push(i[u])}return t.mapping.apply(t,n)},r.prototype.getAdjust=function(t){return this.adjusts[t]},r.prototype.getCoordinate=function(){return this.coordinate},r.prototype.getData=function(){return this.data},r.prototype.getShapeMarker=function(t,i){var n=this.getShapeFactory();return n.getMarker(t,i)},r.prototype.getElementsBy=function(t){return this.elements.filter(function(i){return t(i)})},r.prototype.getElements=function(){return this.elements},r.prototype.getElementId=function(t){t=it(t)?t[0]:t;var i=t[de];if(this.idFields.length){for(var n=i[this.idFields[0]],a=1;a<this.idFields.length;a++)n+="-"+i[this.idFields[a]];return n}var o=this.type,l=this.getXScale(),s=this.getYScale(),u=l.field||"x",c=s.field||"y",f=i[c],h;l.type==="identity"?h=l.values[0]:h=i[u];var v;o==="interval"||o==="schema"?v=""+h:o==="line"||o==="area"||o==="path"?v=o:v=h+"-"+f;var d=this.groupScales;di(d)&&(d=I(this.getAttribute("color"),"scales",[]));for(var a=0,p=d.length;a<p;a++){var x=d[a],m=x.field;v=v+"-"+i[m]}var _=this.getAdjust("dodge");if(_){var b=_.dodgeBy;b&&(v=v+"-"+i[b])}return this.getAdjust("jitter")&&(v=v+"-"+t.x+"-"+t.y),v},r.prototype.getScaleFields=function(){var t=[],i=new Map,n=this,a=n.attributeOption,o=n.labelOption,l=n.tooltipOption;for(var s in a)if(a.hasOwnProperty(s)){var u=a[s];u.fields?jl(u.fields,t,i):u.values&&jl(u.values,t,i)}return o&&o.fields&&jl(o.fields,t,i),qt(l)&&l.fields&&jl(l.fields,t,i),t},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.elements,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}t?(this.container&&this.container.show(),this.labelsContainer&&this.labelsContainer.show()):(this.container&&this.container.hide(),this.labelsContainer&&this.labelsContainer.hide())},r.prototype.getFields=function(){var t=new Map,i=[];return Object.values(this.attributeOption).forEach(function(n){var a=(n==null?void 0:n.fields)||[];a.forEach(function(o){t.has(o)||i.push(o),t.set(o,!0)})},[]),i},r.prototype.getGroupFields=function(){for(var t=[],i=new Map,n=0,a=Qv.length;n<a;n++){var o=Qv[n],l=this.attributeOption[o];l&&l.fields&&jl(l.fields,t,i)}return t},r.prototype.getXYFields=function(){var t=this.attributeOption.position.fields,i=t[0],n=t[1];return[i,n]},r.prototype.getXField=function(){return I(this.getXYFields(),[0])},r.prototype.getYField=function(){return I(this.getXYFields(),[1])},r.prototype.getShapes=function(){return this.elements.map(function(t){return t.shape})},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.sort=function(t){if(!this.hasSorted)for(var i=this.getXScale(),n=i.field,a=0;a<t.length;a++){var o=t[a];o.sort(function(l,s){return i.translate(l[de][n])-i.translate(s[de][n])})}this.hasSorted=!0},r.prototype.adjustScale=function(){var t=this.getYScale();t&&this.getAdjust("stack")&&this.updateStackRange(t,this.beforeMappingData)},r.prototype.getShapeFactory=function(){var t=this.shapeType;if(!!AT(t))return this.shapeFactory||(this.shapeFactory=fi(AT(t))),this.shapeFactory.coordinate=this.coordinate,this.shapeFactory.theme=this.theme.geometries[t]||{},this.shapeFactory},r.prototype.createShapePointsCfg=function(t){var i=this.getXScale(),n=this.getYScale(),a=this.normalizeValues(t[i.field],i),o;return n?o=this.normalizeValues(t[n.field],n):o=t.y?t.y:.1,{x:a,y:o,y0:n?n.scale(this.getYMinValue()):void 0}},r.prototype.createElement=function(t,i,n){n===void 0&&(n=!1);var a=this.container,o=this.getDrawCfg(t),l=this.getShapeFactory(),s=new DF({shapeFactory:l,container:a,offscreenGroup:this.getOffscreenGroup(),elementIndex:i});return s.animate=this.animateOption,s.geometry=this,s.draw(o,n),s},r.prototype.getDrawCfg=function(t){var i=t[de],n={mappingData:t,data:i,x:t.x,y:t.y,color:t.color,size:t.size,isInCircle:this.coordinate.isPolar,customInfo:this.customOption},a=t.shape;!a&&this.getShapeFactory()&&(a=this.getShapeFactory().defaultShapeType),n.shape=a;var o=this.theme.geometries[this.shapeType];n.defaultStyle=I(o,[a,"default"],{}).style,!n.defaultStyle&&this.getShapeFactory()&&(n.defaultStyle=this.getShapeFactory().getDefaultStyle(o));var l=this.styleOption;return l&&(n.style=this.getStyleCfg(l,i)),this.generatePoints&&(n.points=t.points,n.nextPoints=t.nextPoints),n},r.prototype.updateElements=function(t,i){i===void 0&&(i=!1);for(var n=new Map,a=[],o=new Map,l=0,s=0;s<t.length;s++)for(var u=t[s],c=0;c<u.length;c++){var f=u[c],h=this.getElementId(f),v=n.has(h)?h+"-"+s+"-"+c:h;a.push(v),n.set(v,f),o.set(v,l),l++}this.elements=new Array(l);for(var d=xW(this.lastElementsMap,a),p=d.added,x=d.updated,m=d.removed,_=0,b=p;_<b.length;_++){var h=b[_],f=n.get(h),s=o.get(h),w=this.createElement(f,s,i);this.elements[s]=w,this.elementsMap[h]=w,w.shape&&w.shape.setZIndex(this.zIndexReversed?this.elements.length-s:s)}for(var S=0,M=x;S<M.length;S++){var h=M[S],w=this.lastElementsMap[h],f=n.get(h),O=this.getDrawCfg(f),F=w.getModel(),s=o.get(h);(this.isCoordinateChanged||mW(O,F))&&(w.animate=this.animateOption,w.update(O)),this.elements[s]=w,this.elementsMap[h]=w,w.shape&&w.shape.setZIndex(this.zIndexReversed?this.elements.length-s:s)}for(var L=0,D=m;L<D.length;L++){var h=D[L],w=this.lastElementsMap[h];w.animate=this.animateOption,w.destroy()}},r.prototype.getLabelType=function(){var t=this,i=t.labelOption,n=t.coordinate,a=t.type,o=n.type,l=n.isTransposed,s=I(i,["cfg","type"]);return s||(o==="polar"?s=l?"pie":"polar":o==="theta"?s="pie":a==="interval"||a==="polygon"?s="interval":s="base"),s},r.prototype.getYMinValue=function(){var t=this.getYScale(),i=t.min,n=t.max,a;return i>=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;l<s;l++){for(var u=a[l],c=[],f=0,h=u.length;f<h;f++){var v=u[f],d={};for(var p in v)d[p]=v[p];d[de]=v;for(var x=0,m=n;x<m.length;x++){var _=m[x],b=_.field;d[b]=_.translate(d[b])}c.push(d)}o.push(c)}var w=this.adjustData(o);return this.beforeMappingData=w,w},r.prototype.adjustData=function(t){var i=this.adjustOption,n=this,a=n.intervalPadding,o=n.dodgePadding,l=n.theme,s=this.maxColumnWidth||l.maxColumnWidth,u=this.minColumnWidth||l.minColumnWidth,c=this.columnWidthRatio||l.columnWidthRatio,f=t;if(i){var h=this.getXScale(),v=this.getYScale(),d=h.field,p=v?v.field:null,x=fg(this.coordinate),m=h.values.length,_=this.getAttribute("size"),b=void 0;_&&(b=_.values[0]);for(var w=0,S=i.length;w<S;w++){var M=i[w],O=A({xField:d,yField:p,intervalPadding:a,dodgePadding:o,xDimensionLength:x,groupNum:m,defaultSize:b,maxColumnWidth:s,minColumnWidth:u,columnWidthRatio:c},M),F=M.type;if(F==="dodge"){var L=[];if(h.isCategory||h.type==="identity")L.push("x");else if(!v)L.push("y");else throw new Error("dodge is not support linear attribute, please use category attribute!");O.adjustNames=L,O.dodgeRatio=c}else if(F==="stack"){var D=this.coordinate;if(!v){O.height=D.getHeight();var R=this.getDefaultValue("size")||3;O.size=R}!D.isTransposed&&K(O.reverseOrder)&&(O.reverseOrder=!0)}var H=IM(F),k=new H(O);f=k.process(f),this.adjusts[F]=k}}return f},r.prototype.groupData=function(t){for(var i=this.getGroupScales(),n=this.scaleDefs,a={},o=[],l=0;l<i.length;l++){var s=i[l],u=s.field;o.push(u),I(n,[u,"values"])&&(a[u]=n[u].values)}return sbt(t,o,a)},r.prototype.updateStackRange=function(t,i){for(var n=qi(i),a=t.field,o=t.min,l=t.max,s=0;s<n.length;s++){var u=n[s],c=Math.min.apply(null,u[a]),f=Math.max.apply(null,u[a]);c<o&&(o=c),f>l&&(l=f)}var h=this.scaleDefs,v={};o<t.min&&!I(h,[a,"min"])&&(v.min=o),l>t.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;n<a;n++){var o=i[n];this.generateShapePoints(o);var l=i[n+1];l&&(this.generateShapePoints(l),o[0].nextPoints=l[0].points)}return i},r.prototype.generateShapePoints=function(t){for(var i=this.getShapeFactory(),n=this.getAttribute("shape"),a=0;a<t.length;a++){var o=t[a],l=this.createShapePointsCfg(o),s=n?this.getAttributeValues(n,o):null,u=i.getShapePoints(s,l);o.points=u}},r.prototype.normalizeValues=function(t,i){var n=[];if(it(t))for(var a=0;a<t.length;a++){var o=t[a];n.push(i.scale(o))}else n=i.scale(t);return n},r.prototype.mapping=function(t){for(var i=this.attributes,n=[],a=0;a<t.length;a++){var o=t[a],l={_origin:o[de],points:o.points,nextPoints:o.nextPoints};for(var s in i)if(i.hasOwnProperty(s)){var u=i[s],c=u.names,f=this.getAttributeValues(u,o);if(c.length>1)for(var h=0;h<f.length;h+=1){var v=f[h],d=c[h];l[d]=it(v)&&v.length===1?v[0]:v}else l[c[0]]=f.length===1?f[0]:f}this.convertPoint(l),n.push(l)}return n},r.prototype.convertPoint=function(t){var i=t.x,n=t.y,a,o,l,s=this.coordinate;if(it(i)&&it(n)){a=[],o=[];for(var u=0,c=0,f=i.length,h=n.length;u<f&&c<h;u+=1,c+=1)l=s.convert({x:i[u],y:n[c]}),a.push(l.x),o.push(l.y)}else if(it(n)){o=[];for(var v=0;v<n.length;v++){var d=n[v];l=s.convert({x:i,y:d}),a&&a!==l.x?(it(a)||(a=[a]),a.push(l.x)):a=l.x,o.push(l.y)}}else if(it(i)){a=[];for(var v=0;v<i.length;v++){var p=i[v];l=s.convert({x:p,y:n}),o&&o!==l.y?(it(o)||(o=[o]),o.push(l.y)):o=l.y,a.push(l.x)}}else{var x=s.convert({x:i,y:n});a=x.x,o=x.y}t.x=a,t.y=o},r.prototype.getStyleCfg=function(t,i){var n=t.fields,a=n===void 0?[]:n,o=t.callback,l=t.cfg;if(l)return l;var s=a.map(function(u){return i[u]});return o.apply(void 0,s)},r.prototype.setCfg=function(t){var i=this,n=t.coordinate,a=t.data,o=t.theme,l=t.scaleDefs;n&&(this.coordinate=n),a&&(this.data=a),l&&(this.scaleDefs=l,this.idFields=[],P(l,function(s,u){s&&s.key&&i.idFields.push(u)})),o&&(this.theme=this.userTheme?ft({},o,this.userTheme):o)},r.prototype.renderLabels=function(t,i){i===void 0&&(i=!1);var n=this.geometryLabel;if(!n){var a=this.getLabelType(),o=gW(a);n=new o(this),this.geometryLabel=n}n.render(t,i);var l=n.labelsRenderer.shapesMap;P(this.elementsMap,function(s,u){var c=ubt(u,l);if(c.length){s.labelShape=c;for(var f=0;f<c.length;f++)for(var h=c[f],v=h.getChildren(),d=0;d<v.length;d++){var p=v[d];p.cfg.name=["element","label"],p.cfg.element=s}}})},r.prototype.canDoGroupAnimation=function(t){return!t&&this.animateOption&&(I(this.animateOption,"appear")===void 0||I(this.animateOption,"appear")&&I(this.animateOption,["appear","animation"])===void 0)},r}(wF),T_=rr;function dg(e,r,t){var i=T_(e.getMatrix(),[["t",r,t]]);e.setMatrix(i)}function cbt(e,r){var t=e.attr(),i=t.x,n=t.y,a=T_(e.getMatrix(),[["t",-i,-n],["r",r],["t",i,n]]);return a}function kF(e,r){var t=cbt(e,r);e.setMatrix(t)}function fbt(e,r){var t=e.getBBox(),i=(t.minX+t.maxX)/2,n=(t.minY+t.maxY)/2;e.applyToMatrix([i,n,1]);var a=T_(e.getMatrix(),[["t",-i,-n],["s",r,r],["t",i,n]]);e.setMatrix(a)}function ws(e){return e.find(function(r){return r.get("type")==="text"})}function TT(e,r,t){t===void 0&&(t=[0,0,0,0]);var i=e.getChildren()[0];if(i){var n=i.clone();r!=null&&r.rotate&&kF(n,-r.rotate);var a=n.getCanvasBBox(),o=a.x,l=a.y,s=a.width,u=a.height;n.destroy();var c=t;return K(c)?c=[2,2,2,2]:Mt(c)&&(c=new Array(4).fill(c)),{x:o-c[3],y:l-c[0],width:s+c[1]+c[3],height:u+c[0]+c[2],rotation:(r==null?void 0:r.rotate)||0}}}function hbt(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 vbt(e,r){var t=e.getBBox();return pp(r,function(i){var n=i.getBBox();return hbt(t,n,2)>0})}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;l<s.length;l++){var u=s[l];u&&this.renderLabel(u,o)}this.doLayout(r,t),this.renderLabelLine(r),this.renderLabelBackground(r),this.adjustLabel(r)}var c=this.lastShapesMap,f=this.shapesMap;P(f,function(h,v){if(h.destroyed)delete f[v];else{if(c[v]){var d=h.get("data"),p=h.get("origin"),x=h.get("coordinate"),m=h.get("animateCfg"),_=c[v];_W(_,f[v],{data:d,origin:p,animateCfg:m,coordinate:x}),n.shapesMap[v]=_}else{a.add(h);var b=I(h.get("animateCfg"),i?"enter":"appear");b&&Pf(h,b,{toAttrs:A({},h.attr()),coordinate:h.get("coordinate")})}delete c[v]}}),P(c,function(h){var v=I(h.get("animateCfg"),"leave");v?Pf(h,v,{toAttrs:null,coordinate:h.get("coordinate")}):h.remove(!0)}),this.lastShapesMap=f,o.destroy()},e.prototype.clear=function(){this.container.clear(),this.shapesMap={},this.lastShapesMap={}},e.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null,this.lastShapesMap=null},e.prototype.renderLabel=function(r,t){var i=r.id,n=r.elementId,a=r.data,o=r.mappingData,l=r.coordinate,s=r.animate,u=r.content,c={id:i,elementId:n,data:a,origin:A(A({},o),{data:o[de]}),coordinate:l},f=t.addGroup(A({name:"label",animateCfg:this.animate===!1||s===null||s===!1?!1:ft({},this.animate,s)},c)),h;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var v=u.getCanvasBBox(),d=v.width,p=v.height,x=I(r,"textAlign","left"),m=r.x,_=r.y-p/2;x==="center"?m=m-d/2:(x==="right"||x==="end")&&(m=m-d),dg(u,m,_),h=u,f.add(u)}else{var b=I(r,["style","fill"]);h=f.addShape("text",A({attrs:A(A({x:r.x,y:r.y,textAlign:r.textAlign,textBaseline:I(r,"textBaseline","middle"),text:r.content},r.style),{fill:JG(b)?r.color:b})},c))}r.rotate&&kF(h,r.rotate),this.shapesMap[i]=f},e.prototype.doLayout=function(r,t){var i=this;if(this.layout){var n=it(this.layout)?this.layout:[this.layout];P(n,function(a){var o=yW(I(a,"type",""));if(o){var l=[],s=[];P(i.shapesMap,function(u,c){l.push(u),s.push(t[u.get("elementId")])}),o(r,l,s,i.region,a.cfg)}})}},e.prototype.renderLabelLine=function(r){var t=this;P(r,function(i){var n=I(i,"coordinate");if(!(!i||!n)){var a=n.getCenter(),o=n.getRadius();if(!!i.labelLine){var l=I(i,"labelLine",{}),s=i.id,u=l.path;if(!u){var c=ir(a.x,a.y,o,i.angle);u=[["M",c.x,c.y],["L",i.x,i.y]]}var f=t.shapesMap[s];f.destroyed||f.addShape("path",{capture:!1,attrs:A({path:u,stroke:i.color?i.color:I(i,["style","fill"],"#000"),fill:null},l.style),id:s,origin:i.mappingData,data:i.data,coordinate:i.coordinate})}}})},e.prototype.renderLabelBackground=function(r){var t=this;P(r,function(i){var n=I(i,"coordinate"),a=I(i,"background");if(!(!a||!n)){var o=i.id,l=t.shapesMap[o];if(!l.destroyed){var s=l.getChildren()[0];if(s){var u=TT(l,i,a.padding),c=u.rotation,f=ue(u,["rotation"]),h=l.addShape("rect",{attrs:A(A({},f),a.style||{}),id:o,origin:i.mappingData,data:i.data,coordinate:i.coordinate});if(h.setZIndex(-1),c){var v=s.getMatrix();h.setMatrix(v)}}}}})},e.prototype.createOffscreenGroup=function(){var r=this.container,t=r.getGroupBase(),i=new t({});return i},e.prototype.adjustLabel=function(r){var t=this;P(r,function(i){if(i){var n=i.id,a=t.shapesMap[n];if(!a.destroyed){var o=a.findAll(function(l){return l.get("type")!=="path"});P(o,function(l){l&&(i.offsetX&&l.attr("x",l.attr("x")+i.offsetX),i.offsetY&&l.attr("y",l.attr("y")+i.offsetY))})}}})},e}();function yB(e){var r=0;return P(e,function(t){r+=t}),r/e.length}var pg=function(){function e(r){this.geometry=r}return e.prototype.getLabelItems=function(r){var t=this,i=[],n=this.getLabelCfgs(r);return P(r,function(a,o){var l=n[o];if(!l||K(a.x)||K(a.y)){i.push(null);return}var s=it(l.content)?l.content:[l.content];l.content=s;var u=s.length;P(s,function(c,f){if(K(c)||c===""){i.push(null);return}var h=A(A({},l),t.getLabelPoint(l,a,f));h.textAlign||(h.textAlign=t.getLabelAlign(h,f,u)),h.offset<=0&&(h.labelLine=null),i.push(h)})}),i},e.prototype.render=function(r,t){t===void 0&&(t=!1);var i=this.getLabelItems(r),n=this.getLabelsRenderer(),a=this.getGeometryShapes();n.render(i,a,t)},e.prototype.clear=function(){var r=this.labelsRenderer;r&&r.clear()},e.prototype.destroy=function(){var r=this.labelsRenderer;r&&r.destroy(),this.labelsRenderer=null},e.prototype.getCoordinate=function(){return this.geometry.coordinate},e.prototype.getDefaultLabelCfg=function(r,t){var i=this.geometry,n=i.type,a=i.theme;return n==="polygon"||n==="interval"&&t==="middle"||r<0&&!["line","point","path"].includes(n)?I(a,"innerLabels",{}):I(a,"labels",{})},e.prototype.getThemedLabelCfg=function(r){var t=this.geometry,i=this.getDefaultLabelCfg(),n=t.type,a=t.theme,o;return n==="polygon"||r.offset<0&&!["line","point","path"].includes(n)?o=ft({},i,a.innerLabels,r):o=ft({},i,a.labels,r),o},e.prototype.setLabelPosition=function(r,t,i,n){},e.prototype.getLabelOffset=function(r){var t=this.getCoordinate(),i=this.getOffsetVector(r);return t.isTransposed?i[0]:i[1]},e.prototype.getLabelOffsetPoint=function(r,t,i){var n=r.offset,a=this.getCoordinate(),o=a.isTransposed,l=o?"x":"y",s=o?1:-1,u={x:0,y:0};return t>0||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;n<a;n++){var o=e[n];xB(o)||i.push(o)}return[i]}for(var l=[],s=[],n=0,a=e.length;n<a;n++){var o=e[n];xB(o)?s.length&&(s.length===1&&!t||l.push(s),s=[]):s.push(o)}return s.length&&l.push(s),l}function CW(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return a&&(r.push(["L",a.x,a.y]),r.push(["z"])),r}function SW(e){for(var r=e.length/2,t=[],i=[],n=0;n<e.length;n++)n<r?t.push(e[n]):i.push(e[n]);var a=_x(t,!1),o=_x(i,!1);i.length&&a.push(["L",i[0].x,i[0].y]),o.shift();var l=a.concat(o);return t.length&&l.push(["L",t[0].x,t[0].y]),l.push(["z"]),l}function Ze(e,r,t,i){i===void 0&&(i="");var n=e.style,a=n===void 0?{}:n,o=e.defaultStyle,l=e.color,s=e.size,u=A(A({},o),a);return l&&(r&&(a.stroke||(u.stroke=l)),t&&(a.fill||(u.fill=l))),i&&K(a[i])&&!K(s)&&(u[i]=s),u}function AW(e){return ft({},{fill:"#CCD6EC",fillOpacity:.3},I(e,["background","style"]))}function BF(e){var r=e.x,t=it(e.y)?e.y:[e.y];return t.map(function(i,n){return{x:it(r)?r[n]:r,y:i}})}var Sbt={line:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dot:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dash:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},smooth:function(e,r,t){return[["M",e-t,r],["A",t/2,t/2,0,1,1,e,r],["A",t/2,t/2,0,1,0,e+t,r]]},hv:function(e,r,t){return[["M",e-t-1,r-2.5],["L",e,r-2.5],["L",e,r+2.5],["L",e+t+1,r+2.5]]},vh:function(e,r,t){return[["M",e-t-1,r+2.5],["L",e,r+2.5],["L",e,r-2.5],["L",e+t+1,r-2.5]]},hvh:function(e,r,t){return[["M",e-(t+1),r+2.5],["L",e-t/2,r+2.5],["L",e-t/2,r-2.5],["L",e+t/2,r-2.5],["L",e+t/2,r+2.5],["L",e+t+1,r+2.5]]},vhv:function(e,r){return[["M",e-5,r+2.5],["L",e-5,r],["L",e,r],["L",e,r-3],["L",e,r+3],["L",e+6.5,r+3]]}};function TW(e,r){var t=e.color;return{symbol:Sbt[r],style:{lineWidth:2,r:6,stroke:t}}}function Abt(e,r,t){for(var i=e.isStack,n=e.connectNulls,a=e.isInCircle,o=e.showSinglePoint,l=Ze(e,!0,!1,"lineWidth"),s=RF(e.points,n,o),u=[],c=0,f=s.length;c<f;c++){var h=s[c];u=u.concat(Mbt(h,a,i,r,t,l))}return l.path=u,l}function ET(e,r,t,i,n){if(e.length===1)return[["M",e[0].x,e[0].y-n.lineWidth/2],["L",e[0].x,e[0].y],["L",e[0].x,e[0].y+n.lineWidth/2]];var a;return t?(r&&e.length&&e.push({x:e[0].x,y:e[0].y}),a=_x(e,!1,i)):(a=vg(e,!1),r&&a.push(["Z"])),a}function Tbt(e,r,t,i,n,a){var o=[],l=[];P(e,function(c){var f=BF(c);o.push(f[1]),l.push(f[0])});var s=ET(o,r,i,n,a),u=ET(l,r,i,n,a);return t?s:s.concat(u)}function Mbt(e,r,t,i,n,a){if(e.length){var o=e[0];return it(o.y)?Tbt(e,r,t,i,n,a):ET(e,r,i,n,a)}return[]}cl("line",{defaultShapeType:"line"});P(["line","dot","dash","smooth"],function(e){Jt("line",e,{draw:function(r,t){var i=e==="smooth",n;if(i){var a=this.coordinate,o=a.start,l=a.end;n=[[o.x,l.y],[l.x,o.y]]}var s=Abt(r,i,n),u=t.addShape({type:"path",attrs:s,name:"line",capture:!i});return u},getMarker:function(r){return TW(r,e)}})});var NF=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.type="path",i.shapeType="line";var n=t.connectNulls,a=n===void 0?!1:n,o=t.showSinglePoint,l=o===void 0?!0:o;return i.connectNulls=a,i.showSinglePoint=l,i}return r.prototype.updateElements=function(t,i){i===void 0&&(i=!1);for(var n=new Map,a=new Map,o=[],l=0,s=0;s<t.length;s++){var u=t[s],c=this.getElementId(u);o.push(c),n.set(c,u),a.set(c,l),l++}this.elements=new Array(l);for(var f=xW(this.lastElementsMap,o),h=f.added,v=f.updated,d=f.removed,p=0,x=h;p<x.length;p++){var c=x[p],u=n.get(c),m=this.getShapeFactory(),_=this.getShapeInfo(u),s=a.get(c),b=new DF({shapeFactory:m,container:this.container,offscreenGroup:this.getOffscreenGroup(),elementIndex:s});b.geometry=this,b.animate=this.animateOption,b.draw(_,i),this.elementsMap[c]=b,this.elements[s]=b}for(var w=0,S=v;w<S.length;w++){var c=S[w],u=n.get(c),b=this.lastElementsMap[c],s=a.get(c),_=this.getShapeInfo(u),M=b.getModel();(this.isCoordinateChanged||mW(M,_))&&(b.animate=this.animateOption,b.update(_)),this.elementsMap[c]=b,this.elements[s]=b}for(var O=0,F=d;O<F.length;O++){var c=F[O],b=this.lastElementsMap[c];b.animate=this.animateOption,b.destroy()}},r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var l=t[a];i.push({x:l.x,y:l.y}),n.push(l[de])}return{points:i,data:n}},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=this.getPointsAndData(t),a=n.points,o=n.data;return i.mappingData=t,i.data=o,i.isStack=!!this.getAdjust("stack"),i.points=a,i.connectNulls=this.connectNulls,i.showSinglePoint=this.showSinglePoint,i},r}(fl);function Ebt(e,r,t,i,n){var a=[];if(e.length){for(var o=[],l=[],s=0,u=e.length;s<u;s++){var c=e[s];o.push(c[1]),l.push(c[0])}l=l.reverse(),P([o,l],function(f,h){var v=[],d=i.parsePoints(f),p=d[0];o.length===1&&l.length===1?v=h===0?[["M",p.x-.5,p.y],["L",p.x+.5,p.y]]:[["L",p.x+.5,p.y],["L",p.x-.5,p.y]]:(r&&d.push({x:p.x,y:p.y}),t?v=_x(d,!1,n):v=vg(d,!1),h>0&&(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;h<v;h++){var d=c[h];f=f.concat(Ebt(d,l,t,i,n))}return a.path=f,a}function MW(e){var r=e.start,t=e.end;return[[r.x,t.y],[t.x,r.y]]}cl("area",{defaultShapeType:"area",getDefaultPoints:function(e){var r=e.x,t=e.y0,i=it(e.y)?e.y:[t,e.y];return i.map(function(n){return{x:r,y:n}})}});Jt("area","area",{draw:function(e,r){var t=M_(e,!1,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r}}}});var Obt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.type="area",i.shapeType="area",i.generatePoints=!0,i.startOnZero=!0;var n=t.startOnZero,a=n===void 0?!0:n,o=t.sortable,l=o===void 0?!1:o,s=t.showSinglePoint,u=s===void 0?!1:s;return i.startOnZero=a,i.sortable=l,i.showSinglePoint=u,i}return r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var l=t[a];i.push(l.points),n.push(l[de])}return{points:i,data:n}},r.prototype.getYMinValue=function(){if(this.startOnZero)return e.prototype.getYMinValue.call(this);var t=this.getYScale();return t.min},r}(NF);cl("edge",{defaultShapeType:"line",getDefaultPoints:function(e){return BF(e)}});Jt("edge","line",{draw:function(e,r){var t=Ze(e,!0,!1,"lineWidth"),i=vg(this.parsePoints(e.points),this.coordinate.isPolar);return r.addShape("path",{attrs:A(A({},t),{path:i})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var Fbt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="edge",t.shapeType="edge",t.generatePoints=!0,t}return r}(fl),Pbt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t.paletteCache={},t}return r.prototype.updateElements=function(t,i){for(var n=0;n<t.length;n++){var a=t[n],o=this.prepareRange(a),l=this.prepareSize(),s=I(this.styleOption,["cfg","shadowBlur"]);Mt(s)||(s=l/2),this.prepareGreyScaleBlurredCircle(l,s),this.drawWithRange(a,o,l,s)}},r.prototype.color=function(t,i){return this.createAttrOption("color",t,typeof i!="function"?i:""),this},r.prototype.clear=function(){e.prototype.clear.call(this),this.clearShadowCanvasCtx(),this.paletteCache={}},r.prototype.prepareRange=function(t){var i=this.getAttribute("color"),n=i.getFields()[0],a=1/0,o=-1/0;return t.forEach(function(l){var s=l[de][n];s>o&&(o=s),s<a&&(a=s)}),a===o&&(a=o-1),[a,o]},r.prototype.prepareSize=function(){var t=this.getDefaultValue("size");return Mt(t)||(t=this.getDefaultSize()),t},r.prototype.prepareGreyScaleBlurredCircle=function(t,i){var n=this.getGrayScaleBlurredCanvas(),a=t+i,o=n.getContext("2d");n.width=n.height=a*2,o.clearRect(0,0,n.width,n.height),o.shadowOffsetX=o.shadowOffsetY=a*2,o.shadowBlur=i,o.shadowColor="black",o.beginPath(),o.arc(-a,-a,t,0,Math.PI*2,!0),o.closePath(),o.fill()},r.prototype.drawWithRange=function(t,i,n,a){var o=this.coordinate,l=o.start,s=o.end,u=this.coordinate.getWidth(),c=this.coordinate.getHeight(),f=this.getAttribute("color"),h=f.getFields()[0];this.clearShadowCanvasCtx();var v=this.getShadowCanvasCtx();i&&(t=t.filter(function(F){return F[de][h]<=i[1]&&F[de][h]>=i[0]}));for(var d=this.scales[h],p=0,x=t;p<x.length;p++){var m=x[p],_=this.getDrawCfg(m),b=_.x,w=_.y,S=d.scale(m[de][h]);this.drawGrayScaleBlurredCircle(b-l.x,w-s.y,n+a,S,v)}var M=v.getImageData(0,0,u,c);this.clearShadowCanvasCtx(),this.colorize(M),v.putImageData(M,0,0);var O=this.getImageShape();O.attr("x",l.x),O.attr("y",s.y),O.attr("width",u),O.attr("height",c),O.attr("img",v.canvas),O.set("origin",this.getShapeInfo(t))},r.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),i=this.coordinate;return Math.min(i.getWidth()/(t.scales[0].ticks.length*4),i.getHeight()/(t.scales[1].ticks.length*4))},r.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},r.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},r.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},r.prototype.drawGrayScaleBlurredCircle=function(t,i,n,a,o){var l=this.getGrayScaleBlurredCanvas();o.globalAlpha=a,o.drawImage(l,t-n,i-n)},r.prototype.colorize=function(t){for(var i=this.getAttribute("color"),n=t.data,a=this.paletteCache,o=3;o<n.length;o+=4){var l=n[o];if(Mt(l)){var s=a[l]?a[l]:Zo.rgb2arr(i.gradient(l/256));n[o-3]=s[0],n[o-2]=s[1],n[o-1]=s[2],n[o]=l}}},r.prototype.getImageShape=function(){var t=this.imageShape;if(t)return t;var i=this.container;return t=i.addShape({type:"image",attrs:{}}),this.imageShape=t,t},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=t.map(function(a){return a[de]});return A(A({},i),{mappingData:t,data:n})},r}(fl);function GF(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,s;it(r)?(l=r[0],s=r[1]):(l=r-n/2,s=r+n/2);var u=[{x:l,y:a},{x:l,y:o}];return u.push({x:s,y:o},{x:s,y:a}),u}function zF(e,r){r===void 0&&(r=!0);var t=[],i=e[0];t.push(["M",i.x,i.y]);for(var n=1,a=e.length;n<a;n++)t.push(["L",e[n].x,e[n].y]);return r&&(t.push(["L",i.x,i.y]),t.push(["z"])),t}function Kv(e,r){var t=0,i=0,n=0,a=0;return it(e)?e.length===1?t=i=n=a=e[0]:e.length===2?(t=n=e[0],i=a=e[1]):e.length===3?(t=e[0],i=a=e[1],n=e[2]):(t=e[0],i=e[1],n=e[2],a=e[3]):t=i=n=a=e,t+i>r&&(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.y<s.y?(s=e[0],l=e[1],c=e[2],u=e[3],i=Kv(t,Math.min(c.x-l.x,l.y-s.y)),p=i[0],d=i[1],v=i[2],h=i[3]):(n=Kv(t,Math.min(c.x-l.x,l.y-s.y)),h=n[0],v=n[1],d=n[2],p=n[3]),r.isTransposed&&(l=e[0],c=e[1],u=e[2],s=e[3],e[0].x>e[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;a<t;a++){var o=i[a]-i[a-1];n>o&&(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;m<L&&(m=L)}return m}var kbt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;i.type="interval",i.shapeType="interval",i.generatePoints=!0;var n=t.background;return i.background=n,i}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,l=fg(o);n=n/l}else this.defaultSize||(this.defaultSize=VF(this)),n=this.defaultSize;return i.size=n,i},r.prototype.adjustScale=function(){e.prototype.adjustScale.call(this);var t=this.getYScale();if(this.coordinate.type==="theta")t.change({nice:!1,min:0,max:d_t(t)});else{var i=this.scaleDefs,n=t.field,a=t.min,o=t.max,l=t.type;l!=="time"&&(a>0&&!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;u<c.length;u++){var f=c[u];s.addShape({type:"marker",attrs:A(A(A({},a),{symbol:Ju[i]||i}),f)})}return s}return t.addShape({type:"marker",attrs:A(A(A({},a),{symbol:Ju[i]||i}),l)})}cl("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return BF(e)}});P(FW,function(e){Jt("point","hollow-"+e,{draw:function(r,t){return jF(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:Ju[e]||e,style:{r:4.5,stroke:t,fill:null}}}})});var Nbt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return A(A({},i),{isStack:!!this.getAdjust("stack")})},r}(fl);function Gbt(e){for(var r=e[0],t=1,i=[["M",r.x,r.y]];t<e.length;){var n=e[t];(n.x!==e[t-1].x||n.y!==e[t-1].y)&&(i.push(["L",n.x,n.y]),n.x===r.x&&n.y===r.y&&t<e.length-1&&(r=e[t+1],i.push(["Z"]),i.push(["M",r.x,r.y]),t++)),t++}return Ge(nr(i),r)||i.push(["L",r.x,r.y]),i.push(["Z"]),i}cl("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(e){var r=[];return P(e.x,function(t,i){var n=e.y[i];r.push({x:t,y:n})}),r}});Jt("polygon","polygon",{draw:function(e,r){if(!di(e.points)){var t=Ze(e,!0,!0),i=this.parsePath(Gbt(e.points));return r.addShape("path",{attrs:A(A({},t),{path:i}),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});var zbt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polygon",t.shapeType="polygon",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n=i.x,a=i.y,o;if(!(it(n)&&it(a))){var l=this.getXScale(),s=this.getYScale(),u=l.values.length,c=s.values.length,f=.5*1/u,h=.5*1/c;l.isCategory&&s.isCategory?(n=[n-f,n-f,n+f,n+f],a=[a-h,a+h,a+h,a-h]):it(n)?(o=n,n=[o[0],o[0],o[1],o[1]],a=[a-h/2,a+h/2,a+h/2,a-h/2]):it(a)&&(o=a,a=[o[0],o[1],o[1],o[0]],n=[n-f/2,n-f/2,n+f/2,n+f/2]),i.x=n,i.y=a}return i},r}(fl);cl("schema",{defaultShapeType:""});var Vbt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="schema",t.shapeType="schema",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,l=fg(o);n=n/l}else this.defaultSize||(this.defaultSize=VF(this)),n=this.defaultSize;return i.size=n,i},r}(fl);function jbt(e){if(!it(e))return[];var r=vi(e);return je(e,function(t){return t/r})}cl("violin",{defaultShapeType:"violin",getDefaultPoints:function(e){var r=e.size/2,t=[],i=jbt(e._size);return P(e.y,function(n,a){var o=i[a]*r,l=a===0,s=a===e.y.length-1;t.push({isMin:l,isMax:s,x:e.x-o,y:n}),t.unshift({isMin:l,isMax:s,x:e.x+o,y:n})}),t}});Jt("violin","violin",{draw:function(e,r){var t=Ze(e,!0,!0),i=this.parsePath(CW(e.points));return r.addShape("path",{attrs:A(A({},t),{path:i}),name:"violin"})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:r}}}});var Hbt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t.shapeType="violin",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,l=fg(o);n=n/l}else this.defaultSize||(this.defaultSize=VF(this)),n=this.defaultSize;return i.size=n,i._size=I(t[de],[this._sizeField]),i},r.prototype.initAttributes=function(){var t=this.attributeOption,i=t.size?t.size.fields[0]:this._sizeField?this._sizeField:"size";this._sizeField=i,delete t.size,e.prototype.initAttributes.call(this)},r}(fl);Jt("area","line",{draw:function(e,r){var t=M_(e,!0,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}});Jt("area","smooth",{draw:function(e,r){var t=this.coordinate,i=M_(e,!1,!0,this,MW(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r}}}});Jt("area","smooth-line",{draw:function(e,r){var t=this.coordinate,i=M_(e,!0,!0,this,MW(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}});function OT(e,r){return["C",e.x*1/2+r.x*1/2,e.y,e.x*1/2+r.x*1/2,r.y,r.x,r.y]}function FT(e,r){var t=[];t.push({x:r.x,y:r.y}),t.push(e);var i=["Q"];return P(t,function(n){i.push(n.x,n.y)}),i}function Ybt(e,r,t){var i=FT(r,t),n=[["M",e.x,e.y]];return n.push(i),n}function Wbt(e,r){var t=FT(e[1],r),i=FT(e[3],r),n=[["M",e[0].x,e[0].y]];return n.push(i),n.push(["L",e[3].x,e[3].y]),n.push(["L",e[2].x,e[2].y]),n.push(t),n.push(["L",e[1].x,e[1].y]),n.push(["L",e[0].x,e[0].y]),n.push(["Z"]),n}Jt("edge","arc",{draw:function(e,r){var t=Ze(e,!0,!1,"lineWidth"),i=e.points,n=i.length>2?"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;o<l.length;o++){var s=l[o];a.addShape("image",{attrs:{x:s.x-t/2,y:s.y-t,width:t,height:t,img:e.shape[1]}})}return a}return r.addShape("image",{attrs:{x:n.x-t/2,y:n.y-t,width:t,height:t,img:e.shape[1]}})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4.5,fill:r}}}});P(FW,function(e){Jt("point",e,{draw:function(r,t){return jF(this,r,t,e,!1)},getMarker:function(r){var t=r.color;return{symbol:Ju[e]||e,style:{r:4.5,fill:t}}}})});function _B(e){var r=it(e)?e:[e],t=r[0],i=r[r.length-1],n=r.length>1?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.y<v&&(v=S.y),{size:t,targets:[S.y-u]}});for(v-=u,h-u>c&&(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;_<b.length;_++){var w=b[_];m[w.get("id")]=w}r.forEach(function(S){var M=S.r*S.r,O=Math.pow(Math.abs(S.y-n.y),2);if(M<O)S.x=n.x;else{var F=Math.sqrt(M-O);a?S.x=n.x+F:S.x=n.x-F}var L=m[S.id];L.attr("x",S.x),L.attr("y",S.y);var D=Yn(L.getChildren(),function(R){return R.get("type")==="text"});D&&(D.attr("y",S.y),D.attr("x",S.x))})}function uwt(e,r,t,i){if(!(!e.length||!r.length)){var n=e[0]?e[0].offset:0,a=r[0].get("coordinate"),o=a.getRadius(),l=a.getCenter();if(n>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.y<c&&(c=d.y),{content:d.content,size:r,targets:[d.y-a],pos:null}});for(c-=a,u-a>l&&(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&&n<Math.PI/2&&u.y>o.y&&(p=1),n>=Math.PI/2&&n<Math.PI&&o.y>u.y&&(p=1),(n<-Math.PI/2||n>=Math.PI&&n<Math.PI*1.5)&&o.y>u.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.x<t.x?1:-1;f.push("M "+u.x+" "+u.y);var S=(o.y-t.y)/(o.x-t.x),M=(u.y-t.y)/(u.x-t.x);Math.abs(S-M)>Math.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;u<c.length;u++){var f=c[u];s[f.get("id")]=f}var h=I(n[0],"labelHeight",14),v=I(n[0],"offset",0);if(!(v<=0)){var d="left",p="right",x=Xi(n,function(M){return M.x<o.x?d:p}),m=a.start,_=a.end,b=Math.min((l+v+h)*2,a.getHeight()),w=b/2,S={minX:m.x,maxX:_.x,minY:o.y-w,maxY:o.y+w};P(x,function(M,O){var F=Math.floor(b/h);M.length>F&&(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.y<o.y?s.y=l.y:(s.y=o.y,s.x=Math.max(s.x,l.x-f))),e.angle>0&&e.angle<Math.PI/2&&(l.x=Math.max(o.x,a.x-f),a.y>o.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.y<o.y?s.y=l.y:(s.y=o.y,s.x=Math.min(s.x,l.x-f)))}c=["M "+a.x+","+a.y,"L "+l.x+","+l.y,"L "+s.x+","+s.y,"L "+o.x+","+o.y,"L "+u.x+","+u.y].join(" "),e.labelLine=ft({},e.labelLine,{path:c})}function dwt(e,r,t,i){var n=r[0]&&r[0].get("coordinate");if(!!n){for(var a=n.getCenter(),o=n.getRadius(),l={},s=0,u=r;s<u.length;s++){var c=u[s];l[c.get("id")]=c}var f=I(e[0],"labelHeight",14),h=Math.max(I(e[0],"offset",0),PT);P(e,function(M){var O=I(l,[M.id]);if(!!O){var F=M.x>a.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<a.x?p:x}),_=(o+h)*2+f;P(m,function(M){var O=M.length*f;O>_&&(_=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.y<w||L.y>S){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;(c<a||h<a)&&(_=a),(f<o||v<o)&&(b=o),c>l?_=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.minX<l.minX||o.minY<l.minY||o.maxX>l.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))<s&&p<t;)if(u=v(c+=i),f=~~u[0],h=~~u[1],!(!f&&!h||x[f+"-"+h])&&(e.attr({x:a+f,y:o+h}),f+h<0&&e.attr("textAlign","right"),p++,r.hasGap(e.getCanvasBBox()))){r.fillGap(e.getCanvasBBox()),d=!0,x[f+"-"+h]=!0;break}return d}function xwt(e,r,t,i){var n=e.getCanvasBBox(),a=n.width,o=n.height,l={x:r,y:t,textAlign:"center"};switch(i){case 0:l.y-=o+1,l.x+=1,l.textAlign="left";break;case 1:l.y-=o+1,l.x-=1,l.textAlign="right";break;case 2:l.y+=o+1,l.x-=1,l.textAlign="right";break;case 3:l.y+=o+1,l.x+=1,l.textAlign="left";break;case 5:l.y-=o*2+2;break;case 6:l.y+=o*2+2;break;case 7:l.x+=a+1,l.textAlign="left";break;case 8:l.x-=a+1,l.textAlign="right";break}return e.attr(l),e.getCanvasBBox()}function _wt(e,r,t,i){var n=new LW;P(r,function(a){var o=a.find(function(l){return l.get("type")==="text"});mwt(o,n)||a.remove(!0)}),n.destroy()}function bwt(e,r,t,i){var n=new LW;P(r,function(a){for(var o=a.find(function(v){return v.get("type")==="text"}),l=o.attr(),s=l.x,u=l.y,c=!1,f=0;f<=8;f++){var h=xwt(o,s,u,f);if(n.hasGap(h)){n.fillGap(h),c=!0;break}}c||a.remove(!0)}),n.destroy()}var wwt=xM;function TB(e){if(e.length>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.min<r.max}function Swt(e){return Mt(e)&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0}function OB(e){return Object.values(e).every(Swt)}function Awt(e,r,t){return t===void 0&&(t=0),!(r.x>e.x+e.width+t||r.x+r.width<e.x-t||r.y>e.y+e.height+t||r.y+r.height<e.y-t)}function Twt(e,r){if(!OB(e)||!OB(r))return!1;if(!e.rotation&&!r.rotation)return Awt(e,r);for(var t=MB(e),i=MB(r),n=qr(qr([],TB(t),!0),TB(i),!0),a=0;a<n.length;a++){var o=n[a],l=EB(t,o),s=EB(i,o);if(!Cwt(l,s))return!1}return!0}function Mwt(e,r,t,i){for(var n=0;n<r.length;n++){var a=r[n];if(r[n].get("visible"))for(var o=n+1;o<r.length;o++){var l=r[o];if(a&&l&&a!==l&&l.get("visible")){var s=TT(a,e[n],I(e[n],"background.padding")),u=TT(l,e[o],I(e[o],"background.padding"));Twt(s,u)&&r[o].set("visible",!1)}}}}var FB={"#5B8FF9":!0},Ewt=function(e){var r=Zo.toRGB(e).toUpperCase();if(FB[r])return FB[r];var t=Zo.rgb2arr(r),i=t[0],n=t[1],a=t[2],o=(i*299+n*587+a*114)/1e3<128;return o};function Owt(e,r,t){if(t.length!==0){var i=t[0].get("element"),n=i.geometry.theme,a=n.labels||{},o=a.fillColorLight,l=a.fillColorDark;t.forEach(function(s,u){var c=r[u],f=c.find(function(m){return m.get("type")==="text"}),h=Mi.fromObject(s.getBBox()),v=Mi.fromObject(f.getCanvasBBox()),d=!h.contains(v),p=s.attr("fill"),x=Ewt(p);d?f.attr(n.overflowLabels.style):x?o&&f.attr("fill",o):l&&f.attr("fill",l)})}}function Fwt(e,r,t){var i=e.coordinate,n=ws(r),a=Mi.fromObject(n.getCanvasBBox()),o=Mi.fromObject(t.getBBox());return i.isTransposed?o.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<c||_<c)&&(F=c),a.indexOf("top")>=0&&(m<f||b<f)&&(L=f),a.indexOf("right")>=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.y<a.y?i.y:a.y):n==="x"?(u=i.x>a.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<l;u++)for(var c=n[u],f=0;f<o;f++){var h=n[f],v={type:a,data:t,region:this.getRegion(o,l,u,f),columnValue:c,rowValue:h,columnField:c,rowField:h,columnIndex:u,rowIndex:f,columnValuesLength:l,rowValuesLength:o};s.push(v)}return s},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?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,n){var a=i.columnIndex,o=i.rowIndex,l=i.columnValuesLength;i.rowValuesLength;var s=i.columnValue,u=i.rowValue,c=i.view;if(o===0){var f=I(t.cfg.columnTitle,"formatter"),h=ft({position:["50%","0%"],content:f?f(s):s},ll(ct.TOP),t.cfg.columnTitle);c.annotation().text(h)}if(a===l-1){var f=I(t.cfg.rowTitle,"formatter"),h=ft({position:["100%","50%"],content:f?f(u):u},ll(ct.RIGHT),t.cfg.rowTitle);c.annotation().text(h)}})},r}(hc),sCt=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:"mirror",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this),transpose:!1})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.beforeEachView=function(t,i){this.cfg.transpose?i.columnIndex%2===0?t.coordinate().transpose().reflect("x"):t.coordinate().transpose():i.rowIndex%2!==0&&t.coordinate().reflect("y")},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.generateFacets=function(t){var i=this,n=this.cfg.fields[0],a=[],o=1,l=1,s=[""],u=[""],c,f;return this.cfg.transpose?(c=n,s=this.getFieldValues(t,c).slice(0,2),o=s.length):(f=n,u=this.getFieldValues(t,f).slice(0,2),l=u.length),s.forEach(function(h,v){u.forEach(function(d,p){var x=[{field:c,value:h,values:s},{field:f,value:d,values:u}],m=zr(t,i.getFacetDataFilter(x)),_={type:i.cfg.type,data:m,region:i.getRegion(l,o,v,p),columnValue:h,rowValue:d,columnField:c,rowField:f,columnIndex:v,rowIndex:p,columnValuesLength:o,rowValuesLength:l};a.push(_)})}),a},r.prototype.getXAxisOption=function(t,i,n,a){return a.columnIndex===1||a.rowIndex===1?A(A({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;P(this.facets,function(i,n){var a=i.columnValue,o=i.rowValue,l=i.view,s=I(t.cfg.title,"formatter");if(t.cfg.transpose){var u=ft({position:["50%","0%"],content:s?s(a):a},ll(ct.TOP),t.cfg.title);l.annotation().text(u)}else{var u=ft({position:["100%","50%"],content:s?s(o):o},ll(ct.RIGHT),t.cfg.title);l.annotation().text(u)}})},r}(hc),uCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.getDefaultCfg=function(){return ft({},e.prototype.getDefaultCfg.call(this),{type:"rect",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.generateFacets=function(t){var i=this,n=this.cfg.fields,a=n[0],o=n[1],l=[],s=1,u=1,c=[""],f=[""];return a&&(c=this.getFieldValues(t,a),s=c.length),o&&(f=this.getFieldValues(t,o),u=f.length),c.forEach(function(h,v){f.forEach(function(d,p){var x=[{field:a,value:h,values:c},{field:o,value:d,values:f}],m=zr(t,i.getFacetDataFilter(x)),_={type:i.cfg.type,data:m,region:i.getRegion(u,s,v,p),columnValue:h,rowValue:d,columnField:a,rowField:o,columnIndex:v,rowIndex:p,columnValuesLength:s,rowValuesLength:u};l.push(_)})}),l},r.prototype.renderTitle=function(){var t=this;P(this.facets,function(i,n){var a=i.columnIndex,o=i.rowIndex,l=i.columnValuesLength,s=i.columnValue,u=i.rowValue,c=i.view;if(o===0){var f=I(t.cfg.columnTitle,"formatter"),h=ft({position:["50%","0%"],content:f?f(s):s},ll(ct.TOP),t.cfg.columnTitle);c.annotation().text(h)}if(a===l-1){var f=I(t.cfg.rowTitle,"formatter"),h=ft({position:["100%","50%"],content:f?f(u):u},ll(ct.RIGHT),t.cfg.rowTitle);c.annotation().text(h)}})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?A(A({},n),{title:null,label:null}):a.columnIndex!==Math.floor((a.columnValuesLength-1)/2)?A(A({},n),{title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?A(A({},n),{title:null,label:null}):a.rowIndex!==Math.floor((a.rowValuesLength-1)/2)?A(A({},n),{title:null}):n},r}(hc),cCt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.afterChartRender=function(){t.facets&&t.cfg.line&&(t.container.clear(),t.drawLines(t.facets))},t}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.init=function(){e.prototype.init.call(this),this.view.on(Gt.AFTER_RENDER,this.afterChartRender)},r.prototype.getDefaultCfg=function(){return ft({},e.prototype.getDefaultCfg.call(this),{type:"tree",line:{style:{lineWidth:1,stroke:"#ddd"},smooth:!1},showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.generateFacets=function(t){var i=this.cfg.fields;if(!i.length)throw new Error("Please specify for the fields for rootFacet!");var n=[],a={type:this.cfg.type,data:t,region:null,rowValuesLength:this.getRows(),columnValuesLength:1,rowIndex:0,columnIndex:0,rowField:"",columnField:"",rowValue:"",columnValue:""};return n.push(a),a.children=this.getChildFacets(t,1,n),this.setRegion(n),n},r.prototype.setRegion=function(t){var i=this;this.forceColIndex(t),t.forEach(function(n){n.region=i.getRegion(n.rowValuesLength,n.columnValuesLength,n.columnIndex,n.rowIndex)})},r.prototype.getRegion=function(t,i,n,a){var o=1/i,l=1/t,s={x:o*n,y:l*a},u={x:s.x+o,y:s.y+l*2/3};return{start:s,end:u}},r.prototype.forceColIndex=function(t){var i=this,n=[],a=0;t.forEach(function(h){i.isLeaf(h)&&(n.push(h),h.columnIndex=a,a++)}),n.forEach(function(h){h.columnValuesLength=n.length});for(var o=this.cfg.fields.length,l=o-1;l>=0;l--)for(var s=this.getFacetsByLevel(t,l),u=0,c=s;u<c.length;u++){var f=c[u];this.isLeaf(f)||(f.originColIndex=f.columnIndex,f.columnIndex=this.getRegionIndex(f.children),f.columnValuesLength=n.length)}},r.prototype.getFacetsByLevel=function(t,i){var n=[];return t.forEach(function(a){a.rowIndex===i&&n.push(a)}),n},r.prototype.getRegionIndex=function(t){var i=t[0],n=t[t.length-1];return(n.columnIndex-i.columnIndex)/2+i.columnIndex},r.prototype.isLeaf=function(t){return!t.children||!t.children.length},r.prototype.getRows=function(){return this.cfg.fields.length+1},r.prototype.getChildFacets=function(t,i,n){var a=this,o=this.cfg.fields,l=o.length;if(!(l<i)){var s=[],u=o[i-1],c=this.getFieldValues(t,u);return c.forEach(function(f,h){var v=[{field:u,value:f,values:c}],d=t.filter(a.getFacetDataFilter(v));if(d.length){var p={type:a.cfg.type,data:d,region:null,columnValue:f,rowValue:"",columnField:u,rowField:"",columnIndex:h,rowValuesLength:a.getRows(),columnValuesLength:1,rowIndex:i,children:a.getChildFacets(d,i+1,n)};s.push(p),n.push(p)}}),s}},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},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.drawLines=function(t){var i=this;t.forEach(function(n){if(!i.isLeaf(n)){var a=n.children;i.addFacetLines(n,a)}})},r.prototype.addFacetLines=function(t,i){var n=this,a=t.view,o=a.coordinateBBox,l={x:o.x+o.width/2,y:o.y+o.height};i.forEach(function(s){var u=s.view.coordinateBBox,c={x:u.bl.x+(u.tr.x-u.bl.x)/2,y:u.tr.y},f={x:l.x,y:l.y+(c.y-l.y)/2},h={x:c.x,y:f.y};n.drawLine([l,f,h,c])})},r.prototype.getPath=function(t){var i=[],n=this.cfg.line.smooth;return n?(i.push(["M",t[0].x,t[0].y]),i.push(["C",t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y])):t.forEach(function(a,o){o===0?i.push(["M",a.x,a.y]):i.push(["L",a.x,a.y])}),i},r.prototype.drawLine=function(t){var i=this.getPath(t),n=this.cfg.line.style;this.container.addShape("path",{attrs:Qt({path:i},n)})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?A(A({},n),{title:null,label:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.originColIndex!==0&&a.columnIndex!==0?A(A({},n),{title:null,label:null}):n},r}(hc);function kB(e){var r=qr([],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}function fCt(e){var r=Zr(e,function(t,i){return t+=isNaN(i)||!Mt(i)?0:i},0);return e.length===0?0:r/e.length}function t0(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?kB(r.values.map(function(i,n){return n})):kB(r.values);break}case"mean":{t=r.isCategory?(r.values.length-1)/2:fCt(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)}var e0=["regionFilter","shape"],hCt=function(e){X(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.foregroundContainer=i.view.getLayer(Ye.FORE).addGroup(),i.backgroundContainer=i.view.getLayer(Ye.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;P(t.option,function(a){if(eo(e0,a.type)){var o=t.updateOrCreate(a);o&&n.set(t.getCacheKey(a),o)}}),t.cache=t.syncCache(n)});var i=new Map;P(this.option,function(n){if(!eo(e0,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(Ff.AFTER_DRAW_ANIMATE,function(){t()})}):this.view.getRootView().once(Gt.AFTER_RENDER,function(){t()})},r.prototype.createAnnotation=function(t){var i=t.type,n=T5[Os(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)?Ye.FORE:Ye.BG,direction:ct.NONE,type:Tr.ANNOTATION,extra:t}}},r.prototype.annotation=function(t){this.option.push(t)},r.prototype.arc=function(t){return this.annotation(A({type:"arc"},t)),this},r.prototype.image=function(t){return this.annotation(A({type:"image"},t)),this},r.prototype.line=function(t){return this.annotation(A({type:"line"},t)),this},r.prototype.region=function(t){return this.annotation(A({type:"region"},t)),this},r.prototype.text=function(t){return this.annotation(A({type:"text"},t)),this},r.prototype.dataMarker=function(t){return this.annotation(A({type:"dataMarker"},t)),this},r.prototype.dataRegion=function(t){this.annotation(A({type:"dataRegion"},t))},r.prototype.regionFilter=function(t){this.annotation(A({type:"regionFilter"},t))},r.prototype.shape=function(t){this.annotation(A({type:"shape"},t))},r.prototype.html=function(t){this.annotation(A({type:"html"},t))},r.prototype.parsePosition=function(t){var i=this.view.getXScale(),n=this.view.getScalesByDim("y"),a=pt(t)?t.call(null,i,n):t,o=0,l=0;if(it(a)){var s=a[0],u=a[1];if(Ct(s)&&s.indexOf("%")!==-1&&!isNaN(s.slice(0,-1)))return this.parsePercentPosition(a);o=t0(s,i),l=t0(u,Object.values(n)[0])}else if(!K(a))for(var c=0,f=oc(a);c<f.length;c++){var h=f[c],v=a[h];h===i.field&&(o=t0(v,i)),n[h]&&(l=t0(v,n[h]))}return this.view.getCoordinate().convert({x:o,y:l})},r.prototype.getRegionPoints=function(t,i){var n=this,a=this.view.getXScale(),o=this.view.getScalesByDim("y"),l=Object.values(o)[0],s=a.field,u=this.view.getData(),c=it(t)?t[0]:t[s],f=it(i)?i[0]:i[s],h=[],v;return P(u,function(d,p){if(d[s]===c&&(v=p),p>=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;n<a.length;n++)for(var o=a[n],l=0,s=o;l<s.length;l++){var u=s[l],c=u.mappingData,f=c.x,h=c.y;u.x=it(f)?f[f.length-1]:f,u.y=it(h)?h[h.length-1]:h}var v=t.shared;if(v===!1&&i.length>1){for(var d=i[0],p=Math.abs(r.y-d[0].y),x=0,m=i;x<m.length;x++){var _=m[x],b=Math.abs(r.y-_[0].y);b<=p&&(d=_,p=b)}i=[d]}return ss(qi(i))}return[]}var bCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.show=function(t){var i=this.context.view,n=this.context.event,a=i.getController("tooltip").getTooltipCfg(),o=_Ct(i,{x:n.x,y:n.y},a);if(!Ge(o,this.items)&&(this.items=o,o.length)){var l=i.getXScale().field,s=o[0].data[l],u=[],c=i.geometries;if(P(c,function(N){if(N.type==="interval"||N.type==="schema"){var W=N.getElementsBy(function(q){var tt=q.getData();return tt[l]===s});u=u.concat(W)}}),u.length){var f=i.getCoordinate(),h=u[0].shape.getCanvasBBox(),v=u[0].shape.getCanvasBBox(),d=h;P(u,function(N){var W=N.shape.getCanvasBBox();f.isTransposed?(W.minY<h.minY&&(h=W),W.maxY>v.maxY&&(v=W)):(W.minX<h.minX&&(h=W),W.maxX>v.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<f-1){var d=s[v+1];n.addLinkShape(c,h,d,i)}})}}},r.prototype.removeLink=function(t){var i=this.getColorScale(this.context.view,t);if(!!i){var n=Ea(t,i.field);this.cache[n]&&(this.cache[n].remove(),this.cache[n]=null)}},r.prototype.link=function(t){var i=this.context;this.linkGroup||(this.linkGroup=i.view.foregroundGroup.addGroup({id:"link-by-color-group",capture:!1}));var n=bs(i);n&&this.linkByElement(n,t==null?void 0:t.style)},r.prototype.unlink=function(){var t=bs(this.context);t&&this.removeLink(t)},r.prototype.clear=function(){this.linkGroup&&this.linkGroup.clear(),this.cache={}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.linkGroup&&this.linkGroup.remove()},r}(Ie),UF=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.endPoint=null,t.isStarted=!1,t.effectSiblings=!1,t.effectByRecord=!1,t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.start=function(){this.clear(),this.startPoint=this.getCurrentPoint(),this.isStarted=!0},r.prototype.getIntersectElements=function(){var t=null;if(np(this.context))t=SF(this.context,10);else{var i=this.startPoint,n=this.isStarted?this.getCurrentPoint():this.endPoint;if(!i||!n)return;var a={minX:Math.min(i.x,n.x),minY:Math.min(i.y,n.y),maxX:Math.max(i.x,n.x),maxY:Math.max(i.y,n.y)},o=this.context.view;t=AF(o,a)}return t},r.prototype.setStateEnable=function(t){if(this.effectSiblings&&!this.effectByRecord)this.setSiblingsState(t);else{var i=Gr(this.context.view),n=this.getIntersectElements();n&&n.length?this.effectByRecord?this.setSiblingsStateByRecord(n,t):this.setElementsState(n,t,i):this.clear()}},r.prototype.setSiblingsStateByRecord=function(t,i){var n=this,a=this.context.view,o=vo(a),l=t.map(function(c){return c.getModel().data}),s=a.getXScale().field,u=a.getYScales()[0].field;P(o,function(c){var f=Gr(c),h=f.filter(function(v){var d=v.getModel().data;return rW(l,d,s,u)});n.setElementsState(h,i,f)})},r.prototype.setSiblingsState=function(t){var i=this,n=this.context.view,a=vo(n);np(this.context)&&P(a,function(o){var l=Gr(o),s=JY(i.context,o,10);s&&s.length?i.setElementsState(s,t,l):i.clearViewState(o)})},r.prototype.setElementsState=function(t,i,n){var a=this;P(n,function(o){t.includes(o)?a.setElementState(o,i):a.setElementState(o,!1)})},r.prototype.end=function(){this.isStarted=!1,this.endPoint=this.getCurrentPoint()},r.prototype.clear=function(){var t=this,i=this.context.view;if(this.effectSiblings){var n=vo(i);P(n,function(a){t.clearViewState(a)})}else this.clearViewState(i)},r}(WF),TCt=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}(UF),qF=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateEnable=function(t){var i=bs(this.context);if(i){if(!QY(this.context))return;t?(this.clear(),this.setElementState(i,!0)):this.hasState(i)&&this.setElementState(i,!1)}},r.prototype.toggle=function(){var t=bs(this.context);if(t){var i=this.hasState(t);i||this.clear(),this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(WF),MCt=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}(qF),Cd="inactive",Sd="active";function ZF(e){var r=Gr(e);P(r,function(t){t.hasState(Sd)&&t.setState(Sd,!1),t.hasState(Cd)&&t.setState(Cd,!1)})}function RW(e,r,t){P(e,function(i){r(i)?(i.hasState(Cd)&&i.setState(Cd,!1),i.setState(Sd,t)):(i.hasState(Sd)&&i.setState(Sd,!1),i.setState(Cd,t))})}var Eu=mx.INACTIVE,zo=mx.ACTIVE,QF=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=zo,t}return r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this,l=function(s){return o.isMathItem(s,i,n)};this.setHighlightBy(t,l,a)},r.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(Eu)&&t.setState(Eu,!1),t.setState(zo,!0)):t.hasState(zo)||t.setState(Eu,!0)},r.prototype.setHighlightBy=function(t,i,n){var a=this;if(n)P(t,function(s){a.setElementHighlight(s,i)});else{var o=tW(this.context.view,zo),l=!0;P(o,function(s){if(!i(s))return l=!1,!1}),l?this.clear():P(t,function(s){i(s)&&(s.hasState(zo)&&s.setState(zo,!1),s.setState(Eu,!0))})}},r.prototype.setElementState=function(t,i){var n=this.context.view,a=Gr(n);this.setHighlightBy(a,function(o){return t===o},i)},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.context.view;ZF(t)},r}(XF),ECt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=t.geometry.getAttribute("color");if(!!a){var o=n.getScaleByField(a.getFields()[0]),l=Ea(t,o.field),s=Gr(n),u=s.filter(function(c){return Ea(c,o.field)===l});this.setHighlightBy(s,function(c){return u.includes(c)},i)}},r}(QF),OCt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(Eu)&&t.setState(Eu,!1),t.setState(zo,!0)):(t.setState(Eu,!0),t.hasState(zo)&&t.setState(zo,!1))},r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=n.getXScale(),o=Ea(t,a.field),l=Gr(n),s=l.filter(function(u){return Ea(u,a.field)===o});this.setHighlightBy(l,function(u){return s.includes(u)},i)},r.prototype.toggle=function(){var t=bs(this.context);if(t){var i=t.hasState(this.stateName);this.setStateByElement(t,!i)}},r}(QF),da;(function(e){e.BEFORE_HIGHLIGHT="element-range-highlight:beforehighlight",e.AFTER_HIGHLIGHT="element-range-highlight:afterhighlight",e.BEFORE_CLEAR="element-range-highlight:beforeclear",e.AFTER_CLEAR="element-range-highlight:afterclear"})(da||(da={}));var BW=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.clearViewState=function(t){ZF(t)},r.prototype.highlight=function(){var t=this.context,i=t.view,n=t.event,a=this.getIntersectElements(),o={view:i,event:n,highlightElements:a};i.emit(da.BEFORE_HIGHLIGHT,$e.fromData(i,da.BEFORE_HIGHLIGHT,o)),this.setState(),i.emit(da.AFTER_HIGHLIGHT,$e.fromData(i,da.AFTER_HIGHLIGHT,o))},r.prototype.clear=function(){var t=this.context.view;t.emit(da.BEFORE_CLEAR,$e.fromData(t,da.BEFORE_CLEAR,{})),e.prototype.clear.call(this),t.emit(da.AFTER_CLEAR,$e.fromData(t,da.AFTER_CLEAR,{}))},r.prototype.setElementsState=function(t,i,n){RW(n,function(a){return t.indexOf(a)>=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(n<l&&(n=l),a>s&&(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<l;u++)s[u]=arguments[u];clearTimeout(a),a=setTimeout(function(){i.apply(o,s)},n)}};e.default=r})(eP);var Ko={};Object.defineProperty(Ko,"__esModule",{value:!0});Ko.SensorTabIndex=Ko.SensorClassName=Ko.SizeSensorId=void 0;var iSt="size-sensor-id";Ko.SizeSensorId=iSt;var nSt="size-sensor-object";Ko.SensorClassName=nSt;var aSt="-1";Ko.SensorTabIndex=aSt;Object.defineProperty(F_,"__esModule",{value:!0});F_.createSensor=void 0;var oSt=lSt(eP),ZB=Ko;function lSt(e){return e&&e.__esModule?e:{default:e}}var sSt=function(r){var t=void 0,i=[],n=function(){getComputedStyle(r).position==="static"&&(r.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",a),a()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",ZB.SensorClassName),c.setAttribute("tabindex",ZB.SensorTabIndex),c.type="text/html",r.appendChild(c),c.data="about:blank",c},a=(0,oSt.default)(function(){i.forEach(function(u){u(r)})}),o=function(c){t||(t=n()),i.indexOf(c)===-1&&i.push(c)},l=function(){t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",a),t.parentNode.removeChild(t),t=void 0,i=[])},s=function(c){var f=i.indexOf(c);f!==-1&&i.splice(f,1),i.length===0&&t&&l()};return{element:r,bind:o,destroy:l,unbind:s}};F_.createSensor=sSt;var P_={};Object.defineProperty(P_,"__esModule",{value:!0});P_.createSensor=void 0;var uSt=cSt(eP);function cSt(e){return e&&e.__esModule?e:{default:e}}var fSt=function(r){var t=void 0,i=[],n=(0,uSt.default)(function(){i.forEach(function(u){u(r)})}),a=function(){var c=new ResizeObserver(n);return c.observe(r),n(),c},o=function(c){t||(t=a()),i.indexOf(c)===-1&&i.push(c)},l=function(){t.disconnect(),i=[],t=void 0},s=function(c){var f=i.indexOf(c);f!==-1&&i.splice(f,1),i.length===0&&t&&l()};return{element:r,bind:o,destroy:l,unbind:s}};P_.createSensor=fSt;Object.defineProperty(O_,"__esModule",{value:!0});O_.createSensor=void 0;var hSt=F_,vSt=P_,dSt=typeof ResizeObserver!="undefined"?vSt.createSensor:hSt.createSensor;O_.createSensor=dSt;Object.defineProperty(rh,"__esModule",{value:!0});rh.removeSensor=rh.getSensor=void 0;var pSt=ySt(HW),gSt=O_,wx=Ko;function ySt(e){return e&&e.__esModule?e:{default:e}}var Ad={},mSt=function(r){var t=r.getAttribute(wx.SizeSensorId);if(t&&Ad[t])return Ad[t];var i=(0,pSt.default)();r.setAttribute(wx.SizeSensorId,i);var n=(0,gSt.createSensor)(r);return Ad[i]=n,n};rh.getSensor=mSt;var xSt=function(r){var t=r.element.getAttribute(wx.SizeSensorId);r.element.removeAttribute(wx.SizeSensorId),r.destroy(),t&&Ad[t]&&delete Ad[t]};rh.removeSensor=xSt;Object.defineProperty(is,"__esModule",{value:!0});is.ver=is.clear=YW=is.bind=void 0;var IT=rh,_St=function(r,t){var i=(0,IT.getSensor)(r);return i.bind(t),function(){i.unbind(t)}},YW=is.bind=_St,bSt=function(r){var t=(0,IT.getSensor)(r);(0,IT.removeSensor)(t)};is.clear=bSt;var wSt="1.0.1";is.ver=wSt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Plot=e.PLOT_CONTAINER_OPTIONS=void 0;var r=j,t=me,i=Y,n=r.__importDefault(f3),a=is,o=mt,l="data-chart-source-type";e.PLOT_CONTAINER_OPTIONS=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"];var s=function(u){r.__extends(c,u);function c(f,h){var v=u.call(this)||this;return v.container=typeof f=="string"?document.getElementById(f):f,v.options=o.deepAssign({},v.getDefaultOptions(),h),v.createG2(),v.bindEvents(),v}return c.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}},c.prototype.createG2=function(){var f=this.options,h=f.width,v=f.height,d=f.defaultInteractions;this.chart=new t.Chart(r.__assign(r.__assign(r.__assign(r.__assign({container:this.container,autoFit:!1},this.getChartSize(h,v)),{localRefresh:!1}),o.pick(this.options,e.PLOT_CONTAINER_OPTIONS)),{defaultInteractions:d})),this.container.setAttribute(l,"G2Plot")},c.prototype.getChartSize=function(f,h){var v=o.getContainerSize(this.container);return{width:f||v.width||400,height:h||v.height||400}},c.prototype.bindEvents=function(){var f=this;this.chart&&this.chart.on("*",function(h){h!=null&&h.type&&f.emit(h.type,h)})},c.prototype.getDefaultOptions=function(){return c.getDefaultOptions()},c.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},c.prototype.update=function(f){this.updateOption(f),this.render()},c.prototype.updateOption=function(f){this.options=o.deepAssign({},this.options,f)},c.prototype.setState=function(f,h,v){v===void 0&&(v=!0);var d=o.getAllElementsRecursively(this.chart);i.each(d,function(p){h(p.getData())&&p.setState(f,v)})},c.prototype.getStates=function(){var f=o.getAllElementsRecursively(this.chart),h=[];return i.each(f,function(v){var d=v.getData(),p=v.getStates();i.each(p,function(x){h.push({data:d,state:x,geometry:v.geometry,element:v})})}),h},c.prototype.changeData=function(f){this.update({data:f})},c.prototype.changeSize=function(f,h){this.chart.changeSize(f,h)},c.prototype.addAnnotations=function(f){var h=r.__spreadArrays(f),v=this.chart.getController("annotation"),d=v.getComponents().map(function(m){return m.extra});v.clear(!0);for(var p=function(m){var _=d[m],b=h.findIndex(function(w){return w.id&&w.id===_.id});b!==-1&&(_=o.deepAssign({},_,h[b]),h.splice(b,1)),v.annotation(_)},x=0;x<d.length;x++)p(x);h.forEach(function(m){return v.annotation(m)}),this.chart.render(!0)},c.prototype.removeAnnotations=function(f){var h=this.chart.getController("annotation"),v=h.getComponents().map(function(x){return x.extra});h.clear(!0);for(var d=function(x){var m=v[x];f.find(function(_){return _.id&&_.id===m.id})||h.annotation(m)},p=0;p<v.length;p++)d(p);this.chart.render(!0)},c.prototype.destroy=function(){this.unbindSizeSensor(),this.chart.destroy(),this.off(),this.container.removeAttribute(l)},c.prototype.execAdaptor=function(){var f=this.getSchemaAdaptor(),h=this.options,v=h.padding,d=h.appendPadding;this.chart.padding=v,this.chart.appendPadding=d,f({chart:this.chart,options:this.options})},c.prototype.triggerResize=function(){this.chart.forceFit()},c.prototype.bindSizeSensor=function(){var f=this;if(!this.unbind){var h=this.options.autoFit,v=h===void 0?!0:h;v&&(this.unbind=a.bind(this.container,function(){var d=o.getContainerSize(f.container),p=d.width,x=d.height;(p!==f.chart.width||x!==f.chart.height)&&f.triggerResize()}))}},c.prototype.unbindSizeSensor=function(){this.unbind&&(this.unbind(),this.unbind=void 0)},c}(n.default);e.Plot=s})(ae);var tc={},Qe={},yg={};Object.defineProperty(yg,"__esModule",{value:!0});yg.AXIS_META_CONFIG_KEYS=void 0;yg.AXIS_META_CONFIG_KEYS=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"];var Ds={},I_={},WW={},ci={};Object.defineProperty(ci,"__esModule",{value:!0});ci.transformMatrix=ci.getSymbolsPosition=ci.getUnitPatternSize=ci.drawBackground=ci.initCanvas=ci.getPixelRatio=void 0;function XW(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}ci.getPixelRatio=XW;function CSt(e,r){r===void 0&&(r=e);var t=document.createElement("canvas"),i=XW();t.width=e*i,t.height=r*i,t.style.width=e+"px",t.style.height=r+"px";var n=t.getContext("2d");return n.scale(i,i),t}ci.initCanvas=CSt;function SSt(e,r,t,i){i===void 0&&(i=t);var n=r.backgroundColor,a=r.opacity;e.globalAlpha=a,e.fillStyle=n,e.beginPath(),e.fillRect(0,0,t,i),e.closePath()}ci.drawBackground=SSt;function ASt(e,r,t){var i=e+r;return t?i*2:i}ci.getUnitPatternSize=ASt;function TSt(e,r){var t=r?[[e*.25,e*.25],[e*.75,e*.75]]:[[e*.5,e*.5]];return t}ci.getSymbolsPosition=TSt;function MSt(e,r){var t=r*Math.PI/180,i={a:Math.cos(t)*(1/e),b:Math.sin(t)*(1/e),c:-Math.sin(t)*(1/e),d:Math.cos(t)*(1/e),e:0,f:0};return i}ci.transformMatrix=MSt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createDotPattern=e.drawDot=e.defaultDotPatternCfg=void 0;var r=mt,t=ci;e.defaultDotPatternCfg={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function i(a,o,l,s){var u=o.size,c=o.fill,f=o.lineWidth,h=o.stroke,v=o.fillOpacity;a.beginPath(),a.globalAlpha=v,a.fillStyle=c,a.strokeStyle=h,a.lineWidth=f,a.arc(l,s,u/2,0,2*Math.PI,!1),a.fill(),f&&a.stroke(),a.closePath()}e.drawDot=i;function n(a){var o=r.deepAssign({},e.defaultDotPatternCfg,a),l=o.size,s=o.padding,u=o.isStagger,c=o.rotation,f=t.getUnitPatternSize(l,s,u),h=t.getSymbolsPosition(f,u),v=t.initCanvas(f,f),d=v.getContext("2d");t.drawBackground(d,o,f);for(var p=0,x=h;p<x.length;p++){var m=x[p],_=m[0],b=m[1];i(d,o,_,b)}var w=d.createPattern(v,"repeat");if(w){var S=t.getPixelRatio(),M=t.transformMatrix(S,c);w.setTransform(M)}return w}e.createDotPattern=n})(WW);var UW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createLinePattern=e.drawLine=e.defaultLinePatternCfg=void 0;var r=mt,t=ci;e.defaultLinePatternCfg={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function i(a,o,l){var s=o.stroke,u=o.lineWidth,c=o.strokeOpacity,f=new Path2D(l);a.globalAlpha=c,a.lineCap="square",a.strokeStyle=u?s:"transparent",a.lineWidth=u,a.stroke(f)}e.drawLine=i;function n(a){var o=r.deepAssign({},e.defaultLinePatternCfg,a),l=o.spacing,s=o.rotation,u=o.lineWidth,c=l+u||1,f=l+u||1,h=`
M 0 0 L `+c+` 0
M 0 `+f+" L "+c+" "+f+`
`,v=t.initCanvas(c,f),d=v.getContext("2d");t.drawBackground(d,o,c,f),i(d,o,h);var p=d.createPattern(v,"repeat");if(p){var x=t.getPixelRatio(),m=t.transformMatrix(x,s);p.setTransform(m)}return p}e.createLinePattern=n})(UW);var qW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createSquarePattern=e.drawSquare=e.defaultSquarePatternCfg=void 0;var r=mt,t=ci;e.defaultSquarePatternCfg={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function i(a,o,l,s){var u=o.stroke,c=o.size,f=o.fill,h=o.lineWidth,v=o.fillOpacity;a.globalAlpha=v,a.strokeStyle=u,a.lineWidth=h,a.fillStyle=f,a.strokeRect(l-c/2,s-c/2,c,c),a.fillRect(l-c/2,s-c/2,c,c)}e.drawSquare=i;function n(a){var o=r.deepAssign({},e.defaultSquarePatternCfg,a),l=o.size,s=o.padding,u=o.isStagger,c=o.rotation,f=t.getUnitPatternSize(l,s,u),h=t.getSymbolsPosition(f,u),v=t.initCanvas(f,f),d=v.getContext("2d");t.drawBackground(d,o,f);for(var p=0,x=h;p<x.length;p++){var m=x[p],_=m[0],b=m[1];i(d,o,_,b)}var w=d.createPattern(v,"repeat");if(w){var S=t.getPixelRatio(),M=t.transformMatrix(S,c);w.setTransform(M)}return w}e.createSquarePattern=n})(qW);Object.defineProperty(I_,"__esModule",{value:!0});I_.getCanvasPattern=void 0;var ESt=WW,OSt=UW,FSt=qW;function PSt(e){var r=e.type,t=e.cfg,i;switch(r){case"dot":i=ESt.createDotPattern(t);break;case"line":i=OSt.createLinePattern(t);break;case"square":i=FSt.createSquarePattern(t);break}return i}I_.getCanvasPattern=PSt;Object.defineProperty(Ds,"__esModule",{value:!0});Ds.pattern=void 0;var TS=j,ISt=me,LSt=Y,DSt=I_,QB=mt;function $St(e){var r=this;return function(t){var i,n=t.options,a=t.chart,o=n.pattern;if(!o)return t;var l=function(s){for(var u,c,f,h=[],v=1;v<arguments.length;v++)h[v-1]=arguments[v];var d=a.getTheme().defaultColor,p=d,x=(c=(u=a.geometries)===null||u===void 0?void 0:u[0])===null||c===void 0?void 0:c.getAttribute("color");if(x){var m=x.getFields()[0],_=LSt.get(s,m);p=ISt.Util.getMappingValue(x,_,((f=x.values)===null||f===void 0?void 0:f[0])||d)}var b=o;typeof o=="function"&&(b=o.call(r,s,p)),b instanceof CanvasPattern||(b=DSt.getCanvasPattern(QB.deepAssign({},{cfg:{backgroundColor:p}},b)));var w=n[e];return TS.__assign(TS.__assign({},typeof w=="function"?w.call.apply(w,TS.__spreadArrays([r,s],h)):w||{}),{fill:b||p})};return QB.deepAssign({},t,{options:(i={},i[e]=l,i)})}}Ds.pattern=$St;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.limitInPlot=e.annotation=e.scale=e.scrollbar=e.slider=e.state=e.theme=e.animation=e.interaction=e.tooltip=e.legend=void 0;var r=j,t=Y,i=yg,n=mt;function a(m){var _=m.chart,b=m.options,w=b.legend,S=b.colorField,M=b.seriesField;return w===!1?_.legend(!1):(S||M)&&_.legend(S||M,w),m}e.legend=a;function o(m){var _=m.chart,b=m.options,w=b.tooltip;return w!==void 0&&_.tooltip(w),m}e.tooltip=o;function l(m){var _=m.chart,b=m.options,w=b.interactions;return t.each(w,function(S){S.enable===!1?_.removeInteraction(S.type):_.interaction(S.type,S.cfg||{})}),m}e.interaction=l;function s(m){var _=m.chart,b=m.options,w=b.animation;return typeof w=="boolean"?_.animate(w):_.animate(!0),t.each(_.geometries,function(S){S.animate(w)}),m}e.animation=s;function u(m){var _=m.chart,b=m.options,w=b.theme;return w&&_.theme(w),m}e.theme=u;function c(m){var _=m.chart,b=m.options,w=b.state;return w&&t.each(_.geometries,function(S){S.state(w)}),m}e.state=c;function f(m){var _=m.chart,b=m.options,w=b.slider;return _.option("slider",w),m}e.slider=f;function h(m){var _=m.chart,b=m.options,w=b.scrollbar;return _.option("scrollbar",w),m}e.scrollbar=h;function v(m,_){return function(b){var w=b.chart,S=b.options,M={};return t.each(m,function(O,F){M[F]=n.pick(O,i.AXIS_META_CONFIG_KEYS)}),M=n.deepAssign({},_,S.meta,M),w.scale(M),b}}e.scale=v;function d(m){return function(_){var b=_.chart,w=_.options,S=b.getController("annotation");return t.each(r.__spreadArrays(w.annotations||[],m||[]),function(M){S.annotation(M)}),_}}e.annotation=d;function p(m){var _=m.chart,b=m.options,w=b.yAxis,S=b.limitInPlot,M=S;return t.isObject(w)&&t.isNil(S)&&(Object.values(n.pick(w,["min","max","minLimit","maxLimit"])).some(function(O){return!t.isNil(O)})?M=!0:M=!1),_.limitInPlot=M,m}e.limitInPlot=p;var x=Ds;Object.defineProperty(e,"pattern",{enumerable:!0,get:function(){return x.pattern}})})(Qe);var Pr={},L_={},Li={};Object.defineProperty(Li,"__esModule",{value:!0});Li.getTooltipMapping=void 0;var KB=Y;function kSt(e,r){if(e===!1)return{fields:!1};var t=KB.get(e,"fields"),i=KB.get(e,"formatter");return i&&!t&&(t=r),{fields:t,formatter:i}}Li.getTooltipMapping=kSt;var xr={};Object.defineProperty(xr,"__esModule",{value:!0});xr.geometry=xr.getMappingFunction=xr.getMappingField=void 0;var Ou=j,qa=Y,RSt=mt;function Jv(e,r){var t=e.type,i=e.xField,n=e.yField,a=e.colorField,o=e.shapeField,l=e.sizeField,s=e.styleField,u=e.rawFields,c=u===void 0?[]:u,f=[];if(r==="color")f=Ou.__spreadArrays([a||i],c);else if(r==="shape")f=Ou.__spreadArrays([o||i],c);else if(r==="size")f=Ou.__spreadArrays([l||i],c);else{f=Ou.__spreadArrays([i,n,a,o,l,s],c);var h=["x","y","color","shape","size","style"].indexOf(r),v=f[h];f.splice(h,1),f.unshift(v)}var d=qa.uniq(f.filter(function(x){return!!x})),p=t==="line"&&[i,n].includes(d.join("*"))?"":d.join("*");return{mappingFields:d,tileMappingField:p}}xr.getMappingField=Jv;function ef(e,r){if(!!r)return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n={};return e.forEach(function(a,o){n[a]=t[o]}),delete n.undefined,r(n)}}xr.getMappingFunction=ef;function BSt(e){var r=e.chart,t=e.options,i=t.type,n=t.args,a=t.mapping,o=t.xField,l=t.yField,s=t.colorField,u=t.shapeField,c=t.sizeField,f=t.tooltipFields,h=t.label,v=t.state,d=t.customInfo;if(!a)return e;var p=a.color,x=a.shape,m=a.size,_=a.style,b=a.tooltip,w=r[i](n).position(o+"*"+l);if(qa.isString(p))s?w.color(s,p):w.color(p);else if(qa.isFunction(p)){var S=Jv(t,"color"),M=S.mappingFields,O=S.tileMappingField;w.color(O,ef(M,p))}else s&&w.color(s,p);if(qa.isString(x))u?w.shape(u,[x]):w.shape(x);else if(qa.isFunction(x)){var F=Jv(t,"shape"),M=F.mappingFields,O=F.tileMappingField;w.shape(O,ef(M,x))}else u&&w.shape(u,x);if(qa.isNumber(m))c?w.size(c,m):w.size(m);else if(qa.isFunction(m)){var L=Jv(t,"size"),M=L.mappingFields,O=L.tileMappingField;w.size(O,ef(M,m))}else c&&w.size(c,m);if(qa.isFunction(_)){var D=Jv(t,"style"),M=D.mappingFields,O=D.tileMappingField;w.style(O,ef(M,_))}else qa.isObject(_)&&w.style(_);if(f===!1?w.tooltip(!1):qa.isEmpty(f)||w.tooltip(f.join("*"),ef(f,b)),h===!1)w.label(!1);else if(h){var R=h.callback,H=h.fields,k=Ou.__rest(h,["callback","fields"]);w.label({fields:H||[l],callback:R,cfg:RSt.transformLabel(k)})}return v&&w.state(v),d&&w.customInfo(d),[o,l].filter(function(V){return V!==s}).forEach(function(V){r.legend(V,!1)}),Ou.__assign(Ou.__assign({},e),{ext:{geometry:w}})}xr.geometry=BSt;Object.defineProperty(L_,"__esModule",{value:!0});L_.area=void 0;var NSt=j,GSt=Li,zSt=mt,VSt=xr;function jSt(e){var r=e.options,t=r.area,i=r.xField,n=r.yField,a=r.seriesField,o=r.smooth,l=r.tooltip,s=GSt.getTooltipMapping(l,[i,n,a]),u=s.fields,c=s.formatter;return t?VSt.geometry(zSt.deepAssign({},e,{options:{type:"area",colorField:a,tooltipFields:u,mapping:NSt.__assign({shape:o?"smooth":"area",tooltip:c},t)}})):e}L_.area=jSt;var D_={};Object.defineProperty(D_,"__esModule",{value:!0});D_.line=void 0;var HSt=Y,YSt=Li,WSt=mt,XSt=xr;function USt(e){var r=e.options,t=r.line,i=r.stepType,n=r.xField,a=r.yField,o=r.seriesField,l=r.smooth,s=r.connectNulls,u=r.tooltip,c=YSt.getTooltipMapping(u,[n,a,o]),f=c.fields,h=c.formatter;return t?XSt.geometry(WSt.deepAssign({},e,{options:{type:"line",colorField:o,tooltipFields:f,mapping:HSt.deepMix({shape:i||(l?"smooth":"line"),tooltip:h},t),args:{connectNulls:s}}})):e}D_.line=USt;var $_={};Object.defineProperty($_,"__esModule",{value:!0});$_.point=void 0;var qSt=j,ZSt=Li,QSt=mt,KSt=xr;function JSt(e){var r=e.options,t=r.point,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,l=r.shapeField,s=r.tooltip,u=ZSt.getTooltipMapping(s,[i,n,a,o,l]),c=u.fields,f=u.formatter;return t?KSt.geometry(QSt.deepAssign({},e,{options:{type:"point",colorField:a,shapeField:l,tooltipFields:c,mapping:qSt.__assign({tooltip:f},t)}})):e}$_.point=JSt;var k_={};Object.defineProperty(k_,"__esModule",{value:!0});k_.interval=void 0;var MS=j,tAt=me,JB=Y,ZW=mt,eAt=Li,rAt=xr;function iAt(e){var r=e.chart,t=e.options,i=e.ext,n=t.seriesField,a=t.isGroup,o=t.isStack,l=t.marginRatio,s=t.widthRatio,u=t.groupField,c=t.theme,f=[];if(n&&(a&&f.push({type:"dodge",dodgeBy:u||n,marginRatio:l}),o&&f.push({type:"stack",marginRatio:l})),f.length&&(i==null?void 0:i.geometry)){var h=i==null?void 0:i.geometry;h.adjust(f)}return JB.isNil(s)||r.theme(ZW.deepAssign({},JB.isObject(c)?c:tAt.getTheme(c),{columnWidthRatio:s})),e}function nAt(e){var r=e.options,t=r.xField,i=r.yField,n=r.interval,a=r.seriesField,o=r.tooltip,l=r.minColumnWidth,s=r.maxColumnWidth,u=r.columnBackground,c=r.dodgePadding,f=r.intervalPadding,h=eAt.getTooltipMapping(o,[t,i,a]),v=h.fields,d=h.formatter,p=(n?rAt.geometry(ZW.deepAssign({},e,{options:{type:"interval",colorField:a,tooltipFields:v,mapping:MS.__assign({tooltip:d},n),args:{dodgePadding:c,intervalPadding:f,minColumnWidth:l,maxColumnWidth:s,background:u}}})):e).ext;return iAt(MS.__assign(MS.__assign({},e),{ext:p}))}k_.interval=nAt;var mg={};Object.defineProperty(mg,"__esModule",{value:!0});mg.polygon=void 0;var aAt=j,oAt=Li,lAt=mt,sAt=xr;function uAt(e){var r=e.options,t=r.polygon,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,l=oAt.getTooltipMapping(o,[i,n,a]),s=l.fields,u=l.formatter;return t?sAt.geometry(lAt.deepAssign({},e,{options:{type:"polygon",colorField:a,tooltipFields:s,mapping:aAt.__assign({tooltip:u},t)}})):e}mg.polygon=uAt;var R_={};Object.defineProperty(R_,"__esModule",{value:!0});R_.edge=void 0;var cAt=j,fAt=Li,hAt=mt,vAt=xr;function dAt(e){var r=e.options,t=r.edge,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,l=fAt.getTooltipMapping(o,[i,n,a]),s=l.fields,u=l.formatter;return t?vAt.geometry(hAt.deepAssign({},e,{options:{type:"edge",colorField:a,tooltipFields:s,mapping:cAt.__assign({tooltip:u},t)}})):e}R_.edge=dAt;var B_={};Object.defineProperty(B_,"__esModule",{value:!0});B_.schema=void 0;var pAt=j,gAt=Li,yAt=mt,mAt=xr;function xAt(e){var r=e.options,t=r.schema,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,l=gAt.getTooltipMapping(o,[i,n,a]),s=l.fields,u=l.formatter;return t?mAt.geometry(yAt.deepAssign({},e,{options:{type:"schema",colorField:a,tooltipFields:s,mapping:pAt.__assign({tooltip:u},t)}})):e}B_.schema=xAt;var N_={};Object.defineProperty(N_,"__esModule",{value:!0});N_.violin=void 0;var _At=j,bAt=Li,wAt=mt,CAt=xr;function SAt(e){var r=e.options,t=r.violin,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,l=r.tooltip,s=bAt.getTooltipMapping(l,[i,n,a,o]),u=s.fields,c=s.formatter;return t?CAt.geometry(wAt.deepAssign({},e,{options:{type:"violin",colorField:a,tooltipFields:u,mapping:_At.__assign({tooltip:c},t)}})):e}N_.violin=SAt;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=L_;Object.defineProperty(e,"area",{enumerable:!0,get:function(){return r.area}});var t=D_;Object.defineProperty(e,"line",{enumerable:!0,get:function(){return t.line}});var i=$_;Object.defineProperty(e,"point",{enumerable:!0,get:function(){return i.point}});var n=k_;Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return n.interval}});var a=mg;Object.defineProperty(e,"polygon",{enumerable:!0,get:function(){return a.polygon}});var o=R_;Object.defineProperty(e,"edge",{enumerable:!0,get:function(){return o.edge}});var l=B_;Object.defineProperty(e,"schema",{enumerable:!0,get:function(){return l.schema}});var s=N_;Object.defineProperty(e,"violin",{enumerable:!0,get:function(){return s.violin}})})(Pr);var rP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=["#FAAD14","#E8EDF3"],e.DEFAULT_OPTIONS={percent:.2,color:e.DEFAULT_COLOR,animation:{}}})(rP);var Rh={};Object.defineProperty(Rh,"__esModule",{value:!0});Rh.getProgressData=void 0;var AAt=Y,TAt=_s;function MAt(e){var r=AAt.clamp(TAt.isRealNumber(e)?e:0,0,1);return[{type:"current",percent:r},{type:"target",percent:1-r}]}Rh.getProgressData=MAt;Object.defineProperty(tc,"__esModule",{value:!0});tc.adaptor=tc.geometry=void 0;var EAt=Y,QW=mt,o0=Qe,OAt=Pr,FAt=rP,PAt=Rh;function KW(e){var r=e.chart,t=e.options,i=t.percent,n=t.progressStyle,a=t.color,o=t.barWidthRatio;r.data(PAt.getProgressData(i));var l=QW.deepAssign({},e,{options:{xField:"1",yField:"percent",seriesField:"type",isStack:!0,widthRatio:o,interval:{style:n,color:EAt.isString(a)?[a,FAt.DEFAULT_COLOR[1]]:a},args:{zIndexReversed:!0}}});return OAt.interval(l),r.tooltip(!1),r.axis(!1),r.legend(!1),e}tc.geometry=KW;function IAt(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function LAt(e){return QW.flow(KW,o0.scale({}),IAt,o0.animation,o0.theme,o0.annotation())(e)}tc.adaptor=LAt;Object.defineProperty(_F,"__esModule",{value:!0});var JW=_F.Progress=void 0,DAt=j,$At=ae,kAt=tc,RAt=rP,BAt=Rh,NAt=function(e){DAt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="process",t}return r.getDefaultOptions=function(){return RAt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(BAt.getProgressData(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return kAt.adaptor},r}($At.Plot);JW=_F.Progress=NAt;var LT=globalThis&&globalThis.__assign||function(){return LT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},LT.apply(this,arguments)},GAt=Zt(JW,"ProgressChart",function(e){return LT({data:e.percent,color:"#5B8FF9"},e)}),iP={},ih={};Object.defineProperty(ih,"__esModule",{value:!0});ih.adaptor=ih.statistic=void 0;var tN=j,eN=Y,DT=mt,l0=Qe,zAt=tc;function VAt(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius;return r.coordinate("theta",{innerRadius:i,radius:n}),e}function t4(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=eN.get(l,["percent","formatter"])||function(c){return(c*100).toFixed(2)+"%"},u=a.content;u&&(u=DT.deepAssign({},u,{content:eN.isNil(u.content)?s(o):u.content})),DT.renderStatistic(t,{statistic:tN.__assign(tN.__assign({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return r&&t.render(!0),e}ih.statistic=t4;function jAt(e){return DT.flow(zAt.geometry,l0.scale({}),VAt,t4,l0.animation,l0.theme,l0.annotation())(e)}ih.adaptor=jAt;var G_={};Object.defineProperty(G_,"__esModule",{value:!0});G_.DEFAULT_OPTIONS=void 0;G_.DEFAULT_OPTIONS={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:{}};Object.defineProperty(iP,"__esModule",{value:!0});var e4=iP.RingProgress=void 0,HAt=j,Yc=me,YAt=ae,WAt=Rh,rN=ih,XAt=G_,UAt=function(e){HAt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ring-process",t}return r.getDefaultOptions=function(){return XAt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.chart.emit(Yc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,Yc.Event.fromData(this.chart,Yc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(WAt.getProgressData(t)),rN.statistic({chart:this.chart,options:this.options},!0),this.chart.emit(Yc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,Yc.Event.fromData(this.chart,Yc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return rN.adaptor},r}(YAt.Plot);e4=iP.RingProgress=UAt;var $T=globalThis&&globalThis.__assign||function(){return $T=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$T.apply(this,arguments)},qAt=Zt(e4,"RingProgressChart",function(e){return $T({data:e.percent,color:"#5B8FF9"},e)}),nP={},hl={};Object.defineProperty(hl,"__esModule",{value:!0});hl.getTinyData=void 0;var ZAt=Y;function QAt(e){return ZAt.map(e||[],function(r,t){return{x:""+t,y:r}})}hl.getTinyData=QAt;var r4={},Bh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.DEFAULT_TOOLTIP_OPTIONS=e.Y_FIELD=e.X_FIELD=void 0;var r=j,t=Y;e.X_FIELD="x",e.Y_FIELD="y",e.DEFAULT_TOOLTIP_OPTIONS={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(i,n){return""+t.get(n,[0,"data","y"],0)},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",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:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",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;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kT.apply(this,arguments)},pTt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},gTt=Zt(l4,"TinyAreaChart",function(e){var r=He(e),t=r.xField,i=r.yField,n=r.data,a=pTt(r,["xField","yField","data"]);return t&&i&&n&&(a.data=n.map(function(o){return o[i]})),kT({},a)}),oP={},s4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.meta=void 0;var r=mt,t=Qe,i=Pr,n=Cs;Object.defineProperty(e,"meta",{enumerable:!0,get:function(){return n.meta}});var a=hl,o=Bh;function l(u){var c=u.chart,f=u.options,h=f.data,v=f.color,d=f.lineStyle,p=f.point,x=p==null?void 0:p.state,m=a.getTinyData(h);c.data(m);var _=r.deepAssign({},u,{options:{xField:o.X_FIELD,yField:o.Y_FIELD,line:{color:v,style:d},point:p}}),b=r.deepAssign({},_,{options:{tooltip:!1,state:x}});return i.line(_),i.point(b),c.axis(!1),c.legend(!1),u}function s(u){return r.flow(l,n.meta,t.theme,t.tooltip,t.animation,t.annotation())(u)}e.adaptor=s})(s4);Object.defineProperty(oP,"__esModule",{value:!0});var u4=oP.TinyLine=void 0,yTt=j,mTt=ae,aN=s4,xTt=Bh,_Tt=hl,bTt=function(e){yTt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return r.getDefaultOptions=function(){return xTt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;aN.meta({chart:n,options:a}),n.changeData(_Tt.getTinyData(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return aN.adaptor},r}(mTt.Plot);u4=oP.TinyLine=bTt;var Cx=globalThis&&globalThis.__assign||function(){return Cx=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cx.apply(this,arguments)},wTt=function(e){var r=He(e);if(!K(r.yField)){var t=r.data.map(function(a){return a[r.yField]}).filter(function(a){return!K(a)});t&&t.length&&ve(r,"data",t)}var i=kt(r,"size");if(!K(i)){var n=kt(r,"lineStyle",{});ve(r,"lineStyle",Cx(Cx({},n),{lineWidth:i}))}return ve(r,"tooltip",!1),r},CTt=Zt(u4,"TinyLineChart",wTt),STt=Object.freeze(Object.defineProperty({__proto__:null,ProgressChart:GAt,RingProgressChart:qAt,TinyColumnChart:lTt,TinyAreaChart:gTt,TinyLineChart:CTt},Symbol.toStringTag,{value:"Module"})),lP={},dn={};Object.defineProperty(dn,"__esModule",{value:!0});dn.adaptor=dn.adjust=dn.legend=dn.axis=dn.meta=void 0;var Sx=j,c4=Y,$l=Qe,Md=mt,OS=Pr,f4=mt,ATt=fo;function TTt(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.lineStyle,o=t.lineShape,l=t.point,s=t.area,u=t.seriesField,c=l==null?void 0:l.state;r.data(i);var f=Md.deepAssign({},e,{options:{shapeField:u,line:{color:n,style:a,shape:o},point:l&&Sx.__assign({color:n,shape:"circle"},l),area:s&&Sx.__assign({color:n},s),label:void 0}}),h=Md.deepAssign({},f,{options:{tooltip:!1,state:c}}),v=Md.deepAssign({},f,{options:{tooltip:!1,state:c}});return OS.line(f),OS.point(h),OS.area(v),e}function h4(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,l=i.yField,s=i.data;return f4.flow($l.scale((r={},r[o]=n,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=ATt.adjustYMetaByZero(s,l),t)))(e)}dn.meta=h4;function MTt(e){var r=e.chart,t=e.options,i=t.reflect;if(i){var n=i;c4.isArray(n)||(n=[n]);var a=n.map(function(o){return["reflect",o]});r.coordinate({type:"rect",actions:a})}return e}function v4(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}dn.axis=v4;function d4(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}dn.legend=d4;function ETt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Md.findGeometry(r,"line");if(!i)a.label(!1);else{var o=i.callback,l=Sx.__rest(i,["callback"]);a.label({fields:[n],callback:o,cfg:Sx.__assign({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},Md.transformLabel(l))})}return e}function p4(e){var r=e.chart,t=e.options,i=t.isStack;return i&&c4.each(r.geometries,function(n){n.adjust("stack")}),e}dn.adjust=p4;function OTt(e){return f4.flow(TTt,h4,p4,$l.theme,MTt,v4,d4,$l.tooltip,ETt,$l.slider,$l.interaction,$l.animation,$l.annotation(),$l.limitInPlot)(e)}dn.adaptor=OTt;var V_={};Object.defineProperty(V_,"__esModule",{value:!0});V_.DEFAULT_OPTIONS=void 0;var FTt=ae,PTt=mt;V_.DEFAULT_OPTIONS=PTt.deepAssign({},FTt.Plot.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left"},isStack:!1});var j_={};Object.defineProperty(j_,"__esModule",{value:!0});j_.MarkerActiveAction=void 0;var ITt=j,Iv=Y,LTt=me,DTt=function(e){ITt.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.active=function(){var t=this.getView(),i=this.context.event;if(i.data){var n=i.data.items,a=t.geometries.filter(function(o){return o.type==="point"});Iv.each(a,function(o){Iv.each(o.elements,function(l){var s=Iv.findIndex(n,function(u){return u.data===l.data})!==-1;l.setState("active",s)})})}},r.prototype.reset=function(){var t=this.getView(),i=t.geometries.filter(function(n){return n.type==="point"});Iv.each(i,function(n){Iv.each(n.elements,function(a){a.setState("active",!1)})})},r.prototype.getView=function(){return this.context.view},r}(LTt.InteractionAction);j_.MarkerActiveAction=DTt;var g4=me,$Tt=j_;g4.registerAction("marker-active",$Tt.MarkerActiveAction);g4.registerInteraction("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});Object.defineProperty(lP,"__esModule",{value:!0});var sP=lP.Line=void 0,kTt=j,RTt=ae,oN=dn,BTt=V_,NTt=function(e){kTt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t}return r.getDefaultOptions=function(){return BTt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;oN.meta({chart:n,options:a}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return oN.adaptor},r}(RTt.Plot);sP=lP.Line=NTt;var y4=function(e){var r=He(e);return Er(r,"point"),r.point===!0&&(r.point={}),r},GTt=Zt(sP,"LineChart",y4),uP={},nh={},pn={},cP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DrillDownAction=e.HIERARCHY_DATA_TRANSFORM_PARAMS=e.DEFAULT_BREAD_CRUMB_CONFIG=e.BREAD_CRUMB_NAME=e.PADDING_TOP=void 0;var r=j,t=me,i=Y,n=cg,a=4,o=0;e.PADDING_TOP=5,e.BREAD_CRUMB_NAME="drilldown-bread-crumb",e.DEFAULT_BREAD_CRUMB_CONFIG={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},e.HIERARCHY_DATA_TRANSFORM_PARAMS="hierarchy-data-transform-params";var l=function(s){r.__extends(u,s);function u(){var c=s!==null&&s.apply(this,arguments)||this;return c.name="drill-down",c.historyCache=[],c.breadCrumbGroup=null,c.breadCrumbCfg=e.DEFAULT_BREAD_CRUMB_CONFIG,c}return u.prototype.click=function(){var c=i.get(this.context,["event","data","data"]);if(!c)return!1;this.drill(c),this.drawBreadCrumb()},u.prototype.resetPosition=function(){if(!!this.breadCrumbGroup){var c=this.context.view.getCoordinate(),f=this.breadCrumbGroup,h=f.getBBox(),v=this.getButtonCfg().position,d={x:c.start.x,y:c.end.y-(h.height+e.PADDING_TOP*2)};c.isPolar&&(d={x:0,y:0}),v==="bottom-left"&&(d={x:c.start.x,y:c.start.y});var p=t.Util.transform(null,[["t",d.x+o,d.y+h.height+e.PADDING_TOP]]);f.setMatrix(p)}},u.prototype.back=function(){i.size(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},u.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},u.prototype.drill=function(c){var f=this.context.view,h=i.get(f,["interactions","drill-down","cfg","transformData"],function(m){return m}),v=h(r.__assign({data:c.data},c[e.HIERARCHY_DATA_TRANSFORM_PARAMS]));f.changeData(v);for(var d=[],p=c;p;){var x=p.data;d.unshift({id:x.name+"_"+p.height+"_"+p.depth,name:x.name,children:h(r.__assign({data:x},c[e.HIERARCHY_DATA_TRANSFORM_PARAMS]))}),p=p.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(d)},u.prototype.backTo=function(c){if(!(!c||c.length<=0)){var f=this.context.view,h=i.last(c).children;f.changeData(h),c.length>1?(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<h.length-1){var _=c.breadCrumbGroup.addShape({type:"text",name:f.name+"_"+d.name+"_divider",attrs:r.__assign(r.__assign({text:f.dividerText},f.textStyle),{x:v,y:0})}),b=_.getBBox();v+=b.width+a}})},u.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},u.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),s.prototype.destroy.call(this)},u}(t.Action);e.DrillDownAction=l})(cP);var ah={};function zTt(e,r){return e.parent===r.parent?1:2}function VTt(e){return e.reduce(jTt,0)/e.length}function jTt(e,r){return e+r.x}function HTt(e){return 1+e.reduce(YTt,0)}function YTt(e,r){return Math.max(e,r.y)}function WTt(e){for(var r;r=e.children;)e=r[0];return e}function XTt(e){for(var r;r=e.children;)e=r[r.length-1];return e}function UTt(){var e=zTt,r=1,t=1,i=!1;function n(a){var o,l=0;a.eachAfter(function(h){var v=h.children;v?(h.x=VTt(v),h.y=HTt(v)):(h.x=o?l+=e(h,o):0,h.y=0,o=h)});var s=WTt(a),u=XTt(a),c=s.x-e(s,u)/2,f=u.x+e(u,s)/2;return a.eachAfter(i?function(h){h.x=(h.x-a.x)*r,h.y=(a.y-h.y)*t}:function(h){h.x=(h.x-c)/(f-c)*r,h.y=(1-(a.y?h.y/a.y:1))*t})}return n.separation=function(a){return arguments.length?(e=a,n):e},n.size=function(a){return arguments.length?(i=!1,r=+a[0],t=+a[1],n):i?null:[r,t]},n.nodeSize=function(a){return arguments.length?(i=!0,r=+a[0],t=+a[1],n):i?[r,t]:null},n}function qTt(e){var r=0,t=e.children,i=t&&t.length;if(!i)r=1;else for(;--i>=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<l;++o)i.push(a[o]);for(;t=n.pop();)e.call(r,t,++s,this);return this}function tMt(e,r){let t=-1;for(const i of this)if(e.call(r,i,++t,this))return i}function eMt(e){return this.eachAfter(function(r){for(var t=+e(r.data)||0,i=r.children,n=i&&i.length;--n>=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<a;++n)t.push(i[n]);while(t.length)}function Nh(e,r){e instanceof Map?(e=[void 0,e],r===void 0&&(r=hMt)):r===void 0&&(r=fMt);for(var t=new oh(e),i,n=[t],a,o,l,s;i=n.pop();)if((o=r(i.data))&&(s=(o=Array.from(o)).length))for(i.children=o,l=s-1;l>=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;r<t;)n=e[r],a&&_4(a,n)?++r:(a=yMt(i=gMt(i,n)),r=0);return a}function gMt(e,r){var t,i;if(FS(r,e))return[r];for(t=0;t<e.length;++t)if(s0(r,e[t])&&FS(td(e[t],r),e))return[e[t],r];for(t=0;t<e.length-1;++t)for(i=t+1;i<e.length;++i)if(s0(td(e[t],e[i]),r)&&s0(td(e[t],r),e[i])&&s0(td(e[i],r),e[t])&&FS(b4(e[t],e[i],r),e))return[e[t],e[i],r];throw new Error}function s0(e,r){var t=e.r-r.r,i=r.x-e.x,n=r.y-e.y;return t<0||t*t<i*i+n*n}function _4(e,r){var t=e.r-r.r+Math.max(e.r,r.r,1)*1e-9,i=r.x-e.x,n=r.y-e.y;return t>0&&t*t>i*i+n*n}function FS(e,r){for(var t=0;t<r.length;++t)if(!_4(e,r[t]))return!1;return!0}function yMt(e){switch(e.length){case 1:return mMt(e[0]);case 2:return td(e[0],e[1]);case 3:return b4(e[0],e[1],e[2])}}function mMt(e){return{x:e.x,y:e.y,r:e.r}}function td(e,r){var t=e.x,i=e.y,n=e.r,a=r.x,o=r.y,l=r.r,s=a-t,u=o-i,c=l-n,f=Math.sqrt(s*s+u*u);return{x:(t+a+s/f*c)/2,y:(i+o+u/f*c)/2,r:(f+n+l)/2}}function b4(e,r,t){var i=e.x,n=e.y,a=e.r,o=r.x,l=r.y,s=r.r,u=t.x,c=t.y,f=t.r,h=i-o,v=i-u,d=n-l,p=n-c,x=s-a,m=f-a,_=i*i+n*n-a*a,b=_-o*o-l*l+s*s,w=_-u*u-c*c+f*f,S=v*d-h*p,M=(d*w-p*b)/(S*2)-i,O=(p*x-d*m)/S,F=(v*b-h*w)/(S*2)-n,L=(h*m-v*x)/S,D=O*O+L*L-1,R=2*(a+M*O+F*L),H=M*M+F*F-a*a,k=-(D?(R+Math.sqrt(R*R-4*D*H))/(2*D):H/R);return{x:i+M+O*k,y:n+F+L*k,r:k}}function lN(e,r,t){var i=e.x-r.x,n,a,o=e.y-r.y,l,s,u=i*i+o*o;u?(a=r.r+t.r,a*=a,s=e.r+t.r,s*=s,a>s?(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;l<n;++l){lN(r._,t._,i=e[l]),i=new u0(i),s=t.next,u=r.previous,c=t._.r,f=r._.r;do if(c<=f){if(sN(s._,i._)){t=s,r.next=t,t.previous=r,--l;continue t}c+=s._.r,s=s.next}else{if(sN(u._,i._)){r=u,r.next=t,t.previous=r,--l;continue t}f+=u._.r,u=u.previous}while(s!==u.next);for(i.previous=r,i.next=t,r.next=t.previous=t=i,a=uN(r);(i=i.next)!==t;)(o=uN(i))<a&&(r=i,a=o);t=r.next}for(r=[t._],i=t;(i=i.next)!==t;)r.push(i._);for(i=x4(r),l=0;l<n;++l)r=e[l],r.x-=i.x,r.y-=i.y;return i.r}function xMt(e){return w4(e),e}function _Mt(e){return e==null?null:Ax(e)}function Ax(e){if(typeof e!="function")throw new Error;return e}function wu(){return 0}function nf(e){return function(){return e}}function bMt(e){return Math.sqrt(e.value)}function C4(){var e=null,r=1,t=1,i=wu;function n(a){return a.x=r/2,a.y=t/2,e?a.eachBefore(cN(e)).eachAfter(PS(i,.5)).eachBefore(fN(1)):a.eachBefore(cN(bMt)).eachAfter(PS(wu,1)).eachAfter(PS(i,a.r/Math.min(r,t))).eachBefore(fN(Math.min(r,t)/(2*a.r))),a}return n.radius=function(a){return arguments.length?(e=_Mt(a),n):e},n.size=function(a){return arguments.length?(r=+a[0],t=+a[1],n):[r,t]},n.padding=function(a){return arguments.length?(i=typeof a=="function"?a:nf(+a),n):i},n}function cN(e){return function(r){r.children||(r.r=Math.max(0,+e(r)||0))}}function PS(e,r){return function(t){if(i=t.children){var i,n,a=i.length,o=e(t)*r||0,l;if(o)for(n=0;n<a;++n)i[n].r+=o;if(l=w4(i),o)for(n=0;n<a;++n)i[n].r-=o;t.r=l+o}}}function fN(e){return function(r){var t=r.parent;r.r*=e,t&&(r.x=t.x+e*r.x,r.y=t.y+e*r.y)}}function S4(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function xg(e,r,t,i,n){for(var a=e.children,o,l=-1,s=a.length,u=e.value&&(i-r)/e.value;++l<s;)o=a[l],o.y0=t,o.y1=n,o.x0=r,o.x1=r+=o.value*u}function A4(){var e=1,r=1,t=0,i=!1;function n(o){var l=o.height+1;return o.x0=o.y0=t,o.x1=e,o.y1=r/l,o.eachBefore(a(r,l)),i&&o.eachBefore(S4),o}function a(o,l){return function(s){s.children&&xg(s,s.x0,o*(s.depth+1)/l,s.x1,o*(s.depth+2)/l);var u=s.x0,c=s.y0,f=s.x1-t,h=s.y1-t;f<u&&(u=f=(u+f)/2),h<c&&(c=h=(c+h)/2),s.x0=u,s.y0=c,s.x1=f,s.y1=h}}return n.round=function(o){return arguments.length?(i=!!o,n):i},n.size=function(o){return arguments.length?(e=+o[0],r=+o[1],n):[e,r]},n.padding=function(o){return arguments.length?(t=+o,n):t},n}var wMt={depth:-1},hN={};function CMt(e){return e.id}function SMt(e){return e.parentId}function AMt(){var e=CMt,r=SMt;function t(i){var n=Array.from(i),a=n.length,o,l,s,u,c,f,h,v=new Map;for(l=0;l<a;++l)o=n[l],c=n[l]=new oh(o),(f=e(o,l,i))!=null&&(f+="")&&(h=c.id=f,v.set(h,v.has(h)?hN:c)),(f=r(o,l,i))!=null&&(f+="")&&(c.parent=f);for(l=0;l<a;++l)if(c=n[l],f=c.parent){if(u=v.get(f),!u)throw new Error("missing: "+f);if(u===hN)throw new Error("ambiguous: "+f);u.children?u.children.push(c):u.children=[c],c.parent=u}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(s.parent=wMt,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore(m4),s.parent=null,a>0)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(_){_.x<f.x&&(f=_),_.x>h.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<s;)o=a[l],o.x0=r,o.x1=i,o.y0=t,o.y1=t+=o.value*u}var T4=(1+Math.sqrt(5))/2;function M4(e,r,t,i,n,a){for(var o=[],l=r.children,s,u,c=0,f=0,h=l.length,v,d,p=r.value,x,m,_,b,w,S,M;c<h;){v=n-t,d=a-i;do x=l[f++].value;while(!x&&f<h);for(m=_=x,S=Math.max(d/v,v/d)/(p*e),M=x*x*S,w=Math.max(_/M,M/m);f<h;++f){if(x+=u=l[f].value,u<m&&(m=u),u>_&&(_=u),M=x*x*S,b=Math.max(_/M,M/m),b>w){x-=u;break}w=b}o.push(s={value:x,dice:v<d,children:l.slice(c,f)}),s.dice?xg(s,t,i,n,p?i+=d*x/p:a):H_(s,t,i,p?t+=v*x/p:n,a),p-=x,c=f}return o}var E4=function e(r){function t(i,n,a,o,l){M4(r,i,n,a,o,l)}return t.ratio=function(i){return e((i=+i)>1?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<d&&(d=x=(d+x)/2),m<p&&(p=m=(p+m)/2),h.x0=d,h.y0=p,h.x1=x,h.y1=m,h.children&&(v=n[h.depth+1]=a(h)/2,d+=u(h)-v,p+=o(h)-v,x-=l(h)-v,m-=s(h)-v,x<d&&(d=x=(d+x)/2),m<p&&(p=m=(p+m)/2),e(h,d,p,x,m))}return c.round=function(h){return arguments.length?(r=!!h,c):r},c.size=function(h){return arguments.length?(t=+h[0],i=+h[1],c):[t,i]},c.tile=function(h){return arguments.length?(e=Ax(h),c):e},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(a=typeof h=="function"?h:nf(+h),c):a},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(o=typeof h=="function"?h:nf(+h),c):o},c.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:nf(+h),c):l},c.paddingBottom=function(h){return arguments.length?(s=typeof h=="function"?h:nf(+h),c):s},c.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:nf(+h),c):u},c}function IMt(e,r,t,i,n){var a=e.children,o,l=a.length,s,u=new Array(l+1);for(u[0]=s=o=0;o<l;++o)u[o+1]=s+=a[o].value;c(0,l,e.value,r,t,i,n);function c(f,h,v,d,p,x,m){if(f>=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<M;){var O=S+M>>>1;u[O]<w?S=O+1:M=O}w-u[S-1]<u[S]-w&&f+1<S&&--S;var F=u[S]-b,L=v-F;if(x-d>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;++h<d;){for(u=s[h],c=u.children,f=u.value=0,v=c.length;f<v;++f)u.value+=c[f].value;u.dice?xg(u,n,a,o,p?a+=(l-a)*u.value/p:l):H_(u,n,a,p?n+=(o-n)*u.value/p:o,l),p-=u.value}else i._squarify=s=M4(r,i,n,a,o,l),s.ratio=r}return t.ratio=function(i){return e((i=+i)>1?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&&d<u.depth});u[e.NODE_ANCESTORS_FIELD]=h,u[e.CHILD_NODE_COUNT]=((f=u.children)===null||f===void 0?void 0:f.length)||0,u[e.NODE_INDEX_FIELD]=s,o.push(u)})}else a&&a.eachNode&&a.eachNode(function(u){o.push(u)});return o}e.getAllNodes=n})(F4);Object.defineProperty(ah,"__esModule",{value:!0});ah.treemap=ah.getTileMethod=void 0;var kMt=j,Tx=kMt.__importStar($Mt),vN=Y,dN=F4,RMt={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(e,r){return r.value-e.value},ratio:.5*(1+Math.sqrt(5))};function P4(e,r){return e==="treemapSquarify"?Tx[e].ratio(r):Tx[e]}ah.getTileMethod=P4;function BMt(e,r){r=vN.assign({},RMt,r);var t=r.as;if(!vN.isArray(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=dN.getField(r)}catch(u){console.warn(u)}var n=P4(r.tile,r.ratio),a=function(u){return Tx.treemap().tile(n).size(r.size).round(r.round).padding(r.padding).paddingInner(r.paddingInner).paddingOuter(r.paddingOuter).paddingTop(r.paddingTop).paddingRight(r.paddingRight).paddingBottom(r.paddingBottom).paddingLeft(r.paddingLeft)(Tx.hierarchy(u).sum(function(c){return r.ignoreParentValue&&c.children?0:c[i]}).sort(r.sort))},o=a(e),l=t[0],s=t[1];return o.each(function(u){u[l]=[u.x0,u.x1,u.x1,u.x0],u[s]=[u.y1,u.y1,u.y0,u.y0],["x0","x1","y0","y1"].forEach(function(c){t.indexOf(c)===-1&&delete u[c]})}),dN.getAllNodes(o)}ah.treemap=BMt;Object.defineProperty(pn,"__esModule",{value:!0});pn.transformData=pn.resetDrillDown=pn.enableDrillInteraction=pn.enableInteraction=pn.findInteraction=void 0;var DS=j,fP=Y,NMt=cP,GMt=ah;function I4(e,r){if(!!fP.isArray(e))return e.find(function(t){return t.type===r})}pn.findInteraction=I4;function L4(e,r){var t=I4(e,r);return t&&t.enable!==!1}pn.enableInteraction=L4;function zMt(e){var r=e.interactions,t=e.drilldown;return fP.get(t,"enabled")||L4(r,"treemap-drill-down")}pn.enableDrillInteraction=zMt;function VMt(e){var r=e.interactions["drill-down"];if(!!r){var t=r.context.actions.find(function(i){return i.name==="drill-down-action"});t.reset()}}pn.resetDrillDown=VMt;function jMt(e){var r=e.data,t=e.colorField,i=e.enableDrillDown,n=e.hierarchyConfig,a=GMt.treemap(r,DS.__assign(DS.__assign({},n),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),o=[];return a.forEach(function(l){if(l.depth===0||i&&l.depth!==1||!i&&l.children)return null;var s=l.ancestors().map(function(h){return{data:h.data,height:h.height,value:h.value}}),u=i&&fP.isArray(r.path)?s.concat(r.path.slice(1)):s,c=Object.assign({},l.data,DS.__assign({x:l.x,y:l.y,depth:l.depth,value:l.value,path:u},l));if(!l.data[t]&&l.parent){var f=l.ancestors().find(function(h){return h.data[t]});c[t]=f==null?void 0:f.data[t]}else c[t]=l.data[t];c[NMt.HIERARCHY_DATA_TRANSFORM_PARAMS]={hierarchyConfig:n,colorField:t,enableDrillDown:i},o.push(c)}),o}pn.transformData=jMt;Object.defineProperty(nh,"__esModule",{value:!0});nh.adaptor=nh.interaction=void 0;var HMt=j,YMt=Y,WMt=mg,af=Qe,XMt=Ds,Y_=mt,UMt=ho,lh=pn;function qMt(e){var r=e.options,t=r.colorField;return Y_.deepAssign({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(i){return{name:i.name,value:i.value}}}}},e)}function ZMt(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=t.rectStyle,o=t.hierarchyConfig,l=t.rawFields,s=lh.transformData({data:t.data,colorField:t.colorField,enableDrillDown:lh.enableDrillInteraction(t),hierarchyConfig:o});return r.data(s),WMt.polygon(Y_.deepAssign({},e,{options:{xField:"x",yField:"y",seriesField:n,rawFields:l,polygon:{color:i,style:a}}})),r.coordinate().reflect("y"),e}function QMt(e){var r=e.chart;return r.axis(!1),e}function KMt(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t,n=lh.enableDrillInteraction(e);return n?Y_.deepAssign({},e,{interactions:HMt.__spreadArrays(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:lh.transformData}}])}):e}function D4(e){var r=e.chart,t=e.options,i=t.interactions,n=t.drilldown;af.interaction({chart:r,options:KMt(t)});var a=lh.findInteraction(i,"view-zoom");a&&(a.enable!==!1?r.getCanvas().on("mousewheel",function(l){l.preventDefault()}):r.getCanvas().off("mousewheel"));var o=lh.enableDrillInteraction(t);return o&&(r.appendPadding=UMt.getAdjustAppendPadding(r.appendPadding,YMt.get(n,["breadCrumb","position"]))),e}nh.interaction=D4;function JMt(e){return Y_.flow(qMt,af.theme,XMt.pattern("rectStyle"),ZMt,QMt,af.legend,af.tooltip,D4,af.animation,af.annotation())(e)}nh.adaptor=JMt;var W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.DEFAULT_OPTIONS=void 0;W_.DEFAULT_OPTIONS={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"\u521D\u59CB",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}};var tEt=me;tEt.registerInteraction("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var hP={};Object.defineProperty(hP,"__esModule",{value:!0});hP.isParentNode=void 0;var $4=me,pN=Y,eEt=cP;function BT(e){var r=pN.get(e,["event","data","data"],{});return pN.isArray(r.children)&&r.children.length>0}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 c<u}return!1}$4.registerAction("drill-down-action",eEt.DrillDownAction);$4.registerInteraction("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:BT},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:gN}],start:[{trigger:"element:click",isEnable:BT,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:gN,action:["drill-down-action:back"]}]});Object.defineProperty(uP,"__esModule",{value:!0});var k4=uP.Treemap=void 0,rEt=j,iEt=ae,nEt=nh,aEt=W_,$S=pn,oEt=function(e){rEt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="treemap",t}return r.getDefaultOptions=function(){return aEt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){var i=this.options,n=i.colorField,a=i.interactions,o=i.hierarchyConfig;this.updateOption({data:t});var l=$S.transformData({data:t,colorField:n,enableDrillDown:$S.enableInteraction(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(l),$S.resetDrillDown(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return nEt.adaptor},r}(iEt.Plot);k4=uP.Treemap=oEt;var R4=function(e,r,t){if(t===void 0&&(t=1),t>r)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)/2<m?(m=Math.max(1,(p-x)/2),_=[[h.x+m,h.y-s],[h.x+m,h.y-s-u],[v.x-m,v.y-s-u/2]]):_=[[h.x+m,h.y-s],[h.x+m,h.y-s-u],[v.x-m-x,v.y-s-u],[v.x-m,v.y-s-u/2],[v.x-m-x,v.y-s]]:(d-x)/2<m?(m=Math.max(1,(d-x)/2),_=[[h.x+s,h.y+m],[h.x+s+u,h.y+m],[v.x+s+u/2,v.y-m]]):_=[[h.x+s,h.y+m],[h.x+s+u,h.y+m],[v.x+s+u,v.y-m-x],[v.x+s+u/2,v.y-m],[v.x+s,v.y-m-x]],a.addShape("polygon",{id:i.id+"-conversion-tag-arrow-"+n.getElementId(r.getModel().mappingData),name:"conversion-tag-arrow",origin:{element:r,nextElement:t},attrs:Ox.__assign(Ox.__assign({},c.style||{}),{points:_})})}}function yEt(e,r,t){var i,n,a,o=e.view,l=e.geometry,s=e.group,u=e.options,c=e.field,f=e.horizontal,h=u.offset,v=u.size;if(typeof u.text!="boolean"){var d=o.getCoordinate(),p=((i=u.text)===null||i===void 0?void 0:i.formatter)&&((n=u.text)===null||n===void 0?void 0:n.formatter(r.getData()[c],t.getData()[c])),x=Fx(d,r)[f?3:0],m=Fx(d,t)[f?0:3],_=s.addShape("text",{id:o.id+"-conversion-tag-text-"+l.getElementId(r.getModel().mappingData),name:"conversion-tag-text",origin:{element:r,nextElement:t},attrs:Ox.__assign(Ox.__assign({},((a=u.text)===null||a===void 0?void 0:a.style)||{}),{text:p,x:f?(x.x+m.x)/2:x.x+h+v/2,y:f?x.y-h-v/2:(x.y+m.y)/2})});if(f){var b=m.x-x.x,w=_.getBBox().width;if(w>b){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);n<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},Q_=function(e){var r=He(e),t=r.barSize,i=YEt(r,["barSize"]);return $a([{sourceKey:"stackField",targetKey:"seriesField",notice:"stackField\u662F\u65E7\u7248API\uFF0C\u5373\u5C06\u5E9F\u5F03 \u8BF7\u4F7F\u7528seriesField\u66FF\u4EE3"},{sourceKey:"colorField",targetKey:"seriesField",notice:"colorField\u662F\u65E7\u7248API\uFF0C\u5373\u5C06\u5E9F\u5F03 \u8BF7\u4F7F\u7528seriesField\u66FF\u4EE3"}],i),K(t)||(i.minBarWidth=t,i.maxBarWidth=t),i},WEt=Zt(Gh,"BarChart",Q_),XEt=Zt(Gh,"StackedBarChart",function(e){return ft(e,{isStack:!0}),Q_(e)}),UEt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},qEt=[{sourceKey:"colorField",targetKey:"seriesField",notice:"colorField \u662F g2@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528seriesField\u66FF\u4EE3"}],ZEt=Zt(Gh,"GroupedBarChart",function(e){var r=He(e),t=r.barSize,i=UEt(r,["barSize"]);return $a(qEt,i),K(t)||(i.minBarWidth=t,i.maxBarWidth=t),ft(e,{isGroup:!0}),i}),QEt=Zt(Gh,"PercentStackedBarChart",function(e){return ft(e,{isPercent:!0,isStack:!0}),Q_(e)}),KEt=Zt(Gh,"RangeBarChart",function(e){return ft(e,{isRange:!0}),Q_(e)}),pP={},Y4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.meta=void 0;var r=j,t=Y,i=Qe,n=mt,a=Pr,o=mt,l=_n,s=dn;Object.defineProperty(e,"meta",{enumerable:!0,get:function(){return s.meta}});function u(v){var d=v.chart,p=v.options,x=p.data,m=p.areaStyle,_=p.color,b=p.point,w=p.line,S=p.isPercent,M=p.xField,O=p.yField,F=p.tooltip,L=p.seriesField,D=p.startOnZero,R=b==null?void 0:b.state,H=l.getDataWhetherPecentage(x,O,M,O,S);d.data(H);var k=S?r.__assign({formatter:function(G){return{name:G[L]||G[M],value:(Number(G[O])*100).toFixed(2)+"%"}}},F):F,V=o.deepAssign({},v,{options:{area:{color:_,style:m},line:w&&r.__assign({color:_},w),point:b&&r.__assign({color:_},b),tooltip:k,label:void 0,args:{startOnZero:D}}}),U=o.deepAssign({options:{line:{size:2}}},V,{options:{sizeField:L,tooltip:!1}}),B=o.deepAssign({},V,{options:{tooltip:!1,state:R}});return a.area(V),a.line(U),a.point(B),v}function c(v){var d=v.chart,p=v.options,x=p.label,m=p.yField,_=n.findGeometry(d,"area");if(!x)_.label(!1);else{var b=x.callback,w=r.__rest(x,["callback"]);_.label({fields:[m],callback:b,cfg:r.__assign({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},o.transformLabel(w))})}return v}function f(v){var d=v.chart,p=v.options,x=p.isStack,m=p.isPercent,_=p.seriesField;return(m||x)&&_&&t.each(d.geometries,function(b){b.adjust("stack")}),v}function h(v){return o.flow(i.theme,i.pattern("areaStyle"),u,s.meta,f,s.axis,s.legend,i.tooltip,c,i.slider,i.annotation(),i.interaction,i.animation,i.limitInPlot)(v)}e.adaptor=h})(Y4);var K_={};Object.defineProperty(K_,"__esModule",{value:!0});K_.DEFAULT_OPTIONS=void 0;var JEt=ae,tOt=mt;K_.DEFAULT_OPTIONS=tOt.deepAssign({},JEt.Plot.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left"}});Object.defineProperty(pP,"__esModule",{value:!0});var J_=pP.Area=void 0,eOt=j,rOt=ae,iOt=_n,bN=Y4,nOt=K_,aOt=function(e){eOt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return nOt.DEFAULT_OPTIONS},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.isPercent,a=i.xField,o=i.yField,l=this,s=l.chart,u=l.options;bN.meta({chart:s,options:u}),this.chart.changeData(iOt.getDataWhetherPecentage(t,o,a,o,n))},r.prototype.getSchemaAdaptor=function(){return bN.adaptor},r}(rOt.Plot);J_=pP.Area=aOt;var gP=function(e){var r=He(e);return Er(r,"line"),Er(r,"point"),r.isStack=K(r.isStack)?!1:r.isStack,$a([{sourceKey:"stackField",targetKey:"seriesField",notice:"stackField\u662F\u65E7\u7248api\uFF0C\u5373\u5C06\u5E9F\u5F03 \u8BF7\u4F7F\u7528seriesField\u66FF\u4EE3"}],r),r},oOt=Zt(J_,"AreaChart",gP),lOt=Zt(J_,"StackedAreaChart",function(e){return ft(e,{isStack:!0}),gP(e)}),sOt=Zt(J_,"PercentStackedAreaChart",function(e){return ft(e,{isPercent:!0}),gP(e)}),yP={},tb={};Object.defineProperty(tb,"__esModule",{value:!0});tb.DEFAULT_OPTIONS=void 0;var uOt=ae,cOt=mt;tb.DEFAULT_OPTIONS=cOt.deepAssign({},uOt.Plot.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},interactions:[{type:"active-region"}]});Object.defineProperty(yP,"__esModule",{value:!0});var zh=yP.Column=void 0,fOt=j,hOt=ae,vOt=_n,wN=Aa,dOt=tb,pOt=function(e){fOt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="column",t}return r.getDefaultOptions=function(){return dOt.DEFAULT_OPTIONS},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;wN.meta({chart:s,options:u}),this.chart.changeData(vOt.getDataWhetherPecentage(t,n,a,n,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return wN.adaptor},r}(hOt.Plot);zh=yP.Column=pOt;var gOt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},yOt=[{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:"stackField",targetKey:"seriesField",notice:"colorField\u662F\u65E7\u7248API\uFF0C\u5373\u5C06\u5E9F\u5F03 \u8BF7\u4F7F\u7528seriesField\u66FF\u4EE3"}],eb=function(e){var r=He(e),t=r.columnSize,i=gOt(r,["columnSize"]);return $a(yOt,i),K(t)||(i.minColumnWidth=t,i.maxColumnWidth=t),i},mOt=Zt(zh,"ColumnChart",eb),xOt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},_Ot=Zt(zh,"GroupedColumnChart",function(e){var r=He(e),t=r.columnSize,i=xOt(r,["columnSize"]);return K(t)||(i.minColumnWidth=t,i.maxColumnWidth=t),ft(e,{isGroup:!0}),i}),bOt=Zt(zh,"StackedColumnChart",function(e){return ft(e,{isStack:!0}),eb(e)}),wOt=Zt(zh,"RangeColumnChart",function(e){return ft(e,{isRange:!0}),eb(e)}),COt=Zt(zh,"PercentStackedColumnChart",function(e){return ft(e,{isPercent:!0,isStack:!0}),eb(e)}),mP={},oo={},Cg={};Object.defineProperty(Cg,"__esModule",{value:!0});Cg.DEFAULT_OPTIONS=void 0;var SOt=ae,AOt=mt;Cg.DEFAULT_OPTIONS=AOt.deepAssign({},SOt.Plot.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}}}}});var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.isAllZero=Jo.adaptOffset=Jo.getTotalValue=void 0;var Px=Y,TOt=mt;function MOt(e,r){var t=null;return Px.each(e,function(i){typeof i[r]=="number"&&(t+=i[r])}),t}Jo.getTotalValue=MOt;function EOt(e,r){var t;switch(e){case"inner":return t="-30%",Px.isString(r)&&r.endsWith("%")?parseFloat(r)*.01>0?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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},AFt=Zt(sb,"HeatmapChart",function(e){var r=He(e),t=r.shapeType,i=SFt(r,["shapeType"]);return t&&(i.heatmapStyle=t,Df.warn(!1,"shapeType\u662Fg2plot@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 `heatmapStyle` \u66FF\u4EE3")),!i.shape&&i.sizeField&&(i.shape="square"),i}),CP={},sh={},yn={},ns={};Object.defineProperty(ns,"__esModule",{value:!0});ns.functor=ns.transform=ns.wordCloud=void 0;var SP=Y,TFt={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function MFt(e,r){return r=SP.assign({},TFt,r),Z4(e,r)}ns.wordCloud=MFt;function Z4(e,r){var t=GFt();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(s){SP.isNil(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}ns.transform=Z4;var zS=Math.PI/180,rd=1<<11>>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<u;){r=t[i],n.save(),n.font=r.style+" "+r.weight+" "+~~((r.size+1)/a)+"px "+r.font;var c=n.measureText(r.text+"m").width*a,f=r.size<<1;if(r.rotate){var h=Math.sin(r.rotate*zS),v=Math.cos(r.rotate*zS),d=c*v,p=c*h,x=f*v,m=f*h;c=Math.max(Math.abs(d+m),Math.abs(d-m))+31>>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<f*w;S++)b[S]=0;if(o=r.xoff,o==null)return;l=r.yoff;for(var M=0,O=-1,F=0;F<f;F++){for(var S=0;S<c;S++){var L=w*F+(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<s;f++){c=0;for(var h=0;h<=n;h++)if((c<<l|(h<n?(c=i[f*n+h])>>>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.x0<t.x&&(t.x=r.x+r.x0),r.y+r.y0<t.y&&(t.y=r.y+r.y0),r.x+r.x1>i.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.x0<r[1].x&&e.y+e.y1>r[0].y&&e.y+e.y0<r[1].y}function Q4(e){var r=e[0]/e[1];return function(t){return[r*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function RFt(e){var r=4,t=r*e[0]/e[1],i=0,n=0;return function(a){var o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:i+=t;break;case 1:n+=r;break;case 2:i-=t;break;default:n-=r;break}return[i,n]}}function PN(e){for(var r=[],t=-1;++t<e;)r[t]=0;return r}function BFt(){return document.createElement("canvas")}function pu(e){return SP.isFunction(e)?e:function(){return e}}ns.functor=pu;var NFt={archimedean:Q4,rectangular:RFt};function GFt(){var e=[256,256],r=OFt,t=FFt,i=FN,n=PFt,a=IFt,o=Q4,l=Math.random,s=[],u=1/0,c=EFt,f=FN,h=BFt,v={};v.start=function(){var x=e[0],m=e[1],_=d(h()),b=v.board?v.board:PN((e[0]>>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<u&&++O<w;){var R=M[O];R.x=x*(l()+.5)>>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<N;tt++){W=0;for(var ot=0;ot<=k;ot++)x[q+ot]|=W<<G|(ot<k?(W=H[tt*k+ot])>>>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<b;F++)for(var L=0;L<_;L++){var D=w*F+(L>>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<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},NT.apply(this,arguments)},RN=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},aPt=Zt(iX,"WordCloudChart",function(e){var r=e.maskImage,t=e.wordField,i=t===void 0?"word":t,n=e.weightField,a=n===void 0?"weight":n,o=e.colorField,l=o===void 0?"word":o,s=e.selected,u=e.shuffle,c=e.interactions,f=c===void 0?[{type:"element-active"}]:c,h=e.onGetG2Instance,v=e.tooltip,d=e.wordStyle,p=e.onWordCloudHover,x=e.onWordCloudClick,m=RN(e,["maskImage","wordField","weightField","colorField","selected","shuffle","interactions","onGetG2Instance","tooltip","wordStyle","onWordCloudHover","onWordCloudClick"]),_=d.active,b=RN(d,["active"]);return NT({colorField:l,wordField:i,weightField:a,imageMask:r,random:u,interactions:f,wordStyle:b,tooltip:v&&!v.visible?!1:v,onGetG2Instance:function(w){if(h&&h(w),s>=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;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dx.apply(this,arguments)},vIt=[{sourceKey:"stackField",targetKey:"seriesField",notice:"stackField \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"}],dIt=function(e){var r=He(e);return $a(vIt,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,Dx(Dx({},r),{isStack:!0})},pIt=Zt(cb,"StackedRoseChart",dIt),$x=globalThis&&globalThis.__assign||function(){return $x=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$x.apply(this,arguments)},gIt=[{sourceKey:"groupField",targetKey:"seriesField",notice:"groupField \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"}],yIt=function(e){var r=He(e);return $a(gIt,r),I(r,"label.type")==="inner"&&(r.label.offset=-15,delete r.label.type),I(r,"label.type")==="outer"&&delete r.label.type,$x($x({},r),{isGroup:!0})},mIt=Zt(cb,"GroupedRoseChart",yIt),EP={},db={};Object.defineProperty(db,"__esModule",{value:!0});db.adaptor=void 0;var GT=j,yu=Qe,YS=Pr,Vu=mt;function xIt(e){var r=e.chart,t=e.options,i=t.data,n=t.lineStyle,a=t.color,o=t.point,l=t.area;r.data(i);var s=Vu.deepAssign({},e,{options:{line:{style:n,color:a},point:o&&GT.__assign({color:a},o),area:l&&GT.__assign({color:a},l),label:void 0}}),u=Vu.deepAssign({},s,{options:{tooltip:!1}}),c=(o==null?void 0:o.state)||t.state,f=Vu.deepAssign({},s,{options:{tooltip:!1,state:c}});return YS.line(s),YS.point(f),YS.area(u),e}function _It(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Vu.flow(yu.scale((r={},r[a]=i,r[o]=n,r)))(e)}function bIt(e){var r=e.chart,t=e.options,i=t.radius,n=t.startAngle,a=t.endAngle;return r.coordinate("polar",{radius:i,startAngle:n,endAngle:a}),e}function wIt(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis,a=t.yField,o=t.yAxis;return r.axis(i,n),r.axis(a,o),e}function CIt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Vu.findGeometry(r,"line");if(!i)a.label(!1);else{var o=i.callback,l=GT.__rest(i,["callback"]);a.label({fields:[n],callback:o,cfg:Vu.transformLabel(l)})}return e}function SIt(e){return Vu.flow(xIt,_It,yu.theme,bIt,wIt,yu.legend,yu.tooltip,CIt,yu.interaction,yu.animation,yu.annotation())(e)}db.adaptor=SIt;var fh={};Object.defineProperty(fh,"__esModule",{value:!0});fh.RadarTooltipAction=fh.RadarTooltipController=void 0;var sf=j,kx=me,zN=Y,fX=function(e){sf.__extends(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),r.prototype.getTooltipItems=function(t){var i=this.getTooltipCfg(),n=i.shared,a=i.title,o=e.prototype.getTooltipItems.call(this,t);if(o.length>0){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;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Od.apply(this,arguments)},IIt=[{sourceKey:"angleField",targetKey:"xField",notice:"angleField \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"},{sourceKey:"angleAxis",targetKey:"xAxis",notice:"angleAxis \u662F g2@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528xAxis\u66FF\u4EE3"},{sourceKey:"radiusAxis",targetKey:"yAxis",notice:"radiusAxis \u662F g2@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528yAxis\u66FF\u4EE3"}],LIt=function(e){return si(e)||e?{fillOpacity:1,strokeOpacity:1}:{fillOpacity:0,strokeOpacity:0}},DIt=function(e){var r=kt(e,"line",{}),t=r.visible,i=r.size,n=r.style;ve(e,"lineStyle",Od(Od(Od({},n),{opacity:1,lineWidth:typeof i=="number"?i:2}),LIt(t)))},$It=function(e){$a(IIt,e);var r=He(e);return kt(r,"area.visible")===!1&&ve(r,"area",!1),kt(r,"point.visible")===!1&&ve(r,"point",!1),DIt(r),(dx(r.angleAxis)||dx(r.radiusAxis))&&(r.angleAxis||(r.angleAxis={}),r.angleAxis.line=kt(r,"angleAxis.line",null),r.angleAxis.tickLine=kt(r,"angleAxis.tickLine",null)),kt(r,"tooltip.visible")===!1&&ve(r,"tooltip",!1),kt(r,"label.visible")===!1&&ve(r,"label",!1),kt(r,"yAxis.grid.line.type")==="line"&&ft(r,{xAxis:{line:null,tickLine:null}},r),r},kIt=Zt(vX,"RadarChart",$It),OP={},hh={},Tg={};Object.defineProperty(Tg,"__esModule",{value:!0});Tg.getLiquidData=void 0;var RIt="liquid";function BIt(e){return[{percent:e,type:RIt}]}Tg.getLiquidData=BIt;Object.defineProperty(hh,"__esModule",{value:!0});hh.adaptor=hh.statistic=void 0;var VN=j,jN=Y,kv=Qe,Rx=mt,NIt=Pr,GIt=Tg;function zIt(e){var r=e.chart,t=e.options,i=t.percent,n=t.liquidStyle,a=t.radius,o=t.outline,l=t.wave,s=t.shape;r.scale({percent:{min:0,max:1}}),r.data(GIt.getLiquidData(i));var u=t.color||r.getTheme().defaultColor,c=Rx.deepAssign({},e,{options:{xField:"type",yField:"percent",widthRatio:a,interval:{color:u,style:n,shape:"liquid-fill-gauge"}}}),f=NIt.interval(c).ext,h=f.geometry,v=r.getTheme().background,d={radius:a,outline:o,wave:l,shape:s,background:v};return h.customInfo(d),r.legend(!1),r.axis(!1),r.tooltip(!1),e}function dX(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent,o=i.meta;t.getController("annotation").clear(!0);var l=jN.get(o,["percent","formatter"])||function(u){return(u*100).toFixed(2)+"%"},s=n.content;return s&&(s=Rx.deepAssign({},s,{content:jN.isNil(s.content)?l(a):s.content})),Rx.renderStatistic(t,{statistic:VN.__assign(VN.__assign({},n),{content:s}),plotType:"liquid"},{percent:a}),r&&t.render(!0),e}hh.statistic=dX;function VIt(e){return Rx.flow(kv.theme,kv.pattern("liquidStyle"),zIt,dX,kv.scale({}),kv.animation,kv.interaction)(e)}hh.adaptor=VIt;var pb={};Object.defineProperty(pb,"__esModule",{value:!0});pb.DEFAULT_OPTIONS=void 0;pb.DEFAULT_OPTIONS={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"};var jIt=j,HIt=me,Fd=Y,YIt=Sg,HN=5e3;function YN(e,r,t){return e+(r-e)*t}function WIt(e){var r=jIt.__assign({opacity:1},e.style);return e.color&&!r.fill&&(r.fill=e.color),r}function XIt(e){var r={fill:"#fff",fillOpacity:0,lineWidth:4},t=Fd.mix({},r,e.style);return e.color&&!t.stroke&&(t.stroke=e.color),Fd.isNumber(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity),t}function UIt(e,r,t,i){return r===0?[[e+1/2*t/Math.PI/2,i/2],[e+1/2*t/Math.PI,i],[e+t/4,i]]:r===1?[[e+1/2*t/Math.PI/2*(Math.PI-2),i],[e+1/2*t/Math.PI/2*(Math.PI-1),i/2],[e+t/4,0]]:r===2?[[e+1/2*t/Math.PI/2,-i/2],[e+1/2*t/Math.PI,-i],[e+t/4,-i]]:[[e+1/2*t/Math.PI/2*(Math.PI-2),-i],[e+1/2*t/Math.PI/2*(Math.PI-1),-i/2],[e+t/4,0]]}function qIt(e,r,t,i,n,a,o){for(var l=Math.ceil(2*e/t*4)*4,s=[],u=i;u<-Math.PI*2;)u+=Math.PI*2;for(;u>0;)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;h<l;++h){var v=h%4,d=UIt(h*t/4,v,t,n);s.push(["C",d[0][0]+c,-d[0][1]+r,d[1][0]+c,-d[1][1]+r,d[2][0]+c,-d[2][1]+r]),h===l-1&&(f=d[2][0])}return s.push(["L",f+c,o+e]),s.push(["L",c,o+e]),s.push(["Z"]),s}function ZIt(e,r,t,i,n,a,o,l,s){for(var u=n.fill,c=n.opacity,f=o.getBBox(),h=f.maxX-f.minX,v=f.maxY-f.minY,d=0;d<i;d++){var p=i<=1?0:d/(i-1),x=a.addShape("path",{name:"waterwave-path",attrs:{path:qIt(l,f.minY+v*t,s,0,h/32,e,r),fill:u,opacity:YN(.2,.9,p)*c}});try{var m=YIt.transform([["t",s,0]]);x.stopAnimate(),x.animate({matrix:m},{duration:YN(.5*HN,HN,p),repeat:!0})}catch{console.warn("off-screen group animate error!")}}}function QIt(e,r,t,i){var n=t*2/3,a=Math.max(n,i),o=n/2,l=e,s=o+r-a/2,u=Math.asin(o/((a-o)*.85)),c=Math.sin(u)*o,f=Math.cos(u)*o,h=l-f,v=s+c,d=e,p=s+o/Math.sin(u);return`
M `+h+" "+v+`
A `+o+" "+o+" 0 1 1 "+(h+f*2)+" "+v+`
Q `+d+" "+p+" "+e+" "+(r+a/2)+`
Q `+d+" "+p+" "+h+" "+v+`
Z
`}function KIt(e,r,t,i){var n=t/2,a=i/2;return`
M `+e+" "+(r-a)+`
a `+n+" "+a+" 0 1 0 0 "+a*2+`
a `+n+" "+a+" 0 1 0 0 "+-a*2+`
Z
`}function JIt(e,r,t,i){var n=i/2,a=t/2;return`
M `+e+" "+(r-n)+`
L `+(e+a)+" "+r+`
L `+e+" "+(r+n)+`
L `+(e-a)+" "+r+`
Z
`}function t2t(e,r,t,i){var n=i/2,a=t/2;return`
M `+e+" "+(r-n)+`
L `+(e+a)+" "+(r+n)+`
L `+(e-a)+" "+(r+n)+`
Z
`}function e2t(e,r,t,i){var n=.618,a=i/2,o=t/2*n;return`
M `+(e-o)+" "+(r-a)+`
L `+(e+o)+" "+(r-a)+`
L `+(e+o)+" "+(r+a)+`
L `+(e-o)+" "+(r+a)+`
Z
`}HIt.registerShape("interval","liquid-fill-gauge",{draw:function(e,r){var t=.5,i=.5,n=e.customInfo,a=n,o=a.radius,l=a.shape,s=a.background,u=n.outline,c=n.wave,f=u.border,h=u.distance,v=c.count,d=c.length,p=Fd.reduce(e.points,function(H,k){return Math.min(H,k.x)},1/0),x=this.parsePoint({x:t,y:i}),m=this.parsePoint({x:p,y:i}),_=x.x-m.x,b=Math.min(_,m.y*o),w=WIt(e),S=XIt(Fd.mix({},e,u)),M=b-f/2,O={pin:QIt,circle:KIt,diamond:JIt,triangle:t2t,rect:e2t},F=typeof l=="function"?l:O[l]||O.circle,L=F(x.x,x.y,M*2,M*2),D=r.addGroup({name:"waves"}),R=D.setClip({type:"path",attrs:{path:L}});return ZIt(x.x,x.y,1-e.points[1].y,v,w,D,R,b*2,d),r.addShape("path",{name:"distance",attrs:{path:L,fill:"transparent",lineWidth:f+h*2,stroke:s==="transparent"?"#fff":s}}),r.addShape("path",{name:"wrap",attrs:Fd.mix(S,{path:L,fill:"transparent",lineWidth:f})}),r}});Object.defineProperty(OP,"__esModule",{value:!0});var pX=OP.Liquid=void 0,r2t=j,Xc=me,i2t=ae,WN=hh,n2t=pb,a2t=Tg,o2t=function(e){r2t.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="liquid",t}return r.getDefaultOptions=function(){return n2t.DEFAULT_OPTIONS},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.chart.emit(Xc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,Xc.Event.fromData(this.chart,Xc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(a2t.getLiquidData(t)),WN.statistic({chart:this.chart,options:this.options},!0),this.chart.emit(Xc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,Xc.Event.fromData(this.chart,Xc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},r.prototype.getSchemaAdaptor=function(){return WN.adaptor},r}(i2t.Plot);pX=OP.Liquid=o2t;var zT=globalThis&&globalThis.__assign||function(){return zT=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zT.apply(this,arguments)},l2t=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},s2t=Zt(pX,"LiquidChart",function(e){var r=He(e);r.range;var t=r.min,i=t===void 0?0:t,n=r.max,a=n===void 0?1:n,o=r.value,l=l2t(r,["range","min","max","value"]);if(!K(o)){l.percent=o/(a-i);var s=I(l,"statistic.content.formatter");l.statistic!==null&&l.statistic!==!1&&ft(l,{statistic:{content:{formatter:function(){return pt(s)&&s(o),o}}}})}Er(l,"statistic"),Er(l,"statistic.title"),Er(l,"statistic.content");var u=l.percent;return zT({data:u},l)}),FP={},Mg={};Object.defineProperty(Mg,"__esModule",{value:!0});Mg.binHistogram=void 0;var ha=Y;function XN(e,r,t){if(t===1)return[0,r];var i=Math.floor(e/r);return[r*i,r*(i+1)]}function u2t(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function c2t(e,r,t,i,n){var a=ha.clone(e);ha.sortBy(a,r);var o=ha.valuesOfKey(a,r),l=ha.getRange(o),s=l.max-l.min,u=t;if(!t&&i&&(u=i>1?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;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},VT.apply(this,arguments)},O2t=function(e){var r=He(e);return Er(r,"statistic"),Er(r,"statistic.title"),Er(r,"statistic.content"),VT({innerRadius:.8},r)},F2t=Zt(_P,"DonutChart",O2t),IP={},vh={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.DEFAULT_OPTIONS=Vi.IS_TOTAL=Vi.ABSOLUTE_FIELD=Vi.DIFF_FIELD=Vi.Y_FIELD=void 0;Vi.Y_FIELD="$$yField$$";Vi.DIFF_FIELD="$$diffField$$";Vi.ABSOLUTE_FIELD="$$absoluteField$$";Vi.IS_TOTAL="$$isTotal$$";Vi.DEFAULT_OPTIONS={label:{},leaderLine:{style:{lineWidth:1,stroke:"#8c8c8c",lineDash:[4,2]}},total:{style:{fill:"rgba(0, 0, 0, 0.25)"}},interactions:[{type:"element-active"}],risingFill:"#f4664a",fallingFill:"#30bf78",waterfallStyle:{fill:"rgba(0, 0, 0, 0.25)"},yAxis:{grid:{line:{style:{lineDash:[4,2]}}}}};var rc={};Object.defineProperty(rc,"__esModule",{value:!0});rc.transformData=rc.processData=void 0;var Bx=j,nd=Y,UN=mt,su=Vi;function mX(e,r,t,i,n){var a,o=[];if(nd.reduce(e,function(s,u){var c;UN.log(UN.LEVEL.WARN,nd.isNumber(u[t]),u[t]+" is not a valid number");var f=nd.isUndefined(u[t])?null:u[t];return o.push(Bx.__assign(Bx.__assign({},u),(c={},c[i]=[s,s+f],c))),s+f},0),o.length&&n){var l=nd.get(o,[[e.length-1],i,[1]]);o.push((a={},a[r]=n.label,a[t]=l,a[i]=[0,l],a))}return o}rc.processData=mX;function P2t(e,r,t,i){var n=mX(e,r,t,su.Y_FIELD,i);return n.map(function(a,o){var l;return nd.isObject(a)?Bx.__assign(Bx.__assign({},a),(l={},l[su.ABSOLUTE_FIELD]=a[su.Y_FIELD][1],l[su.DIFF_FIELD]=a[su.Y_FIELD][1]-a[su.Y_FIELD][0],l[su.IS_TOTAL]=o===e.length,l)):a})}rc.transformData=P2t;var WS=j,I2t=me,L2t=Y,D2t=mt;function $2t(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return r.push(["L",a.x,a.y]),r.push(["z"]),r}function k2t(e){return D2t.deepAssign({},e.defaultStyle,e.style,{fill:e.color})}I2t.registerShape("interval","waterfall",{draw:function(e,r){var t=e.customInfo,i=e.points,n=e.nextPoints,a=r.addGroup(),o=this.parsePath($2t(i)),l=k2t(e);a.addShape("path",{attrs:WS.__assign(WS.__assign({},l),{path:o})});var s=L2t.get(t,"leaderLine");if(s&&n){var u=[["M",i[2].x,i[2].y],["L",n[0].x,n[0].y]];i[2].y===n[1].y&&(u[1]=["L",n[1].x,n[1].y]),u=this.parsePath(u),a.addShape("path",{attrs:WS.__assign({path:u},s.style||{})})}return a}});Object.defineProperty(vh,"__esModule",{value:!0});vh.adaptor=vh.tooltip=void 0;var xX=j,bf=Y,cf=Qe,R2t=Pr,_X=xs,el=mt,bi=Vi,B2t=rc;function N2t(e){var r=e.options,t=r.locale,i=r.total,n=_X.getLocale(t).get(["waterfall","total"]);return i&&typeof i.label!="string"&&n&&(e.options.total.label=n),e}function G2t(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.total,l=t.leaderLine,s=t.columnWidthRatio,u=t.waterfallStyle,c=t.risingFill,f=t.fallingFill,h=t.color;r.data(B2t.transformData(i,n,a,o));var v=h||function(m){return bf.get(m,[bi.IS_TOTAL])?bf.get(o,["style","fill"],""):bf.get(m,[bi.Y_FIELD,1])-bf.get(m,[bi.Y_FIELD,0])>0?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)&&gt!=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;et<G;)Z=k[et],N[et]=ot=+V(Z,et,k),W[et]=st=+U(Z,et,k),++et,q+=(ot-q)/et,tt+=(st-tt)/et;for(var lt=0;lt<G;++lt)N[lt]-=q,W[lt]-=tt;return[N,W,q,tt]}function s(k,V,U,B){for(var G=0,N=0,W=k.length;N<W;N++){var q=k[N],tt=+V(q,N,k),ot=+U(q,N,k);tt!=null&&isFinite(tt)&&ot!=null&&isFinite(ot)&&B(tt,ot,G++)}}function u(k,V,U,B,G){var N=0,W=0;return s(k,V,U,function(q,tt){var ot=tt-G(q),st=tt-B;N+=ot*ot,W+=st*st}),1-N/W}function c(k){return Math.atan2(k[1][1]-k[0][1],k[1][0]-k[0][0])*180/Math.PI}function f(k){return[(k[0][0]+k[1][0])/2,(k[0][1]+k[1][1])/2]}function h(k,V,U){for(var B=Math.log(V-k)*Math.LOG10E+1|0,G=1*Math.pow(10,-B/2-1),N=1e4,W=[tt(k),tt(V)],q=0;ot(W)&&q<N;);return W;function tt(st){return[st,U(st)]}function ot(st){q++;for(var Z=st.length,et=!1,lt=0;lt<Z-1;lt++){var dt=st[lt],ht=st[lt+1],wt=f([dt,ht]),gt=tt(wt[0]),vt=c([dt,wt]),_t=c([dt,gt]),Bt=Math.abs(vt-_t);Bt>G&&(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||(_t<Z&&(Z=_t),_t>et&&(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||(vt<st&&(st=vt),vt>Z&&(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;vt<Z;++vt){for(var _t=q[vt],Bt=gt[0],Ut=gt[1],Nt=_t-q[Bt]>q[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<Z;++vl)So=dt[vl]/(6*Rs),ht[vl]=So>=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;W<G;++W)ot=k[W]+U,tt[0]===ot?tt[1]+=(V[W]-tt[1])/++q:(q=0,tt[1]+=B,tt=[ot,V[W]],N.push(tt));return tt[1]+=B,N}function O(){var k=function(W){return W[0]},V=function(W){return W[1]},U=Math.E,B;function G(N){var W=0,q=0,tt=0,ot=0,st=0,Z=B?+B[0]:1/0,et=B?+B[1]:-1/0,lt=Math.log(U);s(N,k,V,function(Bt,Ut){var Nt=Math.log(Bt)/lt;++W,q+=(Nt-q)/W,tt+=(Ut-tt)/W,ot+=(Nt*Ut-ot)/W,st+=(Nt*Nt-st)/W,B||(Bt<Z&&(Z=Bt),Bt>et&&(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;gt<Z;)vt=q[gt],_t=tt[gt++],Bt=vt*vt,et+=(Bt-et)/gt,lt+=(Bt*vt-lt)/gt,dt+=(Bt*Bt-dt)/gt,ht+=(vt*_t-ht)/gt,wt+=(Bt*_t-wt)/gt;var Ut=0,Nt=0,pe=U?+U[0]:1/0,cr=U?+U[1]:-1/0;s(G,k,V,function(At,gi){Nt++,Ut+=(gi-Ut)/Nt,U||(At<pe&&(pe=At),At>cr&&(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||(Hr<Bt&&(Bt=Hr),Hr>Ut&&(Ut=Hr))});var Nt,pe,cr,ar,Ji;for(Nt=0;Nt<gt;++Nt){for(cr=0,ar=0;cr<dt;++cr)ar+=Math.pow(st[cr],Nt)*Z[cr];for(ht.push(ar),Ji=new Float64Array(gt),pe=0;pe<gt;++pe){for(cr=0,ar=0;cr<dt;++cr)ar+=Math.pow(st[cr],Nt+pe);Ji[pe]=ar}wt.push(Ji)}wt.push(ht);var Lr=R(wt),tn=function(Ke){Ke-=et;var At=lt+Lr[0]+Lr[1]*Ke+Lr[2]*Ke*Ke;for(Nt=3;Nt<gt;++Nt)At+=Lr[Nt]*Math.pow(Ke,Nt);return At},jr=h(Bt,Ut,tn);return jr.coefficients=D(gt,Lr,-et,lt),jr.predict=tn,jr.rSquared=u(N,k,V,vt,tn),jr}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.order=function(N){return arguments.length?(U=N,G):U},G}function D(k,V,U,B){var G=Array(k),N,W,q,tt;for(N=0;N<k;++N)G[N]=0;for(N=k-1;N>=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;B<V;++B){for(W=B,G=B+1;G<V;++G)Math.abs(k[B][G])>Math.abs(k[B][W])&&(W=G);for(N=B;N<V+1;++N)q=k[N][B],k[N][B]=k[N][W],k[N][W]=q;for(G=B+1;G<V;++G)for(N=V;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;N<V;++N)q+=k[N][G]*U[N];U[G]=(k[V][G]-q)/k[G][G]}return U}function H(){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(_t),Nt=Math.log(Bt);++N,W+=(Ut-W)/N,q+=(Nt-q)/N,tt+=(Ut*Nt-tt)/N,ot+=(Ut*Ut-ot)/N,st+=(Bt-st)/N,U||(_t<Z&&(Z=_t),_t>et&&(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;u<t.length&&(s=t[u],l[i]!==s[i]&&(a=!1),l[n]!==s[n]&&(o=!1),!(!a&&!o));u++)l=s;var c=[];a&&c.push(i),o&&c.push(n);var f=ya.pick(DP.getMeta(e),c);return ya.deepAssign({},e,{meta:f})}return e}lo.transformOptions=CX;function oLt(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.color,o=t.shape,l=t.pointStyle,s=t.shapeField,u=t.colorField,c=t.xField,f=t.yField,h=t.sizeField,v=t.size,d=t.tooltip;h&&(v||(v=[2,8]),iLt.isNumber(v)&&(v=[v,v])),d&&!d.fields&&(d=os.__assign(os.__assign({},d),{fields:[c,f,u,h,s]})),r.data(i),nLt.point(ya.deepAssign({},e,{options:{seriesField:u,point:{color:a,shape:o,size:v,style:l},tooltip:d}}));var p=jT.findGeometry(r,"point");return n&&p.adjust(n),e}function SX(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,l=CX(t);return ya.flow(Pd.scale((r={},r[a]=i,r[o]=n,r)))(ya.deepAssign({},e,{options:l}))}lo.meta=SX;function lLt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return r.axis(a,i),r.axis(o,n),e}function sLt(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.shapeField,o=t.sizeField,l=t.shapeLegend,s=t.sizeLegend,u=i!==!1;return n&&r.legend(n,u?i:!1),a&&(l?r.legend(a,l):r.legend(a,l===!1?!1:i)),o&&r.legend(o,s||!1),!u&&!l&&!s&&r.legend(!1),e}function uLt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=jT.findGeometry(r,"point");if(!i)a.label(!1);else{var o=i.callback,l=os.__rest(i,["callback"]);a.label({fields:[n],callback:o,cfg:jT.transformLabel(l)})}return e}function cLt(e){var r=e.options,t=r.quadrant,i=[];if(t){var n=t.xBaseline,a=n===void 0?0:n,o=t.yBaseline,l=o===void 0?0:o,s=t.labels,u=t.regionStyle,c=t.lineStyle,f=DP.getQuadrantDefaultConfig(a,l),h=new Array(4).join(",").split(",");h.forEach(function(v,d){i.push(os.__assign(os.__assign({type:"region",top:!1},f.regionStyle[d].position),{style:ya.deepAssign({},f.regionStyle[d].style,u==null?void 0:u[d])}),os.__assign({type:"text",top:!0},ya.deepAssign({},f.labelStyle[d],s==null?void 0:s[d])))}),i.push({type:"line",top:!1,start:["min",l],end:["max",l],style:ya.deepAssign({},f.lineStyle,c)},{type:"line",top:!1,start:[a,"min"],end:[a,"max"],style:ya.deepAssign({},f.lineStyle,c)})}return ya.flow(Pd.annotation(i))(e)}function fLt(e){var r=e.options,t=e.chart,i=r.regressionLine;if(i){var n=i.style,a=i.top,o=a===void 0?!1:a,l={stroke:"#9ba29a",lineWidth:2,opacity:.5};t.annotation().shape({top:o,render:function(s,u){var c=s.addGroup({id:t.id+"-regression-line",name:"regression-line-group"}),f=DP.getPath({view:u,options:r});c.addShape("path",{name:"regression-line",attrs:os.__assign(os.__assign({path:f},l),n)})}})}return e}function AX(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(i):i===!1&&r.tooltip(!1),e}lo.tooltip=AX;function hLt(e){return ya.flow(oLt,SX,lLt,sLt,AX,uLt,aLt.brushInteraction,Pd.interaction,cLt,Pd.animation,Pd.theme,fLt)(e)}lo.adaptor=hLt;var yb={};Object.defineProperty(yb,"__esModule",{value:!0});yb.DEFAULT_OPTIONS=void 0;var vLt=ae,dLt=mt;yb.DEFAULT_OPTIONS=dLt.deepAssign({},vLt.Plot.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});Object.defineProperty(LP,"__esModule",{value:!0});var $P=LP.Scatter=void 0,XS=j,US=me,pLt=ae,gLt=mt,Rv=lo,yLt=yb,mLt=function(e){XS.__extends(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.type="scatter",n.on(US.VIEW_LIFE_CIRCLE.BEFORE_RENDER,function(a){var o,l,s=n,u=s.options,c=s.chart;if(((o=a.data)===null||o===void 0?void 0:o.source)===US.BRUSH_FILTER_EVENTS.FILTER){var f=n.chart.filterData(n.chart.getData());Rv.meta({chart:c,options:XS.__assign(XS.__assign({},u),{data:f})})}((l=a.data)===null||l===void 0?void 0:l.source)===US.BRUSH_FILTER_EVENTS.RESET&&Rv.meta({chart:c,options:u})}),n}return r.getDefaultOptions=function(){return yLt.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.updateOption(Rv.transformOptions(gLt.deepAssign({},this.options,{data:t})));var i=this,n=i.options,a=i.chart;Rv.meta({chart:a,options:n}),this.chart.changeData(t)},r.prototype.getSchemaAdaptor=function(){return Rv.adaptor},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(pLt.Plot);$P=LP.Scatter=mLt;var xLt=function(e){var r=He(e);kt(r,"pointSize")&&ve(r,"size",kt(r,"pointSize")),Er(r,"quadrant");var t=kt(r,"quadrant.label"),i=kt(r,"quadrant.labels");if(!i&&t){var n=t.text,a=t.style;if(n&&n.length&&a){var o=n.map(function(u){return{style:a,content:u}});ve(r,"quadrant.labels",o)}}var l=kt(r,"regressionLine");if(!l){var s=kt(r,"trendline");qt(s)&&kt(s,"visible")===!1?ve(r,"regressionLine",null):ve(r,"regressionLine",s)}return r},_Lt=Zt($P,"ScatterChart",xLt),bLt=Zt($P,"BubbleChart",function(e){var r=He(e);return si(kt(r,"pointSize"))||ve(r,"size",kt(r,"pointSize")),r}),kP={},dh={},Eg={};Object.defineProperty(Eg,"__esModule",{value:!0});Eg.transformData=void 0;function wLt(e){var r=e.data,t=e.xField,i=e.measureField,n=e.rangeField,a=e.targetField,o=e.layout,l=[],s=[];r.forEach(function(f,h){var v;f[n].sort(function(d,p){return d-p}),f[n].forEach(function(d,p){var x,m=p===0?d:f[n][p]-f[n][p-1];l.push((x={rKey:n+"_"+p},x[t]=t?f[t]:String(h),x[n]=m,x))}),f[i].forEach(function(d,p){var x;l.push((x={mKey:f[i].length>1?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<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cu.apply(this,arguments)},kLt=function(e){var r=He(e);return si(kt(e,"measureSize"))||ve(r,"size.measure",kt(e,"measureSize")),si(kt(e,"rangeSize"))||ve(r,"size.range",kt(e,"rangeSize")),si(kt(e,"markerSize"))||ve(r,"size.target",kt(e,"markerSize")),si(kt(e,"measureColors"))||ve(r,"color.measure",kt(e,"measureColors")),si(kt(e,"rangeColors"))||ve(r,"color.range",kt(e,"rangeColors")),si(kt(e,"markerColors"))||ve(r,"color.target",kt(e,"markerColors")),si(kt(e,"markerStyle"))||ve(r,"bulletStyle.target",kt(e,"markerStyle")),si(kt(e,"xAxis.line"))&&ve(r,"xAxis.line",!1),si(kt(e,"yAxis"))&&ve(r,"yAxis",!1),si(kt(e,"measureField"))&&ve(r,"measureField","measures"),si(kt(e,"rangeField"))&&ve(r,"rangeField","ranges"),si(kt(e,"targetField"))&&ve(r,"targetField","target"),Df(!si(kt(e,"rangeMax"))),sr(kt(e,"data"))&&ve(r,"data",e.data.map(function(t){var i={};return si(kt(e,"rangeMax"))||(i={ranges:[kt(e,"rangeMax")]}),sr(t.targets)?Cu(Cu(Cu({},i),{target:t.targets[0]}),t):Cu(Cu({},i),t)})),r},RLt=Zt(MX,"BulletChart",kLt);function It(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.reduce(function(i,n){return n(i)},t)}}function se(e,r){var t={};return e!==null&&typeof e=="object"&&r.forEach(function(i){var n=e[i];n!==void 0&&(t[i]=n)}),t}function EX(e,r){return r?Zr(r,function(t,i,n){return t.replace(new RegExp("{\\s*"+n+"\\s*}","g"),i)},e):e}var Oa;(function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"})(Oa||(Oa={}));var BLt="AntV/G2Plot";function NLt(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var i=0;return BLt+": "+e.replace(/%s/g,function(){return""+r[i++]})}function sl(e,r,t){for(var i=[],n=3;n<arguments.length;n++)i[n-3]=arguments[n];r||console[e](NLt.apply(void 0,ye([t],i)))}function HT(e){if(!e)return{width:0,height:0};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,r){return e.geometries.find(function(t){return t.type===r})}function Nx(e){return Zr(e.geometries,function(r,t){return r.concat(t.elements)},[])}function op(e){return I(e,["views","length"],0)<=0?Nx(e):Zr(e.views,function(r,t){return r.concat(op(t))},Nx(e))}function GLt(e){return I(e,["views","length"],0)<=0?e.geometries:Zr(e.views,function(r,t){return r.concat(t.geometries)},e.geometries)}function Yt(e,r){return e.views.find(function(t){return t.id===r})}function od(e){var r=e.parent;return r?r.views:[]}function ZN(e){return od(e).filter(function(r){return r!==e})}function Or(e){if(!Zn(e,"Object"))return e;var r=A({},e);return r.formatter&&!r.content&&(r.content=r.formatter),r}function zLt(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var i=1,n=e.length;i<n;i+=1){var a=e[i];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}var VLt=function(e,r,t,i){var n=[],a,o,l=!!i,s,u;if(l){s=[1/0,1/0],u=[-1/0,-1/0];for(var c=0,f=e.length;c<f;c++){var h=e[c];s=wr([0,0],s,h),u=Cr([0,0],u,h)}s=wr([0,0],s,i[0]),u=Cr([0,0],u,i[1])}for(var c=0,v=e.length;c<v;c++){var h=e[c];if(t)a=e[c?c-1:v-1],o=e[(c+1)%v];else if(c===0||c===v-1){n.push(h);continue}else a=e[c-1],o=e[c+1];var d=[0,0];d=Ql(d,o,a),d=hi(d,d,r);var p=us(h,a),x=us(h,o),m=p+x;m!==0&&(p/=m,x/=m);var _=hi([0,0],d,-p),b=hi([0,0],d,x),w=ma([0,0],h,_),S=ma([0,0],h,b);l&&(w=Cr([0,0],w,s),w=wr([0,0],w,u),S=Cr([0,0],S,s),S=wr([0,0],S,u)),n.push(w),n.push(S)}return t&&n.push(n.shift()),n};function jLt(e,r,t){for(var i=!!r,n=[],a=0,o=e.length;a<o;a+=2)n.push([e[a],e[a+1]]);for(var l=VLt(n,.4,i,t),s=n.length,u=[],c,f,h,a=0;a<s-1;a++)c=l[a*2],f=l[a*2+1],h=n[a+1],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]]);return i&&(c=l[s],f=l[s+1],h=n[0],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]])),u}function HLt(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return zLt(e,r);for(var o=0,l=e.length;o<l;o++){var s=e[o];(!a||!(a.x===s.x&&a.y===s.y))&&(i.push(s.x),i.push(s.y),a=s)}var u=t||[[0,0],[1,1]],c=jLt(i,r,u);return c.unshift(["M",n.x,n.y]),c}var YLt=5,WLt={}.toString,OX=function(e,r){return WLt.call(e)==="[object "+r+"]"},XLt=function(e){return OX(e,"Array")},ULt=function(e){return typeof e=="object"&&e!==null},QN=function(e){if(!ULt(e)||!OX(e,"Object"))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},FX=function(e,r,t,i){t=t||0,i=i||YLt;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];a?QN(a)?(QN(e[n])||(e[n]={}),t<i?FX(e[n],a,t+1,i):e[n]=r[n]):XLt(a)?(e[n]=[],e[n]=e[n].concat(a)):e[n]=a:e[n]=a}},J=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0;i<r.length;i+=1)FX(e,r[i]);return e};function KN(e){if(!e)return e;var r=e.match(/(([A-Z]{0,1}[a-z]*[^A-Z])|([A-Z]{1}))/g);return r.map(function(t){return t.toLowerCase()}).join("-")}function PX(e){var r={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex",justifyContent:"center",alignItems:"center"},t=["stroke","lineWidth","shadowColor","strokeOpacity","shadowBlur","shadowOffsetX","shadowOffsetY","fill"];I(e,"fill")&&(r.color=e.fill);var i=se(e,t),n=i.shadowColor,a=i.shadowBlur,o=a===void 0?0:a,l=i.shadowOffsetX,s=l===void 0?0:l,u=i.shadowOffsetY,c=u===void 0?0:u;r["text-shadow"]=""+[n,s+"px",c+"px",o+"px"].join(" ");var f=se(e,t),h=f.stroke,v=f.lineWidth,d=v===void 0?0:v;return r["-webkit-text-stroke"]=""+[d+"px",h].join(" "),P(e,function(p,x){["fontSize"].includes(x)&&Mt(p)?r[KN(x)]=p+"px":x&&!t.includes(x)&&(r[KN(x)]=""+p)}),r}function IX(e,r){e.style["pointer-events"]="none",P(r,function(t,i){i&&t&&(e.style[i]=t)})}var xb=function(e,r,t){var i=r.statistic,n=r.plotType,a=i.title,o=i.content;[a,o].forEach(function(l,s){if(!!l){var u="";s===0?u=o?"translate(-50%, -100%)":"translate(-50%, -50%)":u=a?"translate(-50%, 0)":"translate(-50%, -50%)";var c=pt(l.style)?l.style(t):l.style;e.annotation().html(A({position:["50%","50%"],html:function(f,h){var v=h.getCoordinate(),d=0;if(n==="pie"||n==="ring-progress")d=v.getRadius()*v.innerRadius*2;else if(n==="liquid"){var p=I(h.geometries,[0,"elements",0,"shape"]);if(p){var x=p.find(function(w){return w.get("name")==="wrap"}),m=x.getCanvasBBox().width;d=m}}else d||(d=v.getWidth());IX(f,A({width:d+"px",transform:u},PX(c)));var _=h.getData();if(l.customHtml)return l.customHtml(f,h,t,_);var b=l.content;return l.formatter&&(b=l.formatter(t,_)),b?Ct(b)?b:""+b:"<div></div>"},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(_)?_:""+_:"<div></div>"}},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;l<a.length;l++)o(l);i.forEach(function(s){return n.annotation(s)}),this.chart.render(!0)},r.prototype.removeAnnotations=function(t){var i=this.chart.getController("annotation"),n=i.getComponents().map(function(l){return l.extra});i.clear(!0);for(var a=function(l){var s=n[l];t.find(function(u){return u.id&&u.id===s.id})||i.annotation(s)},o=0;o<n.length;o++)a(o);this.chart.render(!0)},r.prototype.destroy=function(){this.unbindSizeSensor(),this.chart.destroy(),this.off(),this.container.removeAttribute(JN)},r.prototype.execAdaptor=function(){var t=this.getSchemaAdaptor(),i=this.options,n=i.padding,a=i.appendPadding;this.chart.padding=n,this.chart.appendPadding=a,t({chart:this.chart,options:this.options})},r.prototype.triggerResize=function(){this.chart.forceFit()},r.prototype.bindSizeSensor=function(){var t=this;if(!this.unbind){var i=this.options.autoFit,n=i===void 0?!0:i;n&&(this.unbind=YW(this.container,function(){var a=HT(t.container),o=a.width,l=a.height;(o!==t.chart.width||l!==t.chart.height)&&t.triggerResize()}))}},r.prototype.unbindSizeSensor=function(){this.unbind&&(this.unbind(),this.unbind=void 0)},r}(gp),ji=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"];function wb(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}function NP(e,r){r===void 0&&(r=e);var t=document.createElement("canvas"),i=wb();t.width=e*i,t.height=r*i,t.style.width=e+"px",t.style.height=r+"px";var n=t.getContext("2d");return n.scale(i,i),t}function GP(e,r,t,i){i===void 0&&(i=t);var n=r.backgroundColor,a=r.opacity;e.globalAlpha=a,e.fillStyle=n,e.beginPath(),e.fillRect(0,0,t,i),e.closePath()}function kX(e,r,t){var i=e+r;return t?i*2:i}function RX(e,r){var t=r?[[e*.25,e*.25],[e*.75,e*.75]]:[[e*.5,e*.5]];return t}function zP(e,r){var t=r*Math.PI/180,i={a:Math.cos(t)*(1/e),b:Math.sin(t)*(1/e),c:-Math.sin(t)*(1/e),d:Math.cos(t)*(1/e),e:0,f:0};return i}var eDt={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function rDt(e,r,t,i){var n=r.size,a=r.fill,o=r.lineWidth,l=r.stroke,s=r.fillOpacity;e.beginPath(),e.globalAlpha=s,e.fillStyle=a,e.strokeStyle=l,e.lineWidth=o,e.arc(t,i,n/2,0,2*Math.PI,!1),e.fill(),o&&e.stroke(),e.closePath()}function iDt(e){var r=J({},eDt,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=kX(t,i,n),l=RX(o,n),s=NP(o,o),u=s.getContext("2d");GP(u,r,o);for(var c=0,f=l;c<f.length;c++){var h=f[c],v=h[0],d=h[1];rDt(u,r,v,d)}var p=u.createPattern(s,"repeat");if(p){var x=wb(),m=zP(x,a);p.setTransform(m)}return p}var nDt={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function aDt(e,r,t){var i=r.stroke,n=r.lineWidth,a=r.strokeOpacity,o=new Path2D(t);e.globalAlpha=a,e.lineCap="square",e.strokeStyle=n?i:"transparent",e.lineWidth=n,e.stroke(o)}function oDt(e){var r=J({},nDt,e),t=r.spacing,i=r.rotation,n=r.lineWidth,a=t+n||1,o=t+n||1,l=`
M 0 0 L `+a+` 0
M 0 `+o+" L "+a+" "+o+`
`,s=NP(a,o),u=s.getContext("2d");GP(u,r,a,o),aDt(u,r,l);var c=u.createPattern(s,"repeat");if(c){var f=wb(),h=zP(f,i);c.setTransform(h)}return c}var lDt={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function sDt(e,r,t,i){var n=r.stroke,a=r.size,o=r.fill,l=r.lineWidth,s=r.fillOpacity;e.globalAlpha=s,e.strokeStyle=n,e.lineWidth=l,e.fillStyle=o,e.strokeRect(t-a/2,i-a/2,a,a),e.fillRect(t-a/2,i-a/2,a,a)}function uDt(e){var r=J({},lDt,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=kX(t,i,n),l=RX(o,n),s=NP(o,o),u=s.getContext("2d");GP(u,r,o);for(var c=0,f=l;c<f.length;c++){var h=f[c],v=h[0],d=h[1];sDt(u,r,v,d)}var p=u.createPattern(s,"repeat");if(p){var x=wb(),m=zP(x,a);p.setTransform(m)}return p}function cDt(e){var r=e.type,t=e.cfg,i;switch(r){case"dot":i=iDt(t);break;case"line":i=oDt(t);break;case"square":i=uDt(t);break}return i}function Sn(e){var r=this;return function(t){var i,n=t.options,a=t.chart,o=n.pattern;if(!o)return t;var l=function(s){for(var u,c,f,h=[],v=1;v<arguments.length;v++)h[v-1]=arguments[v];var d=a.getTheme().defaultColor,p=d,x=(c=(u=a.geometries)===null||u===void 0?void 0:u[0])===null||c===void 0?void 0:c.getAttribute("color");if(x){var m=x.getFields()[0],_=I(s,m);p=Oi.getMappingValue(x,_,((f=x.values)===null||f===void 0?void 0:f[0])||d)}var b=o;typeof o=="function"&&(b=o.call(r,s,p)),b instanceof CanvasPattern||(b=cDt(J({},{cfg:{backgroundColor:p}},b)));var w=n[e];return A(A({},typeof w=="function"?w.call.apply(w,ye([r,s],h)):w||{}),{fill:b||p})};return J({},t,{options:(i={},i[e]=l,i)})}}function Og(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.seriesField;return i===!1?r.legend(!1):(n||a)&&r.legend(n||a,i),e}function Ir(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==void 0&&r.tooltip(i),e}function Ae(e){var r=e.chart,t=e.options,i=t.interactions;return P(i,function(n){n.enable===!1?r.removeInteraction(n.type):r.interaction(n.type,n.cfg||{})}),e}function ce(e){var r=e.chart,t=e.options,i=t.animation;return typeof i=="boolean"?r.animate(i):r.animate(!0),P(r.geometries,function(n){n.animate(i)}),e}function ie(e){var r=e.chart,t=e.options,i=t.theme;return i&&r.theme(i),e}function ks(e){var r=e.chart,t=e.options,i=t.state;return i&&P(r.geometries,function(n){n.state(i)}),e}function Cb(e){var r=e.chart,t=e.options,i=t.slider;return r.option("slider",i),e}function fDt(e){var r=e.chart,t=e.options,i=t.scrollbar;return r.option("scrollbar",i),e}function We(e,r){return function(t){var i=t.chart,n=t.options,a={};return P(e,function(o,l){a[l]=se(o,ji)}),a=J({},r,n.meta,a),i.scale(a),t}}function Xe(e){return function(r){var t=r.chart,i=r.options,n=t.getController("annotation");return P(ye(i.annotations||[],e||[]),function(a){n.annotation(a)}),r}}function nc(e){var r=e.chart,t=e.options,i=t.yAxis,n=t.limitInPlot,a=n;return qt(i)&&K(n)&&(Object.values(se(i,["min","max","minLimit","maxLimit"])).some(function(o){return!K(o)})?a=!0:a=!1),r.limitInPlot=a,e}function ra(e,r){if(e===!1)return{fields:!1};var t=I(e,"fields"),i=I(e,"formatter");return i&&!t&&(t=r),{fields:t,formatter:i}}function c0(e,r){var t=e.type,i=e.xField,n=e.yField,a=e.colorField,o=e.shapeField,l=e.sizeField,s=e.styleField,u=e.rawFields,c=u===void 0?[]:u,f=[];if(r==="color")f=ye([a||i],c);else if(r==="shape")f=ye([o||i],c);else if(r==="size")f=ye([l||i],c);else{f=ye([i,n,a,o,l,s],c);var h=["x","y","color","shape","size","style"].indexOf(r),v=f[h];f.splice(h,1),f.unshift(v)}var d=ss(f.filter(function(x){return!!x})),p=t==="line"&&[i,n].includes(d.join("*"))?"":d.join("*");return{mappingFields:d,tileMappingField:p}}function ff(e,r){if(!!r)return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n={};return e.forEach(function(a,o){n[a]=t[o]}),delete n.undefined,r(n)}}function Ki(e){var r=e.chart,t=e.options,i=t.type,n=t.args,a=t.mapping,o=t.xField,l=t.yField,s=t.colorField,u=t.shapeField,c=t.sizeField,f=t.tooltipFields,h=t.label,v=t.state,d=t.customInfo;if(!a)return e;var p=a.color,x=a.shape,m=a.size,_=a.style,b=a.tooltip,w=r[i](n).position(o+"*"+l);if(Ct(p))s?w.color(s,p):w.color(p);else if(pt(p)){var S=c0(t,"color"),M=S.mappingFields,O=S.tileMappingField;w.color(O,ff(M,p))}else s&&w.color(s,p);if(Ct(x))u?w.shape(u,[x]):w.shape(x);else if(pt(x)){var F=c0(t,"shape"),M=F.mappingFields,O=F.tileMappingField;w.shape(O,ff(M,x))}else u&&w.shape(u,x);if(Mt(m))c?w.size(c,m):w.size(m);else if(pt(m)){var L=c0(t,"size"),M=L.mappingFields,O=L.tileMappingField;w.size(O,ff(M,m))}else c&&w.size(c,m);if(pt(_)){var D=c0(t,"style"),M=D.mappingFields,O=D.tileMappingField;w.style(O,ff(M,_))}else qt(_)&&w.style(_);if(f===!1?w.tooltip(!1):di(f)||w.tooltip(f.join("*"),ff(f,b)),h===!1)w.label(!1);else if(h){var R=h.callback,H=h.fields,k=ue(h,["callback","fields"]);w.label({fields:H||[l],callback:R,cfg:Or(k)})}return v&&w.state(v),d&&w.customInfo(d),[o,l].filter(function(V){return V!==s}).forEach(function(V){r.legend(V,!1)}),A(A({},e),{ext:{geometry:w}})}function Sb(e){var r=e.options,t=r.area,i=r.xField,n=r.yField,a=r.seriesField,o=r.smooth,l=r.tooltip,s=ra(l,[i,n,a]),u=s.fields,c=s.formatter;return t?Ki(J({},e,{options:{type:"area",colorField:a,tooltipFields:u,mapping:A({shape:o?"smooth":"area",tooltip:c},t)}})):e}function Vh(e){var r=e.options,t=r.line,i=r.stepType,n=r.xField,a=r.yField,o=r.seriesField,l=r.smooth,s=r.connectNulls,u=r.tooltip,c=ra(u,[n,a,o]),f=c.fields,h=c.formatter;return t?Ki(J({},e,{options:{type:"line",colorField:o,tooltipFields:f,mapping:ft({shape:i||(l?"smooth":"line"),tooltip:h},t),args:{connectNulls:s}}})):e}function An(e){var r=e.options,t=r.point,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,l=r.shapeField,s=r.tooltip,u=ra(s,[i,n,a,o,l]),c=u.fields,f=u.formatter;return t?Ki(J({},e,{options:{type:"point",colorField:a,shapeField:l,tooltipFields:c,mapping:A({tooltip:f},t)}})):e}function hDt(e){var r=e.chart,t=e.options,i=e.ext,n=t.seriesField,a=t.isGroup,o=t.isStack,l=t.marginRatio,s=t.widthRatio,u=t.groupField,c=t.theme,f=[];if(n&&(a&&f.push({type:"dodge",dodgeBy:u||n,marginRatio:l}),o&&f.push({type:"stack",marginRatio:l})),f.length&&(i==null?void 0:i.geometry)){var h=i==null?void 0:i.geometry;h.adjust(f)}return K(s)||r.theme(J({},qt(c)?c:es(c),{columnWidthRatio:s})),e}function ti(e){var r=e.options,t=r.xField,i=r.yField,n=r.interval,a=r.seriesField,o=r.tooltip,l=r.minColumnWidth,s=r.maxColumnWidth,u=r.columnBackground,c=r.dodgePadding,f=r.intervalPadding,h=ra(o,[t,i,a]),v=h.fields,d=h.formatter,p=(n?Ki(J({},e,{options:{type:"interval",colorField:a,tooltipFields:v,mapping:A({tooltip:d},n),args:{dodgePadding:c,intervalPadding:f,minColumnWidth:l,maxColumnWidth:s,background:u}}})):e).ext;return hDt(A(A({},e),{ext:p}))}function Ab(e){var r=e.options,t=r.polygon,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,l=ra(o,[i,n,a]),s=l.fields,u=l.formatter;return t?Ki(J({},e,{options:{type:"polygon",colorField:a,tooltipFields:s,mapping:A({tooltip:u},t)}})):e}function BX(e){var r=e.options,t=r.edge,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,l=ra(o,[i,n,a]),s=l.fields,u=l.formatter;return t?Ki(J({},e,{options:{type:"edge",colorField:a,tooltipFields:s,mapping:A({tooltip:u},t)}})):e}function VP(e){var r=e.options,t=r.schema,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,l=ra(o,[i,n,a]),s=l.fields,u=l.formatter;return t?Ki(J({},e,{options:{type:"schema",colorField:a,tooltipFields:s,mapping:A({tooltip:u},t)}})):e}function vDt(e){var r=e.options,t=r.violin,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,l=r.tooltip,s=ra(l,[i,n,a,o]),u=s.fields,c=s.formatter;return t?Ki(J({},e,{options:{type:"violin",colorField:a,tooltipFields:u,mapping:A({tooltip:c},t)}})):e}function dDt(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.lineStyle,o=t.lineShape,l=t.point,s=t.area,u=t.seriesField,c=l==null?void 0:l.state;r.data(i);var f=J({},e,{options:{shapeField:u,line:{color:n,style:a,shape:o},point:l&&A({color:n,shape:"circle"},l),area:s&&A({color:n},s),label:void 0}}),h=J({},f,{options:{tooltip:!1,state:c}}),v=J({},f,{options:{tooltip:!1,state:c}});return Vh(f),An(h),Sb(v),e}function Tb(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,l=i.yField,s=i.data;return It(We((r={},r[o]=n,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=RP(s,l),t)))(e)}function pDt(e){var r=e.chart,t=e.options,i=t.reflect;if(i){var n=i;it(n)||(n=[n]);var a=n.map(function(o){return["reflect",o]});r.coordinate({type:"rect",actions:a})}return e}function NX(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 GX(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 gDt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Jr(r,"line");if(!i)a.label(!1);else{var o=i.callback,l=ue(i,["callback"]);a.label({fields:[n],callback:o,cfg:A({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},Or(l))})}return e}function yDt(e){var r=e.chart,t=e.options,i=t.isStack;return i&&P(r.geometries,function(n){n.adjust("stack")}),e}function zX(e){return It(dDt,Tb,yDt,ie,pDt,NX,GX,Ir,gDt,Cb,Ae,ce,Xe(),nc)(e)}var mDt=J({},Dt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left"},isStack:!1}),xDt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.active=function(){var t=this.getView(),i=this.context.event;if(i.data){var n=i.data.items,a=t.geometries.filter(function(o){return o.type==="point"});P(a,function(o){P(o.elements,function(l){var s=oM(n,function(u){return u.data===l.data})!==-1;l.setState("active",s)})})}},r.prototype.reset=function(){var t=this.getView(),i=t.geometries.filter(function(n){return n.type==="point"});P(i,function(n){P(n.elements,function(a){a.setState("active",!1)})})},r.prototype.getView=function(){return this.context.view},r}(Ie);Et("marker-active",xDt);Lt("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var _Dt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t}return r.getDefaultOptions=function(){return mDt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;Tb({chart:n,options:a}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return zX},r}(Dt);function VX(e,r,t,i){var n=Zr(e,function(a,o){var l=o[t],s=a.has(l)?a.get(l):0,u=o[r];return s=ic(u)?s+u:s,a.set(l,s),a},new Map);return je(e,function(a){var o,l=a[r],s=a[t],u=ic(l)?l/n.get(s):0;return A(A({},a),(o={},o[i]=u,o))})}function bDt(e,r,t,i){var n=Zr(e,function(a,o){var l=Zr(t,function(c,f){return""+c+o[f]},""),s=a.has(l)?a.get(l):0,u=o[r];return s=ic(u)?s+u:s,a.set(l,s),a},new Map);return je(e,function(a){var o,l=a[r],s=Zr(t,function(c,f){return""+c+a[f]},""),u=ic(l)?l/n.get(s):0;return A(A({},a),(o={},o[i]=u,o))})}function Fg(e,r,t,i,n){return n?VX(e,r,t,i):e}function wDt(e){var r=e.chart,t=e.options,i=t.data,n=t.areaStyle,a=t.color,o=t.point,l=t.line,s=t.isPercent,u=t.xField,c=t.yField,f=t.tooltip,h=t.seriesField,v=t.startOnZero,d=o==null?void 0:o.state,p=Fg(i,c,u,c,s);r.data(p);var x=s?A({formatter:function(w){return{name:w[h]||w[u],value:(Number(w[c])*100).toFixed(2)+"%"}}},f):f,m=J({},e,{options:{area:{color:a,style:n},line:l&&A({color:a},l),point:o&&A({color:a},o),tooltip:x,label:void 0,args:{startOnZero:v}}}),_=J({options:{line:{size:2}}},m,{options:{sizeField:h,tooltip:!1}}),b=J({},m,{options:{tooltip:!1,state:d}});return Sb(m),Vh(_),An(b),e}function CDt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Jr(r,"area");if(!i)a.label(!1);else{var o=i.callback,l=ue(i,["callback"]);a.label({fields:[n],callback:o,cfg:A({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},Or(l))})}return e}function SDt(e){var r=e.chart,t=e.options,i=t.isStack,n=t.isPercent,a=t.seriesField;return(n||i)&&a&&P(r.geometries,function(o){o.adjust("stack")}),e}function jX(e){return It(ie,Sn("areaStyle"),wDt,Tb,SDt,NX,GX,Ir,CDt,Cb,Xe(),Ae,ce,nc)(e)}var ADt=J({},Dt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left"}}),TDt=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 ADt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.isPercent,a=i.xField,o=i.yField,l=this,s=l.chart,u=l.options;Tb({chart:s,options:u}),this.chart.changeData(Fg(t,o,a,o,n))},r.prototype.getSchemaAdaptor=function(){return jX},r}(Dt);function HX(e,r){return!Mt(e)||!Mt(r)?"-":e===r?"100%":e===0?"\u221E":r===0?"-\u221E":(100*r/e).toFixed(2)+"%"}function MDt(e,r){return J({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:HX}},e)}function Gx(e,r){return je(r.getModel().points,function(t){return e.convertPoint(t)})}function EDt(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=Gx(f,r)[l?3:0],v=Gx(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)/2<m?(m=Math.max(1,(p-x)/2),_=[[h.x+m,h.y-s],[h.x+m,h.y-s-u],[v.x-m,v.y-s-u/2]]):_=[[h.x+m,h.y-s],[h.x+m,h.y-s-u],[v.x-m-x,v.y-s-u],[v.x-m,v.y-s-u/2],[v.x-m-x,v.y-s]]:(d-x)/2<m?(m=Math.max(1,(d-x)/2),_=[[h.x+s,h.y+m],[h.x+s+u,h.y+m],[v.x+s+u/2,v.y-m]]):_=[[h.x+s,h.y+m],[h.x+s+u,h.y+m],[v.x+s+u,v.y-m-x],[v.x+s+u/2,v.y-m],[v.x+s,v.y-m-x]],a.addShape("polygon",{id:i.id+"-conversion-tag-arrow-"+n.getElementId(r.getModel().mappingData),name:"conversion-tag-arrow",origin:{element:r,nextElement:t},attrs:A(A({},c.style||{}),{points:_})})}}function ODt(e,r,t){var i,n,a,o=e.view,l=e.geometry,s=e.group,u=e.options,c=e.field,f=e.horizontal,h=u.offset,v=u.size;if(typeof u.text!="boolean"){var d=o.getCoordinate(),p=((i=u.text)===null||i===void 0?void 0:i.formatter)&&((n=u.text)===null||n===void 0?void 0:n.formatter(r.getData()[c],t.getData()[c])),x=Gx(d,r)[f?3:0],m=Gx(d,t)[f?0:3],_=s.addShape("text",{id:o.id+"-conversion-tag-text-"+l.getElementId(r.getModel().mappingData),name:"conversion-tag-text",origin:{element:r,nextElement:t},attrs:A(A({},((a=u.text)===null||a===void 0?void 0:a.style)||{}),{text:p,x:f?(x.x+m.x)/2:x.x+h+v/2,y:f?x.y-h-v/2:(x.y+m.y)/2})});if(f){var b=m.x-x.x,w=_.getBBox().width;if(w>b){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<u;){r=t[i],n.save(),n.font=r.style+" "+r.weight+" "+~~((r.size+1)/a)+"px "+r.font;var c=n.measureText(r.text+"m").width*a,f=r.size<<1;if(r.rotate){var h=Math.sin(r.rotate*QS),v=Math.cos(r.rotate*QS),d=c*v,p=c*h,x=f*v,m=f*h;c=Math.max(Math.abs(d+m),Math.abs(d-m))+31>>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<f*w;S++)b[S]=0;if(o=r.xoff,o==null)return;l=r.yoff;for(var M=0,O=-1,F=0;F<f;F++){for(var S=0;S<c;S++){var L=w*F+(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<s;f++){c=0;for(var h=0;h<=n;h++)if((c<<l|(h<n?(c=i[f*n+h])>>>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.x0<t.x&&(t.x=r.x+r.x0),r.y+r.y0<t.y&&(t.y=r.y+r.y0),r.x+r.x1>i.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.x0<r[1].x&&e.y+e.y1>r[0].y&&e.y+e.y0<r[1].y}function JX(e){var r=e[0]/e[1];return function(t){return[r*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function T$t(e){var r=4,t=r*e[0]/e[1],i=0,n=0;return function(a){var o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:i+=t;break;case 1:n+=r;break;case 2:i-=t;break;default:n-=r;break}return[i,n]}}function rG(e){for(var r=[],t=-1;++t<e;)r[t]=0;return r}function M$t(){return document.createElement("canvas")}function to(e){return pt(e)?e:function(){return e}}var E$t={archimedean:JX,rectangular:T$t};function O$t(){var e=[256,256],r=m$t,t=x$t,i=eG,n=_$t,a=b$t,o=JX,l=Math.random,s=[],u=1/0,c=y$t,f=eG,h=M$t,v={};v.start=function(){var x=e[0],m=e[1],_=d(h()),b=v.board?v.board:rG((e[0]>>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<u&&++O<w;){var R=M[O];R.x=x*(l()+.5)>>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<N;tt++){W=0;for(var ot=0;ot<=k;ot++)x[q+ot]|=W<<G|(ot<k?(W=H[tt*k+ot])>>>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<b;F++)for(var L=0;L<_;L++){var D=w*F+(L>>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;u<t.length&&(s=t[u],l[i]!==s[i]&&(a=!1),l[n]!==s[n]&&(o=!1),!(!a&&!o));u++)l=s;var c=[];a&&c.push(i),o&&c.push(n);var f=se(q$t(e),c);return J({},e,{meta:f})}return e}function Z$t(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.color,o=t.shape,l=t.pointStyle,s=t.shapeField,u=t.colorField,c=t.xField,f=t.yField,h=t.sizeField,v=t.size,d=t.tooltip;h&&(v||(v=[2,8]),Mt(v)&&(v=[v,v])),d&&!d.fields&&(d=A(A({},d),{fields:[c,f,u,h,s]})),r.data(i),An(J({},e,{options:{seriesField:u,point:{color:a,shape:o,size:v,style:l},tooltip:d}}));var p=Jr(r,"point");return n&&p.adjust(n),e}function $0(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,l=e6(t);return It(We((r={},r[a]=i,r[o]=n,r)))(J({},e,{options:l}))}function Q$t(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return r.axis(a,i),r.axis(o,n),e}function K$t(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.shapeField,o=t.sizeField,l=t.shapeLegend,s=t.sizeLegend,u=i!==!1;return n&&r.legend(n,u?i:!1),a&&(l?r.legend(a,l):r.legend(a,l===!1?!1:i)),o&&r.legend(o,s||!1),!u&&!l&&!s&&r.legend(!1),e}function J$t(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Jr(r,"point");if(!i)a.label(!1);else{var o=i.callback,l=ue(i,["callback"]);a.label({fields:[n],callback:o,cfg:Or(l)})}return e}function tkt(e){var r=e.options,t=r.quadrant,i=[];if(t){var n=t.xBaseline,a=n===void 0?0:n,o=t.yBaseline,l=o===void 0?0:o,s=t.labels,u=t.regionStyle,c=t.lineStyle,f=W$t(a,l),h=new Array(4).join(",").split(",");h.forEach(function(v,d){i.push(A(A({type:"region",top:!1},f.regionStyle[d].position),{style:J({},f.regionStyle[d].style,u==null?void 0:u[d])}),A({type:"text",top:!0},J({},f.labelStyle[d],s==null?void 0:s[d])))}),i.push({type:"line",top:!1,start:["min",l],end:["max",l],style:J({},f.lineStyle,c)},{type:"line",top:!1,start:[a,"min"],end:[a,"max"],style:J({},f.lineStyle,c)})}return It(Xe(i))(e)}function ekt(e){var r=e.options,t=e.chart,i=r.regressionLine;if(i){var n=i.style,a=i.top,o=a===void 0?!1:a,l={stroke:"#9ba29a",lineWidth:2,opacity:.5};t.annotation().shape({top:o,render:function(s,u){var c=s.addGroup({id:t.id+"-regression-line",name:"regression-line-group"}),f=U$t({view:u,options:r});c.addShape("path",{name:"regression-line",attrs:A(A({path:f},l),n)})}})}return e}function rkt(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(i):i===!1&&r.tooltip(!1),e}function r6(e){return It(Z$t,$0,Q$t,K$t,rkt,J$t,YX,Ae,tkt,ce,ie,ekt)(e)}var ikt=J({},Dt.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});Lt("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var nkt=function(e){X(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.type="scatter",n.on(Gt.BEFORE_RENDER,function(a){var o,l,s=n,u=s.options,c=s.chart;if(((o=a.data)===null||o===void 0?void 0:o.source)===_i.FILTER){var f=n.chart.filterData(n.chart.getData());$0({chart:c,options:A(A({},u),{data:f})})}((l=a.data)===null||l===void 0?void 0:l.source)===_i.RESET&&$0({chart:c,options:u})}),n}return r.getDefaultOptions=function(){return ikt},r.prototype.changeData=function(t){this.updateOption(e6(J({},this.options,{data:t})));var i=this,n=i.options,a=i.chart;$0({chart:a,options:n}),this.chart.changeData(t)},r.prototype.getSchemaAdaptor=function(){return r6},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Dt);function akt(e){var r=e.chart,t=e.options,i=t.data,n=t.lineStyle,a=t.color,o=t.point,l=t.area;r.data(i);var s=J({},e,{options:{line:{style:n,color:a},point:o&&A({color:a},o),area:l&&A({color:a},l),label:void 0}}),u=J({},s,{options:{tooltip:!1}}),c=(o==null?void 0:o.state)||t.state,f=J({},s,{options:{tooltip:!1,state:c}});return Vh(s),An(f),Sb(u),e}function okt(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 lkt(e){var r=e.chart,t=e.options,i=t.radius,n=t.startAngle,a=t.endAngle;return r.coordinate("polar",{radius:i,startAngle:n,endAngle:a}),e}function skt(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis,a=t.yField,o=t.yAxis;return r.axis(i,n),r.axis(a,o),e}function ukt(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Jr(r,"line");if(!i)a.label(!1);else{var o=i.callback,l=ue(i,["callback"]);a.label({fields:[n],callback:o,cfg:Or(l)})}return e}function ckt(e){return It(akt,okt,ie,lkt,skt,Og,Ir,ukt,Ae,ce,Xe())(e)}var fkt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),r.prototype.getTooltipItems=function(t){var i=this.getTooltipCfg(),n=i.shared,a=i.title,o=e.prototype.getTooltipItems.call(this,t);if(o.length>0){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:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",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:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",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<t.length;n++)i=Math.min(i,t[n]);return i},e.exports.findMax=function(t){if(t.length===0)return-1/0;for(var i=t[0],n=1;n<t.length;n++)i=Math.max(i,t[n]);return i},e.exports.findMinMulti=function(t){for(var i=r.findMin(t[0]),n=1;n<t.length;n++)i=Math.min(i,r.findMin(t[n]));return i},e.exports.findMaxMulti=function(t){for(var i=r.findMax(t[0]),n=1;n<t.length;n++)i=Math.max(i,r.findMax(t[n]));return i},e.exports.inside=function(t,i,n){return t<=n&&n<=i}})(m6);(function(e){var r=50,t=2,i=Math.log(2),n=e.exports,a=m6.exports;function o(s){return 1-Math.abs(s)}e.exports.getUnifiedMinMax=function(s,u){return n.getUnifiedMinMaxMulti([s],u)},e.exports.getUnifiedMinMaxMulti=function(s,u){u=u||{};var c=!1,f=!1,h=a.isNumber(u.width)?u.width:t,v=a.isNumber(u.size)?u.size:r,d=a.isNumber(u.min)?u.min:(c=!0,a.findMinMulti(s)),p=a.isNumber(u.max)?u.max:(f=!0,a.findMaxMulti(s)),x=p-d,m=x/(v-1);return c&&(d=d-2*h*m),f&&(p=p+2*h*m),{min:d,max:p}},e.exports.create=function(s,u){if(u=u||{},!s||s.length===0)return[];var c=a.isNumber(u.size)?u.size:r,f=a.isNumber(u.width)?u.width:t,h=n.getUnifiedMinMax(s,{size:c,width:f,min:u.min,max:u.max}),v=h.min,d=h.max,p=d-v,x=p/(c-1);if(p===0)return[{x:v,y:1}];for(var m=[],_=0;_<c;_++)m.push({x:v+_*x,y:0});var b=function(R){return Math.floor((R-v)/x)},w=l(o,f),S=w[f],M=w[f-1]-w[f-2],O=0;s.forEach(function(R){var H=b(R);if(!(H+f<0||H-f>=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<s.length&&(f=h,c+=s[h].y,!(c>=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);h<v;){for(Bv(e,h,v),h++,v--;e[h]<f;)h++;for(;e[v]>f;)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;n<r.length;n++)i[n]=uG(t,r[n]);return i}else{var a=_6(t.length,r);return x6(t,a,0,t.length-1),uG(t,r)}}function x6(e,r,t,i){r%1===0?k0(e,r,t,i):(r=Math.floor(r),k0(e,r,t,i),k0(e,r+1,r+1,i))}function mRt(e,r){for(var t=[0],i=0;i<r.length;i++)t.push(_6(e.length,r[i]));t.push(e.length-1),t.sort(xRt);for(var n=[0,t.length-1];n.length;){var a=Math.ceil(n.pop()),o=Math.floor(n.pop());if(!(a-o<=1)){var l=Math.floor((o+a)/2);x6(e,t[l],Math.floor(t[o]),Math.ceil(t[a])),n.push(o,l,l,a)}}}function xRt(e,r){return e-r}function _6(e,r){var t=e*r;return r===1?e-1:r===0?0:t%1!==0?Math.ceil(t)-1:e%2===0?t-.5:t}var cG=function(e){return{low:Ei(e),high:vi(e),q1:Nv(e,.25),q3:Nv(e,.75),median:Nv(e,[.5]),minMax:[Ei(e),vi(e)],quantile:[Nv(e,.25),Nv(e,.75)]}},fG=function(e,r){var t=yRt.create(e,r);return{violinSize:t.map(function(i){return i.y}),violinY:t.map(function(i){return i.x})}},b6=function(e){var r=e.xField,t=e.yField,i=e.seriesField,n=e.data,a=e.kde,o={min:a.min,max:a.max,size:a.sampleSize,width:a.width};if(!i){var l=Xi(n,r);return Object.keys(l).map(function(c){var f=l[c],h=f.map(function(v){return v[t]});return A(A({x:c},fG(h,o)),cG(h))})}var s=[],u=Xi(n,i);return Object.keys(u).forEach(function(c){var f=Xi(u[c],r);return Object.keys(f).forEach(function(h){var v,d=f[h],p=d.map(function(x){return x[t]});s.push(A(A((v={x:h},v[i]=c,v),fG(p,o)),cG(p)))})}),s},Vn="x",Pu="violinY",_Rt="violinSize",w6="minMax",C6="quantile",S6="median",UP="violin_view",bRt="min_max_view",wRt="quantile_view",CRt="median_view",SRt=J({},Dt.getDefaultOptions(),{syncViewPadding:!0,kde:{type:"triangular",sampleSize:32,width:3},violinStyle:{lineWidth:1,fillOpacity:.3,strokeOpacity:.75},xAxis:{grid:{line:null},tickLine:{alignTick:!1}},yAxis:{grid:{line:{style:{lineWidth:.5,lineDash:[4,4]}}}},legend:{position:"top-left"},tooltip:{showMarkers:!1}}),R0=["low","high","q1","q3","median"],B0=[{type:"dodge",marginRatio:1/32}];function ARt(e){var r=e.chart,t=e.options;return r.data(b6(t)),e}function TRt(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.color,a=t.shape,o=a===void 0?"violin":a,l=t.violinStyle,s=t.tooltip,u=t.state,c=r.createView({id:UP});return vDt({chart:c,options:{xField:Vn,yField:Pu,seriesField:i||Vn,sizeField:_Rt,tooltip:A({fields:R0},s),violin:{style:l,color:n,shape:o},state:u}}),c.geometries[0].adjust(B0),e}function MRt(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.color,a=t.tooltip,o=t.box;if(o===!1)return e;var l=r.createView({id:bRt});ti({chart:l,options:{xField:Vn,yField:w6,seriesField:i||Vn,tooltip:A({fields:R0},a),state:typeof o=="object"?o.state:{},interval:{color:n,size:1,style:{lineWidth:0}}}}),l.geometries[0].adjust(B0);var s=r.createView({id:wRt});ti({chart:s,options:{xField:Vn,yField:C6,seriesField:i||Vn,tooltip:A({fields:R0},a),state:typeof o=="object"?o.state:{},interval:{color:n,size:8,style:{fillOpacity:1}}}}),s.geometries[0].adjust(B0);var u=r.createView({id:CRt});return An({chart:u,options:{xField:Vn,yField:S6,seriesField:i||Vn,tooltip:A({fields:R0},a),state:typeof o=="object"?o.state:{},point:{color:n,size:1,style:{fill:"white",lineWidth:0}}}}),u.geometries[0].adjust(B0),s.axis(!1),l.axis(!1),u.axis(!1),u.legend(!1),l.legend(!1),s.legend(!1),e}function ERt(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.xAxis,o=i.yAxis,l={},s=J(l,n,(r={},r[Vn]=A(A({sync:!0},se(a,ji)),{type:"cat"}),r[Pu]=A({sync:!0},se(o,ji)),r[w6]=A({sync:Pu},se(o,ji)),r[C6]=A({sync:Pu},se(o,ji)),r[S6]=A({sync:Pu},se(o,ji)),r));return t.scale(s),e}function ORt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=Yt(r,UP);return i===!1?a.axis(Vn,!1):a.axis(Vn,i),n===!1?a.axis(Pu,!1):a.axis(Pu,n),r.axis(!1),e}function FRt(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField,a=t.shape;if(i===!1)r.legend(!1);else{var o=n||Vn,l=r1(i,["selected"]);(!a||!a.startsWith("hollow"))&&(I(l,["marker","style","lineWidth"])||jt(l,["marker","style","lineWidth"],0)),r.legend(o,l),I(i,"selected")&&P(r.views,function(s){return s.legend(o,i)})}return e}function PRt(e){var r=e.chart,t=Yt(r,UP);return Xe()(A(A({},e),{chart:t})),e}function IRt(e){var r=e.chart,t=e.options,i=t.animation;return P(r.views,function(n){typeof i=="boolean"?n.animate(i):n.animate(!0),P(n.geometries,function(a){a.animate(i)})}),e}function LRt(e){return It(ie,ARt,TRt,MRt,ERt,Ir,ORt,FRt,Ae,PRt,IRt)(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t}return r.getDefaultOptions=function(){return SRt},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(b6(this.options))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return LRt},r})(Dt);var DRt=function(e){return function(r,t){var i=[];return i[0]=e(r[0],t[0]),i[1]=e(r[1],t[1]),i[2]=e(r[2],t[2]),i}},hG={normal:function(e){return e},multiply:function(e,r){return e*r/255},screen:function(e,r){return 255*(1-(1-e/255)*(1-r/255))},overlay:function(e,r){return r<128?2*e*r/255:255*(1-2*(1-e/255)*(1-r/255))},darken:function(e,r){return e>r?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<n;++u){s/=2;var c=r+s,f=e(c);if(f*o>=0&&(r=c),Math.abs(s)<a||f===0)return c}return r+s}function XT(e){for(var r=new Array(e),t=0;t<e;++t)r[t]=0;return r}function vG(e,r){return XT(e).map(function(){return XT(r)})}function Lf(e,r){for(var t=0,i=0;i<e.length;++i)t+=e[i]*r[i];return t}function UT(e){return Math.sqrt(Lf(e,e))}function qT(e,r,t){for(var i=0;i<r.length;++i)e[i]=r[i]*t}function Ho(e,r,t,i,n){for(var a=0;a<e.length;++a)e[a]=r*t[a]+i*n[a]}function A6(e,r,t){t=t||{};var i=t.maxIterations||r.length*200,n=t.nonZeroDelta||1.05,a=t.zeroDelta||.001,o=t.minErrorDelta||1e-6,l=t.minErrorDelta||1e-5,s=t.rho!==void 0?t.rho:1,u=t.chi!==void 0?t.chi:2,c=t.psi!==void 0?t.psi:-.5,f=t.sigma!==void 0?t.sigma:.5,h,v=r.length,d=new Array(v+1);d[0]=r,d[0].fx=e(r),d[0].id=0;for(var p=0;p<v;++p){var x=r.slice();x[p]=x[p]?x[p]*n:a,d[p+1]=x,d[p+1].fx=e(x),d[p+1].id=p+1}function m(H){for(var k=0;k<H.length;k++)d[v][k]=H[k];d[v].fx=H.fx}for(var _=function(H,k){return H.fx-k.fx},b=r.slice(),w=r.slice(),S=r.slice(),M=r.slice(),O=0;O<i;++O){if(d.sort(_),t.history){var F=d.map(function(H){var k=H.slice();return k.fx=H.fx,k.id=H.id,k});F.sort(function(H,k){return H.id-k.id}),t.history.push({x:d[0].slice(),fx:d[0].fx,simplex:F})}for(h=0,p=0;p<v;++p)h=Math.max(h,Math.abs(d[0][p]-d[1][p]));if(Math.abs(d[0].fx-d[v].fx)<o&&h<l)break;for(p=0;p<v;++p){b[p]=0;for(var L=0;L<v;++L)b[p]+=d[L][p];b[p]/=v}var D=d[v];if(Ho(w,1+s,b,-s,D),w.fx=e(w),w.fx<d[0].fx)Ho(M,1+u,b,-u,D),M.fx=e(M),M.fx<w.fx?m(M):m(w);else if(w.fx>=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<D.fx?m(S):R=!0):(Ho(S,1-c*s,b,c*s,D),S.fx=e(S),S.fx<w.fx?m(S):R=!0),R){if(f>=1)break;for(p=1;p<d.length;++p)Ho(d[p],1-f,d[0],f,d[p]),d[p].fx=e(d[p])}}else m(w)}return d.sort(_),{fx:d[0].fx,x:d[0]}}function BRt(e,r,t,i,n,a,o){var l=t.fx,s=Lf(t.fxprime,r),u=l,c=l,f=s,h=0;n=n||1,a=a||1e-6,o=o||.1;function v(p,x,m){for(var _=0;_<16;++_)if(n=(p+x)/2,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||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;c<u;++c){if(s=BRt(e,o,i,n,s),t.history&&t.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),alpha:s}),!s)qT(o,i.fxprime,-1);else{Ho(a,1,n.fxprime,-1,i.fxprime);var f=Lf(i.fxprime,i.fxprime),h=Math.max(0,Lf(a,n.fxprime)/f);Ho(o,h,o,-1,n.fxprime),l=i,i=n,n=l}if(UT(i.fxprime)<=1e-5)break}return t.history&&t.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),alpha:s}),i}var T6=1e-10;function qP(e,r){var t=zRt(e),i=t.filter(function(O){return GRt(O,e)}),n=0,a=0,o,l=[];if(i.length>1){var s=O6(i);for(o=0;o<i.length;++o){var u=i[o];u.angle=Math.atan2(u.x-s.x,u.y-s.y)}i.sort(function(O,F){return F.angle-O.angle});var c=i[i.length-1];for(o=0;o<i.length;++o){var f=i[o];a+=(c.x+f.x)*(f.y-c.y);for(var h={x:(f.x+c.x)/2,y:(f.y+c.y)/2},v=null,d=0;d<f.parentIndex.length;++d)if(c.parentIndex.indexOf(f.parentIndex[d])>-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;o<e.length;++o)e[o].radius<S.radius&&(S=e[o]);var M=!1;for(o=0;o<e.length;++o)if(Ta(e[o],S)>Math.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;t<r.length;++t)if(Ta(e,r[t])>r[t].radius+T6)return!1;return!0}function zRt(e){for(var r=[],t=0;t<e.length;++t)for(var i=t+1;i<e.length;++i)for(var n=E6(e[t],e[i]),a=0;a<n.length;++a){var o=n[a];o.parentIndex=[t,i],r.push(o)}return r}function ZT(e,r){return e*e*Math.acos(1-r/e)-(e-r)*Math.sqrt(r*(2*e-r))}function Ta(e,r){return Math.sqrt((e.x-r.x)*(e.x-r.x)+(e.y-r.y)*(e.y-r.y))}function M6(e,r,t){if(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;t<e.length;++t)r.x+=e[t].x,r.y+=e[t].y;return r.x/=e.length,r.y/=e.length,r}function VRt(e,r){r=r||{},r.maxIterations=r.maxIterations||500;var t=r.initialLayout||WRt,i=r.lossFunction||ZP;e=jRt(e);var n=t(e,r),a=[],o=[],l;for(l in n)n.hasOwnProperty(l)&&(a.push(n[l].x),a.push(n[l].y),o.push(l));for(var s=A6(function(f){for(var h={},v=0;v<o.length;++v){var d=o[v];h[d]={x:f[2*v],y:f[2*v+1],radius:n[d].radius}}return i(h,e)},a,r),u=s.x,c=0;c<o.length;++c)l=o[c],n[l].x=u[2*c],n[l].y=u[2*c+1];return n}var F6=1e-10;function QT(e,r,t){return Math.min(e,r)*Math.min(e,r)*Math.PI<=t+F6?Math.abs(e-r):RRt(function(i){return M6(e,r,i)-t},0,e+r)}function jRt(e){e=e.slice();var r=[],t={},i,n,a,o;for(i=0;i<e.length;++i){var l=e[i];l.sets.length==1?r.push(l.sets[0]):l.sets.length==2&&(a=l.sets[0],o=l.sets[1],t[[a,o]]=!0,t[[o,a]]=!0)}for(r.sort(function(s,u){return s>u?1:-1}),i=0;i<r.length;++i)for(a=r[i],n=i+1;n<r.length;++n)o=r[n],[a,o]in t||e.push({sets:[a,o],size:0});return e}function HRt(e,r,t){var i=vG(r.length,r.length),n=vG(r.length,r.length);return e.filter(function(a){return a.sets.length==2}).map(function(a){var o=t[a.sets[0]],l=t[a.sets[1]],s=Math.sqrt(r[o].size/Math.PI),u=Math.sqrt(r[l].size/Math.PI),c=QT(s,u,a.size);i[o][l]=i[l][o]=c;var f=0;a.size+1e-10>=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;a<r.length;++a)r[a]=0;for(a=0;a<t.length;++a)for(var o=e[2*a],l=e[2*a+1],s=a+1;s<t.length;++s){var u=e[2*s],c=e[2*s+1],f=t[a][s],h=i[a][s],v=(u-o)*(u-o)+(c-l)*(c-l),d=Math.sqrt(v),p=v-f*f;h>0&&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<o&&(t=n)}return t}function XRt(e,r){r=r||{};var t=r.restarts||10,i=[],n={},a;for(a=0;a<e.length;++a){var o=e[a];o.sets.length==1&&(n[o.sets[0]]=i.length,i.push(o))}var l=HRt(e,i,n),s=l.distances,u=l.constraints,c=UT(s.map(UT))/s.length;s=s.map(function(_){return _.map(function(b){return b/c})});var f=function(_,b){return YRt(_,b,s,u)},h,v;for(a=0;a<t;++a){var d=XT(s.length*2).map(Math.random);v=NRt(f,d,r),(!h||v.fx<h.fx)&&(h=v)}var p=h.x,x={};for(a=0;a<i.length;++a){var m=i[a];x[m.sets[0]]={x:p[2*a]*c,y:p[2*a+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(r.history)for(a=0;a<r.history.length;++a)qT(r.history[a].x,c);return x}function URt(e,r){for(var t=r&&r.lossFunction?r.lossFunction:ZP,i={},n={},a,o=0;o<e.length;++o){var l=e[o];l.sets.length==1&&(a=l.sets[0],i[a]={x:1e10,y:1e10,rowid:Object.keys(i).length,size:l.size,radius:Math.sqrt(l.size/Math.PI)},n[a]=[])}e=e.filter(function(B){return B.sets.length==2});for(var o=0;o<e.length;++o){var s=e[o],u=s.hasOwnProperty("weight")?s.weight:1,c=s.sets[0],f=s.sets[1];s.size+F6>=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<n[a].length;++o)v+=n[a][o].size*n[a][o].weight;h.push({set:a,size:v})}function d(B,G){return G.size-B.size}h.sort(d);var p={};function x(B){return B.set in p}function m(B,G){i[G].x=B.x,i[G].y=B.y,p[G]=!0}m({x:0,y:0},h[0].set);for(var o=1;o<h.length;++o){var _=h[o].set,b=n[_].filter(x);if(a=i[_],b.sort(d),b.length===0)throw"ERROR: missing pairwise overlap information";for(var w=[],S=0;S<b.length;++S){var M=i[b[S].set],O=QT(a.radius,M.radius,b[S].size);w.push({x:M.x+O,y:M.y}),w.push({x:M.x-O,y:M.y}),w.push({y:M.y+O,x:M.x}),w.push({y:M.y-O,x:M.x});for(var F=S+1;F<b.length;++F)for(var L=i[b[F].set],D=QT(a.radius,L.radius,b[F].size),R=E6({x:M.x,y:M.y,radius:O},{x:L.x,y:L.y,radius:D}),H=0;H<R.length;++H)w.push(R[H])}for(var k=1e50,V=w[0],S=0;S<w.length;++S){i[_].x=w[S].x,i[_].y=w[S].y;var U=t(i,e);U<k&&(k=U,V=w[S])}m(V,_)}return i}function ZP(e,r){var t=0;function i(c){return c.map(function(f){return e[f]})}for(var n=0;n<r.length;++n){var a=r[n],o=void 0;if(a.sets.length!=1){if(a.sets.length==2){var l=e[a.sets[0]],s=e[a.sets[1]];o=M6(l.radius,s.radius,Ta(l,s))}else o=qP(i(a.sets));var u=a.hasOwnProperty("weight")?a.weight:1;t+=u*(o-a.size)*(o-a.size)}}return t}function qRt(e){var r=function(t){var i=Math.max.apply(null,e.map(function(a){return a[t]+a.radius})),n=Math.min.apply(null,e.map(function(a){return a[t]-a.radius}));return{max:i,min:n}};return{xRange:r("x"),yRange:r("y")}}function ZRt(e,r,t,i){var n=[],a=[];for(var o in e)e.hasOwnProperty(o)&&(a.push(o),n.push(e[o]));r-=2*i,t-=2*i;var l=qRt(n),s=l.xRange,u=l.yRange;if(s.max==s.min||u.max==u.min)return console.log("not scaling solution: zero size detected"),e;for(var c=r/(s.max-s.min),f=t/(u.max-u.min),h=Math.min(f,c),v=(r-(s.max-s.min)*h)/2,d=(t-(u.max-u.min)*h)/2,p={},x=0;x<n.length;++x){var m=n[x];p[a[x]]={radius:h*m.radius,x:i+v+(m.x-s.min)*h,y:i+d+(m.y-u.min)*h}}return p}function JS(e,r,t){var i=r[0].radius-Ta(r[0],e),n,a;for(n=1;n<r.length;++n)a=r[n].radius-Ta(r[n],e),a<=i&&(i=a);for(n=0;n<t.length;++n)a=Ta(t[n],e)-t[n].radius,a<=i&&(i=a);return i}function P6(e,r){var t=[],i;for(i=0;i<e.length;++i){var n=e[i];t.push({x:n.x,y:n.y}),t.push({x:n.x+n.radius/2,y:n.y}),t.push({x:n.x-n.radius/2,y:n.y}),t.push({x:n.x,y:n.y+n.radius/2}),t.push({x:n.x,y:n.y-n.radius/2})}var a=t[0],o=JS(t[0],e,r);for(i=1;i<t.length;++i){var l=JS(t[i],e,r);l>=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;i<e.length;++i)if(Ta(u,e[i])>e[i].radius){c=!1;break}for(i=0;i<r.length;++i)if(Ta(u,r[i])<r[i].radius){c=!1;break}if(!c)if(e.length==1)u={x:e[0].x,y:e[0].y};else{var f={};qP(e,f),f.arcs.length===0?u={x:0,y:-1e3,disjoint:!0}:f.arcs.length==1?u={x:f.arcs[0].circle.x,y:f.arcs[0].circle.y}:r.length?u=P6(e,[]):u=O6(f.arcs.map(function(h){return h.p1}))}return u}function QRt(e){var r={},t=[];for(var i in e)t.push(i),r[i]=[];for(var n=0;n<t.length;n++)for(var a=e[t[n]],o=n+1;o<t.length;++o){var l=e[t[o]],s=Ta(a,l);s+l.radius<=a.radius+1e-10?r[t[o]].push(t[n]):s+a.radius<=l.radius+1e-10&&r[t[n]].push(t[o])}return r}function KRt(e,r){for(var t={},i=QRt(e),n=0;n<r.length;++n){for(var a=r[n].sets,o={},l={},s=0;s<a.length;++s){o[a[s]]=!0;for(var u=i[a[s]],c=0;c<u.length;++c)l[u[c]]=!0}var f=[],h=[];for(var v in e)v in o?f.push(e[v]):v in l||h.push(e[v]);var d=P6(f,h);t[a]=d,d.disjoint&&r[n].size>0&&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;a<t.length;++a){var o=t[a],l=o.circle.radius,s=o.width>l;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;r<arguments.length;r++)e[r]=arguments[r];return JSON.stringify(e)});function iBt(e,r,t,i){i===void 0&&(i=0);var n=e.data,a=e.setsField,o=e.sizeField;if(n.length===0)return sl(Oa.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),[];var l=n.map(function(f){var h;return A(A({},f),(h={sets:f[a]||[],size:f[o]},h[KT]="",h[rl]="",h))});l.sort(function(f,h){return f.sets.length-h.sets.length});var s=VRt(l),u=ZRt(s,r,t,i),c=KRt(u,l);return l.forEach(function(f){var h=f.sets,v=h.join(",");f[rl]=v;var d=h.map(function(m){return u[m]}),p=tBt(d);/[zZ]$/.test(p)||(p+=" Z"),f[KT]=p;var x=c[v]||{x:0,y:0};Qt(f,x)}),l}function nBt(e,r){for(var t=0;t<r.length;t++)if(!e.includes(r[t]))return!1;return!0}function aBt(e){return J({},e.defaultStyle,{fill:e.color},e.style)}Jt("schema","venn",{draw:function(e,r){var t=e.data,i=c1(t[KT]),n=aBt(e),a=r.addGroup({name:"venn-shape"});a.addShape("path",{attrs:A(A({},n),{path:i}),name:"venn-path"});var o=e.customInfo,l=o.offsetX,s=o.offsetY,u=Oi.transform(null,[["t",l,s]]);return a.setMatrix(u),a},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{lineWidth:0,stroke:r,fill:r,r:4}}}});var oBt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelPoint=function(t,i,n){var a=t.data,o=a.x,l=a.y,s=t.customLabelInfo,u=s.offsetX,c=s.offsetY;return{content:t.content[n],x:o+u,y:l+c}},r}(pg);kh("venn",oBt);function Eb(e){if(!!e){var r=e.geometries[0].elements;r.forEach(function(t){t.shape.toFront()})}}var lBt=hg("element-active"),sBt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Eb(this.context.view)},r.prototype.active=function(){e.prototype.active.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(lBt),uBt=hg("element-highlight"),cBt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Eb(this.context.view)},r.prototype.highlight=function(){e.prototype.highlight.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.clear=function(){e.prototype.clear.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(uBt),fBt=hg("element-selected"),hBt=hg("element-single-selected"),vBt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Eb(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(fBt),dBt=function(e){X(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Eb(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(hBt);Et("venn-element-active",sBt);Et("venn-element-highlight",cBt);Et("venn-element-selected",vBt);Et("venn-element-single-selected",dBt);Lt("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]});Lt("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]});Lt("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]});Lt("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]});Lt("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]});Lt("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]});var pBt=40;function I6(e,r,t){var i=e.chart,n=e.options,a=n.blendMode,o=n.setsField,l=i.getTheme(),s=l.colors10,u=l.colors20,c=t;it(c)||(c=r.filter(function(h){return h[o].length===1}).length<=10?s:u);var f=rBt(c,r,a,o);return function(h){return f.get(h)||c[0]}}function gBt(e,r){var t=e.options,i=t.color;if(typeof i!="function"){var n=typeof i=="string"?[i]:i,a=I6(e,r,n);return function(o){return a(o[rl])}}return i}function yBt(e){var r=e.chart,t=e.options,i=t.legend,n=t.appendPadding,a=t.padding,o=As(n);return i!==!1&&(o=_b(n,I(i,"position"),pBt)),r.appendPadding=BP([o,a]),e}function mBt(e){var r=e.options,t=r.data;t||(sl(Oa.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),t=[]);var i=t.filter(function(a){return a.sets.length===1}).map(function(a){return a.sets[0]}),n=t.filter(function(a){var o=a.sets;return nBt(i,o)});return Ge(n,t)||sl(Oa.WARN,!1,"warn: %s","\u4EA4\u96C6\u4E2D\u4E0D\u80FD\u51FA\u73B0\u4E0D\u5B58\u5728\u7684\u96C6\u5408, \u8BF7\u8F93\u5165\u5408\u6CD5\u6570\u636E"),ft({},e,{options:{data:n}})}function xBt(e){var r=e.chart,t=e.options,i=t.pointStyle,n=t.setsField,a=t.sizeField,o=As(r.appendPadding),l=o[0],s=o[1],u=o[2],c=o[3],f={offsetX:c,offsetY:l},h=r.viewBBox,v=h.width,d=h.height,p=iBt(t,Math.max(v-(s+c),0),Math.max(d-(l+u),0),0);r.data(p);var x=VP(J({},e,{options:{xField:"x",yField:"y",sizeField:a,seriesField:rl,rawFields:[n,a],schema:{shape:"venn",style:i}}})).ext,m=x.geometry;m.customInfo(f);var _=gBt(e,p);return typeof _=="function"&&m.color(rl,function(b){var w=p.find(function(M){return M[rl]===b}),S=I6(e,p)(b);return _(w,S)}),e}function _Bt(e){var r=e.chart,t=e.options,i=t.label,n=As(r.appendPadding),a=n[0],o=n[3],l={offsetX:o,offsetY:a},s=Jr(r,"schema");if(!i)s.label(!1);else{var u=i.callback,c=ue(i,["callback"]);s.label({fields:["id"],callback:u,cfg:ft({},Or(c),{type:"venn",customLabelInfo:l})})}return e}function bBt(e){var r=e.chart,t=e.options,i=t.legend,n=t.sizeField;return r.legend(rl,i),r.legend(n,!1),e}function wBt(e){var r=e.chart;return r.axis(!1),e}function CBt(e){var r=e.options,t=e.chart,i=r.interactions;if(i){var n={"legend-active":"venn-legend-active","legend-highlight":"venn-legend-highlight"};Ae(J({},e,{options:{interactions:i.map(function(a){return A(A({},a),{type:n[a.type]||a.type})})}}))}return t.removeInteraction("legend-active"),t.removeInteraction("legend-highlight"),e}function SBt(e){return It(yBt,ie,mBt,xBt,_Bt,We({}),bBt,wBt,Ir,CBt,ce)(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="venn",t}return r.getDefaultOptions=function(){return eBt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return SBt},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r})(Dt);var up="$$stock-range$$",Ob="trend",L6="up",D6="down",ABt={showMarkers:!1,showCrosshairs:!0,shared:!0,crosshairs:{type:"xy",follow:!0,text:function(e,r,t){var i;if(e==="x"){var n=t[0];i=n?n.title:r}else i=r;return{position:e==="y"?"start":"end",content:i,style:{fill:"#dfdfdf"}}},textBackground:{padding:[2,4],style:{fill:"#666"}}}},TBt=J({},Dt.getDefaultOptions(),{tooltip:ABt,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"});function $6(e,r){return je(e,function(t){if(it(r)){var i=r[0],n=r[1],a=r[2],o=r[3];t[Ob]=t[i]<=t[n]?L6:D6,t[up]=[t[i],t[n],t[a],t[o]]}return t})}function MBt(e){var r=e.chart,t=e.options,i=t.yField,n=t.data,a=t.risingFill,o=t.fallingFill,l=t.tooltip,s=t.stockStyle;r.data($6(n,i));var u=l;return u!==!1&&(u=J({},{fields:i},u)),VP(J({},e,{options:{schema:{shape:"candle",color:[a,o],style:s},yField:up,seriesField:Ob,rawFields:i,tooltip:u}})),e}function EBt(e){var r,t,i=e.chart,n=e.options,a=n.meta,o=n.xAxis,l=n.yAxis,s=n.xField,u=(r={},r[s]={type:"timeCat",tickCount:6},r[Ob]={values:[L6,D6]},r),c=J(u,a,(t={},t[s]=se(o,ji),t[up]=se(l,ji),t));return i.scale(c),e}function OBt(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(up,!1):r.axis(up,n),e}function FBt(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==!1?r.tooltip(i):r.tooltip(!1),e}function PBt(e){var r=e.chart,t=e.options,i=t.legend;return i?r.legend(Ob,i):i===!1&&r.legend(!1),e}function IBt(e){It(ie,MBt,EBt,OBt,FBt,PBt,Ae,ce,Xe(),Cb)(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="stock",t}return r.getDefaultOptions=function(){return TBt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return IBt},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField;this.chart.changeData($6(t,i))},r})(Dt);var tA,Ts="$$percentage$$",Ms="$$mappingValue$$",il="$$conversion$$",JT="$$totalPercentage$$",cp="$$x$$",fp="$$y$$",LBt={appendPadding:[0,80],minSize:0,maxSize:1,meta:(tA={},tA[Ms]={min:0,max:1,nice:!1},tA),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)"}}};function k6(e,r,t){var i=[],n=t.yField,a=t.maxSize,o=t.minSize,l=I(Zx(r,n),[n]),s=Mt(a)?a:1,u=Mt(o)?o:0;return i=je(e,function(c,f){var h=(c[n]||0)/l;return c[Ts]=h,c[Ms]=(s-u)*h+u,c[il]=[I(e,[f-1,n]),c[n]],c}),i}function QP(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[Ms]))){var u=e(l,s,a,{top:!0,text:{content:pt(o)?o(l,a):o,offsetX:n.offsetX,offsetY:n.offsetY,position:"end",autoRotate:!1,style:A({textAlign:"start",textBaseline:"middle"},n.style)}});t.annotation().line(u)}})}return r}}function DBt(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=k6(n,n,{yField:a,maxSize:o,minSize:l});return r.data(s),e}function $Bt(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=ra(o,[i,n]),v=h.fields,d=h.formatter;Ki({chart:r,options:{type:"interval",xField:i,yField:Ms,colorField:i,tooltipFields:it(v)&&v.concat([Ts,il]),mapping:{shape:u,tooltip:d,color:a,style:c},label:l,state:f}});var p=Jr(e.chart,"interval");return p.adjust("symmetric"),e}function kBt(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[]:[["transpose"],["scale",1,-1]]}),e}function RBt(e){var r=e.options,t=r.maxSize,i=function(n,a,o,l){var s=t-(t-n[Ms])/2;return A(A({},l),{start:[a-.5,s],end:[a-.5,s+.05]})};return QP(i)(e),e}function R6(e){return It(DBt,$Bt,kBt,RBt)(e)}function BBt(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 NBt(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 _=k6(x.data,i,{yField:a,maxSize:c,minSize:f});p.data(_);var b=ra(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"}};Ki({chart:p,options:{type:"interval",xField:n,yField:Ms,colorField:n,tooltipFields:it(w)&&w.concat([Ts,il]),mapping:{shape:"funnel",tooltip:S,color:o,style:v},label:h===!1?!1:J({},M,h),state:d}})}}),e}function GBt(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 J({},f,{start:[u-.5,s[Ms]],end:[u-.5,s[Ms]+.05],text:n?{style:{textAlign:"start"}}:{offsetX:i!==!1?h*i.offsetX:0,style:{textAlign:o===0?"end":"start"}}})};QP(l)(J({},{chart:a,options:t}))})}),e}function zBt(e){return It(BBt,NBt,GBt)(e)}function VBt(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 jBt(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){R6(J({},e,{chart:a,options:{data:o.data}}))}}),e}function HBt(e){return It(VBt,jBt)(e)}function YBt(e){var r=e.chart,t=e.options,i=t.data,n=i===void 0?[]:i,a=t.yField,o=Zr(n,function(u,c){return u+(c[a]||0)},0),l=Zx(n,a)[a],s=je(n,function(u,c){var f=[],h=[];if(u[JT]=(u[a]||0)/o,c){var v=n[c-1][cp],d=n[c-1][fp];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[JT],f[2]=(h[2]+1)/4,h[3]=h[2],f[3]=-f[2],u[cp]=f,u[fp]=h,u[Ts]=(u[a]||0)/l,u[il]=[I(n,[c-1,a]),u[a]],u});return r.data(s),e}function WBt(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=ra(o,[i,n]),f=c.fields,h=c.formatter;return Ki({chart:r,options:{type:"polygon",xField:cp,yField:fp,colorField:i,tooltipFields:it(f)&&f.concat([Ts,il]),label:l,state:u,mapping:{tooltip:h,color:a,style:s}}}),e}function XBt(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[["transpose"],["reflect","x"]]:[]}),e}function UBt(e){var r=function(t,i,n,a){return A(A({},a),{start:[t[cp][1],t[fp][1]],end:[t[cp][1]+.05,t[fp][1]]})};return QP(r)(e),e}function qBt(e){return It(YBt,WBt,XBt,UBt)(e)}function ZBt(e){var r=e.options,t=r.compareField,i=r.xField,n=r.yField,a=r.locale,o=r.funnelStyle,l=r.data,s=bb(a),u={label:t?{fields:[i,n,t,Ts,il],formatter:function(f){return""+f[n]}}:{fields:[i,n,Ts,il],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"])+": "+HX.apply(void 0,f[il])}}},c;return(t||o)&&(c=function(f){return J({},t&&{lineWidth:1,stroke:"#fff"},pt(o)?o(f):o)}),J({options:u},e,{options:{funnelStyle:c,data:fi(l)}})}function QBt(e){var r=e.options,t=r.compareField,i=r.dynamicHeight,n=r.seriesField;return n?HBt(e):t?zBt(e):i?qBt(e):R6(e)}function KBt(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 JBt(e){var r=e.chart;return r.axis(!1),e}function tNt(e){var r=e.chart,t=e.options,i=t.legend;return i===!1?r.legend(!1):r.legend(i),e}function B6(e){return It(ZBt,QBt,KBt,JBt,Ir,Ae,tNt,ce,ie,Xe())(e)}var eNt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="funnel",t}return r.getDefaultOptions=function(){return LBt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return B6},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.CONVERSATION_FIELD=il,r.PERCENT_FIELD=Ts,r.TOTAL_PERCENT_FIELD=JT,r}(Dt),rNt="liquid";function N6(e){return[{percent:e,type:rNt}]}function iNt(e){var r=e.chart,t=e.options,i=t.percent,n=t.liquidStyle,a=t.radius,o=t.outline,l=t.wave,s=t.shape;r.scale({percent:{min:0,max:1}}),r.data(N6(i));var u=t.color||r.getTheme().defaultColor,c=J({},e,{options:{xField:"type",yField:"percent",widthRatio:a,interval:{color:u,style:n,shape:"liquid-fill-gauge"}}}),f=ti(c).ext,h=f.geometry,v=r.getTheme().background,d={radius:a,outline:o,wave:l,shape:s,background:v};return h.customInfo(d),r.legend(!1),r.axis(!1),r.tooltip(!1),e}function G6(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent,o=i.meta;t.getController("annotation").clear(!0);var l=I(o,["percent","formatter"])||function(u){return(u*100).toFixed(2)+"%"},s=n.content;return s&&(s=J({},s,{content:K(s.content)?l(a):s.content})),xb(t,{statistic:A(A({},n),{content:s}),plotType:"liquid"},{percent:a}),r&&t.render(!0),e}function nNt(e){return It(ie,Sn("liquidStyle"),iNt,G6,We({}),ce,Ae)(e)}var aNt={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"},dG=5e3;function pG(e,r,t){return e+(r-e)*t}function oNt(e){var r=A({opacity:1},e.style);return e.color&&!r.fill&&(r.fill=e.color),r}function lNt(e){var r={fill:"#fff",fillOpacity:0,lineWidth:4},t=Qt({},r,e.style);return e.color&&!t.stroke&&(t.stroke=e.color),Mt(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity),t}function sNt(e,r,t,i){return r===0?[[e+1/2*t/Math.PI/2,i/2],[e+1/2*t/Math.PI,i],[e+t/4,i]]:r===1?[[e+1/2*t/Math.PI/2*(Math.PI-2),i],[e+1/2*t/Math.PI/2*(Math.PI-1),i/2],[e+t/4,0]]:r===2?[[e+1/2*t/Math.PI/2,-i/2],[e+1/2*t/Math.PI,-i],[e+t/4,-i]]:[[e+1/2*t/Math.PI/2*(Math.PI-2),-i],[e+1/2*t/Math.PI/2*(Math.PI-1),-i/2],[e+t/4,0]]}function uNt(e,r,t,i,n,a,o){for(var l=Math.ceil(2*e/t*4)*4,s=[],u=i;u<-Math.PI*2;)u+=Math.PI*2;for(;u>0;)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;h<l;++h){var v=h%4,d=sNt(h*t/4,v,t,n);s.push(["C",d[0][0]+c,-d[0][1]+r,d[1][0]+c,-d[1][1]+r,d[2][0]+c,-d[2][1]+r]),h===l-1&&(f=d[2][0])}return s.push(["L",f+c,o+e]),s.push(["L",c,o+e]),s.push(["Z"]),s}function cNt(e,r,t,i,n,a,o,l,s){for(var u=n.fill,c=n.opacity,f=o.getBBox(),h=f.maxX-f.minX,v=f.maxY-f.minY,d=0;d<i;d++){var p=i<=1?0:d/(i-1),x=a.addShape("path",{name:"waterwave-path",attrs:{path:uNt(l,f.minY+v*t,s,0,h/32,e,r),fill:u,opacity:pG(.2,.9,p)*c}});try{var m=YT([["t",s,0]]);x.stopAnimate(),x.animate({matrix:m},{duration:pG(.5*dG,dG,p),repeat:!0})}catch{console.warn("off-screen group animate error!")}}}function fNt(e,r,t,i){var n=t*2/3,a=Math.max(n,i),o=n/2,l=e,s=o+r-a/2,u=Math.asin(o/((a-o)*.85)),c=Math.sin(u)*o,f=Math.cos(u)*o,h=l-f,v=s+c,d=e,p=s+o/Math.sin(u);return`
M `+h+" "+v+`
A `+o+" "+o+" 0 1 1 "+(h+f*2)+" "+v+`
Q `+d+" "+p+" "+e+" "+(r+a/2)+`
Q `+d+" "+p+" "+h+" "+v+`
Z
`}function hNt(e,r,t,i){var n=t/2,a=i/2;return`
M `+e+" "+(r-a)+`
a `+n+" "+a+" 0 1 0 0 "+a*2+`
a `+n+" "+a+" 0 1 0 0 "+-a*2+`
Z
`}function vNt(e,r,t,i){var n=i/2,a=t/2;return`
M `+e+" "+(r-n)+`
L `+(e+a)+" "+r+`
L `+e+" "+(r+n)+`
L `+(e-a)+" "+r+`
Z
`}function dNt(e,r,t,i){var n=i/2,a=t/2;return`
M `+e+" "+(r-n)+`
L `+(e+a)+" "+(r+n)+`
L `+(e-a)+" "+(r+n)+`
Z
`}function pNt(e,r,t,i){var n=.618,a=i/2,o=t/2*n;return`
M `+(e-o)+" "+(r-a)+`
L `+(e+o)+" "+(r-a)+`
L `+(e+o)+" "+(r+a)+`
L `+(e-o)+" "+(r+a)+`
Z
`}Jt("interval","liquid-fill-gauge",{draw:function(e,r){var t=.5,i=.5,n=e.customInfo,a=n,o=a.radius,l=a.shape,s=a.background,u=n.outline,c=n.wave,f=u.border,h=u.distance,v=c.count,d=c.length,p=Zr(e.points,function(H,k){return Math.min(H,k.x)},1/0),x=this.parsePoint({x:t,y:i}),m=this.parsePoint({x:p,y:i}),_=x.x-m.x,b=Math.min(_,m.y*o),w=oNt(e),S=lNt(Qt({},e,u)),M=b-f/2,O={pin:fNt,circle:hNt,diamond:vNt,triangle:dNt,rect:pNt},F=typeof l=="function"?l:O[l]||O.circle,L=F(x.x,x.y,M*2,M*2),D=r.addGroup({name:"waves"}),R=D.setClip({type:"path",attrs:{path:L}});return cNt(x.x,x.y,1-e.points[1].y,v,w,D,R,b*2,d),r.addShape("path",{name:"distance",attrs:{path:L,fill:"transparent",lineWidth:f+h*2,stroke:s==="transparent"?"#fff":s}}),r.addShape("path",{name:"wrap",attrs:Qt(S,{path:L,fill:"transparent",lineWidth:f})}),r}});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="liquid",t}return r.getDefaultOptions=function(){return aNt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},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(N6(t)),G6({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.getSchemaAdaptor=function(){return nNt},r})(Dt);function z6(e){var r=e.data,t=e.xField,i=e.measureField,n=e.rangeField,a=e.targetField,o=e.layout,l=[],s=[];r.forEach(function(f,h){var v;f[n].sort(function(d,p){return d-p}),f[n].forEach(function(d,p){var x,m=p===0?d:f[n][p]-f[n][p-1];l.push((x={rKey:n+"_"+p},x[t]=t?f[t]:String(h),x[n]=m,x))}),f[i].forEach(function(d,p){var x;l.push((x={mKey:f[i].length>1?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&&u<n.depth});n[KP]=l,n[H6]=((o=n.children)===null||o===void 0?void 0:o.length)||0,n[j6]=i,r.push(n)})}else e&&e.eachNode&&e.eachNode(function(n){r.push(n)});return r}var eI="ancestor-node",Y6="value",hp="path",wNt=[hp,j6,KP,H6,"name","depth","height"],CNt=J({},Dt.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}}),gG=4,SNt=0,yG=5,mG="drilldown-bread-crumb",ANt={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},vp="hierarchy-data-transform-params",TNt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=ANt,t}return r.prototype.click=function(){var t=I(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},r.prototype.resetPosition=function(){if(!!this.breadCrumbGroup){var t=this.context.view.getCoordinate(),i=this.breadCrumbGroup,n=i.getBBox(),a=this.getButtonCfg().position,o={x:t.start.x,y:t.end.y-(n.height+yG*2)};t.isPolar&&(o={x:0,y:0}),a==="bottom-left"&&(o={x:t.start.x,y:t.start.y});var l=Oi.transform(null,[["t",o.x+SNt,o.y+n.height+yG]]);i.setMatrix(l)}},r.prototype.back=function(){gr(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},r.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},r.prototype.drill=function(t){var i=this.context.view,n=I(i,["interactions","drill-down","cfg","transformData"],function(u){return u}),a=n(A({data:t.data},t[vp]));i.changeData(a);for(var o=[],l=t;l;){var s=l.data;o.unshift({id:s.name+"_"+l.height+"_"+l.depth,name:s.name,children:n(A({data:s},t[vp]))}),l=l.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(o)},r.prototype.backTo=function(t){if(!(!t||t.length<=0)){var i=this.context.view,n=nr(t).children;i.changeData(n),t.length>1?(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)}),l<n.length-1){var c=t.breadCrumbGroup.addShape({type:"text",name:i.name+"_"+o.name+"_divider",attrs:A(A({text:i.dividerText},i.textStyle),{x:a,y:0})}),f=c.getBBox();a+=f.width+gG}})},r.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},r.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),e.prototype.destroy.call(this)},r}(Ie),MNt={field:"value",size:[1,1],round:!1,padding:0,sort:function(e,r){return r.value-e.value},as:["x","y"],ignoreParentValue:!0};function ENt(e,r){r=Qt({},MNt,r);var t=r.as;if(!it(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=JP(r)}catch(s){console.warn(s)}var n=function(s){return A4().size(r.size).round(r.round).padding(r.padding)(Nh(s).sum(function(u){return gr(u.children)?r.ignoreParentValue?0:u[i]-Zr(u.children,function(c,f){return c+f[i]},0):u[i]}).sort(r.sort))},a=n(e),o=t[0],l=t[1];return a.each(function(s){var u,c;s[o]=[s.x0,s.x1,s.x1,s.x0],s[l]=[s.y1,s.y1,s.y0,s.y0],s.name=s.name||((u=s.data)===null||u===void 0?void 0:u.name)||((c=s.data)===null||c===void 0?void 0:c.label),s.data.name=s.name,["x0","x1","y0","y1"].forEach(function(f){t.indexOf(f)===-1&&delete s[f]})}),tI(a)}var ONt={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(e,r){return r.value-e.value},ratio:.5*(1+Math.sqrt(5))};function FNt(e,r){return e==="treemapSquarify"?RT[e].ratio(r):RT[e]}function W6(e,r){r=Qt({},ONt,r);var t=r.as;if(!it(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=JP(r)}catch(u){console.warn(u)}var n=FNt(r.tile,r.ratio),a=function(u){return O4().tile(n).size(r.size).round(r.round).padding(r.padding).paddingInner(r.paddingInner).paddingOuter(r.paddingOuter).paddingTop(r.paddingTop).paddingRight(r.paddingRight).paddingBottom(r.paddingBottom).paddingLeft(r.paddingLeft)(Nh(u).sum(function(c){return r.ignoreParentValue&&c.children?0:c[i]}).sort(r.sort))},o=a(e),l=t[0],s=t[1];return o.each(function(u){u[l]=[u.x0,u.x1,u.x1,u.x0],u[s]=[u.y1,u.y1,u.y0,u.y0],["x0","x1","y0","y1"].forEach(function(c){t.indexOf(c)===-1&&delete u[c]})}),tI(o)}function X6(e){var r=e.data,t=e.colorField,i=e.rawFields,n=e.hierarchyConfig,a=n===void 0?{}:n,o=a.activeDepth,l={partition:ENt,treemap:W6},s=e.seriesField,u=e.type||"partition",c=l[u](r,A(A({field:s||"value"},r1(a,["activeDepth"])),{type:"hierarchy."+u,as:["x","y"]})),f=[];return c.forEach(function(h){var v,d,p,x,m,_;if(h.depth===0||o>0&&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 c<u}return!1}Et("drill-down-action",TNt);Lt("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:xG},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:_G}],start:[{trigger:"element:click",isEnable:xG,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:_G,action:["drill-down-action:back"]}]});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sunburst",t}return r.getDefaultOptions=function(){return CNt},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return GNt},r.SUNBURST_ANCESTOR_FIELD=eI,r.SUNBURST_PATH_FIELD=hp,r.NODE_ANCESTORS_FIELD=KP,r})(Dt);var h0,jx="range",U6="type",Zl="percent",zNt="#f0f0f0",q6="indicator-view",Z6="range-view",VNt={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(h0={},h0[jx]={sync:"v"},h0[Zl]={sync:"v",tickCount:5,tickInterval:.2},h0),animation:!1};function jNt(e,r){return e.map(function(t,i){var n;return n={},n[jx]=t-(e[i-1]||0),n[U6]=""+i,n[Zl]=r,n}).filter(function(t){return!!t[jx]})}function Q6(e){var r;return[(r={},r[Zl]=Ce(e,0,1),r)]}function K6(e,r){var t=I(r,["ticks"],[]),i=gr(t)?t:[0,Ce(e,0,1),1];return jNt(i,e)}function HNt(e){var r=e.chart,t=e.options,i=t.percent,n=t.range,a=t.radius,o=t.innerRadius,l=t.startAngle,s=t.endAngle,u=t.axis,c=t.indicator,f=t.gaugeStyle,h=t.type,v=t.meter,d=n.color,p=n.width;if(c){var x=Q6(i),m=r.createView({id:q6});m.data(x),m.point().position(Zl+"*1").shape(c.shape||"gauge-indicator").customInfo({defaultColor:r.getTheme().defaultColor,indicator:c}),m.coordinate("polar",{startAngle:l,endAngle:s,radius:o*a}),m.axis(Zl,u),m.scale(Zl,se(u,ji))}var _=K6(i,t.range),b=r.createView({id:Z6});b.data(_);var w=Ct(d)?[d,zNt]:d,S=ti({chart:b,options:{xField:"1",yField:jx,seriesField:U6,rawFields:[Zl],isStack:!0,interval:{color:w,style:f,shape:h==="meter"?"meter-gauge":null},args:{zIndexReversed:!0},minColumnWidth:p,maxColumnWidth:p}}).ext,M=S.geometry;return M.customInfo({meter:v}),b.coordinate("polar",{innerRadius:o,radius:a,startAngle:l,endAngle:s}).transpose(),e}function YNt(e){var r;return It(We((r={range:{min:0,max:1,maxLimit:1,minLimit:0}},r[Zl]={},r)))(e)}function J6(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent;if(t.getController("annotation").clear(!0),n){var o=n.content,l=void 0;o&&(l=J({},{content:(a*100).toFixed(2)+"%",style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),qLt(t,{statistic:A(A({},n),{content:l})},{percent:a})}return r&&t.render(!0),e}function WNt(e){var r=e.chart;return r.legend(!1),r.tooltip(!1),e}function tU(e){return It(ie,ce,HNt,YNt,J6,Ae,Xe(),WNt)(e)}Jt("point","gauge-indicator",{draw:function(e,r){var t=e.customInfo,i=t.indicator,n=t.defaultColor,a=i,o=a.pointer,l=a.pin,s=r.addGroup(),u=this.parsePoint({x:0,y:0});return o&&s.addShape("line",{name:"pointer",attrs:A({x1:u.x,y1:u.y,x2:e.x,y2:e.y,stroke:n},o.style)}),l&&s.addShape("circle",{name:"pin",attrs:A({x:u.x,y:u.y,stroke:n},l.style)}),s}});Jt("interval","meter-gauge",{draw:function(e,r){var t=e.customInfo.meter,i=t===void 0?{}:t,n=i.steps,a=n===void 0?50:n,o=i.stepRatio,l=o===void 0?.5:o;a=a<1?1:a,l=Ce(l,0,1);var s=this.coordinate,u=s.startAngle,c=s.endAngle,f=0;if(l>0&&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=_;w<b;){var S=void 0,M=(w-u)%(v+f);M<v?S=w+(v-M):(w+=v+f-M,S=w+v);var O=Oi.getSectorPath(p.x,p.y,x,w,Math.min(S,b),x*this.coordinate.innerRadius);d.addShape("path",{name:"meter-gauge",attrs:{path:O,fill:e.color,stroke:e.color,lineWidth:.5}}),w=S+f}return d}});var XNt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="gauge",t}return r.getDefaultOptions=function(){return VNt},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});var i=this.chart.views.find(function(a){return a.id===q6});i&&i.data(Q6(t));var n=this.chart.views.find(function(a){return a.id===Z6});n&&n.data(K6(t,this.options.range)),J6({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 tU},r}(Dt),Hn="$$yField$$",Fb="$$diffField$$",rI="$$absoluteField$$",tM="$$isTotal$$",UNt={label:{},leaderLine:{style:{lineWidth:1,stroke:"#8c8c8c",lineDash:[4,2]}},total:{style:{fill:"rgba(0, 0, 0, 0.25)"}},interactions:[{type:"element-active"}],risingFill:"#f4664a",fallingFill:"#30bf78",waterfallStyle:{fill:"rgba(0, 0, 0, 0.25)"},yAxis:{grid:{line:{style:{lineDash:[4,2]}}}}};function qNt(e,r,t,i,n){var a,o=[];if(Zr(e,function(s,u){var c;sl(Oa.WARN,Mt(u[t]),u[t]+" is not a valid number");var f=Hl(u[t])?null:u[t];return o.push(A(A({},u),(c={},c[i]=[s,s+f],c))),s+f},0),o.length&&n){var l=I(o,[[e.length-1],i,[1]]);o.push((a={},a[r]=n.label,a[t]=l,a[i]=[0,l],a))}return o}function eU(e,r,t,i){var n=qNt(e,r,t,Hn,i);return n.map(function(a,o){var l;return qt(a)?A(A({},a),(l={},l[rI]=a[Hn][1],l[Fb]=a[Hn][1]-a[Hn][0],l[tM]=o===e.length,l)):a})}function ZNt(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return r.push(["L",a.x,a.y]),r.push(["z"]),r}function QNt(e){return J({},e.defaultStyle,e.style,{fill:e.color})}Jt("interval","waterfall",{draw:function(e,r){var t=e.customInfo,i=e.points,n=e.nextPoints,a=r.addGroup(),o=this.parsePath(ZNt(i)),l=QNt(e);a.addShape("path",{attrs:A(A({},l),{path:o})});var s=I(t,"leaderLine");if(s&&n){var u=[["M",i[2].x,i[2].y],["L",n[0].x,n[0].y]];i[2].y===n[1].y&&(u[1]=["L",n[1].x,n[1].y]),u=this.parsePath(u),a.addShape("path",{attrs:A({path:u},s.style||{})})}return a}});function KNt(e){var r=e.options,t=r.locale,i=r.total,n=bb(t).get(["waterfall","total"]);return i&&typeof i.label!="string"&&n&&(e.options.total.label=n),e}function JNt(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.total,l=t.leaderLine,s=t.columnWidthRatio,u=t.waterfallStyle,c=t.risingFill,f=t.fallingFill,h=t.color;r.data(eU(i,n,a,o));var v=h||function(m){return I(m,[tM])?I(o,["style","fill"],""):I(m,[Hn,1])-I(m,[Hn,0])>0?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;M<arguments.length;M++)S[M]=arguments[M];return _[d.position.apply(r,S)]});var b=((i=p.style)===null||i===void 0?void 0:i.textBaseline)||"bottom";p.style=J({},p.style,{textBaseline:b});var w={top:"bottom",bottom:"top",middle:"middle"};d.style=J({},d.style,{textBaseline:w[b]})}f.label({fields:[l[0]],callback:v,cfg:Or(p)}),h.label({fields:[l[1]],callback:v,cfg:Or(d)})}return e}function CGt(e){return It(pGt,gGt,yGt,xGt,_Gt,wGt,Ir,mGt,bGt)(e)}(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bidirectional-bar",t}return r.getDefaultOptions=function(){return J({},e.getDefaultOptions.call(this),{syncViewPadding:dGt})},r.prototype.changeData=function(t){t===void 0&&(t=[]),this.chart.emit(Gt.BEFORE_CHANGE_DATA,$e.fromData(this.chart,Gt.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var i=this.options,n=i.xField,a=i.yField,o=i.layout,l=iU(n,a,Iu,t,Uo(o)),s=l[0],u=l[1],c=Yt(this.chart,go),f=Yt(this.chart,yo);c.data(s),f.data(u),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 CGt},r.SERIES_FIELD_KEY=Iu,r})(Dt);function nU(e,r){if(!!it(e))return e.find(function(t){return t.type===r})}function aU(e,r){var t=nU(e,r);return t&&t.enable!==!1}function iI(e){var r=e.interactions,t=e.drilldown;return I(t,"enabled")||aU(r,"treemap-drill-down")}function SGt(e){var r=e.interactions["drill-down"];if(!!r){var t=r.context.actions.find(function(i){return i.name==="drill-down-action"});t.reset()}}function nI(e){var r=e.data,t=e.colorField,i=e.enableDrillDown,n=e.hierarchyConfig,a=W6(r,A(A({},n),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),o=[];return a.forEach(function(l){if(l.depth===0||i&&l.depth!==1||!i&&l.children)return null;var s=l.ancestors().map(function(h){return{data:h.data,height:h.height,value:h.value}}),u=i&&it(r.path)?s.concat(r.path.slice(1)):s,c=Object.assign({},l.data,A({x:l.x,y:l.y,depth:l.depth,value:l.value,path:u},l));if(!l.data[t]&&l.parent){var f=l.ancestors().find(function(h){return h.data[t]});c[t]=f==null?void 0:f.data[t]}else c[t]=l.data[t];c[vp]={hierarchyConfig:n,colorField:t,enableDrillDown:i},o.push(c)}),o}function AGt(e){var r=e.options,t=r.colorField;return J({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(i){return{name:i.name,value:i.value}}}}},e)}function TGt(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=t.rectStyle,o=t.hierarchyConfig,l=t.rawFields,s=nI({data:t.data,colorField:t.colorField,enableDrillDown:iI(t),hierarchyConfig:o});return r.data(s),Ab(J({},e,{options:{xField:"x",yField:"y",seriesField:n,rawFields:l,polygon:{color:i,style:a}}})),r.coordinate().reflect("y"),e}function MGt(e){var r=e.chart;return r.axis(!1),e}function EGt(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t,n=iI(e);return n?J({},e,{interactions:ye(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:nI}}])}):e}function OGt(e){var r=e.chart,t=e.options,i=t.interactions,n=t.drilldown;Ae({chart:r,options:EGt(t)});var a=nU(i,"view-zoom");a&&(a.enable!==!1?r.getCanvas().on("mousewheel",function(l){l.preventDefault()}):r.getCanvas().off("mousewheel"));var o=iI(t);return o&&(r.appendPadding=_b(r.appendPadding,I(n,["breadCrumb","position"]))),e}function FGt(e){return It(AGt,ie,Sn("rectStyle"),TGt,MGt,Og,Ir,OGt,ce,Xe())(e)}var PGt={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"\u521D\u59CB",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}};(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="treemap",t}return r.getDefaultOptions=function(){return PGt},r.prototype.changeData=function(t){var i=this.options,n=i.colorField,a=i.interactions,o=i.hierarchyConfig;this.updateOption({data:t});var l=nI({data:t,colorField:n,enableDrillDown:aU(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(l),SGt(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return FGt},r})(Dt);function IGt(e){return e.target.depth}function LGt(e){return e.depth}function DGt(e,r){return r-1-e.height}function aI(e,r){return e.sourceLinks.length?e.depth:r-1}function $Gt(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?uM(e.sourceLinks,IGt)-1:0}function v0(e){return function(){return e}}function rA(e,r){for(var t=0,i=0;i<e.length;i++)t+=r(e[i]);return t}function iA(e,r){for(var t=-1/0,i=0;i<e.length;i++)t=Math.max(r(e[i]),t);return t}function kGt(e,r){for(var t=1/0,i=0;i<e.length;i++)t=Math.min(r(e[i]),t);return t}function bG(e,r){return Hx(e.source,r.source)||e.index-r.index}function wG(e,r){return Hx(e.target,r.target)||e.index-r.index}function Hx(e,r){return e.y0-r.y0}function nA(e){return e.value}function RGt(e){return e.index}function BGt(e){return e.nodes}function NGt(e){return e.links}function CG(e,r){var t=e.get(r);if(!t)throw new Error("missing: "+r);return t}function SG(e){for(var r=e.nodes,t=0,i=r;t<i.length;t++){for(var n=i[t],a=n.y0,o=a,l=0,s=n.sourceLinks;l<s.length;l++){var u=s[l];u.y0=a+u.width/2,a+=u.width}for(var c=0,f=n.targetLinks;c<f.length;c++){var u=f[c];u.y1=o+u.width/2,o+=u.width}}}function GGt(){var e=0,r=0,t=1,i=1,n=24,a=8,o,l=RGt,s=aI,u,c,f,h=BGt,v=NGt,d=6;function p(B){var G={nodes:h(B),links:v(B)};return x(G),m(G),_(G),b(G),M(G),SG(G),G}p.update=function(B){return SG(B),B},p.nodeId=function(B){return arguments.length?(l=typeof B=="function"?B:v0(B),p):l},p.nodeAlign=function(B){return arguments.length?(s=typeof B=="function"?B:v0(B),p):s},p.nodeDepth=function(B){return arguments.length?(u=B,p):u},p.nodeSort=function(B){return arguments.length?(c=B,p):c},p.nodeWidth=function(B){return arguments.length?(n=+B,p):n},p.nodePadding=function(B){return arguments.length?(a=o=+B,p):a},p.nodes=function(B){return arguments.length?(h=typeof B=="function"?B:v0(B),p):h},p.links=function(B){return arguments.length?(v=typeof B=="function"?B:v0(B),p):v},p.linkSort=function(B){return arguments.length?(f=B,p):f},p.size=function(B){return arguments.length?(e=r=0,t=+B[0],i=+B[1],p):[t-e,i-r]},p.extent=function(B){return arguments.length?(e=+B[0][0],t=+B[1][0],r=+B[0][1],i=+B[1][1],p):[[e,r],[t,i]]},p.iterations=function(B){return arguments.length?(d=+B,p):d};function x(B){var G=B.nodes,N=B.links;G.forEach(function(et,lt){et.index=lt,et.sourceLinks=[],et.targetLinks=[]});var W=new Map(G.map(function(et){return[l(et),et]}));if(N.forEach(function(et,lt){et.index=lt;var dt=et.source,ht=et.target;typeof dt!="object"&&(dt=et.source=CG(W,dt)),typeof ht!="object"&&(ht=et.target=CG(W,ht)),dt.sourceLinks.push(et),ht.targetLinks.push(et)}),f!=null)for(var q=0,tt=G;q<tt.length;q++){var ot=tt[q],st=ot.sourceLinks,Z=ot.targetLinks;st.sort(f),Z.sort(f)}}function m(B){for(var G=B.nodes,N=0,W=G;N<W.length;N++){var q=W[N];q.value=q.fixedValue===void 0?Math.max(rA(q.sourceLinks,nA),rA(q.targetLinks,nA)):q.fixedValue}}function _(B){for(var G=B.nodes,N=G.length,W=new Set(G),q=new Set,tt=0;W.size;){if(W.forEach(function(et){et.depth=tt;for(var lt=0,dt=et.sourceLinks;lt<dt.length;lt++){var ht=dt[lt].target;q.add(ht)}}),++tt>N)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;Z<G.length;Z++)st=G[Z],st.depth=u.call(null,st,ot)}function b(B){for(var G=B.nodes,N=G.length,W=new Set(G),q=new Set,tt=0;W.size;){if(W.forEach(function(ot){ot.height=tt;for(var st=0,Z=ot.targetLinks;st<Z.length;st++){var et=Z[st].source;q.add(et)}}),++tt>N)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;tt<ot.length;tt++){var st=ot[tt],Z=Math.max(0,Math.min(N-1,Math.floor(s.call(null,st,N))));st.layer=Z,st.x0=e+Z*W,st.x1=st.x0+n,q[Z]?q[Z].push(st):q[Z]=[st]}if(c)for(var et=0,lt=q;et<lt.length;et++){var dt=lt[et];dt.sort(c)}return q}function S(B){for(var G=kGt(B,function(wt){return(i-r-(wt.length-1)*o)/rA(wt,nA)}),N=0,W=B;N<W.length;N++){for(var q=W[N],tt=r,ot=0,st=q;ot<st.length;ot++){var Z=st[ot];Z.y0=tt,Z.y1=tt+Z.value*G,tt=Z.y1+o;for(var et=0,lt=Z.sourceLinks;et<lt.length;et++){var dt=lt[et];dt.width=dt.value*G}}tt=(i-tt+o)/(q.length+1);for(var ht=0;ht<q.length;++ht){var Z=q[ht];Z.y0+=tt*(ht+1),Z.y1+=tt*(ht+1)}k(q)}}function M(B){var G=w(B);o=Math.min(a,(i-r)/(iA(G,function(tt){return tt.length})-1)),S(G);for(var N=0;N<d;++N){var W=Math.pow(.99,N),q=Math.max(1-W,(N+1)/d);F(G,W,q),O(G,W,q)}}function O(B,G,N){for(var W=1,q=B.length;W<q;++W){for(var tt=B[W],ot=0,st=tt;ot<st.length;ot++){for(var Z=st[ot],et=0,lt=0,dt=0,ht=Z.targetLinks;dt<ht.length;dt++){var wt=ht[dt],gt=wt.source,vt=wt.value,_t=vt*(Z.layer-gt.layer);et+=V(gt,Z)*_t,lt+=_t}if(lt>0){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;ot<st.length;ot++){for(var Z=st[ot],et=0,lt=0,dt=0,ht=Z.sourceLinks;dt<ht.length;dt++){var wt=ht[dt],gt=wt.target,vt=wt.value,_t=vt*(gt.layer-Z.layer);et+=U(Z,gt)*_t,lt+=_t}if(lt>0){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(;N<B.length;++N){var q=B[N],tt=(G-q.y0)*W;tt>1e-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<q.length;W++){var tt=q[W].source.sourceLinks;tt.sort(wG)}for(var ot=0,st=G;ot<st.length;ot++){var Z=st[ot].target.targetLinks;Z.sort(bG)}}}function k(B){if(f===void 0)for(var G=0,N=B;G<N.length;G++){var W=N[G],q=W.sourceLinks,tt=W.targetLinks;q.sort(wG),tt.sort(bG)}}function V(B,G){for(var N=B.y0-(B.sourceLinks.length-1)*o/2,W=0,q=B.sourceLinks;W<q.length;W++){var tt=q[W],ot=tt.target,st=tt.width;if(ot===G)break;N+=st+o}for(var Z=0,et=G.targetLinks;Z<et.length;Z++){var lt=et[Z],ot=lt.source,st=lt.width;if(ot===B)break;N-=st}return N}function U(B,G){for(var N=G.y0-(G.targetLinks.length-1)*o/2,W=0,q=G.targetLinks;W<q.length;W++){var tt=q[W],ot=tt.source,st=tt.width;if(ot===B)break;N+=st+o}for(var Z=0,et=B.sourceLinks;Z<et.length;Z++){var lt=et[Z],ot=lt.target,st=lt.width;if(ot===G)break;N-=st}return N}return p}var zGt={left:LGt,right:DGt,center:$Gt,justify:aI},VGt={nodeId:function(e){return e.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function jGt(e){var r=Ct(e)?zGt[e]:pt(e)?e:null;return r||aI}function HGt(e){return Qt({},VGt,e)}function YGt(e,r){var t=HGt(e),i=t.nodeId,n=t.nodeSort,a=t.nodeAlign,o=t.nodeWidth,l=t.nodePadding,s=t.nodeDepth,u=GGt().nodeSort(n).nodeWidth(o).nodePadding(l).nodeDepth(s).nodeAlign(jGt(a)).extent([[0,0],[1,1]]).nodeId(i),c=u(r);return c.nodes.forEach(function(f){var h=f.x0,v=f.x1,d=f.y0,p=f.y1;f.x=[h,v,v,h],f.y=[d,d,p,p]}),c.links.forEach(function(f){var h=f.source,v=f.target,d=h.x1,p=v.x0;f.x=[d,d,p,p];var x=f.width/2;f.y=[f.y0+x,f.y0-x,f.y1+x,f.y1-x]}),c}function WGt(e,r,t){var i=[];return e.forEach(function(n){var a=n[r],o=n[t];i.includes(a)||i.push(a),i.includes(o)||i.push(o)}),i}function XGt(e,r,t,i){var n={};return r.forEach(function(a){n[a]={},r.forEach(function(o){n[a][o]=0})}),e.forEach(function(a){n[a[t]][a[i]]=1}),n}function UGt(e,r,t){if(!it(e))return[];var i=[],n=WGt(e,r,t),a=XGt(e,n,r,t),o={};n.forEach(function(s){o[s]=0});function l(s){o[s]=1,n.forEach(function(u){if(a[s][u]!=0)if(o[u]==1)i.push(s+"_"+u);else{if(o[u]==-1)return;l(u)}}),o[s]=-1}return n.forEach(function(s){o[s]!=-1&&l(s)}),i.length!==0&&console.warn("sankey data contains circle, "+i.length+" records removed.",i),e.filter(function(s){return i.findIndex(function(u){return u===s[r]+"_"+s[t]})<0})}function qGt(e,r,t){return ic(e)?e/t:r}function ZGt(e,r,t){return ic(e)?e/t:r}function oU(e,r,t){var i=e.data,n=e.sourceField,a=e.targetField,o=e.weightField,l=e.nodeAlign,s=e.nodeSort,u=e.nodePadding,c=e.nodePaddingRatio,f=e.nodeWidth,h=e.nodeWidthRatio,v=e.nodeDepth,d=e.rawFields,p=d===void 0?[]:d,x=LX(UGt(i,n,a),n,a,o,p),m=YGt({nodeAlign:l,nodePadding:ZGt(u,c,t),nodeWidth:qGt(f,h,r),nodeSort:s,nodeDepth:v},x),_=m.nodes,b=m.links;return{nodes:_.map(function(w){return A(A({},se(w,ye(["x","y","name"],p))),{isNode:!0})}),edges:b.map(function(w){return A(A({source:w.source.name,target:w.target.name,name:w.source.name||w.target.name},se(w,ye(["x","y","value"],p))),{isNode:!1})})}}var AG="x",TG="y",MG="name",oI="nodes",lI="edges";function QGt(e){var r=e.options,t=r.rawFields,i=t===void 0?[]:t;return J({},{options:{tooltip:{fields:ss(ye(["name","source","target","value","isNode"],i))},label:{fields:ss(ye(["x","name"],i))}}},e)}function KGt(e){var r=e.chart,t=e.options,i=t.color,n=t.nodeStyle,a=t.edgeStyle,o=t.label,l=t.tooltip,s=t.nodeState,u=t.edgeState;r.legend(!1),r.tooltip(l),r.axis(!1),r.coordinate().reflect("y");var c=oU(t,r.width,r.height),f=c.nodes,h=c.edges,v=r.createView({id:lI});v.data(h),BX({chart:v,options:{xField:AG,yField:TG,seriesField:MG,edge:{color:i,style:a,shape:"arc"},tooltip:l,state:u}});var d=r.createView({id:oI});return d.data(f),Ab({chart:d,options:{xField:AG,yField:TG,seriesField:MG,polygon:{color:i,style:n},label:o,tooltip:l,state:s}}),r.interaction("element-active"),r.scale({x:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},y:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},name:{sync:"color",type:"cat"}}),e}function JGt(e){var r=e.chart,t=e.options,i=t.animation;typeof i=="boolean"?r.animate(i):r.animate(!0);var n=ye(r.views[0].geometries,r.views[1].geometries);return n.forEach(function(a){a.animate(i)}),e}function tzt(e){var r=e.chart,t=e.options,i=t.nodeDraggable,n="sankey-node-draggable";return i?r.interaction(n):r.removeInteraction(n),e}function ezt(e){return It(QGt,KGt,Ae,tzt,JGt,ie)(e)}var rzt=function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDragging=!1,t}return r.prototype.isNodeElement=function(){var t=I(this.context,"event.target");if(t){var i=t.get("element");return i&&i.getModel().data.isNode}return!1},r.prototype.getNodeView=function(){return Yt(this.context.view,oI)},r.prototype.getEdgeView=function(){return Yt(this.context.view,lI)},r.prototype.getCurrentDatumIdx=function(t){return this.getNodeView().geometries[0].elements.indexOf(t)},r.prototype.start=function(){if(this.isNodeElement()){this.prevPoint={x:I(this.context,"event.x"),y:I(this.context,"event.y")};var t=this.context.event.target.get("element"),i=this.getCurrentDatumIdx(t);if(i===-1)return;this.currentElementIdx=i,this.context.isDragging=!0,this.isDragging=!0,this.prevNodeAnimateCfg=this.getNodeView().getOptions().animate,this.prevEdgeAnimateCfg=this.getEdgeView().getOptions().animate,this.getNodeView().animate(!1),this.getEdgeView().animate(!1)}},r.prototype.translate=function(){if(this.isDragging){var t=this.context.view,i={x:I(this.context,"event.x"),y:I(this.context,"event.y")},n=i.x-this.prevPoint.x,a=i.y-this.prevPoint.y,o=this.getNodeView(),l=o.geometries[0].elements[this.currentElementIdx];if(l&&l.getModel()){var s=l.getModel().data,u=o.getOptions().data,c=o.getCoordinate(),f={x:n/c.getWidth(),y:a/c.getHeight()},h=A(A({},s),{x:s.x.map(function(m){return m+=f.x}),y:s.y.map(function(m){return m+=f.y})}),v=ye(u);v[this.currentElementIdx]=h,o.data(v);var d=s.name,p=this.getEdgeView(),x=p.getOptions().data;x.forEach(function(m){m.source===d&&(m.x[0]+=f.x,m.x[1]+=f.x,m.y[0]+=f.y,m.y[1]+=f.y),m.target===d&&(m.x[2]+=f.x,m.x[3]+=f.x,m.y[2]+=f.y,m.y[3]+=f.y)}),p.data(x),this.prevPoint=i,t.render(!0)}}},r.prototype.end=function(){this.isDragging=!1,this.context.isDragging=!1,this.prevPoint=null,this.currentElementIdx=null,this.getNodeView().animate(this.prevNodeAnimateCfg),this.getEdgeView().animate(this.prevEdgeAnimateCfg)},r}(Ie);Et("sankey-node-drag",rzt);Lt("sankey-node-draggable",{showEnable:[{trigger:"polygon:mouseenter",action:"cursor:pointer"},{trigger:"polygon:mouseleave",action:"cursor:default"}],start:[{trigger:"polygon:mousedown",action:"sankey-node-drag:start"}],processing:[{trigger:"plot:mousemove",action:"sankey-node-drag:translate"},{isEnable:function(e){return e.isDragging},trigger:"plot:mousemove",action:"cursor:move"}],end:[{trigger:"plot:mouseup",action:"sankey-node-drag:end"}]});(function(e){X(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sankey",t}return r.getDefaultOptions=function(){return{appendPadding:8,syncViewPadding:!0,nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.3,lineWidth:0},edgeState:{active:{style:{opacity:.8,lineWidth:0}}},label:{formatter:function(t){var i=t.name;return i},callback:function(t){var i=t[1]===1;return{style:{fill:"#545454",textAlign:i?"end":"start"},offsetX:i?-8:8}},layout:[{type:"hide-overlap"}]},tooltip:{showTitle:!1,showMarkers:!1,shared:!1,showContent:function(t){return!I(t,[0,"data","isNode"])},formatter:function(t){var i=t.source,n=t.target,a=t.value;return{name:i+" -> "+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;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yx.apply(this,arguments)};Jt("polygon","boundary-polygon",{draw:function(e,r){var t=r.addGroup(),i={stroke:"#fff",lineWidth:1,fill:e.color,paht:[]},n=e.points,a=[["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],["L",n[2].x,n[2].y],["L",n[3].x,n[3].y],["Z"]];if(i.path=this.parsePath(a),t.addShape("path",{attrs:i}),I(e,"data.lastWeek")){var o=[["M",n[2].x,n[2].y],["L",n[3].x,n[3].y]];t.addShape("path",{attrs:{path:this.parsePath(o),lineWidth:4,stroke:"#404040"}}),I(e,"data.lastDay")&&t.addShape("path",{attrs:{path:this.parsePath([["M",n[1].x,n[1].y],["L",n[2].x,n[2].y]]),lineWidth:4,stroke:"#404040"}})}return t}});var Uzt=[{sourceKey:"colors",targetKey:"color",notice:"colors \u662F g2Plot@1.0 \u7684\u5C5E\u6027\uFF0C\u8BF7\u4F7F\u7528 color \u5C5E\u6027\u66FF\u4EE3"},{sourceKey:"valueField",targetKey:"colorField",notice:"valueField \u662F g2@1.0\u7684\u5C5E\u6027\uFF0C\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528colorField\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"}],qzt=Zt(sb,"CalendarChart",function(e){var r=He(e);return $a(Uzt,r),K(I(e,"shape"))&&jt(r,"shape","boundary-polygon"),K(I(r,"xField"))&&K(I(r,"yField"))&&(jt(r,"xField","week"),jt(r,"meta.week",Yx({type:"cat"},I(r,"meta.week",{}))),jt(r,"yField","day"),jt(r,"meta.day",{type:"cat",values:["Sun.","Mon.","Tues.","Wed.","Thur.","Fri.","Sat."]}),jt(r,"reflect","y"),jt(r,"xAxis",Yx({tickLine:null,line:null,title:null,label:{offset:20,style:{fontSize:12,fill:"#bbb",textBaseline:"top"},formatter:function(t){return t=="2"?"MAY":t==="6"?"JUN":t=="10"?"JUL":t==="14"?"AUG":t=="18"?"SEP":t==="24"?"OCT":""}}},I(r,"xAxis",{})))),r}),sI={},mh={},Pb={};(function(e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.RANGE_VIEW_ID=e.INDICATEOR_VIEW_ID=e.DEFAULT_COLOR=e.PERCENT=e.RANGE_TYPE=e.RANGE_VALUE=void 0,e.RANGE_VALUE="range",e.RANGE_TYPE="type",e.PERCENT="percent",e.DEFAULT_COLOR="#f0f0f0",e.INDICATEOR_VIEW_ID="indicator-view",e.RANGE_VIEW_ID="range-view",e.DEFAULT_OPTIONS={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(r={},r[e.RANGE_VALUE]={sync:"v"},r[e.PERCENT]={sync:"v",tickCount:5,tickInterval:.2},r),animation:!1}})(Pb);var nl={};Object.defineProperty(nl,"__esModule",{value:!0});nl.getRangeData=nl.getIndicatorData=nl.processRangeData=void 0;var N0=Y,sd=Pb;function dU(e,r){return e.map(function(t,i){var n;return n={},n[sd.RANGE_VALUE]=t-(e[i-1]||0),n[sd.RANGE_TYPE]=""+i,n[sd.PERCENT]=r,n}).filter(function(t){return!!t[sd.RANGE_VALUE]})}nl.processRangeData=dU;function Zzt(e){var r;return[(r={},r[sd.PERCENT]=N0.clamp(e,0,1),r)]}nl.getIndicatorData=Zzt;function Qzt(e,r){var t=N0.get(r,["ticks"],[]),i=N0.size(t)?t:[0,N0.clamp(e,0,1),1];return dU(i,e)}nl.getRangeData=Qzt;Object.defineProperty(mh,"__esModule",{value:!0});mh.adaptor=mh.statistic=void 0;var OG=j,Kzt=Y,ud=Qe,Jzt=Pr,tVt=yg,dp=mt,Za=Pb,FG=nl;function eVt(e){var r=e.chart,t=e.options,i=t.percent,n=t.range,a=t.radius,o=t.innerRadius,l=t.startAngle,s=t.endAngle,u=t.axis,c=t.indicator,f=t.gaugeStyle,h=t.type,v=t.meter,d=n.color,p=n.width;if(c){var x=FG.getIndicatorData(i),m=r.createView({id:Za.INDICATEOR_VIEW_ID});m.data(x),m.point().position(Za.PERCENT+"*1").shape(c.shape||"gauge-indicator").customInfo({defaultColor:r.getTheme().defaultColor,indicator:c}),m.coordinate("polar",{startAngle:l,endAngle:s,radius:o*a}),m.axis(Za.PERCENT,u),m.scale(Za.PERCENT,dp.pick(u,tVt.AXIS_META_CONFIG_KEYS))}var _=FG.getRangeData(i,t.range),b=r.createView({id:Za.RANGE_VIEW_ID});b.data(_);var w=Kzt.isString(d)?[d,Za.DEFAULT_COLOR]:d,S=Jzt.interval({chart:b,options:{xField:"1",yField:Za.RANGE_VALUE,seriesField:Za.RANGE_TYPE,rawFields:[Za.PERCENT],isStack:!0,interval:{color:w,style:f,shape:h==="meter"?"meter-gauge":null},args:{zIndexReversed:!0},minColumnWidth:p,maxColumnWidth:p}}).ext,M=S.geometry;return M.customInfo({meter:v}),b.coordinate("polar",{innerRadius:o,radius:a,startAngle:l,endAngle:s}).transpose(),e}function rVt(e){var r;return dp.flow(ud.scale((r={range:{min:0,max:1,maxLimit:1,minLimit:0}},r[Za.PERCENT]={},r)))(e)}function pU(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent;if(t.getController("annotation").clear(!0),n){var o=n.content,l=void 0;o&&(l=dp.deepAssign({},{content:(a*100).toFixed(2)+"%",style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),dp.renderGaugeStatistic(t,{statistic:OG.__assign(OG.__assign({},n),{content:l})},{percent:a})}return r&&t.render(!0),e}mh.statistic=pU;function iVt(e){var r=e.chart;return r.legend(!1),r.tooltip(!1),e}function nVt(e){return dp.flow(ud.theme,ud.animation,eVt,rVt,pU,ud.interaction,ud.annotation(),iVt)(e)}mh.adaptor=nVt;var PG=j,aVt=me;aVt.registerShape("point","gauge-indicator",{draw:function(e,r){var t=e.customInfo,i=t.indicator,n=t.defaultColor,a=i,o=a.pointer,l=a.pin,s=r.addGroup(),u=this.parsePoint({x:0,y:0});return o&&s.addShape("line",{name:"pointer",attrs:PG.__assign({x1:u.x,y1:u.y,x2:e.x,y2:e.y,stroke:n},o.style)}),l&&s.addShape("circle",{name:"pin",attrs:PG.__assign({x:u.x,y:u.y,stroke:n},l.style)}),s}});var aA=me,oVt=Y;aA.registerShape("interval","meter-gauge",{draw:function(e,r){var t=e.customInfo.meter,i=t===void 0?{}:t,n=i.steps,a=n===void 0?50:n,o=i.stepRatio,l=o===void 0?.5:o;a=a<1?1:a,l=oVt.clamp(l,0,1);var s=this.coordinate,u=s.startAngle,c=s.endAngle,f=0;if(l>0&&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<b;){var S=void 0,M=(w-u)%(v+f);M<v?S=w+(v-M):(w+=v+f-M,S=w+v);var O=aA.Util.getSectorPath(p.x,p.y,x,w,Math.min(S,b),x*this.coordinate.innerRadius);d.addShape("path",{name:"meter-gauge",attrs:{path:O,fill:e.color,stroke:e.color,lineWidth:.5}}),w=S+f}return d}});Object.defineProperty(sI,"__esModule",{value:!0});var gU=sI.Gauge=void 0,lVt=j,qc=me,sVt=ae,IG=mh,oA=Pb,LG=nl,uVt=function(e){lVt.__extends(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="gauge",t}return r.getDefaultOptions=function(){return oA.DEFAULT_OPTIONS},r.prototype.changeData=function(t){this.chart.emit(qc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,qc.Event.fromData(this.chart,qc.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t});var i=this.chart.views.find(function(a){return a.id===oA.INDICATEOR_VIEW_ID});i&&i.data(LG.getIndicatorData(t));var n=this.chart.views.find(function(a){return a.id===oA.RANGE_VIEW_ID});n&&n.data(LG.getRangeData(t,this.options.range)),IG.statistic({chart:this.chart,options:this.options},!0),this.chart.emit(qc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,qc.Event.fromData(this.chart,qc.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return IG.adaptor},r}(sVt.Plot);gU=sI.Gauge=uVt;var eM=globalThis&&globalThis.__assign||function(){return eM=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eM.apply(this,arguments)},cVt=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<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t},fVt=Zt(gU,"GaugeChart",function(e){var r=He(e),t=r.range,i=r.min,n=i===void 0?0:i,a=r.max,o=a===void 0?1:a,l=r.value,s=cVt(r,["range","min","max","value"]);it(t)?s.range={ticks:t.map(function(h){return(h-n)/(o-n)}),color:es().colors10}:s.range=t||{};var u=I(s,"color");if(K(u)||(s.range.color=u),K(I(s,"indicator"))&&jt(s,"indicator",{pointer:{style:{stroke:"#D0D0D0"}},pin:{style:{stroke:"#D0D0D0"}}}),I(s,"statistic.visible")&&jt(s,"statistic.title",I(s,"statistic")),!K(n)&&!K(o)&&!K(l)){s.percent=(l-n)/(o-n);var c=I(s,"axis.label.formatter");jt(s,"axis",{label:{formatter:function(h){var v=h*(o-n)+n;return pt(c)?c(v):v}}})}Df(!(I(s,"min")||I(s,"max"))),Df(!(I(s,"rangeSize")||I(s,"rangeStyle")||"rangeBackgroundStyle"));var f=K(s.percent)?l:s.percent;return eM({data:f},s)}),uI={},Oe={},Hi={},cI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DualAxesGeometry=e.AxisType=void 0,function(r){r.Left="Left",r.Right="Right"}(e.AxisType||(e.AxisType={})),function(r){r.Line="line",r.Column="column"}(e.DualAxesGeometry||(e.DualAxesGeometry={}))})(cI);var fI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_RIGHT_YAXIS_CONFIG=e.DEFAULT_LEFT_YAXIS_CONFIG=e.DEFAULT_YAXIS_CONFIG=e.RIGHT_AXES_VIEW=e.LEFT_AXES_VIEW=void 0;var r=j;e.LEFT_AXES_VIEW="left-axes-view",e.RIGHT_AXES_VIEW="right-axes-view",e.DEFAULT_YAXIS_CONFIG={nice:!0,label:{autoHide:!0,autoRotate:!1}},e.DEFAULT_LEFT_YAXIS_CONFIG=r.__assign(r.__assign({},e.DEFAULT_YAXIS_CONFIG),{position:"left"}),e.DEFAULT_RIGHT_YAXIS_CONFIG=r.__assign(r.__assign({},e.DEFAULT_YAXIS_CONFIG),{position:"right",grid:null})})(fI);Object.defineProperty(Hi,"__esModule",{value:!0});Hi.getYAxisWithDefault=Hi.transformObjectToArray=Hi.getGeometryOption=Hi.isColumn=Hi.isLine=void 0;var hVt=j,Ld=Y,rM=mt,xh=cI,DG=fI;function vVt(e){return Ld.get(e,"geometry")===xh.DualAxesGeometry.Line}Hi.isLine=vVt;function yU(e){return Ld.get(e,"geometry")===xh.DualAxesGeometry.Column}Hi.isColumn=yU;function dVt(e,r,t){return yU(t)?rM.deepAssign({},{geometry:xh.DualAxesGeometry.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):hVt.__assign({geometry:xh.DualAxesGeometry.Line},t)}Hi.getGeometryOption=dVt;function pVt(e,r){var t=e[0],i=e[1];if(Ld.isArray(r)){var n=r[0],a=r[1];return[n,a]}var o=Ld.get(r,t),l=Ld.get(r,i);return[o,l]}Hi.transformObjectToArray=pVt;function gVt(e,r){return r===xh.AxisType.Left?e===!1?!1:rM.deepAssign({},DG.DEFAULT_LEFT_YAXIS_CONFIG,e):r===xh.AxisType.Right?e===!1?!1:rM.deepAssign({},DG.DEFAULT_RIGHT_YAXIS_CONFIG,e):e}Hi.getYAxisWithDefault=gVt;var Ib={};Object.defineProperty(Ib,"__esModule",{value:!0});Ib.getViewLegendItems=void 0;var Zc=Y,$G=me,kG=mt,RG=Hi;function yVt(e){var r=e.view,t=e.geometryOption,i=e.yField,n=e.legend,a=Zc.get(n,"marker"),o=kG.findGeometry(r,RG.isLine(t)?"line":"interval");if(!t.seriesField){var l=Zc.get(r,"options.scales."+i+".alias")||i,s=o.getAttribute("color"),u=r.getTheme().defaultColor;s&&(u=$G.Util.getMappingValue(s,l,Zc.get(s,["values",0],u)));var c=(Zc.isFunction(a)?a:!Zc.isEmpty(a)&&kG.deepAssign({},{style:{stroke:u,fill:u}},a))||(RG.isLine(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 Zc.reduce(f,function(h,v){var d=$G.Util.getLegendItems(r,o,v,r.getTheme(),a);return h.concat(d)},[])}Ib.getViewLegendItems=yVt;var Lb={};Object.defineProperty(Lb,"__esModule",{value:!0});Lb.drawSingleGeometry=void 0;var Nn=j,mVt=Y,BG=Pr,cu=mt,xVt=Aa,NG=Hi;function _Vt(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(NG.isLine(i)){BG.line(cu.deepAssign({},e,{options:Nn.__assign(Nn.__assign(Nn.__assign({},cu.pick(r,u)),i),{line:{color:i.color,style:i.lineStyle}})})),BG.point(cu.deepAssign({},e,{options:Nn.__assign(Nn.__assign(Nn.__assign({},cu.pick(r,u)),i),{point:i.point&&Nn.__assign({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&&mVt.each(t.geometries,function(f){f.adjust(c)})}return NG.isColumn(i)&&xVt.adaptor(cu.deepAssign({},e,{options:Nn.__assign(Nn.__assign(Nn.__assign({},cu.pick(r,u)),i),{widthRatio:i.columnWidthRatio,interval:Nn.__assign(Nn.__assign({},cu.pick(i,["color"])),{style:i.columnStyle})})})),e}Lb.drawSingleGeometry=_Vt;var Db={};Object.defineProperty(Db,"__esModule",{value:!0});Db.doSliderFilter=void 0;var lA=Y,bVt=mt;Db.doSliderFilter=function(e,r){var t=r[0],i=r[1],n=e.getOptions().data,a=e.getXScale(),o=lA.size(n);if(!(!a||!o)){var l=lA.valuesOfKey(n,a.field),s=l,u=lA.size(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?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<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wx.apply(this,arguments)};globalThis&&globalThis.__rest;Wx(Wx({},LVt),STt);var Dd=globalThis&&globalThis.__assign||function(){return Dd=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dd.apply(this,arguments)};Dd(Dd(Dd({},sz),z0t),pj.Util);export{kVt as A,$Vt as C,F2t as D,BVt as L,zxt as T,RVt as a};