@yugabytedb/perf-advisor-ui 1.0.44-alpha.2 → 1.0.44-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -7,5 +7,5 @@
7
7
  *
8
8
  * LICENSE
9
9
  * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
10
- */var uy=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new Ig,o=n.renderer||"canvas";sy[o]||(o=Sh(sy)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new sy[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=Yp.node||Yp.worker||s?null:new Tv(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Yp.touchEventsSupported:!!c)&&(l=jh(n.pointerSize,44)),this.handler=new mg(i,a,u,a.root,l),this.animation=new sv({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},e.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return Tm(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Tm(t[i].color,1);return(n/=r)<.4}return!1}(e)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(e){var t,n=nv();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=nv();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this.handler.off(e,t)},e.prototype.trigger=function(e,t){this.handler.trigger(e,t)},e.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof ay&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete ly[e]},e}();function cy(e,t){var n=new uy(ch(),e,t);return ly[n.id]=n,n}var dy=1e-4;function py(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r)if(l>0){if(e<=i)return a;if(e>=o)return s}else{if(e>=i)return a;if(e<=o)return s}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function hy(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return Eh(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function fy(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function gy(e){return e.sort((function(e,t){return e-t})),e}function my(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(e)}function vy(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),o=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function yy(e,t){var n=Math.max(my(e),my(t)),r=e+t;return n>20?r:fy(r,n)}function xy(e){var t=2*Math.PI;return(e%t+t)%t}function _y(e){return e>-1e-4&&e<dy}var by=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function wy(e){if(e instanceof Date)return e;if(Eh(e)){var t=by.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function Sy(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function Ty(e,t){var n=Sy(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function Cy(e){var t=parseFloat(e);return t==e&&(0!==t||!Eh(e)||e.indexOf("x")<=0)?t:NaN}function My(){return Math.round(9*Math.random())}function Iy(e,t){return 0===t?e:Iy(t,e%t)}function Ey(e,t){return null==e?t:null==t?e:e*t/Iy(e,t)}"undefined"!=typeof console&&console.warn&&console.log;function Ay(e){throw new Error(e)}function Dy(e,t,n){return(t-e)*n+e}var ky="series\0";function Oy(e){return e instanceof Array?e:null==e?[]:[e]}function Ny(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var Ry=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Py(e){return!kh(e)||Mh(e)||e instanceof Date?e:e.value}function Ly(e){return kh(e)&&!(e instanceof Array)}function By(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=Xh();xh(t,(function(e,n){kh(e)||(t[n]=null)}));var s,l,u=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||Hy(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){xh(r,(function(i,o){if(i&&null!=i.id){var a=Fy(i.id),s=n.get(a);if(null!=s){var l=e[s];Hh(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=t[s],r[o]=null}}}))}(u,e,a,t),r&&function(e,t){xh(t,(function(n,r){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var o=e[i].existing;if(!e[i].newOption&&o&&(null==o.id||null==n.id)&&!Hy(n)&&!Hy(o)&&jy("name",o,n))return e[i].newOption=n,void(t[r]=null)}}))}(u,t),r||i?function(e,t,n){xh(t,(function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Hy(r.existing)||r.existing&&null!=t.id&&!jy("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}}))}(u,t,i):o&&function(e,t){xh(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(u,t),s=u,l=Xh(),xh(s,(function(e){var t=e.existing;t&&l.set(t.id,e)})),xh(s,(function(e){var t=e.newOption;Hh(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})})),xh(s,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(kh(r)){if(i.name=null!=r.name?Fy(r.name):n?n.name:ky+t,n)i.id=Fy(n.id);else if(null!=r.id)i.id=Fy(r.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(l.get(i.id))}l.set(i.id,e)}})),u}function jy(e,t,n){var r=zy(t[e],null),i=zy(n[e],null);return null!=r&&null!=i&&r===i}function Fy(e){return zy(e,"")}function zy(e,t){return null==e?t:Eh(e)?e:Dh(e)||Ah(e)?e+"":t}function Uy(e){var t=e.name;return!(!t||!t.indexOf(ky))}function Hy(e){return e&&null!=e.id&&0===Fy(e.id).indexOf("\0_ec_\0")}function Vy(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Mh(t.dataIndex)?_h(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Mh(t.name)?_h(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function Wy(){var e="__ec_inner_"+Yy++;return function(t){return t[e]||(t[e]={})}}var Yy=My();function Gy(e,t,n){var r=qy(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each((function(t,r){var i=Xy(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]})),a}function qy(e,t){var n;if(Eh(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Xh(),o={},a=!1;return xh(n,(function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&mh(t.includeMainTypes,s)<0))a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e}else o[n]=e})),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var Qy={useDefault:!0,enableAll:!1,enableNone:!1},Zy={useDefault:!1,enableAll:!0,enableNone:!0};function Xy(e,t,n,r){r=r||Qy;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(Hh(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(Hh(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a}),s)}function $y(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}var Ky="___EC__COMPONENT__CONTAINER___",Jy="___EC__EXTENDED_CLASS___";function ex(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function tx(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return Ih(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return j(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(t,this)),fh(t.prototype,e),t[Jy]=!0,t.extend=this.extend,t.superCall=ix,t.superApply=ox,t.superClass=r,t}}function nx(e,t){e.extend=t.extend}var rx=Math.round(10*Math.random());function ix(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function ox(e,t,n){return this.superClass.prototype[t].apply(e,n)}function ax(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){Hh(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=ex(r);if(i.sub){if(i.sub!==Ky){var o=function(e){var n=t[e.main];n&&n[Ky]||((n=t[e.main]={})[Ky]=!0);return n}(i);o[i.sub]=e}}else t[i.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Ky]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=ex(e),r=[],i=t[n.main];return i&&i[Ky]?xh(i,(function(e,t){t!==Ky&&r.push(e)})):r.push(i),r},e.hasClass=function(e){var n=ex(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return xh(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=ex(e),r=t[n.main];return r&&r[Ky]}}function sx(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&mh(r,s)>=0||i&&mh(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var lx=sx([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ux=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return lx(this,e,t)},e}(),cx=new om(50);function dx(e){if("string"==typeof e){var t=cx.get(e);return t&&t.image}return e}function px(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=cx.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!fx(t=o.image)&&o.pending.push(a):((t=$p.loadImage(e,hx,hx)).__zrImageSrc=e,cx.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function hx(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function fx(e){return e&&e.width&&e.height}var gx=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function mx(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=vx(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=yx(o[a],i);return o.join("\n")}function vx(e,t,n,r){var i=fh({},r=r||{});i.font=t,n=jh(n,"..."),i.maxIterations=jh(r.maxIterations,2);var o=i.minChar=jh(r.minChar,0);i.cnCharWidth=zv("国",t);var a=i.ascCharWidth=zv("a",t);i.placeholder=jh(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=zv(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function yx(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=zv(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?xx(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=zv(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function xx(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}var _x=function(){},bx=function(e){this.tokens=[],e&&(this.tokens=e)},Sx=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function Tx(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var p=l.padding,h=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Gv(l.width,r.width)+h;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=Ix(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new _x;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:zv(v,c),m||d)u.push(new bx([y]));else{var x=(u[u.length-1]||(u[0]=new bx)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var Cx=bh(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function Mx(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!Cx[e]}function Ix(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var p=e.charAt(d);if("\n"!==p){var h=zv(p,t),f=!r&&!Mx(p);(o.length?c+h>n:i+c+h>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=h):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=h)):f?(o.push(l),a.push(u),l=p,u=h):(o.push(p),a.push(h)):(c+=h,f?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var Ex="__zr_style_"+Math.round(10*Math.random()),Ax={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Dx={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ax[Ex]=!0;var kx=["z","z2","invisible"],Ox=["invisible"],Nx=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype._init=function(t){for(var n=Sh(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){Rx.copy(e.getBoundingRect()),e.transform&&Rx.applyTransform(e.transform);return Px.width=t,Px.height=n,!Rx.intersect(Px)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new og(0,0,0,0)),t?og.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new og(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:fh(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return $h(Ax,e)},t.prototype.useStyle=function(e){e[Ex]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Ex]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,kx)},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=Sh(u),d=0;d<c.length;d++){(h=c[d])in s&&(s[h]=s[h],this.style[h]=u[h])}var p=Sh(s);for(d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Ox:kx;for(d=0;d<f.length;d++){h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return fh(e,t),e},t.prototype.getAnimationStyleProps=function(){return Dx},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(iy),Rx=new og(0,0,0,0),Px=new og(0,0,0,0);var Lx=Nx,Bx=Math.min,jx=Math.max,Fx=Math.sin,zx=Math.cos,Ux=2*Math.PI,Hx=nf(),Vx=nf(),Wx=nf();function Yx(e,t,n,r,i,o){i[0]=Bx(e,n),i[1]=Bx(t,r),o[0]=jx(e,n),o[1]=jx(t,r)}var Gx=[],qx=[];function Qx(e,t,n,r,i,o,a,s,l,u){var c=Yg,d=Hg,p=c(e,n,i,a,Gx);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var f=d(e,n,i,a,Gx[h]);l[0]=Bx(f,l[0]),u[0]=jx(f,u[0])}p=c(t,r,o,s,qx);for(h=0;h<p;h++){var g=d(t,r,o,s,qx[h]);l[1]=Bx(g,l[1]),u[1]=jx(g,u[1])}l[0]=Bx(e,l[0]),u[0]=jx(e,u[0]),l[0]=Bx(a,l[0]),u[0]=jx(a,u[0]),l[1]=Bx(t,l[1]),u[1]=jx(t,u[1]),l[1]=Bx(s,l[1]),u[1]=jx(s,u[1])}function Zx(e,t,n,r,i,o,a,s){var l=Xg,u=Qg,c=jx(Bx(l(e,n,i),1),0),d=jx(Bx(l(t,r,o),1),0),p=u(e,n,i,c),h=u(t,r,o,d);a[0]=Bx(e,i,p),a[1]=Bx(t,o,h),s[0]=jx(e,i,p),s[1]=jx(t,o,h)}function Xx(e,t,n,r,i,o,a,s,l){var u=hf,c=ff,d=Math.abs(i-o);if(d%Ux<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Hx[0]=zx(i)*n+e,Hx[1]=Fx(i)*r+t,Vx[0]=zx(o)*n+e,Vx[1]=Fx(o)*r+t,u(s,Hx,Vx),c(l,Hx,Vx),(i%=Ux)<0&&(i+=Ux),(o%=Ux)<0&&(o+=Ux),i>o&&!a?o+=Ux:i<o&&a&&(i+=Ux),a){var p=o;o=i,i=p}for(var h=0;h<o;h+=Math.PI/2)h>i&&(Wx[0]=zx(h)*n+e,Wx[1]=Fx(h)*r+t,u(s,Wx,s),c(l,Wx,l))}var $x={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Kx=[],Jx=[],e_=[],t_=[],n_=[],r_=[],i_=Math.min,o_=Math.max,a_=Math.cos,s_=Math.sin,l_=Math.abs,u_=Math.PI,c_=2*u_,d_="undefined"!=typeof Float32Array,p_=[];function h_(e){return Math.round(e/u_*1e8)/1e8%2*u_}var f_=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=l_(n/Mv/e)||0,this._uy=l_(n/Mv/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData($x.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=l_(e-this._xi),r=l_(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData($x.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData($x.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData($x.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),p_[0]=r,p_[1]=i,function(e,t){var n=h_(e[0]);n<0&&(n+=c_);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=c_?i=n+c_:t&&n-i>=c_?i=n-c_:!t&&n>i?i=n+(c_-h_(n-i)):t&&n<i&&(i=n-(c_-h_(i-n))),e[0]=n,e[1]=i}(p_,o),r=p_[0];var a=(i=p_[1])-r;return this.addData($x.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=a_(i)*n+e,this._yi=s_(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData($x.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData($x.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!d_||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();d_&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},e.prototype.addData=function(e,t,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,d_&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){e_[0]=e_[1]=n_[0]=n_[1]=Number.MAX_VALUE,t_[0]=t_[1]=r_[0]=r_[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(i=n=t[e],o=r=t[e+1]),a){case $x.M:n=i=t[e++],r=o=t[e++],n_[0]=i,n_[1]=o,r_[0]=i,r_[1]=o;break;case $x.L:Yx(n,r,t[e],t[e+1],n_,r_),n=t[e++],r=t[e++];break;case $x.C:Qx(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],n_,r_),n=t[e++],r=t[e++];break;case $x.Q:Zx(n,r,t[e++],t[e++],t[e],t[e+1],n_,r_),n=t[e++],r=t[e++];break;case $x.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],p=t[e++],h=t[e++]+p;e+=1;var f=!t[e++];s&&(i=a_(p)*c+l,o=s_(p)*d+u),Xx(l,u,c,d,p,h,f,n_,r_),n=a_(h)*c+l,r=s_(h)*d+u;break;case $x.R:Yx(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],n_,r_);break;case $x.Z:n=i,r=o}hf(e_,e_,n_),ff(t_,t_,r_)}return 0===e&&(e_[0]=e_[1]=t_[0]=t_[1]=0),new og(e_[0],e_[1],t_[0]-e_[0],t_[1]-e_[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var p=e[d++],h=1===d;h&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(p){case $x.M:i=a=e[d++],o=s=e[d++];break;case $x.L:var g=e[d++],m=(x=e[d++])-o;(l_(A=g-i)>n||l_(m)>r||d===t-1)&&(f=Math.sqrt(A*A+m*m),i=g,o=x);break;case $x.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=qg(i,o,v,y,g,x,_,b,10),i=_,o=b;break;case $x.Q:f=Kg(i,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,o=x;break;case $x.A:var w=e[d++],S=e[d++],T=e[d++],C=e[d++],M=e[d++],I=e[d++],E=I+M;d+=1,e[d++],h&&(a=a_(M)*T+w,s=s_(M)*C+S),f=o_(T,C)*i_(c_,Math.abs(I)),i=a_(E)*T+w,o=s_(E)*C+S;break;case $x.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case $x.Z:var A=a-i;m=s-o;f=Math.sqrt(A*A+m*m),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,d,p=this.data,h=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var b=p[_++],w=1===_;switch(w&&(n=i=p[_],r=o=p[_+1]),b!==$x.L&&x>0&&(e.lineTo(c,d),x=0),b){case $x.M:n=i=p[_++],r=o=p[_++],e.moveTo(i,o);break;case $x.L:a=p[_++],s=p[_++];var S=l_(a-i),T=l_(s-o);if(S>h||T>f){if(m){if(v+(Q=l[y++])>u){var C=(u-v)/Q;e.lineTo(i*(1-C)+a*C,o*(1-C)+s*C);break e}v+=Q}e.lineTo(a,s),i=a,o=s,x=0}else{var M=S*S+T*T;M>x&&(c=a,d=s,x=M)}break;case $x.C:var I=p[_++],E=p[_++],A=p[_++],D=p[_++],k=p[_++],O=p[_++];if(m){if(v+(Q=l[y++])>u){Gg(i,I,A,k,C=(u-v)/Q,Kx),Gg(o,E,D,O,C,Jx),e.bezierCurveTo(Kx[1],Jx[1],Kx[2],Jx[2],Kx[3],Jx[3]);break e}v+=Q}e.bezierCurveTo(I,E,A,D,k,O),i=k,o=O;break;case $x.Q:I=p[_++],E=p[_++],A=p[_++],D=p[_++];if(m){if(v+(Q=l[y++])>u){$g(i,I,A,C=(u-v)/Q,Kx),$g(o,E,D,C,Jx),e.quadraticCurveTo(Kx[1],Jx[1],Kx[2],Jx[2]);break e}v+=Q}e.quadraticCurveTo(I,E,A,D),i=A,o=D;break;case $x.A:var N=p[_++],R=p[_++],P=p[_++],L=p[_++],B=p[_++],j=p[_++],F=p[_++],z=!p[_++],U=P>L?P:L,H=l_(P-L)>.001,V=B+j,W=!1;if(m)v+(Q=l[y++])>u&&(V=B+j*(u-v)/Q,W=!0),v+=Q;if(H&&e.ellipse?e.ellipse(N,R,P,L,F,B,V,z):e.arc(N,R,U,B,V,z),W)break e;w&&(n=a_(B)*P+N,r=s_(B)*L+R),i=a_(V)*P+N,o=s_(V)*L+R;break;case $x.R:n=i=p[_],r=o=p[_+1],a=p[_++],s=p[_++];var Y=p[_++],G=p[_++];if(m){if(v+(Q=l[y++])>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+i_(q,Y),s),(q-=Y)>0&&e.lineTo(a+Y,s+i_(q,G)),(q-=G)>0&&e.lineTo(a+o_(Y-q,0),s+G),(q-=Y)>0&&e.lineTo(a,s+o_(G-q,0));break e}v+=Q}e.rect(a,s,Y,G);break;case $x.Z:if(m){var Q;if(v+(Q=l[y++])>u){C=(u-v)/Q;e.lineTo(i*(1-C)+n*C,o*(1-C)+r*C);break e}v+=Q}e.closePath(),i=n,o=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=$x,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),g_=f_;function m_(e,t,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||o>e+s&&o>n+s||o<e-s&&o<n-s)return!1;if(e===n)return Math.abs(o-e)<=s/2;var u=(l=(t-r)/(e-n))*o-a+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function v_(e,t,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var d=l;if(c>t+d&&c>r+d&&c>o+d&&c>s+d||c<t-d&&c<r-d&&c<o-d&&c<s-d||u>e+d&&u>n+d&&u>i+d&&u>a+d||u<e-d&&u<n-d&&u<i-d&&u<a-d)return!1;var p=function(e,t,n,r,i,o,a,s,l,u,c){var d,p,h,f,g,m=.005,v=1/0;Bg[0]=l,Bg[1]=u;for(var y=0;y<1;y+=.05)jg[0]=Hg(e,n,i,a,y),jg[1]=Hg(t,r,o,s,y),(f=df(Bg,jg))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Rg);x++)p=d-m,h=d+m,jg[0]=Hg(e,n,i,a,p),jg[1]=Hg(t,r,o,s,p),f=df(jg,Bg),p>=0&&f<v?(d=p,v=f):(Fg[0]=Hg(e,n,i,a,h),Fg[1]=Hg(t,r,o,s,h),g=df(Fg,Bg),h<=1&&g<v?(d=h,v=g):m*=.5);return c&&(c[0]=Hg(e,n,i,a,d),c[1]=Hg(t,r,o,s,d)),Og(v)}(e,t,n,r,i,o,a,s,u,c,null);return p<=d/2}function y_(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;if(l>t+u&&l>r+u&&l>o+u||l<t-u&&l<r-u&&l<o-u||s>e+u&&s>n+u&&s>i+u||s<e-u&&s<n-u&&s<i-u)return!1;var c=function(e,t,n,r,i,o,a,s,l){var u,c=.005,d=1/0;Bg[0]=a,Bg[1]=s;for(var p=0;p<1;p+=.05)jg[0]=Qg(e,n,i,p),jg[1]=Qg(t,r,o,p),(m=df(Bg,jg))<d&&(u=p,d=m);d=1/0;for(var h=0;h<32&&!(c<Rg);h++){var f=u-c,g=u+c;jg[0]=Qg(e,n,i,f),jg[1]=Qg(t,r,o,f);var m=df(jg,Bg);if(f>=0&&m<d)u=f,d=m;else{Fg[0]=Qg(e,n,i,g),Fg[1]=Qg(t,r,o,g);var v=df(Fg,Bg);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=Qg(e,n,i,u),l[1]=Qg(t,r,o,u)),Og(d)}(e,t,n,r,i,o,s,l,null);return c<=u/2}var x_=2*Math.PI;function __(e){return(e%=x_)<0&&(e+=x_),e}var b_=2*Math.PI;function w_(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%b_<1e-4)return!0;if(o){var d=r;r=__(i),i=__(d)}else r=__(r),i=__(i);r>i&&(i+=b_);var p=Math.atan2(l,s);return p<0&&(p+=b_),p>=r&&p<=i||p+b_>=r&&p+b_<=i}function S_(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r)return 0;if(r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var T_=g_.CMD,C_=2*Math.PI;var M_=[-1,-1,-1],I_=[-1,-1];function E_(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c,d=Wg(t,r,o,s,u,M_);if(0===d)return 0;for(var p=0,h=-1,f=void 0,g=void 0,m=0;m<d;m++){var v=M_[m],y=0===v||1===v?.5:1;Hg(e,n,i,a,v)<l||(h<0&&(h=Yg(t,r,o,s,I_),I_[1]<I_[0]&&h>1&&(c=void 0,c=I_[0],I_[0]=I_[1],I_[1]=c),f=Hg(t,r,o,s,I_[0]),h>1&&(g=Hg(t,r,o,s,I_[1]))),2===h?v<I_[0]?p+=f<t?y:-y:v<I_[1]?p+=g<f?y:-y:p+=s<g?y:-y:v<I_[0]?p+=f<t?y:-y:p+=s<f?y:-y)}return p}function A_(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(zg(o))Ug(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(zg(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=Og(u),p=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}(t,r,o,s,M_);if(0===l)return 0;var u=Xg(t,r,o);if(u>=0&&u<=1){for(var c=0,d=Qg(t,r,o,u),p=0;p<l;p++){var h=0===M_[p]||1===M_[p]?.5:1;Qg(e,n,i,M_[p])<a||(M_[p]<u?c+=d<t?h:-h:c+=o<d?h:-h)}return c}h=0===M_[0]||1===M_[0]?.5:1;return Qg(e,n,i,M_[0])<a?0:o<t?h:-h}function D_(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);M_[0]=-l,M_[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=C_-1e-4){r=0,i=C_;var c=o?1:-1;return a>=M_[0]+e&&a<=M_[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=C_,i+=C_);for(var p=0,h=0;h<2;h++){var f=M_[h];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=C_+g),(g>=r&&g<=i||g+C_>=r&&g+C_<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function k_(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,p=0,h=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===T_.M&&m>1&&(n||(d+=S_(p,h,f,g,r,i))),y&&(f=p=u[m],g=h=u[m+1]),v){case T_.M:p=f=u[m++],h=g=u[m++];break;case T_.L:if(n){if(m_(p,h,u[m],u[m+1],t,r,i))return!0}else d+=S_(p,h,u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case T_.C:if(n){if(v_(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=E_(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case T_.Q:if(n){if(y_(p,h,u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=A_(p,h,u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case T_.A:var x=u[m++],_=u[m++],b=u[m++],w=u[m++],S=u[m++],T=u[m++];m+=1;var C=!!(1-u[m++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,y?(f=o,g=a):d+=S_(p,h,o,a,r,i);var M=(r-x)*w/b+x;if(n){if(w_(x,_,w,S,S+T,C,t,M,i))return!0}else d+=D_(x,_,w,S,S+T,C,M,i);p=Math.cos(S+T)*b+x,h=Math.sin(S+T)*w+_;break;case T_.R:if(f=p=u[m++],g=h=u[m++],o=f+u[m++],a=g+u[m++],n){if(m_(f,g,o,g,t,r,i)||m_(o,g,o,a,t,r,i)||m_(o,a,f,a,t,r,i)||m_(f,a,f,g,t,r,i))return!0}else d+=S_(o,g,o,a,r,i),d+=S_(f,a,f,g,r,i);break;case T_.Z:if(n){if(m_(p,h,f,g,t,r,i))return!0}else d+=S_(p,h,f,g,r,i);p=f,h=g}}return n||(s=h,l=g,Math.abs(s-l)<1e-4)||(d+=S_(p,h,f,g,r,i)||0),0!==d}var O_=gh({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ax),N_={style:gh({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Dx.style)},R_=Bv.concat(["invisible","culling","z","z2","zlevel","parent"]),P_=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<R_.length;++s)i[R_[s]]=this[R_[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=Sh(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?fh(this.style,a):this.useStyle(a):"shape"===o?fh(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(Eh(e)){var t=Tm(e,0);return t>.5?Iv:t>.2?"#eee":Ev}if(e)return Ev}return Iv},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Eh(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Tm(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new g_(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return k_(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return k_(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:fh(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return $h(O_,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=fh({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=fh({},r.shape),fh(s,n.shape)):(s=fh({},i?this.shape:r.shape),fh(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=fh({},this.shape);for(var u={},c=Sh(s),d=0;d<c.length;d++){var p=c[d];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return N_},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return j(n,t),n.prototype.getDefaultStyle=function(){return ph(e.style)},n.prototype.getDefaultShape=function(){return ph(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Lx),L_=P_,B_=gh({strokeFirst:!0,font:qp,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},O_),j_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return $h(B_,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Hv(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Lx);j_.prototype.type="tspan";var F_=j_,z_=gh({x:0,y:0},Ax),U_={style:gh({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Dx.style)};var H_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.createStyle=function(e){return $h(z_,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=function(e){return!!(e&&"string"!=typeof e&&e.width&&e.height)}(t.image)?t.image:this.__image;if(!r)return 0;var i="width"===e?"height":"width",o=t[i];return null==o?r[e]:r[e]/r[i]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return U_},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new og(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Lx);H_.prototype.type="image";var V_=H_;var W_=Math.round;function Y_(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(W_(2*r)===W_(2*i)&&(e.x1=e.x2=q_(r,s,!0)),W_(2*o)===W_(2*a)&&(e.y1=e.y2=q_(o,s,!0)),e):e}}function G_(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=q_(r,s,!0),e.y=q_(i,s,!0),e.width=Math.max(q_(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(q_(i+a,s,!1)-e.y,0===a?0:1),e):e}}function q_(e,t,n){if(!t)return e;var r=W_(2*e);return(r+W_(t))%2==0?r/2:(r+(n?1:-1))/2}var Q_=function(){this.x=0,this.y=0,this.width=0,this.height=0},Z_={},X_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Q_},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=G_(Z_,t,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,i=t.width,o=t.height;t.r?function(e,t){var n,r,i,o,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=i=o=d:d instanceof Array?1===d.length?n=r=i=o=d[0]:2===d.length?(n=i=d[0],r=o=d[1]):3===d.length?(n=d[0],r=o=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],o=d[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-i),0!==i&&e.arc(s+u-i,l+c-i,i,0,Math.PI/2),e.lineTo(s+o,l+c),0!==o&&e.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,i,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(L_);X_.prototype.type="rect";var $_=X_,K_={fill:"#000"},J_={style:gh({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Dx.style)},eb=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=K_,n.attr(t),n}return j(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,sb(e=this.style),xh(e.rich,sb),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new og(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||K_},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return fh(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=Sh(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},fh(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return J_},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||qp,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a="truncate"===r,s=Yv(o),l=jh(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=t.width,p=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?Ix(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,h=jh(t.height,p);if(p>h&&c){var f=Math.floor(h/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var g=vx(d,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m=0;m<n.length;m++)n[m]=yx(n[m],g);var v=h,y=0;for(m=0;m<n.length;m++)y=Math.max(zv(n[m],o),y);null==d&&(d=y);var x=y;return i&&(v+=i[0]+i[2],x+=i[1]+i[3],d+=i[1]+i[3]),u&&(x=d),{lines:n,height:h,outerWidth:x,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:p,width:d}}(db(e),e),i=pb(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,p=e.x||0,h=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=p,v=Wv(h,r.contentHeight,g);if(i||n){var y=Vv(p,s,f),x=Wv(h,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=cb(p,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(ub("fill"in e?e.fill:(b=!0,d.fill))),S=(lb("stroke"in e?e.stroke:o||d.autoStroke&&!b?null:(_=2,d.stroke))),T=e.textShadowBlur>0,C=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,I=0;I<u.length;I++){var E=this._getOrCreateChild(F_),A=E.createStyle();E.useStyle(A),A.text=u[I],A.x=m,A.y=v,f&&(A.textAlign=f),A.textBaseline="middle",A.opacity=e.opacity,A.strokeFirst=!0,T&&(A.shadowBlur=e.textShadowBlur||0,A.shadowColor=e.textShadowColor||"transparent",A.shadowOffsetX=e.textShadowOffsetX||0,A.shadowOffsetY=e.textShadowOffsetY||0),A.stroke=S,A.fill=w,S&&(A.lineWidth=e.lineWidth||_,A.lineDash=e.lineDash,A.lineDashOffset=e.lineDashOffset||0),A.font=t,ob(A,e),v+=c,C&&E.setBoundingRect(new og(Vv(A.x,e.width,A.textAlign),Wv(A.y,M,A.textBaseline),l,M))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new Sx;if(null!=e&&(e+=""),!e)return n;for(var r,i=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},l=gx.lastIndex=0;null!=(r=gx.exec(e));){var u=r.index;u>l&&Tx(n,e.substring(l,u),t,s),Tx(n,r[2],t,s,r[1]),l=gx.lastIndex}l<e.length&&Tx(n,e.substring(l,e.length),t,s);var c=[],d=0,p=0,h=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,p=Math.max(p,t)}e:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],x=0,_=0,b=0;b<y.tokens.length;b++){var w=(O=y.tokens[b]).styleName&&t.rich[O.styleName]||{},S=O.textPadding=w.padding,T=S?S[1]+S[3]:0,C=O.font=w.font||t.font;O.contentHeight=Yv(C);var M=jh(w.height,O.contentHeight);if(O.innerHeight=M,S&&(M+=S[0]+S[2]),O.height=M,O.lineHeight=Fh(w.lineHeight,t.lineHeight,M),O.align=w&&w.align||t.align,O.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=o&&d+O.lineHeight>o){b>0?(y.tokens=y.tokens.slice(0,b),m(y,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var I=w.width,E=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))O.percentWidth=I,c.push(O),O.contentWidth=zv(O.text,C);else{if(E){var A=w.backgroundColor,D=A&&A.image;D&&fx(D=dx(D))&&(O.width=Math.max(O.width,D.width*M/D.height))}var k=f&&null!=i?i-_:null;null!=k&&k<O.width?!E||k<T?(O.text="",O.width=O.contentWidth=0):(O.text=mx(O.text,k-T,C,t.ellipsis,{minChar:t.truncateMinChar}),O.width=O.contentWidth=zv(O.text,C)):O.contentWidth=zv(O.text,C)}O.width+=T,_+=O.width,w&&(x=Math.max(x,O.lineHeight))}m(y,_,x)}for(n.outerWidth=n.width=jh(i,p),n.outerHeight=n.height=jh(o,d),n.contentHeight=d,n.contentWidth=p,h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]),v=0;v<c.length;v++){var O,N=(O=c[v]).percentWidth;O.width=parseInt(N,10)/100*n.width}return n}(db(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign,d=Vv(a,r,u),p=Wv(s,i,c),h=d,f=p;o&&(h+=o[3],f+=o[0]);var g=h+n;pb(e)&&this._renderBackground(e,e,d,p,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,_=x.length,b=y.lineHeight,w=y.width,S=0,T=h,C=g,M=_-1,I=void 0;S<_&&(!(I=x[S]).align||"left"===I.align);)this._placeToken(I,e,b,f,T,"left",m),w-=I.width,T+=I.width,S++;for(;M>=0&&"right"===(I=x[M]).align;)this._placeToken(I,e,b,f,C,"right",m),w-=I.width,C-=I.width,M--;for(T+=(n-(T-h)-(g-C)-w)/2;S<=M;)I=x[S],this._placeToken(I,e,b,f,T+I.width/2,"center",m),T+=I.width,S++;f+=b}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&pb(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=cb(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(F_),h=p.createStyle();p.useStyle(h);var f=this._defaultStyle,g=!1,m=0,v=ub("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=lb("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=i,h.y=u,x&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=o,h.textBaseline="middle",h.font=e.font||qp,h.opacity=Fh(s.opacity,t.opacity,1),ob(h,s),y&&(h.lineWidth=Fh(s.lineWidth,t.lineWidth,m),h.lineDash=jh(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=y),v&&(h.fill=v);var _=e.contentWidth,b=e.contentHeight;p.setBoundingRect(new og(Vv(h.x,_,h.textAlign),Wv(h.y,b,h.textBaseline),_,b))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,p=u&&u.image,h=u&&!p,f=e.borderRadius,g=this;if(h||e.lineHeight||c&&d){(a=this._getOrCreateChild($_)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=i,m.height=o,m.r=f,a.dirtyShape()}if(h)(l=a.style).fill=u||null,l.fillOpacity=jh(e.fillOpacity,1);else if(p){(s=this._getOrCreateChild(V_)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=i,v.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=jh(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Fh(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return ab(e)&&(t=[e.fontStyle,e.fontWeight,ib(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Vh(t)||e.textFont||e.font},t}(Lx),tb={left:!0,right:1,center:1},nb={top:1,bottom:1,middle:1},rb=["fontStyle","fontWeight","fontSize","fontFamily"];function ib(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function ob(e,t){for(var n=0;n<rb.length;n++){var r=rb[n],i=t[r];null!=i&&(e[r]=i)}}function ab(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function sb(e){if(e){e.font=eb.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||tb[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||nb[n]?n:"top",e.padding&&(e.padding=Uh(e.padding))}}function lb(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function ub(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function cb(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function db(e){var t=e.text;return null!=t&&(t+=""),t}function pb(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var hb=eb,fb=Wy(),gb=1,mb={},vb=Wy(),yb=Wy(),xb=["emphasis","blur","select"],_b=["normal","emphasis","blur","select"],bb="highlight",wb="downplay",Sb="select",Tb="unselect",Cb="toggleSelect";function Mb(e){return null!=e&&"none"!==e}var Ib=new om(100);function Eb(e){if(Eh(e)){var t=Ib.get(e);return t||(t=_m(e,-.1),Ib.put(e,t)),t}if(Ph(e)){var n=fh({},e);return n.colorStops=_h(e.colorStops,(function(e){return{offset:e.offset,color:_m(e.color,-.1)}})),n}return e}function Ab(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Db(e){Ab(e,"emphasis",2)}function kb(e){2===e.hoverState&&Ab(e,"normal",0)}function Ob(e){Ab(e,"blur",1)}function Nb(e){1===e.hoverState&&Ab(e,"normal",0)}function Rb(e){e.selected=!0}function Pb(e){e.selected=!1}function Lb(e,t,n){t(e,n)}function Bb(e,t,n){Lb(e,t,n),e.isGroup&&e.traverse((function(e){Lb(e,t,n)}))}function jb(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function Fb(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&mh(n,"select")>=0,o=!1;if(e instanceof L_){var a=vb(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(Mb(s)||Mb(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=fh({},r),(u=fh({},u)).fill=s):!Mb(u.fill)&&Mb(s)?(o=!0,r=fh({},r),(u=fh({},u)).fill=Eb(s)):!Mb(u.stroke)&&Mb(l)&&(o||(r=fh({},r),u=fh({},u)),u.stroke=Eb(l)),r.style=u}}if(r&&null==r.z2){o||(r=fh({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=mh(e.currentStates,t)>=0,i=e.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=fh({},n),a=fh({opacity:r?i:.1*o.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=fh({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function zb(e){e.stateProxy=Fb;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Fb),n&&(n.stateProxy=Fb)}function Ub(e,t){!Qb(e,t)&&!e.__highByOuter&&Bb(e,Db)}function Hb(e,t){!Qb(e,t)&&!e.__highByOuter&&Bb(e,kb)}function Vb(e,t){e.__highByOuter|=1<<(t||0),Bb(e,Db)}function Wb(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Bb(e,kb)}function Yb(e){Bb(e,Nb)}function Gb(e){Bb(e,Rb)}function qb(e){Bb(e,Pb)}function Qb(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zb(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=yb(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(e){Nb(e)})),a&&n.push(i)),o.isBlured=!1})),xh(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Xb(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Yb(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries((function(e){var i=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&i&&"self"===t||Ob(e)})),yh(t))o(e.getData(),t);else if(kh(t))for(var c=Sh(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),yb(e).isBlured=!0}})),i.eachComponent((function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}}))}}function $b(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){yb(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse((function(e){Ob(e)}))}}}function Kb(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var o=r.getModel().getComponent(e,t);if(!o)return i;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return i;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===fb(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Jb(e){xh(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?Gb(t):qb(t)}))}))}function ew(e){var t=[];return e.eachSeries((function(e){xh(e.getAllData(),(function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(o.dataType=r),t.push(o)}}))})),t}function tw(e,t,n){aw(e,!0),Bb(e,zb),function(e,t,n){var r=fb(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function nw(e,t,n,r){r?function(e){aw(e,!1)}(e):tw(e,t,n)}var rw=["emphasis","blur","select"],iw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ow(e,t,n,r){n=n||"itemStyle";for(var i=0;i<rw.length;i++){var o=rw[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[iw[n]]()}}function aw(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function sw(e){return!(!e||!e.__highDownDispatcher)}function lw(e){var t=e.type;return t===Sb||t===Tb||t===Cb}function uw(e){var t=e.type;return t===bb||t===wb}var cw=g_.CMD,dw=[[],[],[]],pw=Math.sqrt,hw=Math.atan2;var fw=Math.sqrt,gw=Math.sin,mw=Math.cos,vw=Math.PI;function yw(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function xw(e,t){return(e[0]*t[0]+e[1]*t[1])/(yw(e)*yw(t))}function _w(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(xw(e,t))}function bw(e,t,n,r,i,o,a,s,l,u,c){var d=l*(vw/180),p=mw(d)*(e-n)/2+gw(d)*(t-r)/2,h=-1*gw(d)*(e-n)/2+mw(d)*(t-r)/2,f=p*p/(a*a)+h*h/(s*s);f>1&&(a*=fw(f),s*=fw(f));var g=(i===o?-1:1)*fw((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,m=g*a*h/s,v=g*-s*p/a,y=(e+n)/2+mw(d)*m-gw(d)*v,x=(t+r)/2+gw(d)*m+mw(d)*v,_=_w([1,0],[(p-m)/a,(h-v)/s]),b=[(p-m)/a,(h-v)/s],w=[(-1*p-m)/a,(-1*h-v)/s],S=_w(b,w);if(xw(b,w)<=-1&&(S=vw),xw(b,w)>=1&&(S=0),S<0){var T=Math.round(S/vw*1e6)/1e6;S=2*vw+T%2*vw}c.addData(u,y,x,a,s,_,S,d,o)}var ww=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Sw=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Tw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.applyTransform=function(e){},t}(L_);function Cw(e){return null!=e.setData}function Mw(e,t){var n=function(e){var t=new g_;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=g_.CMD,l=e.match(ww);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),p=void 0,h=c.match(Sw)||[],f=h.length,g=0;g<f;g++)h[g]=parseFloat(h[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,T=r,C=i,M=void 0,I=void 0;switch(d){case"l":r+=h[m++],i+=h[m++],p=s.L,t.addData(p,r,i);break;case"L":r=h[m++],i=h[m++],p=s.L,t.addData(p,r,i);break;case"m":r+=h[m++],i+=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="l";break;case"M":r=h[m++],i=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="L";break;case"h":r+=h[m++],p=s.L,t.addData(p,r,i);break;case"H":r=h[m++],p=s.L,t.addData(p,r,i);break;case"v":i+=h[m++],p=s.L,t.addData(p,r,i);break;case"V":i=h[m++],p=s.L,t.addData(p,r,i);break;case"C":p=s.C,t.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),r=h[m-2],i=h[m-1];break;case"c":p=s.C,t.addData(p,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i),r+=h[m-2],i+=h[m-1];break;case"S":v=r,y=i,M=t.len(),I=t.data,n===s.C&&(v+=r-I[M-4],y+=i-I[M-3]),p=s.C,T=h[m++],C=h[m++],r=h[m++],i=h[m++],t.addData(p,v,y,T,C,r,i);break;case"s":v=r,y=i,M=t.len(),I=t.data,n===s.C&&(v+=r-I[M-4],y+=i-I[M-3]),p=s.C,T=r+h[m++],C=i+h[m++],r+=h[m++],i+=h[m++],t.addData(p,v,y,T,C,r,i);break;case"Q":T=h[m++],C=h[m++],r=h[m++],i=h[m++],p=s.Q,t.addData(p,T,C,r,i);break;case"q":T=h[m++]+r,C=h[m++]+i,r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,T,C,r,i);break;case"T":v=r,y=i,M=t.len(),I=t.data,n===s.Q&&(v+=r-I[M-4],y+=i-I[M-3]),r=h[m++],i=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"t":v=r,y=i,M=t.len(),I=t.data,n===s.Q&&(v+=r-I[M-4],y+=i-I[M-3]),r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"A":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],bw(T=r,C=i,r=h[m++],i=h[m++],w,S,x,_,b,p=s.A,t);break;case"a":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],bw(T=r,C=i,r+=h[m++],i+=h[m++],w,S,x,_,b,p=s.A,t)}}"z"!==d&&"Z"!==d||(p=s.Z,t.addData(p),r=o,i=a),n=p}return t.toStatic(),t}(e),r=fh({},t);return r.buildPath=function(e){if(Cw(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=cw.M,d=cw.C,p=cw.L,h=cw.R,f=cw.A,g=cw.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case p:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=pw(t[0]*t[0]+t[1]*t[1]),x=pw(t[2]*t[2]+t[3]*t[3]),_=hw(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=_,l[i++]+=_,o=i+=2;break;case h:s[0]=l[i++],s[1]=l[i++],pf(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],pf(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var b=dw[a];b[0]=l[i++],b[1]=l[i++],pf(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var Iw=function(){this.cx=0,this.cy=0,this.r=0},Ew=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Iw},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(L_);Ew.prototype.type="circle";var Aw=Ew,Dw=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},kw=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Dw},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=o*n,l=a*n;e.moveTo(r-o,i),e.bezierCurveTo(r-o,i-l,r-s,i-a,r,i-a),e.bezierCurveTo(r+s,i-a,r+o,i-l,r+o,i),e.bezierCurveTo(r+o,i+l,r+s,i+a,r,i+a),e.bezierCurveTo(r-s,i+a,r-o,i+l,r-o,i),e.closePath()},t}(L_);kw.prototype.type="ellipse";var Ow=kw,Nw=Math.PI,Rw=2*Nw,Pw=Math.sin,Lw=Math.cos,Bw=Math.acos,jw=Math.atan2,Fw=Math.abs,zw=Math.sqrt,Uw=Math.max,Hw=Math.min,Vw=1e-4;function Ww(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/zw(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,g=r+d,m=(p+f)/2,v=(h+g)/2,y=f-p,x=g-h,_=y*y+x*x,b=i-o,w=p*g-f*h,S=(x<0?-1:1)*zw(Uw(0,b*b*_-w*w)),T=(w*x-y*S)/_,C=(-w*y-x*S)/_,M=(w*x+y*S)/_,I=(-w*y+x*S)/_,E=T-m,A=C-v,D=M-m,k=I-v;return E*E+A*A>D*D+k*k&&(T=M,C=I),{cx:T,cy:C,x0:-c,y0:-d,x1:T*(i/b-1),y1:C*(i/b-1)}}function Yw(e,t){var n,r=Uw(t.r,0),i=Uw(t.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,p=Fw(l-s),h=p>Rw&&p%Rw;if(h>Vw&&(p=h),r>Vw)if(p>Rw-Vw)e.moveTo(u+r*Lw(s),c+r*Pw(s)),e.arc(u,c,r,s,l,!d),i>Vw&&(e.moveTo(u+i*Lw(l),c+i*Pw(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,T=void 0,C=void 0,M=void 0,I=void 0,E=void 0,A=void 0,D=r*Lw(s),k=r*Pw(s),O=i*Lw(l),N=i*Pw(l),R=p>Vw;if(R){var P=t.cornerRadius;P&&(n=function(e){var t;if(Mh(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(P),f=n[0],g=n[1],m=n[2],v=n[3]);var L=Fw(r-i)/2;if(y=Hw(L,m),x=Hw(L,v),_=Hw(L,f),b=Hw(L,g),T=w=Uw(y,x),C=S=Uw(_,b),(w>Vw||S>Vw)&&(M=r*Lw(l),I=r*Pw(l),E=i*Lw(s),A=i*Pw(s),p<Nw)){var B=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,p=d*l-c*u;if(!(p*p<Vw))return[e+(p=(c*(t-o)-d*(e-i))/p)*l,t+p*u]}(D,k,E,A,M,I,O,N);if(B){var j=D-B[0],F=k-B[1],z=M-B[0],U=I-B[1],H=1/Pw(Bw((j*z+F*U)/(zw(j*j+F*F)*zw(z*z+U*U)))/2),V=zw(B[0]*B[0]+B[1]*B[1]);T=Hw(w,(r-V)/(H+1)),C=Hw(S,(i-V)/(H-1))}}}if(R)if(T>Vw){var W=Hw(m,T),Y=Hw(v,T),G=Ww(E,A,D,k,r,W,d),q=Ww(M,I,O,N,r,Y,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),T<w&&W===Y?e.arc(u+G.cx,c+G.cy,T,jw(G.y0,G.x0),jw(q.y0,q.x0),!d):(W>0&&e.arc(u+G.cx,c+G.cy,W,jw(G.y0,G.x0),jw(G.y1,G.x1),!d),e.arc(u,c,r,jw(G.cy+G.y1,G.cx+G.x1),jw(q.cy+q.y1,q.cx+q.x1),!d),Y>0&&e.arc(u+q.cx,c+q.cy,Y,jw(q.y1,q.x1),jw(q.y0,q.x0),!d))}else e.moveTo(u+D,c+k),e.arc(u,c,r,s,l,!d);else e.moveTo(u+D,c+k);if(i>Vw&&R)if(C>Vw){W=Hw(f,C),G=Ww(O,N,M,I,i,-(Y=Hw(g,C)),d),q=Ww(D,k,E,A,i,-W,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),C<S&&W===Y?e.arc(u+G.cx,c+G.cy,C,jw(G.y0,G.x0),jw(q.y0,q.x0),!d):(Y>0&&e.arc(u+G.cx,c+G.cy,Y,jw(G.y0,G.x0),jw(G.y1,G.x1),!d),e.arc(u,c,i,jw(G.cy+G.y1,G.cx+G.x1),jw(q.cy+q.y1,q.cx+q.x1),d),W>0&&e.arc(u+q.cx,c+q.cy,W,jw(q.y1,q.x1),jw(q.y0,q.x0),!d))}else e.lineTo(u+O,c+N),e.arc(u,c,i,l,s,d);else e.lineTo(u+O,c+N)}else e.moveTo(u,c);e.closePath()}}}var Gw=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},qw=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Gw},t.prototype.buildPath=function(e,t){Yw(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(L_);qw.prototype.type="sector";var Qw=qw,Zw=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Xw=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Zw},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(L_);Xw.prototype.type="ring";var $w=Xw;function Kw(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,h=e.length;p<h;p++)hf(a,a,e[p]),ff(s,s,e[p]);hf(a,a,r[0]),ff(s,s,r[1])}for(p=0,h=e.length;p<h;p++){var f=e[p];if(n)i=e[p?p-1:h-1],o=e[(p+1)%h];else{if(0===p||p===h-1){l.push(rf(e[p]));continue}i=e[p-1],o=e[p+1]}af(u,o,i),sf(u,u,t);var g=uf(f,i),m=uf(f,o),v=g+m;0!==v&&(g/=v,m/=v),sf(c,u,-g),sf(d,u,m);var y=of([],f,c),x=of([],f,d);r&&(ff(y,y,a),hf(y,y,s),ff(x,x,a),hf(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var Jw=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},eS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Jw},t.prototype.buildPath=function(e,t){Kw(e,t,!0)},t}(L_);eS.prototype.type="polygon";var tS=eS,nS=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},rS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nS},t.prototype.buildPath=function(e,t){Kw(e,t,!1)},t}(L_);rS.prototype.type="polyline";var iS=rS,oS={},aS=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},sS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new aS},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Y_(oS,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(L_);sS.prototype.type="line";var lS=sS,uS=[],cS=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function dS(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?Vg:Hg)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Vg:Hg)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Zg:Qg)(e.x1,e.cpx1,e.x2,t),(n?Zg:Qg)(e.y1,e.cpy1,e.y2,t)]}var pS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new cS},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&($g(n,a,i,c,uS),a=uS[1],i=uS[2],$g(r,s,o,c,uS),s=uS[1],o=uS[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(Gg(n,a,l,i,c,uS),a=uS[1],l=uS[2],i=uS[3],Gg(r,s,u,o,c,uS),s=uS[1],u=uS[2],o=uS[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return dS(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=dS(this.shape,e,!0);return lf(t,t)},t}(L_);pS.prototype.type="bezier-curve";var hS=pS,fS=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},gS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new fS},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(L_);gS.prototype.type="arc";var mS=gS,vS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return j(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),L_.prototype.getBoundingRect.call(this)},t}(L_),yS=vS,xS=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),_S=function(e){function t(t,n,r,i,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return j(t,e),t}(xS),bS=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return j(t,e),t}(xS),wS=[0,0],SS=[0,0],TS=new Zf,CS=new Zf,MS=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Zf;for(n=0;n<2;n++)this._axes[n]=new Zf;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);Zf.sub(r[0],n[1],n[0]),Zf.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return TS.set(1/0,1/0),CS.set(0,0),!this._intersectCheckOneSide(this,e,TS,CS,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,TS,CS,r,-1)&&(n=!1,r)||r||Zf.copy(t,n?TS:CS),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,wS),this._getProjMinMaxOnAxis(s,t._corners,SS),wS[1]<SS[0]||wS[0]>SS[1]){if(a=!1,i)return a;var u=Math.abs(SS[0]-wS[1]),c=Math.abs(wS[0]-SS[1]);Math.min(u,c)>r.len()&&(u<c?Zf.scale(r,l,-u*o):Zf.scale(r,l,c*o))}else if(n){u=Math.abs(SS[0]-wS[1]),c=Math.abs(wS[0]-SS[1]);Math.min(u,c)<n.len()&&(u<c?Zf.scale(n,l,u*o):Zf.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),IS=MS,ES=[],AS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return j(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new og(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(ES)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(Lx),DS=Wy();function kS(e,t,n,r,i,o,a){var s,l=!1;Ih(i)?(a=o,o=i,i=null):kh(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=function(e,t,n,r,i){var o;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=jh(r.duration,200),u=jh(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),Ih(c)&&(c=c(n,i)),Ih(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function OS(e,t,n,r,i,o){kS("update",e,t,n,r,i,o)}function NS(e,t,n,r,i,o){kS("enter",e,t,n,r,i,o)}function RS(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function PS(e,t,n,r,i,o){RS(e)||kS("leave",e,t,n,r,i,o)}function LS(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),PS(e,{style:{opacity:0}},t,n,r)}function BS(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||LS(e,t,n,r)})):LS(e,t,n,r)}function jS(e){DS(e).oldStyle=e.style}var FS=Math.max,zS=Math.min,US={};var HS=function(e,t){var n=Mw(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return j(t,e),t}(Tw)};function VS(e,t){US[e]=t}function WS(e,t,n,r){var i=function(e,t){return new Tw(Mw(e,t))}(e,t);return n&&("center"===r&&(n=GS(n,i.getBoundingRect())),QS(i,n)),i}function YS(e,t,n){var r=new V_({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(GS(t,i))}}});return r}function GS(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var qS=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new L_(t);return a.createPathProxy(),a.buildPath=function(e){if(Cw(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function QS(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function ZS(e,t){return Y_(e,e,{lineWidth:t}),e}var XS=q_;function $S(e,t){for(var n=Vf([]);e&&e!==t;)Wf(n,e.getLocalTransform(),n),e=e.parent;return n}function KS(e,t,n){return t&&!yh(t)&&(t=Lv.getLocalTransform(t)),n&&(t=qf([],t)),pf([],e,t)}function JS(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return o=KS(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function eT(e){return!e.isGroup}function tT(e,t,n){if(e&&t){var r,i=(r={},e.traverse((function(e){eT(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(eT(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),OS(e,r,n,fb(e).dataIndex)}}}))}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=fh({},e.shape)),t}}function nT(e,t){return _h(e,(function(e){var n=e[0];n=FS(n,t.x),n=zS(n,t.x+t.width);var r=e[1];return r=FS(r,t.y),[n,r=zS(r,t.y+t.height)]}))}function rT(e,t,n){var r=fh({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),gh(i,n),new V_(r)):WS(e.replace("path://",""),r,n,"center")}function iT(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(oT(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function oT(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,p=s-o,h=aT(d,p,u,c);if((l=h)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=aT(f,g,u,c)/h;if(m<0||m>1)return!1;var v=aT(f,g,d,p)/h;return!(v<0||v>1)}function aT(e,t,n,r){return e*r-n*t}function sT(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=Eh(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&xh(Sh(l),(function(e){Jh(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=fb(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:gh({content:r,formatterParams:s},i)}}function lT(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function uT(e,t){if(e)if(Mh(e))for(var n=0;n<e.length;n++)lT(e[n],t);else lT(e,t)}VS("circle",Aw),VS("ellipse",Ow),VS("sector",Qw),VS("ring",$w),VS("polygon",tS),VS("polyline",iS),VS("rect",$_),VS("line",lS),VS("bezierCurve",hS),VS("arc",mS);var cT=Object.freeze({__proto__:null,updateProps:OS,initProps:NS,removeElement:PS,removeElementWithFadeOut:BS,isElementRemoved:RS,extendShape:function(e){return L_.extend(e)},extendPath:function(e,t){return HS(e,t)},registerShape:VS,getShapeClass:function(e){if(US.hasOwnProperty(e))return US[e]},makePath:WS,makeImage:YS,mergePath:qS,resizePath:QS,subPixelOptimizeLine:ZS,subPixelOptimizeRect:function(e){return G_(e.shape,e.shape,e.style),e},subPixelOptimize:XS,getTransform:$S,applyTransform:KS,transformDirection:JS,groupTransition:tT,clipPointsByRect:nT,clipRectByRect:function(e,t){var n=FS(e.x,t.x),r=zS(e.x+e.width,t.x+t.width),i=FS(e.y,t.y),o=zS(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},createIcon:rT,linePolygonIntersect:iT,lineLineIntersect:oT,setTooltipConfig:sT,traverseElements:uT,Group:ay,Image:V_,Text:hb,Circle:Aw,Ellipse:Ow,Sector:Qw,Ring:$w,Polygon:tS,Polyline:iS,Rect:$_,Line:lS,BezierCurve:hS,Arc:mS,IncrementalDisplayable:AS,CompoundPath:yS,LinearGradient:_S,RadialGradient:bS,BoundingRect:og,OrientedBoundingRect:IS,Point:Zf,Path:L_}),dT={};function pT(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=Ih(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<xb.length;u++){var c=xb[u],d=t[c];l[c]=jh(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function hT(e,t,n,r){n=n||dT;for(var i=e instanceof hb,o=!1,a=0;a<_b.length;a++){if((p=t[_b[a]])&&p.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new hb,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=pT(n,t),u=t.normal,c=!!u.getShallow("show"),d=gT(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(mT(u,n,!1));for(a=0;a<xb.length;a++){var p,h=xb[a];if(p=t[h]){var f=s.ensureState(h),g=!!jh(p.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=gT(p,r&&r[h],n,!0,!i),f.style.text=l[h],!i)e.ensureState(h).textConfig=mT(p,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(bT(s).setLabelText=function(e){var r=pT(n,t,e);!function(e,t){for(var n=0;n<xb.length;n++){var r=xb[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(s,r)})}else s&&(s.ignore=!0);e.dirty()}function fT(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<xb.length;r++){var i=xb[r];n[i]=e.getModel([i,t])}return n}function gT(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||dT;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||dT).rich;if(n){t=t||{};for(var r=Sh(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(t);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);_T(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var p=t.get("minMargin");null!=p&&(e.margin=p);_T(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&fh(o,t),o}function mT(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=jh(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var vT=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],yT=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],xT=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function _T(e,t,n,r,i,o,a,s){n=!i&&n||dT;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=jh(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var p=jh(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=jh(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var f=jh(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),i||o||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<vT.length;g++){var m=vT[g];null!=(y=jh(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<yT.length;g++){m=yT[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!r.disableBox){for(g=0;g<xT.length;g++){var y;m=xT[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}var bT=Wy();var wT,ST,TT=["textStyle","color"],CT=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],MT=new hb,IT=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(TT):null)},e.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=this.ecModel,n=t&&t.getModel("textStyle"),Vh([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t,n},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<CT.length;n++)t[CT[n]]=this.getShallow(CT[n]);return MT.useStyle(t),MT.update(),MT.getBoundingRect()},e}(),ET=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],AT=sx(ET),DT=function(){function e(){}return e.prototype.getLineStyle=function(e){return AT(this,e)},e}(),kT=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],OT=sx(kT),NT=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return OT(this,e,t)},e}(),RT=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){hh(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(ph(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Yp.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();tx(RT),wT=RT,ST=["__\0is_clz",rx++].join("_"),wT.prototype[ST]=!0,wT.isInstance=function(e){return!(!e||!e[ST])},vh(RT,DT),vh(RT,NT),vh(RT,ux),vh(RT,IT);var PT=RT,LT=Math.round(10*Math.random());function BT(e){return[e||"",LT++].join("_")}function jT(e,t){return hh(hh({},e,!0),t,!0)}var FT="ZH",zT="EN",UT=zT,HT={},VT={},WT=Yp.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(FT)>-1?FT:UT;function YT(e,t){e=e.toUpperCase(),VT[e]=new PT(t),HT[e]=t}YT(zT,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),YT(FT,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var GT=1e3,qT=6e4,QT=36e5,ZT=864e5,XT=31536e6,$T={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},KT="{yyyy}-{MM}-{dd}",JT={year:"{yyyy}",month:"{yyyy}-{MM}",day:KT,hour:KT+" "+$T.hour,minute:KT+" "+$T.minute,second:KT+" "+$T.second,millisecond:$T.none},eC=["year","month","day","hour","minute","second","millisecond"],tC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function nC(e,t){return"0000".substr(0,t-(e+="").length)+e}function rC(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function iC(e){return e===rC(e)}function oC(e,t,n,r){var i=wy(e),o=i[lC(n)](),a=i[uC(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[cC(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[dC(n)](),d=(c-1)%12+1,p=i[pC(n)](),h=i[hC(n)](),f=i[fC(n)](),g=r instanceof PT?r:function(e){return VT[e]}(r||WT)||VT[UT],m=g.getModel("time"),v=m.get("month"),y=m.get("monthAbbr"),x=m.get("dayOfWeek"),_=m.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,nC(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,nC(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,nC(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,nC(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,nC(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,nC(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,nC(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,nC(f,3)).replace(/{S}/g,f+"")}function aC(e,t){var n=wy(e),r=n[uC(t)]()+1,i=n[cC(t)](),o=n[dC(t)](),a=n[pC(t)](),s=n[hC(t)](),l=0===n[fC(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,p=d&&1===i;return p&&1===r?"year":p?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function sC(e,t,n){var r=Dh(e)?wy(e):e;switch(t=t||aC(e,n)){case"year":return r[lC(n)]();case"half-year":return r[uC(n)]()>=6?1:0;case"quarter":return Math.floor((r[uC(n)]()+1)/4);case"month":return r[uC(n)]();case"day":return r[cC(n)]();case"half-day":return r[dC(n)]()/24;case"hour":return r[dC(n)]();case"minute":return r[pC(n)]();case"second":return r[hC(n)]();case"millisecond":return r[fC(n)]()}}function lC(e){return e?"getUTCFullYear":"getFullYear"}function uC(e){return e?"getUTCMonth":"getMonth"}function cC(e){return e?"getUTCDate":"getDate"}function dC(e){return e?"getUTCHours":"getHours"}function pC(e){return e?"getUTCMinutes":"getMinutes"}function hC(e){return e?"getUTCSeconds":"getSeconds"}function fC(e){return e?"getUTCMilliseconds":"getMilliseconds"}function gC(e){return e?"setUTCFullYear":"setFullYear"}function mC(e){return e?"setUTCMonth":"setMonth"}function vC(e){return e?"setUTCDate":"setDate"}function yC(e){return e?"setUTCHours":"setHours"}function xC(e){return e?"setUTCMinutes":"setMinutes"}function _C(e){return e?"setUTCSeconds":"setSeconds"}function bC(e){return e?"setUTCMilliseconds":"setMilliseconds"}function wC(e){if(isNaN(Cy(e)))return Eh(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function SC(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var TC=Uh;function CC(e,t,n){function r(e){return e&&Vh(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?wy(e):e;if(!isNaN(+s))return oC(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Ah(e)?r(e):Dh(e)&&i(e)?e+"":"-";var l=Cy(e);return i(l)?wC(l):Ah(e)?r(e):"boolean"==typeof e?e+"":"-"}var MC=["a","b","c","d","e","f","g"],IC=function(e,t){return"{"+e+(null==t?"":t)+"}"};function EC(e,t,n){Mh(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=MC[o];e=e.replace(IC(a),IC(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(IC(MC[l],s),n?Af(u):u)}return e}function AC(e,t){return t=t||"transparent",Eh(e)?e:kh(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function DC(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var kC=xh,OC=["left","right","top","bottom","width","height"],NC=[["width","left","right"],["height","top","bottom"]];function RC(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild((function(l,u){var c,d,p=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect();if("horizontal"===e){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(f?-f.y+p.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)}))}var PC=RC;function LC(e,t,n){n=TC(n||0);var r=t.width,i=t.height,o=hy(e.left,r),a=hy(e.top,i),s=hy(e.right,r),l=hy(e.bottom,i),u=hy(e.width,r),c=hy(e.height,i),d=n[2]+n[0],p=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-p-o),isNaN(c)&&(c=i-l-d-a),null!=h&&(isNaN(u)&&isNaN(c)&&(h>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(o)&&(o=r-s-u-p),isNaN(a)&&(a=i-l-c-d),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-p}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}o=o||0,a=a||0,isNaN(u)&&(u=r-p-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new og(o+n[3],a+n[0],u,c);return f.margin=n,f}function BC(e){var t=e.layoutMode||e.constructor.layoutMode;return kh(t)?t:t?{type:t}:null}function jC(e,t,n){var r=n&&n.ignoreSize;!Mh(r)&&(r=[r,r]);var i=a(NC[0],0),o=a(NC[1],1);function a(n,i){var o={},a=0,u={},c=0;if(kC(n,(function(t){u[t]=e[t]})),kC(n,(function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++})),r[i])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var d=0;d<n.length;d++){var p=n[d];if(!s(o,p)&&s(e,p)){o[p]=e[p];break}}return o}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){kC(e,(function(e){t[e]=n[e]}))}u(NC[0],e,i),u(NC[1],e,o)}function FC(e){return function(e,t){return t&&e&&kC(OC,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}({},e)}Ch(RC,"vertical"),Ch(RC,"horizontal");var zC=Wy(),UC=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=BT("ec_cpt_model"),i}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=BC(this),r=n?FC(e):{};hh(e,t.getTheme().get(this.mainType)),hh(e,this.getDefaultOption()),n&&jC(e,r,n)},t.prototype.mergeOption=function(e,t){hh(this.option,e,!0);var n=BC(this);n&&jC(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Jy])}(e))return e.defaultOption;var t=zC(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=hh(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Xy(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(PT);nx(UC,PT),ax(UC),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=ex(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=ex(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(UC),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,o){if(e.length){var a=function(e){var r={},i=[];return xh(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return xh(e,(function(e){mh(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),xh(s,(function(e){mh(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);mh(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(xh(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],p=!!u[c];p&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),xh(d.successor,p?f:h)}xh(u,(function(){throw new Error("")}))}function h(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,h(e)}}}(UC,(function(e){var t=[];xh(UC.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=_h(t,(function(e){return ex(e).main})),"dataset"!==e&&mh(t,"dataset")<=0&&t.unshift("dataset");return t}));var HC=UC,VC="";"undefined"!=typeof navigator&&(VC=navigator.platform||"");var WC="rgba(0, 0, 0, 0.2)",YC={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:WC,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:WC,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:WC,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:WC,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:WC,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:WC,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:VC.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},GC=Xh(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),qC="original",QC="arrayRows",ZC="objectRows",XC="keyedColumns",$C="typedArray",KC="unknown",JC="column",eM="row",tM=1,nM=2,rM=3,iM=Wy();function oM(e,t,n){var r={},i=aM(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=iM(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;xh(e=e.slice(),(function(t,n){var i=kh(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var p=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return xh(e,(function(e,t){var n=e.name,i=f(e);if(null==o){var a=p.valueWayDim;h(r[n],a,i),h(l,a,i),p.valueWayDim+=i}else if(o===t)h(r[n],0,i),h(s,0,i);else{a=p.categoryWayDim;h(r[n],a,i),h(l,a,i),p.categoryWayDim+=i}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function aM(e){if(!e.get("data",!0))return Xy(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Qy).models[0]}function sM(e,t){return function(e,t,n,r,i,o){var a,s,l,u=5;if(Nh(e))return rM;if(r){var c=r[o];kh(c)?(s=c.name,l=c.type):Eh(c)&&(s=c)}if(null!=l)return"ordinal"===l?tM:rM;if(t===QC){var d=e;if(n===eM){for(var p=d[o],h=0;h<(p||[]).length&&h<u;h++)if(null!=(a=x(p[i+h])))return a}else for(h=0;h<d.length&&h<u;h++){var f=d[i+h];if(f&&null!=(a=x(f[o])))return a}}else if(t===ZC){var g=e;if(!s)return rM;for(h=0;h<g.length&&h<u;h++){if((v=g[h])&&null!=(a=x(v[s])))return a}}else if(t===XC){if(!s)return rM;if(!(p=e[s])||Nh(p))return rM;for(h=0;h<p.length&&h<u;h++)if(null!=(a=x(p[h])))return a}else if(t===qC){var m=e;for(h=0;h<m.length&&h<u;h++){var v,y=Py(v=m[h]);if(!Mh(y))return rM;if(null!=(a=x(y[o])))return a}}function x(e){var t=Eh(e);return null!=e&&isFinite(e)&&""!==e?t?nM:rM:t&&"-"!==e?tM:void 0}return rM}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var lM=Xh();var uM=Wy();Wy();var cM,dM,pM,hM=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Oy(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,o,a){o=o||e;var s=t(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if(c=c||n,!c||!c.length)return;var d=c[l];i&&(u[i]=d);return s.paletteIdx=(l+1)%c.length,d}(this,uM,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,uM)},e}();var fM="\0_ec_inner",gM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new PT(r),this._locale=new PT(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=yM(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,yM(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):pM(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&xh(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=Xh(),s=t&&t.replaceMergeMainTypeMap;iM(this).datasetMap=Xh(),xh(e,(function(e,t){null!=e&&(HC.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?ph(e):hh(n[t],e,!0))})),s&&s.each((function(e,t){HC.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),HC.topologicalTravel(o,HC.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=lM.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,Oy(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=By(a,o,l);(function(e,t,n){xh(e,(function(e){var r=e.newOption;kh(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,HC),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],p=[],h=0;xh(u,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=HC.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=fh({componentIndex:n},e.keyInfo);fh(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),p.push(r),h++):(d.push(void 0),p.push(void 0))}),this),n[t]=d,r.set(t,p),i.set(t,h),"series"===t&&cM(this)}),this),this._seriesIndices||cM(this)},t.prototype.getOption=function(){var e=ph(this.option);return xh(e,(function(t,n){if(HC.hasClass(n)){for(var r=Oy(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!Hy(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[fM],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],xh(Oy(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=i?mM("id",i,a):null!=o?mM("name",o,a):wh(a,(function(e){return!!e})),vM(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(t=a)||null==t[n]&&null==t[r]&&null==t[i]?null:{mainType:s,index:t[n],id:t[r],name:t[i]}),u=l?this.queryComponents(l):wh(this._componentsMap.get(s),(function(e){return!!e}));return o=vM(u,e),e.filter?wh(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Ih(e)){var i=t,o=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&o.call(i,t,r,r.componentIndex)}}))}else for(var a=Eh(e)?r.get(e):kh(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=zy(e,null);return wh(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return wh(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return wh(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){dM(this),xh(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){xh(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){dM(this),xh(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)}),this)},t.prototype.eachRawSeriesByType=function(e,t,n){return xh(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return dM(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){dM(this);var n=[];xh(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=Xh(n)},t.prototype.restoreData=function(e){cM(this);var t=this._componentsMap,n=[];t.each((function(e,t){HC.hasClass(t)&&n.push(t)})),HC.topologicalTravel(n,HC.getAllClassMainTypes(),(function(n){xh(t.get(n),(function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e)||t.restoreData()}))}))},t.internalField=(cM=function(e){var t=e._seriesIndices=[];xh(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Xh(t)},dM=function(e){},void(pM=function(e,t){e.option={},e.option[fM]=1,e._componentsMap=Xh({series:[]}),e._componentsCount=Xh();var n=t.aria;kh(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;xh(t,(function(t,r){"colorLayer"===r&&n||HC.hasClass(r)||("object"==typeof t?e[r]=e[r]?hh(e[r],t,!1):ph(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),hh(t,YC,!1),e._mergeOption(t,null)})),t}(PT);function mM(e,t,n){if(Mh(t)){var r=Xh();return xh(t,(function(e){null!=e&&(null!=zy(e,null)&&r.set(e,!0))})),wh(n,(function(t){return t&&r.get(t[e])}))}var i=zy(t,null);return wh(n,(function(t){return t&&null!=i&&t[e]===i}))}function vM(e,t){return t.hasOwnProperty("subType")?wh(e,(function(e){return e&&e.subType===t.subType})):e}function yM(e){var t=Xh();return e&&xh(Oy(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}vh(gM,hM);var xM=gM,_M=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],bM=function(e){xh(_M,(function(t){this[t]=Th(e[t],e)}),this)},wM={},SM=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];xh(wM,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){xh(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){wM[e]=t},e.get=function(e){return wM[e]},e}(),TM=/^(min|max)?(.+)$/,CM=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(xh(Oy(e.series),(function(e){e&&e.data&&Nh(e.data)&&Yh(e.data)})),xh(Oy(e.dataset),(function(e){e&&e.source&&Nh(e.source)&&Yh(e.source)}))),e=ph(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e);c&&Mh(u)&&xh(u,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function p(e){xh(t,(function(t){t(e,n)}))}return p(i),xh(l,(function(e){return p(e)})),xh(o,(function(e){return p(e.option)})),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],ph(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=ph(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)MM(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=_h(s,(function(e){return ph(-1===e?a.option:o[e].option)}))),this._currentMediaIndices=s,l},e}();function MM(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return xh(e,(function(e,t){var n=t.match(TM);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[a],e,o)||(i=!1)}})),i}var IM=CM,EM=xh,AM=kh,DM=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function kM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=DM.length;n<r;n++){var i=DM[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?hh(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?hh(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function OM(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,gh(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function NM(e){OM(e,"itemStyle"),OM(e,"lineStyle"),OM(e,"areaStyle"),OM(e,"label"),OM(e,"labelLine"),OM(e,"upperLabel"),OM(e,"edgeLabel")}function RM(e,t){var n=AM(e)&&e[t],r=AM(n)&&n.textStyle;if(r)for(var i=0,o=Ry.length;i<o;i++){var a=Ry[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function PM(e){e&&(NM(e),RM(e,"label"),e.emphasis&&RM(e.emphasis,"label"))}function LM(e){return Mh(e)?e:e?[e]:[]}function BM(e){return(Mh(e)?e[0]:e)||{}}function jM(e,t){EM(LM(e.series),(function(e){AM(e)&&function(e){if(AM(e)){kM(e),NM(e),RM(e,"label"),RM(e,"upperLabel"),RM(e,"edgeLabel"),e.emphasis&&(RM(e.emphasis,"label"),RM(e.emphasis,"upperLabel"),RM(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(kM(t),PM(t));var n=e.markLine;n&&(kM(n),PM(n));var r=e.markArea;r&&PM(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Nh(o))for(var a=0;a<o.length;a++)PM(o[a]);xh(e.categories,(function(e){NM(e)}))}if(i&&!Nh(i))for(a=0;a<i.length;a++)PM(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)PM(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)Mh(l[a])?(PM(l[a][0]),PM(l[a][1])):PM(l[a])}"gauge"===e.type?(RM(e,"axisLabel"),RM(e,"title"),RM(e,"detail")):"treemap"===e.type?(OM(e.breadcrumb,"itemStyle"),xh(e.levels,(function(e){NM(e)}))):"tree"===e.type&&NM(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),EM(n,(function(t){EM(LM(e[t]),(function(e){e&&(RM(e,"axisLabel"),RM(e.axisPointer,"label"))}))})),EM(LM(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;RM(t,"axisLabel"),RM(t&&t.axisPointer,"label")})),EM(LM(e.calendar),(function(e){OM(e,"itemStyle"),RM(e,"dayLabel"),RM(e,"monthLabel"),RM(e,"yearLabel")})),EM(LM(e.radar),(function(e){RM(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),EM(LM(e.geo),(function(e){AM(e)&&(PM(e),EM(LM(e.regions),(function(e){PM(e)})))})),EM(LM(e.timeline),(function(e){PM(e),OM(e,"label"),OM(e,"itemStyle"),OM(e,"controlStyle",!0);var t=e.data;Mh(t)&&xh(t,(function(e){kh(e)&&(OM(e,"label"),OM(e,"itemStyle"))}))})),EM(LM(e.toolbox),(function(e){OM(e,"iconStyle"),EM(e.feature,(function(e){OM(e,"iconStyle")}))})),RM(BM(e.axisPointer),"label"),RM(BM(e.tooltip).axisPointer,"label")}function FM(e){e&&xh(zM,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var zM=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],UM=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],HM=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function VM(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<HM.length;n++){var r=HM[n][1],i=HM[n][0];null!=t[r]&&(t[i]=t[r])}}function WM(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function YM(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function GM(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&GM(e[n].children,t)}function qM(e,t){jM(e,t),e.series=Oy(e.series),xh(e.series,(function(e){if(kh(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),WM(e.label),(i=e.data)&&!Nh(i))for(var n=0;n<i.length;n++)WM(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var i,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];(r||null==a[o[s]])&&(a[o[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var i;if(VM(e),VM(e.backgroundStyle),VM(e.emphasis),(i=e.data)&&!Nh(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(VM(i[n]),VM(i[n]&&i[n].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o)),YM(e),GM(e.data,YM)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&gh(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),FM(e)}})),e.dataRange&&(e.visualMap=e.dataRange),xh(UM,(function(t){var n=e[t];n&&(Mh(n)||(n=[n]),xh(n,(function(e){FM(e)})))}))}function QM(e){xh(e,(function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,u,c){var d,p,h=a.get(t.stackedDimension,c);if(isNaN(h))return i;s?p=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var v=m.data.getByRawIndex(m.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&h>=0&&v>0||"samesign"===l&&h<=0&&v<0){h=yy(h,v),f=v;break}}}return r[0]=h,r[1]=f,r}))}))}var ZM,XM,$M,KM,JM,eI=function(e){this.data=e.data||(e.sourceFormat===XC?{}:[]),this.sourceFormat=e.sourceFormat||KC,this.seriesLayoutBy=e.seriesLayoutBy||JC,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&sM(this,n)===tM&&(r.type="ordinal")}};function tI(e){return e instanceof eI}function nI(e,t,n){n=n||oI(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:aI(i),startIndex:a,dimensionsDetectedCount:o};if(t===QC){var s=e;"auto"===r||null==r?sI((function(e){null!=e&&"-"!==e&&(Eh(e)?null==a&&(a=1):a=0)}),n,s,10):a=Dh(r)?r:r?1:0,i||1!==a||(i=[],sI((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===eM?s.length:s[0]?s[0].length:null}else if(t===ZC)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return Sh(t)}(e));else if(t===XC)i||(i=[],xh(e,(function(e,t){i.push(t)})));else if(t===qC){var l=Py(e[0]);o=Mh(l)&&l.length||1}return{startIndex:a,dimensionsDefine:aI(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new eI({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ph(t)})}function rI(e){return new eI({data:e,sourceFormat:Nh(e)?$C:qC})}function iI(e){return new eI({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:ph(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function oI(e){var t=KC;if(Nh(e))t=$C;else if(Mh(e)){0===e.length&&(t=QC);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(Mh(i)){t=QC;break}if(kh(i)){t=ZC;break}}}}else if(kh(e))for(var o in e)if(Jh(e,o)&&yh(e[o])){t=XC;break}return t}function aI(e){if(e){var t=Xh();return _h(e,(function(e,n){var r={name:(e=kh(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r}))}}function sI(e,t,n,r){if(t===eM)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)e(o[i],i)}}function lI(e){var t=e.sourceFormat;return t===ZC||t===XC}var uI=function(){function e(e,t){var n=tI(e)?e:rI(e);this._source=n;var r=this._data=n.data;n.sourceFormat===$C&&(this._offset=0,this._dimSize=t,this._data=r),JM(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;JM=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(fh(e,KM[xI(a,s)]),a===$C)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=pI(a,s);e.getItem=Th(c,null,i,l,u);var d=gI(a,s);e.count=Th(d,null,i,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],p=0;p<c;p++){var h=i[p*o+a];d[e+p]=h,h<l&&(l=h),h>u&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[QC+"_"+JC]={pure:!0,appendData:i},e[QC+"_"+eM]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[ZC]={pure:!0,appendData:i},e[XC]={pure:!0,appendData:function(e){var t=this._data;xh(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},e[qC]={appendData:i},e[$C]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},KM=e}(),e}(),cI=function(e,t,n,r){return e[r]},dI=((ZM={})[QC+"_"+JC]=function(e,t,n,r){return e[r+t]},ZM[QC+"_"+eM]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=e,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[r]:null}return o},ZM[ZC]=cI,ZM[XC]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},ZM[qC]=cI,ZM);function pI(e,t){return dI[xI(e,t)]}var hI=function(e,t,n){return e.length},fI=((XM={})[QC+"_"+JC]=function(e,t,n){return Math.max(0,e.length-t)},XM[QC+"_"+eM]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},XM[ZC]=hI,XM[XC]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},XM[qC]=hI,XM);function gI(e,t){return fI[xI(e,t)]}var mI=function(e,t,n){return e[t]},vI=(($M={})[QC]=mI,$M[ZC]=function(e,t,n){return e[n]},$M[XC]=mI,$M[qC]=function(e,t,n){var r=Py(e);return r instanceof Array?r[t]:r},$M[$C]=mI,$M);function yI(e){return vI[e]}function xI(e,t){return e===QC?e+"_"+t:e}function _I(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return yI(o)(r,a,s)}var l=r;return o===qC&&(l=Py(r)),l}}}var bI=/\{@(.+?)\}/g,wI=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,p=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(o&&(s.value=o.interpolatedValue),null!=r&&Mh(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return Ih(i)?(s.status=t,s.dimensionIndex=r,i(s)):Eh(i)?EC(i,s).replace(bI,(function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=_I(a,e,i);if(o&&Mh(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return _I(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function SI(e){var t,n;return kh(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function TI(e){return new CI(e)}var CI=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,h=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||p<h)){var f=this._progress;if(Mh(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],p,h,l,u);else this._doProgress(f,p,h,l,u)}this._dueIndex=h;var m=null!=this._settedOutputEnd?this._settedOutputEnd:h;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){MI.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:MI.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),Mh(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),MI=function(){var e,t,n,r,i,o={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,i=Math.ceil(r/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function II(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Dh(e)||null==e||"-"===e||(e=+wy(e)),null==e||""===e?NaN:+e)}Xh({number:function(e){return parseFloat(e)},time:function(e){return+wy(e)},trim:function(e){return Eh(e)?Vh(e):e}});var EI=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Dh(e)?e:Cy(e),r=Dh(t)?t:Cy(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=Eh(e),s=Eh(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),AI=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return II(e,t)},e}();function DI(e){if(!LI(e.sourceFormat)){Ay("")}return e.data}function kI(e){var t=e.sourceFormat,n=e.data;if(!LI(t)){Ay("")}if(t===QC){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===ZC){for(r=[],i=0,o=n.length;i<o;i++)r.push(fh({},n[i]));return r}}function OI(e,t,n){if(null!=n)return Dh(n)||!isNaN(n)&&!Jh(t,n)?e[n]:Jh(t,n)?t[n]:void 0}function NI(e){return ph(e)}var RI=Xh();function PI(e,t,n,r){t.length||Ay(""),kh(e)||Ay("");var i=e.type,o=RI.get(i);o||Ay("");var a=_h(t,(function(e){return function(e,t){var n=new AI,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==JC&&Ay("");var a=[],s={},l=e.dimensionsDefine;if(l)xh(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(Jh(s,n)&&Ay(""),s[n]=r)}));else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=pI(i,JC);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=Th(DI,null,e)),n.cloneRawData=Th(kI,null,e);var d=gI(i,JC);n.count=Th(d,null,r,o,a);var p=yI(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return h(n,t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=Th(OI,null,a,s),n.cloneAllDimensionInfo=Th(NI,null,a),n}(e,o)}));return _h(Oy(o.transform({upstream:a[0],upstreamList:a,config:ph(e.config)})),(function(e,n){var r;kh(e)||Ay(""),e.data||Ay(""),LI(oI(e.data))||Ay("");var i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:JC,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:JC,sourceHeader:0,dimensions:e.dimensions};return nI(e.data,r,null)}))}function LI(e){return e===QC||e===ZC}var BI,jI="undefined",FI=typeof Uint32Array===jI?Array:Uint32Array,zI=typeof Uint16Array===jI?Array:Uint16Array,UI=typeof Int32Array===jI?Array:Int32Array,HI=typeof Float64Array===jI?Array:Float64Array,VI={float:HI,int:UI,ordinal:Array,number:Array,time:HI};function WI(e){return e>65535?FI:zI}function YI(e,t,n,r,i){var o=VI[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var GI=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Xh()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=BI[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],lI(r),this._dimensions=_h(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new VI[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=[1/0,-1/0]);for(var s=i[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){YI(n,l,(h=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<i;p++){var h=r[p],f=BI.arrayRows.call(this,e[d]||u,h.property,d,p);n[p][c]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=_h(o,(function(e){return e.property})),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=[1/0,-1/0]),YI(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],p=e;p<t;p++){d=r.getItem(p,d);for(var h=0;h<a;h++){var f=i[h],g=this._dimValueGetter(d,l[h],p,h);f[p]=g;var m=s[h];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var n=t.sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{e=new(n=WI(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(WI(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,p=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][p],c)}else{for(var h=0;h<a;h++)o[h]=u[e[h]][p];o[h]=c,d=t.apply(null,o)}d&&(i[s++]=p)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=Sh(e),i=r.length;if(!i)return this;var o=t.count(),a=new(WI(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,p=!1;if(!t._indices){var h=0;if(1===i){for(var f=d[r[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[s++]=h),h++}p=!0}else if(2===i){f=d[r[0]];var m=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(g=0;g<n;g++){var x=f[g],_=m[g];(x>=u&&x<=c||isNaN(x))&&(_>=v&&_<=y||isNaN(_))&&(a[s++]=h),h++}p=!0}}if(!p)if(1===i)for(g=0;g<o;g++){var b=t.getRawIndex(g);((x=d[r[0]][b])>=u&&x<=c||isNaN(x))&&(a[s++]=b)}else for(g=0;g<o;g++){for(var w=!0,S=(b=t.getRawIndex(g),0);S<i;S++){var T=r[S];((x=d[T][b])<e[T][0]||x>e[T][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=[1/0,-1/0];for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),p=0;p<o;p++)s[p]=r[t[p]][d];s[o]=c;var h=n&&n.apply(null,s);if(null!=h){"object"!=typeof h&&(i[0]=h,h=i);for(u=0;u<h.length;u++){var f=t[u],g=h[u],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(WI(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var p=1;p<s-1;p+=u){for(var h=Math.min(p+u,s-1),f=Math.min(p+2*u,s),g=(f+h)/2,m=0,v=h;v<f;v++){var y=a[C=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-h;var x=p,_=Math.min(p+u,s),b=p-1,w=a[c];n=-1,i=x;var S=-1,T=0;for(v=x;v<_;v++){var C;y=a[C=this.getRawIndex(v)];isNaN(y)?(T++,S<0&&(S=C)):(r=Math.abs((b-g)*(y-w)-(b-v)*(m-w)))>n&&(n=r,i=C)}T>0&&T<_-x&&(d[l++]=Math.min(S,i),i=Math.max(S,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(WI(this._rawCount))(Math.ceil(u/s)),p=0,h=0;h<u;h+=s){s>u-h&&(s=u-h,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(h+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(h+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[p++]=v}return i._count=p,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var o=(r=n)[0],a=r[1],s=0;s<i;s++){var l=t[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return r=[o,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r,i,o=new e,a=this._chunks,s=t&&bh(t,(function(e,t){return e[t]=!0,e}),{});if(s)for(var l=0;l<a.length;l++)o._chunks[l]=s[l]?(r=a[l],i=void 0,(i=r.constructor)===Array?r.slice():new i(r)):a[l];else o._chunks=a;return this._copyCommonProps(o),n||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ph(this._extent),e._rawExtent=ph(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return II(e[r],this._dimensions[r])}BI={arrayRows:e,objectRows:function(e,t,n,r){return II(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return II(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),qI=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(QI(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Nh(a=o.get("data",!0))?$C:qC,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},p=jh(c.seriesLayoutBy,d.seriesLayoutBy)||null,h=jh(c.sourceHeader,d.sourceHeader),f=jh(c.dimensions,d.dimensions);e=p!==d.seriesLayoutBy||!!h!=!!d.sourceHeader||f?[nI(a,{seriesLayoutBy:p,sourceHeader:h,dimensions:f},s)]:[]}else{var g=n;if(i){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[nI(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&ZI("")}var o=[],a=[];return xh(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||ZI(""),o.push(t),a.push(e._getVersionSign())})),r?t=function(e,t){var n=Oy(e),r=n.length;r||Ay("");for(var i=0,o=r;i<o;i++)t=PI(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[iI(o[0])]),{sourceList:t,upstreamSignList:a}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];QI(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new GI).initData(new uI(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(QI(e)){var t=aM(e);return t?[t.getSourceManager()]:[]}return _h(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Xy(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Qy).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(QI(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function QI(e){return"series"===e.mainType}function ZI(e){throw new Error(e)}var XI="line-height:1";function $I(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+Af(r+"")+"px;color:"+Af(n)+";font-weight:"+Af(i+""),valueStyle:"font-size:"+Af(a+"")+"px;color:"+Af(o)+";font-weight:"+Af(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var KI=[0,10,20,30],JI=["","\n","\n\n","\n\n\n"];function eE(e,t){return t.type=e,t}function tE(e){return"section"===e.type}function nE(e){return tE(e)?iE:oE}function rE(e){if(tE(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return xh(e.blocks,(function(e){var n=rE(e);n>=t&&(t=n+ +(r&&(!n||tE(e)&&!e.noHeader)))})),t}return 0}function iE(e,t,n,r){var i,o=t.noHeader,a=(i=rE(t),{html:KI[i],richText:JI[i]}),s=[],l=t.blocks||[];Hh(!l||Mh(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Jh(c,u)){var d=new EI(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}xh(l,(function(n,i){var o=t.valueFormatter,l=nE(n)(o?fh(fh({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var p="richText"===e.renderMode?s.join(a.richText):sE(s.join(""),o?n:a.html);if(o)return p;var h=CC(t.header,"ordinal",e.useUTC),f=$I(r,e.renderMode).nameStyle;return"richText"===e.renderMode?lE(e,h,f)+a.richText+p:sE('<div style="'+f+";"+XI+';">'+Af(h)+"</div>"+p,n)}function oE(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return _h(e=Mh(e)?e:[e],(function(e,t){return CC(e,Mh(h)?h[t]:h,u)}))};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=o?"":CC(l,"ordinal",u),h=t.valueType,f=a?[]:c(t.value),g=!s||!o,m=!s&&o,v=$I(r,i),y=v.nameStyle,x=v.valueStyle;return"richText"===i?(s?"":d)+(o?"":lE(e,p,y))+(a?"":function(e,t,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Mh(t)?t.join(" "):t,o)}(e,f,g,m,x)):sE((s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+Af(e)+"</span>"}(p,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=Mh(e)?e:[e],'<span style="'+o+";"+r+'">'+_h(e,(function(e){return Af(e)})).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function aE(e,t,n,r,i,o){if(e)return nE(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function sE(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+XI+';">'+e+'<div style="clear:both"></div></div>'}function lE(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function uE(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var cE=function(){function e(){this.richTextStyles={},this._nextStyleNameId=My()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=Eh(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Af(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Af(r)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return Eh(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Mh(t)?xh(t,(function(e){return fh(n,e)})):fh(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function dE(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),p=Mh(d),h=function(e,t){return AC(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(o,a);if(c>1||p&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=bh(e,(function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(eE("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?xh(r,(function(e){c(_I(o,n,e),e)})):xh(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,h);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=_I(l,a,u[0]),n=g.type}else i=t=p?d[0]:d;var m=Uy(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return eE("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[eE("nameValue",{markerType:"item",markerColor:h,name:x,noName:!Vh(x),value:t,valueType:n})].concat(r||[])})}var pE=Wy();function hE(e,t){return e.getName(t)||e.getId(t)}var fE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return j(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=TI({count:mE,reset:vE}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(pE(this).sourceManager=new qI(this)).prepareSource();var r=this.getInitialData(e,n);xE(r,this),this.dataTask.context.data=r,pE(this).dataBeforeProcessed=r,gE(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=BC(this),r=n?FC(e):{},i=this.subType;HC.hasClass(i)&&(i+="Series"),hh(e,t.getTheme().get(this.subType)),hh(e,this.getDefaultOption()),Ny(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&jC(e,r,n)},t.prototype.mergeOption=function(e,t){e=hh(this.option,e,!0),this.fillDataTextStyle(e.data);var n=BC(this);n&&jC(this.option,e,n);var r=pE(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);xE(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,pE(this).dataBeforeProcessed=i,gE(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Nh(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Ny(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=bE(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return pE(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=bE(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}pE(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Xh(e)},t.prototype.getSourceManager=function(){return pE(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return pE(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return dE({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Yp.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=hM.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<e.length;o++){var a=hE(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=Sh(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[hE(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){kh(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=hE(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=hE(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return HC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(HC);function gE(e){var t=e.name;Uy(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return xh(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function mE(e){return e.model.getRawData().count()}function vE(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),yE}function yE(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function xE(e,t){xh(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,Ch(_E,t))}))}function _E(e,t){var n=bE(e);return n&&n.setOutputEnd((t||this).count()),t}function bE(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}vh(fE,wI),vh(fE,hM),nx(fE,HC);var wE=fE,SE=function(){function e(){this.group=new ay,this.uid=BT("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();tx(SE),ax(SE);var TE=SE;function CE(){var e=Wy();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}var ME=Wy(),IE=CE(),EE=function(){function e(){this.group=new ay,this.uid=BT("viewChart"),this.renderTask=TI({plan:kE,reset:OE}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&DE(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&DE(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){uT(this.group,e)},e.markUpdateMethod=function(e,t){ME(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function AE(e,t,n){e&&sw(e)&&("emphasis"===t?Vb:Wb)(e,n)}function DE(e,t,n){var r=Vy(e,t),i=t&&null!=t.highlightKey?function(e){var t=mb[e];return null==t&&gb<=32&&(t=mb[e]=gb++),t}(t.highlightKey):null;null!=r?xh(Oy(r),(function(t){AE(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){AE(e,n,i)}))}function kE(e){return IE(e.model)}function OE(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&ME(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),NE[l]}tx(EE),ax(EE);var NE={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},RE=EE,PE="\0__throttleOriginMethod",LE="\0__throttleRate",BE="\0__throttleType";function jE(e,t,n){var r,i,o,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var p=function(){for(var e=[],p=0;p<arguments.length;p++)e[p]=arguments[p];r=(new Date).getTime(),o=this,a=e;var h=s||t,f=s||n;s=null,i=r-(f?l:u)-h,clearTimeout(c),f?c=setTimeout(d,h):i>=0?d():c=setTimeout(d,-i),l=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(e){s=e},p}function FE(e,t,n,r){var i=e[t];if(i){var o=i[PE]||i,a=i[BE];if(i[LE]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=jE(o,n,"debounce"===r))[PE]=o,i[BE]=r,i[LE]=n}return i}}function zE(e,t){var n=e[t];n&&n[PE]&&(n.clear&&n.clear(),e[t]=n[PE])}var UE=Wy(),HE={itemStyle:sx(kT,!0),lineStyle:sx(ET,!0)},VE={lineStyle:"stroke",itemStyle:"fill"};function WE(e,t){var n=e.visualStyleMapper||HE[t];return n||(console.warn("Unknown style type '"+t+"'."),HE.itemStyle)}function YE(e,t){var n=e.visualDrawType||VE[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var GE={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=WE(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=YE(e,r),l=o[s],u=Ih(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Ih(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||Ih(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=fh({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},qE=new PT,QE={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=WE(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){qE.option=n[r];var a=i(qE);fh(e.ensureUniqueItemVisual(t,"style"),a),qE.option.decal&&(e.setItemVisual(t,"decal",qE.option.decal),qE.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},ZE={performRawSeries:!0,overallReset:function(e){var t=Xh();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),UE(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=UE(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=YE(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}}))}}))}},XE=Math.PI;var $E=function(){function e(e,t,n,r){this._stageTaskMap=Xh(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Xh();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;xh(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});Hh(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}xh(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,p=c.agentStubMap;p.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),o.updatePayload(c,n);var h=o.getPerformArgs(c,r.block);p.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=Xh(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||TI({plan:nA,reset:rA,count:aA}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||TI({reset:KE});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Xh(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,TI({reset:JE,onDirty:tA})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}Hh(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,xh(n.getSeries(),p)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Ih(e)&&(e={overallReset:e,seriesType:sA(e)}),e.uid=BT("stageHandler"),t&&(e.visualType=t),e},e}();function KE(e){e.overallReset(e.ecModel,e.api,e.payload)}function JE(e){return e.overallProgress&&eA}function eA(){this.agent.dirty(),this.getDownstream().dirty()}function tA(){this.agent&&this.agent.dirty()}function nA(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function rA(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Oy(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?_h(t,(function(e,t){return oA(t)})):iA}var iA=oA(0);function oA(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function aA(e){return e.data.count()}function sA(e){lA=null;try{e(uA,cA)}catch(e){}return lA}var lA,uA={},cA={};function dA(e,t){for(var n in t.prototype)e[n]=ef}dA(uA,xM),dA(cA,bM),uA.eachSeriesByType=uA.eachRawSeriesByType=function(e){lA=e},uA.eachComponent=function(e){"series"===e.mainType&&e.subType&&(lA=e.subType)};var pA=$E,hA=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],fA={color:hA,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],hA]},gA="#B9B8CE",mA="#100C2A",vA=function(){return{axisLine:{lineStyle:{color:gA}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},yA=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],xA={darkMode:!0,color:yA,backgroundColor:mA,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:gA}},textStyle:{color:gA},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:gA}},dataZoom:{borderColor:"#71708A",textStyle:{color:gA},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:gA}},timeline:{lineStyle:{color:gA},label:{color:gA},controlStyle:{color:gA,borderColor:gA}},calendar:{itemStyle:{color:mA},dayLabel:{color:gA},monthLabel:{color:gA},yearLabel:{color:gA}},timeAxis:vA(),logAxis:vA(),valueAxis:vA(),categoryAxis:vA(),line:{symbol:"circle"},graph:{color:yA},gauge:{title:{color:gA},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:gA},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};xA.categoryAxis.splitLine.show=!1;var _A=xA,bA=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(Eh(e)){var i=ex(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};xh(e,(function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),wA=["symbol","symbolSize","symbolRotate","symbolOffset"],SA=wA.concat(["symbolKeepAspect"]),TA={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<wA.length;a++){var s=wA[a],l=e.get(s);Ih(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(fh({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=Sh(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}},CA={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<SA.length;r++){var i=SA[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function MA(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function IA(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=Vy(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:Mh(u)?l.getName(u[0]):l.getName(u),selected:Eh(r)?r:fh({},r)})}}))}function EA(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var AA=Math.round(9*Math.random()),DA="function"==typeof Object.defineProperty,kA=function(){function e(){this._id="__ec_inner_"+AA++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return DA?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),OA=kA,NA=L_.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),RA=L_.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),PA=L_.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),p=Math.cos(u),h=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*h,l+s+p*h,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*h,l+s+p*h,n-c,l+s),e.closePath()}}),LA=L_.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),BA={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},jA={};xh({line:lS,rect:$_,roundRect:$_,square:$_,circle:Aw,diamond:RA,pin:PA,arrow:LA,triangle:NA},(function(e,t){jA[t]=new e}));var FA=L_.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=qv(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=jA[r];i||(i=jA[r="rect"]),BA[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function zA(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function UA(e,t,n,r,i,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?YS(e.slice(8),new og(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?WS(e.slice(7),{},new og(t,n,r,i),a?"center":"cover"):new FA({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=zA,o&&s.setColor(o),s}function HA(e,t){if(null!=e)return Mh(e)||(e=[e,e]),[hy(e[0],t[0])||0,hy(jh(e[1],e[0]),t[1])||0]}function VA(e){return isFinite(e)}function WA(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,i=n.height,o=Math.min(r,i),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=VA(a)?a:.5,s=VA(s)?s:.5,l=l>=0&&VA(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,o=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=VA(r)?r:0,i=VA(i)?i:1,o=VA(o)?o:0,a=VA(a)?a:0,e.createLinearGradient(r,o,i,a)}(e,t,n),i=t.colorStops,o=0;o<i.length;o++)r.addColorStop(i[o].offset,i[o].color);return r}function YA(e){return parseInt(e,10)}function GA(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||YA(s[r])||YA(e.style[r]))-(YA(s[o])||0)-(YA(s[a])||0)|0}function qA(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:Dh(t)?[t]:Mh(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=_h(i,(function(e){return e/a})),o/=a)}return[i,o]}var QA=new g_(!0);function ZA(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function XA(e){return"string"==typeof e&&"none"!==e}function $A(e){var t=e.fill;return null!=t&&"none"!==t}function KA(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function JA(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function eD(e,t,n){var r=px(t.image,t.__image,n);if(fx(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*tf),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var tD=["shadowBlur","shadowOffsetX","shadowOffsetY"],nD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function rD(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){aD(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?Ax.opacity:a}(r||t.blend!==n.blend)&&(o||(aD(e,i),o=!0),e.globalCompositeOperation=t.blend||Ax.blend);for(var s=0;s<tD.length;s++){var l=tD[s];(r||t[l]!==n[l])&&(o||(aD(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(aD(e,i),o=!0),e.shadowColor=t.shadowColor||Ax.shadowColor),o}function iD(e,t,n,r,i){var o=sD(t,i.inHover),a=r?null:n&&sD(n,i.inHover)||{};if(o===a)return!1;var s=rD(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(aD(e,i),s=!0),XA(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(aD(e,i),s=!0),XA(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(aD(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(aD(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<nD.length;u++){var c=nD[u],d=c[0];(r||o[d]!==a[d])&&(s||(aD(e,i),s=!0),e[d]=o[d]||c[1])}return s}function oD(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function aD(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function sD(e,t){return t&&e.__hoverStyle||e.style}function lD(e,t){uD(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function uD(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,a)||(a&&a.length&&(aD(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(aD(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var o=e[i];r=r||o.isZeroArea(),oD(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=r}(o,e,n),s=!0),n.prevElClipPaths=o),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,p=t instanceof L_&&t.autoBatch&&function(e){var t=$A(e),n=ZA(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(c=i,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(aD(e,n),oD(e,t)):p||aD(e,n);var h=sD(t,n.inHover);t instanceof L_?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),iD(e,t,u,l,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=ZA(n),a=$A(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||QA,d=t.__dirty;if(!r){var p=n.fill,h=n.stroke,f=a&&!!p.colorStops,g=o&&!!h.colorStops,m=a&&!!p.image,v=o&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=t.getBoundingRect()),f&&(y=d?WA(e,p,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?WA(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?eD(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?eD(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:m&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:v&&(b?e.strokeStyle=b:o=!1)}var S,T,C=t.getGlobalScale();c.setScale(C[0],C[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=qA(t))[0],T=i[1]);var M=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),M=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),M&&c.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=T),r||(n.strokeFirst?(o&&JA(e,n),a&&KA(e,n)):(a&&KA(e,n),o&&JA(e,n))),S&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"")):t instanceof F_?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),iD(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||qp,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=qA(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(ZA(n)&&e.strokeText(i,n.x,n.y),$A(n)&&e.fillText(i,n.x,n.y)):($A(n)&&e.fillText(i,n.x,n.y),ZA(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,h)):t instanceof V_?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){rD(e,sD(t,i.inHover),n&&sD(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=px(n.image,t.__image,t,t.onload);if(r&&fx(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),p=s-(c=n.sy);e.drawImage(r,u,c,d,p,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=r.length;o<a;o++){(c=r[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),uD(e,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),uD(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),p&&r&&aD(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var cD=new OA,dD=new om(100),pD=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function hD(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&cD.delete(e);var o=cD.get(e);if(o)return o;var a=gh(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o=[n],s=!0,l=0;l<pD.length;++l){var u=a[pD[l]];if(null!=u&&!Mh(u)&&!Eh(u)&&!Dh(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=dD.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,p=gD(a.dashArrayX),h=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Dh(e)){var t=Math.ceil(e);return[t,t]}var n=_h(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=fD(a.symbol),g=(_=p,_h(_,(function(e){return mD(e)}))),m=mD(h),v=!i&&$p.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=Ey(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=Ey(r,f[t].length);e*=r;var i=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var _;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(e<=0)return;var o=-m,s=0,l=0,u=0;for(;o<x.height;){if(s%2==0){for(var c=l/2%f.length,g=0,_=0,b=0;g<2*x.width;){var w=0;for(t=0;t<p[u].length;++t)w+=p[u][t];if(w<=0)break;if(_%2==0){var S=.5*(1-a.symbolSize),T=g+p[u][_]*S,C=o+h[s]*S,M=p[u][_]*a.symbolSize,I=h[s]*a.symbolSize,E=b/2%f[c].length;A(T,C,M,I,f[c][E])}g+=p[u][_],++b,++_===p[u].length&&(_=0)}++u===p.length&&(u=0)}o+=h[s],++l,++s===h.length&&(s=0)}function A(e,t,o,s,l){var u=i?1:n,c=UA(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var p=r.painter.renderOneToVNode(c);p&&y.children.push(p)}else lD(d,c)}})(),s&&dD.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,cD.set(e,s),e.dirty=!1,s}function fD(e){if(!e||0===e.length)return[["rect"]];if(Eh(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!Eh(e[n])){t=!1;break}if(t)return fD([e]);var r=[];for(n=0;n<e.length;++n)Eh(e[n])?r.push([e[n]]):r.push(e[n]);return r}function gD(e){if(!e||0===e.length)return[[0,0]];if(Dh(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!Dh(e[n])){t=!1;break}if(t)return gD([e]);var r=[];for(n=0;n<e.length;++n)if(Dh(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=_h(e[n],(function(e){return Math.ceil(e)}))).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function mD(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var vD=new xf,yD={};var xD=2e3,_D=4500,bD={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:xD,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:_D,ARIA:6e3,DECAL:7e3}},wD="__flagInMainProcess",SD="__pendingUpdate",TD="__needsUpdateStatus",CD=/^[a-zA-Z0-9_]+$/,MD="__connectUpdateStatus";function ID(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return AD(this,e,t);this.id}}function ED(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return AD(this,e,t)}}function AD(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),xf.prototype[t].apply(e,n)}var DD,kD,OD,ND,RD,PD,LD,BD,jD,FD,zD,UD,HD,VD,WD,YD,GD,qD,QD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(xf),ZD=QD.prototype;ZD.on=ED("on"),ZD.off=ED("off");var XD=function(e){function t(t,n,r){var i=e.call(this,new bA)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},Eh(n)&&(n=ik[n]),i._dom=t;var o=i._zr=cy(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:jh(r.useDirtyRect,!1),useCoarsePointer:jh(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=jE(Th(o.flush,o),17),(n=ph(n))&&qM(n,!0),i._theme=n,i._locale=function(e){if(Eh(e)){var t=HT[e.toUpperCase()]||{};return e===FT||e===zT?ph(t):hh(ph(t),ph(HT[UT]),!1)}return hh(ph(e),ph(HT[UT]),!1)}(r.locale||WT),i._coordSysMgr=new SM;var a=i._api=WD(i);function s(e,t){return e.__prio-t.__prio}return wg(rk,s),wg(tk,s),i._scheduler=new pA(i,a,tk,rk),i._messageCenter=new QD,i._initEvents(),i.resize=Th(i.resize,i),o.animation.on("frame",i._onframe,i),FD(o,i),zD(o,i),Yh(i),i}return j(t,e),t.prototype._onframe=function(){if(!this._disposed){qD(this);var e=this._scheduler;if(this[SD]){var t=this[SD].silent;this[wD]=!0;try{DD(this),ND.update.call(this,null,this[SD].updateParams)}catch(e){throw this[wD]=!1,this[SD]=null,e}this._zr.flush(),this[wD]=!1,this[SD]=null,BD.call(this,t),jD.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),PD(this,r),e.performVisualTasks(r),VD(this,this._model,i,"remain",{}),n-=+new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[wD])if(this._disposed)this.id;else{var r,i,o;if(kh(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[wD]=!0,!this._model||t){var a=new IM(this._api),s=this._theme,l=this._model=new xM;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},nk);var u={seriesTransition:o,optionChanged:!0};if(n)this[SD]={silent:r,updateParams:u},this[wD]=!1,this.getZr().wakeUp();else{try{DD(this),ND.update.call(this,null,u)}catch(e){throw this[SD]=null,this[wD]=!1,e}this._ssr||this._zr.flush(),this[SD]=null,this[wD]=!1,BD.call(this,r),jD.call(this,r)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Yp.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Yp.svgSupported){var e=this._zr;return xh(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;xh(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return xh(r,(function(e){e.group.ignore=!1})),o}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(sk[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();xh(ak,(function(o,d){if(o.group===n){var p=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(ph(e)),h=o.getDom().getBoundingClientRect();a=r(h.left,a),s=r(h.top,s),l=i(h.right,l),u=i(h.bottom,u),c.push({dom:p,left:h.left,top:h.top})}}));var p=(l*=d)-(a*=d),h=(u*=d)-(s*=d),f=$p.createCanvas(),g=cy(f,{renderer:t?"svg":"canvas"});if(g.resize({width:p,height:h}),t){var m="";return xh(c,(function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new $_({shape:{x:0,y:0,width:p,height:h},style:{fill:e.connectedBackgroundColor}})),xh(c,(function(e){var t=new V_({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t){return RD(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return RD(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return xh(Gy(this._model,e),(function(e,r){r.indexOf("Models")>=0&&xh(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}}),this)}),this),!!n;this.id},t.prototype.getVisual=function(e,t){var n=Gy(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?MA(r,i,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;xh(KD,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&EA(o,(function(e){var t=fb(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=fh({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),xh(ek,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),xh(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(IA("map","selectchanged",t,r,e),IA("pie","selectchanged",t,r,e)):"select"===e.fromAction?(IA("map","selected",t,r,e),IA("pie","selected",t,r,e)):"unselect"===e.fromAction&&(IA("map","unselected",t,r,e),IA("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&$y(this.getDom(),ck,"");var e=this,t=e._api,n=e._model;xh(e._componentsViews,(function(e){e.dispose(n,t)})),xh(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete ak[e.id]}},t.prototype.resize=function(e){if(!this[wD])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[SD]&&(null==r&&(r=this[SD].silent),n=!0,this[SD]=null),this[wD]=!0;try{n&&DD(this),ND.update.call(this,{type:"resize",animation:fh({duration:0},e&&e.animation)})}catch(e){throw this[wD]=!1,e}this[wD]=!1,BD.call(this,r),jD.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(kh(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),ok[e]){var n=ok[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=fh({},e);return t.type=ek[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(kh(t)||(t={silent:!!t}),JD[e.type]&&this._model)if(this[wD])this._pendingActions.push(e);else{var n=t.silent;LD.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Yp.browser.weChat&&this._throttledZrFlush(),BD.call(this,n),jD.call(this,n)}},t.prototype.updateLabelLayout=function(){vD.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered((function(e){return r(e,n,i,-1/0),!0}))}}function r(e,t,n,i){var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)i=Math.max(r(s[l],t,n,i),i);else e.z=t,e.zlevel=n,i=Math.max(e.z2,i);if(o&&(o.z=t,o.zlevel=n,isFinite(i)&&(o.z2=i+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function i(e,t){t.eachRendered((function(e){if(!RS(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function o(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(RS(e))return;if(e instanceof L_&&function(e){var t=vb(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=a;var r=e.getTextContent(),o=e.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}DD=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),kD(e,!0),kD(e,!1),t.plan()},kD=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=ex(e.type);(c=new(t?TE.getClass(d.main,d.sub):RE.getClass(d.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent((function(e,t){"series"!==e&&u(t)})):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},OD=function(e,t,n,r,i){var o=e._model;if(o.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};i&&(s.subType=i);var l,u=n.excludeSeriesId;null!=u&&(l=Xh(),xh(Oy(u),(function(e){var t=zy(e,null);null!=t&&l.set(t,!0)}))),o&&o.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(uw(n))if(t instanceof wE)n.type!==bb||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=Vy(i,t);o=(Mh(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=fb(a);Xb(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&Xb(r,c,d,n)}}}(t,n,e._api);else{var r=Kb(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===bb&&i&&!n.notBlur&&$b(t.mainType,t.componentIndex,e._api),o&&xh(o,(function(e){n.type===bb?Vb(e):Wb(e)}))}else lw(n)&&t instanceof wE&&(!function(e,t){if(lw(t)){var n=t.dataType,r=Vy(e.getData(n),t);Mh(r)||(r=[r]),e[t.type===Cb?"toggleSelect":t.type===Sb?"select":"unselect"](r,n)}}(t,n,e._api),Jb(t),GD(e))}),e),o&&o.eachComponent(s,(function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else xh([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},ND={prepareAndUpdate:function(e){DD(this),ND.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),PD(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),UD(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),vD.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent((function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}}));var a=Xh();r.eachSeries((function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)})),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),VD(this,r,i,t,{},a),vD.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),RE.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),UD(this,n,this._api,t,{}),vD.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries((function(e){e.getData().clearAllVisual()})),RE.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent((function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}})),r.eachSeries((function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)})),vD.trigger("afterupdate",r,this._api))},updateLayout:function(e){ND.update.call(this,e)}},RD=function(e,t,n,r){if(e._disposed)e.id;else for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Gy(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},PD=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},LD=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=JD[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&ex(l[0]);this[wD]=!0;var d=[e],p=!1;e.batch&&(p=!0,d=_h(e.batch,(function(t){return(t=gh(fh({},t),e)).batch=null,t})));var h,f=[],g=lw(e),m=uw(e);if(m&&Zb(this._api),xh(d,(function(t){if((h=(h=a.action(t,n._model,n._api))||fh({},t)).type=s.event||h.type,f.push(h),m){var r=qy(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";OD(n,u,t,o),GD(n)}else g?(OD(n,u,t,"series"),GD(n)):c&&OD(n,u,t,c.main,c.sub)})),"none"!==u&&!m&&!g&&!c)try{this[SD]?(DD(this),ND.update.call(this,e),this[SD]=null):ND[u].call(this,e)}catch(e){throw this[wD]=!1,e}if(h=p?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[wD]=!1,!t){var v=this._messageCenter;if(v.trigger(h.type,h),g){var y={type:"selectchanged",escapeConnect:o,selected:ew(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},BD=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();LD.call(this,n,e)}},jD=function(e){!e&&this.trigger("updated")},FD=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[SD]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},zD=function(e,t){e.on("mouseover",(function(e){var n=EA(e.target,sw);n&&(!function(e,t,n){var r=fb(e),i=Kb(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&$b(r.componentMainType,r.componentIndex,n),xh(o,(function(e){return Ub(e,t)}))):(Xb(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&$b(r.componentMainType,r.componentIndex,n),Ub(e,t))}(n,e,t._api),GD(t))})).on("mouseout",(function(e){var n=EA(e.target,sw);n&&(!function(e,t,n){Zb(n);var r=fb(e),i=Kb(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?xh(i,(function(e){return Hb(e,t)})):Hb(e,t)}(n,e,t._api),GD(t))})).on("click",(function(e){var n=EA(e.target,(function(e){return null!=fb(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",i=fb(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},UD=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})})),r){var i,o,a=t.concat(n);wg(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),xh(a,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)}))}}(t),HD(e,t,n,r,i),xh(e._chartsViews,(function(e){e.__alive=!1})),VD(e,t,n,r,i),xh(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},HD=function(e,t,r,a,s,l){xh(l||e._componentsViews,(function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)}))},VD=function(e,t,r,a,s,l){var u=e._scheduler;s=fh(s||{},{updatedSeries:t.getSeries()}),vD.trigger("series:beforeupdate",t,r,s);var c=!1;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,a),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}(t,n),Jb(t)})),u.unfinished=c||u.unfinished,vD.trigger("series:layoutlabels",t,r,s),vD.trigger("series:transition",t,r,s),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];n(t,r),o(t,r)})),function(e,t){var n=e._zr,r=n.storage,i=0;r.traverse((function(e){e.isGroup||i++})),i>t.get("hoverLayerThreshold")&&!Yp.node&&!Yp.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),vD.trigger("series:afterupdate",t,r,s)},GD=function(e){e[TD]=!0,e.getZr().wakeUp()},qD=function(e){e[TD]&&(e.getZr().storage.traverse((function(e){RS(e)||t(e)})),e[TD]=!1)},WD=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return j(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Vb(t,n),GD(e)},n.prototype.leaveEmphasis=function(t,n){Wb(t,n),GD(e)},n.prototype.enterBlur=function(t){!function(e){Bb(e,Ob)}(t),GD(e)},n.prototype.leaveBlur=function(t){Yb(t),GD(e)},n.prototype.enterSelect=function(t){Gb(t),GD(e)},n.prototype.leaveSelect=function(t){qb(t),GD(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(bM))(e)},YD=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][MD]=t}}xh(ek,(function(n,r){e._messageCenter.on(r,(function(n){if(sk[e.group]&&0!==e[MD]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];xh(ak,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),xh(i,(function(e){1!==e[MD]&&e.dispatchAction(r)})),t(i,2)}}))}))}}(),t}(xf),$D=XD.prototype;$D.on=ID("on"),$D.off=ID("off"),$D.one=function(e,t,n){var r=this;this.on.call(this,e,(function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)}),n)};var KD=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var JD={},ek={},tk=[],nk=[],rk=[],ik={},ok={},ak={},sk={},lk=+new Date-0,uk=+new Date-0,ck="_echarts_instance_";function dk(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return ak[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,ck)]}(e);if(i)return i}var o=new XD(e,t,n);return o.id="ec_"+lk++,ak[o.id]=o,r&&$y(e,ck,o.id),YD(o),vD.trigger("afterinit",o),o}function pk(e){if(Mh(e)){var t=e;e=null,xh(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+uk++,xh(t,(function(t){t.group=e}))}return sk[e]=!0,e}function hk(e){sk[e]=!1}function fk(e,t){ik[e]=t}function gk(e){mh(nk,e)<0&&nk.push(e)}function mk(e,t){bk(tk,e,t,2e3)}function vk(e,t){vD.on(e,t)}function yk(e,t,n){Ih(t)&&(n=t,t="");var r=kh(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,ek[t]||(Hh(CD.test(r)&&CD.test(t)),JD[r]||(JD[r]={action:n,actionInfo:e}),ek[t]=r)}function xk(e,t){bk(rk,e,t,3e3,"visual")}var _k=[];function bk(e,t,n,r,i){if((Ih(t)||kh(t))&&(n=t,t=r),!(mh(_k,n)>=0)){_k.push(n);var o=pA.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function wk(e,t){ok[e]=t}var Sk=function(e){var t=(e=ph(e)).type;t||Ay("");var n=t.split(":");2!==n.length&&Ay("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,RI.set(t,e)};function Tk(e){return null==e?0:e.length||1}function Ck(e){return e}xk(xD,GE),xk(_D,QE),xk(_D,ZE),xk(xD,TA),xk(_D,CA),xk(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=hD(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=hD(i,t)}}))})),gk(qM),mk(900,(function(e){var t=Xh();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),t.each(QM)})),wk("default",(function(e,t){gh(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new ay,r=new $_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new hb({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new $_({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new mS({shape:{startAngle:-XE/2,endAngle:-XE/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*XE/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*XE/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),yk({type:bb,event:bb,update:bb},ef),yk({type:wb,event:wb,update:wb},ef),yk({type:Sb,event:Sb,update:Sb},ef),yk({type:Tb,event:Tb,update:Tb},ef),yk({type:Cb,event:Cb,update:Cb},ef),fk("light",fA),fk("dark",_A);var Mk=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||Ck,this._newKeyGetter=r||Ck,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=Tk(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=Tk(l),d=Tk(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var p=0;p<c;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=Tk(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=Tk(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),Ik=Mk,Ek=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function Ak(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var Dk=function(e){this.otherDims={},null!=e&&fh(this,e)},kk=Wy(),Ok={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Nk=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Lk(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return jh(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=lI(this.source),n=!Bk(e),r="",i=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=Ok[l]||"f",u&&(r+=u.uid),r+="$"}var p=this.source;return{dimensions:i,hash:[p.seriesLayoutBy,p.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function Rk(e){return e instanceof Nk}function Pk(e){for(var t=Xh(),n=0;n<(e||[]).length;n++){var r=e[n],i=kh(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function Lk(e){var t=kk(e);return t.dimNameMap||(t.dimNameMap=Pk(e.dimensionsDefine))}function Bk(e){return e>30}var jk,Fk,zk,Uk,Hk,Vk,Wk,Yk=kh,Gk=_h,qk="undefined"==typeof Int32Array?Array:Int32Array,Qk=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Zk=["_approximateExtent"],Xk=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;Rk(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=Eh(c)?new Dk({name:c}):c instanceof Dk?c:new Dk(c),p=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=p,d.coordDimIndex=0);var h=d.otherDims=d.otherDims||{};o.push(p),i[p]=d,null!=l[p]&&(s=!0),d.createInvertedIndices&&(a[p]=[]),0===h.itemName&&(this._nameDimIdx=u),0===h.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=Xh();xh(o,(function(e){f.set(i[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Dh(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i=this;if(e instanceof GI&&(r=e),!r){var o=this.dimensions,a=tI(e)||yh(e)?new uI(e,o.length):e;r=new GI;var s=Gk(o,(function(e){return{type:i._dimInfos[e].type,property:e}}));r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},i=Xh(),o=[],a=[],s={};xh(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;Ak(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),Ak(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}GC.each((function(e,t){var n=Ak(r,t),i=l.otherDims[t];null!=i&&!1!==i&&(n[i]=l.name)}))}));var l=[],u={};i.each((function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)})),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=_h(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(o=c.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,n.userOutput=new Ek(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&Wk(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==$C&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===qC&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Ly(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=zy(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=zy(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)Wk(this,a);jk(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Yk(e)?fh(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=zk(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return Fk(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return Mh(e)?r.getValues(Gk(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){Ih(e)&&(n=t,t=e,e=[]);var r=n||this,i=Gk(Uk(e),this._getStoreDimIndex,this);this._store.each(i,r?Th(t,r):t)},e.prototype.filterSelf=function(e,t,n){Ih(e)&&(n=t,t=e,e=[]);var r=n||this,i=Gk(Uk(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?Th(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return xh(Sh(e),(function(r){var i=t._getStoreDimIndex(r);n[i]=e[r]})),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){Ih(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=Gk(Uk(e),this._getStoreDimIndex,this),a=Vk(this);return a._store=this._store.map(o,i?Th(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=Gk(Uk(e),this._getStoreDimIndex,this);this._store.modify(o,i?Th(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Vk(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=Vk(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new PT(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Ik(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return Fk(e,t)}),(function(e){return Fk(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Yk(e)?fh(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(Mh(i=this.getVisual(t))?i=i.slice():Yk(i)&&(i=fh({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Yk(t)?fh(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Yk(e)?fh(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?fh(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){!function(e,t,n,r){if(r){var i=fb(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,"group"===r.type&&r.traverse((function(r){var i=fb(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){xh(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Gk(this.dimensions,this._getDimInfo,this),this.hostModel)),Hk(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Ih(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(zh(arguments)))})},e.internalField=(jk=function(e){var t=e._invertedIndicesMap;xh(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new qk(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}}))},zk=function(e,t,n){return zy(e._getCategory(t,n),null)},Fk=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=zk(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},Uk=function(e){return Mh(e)||(e=null!=e?[e]:[]),e},Vk=function(t){var n=new e(t._schema?t._schema:Gk(t.dimensions,t._getDimInfo,t),t.hostModel);return Hk(n,t),n},Hk=function(e,t){xh(Qk.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,xh(Zk,(function(n){e[n]=ph(t[n])})),e._calculationInfo=fh({},t._calculationInfo)},void(Wk=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=zk(e,i,t)),null==s&&null!=o&&(r[t]=s=zk(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}})),e}(),$k=Xk;function Kk(e,t){tI(e)||(e=rI(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Xh(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return xh(t,(function(e){var t;kh(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Bk(a),l=r===e.dimensionsDefine,u=l?Lk(e):Pk(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Xh(c),p=new UI(a),h=0;h<p.length;h++)p[h]=-1;function f(e){var t=p[e];if(t<0){var n=r[e],i=kh(n)?n:{name:n},a=new Dk,s=i.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=o.length;return p[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(h=0;h<a;h++)f(h);d.each((function(e,t){var n=Oy(e).slice();if(1===n.length&&!Eh(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);xh(n,(function(e,n){var i=Eh(e)?u.get(e):e;null!=i&&i<a&&(r[n]=i,m(f(i),t,n))}))}}));var g=0;function m(e,t,n){null!=GC.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}xh(n,(function(e){var t,n,r,i;if(Eh(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=fh({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=Oy(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}xh(s,(function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),m(gh(a,i),t,o),null==a.name&&n){var s=n[o];!kh(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&gh(a.otherDims,r)}))}}));var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var _=v||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)xh(o,(function(e){b(e)})),o.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var w=0;w<a;w++){var S=f(w);null==S.coordDim&&(S.coordDim=Jk(_,i,x),S.coordDimIndex=0,(!v||y<=0)&&(S.isExtraCoord=!0),y--),b(S),null!=S.type||sM(e,w)!==tM&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=Xh(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(o),new Nk({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function Jk(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var eO=function(e){this.coordSysDims=[],this.axisMap=Xh(),this.categoryAxisMap=Xh(),this.coordSysName=e};var tO={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",Qy).models[0],o=e.getReferringComponents("yAxis",Qy).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),nO(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),nO(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",Qy).models[0];t.coordSysDims=["single"],n.set("single",i),nO(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",Qy).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),nO(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),nO(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();xh(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),nO(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function nO(e){return"category"===e.get("type")}function rO(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!Rk(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,p=!(!e||!e.get("stack"));if(xh(r,(function(e,t){Eh(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,f=u.type,g=0;xh(r,(function(e){e.coordDim===h&&g++}));var m={name:c,coordDim:h,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(d,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function iO(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function oO(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=rI(e)):o=(r=i.getSource()).sourceFormat===qC;var a=function(e){var t=e.get("coordinateSystem"),n=new eO(t),r=tO[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=SM.get(r);return t&&t.coordSysDims&&(n=_h(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=Ih(l)?l:l?Ch(oM,s,t):null,c=Kk(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&xh(e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)})),i||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),p=o?null:i.getSharedDataStore(c),h=rO(t,{schema:c,store:p}),f=new $k(c,t);f.setCalculationInfo(h);var g=null!=d&&function(e){if(e.sourceFormat===qC){return!Mh(Py(function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(o?r:p,null,g),f}var aO=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();ax(aO);var sO=aO,lO=0,uO=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++lO}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&_h(r,cO);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Eh(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Xh(this.categories))},e}();function cO(e){return kh(e)&&null!=e.value?e.value:e+""}var dO=uO;function pO(e){return"interval"===e.type||"log"===e.type}function hO(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=Ty(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=gO(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),mO(e,0,t),mO(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[fy(Math.ceil(e[0]/a)*a,s),fy(Math.floor(e[1]/a)*a,s)],e),i}function fO(e){var t=Math.pow(10,Sy(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,fy(n*t)}function gO(e){return my(e)+2}function mO(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function vO(e,t){return e>=t[0]&&e<=t[1]}function yO(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function xO(e,t){return e*(t[1]-t[0])+t[0]}var _O=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new dO({})),Mh(r)&&(r=new dO({categories:_h(r,(function(e){return kh(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return j(t,e),t.prototype.parse=function(e){return null==e?NaN:Eh(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return vO(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return yO(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(xO(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(sO);sO.registerClass(_O);var bO=_O,wO=fy,SO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return j(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return vO(e,this._extent)},t.prototype.normalize=function(e){return yO(e,this._extent)},t.prototype.scale=function(e){return xO(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=gO(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:wO(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=wO(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:wO(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=wO(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=my(e.value)||0:"auto"===n&&(n=this._intervalPrecision),wC(wO(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o=hO(r,e,t,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=wO(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=wO(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(sO);sO.registerClass(SO);var TO=SO,CO="undefined"!=typeof Float32Array,MO=CO?Float32Array:Array;function IO(e){return Mh(e)?CO?new Float32Array(e):e:new MO(e)}function EO(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function AO(e){return e.dim+e.index}function DO(e,t){var n=[];return t.eachSeriesByType(e,(function(e){NO(e)&&n.push(e)})),n}function kO(e){var t=function(e){var t={};xh(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}}));var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort((function(e,t){return e-t}));for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return xh(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=t[a],l=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(o[1]-o[0])/d.count()}var p=hy(e.get("barWidth"),r),h=hy(e.get("barMaxWidth"),r),f=hy(e.get("barMinWidth")||(RO(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:AO(i),stackId:EO(e)})})),function(e){var t={};xh(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var p=e.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return xh(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=Sh(r).length;o=Math.max(35-4*a,15)+"%"}var s=hy(o,i),l=hy(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),xh(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var p,h=0;xh(r,(function(e,t){e.width||(e.width=d),p=e,h+=e.width*(1+l)})),p&&(h-=p.width*l);var f=-h/2;xh(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}(n)}function OO(e,t){var n=DO(e,t),r=kO(n);xh(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=EO(e),o=r[AO(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function NO(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function RO(e){return e.pipelineContext&&e.pipelineContext.large}var PO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return j(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return oC(e.value,JT[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(rC(this._minLevelUnit))]||JT.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(Eh(n))o=n;else if(Ih(n))o=n(e.value,t,{level:e.level});else{var a=fh({},$T);if(e.level>0)for(var s=0;s<eC.length;++s)a[eC[s]]="{primary|"+a[eC[s]]+"}";var l=n?!1===n.inherit?n:gh(n,a):a,u=aC(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=tC.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Mh(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return oC(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){var i=1e4,o=tC,a=0;function s(e,t,n,i,o,a,s){for(var l=new Date(t),u=t,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(e,i,o){var a=[],l=!i.length;if(!function(e,t,n,r){var i=wy(t),o=wy(n),a=function(e){return sC(i,e,r)===sC(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},p=function(){return d()&&a("second")},h=function(){return p()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return p();case"millisecond":return h()}}(rC(e),r[0],r[1],n)){l&&(i=[{value:HO(new Date(r[0]),e,n)},{value:r[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,d=i[u+1].value;if(c!==d){var p=void 0,h=void 0,f=void 0,g=!1;switch(e){case"year":p=Math.max(1,Math.round(t/ZT/365)),h=lC(n),f=gC(n);break;case"half-year":case"quarter":case"month":p=jO(t),h=uC(n),f=mC(n);break;case"week":case"half-week":case"day":p=BO(t),h=cC(n),f=vC(n),g=!0;break;case"half-day":case"quarter-day":case"hour":p=FO(t),h=dC(n),f=yC(n);break;case"minute":p=zO(t,!0),h=pC(n),f=xC(n);break;case"second":p=zO(t,!1),h=hC(n),f=_C(n);break;case"millisecond":p=UO(t),h=fC(n),f=bC(n)}s(p,c,d,h,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,p=0,h=0;h<o.length&&a++<i;++h){var f=rC(o[h]);if(iC(o[h]))if(l(o[h],u[u.length-1]||[],c),f!==(o[h+1]?rC(o[h+1]):null)){if(c.length){p=d,c.sort((function(e,t){return e.value-t.value}));for(var g=[],m=0;m<c.length;++m){var v=c[m].value;0!==m&&c[m-1].value===v||(g.push(c[m]),v>=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&p>y/1.5)break;if(u.push(g),d>y||e===o[h])break}c=[]}}var x=wh(_h(u,(function(e){return wh(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),_=[],b=x.length-1;for(h=0;h<x.length;++h)for(var w=x[h],S=0;S<w.length;++S)_.push({value:w[S].value,level:b-h});_.sort((function(e,t){return e.value-t.value}));var T=[];for(h=0;h<_.length;++h)0!==h&&_[h].value===_[h-1].value||T.push(_[h]);return T}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=ZT,t[1]+=ZT),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-ZT}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=LO.length,a=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n}(LO,this._approxInterval,0,o),o-1);this._interval=LO[a][1],this._minLevelUnit=LO[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Dh(e)?e:+wy(e)},t.prototype.contain=function(e){return vO(this.parse(e),this._extent)},t.prototype.normalize=function(e){return yO(this.parse(e),this._extent)},t.prototype.scale=function(e){return xO(e,this._extent)},t.type="time",t}(TO),LO=[["second",GT],["minute",qT],["hour",QT],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",XT/2],["year",XT]];function BO(e,t){return(e/=ZT)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function jO(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function FO(e){return(e/=QT)>12?12:e>6?6:e>3.5?4:e>2?2:1}function zO(e,t){return(e/=t?qT:GT)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function UO(e){return Ty(e,!0)}function HO(e,t,n){var r=new Date(e);switch(rC(t)){case"year":case"month":r[mC(n)](0);case"day":r[vC(n)](1);case"hour":r[yC(n)](0);case"minute":r[xC(n)](0);case"second":r[_C(n)](0),r[bC(n)](0)}return r.getTime()}sO.registerClass(PO);var VO=PO,WO=sO.prototype,YO=TO.prototype,GO=fy,qO=Math.floor,QO=Math.ceil,ZO=Math.pow,XO=Math.log,$O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new TO,t._interval=0,t}return j(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return _h(YO.getTicks.call(this,e),(function(e){var t=e.value,i=fy(ZO(this.base,t));return i=t===n[0]&&this._fixMin?JO(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?JO(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=XO(this.base);e=XO(Math.max(0,e))/n,t=XO(Math.max(0,t))/n,YO.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=WO.getExtent.call(this);t[0]=ZO(e,t[0]),t[1]=ZO(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=JO(t[0],n[0])),this._fixMax&&(t[1]=JO(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=XO(e[0])/XO(t),e[1]=XO(e[1])/XO(t),WO.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,Sy(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[fy(QO(t[0]/i)*i),fy(qO(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){YO.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return vO(e=XO(e)/XO(this.base),this._extent)},t.prototype.normalize=function(e){return yO(e=XO(e)/XO(this.base),this._extent)},t.prototype.scale=function(e){return e=xO(e,this._extent),ZO(this.base,e)},t.type="log",t}(sO),KO=$O.prototype;function JO(e,t){return GO(e,my(t))}KO.getMinorTicks=YO.getMinorTicks,KO.getLabel=YO.getLabel,sO.registerClass($O);var eN=$O,tN=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);Ih(i)?this._modelMinNum=oN(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=oN(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(Ih(o)?this._modelMaxNum=oN(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=oN(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=Mh(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Gv(s[0],1),Gv(s[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?r?0:NaN:t-i[0]*o),null==s&&(s=e?r?r-1:NaN:n+i[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Lh(a)||Lh(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(a=d,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[rN[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[nN[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),nN={min:"_determinedMin",max:"_determinedMax"},rN={min:"_dataMin",max:"_dataMax"};function iN(e,t,n){var r=e.rawExtentInfo;return r||(r=new tN(e,t,n),e.rawExtentInfo=r,r)}function oN(e,t){return null==t?null:Lh(t)?NaN:e.parse(t)}function aN(e,t){var n=e.type,r=iN(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=DO("bar",a),l=!1;if(xh(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=kO(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t,n){if(e&&t){var r=e[AO(t)];return null!=r&&null!=n?r[EO(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;xh(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;xh(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/o)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(i,o,t,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function sN(e,t){var n=t,r=aN(e,n),i=r.extent,o=n.get("splitNumber");e instanceof eN&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function lN(e){var t,n,r=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):Eh(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):Ih(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(uN(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function uN(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function cN(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new og(e.x,e.y,o,a)}function dN(e){var t=e.get("interval");return null==t?"auto":t}function pN(e){return"category"===e.type&&0===dN(e.getLabelModel())}function hN(e,t){var n={};return xh(e.mapDimensionsAll(t),(function(t){n[function(e,t){return iO(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0})),Sh(n)}var fN=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),gN=[],mN={registerPreprocessor:gk,registerProcessor:mk,registerPostInit:function(e){vk("afterinit",e)},registerPostUpdate:function(e){vk("afterupdate",e)},registerUpdateLifecycle:vk,registerAction:yk,registerCoordinateSystem:function(e,t){SM.register(e,t)},registerLayout:function(e,t){bk(rk,e,t,1e3,"layout")},registerVisual:xk,registerTransform:Sk,registerLoading:wk,registerMap:function(e,t,n){var r=function(e){return yD[e]}("registerMap");r&&r(e,t,n)},registerImpl:function(e,t){yD[e]=t},PRIORITY:bD,ComponentModel:HC,ComponentView:TE,SeriesModel:wE,ChartView:RE,registerComponentModel:function(e){HC.registerClass(e)},registerComponentView:function(e){TE.registerClass(e)},registerSeriesModel:function(e){wE.registerClass(e)},registerChartView:function(e){RE.registerClass(e)},registerSubTypeDefaulter:function(e,t){HC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){sy[e]=t}(e,t)}};function vN(e){Mh(e)?xh(e,(function(e){vN(e)})):mh(gN,e)>=0||(gN.push(e),Ih(e)&&(e={install:e}),e.install(mN))}function yN(e,t){return Math.abs(e-t)<1e-8}function xN(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var o=1;o<e.length;o++){var a=e[o];r+=S_(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return yN(i[0],s[0])&&yN(i[1],s[1])||(r+=S_(i[0],i[1],s[0],s[1],t,n)),0!==r}var _N=Wy();function bN(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=SN(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=lN(e);return{labels:_h(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function wN(e,t){return"category"===e.type?function(e,t){var n,r,i=TN(e,"ticks"),o=dN(t),a=CN(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Ih(o))n=EN(e,o,!0);else if("auto"===o){var s=SN(e,e.getLabelModel());r=s.labelCategoryInterval,n=_h(s.labels,(function(e){return e.tickValue}))}else n=IN(e,r=o,!0);return MN(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:_h(e.scale.getTicks(),(function(e){return e.value}))}}function SN(e,t){var n,r,i=TN(e,"labels"),o=dN(t),a=CN(i,o);return a||(Ih(o)?n=EN(e,o):(r="auto"===o?function(e){var t=_N(e).autoInterval;return null!=t?t:_N(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=IN(e,r)),MN(i,o,{labels:n,labelCategoryInterval:r}))}function TN(e,t){return _N(e)[t]||(_N(e)[t]=[])}function CN(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function MN(e,t,n){return e.push({key:t,value:n}),n}function IN(e,t,n){var r=lN(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=pN(e),p=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&f-l!==o[1]&&g(o[1]),s}function EN(e,t,n){var r=e.scale,i=lN(e),o=[];return xh(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var AN=[0,1],DN=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return vy(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&kN(n=n.slice(),r.count()),py(e,AN,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&kN(n=n.slice(),r.count());var i=py(e,n,AN,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=_h(wN(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;xh(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a},t.push(o)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&d(o.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=fy(e),t=fy(t),c?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),_h(this.scale.getMinorTicks(e),(function(e){return _h(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return bN(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=lN(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),p=0,h=0;l<=o[1];l+=s){var f,g,m=Hv(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,p=Math.max(p,f,7),h=Math.max(h,g,7)}var v=p/c,y=h/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=_N(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function kN(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var ON=DN;function NN(e,t){return e===t||e!=e&&t!=t}function RN(e,t){for(var n=e.length;n--;)if(NN(e[n][0],t))return n;return-1}var PN=Array.prototype.splice;function LN(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}LN.prototype.clear=function(){this.__data__=[],this.size=0},LN.prototype.delete=function(e){var t=this.__data__,n=RN(t,e);return!(n<0)&&(n==t.length-1?t.pop():PN.call(t,n,1),--this.size,!0)},LN.prototype.get=function(e){var t=this.__data__,n=RN(t,e);return n<0?void 0:t[n][1]},LN.prototype.has=function(e){return RN(this.__data__,e)>-1},LN.prototype.set=function(e,t){var n=this.__data__,r=RN(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function BN(e){if(!Hu(e))return!1;var t=ec(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var jN,FN=Gu["__core-js_shared__"],zN=(jN=/[^.]+$/.exec(FN&&FN.keys&&FN.keys.IE_PROTO||""))?"Symbol(src)_1."+jN:"";var UN=Function.prototype.toString;function HN(e){if(null!=e){try{return UN.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var VN=/^\[object .+?Constructor\]$/,WN=Function.prototype,YN=Object.prototype,GN=WN.toString,qN=YN.hasOwnProperty,QN=RegExp("^"+GN.call(qN).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZN(e){return!(!Hu(e)||(t=e,zN&&zN in t))&&(BN(e)?QN:VN).test(HN(e));var t}function XN(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ZN(n)?n:void 0}var $N=XN(Gu,"Map"),KN=XN(Object,"create");var JN=Object.prototype.hasOwnProperty;var eR=Object.prototype.hasOwnProperty;function tR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function nR(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function rR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tR.prototype.clear=function(){this.__data__=KN?KN(null):{},this.size=0},tR.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},tR.prototype.get=function(e){var t=this.__data__;if(KN){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return JN.call(t,e)?t[e]:void 0},tR.prototype.has=function(e){var t=this.__data__;return KN?void 0!==t[e]:eR.call(t,e)},tR.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=KN&&void 0===t?"__lodash_hash_undefined__":t,this},rR.prototype.clear=function(){this.size=0,this.__data__={hash:new tR,map:new($N||LN),string:new tR}},rR.prototype.delete=function(e){var t=nR(this,e).delete(e);return this.size-=t?1:0,t},rR.prototype.get=function(e){return nR(this,e).get(e)},rR.prototype.has=function(e){return nR(this,e).has(e)},rR.prototype.set=function(e,t){var n=nR(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function iR(e){var t=this.__data__=new LN(e);this.size=t.size}iR.prototype.clear=function(){this.__data__=new LN,this.size=0},iR.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},iR.prototype.get=function(e){return this.__data__.get(e)},iR.prototype.has=function(e){return this.__data__.has(e)},iR.prototype.set=function(e,t){var n=this.__data__;if(n instanceof LN){var r=n.__data__;if(!$N||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rR(r)}return n.set(e,t),this.size=n.size,this};var oR=function(){try{var e=XN(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function aR(e,t,n){"__proto__"==t&&oR?oR(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var sR=Object.prototype.hasOwnProperty;function lR(e,t,n){var r=e[t];sR.call(e,t)&&NN(r,n)&&(void 0!==n||t in e)||aR(e,t,n)}function uR(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?aR(n,s,l):lR(n,s,l)}return n}function cR(e){return tc(e)&&"[object Arguments]"==ec(e)}var dR=Object.prototype,pR=dR.hasOwnProperty,hR=dR.propertyIsEnumerable,fR=cR(function(){return arguments}())?cR:function(e){return tc(e)&&pR.call(e,"callee")&&!hR.call(e,"callee")};var gR="object"==typeof exports&&exports&&!exports.nodeType&&exports,mR=gR&&"object"==typeof module&&module&&!module.nodeType&&module,vR=mR&&mR.exports===gR?Gu.Buffer:void 0,yR=(vR?vR.isBuffer:void 0)||function(){return!1},xR=/^(?:0|[1-9]\d*)$/;function _R(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&xR.test(e))&&e>-1&&e%1==0&&e<t}function bR(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var wR={};function SR(e){return function(t){return e(t)}}wR["[object Float32Array]"]=wR["[object Float64Array]"]=wR["[object Int8Array]"]=wR["[object Int16Array]"]=wR["[object Int32Array]"]=wR["[object Uint8Array]"]=wR["[object Uint8ClampedArray]"]=wR["[object Uint16Array]"]=wR["[object Uint32Array]"]=!0,wR["[object Arguments]"]=wR["[object Array]"]=wR["[object ArrayBuffer]"]=wR["[object Boolean]"]=wR["[object DataView]"]=wR["[object Date]"]=wR["[object Error]"]=wR["[object Function]"]=wR["[object Map]"]=wR["[object Number]"]=wR["[object Object]"]=wR["[object RegExp]"]=wR["[object Set]"]=wR["[object String]"]=wR["[object WeakMap]"]=!1;var TR="object"==typeof exports&&exports&&!exports.nodeType&&exports,CR=TR&&"object"==typeof module&&module&&!module.nodeType&&module,MR=CR&&CR.exports===TR&&Wu.process,IR=function(){try{var e=CR&&CR.require&&CR.require("util").types;return e||MR&&MR.binding&&MR.binding("util")}catch(e){}}(),ER=IR&&IR.isTypedArray,AR=ER?SR(ER):function(e){return tc(e)&&bR(e.length)&&!!wR[ec(e)]},DR=Object.prototype.hasOwnProperty;function kR(e,t){var n=Vu(e),r=!n&&fR(e),i=!n&&!r&&yR(e),o=!n&&!r&&!i&&AR(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!DR.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||_R(u,l))||s.push(u);return s}var OR=Object.prototype;function NR(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||OR)}function RR(e,t){return function(n){return e(t(n))}}var PR=RR(Object.keys,Object),LR=Object.prototype.hasOwnProperty;function BR(e){return null!=e&&bR(e.length)&&!BN(e)}function jR(e){return BR(e)?kR(e):function(e){if(!NR(e))return PR(e);var t=[];for(var n in Object(e))LR.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var FR=Object.prototype.hasOwnProperty;function zR(e){if(!Hu(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=NR(e),n=[];for(var r in e)("constructor"!=r||!t&&FR.call(e,r))&&n.push(r);return n}function UR(e){return BR(e)?kR(e,!0):zR(e)}var HR="object"==typeof exports&&exports&&!exports.nodeType&&exports,VR=HR&&"object"==typeof module&&module&&!module.nodeType&&module,WR=VR&&VR.exports===HR?Gu.Buffer:void 0,YR=WR?WR.allocUnsafe:void 0;function GR(){return[]}var qR=Object.prototype.propertyIsEnumerable,QR=Object.getOwnPropertySymbols,ZR=QR?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(QR(e),(function(t){return qR.call(e,t)})))}:GR,XR=ZR;function $R(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var KR=RR(Object.getPrototypeOf,Object),JR=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)$R(t,XR(e)),e=KR(e);return t}:GR;function eP(e,t,n){var r=t(e);return Vu(e)?r:$R(r,n(e))}function tP(e){return eP(e,jR,XR)}function nP(e){return eP(e,UR,JR)}var rP=XN(Gu,"DataView"),iP=XN(Gu,"Promise"),oP=XN(Gu,"Set"),aP=XN(Gu,"WeakMap"),sP="[object Map]",lP="[object Promise]",uP="[object Set]",cP="[object WeakMap]",dP="[object DataView]",pP=HN(rP),hP=HN($N),fP=HN(iP),gP=HN(oP),mP=HN(aP),vP=ec;(rP&&vP(new rP(new ArrayBuffer(1)))!=dP||$N&&vP(new $N)!=sP||iP&&vP(iP.resolve())!=lP||oP&&vP(new oP)!=uP||aP&&vP(new aP)!=cP)&&(vP=function(e){var t=ec(e),n="[object Object]"==t?e.constructor:void 0,r=n?HN(n):"";if(r)switch(r){case pP:return dP;case hP:return sP;case fP:return lP;case gP:return uP;case mP:return cP}return t});var yP=vP,xP=Object.prototype.hasOwnProperty;var _P=Gu.Uint8Array;function bP(e){var t=new e.constructor(e.byteLength);return new _P(t).set(new _P(e)),t}var wP=/\w*$/;var SP=qu?qu.prototype:void 0,TP=SP?SP.valueOf:void 0;function CP(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return bP(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?bP(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?bP(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,wP.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,TP?Object(TP.call(r)):{}}}var MP=Object.create,IP=function(){function e(){}return function(t){if(!Hu(t))return{};if(MP)return MP(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),EP=IP;var AP=IR&&IR.isMap,DP=AP?SR(AP):function(e){return tc(e)&&"[object Map]"==yP(e)};var kP=IR&&IR.isSet,OP=kP?SR(kP):function(e){return tc(e)&&"[object Set]"==yP(e)},NP="[object Arguments]",RP="[object Function]",PP="[object Object]",LP={};function BP(e,t,n,r,i,o){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Hu(e))return e;var c=Vu(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&xP.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,a)}else{var d=yP(e),p=d==RP||"[object GeneratorFunction]"==d;if(yR(e))return function(e,t){if(t)return e.slice();var n=e.length,r=YR?YR(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==PP||d==NP||p&&!i){if(a=l||p?{}:function(e){return"function"!=typeof e.constructor||NR(e)?{}:EP(KR(e))}(e),!s)return l?function(e,t){return uR(e,JR(e),t)}(e,function(e,t){return e&&uR(t,UR(t),e)}(a,e)):function(e,t){return uR(e,XR(e),t)}(e,function(e,t){return e&&uR(t,jR(t),e)}(a,e))}else{if(!LP[d])return i?e:{};a=CP(e,d,s)}}o||(o=new iR);var h=o.get(e);if(h)return h;o.set(e,a),OP(e)?e.forEach((function(r){a.add(BP(r,t,n,r,e,o))})):DP(e)&&e.forEach((function(r,i){a.set(i,BP(r,t,n,i,e,o))}));var f=c?void 0:(u?l?nP:tP:l?UR:jR)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(f||e,(function(r,i){f&&(r=e[i=r]),lR(a,i,BP(r,t,n,i,e,o))})),a}LP[NP]=LP["[object Array]"]=LP["[object ArrayBuffer]"]=LP["[object DataView]"]=LP["[object Boolean]"]=LP["[object Date]"]=LP["[object Float32Array]"]=LP["[object Float64Array]"]=LP["[object Int8Array]"]=LP["[object Int16Array]"]=LP["[object Int32Array]"]=LP["[object Map]"]=LP["[object Number]"]=LP[PP]=LP["[object RegExp]"]=LP["[object Set]"]=LP["[object String]"]=LP["[object Symbol]"]=LP["[object Uint8Array]"]=LP["[object Uint8ClampedArray]"]=LP["[object Uint16Array]"]=LP["[object Uint32Array]"]=!0,LP["[object Error]"]=LP[RP]=LP["[object WeakMap]"]=!1;var jP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(HC),FP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qy).models[0]},t.type="cartesian2dAxis",t}(HC);vh(FP,fN);var zP={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},UP=hh({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},zP),HP=hh({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},zP),VP={category:UP,value:HP,time:hh({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},HP),log:gh({logBase:10},HP)},WP={value:1,category:1,time:1,log:1};function YP(e,t,n,r){xh(WP,(function(i,o){var a=hh(hh({},VP[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return j(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=BC(this),r=n?FC(e):{};hh(e,t.getTheme().get(o+"Axis")),hh(e,this.getDefaultOption()),e.type=GP(e),n&&jC(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=dO.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",GP)}function GP(e){return e.type||(e.data?"category":"value")}var qP=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return _h(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),wh(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),QP=["x","y"];function ZP(e){return"interval"===e.type||"time"===e.type}var XP=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=QP,t}return j(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(ZP(e)&&ZP(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,p=this._transform=[l,0,0,u,c,d];this._invTransform=qf([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new og(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return pf(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return pf(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new og(n,r,i,o)},t}(qP),$P=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return j(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ON),KP=$P;function JP(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:d[0],"x"===u?f[p[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Bh(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function eL(e){return"cartesian2d"===e.get("coordinateSystem")}function tL(e){var t={xAxisModel:null,yAxisModel:null};return xh(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,Qy).models[0];t[r]=o})),t}var nL=Math.log;var rL=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=QP,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=Sh(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;pO(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(sN(l,s),pO(l)&&(t=a))}i.length&&(t||sN((t=i.pop()).scale,t.model),xh(i,(function(e){!function(e,t,n){var r=TO.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=aN(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var p=nL(e.base);u=[nL(u[0])/p,nL(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=fO(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=fO(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=fO(f));var v=f*a;(g=fy((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=fy(v)):m>0&&u[1]<=0&&(m=0,g=-fy(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};xh(n.x,(function(e){oL(n,"y",e,i)})),xh(n.y,(function(e){oL(n,"x",e,i)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=LC(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){xh(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?o.x:o.y)}))}s(),i&&(xh(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof bO?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=lN(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var d=l(r?r[c]:{value:o[0]+c},c),p=cN(s.getTextRect(d),s.get("rotate")||0);a?a.union(p):a=p}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}})),s()),xh(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}kh(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",Qy).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",Qy).models[0],a=e.gridModel,s=this._coordsList;if(r)mh(s,t=r.coordinateSystem)<0&&(t=null);else if(i&&o)t=this.getCartesian(i.componentIndex,o.componentIndex);else if(i)n=this.getAxis("x",i.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(iL(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new KP(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new bO({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new VO({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(sO.getClass(t)||TO)}}(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,xh(a.x,(function(t,n){xh(a.y,(function(i,o){var a="x"+n+"y"+o,s=new XP(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)}))}))},e.prototype._updateScale=function(e,t){function n(e,t){xh(hN(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}xh(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(eL(e)){var r=tL(e),i=r.xAxisModel,o=r.yAxisModel;if(!iL(i,t)||!iL(o,t))return;var a=this.getCartesian(i.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return xh(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);mh(t,i)<0&&t.push(i),mh(n,o)<0&&n.push(o)})),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",(function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)})),t.eachSeries((function(e){if(eL(e)){var t=tL(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=QP,e}();function iL(e,t){return e.getCoordSysModel()===t}function oL(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)aL(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&aL(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function aL(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}var sL=rL,lL=Math.PI,uL=function(){function e(e,t){this.group=new ay,this.opt=t,this.axisModel=e,gh(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new ay({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!cL[e]},e.prototype.add=function(e){cL[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=xy(t-e);return _y(o)?(i=n>0?"top":"bottom",r="center"):_y(o-lL)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<lL?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),cL={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(pf(s,s,a),pf(l,l,a));var c=fh({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new lS({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});ZS(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var p=t.get(["axisLine","symbol"]);if(null!=p){var h=t.get(["axisLine","symbolSize"]);Eh(p)&&(p=[p,p]),(Eh(h)||Dh(h))&&(h=[h,h]);var f=HA(t.get(["axisLine","symbolOffset"])||0,h),g=h[0],m=h[1];xh([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==p[r]&&null!=p[r]){var i=UA(p[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=fL(i.getTicksCoords(),t.transform,l,gh(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,r,t,e),o=function(e,t,n,r){var i=n.axis,o=Bh(r.axisLabelShow,n.get(["axisLabel","show"]));if(!o||i.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=i.getViewLabels(),u=(Bh(r.labelRotate,a.get("rotate"))||0)*lL/180,c=uL.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),p=[],h=uL.isLabelSilent(n),f=n.get("triggerEvent");return xh(l,(function(o,l){var u="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,g=o.formattedLabel,m=o.rawLabel,v=a;if(d&&d[u]){var y=d[u];kh(y)&&y.textStyle&&(v=new PT(y.textStyle,a,n.ecModel))}var x=v.getTextColor()||n.get(["axisLine","lineStyle","color"]),_=i.dataToCoord(u),b=new hb({x:_,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:h,z2:10+(o.level||0),style:gT(v,{text:g,align:v.getShallow("align",!0)||c.textAlign,verticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||c.textVerticalAlign,fill:Ih(x)?x("category"===i.type?m:"value"===i.type?u+"":u,l):x})});if(b.anid="label_"+u,f){var w=uL.makeAxisEventDataBase(n);w.targetType="axisLabel",w.value=m,w.tickIndex=l,"category"===i.type&&(w.dataIndex=u),fb(b).eventData=w}t.add(b),b.updateTransform(),p.push(b),e.add(b),b.decomposeTransform()})),p}(n,r,t,e);(function(e,t,n){if(pN(e.axis))return;var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],p=n[n.length-2];!1===r?(dL(o),dL(u)):pL(o,a)&&(r?(dL(a),dL(c)):(dL(o),dL(u)));!1===i?(dL(s),dL(d)):pL(l,s)&&(i?(dL(l),dL(p)):(dL(s),dL(d)))}(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!o.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=gh(s.getLineStyle(),gh(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=fL(a[c],t.transform,l,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&function(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new og(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,p=!1,h=0;h<t.length;h++){var f=t[h];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new IS(f.localRect,f.transform)),d||(d=new IS(s,l)),d.intersect(f.obb)){p=!0;break}}}p?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new IS(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(_h(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i=Bh(e.axisName,t.get("name"));if(i){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),p=d[0]>d[1]?-1:1,h=["start"===s?d[0]-p*c:"end"===s?d[1]+p*c:(d[0]+d[1])/2,hL(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*lL/180),hL(s)?o=uL.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=xy(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;_y(a-lL/2)?(o=l?"bottom":"top",i="center"):_y(a-1.5*lL)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*lL&&a>lL/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=Bh(e.nameTruncateMaxWidth,m.maxWidth,a),x=new hb({x:h[0],y:h[1],rotation:o.rotation,silent:uL.isLabelSilent(t),style:gT(u,{text:i,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(sT({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=uL.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,fb(x).eventData=_}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function dL(e){e&&(e.ignore=!0)}function pL(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=Vf([]);return Gf(i,i,-e.rotation),n.applyTransform(Wf([],i,e.getLocalTransform())),r.applyTransform(Wf([],i,t.getLocalTransform())),n.intersect(r)}}function hL(e){return"middle"===e||"center"===e}function fL(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(pf(a,a,t),pf(s,s,t));var c=new lS({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});ZS(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}var gL=uL;function mL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),o=i.get("link",!0)||[],a=[];xh(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=_L(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(xh(n.getAxes(),Ch(h,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&xh(p.baseAxes,Ch(h,!d||"cross",c)),d&&xh(p.otherAxes,Ch(h,"cross",!1))}}function h(r,s,c){var d=c.model.getModel("axisPointer",i),p=d.get("show");if(p&&("auto"!==p||r||xL(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};xh(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=ph(a.get(e))})),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&gh(l,c.textStyle)}}return e.model.getModel("axisPointer",new PT(s,n,r))}(c,u,i,t,r,s):d;var h=d.get("snap"),f=d.get("triggerEmphasis"),g=_L(c.model),m=s||h||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:h,useHandle:xL(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(vL(o[r+"AxisId"],n.id)||vL(o[r+"AxisIndex"],n.componentIndex)||vL(o[r+"AxisName"],n.name))return i}}(o,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=o[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&xh(e.coordSysAxesInfo[_L(n.model)],(function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}(n,e),n}function vL(e,t){return"all"===e||Mh(e)&&mh(e,t)>=0||e===t}function yL(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[_L(e)]}function xL(e){return!!e.get(["handle","show"])}function _L(e){return e.type+"||"+e.id}var bL={},wL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=yL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=xL(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=function(e){var t=yL(e);return t&&t.axisPointerModel}(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){bL[e]=t},t.getAxisPointerClass=function(e){return e&&bL[e]},t.type="axis",t}(TE),SL=wL,TL=Wy();var CL=["axisLine","axisTickLabel","axisName"],ML=["splitArea","splitLine","minorSplitLine"],IL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return j(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ay,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=JP(a,t),l=new gL(t,fh({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(pO(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));xh(CL,l.add,l),this._axisGroup.add(l.getGroup()),xh(ML,(function(e){t.get([e,"show"])&&EL[e](this,this._axisGroup,t,a)}),this),i&&"changeAxisOrder"===i.type&&i.isInitSort||tT(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){TL(this).splitAreaColors=null},t.type="cartesianAxis",t}(SL),EL={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=Mh(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),p=[],h=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=i.toGlobalCoord(d[g].coord);u?(p[0]=m,p[1]=l.y,h[0]=m,h[1]=l.y+l.height):(p[0]=l.x,p[1]=m,h[0]=l.x+l.width,h[1]=m);var v=c++%s.length,y=d[g].tickValue,x=new lS({anid:null!=y?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:h[0],y2:h[1]},style:gh({stroke:s[v]},f),silent:!0});ZS(x.shape,f.lineWidth),t.add(x)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),p=0;p<l.length;p++)for(var h=0;h<l[p].length;h++){var f=i.toGlobalCoord(l[p][h].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new lS({anid:"minor_line_"+l[p][h].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});ZS(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=TL(e).splitAreaColors,p=Xh(),h=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){h=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();for(s=Mh(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;i.isHorizontal()?(x=m,_=l.y,b=y-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,m=_+(w=y-_));var S=u[f-1].tickValue;null!=S&&p.set(S,h),t.add(new $_({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:b,height:w},style:gh({fill:s[h]},v),autoBatch:!0,silent:!0})),h=(h+1)%c}TL(e).splitAreaColors=p}}}(e,t,n,r)}},AL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="xAxis",t}(IL),DL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=AL.type,t}return j(t,e),t.type="yAxis",t}(IL),kL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return j(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new $_({shape:e.coordinateSystem.getRect(),style:gh({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(TE),OL={offset:0};function NL(e){e.registerComponentView(kL),e.registerComponentModel(jP),e.registerCoordinateSystem("cartesian2d",sL),YP(e,"x",FP,OL),YP(e,"y",FP,OL),e.registerComponentView(AL),e.registerComponentView(DL),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}var RL=Wy(),PL=ph,LL=Th,BL=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=Ch(jL,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new ay,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);HL(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=yL(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=RL(e).pointerEl=new cT[i.type](PL(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=RL(e).labelEl=new hb(PL(t.label));e.add(i),zL(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=RL(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=RL(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),zL(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=rT(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){jf(e.event)},onmousedown:LL(this._onHandleDragMove,this,0,0),drift:LL(this._onHandleDragMove,this),ondragend:LL(this._onHandleDragEnd,this)}),r.add(i)),HL(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Mh(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,FE(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){jL(this._axisPointerModel,!t&&this._moveAnimation,this._handle,UL(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(UL(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(UL(r)),RL(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),zE(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function jL(e,t,n,r){FL(RL(n).lastProp,r)||(RL(n).lastProp=r,t?OS(n,r,e):(n.stopAnimation(),n.attr(r)))}function FL(e,t){if(kh(e)&&kh(t)){var n=!0;return xh(t,(function(t,r){n=n&&FL(e[r],t)})),!!n}return e===t}function zL(e,t){e[t.get(["label","show"])?"show":"hide"]()}function UL(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function HL(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}function VL(e,t,n,r,i){var o=WL(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=TC(a.get("padding")||0),l=a.getFont(),u=Hv(o,l),c=i.position,d=u.width+s[1]+s[3],p=u.height+s[0]+s[2],h=i.align;"right"===h&&(c[0]-=d),"center"===h&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,p,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:gT(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function WL(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:uN(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};xh(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),Eh(a)?o=a.replace("{value}",o):Ih(a)&&(o=a(s))}return o}function YL(e,t,n){var r=[1,0,0,1,0,0];return Gf(r,r,n.rotation),Yf(r,r,n.position),KS([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var GL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=qL(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=QL[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,i,o){var a=gL.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),VL(t,r,i,o,{position:YL(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,JP(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=JP(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=YL(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=qL(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(BL);function qL(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var QL={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],o=ZL(e),{x1:r[o=o||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],o=ZL(e),{x:r[o=o||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function ZL(e){return"x"===e.dim?0:1}var XL=GL,$L=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(HC),KL=Wy(),JL=xh;function eB(e,t,n){if(!Yp.node){var r=t.getZr();KL(r).records||(KL(r).records={}),function(e,t){if(KL(e).initialized)return;function n(n,r){e.on(n,(function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);JL(KL(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)}))}KL(e).initialized=!0,n("click",Ch(nB,"click")),n("mousemove",Ch(nB,"mousemove")),n("globalout",tB)}(r,t),(KL(r).records[e]||(KL(r).records[e]={})).handler=n}}function tB(e,t,n){e.handler("leave",null,n)}function nB(e,t,n,r){t.handler(e,n,r)}function rB(e,t){if(!Yp.node){var n=t.getZr();(KL(n).records||{})[e]&&(KL(n).records[e]=null)}}var iB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";eB("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){rB("axisPointer",t)},t.prototype.dispose=function(e,t){rB("axisPointer",t)},t.type="axisPointer",t}(TE),oB=iB;function aB(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=Vy(o,e);if(null==a||a<0||Mh(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,p="x"===c||"radius"===c?1:0,h=o.mapDimension(d),f=[];f[p]=o.get(h,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(_h(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var sB=Wy();function lB(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||Th(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){hB(i)&&(i=aB({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=hB(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||hB(i),p={},h={},f={list:[],map:{}},g={showPointer:Ch(cB,h),showTooltip:Ch(dB,f)};xh(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);xh(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&uB(e,a,g,!1,p)}}))}));var m={};return xh(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&xh(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,pB(t),pB(e)))),m[e.key]=o}}))})),xh(m,(function(e,t){uB(c[t],e,g,!0,p)})),function(e,t,n){var r=n.axesInfo=[];xh(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}(h,c,p),function(e,t,n,r){if(hB(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,a),function(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",o=sB(r)[i]||{},a=sB(r)[i]={};xh(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&xh(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];xh(o,(function(e,t){!a[t]&&l.push(e)})),xh(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),p}}function uB(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return xh(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(d,e,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,f=Math.abs(h);f<=a&&((f<a||h>=0&&s<0)&&(a=f,s=h,i=u,o.length=0),xh(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&fh(i,s[0]),!r&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function cB(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function dB(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=_L(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function pB(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function hB(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function fB(e){SL.registerAxisPointerClass("CartesianAxisPointer",XL),e.registerComponentModel($L),e.registerComponentView(oB),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Mh(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=mL(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},lB)}function gB(e){vN(NL),vN(fB)}var mB="\0_ec_interaction_mutex";function vB(e,t){return!!yB(e)[t]}function yB(e){return e[mB]||(e[mB]={})}yk({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ef);var xB=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=Th(n._mousedownHandler,n),i=Th(n._mousemoveHandler,n),o=Th(n._mouseupHandler,n),a=Th(n._mousewheelHandler,n),s=Th(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=gh(ph(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return j(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Ff(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&wB("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!vB(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,o=t-r,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&jf(e.event),bB(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Ff(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=wB("zoomOnMouseWheel",e,this._opt),n=wB("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;_B(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);_B(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){vB(this._zr,"globalPan")||_B(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(xf);function _B(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(jf(r.event),bB(e,t,n,r,i))}function bB(e,t,n,r,i){i.isAvailableBehavior=Th(wB,null,n,r),e.trigger(t,i)}function wB(e,t,n){var r=n[e];return!e||r&&(!Eh(r)||t.event[r+"Key"])}var SB=xB,TB={axisPointer:1,tooltip:1,brush:1};function CB(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=IB(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=IB(s,[0,a]),i=o=IB(s,[i,o]),r=0}t[0]=IB(t[0],n),t[1]=IB(t[1],n);var l=MB(t,r);t[r]+=e;var u,c=i||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=IB(t[r],d),u=MB(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=MB(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function MB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function IB(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var EB=!0,AB=Math.min,DB=Math.max,kB=Math.pow,OB="globalPan",NB={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},RB={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},PB={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},LB=0,BB=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new ay,n._uid="brushController_"+LB++,xh(cj,(function(e,t){this._handlers[t]=Th(e,this)}),n),n}return j(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){yB(e)[t]=n}(t,OB,this._uid),xh(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=hh(ph(PB),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=yB(e);r[t]===n&&(r[t]=null)}(e,OB,this._uid),xh(this._handlers,(function(t,n){e.off(n,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};xh(e,(function(e){t[e.panelId]=ph(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=_h(e,(function(e){return hh(ph(PB),e,!0)}));var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new Ik(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(a).update(a).remove((function(e){t[e]!==i&&r.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):FB(r,jB(r,s));HB(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),GB(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(xf);function jB(e,t){var n=pj[t.brushType].createCover(e,t);return n.__brushOption=t,UB(n,t),e.group.add(n),n}function FB(e,t){var n=VB(t);return n.endCreating&&(n.endCreating(e,t),UB(t,t.__brushOption)),t}function zB(e,t){var n=t.__brushOption;VB(t).updateCoverShape(e,t,n.range,n)}function UB(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function HB(e,t){VB(t).updateCommon(e,t),zB(e,t)}function VB(e){return pj[e.__brushOption.brushType]}function WB(e,t,n){var r,i=e._panels;if(!i)return EB;var o=e._transform;return xh(i,(function(e){e.isTargetByCursor(t,n,o)&&(r=e)})),r}function YB(e,t){var n=e._panels;if(!n)return EB;var r=t.__brushOption.panelId;return null!=r?n[r]:EB}function GB(e){var t=e._covers,n=t.length;return xh(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function qB(e,t){var n=_h(e._covers,(function(e){var t=e.__brushOption,n=ph(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function QB(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function ZB(e,t,n,r){var i=new ay;return i.add(new $_({name:"main",style:JB(n),silent:!0,draggable:!0,cursor:"move",drift:Ch(nj,e,t,i,["n","s","w","e"]),ondragend:Ch(qB,t,{isEnd:!0})})),xh(r,(function(n){i.add(new $_({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ch(nj,e,t,i,n),ondragend:Ch(qB,t,{isEnd:!0})}))})),i}function XB(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=DB(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],p=c-o+i/2,h=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;KB(e,t,"main",a,s,f,g),r.transformable&&(KB(e,t,"w",l,u,o,v),KB(e,t,"e",p,u,o,v),KB(e,t,"n",l,u,m,o),KB(e,t,"s",l,h,m,o),KB(e,t,"nw",l,u,o,o),KB(e,t,"ne",p,u,o,o),KB(e,t,"sw",l,h,o,o),KB(e,t,"se",p,h,o,o))}function $B(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(JB(n)),i.attr({silent:!r,cursor:r?"move":"default"}),xh([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?tj(e,n[0]):function(e,t){var n=[tj(e,t[0]),tj(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?RB[o]+"-resize":null})}))}function KB(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=AB(e[0][0],e[1][0]),n=AB(e[0][1],e[1][1]),r=DB(e[0][0],e[1][0]),i=DB(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(oj(e,t,[[r,i],[r+o,i+a]])))}function JB(e){return gh({strokeNoScale:!0},e.brushStyle)}function ej(e,t,n,r){var i=[AB(e,n),AB(t,r)],o=[DB(e,n),DB(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function tj(e,t){var n=JS({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return $S(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function nj(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=ij(t,i,o);xh(r,(function(e){var t=NB[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(ej(s[0][0],s[1][0],s[0][1],s[1][1])),HB(t,n),qB(t,{isEnd:!1})}function rj(e,t,n,r){var i=t.__brushOption.range,o=ij(e,n,r);xh(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),HB(e,t),qB(e,{isEnd:!1})}function ij(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function oj(e,t,n){var r=YB(e,t);return r&&r!==EB?r.clipPath(n,e._transform):ph(n)}function aj(e){var t=e.event;t.preventDefault&&t.preventDefault()}function sj(e,t,n){return e.childOfName("main").contain(t,n)}function lj(e,t,n,r){var i,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return kB(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&GB(e);var l=ph(s);l.brushType=uj(l.brushType,a),l.panelId=a===EB?null:a.panelId,o=e._creatingCover=jB(e,l),e._covers.push(o)}if(o){var u=pj[uj(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(oj(e,o,e._track)),r&&(FB(e,o),u.updateCommon(e,o)),zB(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&WB(e,t,n)&&GB(e)&&(i={isEnd:r,removeOnClick:!0});return i}function uj(e,t){return"auto"===e?t.defaultBrushType:e}var cj={mousedown:function(e){if(this._dragging)dj(this,e);else if(!e.target||!e.target.draggable){aj(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=WB(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=WB(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===EB||s.panelId===o.panelId)&&pj[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){aj(e);var i=lj(this,e,r,!1);i&&qB(this,i)}},mouseup:function(e){dj(this,e)}};function dj(e,t){if(e._dragging){aj(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=lj(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&qB(e,o)}}var pj={lineX:hj(0),lineY:hj(1),rect:{createCover:function(e,t){function n(e){return e}return ZB({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=QB(e);return ej(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){XB(e,t,n,r)},updateCommon:$B,contain:sj},polygon:{createCover:function(e,t){var n=new ay;return n.add(new iS({name:"main",style:JB(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new tS({name:"main",draggable:!0,drift:Ch(rj,e,t),ondragend:Ch(qB,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:oj(e,t,n)})},updateCommon:$B,contain:sj}};function hj(e){return{createCover:function(t,n){return ZB({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=QB(t);return[AB(n[0][e],n[1][e]),DB(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=YB(t,n);if(a!==EB&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),XB(t,n,l,i)},updateCommon:$B,contain:sj}}var fj=BB;function gj(e){return e=yj(e),function(t){return nT(t,e)}}function mj(e,t){return e=yj(e),function(n){var r=null!=t?t:n,i=r?e.width:e.height,o=r?e.x:e.y;return[o,o+(i||0)]}}function vj(e,t,n){var r=yj(e);return function(e,i){return r.contain(i[0],i[1])&&!function(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!TB.hasOwnProperty(r.mainType)&&i&&i.model!==n}(e,t,n)}}function yj(e){return og.create(e)}var xj=["x","y","radius","angle","single"],_j=["cartesian2d","polar","singleAxis"];function bj(e){return e+"Axis"}function wj(e,t){var n,r=Xh(),i=[],o=Xh();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function Sj(e){var t=e.ecModel,n={infoList:[],infoMap:Xh()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(bj(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var Tj=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),Cj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return j(t,e),t.prototype.init=function(e,t,n){var r=Mj(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=Mj(e);hh(this.option,e,!0),hh(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;xh([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Xh();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return xh(xj,(function(n){var r=this.getReferringComponents(bj(n),Zy);if(r.specified){t=!0;var i=new Tj;xh(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var i=t[0];if(i){var o=new Tj;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",Qy).models[0];a&&xh(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",Qy).models[0]&&o.add(e.componentIndex)}))}}}r&&xh(xj,(function(t){if(r){var i=n.findComponents({mainType:bj(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new Tj;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");xh([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(bj(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){xh(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(bj(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;xh([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;xh(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(HC);function Mj(e){var t={};return xh(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var Ij=Cj,Ej=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(TE),Aj=xh,Dj=gy,kj=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return mh(_j,t)>=0}(t)){var n=bj(this._dimName),r=t.getReferringComponents(n,Qy).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return ph(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];Aj(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(py(c,o,n))):(t=!0,c=py(d=null==d?n[u]:r.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c})),Dj(s),Dj(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";CB(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=py(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];Aj(n,(function(e){!function(e,t,n){t&&xh(hN(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var i=e.getAxisModel(),o=iN(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&Aj(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=_h(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,i,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],p=u>o[1];if(c&&!d&&!p)return!0;c&&(i=!0),d&&(t=!0),p&&(n=!0)}return i&&t&&n}))}else Aj(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}}));Aj(r,(function(e){t.setApproximateExtent(o,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Aj(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=py(n[0]+o,n,[0,100],!0):null!=i&&(o=py(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=vy(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();var Oj=kj,Nj={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(bj(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new Oj(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=Xh();return xh(n,(function(e){xh(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var Rj=!1;function Pj(e){Rj||(Rj=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Nj),function(e){e.registerAction("dataZoom",(function(e,t){xh(wj(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}var Lj=function(){},Bj={};var jj=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Fj=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=Uj(t,e);xh(Hj,(function(e,t){(!n||!n.include||mh(n.include,t)>=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=Yj[e.brushType](0,n,t);e.__rangeOffset={offset:qj[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){xh(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&xh(r.coordSyses,(function(r){var i=Yj[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){xh(e,(function(e){var n,r,i,o,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=Yj[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?qj[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=Zj(n),o=Zj(r),a=[i[0]/o[0],i[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return _h(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:gj(r),isTargetByCursor:vj(r,e,n.coordSysModel),getLinearBrushOtherExtent:mj(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&mh(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=Uj(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<Vj.length;s++)if(Vj[s](r,o))return o}return!0},e}();function zj(e){return e[0]>e[1]&&e.reverse(),e}function Uj(e,t){return Gy(e,t,{includeMainTypes:jj})}var Hj={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Xh(),a={},s={};(n||r||i)&&(xh(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),xh(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),xh(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];xh(i.getCartesians(),(function(e,t){(mh(n,e.getAxis("x").model)>=0||mh(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:Wj.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){xh(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Wj.geo})}))}},Vj=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],Wj={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform($S(e)),t}},Yj={lineX:Ch(Gj,0),lineY:Ch(Gj,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[zj([i[0],o[0]]),zj([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:_h(n,(function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o})),xyMinMax:i}}};function Gj(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=zj(_h([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var qj={lineX:Ch(Qj,0),lineY:Ch(Qj,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return _h(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function Qj(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function Zj(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var Xj=Fj,$j=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(HC);function Kj(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function Jj(e){if(Yp.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var eF=Jj(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function tF(e,t){if(!e)return t;t=SC(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var nF=tF(Jj(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),rF=tF(eF,"transform"),iF="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Yp.transform3dSupported?"will-change:transform;":"");function oF(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Yp.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Yp.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+rF+":"+a+";":[["top",0],["left",0],[eF,a]]}function aF(e,t,n){var r=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=uE(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+p),t&&i&&r.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,i="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,i+=Yp.transformSupported?","+rF+r:",left"+r+",top"+r),nF+":"+i}(i,n)),o&&r.push("background-color:"+o),xh(["width","color","radius"],(function(t){var n="border-"+t,i=SC(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))})),r.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+i),xh(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(c)),null!=d&&r.push("padding:"+TC(d).join("px ")+"px"),r.join(";")+";"}function sF(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){Cf(Tf,t,r,i,!0)&&Cf(e,n,Tf[0],Tf[1])}(e,a,document.body,r,i)}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var lF=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Yp.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;sF(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;Lf(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t,n,r,i=this._container,o=(n="position",(r=(t=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t))?n?r[n]:r:null),a=i.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative");var s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=iF+aF(e,!this._firstShow,this._longHide)+oF(i[0],i[1],!0)+"border-color:"+AC(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null!=e){var a="";if(Eh(i)&&"item"===n.get("trigger")&&!Kj(n)&&(a=function(e,t,n){if(!Eh(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=AC(t);var o,a,s="left"===(o=n)?"right":"right"===o?"left":"top"===o?"bottom":"top",l=Math.max(1.5*Math.round(i),6),u="",c=rF+":";mh(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,p=l+i,h=p*Math.abs(Math.cos(d))+p*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-p)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),Eh(e))o.innerHTML=e+a;else if(e){o.innerHTML="",Mh(e)||(e=[e]);for(var s=0;s<e.length;s++)Rh(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}}else o.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if(sF(n,this._zr,this._appendToBody,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;xh(oF(n[0],n[1]),(function(e){r[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Yp.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Th(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},e}(),uF=lF;function cF(e){return Math.max(0,e)}function dF(e){var t=cF(e.shadowBlur||0),n=cF(e.shadowOffsetX||0),r=cF(e.shadowOffsetY||0);return{left:cF(t-n),right:cF(t+n),top:cF(t-r),bottom:cF(t+r)}}function pF(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var hF=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),pF(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;kh(e)&&Ay(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new hb({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:uE(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),xh(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),xh(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){o.el.style[e]=a.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=dF(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;pF(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=cF(i.borderWidth||0),a=dF(i);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Th(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),fF=new $_({shape:{x:-1,y:-1,width:2,height:2}}),gF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){if(!Yp.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Yp.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new hF(t):new uF(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!Yp.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?FE(this,"_updatePosition",50,"fixRate"):zE(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");eB("itemTooltip",this._api,Th((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Yp.node&&n.getDom()){var i=vF(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=qy(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=Xy(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=fb(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=fF;l.x=r.x,l.y=r.y,l.update(),fb(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=aB(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(vF(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s)if("axis"===mF([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var i,o;this._lastDataByCoordSys=null,EA(n,(function(e){return null!=fb(e).dataIndex?(i=e,!0):null!=fb(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=Th(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=mF([t.tooltipOption],r),a=this._renderMode,s=[],l=eE("section",{blocks:[],noHeader:!0}),u=[],c=new cE;xh(e,(function(e){xh(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=WL(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=eE("section",{header:o,noHeader:!Vh(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),xh(e.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=p.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=uN(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",AC(f.color),a);var g=SI(p.formatTooltip(h,!0,null)),m=g.frag;if(m){var v=mF([p],r).get("valueFormatter");d.blocks.push(v?fh({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,p=o.get("order"),h=aE(l,c,a,p,n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=fb(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,p=e.positionDefault,h=mF([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=h.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new cE;g.marker=m.makeTooltipMarker("item",AC(g.color),d);var v=SI(s.formatTooltip(l,!1,u)),y=h.get("order"),x=h.get("valueFormatter"),_=v.frag,b=_?aE(x?fh({valueFormatter:x},_):_,m,d,y,r.get("useUTC"),h.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,b,g,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=fb(t),i=r.tooltipConfig.option||{};if(Eh(i)){i={content:i,formatter:i}}var o=[i],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:i.content});var s=e.positionDefault,l=mF(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new cE;this._showOrMove(l,(function(){var n=ph(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,p=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(Eh(c)){var h=e.ecModel.get("useUTC"),f=Mh(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=oC(f.axisValue,d,h)),d=EC(d,n,!0)}else if(Ih(c)){var g=Th((function(t,r){t===this._ticket&&(u.setContent(r,l,e,p,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,g)}else d=c;u.setContent(d,l,e,p,a),u.show(e,p),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||Mh(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:Mh(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),Ih(t)&&(t=t([n,r],o,i.el,p,{viewSize:[s,l],contentSize:u.slice()})),Mh(t))n=hy(t[0],s),r=hy(t[1],l);else if(kh(t)){var h=t;h.width=u[0],h.height=u[1];var f=LC(h,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(Eh(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,p,u,e.get("borderWidth"));n=g[0],r=g[1]}else{g=function(e,t,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(e+l+o+2>r?e-=l+o:e+=o);null!=a&&(t+u+a>i?t-=u+a:t+=a);return[e,t]}(n,r,i,s,l,c?null:20,d?null:20);n=g[0],r=g[1]}if(c&&(n-=yF(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=yF(d)?u[1]/2:"bottom"===d?u[1]:0),Kj(e)){g=function(e,t,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&xh(n,(function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&xh(a,(function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&xh(a,(function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&xh(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Yp.node&&t.getDom()&&(zE(this,"_updatePosition"),this._tooltipContent.dispose(),rB("itemTooltip",t))},t.type="tooltip",t}(TE);function mF(e,t,n){var r,i=t.ecModel;n?(r=new PT(n,i,i),r=new PT(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof PT&&(a=a.get("tooltip",!0)),Eh(a)&&(a={formatter:a}),a&&(r=new PT(a,r,i)))}return r}function vF(e,t){return e.dispatchAction||Th(t.dispatchAction,t)}function yF(e){return"center"===e||"middle"===e}var xF=gF;function _F(e){vN(fB),e.registerComponentModel($j),e.registerComponentView(xF),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ef),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ef)}var bF=["rect","polygon","keep","clear"];function wF(e,t){var n=Oy(e?e.brush:[]);if(n.length){var r=[];xh(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;Mh(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};xh(e,(function(e){t[e]=1})),e.length=0,xh(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,bF)}}var SF=xh,TF=kh,CF=-1,MF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=ph(t);this.type=r,this.mappingMethod=n,this._normalizeData=LF[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(IF(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,xh(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(SF(t,(function(e,t){n[e]=t})),!Mh(r)){var i=[];kh(r)?SF(r,(function(e,t){var r=n[t];i[null!=r?r:CF]=e})):i[-1]=r,r=PF(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):IF(i,!0):(Hh("linear"!==n||i.dataExtent),IF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Th(this._normalizeData,this)},e.listVisualTypes=function(){return Sh(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){kh(e)?xh(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=Mh(t)?[]:kh(t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&SF(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(Mh(e))e=e.slice();else{if(!TF(e))return[];var t=[];SF(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||Eh(s)&&s===e+"")return o;n&&d(s,o)}}for(o=0,a=t.length;o<a;o++){var l=t[o],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(BF(c[1],e,u[1]))return o}else if(u[1]===1/0){if(BF(c[0],u[0],e))return o}else if(BF(c[0],u[0],e)&&BF(c[1],e,u[1]))return o;n&&d(u[0],o),n&&d(u[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:DF("color"),getColorMapper:function(){var e=this.option;return Th("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),kF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=bm(t,e.parsedVisual,r),i?r:Sm(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Sm(bm(e,this.option.parsedVisual),"rgba")},category:kF,piecewise:function(e,t){var n=RF.call(this,t);return null==n&&(n=Sm(bm(e,this.option.parsedVisual),"rgba")),n},fixed:OF}},colorHue:EF((function(e,t){return wm(e,t)})),colorSaturation:EF((function(e,t){return wm(e,null,t)})),colorLightness:EF((function(e,t){return wm(e,null,null,t)})),colorAlpha:EF((function(e,t){return function(e,t){var n=ym(e);if(n&&null!=t)return n[3]=lm(t),Sm(n,"rgba")}(e,t)})),decal:{applyVisual:DF("decal"),_normalizedToVisual:{linear:null,category:kF,piecewise:null,fixed:null}},opacity:{applyVisual:DF("opacity"),_normalizedToVisual:NF([0,1])},liftZ:{applyVisual:DF("liftZ"),_normalizedToVisual:{linear:OF,category:OF,piecewise:OF,fixed:OF}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:AF,category:kF,piecewise:function(e,t){var n=RF.call(this,t);return null==n&&(n=AF.call(this,e)),n},fixed:OF}},symbolSize:{applyVisual:DF("symbolSize"),_normalizedToVisual:NF([0,1])}},e}();function IF(e,t){var n=e.visual,r=[];kh(n)?SF(n,(function(e){r.push(e)})):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),PF(e,r)}function EF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:NF([0,1])}}function AF(e){var t=this.option.visual;return t[Math.round(py(e,[0,1],[0,t.length-1],!0))]||{}}function DF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function kF(e){var t=this.option.visual;return t[this.option.loop&&e!==CF?e%t.length:e]}function OF(){return this.option.visual[0]}function NF(e){return{linear:function(t){return py(t,e,this.option.visual,!0)},category:kF,piecewise:function(t,n){var r=RF.call(this,n);return null==r&&(r=py(t,e,this.option.visual,!0)),r},fixed:OF}}function RF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[MF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function PF(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=_h(t,(function(e){var t=ym(e);return t||[0,0,0,1]}))),t}var LF={linear:function(e){return py(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=MF.findPieceIndex(e,t,!0);if(null!=n)return py(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?CF:t},fixed:ef};function BF(e,t,n){return e?t<=n:t<n}var jF=MF,FF=xh;function zF(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var UF={lineX:HF(0),lineY:HF(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&xN(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,o=e.y,a=e.width,s=e.height,l=r[0];return!!(xN(r,i,o)||xN(r,i+a,o)||xN(r,i,o+s)||xN(r,i+a,o+s)||og.create(e).contain(l[0],l[1])||iT(i,o,i+a,o,r)||iT(i,o,i,o+s,r)||iT(i+a,o,i+a,o+s,r)||iT(i,o+s,i+a,o+s,r))||void 0}}};function HF(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return VF(t[e],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),VF(s[0],a)||VF(s[1],a)||VF(a[0],s)||VF(a[1],s)}}}}function VF(e,t){return t[0]<=e&&e<=t[1]}var WF=["inBrush","outOfBrush"],YF="__ecBrushSelect",GF="__ecInBrushSelectEvent";function qF(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new Xj(t.option,e)).setInputRanges(t.areas,e)}))}function QF(e,t,n){var r,i,o=[];e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),qF(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:ph(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],p=!1;n||(r=s.throttleType,i=s.throttleDelay);var h=_h(t.areas,(function(e){var t=$F[e.brushType],n=gh({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return UF[t].point(r,n,e)},rect:function(r){return UF[t].rect(r,n,e)}};return n}(n),n})),f=function(e,t,n){var r={};return FF(t,(function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);FF(e[t],(function(e,r){if(jF.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new jF(i),"opacity"===r&&((i=ph(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new jF(i))}}))})),r}(t.option,WF,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}Mh(l)&&xh(l,(function(e){u[e]=1})),e.eachSeries((function(n,r){var i=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;p=p||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,r):function(n,r,i){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Mh(n)?mh(n,t)<0:t!==n)}(t,r))return;if(xh(h,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),p=p||m(i)})),g(r)&&m(i)){var o=n.getData();o.each((function(e){XF(n,i,o,e)&&(c[e]=1)}))}}(n,r,i)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],i=e.getData(),o=g(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return XF(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?p:m(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return MA(n,a,e)}function u(e,t){!function(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}(n,a,e,t)}function c(e,c){a=null==o?e:c;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var p=r.call(i,e),h=t[p],f=s[p],g=0,m=f.length;g<m;g++){var v=f[g];h[v]&&h[v].applyVisual(e,l,u)}}xh(e,(function(e){var n=jF.prepareVisualTypes(t[e]);s[e]=n})),null==o?n.each(c):n.each([o],c)}(WF,f,i,o)}))})),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[GF])return;o[YF]||(o[YF]=ZF);var a=FE(o,YF,n,t);a(e,r)}(t,r,i,o,n)}function ZF(e,t){if(!e.isDisposed()){var n=e.getZr();n[GF]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[GF]=!1}}function XF(e,t,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];if(e.brushSelector(r,n,a.selectors,a))return!0}}var $F={rect:function(e){return KF(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=n[r];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&KF(t)}};function KF(e){return new og(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var JF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new fj(t.getZr())).on("brush",Th(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){qF(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:ph(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:ph(n),$from:t})},t.type="brush",t}(TE),ez=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return j(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&function(e,t,n){var r;xh(n,(function(e){t.hasOwnProperty(e)&&zF(t[e])&&(r=!0)})),r&&xh(n,(function(n){t.hasOwnProperty(n)&&zF(t[n])?e[n]=ph(t[n]):delete e[n]}))}(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=_h(e,(function(e){return tz(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=tz(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(HC);function tz(e,t){return hh({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new PT(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var nz=ez,rz=["rect","polygon","lineX","lineY","keep","clear"],iz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,xh(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return xh(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:rz.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(Lj),oz=iz;function az(e){e.registerComponentView(JF),e.registerComponentModel(nz),e.registerPreprocessor(wF),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,QF),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ef),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ef),function(e,t){Bj[e]=t}("brush",oz)}var sz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(HC),lz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=jh(e.get("textBaseline"),e.get("textVerticalAlign")),l=new hb({style:gT(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new hb({style:gT(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!p&&!f,d.silent=!h&&!f,p&&l.on("click",(function(){DC(p,"_"+e.get("target"))})),h&&d.on("click",(function(){DC(h,"_"+e.get("subtarget"))})),fb(l).eventData=fb(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=LC(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new $_({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});r.add(b)}},t.type="title",t}(TE);function uz(e){e.registerComponentModel(sz),e.registerComponentView(lz)}function cz(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=_I(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(_I(e,t,n[a]));return o.join(" ")}}function dz(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Mh(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}var pz=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return j(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=UA(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=hz,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Vb(this.childAt(0))},t.prototype.downplay=function(){Wb(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(d):OS(p,d,a,n),jS(p)}if(this._updateCommon(e,n,s,r,i),l){var p=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,NS(p,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,p=r.hoverScale,h=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=fT(m),p=v.getShallow("scale"),h=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=HA(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),h&&f.attr("cursor",h);var _=e.getItemVisual(t,"style"),b=_.fill;if(f instanceof V_){var w=f.style;f.useStyle(fh({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(fh({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),T=this._z2;null!=S?null==T&&(this._z2=f.z2,f.z2+=S):null!=T&&(f.z2=T,this._z2=null);var C=i&&i.useNameLabel;hT(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return C?e.getName(t):cz(e,t)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var I=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;M.scaleX=this._sizeX*I,M.scaleY=this._sizeY*I,this.setSymbolScale(1),nw(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=fb(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&PS(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();PS(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return Mh(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t}(ay);function hz(e,t){this.parent.drift(e,t)}var fz=pz;function gz(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function mz(e){return null==e||kh(e)||(e={isIgnore:e}),e||{}}function vz(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:fT(t),cursorStyle:t.get("cursor")}}var yz=function(){function e(e){this.group=new ay,this._SymbolCtor=e||fz}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=mz(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=vz(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i=u(r);if(gz(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var p=i.getItemGraphicEl(d),h=u(c);if(gz(e,h,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(e,c,s,l)).setPosition(h);else{p.updateData(e,c,s,l);var m={x:h[0],y:h[1]};a?p.attr(m):OS(p,m,r)}n.add(p),e.setItemGraphicEl(c,p)}else n.remove(p)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=vz(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=mz(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(gz(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){uT(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()},e}(),xz=yz;function _z(e,t){return e.type===t}var bz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),Mh(t)&&xh(t,(function(e,r){Eh(e)&&(e={type:e}),t[r]=hh(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries((function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&Uy(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,i=Xh(),o=_h(r,(function(e){return(Eh(e)||Dh(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new PT(e,this,this.ecModel))}),this);this._data=wh(o,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&xh(this._data,(function(e){t[e.get("name")]=!1}));t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;xh(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;xh(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&mh(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(HC),wz=bz,Sz=Ch,Tz=xh,Cz=ay,Mz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return j(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new Cz),this.group.add(this._selectorGroup=new Cz),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=LC(l,u,c),p=this.layoutInner(e,i,d,r,a,s),h=LC(gh({width:p.width,height:p.height},l),u,c);this.group.x=h.x-p.x,this.group.y=h.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(e,t){var n=TC(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new $_({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=Xh(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),Tz(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new Cz;return d.newline=!0,void s.add(d)}var p=n.getSeriesByName(a)[0];if(!l.get(a))if(p){var h=p.getData(),f=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),m=h.getVisual("style");this._createItem(p,a,o,i,t,e,f,m,g,u,r).on("click",Sz(Iz,a,null,r,c)).on("mouseover",Sz(Az,p.name,null,r,c)).on("mouseout",Sz(Dz,p.name,null,r,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var d=s.indexOfName(a),p=s.getItemVisual(d,"style"),h=s.getItemVisual(d,"legendIcon"),f=ym(p.fill);f&&0===f[3]&&(f[3]=.2,p=fh(fh({},p),{fill:Sm(f,"rgba")})),this._createItem(n,a,o,i,t,e,{},p,h,u,r).on("click",Sz(Iz,null,a,r,c)).on("mouseover",Sz(Az,null,a,r,c)).on("mouseout",Sz(Dz,null,a,r,c)),l.set(a,!0)}}),this)}),this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();Tz(e,(function(e){var r=e.type,i=new hb({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),hT(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),tw(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,p=i.get("itemWidth"),h=i.get("itemHeight"),f=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),Tz(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?hD(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new Cz,_=r.getModel("textStyle");if(!Ih(e.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=UA(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:h,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?p+5:-5,S=o,T=i.get("formatter"),C=t;Eh(T)&&T?C=T.replace("{name}",null!=t?t:""):Ih(T)&&(C=T(t));var M=f?_.getTextColor():r.get("inactiveColor");x.add(new hb({style:gT(_,{text:C,x:w,y:h/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var I=new $_({shape:x.getBoundingRect(),invisible:!0}),E=r.getModel("tooltip");return E.get("show")&&sT({el:I,componentModel:i,itemName:t,itemTooltipOption:E.option}),x.add(I),x.eachChild((function(e){e.silent=!0})),I.silent=!u,this.getContentGroup().add(x),tw(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();PC(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){PC("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",g=0===h?"height":"width",m=0===h?"y":"x";"end"===o?d[h]+=l[f]+p:u[h]+=c[f]+p,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-h]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(TE);function Iz(e,t,n,r){Dz(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),Az(e,t,n,r)}function Ez(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function Az(e,t,n,r){Ez(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function Dz(e,t,n,r){Ez(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}var kz=Mz;function Oz(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function Nz(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",(function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),xh(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function Rz(e){e.registerComponentModel(wz),e.registerComponentView(kz),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Oz),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",Ch(Nz,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Ch(Nz,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Ch(Nz,"inverseSelect")),e.registerAction("legendSelect","legendselected",Ch(Nz,"select")),e.registerAction("legendUnSelect","legendunselected",Ch(Nz,"unSelect"))}(e)}function Pz(e,t,n){var r=[1,1];r[e.getOrient().index]=0,jC(t,n,{type:"box",ignoreSize:!!r})}var Lz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=FC(t);e.prototype.init.call(this,t,n,r),Pz(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Pz(this,this.option,t)},t.type="legend.scroll",t.defaultOption=jT(wz.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(wz),Bz=ay,jz=["width","height"],Fz=["x","y"],zz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return j(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Bz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Bz)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=Mh(c)?c:[c,c];h("pagePrev",0);var p=n.getModel("pageTextStyle");function h(e,t){var r=e+"DataIndex",o=rT(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:Th(l._pageGo,l,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});o.name=e,u.add(o)}u.add(new hb({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=jz[s],u=Fz[s],c=jz[1-s],d=Fz[1-s];i&&PC("horizontal",a,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),h=a.getBoundingRect(),f=[-h.x,-h.y],g=ph(n);i&&(g[l]=n[l]-h[l]-p);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+p;else{var v=h[l]+p;f[s]-=v,m[u]-=v}m[l]+=h[l]+p,f[1-s]+=m[d]+m[c]/2-h[c]/2,m[c]=Math.max(m[c],h[c]),m[d]=Math.min(m[d],h[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;PC(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),PC("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),p=c.getBoundingRect(),h=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-p.x,-p.y],v=jh(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-p[i]:g[r]+=p[i]+v);m[1-r]+=d[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=h?n[i]:d[i],y[o]=Math.max(d[o],p[o]),y[a]=Math.min(0,p[a]+m[1-r]),u.__rectSize=n[i],h){var x={x:0,y:0};x[i]=Math.max(n[i]-p[i]-v,0),x[o]=y[o],u.setClipPath(new $_({shape:x})),u.__rectSize=x[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&OS(l,{x:_.contentPosition[0],y:_.contentPosition[1]},h?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;xh(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",Eh(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=jz[i],a=Fz[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,p={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var h=y(u);p.contentPosition[i]=-h.s;for(var f=s+1,g=h,m=h,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),m=v;for(f=s-1,g=h,m=h,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=v;return p;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(kz),Uz=zz;function Hz(e){vN(Rz),e.registerComponentModel(Lz),e.registerComponentView(Uz),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}function Vz(e){vN(Rz),vN(Hz)}var Wz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.inside",t.defaultOption=jT(Ij.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Ij),Yz=Wy();function Gz(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function qz(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Qz(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function Zz(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=Yz(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Xh());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){xh(Sj(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:Ch(Qz,t),dispatchAction:Ch(qz,e),dataZoomInfoMap:null,controller:null},r=n.controller=new SB(e.getZr());return xh(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Xh())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each((function(e){var o=e.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),FE(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else Gz(r,e)}))}))}var Xz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return j(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){Yz(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:Th($z.pan,this),zoom:Th($z.zoom,this),scrollMove:Th($z.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=Yz(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||Gz(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Ej),$z={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=Jz[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return CB(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:Kz((function(e,t,n,r,i,o){var a=Jz[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:Kz((function(e,t,n,r,i,o){return Jz[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function Kz(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return CB(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var Jz={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},eU=Xz;function tU(e){Pj(e),e.registerComponentModel(Wz),e.registerComponentView(eU),Zz(e)}var nU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=jT(Ij.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Ij),rU=$_,iU="horizontal",oU="vertical",aU=["line","bar","candlestick","scatter"],sU={easing:"cubicOut",duration:100,delay:0},lU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return j(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Th(this._onBrush,this),this._onBrushEnd=Th(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),FE(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){zE(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new ay;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===iU?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=FC(e.option);xh(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=LC(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===oU&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==iU||i?n===iU&&i?{scaleY:a?1:-1,scaleX:-1}:n!==oU||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new rU({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new rU({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Th(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,p=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=h[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:py(e,u,p,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new ay,r=new tS({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new iS({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){xh(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&mh(aU,e.get("type"))<0)){var a,s=r.getComponent(bj(i),o).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(i),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new rU({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new rU({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),xh([0,1],(function(t){var o=a.get("handleIcon");!jA[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=UA(o,-1,0,2,2,null,!0);s.attr({cursor:uU(this._orient),draggable:!0,drift:Th(this._onDragMove,this,t),ondragend:Th(this._onDragEnd,this),onmouseover:Th(this._showDataInfo,this,!0),onmouseout:Th(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=hy(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),tw(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new hb({silent:!0,invisible:!0,style:gT(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var p=hy(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new $_({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=t.moveHandleIcon=UA(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(p,10));(d=t.moveZone=new $_({invisible:!0,shape:{y:o[1]-m,height:p+m}})).on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:uU(this._orient),drift:Th(this._onDragMove,this,"all"),ondragstart:Th(this._showDataInfo,this,!0),ondragend:Th(this._onDragEnd,this),onmouseover:Th(this._showDataInfo,this,!0),onmouseout:Th(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[py(e[0],[0,100],t,!0),py(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];CB(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?py(o.minSpan,a,i,!0):null,null!=o.maxSpan?py(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=gy([py(r[0],i,a,!0),py(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=gy(n.slice()),i=this._size;xh([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new $_,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=gy(this._handleEnds.slice());function d(e){var t=$S(n.handles[e].parent,this.group),a=JS(0===e?"right":"left",t),s=this._handleWidth/2+5,l=KS([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===iU?"middle":a,align:i===iU?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");null!=i&&"auto"!==i||(i=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return Ih(r)?r(e,o):Eh(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,jf(r.event);var i=KS([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Zf(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=gy([py(n.x,r,i,!0),py(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(jf(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new rU({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?sU:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Sj(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(Ej);function uU(e){return"vertical"===e?"ns-resize":"ew-resize"}var cU=lU;function dU(e){e.registerComponentModel(nU),e.registerComponentView(cU),Pj(e)}function pU(e){vN(tU),vN(dU)}var hU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return j(t,e),t.prototype.getInitialData=function(e){return oO(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new ay,n=UA("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=UA(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?i:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(wE);function fU(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),o=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:Dh(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=_h(e.dimensions,(function(e){return t.mapDimension(e)})),p=!1,h=t.getCalculationInfo("stackResultDimension");return iO(t,d[0])&&(p=!0,d[0]=h),iO(t,d[1])&&(p=!0,d[1]=h),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function gU(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var mU=Math.min,vU=Math.max;function yU(e,t){return isNaN(e)||isNaN(t)}function xU(e,t,n,r,i,o,a,s,l){for(var u,c,d,p,h,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(yU(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,p=y;else{var x=v-u,_=y-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],S=t[2*b+1];w===v&&S===y&&m<r;)m++,g+=o,w=t[2*(b+=o)],S=t[2*b+1],x=(v=t[2*g])-u,_=(y=t[2*g+1])-c;var T=m+1;if(l)for(;yU(w,S)&&T<r;)T++,w=t[2*(b+=o)],S=t[2*b+1];var C=.5,M=0,I=0,E=void 0,A=void 0;if(T>=r||yU(w,S))h=v,f=y;else{M=w-u,I=S-c;var D=v-u,k=w-v,O=y-c,N=S-y,R=void 0,P=void 0;if("x"===s){var L=M>0?1:-1;h=v-L*(R=Math.abs(D))*a,f=y,E=v+L*(P=Math.abs(k))*a,A=y}else if("y"===s){var B=I>0?1:-1;h=v,f=y-B*(R=Math.abs(O))*a,E=v,A=y+B*(P=Math.abs(N))*a}else R=Math.sqrt(D*D+O*O),h=v-M*a*(1-(C=(P=Math.sqrt(k*k+N*N))/(P+R))),f=y-I*a*(1-C),A=y+I*a*C,E=mU(E=v+M*a*C,vU(w,v)),A=mU(A,vU(S,y)),E=vU(E,mU(w,v)),f=y-(I=(A=vU(A,mU(S,y)))-y)*R/P,h=mU(h=v-(M=E-v)*R/P,vU(u,v)),f=mU(f,vU(c,y)),E=v+(M=v-(h=vU(h,mU(u,v))))*P/R,A=y+(I=y-(f=vU(f,mU(c,y))))*P/R}e.bezierCurveTo(d,p,h,f,v,y),d=E,p=A}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var _U=function(){this.smooth=0,this.smoothConstraint=!0},bU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _U},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&yU(n[2*i-2],n[2*i-1]);i--);for(;r<i&&yU(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=xU(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=g_.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,p=void 0,h=void 0,f=void 0,g=void 0;switch(i[l++]){case o.M:n=i[l++],r=i[l++];break;case o.L:if(u=i[l++],c=i[l++],(g=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&g>=0){var m=a?(c-r)*g+r:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],d=i[l++],p=i[l++],h=i[l++],f=i[l++];var v=a?Wg(n,u,d,h,e,s):Wg(r,c,p,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?Hg(r,c,p,f,x):Hg(n,u,d,h,x);return a?[e,m]:[m,e]}}n=h,r=f}}},t}(L_),wU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(_U),SU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return j(t,e),t.prototype.getDefaultShape=function(){return new wU},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&yU(n[2*o-2],n[2*o-1]);o--);for(;i<o&&yU(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=xU(e,n,i,o,o,1,t.smooth,a,t.connectNulls);xU(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(L_);function TU(e,t,n,r,i){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,a=Math.floor(a),l=Math.round(l);var d=new $_({shape:{x:a,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),h=p.isHorizontal(),f=p.inverse;h?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=Ih(i)?function(e){i(e,d)}:null;NS(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function CU(e,t,n){var r=e.getArea(),i=fy(r.r0,1),o=fy(r.r,1),a=new Qw({shape:{cx:fy(e.cx,1),cy:fy(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,NS(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function MU(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function IU(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function EU(e,t){var n=IU(e),r=n[0],i=n[1],o=IU(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function AU(e){return Dh(e)?e:e?.5:0}function DU(e,t,n,r){var i=t.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],s=0,l=[],u=[],c=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var p=(u[o]+c[o])/2,h=[];l[o]=h[o]=p,l[1-o]=u[1-o],h[1-o]=c[1-o],a.push(l[0],l[1]),a.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function kU(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=ym(t[i]),s=ym(t[o]),l=r-i,u=Sm([sm(pm(a[0],s[0],l)),sm(pm(a[1],s[1],l)),sm(pm(a[2],s[2],l)),lm(pm(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function OU(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*fz.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return xh(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function NU(e,t){return[e[2*t],e[2*t+1]]}function RU(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<xb.length;t++)if(e.get([xb[t],"endLabel","show"]))return!0;return!1}function PU(e,t,n,r){if(_z(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=RU(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=TU(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!r.get("clip",!0)){var d=c.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=2*p):(d.x-=p,d.width+=2*p)}return l&&l(1,c),c}return CU(t,n,r)}var LU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(){var e=new ay,t=new xz;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===i.type,d=this._coordSys,p=this._symbolDraw,h=this._polyline,f=this._polygon,g=this._lineGroup,m=!t.ssr&&e.isAnimationEnabled(),v=!l.isEmpty(),y=l.get("origin"),x=fU(i,a,y),_=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=IO(2*r),o=0;o<r;o++){var a=gU(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(i,a,x),b=e.get("showSymbol"),w=e.get("connectNulls"),S=b&&!c&&OU(e,a,i),T=this._data;T&&T.eachItemGraphicEl((function(e,t){e.__temp&&(o.remove(e),T.setItemGraphicEl(t,null))})),b||p.remove(),o.add(g);var C,M=!c&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(C=i.getArea()).width?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var I=function(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=t.getAxis(i),u=_h(o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var p=kU(u,"x"===i?n.getWidth():n.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=p[0].coord-10,g=p[h-1].coord+10,m=g-f;if(m<.001)return"transparent";xh(p,(function(e){e.offset=(e.coord-f)/m})),p.push({offset:h?p[h-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:d[0]||"transparent"});var v=new _S(0,0,0,0,p,!0);return v[i]=f,v[i+"2"]=g,v}}}(a,i,n)||a.getVisual("style")[a.getVisual("drawType")];if(h&&d.type===i.type&&M===this._step){v&&!f?f=this._newPolygon(u,_):f&&!v&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,AC(I));var E=g.getClipPath();if(E)NS(E,{shape:PU(this,i,!1,e).shape},e);else g.setClipPath(PU(this,i,!0,e));b&&p.updateData(a,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),MU(this._stackedOnPoints,_)&&MU(this._points,u)||(m?this._doUpdateAnimation(a,_,i,n,M,y,w):(M&&(u=DU(u,i,M,w),_&&(_=DU(_,i,M,w))),h.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))}else b&&p.updateData(a,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),m&&this._initSymbolLabelAnimation(a,i,C),M&&(u=DU(u,i,M,w),_&&(_=DU(_,i,M,w))),h=this._newPolyline(u),v?f=this._newPolygon(u,_):f&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,AC(I)),g.setClipPath(PU(this,i,!0,e));var A=e.getModel("emphasis"),D=A.get("focus"),k=A.get("blurScope"),O=A.get("disabled");(h.useStyle(gh(s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),ow(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);fb(h).seriesIndex=e.seriesIndex,nw(h,D,k,O);var N=AU(e.get("smooth")),R=e.get("smoothMonotone");if(h.setShape({smooth:N,smoothMonotone:R,connectNulls:w}),f){var P=a.getCalculationInfo("stackedOnSeries"),L=0;f.useStyle(gh(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),P&&(L=AU(P.get("smooth"))),f.setShape({smooth:N,stackedOnSmooth:L,smoothMonotone:R,connectNulls:w}),ow(f,e,"areaStyle"),fb(f).seriesIndex=e.seriesIndex,nw(f,D,k,O)}var B=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,h),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){fb(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=Vy(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new fz(i,o)).x=l,s.y=u,s.setZ(c,d);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=d,p.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else RE.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=Vy(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else RE.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;jb(this._polyline,e),t&&jb(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new bU({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new SU({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");Ih(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Ih(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],p=void 0,h=void 0,f=void 0;if(n)if(i){var g=n,m=t.pointToCoord(d);r?(p=g.startAngle,h=g.endAngle,f=-m[1]/180*Math.PI):(p=g.r0,h=g.r,f=m[0])}else{var v=n;r?(p=v.x,h=v.x+v.width,f=e.x):(p=v.y+v.height,h=v.y,f=e.y)}var y=h===p?0:(f-p)/(h-p);a&&(y=1-y);var x=Ih(u)?u(o):l*y+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(RU(e)){var i=e.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new hb({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(hT(o,fT(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?dz(i,n):cz(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),p=o.get("precision"),h=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?h:0)*(m?-1:1),_=(g?0:-h)*(m?-1:1),b=g?"x":"y",w=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(i=e[2*u+a],!isNaN(i)&&!isNaN(e[2*u+1-a]))if(0!==u){if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}(u,y,b),S=w.range,T=S[1]-S[0],C=void 0;if(T>=1){if(T>1&&!d){var M=NU(u,S[0]);s.attr({x:M[0]+x,y:M[1]+_}),i&&(C=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+x,y:M[1]+_});var I=c.getRawValue(S[0]),E=c.getRawValue(S[1]);i&&(C=function(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(Dh(r))return fy(f=Dy(n||0,r,i),o?Math.max(my(n||0),my(r)):t);if(Eh(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(i<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,h=l[c],f=Dy(p,h,i);a[c]=fy(f,o?Math.max(my(p),my(h)):t)}}return a}(n,p,I,E,w.t))}r.lastFrameIndex=S[0]}else{var A=1===e||r.lastFrameIndex>0?S[0]:0;M=NU(u,A);i&&(C=c.getRawValue(A)),s.attr({x:M[0]+x,y:M[1]+_})}if(i){var D=bT(s);"function"==typeof D.setLabelText&&D.setLabelText(C)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,o,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],p=[],h=[],f=[],g=fU(i,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var S=m[b],T=m[b+1],C=v[w],M=v[w+1];(isNaN(S)||isNaN(T))&&(S=C,T=M),l.push(S,T),u.push(C,M),c.push(n[b],n[b+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var I=x.idx,E=g.dataDimsForPoint,A=i.dataToPoint([t.get(E[0],I),t.get(E[1],I)]);w=2*I,l.push(A[0],A[1]),u.push(v[w],v[w+1]);var D=gU(g,i,t,I);c.push(D[0],D[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(I));break;case"-":_=!1}_&&(p.push(x),h.push(h.length))}h.sort((function(e,t){return f[e]-f[t]}));var k=l.length,O=IO(k),N=IO(k),R=IO(k),P=IO(k),L=[];for(y=0;y<h.length;y++){var B=h[y],j=2*y,F=2*B;O[j]=l[F],O[j+1]=l[F+1],N[j]=u[F],N[j+1]=u[F+1],R[j]=c[F],R[j+1]=c[F+1],P[j]=d[F],P[j+1]=d[F+1],L[y]=p[B]}return{current:O,next:N,stackedOnCurrent:R,stackedOnNext:P,status:L}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,p=c.stackedOnCurrent,h=c.next,f=c.stackedOnNext;if(i&&(d=DU(c.current,n,i,a),p=DU(c.stackedOnCurrent,n,i,a),h=DU(c.next,n,i,a),f=DU(c.stackedOnNext,n,i,a)),EU(d,h)>3e3||l&&EU(p,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),OS(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:p}),l.stopAnimation(),OS(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(RE),BU=LU;var jU={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},FU=function(e){return Math.round(e.length/2)};function zU(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/d);if(isFinite(p)&&p>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/p));var h=void 0;Eh(i)?h=jU[i]:Ih(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/p,h,FU))}}}}}function UU(e){e.registerChartView(BU),e.registerSeriesModel(hU),e.registerLayout(function(e,t){return{seriesType:e,plan:CE(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=_h(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");iO(n,a[0])&&(a[0]=l),iO(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=o&&IO(n*s),a=[],l=[],p=e.start,h=0;p<e.end;p++){var f=void 0;if(1===s){var g=u.get(c,p);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,p),a[1]=u.get(d,p),f=r.dataToPoint(a,null,l);o?(i[h++]=f[0],i[h++]=f[1]):t.setItemLayout(p,f.slice())}o&&t.setLayout("points",i)}}}}}}("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,zU("line"))}var HU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(e,t){return oO(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)xh(r.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=i[n],s="x1"===t[n]||"y1"===t[n];if(s&&(a+=1),r.length<2)return;if(2===r.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[s?1:0]));for(var l=void 0,u=void 0,c=1,d=0;d<r.length;d++){var p=r[d].coord,h=d===r.length-1?r[d-1].tickValue+c:r[d].tickValue;if(h===a){u=p;break}if(h<a)l=p;else if(null!=l&&h>a){u=(p+l)/2;break}1===d&&(c=h-r[0].tickValue)}null==u&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=e.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(wE);wE.registerClass(HU);var VU=HU,WU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(){return oO(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=jT(VU.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(VU),YU=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},GU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return j(t,e),t.prototype.getDefaultShape=function(){return new YU},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,p=c?u-l<d:l-u<d;p||(l=u-(c?d:-d));var h=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);p?(e.moveTo(h*i+n,f*i+r),e.arc(h*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(h*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(L_),qU=GU;function QU(e,t,n){return t*Math.sin(e)*(n?-1:1)}function ZU(e,t,n){return t*Math.cos(e)*(n?1:-1)}var XU=Math.max,$U=Math.min;var KU=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return j(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){uT(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var p=e.get("clip",!0)||d,h=function(e,t){var n=e.getArea&&e.getArea();if(_z(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,_=r&&r.isInitSort,b=r&&"changeAxisOrder"===r.type;function w(e){var t=aH[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?Qw:$_;return new r({shape:hH(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=aH[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&oH[l.type](r)){var s=!1;p&&(s=JU[l.type](h,r));var m=eH[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),lH(m,a,t,n,r,e,i,"polar"===l.type),_?m.attr({shape:r}):d?tH(d,c,m,r,t,i,!1,!1):NS(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=aH[l.type](a,t,r);if(g){var T=void 0;0===x.length?T=w(n):((T=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?T.setShape("r",v):T.setShape("cornerRadius",v),y[t]=T);var C=aH[l.type](a,t);OS(T,{shape:hH(i,C,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&oH[l.type](S)){var I=!1;if(p&&(I=JU[l.type](h,S))&&o.remove(M),M?jS(M):M=eH[l.type](e,a,t,S,i,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),b){var E=M.getTextContent();if(E){var A=bT(E);null!=A.prevValue&&(A.prevValue=A.value)}}else lH(M,a,t,r,S,e,i,"polar"===l.type);_?M.attr({shape:S}):d?tH(d,c,M,S,t,i,!0,b):OS(M,{shape:S},e,t,null),a.setItemGraphicEl(t,M),M.ignore=I,o.add(M)}else o.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&BS(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new ay);S.removeAll();for(var T=0;T<y.length;++T)S.add(y[T]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),dH(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),dH(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,r,i){return e?"polar"===e.type?CU(e,t,n):"cartesian2d"===e.type?TU(e,t,n,r,i):null:null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:_h(r,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){BS(t,e,fb(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(RE),JU={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=XU(t.x,e.x),s=$U(t.x+t.width,i),l=XU(t.y,e.y),u=$U(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>i?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=$U(t.r,e.r),o=XU(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},eH={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new $_({shape:fh({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,r,i,o,a,s,l){var u=!i&&l?qU:Qw,c=new u({shape:r,z2:1});c.name="item";var d,p,h=sH(i);if(c.calculateTextPosition=(d=h,p=({isRoundCap:u===qU}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return qv(e,t,n);var i=d(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,h=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=p?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",S="top";switch(i){case"startArc":_=s+(c-o)*y(m),b=l+(c-o)*x(m),w="center",S="top";break;case"insideStartArc":_=s+(c+o)*y(m),b=l+(c+o)*x(m),w="center",S="bottom";break;case"startAngle":_=s+h*y(f)+QU(f,o+v,!1),b=l+h*x(f)+ZU(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+h*y(f)+QU(f,-o+v,!1),b=l+h*x(f)+ZU(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+h*y(m),b=l+h*x(m),w="center",S="middle";break;case"endArc":_=s+(u+o)*y(m),b=l+(u+o)*x(m),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*y(m),b=l+(u-o)*x(m),w="center",S="top";break;case"endAngle":_=s+h*y(g)+QU(g,o+v,!0),b=l+h*x(g)+ZU(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+h*y(g)+QU(g,-o+v,!0),b=l+h*x(g)+ZU(g,-o+v,!0),w="right",S="middle";break;default:return qv(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=w,e.verticalAlign=S,e}),o){var f=i?"r":"endAngle",g={};c.shape[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?OS:NS)(c,{shape:g},o)}return c}};function tH(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?OS:NS)(n,{shape:l},t,i,null),(a?OS:NS)(n,{shape:u},t?e.baseAxis.model:null,i)}function nH(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var rH=["x","y","width","height"],iH=["cx","cy","r","startAngle","endAngle"],oH={cartesian2d:function(e){return!nH(e,rH)},polar:function(e){return!nH(e,iH)}},aH={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,o)}(n,r):0,o=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function sH(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function lH(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;fh(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;Mh(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:_h(r,(function(e){return Gv(e,i)}))}}(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=fT(r);hT(e,h,{labelFetcher:o,labelDataIndex:n,defaultText:cz(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,r){if(Dh(r))e.setTextConfig({rotation:r});else if(Mh(t))e.setTextConfig({rotation:0});else{var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?p:g,sH(a),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=bT(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}(f,h,o.getRawValue(n),(function(e){return dz(t,e)}));var m=r.getModel(["emphasis"]);nw(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),ow(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",xh(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var uH=function(){},cH=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return j(t,e),t.prototype.getDefaultShape=function(){return new uH},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(L_);function dH(e,t,n,r){var i=e.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new cH({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new cH({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(i.getVisual("style")),fb(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",pH),d.on("mousemove",pH)),n&&n.push(d)}var pH=jE((function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var p=3*c;if(l[r]=u,l[i]=o[p+2],s[r]=o[p+r],s[i]=o[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);fb(this).dataIndex=t>=0?t:null}),30,!1);function hH(e,t,n){if(_z(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var o=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var fH=KU;function gH(e){e.registerChartView(fH),e.registerSeriesModel(WU),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Ch(OO,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:CE(),reset:function(e){if(NO(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=iO(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),p=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,i),h=RO(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=h&&IO(3*i),u=h&&s&&IO(3*i),y=h&&IO(i),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),w=0;null!=(r=e.next());){var S=b.get(c?g:o,r),T=b.get(a,r),C=p,M=void 0;c&&(M=+S-b.get(o,r));var I=void 0,E=void 0,A=void 0,D=void 0;if(d){var k=n.dataToPoint([S,T]);c&&(C=n.dataToPoint([M,T])[0]),I=C,E=k[1]+v,A=k[0]-C,D=m,Math.abs(A)<f&&(A=(A<0?-1:1)*f)}else k=n.dataToPoint([T,S]),c&&(C=n.dataToPoint([T,M])[1]),I=k[0]+v,E=C,A=m,D=k[1]-C,Math.abs(D)<f&&(D=(D<=0?-1:1)*f);h?(l[w]=I,l[w+1]=E,l[w+2]=d?A:D,u&&(u[w]=d?x.x:I,u[w+1]=d?E:x.y,u[w+2]=_),y[r]=r):t.setItemLayout(r,{x:I,y:E,width:A,height:D}),w+=3}h&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,zU("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var mH=Math.sin,vH=Math.cos,yH=Math.PI,xH=2*Math.PI,_H=180/yH,bH=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){this._add("C",e,t,n,r,i,o)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,o){this.ellipse(e,t,n,n,0,r,i,o)},e.prototype.ellipse=function(e,t,n,r,i,o,a,s){var l=a-o,u=!s,c=Math.abs(l),d=Em(c-xH)||(u?l>=xH:-l>=xH),p=l>0?l%xH:l%xH+xH,h=!1;h=!!d||!Em(c)&&p>=yH==!!u;var f=e+n*vH(o),g=t+r*mH(o);this._start&&this._add("M",f,g);var m=Math.round(i*_H);if(d){var v=1/this._p,y=(u?1:-1)*(xH-v);this._add("A",n,r,m,1,+u,e+n*vH(o+y),t+r*mH(o+y)),v>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var x=e+n*vH(a),_=t+r*mH(a);this._add("A",n,r,m,+h,+u,x,_)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),wH="none",SH=Math.round;var TH=["lineCap","miterLimit","lineJoin"],CH=_h(TH,(function(e){return"stroke-"+e.toLowerCase()}));function MH(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof V_)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==wH}(t)){var o=Mm(t.fill);e("fill",o.color);var a=null!=t.fillOpacity?t.fillOpacity*o.opacity*i:o.opacity*i;(r||a<1)&&e("fill-opacity",a)}else e("fill",wH);if(function(e){var t=e.stroke;return null!=t&&t!==wH}(t)){var s=Mm(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*i:s.opacity*i,d=t.strokeFirst;if((r||1!==u)&&e("stroke-width",u),(r||d)&&e("paint-order",d?"stroke":"fill"),(r||c<1)&&e("stroke-opacity",c),t.lineDash){var p=qA(n),h=p[0],f=p[1];h&&(f=SH(f||0),e("stroke-dasharray",h.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",wH);for(var g=0;g<TH.length;g++){var m=TH[g];if(r||t[m]!==O_[m]){var v=t[m]||O_[m];v&&e(CH[g],v)}}}else r&&e("stroke",wH)}}var IH="http://www.w3.org/2000/svg",EH="http://www.w3.org/1999/xlink";function AH(e){return document.createElementNS(IH,e)}function DH(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function kH(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,i=t.tag,o=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var r in t){var i=t[r],o=r;!1!==i&&(!0!==i&&null!=i&&(o+='="'+i+'"'),n.push(o))}return"<"+e+" "+n.join(" ")+">"}(i,o)+("style"!==i?Af(a):a||"")+(r?""+n+_h(r,(function(t){return e(t)})).join(n)+n:"")+function(e){return"</"+e+">"}(i)}(e)}function OH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function NH(e,t,n,r){return DH("svg","root",{width:e,height:t,xmlns:IH,"xmlns:xlink":EH,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var RH={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},PH="transform-origin";function LH(e,t,n){var r=fh({},e.shape);fh(r,t),e.buildPath(n,r);var i=new bH;return i.reset(jm(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function BH(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[PH]=n+"px "+r+"px")}var jH={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function FH(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function zH(e){return Eh(e)?RH[e]?"cubic-bezier("+RH[e]+")":em(e)?e:"":""}function UH(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof yS){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(xh(o,(function(e){var t=OH(n.zrId);t.animation=!0,UH(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=Sh(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var f=s[h].animation;f.indexOf(i)>=0&&(r=f)}}})),r){t.d=!1;var s=FH(a,n);return r.replace(i,s)}}(e,t,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u<o;u++){var c=i[u],d=[c.getMaxTime()/1e3+"s"],p=zH(c.getClip().easing),h=c.getDelay();p?d.push(p):d.push("linear"),h&&d.push(h/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function g(i){var o,a=i[1],s=a.length,l={},u={},c={},d="animation-timing-function";function p(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),o=0;o<r.length;o++){var a=r[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],p=Math.round(c.time/i*100)+"%",h=zH(c.easing),f=c.rawValue;(Eh(f)||Dh(f))&&(t[p]=t[p]||{},t[p][l]=c.rawValue,h&&(t[p][d]=h))}}}}for(var h=0;h<s;h++){(S=(w=a[h]).targetName)?"shape"===S&&p(w,u):!r&&p(w,l)}for(var f in l){var g={};jv(g,e),fh(g,l[f]);var m=Fm(g),v=l[f][d];c[f]=m?{transform:m}:{},BH(c[f],g),v&&(c[f][d]=v)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!o;v=u[f][d];x&&(o=new g_);var _=o.len();o.reset(),c[f].d=LH(e,u[f],o);var b=o.len();if(!x&&_!==b){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!r)for(h=0;h<s;h++){var w,S;"style"===(S=(w=a[h]).targetName)&&p(w,c,(function(e){return jH[e]}))}var T,C=Sh(c),M=!0;for(h=1;h<C.length;h++){var I=C[h-1],E=C[h];if(c[I][PH]!==c[E][PH]){M=!1;break}T=c[I][PH]}if(M&&T){for(var f in c)c[f][PH]&&delete c[f][PH];t[PH]=T}if(wh(C,(function(e){return Sh(c[e]).length>0})).length)return FH(c,n)+" "+i[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}var HH=Math.round;function VH(e){return e&&Eh(e.src)}function WH(e){return e&&Ih(e.toDataURL)}function YH(e,t,n,r){MH((function(i,o){var a="fill"===i||"stroke"===i;a&&Lm(o)?tV(t,e,i,r):a&&Nm(o)?nV(n,e,i,r):e[i]=o}),t,n,!1),function(e,t,n){var r=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(r)){var i=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),o=n.shadowCache,a=o[i];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,d=r.shadowOffsetY||0,p=r.shadowBlur,h=Mm(r.shadowColor),f=h.opacity,g=h.color,m=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=DH("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[DH("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[i]=a}t.filter=Bm(a)}}(n,e,r)}function GH(e){return Em(e[0]-1)&&Em(e[1])&&Em(e[2])&&Em(e[3]-1)}function qH(e,t,n){if(t&&(!function(e){return Em(e[4])&&Em(e[5])}(t)||!GH(t))){var r=n?10:1e4;e.transform=GH(t)?"translate("+HH(t[4]*r)/r+" "+HH(t[5]*r)/r+")":function(e){return"matrix("+Am(e[0])+","+Am(e[1])+","+Am(e[2])+","+Am(e[3])+","+Dm(e[4])+","+Dm(e[5])+")"}(t)}}function QH(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(HH(r[o][0]*n)/n),i.push(HH(r[o][1]*n)/n);t.points=i.join(" ")}function ZH(e){return!e.smooth}var XH,$H,KH={circle:[(XH=["cx","cy","r"],$H=_h(XH,(function(e){return"string"==typeof e?[e,e]:e})),function(e,t,n){for(var r=0;r<$H.length;r++){var i=$H[r],o=e[i[0]];null!=o&&(t[i[1]]=HH(o*n)/n)}})],polyline:[QH,ZH],polygon:[QH,ZH]};function JH(e,t){var n=e.style,r=e.shape,i=KH[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&jm(e)||4;if(!i||t.willUpdate||i[1]&&!i[1](r)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===p&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new bH),f.reset(u),d.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);i[0](r,o,g)}return qH(o,e.transform),YH(o,n,e,t),t.animation&&UH(e,o,t),DH(s,e.id+"",o)}function eV(e,t){return e instanceof L_?JH(e,t):e instanceof V_?function(e,t){var n=e.style,r=n.image;if(r&&!Eh(r)&&(VH(r)?r=r.src:WH(r)&&(r=r.toDataURL())),r){var i=n.x||0,o=n.y||0,a={href:r,width:n.width,height:n.height};return i&&(a.x=i),o&&(a.y=o),qH(a,e.transform),YH(a,n,e,t),t.animation&&UH(e,a,t),DH("image",e.id+"",a)}}(e,t):e instanceof F_?function(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||qp,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,Yv(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":km[n.textAlign]||n.textAlign};if(ab(n)){var l="",u=n.fontStyle,c=ib(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Gp,p=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),qH(s,e.transform),YH(s,n,e,t),t.animation&&UH(e,s,t),DH("text",e.id+"",s,void 0,r)}}(e,t):void 0}function tV(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Rm(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Pm(o))return;i="radialGradient",a.cx=jh(o.x,.5),a.cy=jh(o.y,.5),a.r=jh(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*Dm(s[u].offset)+"%",p=Mm(s[u].color),h=p.color,f=p.opacity,g={offset:d};g["stop-color"]=h,f<1&&(g["stop-opacity"]=f),l.push(DH("stop",u+"",g))}var m=kH(DH(i,"",a,l)),v=r.gradientCache,y=v[m];y||(y=r.zrId+"-g"+r.gradientIdx++,v[m]=y,a.id=y,r.defs[y]=DH(i,y,a,l)),t[n]=Bm(y)}function nV(e,t,n,r){var i,o=e.style[n],a=e.getBoundingRect(),s={},l=o.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(Om(o)){var p=o.imageWidth,h=o.imageHeight,f=void 0,g=o.image;if(Eh(g)?f=g:VH(g)?f=g.src:WH(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";Hh(p,m),Hh(h,m)}else if(null==p||null==h){var v=function(e,t){if(e){var n=e.elm,r=p||t.width,i=h||t.height;"pattern"===e.tag&&(c?(i=1,r/=a.width):d&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute("width",r),n.setAttribute("height",i))}},y=px(f,null,e,(function(e){u||v(w,e),v(i,e)}));y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}i=DH("image","img",{href:f,width:p,height:h}),s.width=p,s.height=h}else o.svgElement&&(i=ph(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=Fm(o);b&&(s.patternTransform=b);var w=DH("pattern","",s,[i]),S=kH(w),T=r.patternCache,C=T[S];C||(C=r.zrId+"-p"+r.patternIdx++,T[S]=C,s.id=C,w=r.defs[C]=DH("pattern",C,s,[i])),t[n]=Bm(C)}}function rV(e,t,n){var r=n.clipPathCache,i=n.defs,o=r[e.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=o,i[o]=DH("clipPath",o,a,[JH(e,n)])}t["clip-path"]=Bm(o)}function iV(e){return document.createTextNode(e)}function oV(e,t,n){e.insertBefore(t,n)}function aV(e,t){e.removeChild(t)}function sV(e,t){e.appendChild(t)}function lV(e){return e.parentNode}function uV(e){return e.nextSibling}function cV(e,t){e.textContent=t}var dV=DH("","");function pV(e){return void 0===e}function hV(e){return void 0!==e}function fV(e,t,n){for(var r={},i=t;i<=n;++i){var o=e[i].key;void 0!==o&&(r[o]=i)}return r}function gV(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function mV(e){var t,n=e.children,r=e.tag;if(hV(r)){var i=e.elm=AH(r);if(xV(dV,e),Mh(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&sV(i,mV(o))}else hV(e.text)&&!kh(e.text)&&sV(i,iV(e.text))}else e.elm=iV(e.text);return e.elm}function vV(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&oV(e,mV(o),t)}}function yV(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(hV(i.tag))aV(lV(i.elm),i.elm);else aV(e,i.elm)}}function xV(e,t){var n,r=t.elm,i=e&&e.attrs||{},o=t.attrs||{};if(i!==o){for(n in o){var a=o[n];i[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?r.setAttributeNS(EH,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function _V(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(xV(e,t),pV(t.text)?hV(r)&&hV(i)?r!==i&&function(e,t,n){for(var r,i,o,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,p=n[0],h=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==p?p=n[++s]:null==h?h=n[--d]:gV(u,p)?(_V(u,p),u=t[++a],p=n[++s]):gV(c,h)?(_V(c,h),c=t[--l],h=n[--d]):gV(u,h)?(_V(u,h),oV(e,u.elm,uV(c.elm)),u=t[++a],h=n[--d]):gV(c,p)?(_V(c,p),oV(e,c.elm,u.elm),c=t[--l],p=n[++s]):(pV(r)&&(r=fV(t,a,l)),pV(i=r[p.key])||(o=t[i]).tag!==p.tag?oV(e,mV(p),u.elm):(_V(o,p),t[i]=void 0,oV(e,o.elm,u.elm)),p=n[++s]);(a<=l||s<=d)&&(a>l?vV(e,null==n[d+1]?null:n[d+1].elm,n,s,d):yV(e,t,a,l))}(n,r,i):hV(i)?(hV(e.text)&&cV(n,""),vV(n,null,i,0,i.length-1)):hV(r)?yV(n,r,0,r.length-1):hV(e.text)&&cV(n,""):e.text!==t.text&&(hV(r)&&yV(n,r,0,r.length-1),cV(n,t.text)))}var bV=0,wV=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=t,this._opts=n=fh({},n),this.root=e,this._id="zr"+bV++,this._oldVNode=NH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=AH("svg");xV(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(gV(e,t))_V(e,t);else{var n=e.elm,r=lV(n);mV(t),null!==r&&(oV(r,t.elm,uV(n)),yV(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return eV(e,OH(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=OH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],a=this._bgVNode=function(e,t,n,r){var i;if(n&&"none"!==n)if(i=DH("rect","bg",{width:e,height:t,x:"0",y:"0",id:"0"}),Lm(n))tV({fill:n},i.attrs,"fill",r);else if(Nm(n))nV({style:{fill:n},dirty:ef,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=Mm(n),a=o.color,s=o.opacity;i.attrs.fill=a,s<1&&(i.attrs["fill-opacity"]=s)}return i}(n,r,this._backgroundColor,i);a&&o.push(a);var s=e.compress?null:this._mainVNode=DH("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=_h(Sh(i.defs),(function(e){return i.defs[e]}));if(l.length&&o.push(DH("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=_h(Sh(e),(function(t){return t+i+_h(Sh(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=_h(Sh(t),(function(e){return"@keyframes "+e+i+_h(Sh(t[e]),(function(n){return n+i+_h(Sh(t[e][n]),(function(r){var i=t[e][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=DH("style","stl",{},[],u);o.push(c)}}return NH(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},kH(this.renderToVNode({animation:jh(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:jh(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,i,o=e.length,a=[],s=0,l=0,u=0;u<o;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=i&&i.length||0,f=void 0;for(f=Math.max(p-1,h-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=h-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<p;m++){var v={};rV(d[m],v,t);var y=DH("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var x=eV(c,t);x&&(r?r.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&i&&(i.style.display="none",e=GA(r,0,n),t=GA(r,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(Nm(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=zm(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();var SV=wV;function TV(e,t,n){var r=$p.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var CV=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||Mv,"string"==typeof t?i=TV(t,n,r):kh(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(Kh(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return j(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=TV("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new og(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new og(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new og(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var p=e.width*e.height,h=c.width*c.height,f=l.width*l.height-p-h;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new og(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(h=e[c]){var d=h.shouldBePainted(n,r,!0,!0);(f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null)&&u(f);var p=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h,f;d=(h=t[c]).shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered)(f=h.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var d=this.domBack;function p(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(Ph(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||WA(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=eD(i,t,{dirty:function(){c.setUnpainted(),c.__painter.refresh()}}));i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,o),i.restore())}!n||s?p(0,0,o,a):n.length&&xh(n,(function(e){p(e.x*u,e.y*u,e.width*u,e.height*u)}))},t}(xf),MV=CV,IV=1e5,EV=314159,AV=.01;var DV=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=fh({},n||{}),this.dpr=n.devicePixelRatio||Mv,this._singleCanvas=i,this.root=e,e.style&&(Kh(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new MV(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=EV,o.push(EV),this._domRoot=e}else{this._width=GA(e,0,n),this._height=GA(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(IV)),r||(r=n.ctx).save(),uD(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(IV)},e.prototype.paintOne=function(e,t){lD(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;Eg((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(EV).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=i[a],d=l.ctx,h=o&&l.createRepaintRects(e,t,p._width,p._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,h);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b<h.length;++b){var w=h[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},p=this,h=0;h<i.length;h++)d(h);return Yp.wxa&&xh(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(uD(a,e,i,o),e.setPrevPaintRect(s))}else uD(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=EV);var n=this._layers[e];return n||((n=new MV("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?hh(n,this._layerConfig[e],!0):this._layerConfig[e-AV]&&hh(n,this._layerConfig[e-AV],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i,o=null,a=0;for(i=0;i<e.length;i++){var s,l=(s=e[i]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?AV:0),this._needsManuallyCompositing),u.__builtin__||dh("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,xh(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?hh(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+AV)hh(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(mh(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=GA(i,0,r),t=GA(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(EV).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new MV("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];uD(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),kV=DV;function OV(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current}vN([uz,_F,Vz,gB,pU,UU,gH,function(e){e.registerPainter("canvas",kV)},az]);var NV=(null===window||void 0===window?void 0:window.outerWidth)>1728?550:470,RV=(null===window||void 0===window?void 0:window.outerWidth)>1728?680:590,PV=r.makeStyles((function(){return{outlierOnlyButton:{borderRadius:"8px"},metricPanel:{position:"relative"},overideMuiSelect:{"& .MuiInput-input":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},"& .MuiInput-root":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"}},overrideDefaultMuiSelect:{maxHeight:"300px","& .MuiInput-root":{height:"32px"}},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},menuItem:{fontWeight:300,fontSize:"14px",padding:"15px 20px",height:"52px"},outlierButtonContainer:{position:"absolute",display:"flex",justifySelf:"end",marginTop:"8px",marginRight:"8px",zIndex:2,pointerEvents:"auto"},prometheusIcon:{position:"absolute",top:"15px",right:"15px",marginLeft:"17px",marginTop:"5px"}}})),LV=S.default.memo((function(n){var i,o=n.metricData,a=n.appName,s=n.metricKey,l=n.metricMeasure,u=n.operations,c=n.groupByOperations,d=n.height,p=n.timezone,h=n.graphTitle,f=n.graphType,g=n.queryData,m=n.dateTimeRange,v=n.isHistoricalQueryView,y=n.showTitle,x=void 0===y||y,_=n.onSelectedTimeWindow,b=n.onSelectAshLabel,w=PV(),S=u,T="".concat("echart-").concat(s),C=t.useState(null==c?void 0:c[0]),M=C[0],I=C[1],E=t.useState(null==S?void 0:S[0]),A=E[0],D=E[1],k=t.useState("undefined"!=typeof window?window.innerWidth:1280),O=k[0],N=k[1],R=t.useRef(null),P=t.useRef(null),L=OV(o),B=t.useCallback((function(){var e,t,n=f===exports.GraphType.SINGLE_SUPPORTING||f===exports.GraphType.MAIN_RCA,r=null===(t=null===(e=R.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement,i=r?r.clientWidth:O;if(n)return Math.max(.99*i,250);var o=Math.floor(i/500),s=16*((o=Math.max(1,o))-1),l=Math.floor((i-s)/o);return Math.max(Math.min(l,NV),a===exports.AppName.YBM?RV:490)}),[f,O]),j=t.useCallback((function(e){var t,n,r,i,s,c,d,f=BP(o,5);if(!ac(f)||!oc(f.data))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:"No Data Available",left:"center",top:"50%",textStyle:{fontWeight:"bold",fontFamily:ld,fontSize:13,color:"#0B1117"}},legend:{data:[]}};var v=l===exports.MetricMeasure.OUTLIER,y=l===exports.MetricMeasure.OUTLIER_TABLES,_=l===exports.MetricMeasure.OUTLIER_DB,b=null!=e?e:null==u?void 0:u[0];((null==u?void 0:u.length)||e)&&(v||y||_)&&(f.data=f.data.filter((function(e){return(null==e?void 0:e.name)===b})));var w=null!==(i=null===(r=null===(n=null===(t=f.layout)||void 0===t?void 0:t.yaxis)||void 0===n?void 0:n.ticksuffix)||void 0===r?void 0:r.replace(/(&nbsp;|\s)+/g,""))&&void 0!==i?i:null,S=0,T=f.data.map((function(e,t){var n,r,i,o,a,s,u,c,d,h,m,v=e.name;if(e.instanceName&&e.name!==e.instanceName)v="".concat(e.name," (").concat(e.instanceName,")"),l===exports.MetricMeasure.OUTLIER&&(v=e.instanceName);else if(l!==exports.MetricMeasure.OUTLIER||e.instanceName||e.global){if(y)v=e.tableName;else if(_)v=e.dbName;else if((null===(n=null==f?void 0:f.layout)||void 0===n?void 0:n.type)===od&&l===exports.MetricMeasure.OVERALL&&(null===(o=null===(i=null===(r=null==f?void 0:f.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0])===exports.WaitEventClassification.QUERY_ID){var x=null==g?void 0:g.find((function(t){return t.id.queryId===e.name}));v=null==x?void 0:x.query}}else v=cd.NODE_AVERAGE;var b=v,w=(null==v?void 0:v.length)>30;(null===(a=null==f?void 0:f.layout)||void 0===a?void 0:a.type)===od&&l===exports.MetricMeasure.OVERALL&&(null===(c=null===(u=null===(s=null==f?void 0:f.layout)||void 0===s?void 0:s.metadata)||void 0===u?void 0:u.currentGroupBy)||void 0===c?void 0:c[0])===exports.WaitEventClassification.QUERY_ID?b=(null==v?void 0:v.substring(0,30))+"...":w&&l!==exports.MetricMeasure.OUTLIER?b=v.substring(0,30)+"...":l!==exports.MetricMeasure.OUTLIER||e.global?y?b=e.namespaceName?"".concat(e.namespaceName,".").concat(e.tableName):e.tableName:_&&(b=e.namespaceName):b=e.instanceName?"".concat(e.instanceName," (").concat(e.name,")"):cd.NODE_AVERAGE;var S=e.x.map((function(t,n){return[t,e.y[n]]})),T=(null===(d=null==f?void 0:f.layout)||void 0===d||d.type,S);return F(F({name:b,fullname:v,type:(null===(h=null==f?void 0:f.layout)||void 0===h?void 0:h.type)===od?"bar":"line",data:T,color:Jd[t%Jd.length]},e.name===cd.NODE_AVERAGE?{lineStyle:{type:"dashed"}}:{}),{tooltip:{formatter:function(e){var t=e.value[1],n=new Date(e.value[0]).toLocaleString(void 0,{timeZone:p});return"".concat(e.seriesName,": ").concat(t.toFixed(2)," at ").concat(n)}},stack:(null===(m=null==f?void 0:f.layout)||void 0===m?void 0:m.type)===od?"total":void 0,smooth:!1,showSymbol:!1})}));ac(null===(s=f.layout)||void 0===s?void 0:s.yaxis)&&"µs"===w&&oc(f.data)&&cc(f.data)&&(T.forEach((function(e){e.data=e.data.map((function(e){return[e[0],e[1]/1e3]}))})),w="ms");var C=0;T.forEach((function(e){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>C&&(C=t)}));S=1.6*C,(null===(c=null==f?void 0:f.layout)||void 0===c?void 0:c.type)===od&&(S=3.5*C),0===S&&(S=1.01);var M=x?null!=h?h:null===(d=f.layout)||void 0===d?void 0:d.title:"",I={title:{text:a!==exports.AppName.YBA&&w?"".concat(M," (").concat(w,")"):M,left:16,top:16,textStyle:{fontWeight:600,fontFamily:ld,fontSize:15}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px;",formatter:function(e){var t,n=(null===(t=e[0])||void 0===t?void 0:t.axisValue)||"",r=new Date(n),i=zu(p?Uu(r,p):r,"MMM d HH:mm (zzz)",{timeZone:null!=p?p:void 0}),o=e.map((function(e){var t=e.value[1],n=Bp(e.color,e.seriesName),r=jp(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;"><b>'.concat(i,"</b><br/>").concat(o,"</div>")}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:{left:"3%",right:"4%",bottom:"20%",containLabel:!0,top:"20%"},xAxis:{type:"time",boundaryGap:!1,splitNumber:6,axisLabel:{color:"#25323D",interval:"auto",formatter:function(e){var t,n=new Date(e),r=(t=m.startDateTime,(m.endDateTime-t)/864e5);return zu(n,r>5?"MM/dd":r>1&&r<=5?"MM/dd, HH:mm":"HH:mm")}},axisLine:{lineStyle:{color:"#FF0000"}},axisPointer:{label:{show:!1}}},yAxis:{type:"value",axisLabel:{color:"#25323D",formatter:function(e){return"".concat(null==e?void 0:e.toFixed(2)," ").concat(null!=w?w:"")}},axisLine:{lineStyle:{color:"#00AAFF"}},axisPointer:{label:{show:!1}},min:0,max:S},series:T,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0},legend:{type:"plain",orient:"horizontal",textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#4E5F6D",fontFamily:ld},bottom:10,data:T.filter((function(e){return e&&e.name})).slice(0,8).map((function(e){return e.name}))}};return I}),[a,m,h,o,l,u,g,x,p]),z=t.useCallback((function(){var e;if(R.current){P.current||(P.current=dk(R.current,"light",{renderer:"canvas"}),P.current.group="metrics-sync-group");var t=j(A);P.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=P.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=P.current)||void 0===e||e.resize({width:B()}),function(e){e.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}});var t=!1,n=null;e.current.getZr().on("mousedown",(function(r){var i,o,a=[r.offsetX,r.offsetY],s=null===(i=e.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},a);n=null!==(o=null==s?void 0:s[0])&&void 0!==o?o:null,t=!0})),e.current.getZr().on("mouseup",(function(r){var i;if(t){var o=[r.offsetX,r.offsetY],a=null===(i=e.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},o),s=null==a?void 0:a[0];null!==n&&null!==s&&Math.abs(s-n)>10&&_(n,s)}t=!1}))}(P)}}),[A,j,B]);t.useEffect((function(){var e=function(){return N(window.innerWidth)};return window.addEventListener("resize",e),z(),function(){window.removeEventListener("resize",e),P.current&&(P.current.dispose(),P.current=null)}}),[z]),t.useEffect((function(){var e;if(P.current){var t=j(A);P.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=P.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=P.current)||void 0===e||e.resize({width:B()})}}),[o,L,A,M,B,j]);t.useEffect((function(){var e;P.current&&(f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=P.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=P.current)||void 0===e||e.resize({width:B()}))}),[O,B]);var U=A||(null==u?void 0:u[0]);return e.jsxs(r.Box,F({id:s,onClick:function(e){return e.stopPropagation()},className:w.metricPanel},{children:[e.jsxs("span",F({className:w.outlierButtonContainer},{children:[(null===(i=null==o?void 0:o.layout)||void 0===i?void 0:i.type)===od&&(l===exports.MetricMeasure.OUTLIER||l===exports.MetricMeasure.OUTLIER_TABLES||l===exports.MetricMeasure.OUTLIER_DB||v)&&oc(c)&&e.jsx(r.Box,F({ml:2,mr:2},{children:e.jsx(Fa,F({value:M,className:Y(w.outlierOnlyButton,w.overrideDefaultMuiSelect,w.overrideDefaultMuiFormControl)},{children:null==c?void 0:c.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){!function(e){var t;I(e),(null===(t=null==o?void 0:o.layout)||void 0===t?void 0:t.type)!==od||l!==exports.MetricMeasure.OUTLIER&&l!==exports.MetricMeasure.OUTLIER_TABLES&&l!==exports.MetricMeasure.OUTLIER_DB&&!v||null==b||b(e,o,!!v)}(t),e.stopPropagation()}},{children:t}),n)}))}))})),(null==S?void 0:S.length)>1&&oc(S)&&e.jsx(Fa,F({value:A,className:Y(w.outlierOnlyButton,w.overrideDefaultMuiSelect,w.overrideDefaultMuiFormControl)},{children:null==S?void 0:S.map((function(t,n){return e.jsx(r.MenuItem,F({className:Y(t===U&&w.overideMuiSelect,w.menuItem),value:t,onClick:function(e){!function(e){var t;if(D(e),(null===(t=null==o?void 0:o.layout)||void 0===t?void 0:t.type)===od&&l===exports.MetricMeasure.OVERALL&&oc(u)&&(null==b||b(e,o,!!v)),P.current){var n=j(e);P.current.setOption(n,!0)}}(t),e.stopPropagation()}},{children:t}),"".concat(t,"-").concat(n))}))}))]})),e.jsx("div",{ref:R,id:T,style:{overflow:"hidden",position:"relative",zIndex:1,height:null!=d?d:400,width:"100%",minWidth:0}})]}))})),BV={exports:{}},jV=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},FV=jV,zV=Object.prototype.toString;function UV(e){return"[object Array]"===zV.call(e)}function HV(e){return void 0===e}function VV(e){return null!==e&&"object"==typeof e}function WV(e){if("[object Object]"!==zV.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function YV(e){return"[object Function]"===zV.call(e)}function GV(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),UV(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var qV={isArray:UV,isArrayBuffer:function(e){return"[object ArrayBuffer]"===zV.call(e)},isBuffer:function(e){return null!==e&&!HV(e)&&null!==e.constructor&&!HV(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:VV,isPlainObject:WV,isUndefined:HV,isDate:function(e){return"[object Date]"===zV.call(e)},isFile:function(e){return"[object File]"===zV.call(e)},isBlob:function(e){return"[object Blob]"===zV.call(e)},isFunction:YV,isStream:function(e){return VV(e)&&YV(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:GV,merge:function e(){var t={};function n(n,r){WV(t[r])&&WV(n)?t[r]=e(t[r],n):WV(n)?t[r]=e({},n):UV(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)GV(arguments[r],n);return t},extend:function(e,t,n){return GV(t,(function(t,r){e[r]=n&&"function"==typeof t?FV(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},QV=qV;function ZV(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var XV=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(QV.isURLSearchParams(t))r=t.toString();else{var i=[];QV.forEach(t,(function(e,t){null!=e&&(QV.isArray(e)?t+="[]":e=[e],QV.forEach(e,(function(e){QV.isDate(e)?e=e.toISOString():QV.isObject(e)&&(e=JSON.stringify(e)),i.push(ZV(t)+"="+ZV(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},$V=qV;function KV(){this.handlers=[]}KV.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},KV.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},KV.prototype.forEach=function(e){$V.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var JV,eW,tW,nW,rW,iW,oW,aW,sW,lW,uW,cW,dW,pW,hW,fW,gW,mW,vW=KV,yW=qV,xW=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function _W(){if(eW)return JV;eW=1;var e=xW;return JV=function(t,n,r,i,o){var a=new Error(t);return e(a,n,r,i,o)},JV}function bW(){if(nW)return tW;nW=1;var e=_W();return tW=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function wW(){if(iW)return rW;iW=1;var e=qV;return rW=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(i)&&s.push("path="+i),e.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},rW}function SW(){return aW?oW:(aW=1,oW=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function TW(){return lW?sW:(lW=1,sW=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function CW(){if(cW)return uW;cW=1;var e=SW(),t=TW();return uW=function(n,r){return n&&!e(r)?t(n,r):r}}function MW(){if(pW)return dW;pW=1;var e=qV,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return dW=function(n){var r,i,o,a={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([i]):a[r]?a[r]+", "+i:i}})),a):a}}function IW(){if(fW)return hW;fW=1;var e=qV;return hW=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var EW,AW,DW,kW,OW,NW={exports:{}},RW={exports:{}},PW={exports:{}};function LW(){if(AW)return EW;AW=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return EW=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(i){var o=Math.abs(i);if(o>=r)return a(i,o,r,"day");if(o>=n)return a(i,o,n,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},EW}function BW(){if(kW)return DW;return kW=1,DW=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=LW(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},DW}var jW,FW,zW,UW,HW,VW,WW,YW,GW,qW={exports:{}};function QW(){return FW?jW:(FW=1,jW=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function ZW(){return HW||(HW=1,function(e,t){const n=O.default,r=N.default;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(UW)return zW;UW=1;const e=R.default,t=O.default,n=QW(),{env:r}=process;let i;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,o){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===i)return 0;const a=i||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),zW={supportsColor:function(e){return o(a(e,e&&e.isTTY))},stdout:o(a(!0,t.isatty(1))),stderr:o(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=BW()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(qW,qW.exports)),qW.exports}function XW(){return VW||(VW=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?RW.exports=(OW||(OW=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=BW()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(PW,PW.exports)),PW.exports):RW.exports=ZW()),RW.exports}function $W(){if(GW)return NW.exports;GW=1;var e,t,n,r=A.default,i=r.URL,o=I.default,a=E.default,s=D.default.Writable,l=k.default,u=function(){return YW||(YW=1,WW=function(){if(!e){try{e=XW()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),WW;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=P(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var c=!1;try{l(new i(""))}catch(e){c="ERR_INVALID_URL"===e.code}var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],p=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);p.forEach((function(e){h[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=O("ERR_INVALID_URL","Invalid URL",TypeError),g=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g),v=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=O("ERR_STREAM_WRITE_AFTER_END","write after end"),x=s.prototype.destroy||w;function _(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof g?e:new g({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",a=n[o]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,i&&s instanceof i?e=C(e):R(e)?e=C(S(e)):(a=r,r=T(e),e={protocol:o}),P(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,R(r.host)||R(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,o,"protocol mismatch"),u("options",r),new _(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function S(e){var t;if(c)t=new i(e);else if(!R((t=T(r.parse(e))).protocol))throw new f({input:e});return t}function T(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new f({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new f({input:e.href||e});return e}function C(e,t){var n=t||{};for(var r of d)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function M(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function O(e,t,n){function r(n){P(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function N(e,t){for(var n of p)e.removeListener(n,h[n]);e.on("error",w),e.destroy(t)}function R(e){return"string"==typeof e||e instanceof String}function P(e){return"function"==typeof e}return _.prototype=Object.create(s.prototype),_.prototype.abort=function(){N(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return N(this._currentRequest,e),x.call(this,e),this},_.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!R(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;P(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new v),this.abort()):n&&n()},_.prototype.end=function(e,t,n){if(P(e)?(n=e,e=t=null):P(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(i._redirectable=this,p))i.on(o,h[o]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}},_.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,o=e.headers.location;if(!o||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(N(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],M(/^content-/i,this._options.headers));var d=M(/^host$/i,this._options.headers),p=S(this._currentUrl),h=d||p.host,f=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(p,{host:h})),g=function(e,t){return c?new i(e,t):S(r.resolve(t,e))}(o,f);if(u("redirecting to",g.href),this._isRedirect=!0,C(g,this._options),(g.protocol!==p.protocol&&"https:"!==g.protocol||g.host!==h&&!function(e,t){l(R(e)&&R(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(g.host,h))&&M(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),P(a)){var v={headers:e.headers,statusCode:t},y={url:f,method:s,headers:n};a(this._options,v,y),this._sanitizeOptions(this._options)}this._performRequest()},NW.exports=b({http:o,https:a}),NW.exports.wrap=b,NW.exports}var KW,JW,eY={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function tY(){if(JW)return KW;JW=1;var e=qV,t=bW(),n=CW(),r=XV,i=I.default,o=E.default,a=$W().http,s=$W().https,l=A.default,u=P.default,c=eY,d=_W(),p=xW,h=/https:?/;function f(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,f(e,t,e.href)}}return KW=function(g){return new Promise((function(m,v){var y=function(e){m(e)},x=function(e){v(e)},_=g.data,b=g.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+c.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",g));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var w=void 0;g.auth&&(w=(g.auth.username||"")+":"+(g.auth.password||""));var S=n(g.baseURL,g.url),T=l.parse(S),C=T.protocol||"http:";if(!w&&T.auth){var M=T.auth.split(":");w=(M[0]||"")+":"+(M[1]||"")}w&&delete b.Authorization;var I=h.test(C),E=I?g.httpsAgent:g.httpAgent,A={path:r(T.path,g.params,g.paramsSerializer).replace(/^\?/,""),method:g.method.toUpperCase(),headers:b,agent:E,agents:{http:g.httpAgent,https:g.httpsAgent},auth:w};g.socketPath?A.socketPath=g.socketPath:(A.hostname=T.hostname,A.port=T.port);var D,k=g.proxy;if(!k&&!1!==k){var O=C.slice(0,-1)+"_proxy",N=process.env[O]||process.env[O.toUpperCase()];if(N){var R=l.parse(N),P=process.env.no_proxy||process.env.NO_PROXY,L=!0;if(P)L=!P.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&T.hostname.substr(T.hostname.length-e.length)===e||T.hostname===e))}));if(L&&(k={host:R.hostname,port:R.port,protocol:R.protocol},R.auth)){var B=R.auth.split(":");k.auth={username:B[0],password:B[1]}}}}k&&(A.headers.host=T.hostname+(T.port?":"+T.port:""),f(A,k,C+"//"+T.hostname+(T.port?":"+T.port:"")+A.path));var j=I&&(!k||h.test(k.protocol));g.transport?D=g.transport:0===g.maxRedirects?D=j?o:i:(g.maxRedirects&&(A.maxRedirects=g.maxRedirects),D=j?s:a),g.maxBodyLength>-1&&(A.maxBodyLength=g.maxBodyLength);var F=D.request(A,(function(n){if(!F.aborted){var r=n,i=n.req||F;if(204!==n.statusCode&&"HEAD"!==i.method&&!1!==g.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(u.createUnzip()),delete n.headers["content-encoding"]}var o={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:g,request:i};if("stream"===g.responseType)o.data=r,t(y,x,o);else{var a=[],s=0;r.on("data",(function(e){a.push(e),s+=e.length,g.maxContentLength>-1&&s>g.maxContentLength&&(r.destroy(),x(d("maxContentLength size of "+g.maxContentLength+" exceeded",g,null,i)))})),r.on("error",(function(e){F.aborted||x(p(e,g,null,i))})),r.on("end",(function(){var n=Buffer.concat(a);"arraybuffer"!==g.responseType&&(n=n.toString(g.responseEncoding),g.responseEncoding&&"utf8"!==g.responseEncoding||(n=e.stripBOM(n))),o.data=n,t(y,x,o)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(p(e,g,null,F))})),g.timeout){var z=parseInt(g.timeout,10);if(isNaN(z))return void x(d("error trying to parse `config.timeout` to int",g,"ERR_PARSE_TIMEOUT",F));F.setTimeout(z,(function(){F.abort(),x(d("timeout of "+z+"ms exceeded",g,g.transitional&&g.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}g.cancelToken&&g.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(p(e,g,null,F))})).pipe(F):F.end(_)}))}}var nY=qV,rY=function(e,t){yW.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},iY=xW,oY={"Content-Type":"application/x-www-form-urlencoded"};function aY(e,t){!nY.isUndefined(e)&&nY.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var sY,lY={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?sY=function(){if(mW)return gW;mW=1;var e=qV,t=bW(),n=wW(),r=XV,i=CW(),o=MW(),a=IW(),s=_W();return gW=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var g=l.auth.username||"",m=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(g+":"+m)}var v=i(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(sY=tY()),sY),transformRequest:[function(e,t){return rY(t,"Accept"),rY(t,"Content-Type"),nY.isFormData(e)||nY.isArrayBuffer(e)||nY.isBuffer(e)||nY.isStream(e)||nY.isFile(e)||nY.isBlob(e)?e:nY.isArrayBufferView(e)?e.buffer:nY.isURLSearchParams(e)?(aY(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):nY.isObject(e)||t&&"application/json"===t["Content-Type"]?(aY(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&nY.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw iY(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};lY.headers={common:{Accept:"application/json, text/plain, */*"}},nY.forEach(["delete","get","head"],(function(e){lY.headers[e]={}})),nY.forEach(["post","put","patch"],(function(e){lY.headers[e]=nY.merge(oY)}));var uY,cY,dY=lY,pY=qV,hY=dY;function fY(){return cY?uY:(cY=1,uY=function(e){return!(!e||!e.__CANCEL__)})}var gY=qV,mY=function(e,t,n){var r=this||hY;return pY.forEach(n,(function(n){e=n.call(r,e,t)})),e},vY=fY(),yY=dY;function xY(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var _Y=qV,bY=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return _Y.isPlainObject(e)&&_Y.isPlainObject(t)?_Y.merge(e,t):_Y.isPlainObject(t)?_Y.merge({},t):_Y.isArray(t)?t.slice():t}function l(r){_Y.isUndefined(t[r])?_Y.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}_Y.forEach(r,(function(e){_Y.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),_Y.forEach(i,l),_Y.forEach(o,(function(r){_Y.isUndefined(t[r])?_Y.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),_Y.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(i).concat(o).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return _Y.forEach(c,l),n},wY=eY,SY={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){SY[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var TY={},CY=wY.version.split(".");function MY(e,t){for(var n=t?t.split("."):CY,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}SY.transitional=function(e,t,n){var r=t&&MY(t);function i(e,t){return"[Axios v"+wY.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new Error(i(o," has been removed in "+t));return r&&!TY[o]&&(TY[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var IY,EY,AY,DY,kY,OY,NY,RY,PY={isOlderVersion:MY,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:SY},LY=qV,BY=XV,jY=vW,FY=function(e){return xY(e),e.headers=e.headers||{},e.data=mY.call(e,e.data,e.headers,e.transformRequest),e.headers=gY.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),gY.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||yY.adapter)(e).then((function(t){return xY(e),t.data=mY.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return vY(t)||(xY(e),t&&t.response&&(t.response.data=mY.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},zY=bY,UY=PY,HY=UY.validators;function VY(e){this.defaults=e,this.interceptors={request:new jY,response:new jY}}function WY(){if(EY)return IY;function e(e){this.message=e}return EY=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,IY=e}VY.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=zY(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&UY.assertOptions(t,{silentJSONParsing:HY.transitional(HY.boolean,"1.0.0"),forcedJSONParsing:HY.transitional(HY.boolean,"1.0.0"),clarifyTimeoutError:HY.transitional(HY.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var a=[FY,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),i=Promise.resolve(e);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{i=FY(s)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},VY.prototype.getUri=function(e){return e=zY(this.defaults,e),BY(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},LY.forEach(["delete","get","head","options"],(function(e){VY.prototype[e]=function(t,n){return this.request(zY(n||{},{method:e,url:t,data:(n||{}).data}))}})),LY.forEach(["post","put","patch"],(function(e){VY.prototype[e]=function(t,n,r){return this.request(zY(r||{},{method:e,url:t,data:n}))}}));var YY=qV,GY=jV,qY=VY,QY=bY;function ZY(e){var t=new qY(e),n=GY(qY.prototype.request,t);return YY.extend(n,qY.prototype,t),YY.extend(n,t),n}var XY=ZY(dY);XY.Axios=qY,XY.create=function(e){return ZY(QY(XY.defaults,e))},XY.Cancel=WY(),XY.CancelToken=function(){if(DY)return AY;DY=1;var e=WY();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},AY=t}(),XY.isCancel=fY(),XY.all=function(e){return Promise.all(e)},XY.spread=OY?kY:(OY=1,kY=function(e){return function(t){return e.apply(null,t)}}),XY.isAxiosError=RY?NY:(RY=1,NY=function(e){return"object"==typeof e&&!0===e.isAxiosError}),BV.exports=XY,BV.exports.default=XY;var $Y,KY,JY=G(BV.exports),eG="undefined"!=typeof process&&process.env?process.env:{},tG="development"===eG.NODE_ENV,nG=null!==($Y=eG.REACT_APP_API_URL)&&void 0!==$Y?$Y:tG?"http://localhost:8080/api":"/api";exports.QUERY_KEY=void 0,(KY=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",KY.fetchGraphs="fetchGraphs",KY.fetchQueries="fetchQueries",KY.fetchUniverseMetadataList="fetchUniverseMetadataList",KY.deleteUniverseMetadata="deleteUniverseMetadata",KY.updateUniverseMetadata="updateUniverseMetadata",KY.fetchUniverseListDetails="fetchUniverseListDetails",KY.fetchUniverseById="fetchUniverseById",KY.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",KY.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",KY.fetchAnomaliesPage="fetchAnomaliesPage",KY.fetchQueriesPage="fetchQueriesPage",KY.fetchQueriesStatsPage="fetchQueriesStatsPage",KY.fetchQueriesDatabases="fetchQueriesDatabases",KY.fetchCustomerMetadataList="fetchCustomerMetadataList",KY.fetchQueryStats="fetchQueryStats",KY.fetchTablesPage="fetchTablesPage",KY.fetchNamespaces="fetchNamespaces",KY.deleteRuntimeConfig="deleteRuntimeConfig",KY.fetchRuntimeConfigs="fetchRuntimeConfigs",KY.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",KY.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",KY.updateRuntimeConfig="updateRuntimeConfig",KY.fetchAnomalyGroups="fetchAnomalyGroups",KY.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",KY.fetchAnomalyGroupsById="fetchAnomalyGroupsById",KY.getUniverseMetadata="getUniverseMetadata",KY.fetchMetricsGraphs="fetchMetricsGraphs";var rG=JY.create({baseURL:nG});rG.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var i=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=i}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var iG,oG,aG,sG,lG,uG,cG,dG,pG,hG=function(){this.fetchAnomalies=function(e,t,n,r){var i=sc(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",o={};return t&&(o.startTime=t),n&&(o.endTime=n),rG.get(i,{params:o}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,i,o,a,s){void 0===r&&(r=10);var l=sc(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return i&&(u.startTime=i),o&&(u.endTime=o),a&&a!==rd&&(u.category=a),sc(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,rG.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=sc(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return o&&(p.startTime=o),a&&(p.endTime=a),sc(s)&&(p.query=s),l&&l!==rd&&(p.dbName=l),p.sortBy=lc(u)?"dbName":u,p.direction=lc(c)?"DESC":c,p.offset=n*i,p.needTotalCount=!0,p.limit=i,rG.get(d,{params:p})},this.fetchQueriesStatsPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=t.queryType,p=t.groupByOperation,h=sc(r)?"".concat(r,"/universe/").concat(e,"/queries/stats/page"):"/universe/".concat(e,"/queries/stats/page"),f={};return d&&(f.queryType=d),o&&(f.startTime=o),a&&(f.endTime=a),sc(s)&&(f.query=s),l&&l!==rd&&(f.namespaceName=l),p&&p===exports.WaitEventClassification.WAIT_EVENT&&(f.groupEventsBy=Hc.waitEvent),f.sortBy=lc(u)?"eps":u,f.direction=lc(c)?"DESC":c,f.offset=n*i,f.needTotalCount=!0,f.limit=i,f.excludeTpUser=!0,rG.get(h,{params:f})},this.fetchNamespaceSchemas=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return rG.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},i=t.startTime,o=t.endTime,a=t.queryId,s=t.dbId;i&&(r.startTime=i),o&&(r.endTime=o),a&&(r.queryId=a),s&&(r.dbId=s);var l=sc(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return rG.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=sc(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return o&&(h.startTime=o),a&&(h.endTime=a),sc(s)&&(h.tableName=s),l&&l!==rd&&(h.namespaceName=l),u&&u!==rd&&(h.schemaName=u),h.sortBy=lc(c)?"namespaceName":c,h.direction=lc(d)?"DESC":d,h.offset=n*i,h.needTotalCount=!0,h.limit=i,rG.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return rG.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return rG.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return rG.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs");return rG.post(r,t).then((function(e){return e.data}))},this.fetchQueries=function(e,t,n){var r={};ac(n)&&(r.db_id=null==n?void 0:n.dbId,r.query_id=null==n?void 0:n.queryId,r.user_id=null==n?void 0:n.userId);var i=sc(t)?"".concat(t,"/universe/").concat(e,"/queries"):"/universe/".concat(e,"/queries");return rG.get(i,{params:r}).then((function(e){return e.data}))},this.fetchCustomerMetadataList=function(e){var t=sc(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return rG.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=sc(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return rG.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=sc(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return rG.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=sc(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return rG.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=sc(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",i={customer_uuid:t,universe_uuid:n};return rG.get(r,{params:i}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return rG.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return rG.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return rG.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},i=sc(e)?"".concat(e,"/universe/details"):"/universe/details";return rG.get(i,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return rG.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return rG.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return rG.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=sc(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return rG.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=sc(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return rG.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var i=sc(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return rG.put(i,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=sc(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return rG.delete(r).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,i){void 0===i&&(i="");var o=new URLSearchParams;if(t&&o.append("startTime",t),n&&o.append("endTime",n),null===t&&null===n)return{};sc(i)&&o.append("anomalyType",i);var a=sc(r)?"".concat(r,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(o.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(o.toString());return rG.get(a).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,i){var o=sc(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return rG.get(o).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,i){if(null===n&&null===r)return{};var o=sc(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return rG.get(o).then((function(e){return e.data}))}},fG=new hG;function gG(){return gG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gG.apply(null,arguments)}const mG=e=>T.createElement("svg",gG({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),iG||(iG=T.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),oG||(oG=T.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),aG||(aG=T.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),sG||(sG=T.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),lG||(lG=T.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),uG||(uG=T.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),cG||(cG=T.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),dG||(dG=T.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),pG||(pG=T.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var vG,yG="data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",xG="data:image/svg+xml,%3csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.146447 0.146447C0.320013 -0.0271197 0.589437 -0.0464048 0.784305 0.0885913L0.853553 0.146447L4.6465 3.93939C4.82005 4.1129 5.08941 4.13218 5.28422 3.99727L5.35345 3.93945L9.14645 0.146448C9.34171 -0.0488139 9.65829 -0.0488138 9.85355 0.146448C10.0271 0.320015 10.0464 0.589439 9.91141 0.784307L9.85355 0.853555L6.0605 4.64661C5.51136 5.19558 4.64252 5.22989 4.05337 4.7495L3.93945 4.64655L0.146446 0.853553C-0.0488156 0.658291 -0.0488156 0.341709 0.146447 0.146447Z' fill='%236D7C88'/%3e%3c/svg%3e",_G="data:image/svg+xml,%3csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.85355 5.85355C9.67999 6.02712 9.41056 6.0464 9.21569 5.91141L9.14645 5.85355L5.3535 2.06061C5.17994 1.8871 4.91059 1.86783 4.71578 2.00273L4.64655 2.06055L0.853554 5.85355C0.658292 6.04881 0.341708 6.04881 0.146446 5.85355C-0.0271206 5.67999 -0.0464048 5.41056 0.0885916 5.21569L0.146446 5.14645L3.9395 1.35339C4.48864 0.804418 5.35748 0.770107 5.94663 1.2505L6.06055 1.35345L9.85355 5.14645C10.0488 5.34171 10.0488 5.65829 9.85355 5.85355Z' fill='%236D7C88'/%3e%3c/svg%3e",bG=function(i){var o,a,s,l,u=i.queryId,c=i.metricMeasure,d=i.apiUrl,p=i.isHistoricalQueryView,h=i.universeQueryStatsData,f=i.appName,g=i.timezone,m=i.urlParams,v=i.dateTimeRange,y=i.getClusterDetails,x=i.onSelectedTimeWindow,_=rp(),b=Ki(),w=t.useState(null),S=w[0],T=w[1],C=t.useState([]),M=C[0],I=C[1],E=t.useState(!1),A=E[0],D=E[1],k=y(),O=k.universeUuid,N=k.cluster,R=k.region,P=k.zone,L=k.node,B=k.numNodes,j=k.outlierType,z=function(e,t,n){void 0===n&&(n=!1);var r=wd.WAIT_EVENT_COMPONENT;if("Class"===e?r=wd.WAIT_EVENT_CLASS:"Type"===e?r=wd.WAIT_EVENT_TYPE:"Event"===e?r=wd.WAIT_EVENT:"Query"===e?r=wd.QUERY:"Client IP"===e&&(r=wd.CLIENT_NODE_IP),n){var i=JSON.parse(JSON.stringify(M)),o=null;if(n){var a=null==i?void 0:i.filter((function(e){return e.name===(null==t?void 0:t.name)}));if(a.length>=2){var s=a.find((function(e,n){return n===a.length-1&&e.name===(null==t?void 0:t.name)}));o=s}else o=null==i?void 0:i.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}))}else o=null==i?void 0:i.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));o&&(o.groupBy=[r]),i.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?o:e})),I(i),U.mutate(i)}},U=n.useMutation({mutationKey:["fetchHistoricalQueryGraphs",O],mutationFn:function(e){return fG.fetchGraphs(O,e,d)},onSuccess:function(e){T(e)},onError:function(e){console.error("Failed to fetch Query graphs",e)}}),H=null===(s=null===(a=null===(o=null==U?void 0:U.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;t.useEffect((function(){var e,t=Rp(!0,!1,0,y(),null,F(F({},m),{type:null!==(e=m.type)&&void 0!==e?e:null}));t&&I(t),t&&U.mutate(t)}),[c,v,R,N,P,L,j,B]),t.useEffect((function(){return function(){hk("metrics-sync-group")}}),[]),t.useEffect((function(){U.isSuccess&&S&&S.length>0&&pk("metrics-sync-group")}),[U.isSuccess,S]);var V=p?u:null==u?void 0:u[0],W=null==h?void 0:h.find((function(e){return e.queryId===V})),G=null==W?void 0:W.query,q=sc(null!==(l=null==m?void 0:m.dbId)&&void 0!==l?l:"");return e.jsxs(r.Box,F({mt:3,mr:3},{children:[sc(G)&&e.jsx(r.Box,F({ml:1},{children:e.jsx(Ii,{text:G,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,containerClassName:b.codeBlockSqlView},"HistoricalQueryView-".concat(V))})),U.isLoading&&e.jsx(r.Box,F({mt:2,className:_.loadingBox},{children:e.jsx(mG,{className:Y(_.icon,_.inProgressIcon)})})),U.isError&&e.jsxs(r.Box,F({mt:4},{children:[(f===exports.AppName.YBA||f===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(H)?H:tp.QUERIES_GRAPHS_FETCH_ERROR}),f===exports.AppName.YBM&&e.jsx(za,{text:sc(H)?H:tp.QUERIES_GRAPHS_FETCH_ERROR})]})),U.isSuccess&&e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx(r.Box,F({display:"flex",flexDirection:"row",mt:1,ml:2,alignItems:"center"},{children:e.jsxs("span",F({className:_.headerTitle,onClick:function(){D(!A)}},{children:[Pd,q&&e.jsx("img",{style:{marginLeft:"8px"},src:A?_G:xG})]}))})),q&&A&&e.jsx(e.Fragment,{children:e.jsxs(r.Box,F({display:"flex",flexDirection:"row",ml:2,alignItems:"center"},{children:[e.jsx("img",{src:yG}),e.jsx("span",F({className:_.metadataName,style:{marginLeft:"8px"}},{children:null==W?void 0:W.namespaceName})),e.jsx(r.Box,F({ml:1,className:_.tag},{children:e.jsx("span",F({className:_.tagName},{children:Ld}))}))]}))})]})),e.jsx(r.Box,F({className:_.gridBox},{children:null==S?void 0:S.map((function(t,n){var i,o,a=Op(c,t,exports.GraphType.SINGLE_SUPPORTING,!0,M,!0),s=t.name;if(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.startsWith("active_session_history")){var l=t.layout.metadata,u=l.currentGroupBy,d=null===(o=l.supportedGroupBy.find((function(e){return e.label===u[0]})))||void 0===o?void 0:o.name;d&&a.groupByOperations.sort((function(e,t){return e===d?-1:t===d?1:0}))}return e.jsx(r.Box,F({id:"HistoricalQueryView-".concat(n)},{children:e.jsx(r.Box,F({mt:2,mb:1,style:{border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(LV,{metricData:t,metricKey:s,dateTimeRange:v,containerWidth:null,metricMeasure:c,operations:c===exports.MetricMeasure.OVERALL?[]:a.uniqueOperations,graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:a.groupByOperations,appName:f,timezone:g,queryData:h,onSelectAshLabel:z,isHistoricalQueryView:!0,onSelectedTimeWindow:x,showTitle:!0},"".concat(c,"-").concat(s))}))}),"HistoricalQueryView-".concat(n))}))}))]})]}))};function wG(){return wG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wG.apply(null,arguments)}const SG=e=>T.createElement("svg",wG({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),vG||(vG=T.createElement("g",{fill:"none",fillRule:"evenodd"},T.createElement("path",{d:"M0 0h24v24H0z"}),T.createElement("path",{fill:"#6D7C88",d:"M10 4a6 6 0 0 1 4.581 9.875l4.773 4.771a.5.5 0 0 1-.638.765l-.07-.057-4.771-4.773A6 6 0 1 1 10 4Zm0 1a5 5 0 1 0 0 10 5 5 0 0 0 0-10Z"}))));var TG=r.makeStyles((function(e){return{modal:{display:"flex",justifyContent:"flex-end"},paper:{width:"50vw",height:"100vh",backgroundColor:e.palette.background.paper,padding:e.spacing(2),overflowY:"auto",boxShadow:e.shadows[5],display:"flex",flexDirection:"column"},content:{flexGrow:1},footer:{paddingTop:e.spacing(2),borderTop:"1px solid #ccc",textAlign:"right"},search:{top:0,position:"sticky",padding:e.spacing(2,0),backgroundColor:e.palette.background.paper,zIndex:1},container:{border:"1px solid ".concat(e.palette.grey[200]),borderRadius:e.shape.borderRadius},itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},group:{"&:not(:first-child)":{borderTop:"1px solid ".concat(e.palette.grey[200])}},groupHeader:{height:44,padding:e.spacing(0,3),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:r.alpha(e.palette.grey[200],.25)},iconRotate:{transform:"rotate(180deg)"},item:{paddingLeft:e.spacing(2)}}})),CG=function(n){var i=n.open,o=n.selectedTabIndex,a=n.metricMeasure,s=n.onClose,l=n.onSubmit,u=n.metricResources,c=TG(),d=a===exports.MetricMeasure.OUTLIER_TABLES,p=a===exports.MetricMeasure.OUTLIER_DB,h=d||p?d?Vd[o]:Wd[o]:Hd[o],f=qd.reduce((function(e,t){return e[t.name]=t.name===h,e}),{}),g=t.useState(f),m=g[0],v=g[1],y=function(){var e=d||p?d?sessionStorage.getItem($d):sessionStorage.getItem(Kd):sessionStorage.getItem(Xd);if(e)return JSON.parse(e);var t={};return u.forEach((function(e){e.metrics.forEach((function(e){t[e]=!0}))})),t},x=t.useState(""),_=x[0],b=x[1],w=t.useState(y),S=w[0],T=w[1];t.useEffect((function(){T(y())}),[i]);var C=t.useMemo((function(){return u.map((function(e){var t=e.metrics.filter((function(e){return e.toLowerCase().includes(_.toLowerCase())}));return 0===t.length?null:F(F({},e),{metrics:t})})).filter(Boolean)}),[u,_]),M=0===C.length;return e.jsx(Ic,F({open:i,isSidePanel:!0,title:"Add and Remove Charts",onClose:s,enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},onSubmit:function(){sessionStorage.setItem(d||p?d?$d:Kd:Xd,JSON.stringify(S)),l(S),s()},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsxs(r.Box,F({className:c.itemsContainer},{children:[e.jsx(r.Box,F({className:c.search},{children:e.jsx(ro,{fullWidth:!0,placeholder:"Search",value:_,inputProps:{"data-testid":"MetricsSelectionSearch"},InputProps:{startAdornment:e.jsx(r.InputAdornment,F({position:"end"},{children:e.jsx(SG,{})}))},onChange:function(e){b(e.target.value)}})})),M?e.jsx(r.Box,F({textAlign:"center",mt:3,"data-testid":"MetricsSelectionNoResult"},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"No results returned"}))})):e.jsx(r.Box,F({className:c.container},{children:C.map((function(t){if(!t.metrics.length)return null;var n=m[t.name]||!!_;return e.jsxs(r.Box,F({className:c.group},{children:[e.jsxs(r.Box,F({className:c.groupHeader,onClick:function(){return e=t.name,void v((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center"},{children:e.jsx(r.Typography,F({variant:"body1"},{children:t.title}))})),e.jsx(L.default,{className:Y(n&&c.iconRotate)})]})),e.jsx(r.Collapse,F({in:n},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:t.metrics.map((function(n){return e.jsx(r.Box,F({className:Y(c.item)},{children:e.jsx(Ha,{name:"".concat(t.name,".").concat(n),label:Zd[n]||n,inputProps:{"data-testid":n},checked:!!S[n],onChange:function(){return e=n,void T((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}})}),n)}))}))}))]}),t.name)}))}))]}))}))}))},MG="metricsTab",IG=function(i){var o,a,s,l=i.appName,u=i.isMetricsDrawerOpen,c=i.apiUrl,d=i.timezone,p=i.metricMeasure,h=i.dateTimeRange,f=i.filterTrigger,g=i.urlParams,m=i.getClusterDetails,v=i.onSelectedTimeWindow,y=i.handleFilterMetrics,x=i.closeSelectionModal,_=rp(),b=t.useState(null),w=b[0],S=b[1],T=t.useState(0),C=T[0],M=T[1],I=t.useState(!1),E=I[0],A=I[1],D=m(),k=D.universeUuid,O=D.cluster,N=D.region,R=D.zone,P=D.node,L=D.numNodes,B=D.outlierType;t.useEffect((function(){var e=p===exports.MetricMeasure.OUTLIER_TABLES,t=p===exports.MetricMeasure.OUTLIER_DB,n=e?Vd:Hd;if(e||t)M(0),A(!0);else if(p)if(l!==exports.AppName.YBA){var r=window.location.pathname.split("/"),i=r[r.length-1];if(i===td.METRICS){var o=n[0];return window.history.replaceState(null,"","".concat(window.location.pathname,"/").concat(o)),M(0),void A(!0)}if(-1!==(c=n.indexOf(i)))M(c),A(!0);else{o=n[0];var a=r.slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(o)),M(0),A(!0)}}else{a=window.location.pathname;var s=new URLSearchParams(window.location.search),u=(o=n[0],s.get(MG)),c=n.indexOf(u);s.set(MG,null!=u?u:o),window.history.replaceState(null,"","".concat(a,"?").concat(s.toString())),M(null!=c?c:0),A(!0)}}),[p]);var j=n.useMutation({mutationKey:[exports.QUERY_KEY.fetchMetricsGraphs,k],mutationFn:function(e){return fG.fetchGraphs(k,e,c)},onSuccess:function(e){S(e)},onError:function(e){console.error("Failed to fetch metrics",e)}}),z=null===(s=null===(a=null===(o=null==j?void 0:j.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;return t.useEffect((function(){var e;if(E){var t=Rp(!1,!0,C,m(),null,F(F({},g),{type:null!==(e=g.type)&&void 0!==e?e:null}));t&&j.mutate(t)}}),[p,h,C,N,E,O,R,P,B,L,f]),t.useEffect((function(){return function(){hk("metrics-sync-group")}}),[]),t.useEffect((function(){j.isSuccess&&w&&w.length>0&&pk("metrics-sync-group")}),[j.isSuccess,w]),e.jsxs(r.Box,F({mt:2,mb:2,mr:2,className:_.metricsBox},{children:[e.jsxs(r.Tabs,F({defaultValue:0,value:C,onChange:function(e,t){if(t!==C){var n=p===exports.MetricMeasure.OUTLIER_TABLES,r=p===exports.MetricMeasure.OUTLIER_DB,i=(n||r?n?Vd:Wd:Hd)[t],o=window.location.pathname;if(l!==exports.AppName.YBA){var a=o.split("/").slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(i))}else{var s=new URLSearchParams(window.location.search);s.set(MG,i),window.history.replaceState(null,"","".concat(o,"?").concat(s.toString()))}M(t)}},"aria-label":"metric tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:[(p===exports.MetricMeasure.OVERALL||p===exports.MetricMeasure.OUTLIER)&&Hd.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==qd?void 0:qd.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(_.cuaseTabButton),wrapper:_.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_TABLES&&Vd.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Yd?void 0:Yd.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(_.cuaseTabButton),wrapper:_.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_DB&&Wd.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Gd?void 0:Gd.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(_.cuaseTabButton),wrapper:_.causeTabLabelWrapper}},t)}))]})),j.isLoading&&e.jsx(r.Box,F({mt:2,className:_.loadingBox},{children:e.jsx(mG,{className:Y(_.icon,_.inProgressIcon)})})),j.isError&&e.jsxs(r.Box,F({mt:4},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(z)?z:tp.METRICS_GRAPHS_FETCH_ERROR}),l===exports.AppName.YBM&&e.jsx(za,{text:sc(z)?z:tp.METRICS_GRAPHS_FETCH_ERROR})]})),j.isSuccess&&e.jsx(r.Box,F({className:_.gridBox},{children:null==w?void 0:w.map((function(t,n){if(sc(null==t?void 0:t.errorMessage))return e.jsx(r.Box,{});var i=Op(p,t,exports.GraphType.MULTI_SUPPORTING,!0,[],!0);return e.jsx(r.Box,F({style:{marginTop:"16px",marginRight:"16px",border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(r.Box,{children:e.jsx(LV,{metricData:t,metricKey:t.name,containerWidth:null,metricMeasure:p,operations:p===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,graphType:exports.GraphType.MULTI_SUPPORTING,dateTimeRange:h,groupByOperations:i.groupByOperations,appName:l,timezone:d,isHistoricalQueryView:!1,onSelectedTimeWindow:v,showTitle:!0},"".concat(t.name,"-").concat(p))},"TopKMetricsView-".concat(n))}))}))})),u&&e.jsx(CG,{onSubmit:y,metricResources:p===exports.MetricMeasure.OUTLIER_TABLES||p===exports.MetricMeasure.OUTLIER_DB?p===exports.MetricMeasure.OUTLIER_TABLES?Yd:Gd:qd,open:u,onClose:x,selectedTabIndex:C,metricMeasure:p})]}))},EG=function(n){var i=n.sourceData,o=n.expandAll,a=void 0!==o&&o,s=n.showMoreOptions,l=void 0!==s&&s,u=n.onClickShowMoreAnomalies,c=n.onSelectedIssue,d=n.startTime,p=n.name,h=n.endTime,f=n.appName,g=n.showMultiline,m=void 0===g||g,v=n.isInsightsTab,y=void 0!==v&&v,_=n.viewAllAnomalies,b=void 0!==_&&_,w=f===exports.AppName.YBM?27:35,S=t.useState({}),T=S[0],C=S[1],M=t.useState({}),I=M[0],E=M[1],A=t.useRef(null),D=t.useRef(null);t.useEffect((function(){if(i){if(l){var e=function(e){for(var t,n={},r=0,i=Object.entries(e.groups);r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=Object.keys(s);for(var l=function(e,r){n[e]=(null===(t=r.groups)||void 0===t?void 0:t.map((function(t,n){return"".concat(e,"_").concat(n)})))||[]},u=0,c=Object.entries(s);u<c.length;u++){var d=c[u];l(d[0],d[1])}}return n}(i),t=function(e){for(var t={},n=0,r=Object.entries(e.groups);n<r.length;n++){var i=r[n],o=i[0],a=i[1];t[o]=!1;for(var s=0,l=Object.keys(a);s<l.length;s++)t[l[s]]=!1}return t}(i);E(e),C(t)}else E({}),C({})}}),[i]),t.useEffect((function(){C((function(e){var t=F({},e);return Object.keys(t).forEach((function(e){t[e]=a})),t}))}),[a]);var k=function(e){var t,n=0;for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))n+=null===(t=e[r])||void 0===t?void 0:t.totalCount}return n},O=function(e){for(var t=0,n=Object.entries(I);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return O(i)}return e};function N(){var e,t,n,r,i,o;document.querySelectorAll(".custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-top, .custom-group-separator-bottom").forEach((function(e){return e.remove()}));var a=Array.from(document.querySelectorAll(".vis-labelset .vis-label.custom-group-row-1"));a.forEach((function(e,t){var n,r=function(e){var t=e.nextElementSibling;for(;t&&!t.classList.contains("custom-group-row-1");)t=t.nextElementSibling;return t}(e);if(r){var i=document.createElement("div");i.className="custom-group-separator-left",null===(n=e.parentNode)||void 0===n||n.insertBefore(i,r)}var o=document.querySelector(".vis-foreground");if(o&&null!==e.offsetTop&&t>0){var a=document.createElement("div");a.className="custom-group-separator-right",a.style.top="".concat(e.offsetTop,"px"),a.style.position="absolute",o.appendChild(a)}}));var s=a[0];if(!(null===(e=s.previousElementSibling)||void 0===e?void 0:e.classList.contains("custom-group-separator-top"))){var l=document.createElement("div");l.className="custom-group-separator-top",null===(t=s.parentNode)||void 0===t||t.insertBefore(l,s)}var u=a[a.length-1],c=function(e){var t=e.nextElementSibling;for(;t&&(t.classList.contains("custom-group-row-2")||t.classList.contains("custom-group-row-3"));)t=t.nextElementSibling;return t}(u);if(!(null===(n=null==c?void 0:c.previousElementSibling)||void 0===n?void 0:n.classList.contains("custom-group-separator-bottom"))&&!(null===(r=u.nextElementSibling)||void 0===r?void 0:r.classList.contains("custom-group-separator-bottom"))){var d=document.createElement("div");d.className="custom-group-separator-bottom",c?null===(i=u.parentNode)||void 0===i||i.insertBefore(d,c):null===(o=u.parentNode)||void 0===o||o.appendChild(d)}}return t.useEffect((function(){if((Object.keys(T).length>0||oc(i))&&A.current){var e=l?function(e){for(var t=[],n=[],r=0,i=function(e,i){t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:k(i)});for(var o=function(i,o){var a="".concat(i),s=o.title;t.push({categoryLevel:2,id:a,content:o.totalCount>=1?"&#xff0b;&nbsp;&nbsp;&nbsp;".concat(s):"&#x2212;&nbsp;&nbsp;&nbsp;".concat(s),parent:e,name:s,categoryCount:o.totalCount});var u=[];if(o.groups.forEach((function(e,i){var o,s,l="".concat(a,"_").concat(i),c=(null===(o=e.lastInstance)||void 0===o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:l,name:c,content:c,parent:a,uuid:null===(s=null==e?void 0:e.lastInstance)||void 0===s?void 0:s.uuid,categoryLevel:3}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:l})})),u.push.apply(u,e.anomalyIntervals)})),o.hasMore&&l){var c="".concat(a,"_").concat(Ed),d=Ed;t.push({id:c,name:d,content:Ad,parent:a,categoryLevel:3,grandParent:e,categoryCount:o.totalCount-3}),n.push({id:"anomaly-".concat(a,"-").concat(Ed),content:"anomaly-".concat(a,"-").concat(Ed),start:"",end:"",group:a})}Lp(u).forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))},a=0,s=Object.entries(i);a<s.length;a++){var u=s[a];o(u[0],u[1])}var c=Object.values(i).flatMap((function(e){return e.groups.flatMap((function(e){return e.anomalyIntervals}))}));Lp(c).forEach((function(t){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:t.startTime,end:t.endTime,group:e})}))},o=0,a=Object.entries(null==e?void 0:e.groups);o<a.length;o++){var s=a[o];i(s[0],s[1])}return{groups:t,items:n}}(i):function(e){var t=[],n=[],r=0;return null==e||e.forEach((function(e,i){var o=e.lastInstance,a="group-".concat(i),s=(null==o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:a,content:s,name:s,uuid:null==o?void 0:o.uuid,categoryLevel:1}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))})),{groups:t,items:n}}(i),t=e.items,n=e.groups,r={items:t,groups:n},o=n;if(l){var a=n.map((function(e){var t,n,r=(null===(t=I[e.id])||void 0===t?void 0:t.length)>0,i=null!==(n=T[e.id])&&void 0!==n&&n,o=r?i?"&#x2212;":"&#xff0b;":"",a=void 0!==(null==e?void 0:e.categoryCount)&&e.categoryCount>=0,s="",l=O(e.id);3===e.categoryLevel&&e.name===Ed&&(l=e.grandParent),1===e.categoryLevel?s="font-family: Inter;font-size: 13px; font-weight: 400 !important;":2===e.categoryLevel?s="font-family: Inter;font-size: 11.5px; font-weight: 600 !important;":3===e.categoryLevel&&(s="font-family: Inter;font-size: 11px; font-weight: 400 !important;");var u=0;2===e.categoryLevel?u=40:3===e.categoryLevel&&(u=44);var c="margin-left: ".concat(u,"px;"),d=r||3!==e.categoryLevel?"":"border-left: 2px solid #E9EEF2; height: 100%;",p="".concat(c).concat(d).concat("color: #0B1117 !important;").concat(s),h="",f="";if(l)switch(l){case exports.AnomalyCategory.DB:h="db-background",f="Database";break;case exports.AnomalyCategory.NODE:h="node-background",f="Node";break;case exports.AnomalyCategory.SQL:h="sql-background",f="SQL";break;case exports.AnomalyCategory.APP:h="app-background",f="Application";break;case exports.AnomalyCategory.INFRA:h="infra-background",f="Infrastructure"}var g="";1===e.categoryLevel?g="custom-group-row-1":2===e.categoryLevel?g="custom-group-row-2":3===e.categoryLevel&&(g="custom-group-row-3");var m=e.content.replace(/&nbsp;/g,"").length>w?"".concat(e.content.substring(0,w),"..."):e.content;return F(F({},e),{content:r?'<a title="'.concat(e.name,'">').concat(o,"&nbsp;&nbsp;&nbsp;").concat((null==e?void 0:e.name)&&e.name.length>w?1===e.categoryLevel?f:"".concat(e.name.substring(0,w),"..."):1===e.categoryLevel?f:e.name,"</a>").concat(1!==e.categoryLevel&&2!==e.categoryLevel||i?"":"<span>".concat(e.categoryCount,"</span>")):'<a title="'.concat(e.content,'">').concat(o).concat(m,"</a>").concat(a?"<span>".concat(3===e.categoryCount?"&#xff0b;":"").concat(e.categoryCount,"</span>"):""),className:[g,h].filter(Boolean).join(" "),style:p,visible:!e.parent||T[e.parent]})})),s=a.filter((function(e){return e.visible}));Object.entries(I).forEach((function(e){var t=e[0];e[1].forEach((function(e){var n=a.find((function(t){return t.id===e}));n&&(n.visible=T[t])}))}));var g=t.filter((function(e){var t,n=a.find((function(t){return t.id===e.group}));if(n&&n.visible){var r=(null===(t=I[n.id])||void 0===t?void 0:t.length)>0,i=T[n.id];return!r||!i}return!1}));r={items:S=g.map((function(e){var t=a.find((function(t){return t.id===e.group})),n=t?O(t.id):null,r="#CCCCCC";if(n)switch(n){case exports.AnomalyCategory.DB:r=ep[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=ep[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=ep[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=ep[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=ep[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px;")})})),groups:s}}else{var v="custom-group-row",_=n.map((function(e){return F(F({},e),{content:m?'<a title="'.concat(e.content,'"> ').concat(e.content.length>w?"".concat(e.content.substring(0,w),"..."):e.content,"</a>"):"",style:"font-family: Inter; margin-left: 12px; font-size: 13px; font-weight: 400; border-bottom: 1px solid #D7DEE4",className:[v].filter(Boolean).join(" ")})})),S=t.map((function(e){var t,n,r="#CCCCCC",o=null===(n=null===(t=null==i?void 0:i[0])||void 0===t?void 0:t.lastInstance)||void 0===n?void 0:n.category;if(o)switch(o){case exports.AnomalyCategory.DB:r=ep[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=ep[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=ep[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=ep[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=ep[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px")})}));r={items:S,groups:_}}if(D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current.setOptions(M),D.current.setItems(r.items),D.current.setGroups(r.groups),l&&!y&&N()}else{var M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,r.items,r.groups,M)}D.current.on("changed",(function(){if(b){document.querySelectorAll(".vis-label.custom-group-row .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")}))}else{document.querySelectorAll(".vis-label.custom-group-row-1 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-1")})),document.querySelectorAll(".vis-label.custom-group-row-2 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-2")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-3")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")})),document.querySelectorAll(".vis-label.db-background .vis-inner span").forEach((function(e){return e.classList.add("db-inner-background")})),document.querySelectorAll(".vis-label.node-background .vis-inner span").forEach((function(e){return e.classList.add("node-inner-background")})),document.querySelectorAll(".vis-label.sql-background .vis-inner span").forEach((function(e){return e.classList.add("sql-inner-background")})),document.querySelectorAll(".vis-label.app-background .vis-inner span").forEach((function(e){return e.classList.add("app-inner-background")})),document.querySelectorAll(".vis-label.infra-background .vis-inner span").forEach((function(e){return e.classList.add("infra-inner-background")})),l&&!y&&N();var e=document.querySelector(".vis-panel.vis-center");if(e){var t=p===Qd?"my-custom-center-panel-rca":"my-custom-center-panel";e.classList.add(t)}var n=document.querySelector(".vis-labelset");if(n){t=p===Qd?"my-custom-labelset-rca":"my-custom-labelset";n.classList.add(t)}}})),null==D||D.current.on("click",(function(e){var t=window.scrollY;setTimeout((function(){return window.scrollTo(0,t)}),0);var n,r,i,a=e.group,s="",l=null;a&&(l=o.find((function(e){return e.id===a})))&&"string"==typeof l.content&&(s=l.id),(null==l?void 0:l.uuid)&&(f===exports.AppName.YBM?(n=l.uuid,r=new URLSearchParams(window.location.search),(i={}).duration=r.get("duration"),i.startTime=r.get("startTime"),i.endTime=r.get("endTime"),null==c||c(n,i)):f!==exports.AppName.WEB&&f!==exports.AppName.YBA||function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search),r=n.toString();f===exports.AppName.YBA&&n.set("anomalyUuid",e);var i="".concat(t,"/").concat(e).concat(r?"?".concat(r):"");window.open(i,"_blank")}(l.uuid)),(null==l?void 0:l.name)===Ed&&(null==u||u(l.parent)),s&&function(e){C((function(t){var n=F({},t),r=!n[e];if(n[e]=r,!r){var i=function(e){Object.keys(n).forEach((function(t){var r;(null===(r=I[e])||void 0===r?void 0:r.includes(t))&&(n[t]=!1,i(t))}))};i(e)}return n}))}(s)}))}else if(ic(i)&&A.current&&!D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,[],[],M),D.current.setOptions(M),D.current.setItems([]),D.current.setGroups([])}return function(){D.current&&(D.current.destroy(),D.current=null)}}),[T,i]),e.jsxs(r.Box,F({id:p},{children:[e.jsx("div",{ref:A,style:{backgroundColor:"#FFFFFF"}},p),e.jsx("style",{children:"\n .vis-foreground .vis-group {\n border-bottom: none;\n }\n .vis-foreground .vis-group.custom-group-row-1 {\n top: 8px;\n }\n .vis-foreground .vis-group.parent-category {\n border-top: 1px solid #E0E0E0 !important; /* Or whatever you want */\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n }\n .vis-panel.vis-top {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-bottom {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-left {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-inner a {\n cursor: pointer;\n letter-spacing: 0.3px;\n text-decoration: none !important;\n outline: none !important;\n color: unset !important;\n &:focus {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n &:hover {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n }\n .vis-labelset .vis-label .vis-inner {\n padding: 0px;\n }\n .vis-inner span {\n padding: 2px 6px 2px 6px;\n height: 20px;\n width: fit-content;\n font-size: 11.5px;\n line-height: 16px;\n font-family: Inter;\n font-weight: 500;\n border-radius: 4px;\n }\n .vis-item.vis-range .vis-item-content {\n display: none;\n }\n .vis-item.vis-range {\n top: 10px !important;\n border-style: unset;\n border-radius: 8px;\n }\n .vis-labelset.my-custom-labelset-rca {\n width: 0px;\n }\n .vis-labelset {\n width: 250px;\n }\n .vis-inner {\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n }\n .vis-time-axis .vis-grid.vis-vertical {\n border-left: 1px dashed !important;\n color: #D7DEE4;\n }\n .vis-panel.vis-center {\n border-left-style: dashed !important;\n border-right-style: dashed !important;\n border-top-color: #D7DEE4;\n top: 1px !important;\n margin-left: 8px;\n left: 254px !important;\n }\n .vis-panel.vis-center.my-custom-center-panel-rca {\n left: 0px !important;\n }\n .vis-time-axis .vis-grid.vis-major {\n border-color: #e5e5e5 !important;\n }\n .custom-group-separator-left {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n margin-top: 2px;\n }\n .custom-group-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n }\n .custom-group-separator-bottom {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .custom-group-separator-top {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .item-separator {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n margin-top: 2px;\n }\n .item-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n }\n .vis-label.custom-group-row-1 .vis-inner {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .vis-label.custom-group-row-2 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row-3 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-foreground .vis-group.custom-group-row {\n border-bottom: 1px solid #D7DEE4;\n bottom: 3px;\n }\n .vis-label.custom-group-row .vis-inner .category-deeplink {\n text-decoration: underline !important;\n }\n .vis-label.custom-group-row-2 .vis-inner .category-badge-2 {\n margin-right: 40px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-badge-3 {\n margin-right: 44px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-deeplink {\n margin-left: 24px;\n text-decoration: underline !important;\n }\n .vis-label.db-background .vis-inner .db-inner-background {\n background-color: #E8E9FE !important;\n color: #30307F !important;\n }\n .vis-label.node-background .vis-inner .node-inner-background {\n background-color: #FFEEC8 !important;\n color: #9D6C00 !important;\n }\n .vis-label.sql-background .vis-inner .sql-inner-background {\n background-color: rgba(187, 66, 188, 0.15) !important;\n color: #7D2777 !important;\n }\n .vis-label.app-background .vis-inner .app-inner-background {\n background-color: #D7EFF4 !important;\n color: #2B59C3 !important;\n }\n .vis-label.infra-background .vis-inner .infra-inner-background {\n background-color: #c1ccec !important;\n color: #507ce1 !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n "})]}),p)},AG="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e",DG=function(i){var o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,T,C,M,I,E,A,D,k,O,N,R,P,L,B,j,z,U,H,V,W=i.metricMeasure,G=i.appName,q=i.timezone,Q=i.universeQueryData,Z=i.universeData,X=i.filterDuration,$=i.amomalyGraphRequestParams,K=i.formattedAnomalyRca,J=i.anomalyData,ee=i.gantChartData,te=i.dateTimeRange,ne=i.urlParams,re=i.apiUrl,ie=i.getClusterDetails,oe=i.onSelectedTimeWindow,ae=i.onSelectedIssue,se=rp(),le=t.useState(!1),ue=le[0],ce=le[1],de=t.useState(0),pe=de[0],he=de[1],fe=t.useState(J),ge=fe[0],me=fe[1],ve=t.useState(null),ye=ve[0],xe=ve[1],_e=t.useState($),be=_e[0],we=_e[1],Se=ie(),Te=Se.universeUuid,Ce=Se.cluster,Me=Se.region,Ie=Se.zone,Ee=Se.node,Ae=Se.numNodes,De=Se.outlierType,ke=OV(W);OV(te),OV(X);var Oe=function(){ce(!ue)},Ne=function(e,t,n){var r,i,o=wd.WAIT_EVENT_COMPONENT;if("Class"===e?o=wd.WAIT_EVENT_CLASS:"Type"===e?o=wd.WAIT_EVENT_TYPE:"Event"===e?o=wd.WAIT_EVENT:"Query"===e?o=wd.QUERY:"Client IP"===e&&(o=wd.CLIENT_NODE_IP),(null===(r=null==J?void 0:J.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==J?void 0:J.lastInstance)||void 0===i?void 0:i.category)!==exports.AnomalyCategory.DB){var a=JSON.parse(JSON.stringify(be)),s=null==a?void 0:a.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));s&&(s.groupBy=[o]),a.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?s:e})),we(a),Re.mutate(a)}};t.useEffect((function(){me(J)}),[J]),t.useEffect((function(){var e;ke&&ke!==W&&xe(null);var t=JSON.parse(JSON.stringify(be)),n=ie(),r=Rp(!1,!1,0,n,t,F(F({},ne),{type:null!==(e=ne.type)&&void 0!==e?e:null})),i=null!=r?r:be;we(i),Re.mutate(i)}),[W,te,Me,Ce,Ie,Ee,De,Ae]);var Re=n.useMutation({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return fG.fetchGraphs(Te,e,re)},onSuccess:function(e){xe(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),Pe=null===(s=null===(a=null===(o=null==Re?void 0:Re.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,Le=function(t,n,i,o,a){return e.jsx(r.Box,F({mt:3,mr:8},{children:e.jsx(LV,{metricData:t,metricKey:t.name,graphTitle:a,containerWidth:null,dateTimeRange:te,metricMeasure:W,operations:n,groupByOperations:i,appName:G,graphType:o,timezone:q,queryData:Q,onSelectAshLabel:Ne,onSelectedTimeWindow:oe},"".concat(W,"-").concat(t.name))}))},Be=null==K?void 0:K.filter((function(e){var t;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)>0})),je=null===(l=null==J?void 0:J.lastInstance)||void 0===l?void 0:l.entityDisplayName,Fe=((null===(u=null==J?void 0:J.lastInstance)||void 0===u?void 0:u.category)===exports.AnomalyCategory.NODE||(null===(c=null==J?void 0:J.lastInstance)||void 0===c?void 0:c.category)===exports.AnomalyCategory.APP)&&(null===(f=null===(h=null===(p=null===(d=null==Z?void 0:Z.universeDetails)||void 0===d?void 0:d.nodeDetailsSet)||void 0===p?void 0:p.find((function(e){return e.nodeName===je})))||void 0===h?void 0:h.cloudInfo)||void 0===f?void 0:f.region),ze=((null===(g=null==J?void 0:J.lastInstance)||void 0===g?void 0:g.category)===exports.AnomalyCategory.NODE||(null===(m=null==J?void 0:J.lastInstance)||void 0===m?void 0:m.category)===exports.AnomalyCategory.APP)&&(null===(_=null===(x=null===(y=null===(v=null==Z?void 0:Z.universeDetails)||void 0===v?void 0:v.nodeDetailsSet)||void 0===y?void 0:y.find((function(e){return e.nodeName===je})))||void 0===x?void 0:x.cloudInfo)||void 0===_?void 0:_.az);return t.useEffect((function(){return function(){hk("metrics-sync-group")}}),[]),t.useEffect((function(){Re.isSuccess&&ye&&ye.length>0&&pk("metrics-sync-group")}),[Re.isSuccess,ye]),e.jsx(r.Box,F({mt:4},{children:e.jsx(Nc,{bodyClassName:se.panelItemBody,body:e.jsxs(e.Fragment,{children:[Re.isLoading&&e.jsx(r.Box,F({mt:2,className:se.loadingBox},{children:e.jsx(mG,{className:Y(se.icon,se.inProgressIcon)})})),Re.isError&&e.jsxs(r.Box,F({mt:4},{children:[(G===exports.AppName.YBA||G===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(Pe)?Pe:tp.RCA_GRAPHS_FETCH_ERROR}),G===exports.AppName.YBM&&e.jsx(za,{text:sc(Pe)?Pe:tp.RCA_GRAPHS_FETCH_ERROR})]})),Re.isSuccess&&e.jsxs(r.Box,{children:[oc(ye)&&oc(null===(b=null==J?void 0:J.lastInstance)||void 0===b?void 0:b.mainGraphs)&&(null===(w=null==J?void 0:J.lastInstance)||void 0===w?void 0:w.mainGraphs.map((function(t,n){var i,o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,T,C,M,I,E,A,D,k,O,N,R,P,L,B,j,z,U,H,V,G=null==ye?void 0:ye.find((function(e){return e.name===t.name})),q="HOT_TABLET"===(null===(i=null==J?void 0:J.lastInstance)||void 0===i?void 0:i.type)||"LARGE_TABLET"===(null===(o=null==J?void 0:J.lastInstance)||void 0===o?void 0:o.type),Q=t.groupByControl,Z=W===exports.MetricMeasure.OVERALL?{uniqueOperations:[],groupByOperations:[]}:Op(W,G,exports.GraphType.MAIN_RCA,Q,$);return e.jsxs(r.Box,F({className:se.mainGraphBox},{children:[e.jsxs(r.Box,F({className:se.mainGraphMetadataBox},{children:[e.jsxs(r.Box,F({className:se.anomalyMetadataOneBox},{children:[e.jsx("span",F({className:se.headerTitle},{children:Fd})),e.jsx("span",F({className:se.metadataDetails},{children:null===(a=null==J?void 0:J.lastInstance)||void 0===a?void 0:a.title})),e.jsx("span",F({className:Y(se.metadataSummary,(null===(s=null==J?void 0:J.lastInstance)||void 0===s?void 0:s.category)===exports.AnomalyCategory.SQL&&se.restrictLines)},{children:null===(l=null==J?void 0:J.lastInstance)||void 0===l?void 0:l.summary}))]})),e.jsxs(r.Box,F({className:se.anomalyMetadataTwoBox},{children:[e.jsxs("span",F({className:se.headerTitle,onClick:Oe},{children:[null===(c=Rd[null===(u=null==J?void 0:J.lastInstance)||void 0===u?void 0:u.type])||void 0===c?void 0:c.title,ac(null===(p=Rd[null===(d=null==J?void 0:J.lastInstance)||void 0===d?void 0:d.type])||void 0===p?void 0:p.data)&&e.jsx("img",{style:{marginLeft:"8px"},src:ue?_G:xG})]})),e.jsxs("span",F({className:se.metadataDetails},{children:[(null===(f=null===(h=null==J?void 0:J.lastInstance)||void 0===h?void 0:h.entityDisplayName)||void 0===f?void 0:f.length)>30?"".concat(null==je?void 0:je.substring(0,30),"..."):null===(g=null==J?void 0:J.lastInstance)||void 0===g?void 0:g.entityDisplayName,(null===(v=null===(m=null==J?void 0:J.lastInstance)||void 0===m?void 0:m.entityDisplayName)||void 0===v?void 0:v.length)>30&&e.jsx(r.Tooltip,F({title:je,className:je&&(null==je?void 0:je.length)>100?Y(se.tooltip):void 0,style:{marginLeft:"8px"},arrow:!0,placement:"top",interactive:!0},{children:e.jsx("img",{src:AG,alt:"info"})}))]})),ue&&ac(Rd[null===(y=null==J?void 0:J.lastInstance)||void 0===y?void 0:y.type].data)&&e.jsxs(e.Fragment,{children:[e.jsxs(r.Box,F({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e.jsx("img",{src:yG}),e.jsxs("span",F({className:se.metadataName,style:{marginLeft:"8px"}},{children:[(null===(x=null==J?void 0:J.lastInstance)||void 0===x?void 0:x.category)===exports.AnomalyCategory.DB&&(null===(S=null===(w=null===(b=null===(_=null==J?void 0:J.lastInstance)||void 0===_?void 0:_.mainGraphs)||void 0===b?void 0:b[0].filters)||void 0===w?void 0:w.dbName)||void 0===S?void 0:S[0]),((null===(T=null==J?void 0:J.lastInstance)||void 0===T?void 0:T.category)===exports.AnomalyCategory.NODE||(null===(C=null==J?void 0:J.lastInstance)||void 0===C?void 0:C.category)===exports.AnomalyCategory.APP)&&Fe]})),e.jsx(r.Box,F({ml:1,className:se.tag},{children:e.jsxs("span",F({className:se.tagName},{children:[(null===(M=null==J?void 0:J.lastInstance)||void 0===M?void 0:M.category)===exports.AnomalyCategory.DB&&Ld,((null===(I=null==J?void 0:J.lastInstance)||void 0===I?void 0:I.category)===exports.AnomalyCategory.NODE||(null===(E=null==J?void 0:J.lastInstance)||void 0===E?void 0:E.category)===exports.AnomalyCategory.APP)&&zd]}))}))]})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row",mt:1,ml:2,alignItems:"center"},{children:[e.jsx("img",{src:yG}),e.jsxs("span",F({className:se.metadataName,style:{marginLeft:"8px"}},{children:[(null===(A=null==J?void 0:J.lastInstance)||void 0===A?void 0:A.category)===exports.AnomalyCategory.DB&&q?null===(N=null===(O=null===(k=null===(D=null==J?void 0:J.lastInstance)||void 0===D?void 0:D.mainGraphs)||void 0===k?void 0:k[0].filters)||void 0===O?void 0:O.tabletId)||void 0===N?void 0:N[0]:null===(B=null===(L=null===(P=null===(R=null==J?void 0:J.lastInstance)||void 0===R?void 0:R.mainGraphs)||void 0===P?void 0:P[0].filters)||void 0===L?void 0:L.tableName)||void 0===B?void 0:B[0],((null===(j=null==J?void 0:J.lastInstance)||void 0===j?void 0:j.category)===exports.AnomalyCategory.NODE||(null===(z=null==J?void 0:J.lastInstance)||void 0===z?void 0:z.category)===exports.AnomalyCategory.APP)&&ze]})),e.jsx(r.Box,F({ml:1,className:se.tag},{children:e.jsxs("span",F({className:se.tagName},{children:[(null===(U=null==J?void 0:J.lastInstance)||void 0===U?void 0:U.category)===exports.AnomalyCategory.DB&&(q?jd:Bd),((null===(H=null==J?void 0:J.lastInstance)||void 0===H?void 0:H.category)===exports.AnomalyCategory.NODE||(null===(V=null==J?void 0:J.lastInstance)||void 0===V?void 0:V.category)===exports.AnomalyCategory.APP)&&Ud]}))}))]}))]})]}))]})),e.jsx(r.Box,F({mt:1,className:se.graphBox},{children:Le(G,Z.uniqueOperations,Z.groupByOperations,exports.GraphType.MAIN_RCA)}))]}))}))),e.jsxs(r.Box,F({mt:2,mb:1},{children:[ee.isLoading&&e.jsx(r.Box,F({mt:2,className:se.loadingBox},{children:e.jsx(mG,{className:Y(se.icon,se.inProgressIcon)})})),ee.isError&&404!==(null===(T=null===(S=null==ee?void 0:ee.error)||void 0===S?void 0:S.response)||void 0===T?void 0:T.status)&&e.jsxs(r.Box,F({mt:2},{children:[(G===exports.AppName.WEB||G===exports.AppName.YBA)&&e.jsx(eo,{customErrorMessage:sc(null===(I=null===(M=null===(C=null==ee?void 0:ee.error)||void 0===C?void 0:C.response)||void 0===M?void 0:M.data)||void 0===I?void 0:I.error)?null===(D=null===(A=null===(E=null==ee?void 0:ee.error)||void 0===E?void 0:E.response)||void 0===A?void 0:A.data)||void 0===D?void 0:D.error:tp.GANTCHART_FETCH_ERROR}),G===exports.AppName.YBM&&e.jsx(za,{text:sc(null===(N=null===(O=null===(k=null==ee?void 0:ee.error)||void 0===k?void 0:k.response)||void 0===O?void 0:O.data)||void 0===N?void 0:N.error)?null===(L=null===(P=null===(R=null==ee?void 0:ee.error)||void 0===R?void 0:R.response)||void 0===P?void 0:P.data)||void 0===L?void 0:L.error:tp.GANTCHART_FETCH_ERROR})]})),(ee.isSuccess||ee.isError&&404===(null===(j=null===(B=null==ee?void 0:ee.error)||void 0===B?void 0:B.response)||void 0===j?void 0:j.status))&&(ac(ge)?e.jsx(r.Box,F({className:se.rcaGantChartBox},{children:e.jsx(EG,{sourceData:ee.isError&&404===(null===(U=null===(z=null==ee?void 0:ee.error)||void 0===z?void 0:z.response)||void 0===U?void 0:U.status)?[]:[ge],name:Qd,showMoreOptions:!1,expandAll:!0,startTime:null===(H=null==te?void 0:te.startDateTime)||void 0===H?void 0:H.toISOString(),endTime:null===(V=null==te?void 0:te.endDateTime)||void 0===V?void 0:V.toISOString(),onSelectedIssue:ae,appName:G,showMultiline:!1},Qd)})):e.jsxs(r.Box,F({mt:2},{children:[(G===exports.AppName.WEB||G===exports.AppName.YBA)&&e.jsx("span",{children:"Failed to fetch anomaly data, please try again."}),G===exports.AppName.YBM&&e.jsx(za,{text:"Failed to fetch anomaly data, please try again."})]})))]})),oc(ye)&&oc(Be)&&e.jsxs(r.Box,F({className:se.causesBox},{children:[e.jsx(r.Tabs,F({value:pe,onChange:function(e,t){var n=window.scrollY;he(t),setTimeout((function(){return window.scrollTo(0,n)}),0)},"aria-label":"anomaly causes tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:null==Be?void 0:Be.map((function(t,n){return e.jsx(r.Tab,{component:"div",label:t.cause,classes:{root:Y(se.cuaseTabButton),wrapper:se.causeTabLabelWrapper}},n)}))})),null==Be?void 0:Be.map((function(t,n){var i,o;return e.jsx(r.Box,F({role:"tabpanel",hidden:pe!==n,id:"tabpanel-".concat(n),"aria-labelledby":"tab-".concat(n)},{children:pe===n&&e.jsxs(r.Box,F({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx("span",F({className:se.causeText},{children:t.cause})),e.jsxs(r.Box,{children:[e.jsx("img",{src:yG,alt:"path"}),e.jsx("span",F({className:se.descriptionText},{children:t.description}))]}),e.jsx(r.Box,F({mt:2,className:(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.length)>1?Y(se.gridBox):""},{children:null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.map((function(n,i){var o,a,s,l=null==ye?void 0:ye.find((function(e,r){return r>0&&(null==e?void 0:e.name)===n&&t.index.includes(r)})),u=1===(null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.length),c=null===(a=t.groupByControl)||void 0===a?void 0:a[0];if(sc(null!==(s=null==l?void 0:l.errorMessage)&&void 0!==s?s:""))return e.jsx(r.Box,{});var d=Op(W,l,exports.GraphType.MULTI_SUPPORTING,c,$);return e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:u?"0px":"16px"}},{children:Le(l,d.uniqueOperations,d.groupByOperations,u?exports.GraphType.SINGLE_SUPPORTING:exports.GraphType.MULTI_SUPPORTING,t.title)}))}))}))]}))}),n)}))]}))]})]})})}))},kG=S.default.memo((function(i){var o,a=i.universeUuid,s=i.universeData,l=i.anomalyData,u=i.amomalyGraphRequestParams,c=i.appName,d=i.timezone,p=i.formattedAnomalyRca,h=i.apiUrl,f=i.shouldAnalyzeTopK,g=i.universeQueryData,m=i.universeQueryStatsData,v=i.isHistoricalQueryView,y=i.troubleshootUuid,x=i.queryIdParam,_=i.onSelectedIssue,b=i.onSelectedQuery,w=function(e){var t,n,r,i,o,a,s=exports.MetricMeasure.OVERALL;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Wc.NONE&&(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitType)===Wc.NONE&&(s=exports.MetricMeasure.OVERALL),(null===(r=null==e?void 0:e.defaultSettings)||void 0===r?void 0:r.splitMode)!==Vc.TOP&&(null===(i=null==e?void 0:e.defaultSettings)||void 0===i?void 0:i.splitMode)!==Vc.BOTTOM||(s=exports.MetricMeasure.OUTLIER,(null===(o=null==e?void 0:e.defaultSettings)||void 0===o?void 0:o.splitType)===Wc.TABLE?s=exports.MetricMeasure.OUTLIER_TABLES:(null===(a=null==e?void 0:e.defaultSettings)||void 0===a?void 0:a.splitType)===Wc.NAMESPACE&&(s=exports.MetricMeasure.OUTLIER_DB)),s}(l),S=function(e){var t,n,r=Vc.TOP;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Vc.TOP?r=Vc.TOP:(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitMode)===Vc.BOTTOM&&(r=Vc.BOTTOM),r}(l),T=function(e){var t,n,r=3;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitCount)>0&&(r=null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitCount),r}(l),C=new URLSearchParams(window.location.search),M={startTime:C.get("startTime"),endTime:C.get("endTime"),duration:C.get("duration"),dbId:C.get("dbId"),queryId:null!=x?x:void 0,userId:C.get("userId"),type:C.get("type"),universeId:a},I=null==M?void 0:M.endTime,E=I?new Date(I):new Date,A=new Date(E);(null==M?void 0:M.startTime)?A=new Date(null==M?void 0:M.startTime):A.setDate(A.getDate()-1);var D=t.useState(nd),k=D[0],O=D[1],N=t.useState(id),R=N[0],P=N[1],L=t.useState(!0),B=L[0],j=L[1],z=t.useState(rd),U=z[0],H=z[1],V=t.useState(rd),W=V[0],Y=V[1],G=t.useState(rd),q=G[0],Q=G[1],Z=t.useState(rd),X=Z[0],$=Z[1],K=t.useState(w),J=K[0],ee=K[1],te=t.useState(f?Vc.TOP:S),ne=te[0],re=te[1],ie=t.useState(0),oe=ie[0],ae=ie[1],se=t.useState(!1),le=se[0],ue=se[1],ce=t.useState(null!==(o=null==M?void 0:M.duration)&&void 0!==o?o:Od[0].value),de=ce[0],pe=ce[1],he=t.useState(T),fe=he[0],ge=he[1],me=function(){var e=E,t=new Date;return de===kd.SEVEN_DAYS?t.setDate(t.getDate()-7):de===kd.TWO_DAYS?t.setDate(t.getDate()-2):de===kd.ONE_DAY?t.setDate(t.getDate()-1):de===kd.SIX_HOURS?t.setHours(t.getHours()-6):de===kd.ONE_HOUR&&t.setHours(t.getHours()-1),{formattedStartDate:t,formattedEndDate:e}},ve=t.useState((function(){return function(){if(de&&de!==kd.CUSTOM){var e=me();return{startDateTime:e.formattedStartDate,endDateTime:e.formattedEndDate}}return{startDateTime:A,endDateTime:E}}()})),ye=ve[0],xe=ve[1],_e=t.useState(null),be=_e[0],we=_e[1],Se=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsById,a,null==l?void 0:l.groupId,ye.startDateTime,ye.endDateTime],(function(){return l&&(null==l?void 0:l.groupId)?fG.fetchAnomalyGroupById(a,l.groupId,ye.startDateTime.toISOString(),ye.endDateTime.toISOString(),h):Promise.reject(new Error("Anomaly data or group ID is missing"))}),{onSuccess:function(e){we(e)},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!v&&sc(y)}),Te=function(){var e,t,n=null===(e=ye.startDateTime)||void 0===e?void 0:e.toISOString(),r=null===(t=ye.endDateTime)||void 0===t?void 0:t.toISOString();return{universeUuid:a,cluster:U,region:W,zone:q,node:X,metricMeasure:J,numNodes:fe,outlierType:ne,formattedStartDate:n,formattedEndDate:r}},Ce=function(){if(de!==kd.CUSTOM){var e=me(),t=e.formattedStartDate,n=e.formattedEndDate;xe({startDateTime:t,endDateTime:n})}};t.useEffect((function(){var e=sessionStorage.getItem(Xd),t=sessionStorage.getItem($d),n=sessionStorage.getItem(Kd);if(!e){var r={};qd.forEach((function(e){e.metrics.forEach((function(e){r[e]=!0}))})),sessionStorage.setItem(Xd,JSON.stringify(r))}if(!t){var i={};Yd.forEach((function(e){e.metrics.forEach((function(e){i[e]=!0}))})),sessionStorage.setItem($d,JSON.stringify(i))}if(!n){var o={};Gd.forEach((function(e){e.metrics.forEach((function(e){o[e]=!0}))})),sessionStorage.setItem(Kd,JSON.stringify(o))}}),[]),t.useEffect((function(){Ce()}),[de]);var Me=function(e){xe((function(t){return F(F({},t),{startDateTime:new Date(e.target.value)})}))},Ie=function(e){xe((function(t){return F(F({},t),{endDateTime:new Date(e.target.value)})}))},Ee=function(e,t){xe({startDateTime:new Date(e),endDateTime:new Date(t)})};t.useEffect((function(){(null==M?void 0:M.duration)&&sc(M.duration)&&Ce()}),[]);var Ae=function(e){ee(e)},De=function(e){pe(e)};return e.jsxs(r.Box,{children:[ac(l)?e.jsx(Hp,{appName:c,filterDuration:de,timezone:d,endDateTime:ye.endDateTime,startDateTime:ye.startDateTime,anomalyData:l,onSelectedIssue:_,onSelectedFilterDuration:De,onStartDateChange:Me,onEndDateChange:Ie,onSplitTypeSelected:Ae}):e.jsx(Up,{appName:c,universeData:s,clusterRegionItem:k,zoneNodeItem:R,isPrimaryCluster:B,cluster:U,region:W,metricMeasure:J,outlierType:ne,filterDuration:de,numNodes:fe,startDateTime:ye.startDateTime,endDateTime:ye.endDateTime,shouldAnalyzeTopK:f,openSelectionModal:function(){return ue(!0)},onZoneNodeSelected:function(e,t,n){n===id&&(P(id),Q(rd),$(rd)),(e||t)&&(P(n),e&&(Q(n),$("")),t&&(Q(""),$(n)))},onClusterRegionSelected:function(e,t,n,r){j(r),n===nd&&(O(nd),H(rd),Y(rd)),(e||t)&&(O(n),e&&(H(n),Y("")),t&&(Y(n),H("")))},onOutlierTypeSelected:function(e){re(e)},onSplitTypeSelected:Ae,onNumNodesChanged:function(e){ge(e>10?10:e)},onSelectedFilterDuration:De,onStartDateChange:Me,onEndDateChange:Ie,onRefresh:function(){xe((function(e){return F(F({},e),{endDateTime:new Date})}))},onSelectedQuery:b,timezone:d}),!f&&!v&&e.jsx(DG,{metricMeasure:J,appName:c,dateTimeRange:ye,timezone:d,universeQueryData:g,amomalyGraphRequestParams:u,formattedAnomalyRca:p,filterDuration:de,apiUrl:h,universeData:s,anomalyData:be,gantChartData:Se,onSelectedTimeWindow:Ee,onSelectedIssue:_,urlParams:M,getClusterDetails:Te}),v&&e.jsx(e.Fragment,{children:e.jsx(bG,{urlParams:M,getClusterDetails:Te,queryId:null==M?void 0:M.queryId,isHistoricalQueryView:v,metricMeasure:J,apiUrl:h,appName:c,timezone:d,dateTimeRange:ye,universeQueryStatsData:m,onSelectedTimeWindow:Ee})}),f&&e.jsx(e.Fragment,{children:e.jsx(IG,{apiUrl:h,isMetricsDrawerOpen:le,appName:c,timezone:d,metricMeasure:J,dateTimeRange:ye,urlParams:M,filterTrigger:oe,onSelectedTimeWindow:Ee,closeSelectionModal:function(){return ue(!1)},getClusterDetails:Te,handleFilterMetrics:function(){ae((function(e){return e+1}))}})})]})})),OG=function(i){var o=i.universeUuid,a=i.troubleshootUuid,s=i.universeData,l=i.appName,u=i.timezone,c=i.apiUrl,d=i.shouldAnalyzeTopK,p=void 0!==d&&d,h=i.onSelectedIssue,f=i.onSelectedQuery,g=rp(),m=t.useState(null),v=m[0],y=m[1],x=t.useState(null),_=x[0],b=x[1],w=t.useState(null),S=w[0],T=w[1],C=t.useState(null),M=C[0],I=C[1],E=t.useState(null),A=E[0],D=E[1],k=new URLSearchParams(window.location.search),O=window.location.pathname,N=null;if(O.includes("/queries/")){var R=O.split("/"),P=R.indexOf("queries");N=R[P+1]||null}l!==exports.AppName.YBM&&l!==exports.AppName.YBA||(N=k.get("queryId"));var L=k.get("dbId"),B=k.get("userId"),j=sc(N);t.useEffect((function(){localStorage.setItem("appName",l)}),[]);var z=n.useQuery([exports.QUERY_KEY.fetchAnomalies,o],(function(){return fG.fetchAnomaliesById(o,a,c)}),{onSuccess:function(e){y(e),b(function(e){var t,n=null==e?void 0:e.mainGraphs.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n})),r=null===(t=null==e?void 0:e.rcaGuidelines)||void 0===t?void 0:t.map((function(t){var n;return null===(n=t.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(t){var n;return null===(n=t.supportingGraphs)||void 0===n?void 0:n.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n}))}))})),i=null==r?void 0:r.flat(2),o=null==i?void 0:i.filter((function(e){return ac(e)}));return V(V([],n,!0),o,!0)}(e)),T(function(e){var t,n;if(wp=0,!e)return[];var r=null===(t=null==e?void 0:e.mainGraphs)||void 0===t?void 0:t.length,i=null===(n=null==e?void 0:e.rcaGuidelines)||void 0===n?void 0:n.map((function(e,t){var n,i={cause:"",name:[],groupByControl:[],description:"",index:[],rcaRecommendation:"",title:void 0};return i.name=[],i.groupByControl=[],i.cause=e.possibleCause,i.description=e.possibleCauseDescription,null===(n=e.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(e){var t;return e.supportingGraphs?null===(t=e.supportingGraphs)||void 0===t?void 0:t.map((function(t){return i.name.push(t.name),i.rcaRecommendation=e.recommendation,1===r?i.index.push(Dp()):r>1&&i.index.push(Dp()+r-1),i.title=t.displayName,i.groupByControl.push(t.groupByControl),i})):i}))})),o=null==i?void 0:i.flat(2),a=new Set(o);return Array.from(a)}(e))},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!j&&sc(a)}),U=z.isLoading,H=z.isError,W=z.isIdle,G=n.useQuery([exports.QUERY_KEY.fetchQueries,o],(function(){return fG.fetchQueries(o,c,{dbId:L,userId:B,queryId:N})}),{onSuccess:function(e){I(e)},onError:function(e){I([]),console.error("Failed to fetch queries",e)},enabled:!p}),q=G.isLoading,Q=G.isError,Z=n.useQuery([exports.QUERY_KEY.fetchQueryStats,o],(function(){return fG.fetchQueryStats(o,{dbId:L,queryId:N},c)}),{onSuccess:function(e){D([e])},onError:function(e){D([]),console.error("Failed to fetch query stats",e)},enabled:j}),X=Z.isLoading,$=Z.isError;return U||X||q?e.jsx(r.Box,F({mt:2,className:g.loadingBox},{children:e.jsx(mG,{className:Y(g.icon,g.inProgressIcon)})})):H||$||Q||W&&void 0===v?e.jsxs(r.Box,F({mt:3},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:H?tp.ANOMALIES_FETCH_ERROR:tp.QUERY_STATS_FETCH_ERROR}),l===exports.AppName.YBM&&e.jsx(za,{text:H?tp.ANOMALIES_FETCH_ERROR:tp.QUERY_STATS_FETCH_ERROR})]})):e.jsx(r.Box,{children:p?e.jsx(e.Fragment,{children:e.jsx(kG,{apiUrl:c,anomalyData:v,universeData:s,universeUuid:o,appName:l,timezone:u,troubleshootUuid:null,isHistoricalQueryView:j,amomalyGraphRequestParams:_,formattedAnomalyRca:S,universeQueryData:null!=M?M:[],universeQueryStatsData:A,shouldAnalyzeTopK:p,queryIdParam:N,onSelectedIssue:h,onSelectedQuery:f})}):e.jsx(e.Fragment,{children:M&&e.jsx(kG,{apiUrl:c,troubleshootUuid:a,anomalyData:v,universeData:s,universeUuid:o,appName:l,timezone:u,isHistoricalQueryView:j,amomalyGraphRequestParams:_,formattedAnomalyRca:S,universeQueryData:M,universeQueryStatsData:A,shouldAnalyzeTopK:p,queryIdParam:N,onSelectedIssue:h,onSelectedQuery:f})})})};function NG(){return NG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NG.apply(this,arguments)}function RG(e){return"number"==typeof e&&!isNaN(e)}function PG(e){return"boolean"==typeof e}function LG(e){return"string"==typeof e}function BG(e){return"function"==typeof e}function jG(e){return LG(e)||BG(e)?e:null}function FG(e){return 0===e||e}var zG=!("undefined"==typeof window||!window.document||!window.document.createElement);function UG(e){return t.isValidElement(e)||LG(e)||BG(e)||RG(e)}var HG={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},VG={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function WG(e){var n=e.enter,r=e.exit,i=e.appendPosition,o=void 0!==i&&i,a=e.collapse,s=void 0===a||a,l=e.collapseDuration,u=void 0===l?300:l;return function(e){var i=e.children,a=e.position,l=e.preventExitTransition,c=e.done,d=e.nodeRef,p=e.isIn,h=o?n+"--"+a:n,f=o?r+"--"+a:r,g=t.useRef(),m=t.useRef(0);function v(){var e=d.current;e.removeEventListener("animationend",v),0===m.current&&(e.className=g.current)}function y(){var e=d.current;e.removeEventListener("animationend",y),s?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,c,u):c()}return t.useLayoutEffect((function(){!function(){var e=d.current;g.current=e.className,e.className+=" "+h,e.addEventListener("animationend",v)}()}),[]),t.useEffect((function(){p||(l?y():function(){m.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",y)}())}),[p]),S.default.createElement(S.default.Fragment,null,i)}}var YG={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function GG(e,n){void 0===n&&(n=!1);var r=t.useRef(e);return t.useEffect((function(){n&&(r.current=e)})),r.current}function qG(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case 1:return FG(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function QG(e){var n=t.useReducer((function(e){return e+1}),0)[1],r=t.useReducer(qG,[]),i=r[0],o=r[1],a=t.useRef(null),s=GG(0),l=GG([]),u=GG({}),c=GG({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:d,getToast:function(e){return u[e]||null}});function d(e){return-1!==i.indexOf(e)}function p(e){var t=e.containerId,n=c.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||c.containerId===t&&i)&&(s-=l.length,l=[])}function h(e){o({type:1,toastId:e})}function f(){var e=l.shift();m(e.toastContent,e.toastProps,e.staleId)}function g(e,r){var i=r.delay,o=r.staleId,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["delay","staleId"]);if(UG(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||c.props.enableMultiContainer&&t!==c.props.containerId||u[n]&&null==r)}(d)){var p=d.toastId,g=d.updateId,v=c.props,y=function(){return h(p)},x=null==d.updateId;x&&s++;var _,b,w={toastId:p,updateId:g,isIn:!1,key:d.key||c.toastKey++,type:d.type,closeToast:y,closeButton:d.closeButton,rtl:v.rtl,position:d.position||v.position,transition:d.transition||v.transition,className:jG(d.className||v.toastClassName),bodyClassName:jG(d.bodyClassName||v.bodyClassName),style:d.style||v.toastStyle,bodyStyle:d.bodyStyle||v.bodyStyle,onClick:d.onClick||v.onClick,pauseOnHover:PG(d.pauseOnHover)?d.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:PG(d.pauseOnFocusLoss)?d.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:PG(d.draggable)?d.draggable:v.draggable,draggablePercent:RG(d.draggablePercent)?d.draggablePercent:v.draggablePercent,draggableDirection:d.draggableDirection||v.draggableDirection,closeOnClick:PG(d.closeOnClick)?d.closeOnClick:v.closeOnClick,progressClassName:jG(d.progressClassName||v.progressClassName),progressStyle:d.progressStyle||v.progressStyle,autoClose:(_=d.autoClose,b=v.autoClose,!1===_||RG(_)&&_>0?_:b),hideProgressBar:PG(d.hideProgressBar)?d.hideProgressBar:v.hideProgressBar,progress:d.progress,role:LG(d.role)?d.role:v.role,deleteToast:function(){!function(e){delete u[e];var t=l.length;s=FG(e)?s-1:s-c.displayedToast,s<0&&(s=0);if(t>0){var r=FG(e)?1:c.props.limit;if(1===t||1===r)c.displayedToast++,f();else{var i=r>t?t:r;c.displayedToast=i;for(var o=0;o<i;o++)f()}}else n()}(p)}};BG(d.onOpen)&&(w.onOpen=d.onOpen),BG(d.onClose)&&(w.onClose=d.onClose),"y"===w.draggableDirection&&80===w.draggablePercent&&(w.draggablePercent*=1.5);var S=v.closeButton;!1===d.closeButton||UG(d.closeButton)?S=d.closeButton:!0===d.closeButton&&(S=!UG(v.closeButton)||v.closeButton),w.closeButton=S;var T=e;t.isValidElement(e)&&!LG(e.type)?T=t.cloneElement(e,{closeToast:y,toastProps:w}):BG(e)&&(T=e({closeToast:y,toastProps:w})),v.limit&&v.limit>0&&s>v.limit&&x?l.push({toastContent:T,toastProps:w,staleId:o}):RG(i)&&i>0?setTimeout((function(){m(T,w,o)}),i):m(T,w,o)}}function m(e,t,n){var r=t.toastId;n&&delete u[n],u[r]={content:e,props:t},o({type:0,toastId:r,staleId:n})}return t.useEffect((function(){return c.containerId=e.containerId,YG.cancelEmit(3).on(0,g).on(1,(function(e){return a.current&&h(e)})).on(5,p).emit(2,c),function(){return YG.emit(3,c)}}),[]),t.useEffect((function(){c.isToastActive=d,c.displayedToast=i.length,YG.emit(4,i.length,e.containerId)}),[i]),t.useEffect((function(){c.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(u).reverse():Object.keys(u),i=0;i<r.length;i++){var o=u[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:u,containerRef:a,isToastActive:d}}function ZG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function XG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function $G(e){var n=t.useState(!0),r=n[0],i=n[1],o=t.useState(!1),a=o[0],s=o[1],l=t.useRef(null),u=GG({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),c=GG(e,!0),d=e.autoClose,p=e.pauseOnHover,h=e.closeToast,f=e.onClick,g=e.closeOnClick;function m(t){if(e.draggable){var n=l.current;u.canCloseOnClick=!0,u.canDrag=!0,u.boundingRect=n.getBoundingClientRect(),n.style.transition="",u.x=ZG(t.nativeEvent),u.y=XG(t.nativeEvent),"x"===e.draggableDirection?(u.start=u.x,u.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(u.start=u.y,u.removalDistance=n.offsetHeight*(e.draggablePercent/100))}}function v(){if(u.boundingRect){var t=u.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&u.x>=i&&u.x<=o&&u.y>=n&&u.y<=r?x():y()}}function y(){i(!0)}function x(){i(!1)}function _(t){if(u.canDrag){t.preventDefault();var n=l.current;r&&x(),u.x=ZG(t),u.y=XG(t),"x"===e.draggableDirection?u.delta=u.x-u.start:u.delta=u.y-u.start,u.start!==u.x&&(u.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+u.delta+"px)",n.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance))}}function b(){var t=l.current;if(u.canDrag){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}t.useEffect((function(){return BG(e.onOpen)&&e.onOpen(t.isValidElement(e.children)&&e.children.props),function(){BG(c.onClose)&&c.onClose(t.isValidElement(c.children)&&c.children.props)}}),[]),t.useEffect((function(){return e.draggable&&(document.addEventListener("mousemove",_),document.addEventListener("mouseup",b),document.addEventListener("touchmove",_),document.addEventListener("touchend",b)),function(){e.draggable&&(document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",b))}}),[e.draggable]),t.useEffect((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||x();window.addEventListener("focus",y),window.addEventListener("blur",x)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",x))}}),[e.pauseOnFocusLoss]);var w={onMouseDown:m,onTouchStart:m,onMouseUp:v,onTouchEnd:v};return d&&p&&(w.onMouseEnter=x,w.onMouseLeave=y),g&&(w.onClick=function(e){f&&f(e),u.canCloseOnClick&&h()}),{playToast:y,pauseToast:x,isRunning:r,preventExitTransition:a,toastRef:l,eventHandlers:w}}function KG(e){var n=e.closeToast,r=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return t.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),n(e)},"aria-label":o},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function JG(e){var n,r,i=e.delay,o=e.isRunning,a=e.closeToast,s=e.type,l=e.hide,u=e.className,c=e.style,d=e.controlledProgress,p=e.progress,h=e.rtl,f=e.isIn,g=NG({},c,{animationDuration:i+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+p+")");var m=Y("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,((n={})["Toastify__progress-bar--rtl"]=h,n)),v=BG(u)?u({rtl:h,type:s,defaultClassName:m}):Y(m,u),y=((r={})[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]=d&&p<1?null:function(){f&&a()},r);return t.createElement("div",Object.assign({role:"progressbar",className:v,style:g},y))}JG.defaultProps={type:VG.DEFAULT,hide:!1};var eq=function(e){var n,r=$G(e),i=r.isRunning,o=r.preventExitTransition,a=r.toastRef,s=r.eventHandlers,l=e.closeButton,u=e.children,c=e.autoClose,d=e.onClick,p=e.type,h=e.hideProgressBar,f=e.closeToast,g=e.transition,m=e.position,v=e.className,y=e.style,x=e.bodyClassName,_=e.bodyStyle,b=e.progressClassName,w=e.progressStyle,S=e.updateId,T=e.role,C=e.progress,M=e.rtl,I=e.toastId,E=e.deleteToast,A=e.isIn,D=Y("Toastify__toast","Toastify__toast--"+p,((n={})["Toastify__toast--rtl"]=M,n)),k=BG(v)?v({rtl:M,position:m,type:p,defaultClassName:D}):Y(D,v),O=!!C;return t.createElement(g,{isIn:A,done:E,position:m,preventExitTransition:o,nodeRef:a},t.createElement("div",Object.assign({id:I,onClick:d,className:k},s,{style:y,ref:a}),t.createElement("div",Object.assign({},A&&{role:T},{className:BG(x)?x({type:p}):Y("Toastify__toast-body",x),style:_}),u),function(e){if(e){var n={closeToast:f,type:p};return BG(e)?e(n):t.isValidElement(e)?t.cloneElement(e,n):void 0}}(l),(c||O)&&t.createElement(JG,Object.assign({},S&&!O?{key:"pb-"+S}:{},{rtl:M,delay:c,isRunning:i,isIn:A,closeToast:f,hide:h,type:p,style:w,className:b,controlledProgress:O,progress:C}))))},tq=function(e){var n=QG(e),r=n.getToastToRender,i=n.containerRef,o=n.isToastActive,a=e.className,s=e.style,l=e.rtl,u=e.containerId;function c(e){var t,n=Y("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return BG(a)?a({position:e,rtl:l,defaultClassName:n}):Y(n,jG(a))}return t.createElement("div",{ref:i,className:"Toastify",id:u},r((function(e,n){var r=0===n.length?NG({},s,{pointerEvents:"none"}):NG({},s);return t.createElement("div",{className:c(e),style:r,key:"container-"+e},n.map((function(e){var n=e.content,r=e.props;return t.createElement(eq,Object.assign({},r,{isIn:o(r.toastId),key:"toast-"+r.key,closeButton:!0===r.closeButton?KG:r.closeButton}),n)})))})))};tq.defaultProps={position:HG.TOP_RIGHT,transition:WG({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:KG,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert"};var nq,rq,iq,oq=new Map,aq=[],sq=!1;function lq(){return Math.random().toString(36).substr(2,9)}function uq(e){return e&&(LG(e.toastId)||RG(e.toastId))?e.toastId:lq()}function cq(e,n){return oq.size>0?YG.emit(0,e,n):(aq.push({content:e,options:n}),sq&&zG&&(sq=!1,rq=document.createElement("div"),document.body.appendChild(rq),y.render(t.createElement(tq,Object.assign({},iq)),rq))),n.toastId}function dq(e,t){return NG({},t,{type:t&&t.type||e,toastId:uq(t)})}var pq=function(e){return function(t,n){return cq(t,dq(e,n))}},hq=function(e,t){return cq(e,dq(VG.DEFAULT,t))};hq.success=pq(VG.SUCCESS),hq.info=pq(VG.INFO),hq.error=pq(VG.ERROR),hq.warning=pq(VG.WARNING),hq.dark=pq(VG.DARK),hq.warn=hq.warning,hq.dismiss=function(e){return YG.emit(1,e)},hq.clearWaitingQueue=function(e){return void 0===e&&(e={}),YG.emit(5,e)},hq.isActive=function(e){var t=!1;return oq.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},hq.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=oq.get(n||nq);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=NG({},r,t,{toastId:t.toastId||e,updateId:lq()});o.toastId!==e&&(o.staleId=e);var a=o.render||i;delete o.render,cq(a,o)}}),0)},hq.done=function(e){hq.update(e,{progress:1})},hq.onChange=function(e){return BG(e)&&YG.on(4,e),function(){BG(e)&&YG.off(4,e)}},hq.configure=function(e){void 0===e&&(e={}),sq=!0,iq=e},hq.POSITION=HG,hq.TYPE=VG,YG.on(2,(function(e){nq=e.containerId||e,oq.set(nq,e),aq.forEach((function(e){YG.emit(0,e.content,e.options)})),aq=[]})).on(3,(function(e){oq.delete(e.containerId||e),0===oq.size&&YG.off(0).off(1).off(5),zG&&rq&&document.body.removeChild(rq)}));var fq=r.makeStyles((function(e){return{itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},item:{paddingLeft:e.spacing(2)}}})),gq=function(n){var i,o=n.appName,a=n.columns,s=n.hiddenColumns,l=n.onColumnVisibilityChange,u=n.close,c=fq(),d=JSON.parse(null!==(i=sessionStorage.getItem("visibleQueryFields"))&&void 0!==i?i:"[]"),p=a.reduce((function(e,t){var n;return e[t.name]=d.length>0?d.includes(t.name):null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.display,e}),{}),h=Da({defaultValues:p}),f=h.control,g=h.handleSubmit,m=h.reset;t.useEffect((function(){m(p)}),[a,m]);var v=function(){u()};return e.jsx(Ic,F({open:!0,isSidePanel:!0,title:"Add and Remove Columns",onClose:v,onSubmit:g((function(e){var t=[];Object.keys(e).forEach((function(n){var r=e[n],i=n;l(i,r),r&&t.push(i)})),sessionStorage.setItem("visibleQueryFields",JSON.stringify(t)),v()})),enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:a.map((function(t){return s.includes(t.name)?null:e.jsx(r.Box,F({className:c.item},{children:e.jsx(bp,{name:t.name,label:t.label,control:f,inputProps:{"data-testid":t.name},showCheckedIcon:o===exports.AppName.WEB})}),t.name)}))}))}))}))},mq=function(n){var r=n.data,i=n.maxEPS,o=n.groupByOperation,a=n.filteredLegends,s=t.useRef(null),l=t.useMemo((function(){var e=i<1?5:100,t=r.reduce((function(e,t){return e+t.eps}),0),n=Math.pow(t/i,.5)*e;return Math.max(n,10)+100}),[r,i]);return t.useEffect((function(){if(s.current){var e=dk(s.current),t=r.filter((function(e){var t=o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType;return!a.includes(t)}));console.warn("Filtered Data:",t);var n=t.map((function(e){return o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType})).map((function(e,n){var r;return{name:e,type:"bar",stack:"total",label:{show:!1},data:[t[n].eps],itemStyle:{color:null!==(r=ep[e])&&void 0!==r?r:Jd[n]}}})),l={animation:!1,grid:{left:50,right:50,top:20,bottom:40,containLabel:!1},tooltip:{trigger:"item",extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px;",formatter:function(e){return"".concat(e.seriesName,": ").concat(e.value)},backgroundColor:"rgba(50, 50, 50, 0.8)",textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400}},xAxis:{type:"value",show:!1,min:0,max:i},yAxis:{type:"category",data:[""],show:!1},series:n};e.setOption(l);var u=new ResizeObserver((function(){e.resize()}));return u.observe(s.current),function(){u.disconnect(),e.dispose()}}}),[r,o,l,i,a]),e.jsx("div",{className:"query-events-chart-container",ref:s,style:{height:"".concat(80,"px"),width:"".concat(l,"px"),minWidth:"".concat(l,"px"),maxWidth:"".concat(l,"px"),display:"flex"}})},vq="databaseId",yq="eps",xq="events",_q="firstActive",bq="lastActive",wq="latencyAvg",Sq="latencyP90",Tq="latencyP99",Cq="namespaceName",Mq="query",Iq="queryid",Eq="queryType",Aq="rowsAvg",Dq="rps",kq="totalTime",Oq="universeId",Nq={SHOW_YSQL:"SQL Only",SHOW_YCQL:"CQL Only",SHOW_ALL:"Queries & Background Tasks",SHOW_ACTIVITIES:"Background Tasks Only"},Rq=[Iq,vq,Oq],Pq=function(i){var o,a,s,l,u,c,d,p,h=i.universeUuid,f=i.apiUrl,g=i.startTime,m=i.endTime,v=i.appName,y=i.groupByOperation,x=i.filteredLegends,_=i.onSelectedQuery,b=Ki(),w=rp(),S=t.useState(null),T=S[0],C=S[1],M=t.useState(""),I=M[0],E=M[1],A=t.useState([]),D=A[0],k=A[1],O=t.useState(!1),N=O[0],R=O[1],P=t.useState(Sd[0]),L=P[0],B=P[1],j=t.useState(0),z=j[0],U=j[1],H=t.useState(0),V=H[0],W=H[1],G=t.useState(rd),q=G[0],Q=G[1],Z=t.useState([]),X=Z[0],$=Z[1],K=t.useState([]),J=K[0],ee=K[1],te=t.useState([]),ne=te[0],re=te[1],ie=t.useState("eps"),oe=ie[0],ae=ie[1],se=t.useState(exports.QueryType.SQL),le=se[0],ue=se[1],ce=t.useState(Nq.SHOW_YSQL),de=ce[0],pe=ce[1],he=t.useState(1),fe=he[0],ge=he[1],me=t.useState(exports.SortDirection.DESC),ve=me[0],ye=me[1],xe=n.useInfiniteQuery([exports.QUERY_KEY.fetchQueriesStatsPage,z,L],(function(){return fG.fetchQueriesStatsPage(h,{currentTablePage:z,apiUrl:f,pageSize:L,startTime:g,endTime:m,searchInput:I,database:q,sortBy:oe,sortDirection:ve,queryType:le,groupByOperation:y})}),{getNextPageParam:function(e){return e.data.hasNext},onSuccess:function(e){var t,n,r,i,o,a,s,l,u,c,d,p,h,f;"eps"===oe&&!1===(null===(r=null===(n=null===(t=null==e?void 0:e.pages)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.hasPrev)&&ve===exports.SortDirection.DESC&&(null===(a=null===(o=null===(i=null==e?void 0:e.pages)||void 0===i?void 0:i[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.entities)&&ge(null===(c=null===(u=null===(l=null===(s=null==e?void 0:e.pages)||void 0===s?void 0:s[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u.entities[0])||void 0===c?void 0:c.eps),re(null===(p=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===p?void 0:p.entities),W(null===(f=null===(h=null==e?void 0:e.pages[0])||void 0===h?void 0:h.data)||void 0===f?void 0:f.totalCount)}}),_e=xe.isFetching,be=xe.isError,we=xe.error,Se=xe.fetchNextPage,Te=xe.hasNextPage,Ce=xe.refetch,Me=n.useQuery([exports.QUERY_KEY.fetchQueriesDatabases,h],(function(){return fG.fetchQueriesDatabases(h,f)}),{onSuccess:function(e){ee(e)}}),Ie=Me.isLoading,Ee=Me.isError;t.useEffect((function(){}),[T]),t.useEffect((function(){Ce()}),[z,I,q,oe,ve,g,m,le,y]),t.useEffect((function(){var t,n,i,o,a,s,l,u=sessionStorage.getItem("visibleQueryFields"),c=u?JSON.parse(u):null;k([{name:vq,label:"",options:{sort:!1,display:!1,filter:!1}},{name:yq,label:"Avg Active Sessions",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:xq,label:"Events",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{minWidth:"70px",maxWidth:"200px",overflow:"visible",position:"relative",zIndex:10},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(t){return oc(t)?e.jsx(mq,{data:t,maxEPS:fe,groupByOperation:y,filteredLegends:x}):"-"}}},{name:Mq,label:"Query",options:{sort:!1,display:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Tooltip,F({title:t,placement:"top",arrow:!0},{children:e.jsx("span",F({tabIndex:0},{children:e.jsx(Ii,{text:t,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,containerClassName:v===exports.AppName.WEB?b.codeBlock:Y(b.codeBlock,b.containerClassName),preClassName:v===exports.AppName.YBM?b.preClassName:"",codeClassName:v===exports.AppName.YBM?b.codeClassName:""},"TableHelperQueries-".concat(z,"-").concat(i))}))}))}}},{name:Cq,label:de===Nq.SHOW_YCQL?"Keyspace":"Database",options:{sort:!0,display:null!==(t=null==c?void 0:c.includes(Cq))&&void 0!==t&&t,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:_q,label:"First Active Time",options:{sort:!0,display:null!==(n=null==c?void 0:c.includes(_q))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:bq,label:"Last Active Time",options:{sort:!0,display:null!==(i=null==c?void 0:c.includes(bq))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:wq,label:"Avg Latency (ms)",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"The average latency is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"Avg Latency (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Sq,label:"P90 Latency (ms)",options:{sort:!0,display:null!==(o=null==c?void 0:c.includes(Sq))&&void 0!==o&&o,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"The P90 latency is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"P90 Latency (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Tq,label:"P99 Latency (ms)",options:{sort:!0,display:null!==(a=null==c?void 0:c.includes(Tq))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"The P99 latency is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"P99 Latency (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Eq,label:"Query Type",options:{sort:!1,display:null!==(s=null==c?void 0:c.includes(Eq))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"Displays if the query is YSQL or YCQL query type"},{children:e.jsx("span",{children:"Query Type"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:kq,label:"Total Time (ms)",options:{sort:!0,display:null!==(l=null==c?void 0:c.includes(kq))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"Total time spent for query processing for 1 hour before last active time"},{children:e.jsx("span",{children:"Total Time (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Aq,label:"Avg Rows/Call",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},children:e.jsx(r.Tooltip,F({title:"The average rows returned by the query is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"Avg Rows"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Dq,label:"Calls/Sec",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},children:e.jsx(r.Tooltip,F({title:"The RPS for the query is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"RPS"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[X,fe,y,x]);t.useEffect((function(){$(ne)}),[ne]);var Ae=_e||Ie;return e.jsxs(e.Fragment,{children:[N&&e.jsx(gq,{appName:v,hiddenColumns:[vq,wq,Aq,Dq,yq,xq,Iq,Oq,Mq],columns:D,onColumnVisibilityChange:function(e,t){k((function(n){return n.map((function(n){return n.name===e?F(F({},n),{options:F(F({},n.options),{display:t})}):n}))}))},close:function(){return R(!1)}}),e.jsxs(r.Box,F({mt:2,mb:2},{children:[e.jsxs(r.Box,F({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},{children:[e.jsx(no,F({width:"140px",className:w.label},{children:"Filter by ".concat(de===Nq.SHOW_YCQL?"Keyspace":"Database")})),e.jsxs(Fa,F({label:"",value:q,className:w.overrideMuiSelect,onChange:function(e){U(0),Q(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:[e.jsx(r.MenuItem,F({value:rd,"data-testid":"HistoricalQueryData-".concat(rd)},{children:e.jsx("span",{children:rd})}),rd),J.map((function(t){return e.jsx(r.MenuItem,F({value:t,"data-testid":"HistoricalQueryData-".concat(t)},{children:e.jsx("span",{children:t})}),t)}))]})),e.jsx(ro,{placeholder:"Filter Queries",className:w.searchInput,onChange:function(e){sc(e.target.value)&&U(0),E(e.target.value)},value:I,inputProps:{"data-testid":"HistoricalQueryData-SearchInput"}}),e.jsx(no,F({width:"100px",className:w.label},{children:"Filter by Type:"})),e.jsx(Fa,F({label:"",value:de,className:w.overrideMuiSelect,onChange:function(e){e.target.value===Nq.SHOW_ALL&&ue(null),e.target.value===Nq.SHOW_YSQL&&ue(exports.QueryType.SQL),e.target.value===Nq.SHOW_YCQL&&ue(exports.QueryType.CQL),e.target.value===Nq.SHOW_ACTIVITIES&&ue(exports.QueryType.BACKGROUND),pe(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:Object.entries(Nq).map((function(t){var n=t[0],i=t[1];return e.jsx(r.MenuItem,F({value:i,"data-testid":"HistoricalQueryData-".concat(i)},{children:e.jsx("span",{children:i})}),n)}))})),e.jsx(er,F({size:"large",style:{marginLeft:"16px"},variant:v===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(zp,{}),onClick:function(){return R(!0)},"data-testid":"HistoricalQueryData-AddFieldsBtn"},{children:"Add and Remove Columns"}))]})),e.jsxs(r.Box,F({className:v===exports.AppName.YBM?w.overrideMuiTableContainer:w.overrideMuiTableContainerWeb},{children:[Ae&&e.jsx(r.Box,F({mt:2,className:w.loadingBox},{children:e.jsx(mG,{className:Y(w.icon,w.inProgressIcon)})})),(be||Ee)&&e.jsxs(r.Box,F({mt:3,className:w.recommendation},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(null===(a=null===(o=null==we?void 0:we.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error)?null===(l=null===(s=null==we?void 0:we.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error:tp.HISTORICAL_QUERY_DATA_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(za,{text:sc(null===(c=null===(u=null==we?void 0:we.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error)?null===(p=null===(d=null==we?void 0:we.response)||void 0===d?void 0:d.data)||void 0===p?void 0:p.error:tp.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),!Ae&&oc(X)&&e.jsx(jc,{id:"HistoricalQueryData-".concat(z),className:w.overrideMuiTable,data:X,columns:null==D?void 0:D.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),options:{filter:!0,count:V,serverSide:!0,pagination:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:L,page:z,onChangePage:function(e){return U(e)},onChangeRowsPerPage:function(e){B(e),U(0)},customRowRender:ap(v,z,X,b,!0,null==D?void 0:D.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),Rq,g,m,T,(function(e){C(e)}),_),rowsPerPageOptions:Sd,onColumnSortChange:function(e,t){ae(e),ye(t.toUpperCase())},customFooter:np(Se,"Rows per page:",X.length,Te)}},"HistoricalQueryData-".concat(z)),!Ae&&!oc(X)&&e.jsx(r.Box,F({mt:3},{children:e.jsx("span",{children:"There are no queries with the current ".concat(v===exports.AppName.YBM?"cluster":"universe")})}))]}))]}))]})},Lq=r.makeStyles((function(e){return{messageBox:{width:"100%",height:"228px",border:"1px dotted #CBDBFF",borderRadius:"8px",backgroundColor:"#F2F6FF",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},ashText:{color:"#4E5F6D",marginTop:e.spacing(2),marginBottom:e.spacing(2),marginLeft:e.spacing(1),marginRight:e.spacing(1),fontSize:"13px"},ashLink:{color:"#2B59C3",fontSize:"11.5px",textDecoration:"underline",fontStyle:"solid"}}})),Bq=[{text:"Learn more.",link:"https://docs.yugabyte.com/preview/yugabyte-platform/manage-deployments/upgrade-software-install/"},{text:"Learn more.",link:"https://docs.yugabyte.com/preview/explore/observability/active-session-history/"}],jq=function(t){var n=t.isAshSupported,i=Lq();return e.jsxs(r.Box,F({className:i.messageBox},{children:[e.jsx("img",{src:n?"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Arrow"}),e.jsx("span",F({className:i.ashText},{children:n?"The Cluster Load chart requires access to the Active Session History (ASH) view, which is not enabled on this cluster. To enable ASH for this cluster, contact Support.":"The Cluster Load chart requires YugabyteDB v2024.2 or later."})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Docs"}),e.jsx("a",F({className:i.ashLink,href:n?Bq[1].link:Bq[0].link,target:"_blank",rel:"noreferrer"},{children:n?Bq[1].text:Bq[0].text}))]}))]}))};vN([UU,gH,gB,_F,Vz,pU,uz,function(e){e.registerPainter("svg",SV)},az]);var Fq,zq=o.makeStyles((function(){return{metricPanel:{position:"relative",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",border:"1px solid #D7DEE4",borderRadius:"8px",padding:"8px",backgroundColor:"#FFFFFF"},groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .MuiInput-root":{height:"32px"}},groupByContainer:{position:"absolute",top:"20px",right:"20px",display:"flex",flex:1,flexDirection:"row",alignItems:"center"},groupByText:{fontSize:"13px",fontFamily:"Inter, sans-serif",fontWeight:500,color:"#0B1117"}}})),Uq=function(i){var o,a,s,l=i.startTime,u=i.endTime,c=i.appName,d=i.metricKey,p=i.shouldAbbreviateTraceName,h=i.groupByOperation,f=i.timezone,g=i.universeUuid,m=i.isAshEnabled,v=i.isAshSupported,y=i.apiUrl,x=i.onDateSelect,_=i.onSetGroupByOperation,b=i.onFilterBarData,w=zq(),S=rp(),T=t.useRef(null),C=t.useRef(null),M=t.useState(null),I=M[0],E=M[1],A=n.useMutation((function(e){return fG.fetchGraphs(g,e,y)}),{onSuccess:function(e){!oc(e)||E(e)},onError:function(e){console.error("Failed to fetch cluster load data",e)}}),D=null===(s=null===(a=null===(o=null==A?void 0:A.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,k=function(){var e=function(e){return F(F({start:l,end:u,name:e,filters:{universeUuid:[g]},settings:{aggregatedValueFunction:Yc.AVERAGE,returnAggregatedValue:!1,splitCount:3,splitMode:Vc.NONE,splitType:Wc.NONE}},e===hd||e===dd?{groupBy:[h]}:{}),{stepSeconds:Pp(l,u)})},t=[h===exports.WaitEventClassification.DB_ID?e(hd):e(dd),e(pd),e(fd)];sc(l)&&sc(u)&&m&&A.mutate(t)};return t.useEffect((function(){k()}),[l,u,h]),t.useEffect((function(){return k(),function(){E(null)}}),[]),t.useEffect((function(){if(oc(I)&&C.current){T.current||(T.current=dk(C.current,null,{renderer:"svg"}));var e=function(e,t){var n,r,i,o,a,s,l,u,c,d,p,h=t.shouldAbbreviateTraceName;t.appName;var f=t.timezone,g=void 0===f?"":f,m=t.groupByOperation,v=null==e?void 0:e.flatMap((function(e){return e.data||[]}));v&&v.length>1&&(v=V(V([],v.filter((function(e){var t;return"cpu"===(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0),v.filter((function(e){var t;return"cpu"!==(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0));var y=[];if(!v||0===v.length)return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:"No Data Available",left:"center",textStyle:{fontWeight:"bold",fontFamily:ld,fontSize:13,color:"#0B1117"},legend:{data:[]}}};null==v||v.forEach((function(t,n){var r=t.name,i=null;if(r===ad){var o=null==e?void 0:e.find((function(e){var n;return null===(n=e.data)||void 0===n?void 0:n.includes(t)}));(i=null==o?void 0:o.name)===fd?r=ud:i===pd&&(r=sd)}var a=m===exports.WaitEventClassification.WAIT_EVENT?22:25,s=h&&r.length>a?"".concat(r.substring(0,a),"..."):r;if(r===sd)y.push({name:s,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:!1,lineStyle:{color:"white",width:4,type:"solid"},silent:!0,symbol:"none",z:1}),y.push({name:s,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:n<35,lineStyle:{color:"black",width:2,type:"solid"},symbol:"circle",symbolSize:6,itemStyle:{color:"transparent"},emphasis:{itemStyle:{color:"black"},lineStyle:{width:2},symbolSize:8},z:2});else{var l={name:s,type:"scatter"===t.type?"line":"bar",stack:"scatter"!==t.type?"total":null,data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:n<35,lineStyle:{color:r===ud?"#888888":ep[r]||Jd[n%Jd.length],width:2,type:r===ud?"dashed":"solid"},itemStyle:{color:r===ud?"transparent":ep[r]||Jd[n%Jd.length]},symbolSize:6,symbol:"circle",z:1,emphasis:{lineStyle:{color:r===ud?"#888888":ep[r]||Jd[n%Jd.length],width:2},itemStyle:{color:r===ud?ep[r]||Jd[n%Jd.length]:void 0},symbolSize:r===ud?8:void 0}};y.push(l)}}));var x=(null===(r=null===(n=null==y?void 0:y[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)||0,_=[];if(x)for(var b=0;b<x;b++){for(var w=0,S=0,T=y;S<T.length;S++){var C=T[S];"bar"===C.type&&(w+=parseFloat(null===(i=C.data[b])||void 0===i?void 0:i[1])||0)}_.push(w)}var M=Math.max.apply(Math,V([.1],_,!1)),I=0;y.forEach((function(e){if("line"===e.type){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>I&&(I=t)}}));var E=Math.max(1,2*M,2*I),A=Math.ceil(E),D=null===(l=null===(s=null===(a=null===(o=null==e?void 0:e[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a[0])||void 0===s?void 0:s.x)||void 0===l?void 0:l[0],k=null===(p=null===(d=null===(c=null===(u=null==e?void 0:e[0])||void 0===u?void 0:u.data)||void 0===c?void 0:c[0])||void 0===d?void 0:d.x)||void 0===p?void 0:p.slice(-1)[0],O=k&&D?(new Date(k).getTime()-new Date(D).getTime())/864e5:0,N={title:{text:"Cluster Load",left:16,top:16,textStyle:{fontWeight:600,fontFamily:ld,fontSize:15}},tooltip:{trigger:m===exports.WaitEventClassification.WAIT_EVENT?"item":"axis",axisPointer:{type:"shadow"},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px;",z:1e3,formatter:function(e){var t,n,r;if(Array.isArray(e)){var i=(null===(t=e[0])||void 0===t?void 0:t.axisValueLabel)||"",o=new Date(i),a=zu(g?Uu(o,g):o,"MMM d HH:mm (zzz)",{timeZone:g||void 0}),s=e.map((function(e){var t=Array.isArray(e.value)?e.value[1]:e.value,n=Bp(e.color,e.seriesName),r=jp(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;"><b>'.concat(a,"</b><br/>").concat(s,"</div>")}i=null!==(r=null!==(n=e.axisValueLabel)&&void 0!==n?n:e.value&&e.value[0])&&void 0!==r?r:"",o=new Date(i),a=zu(g?Uu(o,g):o,"MMM d HH:mm (zzz)",{timeZone:g||void 0});var l=Array.isArray(e.value)?e.value[1]:e.value,u=Bp(e.color,e.seriesName),c=jp(l);return s='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(u).concat(c,"\n </div>"),'<div style="letter-spacing:0.5px;"><b>'.concat(a,"</b><br/>").concat(s,"</div>")}},legend:{type:"scroll",orient:"vertical",left:"1%",top:"10%",bottom:"10%",width:"250px",height:"300px",itemWidth:12,itemHeight:12,textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#4E5F6D",fontFamily:ld,rich:{dashedLine:{backgroundColor:{image:'data:image/svg+xml;utf8,<svg width="24" height="6" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="3" x2="24" y2="3" stroke="%23888" stroke-width="2" stroke-dasharray="6,4" /></svg>'},width:24,height:6,padding:[0,4,0,0],lineHeight:14},thickLine:{backgroundColor:"black",width:24,height:0,borderWidth:1,borderColor:"black",borderType:"solid",padding:[2,4,0,0],lineHeight:14}}},data:y.filter((function(e){return e.showLegend})).map((function(e){return e.name===ud||e.name===sd?{name:e.name,icon:"none"}:e.name})),formatter:function(e){return e===ud?"{dashedLine|} # vCPU":e===sd?"{thickLine|} Queries":e}},grid:{left:"270px",right:"2%",top:"14%",bottom:"10%",containLabel:!0},xAxis:{type:"time",axisLabel:{color:"#25323D",formatter:function(e){var t=new Date(e);return zu(g?Uu(t,g):t,O>1?"MMM d HH:mm":"HH:mm",{timeZone:g||void 0})}},axisLine:{lineStyle:{color:"#FF0000"}}},yAxis:{type:"value",name:"Connections",nameLocation:"middle",nameGap:50,nameTextStyle:{fontWeight:"bold",fontFamily:ld,fontSize:13,color:"#0B1117",rotate:90},axisLine:{lineStyle:{color:"#00AAFF"}},axisLabel:{color:"#25323D",precision:0},splitNumber:4,max:A},series:y,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0}};return N}(I,{shouldAbbreviateTraceName:p,appName:c,timezone:f,metricKey:d,groupByOperation:h});T.current.setOption(e),T.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}}),T.current.on("legendselectchanged",(function(e){var t=Object.keys(e.selected).filter((function(t){return!e.selected[t]}));b(t)}));var t=!1,n=null;T.current.getZr().on("mousedown",(function(e){var r,i,o=[e.offsetX,e.offsetY],a=null===(r=T.current)||void 0===r?void 0:r.convertFromPixel({seriesIndex:0},o);n=null!==(i=null==a?void 0:a[0])&&void 0!==i?i:null,t=!0})),T.current.getZr().on("mouseup",(function(e){var r;if(t){var i=[e.offsetX,e.offsetY],o=null===(r=T.current)||void 0===r?void 0:r.convertFromPixel({seriesIndex:0},i),a=null==o?void 0:o[0];null!==n&&null!==a&&Math.abs(a-n)>10&&x(n,a)}t=!1}))}return function(){T.current&&(T.current.dispose(),T.current=null)}}),[I,A.isLoading,d]),t.useEffect((function(){var e=function(){T.current&&T.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),e.jsx(r.Box,F({mt:2},{children:e.jsxs(r.Box,{children:[A.isLoading&&e.jsx(r.Box,F({mt:2,className:S.loadingBox},{children:e.jsx(mG,{className:Y(S.icon,S.inProgressIcon)})})),A.isError&&e.jsxs(r.Box,F({mt:3},{children:[(c===exports.AppName.YBA||c===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(D)?D:tp.CLUSTER_LOAD_FETCH_ERROR}),c===exports.AppName.YBM&&e.jsx(za,{text:sc(D)?D:tp.CLUSTER_LOAD_FETCH_ERROR})]})),e.jsxs(r.Box,{children:[A.isSuccess&&e.jsxs(r.Box,F({id:"".concat(d,"-wrapper"),display:"flex",flexDirection:"row",className:w.metricPanel,onClick:function(e){e.stopPropagation()},width:"100%"},{children:[e.jsx("div",{ref:C,id:d,style:{flexGrow:1,minWidth:0,height:"400px"}}),e.jsxs("div",F({className:w.groupByContainer},{children:[e.jsxs("span",F({className:w.groupByText},{children:["Group By","   "]})),e.jsx(Fa,F({value:h,className:Y(w.groupByOperationDropdown,w.overrideDefaultMuiSelect,w.overrideDefaultMuiFormControl)},{children:null==Jc?void 0:Jc.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){_(t),e.stopPropagation()}},{children:Kc[t]}),"".concat(t,"-").concat(n))}))}))]}))]})),!m&&e.jsx(r.Box,F({mt:2,mb:1.5},{children:e.jsx(jq,{isAshSupported:v})}))]})]})}))},Hq=r.makeStyles((function(e){return{tabsContainer:{display:"flex",alignItems:"center",width:"100%",boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[300]),"& .MuiTabs-fixed":{boxShadow:"none"},marginTop:e.spacing(1.5)},tabButton:{textAlign:"left",marginRight:e.spacing(1),minHeight:e.spacing(4),maxHeight:e.spacing(4),marginBottom:e.spacing(.5),padding:e.spacing(0,2),boxSizing:"border-box","&:hover":{boxShadow:"none",borderRadius:e.shape.borderRadius},"& .Mui-selected":{background:e.palette.grey[300],borderRadius:e.spacing(1)},"& .MuiTab-wrapper":{alignItems:"center"}},tabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117"},tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"0px 24px 4px 16px",backgroundColor:"#FFFFFF"},chartBox:{border:"1px solid #D7DEE4",borderRadius:"8px",padding:"16px 24px 24px 16px",backgroundColor:"#FFFFFF"},expandAllButton:{fontSize:"13px",fontWeight:600}}})),Vq=function(i){var o,a,l,u=i.startTime,c=i.endTime,d=i.universeUuid,p=i.appName,h=i.timezone,f=i.apiUrl,g=i.isAshEnabled,m=i.isAshSupported,v=i.universeData,y=i.anomalyDetectionStatus,x=i.onClickShowMoreAnomalies,_=i.onEChartsDateSelect,b=i.onSelectedIssue,w=i.onSelectedQuery,S=i.notifyTabChange,T=Hq(),C=rp(),M=t.useState([]),I=M[0];M[1];var E,A,D=t.useState(null),k=D[0],O=D[1],N=t.useState((E=window.location.pathname,A=exports.InsightsTabs.ANOMALIES,E.includes("/".concat(td.ANOMALIES))&&(A=exports.InsightsTabs.ANOMALIES),E.includes("/".concat(td.QUERIES))&&(A=exports.InsightsTabs.QUERIES),E.includes("/".concat(td.METRICS))&&(A=exports.InsightsTabs.METRICS),E.includes("/".concat(td.INSIGHTS))&&(A=exports.InsightsTabs.INSIGHTS),A)),R=N[0],P=N[1],L=t.useState(!1),B=L[0],j=L[1],z=t.useState(Object.values(exports.InsightsTabs)),U=z[0],H=z[1],V=t.useState(Jc[0]),W=V[0],G=V[1],q=function(e){console.warn("onFilterBarData",e)},Q=function(e,t){var n=Object.values(exports.InsightsTabs);return e||(n=n.filter((function(e){return e!==exports.InsightsTabs.QUERIES}))),t||(n=n.filter((function(e){return e!==exports.InsightsTabs.METRICS}))),n},Z=function(e){G(e)},X=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroups,u],(function(){return fG.fetchAnomalyGroups(d,u,c,f,R===exports.InsightsTabs.INSIGHTS?exports.AnomalyTypeFilter.INSIGHT:exports.AnomalyTypeFilter.PERF_ANOMALY)}),{onSuccess:function(e){O(e)}}),$=null===(l=null===(a=null===(o=null==X?void 0:X.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===l?void 0:l.error;n.useQuery([exports.QUERY_KEY.fetchSpecificRuntimeConfigs],(function(){return fG.fetchSpecificRuntimeConfigs(Cd,[Md.SHOW_QUERIES_VIEW,Md.SHOW_TOPK_METRICS_VIEW],f)}),{onSuccess:function(e){var t,n,r="true"===(null===(t=null==e?void 0:e.find((function(e){return e.path===Md.SHOW_TOPK_METRICS_VIEW})))||void 0===t?void 0:t.value),i="true"===(null===(n=null==e?void 0:e.find((function(e){return e.path===Md.SHOW_QUERIES_VIEW})))||void 0===n?void 0:n.value);H(Q(!!i,!!r))},onError:function(){H(Q(!1,!1))}}),t.useEffect((function(){y===exports.AnomalyDetectionStatusText.SUCCESS&&X.refetch()}),[y]),t.useEffect((function(){R!==exports.InsightsTabs.METRICS&&X.refetch()}),[u,c,R]),t.useEffect((function(){var e=window.location.pathname,t=new URLSearchParams(window.location.search).get("tab");if(e.includes("/".concat(td.ANOMALIES))||t===td.ANOMALIES)P(exports.InsightsTabs.ANOMALIES),S(exports.InsightsTabs.ANOMALIES);else if(e.includes("/".concat(td.QUERIES))||t===td.QUERIES)P(exports.InsightsTabs.QUERIES),S(exports.InsightsTabs.QUERIES);else if(e.includes("/".concat(td.METRICS))||t===td.METRICS)P(exports.InsightsTabs.METRICS),S(exports.InsightsTabs.METRICS);else if(e.includes("/".concat(td.INSIGHTS))||t===td.INSIGHTS)P(exports.InsightsTabs.INSIGHTS),S(exports.InsightsTabs.INSIGHTS);else if(p!==exports.AppName.YBA){var n=new URLSearchParams(window.location.search).toString(),r="".concat(e,"/").concat(td.ANOMALIES).concat(n?"?".concat(n):"");window.history.replaceState(null,"",r)}}),[]);var K=function(t){switch(t){case exports.InsightsTabs.ANOMALIES:return e.jsx(Uq,{startTime:u,endTime:c,apiUrl:f,universeUuid:d,appName:p,metricKey:"cluster_load",groupByOperation:W,shouldAbbreviateTraceName:!0,timezone:h,isAshEnabled:g,isAshSupported:m,onSetGroupByOperation:Z,onDateSelect:_,onFilterBarData:q});case exports.InsightsTabs.QUERIES:return e.jsxs(e.Fragment,{children:[e.jsx(Uq,{startTime:u,endTime:c,apiUrl:f,universeUuid:d,appName:p,metricKey:"cluster_load",groupByOperation:W,shouldAbbreviateTraceName:!0,timezone:h,isAshEnabled:g,isAshSupported:m,onFilterBarData:q,onSetGroupByOperation:Z,onDateSelect:_}),e.jsx(r.Box,F({mt:3,className:T.chartBox},{children:e.jsx(Pq,{universeUuid:d,groupByOperation:W,apiUrl:f,startTime:u,endTime:c,appName:p,filteredLegends:I,onSelectedQuery:w})}))]});case exports.InsightsTabs.METRICS:return e.jsx(OG,{universeUuid:d,troubleshootUuid:null,shouldAnalyzeTopK:!0,universeData:v,appName:p,timezone:h,apiUrl:f});case exports.InsightsTabs.INSIGHTS:return e.jsx(r.Box,{mt:.5});default:return null}};return e.jsxs(r.Box,{children:[p===exports.AppName.WEB&&e.jsx(r.Box,F({className:T.tabBox},{children:e.jsxs(s.TabContext,F({value:R},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center",className:T.tabsContainer},{children:e.jsx(r.Tabs,F({value:R,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){if(t!==R){P(t),S(t);var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();n=n.replace(/\/anomalies|\/insights|\/metricsNew\/[^/]+|\/queries/g,""),t===exports.InsightsTabs.ANOMALIES?n="".concat(n,"/").concat(td.ANOMALIES).concat(r?"?".concat(r):""):t===exports.InsightsTabs.QUERIES?n="".concat(n,"/").concat(td.QUERIES).concat(r?"?".concat(r):""):t===exports.InsightsTabs.METRICS?n="".concat(n,"/").concat(td.METRICS):t===exports.InsightsTabs.INSIGHTS&&(n="".concat(n,"/").concat(td.INSIGHTS)),window.history.pushState(null,"",n)}}},{children:U.map((function(t,n){return e.jsx(r.Tab,{"data-testid":"".concat(t,"Tab"),value:t,label:t,classes:{root:Y(T.tabButton),wrapper:T.tabLabelWrapper}},n)}))}))})),e.jsx(s.TabPanel,F({className:C.tabPanelPrimary,value:exports.InsightsTabs.ANOMALIES},{children:K(exports.InsightsTabs.ANOMALIES)})),e.jsx(s.TabPanel,F({className:C.tabPanelPrimary,value:exports.InsightsTabs.QUERIES},{children:K(exports.InsightsTabs.QUERIES)})),e.jsx(s.TabPanel,F({className:C.tabPanelPrimary,value:exports.InsightsTabs.METRICS},{children:K(exports.InsightsTabs.METRICS)}))]}))})),(p===exports.AppName.YBM||p===exports.AppName.YBA)&&e.jsx(e.Fragment,{children:K(R)}),(R===exports.InsightsTabs.ANOMALIES||R===exports.InsightsTabs.INSIGHTS)&&e.jsxs(r.Box,F({mt:3,className:T.chartBox},{children:[e.jsxs(r.Box,F({display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},{children:[e.jsx(r.Typography,F({variant:"h5"},{children:R===exports.InsightsTabs.ANOMALIES?"Detected Anomalies":"Insights"})),e.jsx(r.Box,{children:e.jsx(er,F({variant:p===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx("img",{src:B?"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Expand Icon"}),onClick:function(){j(!B)}},{children:e.jsx("span",F({className:T.expandAllButton},{children:B?"Collapse All":"Expand All"}))}))}),X.isLoading&&e.jsx(r.Box,F({mt:2,className:C.loadingBox},{children:e.jsx(mG,{className:Y(C.icon,C.inProgressIcon)})})),X.isError&&e.jsxs(r.Box,F({mt:2},{children:[(p===exports.AppName.YBA||p===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc($)?$:tp.ANOMALIES_FETCH_ERROR}),p===exports.AppName.YBM&&e.jsx(za,{text:sc($)?$:tp.ANOMALIES_FETCH_ERROR})]}))]})),X.isSuccess&&(ac(null==k?void 0:k.groups)?e.jsx(EG,{name:"gant-chart-insights",sourceData:null!=k?k:[],expandAll:B,showMoreOptions:!0,onClickShowMoreAnomalies:x,startTime:u,endTime:c,onSelectedIssue:b,appName:p,isInsightsTab:R===exports.InsightsTabs.INSIGHTS},"gant-chart-insights"):e.jsx(r.Box,F({mt:2},{children:"No Anomalies were detected"})))]}))]})},Wq=r.makeStyles((function(e){return{tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"24px 24px 24px 16px",backgroundColor:"#FFFFFF",margin:e.spacing(3)}}})),Yq=function(o){var a,s,l,u,c,d=o.showMoreAnomalyCategory,p=o.selectedTab,h=o.startTime,f=o.endTime,g=o.apiUrl,m=o.universeUuid,v=o.appName,y=o.onClickShowMoreAnomalies,x=o.onSelectedIssue,_=Wq(),b=rp(),w=t.useState(null),S=w[0],T=w[1],C=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsByType,h,f],(function(){return fG.fetchAnomalyGroupsByType(m,h,f,d,g)}),{onSuccess:function(e){T(e)}}),M=null===(l=null===(s=null===(a=null==C?void 0:C.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return e.jsxs(r.Box,F({className:_.tabBox},{children:[e.jsxs(r.Breadcrumbs,F({className:b.breadCrumb,separator:e.jsx(i.NavigateNext,{fontSize:"small"}),"aria-label":"breadcrumb","data-testid":"PrimaryDashboardBreadcrumb"},{children:[e.jsx(r.Link,F({className:b.textLink,component:vt,variant:"h5",onClick:function(){y(null),window.history.pushState({},"",window.location.href)},to:"#"},{children:e.jsx("span",F({className:b.breadCrumbText},{children:p===exports.InsightsTabs.ANOMALIES?"Detected Anomalies":"Insights"}))})),e.jsx(r.Typography,F({variant:"h5"},{children:e.jsx("span",F({className:Y(b.breadCrumbText,b.anomalyCategoryText)},{children:"".concat(null===(c=null===(u=null==S?void 0:S[0])||void 0===u?void 0:u.lastInstance)||void 0===c?void 0:c.title)||"".concat(Id[d])}))}))]})),e.jsxs(r.Box,F({mt:3},{children:[C.isLoading&&e.jsx(r.Box,{children:e.jsx(mG,{className:Y(b.icon,b.inProgressIcon)})}),C.isError&&e.jsxs(r.Box,F({mt:3},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(M)?M:tp.SHOW_MORE_ANOMALIES_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(za,{text:sc(M)?M:tp.SHOW_MORE_ANOMALIES_FETCH_ERROR})]})),C.isSuccess&&(oc(S)?e.jsx(EG,{name:"gant-chart-show-more-anomalies",sourceData:null!=S?S:[],showMoreOptions:!1,expandAll:!0,startTime:h,endTime:f,onSelectedIssue:x,appName:v,viewAllAnomalies:!0},"gant-chart-show-more-anomalies"):e.jsx(r.Box,{children:"No Anomalies were detected"}))]}))]}))},Gq=o.makeStyles((function(e){return{header:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"end"},detectionButton:{marginRight:e.spacing(2)}}})),qq=o.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),Qq=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=qq(),c=n.useMutation((function(){return fG.deleteUniverseMetadata(i.id,a)}),{onSuccess:function(){hq.success("Universe removed successfully, no further troubleshooting on this universe willbe performed"),l(),s()},onError:function(e){var t,n,r;hq.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Not able to remove universe, please try again")}});return e.jsx(Ic,F({open:o,onClose:s,title:"Remove Universe",onSubmit:function(){return U(void 0,void 0,void 0,(function(){return H(this,(function(e){return c.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Remove",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:u.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to remove the universe ".concat(i.id," from Perf Advisor service ?")}))}))}))};!function(e){e.ACTIVE="Active",e.INACTIVE="Inactive"}(Fq||(Fq={}));var Zq=o.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},tagGreen:{backgroundColor:"#CDEFE1"},tagRed:{backgroundColor:"#FDE2E2"},tagTextGreen:{color:"#097245"},tagTextRed:{color:"#8F0000"},statusText:{fontFamily:"Inter",fontStyle:"normal",fontSize:"13px"},statusBox:{display:"flex",flexDirection:"row",alignItems:"center",height:"24px",borderRadius:"6px",padding:"10px 6px",width:"fit-content"},flexColumn:{display:"flex",flexDirection:"row"},tooltip:{marginLeft:e.spacing(.5)}}})),Xq=function(n){var i=n.metadata,o=n.apiUrl;n.customerUuid;var a=n.universeList,s=n.onActionPerformed,l=Zq(),u=rp(),c=t.useState(!1),d=c[0],p=c[1],h=t.useState([]),f=h[0],g=h[1],m=t.useState(Sd[0]),v=m[0],y=m[1],x=t.useState(""),_=x[0];x[1];var b=t.useState(0),w=b[0],S=b[1],T=t.useState(null),C=T[0],M=T[1],I=t.useState(i),E=I[0],A=I[1];return t.useEffect((function(){var e=i.map((function(e){var t,n=a.find((function(t){return e.id===t.universeUUID}));return e.name=null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"",e.lastSyncError=null==n?void 0:n.lastSyncError,e}));A(e)}),[a,i]),t.useEffect((function(){g([{name:"id",label:"Universe UUID",options:{sort:!0,display:!0}},{name:"name",label:"Universe Name",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex,i=E[r],o=null==i?void 0:i.id;return e.jsx("a",F({href:"/universes/".concat(o,"/perfAdvisor?tab=").concat(td.ANOMALIES)},{children:t}))}}},{name:"dataMountPoints",label:"Data Mount Points",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}}}},{name:"otherMountPoints",label:"Other Mount Points",options:{sort:!1,display:!0}},{name:"lastSyncError",label:"Status",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t){return e.jsx(e.Fragment,{children:t?e.jsxs(r.Box,F({className:l.flexColumn},{children:[e.jsx(r.Box,F({className:Y(l.tagRed,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextRed,l.statusText)},{children:Fq.INACTIVE}))})),e.jsx(r.Tooltip,F({title:t,arrow:!0,placement:"top",className:l.tooltip},{children:e.jsx("img",{src:AG,alt:"info"})}))]})):e.jsx(r.Box,F({className:Y(l.tagGreen,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextGreen,l.statusText)},{children:Fq.ACTIVE}))}))})}}},{name:"",label:"Actions",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx(er,F({size:"medium",variant:"ghost",onClick:function(){return e=E[i],M(e),void p(!0);var e}},{children:"Unregister"}))})}}}])}),[E]),e.jsxs(r.Box,F({mt:2,className:l.overrideMuiTableContainer},{children:[oc(E)&&oc(f)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(jc,{title:"Universe Metadata",className:u.overrideMuiTable,data:E,columns:f,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:v,page:w,onChangePage:function(e){return S(e)},onChangeRowsPerPage:function(e){y(e),S(0)},searchText:_,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:Sd}})})),d&&C&&e.jsx(Qq,{onActionPerformed:s,open:d,onClose:function(){p(!1)},data:C,apiUrl:o})]}))},$q=o.makeStyles((function(e){return{refreshButton:{width:"120px",marginTop:e.spacing(2),alignSelf:"end"},flexColumn:{display:"flex",flexDirection:"column"},noUniverses:{alignSelf:"center"}}})),Kq=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),Jq=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=Kq(),d=n.useMutation((function(){return fG.deleteRuntimeConfig(Cd,null==i?void 0:i.path,a)}),{onSuccess:function(){u.success("Have reset runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot reset runtime configuration key, please try again")}});return e.jsx(Ic,F({open:o,onClose:s,title:"Reset Runtime Configuration",onSubmit:function(){return U(void 0,void 0,void 0,(function(){return H(this,(function(e){return d.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Reset",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to reset the runtime configuration for the following key ".concat(i.path," ?")}))}))}))},eQ=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),tQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=eQ(),d=Da({defaultValues:{configValue:(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL?"true"===i.value:i.value},mode:"onChange",reValidateMode:"onChange"}),p=d.control,h=d.handleSubmit,f=n.useMutation((function(e){return fG.updateRuntimeConfig(Cd,null==i?void 0:i.path,e.configValue?e.configValue.toString():i.value.toString(),a)}),{onSuccess:function(){u.success("Updated runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot update runtime configuration key, please try again")}}),g=h((function(e){var t={configValue:""};Object.assign(t,i),t.configValue=e.configValue,f.mutate(t)}));return e.jsx(Ic,F({open:o,onClose:s,title:"Update Runtime Configuration",onSubmit:g,cancelLabel:"Cancel",submitLabel:"Update",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(Oo,F({},d,{children:e.jsxs(r.Box,F({mt:2},{children:[e.jsx(no,{children:"Config Key "}),e.jsx(r.Typography,F({variant:"body2"},{children:i.path})),e.jsxs(r.Box,F({mt:1},{children:[e.jsx(no,{children:"Config Value "}),(null==i?void 0:i.type)!==exports.RuntimeConfigType.BOOL&&e.jsx(Oa,{style:{marginTop:"8px"},name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"},fullWidth:!0}),(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL&&e.jsx(cp,{name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"}})]}))]}))}))}))},nQ=r.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"90% !important",marginTop:"3px"}},overrideMuiTable:{textAlign:"center","& .MuiTableCell-sizeSmall":{textAlign:"center"}},tooltip:{marginLeft:e.spacing(.5)},textColor:{color:"#303A78"},searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"}}}));exports.ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE=hd,exports.ACTIVE_SESSION_HISTORY_EPS_GLOBAL=dd,exports.ACTIVE_SESSION_HISTORY_QUERY_EVENTS=pd,exports.ALL=rd,exports.ALL_REGIONS=nd,exports.ALL_ZONES=id,exports.ANOMALY_CATEGORY_LIST=Td,exports.ANOMALY_FILTER_DURATION_OPTIONS=Od,exports.ANOMALY_TAG=Fd,exports.ANOMALY_TYPE_TO_NAME_MAP=Id,exports.ASH=od,exports.ASH_GROUPBY_VALUES=wd,exports.Aggregation=Yc,exports.BACKGROUND_QUERY_REQUEST_GRAPHS=_d,exports.CATALOG_READ_REQUEST_GRAPH=bd,exports.CATEGORY_HEADER_DATA_MAP=Rd,exports.COLORS=Jd,exports.CORES=ad,exports.CPU_CORES=ud,exports.CPU_COUNT=fd,exports.CQL_QUERY_REQUEST_GRAPHS=xd,exports.ClusterRegionSelector=_p,exports.ConfigureUniverseMetadata=function(i){var o=i.apiUrl,a=i.customerUuid,s=i.appName,l=void 0===s?exports.AppName.WEB:s,u=$q(),c=rp(),d=t.useState([]),p=d[0],h=d[1],f=t.useState([]),g=f[0],m=f[1],v=n.useQueryClient(),y=n.useQuery(exports.QUERY_KEY.fetchUniverseMetadataList,(function(){return fG.fetchUniverseMetadataList(o,a)}),{onSuccess:function(e){h(e)}}),x=y.isIdle,_=y.isLoading,b=y.isError,w=y.refetch,S=n.useQuery(exports.QUERY_KEY.fetchUniverseListDetails,(function(){return fG.fetchUniverseListDetails(o)}),{onSuccess:function(e){m(e)}}),T=S.isIdle,C=S.isLoading,M=S.isError,I=S.refetch;if((b||M)&&e.jsx(eo,{customErrorMessage:"Unable to fetch ".concat(l===exports.AppName.YBM?"cluster":"universe"," details")}),_||C||x&&void 0===p||T&&void 0===g)return e.jsx(r.Box,F({mt:4,className:c.loadingBox},{children:e.jsx(mG,{className:Y(c.icon,c.inProgressIcon)})}));var E=function(){U(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return v.invalidateQueries(exports.QUERY_KEY.fetchUniverseMetadataList),v.invalidateQueries(exports.QUERY_KEY.fetchUniverseListDetails),[4,w()];case 1:return e.sent(),[4,I()];case 2:return e.sent(),[2]}}))}))};return e.jsx(Nc,{body:e.jsxs(r.Box,F({ml:1,mr:1,mt:1,className:u.flexColumn},{children:[e.jsx(er,F({variant:"secondary",size:"medium",onClick:function(){E()},className:u.refreshButton},{children:"Refresh"})),sc(o)&&p.length>0?e.jsx(e.Fragment,{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(Xq,{apiUrl:o,customerUuid:a,metadata:p,universeList:g,onActionPerformed:E})}))}):e.jsx(r.Box,F({className:u.noUniverses},{children:sc(o)?"Currently, there are no universes attached to Perf Advisor service":"Customer is not registered with Perf Advisor service. Please register and then enable Perf Advisor for universes."}))]}))})},exports.DB_TAG=Ld,exports.DEFAULT_ERROR_MESSAGES=tp,exports.DEFAULT_RECORDS_PER_PAGE=Sd,exports.ELLIPSIS="...",exports.GLOBAL_RUNTIME_CONFIG=Cd,exports.GROUP_BY_OPERATIONS=Jc,exports.GenericFailure=za,exports.GroupEventsParam=Hc,exports.IN_DEVELOPMENT_MODE=tG,exports.MAX_OUTLIER_NUM_NODES=10,exports.METRICS_OUTLIER_DATABASES_STORAGE_KEY=Kd,exports.METRICS_OUTLIER_TABLES_STORAGE_KEY=$d,exports.METRICS_SESSION_STORAGE_KEY=Xd,exports.METRIC_DB_RESOURCES_WITH_GRAPHS=Gd,exports.METRIC_FONT=ld,exports.METRIC_NAMES=Zd,exports.METRIC_RESOURCES_WITH_GRAPHS=qd,exports.METRIC_TABLES_RESOURCES_WITH_GRAPHS=Yd,exports.METRIC_TABS=Hd,exports.METRIC_TABS_DATABASES=Wd,exports.METRIC_TABS_TABLES=Vd,exports.MIN_OUTLIER_NUM_NODES=3,exports.MORE=Ed,exports.MetricConsts=cd,exports.MetricOrigin={TABLE:"table",CUSTOMER:"customer",UNIVERSE:"universe"},exports.MetricSplitSelector=hp,exports.MetricsAnalysisEntry=OG,exports.NAME_COLOR_MAPPING=ep,exports.OutlierSelector=gp,exports.PerfAdvisorAPI=fG,exports.PerfAdvisorEntry=function(i){var o,a,s,l,u,c,d,p,h=i.timezone,f=i.universeUuid,g=i.appName,m=i.apiUrl,v=i.onSelectedIssue,y=i.onSelectedQuery,x=Gq(),_=rp(),b=new Date,w=new Date;w.setDate((new Date).getDate()-1);var S=t.useState(null);S[0];var T=S[1],C=t.useState(exports.AnomalyDetectionStatusText.EMPTY),M=C[0],I=C[1];t.useEffect((function(){localStorage.setItem("appName",g)}),[]),n.useQuery(exports.QUERY_KEY.fetchAnomalyDetectionStatus,(function(){return fG.fetchAnomalyDetectionStatus(f,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||lc(t))T(null);else{var n=new Date(t),r=gc(n,fc,h);T(r)}I(e.status)},onError:function(e){console.error("Failed to fetch anomaly detection status",e)},refetchOnWindowFocus:!0,refetchInterval:1e4,enabled:M!==exports.AnomalyDetectionStatusText.SUCCESS});var E=new URLSearchParams(window.location.search),A=E.get("startTime"),D=E.get("endTime"),k=E.get("duration"),O=t.useState(A?new Date(A).toISOString():null),N=O[0],R=O[1],P=t.useState(D?new Date(D).toISOString():null),L=P[0],B=P[1],j=t.useState(""),z=j[0],U=j[1],H=t.useState({start:A?new Date(A):w,end:D?new Date(D):b}),V=H[0],W=H[1],G=t.useState({start:gc(V.start,fc,h),end:gc(V.end,fc,h)}),q=G[0],Q=G[1],Z=t.useState(null!=k?k:Od[0].value),X=Z[0],$=Z[1],K=t.useState(null),J=K[0],ee=K[1],te=t.useState(exports.InsightsTabs.ANOMALIES),ne=te[0],re=te[1],ie=function(e,t){R(e),B(t)},oe=function(){var e=null==w?void 0:w.toISOString(),t=null==b?void 0:b.toISOString(),n=new Date;X===kd.SEVEN_DAYS?(n.setDate(n.getDate()-7),e=null==n?void 0:n.toISOString()):X===kd.TWO_DAYS?(n.setDate(n.getDate()-2),e=null==n?void 0:n.toISOString()):X===kd.ONE_DAY?(n.setDate(n.getDate()-1),e=null==n?void 0:n.toISOString()):X===kd.SIX_HOURS?(n.setHours(n.getHours()-6),e=null==n?void 0:n.toISOString()):X===kd.ONE_HOUR&&(n.setHours(n.getHours()-1),e=null==n?void 0:n.toISOString()),X!==Dd.CUSTOM&&ie(e,t)};t.useEffect((function(){oe();var e=new URLSearchParams(window.location.search).get("duration");sc(e)&&$(e)}),[]),t.useEffect((function(){oe()}),[X]),t.useEffect((function(){var e=V.start,t=V.end;e>t?U("Start Date is greater than End Date"):(t-e)/6e4<=5?U("Time difference should be a minimum of 1 hour"):X===Dd.CUSTOM&&(U(""),Q({start:gc(e,fc,h),end:gc(t,fc,h)}),ie(null==e?void 0:e.toISOString(),null==t?void 0:t.toISOString()))}),[V]);var ae=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return fG.fetchUniverseById(f,m)})),se=n.useQuery(exports.QUERY_KEY.getUniverseMetadata,(function(){return fG.getUniverseMetadata(f,m)})),le=null===(s=null===(a=null===(o=null==ae?void 0:ae.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,ue=null===(c=null===(u=null===(l=null==se?void 0:se.error)||void 0===l?void 0:l.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error,ce=null===(d=null==ae?void 0:ae.data)||void 0===d?void 0:d.ashEnabled,de=null===(p=null==ae?void 0:ae.data)||void 0===p?void 0:p.ashSupported,pe=n.useMutation((function(){return fG.scheduleAnomalyDetectionStatus(f,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||lc(t))T(null);else{var n=new Date(t),r=gc(n,fc,h);T(r)}I(e.status)},onError:function(e){var t,n,r,i;hq.error(sc(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)?null===(i=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.error:tp.ANOMALY_SCHEDULE_ERROR)}}),he=function(e){ee(e)};return e.jsx(r.Box,{children:e.jsxs(e.Fragment,{children:[se.isLoading||ae.isLoading&&e.jsx(r.Box,F({mt:2,className:_.loadingBox},{children:e.jsx(mG,{className:Y(_.icon,_.inProgressIcon)})})),se.isError||ae.isError&&e.jsxs(r.Box,F({mt:2},{children:[(g===exports.AppName.YBA||g===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:se.isError?sc(ue)?ue:tp.UNIVERSE_PA_STATUS_ERROR:sc(le)?le:tp.UNIVERSE_DETAILS_ERROR}),g===exports.AppName.YBM&&e.jsx(za,{text:se.isError?sc(ue)?ue:tp.UNIVERSE_PA_STATUS_ERROR:sc(le)?le:tp.UNIVERSE_DETAILS_ERROR})]})),ae.isSuccess&&e.jsxs(r.Box,{children:[!J&&e.jsxs(r.Box,F({p:g===exports.AppName.WEB&&3,pl:g!==exports.AppName.WEB&&2},{children:[e.jsxs(r.Box,F({className:x.header},{children:[(ne===exports.InsightsTabs.ANOMALIES||ne===exports.InsightsTabs.INSIGHTS)&&e.jsx(er,F({variant:"primary",size:"medium",onClick:function(){pe.mutate()},className:x.detectionButton,disabled:M===exports.AnomalyDetectionStatusText.SCHEDULED||M===exports.AnomalyDetectionStatusText.IN_PROGRESS,showSpinner:M===exports.AnomalyDetectionStatusText.SCHEDULED||M===exports.AnomalyDetectionStatusText.IN_PROGRESS,startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",alt:"Detection Icon"})},{children:"Run Detection"})),ne!==exports.InsightsTabs.METRICS&&e.jsxs(e.Fragment,{children:[e.jsx(Fa,F({className:Y(_.selectBox,_.overrideMuiInput),"data-testid":"PrimaryDashboardTimeFilterSelect",value:X},{children:Od.map((function(t){return e.jsx(r.MenuItem,F({value:t.value,onClick:function(e){!function(e){var t,n;$(e);var r=new URLSearchParams(window.location.search);e===Dd.CUSTOM?(r.set("startTime",null===(t=null==V?void 0:V.start)||void 0===t?void 0:t.toISOString()),r.set("endTime",null===(n=null==V?void 0:V.end)||void 0===n?void 0:n.toISOString())):(r.delete("startTime"),r.delete("endTime")),r.set("duration",e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(r.toString()))}(t.value)},className:Y(_.menuItem,_.regularText)},{children:t.label}),"duration-".concat(t.label))}))})),X===Dd.CUSTOM&&e.jsxs(e.Fragment,{children:[e.jsx(r.Box,F({className:_.startDatePickerBox},{children:e.jsx(vc,{className:_.dateTimePicker,dateTimeLabel:"",value:q.start,defaultDateTimeValue:q.start,onChange:function(e){var t=new Date(e.target.value);W((function(e){return F(F({},e),{start:t})}));var n=new URLSearchParams(window.location.search);n.set("startTime",t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},isReadOnly:!0})})),e.jsx(r.Box,F({className:Y(sc(z)&&_.endDatePickerBox)},{children:e.jsx(vc,{className:Y(sc(z)?_.dateTimePickerEnd:_.dateTimePicker),dateTimeLabel:"",defaultDateTimeValue:q.end,value:q.end,onChange:function(e){var t=new Date(e.target.value);W((function(e){return F(F({},e),{end:t})}));var n=new URLSearchParams(window.location.search);n.set("endTime",t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},errorMsg:z,isReadOnly:!0})}))]})]})]})),e.jsx(r.Box,F({mt:g===exports.AppName.WEB&&2},{children:e.jsx(Vq,{startTime:N,endTime:L,universeUuid:f,appName:g,timezone:h,isAshEnabled:!!ce,isAshSupported:!!de,apiUrl:m,universeData:null==ae?void 0:ae.data,onClickShowMoreAnomalies:he,onEChartsDateSelect:function(e,t){var n=new Date(e),r=new Date(t);$(Dd.CUSTOM),W({start:new Date(e),end:new Date(t)});var i=new URLSearchParams(window.location.search);i.set("startTime",n.toISOString()),i.set("endTime",r.toISOString()),i.set("duration",Dd.CUSTOM),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(i.toString()))},onSelectedIssue:v,onSelectedQuery:y,notifyTabChange:function(e){re(e)},anomalyDetectionStatus:M})}))]})),sc(J)&&e.jsx(Yq,{onClickShowMoreAnomalies:he,selectedTab:ne,showMoreAnomalyCategory:J,startTime:N,endTime:L,universeUuid:f,appName:g,apiUrl:m,onSelectedIssue:v})]})]})})},exports.QUERIES=sd,exports.QUERY_DETAILS=Pd,exports.RCA_GANT_CHART=Qd,exports.REACT_APP_API_URL=nG,exports.REGION_TAG=zd,exports.RUNTIME_CONFIG_KEYS=Md,exports.RuntimeConfigs=function(i){var o,a,s=i.apiUrl,l=i.appName,u=i.toast,c=nQ(),d=rp(),p=n.useQueryClient(),h=t.useState(""),f=h[0],g=h[1],m=t.useState([]),v=m[0],y=m[1],x=t.useState(Sd[0]),_=x[0],b=x[1],w=t.useState(0),S=w[0],T=w[1],C=t.useState(!1),M=C[0],I=C[1],E=t.useState(!1),A=E[0],D=E[1],k=t.useState(null),O=k[0],N=k[1],R=n.useQuery([exports.QUERY_KEY.fetchRuntimeConfigs],(function(){return fG.fetchRuntimeConfigs(Cd,s)}),{onSuccess:function(e){y(e)}}),P=R.error,L=R.isLoading,B=R.isError,j=R.isIdle,z=R.refetch,V=null===(a=null===(o=null==P?void 0:P.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error,W=function(){U(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return p.invalidateQueries(exports.QUERY_KEY.fetchRuntimeConfigs),[4,z()];case 1:return e.sent(),[2]}}))}))},G=[{name:"path",label:"Config Key",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsxs(r.Box,{children:[e.jsx("span",{children:v[i].path}),e.jsx(r.Tooltip,F({title:v[i].description,arrow:!0,placement:"top",className:c.tooltip},{children:e.jsx("img",{src:AG,alt:"info"})}))]})}}},{name:"description",label:"Config Description",options:{sort:!0,filter:!0}},{name:"value",label:"Config Value",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx("span",F({className:v[i].overriden?c.textColor:""},{children:v[i].value}))})}}},{name:"actions",label:"Actions",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var r=n.rowIndex;return e.jsxs(e.Fragment,{children:[e.jsx(er,F({size:"medium",variant:"pill",onClick:function(){return e=v[r],N(e),void I(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Update"}))})),e.jsx(er,F({size:"medium",onClick:function(){return e=v[r],N(e),void D(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Reset"}))}))]})}}}];return e.jsxs(r.Box,F({mt:2,ml:4,className:c.overrideMuiTableContainer},{children:[e.jsx(r.Typography,F({variant:"h4"},{children:"Global Runtime Configurations"})),L&&e.jsx(r.Box,F({className:d.loadingBox},{children:e.jsx(mG,{className:Y(d.icon,d.inProgressIcon)})})),(B||j&&null===v)&&e.jsxs(r.Box,F({className:d.recommendation},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(V)?V:tp.RUNTIME_CONFIGS_ERROR}),l===exports.AppName.YBM&&e.jsx(za,{text:sc(V)?V:tp.RUNTIME_CONFIGS_ERROR})]})),e.jsx(r.Box,F({display:"flex",flexDirection:"row-reverse",alignSelf:"center",mt:2},{children:e.jsx(ro,{placeholder:"Search",className:c.searchBox,onChange:function(e){return g(e.target.value)},value:f,inputProps:{"data-testid":"RuntimeConfigs-SearchInput"}})})),oc(v)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(jc,{title:"Runtime Configuration Variables",className:c.overrideMuiTable,data:v,columns:G,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:_,page:S,onChangePage:function(e){return T(e)},onChangeRowsPerPage:function(e){b(e),T(0)},searchText:f,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:Sd}})})),M&&O&&e.jsx(tQ,{open:M,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){I(!1)},toast:u}),A&&O&&e.jsx(Jq,{open:A,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){D(!1)},toast:u})]}))},exports.SQL_QUERY_REQUEST_GRAPHS=yd,exports.SplitMode=Vc,exports.SplitType=Wc,exports.TABLET_TAG=jd,exports.TABLE_REQUEST_GRAPHS=["table_scan_ops","table_tup_read_ops","table_write_ops"],exports.TABLE_TAG=Bd,exports.TIME_FILTER_LABEL=Dd,exports.TIME_FILTER_VALUES=kd,exports.TYPE="type",exports.URL_TAB_PATH=td,exports.USER_TAG="User",exports.VIEW_MORE=Ad,exports.WAIT_EVENT_MAPPING=Kc,exports.YBAlert=Xi,exports.YBButton=er,exports.YBCheckbox=Ha,exports.YBCheckboxField=bp,exports.YBCodeBlock=Ii,exports.YBCodeBlockCopy=function(n){var i=n.showCopyButton;n.analyticsEventProps;var o=n.multiBlock,a=n.text,s=n.codeClassName,l=n.preClassName,u=n.lang,c=n.containerClassName,d=n.dataTestId;n.appName;var p=n.enabledExpandCollapse,h=void 0!==p&&p,f=n.showExpandCollapse,g=void 0===f||f,m=n.collapseHeight,v=void 0===m?50:m,y=$i(),x=t.useRef(null),_=t.useRef(null),b=t.useState(!h),w=b[0],S=b[1],T=t.useState(!1),C=T[0],M=T[1],I=t.useContext(Ei).addToast,E=null!=u?u:"language-plaintext";t.useEffect((function(){pi.highlightAll()}),[a]),t.useEffect((function(){S(!1),M(!1)}),[a]);var A=function(e){return U(void 0,void 0,void 0,(function(){return H(this,(function(t){switch(t.label){case 0:return[4,navigator.clipboard.writeText(e)];case 1:return t.sent(),I(exports.AlertVariant.Success,"Successfully copied code block",2e3),[2]}}))}))},D=function(e){return U(void 0,void 0,void 0,(function(){var t,n;return H(this,(function(r){switch(r.label){case 0:return[4,A(null===(n=(null===(t=null==e?void 0:e.currentTarget)||void 0===t?void 0:t.previousSibling).innerText)||void 0===n?void 0:n.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'"))];case 1:return r.sent(),[2]}}))}))};return t.useEffect((function(){var e;w&&(null==_?void 0:_.current)&&(null===(e=null==_?void 0:_.current)||void 0===e||e.scrollTo({top:0}))}),[w]),t.useLayoutEffect((function(){var e=setTimeout((function(){var e,t;(null==_?void 0:_.current)&&M(h&&Math.round(null!==(t=null===(e=null==_?void 0:_.current)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0)>v)}),100);return function(){return clearTimeout(e)}}),[a,v,h]),e.jsxs(r.Box,F({className:Y(y.block,c),"data-testid":null!=d?d:""},{children:[e.jsx(r.Collapse,F({in:w,collapsedHeight:C||!g?v:"fit-content"},{children:e.jsx("div",F({ref:_},{children:o&&Array.isArray(a)?null==a?void 0:a.map((function(t,n){return e.jsxs("pre",F({className:Y(y.code,y.hoverBlock,l)},{children:[e.jsx("code",F({className:Y(y.innerBlock,s,E)},{children:t})),i&&e.jsx(er,F({variant:"ghost",className:Y(y.copyButton,y.inlineButton,"yb-copy-btn"),onClick:D},{children:"Copy"}))]}),"code-block-line-".concat(String(n+1)))})):e.jsxs("pre",F({className:Y(y.code,l)},{children:[e.jsx("code",F({className:Y(y.innerBlock,s,E),ref:x},{children:a})),i&&e.jsx(r.IconButton,F({className:y.copyIcon,onClick:function(e){e.stopPropagation(),function(){var e,t,n;A(null!==(n=null===(t=null===(e=null==x?void 0:x.current)||void 0===e?void 0:e.innerText)||void 0===t?void 0:t.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'"))&&void 0!==n?n:"")}()}},{children:e.jsx(mi,{fontSize:"small"})}))]}))}))})),g&&C&&e.jsx(r.Box,F({mb:1,display:"flex",alignItems:"center",justifyContent:"flex-end"},{children:e.jsxs(r.Box,F({component:"a",className:y.handPointer,display:"flex",alignItems:"center",onClick:function(){return S(!w)}},{children:[e.jsx(r.Typography,F({variant:"body2",color:"primary"},{children:e.jsx("strong",{children:w?"Collapse":"Show All"})})),e.jsx(xi,{className:Y(y.caret,w&&y.rotate)})]}))}))]}))},exports.YBDateTimePicker=vc,exports.YBErrorIndicator=eo,exports.YBInfinitePagination=kc,exports.YBInput=ro,exports.YBInputField=Oa,exports.YBLabel=no,exports.YBModal=Ic,exports.YBPagination=Ac,exports.YBPanelItem=Nc,exports.YBSelect=Fa,exports.YBTable=jc,exports.YBToggle=up,exports.YBToggleField=cp,exports.YBTooltip=Ba,exports.ZONE_TAG=Ud,exports.ZoneNodeSelector=yp,exports.filterDurations=Nd,exports.getCustomFooterComponent=np,exports.getRowCellComponent=ap,exports.isDefinedNotNull=rc,exports.isEmptyArray=ic,exports.isEmptyObject=function(e){return void 0===e||Hu(e)&&0===Object.keys(e).length},exports.isEmptyString=lc,exports.isNonEmptyArray=oc,exports.isNonEmptyObject=ac,exports.isNonEmptyString=sc,exports.isNullOrEmpty=function(e){return null==e||Hu(e)&&0===Object.keys(e).length},exports.isValidObject=uc,exports.isYAxisGreaterThanThousand=cc,exports.metricOutlierSelectors=vd,exports.metricSplitSelectors=gd,exports.otherSplitSelectors=md,exports.removeNullProperties=function(e){for(var t in e)null!==e[t]&&void 0!==e[t]||delete e[t]},exports.useCodeBlockStyles=Ki;
10
+ */var uy=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new Ig,o=n.renderer||"canvas";sy[o]||(o=Sh(sy)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new sy[o](t,i,n,e),s=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var l,u=Yp.node||Yp.worker||s?null:new Tv(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Yp.touchEventsSupported:!!c)&&(l=jh(n.pointerSize,44)),this.handler=new mg(i,a,u,a.root,l),this.animation=new sv({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},e.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return Tm(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Tm(t[i].color,1);return(n/=r)<.4}return!1}(e)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(e){var t,n=nv();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=nv();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this.handler.off(e,t)},e.prototype.trigger=function(e,t){this.handler.trigger(e,t)},e.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof ay&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete ly[e]},e}();function cy(e,t){var n=new uy(ch(),e,t);return ly[n.id]=n,n}var dy=1e-4;function py(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r)if(l>0){if(e<=i)return a;if(e>=o)return s}else{if(e>=i)return a;if(e<=o)return s}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function hy(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return Eh(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function fy(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function gy(e){return e.sort((function(e,t){return e-t})),e}function my(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(e)}function vy(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),o=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function yy(e,t){var n=Math.max(my(e),my(t)),r=e+t;return n>20?r:fy(r,n)}function xy(e){var t=2*Math.PI;return(e%t+t)%t}function _y(e){return e>-1e-4&&e<dy}var by=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function wy(e){if(e instanceof Date)return e;if(Eh(e)){var t=by.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function Sy(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function Ty(e,t){var n=Sy(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function Cy(e){var t=parseFloat(e);return t==e&&(0!==t||!Eh(e)||e.indexOf("x")<=0)?t:NaN}function My(){return Math.round(9*Math.random())}function Iy(e,t){return 0===t?e:Iy(t,e%t)}function Ey(e,t){return null==e?t:null==t?e:e*t/Iy(e,t)}"undefined"!=typeof console&&console.warn&&console.log;function Ay(e){throw new Error(e)}function Dy(e,t,n){return(t-e)*n+e}var ky="series\0";function Oy(e){return e instanceof Array?e:null==e?[]:[e]}function Ny(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var Ry=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Py(e){return!kh(e)||Mh(e)||e instanceof Date?e:e.value}function Ly(e){return kh(e)&&!(e instanceof Array)}function By(e,t,n){var r="normalMerge"===n,i="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=Xh();xh(t,(function(e,n){kh(e)||(t[n]=null)}));var s,l,u=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||Hy(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||i)&&function(e,t,n,r){xh(r,(function(i,o){if(i&&null!=i.id){var a=Fy(i.id),s=n.get(a);if(null!=s){var l=e[s];Hh(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=i,l.existing=t[s],r[o]=null}}}))}(u,e,a,t),r&&function(e,t){xh(t,(function(n,r){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var o=e[i].existing;if(!e[i].newOption&&o&&(null==o.id||null==n.id)&&!Hy(n)&&!Hy(o)&&jy("name",o,n))return e[i].newOption=n,void(t[r]=null)}}))}(u,t),r||i?function(e,t,n){xh(t,(function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Hy(r.existing)||r.existing&&null!=t.id&&!jy("id",t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}}))}(u,t,i):o&&function(e,t){xh(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(u,t),s=u,l=Xh(),xh(s,(function(e){var t=e.existing;t&&l.set(t.id,e)})),xh(s,(function(e){var t=e.newOption;Hh(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})})),xh(s,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(kh(r)){if(i.name=null!=r.name?Fy(r.name):n?n.name:ky+t,n)i.id=Fy(n.id);else if(null!=r.id)i.id=Fy(r.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(l.get(i.id))}l.set(i.id,e)}})),u}function jy(e,t,n){var r=zy(t[e],null),i=zy(n[e],null);return null!=r&&null!=i&&r===i}function Fy(e){return zy(e,"")}function zy(e,t){return null==e?t:Eh(e)?e:Dh(e)||Ah(e)?e+"":t}function Uy(e){var t=e.name;return!(!t||!t.indexOf(ky))}function Hy(e){return e&&null!=e.id&&0===Fy(e.id).indexOf("\0_ec_\0")}function Vy(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Mh(t.dataIndex)?_h(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Mh(t.name)?_h(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function Wy(){var e="__ec_inner_"+Yy++;return function(t){return t[e]||(t[e]={})}}var Yy=My();function Gy(e,t,n){var r=qy(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each((function(t,r){var i=Xy(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]})),a}function qy(e,t){var n;if(Eh(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var i=Xh(),o={},a=!1;return xh(n,(function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&mh(t.includeMainTypes,s)<0))a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e}else o[n]=e})),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var Qy={useDefault:!0,enableAll:!1,enableNone:!1},Zy={useDefault:!1,enableAll:!0,enableNone:!0};function Xy(e,t,n,r){r=r||Qy;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(Hh(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===i&&(Hh(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a}),s)}function $y(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}var Ky="___EC__COMPONENT__CONTAINER___",Jy="___EC__EXTENDED_CLASS___";function ex(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function tx(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return Ih(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return j(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(t,this)),fh(t.prototype,e),t[Jy]=!0,t.extend=this.extend,t.superCall=ix,t.superApply=ox,t.superClass=r,t}}function nx(e,t){e.extend=t.extend}var rx=Math.round(10*Math.random());function ix(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function ox(e,t,n){return this.superClass.prototype[t].apply(e,n)}function ax(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){Hh(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var i=ex(r);if(i.sub){if(i.sub!==Ky){var o=function(e){var n=t[e.main];n&&n[Ky]||((n=t[e.main]={})[Ky]=!0);return n}(i);o[i.sub]=e}}else t[i.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Ky]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=ex(e),r=[],i=t[n.main];return i&&i[Ky]?xh(i,(function(e,t){t!==Ky&&r.push(e)})):r.push(i),r},e.hasClass=function(e){var n=ex(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return xh(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=ex(e),r=t[n.main];return r&&r[Ky]}}function sx(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&mh(r,s)>=0||i&&mh(i,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var lx=sx([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ux=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return lx(this,e,t)},e}(),cx=new om(50);function dx(e){if("string"==typeof e){var t=cx.get(e);return t&&t.image}return e}function px(e,t,n,r,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=cx.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!fx(t=o.image)&&o.pending.push(a):((t=$p.loadImage(e,hx,hx)).__zrImageSrc=e,cx.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function hx(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function fx(e){return e&&e.width&&e.height}var gx=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function mx(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=vx(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=yx(o[a],i);return o.join("\n")}function vx(e,t,n,r){var i=fh({},r=r||{});i.font=t,n=jh(n,"..."),i.maxIterations=jh(r.maxIterations,2);var o=i.minChar=jh(r.minChar,0);i.cnCharWidth=zv("国",t);var a=i.ascCharWidth=zv("a",t);i.placeholder=jh(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=zv(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function yx(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=zv(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?xx(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=zv(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function xx(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}var _x=function(){},bx=function(e){this.tokens=[],e&&(this.tokens=e)},Sx=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function Tx(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,d=!1;if(r){var p=l.padding,h=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Gv(l.width,r.width)+h;u.length>0&&f+r.accumWidth>r.width&&(o=t.split("\n"),d=!0),r.accumWidth=f}else{var g=Ix(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new _x;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:zv(v,c),m||d)u.push(new bx([y]));else{var x=(u[u.length-1]||(u[0]=new bx)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var Cx=bh(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function Mx(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!Cx[e]}function Ix(e,t,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var p=e.charAt(d);if("\n"!==p){var h=zv(p,t),f=!r&&!Mx(p);(o.length?c+h>n:i+c+h>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=h):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=h)):f?(o.push(l),a.push(u),l=p,u=h):(o.push(p),a.push(h)):(c+=h,f?(l+=p,u+=h):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var Ex="__zr_style_"+Math.round(10*Math.random()),Ax={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Dx={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ax[Ex]=!0;var kx=["z","z2","invisible"],Ox=["invisible"],Nx=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype._init=function(t){for(var n=Sh(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){Rx.copy(e.getBoundingRect()),e.transform&&Rx.applyTransform(e.transform);return Px.width=t,Px.height=n,!Rx.intersect(Px)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new og(0,0,0,0)),t?og.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new og(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:fh(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return $h(Ax,e)},t.prototype.useStyle=function(e){e[Ex]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Ex]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,kx)},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=Sh(u),d=0;d<c.length;d++){(h=c[d])in s&&(s[h]=s[h],this.style[h]=u[h])}var p=Sh(s);for(d=0;d<p.length;d++){var h=p[d];this.style[h]=this.style[h]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Ox:kx;for(d=0;d<f.length;d++){h=f[d];n&&null!=n[h]?this[h]=n[h]:l&&null!=r[h]&&(this[h]=r[h])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return fh(e,t),e},t.prototype.getAnimationStyleProps=function(){return Dx},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(iy),Rx=new og(0,0,0,0),Px=new og(0,0,0,0);var Lx=Nx,Bx=Math.min,jx=Math.max,Fx=Math.sin,zx=Math.cos,Ux=2*Math.PI,Hx=nf(),Vx=nf(),Wx=nf();function Yx(e,t,n,r,i,o){i[0]=Bx(e,n),i[1]=Bx(t,r),o[0]=jx(e,n),o[1]=jx(t,r)}var Gx=[],qx=[];function Qx(e,t,n,r,i,o,a,s,l,u){var c=Yg,d=Hg,p=c(e,n,i,a,Gx);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var f=d(e,n,i,a,Gx[h]);l[0]=Bx(f,l[0]),u[0]=jx(f,u[0])}p=c(t,r,o,s,qx);for(h=0;h<p;h++){var g=d(t,r,o,s,qx[h]);l[1]=Bx(g,l[1]),u[1]=jx(g,u[1])}l[0]=Bx(e,l[0]),u[0]=jx(e,u[0]),l[0]=Bx(a,l[0]),u[0]=jx(a,u[0]),l[1]=Bx(t,l[1]),u[1]=jx(t,u[1]),l[1]=Bx(s,l[1]),u[1]=jx(s,u[1])}function Zx(e,t,n,r,i,o,a,s){var l=Xg,u=Qg,c=jx(Bx(l(e,n,i),1),0),d=jx(Bx(l(t,r,o),1),0),p=u(e,n,i,c),h=u(t,r,o,d);a[0]=Bx(e,i,p),a[1]=Bx(t,o,h),s[0]=jx(e,i,p),s[1]=jx(t,o,h)}function Xx(e,t,n,r,i,o,a,s,l){var u=hf,c=ff,d=Math.abs(i-o);if(d%Ux<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Hx[0]=zx(i)*n+e,Hx[1]=Fx(i)*r+t,Vx[0]=zx(o)*n+e,Vx[1]=Fx(o)*r+t,u(s,Hx,Vx),c(l,Hx,Vx),(i%=Ux)<0&&(i+=Ux),(o%=Ux)<0&&(o+=Ux),i>o&&!a?o+=Ux:i<o&&a&&(i+=Ux),a){var p=o;o=i,i=p}for(var h=0;h<o;h+=Math.PI/2)h>i&&(Wx[0]=zx(h)*n+e,Wx[1]=Fx(h)*r+t,u(s,Wx,s),c(l,Wx,l))}var $x={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Kx=[],Jx=[],e_=[],t_=[],n_=[],r_=[],i_=Math.min,o_=Math.max,a_=Math.cos,s_=Math.sin,l_=Math.abs,u_=Math.PI,c_=2*u_,d_="undefined"!=typeof Float32Array,p_=[];function h_(e){return Math.round(e/u_*1e8)/1e8%2*u_}var f_=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=l_(n/Mv/e)||0,this._uy=l_(n/Mv/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData($x.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=l_(e-this._xi),r=l_(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData($x.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData($x.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData($x.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),p_[0]=r,p_[1]=i,function(e,t){var n=h_(e[0]);n<0&&(n+=c_);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=c_?i=n+c_:t&&n-i>=c_?i=n-c_:!t&&n>i?i=n+(c_-h_(n-i)):t&&n<i&&(i=n-(c_-h_(i-n))),e[0]=n,e[1]=i}(p_,o),r=p_[0];var a=(i=p_[1])-r;return this.addData($x.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=a_(i)*n+e,this._yi=s_(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData($x.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData($x.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!d_||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();d_&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},e.prototype.addData=function(e,t,n,r,i,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,d_&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){e_[0]=e_[1]=n_[0]=n_[1]=Number.MAX_VALUE,t_[0]=t_[1]=r_[0]=r_[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(i=n=t[e],o=r=t[e+1]),a){case $x.M:n=i=t[e++],r=o=t[e++],n_[0]=i,n_[1]=o,r_[0]=i,r_[1]=o;break;case $x.L:Yx(n,r,t[e],t[e+1],n_,r_),n=t[e++],r=t[e++];break;case $x.C:Qx(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],n_,r_),n=t[e++],r=t[e++];break;case $x.Q:Zx(n,r,t[e++],t[e++],t[e],t[e+1],n_,r_),n=t[e++],r=t[e++];break;case $x.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],p=t[e++],h=t[e++]+p;e+=1;var f=!t[e++];s&&(i=a_(p)*c+l,o=s_(p)*d+u),Xx(l,u,c,d,p,h,f,n_,r_),n=a_(h)*c+l,r=s_(h)*d+u;break;case $x.R:Yx(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],n_,r_);break;case $x.Z:n=i,r=o}hf(e_,e_,n_),ff(t_,t_,r_)}return 0===e&&(e_[0]=e_[1]=t_[0]=t_[1]=0),new og(e_[0],e_[1],t_[0]-e_[0],t_[1]-e_[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var p=e[d++],h=1===d;h&&(a=i=e[d],s=o=e[d+1]);var f=-1;switch(p){case $x.M:i=a=e[d++],o=s=e[d++];break;case $x.L:var g=e[d++],m=(x=e[d++])-o;(l_(A=g-i)>n||l_(m)>r||d===t-1)&&(f=Math.sqrt(A*A+m*m),i=g,o=x);break;case $x.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=qg(i,o,v,y,g,x,_,b,10),i=_,o=b;break;case $x.Q:f=Kg(i,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,o=x;break;case $x.A:var w=e[d++],S=e[d++],T=e[d++],C=e[d++],M=e[d++],I=e[d++],E=I+M;d+=1,e[d++],h&&(a=a_(M)*T+w,s=s_(M)*C+S),f=o_(T,C)*i_(c_,Math.abs(I)),i=a_(E)*T+w,o=s_(E)*C+S;break;case $x.R:a=i=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case $x.Z:var A=a-i;m=s-o;f=Math.sqrt(A*A+m*m),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,d,p=this.data,h=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var b=p[_++],w=1===_;switch(w&&(n=i=p[_],r=o=p[_+1]),b!==$x.L&&x>0&&(e.lineTo(c,d),x=0),b){case $x.M:n=i=p[_++],r=o=p[_++],e.moveTo(i,o);break;case $x.L:a=p[_++],s=p[_++];var S=l_(a-i),T=l_(s-o);if(S>h||T>f){if(m){if(v+(Q=l[y++])>u){var C=(u-v)/Q;e.lineTo(i*(1-C)+a*C,o*(1-C)+s*C);break e}v+=Q}e.lineTo(a,s),i=a,o=s,x=0}else{var M=S*S+T*T;M>x&&(c=a,d=s,x=M)}break;case $x.C:var I=p[_++],E=p[_++],A=p[_++],D=p[_++],k=p[_++],O=p[_++];if(m){if(v+(Q=l[y++])>u){Gg(i,I,A,k,C=(u-v)/Q,Kx),Gg(o,E,D,O,C,Jx),e.bezierCurveTo(Kx[1],Jx[1],Kx[2],Jx[2],Kx[3],Jx[3]);break e}v+=Q}e.bezierCurveTo(I,E,A,D,k,O),i=k,o=O;break;case $x.Q:I=p[_++],E=p[_++],A=p[_++],D=p[_++];if(m){if(v+(Q=l[y++])>u){$g(i,I,A,C=(u-v)/Q,Kx),$g(o,E,D,C,Jx),e.quadraticCurveTo(Kx[1],Jx[1],Kx[2],Jx[2]);break e}v+=Q}e.quadraticCurveTo(I,E,A,D),i=A,o=D;break;case $x.A:var N=p[_++],R=p[_++],P=p[_++],L=p[_++],B=p[_++],j=p[_++],F=p[_++],z=!p[_++],U=P>L?P:L,H=l_(P-L)>.001,V=B+j,W=!1;if(m)v+(Q=l[y++])>u&&(V=B+j*(u-v)/Q,W=!0),v+=Q;if(H&&e.ellipse?e.ellipse(N,R,P,L,F,B,V,z):e.arc(N,R,U,B,V,z),W)break e;w&&(n=a_(B)*P+N,r=s_(B)*L+R),i=a_(V)*P+N,o=s_(V)*L+R;break;case $x.R:n=i=p[_],r=o=p[_+1],a=p[_++],s=p[_++];var Y=p[_++],G=p[_++];if(m){if(v+(Q=l[y++])>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+i_(q,Y),s),(q-=Y)>0&&e.lineTo(a+Y,s+i_(q,G)),(q-=G)>0&&e.lineTo(a+o_(Y-q,0),s+G),(q-=Y)>0&&e.lineTo(a,s+o_(G-q,0));break e}v+=Q}e.rect(a,s,Y,G);break;case $x.Z:if(m){var Q;if(v+(Q=l[y++])>u){C=(u-v)/Q;e.lineTo(i*(1-C)+n*C,o*(1-C)+r*C);break e}v+=Q}e.closePath(),i=n,o=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=$x,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),g_=f_;function m_(e,t,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||o>e+s&&o>n+s||o<e-s&&o<n-s)return!1;if(e===n)return Math.abs(o-e)<=s/2;var u=(l=(t-r)/(e-n))*o-a+(e*r-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function v_(e,t,n,r,i,o,a,s,l,u,c){if(0===l)return!1;var d=l;if(c>t+d&&c>r+d&&c>o+d&&c>s+d||c<t-d&&c<r-d&&c<o-d&&c<s-d||u>e+d&&u>n+d&&u>i+d&&u>a+d||u<e-d&&u<n-d&&u<i-d&&u<a-d)return!1;var p=function(e,t,n,r,i,o,a,s,l,u,c){var d,p,h,f,g,m=.005,v=1/0;Bg[0]=l,Bg[1]=u;for(var y=0;y<1;y+=.05)jg[0]=Hg(e,n,i,a,y),jg[1]=Hg(t,r,o,s,y),(f=df(Bg,jg))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Rg);x++)p=d-m,h=d+m,jg[0]=Hg(e,n,i,a,p),jg[1]=Hg(t,r,o,s,p),f=df(jg,Bg),p>=0&&f<v?(d=p,v=f):(Fg[0]=Hg(e,n,i,a,h),Fg[1]=Hg(t,r,o,s,h),g=df(Fg,Bg),h<=1&&g<v?(d=h,v=g):m*=.5);return c&&(c[0]=Hg(e,n,i,a,d),c[1]=Hg(t,r,o,s,d)),Og(v)}(e,t,n,r,i,o,a,s,u,c,null);return p<=d/2}function y_(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;if(l>t+u&&l>r+u&&l>o+u||l<t-u&&l<r-u&&l<o-u||s>e+u&&s>n+u&&s>i+u||s<e-u&&s<n-u&&s<i-u)return!1;var c=function(e,t,n,r,i,o,a,s,l){var u,c=.005,d=1/0;Bg[0]=a,Bg[1]=s;for(var p=0;p<1;p+=.05)jg[0]=Qg(e,n,i,p),jg[1]=Qg(t,r,o,p),(m=df(Bg,jg))<d&&(u=p,d=m);d=1/0;for(var h=0;h<32&&!(c<Rg);h++){var f=u-c,g=u+c;jg[0]=Qg(e,n,i,f),jg[1]=Qg(t,r,o,f);var m=df(jg,Bg);if(f>=0&&m<d)u=f,d=m;else{Fg[0]=Qg(e,n,i,g),Fg[1]=Qg(t,r,o,g);var v=df(Fg,Bg);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=Qg(e,n,i,u),l[1]=Qg(t,r,o,u)),Og(d)}(e,t,n,r,i,o,s,l,null);return c<=u/2}var x_=2*Math.PI;function __(e){return(e%=x_)<0&&(e+=x_),e}var b_=2*Math.PI;function w_(e,t,n,r,i,o,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(r-i)%b_<1e-4)return!0;if(o){var d=r;r=__(i),i=__(d)}else r=__(r),i=__(i);r>i&&(i+=b_);var p=Math.atan2(l,s);return p<0&&(p+=b_),p>=r&&p<=i||p+b_>=r&&p+b_<=i}function S_(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r)return 0;if(r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var T_=g_.CMD,C_=2*Math.PI;var M_=[-1,-1,-1],I_=[-1,-1];function E_(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c,d=Wg(t,r,o,s,u,M_);if(0===d)return 0;for(var p=0,h=-1,f=void 0,g=void 0,m=0;m<d;m++){var v=M_[m],y=0===v||1===v?.5:1;Hg(e,n,i,a,v)<l||(h<0&&(h=Yg(t,r,o,s,I_),I_[1]<I_[0]&&h>1&&(c=void 0,c=I_[0],I_[0]=I_[1],I_[1]=c),f=Hg(t,r,o,s,I_[0]),h>1&&(g=Hg(t,r,o,s,I_[1]))),2===h?v<I_[0]?p+=f<t?y:-y:v<I_[1]?p+=g<f?y:-y:p+=s<g?y:-y:v<I_[0]?p+=f<t?y:-y:p+=s<f?y:-y)}return p}function A_(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(zg(o))Ug(a)&&(c=-s/a)>=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(zg(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,d=Og(u),p=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}(t,r,o,s,M_);if(0===l)return 0;var u=Xg(t,r,o);if(u>=0&&u<=1){for(var c=0,d=Qg(t,r,o,u),p=0;p<l;p++){var h=0===M_[p]||1===M_[p]?.5:1;Qg(e,n,i,M_[p])<a||(M_[p]<u?c+=d<t?h:-h:c+=o<d?h:-h)}return c}h=0===M_[0]||1===M_[0]?.5:1;return Qg(e,n,i,M_[0])<a?0:o<t?h:-h}function D_(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);M_[0]=-l,M_[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=C_-1e-4){r=0,i=C_;var c=o?1:-1;return a>=M_[0]+e&&a<=M_[1]+e?c:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=C_,i+=C_);for(var p=0,h=0;h<2;h++){var f=M_[h];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=C_+g),(g>=r&&g<=i||g+C_>=r&&g+C_<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function k_(e,t,n,r,i){for(var o,a,s,l,u=e.data,c=e.len(),d=0,p=0,h=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===T_.M&&m>1&&(n||(d+=S_(p,h,f,g,r,i))),y&&(f=p=u[m],g=h=u[m+1]),v){case T_.M:p=f=u[m++],h=g=u[m++];break;case T_.L:if(n){if(m_(p,h,u[m],u[m+1],t,r,i))return!0}else d+=S_(p,h,u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case T_.C:if(n){if(v_(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=E_(p,h,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case T_.Q:if(n){if(y_(p,h,u[m++],u[m++],u[m],u[m+1],t,r,i))return!0}else d+=A_(p,h,u[m++],u[m++],u[m],u[m+1],r,i)||0;p=u[m++],h=u[m++];break;case T_.A:var x=u[m++],_=u[m++],b=u[m++],w=u[m++],S=u[m++],T=u[m++];m+=1;var C=!!(1-u[m++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,y?(f=o,g=a):d+=S_(p,h,o,a,r,i);var M=(r-x)*w/b+x;if(n){if(w_(x,_,w,S,S+T,C,t,M,i))return!0}else d+=D_(x,_,w,S,S+T,C,M,i);p=Math.cos(S+T)*b+x,h=Math.sin(S+T)*w+_;break;case T_.R:if(f=p=u[m++],g=h=u[m++],o=f+u[m++],a=g+u[m++],n){if(m_(f,g,o,g,t,r,i)||m_(o,g,o,a,t,r,i)||m_(o,a,f,a,t,r,i)||m_(f,a,f,g,t,r,i))return!0}else d+=S_(o,g,o,a,r,i),d+=S_(f,a,f,g,r,i);break;case T_.Z:if(n){if(m_(p,h,f,g,t,r,i))return!0}else d+=S_(p,h,f,g,r,i);p=f,h=g}}return n||(s=h,l=g,Math.abs(s-l)<1e-4)||(d+=S_(p,h,f,g,r,i)||0),0!==d}var O_=gh({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ax),N_={style:gh({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Dx.style)},R_=Bv.concat(["invisible","culling","z","z2","zlevel","parent"]),P_=function(e){function t(t){return e.call(this,t)||this}var n;return j(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<R_.length;++s)i[R_[s]]=this[R_[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=Sh(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?fh(this.style,a):this.useStyle(a):"shape"===o?fh(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(Eh(e)){var t=Tm(e,0);return t>.5?Iv:t>.2?"#eee":Ev}if(e)return Ev}return Iv},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Eh(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Tm(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new g_(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return k_(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return k_(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:fh(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return $h(O_,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=fh({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=fh({},r.shape),fh(s,n.shape)):(s=fh({},i?this.shape:r.shape),fh(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=fh({},this.shape);for(var u={},c=Sh(s),d=0;d<c.length;d++){var p=c[d];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return N_},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return j(n,t),n.prototype.getDefaultStyle=function(){return ph(e.style)},n.prototype.getDefaultShape=function(){return ph(e.shape)},n}(t);for(var r in e)"function"==typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Lx),L_=P_,B_=gh({strokeFirst:!0,font:qp,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},O_),j_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return $h(B_,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Hv(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Lx);j_.prototype.type="tspan";var F_=j_,z_=gh({x:0,y:0},Ax),U_={style:gh({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Dx.style)};var H_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.createStyle=function(e){return $h(z_,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r=function(e){return!!(e&&"string"!=typeof e&&e.width&&e.height)}(t.image)?t.image:this.__image;if(!r)return 0;var i="width"===e?"height":"width",o=t[i];return null==o?r[e]:r[e]/r[i]*o},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return U_},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new og(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Lx);H_.prototype.type="image";var V_=H_;var W_=Math.round;function Y_(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(W_(2*r)===W_(2*i)&&(e.x1=e.x2=q_(r,s,!0)),W_(2*o)===W_(2*a)&&(e.y1=e.y2=q_(o,s,!0)),e):e}}function G_(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=q_(r,s,!0),e.y=q_(i,s,!0),e.width=Math.max(q_(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(q_(i+a,s,!1)-e.y,0===a?0:1),e):e}}function q_(e,t,n){if(!t)return e;var r=W_(2*e);return(r+W_(t))%2==0?r/2:(r+(n?1:-1))/2}var Q_=function(){this.x=0,this.y=0,this.width=0,this.height=0},Z_={},X_=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Q_},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=G_(Z_,t,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,i=t.width,o=t.height;t.r?function(e,t){var n,r,i,o,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=i=o=d:d instanceof Array?1===d.length?n=r=i=o=d[0]:2===d.length?(n=i=d[0],r=o=d[1]):3===d.length?(n=d[0],r=o=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],o=d[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-i),0!==i&&e.arc(s+u-i,l+c-i,i,0,Math.PI/2),e.lineTo(s+o,l+c),0!==o&&e.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,i,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(L_);X_.prototype.type="rect";var $_=X_,K_={fill:"#000"},J_={style:gh({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Dx.style)},eb=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=K_,n.attr(t),n}return j(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,sb(e=this.style),xh(e.rich,sb),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new og(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||K_},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return fh(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=Sh(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},fh(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return J_},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||qp,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a="truncate"===r,s=Yv(o),l=jh(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=t.width,p=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?Ix(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,h=jh(t.height,p);if(p>h&&c){var f=Math.floor(h/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var g=vx(d,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m=0;m<n.length;m++)n[m]=yx(n[m],g);var v=h,y=0;for(m=0;m<n.length;m++)y=Math.max(zv(n[m],o),y);null==d&&(d=y);var x=y;return i&&(v+=i[0]+i[2],x+=i[1]+i[3],d+=i[1]+i[3]),u&&(x=d),{lines:n,height:h,outerWidth:x,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:p,width:d}}(db(e),e),i=pb(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,d=this._defaultStyle,p=e.x||0,h=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=p,v=Wv(h,r.contentHeight,g);if(i||n){var y=Vv(p,s,f),x=Wv(h,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=cb(p,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(ub("fill"in e?e.fill:(b=!0,d.fill))),S=(lb("stroke"in e?e.stroke:o||d.autoStroke&&!b?null:(_=2,d.stroke))),T=e.textShadowBlur>0,C=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,I=0;I<u.length;I++){var E=this._getOrCreateChild(F_),A=E.createStyle();E.useStyle(A),A.text=u[I],A.x=m,A.y=v,f&&(A.textAlign=f),A.textBaseline="middle",A.opacity=e.opacity,A.strokeFirst=!0,T&&(A.shadowBlur=e.textShadowBlur||0,A.shadowColor=e.textShadowColor||"transparent",A.shadowOffsetX=e.textShadowOffsetX||0,A.shadowOffsetY=e.textShadowOffsetY||0),A.stroke=S,A.fill=w,S&&(A.lineWidth=e.lineWidth||_,A.lineDash=e.lineDash,A.lineDashOffset=e.lineDashOffset||0),A.font=t,ob(A,e),v+=c,C&&E.setBoundingRect(new og(Vv(A.x,e.width,A.textAlign),Wv(A.y,M,A.textBaseline),l,M))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new Sx;if(null!=e&&(e+=""),!e)return n;for(var r,i=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},l=gx.lastIndex=0;null!=(r=gx.exec(e));){var u=r.index;u>l&&Tx(n,e.substring(l,u),t,s),Tx(n,r[2],t,s,r[1]),l=gx.lastIndex}l<e.length&&Tx(n,e.substring(l,e.length),t,s);var c=[],d=0,p=0,h=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,p=Math.max(p,t)}e:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],x=0,_=0,b=0;b<y.tokens.length;b++){var w=(O=y.tokens[b]).styleName&&t.rich[O.styleName]||{},S=O.textPadding=w.padding,T=S?S[1]+S[3]:0,C=O.font=w.font||t.font;O.contentHeight=Yv(C);var M=jh(w.height,O.contentHeight);if(O.innerHeight=M,S&&(M+=S[0]+S[2]),O.height=M,O.lineHeight=Fh(w.lineHeight,t.lineHeight,M),O.align=w&&w.align||t.align,O.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=o&&d+O.lineHeight>o){b>0?(y.tokens=y.tokens.slice(0,b),m(y,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var I=w.width,E=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))O.percentWidth=I,c.push(O),O.contentWidth=zv(O.text,C);else{if(E){var A=w.backgroundColor,D=A&&A.image;D&&fx(D=dx(D))&&(O.width=Math.max(O.width,D.width*M/D.height))}var k=f&&null!=i?i-_:null;null!=k&&k<O.width?!E||k<T?(O.text="",O.width=O.contentWidth=0):(O.text=mx(O.text,k-T,C,t.ellipsis,{minChar:t.truncateMinChar}),O.width=O.contentWidth=zv(O.text,C)):O.contentWidth=zv(O.text,C)}O.width+=T,_+=O.width,w&&(x=Math.max(x,O.lineHeight))}m(y,_,x)}for(n.outerWidth=n.width=jh(i,p),n.outerHeight=n.height=jh(o,d),n.contentHeight=d,n.contentWidth=p,h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]),v=0;v<c.length;v++){var O,N=(O=c[v]).percentWidth;O.width=parseInt(N,10)/100*n.width}return n}(db(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign,d=Vv(a,r,u),p=Wv(s,i,c),h=d,f=p;o&&(h+=o[3],f+=o[0]);var g=h+n;pb(e)&&this._renderBackground(e,e,d,p,r,i);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,_=x.length,b=y.lineHeight,w=y.width,S=0,T=h,C=g,M=_-1,I=void 0;S<_&&(!(I=x[S]).align||"left"===I.align);)this._placeToken(I,e,b,f,T,"left",m),w-=I.width,T+=I.width,S++;for(;M>=0&&"right"===(I=x[M]).align;)this._placeToken(I,e,b,f,C,"right",m),w-=I.width,C-=I.width,M--;for(T+=(n-(T-h)-(g-C)-w)/2;S<=M;)I=x[S],this._placeToken(I,e,b,f,T+I.width/2,"center",m),T+=I.width,S++;f+=b}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&pb(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(i=cb(i,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(F_),h=p.createStyle();p.useStyle(h);var f=this._defaultStyle,g=!1,m=0,v=ub("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=lb("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=i,h.y=u,x&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=o,h.textBaseline="middle",h.font=e.font||qp,h.opacity=Fh(s.opacity,t.opacity,1),ob(h,s),y&&(h.lineWidth=Fh(s.lineWidth,t.lineWidth,m),h.lineDash=jh(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=y),v&&(h.fill=v);var _=e.contentWidth,b=e.contentHeight;p.setBoundingRect(new og(Vv(h.x,_,h.textAlign),Wv(h.y,b,h.textBaseline),_,b))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,p=u&&u.image,h=u&&!p,f=e.borderRadius,g=this;if(h||e.lineHeight||c&&d){(a=this._getOrCreateChild($_)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=i,m.height=o,m.r=f,a.dirtyShape()}if(h)(l=a.style).fill=u||null,l.fillOpacity=jh(e.fillOpacity,1);else if(p){(s=this._getOrCreateChild(V_)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=i,v.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=jh(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Fh(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return ab(e)&&(t=[e.fontStyle,e.fontWeight,ib(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Vh(t)||e.textFont||e.font},t}(Lx),tb={left:!0,right:1,center:1},nb={top:1,bottom:1,middle:1},rb=["fontStyle","fontWeight","fontSize","fontFamily"];function ib(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function ob(e,t){for(var n=0;n<rb.length;n++){var r=rb[n],i=t[r];null!=i&&(e[r]=i)}}function ab(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function sb(e){if(e){e.font=eb.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||tb[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||nb[n]?n:"top",e.padding&&(e.padding=Uh(e.padding))}}function lb(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function ub(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function cb(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function db(e){var t=e.text;return null!=t&&(t+=""),t}function pb(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var hb=eb,fb=Wy(),gb=1,mb={},vb=Wy(),yb=Wy(),xb=["emphasis","blur","select"],_b=["normal","emphasis","blur","select"],bb="highlight",wb="downplay",Sb="select",Tb="unselect",Cb="toggleSelect";function Mb(e){return null!=e&&"none"!==e}var Ib=new om(100);function Eb(e){if(Eh(e)){var t=Ib.get(e);return t||(t=_m(e,-.1),Ib.put(e,t)),t}if(Ph(e)){var n=fh({},e);return n.colorStops=_h(e.colorStops,(function(e){return{offset:e.offset,color:_m(e.color,-.1)}})),n}return e}function Ab(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Db(e){Ab(e,"emphasis",2)}function kb(e){2===e.hoverState&&Ab(e,"normal",0)}function Ob(e){Ab(e,"blur",1)}function Nb(e){1===e.hoverState&&Ab(e,"normal",0)}function Rb(e){e.selected=!0}function Pb(e){e.selected=!1}function Lb(e,t,n){t(e,n)}function Bb(e,t,n){Lb(e,t,n),e.isGroup&&e.traverse((function(e){Lb(e,t,n)}))}function jb(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function Fb(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&mh(n,"select")>=0,o=!1;if(e instanceof L_){var a=vb(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(Mb(s)||Mb(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=fh({},r),(u=fh({},u)).fill=s):!Mb(u.fill)&&Mb(s)?(o=!0,r=fh({},r),(u=fh({},u)).fill=Eb(s)):!Mb(u.stroke)&&Mb(l)&&(o||(r=fh({},r),u=fh({},u)),u.stroke=Eb(l)),r.style=u}}if(r&&null==r.z2){o||(r=fh({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=mh(e.currentStates,t)>=0,i=e.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=fh({},n),a=fh({opacity:r?i:.1*o.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=fh({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,n)}return n}function zb(e){e.stateProxy=Fb;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Fb),n&&(n.stateProxy=Fb)}function Ub(e,t){!Qb(e,t)&&!e.__highByOuter&&Bb(e,Db)}function Hb(e,t){!Qb(e,t)&&!e.__highByOuter&&Bb(e,kb)}function Vb(e,t){e.__highByOuter|=1<<(t||0),Bb(e,Db)}function Wb(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Bb(e,kb)}function Yb(e){Bb(e,Nb)}function Gb(e){Bb(e,Rb)}function qb(e){Bb(e,Pb)}function Qb(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zb(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=yb(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(e){Nb(e)})),a&&n.push(i)),o.isBlured=!1})),xh(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Xb(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Yb(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries((function(e){var i=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&s?u===s:i)||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&i&&"self"===t||Ob(e)})),yh(t))o(e.getData(),t);else if(kh(t))for(var c=Sh(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),yb(e).isBlured=!0}})),i.eachComponent((function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}}))}}function $b(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){yb(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse((function(e){Ob(e)}))}}}function Kb(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var o=r.getModel().getComponent(e,t);if(!o)return i;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return i;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===fb(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Jb(e){xh(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?Gb(t):qb(t)}))}))}function ew(e){var t=[];return e.eachSeries((function(e){xh(e.getAllData(),(function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(o.dataType=r),t.push(o)}}))})),t}function tw(e,t,n){aw(e,!0),Bb(e,zb),function(e,t,n){var r=fb(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function nw(e,t,n,r){r?function(e){aw(e,!1)}(e):tw(e,t,n)}var rw=["emphasis","blur","select"],iw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ow(e,t,n,r){n=n||"itemStyle";for(var i=0;i<rw.length;i++){var o=rw[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[iw[n]]()}}function aw(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function sw(e){return!(!e||!e.__highDownDispatcher)}function lw(e){var t=e.type;return t===Sb||t===Tb||t===Cb}function uw(e){var t=e.type;return t===bb||t===wb}var cw=g_.CMD,dw=[[],[],[]],pw=Math.sqrt,hw=Math.atan2;var fw=Math.sqrt,gw=Math.sin,mw=Math.cos,vw=Math.PI;function yw(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function xw(e,t){return(e[0]*t[0]+e[1]*t[1])/(yw(e)*yw(t))}function _w(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(xw(e,t))}function bw(e,t,n,r,i,o,a,s,l,u,c){var d=l*(vw/180),p=mw(d)*(e-n)/2+gw(d)*(t-r)/2,h=-1*gw(d)*(e-n)/2+mw(d)*(t-r)/2,f=p*p/(a*a)+h*h/(s*s);f>1&&(a*=fw(f),s*=fw(f));var g=(i===o?-1:1)*fw((a*a*(s*s)-a*a*(h*h)-s*s*(p*p))/(a*a*(h*h)+s*s*(p*p)))||0,m=g*a*h/s,v=g*-s*p/a,y=(e+n)/2+mw(d)*m-gw(d)*v,x=(t+r)/2+gw(d)*m+mw(d)*v,_=_w([1,0],[(p-m)/a,(h-v)/s]),b=[(p-m)/a,(h-v)/s],w=[(-1*p-m)/a,(-1*h-v)/s],S=_w(b,w);if(xw(b,w)<=-1&&(S=vw),xw(b,w)>=1&&(S=0),S<0){var T=Math.round(S/vw*1e6)/1e6;S=2*vw+T%2*vw}c.addData(u,y,x,a,s,_,S,d,o)}var ww=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Sw=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Tw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.applyTransform=function(e){},t}(L_);function Cw(e){return null!=e.setData}function Mw(e,t){var n=function(e){var t=new g_;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=g_.CMD,l=e.match(ww);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),p=void 0,h=c.match(Sw)||[],f=h.length,g=0;g<f;g++)h[g]=parseFloat(h[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,T=r,C=i,M=void 0,I=void 0;switch(d){case"l":r+=h[m++],i+=h[m++],p=s.L,t.addData(p,r,i);break;case"L":r=h[m++],i=h[m++],p=s.L,t.addData(p,r,i);break;case"m":r+=h[m++],i+=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="l";break;case"M":r=h[m++],i=h[m++],p=s.M,t.addData(p,r,i),o=r,a=i,d="L";break;case"h":r+=h[m++],p=s.L,t.addData(p,r,i);break;case"H":r=h[m++],p=s.L,t.addData(p,r,i);break;case"v":i+=h[m++],p=s.L,t.addData(p,r,i);break;case"V":i=h[m++],p=s.L,t.addData(p,r,i);break;case"C":p=s.C,t.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),r=h[m-2],i=h[m-1];break;case"c":p=s.C,t.addData(p,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i,h[m++]+r,h[m++]+i),r+=h[m-2],i+=h[m-1];break;case"S":v=r,y=i,M=t.len(),I=t.data,n===s.C&&(v+=r-I[M-4],y+=i-I[M-3]),p=s.C,T=h[m++],C=h[m++],r=h[m++],i=h[m++],t.addData(p,v,y,T,C,r,i);break;case"s":v=r,y=i,M=t.len(),I=t.data,n===s.C&&(v+=r-I[M-4],y+=i-I[M-3]),p=s.C,T=r+h[m++],C=i+h[m++],r+=h[m++],i+=h[m++],t.addData(p,v,y,T,C,r,i);break;case"Q":T=h[m++],C=h[m++],r=h[m++],i=h[m++],p=s.Q,t.addData(p,T,C,r,i);break;case"q":T=h[m++]+r,C=h[m++]+i,r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,T,C,r,i);break;case"T":v=r,y=i,M=t.len(),I=t.data,n===s.Q&&(v+=r-I[M-4],y+=i-I[M-3]),r=h[m++],i=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"t":v=r,y=i,M=t.len(),I=t.data,n===s.Q&&(v+=r-I[M-4],y+=i-I[M-3]),r+=h[m++],i+=h[m++],p=s.Q,t.addData(p,v,y,r,i);break;case"A":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],bw(T=r,C=i,r=h[m++],i=h[m++],w,S,x,_,b,p=s.A,t);break;case"a":x=h[m++],_=h[m++],b=h[m++],w=h[m++],S=h[m++],bw(T=r,C=i,r+=h[m++],i+=h[m++],w,S,x,_,b,p=s.A,t)}}"z"!==d&&"Z"!==d||(p=s.Z,t.addData(p),r=o,i=a),n=p}return t.toStatic(),t}(e),r=fh({},t);return r.buildPath=function(e){if(Cw(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){!function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=cw.M,d=cw.C,p=cw.L,h=cw.R,f=cw.A,g=cw.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case p:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=pw(t[0]*t[0]+t[1]*t[1]),x=pw(t[2]*t[2]+t[3]*t[3]),_=hw(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=_,l[i++]+=_,o=i+=2;break;case h:s[0]=l[i++],s[1]=l[i++],pf(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],pf(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var b=dw[a];b[0]=l[i++],b[1]=l[i++],pf(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}(n,e),this.dirtyShape()},r}var Iw=function(){this.cx=0,this.cy=0,this.r=0},Ew=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Iw},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(L_);Ew.prototype.type="circle";var Aw=Ew,Dw=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},kw=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Dw},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,o=t.rx,a=t.ry,s=o*n,l=a*n;e.moveTo(r-o,i),e.bezierCurveTo(r-o,i-l,r-s,i-a,r,i-a),e.bezierCurveTo(r+s,i-a,r+o,i-l,r+o,i),e.bezierCurveTo(r+o,i+l,r+s,i+a,r,i+a),e.bezierCurveTo(r-s,i+a,r-o,i+l,r-o,i),e.closePath()},t}(L_);kw.prototype.type="ellipse";var Ow=kw,Nw=Math.PI,Rw=2*Nw,Pw=Math.sin,Lw=Math.cos,Bw=Math.acos,jw=Math.atan2,Fw=Math.abs,zw=Math.sqrt,Uw=Math.max,Hw=Math.min,Vw=1e-4;function Ww(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/zw(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,g=r+d,m=(p+f)/2,v=(h+g)/2,y=f-p,x=g-h,_=y*y+x*x,b=i-o,w=p*g-f*h,S=(x<0?-1:1)*zw(Uw(0,b*b*_-w*w)),T=(w*x-y*S)/_,C=(-w*y-x*S)/_,M=(w*x+y*S)/_,I=(-w*y+x*S)/_,E=T-m,A=C-v,D=M-m,k=I-v;return E*E+A*A>D*D+k*k&&(T=M,C=I),{cx:T,cy:C,x0:-c,y0:-d,x1:T*(i/b-1),y1:C*(i/b-1)}}function Yw(e,t){var n,r=Uw(t.r,0),i=Uw(t.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,p=Fw(l-s),h=p>Rw&&p%Rw;if(h>Vw&&(p=h),r>Vw)if(p>Rw-Vw)e.moveTo(u+r*Lw(s),c+r*Pw(s)),e.arc(u,c,r,s,l,!d),i>Vw&&(e.moveTo(u+i*Lw(l),c+i*Pw(l)),e.arc(u,c,i,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,T=void 0,C=void 0,M=void 0,I=void 0,E=void 0,A=void 0,D=r*Lw(s),k=r*Pw(s),O=i*Lw(l),N=i*Pw(l),R=p>Vw;if(R){var P=t.cornerRadius;P&&(n=function(e){var t;if(Mh(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(P),f=n[0],g=n[1],m=n[2],v=n[3]);var L=Fw(r-i)/2;if(y=Hw(L,m),x=Hw(L,v),_=Hw(L,f),b=Hw(L,g),T=w=Uw(y,x),C=S=Uw(_,b),(w>Vw||S>Vw)&&(M=r*Lw(l),I=r*Pw(l),E=i*Lw(s),A=i*Pw(s),p<Nw)){var B=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,d=s-o,p=d*l-c*u;if(!(p*p<Vw))return[e+(p=(c*(t-o)-d*(e-i))/p)*l,t+p*u]}(D,k,E,A,M,I,O,N);if(B){var j=D-B[0],F=k-B[1],z=M-B[0],U=I-B[1],H=1/Pw(Bw((j*z+F*U)/(zw(j*j+F*F)*zw(z*z+U*U)))/2),V=zw(B[0]*B[0]+B[1]*B[1]);T=Hw(w,(r-V)/(H+1)),C=Hw(S,(i-V)/(H-1))}}}if(R)if(T>Vw){var W=Hw(m,T),Y=Hw(v,T),G=Ww(E,A,D,k,r,W,d),q=Ww(M,I,O,N,r,Y,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),T<w&&W===Y?e.arc(u+G.cx,c+G.cy,T,jw(G.y0,G.x0),jw(q.y0,q.x0),!d):(W>0&&e.arc(u+G.cx,c+G.cy,W,jw(G.y0,G.x0),jw(G.y1,G.x1),!d),e.arc(u,c,r,jw(G.cy+G.y1,G.cx+G.x1),jw(q.cy+q.y1,q.cx+q.x1),!d),Y>0&&e.arc(u+q.cx,c+q.cy,Y,jw(q.y1,q.x1),jw(q.y0,q.x0),!d))}else e.moveTo(u+D,c+k),e.arc(u,c,r,s,l,!d);else e.moveTo(u+D,c+k);if(i>Vw&&R)if(C>Vw){W=Hw(f,C),G=Ww(O,N,M,I,i,-(Y=Hw(g,C)),d),q=Ww(D,k,E,A,i,-W,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),C<S&&W===Y?e.arc(u+G.cx,c+G.cy,C,jw(G.y0,G.x0),jw(q.y0,q.x0),!d):(Y>0&&e.arc(u+G.cx,c+G.cy,Y,jw(G.y0,G.x0),jw(G.y1,G.x1),!d),e.arc(u,c,i,jw(G.cy+G.y1,G.cx+G.x1),jw(q.cy+q.y1,q.cx+q.x1),d),W>0&&e.arc(u+q.cx,c+q.cy,W,jw(q.y1,q.x1),jw(q.y0,q.x0),!d))}else e.lineTo(u+O,c+N),e.arc(u,c,i,l,s,d);else e.lineTo(u+O,c+N)}else e.moveTo(u,c);e.closePath()}}}var Gw=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},qw=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Gw},t.prototype.buildPath=function(e,t){Yw(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(L_);qw.prototype.type="sector";var Qw=qw,Zw=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Xw=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Zw},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(L_);Xw.prototype.type="ring";var $w=Xw;function Kw(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,h=e.length;p<h;p++)hf(a,a,e[p]),ff(s,s,e[p]);hf(a,a,r[0]),ff(s,s,r[1])}for(p=0,h=e.length;p<h;p++){var f=e[p];if(n)i=e[p?p-1:h-1],o=e[(p+1)%h];else{if(0===p||p===h-1){l.push(rf(e[p]));continue}i=e[p-1],o=e[p+1]}af(u,o,i),sf(u,u,t);var g=uf(f,i),m=uf(f,o),v=g+m;0!==v&&(g/=v,m/=v),sf(c,u,-g),sf(d,u,m);var y=of([],f,c),x=of([],f,d);r&&(ff(y,y,a),hf(y,y,s),ff(x,x,a),hf(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var Jw=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},eS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultShape=function(){return new Jw},t.prototype.buildPath=function(e,t){Kw(e,t,!0)},t}(L_);eS.prototype.type="polygon";var tS=eS,nS=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},rS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nS},t.prototype.buildPath=function(e,t){Kw(e,t,!1)},t}(L_);rS.prototype.type="polyline";var iS=rS,oS={},aS=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},sS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new aS},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Y_(oS,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(L_);sS.prototype.type="line";var lS=sS,uS=[],cS=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function dS(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?Vg:Hg)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Vg:Hg)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Zg:Qg)(e.x1,e.cpx1,e.x2,t),(n?Zg:Qg)(e.y1,e.cpy1,e.y2,t)]}var pS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new cS},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,r),null==l||null==u?(c<1&&($g(n,a,i,c,uS),a=uS[1],i=uS[2],$g(r,s,o,c,uS),s=uS[1],o=uS[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(Gg(n,a,l,i,c,uS),a=uS[1],l=uS[2],i=uS[3],Gg(r,s,u,o,c,uS),s=uS[1],u=uS[2],o=uS[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return dS(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=dS(this.shape,e,!0);return lf(t,t)},t}(L_);pS.prototype.type="bezier-curve";var hS=pS,fS=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},gS=function(e){function t(t){return e.call(this,t)||this}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new fS},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(L_);gS.prototype.type="arc";var mS=gS,vS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return j(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),L_.prototype.getBoundingRect.call(this)},t}(L_),yS=vS,xS=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),_S=function(e){function t(t,n,r,i,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return j(t,e),t}(xS),bS=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return j(t,e),t}(xS),wS=[0,0],SS=[0,0],TS=new Zf,CS=new Zf,MS=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Zf;for(n=0;n<2;n++)this._axes[n]=new Zf;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);Zf.sub(r[0],n[1],n[0]),Zf.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return TS.set(1/0,1/0),CS.set(0,0),!this._intersectCheckOneSide(this,e,TS,CS,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,TS,CS,r,-1)&&(n=!1,r)||r||Zf.copy(t,n?TS:CS),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,wS),this._getProjMinMaxOnAxis(s,t._corners,SS),wS[1]<SS[0]||wS[0]>SS[1]){if(a=!1,i)return a;var u=Math.abs(SS[0]-wS[1]),c=Math.abs(wS[0]-SS[1]);Math.min(u,c)>r.len()&&(u<c?Zf.scale(r,l,-u*o):Zf.scale(r,l,c*o))}else if(n){u=Math.abs(SS[0]-wS[1]),c=Math.abs(wS[0]-SS[1]);Math.min(u,c)<n.len()&&(u<c?Zf.scale(n,l,u*o):Zf.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),IS=MS,ES=[],AS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return j(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new og(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(ES)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(Lx),DS=Wy();function kS(e,t,n,r,i,o,a){var s,l=!1;Ih(i)?(a=o,o=i,i=null):kh(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=function(e,t,n,r,i){var o;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return r?(l=jh(r.duration,200),u=jh(r.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),Ih(c)&&(c=c(n,i)),Ih(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function OS(e,t,n,r,i,o){kS("update",e,t,n,r,i,o)}function NS(e,t,n,r,i,o){kS("enter",e,t,n,r,i,o)}function RS(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function PS(e,t,n,r,i,o){RS(e)||kS("leave",e,t,n,r,i,o)}function LS(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),PS(e,{style:{opacity:0}},t,n,r)}function BS(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||LS(e,t,n,r)})):LS(e,t,n,r)}function jS(e){DS(e).oldStyle=e.style}var FS=Math.max,zS=Math.min,US={};var HS=function(e,t){var n=Mw(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return j(t,e),t}(Tw)};function VS(e,t){US[e]=t}function WS(e,t,n,r){var i=function(e,t){return new Tw(Mw(e,t))}(e,t);return n&&("center"===r&&(n=GS(n,i.getBoundingRect())),QS(i,n)),i}function YS(e,t,n){var r=new V_({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(GS(t,i))}}});return r}function GS(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var qS=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new L_(t);return a.createPathProxy(),a.buildPath=function(e){if(Cw(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function QS(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function ZS(e,t){return Y_(e,e,{lineWidth:t}),e}var XS=q_;function $S(e,t){for(var n=Vf([]);e&&e!==t;)Wf(n,e.getLocalTransform(),n),e=e.parent;return n}function KS(e,t,n){return t&&!yh(t)&&(t=Lv.getLocalTransform(t)),n&&(t=qf([],t)),pf([],e,t)}function JS(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return o=KS(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function eT(e){return!e.isGroup}function tT(e,t,n){if(e&&t){var r,i=(r={},e.traverse((function(e){eT(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(eT(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),OS(e,r,n,fb(e).dataIndex)}}}))}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=fh({},e.shape)),t}}function nT(e,t){return _h(e,(function(e){var n=e[0];n=FS(n,t.x),n=zS(n,t.x+t.width);var r=e[1];return r=FS(r,t.y),[n,r=zS(r,t.y+t.height)]}))}function rT(e,t,n){var r=fh({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),gh(i,n),new V_(r)):WS(e.replace("path://",""),r,n,"center")}function iT(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(oT(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function oT(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,d=a-i,p=s-o,h=aT(d,p,u,c);if((l=h)<=1e-6&&l>=-1e-6)return!1;var f=e-i,g=t-o,m=aT(f,g,u,c)/h;if(m<0||m>1)return!1;var v=aT(f,g,d,p)/h;return!(v<0||v>1)}function aT(e,t,n,r){return e*r-n*t}function sT(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=Eh(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&xh(Sh(l),(function(e){Jh(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=fb(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:gh({content:r,formatterParams:s},i)}}function lT(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function uT(e,t){if(e)if(Mh(e))for(var n=0;n<e.length;n++)lT(e[n],t);else lT(e,t)}VS("circle",Aw),VS("ellipse",Ow),VS("sector",Qw),VS("ring",$w),VS("polygon",tS),VS("polyline",iS),VS("rect",$_),VS("line",lS),VS("bezierCurve",hS),VS("arc",mS);var cT=Object.freeze({__proto__:null,updateProps:OS,initProps:NS,removeElement:PS,removeElementWithFadeOut:BS,isElementRemoved:RS,extendShape:function(e){return L_.extend(e)},extendPath:function(e,t){return HS(e,t)},registerShape:VS,getShapeClass:function(e){if(US.hasOwnProperty(e))return US[e]},makePath:WS,makeImage:YS,mergePath:qS,resizePath:QS,subPixelOptimizeLine:ZS,subPixelOptimizeRect:function(e){return G_(e.shape,e.shape,e.style),e},subPixelOptimize:XS,getTransform:$S,applyTransform:KS,transformDirection:JS,groupTransition:tT,clipPointsByRect:nT,clipRectByRect:function(e,t){var n=FS(e.x,t.x),r=zS(e.x+e.width,t.x+t.width),i=FS(e.y,t.y),o=zS(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},createIcon:rT,linePolygonIntersect:iT,lineLineIntersect:oT,setTooltipConfig:sT,traverseElements:uT,Group:ay,Image:V_,Text:hb,Circle:Aw,Ellipse:Ow,Sector:Qw,Ring:$w,Polygon:tS,Polyline:iS,Rect:$_,Line:lS,BezierCurve:hS,Arc:mS,IncrementalDisplayable:AS,CompoundPath:yS,LinearGradient:_S,RadialGradient:bS,BoundingRect:og,OrientedBoundingRect:IS,Point:Zf,Path:L_}),dT={};function pT(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=Ih(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<xb.length;u++){var c=xb[u],d=t[c];l[c]=jh(i?i.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,r)}return l}function hT(e,t,n,r){n=n||dT;for(var i=e instanceof hb,o=!1,a=0;a<_b.length;a++){if((p=t[_b[a]])&&p.getShallow("show")){o=!0;break}}var s=i?e:e.getTextContent();if(o){i||(s||(s=new hb,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=pT(n,t),u=t.normal,c=!!u.getShallow("show"),d=gT(u,r&&r.normal,n,!1,!i);d.text=l.normal,i||e.setTextConfig(mT(u,n,!1));for(a=0;a<xb.length;a++){var p,h=xb[a];if(p=t[h]){var f=s.ensureState(h),g=!!jh(p.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=gT(p,r&&r[h],n,!0,!i),f.style.text=l[h],!i)e.ensureState(h).textConfig=mT(p,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(bT(s).setLabelText=function(e){var r=pT(n,t,e);!function(e,t){for(var n=0;n<xb.length;n++){var r=xb[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}(s,r)})}else s&&(s.ignore=!0);e.dirty()}function fT(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<xb.length;r++){var i=xb[r];n[i]=e.getModel([i,t])}return n}function gT(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||dT;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||dT).rich;if(n){t=t||{};for(var r=Sh(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(t);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);_T(o[u]={},c,s,n,r,i,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var p=t.get("minMargin");null!=p&&(e.margin=p);_T(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&fh(o,t),o}function mT(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=jh(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var vT=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],yT=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],xT=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function _T(e,t,n,r,i,o,a,s){n=!i&&n||dT;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=jh(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var p=jh(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=p&&(e.lineWidth=p);var h=jh(t.getShallow("textBorderType"),n.textBorderType);null!=h&&(e.lineDash=h);var f=jh(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),i||o||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<vT.length;g++){var m=vT[g];null!=(y=jh(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<yT.length;g++){m=yT[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!r.disableBox){for(g=0;g<xT.length;g++){var y;m=xT[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}var bT=Wy();var wT,ST,TT=["textStyle","color"],CT=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],MT=new hb,IT=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(TT):null)},e.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=this.ecModel,n=t&&t.getModel("textStyle"),Vh([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t,n},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<CT.length;n++)t[CT[n]]=this.getShallow(CT[n]);return MT.useStyle(t),MT.update(),MT.getBoundingRect()},e}(),ET=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],AT=sx(ET),DT=function(){function e(){}return e.prototype.getLineStyle=function(e){return AT(this,e)},e}(),kT=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],OT=sx(kT),NT=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return OT(this,e,t)},e}(),RT=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){hh(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(ph(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Yp.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();tx(RT),wT=RT,ST=["__\0is_clz",rx++].join("_"),wT.prototype[ST]=!0,wT.isInstance=function(e){return!(!e||!e[ST])},vh(RT,DT),vh(RT,NT),vh(RT,ux),vh(RT,IT);var PT=RT,LT=Math.round(10*Math.random());function BT(e){return[e||"",LT++].join("_")}function jT(e,t){return hh(hh({},e,!0),t,!0)}var FT="ZH",zT="EN",UT=zT,HT={},VT={},WT=Yp.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(FT)>-1?FT:UT;function YT(e,t){e=e.toUpperCase(),VT[e]=new PT(t),HT[e]=t}YT(zT,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),YT(FT,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var GT=1e3,qT=6e4,QT=36e5,ZT=864e5,XT=31536e6,$T={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},KT="{yyyy}-{MM}-{dd}",JT={year:"{yyyy}",month:"{yyyy}-{MM}",day:KT,hour:KT+" "+$T.hour,minute:KT+" "+$T.minute,second:KT+" "+$T.second,millisecond:$T.none},eC=["year","month","day","hour","minute","second","millisecond"],tC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function nC(e,t){return"0000".substr(0,t-(e+="").length)+e}function rC(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function iC(e){return e===rC(e)}function oC(e,t,n,r){var i=wy(e),o=i[lC(n)](),a=i[uC(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[cC(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[dC(n)](),d=(c-1)%12+1,p=i[pC(n)](),h=i[hC(n)](),f=i[fC(n)](),g=r instanceof PT?r:function(e){return VT[e]}(r||WT)||VT[UT],m=g.getModel("time"),v=m.get("month"),y=m.get("monthAbbr"),x=m.get("dayOfWeek"),_=m.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,nC(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,nC(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,nC(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,nC(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,nC(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,nC(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,nC(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,nC(f,3)).replace(/{S}/g,f+"")}function aC(e,t){var n=wy(e),r=n[uC(t)]()+1,i=n[cC(t)](),o=n[dC(t)](),a=n[pC(t)](),s=n[hC(t)](),l=0===n[fC(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,p=d&&1===i;return p&&1===r?"year":p?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function sC(e,t,n){var r=Dh(e)?wy(e):e;switch(t=t||aC(e,n)){case"year":return r[lC(n)]();case"half-year":return r[uC(n)]()>=6?1:0;case"quarter":return Math.floor((r[uC(n)]()+1)/4);case"month":return r[uC(n)]();case"day":return r[cC(n)]();case"half-day":return r[dC(n)]()/24;case"hour":return r[dC(n)]();case"minute":return r[pC(n)]();case"second":return r[hC(n)]();case"millisecond":return r[fC(n)]()}}function lC(e){return e?"getUTCFullYear":"getFullYear"}function uC(e){return e?"getUTCMonth":"getMonth"}function cC(e){return e?"getUTCDate":"getDate"}function dC(e){return e?"getUTCHours":"getHours"}function pC(e){return e?"getUTCMinutes":"getMinutes"}function hC(e){return e?"getUTCSeconds":"getSeconds"}function fC(e){return e?"getUTCMilliseconds":"getMilliseconds"}function gC(e){return e?"setUTCFullYear":"setFullYear"}function mC(e){return e?"setUTCMonth":"setMonth"}function vC(e){return e?"setUTCDate":"setDate"}function yC(e){return e?"setUTCHours":"setHours"}function xC(e){return e?"setUTCMinutes":"setMinutes"}function _C(e){return e?"setUTCSeconds":"setSeconds"}function bC(e){return e?"setUTCMilliseconds":"setMilliseconds"}function wC(e){if(isNaN(Cy(e)))return Eh(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function SC(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var TC=Uh;function CC(e,t,n){function r(e){return e&&Vh(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?wy(e):e;if(!isNaN(+s))return oC(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Ah(e)?r(e):Dh(e)&&i(e)?e+"":"-";var l=Cy(e);return i(l)?wC(l):Ah(e)?r(e):"boolean"==typeof e?e+"":"-"}var MC=["a","b","c","d","e","f","g"],IC=function(e,t){return"{"+e+(null==t?"":t)+"}"};function EC(e,t,n){Mh(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=MC[o];e=e.replace(IC(a),IC(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(IC(MC[l],s),n?Af(u):u)}return e}function AC(e,t){return t=t||"transparent",Eh(e)?e:kh(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function DC(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var kC=xh,OC=["left","right","top","bottom","width","height"],NC=[["width","left","right"],["height","top","bottom"]];function RC(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild((function(l,u){var c,d,p=l.getBoundingRect(),h=t.childAt(u+1),f=h&&h.getBoundingRect();if("horizontal"===e){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(f?-f.y+p.y:0);(d=a+m)>i||l.newline?(o+=s+n,a=0,d=m,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)}))}var PC=RC;function LC(e,t,n){n=TC(n||0);var r=t.width,i=t.height,o=hy(e.left,r),a=hy(e.top,i),s=hy(e.right,r),l=hy(e.bottom,i),u=hy(e.width,r),c=hy(e.height,i),d=n[2]+n[0],p=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-p-o),isNaN(c)&&(c=i-l-d-a),null!=h&&(isNaN(u)&&isNaN(c)&&(h>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(o)&&(o=r-s-u-p),isNaN(a)&&(a=i-l-c-d),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-p}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}o=o||0,a=a||0,isNaN(u)&&(u=r-p-o-(s||0)),isNaN(c)&&(c=i-d-a-(l||0));var f=new og(o+n[3],a+n[0],u,c);return f.margin=n,f}function BC(e){var t=e.layoutMode||e.constructor.layoutMode;return kh(t)?t:t?{type:t}:null}function jC(e,t,n){var r=n&&n.ignoreSize;!Mh(r)&&(r=[r,r]);var i=a(NC[0],0),o=a(NC[1],1);function a(n,i){var o={},a=0,u={},c=0;if(kC(n,(function(t){u[t]=e[t]})),kC(n,(function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++})),r[i])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var d=0;d<n.length;d++){var p=n[d];if(!s(o,p)&&s(e,p)){o[p]=e[p];break}}return o}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){kC(e,(function(e){t[e]=n[e]}))}u(NC[0],e,i),u(NC[1],e,o)}function FC(e){return function(e,t){return t&&e&&kC(OC,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}({},e)}Ch(RC,"vertical"),Ch(RC,"horizontal");var zC=Wy(),UC=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=BT("ec_cpt_model"),i}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=BC(this),r=n?FC(e):{};hh(e,t.getTheme().get(this.mainType)),hh(e,this.getDefaultOption()),n&&jC(e,r,n)},t.prototype.mergeOption=function(e,t){hh(this.option,e,!0);var n=BC(this);n&&jC(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Jy])}(e))return e.defaultOption;var t=zC(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=hh(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Xy(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(PT);nx(UC,PT),ax(UC),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=ex(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=ex(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(UC),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,o){if(e.length){var a=function(e){var r={},i=[];return xh(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return xh(e,(function(e){mh(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),xh(s,(function(e){mh(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);mh(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(xh(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],p=!!u[c];p&&(i.call(o,c,d.originalDeps.slice()),delete u[c]),xh(d.successor,p?f:h)}xh(u,(function(){throw new Error("")}))}function h(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,h(e)}}}(UC,(function(e){var t=[];xh(UC.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=_h(t,(function(e){return ex(e).main})),"dataset"!==e&&mh(t,"dataset")<=0&&t.unshift("dataset");return t}));var HC=UC,VC="";"undefined"!=typeof navigator&&(VC=navigator.platform||"");var WC="rgba(0, 0, 0, 0.2)",YC={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:WC,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:WC,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:WC,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:WC,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:WC,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:WC,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:VC.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},GC=Xh(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),qC="original",QC="arrayRows",ZC="objectRows",XC="keyedColumns",$C="typedArray",KC="unknown",JC="column",eM="row",tM=1,nM=2,rM=3,iM=Wy();function oM(e,t,n){var r={},i=aM(t);if(!i||!e)return r;var o,a,s=[],l=[],u=t.ecModel,c=iM(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;xh(e=e.slice(),(function(t,n){var i=kh(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var p=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return xh(e,(function(e,t){var n=e.name,i=f(e);if(null==o){var a=p.valueWayDim;h(r[n],a,i),h(l,a,i),p.valueWayDim+=i}else if(o===t)h(r[n],0,i),h(s,0,i);else{a=p.categoryWayDim;h(r[n],a,i),h(l,a,i),p.categoryWayDim+=i}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function aM(e){if(!e.get("data",!0))return Xy(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Qy).models[0]}function sM(e,t){return function(e,t,n,r,i,o){var a,s,l,u=5;if(Nh(e))return rM;if(r){var c=r[o];kh(c)?(s=c.name,l=c.type):Eh(c)&&(s=c)}if(null!=l)return"ordinal"===l?tM:rM;if(t===QC){var d=e;if(n===eM){for(var p=d[o],h=0;h<(p||[]).length&&h<u;h++)if(null!=(a=x(p[i+h])))return a}else for(h=0;h<d.length&&h<u;h++){var f=d[i+h];if(f&&null!=(a=x(f[o])))return a}}else if(t===ZC){var g=e;if(!s)return rM;for(h=0;h<g.length&&h<u;h++){if((v=g[h])&&null!=(a=x(v[s])))return a}}else if(t===XC){if(!s)return rM;if(!(p=e[s])||Nh(p))return rM;for(h=0;h<p.length&&h<u;h++)if(null!=(a=x(p[h])))return a}else if(t===qC){var m=e;for(h=0;h<m.length&&h<u;h++){var v,y=Py(v=m[h]);if(!Mh(y))return rM;if(null!=(a=x(y[o])))return a}}function x(e){var t=Eh(e);return null!=e&&isFinite(e)&&""!==e?t?nM:rM:t&&"-"!==e?tM:void 0}return rM}(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}var lM=Xh();var uM=Wy();Wy();var cM,dM,pM,hM=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Oy(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,o,a){o=o||e;var s=t(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if(c=c||n,!c||!c.length)return;var d=c[l];i&&(u[i]=d);return s.paletteIdx=(l+1)%c.length,d}(this,uM,r,i,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,uM)},e}();var fM="\0_ec_inner",gM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new PT(r),this._locale=new PT(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=yM(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,yM(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):pM(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&xh(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=Xh(),s=t&&t.replaceMergeMainTypeMap;iM(this).datasetMap=Xh(),xh(e,(function(e,t){null!=e&&(HC.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?ph(e):hh(n[t],e,!0))})),s&&s.each((function(e,t){HC.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),HC.topologicalTravel(o,HC.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=lM.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,Oy(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=By(a,o,l);(function(e,t,n){xh(e,(function(e){var r=e.newOption;kh(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,HC),n[t]=null,r.set(t,null),i.set(t,0);var c,d=[],p=[],h=0;xh(u,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=HC.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=fh({componentIndex:n},e.keyInfo);fh(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),p.push(r),h++):(d.push(void 0),p.push(void 0))}),this),n[t]=d,r.set(t,p),i.set(t,h),"series"===t&&cM(this)}),this),this._seriesIndices||cM(this)},t.prototype.getOption=function(){var e=ph(this.option);return xh(e,(function(t,n){if(HC.hasClass(n)){for(var r=Oy(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!Hy(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e[fM],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],xh(Oy(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=i?mM("id",i,a):null!=o?mM("name",o,a):wh(a,(function(e){return!!e})),vM(n,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(n=s+"Index",r=s+"Id",i=s+"Name",!(t=a)||null==t[n]&&null==t[r]&&null==t[i]?null:{mainType:s,index:t[n],id:t[r],name:t[i]}),u=l?this.queryComponents(l):wh(this._componentsMap.get(s),(function(e){return!!e}));return o=vM(u,e),e.filter?wh(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Ih(e)){var i=t,o=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&o.call(i,t,r,r.componentIndex)}}))}else for(var a=Eh(e)?r.get(e):kh(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=zy(e,null);return wh(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return wh(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return wh(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){dM(this),xh(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){xh(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){dM(this),xh(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)}),this)},t.prototype.eachRawSeriesByType=function(e,t,n){return xh(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return dM(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){dM(this);var n=[];xh(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=Xh(n)},t.prototype.restoreData=function(e){cM(this);var t=this._componentsMap,n=[];t.each((function(e,t){HC.hasClass(t)&&n.push(t)})),HC.topologicalTravel(n,HC.getAllClassMainTypes(),(function(n){xh(t.get(n),(function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e)||t.restoreData()}))}))},t.internalField=(cM=function(e){var t=e._seriesIndices=[];xh(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Xh(t)},dM=function(e){},void(pM=function(e,t){e.option={},e.option[fM]=1,e._componentsMap=Xh({series:[]}),e._componentsCount=Xh();var n=t.aria;kh(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;xh(t,(function(t,r){"colorLayer"===r&&n||HC.hasClass(r)||("object"==typeof t?e[r]=e[r]?hh(e[r],t,!1):ph(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),hh(t,YC,!1),e._mergeOption(t,null)})),t}(PT);function mM(e,t,n){if(Mh(t)){var r=Xh();return xh(t,(function(e){null!=e&&(null!=zy(e,null)&&r.set(e,!0))})),wh(n,(function(t){return t&&r.get(t[e])}))}var i=zy(t,null);return wh(n,(function(t){return t&&null!=i&&t[e]===i}))}function vM(e,t){return t.hasOwnProperty("subType")?wh(e,(function(e){return e&&e.subType===t.subType})):e}function yM(e){var t=Xh();return e&&xh(Oy(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}vh(gM,hM);var xM=gM,_M=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],bM=function(e){xh(_M,(function(t){this[t]=Th(e[t],e)}),this)},wM={},SM=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];xh(wM,(function(r,i){var o=r.create(e,t);n=n.concat(o||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){xh(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){wM[e]=t},e.get=function(e){return wM[e]},e}(),TM=/^(min|max)?(.+)$/,CM=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(xh(Oy(e.series),(function(e){e&&e.data&&Nh(e.data)&&Yh(e.data)})),xh(Oy(e.dataset),(function(e){e&&e.source&&Nh(e.source)&&Yh(e.source)}))),e=ph(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((d||c)&&(e.options=e.media=null),i=e);c&&Mh(u)&&xh(u,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function p(e){xh(t,(function(t){t(e,n)}))}return p(i),xh(l,(function(e){return p(e)})),xh(o,(function(e){return p(e.option)})),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],ph(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=ph(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)MM(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=_h(s,(function(e){return ph(-1===e?a.option:o[e].option)}))),this._currentMediaIndices=s,l},e}();function MM(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return xh(e,(function(e,t){var n=t.match(TM);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[a],e,o)||(i=!1)}})),i}var IM=CM,EM=xh,AM=kh,DM=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function kM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=DM.length;n<r;n++){var i=DM[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?hh(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?hh(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function OM(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,gh(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function NM(e){OM(e,"itemStyle"),OM(e,"lineStyle"),OM(e,"areaStyle"),OM(e,"label"),OM(e,"labelLine"),OM(e,"upperLabel"),OM(e,"edgeLabel")}function RM(e,t){var n=AM(e)&&e[t],r=AM(n)&&n.textStyle;if(r)for(var i=0,o=Ry.length;i<o;i++){var a=Ry[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function PM(e){e&&(NM(e),RM(e,"label"),e.emphasis&&RM(e.emphasis,"label"))}function LM(e){return Mh(e)?e:e?[e]:[]}function BM(e){return(Mh(e)?e[0]:e)||{}}function jM(e,t){EM(LM(e.series),(function(e){AM(e)&&function(e){if(AM(e)){kM(e),NM(e),RM(e,"label"),RM(e,"upperLabel"),RM(e,"edgeLabel"),e.emphasis&&(RM(e.emphasis,"label"),RM(e.emphasis,"upperLabel"),RM(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(kM(t),PM(t));var n=e.markLine;n&&(kM(n),PM(n));var r=e.markArea;r&&PM(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Nh(o))for(var a=0;a<o.length;a++)PM(o[a]);xh(e.categories,(function(e){NM(e)}))}if(i&&!Nh(i))for(a=0;a<i.length;a++)PM(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)PM(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)Mh(l[a])?(PM(l[a][0]),PM(l[a][1])):PM(l[a])}"gauge"===e.type?(RM(e,"axisLabel"),RM(e,"title"),RM(e,"detail")):"treemap"===e.type?(OM(e.breadcrumb,"itemStyle"),xh(e.levels,(function(e){NM(e)}))):"tree"===e.type&&NM(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),EM(n,(function(t){EM(LM(e[t]),(function(e){e&&(RM(e,"axisLabel"),RM(e.axisPointer,"label"))}))})),EM(LM(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;RM(t,"axisLabel"),RM(t&&t.axisPointer,"label")})),EM(LM(e.calendar),(function(e){OM(e,"itemStyle"),RM(e,"dayLabel"),RM(e,"monthLabel"),RM(e,"yearLabel")})),EM(LM(e.radar),(function(e){RM(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),EM(LM(e.geo),(function(e){AM(e)&&(PM(e),EM(LM(e.regions),(function(e){PM(e)})))})),EM(LM(e.timeline),(function(e){PM(e),OM(e,"label"),OM(e,"itemStyle"),OM(e,"controlStyle",!0);var t=e.data;Mh(t)&&xh(t,(function(e){kh(e)&&(OM(e,"label"),OM(e,"itemStyle"))}))})),EM(LM(e.toolbox),(function(e){OM(e,"iconStyle"),EM(e.feature,(function(e){OM(e,"iconStyle")}))})),RM(BM(e.axisPointer),"label"),RM(BM(e.tooltip).axisPointer,"label")}function FM(e){e&&xh(zM,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var zM=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],UM=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],HM=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function VM(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<HM.length;n++){var r=HM[n][1],i=HM[n][0];null!=t[r]&&(t[i]=t[r])}}function WM(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function YM(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function GM(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&GM(e[n].children,t)}function qM(e,t){jM(e,t),e.series=Oy(e.series),xh(e.series,(function(e){if(kh(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),WM(e.label),(i=e.data)&&!Nh(i))for(var n=0;n<i.length;n++)WM(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var i,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];(r||null==a[o[s]])&&(a[o[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var i;if(VM(e),VM(e.backgroundStyle),VM(e.emphasis),(i=e.data)&&!Nh(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(VM(i[n]),VM(i[n]&&i[n].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o)),YM(e),GM(e.data,YM)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&gh(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),FM(e)}})),e.dataRange&&(e.visualMap=e.dataRange),xh(UM,(function(t){var n=e[t];n&&(Mh(n)||(n=[n]),xh(n,(function(e){FM(e)})))}))}function QM(e){xh(e,(function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,u,c){var d,p,h=a.get(t.stackedDimension,c);if(isNaN(h))return i;s?p=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var v=m.data.getByRawIndex(m.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&h>=0&&v>0||"samesign"===l&&h<=0&&v<0){h=yy(h,v),f=v;break}}}return r[0]=h,r[1]=f,r}))}))}var ZM,XM,$M,KM,JM,eI=function(e){this.data=e.data||(e.sourceFormat===XC?{}:[]),this.sourceFormat=e.sourceFormat||KC,this.seriesLayoutBy=e.seriesLayoutBy||JC,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&sM(this,n)===tM&&(r.type="ordinal")}};function tI(e){return e instanceof eI}function nI(e,t,n){n=n||oI(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:aI(i),startIndex:a,dimensionsDetectedCount:o};if(t===QC){var s=e;"auto"===r||null==r?sI((function(e){null!=e&&"-"!==e&&(Eh(e)?null==a&&(a=1):a=0)}),n,s,10):a=Dh(r)?r:r?1:0,i||1!==a||(i=[],sI((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===eM?s.length:s[0]?s[0].length:null}else if(t===ZC)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return Sh(t)}(e));else if(t===XC)i||(i=[],xh(e,(function(e,t){i.push(t)})));else if(t===qC){var l=Py(e[0]);o=Mh(l)&&l.length||1}return{startIndex:a,dimensionsDefine:aI(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new eI({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ph(t)})}function rI(e){return new eI({data:e,sourceFormat:Nh(e)?$C:qC})}function iI(e){return new eI({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:ph(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function oI(e){var t=KC;if(Nh(e))t=$C;else if(Mh(e)){0===e.length&&(t=QC);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(Mh(i)){t=QC;break}if(kh(i)){t=ZC;break}}}}else if(kh(e))for(var o in e)if(Jh(e,o)&&yh(e[o])){t=XC;break}return t}function aI(e){if(e){var t=Xh();return _h(e,(function(e,n){var r={name:(e=kh(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r}))}}function sI(e,t,n,r){if(t===eM)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)e(o[i],i)}}function lI(e){var t=e.sourceFormat;return t===ZC||t===XC}var uI=function(){function e(e,t){var n=tI(e)?e:rI(e);this._source=n;var r=this._data=n.data;n.sourceFormat===$C&&(this._offset=0,this._dimSize=t,this._data=r),JM(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;JM=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(fh(e,KM[xI(a,s)]),a===$C)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=pI(a,s);e.getItem=Th(c,null,i,l,u);var d=gI(a,s);e.count=Th(d,null,i,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],p=0;p<c;p++){var h=i[p*o+a];d[e+p]=h,h<l&&(l=h),h>u&&(u=h)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[QC+"_"+JC]={pure:!0,appendData:i},e[QC+"_"+eM]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[ZC]={pure:!0,appendData:i},e[XC]={pure:!0,appendData:function(e){var t=this._data;xh(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},e[qC]={appendData:i},e[$C]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},KM=e}(),e}(),cI=function(e,t,n,r){return e[r]},dI=((ZM={})[QC+"_"+JC]=function(e,t,n,r){return e[r+t]},ZM[QC+"_"+eM]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=e,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[r]:null}return o},ZM[ZC]=cI,ZM[XC]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},ZM[qC]=cI,ZM);function pI(e,t){return dI[xI(e,t)]}var hI=function(e,t,n){return e.length},fI=((XM={})[QC+"_"+JC]=function(e,t,n){return Math.max(0,e.length-t)},XM[QC+"_"+eM]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},XM[ZC]=hI,XM[XC]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},XM[qC]=hI,XM);function gI(e,t){return fI[xI(e,t)]}var mI=function(e,t,n){return e[t]},vI=(($M={})[QC]=mI,$M[ZC]=function(e,t,n){return e[n]},$M[XC]=mI,$M[qC]=function(e,t,n){var r=Py(e);return r instanceof Array?r[t]:r},$M[$C]=mI,$M);function yI(e){return vI[e]}function xI(e,t){return e===QC?e+"_"+t:e}function _I(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return yI(o)(r,a,s)}var l=r;return o===qC&&(l=Py(r)),l}}}var bI=/\{@(.+?)\}/g,wI=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,p=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:l,borderColor:u,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(o&&(s.value=o.interpolatedValue),null!=r&&Mh(s.value)&&(s.value=s.value[r]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return Ih(i)?(s.status=t,s.dimensionIndex=r,i(s)):Eh(i)?EC(i,s).replace(bI,(function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=_I(a,e,i);if(o&&Mh(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return _I(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function SI(e){var t,n;return kh(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function TI(e){return new CI(e)}var CI=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,h=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(o||p<h)){var f=this._progress;if(Mh(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],p,h,l,u);else this._doProgress(f,p,h,l,u)}this._dueIndex=h;var m=null!=this._settedOutputEnd?this._settedOutputEnd:h;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){MI.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:MI.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),Mh(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),MI=function(){var e,t,n,r,i,o={reset:function(l,u,c,d){t=l,e=u,n=c,r=d,i=Math.ceil(r/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function II(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Dh(e)||null==e||"-"===e||(e=+wy(e)),null==e||""===e?NaN:+e)}Xh({number:function(e){return parseFloat(e)},time:function(e){return+wy(e)},trim:function(e){return Eh(e)?Vh(e):e}});var EI=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Dh(e)?e:Cy(e),r=Dh(t)?t:Cy(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=Eh(e),s=Eh(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),AI=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return II(e,t)},e}();function DI(e){if(!LI(e.sourceFormat)){Ay("")}return e.data}function kI(e){var t=e.sourceFormat,n=e.data;if(!LI(t)){Ay("")}if(t===QC){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===ZC){for(r=[],i=0,o=n.length;i<o;i++)r.push(fh({},n[i]));return r}}function OI(e,t,n){if(null!=n)return Dh(n)||!isNaN(n)&&!Jh(t,n)?e[n]:Jh(t,n)?t[n]:void 0}function NI(e){return ph(e)}var RI=Xh();function PI(e,t,n,r){t.length||Ay(""),kh(e)||Ay("");var i=e.type,o=RI.get(i);o||Ay("");var a=_h(t,(function(e){return function(e,t){var n=new AI,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==JC&&Ay("");var a=[],s={},l=e.dimensionsDefine;if(l)xh(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(Jh(s,n)&&Ay(""),s[n]=r)}));else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=pI(i,JC);t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=Th(DI,null,e)),n.cloneRawData=Th(kI,null,e);var d=gI(i,JC);n.count=Th(d,null,r,o,a);var p=yI(i);n.retrieveValue=function(e,t){var n=c(r,o,a,e);return h(n,t)};var h=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=Th(OI,null,a,s),n.cloneAllDimensionInfo=Th(NI,null,a),n}(e,o)}));return _h(Oy(o.transform({upstream:a[0],upstreamList:a,config:ph(e.config)})),(function(e,n){var r;kh(e)||Ay(""),e.data||Ay(""),LI(oI(e.data))||Ay("");var i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:JC,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:JC,sourceHeader:0,dimensions:e.dimensions};return nI(e.data,r,null)}))}function LI(e){return e===QC||e===ZC}var BI,jI="undefined",FI=typeof Uint32Array===jI?Array:Uint32Array,zI=typeof Uint16Array===jI?Array:Uint16Array,UI=typeof Int32Array===jI?Array:Int32Array,HI=typeof Float64Array===jI?Array:Float64Array,VI={float:HI,int:UI,ordinal:Array,number:Array,time:HI};function WI(e){return e>65535?FI:zI}function YI(e,t,n,r,i){var o=VI[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var GI=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Xh()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=BI[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],lI(r),this._dimensions=_h(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new VI[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=[1/0,-1/0]);for(var s=i[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){YI(n,l,(h=r[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,p=0;p<i;p++){var h=r[p],f=BI.arrayRows.call(this,e[d]||u,h.property,d,p);n[p][c]=f;var g=o[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=_h(o,(function(e){return e.property})),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=[1/0,-1/0]),YI(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],p=e;p<t;p++){d=r.getItem(p,d);for(var h=0;h<a;h++){var f=i[h],g=this._dimValueGetter(d,l[h],p,h);f[p]=g;var m=s[h];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var n=t.sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-r[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{e=new(n=WI(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(WI(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;c++){var d=void 0,p=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][p],c)}else{for(var h=0;h<a;h++)o[h]=u[e[h]][p];o[h]=c,d=t.apply(null,o)}d&&(i[s++]=p)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=Sh(e),i=r.length;if(!i)return this;var o=t.count(),a=new(WI(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],d=t._chunks,p=!1;if(!t._indices){var h=0;if(1===i){for(var f=d[r[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[s++]=h),h++}p=!0}else if(2===i){f=d[r[0]];var m=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(g=0;g<n;g++){var x=f[g],_=m[g];(x>=u&&x<=c||isNaN(x))&&(_>=v&&_<=y||isNaN(_))&&(a[s++]=h),h++}p=!0}}if(!p)if(1===i)for(g=0;g<o;g++){var b=t.getRawIndex(g);((x=d[r[0]][b])>=u&&x<=c||isNaN(x))&&(a[s++]=b)}else for(g=0;g<o;g++){for(var w=!0,S=(b=t.getRawIndex(g),0);S<i;S++){var T=r[S];((x=d[T][b])<e[T][0]||x>e[T][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=[1/0,-1/0];for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),p=0;p<o;p++)s[p]=r[t[p]][d];s[o]=c;var h=n&&n.apply(null,s);if(null!=h){"object"!=typeof h&&(i[0]=h,h=i);for(u=0;u<h.length;u++){var f=t[u],g=h[u],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(WI(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var p=1;p<s-1;p+=u){for(var h=Math.min(p+u,s-1),f=Math.min(p+2*u,s),g=(f+h)/2,m=0,v=h;v<f;v++){var y=a[C=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-h;var x=p,_=Math.min(p+u,s),b=p-1,w=a[c];n=-1,i=x;var S=-1,T=0;for(v=x;v<_;v++){var C;y=a[C=this.getRawIndex(v)];isNaN(y)?(T++,S<0&&(S=C)):(r=Math.abs((b-g)*(y-w)-(b-v)*(m-w)))>n&&(n=r,i=C)}T>0&&T<_-x&&(d[l++]=Math.min(S,i),i=Math.max(S,i)),d[l++]=i,c=i}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(WI(this._rawCount))(Math.ceil(u/s)),p=0,h=0;h<u;h+=s){s>u-h&&(s=u-h,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(h+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(h+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[p++]=v}return i._count=p,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var o=(r=n)[0],a=r[1],s=0;s<i;s++){var l=t[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return r=[o,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r,i,o=new e,a=this._chunks,s=t&&bh(t,(function(e,t){return e[t]=!0,e}),{});if(s)for(var l=0;l<a.length;l++)o._chunks[l]=s[l]?(r=a[l],i=void 0,(i=r.constructor)===Array?r.slice():new i(r)):a[l];else o._chunks=a;return this._copyCommonProps(o),n||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ph(this._extent),e._rawExtent=ph(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return II(e[r],this._dimensions[r])}BI={arrayRows:e,objectRows:function(e,t,n,r){return II(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return II(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),qI=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(QI(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Nh(a=o.get("data",!0))?$C:qC,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},p=jh(c.seriesLayoutBy,d.seriesLayoutBy)||null,h=jh(c.sourceHeader,d.sourceHeader),f=jh(c.dimensions,d.dimensions);e=p!==d.seriesLayoutBy||!!h!=!!d.sourceHeader||f?[nI(a,{seriesLayoutBy:p,sourceHeader:h,dimensions:f},s)]:[]}else{var g=n;if(i){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[nI(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&ZI("")}var o=[],a=[];return xh(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||ZI(""),o.push(t),a.push(e._getVersionSign())})),r?t=function(e,t){var n=Oy(e),r=n.length;r||Ay("");for(var i=0,o=r;i<o;i++)t=PI(n[i],t),i!==o-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[iI(o[0])]),{sourceList:t,upstreamSignList:a}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];QI(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new GI).initData(new uI(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(QI(e)){var t=aM(e);return t?[t.getSourceManager()]:[]}return _h(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Xy(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Qy).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(QI(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=r;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function QI(e){return"series"===e.mainType}function ZI(e){throw new Error(e)}var XI="line-height:1";function $I(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+Af(r+"")+"px;color:"+Af(n)+";font-weight:"+Af(i+""),valueStyle:"font-size:"+Af(a+"")+"px;color:"+Af(o)+";font-weight:"+Af(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var KI=[0,10,20,30],JI=["","\n","\n\n","\n\n\n"];function eE(e,t){return t.type=e,t}function tE(e){return"section"===e.type}function nE(e){return tE(e)?iE:oE}function rE(e){if(tE(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return xh(e.blocks,(function(e){var n=rE(e);n>=t&&(t=n+ +(r&&(!n||tE(e)&&!e.noHeader)))})),t}return 0}function iE(e,t,n,r){var i,o=t.noHeader,a=(i=rE(t),{html:KI[i],richText:JI[i]}),s=[],l=t.blocks||[];Hh(!l||Mh(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Jh(c,u)){var d=new EI(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}xh(l,(function(n,i){var o=t.valueFormatter,l=nE(n)(o?fh(fh({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var p="richText"===e.renderMode?s.join(a.richText):sE(s.join(""),o?n:a.html);if(o)return p;var h=CC(t.header,"ordinal",e.useUTC),f=$I(r,e.renderMode).nameStyle;return"richText"===e.renderMode?lE(e,h,f)+a.richText+p:sE('<div style="'+f+";"+XI+';">'+Af(h)+"</div>"+p,n)}function oE(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return _h(e=Mh(e)?e:[e],(function(e,t){return CC(e,Mh(h)?h[t]:h,u)}))};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),p=o?"":CC(l,"ordinal",u),h=t.valueType,f=a?[]:c(t.value),g=!s||!o,m=!s&&o,v=$I(r,i),y=v.nameStyle,x=v.valueStyle;return"richText"===i?(s?"":d)+(o?"":lE(e,p,y))+(a?"":function(e,t,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Mh(t)?t.join(" "):t,o)}(e,f,g,m,x)):sE((s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+Af(e)+"</span>"}(p,!s,y))+(a?"":function(e,t,n,r){var i=n?"10px":"20px",o=t?"float:right;margin-left:"+i:"";return e=Mh(e)?e:[e],'<span style="'+o+";"+r+'">'+_h(e,(function(e){return Af(e)})).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function aE(e,t,n,r,i,o){if(e)return nE(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function sE(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+XI+';">'+e+'<div style="clear:both"></div></div>'}function lE(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function uE(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var cE=function(){function e(){this.richTextStyles={},this._nextStyleNameId=My()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=Eh(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Af(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Af(r)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return Eh(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Mh(t)?xh(t,(function(e){return fh(n,e)})):fh(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function dE(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),p=Mh(d),h=function(e,t){return AC(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(o,a);if(c>1||p&&!c){var f=function(e,t,n,r,i){var o=t.getData(),a=bh(e,(function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(eE("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?xh(r,(function(e){c(_I(o,n,e),e)})):xh(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,h);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=_I(l,a,u[0]),n=g.type}else i=t=p?d[0]:d;var m=Uy(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return eE("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[eE("nameValue",{markerType:"item",markerColor:h,name:x,noName:!Vh(x),value:t,valueType:n})].concat(r||[])})}var pE=Wy();function hE(e,t){return e.getName(t)||e.getId(t)}var fE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return j(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=TI({count:mE,reset:vE}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(pE(this).sourceManager=new qI(this)).prepareSource();var r=this.getInitialData(e,n);xE(r,this),this.dataTask.context.data=r,pE(this).dataBeforeProcessed=r,gE(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=BC(this),r=n?FC(e):{},i=this.subType;HC.hasClass(i)&&(i+="Series"),hh(e,t.getTheme().get(this.subType)),hh(e,this.getDefaultOption()),Ny(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&jC(e,r,n)},t.prototype.mergeOption=function(e,t){e=hh(this.option,e,!0),this.fillDataTextStyle(e.data);var n=BC(this);n&&jC(this.option,e,n);var r=pE(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);xE(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,pE(this).dataBeforeProcessed=i,gE(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Nh(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Ny(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=bE(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return pE(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=bE(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}pE(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Xh(e)},t.prototype.getSourceManager=function(){return pE(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return pE(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return dE({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Yp.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=hM.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<e.length;o++){var a=hE(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=Sh(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[hE(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){kh(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l];s[d=hE(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=hE(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(c),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return HC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(HC);function gE(e){var t=e.name;Uy(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return xh(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function mE(e){return e.model.getRawData().count()}function vE(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),yE}function yE(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function xE(e,t){xh(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,Ch(_E,t))}))}function _E(e,t){var n=bE(e);return n&&n.setOutputEnd((t||this).count()),t}function bE(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}vh(fE,wI),vh(fE,hM),nx(fE,HC);var wE=fE,SE=function(){function e(){this.group=new ay,this.uid=BT("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();tx(SE),ax(SE);var TE=SE;function CE(){var e=Wy();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}var ME=Wy(),IE=CE(),EE=function(){function e(){this.group=new ay,this.uid=BT("viewChart"),this.renderTask=TI({plan:kE,reset:OE}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&DE(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&DE(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){uT(this.group,e)},e.markUpdateMethod=function(e,t){ME(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function AE(e,t,n){e&&sw(e)&&("emphasis"===t?Vb:Wb)(e,n)}function DE(e,t,n){var r=Vy(e,t),i=t&&null!=t.highlightKey?function(e){var t=mb[e];return null==t&&gb<=32&&(t=mb[e]=gb++),t}(t.highlightKey):null;null!=r?xh(Oy(r),(function(t){AE(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){AE(e,n,i)}))}function kE(e){return IE(e.model)}function OE(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&ME(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),NE[l]}tx(EE),ax(EE);var NE={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},RE=EE,PE="\0__throttleOriginMethod",LE="\0__throttleRate",BE="\0__throttleType";function jE(e,t,n){var r,i,o,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var p=function(){for(var e=[],p=0;p<arguments.length;p++)e[p]=arguments[p];r=(new Date).getTime(),o=this,a=e;var h=s||t,f=s||n;s=null,i=r-(f?l:u)-h,clearTimeout(c),f?c=setTimeout(d,h):i>=0?d():c=setTimeout(d,-i),l=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(e){s=e},p}function FE(e,t,n,r){var i=e[t];if(i){var o=i[PE]||i,a=i[BE];if(i[LE]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=jE(o,n,"debounce"===r))[PE]=o,i[BE]=r,i[LE]=n}return i}}function zE(e,t){var n=e[t];n&&n[PE]&&(n.clear&&n.clear(),e[t]=n[PE])}var UE=Wy(),HE={itemStyle:sx(kT,!0),lineStyle:sx(ET,!0)},VE={lineStyle:"stroke",itemStyle:"fill"};function WE(e,t){var n=e.visualStyleMapper||HE[t];return n||(console.warn("Unknown style type '"+t+"'."),HE.itemStyle)}function YE(e,t){var n=e.visualDrawType||VE[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var GE={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=WE(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=YE(e,r),l=o[s],u=Ih(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Ih(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||Ih(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=fh({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}},qE=new PT,QE={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=WE(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){qE.option=n[r];var a=i(qE);fh(e.ensureUniqueItemVisual(t,"style"),a),qE.option.decal&&(e.setItemVisual(t,"decal",qE.option.decal),qE.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},ZE={performRawSeries:!0,overallReset:function(e){var t=Xh();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),UE(e).scope=i}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=UE(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=YE(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}}))}}))}},XE=Math.PI;var $E=function(){function e(e,t,n,r){this._stageTaskMap=Xh(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Xh();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;xh(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});Hh(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}xh(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,p=c.agentStubMap;p.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),o.updatePayload(c,n);var h=o.getPerformArgs(c,r.block);p.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=Xh(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||TI({plan:nA,reset:rA,count:aA}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||TI({reset:KE});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Xh(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,TI({reset:JE,onDirty:tA})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}Hh(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,xh(n.getSeries(),p)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Ih(e)&&(e={overallReset:e,seriesType:sA(e)}),e.uid=BT("stageHandler"),t&&(e.visualType=t),e},e}();function KE(e){e.overallReset(e.ecModel,e.api,e.payload)}function JE(e){return e.overallProgress&&eA}function eA(){this.agent.dirty(),this.getDownstream().dirty()}function tA(){this.agent&&this.agent.dirty()}function nA(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function rA(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Oy(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?_h(t,(function(e,t){return oA(t)})):iA}var iA=oA(0);function oA(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function aA(e){return e.data.count()}function sA(e){lA=null;try{e(uA,cA)}catch(e){}return lA}var lA,uA={},cA={};function dA(e,t){for(var n in t.prototype)e[n]=ef}dA(uA,xM),dA(cA,bM),uA.eachSeriesByType=uA.eachRawSeriesByType=function(e){lA=e},uA.eachComponent=function(e){"series"===e.mainType&&e.subType&&(lA=e.subType)};var pA=$E,hA=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],fA={color:hA,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],hA]},gA="#B9B8CE",mA="#100C2A",vA=function(){return{axisLine:{lineStyle:{color:gA}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},yA=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],xA={darkMode:!0,color:yA,backgroundColor:mA,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:gA}},textStyle:{color:gA},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:gA}},dataZoom:{borderColor:"#71708A",textStyle:{color:gA},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:gA}},timeline:{lineStyle:{color:gA},label:{color:gA},controlStyle:{color:gA,borderColor:gA}},calendar:{itemStyle:{color:mA},dayLabel:{color:gA},monthLabel:{color:gA},yearLabel:{color:gA}},timeAxis:vA(),logAxis:vA(),valueAxis:vA(),categoryAxis:vA(),line:{symbol:"circle"},graph:{color:yA},gauge:{title:{color:gA},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:gA},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};xA.categoryAxis.splitLine.show=!1;var _A=xA,bA=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(Eh(e)){var i=ex(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};xh(e,(function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),wA=["symbol","symbolSize","symbolRotate","symbolOffset"],SA=wA.concat(["symbolKeepAspect"]),TA={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a<wA.length;a++){var s=wA[a],l=e.get(s);Ih(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(fh({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=Sh(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}},CA={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<SA.length;r++){var i=SA[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function MA(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function IA(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=Vy(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:Mh(u)?l.getName(u[0]):l.getName(u),selected:Eh(r)?r:fh({},r)})}}))}function EA(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var AA=Math.round(9*Math.random()),DA="function"==typeof Object.defineProperty,kA=function(){function e(){this._id="__ec_inner_"+AA++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return DA?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),OA=kA,NA=L_.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),RA=L_.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),PA=L_.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),p=Math.cos(u),h=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*h,l+s+p*h,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-c+d*h,l+s+p*h,n-c,l+s),e.closePath()}}),LA=L_.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),BA={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},jA={};xh({line:lS,rect:$_,roundRect:$_,square:$_,circle:Aw,diamond:RA,pin:PA,arrow:LA,triangle:NA},(function(e,t){jA[t]=new e}));var FA=L_.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=qv(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=jA[r];i||(i=jA[r="rect"]),BA[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function zA(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function UA(e,t,n,r,i,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?YS(e.slice(8),new og(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?WS(e.slice(7),{},new og(t,n,r,i),a?"center":"cover"):new FA({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=zA,o&&s.setColor(o),s}function HA(e,t){if(null!=e)return Mh(e)||(e=[e,e]),[hy(e[0],t[0])||0,hy(jh(e[1],e[0]),t[1])||0]}function VA(e){return isFinite(e)}function WA(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,i=n.height,o=Math.min(r,i),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*i+n.y,l*=o),a=VA(a)?a:.5,s=VA(s)?s:.5,l=l>=0&&VA(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,o=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=VA(r)?r:0,i=VA(i)?i:1,o=VA(o)?o:0,a=VA(a)?a:0,e.createLinearGradient(r,o,i,a)}(e,t,n),i=t.colorStops,o=0;o<i.length;o++)r.addColorStop(i[o].offset,i[o].color);return r}function YA(e){return parseInt(e,10)}function GA(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||YA(s[r])||YA(e.style[r]))-(YA(s[o])||0)-(YA(s[a])||0)|0}function qA(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:Dh(t)?[t]:Mh(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=_h(i,(function(e){return e/a})),o/=a)}return[i,o]}var QA=new g_(!0);function ZA(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function XA(e){return"string"==typeof e&&"none"!==e}function $A(e){var t=e.fill;return null!=t&&"none"!==t}function KA(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function JA(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function eD(e,t,n){var r=px(t.image,t.__image,n);if(fx(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*tf),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var tD=["shadowBlur","shadowOffsetX","shadowOffsetY"],nD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function rD(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){aD(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?Ax.opacity:a}(r||t.blend!==n.blend)&&(o||(aD(e,i),o=!0),e.globalCompositeOperation=t.blend||Ax.blend);for(var s=0;s<tD.length;s++){var l=tD[s];(r||t[l]!==n[l])&&(o||(aD(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(aD(e,i),o=!0),e.shadowColor=t.shadowColor||Ax.shadowColor),o}function iD(e,t,n,r,i){var o=sD(t,i.inHover),a=r?null:n&&sD(n,i.inHover)||{};if(o===a)return!1;var s=rD(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(aD(e,i),s=!0),XA(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(aD(e,i),s=!0),XA(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(aD(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(aD(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<nD.length;u++){var c=nD[u],d=c[0];(r||o[d]!==a[d])&&(s||(aD(e,i),s=!0),e[d]=o[d]||c[1])}return s}function oD(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function aD(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function sD(e,t){return t&&e.__hoverStyle||e.style}function lD(e,t){uD(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function uD(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,a)||(a&&a.length&&(aD(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(aD(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var o=e[i];r=r||o.isZeroArea(),oD(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=r}(o,e,n),s=!0),n.prevElClipPaths=o),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,p=t instanceof L_&&t.autoBatch&&function(e){var t=$A(e),n=ZA(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(c=i,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(aD(e,n),oD(e,t)):p||aD(e,n);var h=sD(t,n.inHover);t instanceof L_?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),iD(e,t,u,l,n),p&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o=ZA(n),a=$A(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||QA,d=t.__dirty;if(!r){var p=n.fill,h=n.stroke,f=a&&!!p.colorStops,g=o&&!!h.colorStops,m=a&&!!p.image,v=o&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=t.getBoundingRect()),f&&(y=d?WA(e,p,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?WA(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?eD(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?eD(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:m&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:v&&(b?e.strokeStyle=b:o=!1)}var S,T,C=t.getGlobalScale();c.setScale(C[0],C[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=qA(t))[0],T=i[1]);var M=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),M=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),M&&c.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=T),r||(n.strokeFirst?(o&&JA(e,n),a&&KA(e,n)):(a&&KA(e,n),o&&JA(e,n))),S&&e.setLineDash([])}(e,t,h,p),p&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"")):t instanceof F_?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),iD(e,t,u,l,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||qp,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=qA(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(ZA(n)&&e.strokeText(i,n.x,n.y),$A(n)&&e.fillText(i,n.x,n.y)):($A(n)&&e.fillText(i,n.x,n.y),ZA(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,h)):t instanceof V_?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,r,i){rD(e,sD(t,i.inHover),n&&sD(n,i.inHover),r,i)}(e,t,u,l,n),function(e,t,n){var r=t.__image=px(n.image,t.__image,t,t.onload);if(r&&fx(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),p=s-(c=n.sy);e.drawImage(r,u,c,d,p,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,h)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=r.length;o<a;o++){(c=r[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),uD(e,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c;(c=i[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),uD(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),p&&r&&aD(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var cD=new OA,dD=new om(100),pD=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function hD(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&cD.delete(e);var o=cD.get(e);if(o)return o;var a=gh(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o=[n],s=!0,l=0;l<pD.length;++l){var u=a[pD[l]];if(null!=u&&!Mh(u)&&!Eh(u)&&!Dh(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(i?"-svg":"");var c=dD.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,p=gD(a.dashArrayX),h=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Dh(e)){var t=Math.ceil(e);return[t,t]}var n=_h(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=fD(a.symbol),g=(_=p,_h(_,(function(e){return mD(e)}))),m=mD(h),v=!i&&$p.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=Ey(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=Ey(r,f[t].length);e*=r;var i=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var _;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(e<=0)return;var o=-m,s=0,l=0,u=0;for(;o<x.height;){if(s%2==0){for(var c=l/2%f.length,g=0,_=0,b=0;g<2*x.width;){var w=0;for(t=0;t<p[u].length;++t)w+=p[u][t];if(w<=0)break;if(_%2==0){var S=.5*(1-a.symbolSize),T=g+p[u][_]*S,C=o+h[s]*S,M=p[u][_]*a.symbolSize,I=h[s]*a.symbolSize,E=b/2%f[c].length;A(T,C,M,I,f[c][E])}g+=p[u][_],++b,++_===p[u].length&&(_=0)}++u===p.length&&(u=0)}o+=h[s],++l,++s===h.length&&(s=0)}function A(e,t,o,s,l){var u=i?1:n,c=UA(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(i){var p=r.painter.renderOneToVNode(c);p&&y.children.push(p)}else lD(d,c)}})(),s&&dD.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=i?1:1/n,cD.set(e,s),e.dirty=!1,s}function fD(e){if(!e||0===e.length)return[["rect"]];if(Eh(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!Eh(e[n])){t=!1;break}if(t)return fD([e]);var r=[];for(n=0;n<e.length;++n)Eh(e[n])?r.push([e[n]]):r.push(e[n]);return r}function gD(e){if(!e||0===e.length)return[[0,0]];if(Dh(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!Dh(e[n])){t=!1;break}if(t)return gD([e]);var r=[];for(n=0;n<e.length;++n)if(Dh(e[n])){var i=Math.ceil(e[n]);r.push([i,i])}else{(i=_h(e[n],(function(e){return Math.ceil(e)}))).length%2==1?r.push(i.concat(i)):r.push(i)}return r}function mD(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var vD=new xf,yD={};var xD=2e3,_D=4500,bD={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:xD,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:_D,ARIA:6e3,DECAL:7e3}},wD="__flagInMainProcess",SD="__pendingUpdate",TD="__needsUpdateStatus",CD=/^[a-zA-Z0-9_]+$/,MD="__connectUpdateStatus";function ID(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return AD(this,e,t);this.id}}function ED(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return AD(this,e,t)}}function AD(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),xf.prototype[t].apply(e,n)}var DD,kD,OD,ND,RD,PD,LD,BD,jD,FD,zD,UD,HD,VD,WD,YD,GD,qD,QD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(xf),ZD=QD.prototype;ZD.on=ED("on"),ZD.off=ED("off");var XD=function(e){function t(t,n,r){var i=e.call(this,new bA)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},Eh(n)&&(n=ik[n]),i._dom=t;var o=i._zr=cy(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:jh(r.useDirtyRect,!1),useCoarsePointer:jh(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=jE(Th(o.flush,o),17),(n=ph(n))&&qM(n,!0),i._theme=n,i._locale=function(e){if(Eh(e)){var t=HT[e.toUpperCase()]||{};return e===FT||e===zT?ph(t):hh(ph(t),ph(HT[UT]),!1)}return hh(ph(e),ph(HT[UT]),!1)}(r.locale||WT),i._coordSysMgr=new SM;var a=i._api=WD(i);function s(e,t){return e.__prio-t.__prio}return wg(rk,s),wg(tk,s),i._scheduler=new pA(i,a,tk,rk),i._messageCenter=new QD,i._initEvents(),i.resize=Th(i.resize,i),o.animation.on("frame",i._onframe,i),FD(o,i),zD(o,i),Yh(i),i}return j(t,e),t.prototype._onframe=function(){if(!this._disposed){qD(this);var e=this._scheduler;if(this[SD]){var t=this[SD].silent;this[wD]=!0;try{DD(this),ND.update.call(this,null,this[SD].updateParams)}catch(e){throw this[wD]=!1,this[SD]=null,e}this._zr.flush(),this[wD]=!1,this[SD]=null,BD.call(this,t),jD.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),PD(this,r),e.performVisualTasks(r),VD(this,this._model,i,"remain",{}),n-=+new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[wD])if(this._disposed)this.id;else{var r,i,o;if(kh(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[wD]=!0,!this._model||t){var a=new IM(this._api),s=this._theme,l=this._model=new xM;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},nk);var u={seriesTransition:o,optionChanged:!0};if(n)this[SD]={silent:r,updateParams:u},this[wD]=!1,this.getZr().wakeUp();else{try{DD(this),ND.update.call(this,null,u)}catch(e){throw this[SD]=null,this[wD]=!1,e}this._ssr||this._zr.flush(),this[SD]=null,this[wD]=!1,BD.call(this,r),jD.call(this,r)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Yp.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Yp.svgSupported){var e=this._zr;return xh(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;xh(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return xh(r,(function(e){e.group.ignore=!1})),o}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(sk[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();xh(ak,(function(o,d){if(o.group===n){var p=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(ph(e)),h=o.getDom().getBoundingClientRect();a=r(h.left,a),s=r(h.top,s),l=i(h.right,l),u=i(h.bottom,u),c.push({dom:p,left:h.left,top:h.top})}}));var p=(l*=d)-(a*=d),h=(u*=d)-(s*=d),f=$p.createCanvas(),g=cy(f,{renderer:t?"svg":"canvas"});if(g.resize({width:p,height:h}),t){var m="";return xh(c,(function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new $_({shape:{x:0,y:0,width:p,height:h},style:{fill:e.connectedBackgroundColor}})),xh(c,(function(e){var t=new V_({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,t){return RD(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return RD(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return xh(Gy(this._model,e),(function(e,r){r.indexOf("Models")>=0&&xh(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}}),this)}),this),!!n;this.id},t.prototype.getVisual=function(e,t){var n=Gy(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?MA(r,i,t):function(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;xh(KD,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&EA(o,(function(e){var t=fb(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=fh({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),xh(ek,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),xh(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(IA("map","selectchanged",t,r,e),IA("pie","selectchanged",t,r,e)):"select"===e.fromAction?(IA("map","selected",t,r,e),IA("pie","selected",t,r,e)):"unselect"===e.fromAction&&(IA("map","unselected",t,r,e),IA("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&$y(this.getDom(),ck,"");var e=this,t=e._api,n=e._model;xh(e._componentsViews,(function(e){e.dispose(n,t)})),xh(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete ak[e.id]}},t.prototype.resize=function(e){if(!this[wD])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[SD]&&(null==r&&(r=this[SD].silent),n=!0,this[SD]=null),this[wD]=!0;try{n&&DD(this),ND.update.call(this,{type:"resize",animation:fh({duration:0},e&&e.animation)})}catch(e){throw this[wD]=!1,e}this[wD]=!1,BD.call(this,r),jD.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(kh(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),ok[e]){var n=ok[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=fh({},e);return t.type=ek[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(kh(t)||(t={silent:!!t}),JD[e.type]&&this._model)if(this[wD])this._pendingActions.push(e);else{var n=t.silent;LD.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Yp.browser.weChat&&this._throttledZrFlush(),BD.call(this,n),jD.call(this,n)}},t.prototype.updateLabelLayout=function(){vD.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered((function(e){return r(e,n,i,-1/0),!0}))}}function r(e,t,n,i){var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)i=Math.max(r(s[l],t,n,i),i);else e.z=t,e.zlevel=n,i=Math.max(e.z2,i);if(o&&(o.z=t,o.zlevel=n,isFinite(i)&&(o.z2=i+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function i(e,t){t.eachRendered((function(e){if(!RS(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function o(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(RS(e))return;if(e instanceof L_&&function(e){var t=vb(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=a;var r=e.getTextContent(),o=e.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}DD=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),kD(e,!0),kD(e,!1),t.plan()},kD=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=ex(e.type);(c=new(t?TE.getClass(d.main,d.sub):RE.getClass(d.sub))).init(n,s),o[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(c,e,n,s)}t?n.eachComponent((function(e,t){"series"!==e&&u(t)})):n.eachSeries(u);for(l=0;l<i.length;){var c=i[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},OD=function(e,t,n,r,i){var o=e._model;if(o.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};i&&(s.subType=i);var l,u=n.excludeSeriesId;null!=u&&(l=Xh(),xh(Oy(u),(function(e){var t=zy(e,null);null!=t&&l.set(t,!0)}))),o&&o.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(uw(n))if(t instanceof wE)n.type!==bb||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=Vy(i,t);o=(Mh(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=fb(a);Xb(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&Xb(r,c,d,n)}}}(t,n,e._api);else{var r=Kb(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,o=r.dispatchers;n.type===bb&&i&&!n.notBlur&&$b(t.mainType,t.componentIndex,e._api),o&&xh(o,(function(e){n.type===bb?Vb(e):Wb(e)}))}else lw(n)&&t instanceof wE&&(!function(e,t){if(lw(t)){var n=t.dataType,r=Vy(e.getData(n),t);Mh(r)||(r=[r]),e[t.type===Cb?"toggleSelect":t.type===Sb?"select":"unselect"](r,n)}}(t,n,e._api),Jb(t),GD(e))}),e),o&&o.eachComponent(s,(function(t){l&&null!=l.get(t.id)||c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else xh([].concat(e._componentsViews).concat(e._chartsViews),c);function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,n)}},ND={prepareAndUpdate:function(e){DD(this),ND.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),PD(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),UD(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),vD.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent((function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}}));var a=Xh();r.eachSeries((function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)})),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),VD(this,r,i,t,{},a),vD.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),RE.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),UD(this,n,this._api,t,{}),vD.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries((function(e){e.getData().clearAllVisual()})),RE.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent((function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}})),r.eachSeries((function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)})),vD.trigger("afterupdate",r,this._api))},updateLayout:function(e){ND.update.call(this,e)}},RD=function(e,t,n,r){if(e._disposed)e.id;else for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Gy(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},PD=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},LD=function(e,t){var n=this,r=this.getModel(),i=e.type,o=e.escapeConnect,a=JD[i],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&ex(l[0]);this[wD]=!0;var d=[e],p=!1;e.batch&&(p=!0,d=_h(e.batch,(function(t){return(t=gh(fh({},t),e)).batch=null,t})));var h,f=[],g=lw(e),m=uw(e);if(m&&Zb(this._api),xh(d,(function(t){if((h=(h=a.action(t,n._model,n._api))||fh({},t)).type=s.event||h.type,f.push(h),m){var r=qy(e),i=r.queryOptionMap,o=r.mainTypeSpecified?i.keys()[0]:"series";OD(n,u,t,o),GD(n)}else g?(OD(n,u,t,"series"),GD(n)):c&&OD(n,u,t,c.main,c.sub)})),"none"!==u&&!m&&!g&&!c)try{this[SD]?(DD(this),ND.update.call(this,e),this[SD]=null):ND[u].call(this,e)}catch(e){throw this[wD]=!1,e}if(h=p?{type:s.event||i,escapeConnect:o,batch:f}:f[0],this[wD]=!1,!t){var v=this._messageCenter;if(v.trigger(h.type,h),g){var y={type:"selectchanged",escapeConnect:o,selected:ew(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},BD=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();LD.call(this,n,e)}},jD=function(e){!e&&this.trigger("updated")},FD=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[SD]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},zD=function(e,t){e.on("mouseover",(function(e){var n=EA(e.target,sw);n&&(!function(e,t,n){var r=fb(e),i=Kb(r.componentMainType,r.componentIndex,r.componentHighDownName,n),o=i.dispatchers,a=i.focusSelf;o?(a&&$b(r.componentMainType,r.componentIndex,n),xh(o,(function(e){return Ub(e,t)}))):(Xb(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&$b(r.componentMainType,r.componentIndex,n),Ub(e,t))}(n,e,t._api),GD(t))})).on("mouseout",(function(e){var n=EA(e.target,sw);n&&(!function(e,t,n){Zb(n);var r=fb(e),i=Kb(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?xh(i,(function(e){return Hb(e,t)})):Hb(e,t)}(n,e,t._api),GD(t))})).on("click",(function(e){var n=EA(e.target,(function(e){return null!=fb(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",i=fb(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},UD=function(e,t,n,r,i){!function(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})})),r){var i,o,a=t.concat(n);wg(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),xh(a,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)}))}}(t),HD(e,t,n,r,i),xh(e._chartsViews,(function(e){e.__alive=!1})),VD(e,t,n,r,i),xh(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},HD=function(e,t,r,a,s,l){xh(l||e._componentsViews,(function(e){var s=e.__model;i(s,e),e.render(s,t,r,a),n(s,e),o(s,e)}))},VD=function(e,t,r,a,s,l){var u=e._scheduler;s=fh(s||{},{updatedSeries:t.getSeries()}),vD.trigger("series:beforeupdate",t,r,s);var c=!1;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;u.updatePayload(r,a),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}(t,n),Jb(t)})),u.unfinished=c||u.unfinished,vD.trigger("series:layoutlabels",t,r,s),vD.trigger("series:transition",t,r,s),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];n(t,r),o(t,r)})),function(e,t){var n=e._zr,r=n.storage,i=0;r.traverse((function(e){e.isGroup||i++})),i>t.get("hoverLayerThreshold")&&!Yp.node&&!Yp.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),vD.trigger("series:afterupdate",t,r,s)},GD=function(e){e[TD]=!0,e.getZr().wakeUp()},qD=function(e){e[TD]&&(e.getZr().storage.traverse((function(e){RS(e)||t(e)})),e[TD]=!1)},WD=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return j(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Vb(t,n),GD(e)},n.prototype.leaveEmphasis=function(t,n){Wb(t,n),GD(e)},n.prototype.enterBlur=function(t){!function(e){Bb(e,Ob)}(t),GD(e)},n.prototype.leaveBlur=function(t){Yb(t),GD(e)},n.prototype.enterSelect=function(t){Gb(t),GD(e)},n.prototype.leaveSelect=function(t){qb(t),GD(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(bM))(e)},YD=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][MD]=t}}xh(ek,(function(n,r){e._messageCenter.on(r,(function(n){if(sk[e.group]&&0!==e[MD]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];xh(ak,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),xh(i,(function(e){1!==e[MD]&&e.dispatchAction(r)})),t(i,2)}}))}))}}(),t}(xf),$D=XD.prototype;$D.on=ID("on"),$D.off=ID("off"),$D.one=function(e,t,n){var r=this;this.on.call(this,e,(function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)}),n)};var KD=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var JD={},ek={},tk=[],nk=[],rk=[],ik={},ok={},ak={},sk={},lk=+new Date-0,uk=+new Date-0,ck="_echarts_instance_";function dk(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return ak[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,ck)]}(e);if(i)return i}var o=new XD(e,t,n);return o.id="ec_"+lk++,ak[o.id]=o,r&&$y(e,ck,o.id),YD(o),vD.trigger("afterinit",o),o}function pk(e){if(Mh(e)){var t=e;e=null,xh(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+uk++,xh(t,(function(t){t.group=e}))}return sk[e]=!0,e}function hk(e){sk[e]=!1}function fk(e,t){ik[e]=t}function gk(e){mh(nk,e)<0&&nk.push(e)}function mk(e,t){bk(tk,e,t,2e3)}function vk(e,t){vD.on(e,t)}function yk(e,t,n){Ih(t)&&(n=t,t="");var r=kh(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,ek[t]||(Hh(CD.test(r)&&CD.test(t)),JD[r]||(JD[r]={action:n,actionInfo:e}),ek[t]=r)}function xk(e,t){bk(rk,e,t,3e3,"visual")}var _k=[];function bk(e,t,n,r,i){if((Ih(t)||kh(t))&&(n=t,t=r),!(mh(_k,n)>=0)){_k.push(n);var o=pA.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function wk(e,t){ok[e]=t}var Sk=function(e){var t=(e=ph(e)).type;t||Ay("");var n=t.split(":");2!==n.length&&Ay("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,RI.set(t,e)};function Tk(e){return null==e?0:e.length||1}function Ck(e){return e}xk(xD,GE),xk(_D,QE),xk(_D,ZE),xk(xD,TA),xk(_D,CA),xk(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=hD(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=hD(i,t)}}))})),gk(qM),mk(900,(function(e){var t=Xh();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),t.each(QM)})),wk("default",(function(e,t){gh(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new ay,r=new $_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new hb({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new $_({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new mS({shape:{startAngle:-XE/2,endAngle:-XE/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*XE/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*XE/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),yk({type:bb,event:bb,update:bb},ef),yk({type:wb,event:wb,update:wb},ef),yk({type:Sb,event:Sb,update:Sb},ef),yk({type:Tb,event:Tb,update:Tb},ef),yk({type:Cb,event:Cb,update:Cb},ef),fk("light",fA),fk("dark",_A);var Mk=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||Ck,this._newKeyGetter=r||Ck,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=Tk(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=Tk(l),d=Tk(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var p=0;p<c;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=Tk(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=Tk(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),Ik=Mk,Ek=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function Ak(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var Dk=function(e){this.otherDims={},null!=e&&fh(this,e)},kk=Wy(),Ok={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Nk=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Lk(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return jh(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=lI(this.source),n=!Bk(e),r="",i=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=Ok[l]||"f",u&&(r+=u.uid),r+="$"}var p=this.source;return{dimensions:i,hash:[p.seriesLayoutBy,p.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function Rk(e){return e instanceof Nk}function Pk(e){for(var t=Xh(),n=0;n<(e||[]).length;n++){var r=e[n],i=kh(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function Lk(e){var t=kk(e);return t.dimNameMap||(t.dimNameMap=Pk(e.dimensionsDefine))}function Bk(e){return e>30}var jk,Fk,zk,Uk,Hk,Vk,Wk,Yk=kh,Gk=_h,qk="undefined"==typeof Int32Array?Array:Int32Array,Qk=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Zk=["_approximateExtent"],Xk=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;Rk(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=Eh(c)?new Dk({name:c}):c instanceof Dk?c:new Dk(c),p=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=p,d.coordDimIndex=0);var h=d.otherDims=d.otherDims||{};o.push(p),i[p]=d,null!=l[p]&&(s=!0),d.createInvertedIndices&&(a[p]=[]),0===h.itemName&&(this._nameDimIdx=u),0===h.itemId&&(this._idDimIdx=u),r&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=Xh();xh(o,(function(e){f.set(i[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Dh(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,i=this;if(e instanceof GI&&(r=e),!r){var o=this.dimensions,a=tI(e)||yh(e)?new uI(e,o.length):e;r=new GI;var s=Gk(o,(function(e){return{type:i._dimInfos[e].type,property:e}}));r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},i=Xh(),o=[],a=[],s={};xh(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;Ak(r,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),Ak(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}GC.each((function(e,t){var n=Ak(r,t),i=l.otherDims[t];null!=i&&!1!==i&&(n[i]=l.name)}))}));var l=[],u={};i.each((function(e,t){var n=r[t];u[t]=n[0],l=l.concat(n)})),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=_h(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),n.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(o=c.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,n.userOutput=new Ek(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&Wk(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==$C&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===qC&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&Ly(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=zy(l,null));var u=s.id;null==i[a]&&null!=u&&(i[a]=zy(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)Wk(this,a);jk(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Yk(e)?fh(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=zk(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return Fk(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return Mh(e)?r.getValues(Gk(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){Ih(e)&&(n=t,t=e,e=[]);var r=n||this,i=Gk(Uk(e),this._getStoreDimIndex,this);this._store.each(i,r?Th(t,r):t)},e.prototype.filterSelf=function(e,t,n){Ih(e)&&(n=t,t=e,e=[]);var r=n||this,i=Gk(Uk(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?Th(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={};return xh(Sh(e),(function(r){var i=t._getStoreDimIndex(r);n[i]=e[r]})),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){Ih(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=Gk(Uk(e),this._getStoreDimIndex,this),a=Vk(this);return a._store=this._store.map(o,i?Th(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=Gk(Uk(e),this._getStoreDimIndex,this);this._store.modify(o,i?Th(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Vk(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=Vk(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new PT(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Ik(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return Fk(e,t)}),(function(e){return Fk(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Yk(e)?fh(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(Mh(i=this.getVisual(t))?i=i.slice():Yk(i)&&(i=fh({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Yk(t)?fh(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Yk(e)?fh(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?fh(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){!function(e,t,n,r){if(r){var i=fb(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,"group"===r.type&&r.traverse((function(r){var i=fb(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){xh(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Gk(this.dimensions,this._getDimInfo,this),this.hostModel)),Hk(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Ih(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(zh(arguments)))})},e.internalField=(jk=function(e){var t=e._invertedIndicesMap;xh(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new qk(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}}))},zk=function(e,t,n){return zy(e._getCategory(t,n),null)},Fk=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=zk(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},Uk=function(e){return Mh(e)||(e=null!=e?[e]:[]),e},Vk=function(t){var n=new e(t._schema?t._schema:Gk(t.dimensions,t._getDimInfo,t),t.hostModel);return Hk(n,t),n},Hk=function(e,t){xh(Qk.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,xh(Zk,(function(n){e[n]=ph(t[n])})),e._calculationInfo=fh({},t._calculationInfo)},void(Wk=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=zk(e,i,t)),null==s&&null!=o&&(r[t]=s=zk(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),r[t]=s}})),e}(),$k=Xk;function Kk(e,t){tI(e)||(e=rI(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Xh(),o=[],a=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return xh(t,(function(e){var t;kh(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Bk(a),l=r===e.dimensionsDefine,u=l?Lk(e):Pk(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Xh(c),p=new UI(a),h=0;h<p.length;h++)p[h]=-1;function f(e){var t=p[e];if(t<0){var n=r[e],i=kh(n)?n:{name:n},a=new Dk,s=i.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=o.length;return p[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(h=0;h<a;h++)f(h);d.each((function(e,t){var n=Oy(e).slice();if(1===n.length&&!Eh(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);xh(n,(function(e,n){var i=Eh(e)?u.get(e):e;null!=i&&i<a&&(r[n]=i,m(f(i),t,n))}))}}));var g=0;function m(e,t,n){null!=GC.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}xh(n,(function(e){var t,n,r,i;if(Eh(e))t=e,i={};else{t=(i=e).name;var o=i.ordinalMeta;i.ordinalMeta=null,(i=fh({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=Oy(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}xh(s,(function(e,o){var a=f(e);if(l&&null!=i.type&&(a.type=i.type),m(gh(a,i),t,o),null==a.name&&n){var s=n[o];!kh(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&gh(a.otherDims,r)}))}}));var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var _=v||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)xh(o,(function(e){b(e)})),o.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var w=0;w<a;w++){var S=f(w);null==S.coordDim&&(S.coordDim=Jk(_,i,x),S.coordDimIndex=0,(!v||y<=0)&&(S.isExtraCoord=!0),y--),b(S),null!=S.type||sM(e,w)!==tM&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=Xh(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(o),new Nk({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function Jk(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var eO=function(e){this.coordSysDims=[],this.axisMap=Xh(),this.categoryAxisMap=Xh(),this.coordSysName=e};var tO={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",Qy).models[0],o=e.getReferringComponents("yAxis",Qy).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),nO(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),nO(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",Qy).models[0];t.coordSysDims=["single"],n.set("single",i),nO(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",Qy).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),nO(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),nO(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();xh(o.parallelAxisIndex,(function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),nO(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function nO(e){return"category"===e.get("type")}function rO(e,t,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!Rk(e.schema)}(t)?(i=t.schema,r=i.dimensions,o=t.store):r=t;var l,u,c,d,p=!(!e||!e.get("stack"));if(xh(r,(function(e,t){Eh(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,f=u.type,g=0;xh(r,(function(e){e.coordDim===h&&g++}));var m={name:c,coordDim:h,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(d,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function iO(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function oO(e,t,n){n=n||{};var r,i=t.getSourceManager(),o=!1;e?(o=!0,r=rI(e)):o=(r=i.getSource()).sourceFormat===qC;var a=function(e){var t=e.get("coordinateSystem"),n=new eO(t),r=tO[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),i=SM.get(r);return t&&t.coordSysDims&&(n=_h(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var i=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=Ih(l)?l:l?Ch(oM,s,t):null,c=Kk(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var r,i;return n&&xh(e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)})),i||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),p=o?null:i.getSharedDataStore(c),h=rO(t,{schema:c,store:p}),f=new $k(c,t);f.setCalculationInfo(h);var g=null!=d&&function(e){if(e.sourceFormat===qC){return!Mh(Py(function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(o?r:p,null,g),f}var aO=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();ax(aO);var sO=aO,lO=0,uO=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++lO}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&_h(r,cO);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Eh(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Xh(this.categories))},e}();function cO(e){return kh(e)&&null!=e.value?e.value:e+""}var dO=uO;function pO(e){return"interval"===e.type||"log"===e.type}function hO(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=Ty(o/t,!0);null!=n&&a<n&&(a=i.interval=n),null!=r&&a>r&&(a=i.interval=r);var s=i.intervalPrecision=gO(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),mO(e,0,t),mO(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[fy(Math.ceil(e[0]/a)*a,s),fy(Math.floor(e[1]/a)*a,s)],e),i}function fO(e){var t=Math.pow(10,Sy(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,fy(n*t)}function gO(e){return my(e)+2}function mO(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function vO(e,t){return e>=t[0]&&e<=t[1]}function yO(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function xO(e,t){return e*(t[1]-t[0])+t[0]}var _O=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new dO({})),Mh(r)&&(r=new dO({categories:_h(r,(function(e){return kh(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return j(t,e),t.prototype.parse=function(e){return null==e?NaN:Eh(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return vO(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return yO(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(xO(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(sO);sO.registerClass(_O);var bO=_O,wO=fy,SO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return j(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return vO(e,this._extent)},t.prototype.normalize=function(e){return yO(e,this._extent)},t.prototype.scale=function(e){return xO(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=gO(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:wO(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=wO(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:wO(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=wO(a.value+(s+1)*u);c>r[0]&&c<r[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=my(e.value)||0:"auto"===n&&(n=this._intervalPrecision),wC(wO(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var o=hO(r,e,t,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=wO(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=wO(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(sO);sO.registerClass(SO);var TO=SO,CO="undefined"!=typeof Float32Array,MO=CO?Float32Array:Array;function IO(e){return Mh(e)?CO?new Float32Array(e):e:new MO(e)}function EO(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function AO(e){return e.dim+e.index}function DO(e,t){var n=[];return t.eachSeriesByType(e,(function(e){NO(e)&&n.push(e)})),n}function kO(e){var t=function(e){var t={};xh(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}}));var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort((function(e,t){return e-t}));for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return xh(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=t[a],l=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(o[1]-o[0])/d.count()}var p=hy(e.get("barWidth"),r),h=hy(e.get("barMaxWidth"),r),f=hy(e.get("barMinWidth")||(RO(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:AO(i),stackId:EO(e)})})),function(e){var t={};xh(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var p=e.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return xh(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=Sh(r).length;o=Math.max(35-4*a,15)+"%"}var s=hy(o,i),l=hy(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),xh(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var p,h=0;xh(r,(function(e,t){e.width||(e.width=d),p=e,h+=e.width*(1+l)})),p&&(h-=p.width*l);var f=-h/2;xh(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}(n)}function OO(e,t){var n=DO(e,t),r=kO(n);xh(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=EO(e),o=r[AO(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function NO(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function RO(e){return e.pipelineContext&&e.pipelineContext.large}var PO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return j(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return oC(e.value,JT[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(rC(this._minLevelUnit))]||JT.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(Eh(n))o=n;else if(Ih(n))o=n(e.value,t,{level:e.level});else{var a=fh({},$T);if(e.level>0)for(var s=0;s<eC.length;++s)a[eC[s]]="{primary|"+a[eC[s]]+"}";var l=n?!1===n.inherit?n:gh(n,a):a,u=aC(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(s=tC.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Mh(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return oC(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){var i=1e4,o=tC,a=0;function s(e,t,n,i,o,a,s){for(var l=new Date(t),u=t,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(e,i,o){var a=[],l=!i.length;if(!function(e,t,n,r){var i=wy(t),o=wy(n),a=function(e){return sC(i,e,r)===sC(o,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},p=function(){return d()&&a("second")},h=function(){return p()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return p();case"millisecond":return h()}}(rC(e),r[0],r[1],n)){l&&(i=[{value:HO(new Date(r[0]),e,n)},{value:r[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,d=i[u+1].value;if(c!==d){var p=void 0,h=void 0,f=void 0,g=!1;switch(e){case"year":p=Math.max(1,Math.round(t/ZT/365)),h=lC(n),f=gC(n);break;case"half-year":case"quarter":case"month":p=jO(t),h=uC(n),f=mC(n);break;case"week":case"half-week":case"day":p=BO(t),h=cC(n),f=vC(n),g=!0;break;case"half-day":case"quarter-day":case"hour":p=FO(t),h=dC(n),f=yC(n);break;case"minute":p=zO(t,!0),h=pC(n),f=xC(n);break;case"second":p=zO(t,!1),h=hC(n),f=_C(n);break;case"millisecond":p=UO(t),h=fC(n),f=bC(n)}s(p,c,d,h,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,p=0,h=0;h<o.length&&a++<i;++h){var f=rC(o[h]);if(iC(o[h]))if(l(o[h],u[u.length-1]||[],c),f!==(o[h+1]?rC(o[h+1]):null)){if(c.length){p=d,c.sort((function(e,t){return e.value-t.value}));for(var g=[],m=0;m<c.length;++m){var v=c[m].value;0!==m&&c[m-1].value===v||(g.push(c[m]),v>=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&p>y/1.5)break;if(u.push(g),d>y||e===o[h])break}c=[]}}var x=wh(_h(u,(function(e){return wh(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),_=[],b=x.length-1;for(h=0;h<x.length;++h)for(var w=x[h],S=0;S<w.length;++S)_.push({value:w[S].value,level:b-h});_.sort((function(e,t){return e.value-t.value}));var T=[];for(h=0;h<_.length;++h)0!==h&&_[h].value===_[h-1].value||T.push(_[h]);return T}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=ZT,t[1]+=ZT),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-ZT}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=LO.length,a=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n}(LO,this._approxInterval,0,o),o-1);this._interval=LO[a][1],this._minLevelUnit=LO[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Dh(e)?e:+wy(e)},t.prototype.contain=function(e){return vO(this.parse(e),this._extent)},t.prototype.normalize=function(e){return yO(this.parse(e),this._extent)},t.prototype.scale=function(e){return xO(e,this._extent)},t.type="time",t}(TO),LO=[["second",GT],["minute",qT],["hour",QT],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",XT/2],["year",XT]];function BO(e,t){return(e/=ZT)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function jO(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function FO(e){return(e/=QT)>12?12:e>6?6:e>3.5?4:e>2?2:1}function zO(e,t){return(e/=t?qT:GT)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function UO(e){return Ty(e,!0)}function HO(e,t,n){var r=new Date(e);switch(rC(t)){case"year":case"month":r[mC(n)](0);case"day":r[vC(n)](1);case"hour":r[yC(n)](0);case"minute":r[xC(n)](0);case"second":r[_C(n)](0),r[bC(n)](0)}return r.getTime()}sO.registerClass(PO);var VO=PO,WO=sO.prototype,YO=TO.prototype,GO=fy,qO=Math.floor,QO=Math.ceil,ZO=Math.pow,XO=Math.log,$O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new TO,t._interval=0,t}return j(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return _h(YO.getTicks.call(this,e),(function(e){var t=e.value,i=fy(ZO(this.base,t));return i=t===n[0]&&this._fixMin?JO(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?JO(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=XO(this.base);e=XO(Math.max(0,e))/n,t=XO(Math.max(0,t))/n,YO.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=WO.getExtent.call(this);t[0]=ZO(e,t[0]),t[1]=ZO(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=JO(t[0],n[0])),this._fixMax&&(t[1]=JO(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=XO(e[0])/XO(t),e[1]=XO(e[1])/XO(t),WO.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,Sy(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[fy(QO(t[0]/i)*i),fy(qO(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){YO.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return vO(e=XO(e)/XO(this.base),this._extent)},t.prototype.normalize=function(e){return yO(e=XO(e)/XO(this.base),this._extent)},t.prototype.scale=function(e){return e=xO(e,this._extent),ZO(this.base,e)},t.type="log",t}(sO),KO=$O.prototype;function JO(e,t){return GO(e,my(t))}KO.getMinorTicks=YO.getMinorTicks,KO.getLabel=YO.getLabel,sO.registerClass($O);var eN=$O,tN=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);Ih(i)?this._modelMinNum=oN(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=oN(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(Ih(o)?this._modelMaxNum=oN(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=oN(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=Mh(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Gv(s[0],1),Gv(s[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?r?0:NaN:t-i[0]*o),null==s&&(s=e?r?r-1:NaN:n+i[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Lh(a)||Lh(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(a=d,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[rN[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[nN[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),nN={min:"_determinedMin",max:"_determinedMax"},rN={min:"_dataMin",max:"_dataMax"};function iN(e,t,n){var r=e.rawExtentInfo;return r||(r=new tN(e,t,n),e.rawExtentInfo=r,r)}function oN(e,t){return null==t?null:Lh(t)?NaN:e.parse(t)}function aN(e,t){var n=e.type,r=iN(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=DO("bar",a),l=!1;if(xh(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=kO(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t,n){if(e&&t){var r=e[AO(t)];return null!=r&&null!=n?r[EO(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;xh(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;xh(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/o)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(i,o,t,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function sN(e,t){var n=t,r=aN(e,n),i=r.extent,o=n.get("splitNumber");e instanceof eN&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function lN(e){var t,n,r=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):Eh(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):Ih(r)?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(uN(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function uN(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function cN(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new og(e.x,e.y,o,a)}function dN(e){var t=e.get("interval");return null==t?"auto":t}function pN(e){return"category"===e.type&&0===dN(e.getLabelModel())}function hN(e,t){var n={};return xh(e.mapDimensionsAll(t),(function(t){n[function(e,t){return iO(e,t)?e.getCalculationInfo("stackResultDimension"):t}(e,t)]=!0})),Sh(n)}var fN=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),gN=[],mN={registerPreprocessor:gk,registerProcessor:mk,registerPostInit:function(e){vk("afterinit",e)},registerPostUpdate:function(e){vk("afterupdate",e)},registerUpdateLifecycle:vk,registerAction:yk,registerCoordinateSystem:function(e,t){SM.register(e,t)},registerLayout:function(e,t){bk(rk,e,t,1e3,"layout")},registerVisual:xk,registerTransform:Sk,registerLoading:wk,registerMap:function(e,t,n){var r=function(e){return yD[e]}("registerMap");r&&r(e,t,n)},registerImpl:function(e,t){yD[e]=t},PRIORITY:bD,ComponentModel:HC,ComponentView:TE,SeriesModel:wE,ChartView:RE,registerComponentModel:function(e){HC.registerClass(e)},registerComponentView:function(e){TE.registerClass(e)},registerSeriesModel:function(e){wE.registerClass(e)},registerChartView:function(e){RE.registerClass(e)},registerSubTypeDefaulter:function(e,t){HC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){sy[e]=t}(e,t)}};function vN(e){Mh(e)?xh(e,(function(e){vN(e)})):mh(gN,e)>=0||(gN.push(e),Ih(e)&&(e={install:e}),e.install(mN))}function yN(e,t){return Math.abs(e-t)<1e-8}function xN(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var o=1;o<e.length;o++){var a=e[o];r+=S_(i[0],i[1],a[0],a[1],t,n),i=a}var s=e[0];return yN(i[0],s[0])&&yN(i[1],s[1])||(r+=S_(i[0],i[1],s[0],s[1],t,n)),0!==r}var _N=Wy();function bN(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=SN(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=lN(e);return{labels:_h(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function wN(e,t){return"category"===e.type?function(e,t){var n,r,i=TN(e,"ticks"),o=dN(t),a=CN(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Ih(o))n=EN(e,o,!0);else if("auto"===o){var s=SN(e,e.getLabelModel());r=s.labelCategoryInterval,n=_h(s.labels,(function(e){return e.tickValue}))}else n=IN(e,r=o,!0);return MN(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:_h(e.scale.getTicks(),(function(e){return e.value}))}}function SN(e,t){var n,r,i=TN(e,"labels"),o=dN(t),a=CN(i,o);return a||(Ih(o)?n=EN(e,o):(r="auto"===o?function(e){var t=_N(e).autoInterval;return null!=t?t:_N(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=IN(e,r)),MN(i,o,{labels:n,labelCategoryInterval:r}))}function TN(e,t){return _N(e)[t]||(_N(e)[t]=[])}function CN(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function MN(e,t,n){return e.push({key:t,value:n}),n}function IN(e,t,n){var r=lN(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=pN(e),p=a.get("showMinLabel")||d,h=a.get("showMaxLabel")||d;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&f-l!==o[1]&&g(o[1]),s}function EN(e,t,n){var r=e.scale,i=lN(e),o=[];return xh(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var AN=[0,1],DN=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return vy(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&kN(n=n.slice(),r.count()),py(e,AN,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&kN(n=n.slice(),r.count());var i=py(e,n,AN,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=_h(wN(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[1]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;xh(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*a},t.push(o)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&d(o.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=fy(e),t=fy(t),c?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),_h(this.scale.getMinorTicks(e),(function(e){return _h(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return bN(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=lN(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),p=0,h=0;l<=o[1];l+=s){var f,g,m=Hv(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,p=Math.max(p,f,7),h=Math.max(h,g,7)}var v=p/c,y=h/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=_N(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function kN(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var ON=DN;function NN(e,t){return e===t||e!=e&&t!=t}function RN(e,t){for(var n=e.length;n--;)if(NN(e[n][0],t))return n;return-1}var PN=Array.prototype.splice;function LN(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}LN.prototype.clear=function(){this.__data__=[],this.size=0},LN.prototype.delete=function(e){var t=this.__data__,n=RN(t,e);return!(n<0)&&(n==t.length-1?t.pop():PN.call(t,n,1),--this.size,!0)},LN.prototype.get=function(e){var t=this.__data__,n=RN(t,e);return n<0?void 0:t[n][1]},LN.prototype.has=function(e){return RN(this.__data__,e)>-1},LN.prototype.set=function(e,t){var n=this.__data__,r=RN(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function BN(e){if(!Hu(e))return!1;var t=ec(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var jN,FN=Gu["__core-js_shared__"],zN=(jN=/[^.]+$/.exec(FN&&FN.keys&&FN.keys.IE_PROTO||""))?"Symbol(src)_1."+jN:"";var UN=Function.prototype.toString;function HN(e){if(null!=e){try{return UN.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var VN=/^\[object .+?Constructor\]$/,WN=Function.prototype,YN=Object.prototype,GN=WN.toString,qN=YN.hasOwnProperty,QN=RegExp("^"+GN.call(qN).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZN(e){return!(!Hu(e)||(t=e,zN&&zN in t))&&(BN(e)?QN:VN).test(HN(e));var t}function XN(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ZN(n)?n:void 0}var $N=XN(Gu,"Map"),KN=XN(Object,"create");var JN=Object.prototype.hasOwnProperty;var eR=Object.prototype.hasOwnProperty;function tR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function nR(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function rR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tR.prototype.clear=function(){this.__data__=KN?KN(null):{},this.size=0},tR.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},tR.prototype.get=function(e){var t=this.__data__;if(KN){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return JN.call(t,e)?t[e]:void 0},tR.prototype.has=function(e){var t=this.__data__;return KN?void 0!==t[e]:eR.call(t,e)},tR.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=KN&&void 0===t?"__lodash_hash_undefined__":t,this},rR.prototype.clear=function(){this.size=0,this.__data__={hash:new tR,map:new($N||LN),string:new tR}},rR.prototype.delete=function(e){var t=nR(this,e).delete(e);return this.size-=t?1:0,t},rR.prototype.get=function(e){return nR(this,e).get(e)},rR.prototype.has=function(e){return nR(this,e).has(e)},rR.prototype.set=function(e,t){var n=nR(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function iR(e){var t=this.__data__=new LN(e);this.size=t.size}iR.prototype.clear=function(){this.__data__=new LN,this.size=0},iR.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},iR.prototype.get=function(e){return this.__data__.get(e)},iR.prototype.has=function(e){return this.__data__.has(e)},iR.prototype.set=function(e,t){var n=this.__data__;if(n instanceof LN){var r=n.__data__;if(!$N||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rR(r)}return n.set(e,t),this.size=n.size,this};var oR=function(){try{var e=XN(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function aR(e,t,n){"__proto__"==t&&oR?oR(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var sR=Object.prototype.hasOwnProperty;function lR(e,t,n){var r=e[t];sR.call(e,t)&&NN(r,n)&&(void 0!==n||t in e)||aR(e,t,n)}function uR(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?aR(n,s,l):lR(n,s,l)}return n}function cR(e){return tc(e)&&"[object Arguments]"==ec(e)}var dR=Object.prototype,pR=dR.hasOwnProperty,hR=dR.propertyIsEnumerable,fR=cR(function(){return arguments}())?cR:function(e){return tc(e)&&pR.call(e,"callee")&&!hR.call(e,"callee")};var gR="object"==typeof exports&&exports&&!exports.nodeType&&exports,mR=gR&&"object"==typeof module&&module&&!module.nodeType&&module,vR=mR&&mR.exports===gR?Gu.Buffer:void 0,yR=(vR?vR.isBuffer:void 0)||function(){return!1},xR=/^(?:0|[1-9]\d*)$/;function _R(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&xR.test(e))&&e>-1&&e%1==0&&e<t}function bR(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var wR={};function SR(e){return function(t){return e(t)}}wR["[object Float32Array]"]=wR["[object Float64Array]"]=wR["[object Int8Array]"]=wR["[object Int16Array]"]=wR["[object Int32Array]"]=wR["[object Uint8Array]"]=wR["[object Uint8ClampedArray]"]=wR["[object Uint16Array]"]=wR["[object Uint32Array]"]=!0,wR["[object Arguments]"]=wR["[object Array]"]=wR["[object ArrayBuffer]"]=wR["[object Boolean]"]=wR["[object DataView]"]=wR["[object Date]"]=wR["[object Error]"]=wR["[object Function]"]=wR["[object Map]"]=wR["[object Number]"]=wR["[object Object]"]=wR["[object RegExp]"]=wR["[object Set]"]=wR["[object String]"]=wR["[object WeakMap]"]=!1;var TR="object"==typeof exports&&exports&&!exports.nodeType&&exports,CR=TR&&"object"==typeof module&&module&&!module.nodeType&&module,MR=CR&&CR.exports===TR&&Wu.process,IR=function(){try{var e=CR&&CR.require&&CR.require("util").types;return e||MR&&MR.binding&&MR.binding("util")}catch(e){}}(),ER=IR&&IR.isTypedArray,AR=ER?SR(ER):function(e){return tc(e)&&bR(e.length)&&!!wR[ec(e)]},DR=Object.prototype.hasOwnProperty;function kR(e,t){var n=Vu(e),r=!n&&fR(e),i=!n&&!r&&yR(e),o=!n&&!r&&!i&&AR(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!DR.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||_R(u,l))||s.push(u);return s}var OR=Object.prototype;function NR(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||OR)}function RR(e,t){return function(n){return e(t(n))}}var PR=RR(Object.keys,Object),LR=Object.prototype.hasOwnProperty;function BR(e){return null!=e&&bR(e.length)&&!BN(e)}function jR(e){return BR(e)?kR(e):function(e){if(!NR(e))return PR(e);var t=[];for(var n in Object(e))LR.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var FR=Object.prototype.hasOwnProperty;function zR(e){if(!Hu(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=NR(e),n=[];for(var r in e)("constructor"!=r||!t&&FR.call(e,r))&&n.push(r);return n}function UR(e){return BR(e)?kR(e,!0):zR(e)}var HR="object"==typeof exports&&exports&&!exports.nodeType&&exports,VR=HR&&"object"==typeof module&&module&&!module.nodeType&&module,WR=VR&&VR.exports===HR?Gu.Buffer:void 0,YR=WR?WR.allocUnsafe:void 0;function GR(){return[]}var qR=Object.prototype.propertyIsEnumerable,QR=Object.getOwnPropertySymbols,ZR=QR?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(QR(e),(function(t){return qR.call(e,t)})))}:GR,XR=ZR;function $R(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var KR=RR(Object.getPrototypeOf,Object),JR=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)$R(t,XR(e)),e=KR(e);return t}:GR;function eP(e,t,n){var r=t(e);return Vu(e)?r:$R(r,n(e))}function tP(e){return eP(e,jR,XR)}function nP(e){return eP(e,UR,JR)}var rP=XN(Gu,"DataView"),iP=XN(Gu,"Promise"),oP=XN(Gu,"Set"),aP=XN(Gu,"WeakMap"),sP="[object Map]",lP="[object Promise]",uP="[object Set]",cP="[object WeakMap]",dP="[object DataView]",pP=HN(rP),hP=HN($N),fP=HN(iP),gP=HN(oP),mP=HN(aP),vP=ec;(rP&&vP(new rP(new ArrayBuffer(1)))!=dP||$N&&vP(new $N)!=sP||iP&&vP(iP.resolve())!=lP||oP&&vP(new oP)!=uP||aP&&vP(new aP)!=cP)&&(vP=function(e){var t=ec(e),n="[object Object]"==t?e.constructor:void 0,r=n?HN(n):"";if(r)switch(r){case pP:return dP;case hP:return sP;case fP:return lP;case gP:return uP;case mP:return cP}return t});var yP=vP,xP=Object.prototype.hasOwnProperty;var _P=Gu.Uint8Array;function bP(e){var t=new e.constructor(e.byteLength);return new _P(t).set(new _P(e)),t}var wP=/\w*$/;var SP=qu?qu.prototype:void 0,TP=SP?SP.valueOf:void 0;function CP(e,t,n){var r,i=e.constructor;switch(t){case"[object ArrayBuffer]":return bP(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?bP(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?bP(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,wP.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return r=e,TP?Object(TP.call(r)):{}}}var MP=Object.create,IP=function(){function e(){}return function(t){if(!Hu(t))return{};if(MP)return MP(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),EP=IP;var AP=IR&&IR.isMap,DP=AP?SR(AP):function(e){return tc(e)&&"[object Map]"==yP(e)};var kP=IR&&IR.isSet,OP=kP?SR(kP):function(e){return tc(e)&&"[object Set]"==yP(e)},NP="[object Arguments]",RP="[object Function]",PP="[object Object]",LP={};function BP(e,t,n,r,i,o){var a,s=1&t,l=2&t,u=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Hu(e))return e;var c=Vu(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&xP.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,a)}else{var d=yP(e),p=d==RP||"[object GeneratorFunction]"==d;if(yR(e))return function(e,t){if(t)return e.slice();var n=e.length,r=YR?YR(n):new e.constructor(n);return e.copy(r),r}(e,s);if(d==PP||d==NP||p&&!i){if(a=l||p?{}:function(e){return"function"!=typeof e.constructor||NR(e)?{}:EP(KR(e))}(e),!s)return l?function(e,t){return uR(e,JR(e),t)}(e,function(e,t){return e&&uR(t,UR(t),e)}(a,e)):function(e,t){return uR(e,XR(e),t)}(e,function(e,t){return e&&uR(t,jR(t),e)}(a,e))}else{if(!LP[d])return i?e:{};a=CP(e,d,s)}}o||(o=new iR);var h=o.get(e);if(h)return h;o.set(e,a),OP(e)?e.forEach((function(r){a.add(BP(r,t,n,r,e,o))})):DP(e)&&e.forEach((function(r,i){a.set(i,BP(r,t,n,i,e,o))}));var f=c?void 0:(u?l?nP:tP:l?UR:jR)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(f||e,(function(r,i){f&&(r=e[i=r]),lR(a,i,BP(r,t,n,i,e,o))})),a}LP[NP]=LP["[object Array]"]=LP["[object ArrayBuffer]"]=LP["[object DataView]"]=LP["[object Boolean]"]=LP["[object Date]"]=LP["[object Float32Array]"]=LP["[object Float64Array]"]=LP["[object Int8Array]"]=LP["[object Int16Array]"]=LP["[object Int32Array]"]=LP["[object Map]"]=LP["[object Number]"]=LP[PP]=LP["[object RegExp]"]=LP["[object Set]"]=LP["[object String]"]=LP["[object Symbol]"]=LP["[object Uint8Array]"]=LP["[object Uint8ClampedArray]"]=LP["[object Uint16Array]"]=LP["[object Uint32Array]"]=!0,LP["[object Error]"]=LP[RP]=LP["[object WeakMap]"]=!1;var jP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(HC),FP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qy).models[0]},t.type="cartesian2dAxis",t}(HC);vh(FP,fN);var zP={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},UP=hh({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},zP),HP=hh({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},zP),VP={category:UP,value:HP,time:hh({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},HP),log:gh({logBase:10},HP)},WP={value:1,category:1,time:1,log:1};function YP(e,t,n,r){xh(WP,(function(i,o){var a=hh(hh({},VP[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return j(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=BC(this),r=n?FC(e):{};hh(e,t.getTheme().get(o+"Axis")),hh(e,this.getDefaultOption()),e.type=GP(e),n&&jC(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=dO.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",GP)}function GP(e){return e.type||(e.data?"category":"value")}var qP=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return _h(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),wh(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),QP=["x","y"];function ZP(e){return"interval"===e.type||"time"===e.type}var XP=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=QP,t}return j(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(ZP(e)&&ZP(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,d=i[1]-r[0]*u,p=this._transform=[l,0,0,u,c,d];this._invTransform=qf([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),o=new og(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return pf(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return pf(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new og(n,r,i,o)},t}(qP),$P=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return j(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ON),KP=$P;function JP(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===u?[d[2]-h,d[3]+h]:[d[0]-h,d[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:d[0],"x"===u?f[p[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Bh(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function eL(e){return"cartesian2d"===e.get("coordinateSystem")}function tL(e){var t={xAxisModel:null,yAxisModel:null};return xh(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,Qy).models[0];t[r]=o})),t}var nL=Math.log;var rL=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=QP,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=Sh(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;pO(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(sN(l,s),pO(l)&&(t=a))}i.length&&(t||sN((t=i.pop()).scale,t.model),xh(i,(function(e){!function(e,t,n){var r=TO.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=aN(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var p=nL(e.base);u=[nL(u[0])/p,nL(u[1])/p]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var h=r.getExtent.call(e);c&&(u[0]=h[0]),d&&(u[1]=h[1]);var f=r.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=fO(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=fO(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=fO(f));var v=f*a;(g=fy((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=fy(v)):m>0&&u[1]<=0&&(m=0,g=-fy(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};xh(n.x,(function(e){oL(n,"y",e,i)})),xh(n.y,(function(e){oL(n,"x",e,i)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=LC(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){xh(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?o.x:o.y)}))}s(),i&&(xh(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof bO?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=lN(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var d=l(r?r[c]:{value:o[0]+c},c),p=cN(s.getTextRect(d),s.get("rotate")||0);a?a.union(p):a=p}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}})),s()),xh(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}kh(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",Qy).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",Qy).models[0],a=e.gridModel,s=this._coordsList;if(r)mh(s,t=r.coordinateSystem)<0&&(t=null);else if(i&&o)t=this.getCartesian(i.componentIndex,o.componentIndex);else if(i)n=this.getAxis("x",i.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(iL(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new KP(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new bO({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new VO({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(sO.getClass(t)||TO)}}(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,xh(a.x,(function(t,n){xh(a.y,(function(i,o){var a="x"+n+"y"+o,s=new XP(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)}))}))},e.prototype._updateScale=function(e,t){function n(e,t){xh(hN(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}xh(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(eL(e)){var r=tL(e),i=r.xAxisModel,o=r.yAxisModel;if(!iL(i,t)||!iL(o,t))return;var a=this.getCartesian(i.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return xh(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);mh(t,i)<0&&t.push(i),mh(n,o)<0&&n.push(o)})),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",(function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)})),t.eachSeries((function(e){if(eL(e)){var t=tL(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=QP,e}();function iL(e,t){return e.getCoordSysModel()===t}function oL(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)aL(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&aL(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function aL(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}var sL=rL,lL=Math.PI,uL=function(){function e(e,t){this.group=new ay,this.opt=t,this.axisModel=e,gh(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new ay({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!cL[e]},e.prototype.add=function(e){cL[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=xy(t-e);return _y(o)?(i=n>0?"top":"bottom",r="center"):_y(o-lL)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<lL?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),cL={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(pf(s,s,a),pf(l,l,a));var c=fh({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new lS({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});ZS(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var p=t.get(["axisLine","symbol"]);if(null!=p){var h=t.get(["axisLine","symbolSize"]);Eh(p)&&(p=[p,p]),(Eh(h)||Dh(h))&&(h=[h,h]);var f=HA(t.get(["axisLine","symbolOffset"])||0,h),g=h[0],m=h[1];xh([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==p[r]&&null!=p[r]){var i=UA(p[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=fL(i.getTicksCoords(),t.transform,l,gh(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,r,t,e),o=function(e,t,n,r){var i=n.axis,o=Bh(r.axisLabelShow,n.get(["axisLabel","show"]));if(!o||i.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=i.getViewLabels(),u=(Bh(r.labelRotate,a.get("rotate"))||0)*lL/180,c=uL.innerTextLayout(r.rotation,u,r.labelDirection),d=n.getCategories&&n.getCategories(!0),p=[],h=uL.isLabelSilent(n),f=n.get("triggerEvent");return xh(l,(function(o,l){var u="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,g=o.formattedLabel,m=o.rawLabel,v=a;if(d&&d[u]){var y=d[u];kh(y)&&y.textStyle&&(v=new PT(y.textStyle,a,n.ecModel))}var x=v.getTextColor()||n.get(["axisLine","lineStyle","color"]),_=i.dataToCoord(u),b=new hb({x:_,y:r.labelOffset+r.labelDirection*s,rotation:c.rotation,silent:h,z2:10+(o.level||0),style:gT(v,{text:g,align:v.getShallow("align",!0)||c.textAlign,verticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||c.textVerticalAlign,fill:Ih(x)?x("category"===i.type?m:"value"===i.type?u+"":u,l):x})});if(b.anid="label_"+u,f){var w=uL.makeAxisEventDataBase(n);w.targetType="axisLabel",w.value=m,w.tickIndex=l,"category"===i.type&&(w.dataIndex=u),fb(b).eventData=w}t.add(b),b.updateTransform(),p.push(b),e.add(b),b.decomposeTransform()})),p}(n,r,t,e);(function(e,t,n){if(pN(e.axis))return;var r=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],p=n[n.length-2];!1===r?(dL(o),dL(u)):pL(o,a)&&(r?(dL(a),dL(c)):(dL(o),dL(u)));!1===i?(dL(s),dL(d)):pL(l,s)&&(i?(dL(l),dL(p)):(dL(s),dL(d)))}(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!o.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=gh(s.getLineStyle(),gh(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=fL(a[c],t.transform,l,u,"minorticks_"+c),p=0;p<d.length;p++)e.add(d[p])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&function(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new og(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,p=!1,h=0;h<t.length;h++){var f=t[h];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new IS(f.localRect,f.transform)),d||(d=new IS(s,l)),d.intersect(f.obb)){p=!0;break}}}p?(r(u),c&&r(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new IS(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(_h(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i=Bh(e.axisName,t.get("name"));if(i){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),p=d[0]>d[1]?-1:1,h=["start"===s?d[0]-p*c:"end"===s?d[1]+p*c:(d[0]+d[1])/2,hL(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*lL/180),hL(s)?o=uL.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,r){var i,o,a=xy(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;_y(a-lL/2)?(o=l?"bottom":"top",i="center"):_y(a-1.5*lL)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*lL&&a>lL/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=Bh(e.nameTruncateMaxWidth,m.maxWidth,a),x=new hb({x:h[0],y:h[1],rotation:o.rotation,silent:uL.isLabelSilent(t),style:gT(u,{text:i,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(sT({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=uL.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,fb(x).eventData=_}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function dL(e){e&&(e.ignore=!0)}function pL(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=Vf([]);return Gf(i,i,-e.rotation),n.applyTransform(Wf([],i,e.getLocalTransform())),r.applyTransform(Wf([],i,t.getLocalTransform())),n.intersect(r)}}function hL(e){return"middle"===e||"center"===e}function fL(e,t,n,r,i){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(pf(a,a,t),pf(s,s,t));var c=new lS({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});ZS(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}var gL=uL;function mL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),o=i.get("link",!0)||[],a=[];xh(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=_L(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",r);if(xh(n.getAxes(),Ch(h,!1,null)),n.getTooltipAxes&&r&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&xh(p.baseAxes,Ch(h,!d||"cross",c)),d&&xh(p.otherAxes,Ch(h,"cross",!1))}}function h(r,s,c){var d=c.model.getModel("axisPointer",i),p=d.get("show");if(p&&("auto"!==p||r||xL(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};xh(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=ph(a.get(e))})),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&gh(l,c.textStyle)}}return e.model.getModel("axisPointer",new PT(s,n,r))}(c,u,i,t,r,s):d;var h=d.get("snap"),f=d.get("triggerEmphasis"),g=_L(c.model),m=s||h||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:h,useHandle:xL(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(vL(o[r+"AxisId"],n.id)||vL(o[r+"AxisIndex"],n.componentIndex)||vL(o[r+"AxisName"],n.name))return i}}(o,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=o[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&xh(e.coordSysAxesInfo[_L(n.model)],(function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}(n,e),n}function vL(e,t){return"all"===e||Mh(e)&&mh(e,t)>=0||e===t}function yL(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[_L(e)]}function xL(e){return!!e.get(["handle","show"])}function _L(e){return e.type+"||"+e.id}var bL={},wL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=yL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=xL(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=function(e){var t=yL(e);return t&&t.axisPointerModel}(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){bL[e]=t},t.getAxisPointerClass=function(e){return e&&bL[e]},t.type="axis",t}(TE),SL=wL,TL=Wy();var CL=["axisLine","axisTickLabel","axisName"],ML=["splitArea","splitLine","minorSplitLine"],IL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return j(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ay,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=JP(a,t),l=new gL(t,fh({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(pO(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));xh(CL,l.add,l),this._axisGroup.add(l.getGroup()),xh(ML,(function(e){t.get([e,"show"])&&EL[e](this,this._axisGroup,t,a)}),this),i&&"changeAxisOrder"===i.type&&i.isInitSort||tT(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){TL(this).splitAreaColors=null},t.type="cartesianAxis",t}(SL),EL={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=Mh(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords({tickModel:o}),p=[],h=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=i.toGlobalCoord(d[g].coord);u?(p[0]=m,p[1]=l.y,h[0]=m,h[1]=l.y+l.height):(p[0]=l.x,p[1]=m,h[0]=l.x+l.width,h[1]=m);var v=c++%s.length,y=d[g].tickValue,x=new lS({anid:null!=y?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:h[0],y2:h[1]},style:gh({stroke:s[v]},f),silent:!0});ZS(x.shape,f.lineWidth),t.add(x)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),p=0;p<l.length;p++)for(var h=0;h<l[p].length;h++){var f=i.toGlobalCoord(l[p][h].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new lS({anid:"minor_line_"+l[p][h].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});ZS(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=TL(e).splitAreaColors,p=Xh(),h=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){h=(g+(c-1)*f)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();for(s=Mh(s)?s:[s],f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;i.isHorizontal()?(x=m,_=l.y,b=y-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,m=_+(w=y-_));var S=u[f-1].tickValue;null!=S&&p.set(S,h),t.add(new $_({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:b,height:w},style:gh({fill:s[h]},v),autoBatch:!0,silent:!0})),h=(h+1)%c}TL(e).splitAreaColors=p}}}(e,t,n,r)}},AL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="xAxis",t}(IL),DL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=AL.type,t}return j(t,e),t.type="yAxis",t}(IL),kL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return j(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new $_({shape:e.coordinateSystem.getRect(),style:gh({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(TE),OL={offset:0};function NL(e){e.registerComponentView(kL),e.registerComponentModel(jP),e.registerCoordinateSystem("cartesian2d",sL),YP(e,"x",FP,OL),YP(e,"y",FP,OL),e.registerComponentView(AL),e.registerComponentView(DL),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}var RL=Wy(),PL=ph,LL=Th,BL=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=Ch(jL,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new ay,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);HL(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=yL(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=RL(e).pointerEl=new cT[i.type](PL(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=RL(e).labelEl=new hb(PL(t.label));e.add(i),zL(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=RL(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=RL(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),zL(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=rT(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){jf(e.event)},onmousedown:LL(this._onHandleDragMove,this,0,0),drift:LL(this._onHandleDragMove,this),ondragend:LL(this._onHandleDragEnd,this)}),r.add(i)),HL(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Mh(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,FE(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){jL(this._axisPointerModel,!t&&this._moveAnimation,this._handle,UL(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(UL(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(UL(r)),RL(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),zE(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function jL(e,t,n,r){FL(RL(n).lastProp,r)||(RL(n).lastProp=r,t?OS(n,r,e):(n.stopAnimation(),n.attr(r)))}function FL(e,t){if(kh(e)&&kh(t)){var n=!0;return xh(t,(function(t,r){n=n&&FL(e[r],t)})),!!n}return e===t}function zL(e,t){e[t.get(["label","show"])?"show":"hide"]()}function UL(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function HL(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}function VL(e,t,n,r,i){var o=WL(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=TC(a.get("padding")||0),l=a.getFont(),u=Hv(o,l),c=i.position,d=u.width+s[1]+s[3],p=u.height+s[0]+s[2],h=i.align;"right"===h&&(c[0]-=d),"center"===h&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,p,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:gT(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function WL(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:uN(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};xh(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),Eh(a)?o=a.replace("{value}",o):Ih(a)&&(o=a(s))}return o}function YL(e,t,n){var r=[1,0,0,1,0,0];return Gf(r,r,n.rotation),Yf(r,r,n.position),KS([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var GL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=qL(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=QL[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,i,o){var a=gL.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),VL(t,r,i,o,{position:YL(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,JP(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=JP(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=YL(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=qL(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(BL);function qL(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var QL={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],o=ZL(e),{x1:r[o=o||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],o=ZL(e),{x:r[o=o||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function ZL(e){return"x"===e.dim?0:1}var XL=GL,$L=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(HC),KL=Wy(),JL=xh;function eB(e,t,n){if(!Yp.node){var r=t.getZr();KL(r).records||(KL(r).records={}),function(e,t){if(KL(e).initialized)return;function n(n,r){e.on(n,(function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);JL(KL(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)}))}KL(e).initialized=!0,n("click",Ch(nB,"click")),n("mousemove",Ch(nB,"mousemove")),n("globalout",tB)}(r,t),(KL(r).records[e]||(KL(r).records[e]={})).handler=n}}function tB(e,t,n){e.handler("leave",null,n)}function nB(e,t,n,r){t.handler(e,n,r)}function rB(e,t){if(!Yp.node){var n=t.getZr();(KL(n).records||{})[e]&&(KL(n).records[e]=null)}}var iB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";eB("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){rB("axisPointer",t)},t.prototype.dispose=function(e,t){rB("axisPointer",t)},t.type="axisPointer",t}(TE),oB=iB;function aB(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=Vy(o,e);if(null==a||a<0||Mh(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,p="x"===c||"radius"===c?1:0,h=o.mapDimension(d),f=[];f[p]=o.get(h,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(_h(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var sB=Wy();function lB(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||Th(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){hB(i)&&(i=aB({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=hB(i),u=o.axesInfo,c=s.axesInfo,d="leave"===r||hB(i),p={},h={},f={list:[],map:{}},g={showPointer:Ch(cB,h),showTooltip:Ch(dB,f)};xh(s.coordSysMap,(function(e,t){var n=l||e.containPoint(i);xh(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&uB(e,a,g,!1,p)}}))}));var m={};return xh(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&xh(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,pB(t),pB(e)))),m[e.key]=o}}))})),xh(m,(function(e,t){uB(c[t],e,g,!0,p)})),function(e,t,n){var r=n.axesInfo=[];xh(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}(h,c,p),function(e,t,n,r){if(hB(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,a),function(e,t,n){var r=n.getZr(),i="axisPointerLastHighlights",o=sB(r)[i]||{},a=sB(r)[i]={};xh(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&xh(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];xh(o,(function(e,t){!a[t]&&l.push(e)})),xh(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),p}}function uB(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return xh(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(d,e,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var h=e-u,f=Math.abs(h);f<=a&&((f<a||h>=0&&s<0)&&(a=f,s=h,i=u,o.length=0),xh(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&fh(i,s[0]),!r&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function cB(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function dB(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=_L(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function pB(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function hB(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function fB(e){SL.registerAxisPointerClass("CartesianAxisPointer",XL),e.registerComponentModel($L),e.registerComponentView(oB),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Mh(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=mL(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},lB)}function gB(e){vN(NL),vN(fB)}var mB="\0_ec_interaction_mutex";function vB(e,t){return!!yB(e)[t]}function yB(e){return e[mB]||(e[mB]={})}yk({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ef);var xB=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=Th(n._mousedownHandler,n),i=Th(n._mousemoveHandler,n),o=Th(n._mouseupHandler,n),a=Th(n._mousewheelHandler,n),s=Th(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=gh(ph(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return j(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Ff(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&wB("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!vB(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,o=t-r,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&jf(e.event),bB(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Ff(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=wB("zoomOnMouseWheel",e,this._opt),n=wB("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;_B(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);_B(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){vB(this._zr,"globalPan")||_B(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(xf);function _B(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(jf(r.event),bB(e,t,n,r,i))}function bB(e,t,n,r,i){i.isAvailableBehavior=Th(wB,null,n,r),e.trigger(t,i)}function wB(e,t,n){var r=n[e];return!e||r&&(!Eh(r)||t.event[r+"Key"])}var SB=xB,TB={axisPointer:1,tooltip:1,brush:1};function CB(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=IB(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=IB(s,[0,a]),i=o=IB(s,[i,o]),r=0}t[0]=IB(t[0],n),t[1]=IB(t[1],n);var l=MB(t,r);t[r]+=e;var u,c=i||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[r]=IB(t[r],d),u=MB(t,r),null!=i&&(u.sign!==l.sign||u.span<i)&&(t[1-r]=t[r]+l.sign*i),u=MB(t,r),null!=o&&u.span>o&&(t[1-r]=t[r]+u.sign*o),t}function MB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function IB(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var EB=!0,AB=Math.min,DB=Math.max,kB=Math.pow,OB="globalPan",NB={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},RB={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},PB={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},LB=0,BB=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new ay,n._uid="brushController_"+LB++,xh(cj,(function(e,t){this._handlers[t]=Th(e,this)}),n),n}return j(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){yB(e)[t]=n}(t,OB,this._uid),xh(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=hh(ph(PB),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=yB(e);r[t]===n&&(r[t]=null)}(e,OB,this._uid),xh(this._handlers,(function(t,n){e.off(n,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};xh(e,(function(e){t[e.panelId]=ph(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=_h(e,(function(e){return hh(ph(PB),e,!0)}));var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new Ik(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(a).update(a).remove((function(e){t[e]!==i&&r.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):FB(r,jB(r,s));HB(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),GB(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(xf);function jB(e,t){var n=pj[t.brushType].createCover(e,t);return n.__brushOption=t,UB(n,t),e.group.add(n),n}function FB(e,t){var n=VB(t);return n.endCreating&&(n.endCreating(e,t),UB(t,t.__brushOption)),t}function zB(e,t){var n=t.__brushOption;VB(t).updateCoverShape(e,t,n.range,n)}function UB(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function HB(e,t){VB(t).updateCommon(e,t),zB(e,t)}function VB(e){return pj[e.__brushOption.brushType]}function WB(e,t,n){var r,i=e._panels;if(!i)return EB;var o=e._transform;return xh(i,(function(e){e.isTargetByCursor(t,n,o)&&(r=e)})),r}function YB(e,t){var n=e._panels;if(!n)return EB;var r=t.__brushOption.panelId;return null!=r?n[r]:EB}function GB(e){var t=e._covers,n=t.length;return xh(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function qB(e,t){var n=_h(e._covers,(function(e){var t=e.__brushOption,n=ph(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function QB(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function ZB(e,t,n,r){var i=new ay;return i.add(new $_({name:"main",style:JB(n),silent:!0,draggable:!0,cursor:"move",drift:Ch(nj,e,t,i,["n","s","w","e"]),ondragend:Ch(qB,t,{isEnd:!0})})),xh(r,(function(n){i.add(new $_({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ch(nj,e,t,i,n),ondragend:Ch(qB,t,{isEnd:!0})}))})),i}function XB(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=DB(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],d=n[1][1],p=c-o+i/2,h=d-o+i/2,f=c-a,g=d-s,m=f+i,v=g+i;KB(e,t,"main",a,s,f,g),r.transformable&&(KB(e,t,"w",l,u,o,v),KB(e,t,"e",p,u,o,v),KB(e,t,"n",l,u,m,o),KB(e,t,"s",l,h,m,o),KB(e,t,"nw",l,u,o,o),KB(e,t,"ne",p,u,o,o),KB(e,t,"sw",l,h,o,o),KB(e,t,"se",p,h,o,o))}function $B(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(JB(n)),i.attr({silent:!r,cursor:r?"move":"default"}),xh([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var i=t.childOfName(n.join("")),o=1===n.length?tj(e,n[0]):function(e,t){var n=[tj(e,t[0]),tj(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?RB[o]+"-resize":null})}))}function KB(e,t,n,r,i,o,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=AB(e[0][0],e[1][0]),n=AB(e[0][1],e[1][1]),r=DB(e[0][0],e[1][0]),i=DB(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}(oj(e,t,[[r,i],[r+o,i+a]])))}function JB(e){return gh({strokeNoScale:!0},e.brushStyle)}function ej(e,t,n,r){var i=[AB(e,n),AB(t,r)],o=[DB(e,n),DB(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function tj(e,t){var n=JS({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return $S(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function nj(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=ij(t,i,o);xh(r,(function(e){var t=NB[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(ej(s[0][0],s[1][0],s[0][1],s[1][1])),HB(t,n),qB(t,{isEnd:!1})}function rj(e,t,n,r){var i=t.__brushOption.range,o=ij(e,n,r);xh(i,(function(e){e[0]+=o[0],e[1]+=o[1]})),HB(e,t),qB(e,{isEnd:!1})}function ij(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function oj(e,t,n){var r=YB(e,t);return r&&r!==EB?r.clipPath(n,e._transform):ph(n)}function aj(e){var t=e.event;t.preventDefault&&t.preventDefault()}function sj(e,t,n){return e.childOfName("main").contain(t,n)}function lj(e,t,n,r){var i,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return kB(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&GB(e);var l=ph(s);l.brushType=uj(l.brushType,a),l.panelId=a===EB?null:a.panelId,o=e._creatingCover=jB(e,l),e._covers.push(o)}if(o){var u=pj[uj(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(oj(e,o,e._track)),r&&(FB(e,o),u.updateCommon(e,o)),zB(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&WB(e,t,n)&&GB(e)&&(i={isEnd:r,removeOnClick:!0});return i}function uj(e,t){return"auto"===e?t.defaultBrushType:e}var cj={mousedown:function(e){if(this._dragging)dj(this,e);else if(!e.target||!e.target.draggable){aj(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=WB(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=WB(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var s=i[a].__brushOption;if(o&&(o===EB||s.panelId===o.panelId)&&pj[s.brushType].contain(i[a],n[0],n[1]))return}o&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){aj(e);var i=lj(this,e,r,!1);i&&qB(this,i)}},mouseup:function(e){dj(this,e)}};function dj(e,t){if(e._dragging){aj(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=lj(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&qB(e,o)}}var pj={lineX:hj(0),lineY:hj(1),rect:{createCover:function(e,t){function n(e){return e}return ZB({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=QB(e);return ej(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){XB(e,t,n,r)},updateCommon:$B,contain:sj},polygon:{createCover:function(e,t){var n=new ay;return n.add(new iS({name:"main",style:JB(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new tS({name:"main",draggable:!0,drift:Ch(rj,e,t),ondragend:Ch(qB,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:oj(e,t,n)})},updateCommon:$B,contain:sj}};function hj(e){return{createCover:function(t,n){return ZB({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=QB(t);return[AB(n[0][e],n[1][e]),DB(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=YB(t,n);if(a!==EB&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),XB(t,n,l,i)},updateCommon:$B,contain:sj}}var fj=BB;function gj(e){return e=yj(e),function(t){return nT(t,e)}}function mj(e,t){return e=yj(e),function(n){var r=null!=t?t:n,i=r?e.width:e.height,o=r?e.x:e.y;return[o,o+(i||0)]}}function vj(e,t,n){var r=yj(e);return function(e,i){return r.contain(i[0],i[1])&&!function(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!TB.hasOwnProperty(r.mainType)&&i&&i.model!==n}(e,t,n)}}function yj(e){return og.create(e)}var xj=["x","y","radius","angle","single"],_j=["cartesian2d","polar","singleAxis"];function bj(e){return e+"Axis"}function wj(e,t){var n,r=Xh(),i=[],o=Xh();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function Sj(e){var t=e.ecModel,n={infoList:[],infoMap:Xh()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(bj(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var Tj=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),Cj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return j(t,e),t.prototype.init=function(e,t,n){var r=Mj(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=Mj(e);hh(this.option,e,!0),hh(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;xh([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Xh();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return xh(xj,(function(n){var r=this.getReferringComponents(bj(n),Zy);if(r.specified){t=!0;var i=new Tj;xh(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var i=t[0];if(i){var o=new Tj;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",Qy).models[0];a&&xh(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",Qy).models[0]&&o.add(e.componentIndex)}))}}}r&&xh(xj,(function(t){if(r){var i=n.findComponents({mainType:bj(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new Tj;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");xh([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(bj(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){xh(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(bj(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;xh([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;xh(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(HC);function Mj(e){var t={};return xh(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var Ij=Cj,Ej=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(TE),Aj=xh,Dj=gy,kj=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return mh(_j,t)>=0}(t)){var n=bj(this._dimName),r=t.getReferringComponents(n,Qy).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return ph(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];Aj(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),d=r.parse(py(c,o,n))):(t=!0,c=py(d=null==d?n[u]:r.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c})),Dj(s),Dj(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";CB(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=py(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];Aj(n,(function(e){!function(e,t,n){t&&xh(hN(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var i=e.getAxisModel(),o=iN(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&Aj(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=_h(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,i,l=0;l<r.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],p=u>o[1];if(c&&!d&&!p)return!0;c&&(i=!0),d&&(t=!0),p&&(n=!0)}return i&&t&&n}))}else Aj(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}}));Aj(r,(function(e){t.setApproximateExtent(o,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Aj(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=py(n[0]+o,n,[0,100],!0):null!=i&&(o=py(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=vy(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();var Oj=kj,Nj={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(bj(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new Oj(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=Xh();return xh(n,(function(e){xh(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var Rj=!1;function Pj(e){Rj||(Rj=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Nj),function(e){e.registerAction("dataZoom",(function(e,t){xh(wj(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}var Lj=function(){},Bj={};var jj=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Fj=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=Uj(t,e);xh(Hj,(function(e,t){(!n||!n.include||mh(n.include,t)>=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=Yj[e.brushType](0,n,t);e.__rangeOffset={offset:qj[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){xh(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&xh(r.coordSyses,(function(r){var i=Yj[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){xh(e,(function(e){var n,r,i,o,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=Yj[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?qj[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=Zj(n),o=Zj(r),a=[i[0]/o[0],i[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return _h(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:gj(r),isTargetByCursor:vj(r,e,n.coordSysModel),getLinearBrushOtherExtent:mj(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&mh(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=Uj(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<Vj.length;s++)if(Vj[s](r,o))return o}return!0},e}();function zj(e){return e[0]>e[1]&&e.reverse(),e}function Uj(e,t){return Gy(e,t,{includeMainTypes:jj})}var Hj={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=Xh(),a={},s={};(n||r||i)&&(xh(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),xh(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),xh(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];xh(i.getCartesians(),(function(e,t){(mh(n,e.getAxis("x").model)>=0||mh(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:Wj.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){xh(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Wj.geo})}))}},Vj=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],Wj={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform($S(e)),t}},Yj={lineX:Ch(Gj,0),lineY:Ch(Gj,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[zj([i[0],o[0]]),zj([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:_h(n,(function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o})),xyMinMax:i}}};function Gj(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=zj(_h([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var qj={lineX:Ch(Qj,0),lineY:Ch(Qj,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return _h(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function Qj(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function Zj(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var Xj=Fj,$j=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(HC);function Kj(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function Jj(e){if(Yp.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var eF=Jj(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function tF(e,t){if(!e)return t;t=SC(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var nF=tF(Jj(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),rF=tF(eF,"transform"),iF="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Yp.transform3dSupported?"will-change:transform;":"");function oF(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Yp.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=Yp.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+rF+":"+a+";":[["top",0],["left",0],[eF,a]]}function aF(e,t,n){var r=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=uE(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return r.push("box-shadow:"+p),t&&i&&r.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,i="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,i+=Yp.transformSupported?","+rF+r:",left"+r+",top"+r),nF+":"+i}(i,n)),o&&r.push("background-color:"+o),xh(["width","color","radius"],(function(t){var n="border-"+t,i=SC(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))})),r.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+i),xh(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(c)),null!=d&&r.push("padding:"+TC(d).join("px ")+"px"),r.join(";")+";"}function sF(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,r,i){Cf(Tf,t,r,i,!0)&&Cf(e,n,Tf[0],Tf[1])}(e,a,document.body,r,i)}else{e[0]=r,e[1]=i;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var lF=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Yp.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;sF(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;Lf(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t,n,r,i=this._container,o=(n="position",(r=(t=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t))?n?r[n]:r:null),a=i.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative");var s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=iF+aF(e,!this._firstShow,this._longHide)+oF(i[0],i[1],!0)+"border-color:"+AC(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null!=e){var a="";if(Eh(i)&&"item"===n.get("trigger")&&!Kj(n)&&(a=function(e,t,n){if(!Eh(n)||"inside"===n)return"";var r=e.get("backgroundColor"),i=e.get("borderWidth");t=AC(t);var o,a,s="left"===(o=n)?"right":"right"===o?"left":"top"===o?"bottom":"top",l=Math.max(1.5*Math.round(i),6),u="",c=rF+":";mh(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,p=l+i,h=p*Math.abs(Math.cos(d))+p*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-p)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,i)),Eh(e))o.innerHTML=e+a;else if(e){o.innerHTML="",Mh(e)||(e=[e]);for(var s=0;s<e.length;s++)Rh(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}}else o.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if(sF(n,this._zr,this._appendToBody,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;xh(oF(n[0],n[1]),(function(e){r[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Yp.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Th(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},e}(),uF=lF;function cF(e){return Math.max(0,e)}function dF(e){var t=cF(e.shadowBlur||0),n=cF(e.shadowOffsetX||0),r=cF(e.shadowOffsetY||0);return{left:cF(t-n),right:cF(t+n),top:cF(t-r),bottom:cF(t+r)}}function pF(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var hF=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),pF(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;kh(e)&&Ay(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new hb({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:uE(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),xh(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),xh(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){o.el.style[e]=a.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=dF(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;pF(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=cF(i.borderWidth||0),a=dF(i);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Th(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),fF=new $_({shape:{x:-1,y:-1,width:2,height:2}}),gF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){if(!Yp.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?Yp.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new hF(t):new uF(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!Yp.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?FE(this,"_updatePosition",50,"fixRate"):zE(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");eB("itemTooltip",this._api,Th((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Yp.node&&n.getDom()){var i=vF(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=qy(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=Xy(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=fb(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=fF;l.x=r.x,l.y=r.y,l.update(),fb(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=aB(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(vF(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s)if("axis"===mF([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var i,o;this._lastDataByCoordSys=null,EA(n,(function(e){return null!=fb(e).dataIndex?(i=e,!0):null!=fb(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=Th(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=mF([t.tooltipOption],r),a=this._renderMode,s=[],l=eE("section",{blocks:[],noHeader:!0}),u=[],c=new cE;xh(e,(function(e){xh(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=WL(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=eE("section",{header:o,noHeader:!Vh(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),xh(e.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=p.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=uN(t.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",AC(f.color),a);var g=SI(p.formatTooltip(h,!0,null)),m=g.frag;if(m){var v=mF([p],r).get("valueFormatter");d.blocks.push(v?fh({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,p=o.get("order"),h=aE(l,c,a,p,n.get("useUTC"),o.get("textStyle"));h&&u.unshift(h);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=fb(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),d=this._renderMode,p=e.positionDefault,h=mF([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=h.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new cE;g.marker=m.makeTooltipMarker("item",AC(g.color),d);var v=SI(s.formatTooltip(l,!1,u)),y=h.get("order"),x=h.get("valueFormatter"),_=v.frag,b=_?aE(x?fh({valueFormatter:x},_):_,m,d,y,r.get("useUTC"),h.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,b,g,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=fb(t),i=r.tooltipConfig.option||{};if(Eh(i)){i={content:i,formatter:i}}var o=[i],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:i.content});var s=e.positionDefault,l=mF(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new cE;this._showOrMove(l,(function(){var n=ph(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,p=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(Eh(c)){var h=e.ecModel.get("useUTC"),f=Mh(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=oC(f.axisValue,d,h)),d=EC(d,n,!0)}else if(Ih(c)){var g=Th((function(t,r){t===this._ticket&&(u.setContent(r,l,e,p,a),this._updatePosition(e,a,i,o,u,n,s))}),this);this._ticket=r,d=c(n,r,g)}else d=c;u.setContent(d,l,e,p,a),u.show(e,p),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||Mh(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:Mh(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),Ih(t)&&(t=t([n,r],o,i.el,p,{viewSize:[s,l],contentSize:u.slice()})),Mh(t))n=hy(t[0],s),r=hy(t[1],l);else if(kh(t)){var h=t;h.width=u[0],h.height=u[1];var f=LC(h,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(Eh(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,p,u,e.get("borderWidth"));n=g[0],r=g[1]}else{g=function(e,t,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(e+l+o+2>r?e-=l+o:e+=o);null!=a&&(t+u+a>i?t-=u+a:t+=a);return[e,t]}(n,r,i,s,l,c?null:20,d?null:20);n=g[0],r=g[1]}if(c&&(n-=yF(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=yF(d)?u[1]/2:"bottom"===d?u[1]:0),Kj(e)){g=function(e,t,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&xh(n,(function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&xh(a,(function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&xh(a,(function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&xh(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Yp.node&&t.getDom()&&(zE(this,"_updatePosition"),this._tooltipContent.dispose(),rB("itemTooltip",t))},t.type="tooltip",t}(TE);function mF(e,t,n){var r,i=t.ecModel;n?(r=new PT(n,i,i),r=new PT(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof PT&&(a=a.get("tooltip",!0)),Eh(a)&&(a={formatter:a}),a&&(r=new PT(a,r,i)))}return r}function vF(e,t){return e.dispatchAction||Th(t.dispatchAction,t)}function yF(e){return"center"===e||"middle"===e}var xF=gF;function _F(e){vN(fB),e.registerComponentModel($j),e.registerComponentView(xF),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ef),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ef)}var bF=["rect","polygon","keep","clear"];function wF(e,t){var n=Oy(e?e.brush:[]);if(n.length){var r=[];xh(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;Mh(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};xh(e,(function(e){t[e]=1})),e.length=0,xh(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,bF)}}var SF=xh,TF=kh,CF=-1,MF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=ph(t);this.type=r,this.mappingMethod=n,this._normalizeData=LF[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(IF(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,xh(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(SF(t,(function(e,t){n[e]=t})),!Mh(r)){var i=[];kh(r)?SF(r,(function(e,t){var r=n[t];i[null!=r?r:CF]=e})):i[-1]=r,r=PF(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):IF(i,!0):(Hh("linear"!==n||i.dataExtent),IF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Th(this._normalizeData,this)},e.listVisualTypes=function(){return Sh(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){kh(e)?xh(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=Mh(t)?[]:kh(t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&SF(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(Mh(e))e=e.slice();else{if(!TF(e))return[];var t=[];SF(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||Eh(s)&&s===e+"")return o;n&&d(s,o)}}for(o=0,a=t.length;o<a;o++){var l=t[o],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(BF(c[1],e,u[1]))return o}else if(u[1]===1/0){if(BF(c[0],u[0],e))return o}else if(BF(c[0],u[0],e)&&BF(c[1],e,u[1]))return o;n&&d(u[0],o),n&&d(u[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:DF("color"),getColorMapper:function(){var e=this.option;return Th("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),kF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=bm(t,e.parsedVisual,r),i?r:Sm(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Sm(bm(e,this.option.parsedVisual),"rgba")},category:kF,piecewise:function(e,t){var n=RF.call(this,t);return null==n&&(n=Sm(bm(e,this.option.parsedVisual),"rgba")),n},fixed:OF}},colorHue:EF((function(e,t){return wm(e,t)})),colorSaturation:EF((function(e,t){return wm(e,null,t)})),colorLightness:EF((function(e,t){return wm(e,null,null,t)})),colorAlpha:EF((function(e,t){return function(e,t){var n=ym(e);if(n&&null!=t)return n[3]=lm(t),Sm(n,"rgba")}(e,t)})),decal:{applyVisual:DF("decal"),_normalizedToVisual:{linear:null,category:kF,piecewise:null,fixed:null}},opacity:{applyVisual:DF("opacity"),_normalizedToVisual:NF([0,1])},liftZ:{applyVisual:DF("liftZ"),_normalizedToVisual:{linear:OF,category:OF,piecewise:OF,fixed:OF}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:AF,category:kF,piecewise:function(e,t){var n=RF.call(this,t);return null==n&&(n=AF.call(this,e)),n},fixed:OF}},symbolSize:{applyVisual:DF("symbolSize"),_normalizedToVisual:NF([0,1])}},e}();function IF(e,t){var n=e.visual,r=[];kh(n)?SF(n,(function(e){r.push(e)})):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),PF(e,r)}function EF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:NF([0,1])}}function AF(e){var t=this.option.visual;return t[Math.round(py(e,[0,1],[0,t.length-1],!0))]||{}}function DF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function kF(e){var t=this.option.visual;return t[this.option.loop&&e!==CF?e%t.length:e]}function OF(){return this.option.visual[0]}function NF(e){return{linear:function(t){return py(t,e,this.option.visual,!0)},category:kF,piecewise:function(t,n){var r=RF.call(this,n);return null==r&&(r=py(t,e,this.option.visual,!0)),r},fixed:OF}}function RF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[MF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function PF(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=_h(t,(function(e){var t=ym(e);return t||[0,0,0,1]}))),t}var LF={linear:function(e){return py(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=MF.findPieceIndex(e,t,!0);if(null!=n)return py(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?CF:t},fixed:ef};function BF(e,t,n){return e?t<=n:t<n}var jF=MF,FF=xh;function zF(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var UF={lineX:HF(0),lineY:HF(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&xN(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,o=e.y,a=e.width,s=e.height,l=r[0];return!!(xN(r,i,o)||xN(r,i+a,o)||xN(r,i,o+s)||xN(r,i+a,o+s)||og.create(e).contain(l[0],l[1])||iT(i,o,i+a,o,r)||iT(i,o,i,o+s,r)||iT(i+a,o,i+a,o+s,r)||iT(i,o+s,i+a,o+s,r))||void 0}}};function HF(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return VF(t[e],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),VF(s[0],a)||VF(s[1],a)||VF(a[0],s)||VF(a[1],s)}}}}function VF(e,t){return t[0]<=e&&e<=t[1]}var WF=["inBrush","outOfBrush"],YF="__ecBrushSelect",GF="__ecInBrushSelectEvent";function qF(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new Xj(t.option,e)).setInputRanges(t.areas,e)}))}function QF(e,t,n){var r,i,o=[];e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),qF(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:ph(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],p=!1;n||(r=s.throttleType,i=s.throttleDelay);var h=_h(t.areas,(function(e){var t=$F[e.brushType],n=gh({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return UF[t].point(r,n,e)},rect:function(r){return UF[t].rect(r,n,e)}};return n}(n),n})),f=function(e,t,n){var r={};return FF(t,(function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);FF(e[t],(function(e,r){if(jF.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new jF(i),"opacity"===r&&((i=ph(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new jF(i))}}))})),r}(t.option,WF,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}Mh(l)&&xh(l,(function(e){u[e]=1})),e.eachSeries((function(n,r){var i=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;p=p||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,r):function(n,r,i){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Mh(n)?mh(n,t)<0:t!==n)}(t,r))return;if(xh(h,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),p=p||m(i)})),g(r)&&m(i)){var o=n.getData();o.each((function(e){XF(n,i,o,e)&&(c[e]=1)}))}}(n,r,i)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],i=e.getData(),o=g(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return XF(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?p:m(r))&&function(e,t,n,r,i,o){var a,s={};function l(e){return MA(n,a,e)}function u(e,t){!function(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}(n,a,e,t)}function c(e,c){a=null==o?e:c;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var p=r.call(i,e),h=t[p],f=s[p],g=0,m=f.length;g<m;g++){var v=f[g];h[v]&&h[v].applyVisual(e,l,u)}}xh(e,(function(e){var n=jF.prepareVisualTypes(t[e]);s[e]=n})),null==o?n.each(c):n.each([o],c)}(WF,f,i,o)}))})),function(e,t,n,r,i){if(!i)return;var o=e.getZr();if(o[GF])return;o[YF]||(o[YF]=ZF);var a=FE(o,YF,n,t);a(e,r)}(t,r,i,o,n)}function ZF(e,t){if(!e.isDisposed()){var n=e.getZr();n[GF]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[GF]=!1}}function XF(e,t,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];if(e.brushSelector(r,n,a.selectors,a))return!0}}var $F={rect:function(e){return KF(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=n[r];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&KF(t)}};function KF(e){return new og(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var JF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new fj(t.getZr())).on("brush",Th(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){qF(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:ph(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:ph(n),$from:t})},t.type="brush",t}(TE),ez=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return j(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&function(e,t,n){var r;xh(n,(function(e){t.hasOwnProperty(e)&&zF(t[e])&&(r=!0)})),r&&xh(n,(function(n){t.hasOwnProperty(n)&&zF(t[n])?e[n]=ph(t[n]):delete e[n]}))}(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=_h(e,(function(e){return tz(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=tz(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(HC);function tz(e,t){return hh({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new PT(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var nz=ez,rz=["rect","polygon","lineX","lineY","keep","clear"],iz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,xh(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return xh(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:rz.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(Lj),oz=iz;function az(e){e.registerComponentView(JF),e.registerComponentModel(nz),e.registerPreprocessor(wF),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,QF),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ef),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ef),function(e,t){Bj[e]=t}("brush",oz)}var sz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(HC),lz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=jh(e.get("textBaseline"),e.get("textVerticalAlign")),l=new hb({style:gT(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new hb({style:gT(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!p&&!f,d.silent=!h&&!f,p&&l.on("click",(function(){DC(p,"_"+e.get("target"))})),h&&d.on("click",(function(){DC(h,"_"+e.get("subtarget"))})),fb(l).eventData=fb(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=LC(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new $_({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});r.add(b)}},t.type="title",t}(TE);function uz(e){e.registerComponentModel(sz),e.registerComponentView(lz)}function cz(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=_I(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(_I(e,t,n[a]));return o.join(" ")}}function dz(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Mh(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}var pz=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return j(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=UA(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=hz,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Vb(this.childAt(0))},t.prototype.downplay=function(){Wb(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(d):OS(p,d,a,n),jS(p)}if(this._updateCommon(e,n,s,r,i),l){var p=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,NS(p,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,d,p,h,f=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,p=r.hoverScale,h=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=fT(m),p=v.getShallow("scale"),h=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=HA(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),h&&f.attr("cursor",h);var _=e.getItemVisual(t,"style"),b=_.fill;if(f instanceof V_){var w=f.style;f.useStyle(fh({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(fh({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),T=this._z2;null!=S?null==T&&(this._z2=f.z2,f.z2+=S):null!=T&&(f.z2=T,this._z2=null);var C=i&&i.useNameLabel;hT(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return C?e.getName(t):cz(e,t)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var I=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;M.scaleX=this._sizeX*I,M.scaleY=this._sizeY*I,this.setSymbolScale(1),nw(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=fb(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&PS(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();PS(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return Mh(n=e.getItemVisual(t,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},t}(ay);function hz(e,t){this.parent.drift(e,t)}var fz=pz;function gz(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function mz(e){return null==e||kh(e)||(e={isIgnore:e}),e||{}}function vz(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:fT(t),cursorStyle:t.get("cursor")}}var yz=function(){function e(e){this.group=new ay,this._SymbolCtor=e||fz}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=mz(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=vz(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i=u(r);if(gz(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var p=i.getItemGraphicEl(d),h=u(c);if(gz(e,h,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(e,c,s,l)).setPosition(h);else{p.updateData(e,c,s,l);var m={x:h[0],y:h[1]};a?p.attr(m):OS(p,m,r)}n.add(p),e.setItemGraphicEl(c,p)}else n.remove(p)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=vz(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=mz(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(gz(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){uT(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()},e}(),xz=yz;function _z(e,t){return e.type===t}var bz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return j(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),Mh(t)&&xh(t,(function(e,r){Eh(e)&&(e={type:e}),t[r]=hh(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries((function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&Uy(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,i=Xh(),o=_h(r,(function(e){return(Eh(e)||Dh(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new PT(e,this,this.ecModel))}),this);this._data=wh(o,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&xh(this._data,(function(e){t[e.get("name")]=!1}));t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;xh(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;xh(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&mh(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(HC),wz=bz,Sz=Ch,Tz=xh,Cz=ay,Mz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return j(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new Cz),this.group.add(this._selectorGroup=new Cz),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=LC(l,u,c),p=this.layoutInner(e,i,d,r,a,s),h=LC(gh({width:p.width,height:p.height},l),u,c);this.group.x=h.x-p.x,this.group.y=h.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(e,t){var n=TC(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new $_({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),l=Xh(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),Tz(t.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new Cz;return d.newline=!0,void s.add(d)}var p=n.getSeriesByName(a)[0];if(!l.get(a))if(p){var h=p.getData(),f=h.getVisual("legendLineStyle")||{},g=h.getVisual("legendIcon"),m=h.getVisual("style");this._createItem(p,a,o,i,t,e,f,m,g,u,r).on("click",Sz(Iz,a,null,r,c)).on("mouseover",Sz(Az,p.name,null,r,c)).on("mouseout",Sz(Dz,p.name,null,r,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var d=s.indexOfName(a),p=s.getItemVisual(d,"style"),h=s.getItemVisual(d,"legendIcon"),f=ym(p.fill);f&&0===f[3]&&(f[3]=.2,p=fh(fh({},p),{fill:Sm(f,"rgba")})),this._createItem(n,a,o,i,t,e,{},p,h,u,r).on("click",Sz(Iz,null,a,r,c)).on("mouseover",Sz(Az,null,a,r,c)).on("mouseout",Sz(Dz,null,a,r,c)),l.set(a,!0)}}),this)}),this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();Tz(e,(function(e){var r=e.type,i=new hb({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),hT(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),tw(i)}))},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var d=e.visualDrawType,p=i.get("itemWidth"),h=i.get("itemHeight"),f=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),Tz(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?hD(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var p=t.getModel("lineStyle"),h=p.getLineStyle();if(s(h,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}(l=v||l||"roundRect",r,a,s,d,f,c),x=new Cz,_=r.getModel("textStyle");if(!Ih(e.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=UA(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:h,icon:l,iconRotate:b,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:p,itemHeight:h,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?p+5:-5,S=o,T=i.get("formatter"),C=t;Eh(T)&&T?C=T.replace("{name}",null!=t?t:""):Ih(T)&&(C=T(t));var M=f?_.getTextColor():r.get("inactiveColor");x.add(new hb({style:gT(_,{text:C,x:w,y:h/2,fill:M,align:S,verticalAlign:"middle"},{inheritColor:M})}));var I=new $_({shape:x.getBoundingRect(),invisible:!0}),E=r.getModel("tooltip");return E.get("show")&&sT({el:I,componentModel:i,itemName:t,itemTooltipOption:E.option}),x.add(I),x.eachChild((function(e){e.silent=!0})),I.silent=!u,this.getContentGroup().add(x),tw(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();PC(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){PC("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",g=0===h?"height":"width",m=0===h?"y":"x";"end"===o?d[h]+=l[f]+p:u[h]+=c[f]+p,d[1-h]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-h]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(TE);function Iz(e,t,n,r){Dz(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),Az(e,t,n,r)}function Ez(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function Az(e,t,n,r){Ez(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function Dz(e,t,n,r){Ez(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}var kz=Mz;function Oz(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function Nz(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",(function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),xh(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function Rz(e){e.registerComponentModel(wz),e.registerComponentView(kz),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Oz),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",Ch(Nz,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Ch(Nz,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Ch(Nz,"inverseSelect")),e.registerAction("legendSelect","legendselected",Ch(Nz,"select")),e.registerAction("legendUnSelect","legendunselected",Ch(Nz,"unSelect"))}(e)}function Pz(e,t,n){var r=[1,1];r[e.getOrient().index]=0,jC(t,n,{type:"box",ignoreSize:!!r})}var Lz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=FC(t);e.prototype.init.call(this,t,n,r),Pz(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Pz(this,this.option,t)},t.type="legend.scroll",t.defaultOption=jT(wz.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(wz),Bz=ay,jz=["width","height"],Fz=["x","y"],zz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return j(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Bz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Bz)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=Mh(c)?c:[c,c];h("pagePrev",0);var p=n.getModel("pageTextStyle");function h(e,t){var r=e+"DataIndex",o=rT(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:Th(l._pageGo,l,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});o.name=e,u.add(o)}u.add(new hb({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=jz[s],u=Fz[s],c=jz[1-s],d=Fz[1-s];i&&PC("horizontal",a,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),h=a.getBoundingRect(),f=[-h.x,-h.y],g=ph(n);i&&(g[l]=n[l]-h[l]-p);var m=this._layoutContentAndController(e,r,g,s,l,c,d,u);if(i){if("end"===o)f[s]+=m[l]+p;else{var v=h[l]+p;f[s]-=v,m[u]-=v}m[l]+=h[l]+p,f[1-s]+=m[d]+m[c]/2-h[c]/2,m[c]=Math.max(m[c],h[c]),m[d]=Math.min(m[d],h[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;PC(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),PC("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),p=c.getBoundingRect(),h=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-p.x,-p.y],v=jh(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-p[i]:g[r]+=p[i]+v);m[1-r]+=d[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=h?n[i]:d[i],y[o]=Math.max(d[o],p[o]),y[a]=Math.min(0,p[a]+m[1-r]),u.__rectSize=n[i],h){var x={x:0,y:0};x[i]=Math.max(n[i]-p[i]-v,0),x[o]=y[o],u.setClipPath(new $_({shape:x})),u.__rectSize=x[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&OS(l,{x:_.contentPosition[0],y:_.contentPosition[1]},h?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;xh(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",Eh(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=jz[i],a=Fz[i],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,p={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var h=y(u);p.contentPosition[i]=-h.s;for(var f=s+1,g=h,m=h,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),m=v;for(f=s-1,g=h,m=h,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=v;return p;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(kz),Uz=zz;function Hz(e){vN(Rz),e.registerComponentModel(Lz),e.registerComponentView(Uz),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}function Vz(e){vN(Rz),vN(Hz)}var Wz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.inside",t.defaultOption=jT(Ij.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Ij),Yz=Wy();function Gz(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function qz(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Qz(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function Zz(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=Yz(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Xh());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){xh(Sj(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:Ch(Qz,t),dispatchAction:Ch(qz,e),dataZoomInfoMap:null,controller:null},r=n.controller=new SB(e.getZr());return xh(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Xh())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each((function(e){var o=e.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),FE(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else Gz(r,e)}))}))}var Xz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return j(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){Yz(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:Th($z.pan,this),zoom:Th($z.zoom,this),scrollMove:Th($z.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=Yz(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||Gz(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Ej),$z={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=Jz[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return CB(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:Kz((function(e,t,n,r,i,o){var a=Jz[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:Kz((function(e,t,n,r,i,o){return Jz[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function Kz(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return CB(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var Jz={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},eU=Xz;function tU(e){Pj(e),e.registerComponentModel(Wz),e.registerComponentView(eU),Zz(e)}var nU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=jT(Ij.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Ij),rU=$_,iU="horizontal",oU="vertical",aU=["line","bar","candlestick","scatter"],sU={easing:"cubicOut",duration:100,delay:0},lU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return j(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Th(this._onBrush,this),this._onBrushEnd=Th(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),FE(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){zE(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new ay;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===iU?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=FC(e.option);xh(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=LC(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===oU&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==iU||i?n===iU&&i?{scaleY:a?1:-1,scaleX:-1}:n!==oU||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new rU({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new rU({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Th(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,p=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=h[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:py(e,u,p,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new ay,r=new tS({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new iS({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){xh(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&mh(aU,e.get("type"))<0)){var a,s=r.getComponent(bj(i),o).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(i),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new rU({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new rU({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),xh([0,1],(function(t){var o=a.get("handleIcon");!jA[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=UA(o,-1,0,2,2,null,!0);s.attr({cursor:uU(this._orient),draggable:!0,drift:Th(this._onDragMove,this,t),ondragend:Th(this._onDragEnd,this),onmouseover:Th(this._showDataInfo,this,!0),onmouseout:Th(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=hy(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),tw(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new hb({silent:!0,invisible:!0,style:gT(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var p=hy(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new $_({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=t.moveHandleIcon=UA(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(p,10));(d=t.moveZone=new $_({invisible:!0,shape:{y:o[1]-m,height:p+m}})).on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:uU(this._orient),drift:Th(this._onDragMove,this,"all"),ondragstart:Th(this._showDataInfo,this,!0),ondragend:Th(this._onDragEnd,this),onmouseover:Th(this._showDataInfo,this,!0),onmouseout:Th(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[py(e[0],[0,100],t,!0),py(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];CB(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?py(o.minSpan,a,i,!0):null,null!=o.maxSpan?py(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=gy([py(r[0],i,a,!0),py(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=gy(n.slice()),i=this._size;xh([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new $_,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=gy(this._handleEnds.slice());function d(e){var t=$S(n.handles[e].parent,this.group),a=JS(0===e?"right":"left",t),s=this._handleWidth/2+5,l=KS([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===iU?"middle":a,align:i===iU?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");null!=i&&"auto"!==i||(i=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return Ih(r)?r(e,o):Eh(r)?r.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,jf(r.event);var i=KS([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Zf(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=gy([py(n.x,r,i,!0),py(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(jf(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new rU({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?sU:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Sj(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(Ej);function uU(e){return"vertical"===e?"ns-resize":"ew-resize"}var cU=lU;function dU(e){e.registerComponentModel(nU),e.registerComponentView(cU),Pj(e)}function pU(e){vN(tU),vN(dU)}var hU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return j(t,e),t.prototype.getInitialData=function(e){return oO(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new ay,n=UA("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=UA(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?i:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(wE);function fU(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),o=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:Dh(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=_h(e.dimensions,(function(e){return t.mapDimension(e)})),p=!1,h=t.getCalculationInfo("stackResultDimension");return iO(t,d[0])&&(p=!0,d[0]=h),iO(t,d[1])&&(p=!0,d[1]=h),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function gU(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var mU=Math.min,vU=Math.max;function yU(e,t){return isNaN(e)||isNaN(t)}function xU(e,t,n,r,i,o,a,s,l){for(var u,c,d,p,h,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(yU(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,p=y;else{var x=v-u,_=y-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],S=t[2*b+1];w===v&&S===y&&m<r;)m++,g+=o,w=t[2*(b+=o)],S=t[2*b+1],x=(v=t[2*g])-u,_=(y=t[2*g+1])-c;var T=m+1;if(l)for(;yU(w,S)&&T<r;)T++,w=t[2*(b+=o)],S=t[2*b+1];var C=.5,M=0,I=0,E=void 0,A=void 0;if(T>=r||yU(w,S))h=v,f=y;else{M=w-u,I=S-c;var D=v-u,k=w-v,O=y-c,N=S-y,R=void 0,P=void 0;if("x"===s){var L=M>0?1:-1;h=v-L*(R=Math.abs(D))*a,f=y,E=v+L*(P=Math.abs(k))*a,A=y}else if("y"===s){var B=I>0?1:-1;h=v,f=y-B*(R=Math.abs(O))*a,E=v,A=y+B*(P=Math.abs(N))*a}else R=Math.sqrt(D*D+O*O),h=v-M*a*(1-(C=(P=Math.sqrt(k*k+N*N))/(P+R))),f=y-I*a*(1-C),A=y+I*a*C,E=mU(E=v+M*a*C,vU(w,v)),A=mU(A,vU(S,y)),E=vU(E,mU(w,v)),f=y-(I=(A=vU(A,mU(S,y)))-y)*R/P,h=mU(h=v-(M=E-v)*R/P,vU(u,v)),f=mU(f,vU(c,y)),E=v+(M=v-(h=vU(h,mU(u,v))))*P/R,A=y+(I=y-(f=vU(f,mU(c,y))))*P/R}e.bezierCurveTo(d,p,h,f,v,y),d=E,p=A}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var _U=function(){this.smooth=0,this.smoothConstraint=!0},bU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return j(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _U},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&yU(n[2*i-2],n[2*i-1]);i--);for(;r<i&&yU(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=xU(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=g_.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=void 0,c=void 0,d=void 0,p=void 0,h=void 0,f=void 0,g=void 0;switch(i[l++]){case o.M:n=i[l++],r=i[l++];break;case o.L:if(u=i[l++],c=i[l++],(g=a?(e-n)/(u-n):(e-r)/(c-r))<=1&&g>=0){var m=a?(c-r)*g+r:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],d=i[l++],p=i[l++],h=i[l++],f=i[l++];var v=a?Wg(n,u,d,h,e,s):Wg(r,c,p,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?Hg(r,c,p,f,x):Hg(n,u,d,h,x);return a?[e,m]:[m,e]}}n=h,r=f}}},t}(L_),wU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t}(_U),SU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return j(t,e),t.prototype.getDefaultShape=function(){return new wU},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&yU(n[2*o-2],n[2*o-1]);o--);for(;i<o&&yU(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=xU(e,n,i,o,o,1,t.smooth,a,t.connectNulls);xU(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(L_);function TU(e,t,n,r,i){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,a=Math.floor(a),l=Math.round(l);var d=new $_({shape:{x:a,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),h=p.isHorizontal(),f=p.inverse;h?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=Ih(i)?function(e){i(e,d)}:null;NS(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return d}function CU(e,t,n){var r=e.getArea(),i=fy(r.r0,1),o=fy(r.r,1),a=new Qw({shape:{cx:fy(e.cx,1),cy:fy(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,NS(a,{shape:{endAngle:r.endAngle,r:o}},n));return a}function MU(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function IU(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function EU(e,t){var n=IU(e),r=n[0],i=n[1],o=IU(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function AU(e){return Dh(e)?e:e?.5:0}function DU(e,t,n,r){var i=t.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],s=0,l=[],u=[],c=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var p=(u[o]+c[o])/2,h=[];l[o]=h[o]=p,l[1-o]=u[1-o],h[1-o]=c[1-o],a.push(l[0],l[1]),a.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function kU(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=ym(t[i]),s=ym(t[o]),l=r-i,u=Sm([sm(pm(a[0],s[0],l)),sm(pm(a[1],s[1],l)),sm(pm(a[2],s[2],l)),lm(pm(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function OU(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*fz.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return xh(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function NU(e,t){return[e[2*t],e[2*t+1]]}function RU(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<xb.length;t++)if(e.get([xb[t],"endLabel","show"]))return!0;return!1}function PU(e,t,n,r){if(_z(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=RU(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=TU(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!r.get("clip",!0)){var d=c.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=2*p):(d.x-=p,d.width+=2*p)}return l&&l(1,c),c}return CU(t,n,r)}var LU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.init=function(){var e=new ay,t=new xz;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===i.type,d=this._coordSys,p=this._symbolDraw,h=this._polyline,f=this._polygon,g=this._lineGroup,m=!t.ssr&&e.isAnimationEnabled(),v=!l.isEmpty(),y=l.get("origin"),x=fU(i,a,y),_=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=IO(2*r),o=0;o<r;o++){var a=gU(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(i,a,x),b=e.get("showSymbol"),w=e.get("connectNulls"),S=b&&!c&&OU(e,a,i),T=this._data;T&&T.eachItemGraphicEl((function(e,t){e.__temp&&(o.remove(e),T.setItemGraphicEl(t,null))})),b||p.remove(),o.add(g);var C,M=!c&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(C=i.getArea()).width?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var I=function(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=t.getAxis(i),u=_h(o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var p=kU(u,"x"===i?n.getWidth():n.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=p[0].coord-10,g=p[h-1].coord+10,m=g-f;if(m<.001)return"transparent";xh(p,(function(e){e.offset=(e.coord-f)/m})),p.push({offset:h?p[h-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:d[0]||"transparent"});var v=new _S(0,0,0,0,p,!0);return v[i]=f,v[i+"2"]=g,v}}}(a,i,n)||a.getVisual("style")[a.getVisual("drawType")];if(h&&d.type===i.type&&M===this._step){v&&!f?f=this._newPolygon(u,_):f&&!v&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,AC(I));var E=g.getClipPath();if(E)NS(E,{shape:PU(this,i,!1,e).shape},e);else g.setClipPath(PU(this,i,!0,e));b&&p.updateData(a,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),MU(this._stackedOnPoints,_)&&MU(this._points,u)||(m?this._doUpdateAnimation(a,_,i,n,M,y,w):(M&&(u=DU(u,i,M,w),_&&(_=DU(_,i,M,w))),h.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))}else b&&p.updateData(a,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[u[2*e],u[2*e+1]]}}),m&&this._initSymbolLabelAnimation(a,i,C),M&&(u=DU(u,i,M,w),_&&(_=DU(_,i,M,w))),h=this._newPolyline(u),v?f=this._newPolygon(u,_):f&&(g.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,AC(I)),g.setClipPath(PU(this,i,!0,e));var A=e.getModel("emphasis"),D=A.get("focus"),k=A.get("blurScope"),O=A.get("disabled");(h.useStyle(gh(s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),ow(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);fb(h).seriesIndex=e.seriesIndex,nw(h,D,k,O);var N=AU(e.get("smooth")),R=e.get("smoothMonotone");if(h.setShape({smooth:N,smoothMonotone:R,connectNulls:w}),f){var P=a.getCalculationInfo("stackedOnSeries"),L=0;f.useStyle(gh(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),P&&(L=AU(P.get("smooth"))),f.setShape({smooth:N,stackedOnSmooth:L,smoothMonotone:R,connectNulls:w}),ow(f,e,"areaStyle"),fb(f).seriesIndex=e.seriesIndex,nw(f,D,k,O)}var B=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,h),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){fb(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=Vy(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new fz(i,o)).x=l,s.y=u,s.setZ(c,d);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=d,p.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else RE.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=Vy(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else RE.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;jb(this._polyline,e),t&&jb(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new bU({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new SU({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");Ih(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Ih(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var d=[e.x,e.y],p=void 0,h=void 0,f=void 0;if(n)if(i){var g=n,m=t.pointToCoord(d);r?(p=g.startAngle,h=g.endAngle,f=-m[1]/180*Math.PI):(p=g.r0,h=g.r,f=m[0])}else{var v=n;r?(p=v.x,h=v.x+v.width,f=e.x):(p=v.y+v.height,h=v.y,f=e.y)}var y=h===p?0:(f-p)/(h-p);a&&(y=1-y);var x=Ih(u)?u(o):l*y+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(RU(e)){var i=e.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new hb({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(hT(o,fT(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?dz(i,n):cz(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),p=o.get("precision"),h=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?h:0)*(m?-1:1),_=(g?0:-h)*(m?-1:1),b=g?"x":"y",w=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(i=e[2*u+a],!isNaN(i)&&!isNaN(e[2*u+1-a]))if(0!==u){if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(t-r)/(i-r)}}(u,y,b),S=w.range,T=S[1]-S[0],C=void 0;if(T>=1){if(T>1&&!d){var M=NU(u,S[0]);s.attr({x:M[0]+x,y:M[1]+_}),i&&(C=c.getRawValue(S[0]))}else{(M=l.getPointOn(y,b))&&s.attr({x:M[0]+x,y:M[1]+_});var I=c.getRawValue(S[0]),E=c.getRawValue(S[1]);i&&(C=function(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(Dh(r))return fy(f=Dy(n||0,r,i),o?Math.max(my(n||0),my(r)):t);if(Eh(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(i<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,h=l[c],f=Dy(p,h,i);a[c]=fy(f,o?Math.max(my(p),my(h)):t)}}return a}(n,p,I,E,w.t))}r.lastFrameIndex=S[0]}else{var A=1===e||r.lastFrameIndex>0?S[0]:0;M=NU(u,A);i&&(C=c.getRawValue(A)),s.attr({x:M[0]+x,y:M[1]+_})}if(i){var D=bT(s);"function"==typeof D.setLabelText&&D.setLabelText(C)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,o,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],p=[],h=[],f=[],g=fU(i,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var S=m[b],T=m[b+1],C=v[w],M=v[w+1];(isNaN(S)||isNaN(T))&&(S=C,T=M),l.push(S,T),u.push(C,M),c.push(n[b],n[b+1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var I=x.idx,E=g.dataDimsForPoint,A=i.dataToPoint([t.get(E[0],I),t.get(E[1],I)]);w=2*I,l.push(A[0],A[1]),u.push(v[w],v[w+1]);var D=gU(g,i,t,I);c.push(D[0],D[1]),d.push(r[w],r[w+1]),f.push(t.getRawIndex(I));break;case"-":_=!1}_&&(p.push(x),h.push(h.length))}h.sort((function(e,t){return f[e]-f[t]}));var k=l.length,O=IO(k),N=IO(k),R=IO(k),P=IO(k),L=[];for(y=0;y<h.length;y++){var B=h[y],j=2*y,F=2*B;O[j]=l[F],O[j+1]=l[F+1],N[j]=u[F],N[j+1]=u[F+1],R[j]=c[F],R[j+1]=c[F+1],P[j]=d[F],P[j+1]=d[F+1],L[y]=p[B]}return{current:O,next:N,stackedOnCurrent:R,stackedOnNext:P,status:L}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,p=c.stackedOnCurrent,h=c.next,f=c.stackedOnNext;if(i&&(d=DU(c.current,n,i,a),p=DU(c.stackedOnCurrent,n,i,a),h=DU(c.next,n,i,a),f=DU(c.stackedOnNext,n,i,a)),EU(d,h)>3e3||l&&EU(p,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:h}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),OS(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:p}),l.stopAnimation(),OS(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(RE),BU=LU;var jU={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},FU=function(e){return Math.round(e.length/2)};function zU(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/d);if(isFinite(p)&&p>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/p));var h=void 0;Eh(i)?h=jU[i]:Ih(i)&&(h=i),h&&e.setData(r.downSample(r.mapDimension(l.dim),1/p,h,FU))}}}}}function UU(e){e.registerChartView(BU),e.registerSeriesModel(hU),e.registerLayout(function(e,t){return{seriesType:e,plan:CE(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=_h(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");iO(n,a[0])&&(a[0]=l),iO(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=o&&IO(n*s),a=[],l=[],p=e.start,h=0;p<e.end;p++){var f=void 0;if(1===s){var g=u.get(c,p);f=r.dataToPoint(g,null,l)}else a[0]=u.get(c,p),a[1]=u.get(d,p),f=r.dataToPoint(a,null,l);o?(i[h++]=f[0],i[h++]=f[1]):t.setItemLayout(p,f.slice())}o&&t.setLayout("points",i)}}}}}}("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,zU("line"))}var HU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(e,t){return oO(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)xh(r.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=i[n],s="x1"===t[n]||"y1"===t[n];if(s&&(a+=1),r.length<2)return;if(2===r.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[s?1:0]));for(var l=void 0,u=void 0,c=1,d=0;d<r.length;d++){var p=r[d].coord,h=d===r.length-1?r[d-1].tickValue+c:r[d].tickValue;if(h===a){u=p;break}if(h<a)l=p;else if(null!=l&&h>a){u=(p+l)/2;break}1===d&&(c=h-r[0].tickValue)}null==u&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=e.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(wE);wE.registerClass(HU);var VU=HU,WU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return j(t,e),t.prototype.getInitialData=function(){return oO(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=jT(VU.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(VU),YU=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},GU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return j(t,e),t.prototype.getDefaultShape=function(){return new YU},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,p=c?u-l<d:l-u<d;p||(l=u-(c?d:-d));var h=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);p?(e.moveTo(h*i+n,f*i+r),e.arc(h*s+n,f*s+r,a,-Math.PI+l,l,!c)):e.moveTo(h*o+n,f*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(L_),qU=GU;function QU(e,t,n){return t*Math.sin(e)*(n?-1:1)}function ZU(e,t,n){return t*Math.cos(e)*(n?1:-1)}var XU=Math.max,$U=Math.min;var KU=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return j(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){uT(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var p=e.get("clip",!0)||d,h=function(e,t){var n=e.getArea&&e.getArea();if(_z(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,_=r&&r.isInitSort,b=r&&"changeAxisOrder"===r.type;function w(e){var t=aH[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?Qw:$_;return new r({shape:hH(t,n,e),silent:!0,z2:0})}(l,i,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=aH[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&oH[l.type](r)){var s=!1;p&&(s=JU[l.type](h,r));var m=eH[l.type](e,a,t,r,i,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),lH(m,a,t,n,r,e,i,"polar"===l.type),_?m.attr({shape:r}):d?tH(d,c,m,r,t,i,!1,!1):NS(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),S=aH[l.type](a,t,r);if(g){var T=void 0;0===x.length?T=w(n):((T=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?T.setShape("r",v):T.setShape("cornerRadius",v),y[t]=T);var C=aH[l.type](a,t);OS(T,{shape:hH(i,C,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&oH[l.type](S)){var I=!1;if(p&&(I=JU[l.type](h,S))&&o.remove(M),M?jS(M):M=eH[l.type](e,a,t,S,i,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),b){var E=M.getTextContent();if(E){var A=bT(E);null!=A.prevValue&&(A.prevValue=A.value)}}else lH(M,a,t,r,S,e,i,"polar"===l.type);_?M.attr({shape:S}):d?tH(d,c,M,S,t,i,!0,b):OS(M,{shape:S},e,t,null),a.setItemGraphicEl(t,M),M.ignore=I,o.add(M)}else o.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&BS(n,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new ay);S.removeAll();for(var T=0;T<y.length;++T)S.add(y[T]);o.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),dH(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),dH(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&function(e,t,n,r,i){return e?"polar"===e.type?CU(e,t,n):"cartesian2d"===e.type?TU(e,t,n,r,i):null:null}(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:_h(r,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){BS(t,e,fb(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(RE),JU={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=XU(t.x,e.x),s=$U(t.x+t.width,i),l=XU(t.y,e.y),u=$U(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>i?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=$U(t.r,e.r),o=XU(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},eH={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new $_({shape:fh({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,r,i,o,a,s,l){var u=!i&&l?qU:Qw,c=new u({shape:r,z2:1});c.name="item";var d,p,h=sH(i);if(c.calculateTextPosition=(d=h,p=({isRoundCap:u===qU}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return qv(e,t,n);var i=d(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,h=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=p?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",S="top";switch(i){case"startArc":_=s+(c-o)*y(m),b=l+(c-o)*x(m),w="center",S="top";break;case"insideStartArc":_=s+(c+o)*y(m),b=l+(c+o)*x(m),w="center",S="bottom";break;case"startAngle":_=s+h*y(f)+QU(f,o+v,!1),b=l+h*x(f)+ZU(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+h*y(f)+QU(f,-o+v,!1),b=l+h*x(f)+ZU(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+h*y(m),b=l+h*x(m),w="center",S="middle";break;case"endArc":_=s+(u+o)*y(m),b=l+(u+o)*x(m),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*y(m),b=l+(u-o)*x(m),w="center",S="top";break;case"endAngle":_=s+h*y(g)+QU(g,o+v,!0),b=l+h*x(g)+ZU(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+h*y(g)+QU(g,-o+v,!0),b=l+h*x(g)+ZU(g,-o+v,!0),w="right",S="middle";break;default:return qv(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=w,e.verticalAlign=S,e}),o){var f=i?"r":"endAngle",g={};c.shape[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?OS:NS)(c,{shape:g},o)}return c}};function tH(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?OS:NS)(n,{shape:l},t,i,null),(a?OS:NS)(n,{shape:u},t?e.baseAxis.model:null,i)}function nH(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var rH=["x","y","width","height"],iH=["cx","cy","r","startAngle","endAngle"],oH={cartesian2d:function(e){return!nH(e,rH)},polar:function(e){return!nH(e,iH)}},aH={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,o)}(n,r):0,o=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function sH(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function lH(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;fh(u,function(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;Mh(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:_h(r,(function(e){return Gv(e,i)}))}}(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=fT(r);hT(e,h,{labelFetcher:o,labelDataIndex:n,defaultText:cz(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,r){if(Dh(r))e.setTextConfig({rotation:r});else if(Mh(t))e.setTextConfig({rotation:0});else{var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?p:g,sH(a),r.get(["label","rotate"]))}!function(e,t,n,r){if(e){var i=bT(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}(f,h,o.getRawValue(n),(function(e){return dz(t,e)}));var m=r.getModel(["emphasis"]);nw(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),ow(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",xh(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var uH=function(){},cH=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return j(t,e),t.prototype.getDefaultShape=function(){return new uH},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(L_);function dH(e,t,n,r){var i=e.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new cH({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new cH({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(i.getVisual("style")),fb(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",pH),d.on("mousemove",pH)),n&&n.push(d)}var pH=jE((function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var p=3*c;if(l[r]=u,l[i]=o[p+2],s[r]=o[p+r],s[i]=o[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);fb(this).dataIndex=t>=0?t:null}),30,!1);function hH(e,t,n){if(_z(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var o=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var fH=KU;function gH(e){e.registerChartView(fH),e.registerSeriesModel(WU),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Ch(OO,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,function(e){return{seriesType:e,plan:CE(),reset:function(e){if(NO(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=iO(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),p=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,i),h=RO(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=h&&IO(3*i),u=h&&s&&IO(3*i),y=h&&IO(i),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),w=0;null!=(r=e.next());){var S=b.get(c?g:o,r),T=b.get(a,r),C=p,M=void 0;c&&(M=+S-b.get(o,r));var I=void 0,E=void 0,A=void 0,D=void 0;if(d){var k=n.dataToPoint([S,T]);c&&(C=n.dataToPoint([M,T])[0]),I=C,E=k[1]+v,A=k[0]-C,D=m,Math.abs(A)<f&&(A=(A<0?-1:1)*f)}else k=n.dataToPoint([T,S]),c&&(C=n.dataToPoint([T,M])[1]),I=k[0]+v,E=C,A=m,D=k[1]-C,Math.abs(D)<f&&(D=(D<=0?-1:1)*f);h?(l[w]=I,l[w+1]=E,l[w+2]=d?A:D,u&&(u[w]=d?x.x:I,u[w+1]=d?E:x.y,u[w+2]=_),y[r]=r):t.setItemLayout(r,{x:I,y:E,width:A,height:D}),w+=3}h&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,zU("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var mH=Math.sin,vH=Math.cos,yH=Math.PI,xH=2*Math.PI,_H=180/yH,bH=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){this._add("C",e,t,n,r,i,o)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,o){this.ellipse(e,t,n,n,0,r,i,o)},e.prototype.ellipse=function(e,t,n,r,i,o,a,s){var l=a-o,u=!s,c=Math.abs(l),d=Em(c-xH)||(u?l>=xH:-l>=xH),p=l>0?l%xH:l%xH+xH,h=!1;h=!!d||!Em(c)&&p>=yH==!!u;var f=e+n*vH(o),g=t+r*mH(o);this._start&&this._add("M",f,g);var m=Math.round(i*_H);if(d){var v=1/this._p,y=(u?1:-1)*(xH-v);this._add("A",n,r,m,1,+u,e+n*vH(o+y),t+r*mH(o+y)),v>.01&&this._add("A",n,r,m,0,+u,f,g)}else{var x=e+n*vH(a),_=t+r*mH(a);this._add("A",n,r,m,+h,+u,x,_)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),wH="none",SH=Math.round;var TH=["lineCap","miterLimit","lineJoin"],CH=_h(TH,(function(e){return"stroke-"+e.toLowerCase()}));function MH(e,t,n,r){var i=null==t.opacity?1:t.opacity;if(n instanceof V_)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==wH}(t)){var o=Mm(t.fill);e("fill",o.color);var a=null!=t.fillOpacity?t.fillOpacity*o.opacity*i:o.opacity*i;(r||a<1)&&e("fill-opacity",a)}else e("fill",wH);if(function(e){var t=e.stroke;return null!=t&&t!==wH}(t)){var s=Mm(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*i:s.opacity*i,d=t.strokeFirst;if((r||1!==u)&&e("stroke-width",u),(r||d)&&e("paint-order",d?"stroke":"fill"),(r||c<1)&&e("stroke-opacity",c),t.lineDash){var p=qA(n),h=p[0],f=p[1];h&&(f=SH(f||0),e("stroke-dasharray",h.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",wH);for(var g=0;g<TH.length;g++){var m=TH[g];if(r||t[m]!==O_[m]){var v=t[m]||O_[m];v&&e(CH[g],v)}}}else r&&e("stroke",wH)}}var IH="http://www.w3.org/2000/svg",EH="http://www.w3.org/1999/xlink";function AH(e){return document.createElementNS(IH,e)}function DH(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function kH(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,i=t.tag,o=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var r in t){var i=t[r],o=r;!1!==i&&(!0!==i&&null!=i&&(o+='="'+i+'"'),n.push(o))}return"<"+e+" "+n.join(" ")+">"}(i,o)+("style"!==i?Af(a):a||"")+(r?""+n+_h(r,(function(t){return e(t)})).join(n)+n:"")+function(e){return"</"+e+">"}(i)}(e)}function OH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function NH(e,t,n,r){return DH("svg","root",{width:e,height:t,xmlns:IH,"xmlns:xlink":EH,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var RH={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},PH="transform-origin";function LH(e,t,n){var r=fh({},e.shape);fh(r,t),e.buildPath(n,r);var i=new bH;return i.reset(jm(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function BH(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[PH]=n+"px "+r+"px")}var jH={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function FH(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function zH(e){return Eh(e)?RH[e]?"cubic-bezier("+RH[e]+")":em(e)?e:"":""}function UH(e,t,n,r){var i=e.animators,o=i.length,a=[];if(e instanceof yS){var s=function(e,t,n){var r,i,o=e.shape.paths,a={};if(xh(o,(function(e){var t=OH(n.zrId);t.animation=!0,UH(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=Sh(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var f=s[h].animation;f.indexOf(i)>=0&&(r=f)}}})),r){t.d=!1;var s=FH(a,n);return r.replace(i,s)}}(e,t,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u<o;u++){var c=i[u],d=[c.getMaxTime()/1e3+"s"],p=zH(c.getClip().easing),h=c.getDelay();p?d.push(p):d.push("linear"),h&&d.push(h/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function g(i){var o,a=i[1],s=a.length,l={},u={},c={},d="animation-timing-function";function p(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),o=0;o<r.length;o++){var a=r[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],p=Math.round(c.time/i*100)+"%",h=zH(c.easing),f=c.rawValue;(Eh(f)||Dh(f))&&(t[p]=t[p]||{},t[p][l]=c.rawValue,h&&(t[p][d]=h))}}}}for(var h=0;h<s;h++){(S=(w=a[h]).targetName)?"shape"===S&&p(w,u):!r&&p(w,l)}for(var f in l){var g={};jv(g,e),fh(g,l[f]);var m=Fm(g),v=l[f][d];c[f]=m?{transform:m}:{},BH(c[f],g),v&&(c[f][d]=v)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!o;v=u[f][d];x&&(o=new g_);var _=o.len();o.reset(),c[f].d=LH(e,u[f],o);var b=o.len();if(!x&&_!==b){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!r)for(h=0;h<s;h++){var w,S;"style"===(S=(w=a[h]).targetName)&&p(w,c,(function(e){return jH[e]}))}var T,C=Sh(c),M=!0;for(h=1;h<C.length;h++){var I=C[h-1],E=C[h];if(c[I][PH]!==c[E][PH]){M=!1;break}T=c[I][PH]}if(M&&T){for(var f in c)c[f][PH]&&delete c[f][PH];t[PH]=T}if(wh(C,(function(e){return Sh(c[e]).length>0})).length)return FH(c,n)+" "+i[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}var HH=Math.round;function VH(e){return e&&Eh(e.src)}function WH(e){return e&&Ih(e.toDataURL)}function YH(e,t,n,r){MH((function(i,o){var a="fill"===i||"stroke"===i;a&&Lm(o)?tV(t,e,i,r):a&&Nm(o)?nV(n,e,i,r):e[i]=o}),t,n,!1),function(e,t,n){var r=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(r)){var i=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),o=n.shadowCache,a=o[i];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,d=r.shadowOffsetY||0,p=r.shadowBlur,h=Mm(r.shadowColor),f=h.opacity,g=h.color,m=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=DH("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[DH("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[i]=a}t.filter=Bm(a)}}(n,e,r)}function GH(e){return Em(e[0]-1)&&Em(e[1])&&Em(e[2])&&Em(e[3]-1)}function qH(e,t,n){if(t&&(!function(e){return Em(e[4])&&Em(e[5])}(t)||!GH(t))){var r=n?10:1e4;e.transform=GH(t)?"translate("+HH(t[4]*r)/r+" "+HH(t[5]*r)/r+")":function(e){return"matrix("+Am(e[0])+","+Am(e[1])+","+Am(e[2])+","+Am(e[3])+","+Dm(e[4])+","+Dm(e[5])+")"}(t)}}function QH(e,t,n){for(var r=e.points,i=[],o=0;o<r.length;o++)i.push(HH(r[o][0]*n)/n),i.push(HH(r[o][1]*n)/n);t.points=i.join(" ")}function ZH(e){return!e.smooth}var XH,$H,KH={circle:[(XH=["cx","cy","r"],$H=_h(XH,(function(e){return"string"==typeof e?[e,e]:e})),function(e,t,n){for(var r=0;r<$H.length;r++){var i=$H[r],o=e[i[0]];null!=o&&(t[i[1]]=HH(o*n)/n)}})],polyline:[QH,ZH],polygon:[QH,ZH]};function JH(e,t){var n=e.style,r=e.shape,i=KH[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&jm(e)||4;if(!i||t.willUpdate||i[1]&&!i[1](r)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var p=d.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===p&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new bH),f.reset(u),d.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);i[0](r,o,g)}return qH(o,e.transform),YH(o,n,e,t),t.animation&&UH(e,o,t),DH(s,e.id+"",o)}function eV(e,t){return e instanceof L_?JH(e,t):e instanceof V_?function(e,t){var n=e.style,r=n.image;if(r&&!Eh(r)&&(VH(r)?r=r.src:WH(r)&&(r=r.toDataURL())),r){var i=n.x||0,o=n.y||0,a={href:r,width:n.width,height:n.height};return i&&(a.x=i),o&&(a.y=o),qH(a,e.transform),YH(a,n,e,t),t.animation&&UH(e,a,t),DH("image",e.id+"",a)}}(e,t):e instanceof F_?function(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||qp,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,Yv(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":km[n.textAlign]||n.textAlign};if(ab(n)){var l="",u=n.fontStyle,c=ib(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Gp,p=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),qH(s,e.transform),YH(s,n,e,t),t.animation&&UH(e,s,t),DH("text",e.id+"",s,void 0,r)}}(e,t):void 0}function tV(e,t,n,r){var i,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Rm(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Pm(o))return;i="radialGradient",a.cx=jh(o.x,.5),a.cy=jh(o.y,.5),a.r=jh(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*Dm(s[u].offset)+"%",p=Mm(s[u].color),h=p.color,f=p.opacity,g={offset:d};g["stop-color"]=h,f<1&&(g["stop-opacity"]=f),l.push(DH("stop",u+"",g))}var m=kH(DH(i,"",a,l)),v=r.gradientCache,y=v[m];y||(y=r.zrId+"-g"+r.gradientIdx++,v[m]=y,a.id=y,r.defs[y]=DH(i,y,a,l)),t[n]=Bm(y)}function nV(e,t,n,r){var i,o=e.style[n],a=e.getBoundingRect(),s={},l=o.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(Om(o)){var p=o.imageWidth,h=o.imageHeight,f=void 0,g=o.image;if(Eh(g)?f=g:VH(g)?f=g.src:WH(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";Hh(p,m),Hh(h,m)}else if(null==p||null==h){var v=function(e,t){if(e){var n=e.elm,r=p||t.width,i=h||t.height;"pattern"===e.tag&&(c?(i=1,r/=a.width):d&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute("width",r),n.setAttribute("height",i))}},y=px(f,null,e,(function(e){u||v(w,e),v(i,e)}));y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}i=DH("image","img",{href:f,width:p,height:h}),s.width=p,s.height=h}else o.svgElement&&(i=ph(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(i){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=Fm(o);b&&(s.patternTransform=b);var w=DH("pattern","",s,[i]),S=kH(w),T=r.patternCache,C=T[S];C||(C=r.zrId+"-p"+r.patternIdx++,T[S]=C,s.id=C,w=r.defs[C]=DH("pattern",C,s,[i])),t[n]=Bm(C)}}function rV(e,t,n){var r=n.clipPathCache,i=n.defs,o=r[e.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=o,i[o]=DH("clipPath",o,a,[JH(e,n)])}t["clip-path"]=Bm(o)}function iV(e){return document.createTextNode(e)}function oV(e,t,n){e.insertBefore(t,n)}function aV(e,t){e.removeChild(t)}function sV(e,t){e.appendChild(t)}function lV(e){return e.parentNode}function uV(e){return e.nextSibling}function cV(e,t){e.textContent=t}var dV=DH("","");function pV(e){return void 0===e}function hV(e){return void 0!==e}function fV(e,t,n){for(var r={},i=t;i<=n;++i){var o=e[i].key;void 0!==o&&(r[o]=i)}return r}function gV(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function mV(e){var t,n=e.children,r=e.tag;if(hV(r)){var i=e.elm=AH(r);if(xV(dV,e),Mh(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&sV(i,mV(o))}else hV(e.text)&&!kh(e.text)&&sV(i,iV(e.text))}else e.elm=iV(e.text);return e.elm}function vV(e,t,n,r,i){for(;r<=i;++r){var o=n[r];null!=o&&oV(e,mV(o),t)}}function yV(e,t,n,r){for(;n<=r;++n){var i=t[n];if(null!=i)if(hV(i.tag))aV(lV(i.elm),i.elm);else aV(e,i.elm)}}function xV(e,t){var n,r=t.elm,i=e&&e.attrs||{},o=t.attrs||{};if(i!==o){for(n in o){var a=o[n];i[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?r.setAttributeNS(EH,n,a):r.setAttribute(n,a))}for(n in i)n in o||r.removeAttribute(n)}}function _V(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(xV(e,t),pV(t.text)?hV(r)&&hV(i)?r!==i&&function(e,t,n){for(var r,i,o,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,p=n[0],h=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==p?p=n[++s]:null==h?h=n[--d]:gV(u,p)?(_V(u,p),u=t[++a],p=n[++s]):gV(c,h)?(_V(c,h),c=t[--l],h=n[--d]):gV(u,h)?(_V(u,h),oV(e,u.elm,uV(c.elm)),u=t[++a],h=n[--d]):gV(c,p)?(_V(c,p),oV(e,c.elm,u.elm),c=t[--l],p=n[++s]):(pV(r)&&(r=fV(t,a,l)),pV(i=r[p.key])||(o=t[i]).tag!==p.tag?oV(e,mV(p),u.elm):(_V(o,p),t[i]=void 0,oV(e,o.elm,u.elm)),p=n[++s]);(a<=l||s<=d)&&(a>l?vV(e,null==n[d+1]?null:n[d+1].elm,n,s,d):yV(e,t,a,l))}(n,r,i):hV(i)?(hV(e.text)&&cV(n,""),vV(n,null,i,0,i.length-1)):hV(r)?yV(n,r,0,r.length-1):hV(e.text)&&cV(n,""):e.text!==t.text&&(hV(r)&&yV(n,r,0,r.length-1),cV(n,t.text)))}var bV=0,wV=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=t,this._opts=n=fh({},n),this.root=e,this._id="zr"+bV++,this._oldVNode=NH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=AH("svg");xV(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(gV(e,t))_V(e,t);else{var n=e.elm,r=lV(n);mV(t),null!==r&&(oV(r,t.elm,uV(n)),yV(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return eV(e,OH(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=OH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],a=this._bgVNode=function(e,t,n,r){var i;if(n&&"none"!==n)if(i=DH("rect","bg",{width:e,height:t,x:"0",y:"0",id:"0"}),Lm(n))tV({fill:n},i.attrs,"fill",r);else if(Nm(n))nV({style:{fill:n},dirty:ef,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",r);else{var o=Mm(n),a=o.color,s=o.opacity;i.attrs.fill=a,s<1&&(i.attrs["fill-opacity"]=s)}return i}(n,r,this._backgroundColor,i);a&&o.push(a);var s=e.compress?null:this._mainVNode=DH("g","main",{},[]);this._paintList(t,i,s?s.children:o),s&&o.push(s);var l=_h(Sh(i.defs),(function(e){return i.defs[e]}));if(l.length&&o.push(DH("defs","defs",{},l)),e.animation){var u=function(e,t,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=_h(Sh(e),(function(t){return t+i+_h(Sh(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+o})).join(r),s=_h(Sh(t),(function(e){return"@keyframes "+e+i+_h(Sh(t[e]),(function(n){return n+i+_h(Sh(t[e][n]),(function(r){var i=t[e][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=DH("style","stl",{},[],u);o.push(c)}}return NH(n,r,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},kH(this.renderToVNode({animation:jh(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:jh(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,i,o=e.length,a=[],s=0,l=0,u=0;u<o;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=i&&i.length||0,f=void 0;for(f=Math.max(p-1,h-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=h-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<p;m++){var v={};rV(d[m],v,t);var y=DH("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}i=d;var x=eV(c,t);x&&(r?r.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&i&&(i.style.display="none",e=GA(r,0,n),t=GA(r,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(Nm(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=zm(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();var SV=wV;function TV(e,t,n){var r=$p.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var CV=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||Mv,"string"==typeof t?i=TV(t,n,r):kh(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(Kh(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return j(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=TV("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new og(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new og(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new og(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var p=e.width*e.height,h=c.width*c.height,f=l.width*l.height-p-h;f<r&&(r=f,i=u)}}if(s&&(o[i].union(e),n=!0),!n)(t=new og(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(h=e[c]){var d=h.shouldBePainted(n,r,!0,!0);(f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null)&&u(f);var p=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h,f;d=(h=t[c]).shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered)(f=h.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/u,a/u));var d=this.domBack;function p(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;if(Ph(t))a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||WA(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=eD(i,t,{dirty:function(){c.setUnpainted(),c.__painter.refresh()}}));i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(d,e,n,r,o),i.restore())}!n||s?p(0,0,o,a):n.length&&xh(n,(function(e){p(e.x*u,e.y*u,e.width*u,e.height*u)}))},t}(xf),MV=CV,IV=1e5,EV=314159,AV=.01;var DV=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=fh({},n||{}),this.dpr=n.devicePixelRatio||Mv,this._singleCanvas=i,this.root=e,e.style&&(Kh(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new MV(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=EV,o.push(EV),this._domRoot=e}else{this._width=GA(e,0,n),this._height=GA(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(IV)),r||(r=n.ctx).save(),uD(r,a,i,o===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(IV)},e.prototype.paintOne=function(e,t){lD(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;Eg((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(EV).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&i.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=i[a],d=l.ctx,h=o&&l.createRepaintRects(e,t,p._width,p._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,h);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b<h.length;++b){var w=h[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},p=this,h=0;h<i.length;h++)d(h);return Yp.wxa&&xh(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(uD(a,e,i,o),e.setPrevPaintRect(s))}else uD(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=EV);var n=this._layers[e];return n||((n=new MV("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?hh(n,this._layerConfig[e],!0):this._layerConfig[e-AV]&&hh(n,this._layerConfig[e-AV],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i,o=null,a=0;for(i=0;i<e.length;i++){var s,l=(s=e[i]).zlevel,u=void 0;r!==l&&(r=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?AV:0),this._needsManuallyCompositing),u.__builtin__||dh("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,xh(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?hh(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+AV)hh(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(mh(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=GA(i,0,r),t=GA(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(EV).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new MV("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];uD(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),kV=DV;function OV(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current}vN([uz,_F,Vz,gB,pU,UU,gH,function(e){e.registerPainter("canvas",kV)},az]);var NV=(null===window||void 0===window?void 0:window.outerWidth)>1728?550:470,RV=(null===window||void 0===window?void 0:window.outerWidth)>1728?680:590,PV=r.makeStyles((function(){return{outlierOnlyButton:{borderRadius:"8px"},metricPanel:{position:"relative"},overideMuiSelect:{"& .MuiInput-input":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},"& .MuiInput-root":{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"}},overrideDefaultMuiSelect:{maxHeight:"300px","& .MuiInput-root":{height:"32px"}},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},menuItem:{fontWeight:300,fontSize:"14px",padding:"15px 20px",height:"52px"},outlierButtonContainer:{position:"absolute",display:"flex",justifySelf:"end",marginTop:"8px",marginRight:"8px",zIndex:2,pointerEvents:"auto"},prometheusIcon:{position:"absolute",top:"15px",right:"15px",marginLeft:"17px",marginTop:"5px"}}})),LV=S.default.memo((function(n){var i,o=n.metricData,a=n.appName,s=n.metricKey,l=n.metricMeasure,u=n.operations,c=n.groupByOperations,d=n.height,p=n.timezone,h=n.graphTitle,f=n.graphType,g=n.queryData,m=n.dateTimeRange,v=n.isHistoricalQueryView,y=n.showTitle,x=void 0===y||y,_=n.onSelectedTimeWindow,b=n.onSelectAshLabel,w=PV(),S=u,T="".concat("echart-").concat(s),C=t.useState(null==c?void 0:c[0]),M=C[0],I=C[1],E=t.useState(null==S?void 0:S[0]),A=E[0],D=E[1],k=t.useState("undefined"!=typeof window?window.innerWidth:1280),O=k[0],N=k[1],R=t.useRef(null),P=t.useRef(null),L=OV(o),B=t.useCallback((function(){var e,t,n=f===exports.GraphType.SINGLE_SUPPORTING||f===exports.GraphType.MAIN_RCA,r=null===(t=null===(e=R.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement,i=r?r.clientWidth:O;if(n)return Math.max(.99*i,250);var o=Math.floor(i/500),s=16*((o=Math.max(1,o))-1),l=Math.floor((i-s)/o);return Math.max(Math.min(l,NV),a===exports.AppName.YBM?RV:490)}),[f,O]),j=t.useCallback((function(e){var t,n,r,i,s,c,d,f=BP(o,5);if(!ac(f)||!oc(f.data))return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:"No Data Available",left:"center",top:"50%",textStyle:{fontWeight:"bold",fontFamily:ld,fontSize:13,color:"#0B1117"}},legend:{data:[]}};var v=l===exports.MetricMeasure.OUTLIER,y=l===exports.MetricMeasure.OUTLIER_TABLES,_=l===exports.MetricMeasure.OUTLIER_DB,b=null!=e?e:null==u?void 0:u[0];((null==u?void 0:u.length)||e)&&(v||y||_)&&(f.data=f.data.filter((function(e){return(null==e?void 0:e.name)===b})));var w=null!==(i=null===(r=null===(n=null===(t=f.layout)||void 0===t?void 0:t.yaxis)||void 0===n?void 0:n.ticksuffix)||void 0===r?void 0:r.replace(/(&nbsp;|\s)+/g,""))&&void 0!==i?i:null,S=0,T=f.data.map((function(e,t){var n,r,i,o,a,s,u,c,d,h,m,v=e.name;if(e.instanceName&&e.name!==e.instanceName)v="".concat(e.name," (").concat(e.instanceName,")"),l===exports.MetricMeasure.OUTLIER&&(v=e.instanceName);else if(l!==exports.MetricMeasure.OUTLIER||e.instanceName||e.global){if(y)v=e.tableName;else if(_)v=e.dbName;else if((null===(n=null==f?void 0:f.layout)||void 0===n?void 0:n.type)===od&&l===exports.MetricMeasure.OVERALL&&(null===(o=null===(i=null===(r=null==f?void 0:f.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0])===exports.WaitEventClassification.QUERY_ID){var x=null==g?void 0:g.find((function(t){return t.id.queryId===e.name}));v=null==x?void 0:x.query}}else v=cd.NODE_AVERAGE;var b=v,w=(null==v?void 0:v.length)>30;(null===(a=null==f?void 0:f.layout)||void 0===a?void 0:a.type)===od&&l===exports.MetricMeasure.OVERALL&&(null===(c=null===(u=null===(s=null==f?void 0:f.layout)||void 0===s?void 0:s.metadata)||void 0===u?void 0:u.currentGroupBy)||void 0===c?void 0:c[0])===exports.WaitEventClassification.QUERY_ID?b=(null==v?void 0:v.substring(0,30))+"...":w&&l!==exports.MetricMeasure.OUTLIER?b=v.substring(0,30)+"...":l!==exports.MetricMeasure.OUTLIER||e.global?y?b=e.namespaceName?"".concat(e.namespaceName,".").concat(e.tableName):e.tableName:_&&(b=e.namespaceName):b=e.instanceName?"".concat(e.instanceName," (").concat(e.name,")"):cd.NODE_AVERAGE;var S=e.x.map((function(t,n){return[t,e.y[n]]})),T=(null===(d=null==f?void 0:f.layout)||void 0===d||d.type,S);return F(F({name:b,fullname:v,type:(null===(h=null==f?void 0:f.layout)||void 0===h?void 0:h.type)===od?"bar":"line",data:T,color:Jd[t%Jd.length]},e.name===cd.NODE_AVERAGE?{lineStyle:{type:"dashed"}}:{}),{tooltip:{formatter:function(e){var t=e.value[1],n=new Date(e.value[0]).toLocaleString(void 0,{timeZone:p});return"".concat(e.seriesName,": ").concat(t.toFixed(2)," at ").concat(n)}},stack:(null===(m=null==f?void 0:f.layout)||void 0===m?void 0:m.type)===od?"total":void 0,smooth:!1,showSymbol:!1})}));ac(null===(s=f.layout)||void 0===s?void 0:s.yaxis)&&"µs"===w&&oc(f.data)&&cc(f.data)&&(T.forEach((function(e){e.data=e.data.map((function(e){return[e[0],e[1]/1e3]}))})),w="ms");var C=0;T.forEach((function(e){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>C&&(C=t)}));S=1.6*C,(null===(c=null==f?void 0:f.layout)||void 0===c?void 0:c.type)===od&&(S=3.5*C),0===S&&(S=1.01);var M=x?null!=h?h:null===(d=f.layout)||void 0===d?void 0:d.title:"",I={title:{text:a!==exports.AppName.YBA&&w?"".concat(M," (").concat(w,")"):M,left:16,top:16,textStyle:{fontWeight:600,fontFamily:ld,fontSize:15}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px;",formatter:function(e){var t,n=(null===(t=e[0])||void 0===t?void 0:t.axisValue)||"",r=new Date(n),i=zu(p?Uu(r,p):r,"MMM d HH:mm (zzz)",{timeZone:null!=p?p:void 0}),o=e.map((function(e){var t=e.value[1],n=Bp(e.color,e.seriesName),r=jp(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;"><b>'.concat(i,"</b><br/>").concat(o,"</div>")}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:{left:"3%",right:"4%",bottom:"20%",containLabel:!0,top:"20%"},xAxis:{type:"time",boundaryGap:!1,splitNumber:6,axisLabel:{color:"#25323D",interval:"auto",formatter:function(e){var t,n=new Date(e),r=(t=m.startDateTime,(m.endDateTime-t)/864e5);return zu(n,r>5?"MM/dd":r>1&&r<=5?"MM/dd, HH:mm":"HH:mm")}},axisLine:{lineStyle:{color:"#FF0000"}},axisPointer:{label:{show:!1}}},yAxis:{type:"value",axisLabel:{color:"#25323D",formatter:function(e){return"".concat(null==e?void 0:e.toFixed(2)," ").concat(null!=w?w:"")}},axisLine:{lineStyle:{color:"#00AAFF"}},axisPointer:{label:{show:!1}},min:0,max:S},series:T,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0},legend:{type:"plain",orient:"horizontal",textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#4E5F6D",fontFamily:ld},bottom:10,data:T.filter((function(e){return e&&e.name})).slice(0,8).map((function(e){return e.name}))}};return I}),[a,m,h,o,l,u,g,x,p]),z=t.useCallback((function(){var e;if(R.current){P.current||(P.current=dk(R.current,"light",{renderer:"canvas"}),P.current.group="metrics-sync-group");var t=j(A);P.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=P.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=P.current)||void 0===e||e.resize({width:B()}),function(e){e.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}});var t=!1,n=null;e.current.getZr().on("mousedown",(function(r){var i,o,a=[r.offsetX,r.offsetY],s=null===(i=e.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},a);n=null!==(o=null==s?void 0:s[0])&&void 0!==o?o:null,t=!0})),e.current.getZr().on("mouseup",(function(r){var i;if(t){var o=[r.offsetX,r.offsetY],a=null===(i=e.current)||void 0===i?void 0:i.convertFromPixel({seriesIndex:0},o),s=null==a?void 0:a[0];null!==n&&null!==s&&Math.abs(s-n)>10&&_(n,s)}t=!1}))}(P)}}),[A,j,B]);t.useEffect((function(){var e=function(){return N(window.innerWidth)};return window.addEventListener("resize",e),z(),function(){window.removeEventListener("resize",e),P.current&&(P.current.dispose(),P.current=null)}}),[z]),t.useEffect((function(){var e;if(P.current){var t=j(A);P.current.setOption(t,!0),f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=P.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=P.current)||void 0===e||e.resize({width:B()})}}),[o,L,A,M,B,j]);t.useEffect((function(){var e;P.current&&(f===exports.GraphType.MULTI_SUPPORTING?requestAnimationFrame((function(){var e,t,n;null===(e=P.current)||void 0===e||e.resize({width:null!==(n=null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.clientWidth)&&void 0!==n?n:0})})):null===(e=P.current)||void 0===e||e.resize({width:B()}))}),[O,B]);var U=A||(null==u?void 0:u[0]);return e.jsxs(r.Box,F({id:s,onClick:function(e){return e.stopPropagation()},className:w.metricPanel},{children:[e.jsxs("span",F({className:w.outlierButtonContainer},{children:[(null===(i=null==o?void 0:o.layout)||void 0===i?void 0:i.type)===od&&(l===exports.MetricMeasure.OUTLIER||l===exports.MetricMeasure.OUTLIER_TABLES||l===exports.MetricMeasure.OUTLIER_DB||v)&&oc(c)&&e.jsx(r.Box,F({ml:2,mr:2},{children:e.jsx(Fa,F({value:M,className:Y(w.outlierOnlyButton,w.overrideDefaultMuiSelect,w.overrideDefaultMuiFormControl)},{children:null==c?void 0:c.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){!function(e){var t;I(e),(null===(t=null==o?void 0:o.layout)||void 0===t?void 0:t.type)!==od||l!==exports.MetricMeasure.OUTLIER&&l!==exports.MetricMeasure.OUTLIER_TABLES&&l!==exports.MetricMeasure.OUTLIER_DB&&!v||null==b||b(e,o,!!v)}(t),e.stopPropagation()}},{children:t}),n)}))}))})),(null==S?void 0:S.length)>1&&oc(S)&&e.jsx(Fa,F({value:A,className:Y(w.outlierOnlyButton,w.overrideDefaultMuiSelect,w.overrideDefaultMuiFormControl)},{children:null==S?void 0:S.map((function(t,n){return e.jsx(r.MenuItem,F({className:Y(t===U&&w.overideMuiSelect,w.menuItem),value:t,onClick:function(e){!function(e){var t;if(D(e),(null===(t=null==o?void 0:o.layout)||void 0===t?void 0:t.type)===od&&l===exports.MetricMeasure.OVERALL&&oc(u)&&(null==b||b(e,o,!!v)),P.current){var n=j(e);P.current.setOption(n,!0)}}(t),e.stopPropagation()}},{children:t}),"".concat(t,"-").concat(n))}))}))]})),e.jsx("div",{ref:R,id:T,style:{overflow:"hidden",position:"relative",zIndex:1,height:null!=d?d:400,width:"100%",minWidth:0}})]}))})),BV={exports:{}},jV=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},FV=jV,zV=Object.prototype.toString;function UV(e){return"[object Array]"===zV.call(e)}function HV(e){return void 0===e}function VV(e){return null!==e&&"object"==typeof e}function WV(e){if("[object Object]"!==zV.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function YV(e){return"[object Function]"===zV.call(e)}function GV(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),UV(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var qV={isArray:UV,isArrayBuffer:function(e){return"[object ArrayBuffer]"===zV.call(e)},isBuffer:function(e){return null!==e&&!HV(e)&&null!==e.constructor&&!HV(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:VV,isPlainObject:WV,isUndefined:HV,isDate:function(e){return"[object Date]"===zV.call(e)},isFile:function(e){return"[object File]"===zV.call(e)},isBlob:function(e){return"[object Blob]"===zV.call(e)},isFunction:YV,isStream:function(e){return VV(e)&&YV(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:GV,merge:function e(){var t={};function n(n,r){WV(t[r])&&WV(n)?t[r]=e(t[r],n):WV(n)?t[r]=e({},n):UV(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)GV(arguments[r],n);return t},extend:function(e,t,n){return GV(t,(function(t,r){e[r]=n&&"function"==typeof t?FV(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},QV=qV;function ZV(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var XV=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(QV.isURLSearchParams(t))r=t.toString();else{var i=[];QV.forEach(t,(function(e,t){null!=e&&(QV.isArray(e)?t+="[]":e=[e],QV.forEach(e,(function(e){QV.isDate(e)?e=e.toISOString():QV.isObject(e)&&(e=JSON.stringify(e)),i.push(ZV(t)+"="+ZV(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},$V=qV;function KV(){this.handlers=[]}KV.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},KV.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},KV.prototype.forEach=function(e){$V.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var JV,eW,tW,nW,rW,iW,oW,aW,sW,lW,uW,cW,dW,pW,hW,fW,gW,mW,vW=KV,yW=qV,xW=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function _W(){if(eW)return JV;eW=1;var e=xW;return JV=function(t,n,r,i,o){var a=new Error(t);return e(a,n,r,i,o)},JV}function bW(){if(nW)return tW;nW=1;var e=_W();return tW=function(t,n,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function wW(){if(iW)return rW;iW=1;var e=qV;return rW=e.isStandardBrowserEnv()?{write:function(t,n,r,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(i)&&s.push("path="+i),e.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},rW}function SW(){return aW?oW:(aW=1,oW=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function TW(){return lW?sW:(lW=1,sW=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function CW(){if(cW)return uW;cW=1;var e=SW(),t=TW();return uW=function(n,r){return n&&!e(r)?t(n,r):r}}function MW(){if(pW)return dW;pW=1;var e=qV,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return dW=function(n){var r,i,o,a={};return n?(e.forEach(n.split("\n"),(function(n){if(o=n.indexOf(":"),r=e.trim(n.substr(0,o)).toLowerCase(),i=e.trim(n.substr(o+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([i]):a[r]?a[r]+", "+i:i}})),a):a}}function IW(){if(fW)return hW;fW=1;var e=qV;return hW=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(n){var r=e.isString(n)?i(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var EW,AW,DW,kW,OW,NW={exports:{}},RW={exports:{}},PW={exports:{}};function LW(){if(AW)return EW;AW=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return EW=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*i;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(i){var o=Math.abs(i);if(o>=r)return a(i,o,r,"day");if(o>=n)return a(i,o,n,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},EW}function BW(){if(kW)return DW;return kW=1,DW=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=LW(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},DW}var jW,FW,zW,UW,HW,VW,WW,YW,GW,qW={exports:{}};function QW(){return FW?jW:(FW=1,jW=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function ZW(){return HW||(HW=1,function(e,t){const n=O.default,r=N.default;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(UW)return zW;UW=1;const e=R.default,t=O.default,n=QW(),{env:r}=process;let i;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,o){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===i)return 0;const a=i||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),zW={supportsColor:function(e){return o(a(e,e&&e.isTTY))},stdout:o(a(!0,t.isatty(1))),stderr:o(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=BW()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(qW,qW.exports)),qW.exports}function XW(){return VW||(VW=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?RW.exports=(OW||(OW=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=BW()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(PW,PW.exports)),PW.exports):RW.exports=ZW()),RW.exports}function $W(){if(GW)return NW.exports;GW=1;var e,t,n,r=A.default,i=r.URL,o=I.default,a=E.default,s=D.default.Writable,l=k.default,u=function(){return YW||(YW=1,WW=function(){if(!e){try{e=XW()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),WW;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=P(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var c=!1;try{l(new i(""))}catch(e){c="ERR_INVALID_URL"===e.code}var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],p=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);p.forEach((function(e){h[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=O("ERR_INVALID_URL","Invalid URL",TypeError),g=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g),v=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=O("ERR_STREAM_WRITE_AFTER_END","write after end"),x=s.prototype.destroy||w;function _(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof g?e:new g({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",a=n[o]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,i&&s instanceof i?e=C(e):R(e)?e=C(S(e)):(a=r,r=T(e),e={protocol:o}),P(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,R(r.host)||R(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,o,"protocol mismatch"),u("options",r),new _(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function S(e){var t;if(c)t=new i(e);else if(!R((t=T(r.parse(e))).protocol))throw new f({input:e});return t}function T(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new f({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new f({input:e.href||e});return e}function C(e,t){var n=t||{};for(var r of d)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function M(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function O(e,t,n){function r(n){P(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function N(e,t){for(var n of p)e.removeListener(n,h[n]);e.on("error",w),e.destroy(t)}function R(e){return"string"==typeof e||e instanceof String}function P(e){return"function"==typeof e}return _.prototype=Object.create(s.prototype),_.prototype.abort=function(){N(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return N(this._currentRequest,e),x.call(this,e),this},_.prototype.write=function(e,t,n){if(this._ending)throw new y;if(!R(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;P(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new v),this.abort()):n&&n()},_.prototype.end=function(e,t,n){if(P(e)?(n=e,e=t=null):P(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(i._redirectable=this,p))i.on(o,h[o]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}},_.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,o=e.headers.location;if(!o||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(N(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],M(/^content-/i,this._options.headers));var d=M(/^host$/i,this._options.headers),p=S(this._currentUrl),h=d||p.host,f=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(p,{host:h})),g=function(e,t){return c?new i(e,t):S(r.resolve(t,e))}(o,f);if(u("redirecting to",g.href),this._isRedirect=!0,C(g,this._options),(g.protocol!==p.protocol&&"https:"!==g.protocol||g.host!==h&&!function(e,t){l(R(e)&&R(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(g.host,h))&&M(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),P(a)){var v={headers:e.headers,statusCode:t},y={url:f,method:s,headers:n};a(this._options,v,y),this._sanitizeOptions(this._options)}this._performRequest()},NW.exports=b({http:o,https:a}),NW.exports.wrap=b,NW.exports}var KW,JW,eY={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function tY(){if(JW)return KW;JW=1;var e=qV,t=bW(),n=CW(),r=XV,i=I.default,o=E.default,a=$W().http,s=$W().https,l=A.default,u=P.default,c=eY,d=_W(),p=xW,h=/https:?/;function f(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,f(e,t,e.href)}}return KW=function(g){return new Promise((function(m,v){var y=function(e){m(e)},x=function(e){v(e)},_=g.data,b=g.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+c.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(d("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",g));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var w=void 0;g.auth&&(w=(g.auth.username||"")+":"+(g.auth.password||""));var S=n(g.baseURL,g.url),T=l.parse(S),C=T.protocol||"http:";if(!w&&T.auth){var M=T.auth.split(":");w=(M[0]||"")+":"+(M[1]||"")}w&&delete b.Authorization;var I=h.test(C),E=I?g.httpsAgent:g.httpAgent,A={path:r(T.path,g.params,g.paramsSerializer).replace(/^\?/,""),method:g.method.toUpperCase(),headers:b,agent:E,agents:{http:g.httpAgent,https:g.httpsAgent},auth:w};g.socketPath?A.socketPath=g.socketPath:(A.hostname=T.hostname,A.port=T.port);var D,k=g.proxy;if(!k&&!1!==k){var O=C.slice(0,-1)+"_proxy",N=process.env[O]||process.env[O.toUpperCase()];if(N){var R=l.parse(N),P=process.env.no_proxy||process.env.NO_PROXY,L=!0;if(P)L=!P.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&T.hostname.substr(T.hostname.length-e.length)===e||T.hostname===e))}));if(L&&(k={host:R.hostname,port:R.port,protocol:R.protocol},R.auth)){var B=R.auth.split(":");k.auth={username:B[0],password:B[1]}}}}k&&(A.headers.host=T.hostname+(T.port?":"+T.port:""),f(A,k,C+"//"+T.hostname+(T.port?":"+T.port:"")+A.path));var j=I&&(!k||h.test(k.protocol));g.transport?D=g.transport:0===g.maxRedirects?D=j?o:i:(g.maxRedirects&&(A.maxRedirects=g.maxRedirects),D=j?s:a),g.maxBodyLength>-1&&(A.maxBodyLength=g.maxBodyLength);var F=D.request(A,(function(n){if(!F.aborted){var r=n,i=n.req||F;if(204!==n.statusCode&&"HEAD"!==i.method&&!1!==g.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(u.createUnzip()),delete n.headers["content-encoding"]}var o={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:g,request:i};if("stream"===g.responseType)o.data=r,t(y,x,o);else{var a=[],s=0;r.on("data",(function(e){a.push(e),s+=e.length,g.maxContentLength>-1&&s>g.maxContentLength&&(r.destroy(),x(d("maxContentLength size of "+g.maxContentLength+" exceeded",g,null,i)))})),r.on("error",(function(e){F.aborted||x(p(e,g,null,i))})),r.on("end",(function(){var n=Buffer.concat(a);"arraybuffer"!==g.responseType&&(n=n.toString(g.responseEncoding),g.responseEncoding&&"utf8"!==g.responseEncoding||(n=e.stripBOM(n))),o.data=n,t(y,x,o)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(p(e,g,null,F))})),g.timeout){var z=parseInt(g.timeout,10);if(isNaN(z))return void x(d("error trying to parse `config.timeout` to int",g,"ERR_PARSE_TIMEOUT",F));F.setTimeout(z,(function(){F.abort(),x(d("timeout of "+z+"ms exceeded",g,g.transitional&&g.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}g.cancelToken&&g.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(p(e,g,null,F))})).pipe(F):F.end(_)}))}}var nY=qV,rY=function(e,t){yW.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},iY=xW,oY={"Content-Type":"application/x-www-form-urlencoded"};function aY(e,t){!nY.isUndefined(e)&&nY.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var sY,lY={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?sY=function(){if(mW)return gW;mW=1;var e=qV,t=bW(),n=wW(),r=XV,i=CW(),o=MW(),a=IW(),s=_W();return gW=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var g=l.auth.username||"",m=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(g+":"+m)}var v=i(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(sY=tY()),sY),transformRequest:[function(e,t){return rY(t,"Accept"),rY(t,"Content-Type"),nY.isFormData(e)||nY.isArrayBuffer(e)||nY.isBuffer(e)||nY.isStream(e)||nY.isFile(e)||nY.isBlob(e)?e:nY.isArrayBufferView(e)?e.buffer:nY.isURLSearchParams(e)?(aY(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):nY.isObject(e)||t&&"application/json"===t["Content-Type"]?(aY(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&nY.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw iY(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};lY.headers={common:{Accept:"application/json, text/plain, */*"}},nY.forEach(["delete","get","head"],(function(e){lY.headers[e]={}})),nY.forEach(["post","put","patch"],(function(e){lY.headers[e]=nY.merge(oY)}));var uY,cY,dY=lY,pY=qV,hY=dY;function fY(){return cY?uY:(cY=1,uY=function(e){return!(!e||!e.__CANCEL__)})}var gY=qV,mY=function(e,t,n){var r=this||hY;return pY.forEach(n,(function(n){e=n.call(r,e,t)})),e},vY=fY(),yY=dY;function xY(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var _Y=qV,bY=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return _Y.isPlainObject(e)&&_Y.isPlainObject(t)?_Y.merge(e,t):_Y.isPlainObject(t)?_Y.merge({},t):_Y.isArray(t)?t.slice():t}function l(r){_Y.isUndefined(t[r])?_Y.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}_Y.forEach(r,(function(e){_Y.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),_Y.forEach(i,l),_Y.forEach(o,(function(r){_Y.isUndefined(t[r])?_Y.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),_Y.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(i).concat(o).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return _Y.forEach(c,l),n},wY=eY,SY={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){SY[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var TY={},CY=wY.version.split(".");function MY(e,t){for(var n=t?t.split("."):CY,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}SY.transitional=function(e,t,n){var r=t&&MY(t);function i(e,t){return"[Axios v"+wY.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new Error(i(o," has been removed in "+t));return r&&!TY[o]&&(TY[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var IY,EY,AY,DY,kY,OY,NY,RY,PY={isOlderVersion:MY,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:SY},LY=qV,BY=XV,jY=vW,FY=function(e){return xY(e),e.headers=e.headers||{},e.data=mY.call(e,e.data,e.headers,e.transformRequest),e.headers=gY.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),gY.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||yY.adapter)(e).then((function(t){return xY(e),t.data=mY.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return vY(t)||(xY(e),t&&t.response&&(t.response.data=mY.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},zY=bY,UY=PY,HY=UY.validators;function VY(e){this.defaults=e,this.interceptors={request:new jY,response:new jY}}function WY(){if(EY)return IY;function e(e){this.message=e}return EY=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,IY=e}VY.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=zY(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&UY.assertOptions(t,{silentJSONParsing:HY.transitional(HY.boolean,"1.0.0"),forcedJSONParsing:HY.transitional(HY.boolean,"1.0.0"),clarifyTimeoutError:HY.transitional(HY.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var a=[FY,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),i=Promise.resolve(e);a.length;)i=i.then(a.shift(),a.shift());return i}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{i=FY(s)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},VY.prototype.getUri=function(e){return e=zY(this.defaults,e),BY(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},LY.forEach(["delete","get","head","options"],(function(e){VY.prototype[e]=function(t,n){return this.request(zY(n||{},{method:e,url:t,data:(n||{}).data}))}})),LY.forEach(["post","put","patch"],(function(e){VY.prototype[e]=function(t,n,r){return this.request(zY(r||{},{method:e,url:t,data:n}))}}));var YY=qV,GY=jV,qY=VY,QY=bY;function ZY(e){var t=new qY(e),n=GY(qY.prototype.request,t);return YY.extend(n,qY.prototype,t),YY.extend(n,t),n}var XY=ZY(dY);XY.Axios=qY,XY.create=function(e){return ZY(QY(XY.defaults,e))},XY.Cancel=WY(),XY.CancelToken=function(){if(DY)return AY;DY=1;var e=WY();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},AY=t}(),XY.isCancel=fY(),XY.all=function(e){return Promise.all(e)},XY.spread=OY?kY:(OY=1,kY=function(e){return function(t){return e.apply(null,t)}}),XY.isAxiosError=RY?NY:(RY=1,NY=function(e){return"object"==typeof e&&!0===e.isAxiosError}),BV.exports=XY,BV.exports.default=XY;var $Y,KY,JY=G(BV.exports),eG="undefined"!=typeof process&&process.env?process.env:{},tG="development"===eG.NODE_ENV,nG=null!==($Y=eG.REACT_APP_API_URL)&&void 0!==$Y?$Y:tG?"http://localhost:8080/api":"/api";exports.QUERY_KEY=void 0,(KY=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",KY.fetchGraphs="fetchGraphs",KY.fetchQueries="fetchQueries",KY.fetchUniverseMetadataList="fetchUniverseMetadataList",KY.deleteUniverseMetadata="deleteUniverseMetadata",KY.updateUniverseMetadata="updateUniverseMetadata",KY.fetchUniverseListDetails="fetchUniverseListDetails",KY.fetchUniverseById="fetchUniverseById",KY.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",KY.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",KY.fetchAnomaliesPage="fetchAnomaliesPage",KY.fetchQueriesPage="fetchQueriesPage",KY.fetchQueriesStatsPage="fetchQueriesStatsPage",KY.fetchQueriesDatabases="fetchQueriesDatabases",KY.fetchCustomerMetadataList="fetchCustomerMetadataList",KY.fetchQueryStats="fetchQueryStats",KY.fetchTablesPage="fetchTablesPage",KY.fetchNamespaces="fetchNamespaces",KY.deleteRuntimeConfig="deleteRuntimeConfig",KY.fetchRuntimeConfigs="fetchRuntimeConfigs",KY.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",KY.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",KY.updateRuntimeConfig="updateRuntimeConfig",KY.fetchAnomalyGroups="fetchAnomalyGroups",KY.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",KY.fetchAnomalyGroupsById="fetchAnomalyGroupsById",KY.getUniverseMetadata="getUniverseMetadata",KY.fetchMetricsGraphs="fetchMetricsGraphs";var rG=JY.create({baseURL:nG});rG.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var i=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=i}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var iG,oG,aG,sG,lG,uG,cG,dG,pG,hG=function(){this.fetchAnomalies=function(e,t,n,r){var i=sc(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",o={};return t&&(o.startTime=t),n&&(o.endTime=n),rG.get(i,{params:o}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,i,o,a,s){void 0===r&&(r=10);var l=sc(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return i&&(u.startTime=i),o&&(u.endTime=o),a&&a!==rd&&(u.category=a),sc(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,rG.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=sc(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return o&&(p.startTime=o),a&&(p.endTime=a),sc(s)&&(p.query=s),l&&l!==rd&&(p.dbName=l),p.sortBy=lc(u)?"dbName":u,p.direction=lc(c)?"DESC":c,p.offset=n*i,p.needTotalCount=!0,p.limit=i,rG.get(d,{params:p})},this.fetchQueriesStatsPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=t.queryType,p=t.groupByOperation,h=sc(r)?"".concat(r,"/universe/").concat(e,"/queries/stats/page"):"/universe/".concat(e,"/queries/stats/page"),f={};return d&&(f.queryType=d),o&&(f.startTime=o),a&&(f.endTime=a),sc(s)&&(f.query=s),l&&l!==rd&&(f.namespaceName=l),p&&p===exports.WaitEventClassification.WAIT_EVENT&&(f.groupEventsBy=Hc.waitEvent),f.sortBy=lc(u)?"eps":u,f.direction=lc(c)?"DESC":c,f.offset=n*i,f.needTotalCount=!0,f.limit=i,f.excludeTpUser=!0,rG.get(h,{params:f})},this.fetchNamespaceSchemas=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return rG.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},i=t.startTime,o=t.endTime,a=t.queryId,s=t.dbId;i&&(r.startTime=i),o&&(r.endTime=o),a&&(r.queryId=a),s&&(r.dbId=s);var l=sc(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return rG.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,i=t.pageSize,o=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=sc(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return o&&(h.startTime=o),a&&(h.endTime=a),sc(s)&&(h.tableName=s),l&&l!==rd&&(h.namespaceName=l),u&&u!==rd&&(h.schemaName=u),h.sortBy=lc(c)?"namespaceName":c,h.direction=lc(d)?"DESC":d,h.offset=n*i,h.needTotalCount=!0,h.limit=i,rG.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return rG.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return rG.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return rG.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs");return rG.post(r,t).then((function(e){return e.data}))},this.fetchQueries=function(e,t,n){var r={};ac(n)&&(r.db_id=null==n?void 0:n.dbId,r.query_id=null==n?void 0:n.queryId,r.user_id=null==n?void 0:n.userId);var i=sc(t)?"".concat(t,"/universe/").concat(e,"/queries"):"/universe/".concat(e,"/queries");return rG.get(i,{params:r}).then((function(e){return e.data}))},this.fetchCustomerMetadataList=function(e){var t=sc(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return rG.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=sc(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return rG.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=sc(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return rG.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=sc(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return rG.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=sc(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",i={customer_uuid:t,universe_uuid:n};return rG.get(r,{params:i}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return rG.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=sc(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return rG.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return rG.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},i=sc(e)?"".concat(e,"/universe/details"):"/universe/details";return rG.get(i,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return rG.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return rG.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=sc(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return rG.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=sc(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return rG.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=sc(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return rG.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var i=sc(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return rG.put(i,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=sc(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return rG.delete(r).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,i){void 0===i&&(i="");var o=new URLSearchParams;if(t&&o.append("startTime",t),n&&o.append("endTime",n),null===t&&null===n)return{};sc(i)&&o.append("anomalyType",i);var a=sc(r)?"".concat(r,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(o.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(o.toString());return rG.get(a).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,i){var o=sc(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return rG.get(o).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,i){if(null===n&&null===r)return{};var o=sc(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return rG.get(o).then((function(e){return e.data}))}},fG=new hG;function gG(){return gG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gG.apply(null,arguments)}const mG=e=>T.createElement("svg",gG({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),iG||(iG=T.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),oG||(oG=T.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),aG||(aG=T.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),sG||(sG=T.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),lG||(lG=T.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),uG||(uG=T.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),cG||(cG=T.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),dG||(dG=T.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),pG||(pG=T.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},T.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),T.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var vG,yG="data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",xG="data:image/svg+xml,%3csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.146447 0.146447C0.320013 -0.0271197 0.589437 -0.0464048 0.784305 0.0885913L0.853553 0.146447L4.6465 3.93939C4.82005 4.1129 5.08941 4.13218 5.28422 3.99727L5.35345 3.93945L9.14645 0.146448C9.34171 -0.0488139 9.65829 -0.0488138 9.85355 0.146448C10.0271 0.320015 10.0464 0.589439 9.91141 0.784307L9.85355 0.853555L6.0605 4.64661C5.51136 5.19558 4.64252 5.22989 4.05337 4.7495L3.93945 4.64655L0.146446 0.853553C-0.0488156 0.658291 -0.0488156 0.341709 0.146447 0.146447Z' fill='%236D7C88'/%3e%3c/svg%3e",_G="data:image/svg+xml,%3csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.85355 5.85355C9.67999 6.02712 9.41056 6.0464 9.21569 5.91141L9.14645 5.85355L5.3535 2.06061C5.17994 1.8871 4.91059 1.86783 4.71578 2.00273L4.64655 2.06055L0.853554 5.85355C0.658292 6.04881 0.341708 6.04881 0.146446 5.85355C-0.0271206 5.67999 -0.0464048 5.41056 0.0885916 5.21569L0.146446 5.14645L3.9395 1.35339C4.48864 0.804418 5.35748 0.770107 5.94663 1.2505L6.06055 1.35345L9.85355 5.14645C10.0488 5.34171 10.0488 5.65829 9.85355 5.85355Z' fill='%236D7C88'/%3e%3c/svg%3e",bG=function(i){var o,a,s,l,u=i.queryId,c=i.metricMeasure,d=i.apiUrl,p=i.isHistoricalQueryView,h=i.universeQueryStatsData,f=i.appName,g=i.timezone,m=i.urlParams,v=i.dateTimeRange,y=i.getClusterDetails,x=i.onSelectedTimeWindow,_=rp(),b=Ki(),w=t.useState(null),S=w[0],T=w[1],C=t.useState([]),M=C[0],I=C[1],E=t.useState(!1),A=E[0],D=E[1],k=y(),O=k.universeUuid,N=k.cluster,R=k.region,P=k.zone,L=k.node,B=k.numNodes,j=k.outlierType,z=function(e,t,n){void 0===n&&(n=!1);var r=wd.WAIT_EVENT_COMPONENT;if("Class"===e?r=wd.WAIT_EVENT_CLASS:"Type"===e?r=wd.WAIT_EVENT_TYPE:"Event"===e?r=wd.WAIT_EVENT:"Query"===e?r=wd.QUERY:"Client IP"===e&&(r=wd.CLIENT_NODE_IP),n){var i=JSON.parse(JSON.stringify(M)),o=null;if(n){var a=null==i?void 0:i.filter((function(e){return e.name===(null==t?void 0:t.name)}));if(a.length>=2){var s=a.find((function(e,n){return n===a.length-1&&e.name===(null==t?void 0:t.name)}));o=s}else o=null==i?void 0:i.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}))}else o=null==i?void 0:i.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));o&&(o.groupBy=[r]),i.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?o:e})),I(i),U.mutate(i)}},U=n.useMutation({mutationKey:["fetchHistoricalQueryGraphs",O],mutationFn:function(e){return fG.fetchGraphs(O,e,d)},onSuccess:function(e){T(e)},onError:function(e){console.error("Failed to fetch Query graphs",e)}}),H=null===(s=null===(a=null===(o=null==U?void 0:U.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;t.useEffect((function(){var e,t=Rp(!0,!1,0,y(),null,F(F({},m),{type:null!==(e=m.type)&&void 0!==e?e:null}));t&&I(t),t&&U.mutate(t)}),[c,v,R,N,P,L,j,B]),t.useEffect((function(){return function(){hk("metrics-sync-group")}}),[]),t.useEffect((function(){U.isSuccess&&S&&S.length>0&&pk("metrics-sync-group")}),[U.isSuccess,S]);var V=p?u:null==u?void 0:u[0],W=null==h?void 0:h.find((function(e){return e.queryId===V})),G=null==W?void 0:W.query,q=sc(null!==(l=null==m?void 0:m.dbId)&&void 0!==l?l:"");return e.jsxs(r.Box,F({mt:3,mr:3},{children:[sc(G)&&e.jsx(r.Box,F({ml:1},{children:e.jsx(Ii,{text:G,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,containerClassName:b.codeBlockSqlView},"HistoricalQueryView-".concat(V))})),U.isLoading&&e.jsx(r.Box,F({mt:2,className:_.loadingBox},{children:e.jsx(mG,{className:Y(_.icon,_.inProgressIcon)})})),U.isError&&e.jsxs(r.Box,F({mt:4},{children:[(f===exports.AppName.YBA||f===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(H)?H:tp.QUERIES_GRAPHS_FETCH_ERROR}),f===exports.AppName.YBM&&e.jsx(za,{text:sc(H)?H:tp.QUERIES_GRAPHS_FETCH_ERROR})]})),U.isSuccess&&e.jsxs(r.Box,{children:[e.jsxs(r.Box,F({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx(r.Box,F({display:"flex",flexDirection:"row",mt:1,ml:2,alignItems:"center"},{children:e.jsxs("span",F({className:_.headerTitle,onClick:function(){D(!A)}},{children:[Pd,q&&e.jsx("img",{style:{marginLeft:"8px"},src:A?_G:xG})]}))})),q&&A&&e.jsx(e.Fragment,{children:e.jsxs(r.Box,F({display:"flex",flexDirection:"row",ml:2,alignItems:"center"},{children:[e.jsx("img",{src:yG}),e.jsx("span",F({className:_.metadataName,style:{marginLeft:"8px"}},{children:null==W?void 0:W.namespaceName})),e.jsx(r.Box,F({ml:1,className:_.tag},{children:e.jsx("span",F({className:_.tagName},{children:Ld}))}))]}))})]})),e.jsx(r.Box,F({className:_.gridBox},{children:null==S?void 0:S.map((function(t,n){var i,o,a=Op(c,t,exports.GraphType.SINGLE_SUPPORTING,!0,M,!0),s=t.name;if(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.startsWith("active_session_history")){var l=t.layout.metadata,u=l.currentGroupBy,d=null===(o=l.supportedGroupBy.find((function(e){return e.label===u[0]})))||void 0===o?void 0:o.name;d&&a.groupByOperations.sort((function(e,t){return e===d?-1:t===d?1:0}))}return e.jsx(r.Box,F({id:"HistoricalQueryView-".concat(n)},{children:e.jsx(r.Box,F({mt:2,mb:1,style:{border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(LV,{metricData:t,metricKey:s,dateTimeRange:v,containerWidth:null,metricMeasure:c,operations:c===exports.MetricMeasure.OVERALL?[]:a.uniqueOperations,graphType:exports.GraphType.MULTI_SUPPORTING,groupByOperations:a.groupByOperations,appName:f,timezone:g,queryData:h,onSelectAshLabel:z,isHistoricalQueryView:!0,onSelectedTimeWindow:x,showTitle:!0},"".concat(c,"-").concat(s))}))}),"HistoricalQueryView-".concat(n))}))}))]})]}))};function wG(){return wG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wG.apply(null,arguments)}const SG=e=>T.createElement("svg",wG({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),vG||(vG=T.createElement("g",{fill:"none",fillRule:"evenodd"},T.createElement("path",{d:"M0 0h24v24H0z"}),T.createElement("path",{fill:"#6D7C88",d:"M10 4a6 6 0 0 1 4.581 9.875l4.773 4.771a.5.5 0 0 1-.638.765l-.07-.057-4.771-4.773A6 6 0 1 1 10 4Zm0 1a5 5 0 1 0 0 10 5 5 0 0 0 0-10Z"}))));var TG=r.makeStyles((function(e){return{modal:{display:"flex",justifyContent:"flex-end"},paper:{width:"50vw",height:"100vh",backgroundColor:e.palette.background.paper,padding:e.spacing(2),overflowY:"auto",boxShadow:e.shadows[5],display:"flex",flexDirection:"column"},content:{flexGrow:1},footer:{paddingTop:e.spacing(2),borderTop:"1px solid #ccc",textAlign:"right"},search:{top:0,position:"sticky",padding:e.spacing(2,0),backgroundColor:e.palette.background.paper,zIndex:1},container:{border:"1px solid ".concat(e.palette.grey[200]),borderRadius:e.shape.borderRadius},itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},group:{"&:not(:first-child)":{borderTop:"1px solid ".concat(e.palette.grey[200])}},groupHeader:{height:44,padding:e.spacing(0,3),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:r.alpha(e.palette.grey[200],.25)},iconRotate:{transform:"rotate(180deg)"},item:{paddingLeft:e.spacing(2)}}})),CG=function(n){var i=n.open,o=n.selectedTabIndex,a=n.metricMeasure,s=n.onClose,l=n.onSubmit,u=n.metricResources,c=TG(),d=a===exports.MetricMeasure.OUTLIER_TABLES,p=a===exports.MetricMeasure.OUTLIER_DB,h=d||p?d?Vd[o]:Wd[o]:Hd[o],f=qd.reduce((function(e,t){return e[t.name]=t.name===h,e}),{}),g=t.useState(f),m=g[0],v=g[1],y=function(){var e=d||p?d?sessionStorage.getItem($d):sessionStorage.getItem(Kd):sessionStorage.getItem(Xd);if(e)return JSON.parse(e);var t={};return u.forEach((function(e){e.metrics.forEach((function(e){t[e]=!0}))})),t},x=t.useState(""),_=x[0],b=x[1],w=t.useState(y),S=w[0],T=w[1];t.useEffect((function(){T(y())}),[i]);var C=t.useMemo((function(){return u.map((function(e){var t=e.metrics.filter((function(e){return e.toLowerCase().includes(_.toLowerCase())}));return 0===t.length?null:F(F({},e),{metrics:t})})).filter(Boolean)}),[u,_]),M=0===C.length;return e.jsx(Ic,F({open:i,isSidePanel:!0,title:"Add and Remove Charts",onClose:s,enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},onSubmit:function(){sessionStorage.setItem(d||p?d?$d:Kd:Xd,JSON.stringify(S)),l(S),s()},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsxs(r.Box,F({className:c.itemsContainer},{children:[e.jsx(r.Box,F({className:c.search},{children:e.jsx(ro,{fullWidth:!0,placeholder:"Search",value:_,inputProps:{"data-testid":"MetricsSelectionSearch"},InputProps:{startAdornment:e.jsx(r.InputAdornment,F({position:"end"},{children:e.jsx(SG,{})}))},onChange:function(e){b(e.target.value)}})})),M?e.jsx(r.Box,F({textAlign:"center",mt:3,"data-testid":"MetricsSelectionNoResult"},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"No results returned"}))})):e.jsx(r.Box,F({className:c.container},{children:C.map((function(t){if(!t.metrics.length)return null;var n=m[t.name]||!!_;return e.jsxs(r.Box,F({className:c.group},{children:[e.jsxs(r.Box,F({className:c.groupHeader,onClick:function(){return e=t.name,void v((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center"},{children:e.jsx(r.Typography,F({variant:"body1"},{children:t.title}))})),e.jsx(L.default,{className:Y(n&&c.iconRotate)})]})),e.jsx(r.Collapse,F({in:n},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:t.metrics.map((function(n){return e.jsx(r.Box,F({className:Y(c.item)},{children:e.jsx(Ha,{name:"".concat(t.name,".").concat(n),label:Zd[n]||n,inputProps:{"data-testid":n},checked:!!S[n],onChange:function(){return e=n,void T((function(t){var n;return F(F({},t),((n={})[e]=!t[e],n))}));var e}})}),n)}))}))}))]}),t.name)}))}))]}))}))}))},MG="metricsTab",IG=function(i){var o,a,s,l=i.appName,u=i.isMetricsDrawerOpen,c=i.apiUrl,d=i.timezone,p=i.metricMeasure,h=i.dateTimeRange,f=i.filterTrigger,g=i.urlParams,m=i.getClusterDetails,v=i.onSelectedTimeWindow,y=i.handleFilterMetrics,x=i.closeSelectionModal,_=rp(),b=t.useState(null),w=b[0],S=b[1],T=t.useState(0),C=T[0],M=T[1],I=t.useState(!1),E=I[0],A=I[1],D=m(),k=D.universeUuid,O=D.cluster,N=D.region,R=D.zone,P=D.node,L=D.numNodes,B=D.outlierType;t.useEffect((function(){var e=p===exports.MetricMeasure.OUTLIER_TABLES,t=p===exports.MetricMeasure.OUTLIER_DB,n=e?Vd:Hd;if(e||t)M(0),A(!0);else if(p)if(l!==exports.AppName.YBA){var r=window.location.pathname.split("/"),i=r[r.length-1];if(i===td.METRICS){var o=n[0];return window.history.replaceState(null,"","".concat(window.location.pathname,"/").concat(o)),M(0),void A(!0)}if(-1!==(c=n.indexOf(i)))M(c),A(!0);else{o=n[0];var a=r.slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(o)),M(0),A(!0)}}else{a=window.location.pathname;var s=new URLSearchParams(window.location.search),u=(o=n[0],s.get(MG)),c=n.indexOf(u);s.set(MG,null!=u?u:o),window.history.replaceState(null,"","".concat(a,"?").concat(s.toString())),M(null!=c?c:0),A(!0)}}),[p]);var j=n.useMutation({mutationKey:[exports.QUERY_KEY.fetchMetricsGraphs,k],mutationFn:function(e){return fG.fetchGraphs(k,e,c)},onSuccess:function(e){S(e)},onError:function(e){console.error("Failed to fetch metrics",e)}}),z=null===(s=null===(a=null===(o=null==j?void 0:j.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error;return t.useEffect((function(){var e;if(E){var t=Rp(!1,!0,C,m(),null,F(F({},g),{type:null!==(e=g.type)&&void 0!==e?e:null}));t&&j.mutate(t)}}),[p,h,C,N,E,O,R,P,B,L,f]),t.useEffect((function(){return function(){hk("metrics-sync-group")}}),[]),t.useEffect((function(){j.isSuccess&&w&&w.length>0&&pk("metrics-sync-group")}),[j.isSuccess,w]),e.jsxs(r.Box,F({mt:2,mb:2,mr:2,className:_.metricsBox},{children:[e.jsxs(r.Tabs,F({defaultValue:0,value:C,onChange:function(e,t){if(t!==C){var n=p===exports.MetricMeasure.OUTLIER_TABLES,r=p===exports.MetricMeasure.OUTLIER_DB,i=(n||r?n?Vd:Wd:Hd)[t],o=window.location.pathname;if(l!==exports.AppName.YBA){var a=o.split("/").slice(0,-1).join("/");window.history.replaceState(null,"","".concat(a,"/").concat(i))}else{var s=new URLSearchParams(window.location.search);s.set(MG,i),window.history.replaceState(null,"","".concat(o,"?").concat(s.toString()))}M(t)}},"aria-label":"metric tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:[(p===exports.MetricMeasure.OVERALL||p===exports.MetricMeasure.OUTLIER)&&Hd.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==qd?void 0:qd.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(_.cuaseTabButton),wrapper:_.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_TABLES&&Vd.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Yd?void 0:Yd.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(_.cuaseTabButton),wrapper:_.causeTabLabelWrapper}},t)})),p===exports.MetricMeasure.OUTLIER_DB&&Wd.map((function(t,n){var i;return e.jsx(r.Tab,{label:null===(i=null==Gd?void 0:Gd.find((function(e){return t===e.name})))||void 0===i?void 0:i.title,classes:{root:Y(_.cuaseTabButton),wrapper:_.causeTabLabelWrapper}},t)}))]})),j.isLoading&&e.jsx(r.Box,F({mt:2,className:_.loadingBox},{children:e.jsx(mG,{className:Y(_.icon,_.inProgressIcon)})})),j.isError&&e.jsxs(r.Box,F({mt:4},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(z)?z:tp.METRICS_GRAPHS_FETCH_ERROR}),l===exports.AppName.YBM&&e.jsx(za,{text:sc(z)?z:tp.METRICS_GRAPHS_FETCH_ERROR})]})),j.isSuccess&&e.jsx(r.Box,F({className:_.gridBox},{children:null==w?void 0:w.map((function(t,n){if(sc(null==t?void 0:t.errorMessage))return e.jsx(r.Box,{});var i=Op(p,t,exports.GraphType.MULTI_SUPPORTING,!0,[],!0);return e.jsx(r.Box,F({style:{marginTop:"16px",marginRight:"16px",border:"1px solid #E9EEF2",borderRadius:"8px"}},{children:e.jsx(r.Box,{children:e.jsx(LV,{metricData:t,metricKey:t.name,containerWidth:null,metricMeasure:p,operations:p===exports.MetricMeasure.OVERALL?[]:i.uniqueOperations,graphType:exports.GraphType.MULTI_SUPPORTING,dateTimeRange:h,groupByOperations:i.groupByOperations,appName:l,timezone:d,isHistoricalQueryView:!1,onSelectedTimeWindow:v,showTitle:!0},"".concat(t.name,"-").concat(p))},"TopKMetricsView-".concat(n))}))}))})),u&&e.jsx(CG,{onSubmit:y,metricResources:p===exports.MetricMeasure.OUTLIER_TABLES||p===exports.MetricMeasure.OUTLIER_DB?p===exports.MetricMeasure.OUTLIER_TABLES?Yd:Gd:qd,open:u,onClose:x,selectedTabIndex:C,metricMeasure:p})]}))},EG=function(n){var i=n.sourceData,o=n.expandAll,a=void 0!==o&&o,s=n.showMoreOptions,l=void 0!==s&&s,u=n.onClickShowMoreAnomalies,c=n.onSelectedIssue,d=n.startTime,p=n.name,h=n.endTime,f=n.appName,g=n.showMultiline,m=void 0===g||g,v=n.isInsightsTab,y=void 0!==v&&v,_=n.viewAllAnomalies,b=void 0!==_&&_,w=f===exports.AppName.YBM?27:35,S=t.useState({}),T=S[0],C=S[1],M=t.useState({}),I=M[0],E=M[1],A=t.useRef(null),D=t.useRef(null);t.useEffect((function(){if(i){if(l){var e=function(e){for(var t,n={},r=0,i=Object.entries(e.groups);r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=Object.keys(s);for(var l=function(e,r){n[e]=(null===(t=r.groups)||void 0===t?void 0:t.map((function(t,n){return"".concat(e,"_").concat(n)})))||[]},u=0,c=Object.entries(s);u<c.length;u++){var d=c[u];l(d[0],d[1])}}return n}(i),t=function(e){for(var t={},n=0,r=Object.entries(e.groups);n<r.length;n++){var i=r[n],o=i[0],a=i[1];t[o]=!1;for(var s=0,l=Object.keys(a);s<l.length;s++)t[l[s]]=!1}return t}(i);E(e),C(t)}else E({}),C({})}}),[i]),t.useEffect((function(){C((function(e){var t=F({},e);return Object.keys(t).forEach((function(e){t[e]=a})),t}))}),[a]);var k=function(e){var t,n=0;for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))n+=null===(t=e[r])||void 0===t?void 0:t.totalCount}return n},O=function(e){for(var t=0,n=Object.entries(I);t<n.length;t++){var r=n[t],i=r[0];if(r[1].includes(e))return O(i)}return e};function N(){var e,t,n,r,i,o;document.querySelectorAll(".custom-group-separator-left, .custom-group-separator-right, .custom-group-separator-top, .custom-group-separator-bottom").forEach((function(e){return e.remove()}));var a=Array.from(document.querySelectorAll(".vis-labelset .vis-label.custom-group-row-1"));a.forEach((function(e,t){var n,r=function(e){var t=e.nextElementSibling;for(;t&&!t.classList.contains("custom-group-row-1");)t=t.nextElementSibling;return t}(e);if(r){var i=document.createElement("div");i.className="custom-group-separator-left",null===(n=e.parentNode)||void 0===n||n.insertBefore(i,r)}var o=document.querySelector(".vis-foreground");if(o&&null!==e.offsetTop&&t>0){var a=document.createElement("div");a.className="custom-group-separator-right",a.style.top="".concat(e.offsetTop,"px"),a.style.position="absolute",o.appendChild(a)}}));var s=a[0];if(!(null===(e=s.previousElementSibling)||void 0===e?void 0:e.classList.contains("custom-group-separator-top"))){var l=document.createElement("div");l.className="custom-group-separator-top",null===(t=s.parentNode)||void 0===t||t.insertBefore(l,s)}var u=a[a.length-1],c=function(e){var t=e.nextElementSibling;for(;t&&(t.classList.contains("custom-group-row-2")||t.classList.contains("custom-group-row-3"));)t=t.nextElementSibling;return t}(u);if(!(null===(n=null==c?void 0:c.previousElementSibling)||void 0===n?void 0:n.classList.contains("custom-group-separator-bottom"))&&!(null===(r=u.nextElementSibling)||void 0===r?void 0:r.classList.contains("custom-group-separator-bottom"))){var d=document.createElement("div");d.className="custom-group-separator-bottom",c?null===(i=u.parentNode)||void 0===i||i.insertBefore(d,c):null===(o=u.parentNode)||void 0===o||o.appendChild(d)}}return t.useEffect((function(){if((Object.keys(T).length>0||oc(i))&&A.current){var e=l?function(e){for(var t=[],n=[],r=0,i=function(e,i){t.push({id:e,content:"+ ".concat(e),name:e,categoryLevel:1,categoryCount:k(i)});for(var o=function(i,o){var a="".concat(i),s=o.title;t.push({categoryLevel:2,id:a,content:o.totalCount>=1?"&#xff0b;&nbsp;&nbsp;&nbsp;".concat(s):"&#x2212;&nbsp;&nbsp;&nbsp;".concat(s),parent:e,name:s,categoryCount:o.totalCount});var u=[];if(o.groups.forEach((function(e,i){var o,s,l="".concat(a,"_").concat(i),c=(null===(o=e.lastInstance)||void 0===o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:l,name:c,content:c,parent:a,uuid:null===(s=null==e?void 0:e.lastInstance)||void 0===s?void 0:s.uuid,categoryLevel:3}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:l})})),u.push.apply(u,e.anomalyIntervals)})),o.hasMore&&l){var c="".concat(a,"_").concat(Ed),d=Ed;t.push({id:c,name:d,content:Ad,parent:a,categoryLevel:3,grandParent:e,categoryCount:o.totalCount-3}),n.push({id:"anomaly-".concat(a,"-").concat(Ed),content:"anomaly-".concat(a,"-").concat(Ed),start:"",end:"",group:a})}Lp(u).forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))},a=0,s=Object.entries(i);a<s.length;a++){var u=s[a];o(u[0],u[1])}var c=Object.values(i).flatMap((function(e){return e.groups.flatMap((function(e){return e.anomalyIntervals}))}));Lp(c).forEach((function(t){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:t.startTime,end:t.endTime,group:e})}))},o=0,a=Object.entries(null==e?void 0:e.groups);o<a.length;o++){var s=a[o];i(s[0],s[1])}return{groups:t,items:n}}(i):function(e){var t=[],n=[],r=0;return null==e||e.forEach((function(e,i){var o=e.lastInstance,a="group-".concat(i),s=(null==o?void 0:o.entityDisplayName)||"Group-".concat(i);t.push({id:a,content:s,name:s,uuid:null==o?void 0:o.uuid,categoryLevel:1}),e.anomalyIntervals.forEach((function(e){r++,n.push({id:"anomaly-".concat(r),content:"anomaly-".concat(r),start:e.startTime,end:e.endTime,group:a})}))})),{groups:t,items:n}}(i),t=e.items,n=e.groups,r={items:t,groups:n},o=n;if(l){var a=n.map((function(e){var t,n,r=(null===(t=I[e.id])||void 0===t?void 0:t.length)>0,i=null!==(n=T[e.id])&&void 0!==n&&n,o=r?i?"&#x2212;":"&#xff0b;":"",a=void 0!==(null==e?void 0:e.categoryCount)&&e.categoryCount>=0,s="",l=O(e.id);3===e.categoryLevel&&e.name===Ed&&(l=e.grandParent),1===e.categoryLevel?s="font-family: Inter;font-size: 13px; font-weight: 400 !important;":2===e.categoryLevel?s="font-family: Inter;font-size: 11.5px; font-weight: 600 !important;":3===e.categoryLevel&&(s="font-family: Inter;font-size: 11px; font-weight: 400 !important;");var u=0;2===e.categoryLevel?u=40:3===e.categoryLevel&&(u=44);var c="margin-left: ".concat(u,"px;"),d=r||3!==e.categoryLevel?"":"border-left: 2px solid #E9EEF2; height: 100%;",p="".concat(c).concat(d).concat("color: #0B1117 !important;").concat(s),h="",f="";if(l)switch(l){case exports.AnomalyCategory.DB:h="db-background",f="Database";break;case exports.AnomalyCategory.NODE:h="node-background",f="Node";break;case exports.AnomalyCategory.SQL:h="sql-background",f="SQL";break;case exports.AnomalyCategory.APP:h="app-background",f="Application";break;case exports.AnomalyCategory.INFRA:h="infra-background",f="Infrastructure"}var g="";1===e.categoryLevel?g="custom-group-row-1":2===e.categoryLevel?g="custom-group-row-2":3===e.categoryLevel&&(g="custom-group-row-3");var m=e.content.replace(/&nbsp;/g,"").length>w?"".concat(e.content.substring(0,w),"..."):e.content;return F(F({},e),{content:r?'<a title="'.concat(e.name,'">').concat(o,"&nbsp;&nbsp;&nbsp;").concat((null==e?void 0:e.name)&&e.name.length>w?1===e.categoryLevel?f:"".concat(e.name.substring(0,w),"..."):1===e.categoryLevel?f:e.name,"</a>").concat(1!==e.categoryLevel&&2!==e.categoryLevel||i?"":"<span>".concat(e.categoryCount,"</span>")):'<a title="'.concat(e.content,'">').concat(o).concat(m,"</a>").concat(a?"<span>".concat(3===e.categoryCount?"&#xff0b;":"").concat(e.categoryCount,"</span>"):""),className:[g,h].filter(Boolean).join(" "),style:p,visible:!e.parent||T[e.parent]})})),s=a.filter((function(e){return e.visible}));Object.entries(I).forEach((function(e){var t=e[0];e[1].forEach((function(e){var n=a.find((function(t){return t.id===e}));n&&(n.visible=T[t])}))}));var g=t.filter((function(e){var t,n=a.find((function(t){return t.id===e.group}));if(n&&n.visible){var r=(null===(t=I[n.id])||void 0===t?void 0:t.length)>0,i=T[n.id];return!r||!i}return!1}));r={items:S=g.map((function(e){var t=a.find((function(t){return t.id===e.group})),n=t?O(t.id):null,r="#CCCCCC";if(n)switch(n){case exports.AnomalyCategory.DB:r=ep[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=ep[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=ep[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=ep[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=ep[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px;")})})),groups:s}}else{var v="custom-group-row",_=n.map((function(e){return F(F({},e),{content:m?'<a title="'.concat(e.content,'"> ').concat(e.content.length>w?"".concat(e.content.substring(0,w),"..."):e.content,"</a>"):"",style:"font-family: Inter; margin-left: 12px; font-size: 13px; font-weight: 400; border-bottom: 1px solid #D7DEE4",className:[v].filter(Boolean).join(" ")})})),S=t.map((function(e){var t,n,r="#CCCCCC",o=null===(n=null===(t=null==i?void 0:i[0])||void 0===t?void 0:t.lastInstance)||void 0===n?void 0:n.category;if(o)switch(o){case exports.AnomalyCategory.DB:r=ep[exports.AnomalyCategory.DB];break;case exports.AnomalyCategory.NODE:r=ep[exports.AnomalyCategory.NODE];break;case exports.AnomalyCategory.SQL:r=ep[exports.AnomalyCategory.SQL];break;case exports.AnomalyCategory.APP:r=ep[exports.AnomalyCategory.APP];break;case exports.AnomalyCategory.INFRA:r=ep[exports.AnomalyCategory.INFRA]}return F(F({},e),{style:"background-color: ".concat(r,"; height: 8px")})}));r={items:S,groups:_}}if(D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current.setOptions(M),D.current.setItems(r.items),D.current.setGroups(r.groups),l&&!y&&N()}else{var M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,r.items,r.groups,M)}D.current.on("changed",(function(){if(b){document.querySelectorAll(".vis-label.custom-group-row .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")}))}else{document.querySelectorAll(".vis-label.custom-group-row-1 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-1")})),document.querySelectorAll(".vis-label.custom-group-row-2 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-2")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner span").forEach((function(e){return e.classList.add("category-badge-3")})),document.querySelectorAll(".vis-label.custom-group-row-3 .vis-inner a").forEach((function(e){return e.classList.add("category-deeplink")})),document.querySelectorAll(".vis-label.db-background .vis-inner span").forEach((function(e){return e.classList.add("db-inner-background")})),document.querySelectorAll(".vis-label.node-background .vis-inner span").forEach((function(e){return e.classList.add("node-inner-background")})),document.querySelectorAll(".vis-label.sql-background .vis-inner span").forEach((function(e){return e.classList.add("sql-inner-background")})),document.querySelectorAll(".vis-label.app-background .vis-inner span").forEach((function(e){return e.classList.add("app-inner-background")})),document.querySelectorAll(".vis-label.infra-background .vis-inner span").forEach((function(e){return e.classList.add("infra-inner-background")})),l&&!y&&N();var e=document.querySelector(".vis-panel.vis-center");if(e){var t=p===Qd?"my-custom-center-panel-rca":"my-custom-center-panel";e.classList.add(t)}var n=document.querySelector(".vis-labelset");if(n){t=p===Qd?"my-custom-labelset-rca":"my-custom-labelset";n.classList.add(t)}}})),null==D||D.current.on("click",(function(e){var t=window.scrollY;setTimeout((function(){return window.scrollTo(0,t)}),0);var n,r,i,a=e.group,s="",l=null;a&&(l=o.find((function(e){return e.id===a})))&&"string"==typeof l.content&&(s=l.id),(null==l?void 0:l.uuid)&&(f===exports.AppName.YBM?(n=l.uuid,r=new URLSearchParams(window.location.search),(i={}).duration=r.get("duration"),i.startTime=r.get("startTime"),i.endTime=r.get("endTime"),null==c||c(n,i)):f!==exports.AppName.WEB&&f!==exports.AppName.YBA||function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search),r=n.toString();f===exports.AppName.YBA&&n.set("anomalyUuid",e);var i="".concat(t,"/").concat(e).concat(r?"?".concat(r):"");window.open(i,"_blank")}(l.uuid)),(null==l?void 0:l.name)===Ed&&(null==u||u(l.parent)),s&&function(e){C((function(t){var n=F({},t),r=!n[e];if(n[e]=r,!r){var i=function(e){Object.keys(n).forEach((function(t){var r;(null===(r=I[e])||void 0===r?void 0:r.includes(t))&&(n[t]=!1,i(t))}))};i(e)}return n}))}(s)}))}else if(ic(i)&&A.current&&!D.current){M={stack:!1,showCurrentTime:!1,min:d,max:h,start:d,end:h,margin:{item:{vertical:10}},zoomable:!1,showGrid:!1};D.current=new x.Timeline(A.current,[],[],M),D.current.setOptions(M),D.current.setItems([]),D.current.setGroups([])}return function(){D.current&&(D.current.destroy(),D.current=null)}}),[T,i]),e.jsxs(r.Box,F({id:p},{children:[e.jsx("div",{ref:A,style:{backgroundColor:"#FFFFFF"}},p),e.jsx("style",{children:"\n .vis-foreground .vis-group {\n border-bottom: none;\n }\n .vis-foreground .vis-group.custom-group-row-1 {\n top: 8px;\n }\n .vis-foreground .vis-group.parent-category {\n border-top: 1px solid #E0E0E0 !important; /* Or whatever you want */\n }\n .vis-labelset .vis-label {\n border-right: 0px solid #ccc !important;\n border-bottom: none;\n border-top: none;\n }\n .vis-timeline {\n background-color: #FFFFFF !important;\n border: 0px solid #ccc !important;\n visibility: visible !important;\n }\n .vis-panel.vis-top {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-bottom {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-panel.vis-left {\n border-left-style: none !important;\n border-right-style: none !important;\n border: 0px solid #ccc !important;\n }\n .vis-inner a {\n cursor: pointer;\n letter-spacing: 0.3px;\n text-decoration: none !important;\n outline: none !important;\n color: unset !important;\n &:focus {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n &:hover {\n box-shadow: inset 0px 0px 4px rgb(247, 249, 251, 0.8) !important;\n }\n }\n .vis-labelset .vis-label .vis-inner {\n padding: 0px;\n }\n .vis-inner span {\n padding: 2px 6px 2px 6px;\n height: 20px;\n width: fit-content;\n font-size: 11.5px;\n line-height: 16px;\n font-family: Inter;\n font-weight: 500;\n border-radius: 4px;\n }\n .vis-item.vis-range .vis-item-content {\n display: none;\n }\n .vis-item.vis-range {\n top: 10px !important;\n border-style: unset;\n border-radius: 8px;\n }\n .vis-labelset.my-custom-labelset-rca {\n width: 0px;\n }\n .vis-labelset {\n width: 250px;\n }\n .vis-inner {\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n }\n .vis-time-axis .vis-grid.vis-vertical {\n border-left: 1px dashed !important;\n color: #D7DEE4;\n }\n .vis-panel.vis-center {\n border-left-style: dashed !important;\n border-right-style: dashed !important;\n border-top-color: #D7DEE4;\n top: 1px !important;\n margin-left: 8px;\n left: 254px !important;\n }\n .vis-panel.vis-center.my-custom-center-panel-rca {\n left: 0px !important;\n }\n .vis-time-axis .vis-grid.vis-major {\n border-color: #e5e5e5 !important;\n }\n .custom-group-separator-left {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n margin-top: 2px;\n }\n .custom-group-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n position: absolute;\n width: 100%;\n }\n .custom-group-separator-bottom {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .custom-group-separator-top {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n content: '';\n }\n .item-separator {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n margin-top: 2px;\n }\n .item-separator-right {\n height: 1px;\n background-color: #D7DEE4;\n margin: 0 0 0 0;\n display: block;\n width: 100%;\n }\n .vis-label.custom-group-row-1 .vis-inner {\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .vis-label.custom-group-row-2 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row-3 .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-label.custom-group-row .vis-inner {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n .vis-foreground .vis-group.custom-group-row {\n border-bottom: 1px solid #D7DEE4;\n bottom: 3px;\n }\n .vis-label.custom-group-row .vis-inner .category-deeplink {\n text-decoration: underline !important;\n }\n .vis-label.custom-group-row-2 .vis-inner .category-badge-2 {\n margin-right: 40px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-badge-3 {\n margin-right: 44px;\n }\n .vis-label.custom-group-row-3 .vis-inner .category-deeplink {\n margin-left: 24px;\n text-decoration: underline !important;\n }\n .vis-label.db-background .vis-inner .db-inner-background {\n background-color: #E8E9FE !important;\n color: #30307F !important;\n }\n .vis-label.node-background .vis-inner .node-inner-background {\n background-color: #FFEEC8 !important;\n color: #9D6C00 !important;\n }\n .vis-label.sql-background .vis-inner .sql-inner-background {\n background-color: rgba(187, 66, 188, 0.15) !important;\n color: #7D2777 !important;\n }\n .vis-label.app-background .vis-inner .app-inner-background {\n background-color: #D7EFF4 !important;\n color: #2B59C3 !important;\n }\n .vis-label.infra-background .vis-inner .infra-inner-background {\n background-color: #c1ccec !important;\n color: #507ce1 !important;\n }\n .vis-time-axis .vis-text {\n font-family: Inter;\n font-size: 11px;\n font-weight: 400;\n }\n "})]}),p)},AG="data:image/svg+xml,%3csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath opacity='0.5' fill-rule='evenodd' clip-rule='evenodd' d='M1.16699 6.99984C1.16699 3.77818 3.77866 1.1665 7.00033 1.1665C8.54742 1.1665 10.0312 1.78109 11.1251 2.87505C12.2191 3.96901 12.8337 5.45274 12.8337 6.99984C12.8337 10.2215 10.222 12.8332 7.00033 12.8332C3.77866 12.8332 1.16699 10.2215 1.16699 6.99984ZM6.41699 4.6665C6.41699 4.34434 6.67816 4.08317 7.00033 4.08317C7.32249 4.08317 7.58366 4.34434 7.58366 4.6665C7.58366 4.98867 7.32249 5.24984 7.00033 5.24984C6.67816 5.24984 6.41699 4.98867 6.41699 4.6665ZM6.41699 6.4165C6.41699 6.09434 6.67816 5.83317 7.00033 5.83317C7.32249 5.83317 7.58366 6.09434 7.58366 6.4165V9.33317C7.58366 9.65534 7.32249 9.9165 7.00033 9.9165C6.67816 9.9165 6.41699 9.65534 6.41699 9.33317V6.4165Z' fill='%2367666C'/%3e%3c/svg%3e",DG=function(i){var o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,T,C,M,I,E,A,D,k,O,N,R,P,L,B,j,z,U,H,V,W=i.metricMeasure,G=i.appName,q=i.timezone,Q=i.universeQueryData,Z=i.universeData,X=i.filterDuration,$=i.amomalyGraphRequestParams,K=i.formattedAnomalyRca,J=i.anomalyData,ee=i.gantChartData,te=i.dateTimeRange,ne=i.urlParams,re=i.apiUrl,ie=i.getClusterDetails,oe=i.onSelectedTimeWindow,ae=i.onSelectedIssue,se=rp(),le=t.useState(!1),ue=le[0],ce=le[1],de=t.useState(0),pe=de[0],he=de[1],fe=t.useState(J),ge=fe[0],me=fe[1],ve=t.useState(null),ye=ve[0],xe=ve[1],_e=t.useState($),be=_e[0],we=_e[1],Se=ie(),Te=Se.universeUuid,Ce=Se.cluster,Me=Se.region,Ie=Se.zone,Ee=Se.node,Ae=Se.numNodes,De=Se.outlierType,ke=OV(W);OV(te),OV(X);var Oe=function(){ce(!ue)},Ne=function(e,t,n){var r,i,o=wd.WAIT_EVENT_COMPONENT;if("Class"===e?o=wd.WAIT_EVENT_CLASS:"Type"===e?o=wd.WAIT_EVENT_TYPE:"Event"===e?o=wd.WAIT_EVENT:"Query"===e?o=wd.QUERY:"Client IP"===e&&(o=wd.CLIENT_NODE_IP),(null===(r=null==J?void 0:J.lastInstance)||void 0===r?void 0:r.category)&&(null===(i=null==J?void 0:J.lastInstance)||void 0===i?void 0:i.category)!==exports.AnomalyCategory.DB){var a=JSON.parse(JSON.stringify(be)),s=null==a?void 0:a.find((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)}));s&&(s.groupBy=[o]),a.map((function(e,n){return n>0&&e.name===(null==t?void 0:t.name)?s:e})),we(a),Re.mutate(a)}};t.useEffect((function(){me(J)}),[J]),t.useEffect((function(){var e;ke&&ke!==W&&xe(null);var t=JSON.parse(JSON.stringify(be)),n=ie(),r=Rp(!1,!1,0,n,t,F(F({},ne),{type:null!==(e=ne.type)&&void 0!==e?e:null})),i=null!=r?r:be;we(i),Re.mutate(i)}),[W,te,Me,Ce,Ie,Ee,De,Ae]);var Re=n.useMutation({mutationKey:["fetchAnomalyGraphs"],mutationFn:function(e){return fG.fetchGraphs(Te,e,re)},onSuccess:function(e){xe(e)},onError:function(e){console.error("Failed to fetch RCA graphs",e)}}),Pe=null===(s=null===(a=null===(o=null==Re?void 0:Re.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,Le=function(t,n,i,o,a){return e.jsx(r.Box,F({mt:3,mr:8},{children:e.jsx(LV,{metricData:t,metricKey:t.name,graphTitle:a,containerWidth:null,dateTimeRange:te,metricMeasure:W,operations:n,groupByOperations:i,appName:G,graphType:o,timezone:q,queryData:Q,onSelectAshLabel:Ne,onSelectedTimeWindow:oe},"".concat(W,"-").concat(t.name))}))},Be=null==K?void 0:K.filter((function(e){var t;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.length)>0})),je=null===(l=null==J?void 0:J.lastInstance)||void 0===l?void 0:l.entityDisplayName,Fe=((null===(u=null==J?void 0:J.lastInstance)||void 0===u?void 0:u.category)===exports.AnomalyCategory.NODE||(null===(c=null==J?void 0:J.lastInstance)||void 0===c?void 0:c.category)===exports.AnomalyCategory.APP)&&(null===(f=null===(h=null===(p=null===(d=null==Z?void 0:Z.universeDetails)||void 0===d?void 0:d.nodeDetailsSet)||void 0===p?void 0:p.find((function(e){return e.nodeName===je})))||void 0===h?void 0:h.cloudInfo)||void 0===f?void 0:f.region),ze=((null===(g=null==J?void 0:J.lastInstance)||void 0===g?void 0:g.category)===exports.AnomalyCategory.NODE||(null===(m=null==J?void 0:J.lastInstance)||void 0===m?void 0:m.category)===exports.AnomalyCategory.APP)&&(null===(_=null===(x=null===(y=null===(v=null==Z?void 0:Z.universeDetails)||void 0===v?void 0:v.nodeDetailsSet)||void 0===y?void 0:y.find((function(e){return e.nodeName===je})))||void 0===x?void 0:x.cloudInfo)||void 0===_?void 0:_.az);return t.useEffect((function(){return function(){hk("metrics-sync-group")}}),[]),t.useEffect((function(){Re.isSuccess&&ye&&ye.length>0&&pk("metrics-sync-group")}),[Re.isSuccess,ye]),e.jsx(r.Box,F({mt:4},{children:e.jsx(Nc,{bodyClassName:se.panelItemBody,body:e.jsxs(e.Fragment,{children:[Re.isLoading&&e.jsx(r.Box,F({mt:2,className:se.loadingBox},{children:e.jsx(mG,{className:Y(se.icon,se.inProgressIcon)})})),Re.isError&&e.jsxs(r.Box,F({mt:4},{children:[(G===exports.AppName.YBA||G===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(Pe)?Pe:tp.RCA_GRAPHS_FETCH_ERROR}),G===exports.AppName.YBM&&e.jsx(za,{text:sc(Pe)?Pe:tp.RCA_GRAPHS_FETCH_ERROR})]})),Re.isSuccess&&e.jsxs(r.Box,{children:[oc(ye)&&oc(null===(b=null==J?void 0:J.lastInstance)||void 0===b?void 0:b.mainGraphs)&&(null===(w=null==J?void 0:J.lastInstance)||void 0===w?void 0:w.mainGraphs.map((function(t,n){var i,o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_,b,w,S,T,C,M,I,E,A,D,k,O,N,R,P,L,B,j,z,U,H,V,G=null==ye?void 0:ye.find((function(e){return e.name===t.name})),q="HOT_TABLET"===(null===(i=null==J?void 0:J.lastInstance)||void 0===i?void 0:i.type)||"LARGE_TABLET"===(null===(o=null==J?void 0:J.lastInstance)||void 0===o?void 0:o.type),Q=t.groupByControl,Z=W===exports.MetricMeasure.OVERALL?{uniqueOperations:[],groupByOperations:[]}:Op(W,G,exports.GraphType.MAIN_RCA,Q,$);return e.jsxs(r.Box,F({className:se.mainGraphBox},{children:[e.jsxs(r.Box,F({className:se.mainGraphMetadataBox},{children:[e.jsxs(r.Box,F({className:se.anomalyMetadataOneBox},{children:[e.jsx("span",F({className:se.headerTitle},{children:Fd})),e.jsx("span",F({className:se.metadataDetails},{children:null===(a=null==J?void 0:J.lastInstance)||void 0===a?void 0:a.title})),e.jsx("span",F({className:Y(se.metadataSummary,(null===(s=null==J?void 0:J.lastInstance)||void 0===s?void 0:s.category)===exports.AnomalyCategory.SQL&&se.restrictLines)},{children:null===(l=null==J?void 0:J.lastInstance)||void 0===l?void 0:l.summary}))]})),e.jsxs(r.Box,F({className:se.anomalyMetadataTwoBox},{children:[e.jsxs("span",F({className:se.headerTitle,onClick:Oe},{children:[null===(c=Rd[null===(u=null==J?void 0:J.lastInstance)||void 0===u?void 0:u.type])||void 0===c?void 0:c.title,ac(null===(p=Rd[null===(d=null==J?void 0:J.lastInstance)||void 0===d?void 0:d.type])||void 0===p?void 0:p.data)&&e.jsx("img",{style:{marginLeft:"8px"},src:ue?_G:xG})]})),e.jsxs("span",F({className:se.metadataDetails},{children:[(null===(f=null===(h=null==J?void 0:J.lastInstance)||void 0===h?void 0:h.entityDisplayName)||void 0===f?void 0:f.length)>30?"".concat(null==je?void 0:je.substring(0,30),"..."):null===(g=null==J?void 0:J.lastInstance)||void 0===g?void 0:g.entityDisplayName,(null===(v=null===(m=null==J?void 0:J.lastInstance)||void 0===m?void 0:m.entityDisplayName)||void 0===v?void 0:v.length)>30&&e.jsx(r.Tooltip,F({title:je,className:je&&(null==je?void 0:je.length)>100?Y(se.tooltip):void 0,style:{marginLeft:"8px"},arrow:!0,placement:"top",interactive:!0},{children:e.jsx("img",{src:AG,alt:"info"})}))]})),ue&&ac(Rd[null===(y=null==J?void 0:J.lastInstance)||void 0===y?void 0:y.type].data)&&e.jsxs(e.Fragment,{children:[e.jsxs(r.Box,F({display:"flex",flexDirection:"row",alignItems:"center"},{children:[e.jsx("img",{src:yG}),e.jsxs("span",F({className:se.metadataName,style:{marginLeft:"8px"}},{children:[(null===(x=null==J?void 0:J.lastInstance)||void 0===x?void 0:x.category)===exports.AnomalyCategory.DB&&(null===(S=null===(w=null===(b=null===(_=null==J?void 0:J.lastInstance)||void 0===_?void 0:_.mainGraphs)||void 0===b?void 0:b[0].filters)||void 0===w?void 0:w.dbName)||void 0===S?void 0:S[0]),((null===(T=null==J?void 0:J.lastInstance)||void 0===T?void 0:T.category)===exports.AnomalyCategory.NODE||(null===(C=null==J?void 0:J.lastInstance)||void 0===C?void 0:C.category)===exports.AnomalyCategory.APP)&&Fe]})),e.jsx(r.Box,F({ml:1,className:se.tag},{children:e.jsxs("span",F({className:se.tagName},{children:[(null===(M=null==J?void 0:J.lastInstance)||void 0===M?void 0:M.category)===exports.AnomalyCategory.DB&&Ld,((null===(I=null==J?void 0:J.lastInstance)||void 0===I?void 0:I.category)===exports.AnomalyCategory.NODE||(null===(E=null==J?void 0:J.lastInstance)||void 0===E?void 0:E.category)===exports.AnomalyCategory.APP)&&zd]}))}))]})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row",mt:1,ml:2,alignItems:"center"},{children:[e.jsx("img",{src:yG}),e.jsxs("span",F({className:se.metadataName,style:{marginLeft:"8px"}},{children:[(null===(A=null==J?void 0:J.lastInstance)||void 0===A?void 0:A.category)===exports.AnomalyCategory.DB&&q?null===(N=null===(O=null===(k=null===(D=null==J?void 0:J.lastInstance)||void 0===D?void 0:D.mainGraphs)||void 0===k?void 0:k[0].filters)||void 0===O?void 0:O.tabletId)||void 0===N?void 0:N[0]:null===(B=null===(L=null===(P=null===(R=null==J?void 0:J.lastInstance)||void 0===R?void 0:R.mainGraphs)||void 0===P?void 0:P[0].filters)||void 0===L?void 0:L.tableName)||void 0===B?void 0:B[0],((null===(j=null==J?void 0:J.lastInstance)||void 0===j?void 0:j.category)===exports.AnomalyCategory.NODE||(null===(z=null==J?void 0:J.lastInstance)||void 0===z?void 0:z.category)===exports.AnomalyCategory.APP)&&ze]})),e.jsx(r.Box,F({ml:1,className:se.tag},{children:e.jsxs("span",F({className:se.tagName},{children:[(null===(U=null==J?void 0:J.lastInstance)||void 0===U?void 0:U.category)===exports.AnomalyCategory.DB&&(q?jd:Bd),((null===(H=null==J?void 0:J.lastInstance)||void 0===H?void 0:H.category)===exports.AnomalyCategory.NODE||(null===(V=null==J?void 0:J.lastInstance)||void 0===V?void 0:V.category)===exports.AnomalyCategory.APP)&&Ud]}))}))]}))]})]}))]})),e.jsx(r.Box,F({mt:1,className:se.graphBox},{children:Le(G,Z.uniqueOperations,Z.groupByOperations,exports.GraphType.MAIN_RCA)}))]}))}))),e.jsxs(r.Box,F({mt:2,mb:1},{children:[ee.isLoading&&e.jsx(r.Box,F({mt:2,className:se.loadingBox},{children:e.jsx(mG,{className:Y(se.icon,se.inProgressIcon)})})),ee.isError&&404!==(null===(T=null===(S=null==ee?void 0:ee.error)||void 0===S?void 0:S.response)||void 0===T?void 0:T.status)&&e.jsxs(r.Box,F({mt:2},{children:[(G===exports.AppName.WEB||G===exports.AppName.YBA)&&e.jsx(eo,{customErrorMessage:sc(null===(I=null===(M=null===(C=null==ee?void 0:ee.error)||void 0===C?void 0:C.response)||void 0===M?void 0:M.data)||void 0===I?void 0:I.error)?null===(D=null===(A=null===(E=null==ee?void 0:ee.error)||void 0===E?void 0:E.response)||void 0===A?void 0:A.data)||void 0===D?void 0:D.error:tp.GANTCHART_FETCH_ERROR}),G===exports.AppName.YBM&&e.jsx(za,{text:sc(null===(N=null===(O=null===(k=null==ee?void 0:ee.error)||void 0===k?void 0:k.response)||void 0===O?void 0:O.data)||void 0===N?void 0:N.error)?null===(L=null===(P=null===(R=null==ee?void 0:ee.error)||void 0===R?void 0:R.response)||void 0===P?void 0:P.data)||void 0===L?void 0:L.error:tp.GANTCHART_FETCH_ERROR})]})),(ee.isSuccess||ee.isError&&404===(null===(j=null===(B=null==ee?void 0:ee.error)||void 0===B?void 0:B.response)||void 0===j?void 0:j.status))&&(ac(ge)?e.jsx(r.Box,F({className:se.rcaGantChartBox},{children:e.jsx(EG,{sourceData:ee.isError&&404===(null===(U=null===(z=null==ee?void 0:ee.error)||void 0===z?void 0:z.response)||void 0===U?void 0:U.status)?[]:[ge],name:Qd,showMoreOptions:!1,expandAll:!0,startTime:null===(H=null==te?void 0:te.startDateTime)||void 0===H?void 0:H.toISOString(),endTime:null===(V=null==te?void 0:te.endDateTime)||void 0===V?void 0:V.toISOString(),onSelectedIssue:ae,appName:G,showMultiline:!1},Qd)})):e.jsxs(r.Box,F({mt:2},{children:[(G===exports.AppName.WEB||G===exports.AppName.YBA)&&e.jsx("span",{children:"Failed to fetch anomaly data, please try again."}),G===exports.AppName.YBM&&e.jsx(za,{text:"Failed to fetch anomaly data, please try again."})]})))]})),oc(ye)&&oc(Be)&&e.jsxs(r.Box,F({className:se.causesBox},{children:[e.jsx(r.Tabs,F({value:pe,onChange:function(e,t){var n=window.scrollY;he(t),setTimeout((function(){return window.scrollTo(0,n)}),0)},"aria-label":"anomaly causes tabs",indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto"},{children:null==Be?void 0:Be.map((function(t,n){return e.jsx(r.Tab,{component:"div",label:t.cause,classes:{root:Y(se.cuaseTabButton),wrapper:se.causeTabLabelWrapper}},n)}))})),null==Be?void 0:Be.map((function(t,n){var i,o;return e.jsx(r.Box,F({role:"tabpanel",hidden:pe!==n,id:"tabpanel-".concat(n),"aria-labelledby":"tab-".concat(n)},{children:pe===n&&e.jsxs(r.Box,F({mt:2,display:"flex",flexDirection:"column"},{children:[e.jsx("span",F({className:se.causeText},{children:t.cause})),e.jsxs(r.Box,{children:[e.jsx("img",{src:yG,alt:"path"}),e.jsx("span",F({className:se.descriptionText},{children:t.description}))]}),e.jsx(r.Box,F({mt:2,className:(null===(i=null==t?void 0:t.name)||void 0===i?void 0:i.length)>1?Y(se.gridBox):""},{children:null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.map((function(n,i){var o,a,s,l=null==ye?void 0:ye.find((function(e,r){return r>0&&(null==e?void 0:e.name)===n&&t.index.includes(r)})),u=1===(null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.length),c=null===(a=t.groupByControl)||void 0===a?void 0:a[0];if(sc(null!==(s=null==l?void 0:l.errorMessage)&&void 0!==s?s:""))return e.jsx(r.Box,{});var d=Op(W,l,exports.GraphType.MULTI_SUPPORTING,c,$);return e.jsx(r.Box,F({style:{border:"1px solid #E9EEF2",borderRadius:"8px",marginRight:u?"0px":"16px"}},{children:Le(l,d.uniqueOperations,d.groupByOperations,u?exports.GraphType.SINGLE_SUPPORTING:exports.GraphType.MULTI_SUPPORTING,t.title)}))}))}))]}))}),n)}))]}))]})]})})}))},kG=S.default.memo((function(i){var o,a=i.universeUuid,s=i.universeData,l=i.anomalyData,u=i.amomalyGraphRequestParams,c=i.appName,d=i.timezone,p=i.formattedAnomalyRca,h=i.apiUrl,f=i.shouldAnalyzeTopK,g=i.universeQueryData,m=i.universeQueryStatsData,v=i.isHistoricalQueryView,y=i.troubleshootUuid,x=i.queryIdParam,_=i.onSelectedIssue,b=i.onSelectedQuery,w=function(e){var t,n,r,i,o,a,s=exports.MetricMeasure.OVERALL;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Wc.NONE&&(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitType)===Wc.NONE&&(s=exports.MetricMeasure.OVERALL),(null===(r=null==e?void 0:e.defaultSettings)||void 0===r?void 0:r.splitMode)!==Vc.TOP&&(null===(i=null==e?void 0:e.defaultSettings)||void 0===i?void 0:i.splitMode)!==Vc.BOTTOM||(s=exports.MetricMeasure.OUTLIER,(null===(o=null==e?void 0:e.defaultSettings)||void 0===o?void 0:o.splitType)===Wc.TABLE?s=exports.MetricMeasure.OUTLIER_TABLES:(null===(a=null==e?void 0:e.defaultSettings)||void 0===a?void 0:a.splitType)===Wc.NAMESPACE&&(s=exports.MetricMeasure.OUTLIER_DB)),s}(l),S=function(e){var t,n,r=Vc.TOP;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitMode)===Vc.TOP?r=Vc.TOP:(null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitMode)===Vc.BOTTOM&&(r=Vc.BOTTOM),r}(l),T=function(e){var t,n,r=3;return(null===(t=null==e?void 0:e.defaultSettings)||void 0===t?void 0:t.splitCount)>0&&(r=null===(n=null==e?void 0:e.defaultSettings)||void 0===n?void 0:n.splitCount),r}(l),C=new URLSearchParams(window.location.search),M={startTime:C.get("startTime"),endTime:C.get("endTime"),duration:C.get("duration"),dbId:C.get("dbId"),queryId:null!=x?x:void 0,userId:C.get("userId"),type:C.get("type"),universeId:a},I=null==M?void 0:M.endTime,E=I?new Date(I):new Date,A=new Date(E);(null==M?void 0:M.startTime)?A=new Date(null==M?void 0:M.startTime):A.setDate(A.getDate()-1);var D=t.useState(nd),k=D[0],O=D[1],N=t.useState(id),R=N[0],P=N[1],L=t.useState(!0),B=L[0],j=L[1],z=t.useState(rd),U=z[0],H=z[1],V=t.useState(rd),W=V[0],Y=V[1],G=t.useState(rd),q=G[0],Q=G[1],Z=t.useState(rd),X=Z[0],$=Z[1],K=t.useState(w),J=K[0],ee=K[1],te=t.useState(f?Vc.TOP:S),ne=te[0],re=te[1],ie=t.useState(0),oe=ie[0],ae=ie[1],se=t.useState(!1),le=se[0],ue=se[1],ce=t.useState(null!==(o=null==M?void 0:M.duration)&&void 0!==o?o:Od[0].value),de=ce[0],pe=ce[1],he=t.useState(T),fe=he[0],ge=he[1],me=function(){var e=E,t=new Date;return de===kd.SEVEN_DAYS?t.setDate(t.getDate()-7):de===kd.TWO_DAYS?t.setDate(t.getDate()-2):de===kd.ONE_DAY?t.setDate(t.getDate()-1):de===kd.SIX_HOURS?t.setHours(t.getHours()-6):de===kd.ONE_HOUR&&t.setHours(t.getHours()-1),{formattedStartDate:t,formattedEndDate:e}},ve=t.useState((function(){return function(){if(de&&de!==kd.CUSTOM){var e=me();return{startDateTime:e.formattedStartDate,endDateTime:e.formattedEndDate}}return{startDateTime:A,endDateTime:E}}()})),ye=ve[0],xe=ve[1],_e=t.useState(null),be=_e[0],we=_e[1],Se=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsById,a,null==l?void 0:l.groupId,ye.startDateTime,ye.endDateTime],(function(){return l&&(null==l?void 0:l.groupId)?fG.fetchAnomalyGroupById(a,l.groupId,ye.startDateTime.toISOString(),ye.endDateTime.toISOString(),h):Promise.reject(new Error("Anomaly data or group ID is missing"))}),{onSuccess:function(e){we(e)},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!v&&sc(y)}),Te=function(){var e,t,n=null===(e=ye.startDateTime)||void 0===e?void 0:e.toISOString(),r=null===(t=ye.endDateTime)||void 0===t?void 0:t.toISOString();return{universeUuid:a,cluster:U,region:W,zone:q,node:X,metricMeasure:J,numNodes:fe,outlierType:ne,formattedStartDate:n,formattedEndDate:r}},Ce=function(){if(de!==kd.CUSTOM){var e=me(),t=e.formattedStartDate,n=e.formattedEndDate;xe({startDateTime:t,endDateTime:n})}};t.useEffect((function(){var e=sessionStorage.getItem(Xd),t=sessionStorage.getItem($d),n=sessionStorage.getItem(Kd);if(!e){var r={};qd.forEach((function(e){e.metrics.forEach((function(e){r[e]=!0}))})),sessionStorage.setItem(Xd,JSON.stringify(r))}if(!t){var i={};Yd.forEach((function(e){e.metrics.forEach((function(e){i[e]=!0}))})),sessionStorage.setItem($d,JSON.stringify(i))}if(!n){var o={};Gd.forEach((function(e){e.metrics.forEach((function(e){o[e]=!0}))})),sessionStorage.setItem(Kd,JSON.stringify(o))}}),[]),t.useEffect((function(){Ce()}),[de]);var Me=function(e){xe((function(t){return F(F({},t),{startDateTime:new Date(e.target.value)})}))},Ie=function(e){xe((function(t){return F(F({},t),{endDateTime:new Date(e.target.value)})}))},Ee=function(e,t){xe({startDateTime:new Date(e),endDateTime:new Date(t)})};t.useEffect((function(){(null==M?void 0:M.duration)&&sc(M.duration)&&Ce()}),[]);var Ae=function(e){ee(e)},De=function(e){pe(e)};return e.jsxs(r.Box,{children:[ac(l)?e.jsx(Hp,{appName:c,filterDuration:de,timezone:d,endDateTime:ye.endDateTime,startDateTime:ye.startDateTime,anomalyData:l,onSelectedIssue:_,onSelectedFilterDuration:De,onStartDateChange:Me,onEndDateChange:Ie,onSplitTypeSelected:Ae}):e.jsx(Up,{appName:c,universeData:s,clusterRegionItem:k,zoneNodeItem:R,isPrimaryCluster:B,cluster:U,region:W,metricMeasure:J,outlierType:ne,filterDuration:de,numNodes:fe,startDateTime:ye.startDateTime,endDateTime:ye.endDateTime,shouldAnalyzeTopK:f,openSelectionModal:function(){return ue(!0)},onZoneNodeSelected:function(e,t,n){n===id&&(P(id),Q(rd),$(rd)),(e||t)&&(P(n),e&&(Q(n),$("")),t&&(Q(""),$(n)))},onClusterRegionSelected:function(e,t,n,r){j(r),n===nd&&(O(nd),H(rd),Y(rd)),(e||t)&&(O(n),e&&(H(n),Y("")),t&&(Y(n),H("")))},onOutlierTypeSelected:function(e){re(e)},onSplitTypeSelected:Ae,onNumNodesChanged:function(e){ge(e>10?10:e)},onSelectedFilterDuration:De,onStartDateChange:Me,onEndDateChange:Ie,onRefresh:function(){xe((function(e){return F(F({},e),{endDateTime:new Date})}))},onSelectedQuery:b,timezone:d}),!f&&!v&&e.jsx(DG,{metricMeasure:J,appName:c,dateTimeRange:ye,timezone:d,universeQueryData:g,amomalyGraphRequestParams:u,formattedAnomalyRca:p,filterDuration:de,apiUrl:h,universeData:s,anomalyData:be,gantChartData:Se,onSelectedTimeWindow:Ee,onSelectedIssue:_,urlParams:M,getClusterDetails:Te}),v&&e.jsx(e.Fragment,{children:e.jsx(bG,{urlParams:M,getClusterDetails:Te,queryId:null==M?void 0:M.queryId,isHistoricalQueryView:v,metricMeasure:J,apiUrl:h,appName:c,timezone:d,dateTimeRange:ye,universeQueryStatsData:m,onSelectedTimeWindow:Ee})}),f&&e.jsx(e.Fragment,{children:e.jsx(IG,{apiUrl:h,isMetricsDrawerOpen:le,appName:c,timezone:d,metricMeasure:J,dateTimeRange:ye,urlParams:M,filterTrigger:oe,onSelectedTimeWindow:Ee,closeSelectionModal:function(){return ue(!1)},getClusterDetails:Te,handleFilterMetrics:function(){ae((function(e){return e+1}))}})})]})})),OG=function(i){var o=i.universeUuid,a=i.troubleshootUuid,s=i.universeData,l=i.appName,u=i.timezone,c=i.apiUrl,d=i.shouldAnalyzeTopK,p=void 0!==d&&d,h=i.onSelectedIssue,f=i.onSelectedQuery,g=rp(),m=t.useState(null),v=m[0],y=m[1],x=t.useState(null),_=x[0],b=x[1],w=t.useState(null),S=w[0],T=w[1],C=t.useState(null),M=C[0],I=C[1],E=t.useState(null),A=E[0],D=E[1],k=new URLSearchParams(window.location.search),O=window.location.pathname,N=null;if(O.includes("/queries/")){var R=O.split("/"),P=R.indexOf("queries");N=R[P+1]||null}l!==exports.AppName.YBM&&l!==exports.AppName.YBA||(N=k.get("queryId"));var L=k.get("dbId"),B=k.get("userId"),j=sc(N);t.useEffect((function(){localStorage.setItem("appName",l)}),[]);var z=n.useQuery([exports.QUERY_KEY.fetchAnomalies,o],(function(){return fG.fetchAnomaliesById(o,a,c)}),{onSuccess:function(e){y(e),b(function(e){var t,n=null==e?void 0:e.mainGraphs.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n})),r=null===(t=null==e?void 0:e.rcaGuidelines)||void 0===t?void 0:t.map((function(t){var n;return null===(n=t.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(t){var n;return null===(n=t.supportingGraphs)||void 0===n?void 0:n.map((function(t){var n={};return n.name=t.name,n.filters=t.filters,n.start=e.graphStartTime,n.end=e.graphEndTime,n.settings=e.defaultSettings,n.aggregatedLineSettings=t.aggregatedLineSettings,n.groupBy=t.groupBy,n}))}))})),i=null==r?void 0:r.flat(2),o=null==i?void 0:i.filter((function(e){return ac(e)}));return V(V([],n,!0),o,!0)}(e)),T(function(e){var t,n;if(wp=0,!e)return[];var r=null===(t=null==e?void 0:e.mainGraphs)||void 0===t?void 0:t.length,i=null===(n=null==e?void 0:e.rcaGuidelines)||void 0===n?void 0:n.map((function(e,t){var n,i={cause:"",name:[],groupByControl:[],description:"",index:[],rcaRecommendation:"",title:void 0};return i.name=[],i.groupByControl=[],i.cause=e.possibleCause,i.description=e.possibleCauseDescription,null===(n=e.troubleshootingRecommendations)||void 0===n?void 0:n.map((function(e){var t;return e.supportingGraphs?null===(t=e.supportingGraphs)||void 0===t?void 0:t.map((function(t){return i.name.push(t.name),i.rcaRecommendation=e.recommendation,1===r?i.index.push(Dp()):r>1&&i.index.push(Dp()+r-1),i.title=t.displayName,i.groupByControl.push(t.groupByControl),i})):i}))})),o=null==i?void 0:i.flat(2),a=new Set(o);return Array.from(a)}(e))},onError:function(e){console.error("Failed to fetch Anomalies",e)},enabled:!j&&sc(a)}),U=z.isLoading,H=z.isError,W=z.isIdle,G=n.useQuery([exports.QUERY_KEY.fetchQueries,o],(function(){return fG.fetchQueries(o,c,{dbId:L,userId:B,queryId:N})}),{onSuccess:function(e){I(e)},onError:function(e){I([]),console.error("Failed to fetch queries",e)},enabled:!p}),q=G.isLoading,Q=G.isError,Z=n.useQuery([exports.QUERY_KEY.fetchQueryStats,o],(function(){return fG.fetchQueryStats(o,{dbId:L,queryId:N},c)}),{onSuccess:function(e){D([e])},onError:function(e){D([]),console.error("Failed to fetch query stats",e)},enabled:j}),X=Z.isLoading,$=Z.isError;return U||X||q?e.jsx(r.Box,F({mt:2,className:g.loadingBox},{children:e.jsx(mG,{className:Y(g.icon,g.inProgressIcon)})})):H||$||Q||W&&void 0===v?e.jsxs(r.Box,F({mt:3},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:H?tp.ANOMALIES_FETCH_ERROR:tp.QUERY_STATS_FETCH_ERROR}),l===exports.AppName.YBM&&e.jsx(za,{text:H?tp.ANOMALIES_FETCH_ERROR:tp.QUERY_STATS_FETCH_ERROR})]})):e.jsx(r.Box,{children:p?e.jsx(e.Fragment,{children:e.jsx(kG,{apiUrl:c,anomalyData:v,universeData:s,universeUuid:o,appName:l,timezone:u,troubleshootUuid:null,isHistoricalQueryView:j,amomalyGraphRequestParams:_,formattedAnomalyRca:S,universeQueryData:null!=M?M:[],universeQueryStatsData:A,shouldAnalyzeTopK:p,queryIdParam:N,onSelectedIssue:h,onSelectedQuery:f})}):e.jsx(e.Fragment,{children:M&&e.jsx(kG,{apiUrl:c,troubleshootUuid:a,anomalyData:v,universeData:s,universeUuid:o,appName:l,timezone:u,isHistoricalQueryView:j,amomalyGraphRequestParams:_,formattedAnomalyRca:S,universeQueryData:M,universeQueryStatsData:A,shouldAnalyzeTopK:p,queryIdParam:N,onSelectedIssue:h,onSelectedQuery:f})})})};function NG(){return NG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NG.apply(this,arguments)}function RG(e){return"number"==typeof e&&!isNaN(e)}function PG(e){return"boolean"==typeof e}function LG(e){return"string"==typeof e}function BG(e){return"function"==typeof e}function jG(e){return LG(e)||BG(e)?e:null}function FG(e){return 0===e||e}var zG=!("undefined"==typeof window||!window.document||!window.document.createElement);function UG(e){return t.isValidElement(e)||LG(e)||BG(e)||RG(e)}var HG={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},VG={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function WG(e){var n=e.enter,r=e.exit,i=e.appendPosition,o=void 0!==i&&i,a=e.collapse,s=void 0===a||a,l=e.collapseDuration,u=void 0===l?300:l;return function(e){var i=e.children,a=e.position,l=e.preventExitTransition,c=e.done,d=e.nodeRef,p=e.isIn,h=o?n+"--"+a:n,f=o?r+"--"+a:r,g=t.useRef(),m=t.useRef(0);function v(){var e=d.current;e.removeEventListener("animationend",v),0===m.current&&(e.className=g.current)}function y(){var e=d.current;e.removeEventListener("animationend",y),s?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,c,u):c()}return t.useLayoutEffect((function(){!function(){var e=d.current;g.current=e.className,e.className+=" "+h,e.addEventListener("animationend",v)}()}),[]),t.useEffect((function(){p||(l?y():function(){m.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",y)}())}),[p]),S.default.createElement(S.default.Fragment,null,i)}}var YG={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function GG(e,n){void 0===n&&(n=!1);var r=t.useRef(e);return t.useEffect((function(){n&&(r.current=e)})),r.current}function qG(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case 1:return FG(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function QG(e){var n=t.useReducer((function(e){return e+1}),0)[1],r=t.useReducer(qG,[]),i=r[0],o=r[1],a=t.useRef(null),s=GG(0),l=GG([]),u=GG({}),c=GG({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:d,getToast:function(e){return u[e]||null}});function d(e){return-1!==i.indexOf(e)}function p(e){var t=e.containerId,n=c.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||c.containerId===t&&i)&&(s-=l.length,l=[])}function h(e){o({type:1,toastId:e})}function f(){var e=l.shift();m(e.toastContent,e.toastProps,e.staleId)}function g(e,r){var i=r.delay,o=r.staleId,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["delay","staleId"]);if(UG(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||c.props.enableMultiContainer&&t!==c.props.containerId||u[n]&&null==r)}(d)){var p=d.toastId,g=d.updateId,v=c.props,y=function(){return h(p)},x=null==d.updateId;x&&s++;var _,b,w={toastId:p,updateId:g,isIn:!1,key:d.key||c.toastKey++,type:d.type,closeToast:y,closeButton:d.closeButton,rtl:v.rtl,position:d.position||v.position,transition:d.transition||v.transition,className:jG(d.className||v.toastClassName),bodyClassName:jG(d.bodyClassName||v.bodyClassName),style:d.style||v.toastStyle,bodyStyle:d.bodyStyle||v.bodyStyle,onClick:d.onClick||v.onClick,pauseOnHover:PG(d.pauseOnHover)?d.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:PG(d.pauseOnFocusLoss)?d.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:PG(d.draggable)?d.draggable:v.draggable,draggablePercent:RG(d.draggablePercent)?d.draggablePercent:v.draggablePercent,draggableDirection:d.draggableDirection||v.draggableDirection,closeOnClick:PG(d.closeOnClick)?d.closeOnClick:v.closeOnClick,progressClassName:jG(d.progressClassName||v.progressClassName),progressStyle:d.progressStyle||v.progressStyle,autoClose:(_=d.autoClose,b=v.autoClose,!1===_||RG(_)&&_>0?_:b),hideProgressBar:PG(d.hideProgressBar)?d.hideProgressBar:v.hideProgressBar,progress:d.progress,role:LG(d.role)?d.role:v.role,deleteToast:function(){!function(e){delete u[e];var t=l.length;s=FG(e)?s-1:s-c.displayedToast,s<0&&(s=0);if(t>0){var r=FG(e)?1:c.props.limit;if(1===t||1===r)c.displayedToast++,f();else{var i=r>t?t:r;c.displayedToast=i;for(var o=0;o<i;o++)f()}}else n()}(p)}};BG(d.onOpen)&&(w.onOpen=d.onOpen),BG(d.onClose)&&(w.onClose=d.onClose),"y"===w.draggableDirection&&80===w.draggablePercent&&(w.draggablePercent*=1.5);var S=v.closeButton;!1===d.closeButton||UG(d.closeButton)?S=d.closeButton:!0===d.closeButton&&(S=!UG(v.closeButton)||v.closeButton),w.closeButton=S;var T=e;t.isValidElement(e)&&!LG(e.type)?T=t.cloneElement(e,{closeToast:y,toastProps:w}):BG(e)&&(T=e({closeToast:y,toastProps:w})),v.limit&&v.limit>0&&s>v.limit&&x?l.push({toastContent:T,toastProps:w,staleId:o}):RG(i)&&i>0?setTimeout((function(){m(T,w,o)}),i):m(T,w,o)}}function m(e,t,n){var r=t.toastId;n&&delete u[n],u[r]={content:e,props:t},o({type:0,toastId:r,staleId:n})}return t.useEffect((function(){return c.containerId=e.containerId,YG.cancelEmit(3).on(0,g).on(1,(function(e){return a.current&&h(e)})).on(5,p).emit(2,c),function(){return YG.emit(3,c)}}),[]),t.useEffect((function(){c.isToastActive=d,c.displayedToast=i.length,YG.emit(4,i.length,e.containerId)}),[i]),t.useEffect((function(){c.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(u).reverse():Object.keys(u),i=0;i<r.length;i++){var o=u[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:u,containerRef:a,isToastActive:d}}function ZG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function XG(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function $G(e){var n=t.useState(!0),r=n[0],i=n[1],o=t.useState(!1),a=o[0],s=o[1],l=t.useRef(null),u=GG({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),c=GG(e,!0),d=e.autoClose,p=e.pauseOnHover,h=e.closeToast,f=e.onClick,g=e.closeOnClick;function m(t){if(e.draggable){var n=l.current;u.canCloseOnClick=!0,u.canDrag=!0,u.boundingRect=n.getBoundingClientRect(),n.style.transition="",u.x=ZG(t.nativeEvent),u.y=XG(t.nativeEvent),"x"===e.draggableDirection?(u.start=u.x,u.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(u.start=u.y,u.removalDistance=n.offsetHeight*(e.draggablePercent/100))}}function v(){if(u.boundingRect){var t=u.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&u.x>=i&&u.x<=o&&u.y>=n&&u.y<=r?x():y()}}function y(){i(!0)}function x(){i(!1)}function _(t){if(u.canDrag){t.preventDefault();var n=l.current;r&&x(),u.x=ZG(t),u.y=XG(t),"x"===e.draggableDirection?u.delta=u.x-u.start:u.delta=u.y-u.start,u.start!==u.x&&(u.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+u.delta+"px)",n.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance))}}function b(){var t=l.current;if(u.canDrag){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}t.useEffect((function(){return BG(e.onOpen)&&e.onOpen(t.isValidElement(e.children)&&e.children.props),function(){BG(c.onClose)&&c.onClose(t.isValidElement(c.children)&&c.children.props)}}),[]),t.useEffect((function(){return e.draggable&&(document.addEventListener("mousemove",_),document.addEventListener("mouseup",b),document.addEventListener("touchmove",_),document.addEventListener("touchend",b)),function(){e.draggable&&(document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",b))}}),[e.draggable]),t.useEffect((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||x();window.addEventListener("focus",y),window.addEventListener("blur",x)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",x))}}),[e.pauseOnFocusLoss]);var w={onMouseDown:m,onTouchStart:m,onMouseUp:v,onTouchEnd:v};return d&&p&&(w.onMouseEnter=x,w.onMouseLeave=y),g&&(w.onClick=function(e){f&&f(e),u.canCloseOnClick&&h()}),{playToast:y,pauseToast:x,isRunning:r,preventExitTransition:a,toastRef:l,eventHandlers:w}}function KG(e){var n=e.closeToast,r=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return t.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),n(e)},"aria-label":o},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function JG(e){var n,r,i=e.delay,o=e.isRunning,a=e.closeToast,s=e.type,l=e.hide,u=e.className,c=e.style,d=e.controlledProgress,p=e.progress,h=e.rtl,f=e.isIn,g=NG({},c,{animationDuration:i+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+p+")");var m=Y("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,((n={})["Toastify__progress-bar--rtl"]=h,n)),v=BG(u)?u({rtl:h,type:s,defaultClassName:m}):Y(m,u),y=((r={})[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]=d&&p<1?null:function(){f&&a()},r);return t.createElement("div",Object.assign({role:"progressbar",className:v,style:g},y))}JG.defaultProps={type:VG.DEFAULT,hide:!1};var eq=function(e){var n,r=$G(e),i=r.isRunning,o=r.preventExitTransition,a=r.toastRef,s=r.eventHandlers,l=e.closeButton,u=e.children,c=e.autoClose,d=e.onClick,p=e.type,h=e.hideProgressBar,f=e.closeToast,g=e.transition,m=e.position,v=e.className,y=e.style,x=e.bodyClassName,_=e.bodyStyle,b=e.progressClassName,w=e.progressStyle,S=e.updateId,T=e.role,C=e.progress,M=e.rtl,I=e.toastId,E=e.deleteToast,A=e.isIn,D=Y("Toastify__toast","Toastify__toast--"+p,((n={})["Toastify__toast--rtl"]=M,n)),k=BG(v)?v({rtl:M,position:m,type:p,defaultClassName:D}):Y(D,v),O=!!C;return t.createElement(g,{isIn:A,done:E,position:m,preventExitTransition:o,nodeRef:a},t.createElement("div",Object.assign({id:I,onClick:d,className:k},s,{style:y,ref:a}),t.createElement("div",Object.assign({},A&&{role:T},{className:BG(x)?x({type:p}):Y("Toastify__toast-body",x),style:_}),u),function(e){if(e){var n={closeToast:f,type:p};return BG(e)?e(n):t.isValidElement(e)?t.cloneElement(e,n):void 0}}(l),(c||O)&&t.createElement(JG,Object.assign({},S&&!O?{key:"pb-"+S}:{},{rtl:M,delay:c,isRunning:i,isIn:A,closeToast:f,hide:h,type:p,style:w,className:b,controlledProgress:O,progress:C}))))},tq=function(e){var n=QG(e),r=n.getToastToRender,i=n.containerRef,o=n.isToastActive,a=e.className,s=e.style,l=e.rtl,u=e.containerId;function c(e){var t,n=Y("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return BG(a)?a({position:e,rtl:l,defaultClassName:n}):Y(n,jG(a))}return t.createElement("div",{ref:i,className:"Toastify",id:u},r((function(e,n){var r=0===n.length?NG({},s,{pointerEvents:"none"}):NG({},s);return t.createElement("div",{className:c(e),style:r,key:"container-"+e},n.map((function(e){var n=e.content,r=e.props;return t.createElement(eq,Object.assign({},r,{isIn:o(r.toastId),key:"toast-"+r.key,closeButton:!0===r.closeButton?KG:r.closeButton}),n)})))})))};tq.defaultProps={position:HG.TOP_RIGHT,transition:WG({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:KG,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert"};var nq,rq,iq,oq=new Map,aq=[],sq=!1;function lq(){return Math.random().toString(36).substr(2,9)}function uq(e){return e&&(LG(e.toastId)||RG(e.toastId))?e.toastId:lq()}function cq(e,n){return oq.size>0?YG.emit(0,e,n):(aq.push({content:e,options:n}),sq&&zG&&(sq=!1,rq=document.createElement("div"),document.body.appendChild(rq),y.render(t.createElement(tq,Object.assign({},iq)),rq))),n.toastId}function dq(e,t){return NG({},t,{type:t&&t.type||e,toastId:uq(t)})}var pq=function(e){return function(t,n){return cq(t,dq(e,n))}},hq=function(e,t){return cq(e,dq(VG.DEFAULT,t))};hq.success=pq(VG.SUCCESS),hq.info=pq(VG.INFO),hq.error=pq(VG.ERROR),hq.warning=pq(VG.WARNING),hq.dark=pq(VG.DARK),hq.warn=hq.warning,hq.dismiss=function(e){return YG.emit(1,e)},hq.clearWaitingQueue=function(e){return void 0===e&&(e={}),YG.emit(5,e)},hq.isActive=function(e){var t=!1;return oq.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},hq.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=oq.get(n||nq);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=NG({},r,t,{toastId:t.toastId||e,updateId:lq()});o.toastId!==e&&(o.staleId=e);var a=o.render||i;delete o.render,cq(a,o)}}),0)},hq.done=function(e){hq.update(e,{progress:1})},hq.onChange=function(e){return BG(e)&&YG.on(4,e),function(){BG(e)&&YG.off(4,e)}},hq.configure=function(e){void 0===e&&(e={}),sq=!0,iq=e},hq.POSITION=HG,hq.TYPE=VG,YG.on(2,(function(e){nq=e.containerId||e,oq.set(nq,e),aq.forEach((function(e){YG.emit(0,e.content,e.options)})),aq=[]})).on(3,(function(e){oq.delete(e.containerId||e),0===oq.size&&YG.off(0).off(1).off(5),zG&&rq&&document.body.removeChild(rq)}));var fq=r.makeStyles((function(e){return{itemsContainer:{padding:e.spacing(1,0),borderTop:"1px solid ".concat(e.palette.grey[200])},item:{paddingLeft:e.spacing(2)}}})),gq=function(n){var i,o=n.appName,a=n.columns,s=n.hiddenColumns,l=n.onColumnVisibilityChange,u=n.close,c=fq(),d=JSON.parse(null!==(i=sessionStorage.getItem("visibleQueryFields"))&&void 0!==i?i:"[]"),p=a.reduce((function(e,t){var n;return e[t.name]=d.length>0?d.includes(t.name):null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.display,e}),{}),h=Da({defaultValues:p}),f=h.control,g=h.handleSubmit,m=h.reset;t.useEffect((function(){m(p)}),[a,m]);var v=function(){u()};return e.jsx(Ic,F({open:!0,isSidePanel:!0,title:"Add and Remove Columns",onClose:v,onSubmit:g((function(e){var t=[];Object.keys(e).forEach((function(n){var r=e[n],i=n;l(i,r),r&&t.push(i)})),sessionStorage.setItem("visibleQueryFields",JSON.stringify(t)),v()})),enableBackdropDismiss:!0,titleSeparator:!0,dialogContentProps:{style:{padding:0}},submitLabel:"Apply",submitTestId:"btnApplyMetricsSelection",cancelLabel:"Cancel",cancelTestId:"btnCloseMetricsSelection"},{children:e.jsx(r.Box,F({paddingLeft:2,paddingRight:2,paddingBottom:2},{children:e.jsx(r.Box,F({className:c.itemsContainer},{children:a.map((function(t){return s.includes(t.name)?null:e.jsx(r.Box,F({className:c.item},{children:e.jsx(bp,{name:t.name,label:t.label,control:f,inputProps:{"data-testid":t.name},showCheckedIcon:o===exports.AppName.WEB})}),t.name)}))}))}))}))},mq=function(n){var r=n.data,i=n.maxEPS,o=n.groupByOperation,a=n.filteredLegends,s=t.useRef(null),l=t.useMemo((function(){var e=i<1?5:100,t=r.reduce((function(e,t){return e+t.eps}),0),n=Math.pow(t/i,.5)*e;return Math.max(n,10)+100}),[r,i]);return t.useEffect((function(){if(s.current){var e=dk(s.current),t=r.filter((function(e){var t=o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType;return!a.includes(t)}));console.warn("Filtered Data:",t);var n=t.map((function(e){return o===exports.WaitEventClassification.WAIT_EVENT?e.waitEvent:e.waitEventType})).map((function(e,n){var r;return{name:e,type:"bar",stack:"total",label:{show:!1},data:[t[n].eps],itemStyle:{color:null!==(r=ep[e])&&void 0!==r?r:Jd[n]}}})),l={animation:!1,grid:{left:50,right:50,top:20,bottom:40,containLabel:!1},tooltip:{trigger:"item",extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px;",formatter:function(e){return"".concat(e.seriesName,": ").concat(e.value)},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400}},xAxis:{type:"value",show:!1,min:0,max:i},yAxis:{type:"category",data:[""],show:!1},series:n};e.setOption(l);var u=new ResizeObserver((function(){e.resize()}));return u.observe(s.current),function(){u.disconnect(),e.dispose()}}}),[r,o,l,i,a]),e.jsx("div",{className:"query-events-chart-container",ref:s,style:{height:"".concat(80,"px"),width:"".concat(l,"px"),minWidth:"".concat(l,"px"),maxWidth:"".concat(l,"px"),display:"flex"}})},vq="databaseId",yq="eps",xq="events",_q="firstActive",bq="lastActive",wq="latencyAvg",Sq="latencyP90",Tq="latencyP99",Cq="namespaceName",Mq="query",Iq="queryid",Eq="queryType",Aq="rowsAvg",Dq="rps",kq="totalTime",Oq="universeId",Nq={SHOW_YSQL:"SQL Only",SHOW_YCQL:"CQL Only",SHOW_ALL:"Queries & Background Tasks",SHOW_ACTIVITIES:"Background Tasks Only"},Rq=[Iq,vq,Oq],Pq=function(i){var o,a,s,l,u,c,d,p,h=i.universeUuid,f=i.apiUrl,g=i.startTime,m=i.endTime,v=i.appName,y=i.groupByOperation,x=i.filteredLegends,_=i.onSelectedQuery,b=Ki(),w=rp(),S=t.useState(null),T=S[0],C=S[1],M=t.useState(""),I=M[0],E=M[1],A=t.useState([]),D=A[0],k=A[1],O=t.useState(!1),N=O[0],R=O[1],P=t.useState(Sd[0]),L=P[0],B=P[1],j=t.useState(0),z=j[0],U=j[1],H=t.useState(0),V=H[0],W=H[1],G=t.useState(rd),q=G[0],Q=G[1],Z=t.useState([]),X=Z[0],$=Z[1],K=t.useState([]),J=K[0],ee=K[1],te=t.useState([]),ne=te[0],re=te[1],ie=t.useState("eps"),oe=ie[0],ae=ie[1],se=t.useState(exports.QueryType.SQL),le=se[0],ue=se[1],ce=t.useState(Nq.SHOW_YSQL),de=ce[0],pe=ce[1],he=t.useState(1),fe=he[0],ge=he[1],me=t.useState(exports.SortDirection.DESC),ve=me[0],ye=me[1],xe=n.useInfiniteQuery([exports.QUERY_KEY.fetchQueriesStatsPage,z,L],(function(){return fG.fetchQueriesStatsPage(h,{currentTablePage:z,apiUrl:f,pageSize:L,startTime:g,endTime:m,searchInput:I,database:q,sortBy:oe,sortDirection:ve,queryType:le,groupByOperation:y})}),{getNextPageParam:function(e){return e.data.hasNext},onSuccess:function(e){var t,n,r,i,o,a,s,l,u,c,d,p,h,f;"eps"===oe&&!1===(null===(r=null===(n=null===(t=null==e?void 0:e.pages)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.hasPrev)&&ve===exports.SortDirection.DESC&&(null===(a=null===(o=null===(i=null==e?void 0:e.pages)||void 0===i?void 0:i[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a.entities)&&ge(null===(c=null===(u=null===(l=null===(s=null==e?void 0:e.pages)||void 0===s?void 0:s[0])||void 0===l?void 0:l.data)||void 0===u?void 0:u.entities[0])||void 0===c?void 0:c.eps),re(null===(p=null===(d=null==e?void 0:e.pages[0])||void 0===d?void 0:d.data)||void 0===p?void 0:p.entities),W(null===(f=null===(h=null==e?void 0:e.pages[0])||void 0===h?void 0:h.data)||void 0===f?void 0:f.totalCount)}}),_e=xe.isFetching,be=xe.isError,we=xe.error,Se=xe.fetchNextPage,Te=xe.hasNextPage,Ce=xe.refetch,Me=n.useQuery([exports.QUERY_KEY.fetchQueriesDatabases,h],(function(){return fG.fetchQueriesDatabases(h,f)}),{onSuccess:function(e){ee(e)}}),Ie=Me.isLoading,Ee=Me.isError;t.useEffect((function(){}),[T]),t.useEffect((function(){Ce()}),[z,I,q,oe,ve,g,m,le,y]),t.useEffect((function(){var t,n,i,o,a,s,l,u=sessionStorage.getItem("visibleQueryFields"),c=u?JSON.parse(u):null;k([{name:vq,label:"",options:{sort:!1,display:!1,filter:!1}},{name:yq,label:"Avg Active Sessions",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"0.0"}}},{name:xq,label:"Events",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{minWidth:"70px",maxWidth:"200px",overflow:"visible",position:"relative",zIndex:10},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(t){return oc(t)?e.jsx(mq,{data:t,maxEPS:fe,groupByOperation:y,filteredLegends:x}):"-"}}},{name:Mq,label:"Query",options:{sort:!1,display:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Tooltip,F({title:t,placement:"top",arrow:!0},{children:e.jsx("span",F({tabIndex:0},{children:e.jsx(Ii,{text:t,showCopyButton:!0,lang:"sql",enabledExpandCollapse:!1,containerClassName:v===exports.AppName.WEB?b.codeBlock:Y(b.codeBlock,b.containerClassName),preClassName:v===exports.AppName.YBM?b.preClassName:"",codeClassName:v===exports.AppName.YBM?b.codeClassName:""},"TableHelperQueries-".concat(z,"-").concat(i))}))}))}}},{name:Cq,label:de===Nq.SHOW_YCQL?"Keyspace":"Database",options:{sort:!0,display:null!==(t=null==c?void 0:c.includes(Cq))&&void 0!==t&&t,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:_q,label:"First Active Time",options:{sort:!0,display:null!==(n=null==c?void 0:c.includes(_q))&&void 0!==n&&n,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:bq,label:"Last Active Time",options:{sort:!0,display:null!==(i=null==c?void 0:c.includes(bq))&&void 0!==i&&i,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:wq,label:"Avg Latency (ms)",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"The average latency is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"Avg Latency (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Sq,label:"P90 Latency (ms)",options:{sort:!0,display:null!==(o=null==c?void 0:c.includes(Sq))&&void 0!==o&&o,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"The P90 latency is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"P90 Latency (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Tq,label:"P99 Latency (ms)",options:{sort:!0,display:null!==(a=null==c?void 0:c.includes(Tq))&&void 0!==a&&a,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"The P99 latency is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"P99 Latency (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Eq,label:"Query Type",options:{sort:!1,display:null!==(s=null==c?void 0:c.includes(Eq))&&void 0!==s&&s,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"Displays if the query is YSQL or YCQL query type"},{children:e.jsx("span",{children:"Query Type"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return e||"-"}}},{name:kq,label:"Total Time (ms)",options:{sort:!0,display:null!==(l=null==c?void 0:c.includes(kq))&&void 0!==l&&l,setCellHeaderProps:function(){return{style:{width:"180px"},children:e.jsx(r.Tooltip,F({title:"Total time spent for query processing for 1 hour before last active time"},{children:e.jsx("span",{children:"Total Time (ms)"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Aq,label:"Avg Rows/Call",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},children:e.jsx(r.Tooltip,F({title:"The average rows returned by the query is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"Avg Rows"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}},{name:Dq,label:"Calls/Sec",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},children:e.jsx(r.Tooltip,F({title:"The RPS for the query is shown for 1 hour before last active time"},{children:e.jsx("span",{children:"RPS"})})),className:Y(w.tableHeaderCell,v===exports.AppName.WEB&&w.tableBorder)}},customBodyRender:function(e){return Number(e)?Number(e).toLocaleString():"-"}}}])}),[X,fe,y,x]);t.useEffect((function(){$(ne)}),[ne]);var Ae=_e||Ie;return e.jsxs(e.Fragment,{children:[N&&e.jsx(gq,{appName:v,hiddenColumns:[vq,wq,Aq,Dq,yq,xq,Iq,Oq,Mq],columns:D,onColumnVisibilityChange:function(e,t){k((function(n){return n.map((function(n){return n.name===e?F(F({},n),{options:F(F({},n.options),{display:t})}):n}))}))},close:function(){return R(!1)}}),e.jsxs(r.Box,F({mt:2,mb:2},{children:[e.jsxs(r.Box,F({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},{children:[e.jsx(no,F({width:"140px",className:w.label},{children:"Filter by ".concat(de===Nq.SHOW_YCQL?"Keyspace":"Database")})),e.jsxs(Fa,F({label:"",value:q,className:w.overrideMuiSelect,onChange:function(e){U(0),Q(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:[e.jsx(r.MenuItem,F({value:rd,"data-testid":"HistoricalQueryData-".concat(rd)},{children:e.jsx("span",{children:rd})}),rd),J.map((function(t){return e.jsx(r.MenuItem,F({value:t,"data-testid":"HistoricalQueryData-".concat(t)},{children:e.jsx("span",{children:t})}),t)}))]})),e.jsx(ro,{placeholder:"Filter Queries",className:w.searchInput,onChange:function(e){sc(e.target.value)&&U(0),E(e.target.value)},value:I,inputProps:{"data-testid":"HistoricalQueryData-SearchInput"}}),e.jsx(no,F({width:"100px",className:w.label},{children:"Filter by Type:"})),e.jsx(Fa,F({label:"",value:de,className:w.overrideMuiSelect,onChange:function(e){e.target.value===Nq.SHOW_ALL&&ue(null),e.target.value===Nq.SHOW_YSQL&&ue(exports.QueryType.SQL),e.target.value===Nq.SHOW_YCQL&&ue(exports.QueryType.CQL),e.target.value===Nq.SHOW_ACTIVITIES&&ue(exports.QueryType.BACKGROUND),pe(e.target.value)},menuProps:{PaperProps:{style:{paddingRight:"8px",maxHeight:"300px"}}}},{children:Object.entries(Nq).map((function(t){var n=t[0],i=t[1];return e.jsx(r.MenuItem,F({value:i,"data-testid":"HistoricalQueryData-".concat(i)},{children:e.jsx("span",{children:i})}),n)}))})),e.jsx(er,F({size:"large",style:{marginLeft:"16px"},variant:v===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx(zp,{}),onClick:function(){return R(!0)},"data-testid":"HistoricalQueryData-AddFieldsBtn"},{children:"Add and Remove Columns"}))]})),e.jsxs(r.Box,F({className:v===exports.AppName.YBM?w.overrideMuiTableContainer:w.overrideMuiTableContainerWeb},{children:[Ae&&e.jsx(r.Box,F({mt:2,className:w.loadingBox},{children:e.jsx(mG,{className:Y(w.icon,w.inProgressIcon)})})),(be||Ee)&&e.jsxs(r.Box,F({mt:3,className:w.recommendation},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(null===(a=null===(o=null==we?void 0:we.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error)?null===(l=null===(s=null==we?void 0:we.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error:tp.HISTORICAL_QUERY_DATA_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(za,{text:sc(null===(c=null===(u=null==we?void 0:we.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error)?null===(p=null===(d=null==we?void 0:we.response)||void 0===d?void 0:d.data)||void 0===p?void 0:p.error:tp.HISTORICAL_QUERY_DATA_FETCH_ERROR})]})),!Ae&&oc(X)&&e.jsx(jc,{id:"HistoricalQueryData-".concat(z),className:w.overrideMuiTable,data:X,columns:null==D?void 0:D.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),options:{filter:!0,count:V,serverSide:!0,pagination:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:L,page:z,onChangePage:function(e){return U(e)},onChangeRowsPerPage:function(e){B(e),U(0)},customRowRender:ap(v,z,X,b,!0,null==D?void 0:D.filter((function(e){var t;return null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.display})),Rq,g,m,T,(function(e){C(e)}),_),rowsPerPageOptions:Sd,onColumnSortChange:function(e,t){ae(e),ye(t.toUpperCase())},customFooter:np(Se,"Rows per page:",X.length,Te)}},"HistoricalQueryData-".concat(z)),!Ae&&!oc(X)&&e.jsx(r.Box,F({mt:3},{children:e.jsx("span",{children:"There are no queries with the current ".concat(v===exports.AppName.YBM?"cluster":"universe")})}))]}))]}))]})},Lq=r.makeStyles((function(e){return{messageBox:{width:"100%",height:"228px",border:"1px dotted #CBDBFF",borderRadius:"8px",backgroundColor:"#F2F6FF",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},ashText:{color:"#4E5F6D",marginTop:e.spacing(2),marginBottom:e.spacing(2),marginLeft:e.spacing(1),marginRight:e.spacing(1),fontSize:"13px"},ashLink:{color:"#2B59C3",fontSize:"11.5px",textDecoration:"underline",fontStyle:"solid"}}})),Bq=[{text:"Learn more.",link:"https://docs.yugabyte.com/preview/yugabyte-platform/manage-deployments/upgrade-software-install/"},{text:"Learn more.",link:"https://docs.yugabyte.com/preview/explore/observability/active-session-history/"}],jq=function(t){var n=t.isAshSupported,i=Lq();return e.jsxs(r.Box,F({className:i.messageBox},{children:[e.jsx("img",{src:n?"data:image/svg+xml,%3csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M20.5 1L12.6314 8.86863C12.2354 9.26465 12.0373 9.46265 11.809 9.53684C11.6082 9.6021 11.3918 9.6021 11.191 9.53684C10.9627 9.46265 10.7646 9.26465 10.3686 8.86863L7.63137 6.13137C7.23535 5.73535 7.03735 5.53735 6.80902 5.46316C6.60817 5.3979 6.39183 5.3979 6.19098 5.46316C5.96265 5.53735 5.76465 5.73535 5.36863 6.13137L0.5 11M20.5 1H13.5M20.5 1V8' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='42' height='22' viewBox='0 0 42 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M41 1L25.2627 16.7373C24.4707 17.5293 24.0747 17.9253 23.618 18.0737C23.2163 18.2042 22.7837 18.2042 22.382 18.0737C21.9253 17.9253 21.5293 17.5293 20.7373 16.7373L15.2627 11.2627C14.4707 10.4707 14.0747 10.0747 13.618 9.92631C13.2163 9.7958 12.7837 9.7958 12.382 9.92631C11.9253 10.0747 11.5293 10.4707 10.7373 11.2627L1 21M41 1H27M41 1V15' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Arrow"}),e.jsx("span",F({className:i.ashText},{children:n?"The Cluster Load chart requires access to the Active Session History (ASH) view, which is not enabled on this cluster. To enable ASH for this cluster, contact Support.":"The Cluster Load chart requires YugabyteDB v2024.2 or later."})),e.jsxs(r.Box,F({display:"flex",flexDirection:"row"},{children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.8002 13.7616H4.48019C3.95091 13.7616 3.52019 13.3308 3.52019 12.8016C3.52019 12.2723 3.95091 11.8416 4.48019 11.8416H12.1602C12.3368 11.8416 12.4802 11.6982 12.4802 11.5216V3.20156C12.4802 2.319 11.7621 1.60156 10.8802 1.60156H4.48019C3.59827 1.60156 2.88019 2.319 2.88019 3.20156V12.8016C2.88019 13.6841 3.59827 14.4016 4.48019 14.4016H12.8002C12.9768 14.4016 13.1202 14.2582 13.1202 14.0816C13.1202 13.9049 12.9768 13.7616 12.8002 13.7616ZM3.52019 3.20156C3.52019 2.67228 3.95091 2.24156 4.48019 2.24156H10.8802C11.4095 2.24156 11.8402 2.67228 11.8402 3.20156V11.2016H4.48019C4.12051 11.2016 3.78771 11.3212 3.52019 11.5222V3.20156Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 6.08203H5.76006C5.58342 6.08203 5.44006 6.22539 5.44006 6.40203C5.44006 6.57867 5.58342 6.72203 5.76006 6.72203H9.60006C9.7767 6.72203 9.92006 6.57867 9.92006 6.40203C9.92006 6.22539 9.7767 6.08203 9.60006 6.08203Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3cpath d='M9.6 4.30469H5.76C5.58336 4.30469 5.44 4.44805 5.44 4.62469C5.44 4.80133 5.58336 4.94469 5.76 4.94469H9.6C9.77664 4.94469 9.92 4.80133 9.92 4.62469C9.92 4.44805 9.77664 4.30469 9.6 4.30469Z' fill='%232B59C3'/%3e%3cpath d='M9.60006 7.85938H5.76006C5.58342 7.85938 5.44006 8.00274 5.44006 8.17938C5.44006 8.35602 5.58342 8.49938 5.76006 8.49938H9.60006C9.7767 8.49938 9.92006 8.35602 9.92006 8.17938C9.92006 8.00274 9.7767 7.85938 9.60006 7.85938Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Docs"}),e.jsx("a",F({className:i.ashLink,href:n?Bq[1].link:Bq[0].link,target:"_blank",rel:"noreferrer"},{children:n?Bq[1].text:Bq[0].text}))]}))]}))};vN([UU,gH,gB,_F,Vz,pU,uz,function(e){e.registerPainter("svg",SV)},az]);var Fq,zq=o.makeStyles((function(){return{metricPanel:{position:"relative",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",border:"1px solid #D7DEE4",borderRadius:"8px",padding:"8px",backgroundColor:"#FFFFFF"},groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .MuiInput-root":{height:"32px"}},groupByContainer:{position:"absolute",top:"20px",right:"20px",display:"flex",flex:1,flexDirection:"row",alignItems:"center"},groupByText:{fontSize:"13px",fontFamily:"Inter, sans-serif",fontWeight:500,color:"#0B1117"}}})),Uq=function(i){var o,a,s,l=i.startTime,u=i.endTime,c=i.appName,d=i.metricKey,p=i.shouldAbbreviateTraceName,h=i.groupByOperation,f=i.timezone,g=i.universeUuid,m=i.isAshEnabled,v=i.isAshSupported,y=i.apiUrl,x=i.onDateSelect,_=i.onSetGroupByOperation,b=i.onFilterBarData,w=zq(),S=rp(),T=t.useRef(null),C=t.useRef(null),M=t.useState(null),I=M[0],E=M[1],A=n.useMutation((function(e){return fG.fetchGraphs(g,e,y)}),{onSuccess:function(e){!oc(e)||E(e)},onError:function(e){console.error("Failed to fetch cluster load data",e)}}),D=null===(s=null===(a=null===(o=null==A?void 0:A.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,k=function(){var e=function(e){return F(F({start:l,end:u,name:e,filters:{universeUuid:[g]},settings:{aggregatedValueFunction:Yc.AVERAGE,returnAggregatedValue:!1,splitCount:3,splitMode:Vc.NONE,splitType:Wc.NONE}},e===hd||e===dd?{groupBy:[h]}:{}),{stepSeconds:Pp(l,u)})},t=[h===exports.WaitEventClassification.DB_ID?e(hd):e(dd),e(pd),e(fd)];sc(l)&&sc(u)&&m&&A.mutate(t)};return t.useEffect((function(){k()}),[l,u,h]),t.useEffect((function(){return k(),function(){E(null)}}),[]),t.useEffect((function(){if(oc(I)&&C.current){T.current||(T.current=dk(C.current,null,{renderer:"svg"}));var e=function(e,t){var n,r,i,o,a,s,l,u,c,d,p,h=t.shouldAbbreviateTraceName;t.appName;var f=t.timezone,g=void 0===f?"":f,m=t.groupByOperation,v=null==e?void 0:e.flatMap((function(e){return e.data||[]}));v&&v.length>1&&(v=V(V([],v.filter((function(e){var t;return"cpu"===(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0),v.filter((function(e){var t;return"cpu"!==(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())})),!0));var y=[];if(!v||0===v.length)return{series:[{name:"No Data",type:"line",data:[[0,0],[1,0]],showSymbol:!1,lineStyle:{color:"#ccc",type:"dashed"}}],xAxis:{min:0,max:1},yAxis:{min:0,max:1},title:{text:"No Data Available",left:"center",textStyle:{fontWeight:"bold",fontFamily:ld,fontSize:13,color:"#0B1117"},legend:{data:[]}}};null==v||v.forEach((function(t,n){var r=t.name,i=null;if(r===ad){var o=null==e?void 0:e.find((function(e){var n;return null===(n=e.data)||void 0===n?void 0:n.includes(t)}));(i=null==o?void 0:o.name)===fd?r=ud:i===pd&&(r=sd)}var a=m===exports.WaitEventClassification.WAIT_EVENT?22:25,s=h&&r.length>a?"".concat(r.substring(0,a),"..."):r;if(r===sd)y.push({name:s,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:!1,lineStyle:{color:"white",width:4,type:"solid"},silent:!0,symbol:"none",z:1}),y.push({name:s,type:"line",data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:n<35,lineStyle:{color:"black",width:2,type:"solid"},symbol:"circle",symbolSize:6,itemStyle:{color:"transparent"},emphasis:{itemStyle:{color:"black"},lineStyle:{width:2},symbolSize:8},z:2});else{var l={name:s,type:"scatter"===t.type?"line":"bar",stack:"scatter"!==t.type?"total":null,data:t.x.map((function(e,n){return[e,t.y[n]]})),showLegend:n<35,lineStyle:{color:r===ud?"#888888":ep[r]||Jd[n%Jd.length],width:2,type:r===ud?"dashed":"solid"},itemStyle:{color:r===ud?"transparent":ep[r]||Jd[n%Jd.length]},symbolSize:6,symbol:"circle",z:1,emphasis:{lineStyle:{color:r===ud?"#888888":ep[r]||Jd[n%Jd.length],width:2},itemStyle:{color:r===ud?ep[r]||Jd[n%Jd.length]:void 0},symbolSize:r===ud?8:void 0}};y.push(l)}}));var x=(null===(r=null===(n=null==y?void 0:y[0])||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)||0,_=[];if(x)for(var b=0;b<x;b++){for(var w=0,S=0,T=y;S<T.length;S++){var C=T[S];"bar"===C.type&&(w+=parseFloat(null===(i=C.data[b])||void 0===i?void 0:i[1])||0)}_.push(w)}var M=Math.max.apply(Math,V([.1],_,!1)),I=0;y.forEach((function(e){if("line"===e.type){var t=Math.max.apply(Math,e.data.map((function(e){return e[1]})));t>I&&(I=t)}}));var E=Math.max(1,2*M,2*I),A=Math.ceil(E),D=null===(l=null===(s=null===(a=null===(o=null==e?void 0:e[0])||void 0===o?void 0:o.data)||void 0===a?void 0:a[0])||void 0===s?void 0:s.x)||void 0===l?void 0:l[0],k=null===(p=null===(d=null===(c=null===(u=null==e?void 0:e[0])||void 0===u?void 0:u.data)||void 0===c?void 0:c[0])||void 0===d?void 0:d.x)||void 0===p?void 0:p.slice(-1)[0],O=k&&D?(new Date(k).getTime()-new Date(D).getTime())/864e5:0,N={title:{text:"Cluster Load",left:16,top:16,textStyle:{fontWeight:600,fontFamily:ld,fontSize:15}},tooltip:{trigger:m===exports.WaitEventClassification.WAIT_EVENT?"item":"axis",axisPointer:{type:"shadow"},textStyle:{fontSize:11.5,color:"#0B1117",fontWeight:400},extraCssText:"letter-spacing:0.5px; border:1px solid #D7DEE4; border-radius:8px;",z:1e3,formatter:function(e){var t,n,r;if(Array.isArray(e)){var i=(null===(t=e[0])||void 0===t?void 0:t.axisValueLabel)||"",o=new Date(i),a=zu(g?Uu(o,g):o,"MMM d HH:mm (zzz)",{timeZone:g||void 0}),s=e.map((function(e){var t=Array.isArray(e.value)?e.value[1]:e.value,n=Bp(e.color,e.seriesName),r=jp(t);return'\n <div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(n).concat(r,"\n </div>\n ")})).join("");return'<div style="letter-spacing:0.5px;"><b>'.concat(a,"</b><br/>").concat(s,"</div>")}i=null!==(r=null!==(n=e.axisValueLabel)&&void 0!==n?n:e.value&&e.value[0])&&void 0!==r?r:"",o=new Date(i),a=zu(g?Uu(o,g):o,"MMM d HH:mm (zzz)",{timeZone:g||void 0});var l=Array.isArray(e.value)?e.value[1]:e.value,u=Bp(e.color,e.seriesName),c=jp(l);return s='<div style="\n display:grid;\n grid-template-columns: 1fr auto; /* left grows, right fits */\n column-gap:24px; /* ← 24px between columns */\n align-items:center;\n margin-bottom:6px;\n ">\n '.concat(u).concat(c,"\n </div>"),'<div style="letter-spacing:0.5px;"><b>'.concat(a,"</b><br/>").concat(s,"</div>")}},legend:{type:"scroll",orient:"vertical",left:"1%",top:"10%",bottom:"10%",width:"250px",height:"300px",itemWidth:12,itemHeight:12,textStyle:{fontSize:"11.5px",fontWeight:"500",color:"#4E5F6D",fontFamily:ld,rich:{dashedLine:{backgroundColor:{image:'data:image/svg+xml;utf8,<svg width="24" height="6" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="3" x2="24" y2="3" stroke="%23888" stroke-width="2" stroke-dasharray="6,4" /></svg>'},width:24,height:6,padding:[0,4,0,0],lineHeight:14},thickLine:{backgroundColor:"black",width:24,height:0,borderWidth:1,borderColor:"black",borderType:"solid",padding:[2,4,0,0],lineHeight:14}}},data:y.filter((function(e){return e.showLegend})).map((function(e){return e.name===ud||e.name===sd?{name:e.name,icon:"none"}:e.name})),formatter:function(e){return e===ud?"{dashedLine|} # vCPU":e===sd?"{thickLine|} Queries":e}},grid:{left:"270px",right:"2%",top:"14%",bottom:"10%",containLabel:!0},xAxis:{type:"time",axisLabel:{color:"#25323D",formatter:function(e){var t=new Date(e);return zu(g?Uu(t,g):t,O>1?"MMM d HH:mm":"HH:mm",{timeZone:g||void 0})}},axisLine:{lineStyle:{color:"#FF0000"}}},yAxis:{type:"value",name:"Connections",nameLocation:"middle",nameGap:50,nameTextStyle:{fontWeight:"bold",fontFamily:ld,fontSize:13,color:"#0B1117",rotate:90},axisLine:{lineStyle:{color:"#00AAFF"}},axisLabel:{color:"#25323D",precision:0},splitNumber:4,max:A},series:y,toolbox:{feature:{brush:{type:["rect","polygon","clear"]}}},brush:{toolbox:["rect","polygon"],xAxisIndex:0,yAxisIndex:0}};return N}(I,{shouldAbbreviateTraceName:p,appName:c,timezone:f,metricKey:d,groupByOperation:h});T.current.setOption(e),T.current.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"rect",brushMode:"single"}}),T.current.on("legendselectchanged",(function(e){var t=Object.keys(e.selected).filter((function(t){return!e.selected[t]}));b(t)}));var t=!1,n=null;T.current.getZr().on("mousedown",(function(e){var r,i,o=[e.offsetX,e.offsetY],a=null===(r=T.current)||void 0===r?void 0:r.convertFromPixel({seriesIndex:0},o);n=null!==(i=null==a?void 0:a[0])&&void 0!==i?i:null,t=!0})),T.current.getZr().on("mouseup",(function(e){var r;if(t){var i=[e.offsetX,e.offsetY],o=null===(r=T.current)||void 0===r?void 0:r.convertFromPixel({seriesIndex:0},i),a=null==o?void 0:o[0];null!==n&&null!==a&&Math.abs(a-n)>10&&x(n,a)}t=!1}))}return function(){T.current&&(T.current.dispose(),T.current=null)}}),[I,A.isLoading,d]),t.useEffect((function(){var e=function(){T.current&&T.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),e.jsx(r.Box,F({mt:2},{children:e.jsxs(r.Box,{children:[A.isLoading&&e.jsx(r.Box,F({mt:2,className:S.loadingBox},{children:e.jsx(mG,{className:Y(S.icon,S.inProgressIcon)})})),A.isError&&e.jsxs(r.Box,F({mt:3},{children:[(c===exports.AppName.YBA||c===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(D)?D:tp.CLUSTER_LOAD_FETCH_ERROR}),c===exports.AppName.YBM&&e.jsx(za,{text:sc(D)?D:tp.CLUSTER_LOAD_FETCH_ERROR})]})),e.jsxs(r.Box,{children:[A.isSuccess&&e.jsxs(r.Box,F({id:"".concat(d,"-wrapper"),display:"flex",flexDirection:"row",className:w.metricPanel,onClick:function(e){e.stopPropagation()},width:"100%"},{children:[e.jsx("div",{ref:C,id:d,style:{flexGrow:1,minWidth:0,height:"400px"}}),e.jsxs("div",F({className:w.groupByContainer},{children:[e.jsxs("span",F({className:w.groupByText},{children:["Group By","   "]})),e.jsx(Fa,F({value:h,className:Y(w.groupByOperationDropdown,w.overrideDefaultMuiSelect,w.overrideDefaultMuiFormControl)},{children:null==Jc?void 0:Jc.map((function(t,n){return e.jsx(r.MenuItem,F({value:t,onClick:function(e){_(t),e.stopPropagation()}},{children:Kc[t]}),"".concat(t,"-").concat(n))}))}))]}))]})),!m&&e.jsx(r.Box,F({mt:2,mb:1.5},{children:e.jsx(jq,{isAshSupported:v})}))]})]})}))},Hq=r.makeStyles((function(e){return{tabsContainer:{display:"flex",alignItems:"center",width:"100%",boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[300]),"& .MuiTabs-fixed":{boxShadow:"none"},marginTop:e.spacing(1.5)},tabButton:{textAlign:"left",marginRight:e.spacing(1),minHeight:e.spacing(4),maxHeight:e.spacing(4),marginBottom:e.spacing(.5),padding:e.spacing(0,2),boxSizing:"border-box","&:hover":{boxShadow:"none",borderRadius:e.shape.borderRadius},"& .Mui-selected":{background:e.palette.grey[300],borderRadius:e.spacing(1)},"& .MuiTab-wrapper":{alignItems:"center"}},tabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117"},tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"0px 24px 4px 16px",backgroundColor:"#FFFFFF"},chartBox:{border:"1px solid #D7DEE4",borderRadius:"8px",padding:"16px 24px 24px 16px",backgroundColor:"#FFFFFF"},expandAllButton:{fontSize:"13px",fontWeight:600}}})),Vq=function(i){var o,a,l,u=i.startTime,c=i.endTime,d=i.universeUuid,p=i.appName,h=i.timezone,f=i.apiUrl,g=i.isAshEnabled,m=i.isAshSupported,v=i.universeData,y=i.anomalyDetectionStatus,x=i.onClickShowMoreAnomalies,_=i.onEChartsDateSelect,b=i.onSelectedIssue,w=i.onSelectedQuery,S=i.notifyTabChange,T=Hq(),C=rp(),M=t.useState([]),I=M[0];M[1];var E,A,D=t.useState(null),k=D[0],O=D[1],N=t.useState((E=window.location.pathname,A=exports.InsightsTabs.ANOMALIES,E.includes("/".concat(td.ANOMALIES))&&(A=exports.InsightsTabs.ANOMALIES),E.includes("/".concat(td.QUERIES))&&(A=exports.InsightsTabs.QUERIES),E.includes("/".concat(td.METRICS))&&(A=exports.InsightsTabs.METRICS),E.includes("/".concat(td.INSIGHTS))&&(A=exports.InsightsTabs.INSIGHTS),A)),R=N[0],P=N[1],L=t.useState(!1),B=L[0],j=L[1],z=t.useState(Object.values(exports.InsightsTabs)),U=z[0],H=z[1],V=t.useState(Jc[0]),W=V[0],G=V[1],q=function(e){console.warn("onFilterBarData",e)},Q=function(e,t){var n=Object.values(exports.InsightsTabs);return e||(n=n.filter((function(e){return e!==exports.InsightsTabs.QUERIES}))),t||(n=n.filter((function(e){return e!==exports.InsightsTabs.METRICS}))),n},Z=function(e){G(e)},X=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroups,u],(function(){return fG.fetchAnomalyGroups(d,u,c,f,R===exports.InsightsTabs.INSIGHTS?exports.AnomalyTypeFilter.INSIGHT:exports.AnomalyTypeFilter.PERF_ANOMALY)}),{onSuccess:function(e){O(e)}}),$=null===(l=null===(a=null===(o=null==X?void 0:X.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===l?void 0:l.error;n.useQuery([exports.QUERY_KEY.fetchSpecificRuntimeConfigs],(function(){return fG.fetchSpecificRuntimeConfigs(Cd,[Md.SHOW_QUERIES_VIEW,Md.SHOW_TOPK_METRICS_VIEW],f)}),{onSuccess:function(e){var t,n,r="true"===(null===(t=null==e?void 0:e.find((function(e){return e.path===Md.SHOW_TOPK_METRICS_VIEW})))||void 0===t?void 0:t.value),i="true"===(null===(n=null==e?void 0:e.find((function(e){return e.path===Md.SHOW_QUERIES_VIEW})))||void 0===n?void 0:n.value);H(Q(!!i,!!r))},onError:function(){H(Q(!1,!1))}}),t.useEffect((function(){y===exports.AnomalyDetectionStatusText.SUCCESS&&X.refetch()}),[y]),t.useEffect((function(){R!==exports.InsightsTabs.METRICS&&X.refetch()}),[u,c,R]),t.useEffect((function(){var e=window.location.pathname,t=new URLSearchParams(window.location.search).get("tab");if(e.includes("/".concat(td.ANOMALIES))||t===td.ANOMALIES)P(exports.InsightsTabs.ANOMALIES),S(exports.InsightsTabs.ANOMALIES);else if(e.includes("/".concat(td.QUERIES))||t===td.QUERIES)P(exports.InsightsTabs.QUERIES),S(exports.InsightsTabs.QUERIES);else if(e.includes("/".concat(td.METRICS))||t===td.METRICS)P(exports.InsightsTabs.METRICS),S(exports.InsightsTabs.METRICS);else if(e.includes("/".concat(td.INSIGHTS))||t===td.INSIGHTS)P(exports.InsightsTabs.INSIGHTS),S(exports.InsightsTabs.INSIGHTS);else if(p!==exports.AppName.YBA){var n=new URLSearchParams(window.location.search).toString(),r="".concat(e,"/").concat(td.ANOMALIES).concat(n?"?".concat(n):"");window.history.replaceState(null,"",r)}}),[]);var K=function(t){switch(t){case exports.InsightsTabs.ANOMALIES:return e.jsx(Uq,{startTime:u,endTime:c,apiUrl:f,universeUuid:d,appName:p,metricKey:"cluster_load",groupByOperation:W,shouldAbbreviateTraceName:!0,timezone:h,isAshEnabled:g,isAshSupported:m,onSetGroupByOperation:Z,onDateSelect:_,onFilterBarData:q});case exports.InsightsTabs.QUERIES:return e.jsxs(e.Fragment,{children:[e.jsx(Uq,{startTime:u,endTime:c,apiUrl:f,universeUuid:d,appName:p,metricKey:"cluster_load",groupByOperation:W,shouldAbbreviateTraceName:!0,timezone:h,isAshEnabled:g,isAshSupported:m,onFilterBarData:q,onSetGroupByOperation:Z,onDateSelect:_}),e.jsx(r.Box,F({mt:3,className:T.chartBox},{children:e.jsx(Pq,{universeUuid:d,groupByOperation:W,apiUrl:f,startTime:u,endTime:c,appName:p,filteredLegends:I,onSelectedQuery:w})}))]});case exports.InsightsTabs.METRICS:return e.jsx(OG,{universeUuid:d,troubleshootUuid:null,shouldAnalyzeTopK:!0,universeData:v,appName:p,timezone:h,apiUrl:f});case exports.InsightsTabs.INSIGHTS:return e.jsx(r.Box,{mt:.5});default:return null}};return e.jsxs(r.Box,{children:[p===exports.AppName.WEB&&e.jsx(r.Box,F({className:T.tabBox},{children:e.jsxs(s.TabContext,F({value:R},{children:[e.jsx(r.Box,F({display:"flex",alignItems:"center",className:T.tabsContainer},{children:e.jsx(r.Tabs,F({value:R,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){if(t!==R){P(t),S(t);var n=window.location.pathname,r=new URLSearchParams(window.location.search).toString();n=n.replace(/\/anomalies|\/insights|\/metricsNew\/[^/]+|\/queries/g,""),t===exports.InsightsTabs.ANOMALIES?n="".concat(n,"/").concat(td.ANOMALIES).concat(r?"?".concat(r):""):t===exports.InsightsTabs.QUERIES?n="".concat(n,"/").concat(td.QUERIES).concat(r?"?".concat(r):""):t===exports.InsightsTabs.METRICS?n="".concat(n,"/").concat(td.METRICS):t===exports.InsightsTabs.INSIGHTS&&(n="".concat(n,"/").concat(td.INSIGHTS)),window.history.pushState(null,"",n)}}},{children:U.map((function(t,n){return e.jsx(r.Tab,{"data-testid":"".concat(t,"Tab"),value:t,label:t,classes:{root:Y(T.tabButton),wrapper:T.tabLabelWrapper}},n)}))}))})),e.jsx(s.TabPanel,F({className:C.tabPanelPrimary,value:exports.InsightsTabs.ANOMALIES},{children:K(exports.InsightsTabs.ANOMALIES)})),e.jsx(s.TabPanel,F({className:C.tabPanelPrimary,value:exports.InsightsTabs.QUERIES},{children:K(exports.InsightsTabs.QUERIES)})),e.jsx(s.TabPanel,F({className:C.tabPanelPrimary,value:exports.InsightsTabs.METRICS},{children:K(exports.InsightsTabs.METRICS)}))]}))})),(p===exports.AppName.YBM||p===exports.AppName.YBA)&&e.jsx(e.Fragment,{children:K(R)}),(R===exports.InsightsTabs.ANOMALIES||R===exports.InsightsTabs.INSIGHTS)&&e.jsxs(r.Box,F({mt:3,className:T.chartBox},{children:[e.jsxs(r.Box,F({display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},{children:[e.jsx(r.Typography,F({variant:"h5"},{children:R===exports.InsightsTabs.ANOMALIES?"Detected Anomalies":"Insights"})),e.jsx(r.Box,{children:e.jsx(er,F({variant:p===exports.AppName.YBM?"ghost":"secondary",startIcon:e.jsx("img",{src:B?"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4.70711L3.85355 7.85355C3.65829 8.04882 3.34171 8.04882 3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645L7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L11.8536 7.14645C12.0488 7.34171 12.0488 7.65829 11.8536 7.85355C11.6583 8.04882 11.3417 8.04882 11.1464 7.85355L8 4.70711L8 15.5C8 15.7761 7.77614 16 7.5 16C7.22386 16 7 15.7761 7 15.5L7 4.70711ZM0.5 1C0.223858 1 1.81543e-07 0.776142 1.84836e-07 0.5C1.88129e-07 0.223858 0.223858 2.66948e-09 0.5 5.96244e-09L14.5 1.72911e-07C14.7761 1.76204e-07 15 0.223858 15 0.5C15 0.776142 14.7761 1 14.5 1L0.5 1Z' fill='%232B59C3'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 0.5C7 0.223857 7.22386 -3.39906e-07 7.5 -3.27835e-07C7.77614 -3.15765e-07 8 0.223857 8 0.5L8 11.2929ZM14.5 15C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16L0.499999 16C0.223857 16 -6.89597e-07 15.7761 -6.77527e-07 15.5C-6.65456e-07 15.2239 0.223857 15 0.499999 15L14.5 15Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Expand Icon"}),onClick:function(){j(!B)}},{children:e.jsx("span",F({className:T.expandAllButton},{children:B?"Collapse All":"Expand All"}))}))}),X.isLoading&&e.jsx(r.Box,F({mt:2,className:C.loadingBox},{children:e.jsx(mG,{className:Y(C.icon,C.inProgressIcon)})})),X.isError&&e.jsxs(r.Box,F({mt:2},{children:[(p===exports.AppName.YBA||p===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc($)?$:tp.ANOMALIES_FETCH_ERROR}),p===exports.AppName.YBM&&e.jsx(za,{text:sc($)?$:tp.ANOMALIES_FETCH_ERROR})]}))]})),X.isSuccess&&(ac(null==k?void 0:k.groups)?e.jsx(EG,{name:"gant-chart-insights",sourceData:null!=k?k:[],expandAll:B,showMoreOptions:!0,onClickShowMoreAnomalies:x,startTime:u,endTime:c,onSelectedIssue:b,appName:p,isInsightsTab:R===exports.InsightsTabs.INSIGHTS},"gant-chart-insights"):e.jsx(r.Box,F({mt:2},{children:"No Anomalies were detected"})))]}))]})},Wq=r.makeStyles((function(e){return{tabBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"24px 24px 24px 16px",backgroundColor:"#FFFFFF",margin:e.spacing(3)}}})),Yq=function(o){var a,s,l,u,c,d=o.showMoreAnomalyCategory,p=o.selectedTab,h=o.startTime,f=o.endTime,g=o.apiUrl,m=o.universeUuid,v=o.appName,y=o.onClickShowMoreAnomalies,x=o.onSelectedIssue,_=Wq(),b=rp(),w=t.useState(null),S=w[0],T=w[1],C=n.useQuery([exports.QUERY_KEY.fetchAnomalyGroupsByType,h,f],(function(){return fG.fetchAnomalyGroupsByType(m,h,f,d,g)}),{onSuccess:function(e){T(e)}}),M=null===(l=null===(s=null===(a=null==C?void 0:C.error)||void 0===a?void 0:a.response)||void 0===s?void 0:s.data)||void 0===l?void 0:l.error;return e.jsxs(r.Box,F({className:_.tabBox},{children:[e.jsxs(r.Breadcrumbs,F({className:b.breadCrumb,separator:e.jsx(i.NavigateNext,{fontSize:"small"}),"aria-label":"breadcrumb","data-testid":"PrimaryDashboardBreadcrumb"},{children:[e.jsx(r.Link,F({className:b.textLink,component:vt,variant:"h5",onClick:function(){y(null),window.history.pushState({},"",window.location.href)},to:"#"},{children:e.jsx("span",F({className:b.breadCrumbText},{children:p===exports.InsightsTabs.ANOMALIES?"Detected Anomalies":"Insights"}))})),e.jsx(r.Typography,F({variant:"h5"},{children:e.jsx("span",F({className:Y(b.breadCrumbText,b.anomalyCategoryText)},{children:"".concat(null===(c=null===(u=null==S?void 0:S[0])||void 0===u?void 0:u.lastInstance)||void 0===c?void 0:c.title)||"".concat(Id[d])}))}))]})),e.jsxs(r.Box,F({mt:3},{children:[C.isLoading&&e.jsx(r.Box,{children:e.jsx(mG,{className:Y(b.icon,b.inProgressIcon)})}),C.isError&&e.jsxs(r.Box,F({mt:3},{children:[(v===exports.AppName.YBA||v===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(M)?M:tp.SHOW_MORE_ANOMALIES_FETCH_ERROR}),v===exports.AppName.YBM&&e.jsx(za,{text:sc(M)?M:tp.SHOW_MORE_ANOMALIES_FETCH_ERROR})]})),C.isSuccess&&(oc(S)?e.jsx(EG,{name:"gant-chart-show-more-anomalies",sourceData:null!=S?S:[],showMoreOptions:!1,expandAll:!0,startTime:h,endTime:f,onSelectedIssue:x,appName:v,viewAllAnomalies:!0},"gant-chart-show-more-anomalies"):e.jsx(r.Box,{children:"No Anomalies were detected"}))]}))]}))},Gq=o.makeStyles((function(e){return{header:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"end"},detectionButton:{marginRight:e.spacing(2)}}})),qq=o.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),Qq=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=qq(),c=n.useMutation((function(){return fG.deleteUniverseMetadata(i.id,a)}),{onSuccess:function(){hq.success("Universe removed successfully, no further troubleshooting on this universe willbe performed"),l(),s()},onError:function(e){var t,n,r;hq.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Not able to remove universe, please try again")}});return e.jsx(Ic,F({open:o,onClose:s,title:"Remove Universe",onSubmit:function(){return U(void 0,void 0,void 0,(function(){return H(this,(function(e){return c.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Remove",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:u.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to remove the universe ".concat(i.id," from Perf Advisor service ?")}))}))}))};!function(e){e.ACTIVE="Active",e.INACTIVE="Inactive"}(Fq||(Fq={}));var Zq=o.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},tagGreen:{backgroundColor:"#CDEFE1"},tagRed:{backgroundColor:"#FDE2E2"},tagTextGreen:{color:"#097245"},tagTextRed:{color:"#8F0000"},statusText:{fontFamily:"Inter",fontStyle:"normal",fontSize:"13px"},statusBox:{display:"flex",flexDirection:"row",alignItems:"center",height:"24px",borderRadius:"6px",padding:"10px 6px",width:"fit-content"},flexColumn:{display:"flex",flexDirection:"row"},tooltip:{marginLeft:e.spacing(.5)}}})),Xq=function(n){var i=n.metadata,o=n.apiUrl;n.customerUuid;var a=n.universeList,s=n.onActionPerformed,l=Zq(),u=rp(),c=t.useState(!1),d=c[0],p=c[1],h=t.useState([]),f=h[0],g=h[1],m=t.useState(Sd[0]),v=m[0],y=m[1],x=t.useState(""),_=x[0];x[1];var b=t.useState(0),w=b[0],S=b[1],T=t.useState(null),C=T[0],M=T[1],I=t.useState(i),E=I[0],A=I[1];return t.useEffect((function(){var e=i.map((function(e){var t,n=a.find((function(t){return e.id===t.universeUUID}));return e.name=null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"",e.lastSyncError=null==n?void 0:n.lastSyncError,e}));A(e)}),[a,i]),t.useEffect((function(){g([{name:"id",label:"Universe UUID",options:{sort:!0,display:!0}},{name:"name",label:"Universe Name",options:{sort:!0,display:!0,setCellHeaderProps:function(){return{style:{width:"160px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var r=n.rowIndex,i=E[r],o=null==i?void 0:i.id;return e.jsx("a",F({href:"/universes/".concat(o,"/perfAdvisor?tab=").concat(td.ANOMALIES)},{children:t}))}}},{name:"dataMountPoints",label:"Data Mount Points",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}}}},{name:"otherMountPoints",label:"Other Mount Points",options:{sort:!1,display:!0}},{name:"lastSyncError",label:"Status",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"120px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t){return e.jsx(e.Fragment,{children:t?e.jsxs(r.Box,F({className:l.flexColumn},{children:[e.jsx(r.Box,F({className:Y(l.tagRed,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextRed,l.statusText)},{children:Fq.INACTIVE}))})),e.jsx(r.Tooltip,F({title:t,arrow:!0,placement:"top",className:l.tooltip},{children:e.jsx("img",{src:AG,alt:"info"})}))]})):e.jsx(r.Box,F({className:Y(l.tagGreen,l.statusBox)},{children:e.jsx("span",F({className:Y(l.tagTextGreen,l.statusText)},{children:Fq.ACTIVE}))}))})}}},{name:"",label:"Actions",options:{sort:!1,display:!0,setCellHeaderProps:function(){return{style:{width:"180px"},className:Y(u.tableHeaderCell)}},customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx(er,F({size:"medium",variant:"ghost",onClick:function(){return e=E[i],M(e),void p(!0);var e}},{children:"Unregister"}))})}}}])}),[E]),e.jsxs(r.Box,F({mt:2,className:l.overrideMuiTableContainer},{children:[oc(E)&&oc(f)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(jc,{title:"Universe Metadata",className:u.overrideMuiTable,data:E,columns:f,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:v,page:w,onChangePage:function(e){return S(e)},onChangeRowsPerPage:function(e){y(e),S(0)},searchText:_,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:Sd}})})),d&&C&&e.jsx(Qq,{onActionPerformed:s,open:d,onClose:function(){p(!1)},data:C,apiUrl:o})]}))},$q=o.makeStyles((function(e){return{refreshButton:{width:"120px",marginTop:e.spacing(2),alignSelf:"end"},flexColumn:{display:"flex",flexDirection:"column"},noUniverses:{alignSelf:"center"}}})),Kq=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),Jq=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=Kq(),d=n.useMutation((function(){return fG.deleteRuntimeConfig(Cd,null==i?void 0:i.path,a)}),{onSuccess:function(){u.success("Have reset runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot reset runtime configuration key, please try again")}});return e.jsx(Ic,F({open:o,onClose:s,title:"Reset Runtime Configuration",onSubmit:function(){return U(void 0,void 0,void 0,(function(){return H(this,(function(e){return d.mutateAsync(),[2]}))}))},cancelLabel:"Cancel",submitLabel:"Reset",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(r.Typography,F({variant:"body2"},{children:"Are you sure you want to reset the runtime configuration for the following key ".concat(i.path," ?")}))}))}))},eQ=r.makeStyles((function(e){return{root:{padding:"".concat(e.spacing(3),"px ").concat(e.spacing(4.5),"px")},modalTitle:{marginLeft:e.spacing(2.25)}}})),tQ=function(t){var i=t.data,o=t.open,a=t.apiUrl,s=t.onClose,l=t.onActionPerformed,u=t.toast,c=eQ(),d=Da({defaultValues:{configValue:(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL?"true"===i.value:i.value},mode:"onChange",reValidateMode:"onChange"}),p=d.control,h=d.handleSubmit,f=n.useMutation((function(e){return fG.updateRuntimeConfig(Cd,null==i?void 0:i.path,e.configValue?e.configValue.toString():i.value.toString(),a)}),{onSuccess:function(){u.success("Updated runtime configuration key ".concat(i.path," successfully")),l(),s()},onError:function(e){var t,n,r;u.error(null!==(r=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)&&void 0!==r?r:"Cannot update runtime configuration key, please try again")}}),g=h((function(e){var t={configValue:""};Object.assign(t,i),t.configValue=e.configValue,f.mutate(t)}));return e.jsx(Ic,F({open:o,onClose:s,title:"Update Runtime Configuration",onSubmit:g,cancelLabel:"Cancel",submitLabel:"Update",overrideHeight:"250px",size:"sm",titleSeparator:!0,enableBackdropDismiss:!0,dialogContentProps:{className:c.root,dividers:!0}},{children:e.jsx(Oo,F({},d,{children:e.jsxs(r.Box,F({mt:2},{children:[e.jsx(no,{children:"Config Key "}),e.jsx(r.Typography,F({variant:"body2"},{children:i.path})),e.jsxs(r.Box,F({mt:1},{children:[e.jsx(no,{children:"Config Value "}),(null==i?void 0:i.type)!==exports.RuntimeConfigType.BOOL&&e.jsx(Oa,{style:{marginTop:"8px"},name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"},fullWidth:!0}),(null==i?void 0:i.type)===exports.RuntimeConfigType.BOOL&&e.jsx(cp,{name:"configValue",control:p,inputProps:{"data-testid":"UpdateRuntimeConfig-ConfigValue"}})]}))]}))}))}))},nQ=r.makeStyles((function(e){return{overrideMuiTableContainer:{"& .MuiTableContainer-root":{width:"90% !important",marginTop:"3px"}},overrideMuiTable:{textAlign:"center","& .MuiTableCell-sizeSmall":{textAlign:"center"}},tooltip:{marginLeft:e.spacing(.5)},textColor:{color:"#303A78"},searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"}}}));exports.ACTIVE_SESSION_HISOTRY_EPS_CLIENT_NODE=hd,exports.ACTIVE_SESSION_HISTORY_EPS_GLOBAL=dd,exports.ACTIVE_SESSION_HISTORY_QUERY_EVENTS=pd,exports.ALL=rd,exports.ALL_REGIONS=nd,exports.ALL_ZONES=id,exports.ANOMALY_CATEGORY_LIST=Td,exports.ANOMALY_FILTER_DURATION_OPTIONS=Od,exports.ANOMALY_TAG=Fd,exports.ANOMALY_TYPE_TO_NAME_MAP=Id,exports.ASH=od,exports.ASH_GROUPBY_VALUES=wd,exports.Aggregation=Yc,exports.BACKGROUND_QUERY_REQUEST_GRAPHS=_d,exports.CATALOG_READ_REQUEST_GRAPH=bd,exports.CATEGORY_HEADER_DATA_MAP=Rd,exports.COLORS=Jd,exports.CORES=ad,exports.CPU_CORES=ud,exports.CPU_COUNT=fd,exports.CQL_QUERY_REQUEST_GRAPHS=xd,exports.ClusterRegionSelector=_p,exports.ConfigureUniverseMetadata=function(i){var o=i.apiUrl,a=i.customerUuid,s=i.appName,l=void 0===s?exports.AppName.WEB:s,u=$q(),c=rp(),d=t.useState([]),p=d[0],h=d[1],f=t.useState([]),g=f[0],m=f[1],v=n.useQueryClient(),y=n.useQuery(exports.QUERY_KEY.fetchUniverseMetadataList,(function(){return fG.fetchUniverseMetadataList(o,a)}),{onSuccess:function(e){h(e)}}),x=y.isIdle,_=y.isLoading,b=y.isError,w=y.refetch,S=n.useQuery(exports.QUERY_KEY.fetchUniverseListDetails,(function(){return fG.fetchUniverseListDetails(o)}),{onSuccess:function(e){m(e)}}),T=S.isIdle,C=S.isLoading,M=S.isError,I=S.refetch;if((b||M)&&e.jsx(eo,{customErrorMessage:"Unable to fetch ".concat(l===exports.AppName.YBM?"cluster":"universe"," details")}),_||C||x&&void 0===p||T&&void 0===g)return e.jsx(r.Box,F({mt:4,className:c.loadingBox},{children:e.jsx(mG,{className:Y(c.icon,c.inProgressIcon)})}));var E=function(){U(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return v.invalidateQueries(exports.QUERY_KEY.fetchUniverseMetadataList),v.invalidateQueries(exports.QUERY_KEY.fetchUniverseListDetails),[4,w()];case 1:return e.sent(),[4,I()];case 2:return e.sent(),[2]}}))}))};return e.jsx(Nc,{body:e.jsxs(r.Box,F({ml:1,mr:1,mt:1,className:u.flexColumn},{children:[e.jsx(er,F({variant:"secondary",size:"medium",onClick:function(){E()},className:u.refreshButton},{children:"Refresh"})),sc(o)&&p.length>0?e.jsx(e.Fragment,{children:e.jsx(r.Box,F({mt:2},{children:e.jsx(Xq,{apiUrl:o,customerUuid:a,metadata:p,universeList:g,onActionPerformed:E})}))}):e.jsx(r.Box,F({className:u.noUniverses},{children:sc(o)?"Currently, there are no universes attached to Perf Advisor service":"Customer is not registered with Perf Advisor service. Please register and then enable Perf Advisor for universes."}))]}))})},exports.DB_TAG=Ld,exports.DEFAULT_ERROR_MESSAGES=tp,exports.DEFAULT_RECORDS_PER_PAGE=Sd,exports.ELLIPSIS="...",exports.GLOBAL_RUNTIME_CONFIG=Cd,exports.GROUP_BY_OPERATIONS=Jc,exports.GenericFailure=za,exports.GroupEventsParam=Hc,exports.IN_DEVELOPMENT_MODE=tG,exports.MAX_OUTLIER_NUM_NODES=10,exports.METRICS_OUTLIER_DATABASES_STORAGE_KEY=Kd,exports.METRICS_OUTLIER_TABLES_STORAGE_KEY=$d,exports.METRICS_SESSION_STORAGE_KEY=Xd,exports.METRIC_DB_RESOURCES_WITH_GRAPHS=Gd,exports.METRIC_FONT=ld,exports.METRIC_NAMES=Zd,exports.METRIC_RESOURCES_WITH_GRAPHS=qd,exports.METRIC_TABLES_RESOURCES_WITH_GRAPHS=Yd,exports.METRIC_TABS=Hd,exports.METRIC_TABS_DATABASES=Wd,exports.METRIC_TABS_TABLES=Vd,exports.MIN_OUTLIER_NUM_NODES=3,exports.MORE=Ed,exports.MetricConsts=cd,exports.MetricOrigin={TABLE:"table",CUSTOMER:"customer",UNIVERSE:"universe"},exports.MetricSplitSelector=hp,exports.MetricsAnalysisEntry=OG,exports.NAME_COLOR_MAPPING=ep,exports.OutlierSelector=gp,exports.PerfAdvisorAPI=fG,exports.PerfAdvisorEntry=function(i){var o,a,s,l,u,c,d,p,h=i.timezone,f=i.universeUuid,g=i.appName,m=i.apiUrl,v=i.onSelectedIssue,y=i.onSelectedQuery,x=Gq(),_=rp(),b=new Date,w=new Date;w.setDate((new Date).getDate()-1);var S=t.useState(null);S[0];var T=S[1],C=t.useState(exports.AnomalyDetectionStatusText.EMPTY),M=C[0],I=C[1];t.useEffect((function(){localStorage.setItem("appName",g)}),[]),n.useQuery(exports.QUERY_KEY.fetchAnomalyDetectionStatus,(function(){return fG.fetchAnomalyDetectionStatus(f,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||lc(t))T(null);else{var n=new Date(t),r=gc(n,fc,h);T(r)}I(e.status)},onError:function(e){console.error("Failed to fetch anomaly detection status",e)},refetchOnWindowFocus:!0,refetchInterval:1e4,enabled:M!==exports.AnomalyDetectionStatusText.SUCCESS});var E=new URLSearchParams(window.location.search),A=E.get("startTime"),D=E.get("endTime"),k=E.get("duration"),O=t.useState(A?new Date(A).toISOString():null),N=O[0],R=O[1],P=t.useState(D?new Date(D).toISOString():null),L=P[0],B=P[1],j=t.useState(""),z=j[0],U=j[1],H=t.useState({start:A?new Date(A):w,end:D?new Date(D):b}),V=H[0],W=H[1],G=t.useState({start:gc(V.start,fc,h),end:gc(V.end,fc,h)}),q=G[0],Q=G[1],Z=t.useState(null!=k?k:Od[0].value),X=Z[0],$=Z[1],K=t.useState(null),J=K[0],ee=K[1],te=t.useState(exports.InsightsTabs.ANOMALIES),ne=te[0],re=te[1],ie=function(e,t){R(e),B(t)},oe=function(){var e=null==w?void 0:w.toISOString(),t=null==b?void 0:b.toISOString(),n=new Date;X===kd.SEVEN_DAYS?(n.setDate(n.getDate()-7),e=null==n?void 0:n.toISOString()):X===kd.TWO_DAYS?(n.setDate(n.getDate()-2),e=null==n?void 0:n.toISOString()):X===kd.ONE_DAY?(n.setDate(n.getDate()-1),e=null==n?void 0:n.toISOString()):X===kd.SIX_HOURS?(n.setHours(n.getHours()-6),e=null==n?void 0:n.toISOString()):X===kd.ONE_HOUR&&(n.setHours(n.getHours()-1),e=null==n?void 0:n.toISOString()),X!==Dd.CUSTOM&&ie(e,t)};t.useEffect((function(){oe();var e=new URLSearchParams(window.location.search).get("duration");sc(e)&&$(e)}),[]),t.useEffect((function(){oe()}),[X]),t.useEffect((function(){var e=V.start,t=V.end;e>t?U("Start Date is greater than End Date"):(t-e)/6e4<=5?U("Time difference should be a minimum of 1 hour"):X===Dd.CUSTOM&&(U(""),Q({start:gc(e,fc,h),end:gc(t,fc,h)}),ie(null==e?void 0:e.toISOString(),null==t?void 0:t.toISOString()))}),[V]);var ae=n.useQuery(exports.QUERY_KEY.fetchUniverseById,(function(){return fG.fetchUniverseById(f,m)})),se=n.useQuery(exports.QUERY_KEY.getUniverseMetadata,(function(){return fG.getUniverseMetadata(f,m)})),le=null===(s=null===(a=null===(o=null==ae?void 0:ae.error)||void 0===o?void 0:o.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.error,ue=null===(c=null===(u=null===(l=null==se?void 0:se.error)||void 0===l?void 0:l.response)||void 0===u?void 0:u.data)||void 0===c?void 0:c.error,ce=null===(d=null==ae?void 0:ae.data)||void 0===d?void 0:d.ashEnabled,de=null===(p=null==ae?void 0:ae.data)||void 0===p?void 0:p.ashSupported,pe=n.useMutation((function(){return fG.scheduleAnomalyDetectionStatus(f,m)}),{onSuccess:function(e){var t=e.detectionEndTime;if(!t||lc(t))T(null);else{var n=new Date(t),r=gc(n,fc,h);T(r)}I(e.status)},onError:function(e){var t,n,r,i;hq.error(sc(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error)?null===(i=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.error:tp.ANOMALY_SCHEDULE_ERROR)}}),he=function(e){ee(e)};return e.jsx(r.Box,{children:e.jsxs(e.Fragment,{children:[se.isLoading||ae.isLoading&&e.jsx(r.Box,F({mt:2,className:_.loadingBox},{children:e.jsx(mG,{className:Y(_.icon,_.inProgressIcon)})})),se.isError||ae.isError&&e.jsxs(r.Box,F({mt:2},{children:[(g===exports.AppName.YBA||g===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:se.isError?sc(ue)?ue:tp.UNIVERSE_PA_STATUS_ERROR:sc(le)?le:tp.UNIVERSE_DETAILS_ERROR}),g===exports.AppName.YBM&&e.jsx(za,{text:se.isError?sc(ue)?ue:tp.UNIVERSE_PA_STATUS_ERROR:sc(le)?le:tp.UNIVERSE_DETAILS_ERROR})]})),ae.isSuccess&&e.jsxs(r.Box,{children:[!J&&e.jsxs(r.Box,F({p:g===exports.AppName.WEB&&3,pl:g!==exports.AppName.WEB&&2},{children:[e.jsxs(r.Box,F({className:x.header},{children:[(ne===exports.InsightsTabs.ANOMALIES||ne===exports.InsightsTabs.INSIGHTS)&&e.jsx(er,F({variant:"primary",size:"medium",onClick:function(){pe.mutate()},className:x.detectionButton,disabled:M===exports.AnomalyDetectionStatusText.SCHEDULED||M===exports.AnomalyDetectionStatusText.IN_PROGRESS,showSpinner:M===exports.AnomalyDetectionStatusText.SCHEDULED||M===exports.AnomalyDetectionStatusText.IN_PROGRESS,startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_436_182000)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7.5C4 7.77614 3.77614 8 3.5 8C3.22386 8 3 7.77614 3 7.5V5.5C3 4.11929 4.11929 3 5.5 3H7.5C7.77614 3 8 3.22386 8 3.5C8 3.77614 7.77614 4 7.5 4H5.5C4.67157 4 4 4.67157 4 5.5V7.5ZM16.5 4C16.2239 4 16 3.77614 16 3.5C16 3.22386 16.2239 3 16.5 3H18.5C19.8807 3 21 4.11929 21 5.5V7.5C21 7.77614 20.7761 8 20.5 8C20.2239 8 20 7.77614 20 7.5V5.5C20 4.67157 19.3284 4 18.5 4H16.5ZM20 16.5C20 16.2239 20.2239 16 20.5 16C20.7761 16 21 16.2239 21 16.5V18.5C21 19.8807 19.8807 21 18.5 21H16.5C16.2239 21 16 20.7761 16 20.5C16 20.2239 16.2239 20 16.5 20H18.5C19.3284 20 20 19.3284 20 18.5V16.5ZM7.5 20C7.77614 20 8 20.2239 8 20.5C8 20.7761 7.77614 21 7.5 21H5.5C4.11929 21 3 19.8807 3 18.5V16.5C3 16.2239 3.22386 16 3.5 16C3.77614 16 4 16.2239 4 16.5V18.5C4 19.3284 4.67157 20 5.5 20H7.5Z' fill='white'/%3e%3cpath d='M12 7L12 9' stroke='white' stroke-linecap='round'/%3e%3cpath d='M12 15L12 17' stroke='white' stroke-linecap='round'/%3e%3cpath d='M7 12L9 12' stroke='white' stroke-linecap='round'/%3e%3cpath d='M15 12L17 12' stroke='white' stroke-linecap='round'/%3e%3ccircle cx='12' cy='12' r='3.5' stroke='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_436_182000'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",alt:"Detection Icon"})},{children:"Run Detection"})),ne!==exports.InsightsTabs.METRICS&&e.jsxs(e.Fragment,{children:[e.jsx(Fa,F({className:Y(_.selectBox,_.overrideMuiInput),"data-testid":"PrimaryDashboardTimeFilterSelect",value:X},{children:Od.map((function(t){return e.jsx(r.MenuItem,F({value:t.value,onClick:function(e){!function(e){var t,n;$(e);var r=new URLSearchParams(window.location.search);e===Dd.CUSTOM?(r.set("startTime",null===(t=null==V?void 0:V.start)||void 0===t?void 0:t.toISOString()),r.set("endTime",null===(n=null==V?void 0:V.end)||void 0===n?void 0:n.toISOString())):(r.delete("startTime"),r.delete("endTime")),r.set("duration",e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(r.toString()))}(t.value)},className:Y(_.menuItem,_.regularText)},{children:t.label}),"duration-".concat(t.label))}))})),X===Dd.CUSTOM&&e.jsxs(e.Fragment,{children:[e.jsx(r.Box,F({className:_.startDatePickerBox},{children:e.jsx(vc,{className:_.dateTimePicker,dateTimeLabel:"",value:q.start,defaultDateTimeValue:q.start,onChange:function(e){var t=new Date(e.target.value);W((function(e){return F(F({},e),{start:t})}));var n=new URLSearchParams(window.location.search);n.set("startTime",t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},isReadOnly:!0})})),e.jsx(r.Box,F({className:Y(sc(z)&&_.endDatePickerBox)},{children:e.jsx(vc,{className:Y(sc(z)?_.dateTimePickerEnd:_.dateTimePicker),dateTimeLabel:"",defaultDateTimeValue:q.end,value:q.end,onChange:function(e){var t=new Date(e.target.value);W((function(e){return F(F({},e),{end:t})}));var n=new URLSearchParams(window.location.search);n.set("endTime",t.toISOString()),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(n.toString()))},errorMsg:z,isReadOnly:!0})}))]})]})]})),e.jsx(r.Box,F({mt:g===exports.AppName.WEB&&2},{children:e.jsx(Vq,{startTime:N,endTime:L,universeUuid:f,appName:g,timezone:h,isAshEnabled:!!ce,isAshSupported:!!de,apiUrl:m,universeData:null==ae?void 0:ae.data,onClickShowMoreAnomalies:he,onEChartsDateSelect:function(e,t){var n=new Date(e),r=new Date(t);$(Dd.CUSTOM),W({start:new Date(e),end:new Date(t)});var i=new URLSearchParams(window.location.search);i.set("startTime",n.toISOString()),i.set("endTime",r.toISOString()),i.set("duration",Dd.CUSTOM),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(i.toString()))},onSelectedIssue:v,onSelectedQuery:y,notifyTabChange:function(e){re(e)},anomalyDetectionStatus:M})}))]})),sc(J)&&e.jsx(Yq,{onClickShowMoreAnomalies:he,selectedTab:ne,showMoreAnomalyCategory:J,startTime:N,endTime:L,universeUuid:f,appName:g,apiUrl:m,onSelectedIssue:v})]})]})})},exports.QUERIES=sd,exports.QUERY_DETAILS=Pd,exports.RCA_GANT_CHART=Qd,exports.REACT_APP_API_URL=nG,exports.REGION_TAG=zd,exports.RUNTIME_CONFIG_KEYS=Md,exports.RuntimeConfigs=function(i){var o,a,s=i.apiUrl,l=i.appName,u=i.toast,c=nQ(),d=rp(),p=n.useQueryClient(),h=t.useState(""),f=h[0],g=h[1],m=t.useState([]),v=m[0],y=m[1],x=t.useState(Sd[0]),_=x[0],b=x[1],w=t.useState(0),S=w[0],T=w[1],C=t.useState(!1),M=C[0],I=C[1],E=t.useState(!1),A=E[0],D=E[1],k=t.useState(null),O=k[0],N=k[1],R=n.useQuery([exports.QUERY_KEY.fetchRuntimeConfigs],(function(){return fG.fetchRuntimeConfigs(Cd,s)}),{onSuccess:function(e){y(e)}}),P=R.error,L=R.isLoading,B=R.isError,j=R.isIdle,z=R.refetch,V=null===(a=null===(o=null==P?void 0:P.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.error,W=function(){U(void 0,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return p.invalidateQueries(exports.QUERY_KEY.fetchRuntimeConfigs),[4,z()];case 1:return e.sent(),[2]}}))}))},G=[{name:"path",label:"Config Key",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsxs(r.Box,{children:[e.jsx("span",{children:v[i].path}),e.jsx(r.Tooltip,F({title:v[i].description,arrow:!0,placement:"top",className:c.tooltip},{children:e.jsx("img",{src:AG,alt:"info"})}))]})}}},{name:"description",label:"Config Description",options:{sort:!0,filter:!0}},{name:"value",label:"Config Value",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var i=n.rowIndex;return e.jsx(r.Box,{children:e.jsx("span",F({className:v[i].overriden?c.textColor:""},{children:v[i].value}))})}}},{name:"actions",label:"Actions",options:{sort:!0,filter:!0,customBodyRender:function(t,n){var r=n.rowIndex;return e.jsxs(e.Fragment,{children:[e.jsx(er,F({size:"medium",variant:"pill",onClick:function(){return e=v[r],N(e),void I(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Update"}))})),e.jsx(er,F({size:"medium",onClick:function(){return e=v[r],N(e),void D(!0);var e}},{children:e.jsx("span",F({style:{color:"#303A78",textDecoration:"underline"}},{children:"Reset"}))}))]})}}}];return e.jsxs(r.Box,F({mt:2,ml:4,className:c.overrideMuiTableContainer},{children:[e.jsx(r.Typography,F({variant:"h4"},{children:"Global Runtime Configurations"})),L&&e.jsx(r.Box,F({className:d.loadingBox},{children:e.jsx(mG,{className:Y(d.icon,d.inProgressIcon)})})),(B||j&&null===v)&&e.jsxs(r.Box,F({className:d.recommendation},{children:[(l===exports.AppName.YBA||l===exports.AppName.WEB)&&e.jsx(eo,{customErrorMessage:sc(V)?V:tp.RUNTIME_CONFIGS_ERROR}),l===exports.AppName.YBM&&e.jsx(za,{text:sc(V)?V:tp.RUNTIME_CONFIGS_ERROR})]})),e.jsx(r.Box,F({display:"flex",flexDirection:"row-reverse",alignSelf:"center",mt:2},{children:e.jsx(ro,{placeholder:"Search",className:c.searchBox,onChange:function(e){return g(e.target.value)},value:f,inputProps:{"data-testid":"RuntimeConfigs-SearchInput"}})})),oc(v)&&e.jsx(r.Box,F({mt:2},{children:e.jsx(jc,{title:"Runtime Configuration Variables",className:c.overrideMuiTable,data:v,columns:G,options:{filter:!0,selectableRowsOnClick:!1,rowHover:!0,rowsPerPage:_,page:S,onChangePage:function(e){return T(e)},onChangeRowsPerPage:function(e){b(e),T(0)},searchText:f,customSearch:function(e,t){for(var n=function(n){var r=String(t[n]).toLocaleLowerCase();if(r.includes(e.toLocaleLowerCase()))return{value:!0};if(n===t.length-1){var i=e.split(" ").filter(Boolean),o=0;return{value:i.every((function(e){var t=r.indexOf(e.toLocaleLowerCase(),o);return t>-1&&(o=t+e.length,!0)}))}}},r=1;r<t.length;r++){var i=n(r);if("object"==typeof i)return i.value}return!1},rowsPerPageOptions:Sd}})})),M&&O&&e.jsx(tQ,{open:M,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){I(!1)},toast:u}),A&&O&&e.jsx(Jq,{open:A,data:O,apiUrl:s,onActionPerformed:W,onClose:function(){D(!1)},toast:u})]}))},exports.SQL_QUERY_REQUEST_GRAPHS=yd,exports.SplitMode=Vc,exports.SplitType=Wc,exports.TABLET_TAG=jd,exports.TABLE_REQUEST_GRAPHS=["table_scan_ops","table_tup_read_ops","table_write_ops"],exports.TABLE_TAG=Bd,exports.TIME_FILTER_LABEL=Dd,exports.TIME_FILTER_VALUES=kd,exports.TYPE="type",exports.URL_TAB_PATH=td,exports.USER_TAG="User",exports.VIEW_MORE=Ad,exports.WAIT_EVENT_MAPPING=Kc,exports.YBAlert=Xi,exports.YBButton=er,exports.YBCheckbox=Ha,exports.YBCheckboxField=bp,exports.YBCodeBlock=Ii,exports.YBCodeBlockCopy=function(n){var i=n.showCopyButton;n.analyticsEventProps;var o=n.multiBlock,a=n.text,s=n.codeClassName,l=n.preClassName,u=n.lang,c=n.containerClassName,d=n.dataTestId;n.appName;var p=n.enabledExpandCollapse,h=void 0!==p&&p,f=n.showExpandCollapse,g=void 0===f||f,m=n.collapseHeight,v=void 0===m?50:m,y=$i(),x=t.useRef(null),_=t.useRef(null),b=t.useState(!h),w=b[0],S=b[1],T=t.useState(!1),C=T[0],M=T[1],I=t.useContext(Ei).addToast,E=null!=u?u:"language-plaintext";t.useEffect((function(){pi.highlightAll()}),[a]),t.useEffect((function(){S(!1),M(!1)}),[a]);var A=function(e){return U(void 0,void 0,void 0,(function(){return H(this,(function(t){switch(t.label){case 0:return[4,navigator.clipboard.writeText(e)];case 1:return t.sent(),I(exports.AlertVariant.Success,"Successfully copied code block",2e3),[2]}}))}))},D=function(e){return U(void 0,void 0,void 0,(function(){var t,n;return H(this,(function(r){switch(r.label){case 0:return[4,A(null===(n=(null===(t=null==e?void 0:e.currentTarget)||void 0===t?void 0:t.previousSibling).innerText)||void 0===n?void 0:n.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'"))];case 1:return r.sent(),[2]}}))}))};return t.useEffect((function(){var e;w&&(null==_?void 0:_.current)&&(null===(e=null==_?void 0:_.current)||void 0===e||e.scrollTo({top:0}))}),[w]),t.useLayoutEffect((function(){var e=setTimeout((function(){var e,t;(null==_?void 0:_.current)&&M(h&&Math.round(null!==(t=null===(e=null==_?void 0:_.current)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0)>v)}),100);return function(){return clearTimeout(e)}}),[a,v,h]),e.jsxs(r.Box,F({className:Y(y.block,c),"data-testid":null!=d?d:""},{children:[e.jsx(r.Collapse,F({in:w,collapsedHeight:C||!g?v:"fit-content"},{children:e.jsx("div",F({ref:_},{children:o&&Array.isArray(a)?null==a?void 0:a.map((function(t,n){return e.jsxs("pre",F({className:Y(y.code,y.hoverBlock,l)},{children:[e.jsx("code",F({className:Y(y.innerBlock,s,E)},{children:t})),i&&e.jsx(er,F({variant:"ghost",className:Y(y.copyButton,y.inlineButton,"yb-copy-btn"),onClick:D},{children:"Copy"}))]}),"code-block-line-".concat(String(n+1)))})):e.jsxs("pre",F({className:Y(y.code,l)},{children:[e.jsx("code",F({className:Y(y.innerBlock,s,E),ref:x},{children:a})),i&&e.jsx(r.IconButton,F({className:y.copyIcon,onClick:function(e){e.stopPropagation(),function(){var e,t,n;A(null!==(n=null===(t=null===(e=null==x?void 0:x.current)||void 0===e?void 0:e.innerText)||void 0===t?void 0:t.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'"))&&void 0!==n?n:"")}()}},{children:e.jsx(mi,{fontSize:"small"})}))]}))}))})),g&&C&&e.jsx(r.Box,F({mb:1,display:"flex",alignItems:"center",justifyContent:"flex-end"},{children:e.jsxs(r.Box,F({component:"a",className:y.handPointer,display:"flex",alignItems:"center",onClick:function(){return S(!w)}},{children:[e.jsx(r.Typography,F({variant:"body2",color:"primary"},{children:e.jsx("strong",{children:w?"Collapse":"Show All"})})),e.jsx(xi,{className:Y(y.caret,w&&y.rotate)})]}))}))]}))},exports.YBDateTimePicker=vc,exports.YBErrorIndicator=eo,exports.YBInfinitePagination=kc,exports.YBInput=ro,exports.YBInputField=Oa,exports.YBLabel=no,exports.YBModal=Ic,exports.YBPagination=Ac,exports.YBPanelItem=Nc,exports.YBSelect=Fa,exports.YBTable=jc,exports.YBToggle=up,exports.YBToggleField=cp,exports.YBTooltip=Ba,exports.ZONE_TAG=Ud,exports.ZoneNodeSelector=yp,exports.filterDurations=Nd,exports.getCustomFooterComponent=np,exports.getRowCellComponent=ap,exports.isDefinedNotNull=rc,exports.isEmptyArray=ic,exports.isEmptyObject=function(e){return void 0===e||Hu(e)&&0===Object.keys(e).length},exports.isEmptyString=lc,exports.isNonEmptyArray=oc,exports.isNonEmptyObject=ac,exports.isNonEmptyString=sc,exports.isNullOrEmpty=function(e){return null==e||Hu(e)&&0===Object.keys(e).length},exports.isValidObject=uc,exports.isYAxisGreaterThanThousand=cc,exports.metricOutlierSelectors=vd,exports.metricSplitSelectors=gd,exports.otherSplitSelectors=md,exports.removeNullProperties=function(e){for(var t in e)null!==e[t]&&void 0!==e[t]||delete e[t]},exports.useCodeBlockStyles=Ki;
11
11
  //# sourceMappingURL=index.js.map