/* * licensed to the apache software foundation (asf) under one * or more contributor license agreements. see the notice file * distributed with this work for additional information * regarding copyright ownership. the asf licenses this file * to you under the apache license, version 2.0 (the * "license"); you may not use this file except in compliance * with the license. you may obtain a copy of the license at * * http://www.apache.org/licenses/license-2.0 * * unless required by applicable law or agreed to in writing, * software distributed under the license is distributed on an * "as is" basis, without warranties or conditions of any * kind, either express or implied. see the license for the * specific language governing permissions and limitations * under the license. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getsysteminfosync?{browser:{},os:{},node:!1,wxa:!0,canvassupported:!0,svgsupported:!1,toucheventssupported:!0,domsupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvassupported:!0,domsupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvassupported:!0,svgsupported:!0,domsupported:!1}:function(t){var e={},i=t.match(/firefox\/([\d.]+)/),n=t.match(/msie\s([\d.]+)/)||t.match(/trident\/.+?rv:(([\d.]+))/),a=t.match(/edge\/([\d.]+)/),o=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);a&&(e.edge=!0,e.version=a[1]);o&&(e.wechat=!0);return{browser:e,os:{},node:!1,canvassupported:!!document.createelement("canvas").getcontext,svgsupported:"undefined"!=typeof svgrect,toucheventssupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointereventssupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domsupported:"undefined"!=typeof document}}(navigator.useragent);var s={"[object function]":1,"[object regexp]":1,"[object date]":1,"[object error]":1,"[object canvasgradient]":1,"[object canvaspattern]":1,"[object image]":1,"[object canvas]":1},l={"[object int8array]":1,"[object uint8array]":1,"[object uint8clampedarray]":1,"[object int16array]":1,"[object uint16array]":1,"[object int32array]":1,"[object uint32array]":1,"[object float32array]":1,"[object float64array]":1},u=object.prototype.tostring,i=array.prototype,r=i.foreach,h=i.filter,a=i.slice,c=i.map,d=i.reduce,o={};function f(t,e){"createcanvas"===t&&(y=null),o[t]=e}function d(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object array]"===i){if(!$(t)){e=[];for(var n=0,a=t.length;n>1)%2;s.csstext=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendchild(r),i.push(r)}return i}(t,r),r);if(s)return s(rt,n,a),i.zrx=rt[0],void(i.zry=rt[1])}i.zrx=i.zry=0}function vt(t,e,i){if(null!=(e=e||window.event).zrx)return e;var n=e.type;if(n&&0<=n.indexof("touch")){var a="touchend"!==n?e.targettouches[0]:e.changedtouches[0];a&&zt(t,a,e,i)}else zt(t,e,e,i),e.zrdelta=e.wheeldelta?e.wheeldelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&ot.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function gt(t,e,i){nt?t.addeventlistener(e,i):t.attachevent("on"+e,i)}var ft=nt?function(t){t.preventdefault(),t.stoppropagation(),t.cancelbubble=!0}:function(t){t.returnvalue=!1,t.cancelbubble=!0};function wt(t){return 2===t.which||3===t.which}function ht(){this._track=[]}function zt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return math.sqrt(e*e+i*i)}ht.prototype={constructor:ht,recognize:function(t,e,i){return this._dotrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_dotrack:function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,r=n.length;o=this._maxsize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),oe(t,e),e):void le(e,0,0,0,1):7===a.length?0<=(n=parseint(a.substr(1),16))&&n<=16777215?(le(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),oe(t,e),e):void le(e,0,0,0,1):void 0;var o=a.indexof("("),r=a.indexof(")");if(-1!==o&&r+1===a.length){var s=a.substr(0,o),l=a.substr(o+1,r-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void le(e,0,0,0,1);u=te(l.pop());case"rgb":return 3!==l.length?void le(e,0,0,0,1):(le(e,ae(l[0]),ae(l[1]),ae(l[2]),u),oe(t,e),e);case"hsla":return 4!==l.length?void le(e,0,0,0,1):(l[3]=te(l[3]),re(l,e),oe(t,e),e);case"hsl":return 3!==l.length?void le(e,0,0,0,1):(re(l,e),oe(t,e),e);default:return}}le(e,0,0,0,1)}}function re(t,e){var i=(parsefloat(t[0])%360+360)%360/360,n=te(t[1]),a=te(t[2]),o=a<=.5?a*(n+1):a+n-a*n,r=2*a-o;return le(e=e||[],me(255*de(r,o,i+1/3)),me(255*de(r,o,i)),me(255*de(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ze(t,e){var i=ee(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=math.min(i-1,u-2)}c=e;var n=g[(d=i)+1]-g[i];if(0!=n)if(s=(e-g[i])/n,l)if(i=m[i],m=m[0===i?i:i-1],a=m[u-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new bi(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},bi.create=function(t){return new bi(t.x,t.y,t.width,t.height)};var si=function(t){for(var e in t=t||{},pi.call(this,t),t)t.hasownproperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};si.prototype={constructor:si,isgroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childat:function(t){return this._children[t]},childofname:function(t){for(var e=this._children,i=0;i>>1])<0?l=o:s=1+o;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[i+h])<0?l=h:r=h+1}return l}function li(p,g){var r,s,m=ii,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],a=s[t+1];s[t]=i+a,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var o=ci(p[n],p,e,i,0,g);e+=o,0!==(i-=o)&&0!==(a=di(p[e+i-1],p,n,a,a-1,g))&&(i<=a?function(t,e,i,n){var a=0;for(a=0;as[t+1])break;e(t)}},this.forcemergeruns=function(){for(;1>=1;return t+e}(a);do{if((o=ai(t,i,n,e))=e.maxiterations){t+=e.ellipsis;break}var s=0===r?mn(t,a,e.asccharwidth,e.cncharwidth):0f)return{lines:[],width:0,height:0};c.textwidth=ln(c.text,w);var s=x.textwidth,m=null==s||"auto"===s;if("string"==typeof s&&"%"===s.charat(s.length-1))c.percentwidth=s,u.push(c),s=0;else{if(m){s=c.textwidth;var i=x.textbackgroundcolor,a=i&&i.image;a&&tn(a=$i(a))&&(s=math.max(s,a.width*b/a.height))}var t=_?_[1]+_[3]:0;s+=t;var d=null!=d?d-v:null;null!=d&&dn[0]){for(r=0;rt);r++);o=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(o){var l=o.dom;l.nextsibling?s.insertbefore(e.dom,l.nextsibling):s.appendchild(e.dom)}else s.firstchild?s.insertbefore(e.dom,s.firstchild):s.appendchild(e.dom)}else ci("layer of zlevel "+t+" is not valid")},eachlayer:function(t,e){var i,n,a=this._zlevellist;for(n=0;n=o.length&&o.push({option:t})}}),o}function aa(t){var r=q();va(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),va(t,function(t,e){var i=t.option;y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyinfo||(t.keyinfo={})}),va(t,function(t,e){var i=t.exist,n=t.option,a=t.keyinfo;if(ya(n)){if(a.name=null!=n.name?n.name+"":i?i.name:_a+e,i)a.id=i.id;else if(null!=n.id)a.id=n.id+"";else for(var o=0;a.id="\0"+a.name+"\0"+o++,r.get(a.id););r.set(a.id,t)}})}function ta(t){var e=t.name;return!(!e||!e.indexof(_a))}function da(t){return ya(t)&&t.id&&0===(t.id+"").indexof("\0_ec_\0")}function ca(e,t){return null!=t.dataindexinside?t.dataindexinside:null!=t.dataindex?k(t.dataindex)?n(t.dataindex,function(t){return e.indexofrawindex(t)}):e.indexofrawindex(t.dataindex):null!=t.name?k(t.name)?n(t.name,function(t){return e.indexofname(t)}):e.indexofname(t.name):void 0}function la(){var e="__\0ec_inner_"+ka+++"_"+math.random().tofixed(5);return function(t){return t[e]||(t[e]={})}}var ka=0;function pa(s,l,u){if(r(l)){var t={};t[l+"index"]=0,l=t}var e=u&&u.defaultmaintype;!e||na(l,e+"index")||na(l,e+"id")||na(l,e+"name")||(l[e+"index"]=0);var h={};return va(l,function(t,e){t=l[e];if("dataindex"!==e&&"dataindexinside"!==e){var i=e.match(/^(\w+)(index|id|name)$/)||[],n=i[1],a=(i[2]||"").tolowercase();if(!(!n||!a||null==t||"index"===a&&"none"===t||u&&u.includemaintypes&&_(u.includemaintypes,n)<0)){var o={maintype:n};"index"===a&&"all"===t||(o[a]=t);var r=s.querycomponents(o);h[n+"models"]=r,h[n+"model"]=r[0]}}else h[e]=t}),h}function na(t,e){return t&&t.hasownproperty(e)}function oa(t,e,i){t.setattribute?t.setattribute(e,i):t[e]=i}function ea(t){return"auto"===t?v.domsupported?"html":"richtext":t||"html"}function ra(t,i){var n=q(),a=[];return e(t,function(t){var e=i(t);(n.get(e)||(a.push(e),n.set(e,[]))).push(t)}),{keys:a,buckets:n}}var za=".",ba="___ec__component__container___";function va(t){var e={main:"",sub:""};return t&&(t=t.split(za),e.main=t[0]||"",e.sub=t[1]||""),e}function ga(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return l(e.prototype,t),e.extend=this.extend,e.supercall=ha,e.superapply=za,w(e,this),e.superclass=i,e}}var fa=0;function wa(t){var e=["__\0is_clz",fa++,math.random().tofixed(3)].join("_");t.prototype[e]=!0,t.isinstance=function(t){return!(!t||!t[e])}}function ha(t,e){var i=u(arguments,2);return this.superclass.prototype[e].apply(t,i)}function za(t,e,i){return this.superclass.prototype[e].apply(t,i)}function ua(i,t){t=t||{};var a={};if(i.registerclass=function(t,e){if(e)if(function(t){y(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t),'componenttype "'+t+'" illegal')}(e),(e=va(e)).sub){if(e.sub!==ba){(function(t){var e=a[t.main];e&&e[ba]||((e=a[t.main]={})[ba]=!0);return e})(e)[e.sub]=t}}else a[e.main]=t;return t},i.getclass=function(t,e,i){var n=a[t];if(n&&n[ba]&&(n=e?n[e]:null),i&&!n)throw new error(e?"component "+t+"."+(e||"")+" not exists. load it first.":t+".type should be specified.");return n},i.getclassesbymaintype=function(t){t=va(t);var i=[],e=a[t.main];return e&&e[ba]?e(e,function(t,e){e!==ba&&i.push(t)}):i.push(e),i},i.hasclass=function(t){return t=va(t),!!a[t.main]},i.getallclassmaintypes=function(){var i=[];return e(a,function(t,e){i.push(e)}),i},i.hassubtypes=function(t){t=va(t);var e=a[t.main];return e&&e[ba]},i.parseclasstype=va,t.registerwhenextend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerclass(e,t.type)})}return i}function xa(s){for(var t=0;tthis._ux||fo(e-this._yi)>this._uy||this._len<5;return this.adddata(ko.l,t,e),this._ctx&&i&&(this._needsdash()?this._dashedlineto(t,e):this._ctx.lineto(t,e)),i&&(this._xi=t,this._yi=e),this},beziercurveto:function(t,e,i,n,a,o){return this.adddata(ko.c,t,e,i,n,a,o),this._ctx&&(this._needsdash()?this._dashedbezierto(t,e,i,n,a,o):this._ctx.beziercurveto(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticcurveto:function(t,e,i,n){return this.adddata(ko.q,t,e,i,n),this._ctx&&(this._needsdash()?this._dashedquadraticto(t,e,i,n):this._ctx.quadraticcurveto(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,o){return this.adddata(ko.a,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=bo(a)*i+t,this._yi=vo(a)*i+e,this},arcto:function(t,e,i,n,a){return this._ctx&&this._ctx.arcto(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.adddata(ko.r,t,e,i,n),this},closepath:function(){this.adddata(ko.z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsdash()&&this._dashedlineto(e,i),t.closepath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.tostatic()},stroke:function(t){t&&t.stroke(),this.tostatic()},setlinedash:function(t){if(t instanceof array){this._linedash=t;for(var e=this._dashidx=0,i=0;ie.length&&(this._expanddata(),e=this.data);for(var i=0;il||fo(r-a)>u||c===h-1)&&(t.lineto(o,r),n=o,a=r);break;case ko.c:t.beziercurveto(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ko.q:t.quadraticcurveto(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ko.a:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m=er[n=0]+t&&r<=er[1]+t?h:0}if(o){l=n;n=jo(a),a=jo(l)}else n=jo(n),a=jo(a);amath.pi/2&&p<1.5*math.pi&&(h=-h),c+=h)}}return c}function rr(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;hmath.abs(o[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/a*o+i[0]}function xl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?nan:+t}function _l(t,e,i){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),i?t:+t}function wl(t){return t.sort(function(t,e){return t-e}),t}function bl(t){if(t=+t,isnan(t))return 0;for(var e=1,i=0;math.round(t*e)/e!==t;)e*=10,i++;return i}function sl(t){var e=t.tostring(),i=e.indexof("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/a}var al=9007199254740991;function tl(t){var e=2*math.pi;return(t%e+e)%e}function dl(t){return-vl"'])/g,fl={"&":"&","<":"<",">":">",'"':""","'":"'"};function wl(t){return null==t?"":(t+"").replace(gl,function(t,e){return fl[e]})}function hl(t,e){return"{"+t+(null==e?"":e)+"}"}var zl=["a","b","c","d","e","f","g"];function ul(t,e,i){k(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;o':'':{rendermode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function jl(t,e){return"0000".substr(0,e-(t+="").length)+t}function ql(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="mm-dd\nyyyy");var n=ll(e),a=i?"utc":"",o=n["get"+a+"fullyear"](),r=n["get"+a+"month"]()+1,s=n["get"+a+"date"](),l=n["get"+a+"hours"](),u=n["get"+a+"minutes"](),h=n["get"+a+"seconds"](),c=n["get"+a+"milliseconds"]();return t=t.replace("mm",jl(r,2)).replace("m",r).replace("yyyy",o).replace("yy",o%100).replace("dd",jl(s,2)).replace("d",s).replace("hh",jl(l,2)).replace("h",l).replace("mm",jl(u,2)).replace("m",u).replace("ss",jl(h,2)).replace("s",h).replace("sss",jl(c,3))}function kl(t){return t?t.charat(0).touppercase()+t.substr(1):t}var $l=fn;var jl=(object.freeze||object)({addcommas:zl,tocamelcase:bl,normalizecssarray:vl,encodehtml:wl,formattpl:ul,formattplsimple:xl,gettooltipmarker:yl,formattime:ql,capitalfirst:kl,truncatetext:$l,gettextboundingrect:function(t){return un(t.text,t.font,t.textalign,t.textverticalalign,t.textpadding,t.textlineheight,t.rich,t.truncate)},gettextrect:function(t,e,i,n,a,o,r,s){return un(t,e,i,n,a,s,o,r)}}),ql=e,tu=["left","right","top","bottom","width","height"],eu=[["width","left","right"],["height","top","bottom"]];function iu(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachchild(function(t,e){var i,n,a=t.position,o=t.getboundingrect(),r=c.childat(e+1),s=r&&r.getboundingrect();if("horizontal"===h){var l=o.width+(s?-s.x+o.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,o.height):math.max(v,o.height)}else{var u=o.height+(s?-s.y+o.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,o.width):math.max(v,o.width)}t.newline||(a[0]=g,a[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var nu=iu;a(iu,"vertical"),a(iu,"horizontal");function au(t,e,i){i=vl(i||0);var n=e.width,a=e.height,o=xl(t.left,n),r=xl(t.top,a),s=xl(t.right,n),l=xl(t.bottom,a),u=xl(t.width,n),h=xl(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isnan(u)&&(u=n-s-d-o),isnan(h)&&(h=a-l-c-r),null!=f&&(isnan(u)&&isnan(h)&&(n/ae)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[a];return t&&(o[t]=u),n.coloridx=(a+1)%l.length,u}}};function xu(t){var e=t.get("coordinatesystem"),i={coordsysname:e,coordsysdims:[],axismap:q(),categoryaxismap:q()},n=_u[e];if(n)return n(t,i,i.axismap,i.categoryaxismap),i}var _u={cartesian2d:function(t,e,i,n){var a=t.getreferringcomponents("xaxis")[0],o=t.getreferringcomponents("yaxis")[0];e.coordsysdims=["x","y"],i.set("x",a),i.set("y",o),wu(a)&&(n.set("x",a),e.firstcategorydimindex=0),wu(o)&&(n.set("y",o),e.firstcategorydimindex=1)},singleaxis:function(t,e,i,n){var a=t.getreferringcomponents("singleaxis")[0];e.coordsysdims=["single"],i.set("single",a),wu(a)&&(n.set("single",a),e.firstcategorydimindex=0)},polar:function(t,e,i,n){var a=t.getreferringcomponents("polar")[0],o=a.findaxismodel("radiusaxis"),r=a.findaxismodel("angleaxis");e.coordsysdims=["radius","angle"],i.set("radius",o),i.set("angle",r),wu(o)&&(n.set("radius",o),e.firstcategorydimindex=0),wu(r)&&(n.set("angle",r),e.firstcategorydimindex=1)},geo:function(t,e,i,n){e.coordsysdims=["lng","lat"]},parallel:function(t,a,o,r){var s=t.ecmodel,e=s.getcomponent("parallel",t.get("parallelindex")),l=a.coordsysdims=e.dimensions.slice();e(e.parallelaxisindex,function(t,e){var i=s.getcomponent("parallelaxis",t),n=l[e];o.set(n,i),wu(i)&&null==a.firstcategorydimindex&&(r.set(n,i),a.firstcategorydimindex=e)})}};function wu(t){return"category"===t.get("type")}var bu="original",su="arrayrows",mu="objectrows",iu="keyedcolumns",au="unknown",tu="typedarray",du="column",cu="row";function lu(t){this.fromdataset=t.fromdataset,this.data=t.data||(t.sourceformat===iu?{}:[]),this.sourceformat=t.sourceformat||au,this.serieslayoutby=t.serieslayoutby||du,this.dimensionsdefine=t.dimensionsdefine,this.encodedefine=t.encodedefine&&q(t.encodedefine),this.startindex=t.startindex||0,this.dimensionsdetectcount=t.dimensionsdetectcount}lu.seriesdatatosource=function(t){return new lu({data:t,sourceformat:v(t)?tu:bu,fromdataset:!1})},wa(lu);var ku=la();function pu(t){var e=t.option,i=e.data,n=v(i)?tu:bu,a=!1,o=e.serieslayoutby,r=e.sourceheader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecmodel.getcomponent("dataset",e.datasetindex||0)}(t);if(l){var u=l.option;i=u.source,n=ku(l).sourceformat,a=!0,o=o||u.serieslayoutby,null==r&&(r=u.sourceheader),s=s||u.dimensions}var h=function(t,e,i,n,a){if(!t)return{dimensionsdefine:nu(a)};var o,r,s,l;if(e===su)"auto"===n||null==n?ou(function(t){null!=t&&"-"!==t&&(r(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],ou(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===cu?t.length:t[0]?t[0].length:null;else if(e===mu)a||(a=function(t){var e,i=0;for(;i":"\n",f="richtext"===c,p={},g=0;function i(t){return{rendermode:c,content:wl(zl(t)),style:p}}var m=this.getdata(),o=m.mapdimension("defaultedtooltip",!0),n=o.length,r=this.getrawvalue(a),s=k(r),v=m.getitemvisual(a,"color");z(v)&&v.colorstops&&(v=(v.colorstops[0]||{}).color),v=v||"transparent";var l=(1":"",n=i+u.join(i||", ");return{rendermode:c,content:n,style:p}}(r):i(n?mh(m,a,o[0]):s?r[0]:r)).content,u=d.seriesindex+"at"+g,y=yl({color:v,type:"item",rendermode:c,markerid:u});p[u]=v,++g;var x=m.getname(a),_=this.name;ta(this)||(_=""),_=_?wl(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?wl(x)+": "+l:l),markers:p}},isanimationenabled:function(){if(v.node)return!1;var t=this.getshallow("animation");return t&&this.getdata().count()>this.getshallow("animationthreshold")&&(t=!1),t},restoredata:function(){this.datatask.dirty()},getcolorfrompalette:function(t,e,i){var n=this.ecmodel,a=yu.getcolorfrompalette.call(this,t,e,i);return a=a||n.getcolorfrompalette(t,e,i)},coorddimtodatadim:function(t){return this.getrawdata().mapdimension(t,!0)},getprogressive:function(){return this.get("progressive")},getprogressivethreshold:function(){return this.get("progressivethreshold")},getaxistooltipdata:null,gettooltipposition:null,pipetask:null,preventincremental:null,pipelinecontext:null});function hh(t){var e=t.name;ta(t)||(t.name=function(t){var i=t.getrawdata(),e=i.mapdimension("seriesname",!0),n=[];return e(e,function(t){var e=i.getdimensioninfo(t);e.displayname&&n.push(e.displayname)}),n.join(" ")}(t)||e)}function zh(t){return t.model.getrawdata().count()}function uh(t){var e=t.model;return e.setdata(e.getrawdata().cloneshallow()),xh}function xh(t,e){t.end>e.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function yh(e,i){e(e.changable_methods,function(t){e.wrapmethod(t,a(jh,i))})}function jh(t){var e=qh(t);e&&e.setoutputend(this.count())}function qh(t){var e=(t.ecmodel||{}).scheduler,i=e&&e.getpipeline(t.uid);if(i){var n=i.currenttask;if(n){var a=n.agentstubmap;a&&(n=a.get(t.uid))}return n}}b(wh,th),b(wh,yu);var kh=function(){this.group=new si,this.uid=ml("viewcomponent")};kh.prototype={constructor:kh,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterforexposedevent:null};var $h=kh.prototype;$h.updateview=$h.updatelayout=$h.updatevisual=function(t,e,i,n){},ga(kh),ua(kh,{registerwhenextend:!0});function jh(){var s=la();return function(t){var e=s(t),i=t.pipelinecontext,n=e.large,a=e.progressiverender,o=e.large=i.large,r=e.progressiverender=i.progressiverender;return!!(n^o||a^r)&&"reset"}}var qh=la(),tc=jh();function ec(){this.group=new si,this.uid=ml("viewchart"),this.rendertask=dh({plan:oc,reset:rc}),this.rendertask.context={view:this}}var ic=ec.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){ac(t.getdata(),n,"emphasis")},downplay:function(t,e,i,n){ac(t.getdata(),n,"normal")},remove:function(t,e){this.group.removeall()},dispose:function(){},incrementalpreparerender:null,incrementalrender:null,updatetransform:null,filterforexposedevent:null};function nc(t,e,i){if(t&&(t.trigger(e,i),t.isgroup&&!rs(t)))for(var n=0,a=t.childcount();nc?i+=p(g("data.partialdata"),{displaycnt:c}):i+=g("data.alldata");for(var r=[],s=0;si.blockindex?i.step:null,o=n&&n.moddatacount;return{step:a,modby:null!=o?math.ceil(o/a):null,moddatacount:o}}},xc.getpipeline=function(t){return this._pipelinemap.get(t)},xc.updatestreammodes=function(t,e){var i=this._pipelinemap.get(t.uid),n=t.getdata().count(),a=i.progressiveenabled&&e.incrementalpreparerender&&n>=i.threshold,o=t.get("large")&&n>=t.get("largethreshold"),r="mod"===t.get("progressivechunkmode")?n:null;t.pipelinecontext=i.context={progressiverender:a,moddatacount:r,large:o}},xc.restorepipelines=function(t){var n=this,a=n._pipelinemap=q();t.eachseries(function(t){var e=t.getprogressive(),i=t.uid;a.set(i,{id:i,head:null,tail:null,threshold:t.getprogressivethreshold(),progressiveenabled:e&&!(t.preventincremental&&t.preventincremental()),blockindex:-1,step:math.round(e||700),count:0}),kc(n,t,t.datatask)})},xc.preparestagetasks=function(){var i=this._stagetaskmap,n=this.ecinstance.getmodel(),a=this.api;e(this._allhandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,a,t,o,r){var s=t.seriestaskmap||(t.seriestaskmap=q()),e=a.seriestype,i=a.gettargetseries;a.createonallseries?o.eachrawseries(l):e?o.eachrawseriesbytype(e,l):i&&i(o,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,dh({plan:ac,reset:tc,count:lc}));i.context={model:t,ecmodel:o,api:r,useclearvisual:a.isvisual&&!a.islayout,plan:a.plan,reset:a.reset,scheduler:n},kc(n,t,i)}var u=n._pipelinemap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removekey(e))})}(this,t,e,n,a),t.overallreset&&function(n,t,e,i,a){var o=e.overalltask=e.overalltask||dh({reset:bc});o.context={ecmodel:i,api:a,overallreset:t.overallreset,scheduler:n};var r=o.agentstubmap=o.agentstubmap||q(),s=t.seriestype,l=t.gettargetseries,u=!0,h=t.modifyoutputend;s?i.eachrawseriesbytype(s,c):l?l(i,a).each(c):(u=!1,e(i.getseries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,dh({reset:sc,ondirty:ic})),o.dirty()),i.context={model:t,overallprogress:u,modifyoutputend:h},i.agent=o,i.__block=u,kc(n,t,i)}var d=n._pipelinemap;r.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),r.removekey(e))})}(this,t,e,n,a)},this)},xc.prepareview=function(t,e,i,n){var a=t.rendertask,o=a.context;o.model=e,o.ecmodel=i,o.api=n,a.__block=!t.incrementalpreparerender,kc(this,e,a)},xc.performdataprocessortasks=function(t,e){_c(this,this._dataprocessorhandlers,t,e,{block:!0})},xc.performvisualtasks=function(t,e,i){_c(this,this._visualhandlers,t,e,i)},xc.performseriestasks=function(t){var e;t.eachseries(function(t){e|=t.datatask.perform()}),this.unfinished|=e},xc.plan=function(){this._pipelinemap.each(function(t){var e=t.tail;do{if(e.__block){t.blockindex=e.__idxinpipeline;break}e=e.getupstream()}while(e)})};var wc=xc.updatepayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function bc(t){t.overallreset(t.ecmodel,t.api,t.payload)}function sc(t,e){return t.overallprogress&&mc}function mc(){this.agent.dirty(),this.getdownstream().dirty()}function ic(){this.agent&&this.agent.dirty()}function ac(t){return t.plan&&t.plan(t.model,t.ecmodel,t.api,t.payload)}function tc(t){t.useclearvisual&&t.data.clearallvisual();var e=t.resetdefines=wa(t.reset(t.model,t.ecmodel,t.api,t.payload));return 1t.get("hoverlayerthreshold")&&!v.node&&t.eachseries(function(t){if(!t.preventusinghoverlayer){var e=i._chartsmap[t.__viewid];e.__alive&&e.group.traverse(function(t){t.usehoverlayer=!0})}})}(n,t),mc(n._zr.dom,t)}function kd(e,i){sd(vd,function(t){t(e,i)})}yd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingfx&&this._loadingfx.resize(),e){var i=e.resetoption("media"),n=t&&t.silent;this[dd]=!0,i&&wd(this),_d.update.call(this),this[dd]=!1,id.call(this,n),ad.call(this,n)}}},yd.showloading=function(t,e){if(!this._disposed&&(ud(t)&&(e=t,t=""),t=t||"default",this.hideloading(),wd[t])){var i=wd[t](this._api,e),n=this._zr;this._loadingfx=i,n.add(i)}},yd.hideloading=function(){this._disposed||(this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null)},yd.makeactionfromevent=function(t){var e=l({},t);return e.type=rd[t.type],e},yd.dispatchaction=function(t,e){this._disposed||(ud(e)||(e={silent:!!e}),ed[t.type]&&this._model&&(this[dd]?this._pendingactions.push(t):(md.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.wechat&&this._throttledzrflush(),id.call(this,e.silent),ad.call(this,e.silent))))},yd.appenddata=function(t){if(!this._disposed){var e=t.seriesindex;this.getmodel().getseriesbyindex(e).appenddata(t),this._scheduler.unfinished=!0}},yd.on=gd("on",!1),yd.off=gd("off",!1),yd.one=gd("one",!1);var pd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function nd(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function od(){this.eventinfo}yd._initevents=function(){sd(pd,function(u){function t(t){var e,i=this.getmodel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataindex){var a=n.datamodel||i.getseriesbyindex(n.seriesindex);e=a&&a.getdataparams(n.dataindex,n.datatype,n)||{}}else n&&n.eventdata&&(e=l({},n.eventdata));if(e){var o=e.componenttype,r=e.componentindex;"markline"!==o&&"markpoint"!==o&&"markarea"!==o||(o="series",r=e.seriesindex);var s=o&&null!=r&&i.getcomponent(o,r),l=s&&this["series"===s.maintype?"_chartsmap":"_componentsmap"][s.__viewid];e.event=t,e.type=u,this._eceventprocessor.eventinfo={targetel:n,packedevent:e,model:s,view:l},this.trigger(u,e)}}t.zreventfulcallatlast=!0,this._zr.on(u,t,this)},this),sd(rd,function(t,e){this._messagecenter.on(e,function(t){this.trigger(e,t)},this)},this)},yd.isdisposed=function(){return this._disposed},yd.clear=function(){this._disposed||this.setoption({series:[]},!0)},yd.dispose=function(){if(!this._disposed){this._disposed=!0,oa(this.getdom(),yd,"");var e=this._api,i=this._model;sd(this._componentsviews,function(t){t.dispose(i,e)}),sd(this._chartsviews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete hd[this.id]}},b(vd,ct),od.prototype={constructor:od,normalizequery:function(t){var s={},l={},u={};if(r(t)){var e=hd(t);s.maintype=e.main||null,s.subtype=e.sub||null}else{var h=["index","name","id"],c={name:1,dataindex:1,datatype:1};e(t,function(t,e){for(var i=!1,n=0;nx[1]&&(x[1]=y)}e&&(this._namelist[d]=e[f])}this._rawcount=this._count=l,this._extent={},lf(this)},df._initdatafromprovider=function(t,e){if(!(e<=t)){for(var i,n=this._chunksize,a=this._rawdata,o=this._storage,r=this.dimensions,s=r.length,l=this._dimensioninfos,u=this._namelist,h=this._idlist,c=this._rawextent,d=this._namerepeatcount={},f=this._chunkcount,p=0;pm[1]&&(m[1]=s)}if(!a.pure){var i=u[v];if(m&&null==i)if(null!=m.name)u[v]=i=m.name;else if(null!=i){var a=r[i],t=o[a][y];if(t){i=t[x];var d=l[a].ordinalmeta;d&&d.categories.length&&(i=d.categories[i])}}var c=null==m?null:m.id;null==c&&null!=i&&(d[i]=d[i]||0,0=this._rawcount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&it))return o;a=o-1}}return-1},df.indicesofnearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var a=number.max_value,o=-1,r=0,s=this.count();rt[i][1])&&(m=!1)}m&&(o[r++]=this.getrawindex(m))}return rw[1]&&(w[1]=_)}}}return a},df.downsample=function(t,e,i,n){for(var a=rf(this,[t]),o=a._storage,r=[],s=math.floor(1/e),l=o[t],u=this.count(),h=this._chunksize,c=a._rawextent[t],d=new(sf(this))(u),f=0,p=0;pc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getrawindex=nf,a},df.getitemmodel=function(t){var e=this.hostmodel;return new dl(this.getrawdataitem(t),e,e&&e.ecmodel)},df.diff=function(e){var i=this;return new df(e?e.getindices():[],this.getindices(),function(t){return of(e,t)},function(t){return of(i,t)})},df.getvisual=function(t){var e=this._visual;return e&&e[t]},df.setvisual=function(t,e){if(vf(t))for(var i in t)t.hasownproperty(i)&&this.setvisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},df.setlayout=function(t,e){if(vf(t))for(var i in t)t.hasownproperty(i)&&this.setlayout(i,t[i]);else this._layout[t]=e},df.getlayout=function(t){return this._layout[t]},df.getitemlayout=function(t){return this._itemlayouts[t]},df.setitemlayout=function(t,e,i){this._itemlayouts[t]=i?l(this._itemlayouts[t]||{},e):e},df.clearitemlayouts=function(){this._itemlayouts.length=0},df.getitemvisual=function(t,e,i){var n=this._itemvisuals[t],a=n&&n[e];return null!=a||i?a:this.getvisual(e)},df.setitemvisual=function(t,e,i){var n=this._itemvisuals[t]||{},a=this.hasitemvisual;if(this._itemvisuals[t]=n,vf(e))for(var o in e)e.hasownproperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},df.clearallvisual=function(){this._visual={},this._itemvisuals=[],this.hasitemvisual={}};function vf(t){t.seriesindex=this.seriesindex,t.dataindex=this.dataindex,t.datatype=this.datatype}function gf(t,e,i){lu.isinstance(e)||(e=lu.seriesdatatosource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsdef||[]).slice(),l=q(i.encodedef),a=q(),o=q(),u=[],r=function(t,e,i,n){var a=math.max(t.dimensionsdetectcount||1,e.length,i.length,n||0);return e(e,function(t){var e=t.dimsdef;e&&(a=math.max(a,e.length))}),a}(e,t,n,i.dimcount),s=0;s=e[0]&&t<=e[1]},yf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},yf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},yf.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},yf.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},yf.prototype.getextent=function(){return this._extent.slice()},yf.prototype.setextent=function(t,e){var i=this._extent;isnan(t)||(i[0]=t),isnan(e)||(i[1]=e)},yf.prototype.isblank=function(){return this._isblank},yf.prototype.setblank=function(t){this._isblank=t},yf.prototype.getlabel=null,ga(yf),ua(yf,{registerwhenextend:!0}),jf.createbyaxismodel=function(t){var e=t.option,i=e.data,n=i&&n(i,$f);return new jf({categories:n,needcollect:!n,deduplication:!1!==e.dedplication})};var qf=jf.prototype;function kf(t){return t._map||(t._map=q(t.categories))}function $f(t){return z(t)&&null!=t.value?t.value:t+""}qf.getordinal=function(t){return kf(this).get(t)},qf.parseandcollect=function(t){var e,i=this._needcollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=kf(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=nan),e};var jf=yf.prototype,qf=yf.extend({type:"ordinal",init:function(t,e){t&&!k(t)||(t=new jf({categories:t})),this._ordinalmeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalmeta.getordinal(t):math.round(t)},contain:function(t){return t=this.parse(t),jf.contain.call(this,t)&&null!=this._ordinalmeta.categories[t]},normalize:function(t){return jf.normalize.call(this,this.parse(t))},scale:function(t){return math.round(jf.scale.call(this,t))},getticks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getlabel:function(t){if(!this.isblank())return this._ordinalmeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},getordinalmeta:function(){return this._ordinalmeta},niceticks:et,niceextent:et});qf.create=function(){return new qf};var tp=_l;function ep(t){return sl(t)+2}function ip(t,e,i){t[e]=math.max(math.min(t[e],i[1]),i[0])}function np(t,e){isfinite(t[0])||(t[0]=e[0]),isfinite(t[1])||(t[1]=e[1]),ip(t,0,e),ip(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var ap=_l,op=yf.extend({type:"interval",_interval:0,_intervalprecision:2,setextent:function(t,e){var i=this._extent;isnan(t)||(i[0]=parsefloat(t)),isnan(e)||(i[1]=parsefloat(e))},unionextent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),op.prototype.setextent.call(this,e[0],e[1])},getinterval:function(){return this._interval},setinterval:function(t){this._interval=t,this._niceextent=this._extent.slice(),this._intervalprecision=ep(t)},getticks:function(){return function(t,e,i,n){var a=[];if(!t)return a;e[0](a.length?a[a.length-1]:i[1])&&a.push(e[1]),a}(this._interval,this._extent,this._niceextent,this._intervalprecision)},getlabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=sl(t)||0:"auto"===i&&(i=this._intervalprecision),zl(t=ap(t,i,!0))},niceticks:function(t,e,i){t=t||5;var n=this._extent,a=n[1]-n[0];if(isfinite(a)){a<0&&(a=-a,n.reverse());var o=function(t,e,i,n){var a={},o=t[1]-t[0],r=a.interval=nl(o/e,!0);null!=i&&r>>1;t[a][1]>1^-(1&s),l=l>>1^-(1&l),a=s+=a,o=l+=o,n.push([s/i,l/i])}return n}ag.prototype={constructor:ag,properties:null,getboundingrect:function(){var t=this._rect;if(t)return t;for(var e=number.max_value,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],o.coord)&&(n?o.coord=s[1]:e.pop());n&&d(o.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=_l(t),e=_l(e),c?en[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var kg=hr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothconstraint:!0,smoothmonotone:null,connectnulls:!1},style:{fill:null,stroke:"#000"},brush:cr(hr.prototype.brush),buildpath:function(t,e){var i=e.points,n=0,a=i.length,o=qg(i,e.smoothconstraint);if(e.connectnulls){for(;0n)return!1;return!0}(o,e))){var r=e.mapdimension(o.dim),s={};return e(o.getviewlabels(),function(t){s[t.tickvalue]=1}),function(t){return!s.hasownproperty(e.get(r,t))}}}}function om(t,e,i){if("cartesian2d"!==t.type)return qg(t,e,i);var n=t.getbaseaxis().ishorizontal(),a=jg(t,e,i);if(!i.get("clip",!0)){var o=a.shape,r=math.max(o.width,o.height);n?(o.y-=r,o.height+=2*r):(o.x-=r,o.width+=2*r)}return a}ec.extend({type:"line",init:function(){var t=new si,e=new ng;this.group.add(e.group),this._symboldraw=e,this._linegroup=t},render:function(t,e,i){var n=t.coordinatesystem,a=this.group,o=t.getdata(),r=t.getmodel("linestyle"),s=t.getmodel("areastyle"),l=o.maparray(o.getitemlayout),u="polar"===n.type,h=this._coordsys,c=this._symboldraw,d=this._polyline,f=this._polygon,p=this._linegroup,g=t.get("animation"),m=!s.isempty(),v=s.get("origin"),y=function(t,e,i){if(!i.valuedim)return[];for(var n=[],a=0,o=e.count();ah[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";e(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new jr(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(o,n)||o.getvisual("color");d.usestyle(c(r.getlinestyle(),{fill:"none",stroke:m,linejoin:"bevel"}));var i=t.get("smooth");if(i=im(t.get("smooth")),d.setshape({smooth:i,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")}),f){var a=o.getcalculationinfo("stackedonseries"),t=0;f.usestyle(c(s.getareastyle(),{fill:m,opacity:.7,linejoin:"bevel"})),a&&(t=im(a.get("smooth"))),f.setshape({smooth:i,stackedonsmooth:t,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")})}this._data=o,this._coordsys=n,this._stackedonpoints=y,this._points=l,this._step=s,this._valueorigin=v},dispose:function(){},highlight:function(t,e,i,n){var a=t.getdata(),o=ca(a,n);if(!(o instanceof array)&&null!=o&&0<=o){var r=a.getitemgraphicel(o);if(!r){var s=a.getitemlayout(o);if(!s)return;(r=new sg(a,o)).position=s,r.setz(t.get("zlevel"),t.get("z")),r.ignore=isnan(s[0])||isnan(s[1]),r.__temp=!0,a.setitemgraphicel(o,r),r.stopsymbolanimation(!0),this.group.add(r)}r.highlight()}else ec.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getdata(),o=ca(a,n);if(null!=o&&0<=o){var r=a.getitemgraphicel(o);r&&(r.__temp?(a.setitemgraphicel(o,null),this.group.remove(r)):r.downplay())}else ec.prototype.downplay.call(this,t,e,i,n)},_newpolyline:function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new kg({shape:{points:t},silent:!0,z2:10}),this._linegroup.add(e),this._polyline=e},_newpolygon:function(t,e){var i=this._polygon;return i&&this._linegroup.remove(i),i=new $g({shape:{points:t,stackedonpoints:e},silent:!0}),this._linegroup.add(i),this._polygon=i},_updateanimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostmodel,u=function(t,e,i,n,a,o,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=bg(a,e,r),v=bg(o,t,s),y=0;ye&&(e=t[i]);return isfinite(e)?e:nan},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getotheraxis:function(){this.grid.getotheraxis()},pointtodata:function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},tolocalcoord:null,toglobalcoord:null},w(fm,vg);var pm={show:!0,zlevel: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:"#333",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:["#ccc"],width:1,type:"solid"}},splitarea:{show:!1,areastyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},gm={};gm.categoryaxis=m({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},pm),gm.valueaxis=m({boundarygap:[0,0],splitnumber:5},pm),gm.timeaxis=c({scale:!0,min:"datamin",max:"datamax"},gm.valueaxis),gm.logaxis=c({scale:!0,logbase:10},gm.valueaxis);function mm(o,t,r,e){e(vm,function(a){t.extend({type:o+"axis."+a,mergedefaultandtheme:function(t,e){var i=this.layoutmode,n=i?su(t):{};m(t,e.gettheme().get(a+"axis")),m(t,this.getdefaultoption()),t.type=r(o,t),i&&ru(t,n,i)},optionupdated:function(){"category"===this.option.type&&(this.__ordinalmeta=jf.createbyaxismodel(this))},getcategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalmeta.categories},getordinalmeta:function(){return this.__ordinalmeta},defaultoption:p([{},gm[a+"axis"],e],!0)})}),fu.registersubtypedefaulter(o+"axis",a(r,o))}var vm=["value","category","time","log"],ym=fu.extend({type:"cartesian2daxis",axis:null,init:function(){ym.superapply(this,"init",arguments),this.resetrange()},mergeoption:function(){ym.superapply(this,"mergeoption",arguments),this.resetrange()},restoredata:function(){ym.superapply(this,"restoredata",arguments),this.resetrange()},getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"grid",index:this.option.gridindex,id:this.option.gridid})[0]}});function xm(t,e){return e.type||(e.data?"category":"value")}m(ym.prototype,hp);var _m={offset:0};function wm(t,e){return t.getcoordsysmodel()===e}function bm(t,e,i){this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this._initcartesian(t,e,i),this.model=t}mm("x",ym,xm,_m),mm("y",ym,xm,_m),fu.extend({type:"grid",dependencies:["xaxis","yaxis"],layoutmode:"box",coordinatesystem:null,defaultoption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containlabel:!1,backgroundcolor:"rgba(0,0,0,0)",borderwidth:1,bordercolor:"#ccc"}});var sm=bm.prototype;function mm(t,e,i,n){i.getaxesonzeroof=function(){return a?[a]:[]};var a,o=t[e],r=i.model,s=r.get("axisline.onzero"),l=r.get("axisline.onzeroaxisindex");if(s){if(null!=l)im(o[l])&&(a=o[l]);else for(var u in o)if(o.hasownproperty(u)&&im(o[u])&&!n[h(o[u])]){a=o[u];break}a&&(n[h(a)]=!0)}function h(t){return t.dim+"_"+t.index}}function im(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getextent(),i=e[0],n=e[1];return!(0u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,zm(o)?t.labeloffset+r*l:0],d=e.get("namerotate");null!=d&&(d=d*lm/180),zm(o)?n=nm(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var a,o,r=tl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;a=dl(r-lm/2)?(o=l?"bottom":"top","center"):dl(r-1.5*lm)?(o=l?"top":"bottom","center"):(o="middle",r<1.5*lm&&lm/2l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=i.r0}}});var tv=math.pi/180;function dv(a,t,e,i,n,o,r){function s(t,e,i){for(var n=t;na[n].y+a[n].height)return void l(n,i/2);l(e-1,i/2)}function l(t,e){for(var i=t;0<=i&&(a[i].y-=e,!(0a[i-1].y+a[i-1].height));i--);}function u(t,e,i,n,a,o){for(var r=e?number.max_value:0,s=0,l=t.length;s=e?p.push(a[g]):f.push(a[g]);u(f,!1,t,e,i,n),u(p,!0,t,e,i,n)}function cv(t){return"center"===t.position}function lv(i,a,t,e,i){var t,d,c=i.getdata(),l=[],k=!1,p=(i.get("minshowlabelangle")||0)*tv;c.each(function(t){var e=c.getitemlayout(t),i=c.getitemmodel(t),n=i.getmodel("label"),a=n.get("position")||i.get("emphasis.label.position"),o=i.getmodel("labelline"),r=o.get("length"),s=o.get("length2");if(!(e.anglei[0]&&isfinite(u)&&isfinite(i[0]););else{var h=a.getticks().length-1;f"+n(t,function(t,e){var i=a.get(a.mapdimension(t.dim),n);return wl(t.name+" : "+i)}).join("
")},defaultoption:{zlevel:0,z:2,coordinatesystem:"radar",legendhoverlink:!0,radarindex:0,linestyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptycircle",symbolsize:4}});hf({type:"radar",render:function(l,t,e){var i=l.coordinatesystem,g=this.group,m=l.getdata(),s=this._data;function u(t,e){var i=t.getitemvisual(e,"symbol")||"circle",n=t.getitemvisual(e,"color");if("none"!==i){var a=function(t){return k(t)||(t=[+t,+t]),t}(t.getitemvisual(e,"symbolsize")),o=jp(i,-1,-1,2,2,n);return o.attr({style:{strokenoscale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function h(t,e,i,n,a,o){i.removeall();for(var r=0;r"+wl(n+" : "+i)},gettooltipposition:function(t){if(null!=t){var e=this.getdata().getname(t),i=this.coordinatesystem,n=i.getregion(e);return n&&i.datatopoint(n.center)}},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},defaultoption:{zlevel:0,z:2,coordinatesystem:"geo",map:"",left:"center",top:"center",aspectscale:.75,showlegendsymbol:!0,datarangehoverlink:!0,boundingcoords:null,center:null,zoom:1,scalelimit:null,label:{show:!1,color:"#000"},itemstyle:{borderwidth:.5,bordercolor:"#444",areacolor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemstyle:{areacolor:"rgba(255,215,0,0.8)"}}}}),xv);var ry="\0_ec_interaction_mutex";function sy(t,e){return!!ly(t)[e]}function ly(t){return t[ry]||(t[ry]={})}function uy(i){this.pointerchecker,this._zr=i,this._opt={};var t=t,n=t(hy,this),a=t(cy,this),o=t(dy,this),r=t(fy,this),s=t(py,this);ct.call(this),this.setpointerchecker=function(t){this.pointerchecker=t},this.enable=function(t,e){this.disable(),this._opt=c(d(e)||{},{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",a),i.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",a),i.off("mouseup",o),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isdragging=function(){return this._dragging},this.ispinching=function(){return this._pinching}}function hy(t){if(!(wt(t)||t.target&&t.target.draggable)){var e=t.offsetx,i=t.offsety;this.pointerchecker&&this.pointerchecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function cy(t){if(this._dragging&&vy("moveonmousemove",t,this._opt)&&"pinch"!==t.gestureevent&&!sy(this._zr,"globalpan")){var e=t.offsetx,i=t.offsety,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventdefaultmousemove&&ft(t.event),my(this,"pan","moveonmousemove",t,{dx:o,dy:r,oldx:n,oldy:a,newx:e,newy:i})}}function dy(t){wt(t)||(this._dragging=!1)}function fy(t){var e=vy("zoomonmousewheel",t,this._opt),i=vy("moveonmousewheel",t,this._opt),n=t.wheeldelta,a=math.abs(n),o=t.offsetx,r=t.offsety;if(0!==n&&(e||i)){if(e){var s=3x.x)||(m-=math.pi);var b=v?"left":"right",s=o.labelmodel.get("rotate"),m=s*(math.pi/180);g.setstyle({textposition:o.labelmodel.get("position")||b,textrotation:null==s?-m:m,textorigin:"center",verticalalign:"middle"})}if(s.parentnode&&s.parentnode!==u){var i=i.__edge;js(i=i||(i.__edge=new qr({shape:hx(o,f,f),style:c({opacity:0,strokenoscale:!0},o.linestyle)})),{shape:hx(o,d,p),style:{opacity:1}},a),n.add(i)}}function ux(t,e,i,n,a,o){for(var r,s=t.tree.getnodebydataindex(e),l=t.tree.root,u=s.getmodel(),h=(o=sx(s,u,o),s.parentnode===l?s:s.parentnode||s);null==(r=h.getlayout());)h=h.parentnode===l?h:h.parentnode||h;js(i,{position:[r.x+1,r.y+1]},a,function(){n.remove(i),t.setitemgraphicel(e,null)}),i.fadeout(null,{keeplabel:!0});var c=i.__edge;c&&js(c,{shape:hx(o,r,r),style:{opacity:0}},a,function(){n.remove(c)})}function hx(t,e,i){var n,a,o,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"lr"!==c&&"rl"!==c||(n=s+(l-s)*t.curvature,a=u,o=l+(s-l)*t.curvature,r=h),"tb"!==c&&"bt"!==c||(n=s,a=u+(h-u)*t.curvature,o=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:a,cpx2:o,cpy2:r};s=e.rawx,u=e.rawy,l=i.rawx,h=i.rawy;var d=ex(s,u),f=ex(s,u+(h-u)*t.curvature),p=ex(l,h+(u-h)*t.curvature),g=ex(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function cx(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isexpand){var a=i.children;if(a.length)for(var o=a.length-1;0<=o;o--)n.push(a[o])}}qy.prototype={constructor:qy,isremoved:function(){return this.dataindex<0},eachnode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),r(t=t||{})&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getnodebyid:function(t){if(this.getid()===t)return this;for(var e=0,i=this.children,n=i.length;eo&&(o=t.depth)});var r=t.expandandcollapse&&0<=t.initialtreedepth?t.initialtreedepth:o;return a.root.eachnode("preorder",function(t){var e=t.hosttree.data.getrawdataitem(t.dataindex);t.isexpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),a.data},getorient:function(){var t=this.get("orient");return"horizontal"===t?t="lr":"vertical"===t&&(t="tb"),t},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},formattooltip:function(t){for(var e=this.getdata().tree,i=e.root.children[0],n=e.getnodebydataindex(t),a=n.getvalue(),o=n.name;n&&n!==i;)o=n.parentnode.name+"."+o,n=n.parentnode;return wl(o+(isnan(a)||null==a?"":" : "+a))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodescaleratio:.4,center:null,zoom:1,orient:"lr",symbol:"emptycircle",symbolsize:7,expandandcollapse:!0,initialtreedepth:2,linestyle:{color:"#ccc",width:1.5,curveness:.5},itemstyle:{color:"lightsteelblue",bordercolor:"#c23531",borderwidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationeasing:"linear",animationduration:700,animationdurationupdate:1e3}}),hf({type:"tree",init:function(t,e){this._oldtree,this._maingroup=new si,this._controller=new uy(e.getzr()),this._controllerhost={target:this.group},this.group.add(this._maingroup)},render:function(n,t,i,e){var a=n.getdata(),o=n.layoutinfo,r=this._maingroup,s=n.get("layout");"radial"===s?r.attr("position",[o.x+o.width/2,o.y+o.height/2]):r.attr("position",[o.x,o.y]),this._updateviewcoordsys(n,o,s),this._updatecontroller(n,t,i);var l=this._data,u={expandandcollapse:n.get("expandandcollapse"),layout:s,orient:n.getorient(),curvature:n.get("linestyle.curveness"),symbolrotate:n.get("symbolrotate"),symboloffset:n.get("symboloffset"),hoveranimation:n.get("hoveranimation"),usenamelabel:!0,fadein:!0};a.diff(l).add(function(t){rx(a,t)&&lx(a,t,null,r,n,u)}).update(function(t,e){var i=l.getitemgraphicel(e);rx(a,t)?lx(a,t,i,r,n,u):i&&ux(l,e,i,r,n,u)}).remove(function(t){var e=l.getitemgraphicel(t);e&&ux(l,t,e,r,n,u)}).execute(),this._nodescaleratio=n.get("nodescaleratio"),this._updatenodeandlinkscale(n),!0===u.expandandcollapse&&a.eachitemgraphicel(function(t,e){t.off("click").on("click",function(){i.dispatchaction({type:"treeexpandandcollapse",seriesid:n.id,dataindex:e})})}),this._data=a},_updateviewcoordsys:function(t){var i=t.getdata(),n=[];i.each(function(t){var e=i.getitemlayout(t);!e||isnan(e.x)||isnan(e.y)||n.push([+e.x,+e.y])});var e=[],a=[];io(n,e,a);var o=this._min,r=this._max;a[0]-e[0]==0&&(e[0]=o?o[0]:e[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-e[1]==0&&(e[1]=o?o[1]:e[1]-1,a[1]=r?r[1]:a[1]+1);var s=t.coordinatesystem=new py;s.zoomlimit=t.get("scalelimit"),s.setboundingrect(e[0],e[1],a[0]-e[0],a[1]-e[1]),s.setcenter(t.get("center")),s.setzoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewcoordsys=s,this._min=e,this._max=a},_updatecontroller:function(a,t,o){var e=this._controller,i=this._controllerhost,r=this.group;e.setpointerchecker(function(t,e,i){var n=r.getboundingrect();return n.applytransform(r.transform),n.contain(e,i)&&!wy(t,o,a)}),e.enable(a.get("roam")),i.zoomlimit=a.get("scalelimit"),i.zoom=a.coordinatesystem.getzoom(),e.off("pan").off("zoom").on("pan",function(t){yy(i,t.dx,t.dy),o.dispatchaction({seriesid:a.id,type:"treeroam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){xy(i,t.scale,t.originx,t.originy),o.dispatchaction({seriesid:a.id,type:"treeroam",zoom:t.scale,originx:t.originx,originy:t.originy}),this._updatenodeandlinkscale(a)},this)},_updatenodeandlinkscale:function(t){var e=t.getdata(),i=this._getnodeglobalscale(t),n=[i,i];e.eachitemgraphicel(function(t,e){t.attr("scale",n)})},_getnodeglobalscale:function(t){var e=t.coordinatesystem;if("view"!==e.type)return 1;var i=this._nodescaleratio,n=e.scale,a=n&&n[0]||1;return((e.getzoom()-1)*i+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerhost={}},remove:function(){this._maingroup.removeall(),this._data=null}}),tf({type:"treeexpandandcollapse",event:"treeexpandandcollapse",update:"update"},function(n,t){t.eachcomponent({maintype:"series",subtype:"tree",query:n},function(t){var e=n.dataindex,i=t.getdata().tree.getnodebydataindex(e);i.isexpand=!i.isexpand})}),tf({type:"treeroam",event:"treeroam",update:"none"},function(i,t){t.eachcomponent({maintype:"series",subtype:"tree",query:i},function(t){var e=cy(t.coordinatesystem,i);t.setcenter&&t.setcenter(e.center),t.setzoom&&t.setzoom(e.zoom)})});function dx(t,e,i){if(t&&0<=_(e,t.type)){var n=i.getdata().tree.root,a=t.targetnode;if("string"==typeof a&&(a=n.getnodebyid(a)),a&&n.contains(a))return{node:a};var o=t.targetnodeid;if(null!=o&&(a=n.getnodebyid(o)))return{node:a}}}function fx(t){for(var e=[];t;)(t=t.parentnode)&&e.push(t);return e.reverse()}function px(t,e){return 0<=_(fx(t),e)}function gx(t,e){for(var i=[];t;){var n=t.dataindex;i.push({name:t.name,dataindex:n,value:e.getrawvalue(n)}),t=t.parentnode}return i.reverse(),i}af(rm("tree","circle")),nf(function(t,e){t.eachseriesbytype("tree",function(t){!function(t,e){var i=function(t,e){return au(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}(t,e);t.layoutinfo=i;var n=t.get("layout"),a=0,o=0,r=null;r="radial"===n?(a=2*math.pi,o=math.min(i.height,i.width)/2,tx(function(t,e){return(t.parentnode===e.parentnode?1:2)/t.depth})):(a=i.width,o=i.height,tx());var s=t.getdata().tree.root,l=s.children[0];if(l){!function(t){t.hiernode={defaultancestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isexpand&&i.length)for(var a=i.length-1;0<=a;a--){var o=i[a];o.hiernode={defaultancestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}(s),function(t,e,i){for(var n,a=[t],o=[];n=a.pop();)if(o.push(n),n.isexpand){var r=n.children;if(r.length)for(var s=0;sh.getlayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getlayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=a/(h.getlayout().x+d+f),g=o/(c.depth-1||1),cx(l,function(t){m=(t.getlayout().x+f)*p,v=(t.depth-1)*g;var e=ex(m,v);t.setlayout({x:e.x,y:e.y,rawx:m,rawy:v},!0)});else{var y=t.getorient();"rl"===y||"lr"===y?(g=o/(h.getlayout().x+d+f),p=a/(c.depth-1||1),cx(l,function(t){v=(t.getlayout().x+f)*g,m="lr"===y?(t.depth-1)*p:a-(t.depth-1)*p,t.setlayout({x:m,y:v},!0)})):"tb"!==y&&"bt"!==y||(p=a/(h.getlayout().x+d+f),g=o/(c.depth-1||1),cx(l,function(t){m=(t.getlayout().x+f)*p,v="tb"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setlayout({x:m,y:v},!0)}))}}}(t,e)})}),wh.extend({type:"series.treemap",layoutmode:"box",dependencies:["grid","polar"],preventusinghoverlayer:!0,_viewroot:null,defaultoption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipwindow:"origin",squareratio:.5*(1+math.sqrt(5)),leafdepth:null,drilldownicon:"▶",zoomtonoderatio:.1024,roam:!0,nodeclick:"zoomtonode",animation:!0,animationdurationupdate:900,animationeasing:"quinticinout",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyitemwidth:25,itemstyle:{color:"rgba(0,0,0,0.7)",bordercolor:"rgba(255,255,255,0.7)",borderwidth:1,shadowcolor:"rgba(150,150,150,1)",shadowblur:3,shadowoffsetx:0,shadowoffsety:0,textstyle:{color:"#fff"}},emphasis:{textstyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperlabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalalign:"middle"},itemstyle:{color:null,coloralpha:null,colorsaturation:null,borderwidth:0,gapwidth:0,bordercolor:"#fff",bordercolorsaturation:null},emphasis:{upperlabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalalign:"middle"}},visualdimension:0,visualmin:null,visualmax:null,color:[],coloralpha:null,colorsaturation:null,colormappingby:"index",visiblemin:10,childrenvisiblemin:null,levels:[]},getinitialdata:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;e(t.children,function(t){i(t);var e=t.value;k(e)&&(e=e[0]),n+=e});var e=t.value;k(e)&&(e=e[0]);null!=e&&!isnan(e)||(e=n);e<0&&(e=0);k(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[];n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(e(t=t||[],function(t){var e=new dl(t),i=e.get("color");(e.get("itemstyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e);var a={};return a.levels=n,ky.createtree(i,this,a).data},optionupdated:function(){this.resetviewroot()},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=k(i)?zl(i[0]):zl(i);return wl(e.getname(t)+": "+n)},getdataparams:function(t){var e=wh.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(t);return e.treepathinfo=gx(i,this),e},setlayoutinfo:function(t){this.layoutinfo=this.layoutinfo||{},l(this.layoutinfo,t)},mapidtoindex:function(t){var e=this._idindexmap;e||(e=this._idindexmap=q(),this._idindexmapcount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idindexmapcount++),i},getviewroot:function(){return this._viewroot},resetviewroot:function(t){t?this._viewroot=t:t=this._viewroot;var e=this.getrawdata().tree.root;t&&(t===e||e.contains(t))||(this._viewroot=e)}});var mx=5;function vx(t){this.group=new si,t.add(this.group)}function yx(t,e,i,n,a,o){var r=[[a?t:t-mx,e],[t+i,e],[t+i,e+n],[a?t:t-mx,e+n]];return o||r.splice(2,0,[t+i+mx,e+n/2]),a||r.push([t,e+n/2]),r}vx.prototype={constructor:vx,render:function(t,e,i,n){var a=t.getmodel("breadcrumb"),o=this.group;if(o.removeall(),a.get("show")&&i){var r=a.getmodel("itemstyle"),s=r.getmodel("textstyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getwidth(),height:e.getheight()},emptyitemwidth:a.get("emptyitemwidth"),totalwidth:0,renderlist:[]};this._prepare(i,l,s),this._rendercontent(t,l,r,s,n),ou(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentnode){var a=n.getmodel().get("name"),o=i.gettextrect(a),r=math.max(o.width+16,e.emptyitemwidth);e.totalwidth+=r+8,e.renderlist.push({node:n,text:a,width:r})}},_rendercontent:function(t,e,i,n,a){for(var o,r,s=0,l=e.emptyitemwidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,a=e.height,o=xl(t.x,n),r=xl(t.y,a),s=xl(t.x2,n),l=xl(t.y2,a);return(isnan(o)||isnan(parsefloat(t.x)))&&(o=0),(isnan(s)||isnan(parsefloat(t.x2)))&&(s=n),(isnan(r)||isnan(parsefloat(t.y)))&&(r=0),(isnan(l)||isnan(parsefloat(t.y2)))&&(l=a),i=vl(i||0),{width:math.max(s-o-i[1]-i[3],0),height:math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalwidth,d=e.renderlist,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new rr({shape:{points:yx(s,0,m,u,f===d.length-1,0===f)},style:c(i.getitemstyle(),{linejoin:"bevel",text:v,textfill:n.gettextcolor(),textfont:n.getfont()}),z:10,onclick:a(a,g)});this.group.add(y),o=t,r=g,y.eventdata={componenttype:"series",componentsubtype:"treemap",componentindex:o.componentindex,seriesindex:o.componentindex,seriesname:o.name,seriestype:"treemap",selftype:"breadcrumb",nodedata:{dataindex:r&&r.dataindex,name:r&&r.name},treepathinfo:r&&gx(r,o)},s+=m+8}},remove:function(){this.group.removeall()}};function xx(t){var e=lx(t);return e.stroke=e.fill=e.linewidth=null,e}var _x=t,bx=si,sx=hr,mx=e,ix=["label"],ax=["emphasis","label"],tx=["upperlabel"],dx=["emphasis","upperlabel"],cx=10,lx=xa([["fill","color"],["stroke","strokecolor"],["linewidth","strokewidth"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]);function kx(d,r,s,l,u,i,f,t,e,n){if(f){var p=f.getlayout();if(p&&p.isinview){var h=p.width,c=p.height,g=p.borderwidth,m=p.invisible,v=f.getrawindex(),y=t&&t.getrawindex(),a=f.viewchildren,x=p.upperheight,o=a&&a.length,_=f.getmodel("itemstyle"),w=f.getmodel("emphasis.itemstyle"),b=t("nodegroup",bx);if(b){if(e.add(b),b.attr("position",[p.x||0,p.y||0]),b.__tmnodewidth=h,b.__tmnodeheight=c,p.isaboveviewroot)return b;var s=t("background",sx,n,1);if(s&&function(t,n,a){n.dataindex=f.dataindex,n.seriesindex=d.seriesindex,n.setshape({x:0,y:0,width:h,height:c});var o=f.getvisual("bordercolor",!0),r=w.get("bordercolor");i(n,function(){var t=xx(_);t.fill=o;var e=lx(w);if(e.fill=r,a){var i=h-2*g;a(t,e,o,i,x,{x:g,y:0,width:i,height:x})}else t.text=e.text=null;n.setstyle(t),os(n,e)}),t.add(n)}(b,s,o&&p.upperheight),!o){var m=t("content",sx,n,2);m&&function(t,i){i.dataindex=f.dataindex,i.seriesindex=d.seriesindex;var n=math.max(h-2*g,0),a=math.max(c-2*g,0);i.culling=!0,i.setshape({x:g,y:g,width:n,height:a});var o=f.getvisual("color",!0);i(i,function(){var t=xx(_);t.fill=o;var e=lx(w);a(t,e,o,n,a),i.setstyle(t),os(i,e)}),t.add(i)}(b,m)}return b}}}function i(t,e){m?t.invisible||i.push(t):(e(),t.__tmwillvisible||(t.invisible=!1))}function a(t,e,i,n,a,o){var r=f.getmodel(),s=w(d.getformattedlabel(f.dataindex,"normal",null,null,o?"upperlabel":"label"),r.get("name"));if(!o&&p.isleafroot){var l=d.get("drilldownicon",!0);s=l?l+" "+s:s}var u=r.getmodel(o?tx:ix),h=r.getmodel(o?dx:ax),c=u.getshallow("show");bs(t,e,u,h,{defaulttext:c?s:null,autocolor:i,isrecttext:!0}),o&&(t.textrect=d(o)),t.truncate=c&&u.get("ellipsis")?{outerwidth:n,outerheight:a,minchar:2}:null}function t(t,e,i,n){var a=null!=y&&s[t][y],o=u[t];return a?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodegroup"===i?e.position.slice():l({},e.shape)}(o,a,t)):m||((a=new e({z:function(t,e){var i=t*cx+e;return(i-1)/i}(i,n)})).__tmdepth=i,function(t,e,i){var n=t[v]={},a=f.parentnode;if(a&&(!l||"drilldown"===l.direction)){var o=0,r=0,s=u.background[a.getrawindex()];!l&&s&&s.old&&(o=s.old.width,r=s.old.height),n.old="nodegroup"===i?[0,r]:{x:o,y:r,width:0,height:0}}n.fadein="nodegroup"!==i}(o,0,a.__tmstoragename=t)),r[t][v]=a}}hf({type:"treemap",init:function(t,e){this._containergroup,this._storage={nodegroup:[],background:[],content:[]},this._oldtree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findcomponents({maintype:"series",subtype:"treemap",query:n}),t)<0)){this.seriesmodel=t,this.api=i,this.ecmodel=e;var a=dx(n,["treemapzoomtonode","treemaproottonode"],t),o=n&&n.type,r=t.layoutinfo,s=!this._oldtree,l=this._storage,u="treemaproottonode"===o&&a&&l?{rootnodegroup:l.nodegroup[a.node.getrawindex()],direction:n.direction}:null,h=this._givecontainergroup(r),c=this._dorender(h,t,u);s||o&&"treemapzoomtonode"!==o&&"treemaproottonode"!==o?c.renderfinally():this._doanimation(h,c,t,u),this._resetcontroller(i),this._renderbreadcrumb(t,i,a)}},_givecontainergroup:function(t){var e=this._containergroup;return e||(e=this._containergroup=new bx,this._initevents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_dorender:function(t,e,i){var n=e.getdata().tree,a=this._oldtree,o={nodegroup:[],background:[],content:[]},r={nodegroup:[],background:[],content:[]},s=this._storage,l=[],c=a(kx,e,r,s,i,o,l);!function o(r,s,l,u,h){u?mx(s=r,function(t,e){t.isremoved()||i(e,e)}):new df(s,r,t,t).add(i).update(i).remove(a(i,null)).execute();function t(t){return t.getid()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,a=c(i,n,l,h);a&&o(i&&i.viewchildren||[],n&&n.viewchildren||[],a,u,h+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],t,n===a||!a,0);var u,h,d=(h={nodegroup:[],background:[],content:[]},(u=s)&&mx(u,function(t,e){var i=h[e];mx(t,function(t){t&&(i.push(t),t.__tmwilldelete=1)})}),h);return this._oldtree=n,this._storage=r,{lastsforanimation:o,willdeleteels:d,renderfinally:function(){mx(d,function(t){mx(t,function(t){t.parent&&t.parent.remove(t)})}),mx(l,function(t){t.invisible=!0,t.dirty()})}}},_doanimation:function(t,o,e,s){if(e.get("animation")){var l=e.get("animationdurationupdate"),u=e.get("animationeasing"),h=function(){var o,r=[],s={};return{add:function(t,e,i,n,a){return r(n)&&(a=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:a}),!0)},done:function(t){return o=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e=r.length||t===r[t.depth]){var i=o_(l,c,t,e,y,s);n(t,i,a,o,r,s)}})}else p=e_(c),t.setvisual("color",p)}(o,{},n(a.levelmodels,function(t){return t?t.get(jx):null}),r,t.getviewroot().getancestors(),t)}};function t_(i,n,a,o){var r=l({},n);return e(["color","coloralpha","colorsaturation"],function(t){var e=i.get(t,!0);null==e&&a&&(e=a[t]),null==e&&(e=n[t]),null==e&&(e=o.get(t)),null!=e&&(r[t]=e)}),r}function e_(t){var e=i_(t,"color");if(e){var i=i_(t,"coloralpha"),n=i_(t,"colorsaturation");return n&&(e=he(e,null,null,n)),i&&(e=ze(e,i)),e}}function i_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function n_(t,e,i,n,a,o){if(o&&o.length){var r=a_(e,"color")||null!=a.color&&"none"!==a.color&&(a_(e,"coloralpha")||a_(e,"colorsaturation"));if(r){var s=e.get("visualmin"),l=e.get("visualmax"),u=i.dataextent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colormappingby"),c={type:r.name,dataextent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingmethod="linear":(c.mappingmethod="category",c.loop=!0);var d=new bx(c);return d.__drcolormappingby=h,d}}}function a_(t,e){var i=t.get(e);return $x(i)&&i.length?{name:e,range:i}:null}function o_(t,e,i,n,a,o){var r=l({},e);if(a){var s=a.type,l="color"===s&&a.__drcolormappingby,u="index"===l?n:"id"===l?o.mapidtoindex(i.getid()):i.getvalue(t.get("visualdimension"));r[s]=a.mapvaluetovisual(u)}return r}var r_=math.max,s_=math.min,l_=w,u_=e,h_=["itemstyle","borderwidth"],c_=["itemstyle","gapwidth"],d_=["upperlabel","show"],f_=["upperlabel","height"],p_={seriestype:"treemap",reset:function(t,e,i,n){var a=i.getwidth(),o=i.getheight(),r=t.option,s=au(t.getboxlayoutparams(),{width:i.getwidth(),height:i.getheight()}),l=r.size||[],u=xl(l_(s.width,l[0]),a),h=xl(l_(s.height,l[1]),o),c=n&&n.type,d=dx(n,["treemapzoomtonode","treemaproottonode"],t),f="treemaprender"===c||"treemapmove"===c?n.rootrect:null,p=t.getviewroot(),g=fx(p);if("treemapmove"!==c){var m="treemapzoomtonode"===c?function(t,e,i,n,a){var o,r=(e||{}).node,s=[n,a];if(!r||r===i)return s;var l=n*a,u=l*t.option.zoomtonoderatio;for(;o=r.parentnode;){for(var h=0,c=o.children,d=0,f=c.length;ds[1]&&(s[1]=e)})}else s=[nan,nan];return{sum:n,dataextent:s}}(e,r,s);if(0===u.sum)return t.viewchildren=[];if(u.sum=function(t,e,i,n,a){if(!n)return i;for(var o=t.get("visiblemin"),r=a.length,s=r,l=r-1;0<=l;l--){var u=a["asc"===n?r-l-1:l].getvalue();u/i*ei[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c "+d)),u++)}var f,p=i.get("coordinatesystem");if("cartesian2d"===p||"polar"===p)f=xf(t,i);else{var g=hu.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=wf(t,{coorddimensions:m});(f=new tf(v,i)).initdata(t)}var y=new tf(["value"],i);return y.initdata(l,s),a&&a(f,y),wy({maindata:f,struct:o,structattr:"graph",datas:{node:f,edge:y},datasattr:{node:"data",edge:"edgedata"}}),o.update(),o}var a_=uf({type:"series.graph",init:function(t){a_.superapply(this,"init",arguments),this.legenddataprovider=function(){return this._categoriesdata},this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergeoption:function(t){a_.superapply(this,"mergeoption",arguments),this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergedefaultandtheme:function(t){a_.superapply(this,"mergedefaultandtheme",arguments),ba(t,["edgelabel"],["show"])},getinitialdata:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return i_(i,e,this,!0,function(t,e){t.wrapmethod("getitemmodel",function(t){var e=l._categoriesmodels[t.getshallow("category")];return e&&(e.parentmodel=t.parentmodel,t.parentmodel=e),t});var i=l.getmodel("edgelabel"),n=new dl({label:i.option},i.parentmodel,s),a=l.getmodel("emphasis.edgelabel"),o=new dl({emphasis:{label:a.option}},a.parentmodel,s);function r(t){return(t=this.parsepath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?o:this.parentmodel}e.wrapmethod("getitemmodel",function(t){return t.customizegetparent(r),t})}).data},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},getcategoriesdata:function(){return this._categoriesdata},formattooltip:function(t,e,i){if("edge"!==i)return a_.superapply(this,"formattooltip",arguments);var n=this.getdata(),a=this.getdataparams(t,i),o=n.graph.getedgebyindex(t),r=n.getname(o.node1.dataindex),s=n.getname(o.node2.dataindex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=wl(l.join(" > ")),a.value&&(l+=" : "+wl(a.value)),l},_updatecategoriesdata:function(){var t=n(this.option.categories||[],function(t){return null!=t.value?t:l({value:0},t)}),e=new tf(["value"],this);e.initdata(t),this._categoriesdata=e,this._categoriesmodels=e.maparray(function(t){return e.getitemmodel(t,!0)})},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},isanimationenabled:function(){return a_.supercall(this,"isanimationenabled")&&!("force"===this.get("layout")&&this.get("force.layoutanimation"))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",legendhoverlink:!0,hoveranimation:!0,layout:null,focusnodeadjacency:!1,circular:{rotatelabel:!1},force:{initlayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgelength:30,layoutanimation:!0},left:"center",top:"center",symbol:"circle",symbolsize:10,edgesymbol:["none","none"],edgesymbolsize:10,edgelabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodescaleratio:.6,label:{show:!1,formatter:"{b}"},itemstyle:{},linestyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),t_=ur.prototype,d_=qr.prototype;function c_(t){return isnan(+t.cpx1)||isnan(+t.cpy1)}var l_=ds({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildpath:function(t,e){this[c_(e)?"_buildpathline":"_buildpathcurve"](t,e)},_buildpathline:t_.buildpath,_buildpathcurve:d_.buildpath,pointat:function(t){return this[c_(this.shape)?"_pointatline":"_pointatcurve"](t)},_pointatline:t_.pointat,_pointatcurve:d_.pointat,tangentat:function(t){var e=this.shape,i=c_(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentatcurve(t);return mt(i,i)},_tangentatcurve:d_.tangentat}),k_=["fromsymbol","tosymbol"];function p_(t){return"_"+t+"type"}function n_(t,e,i){var n=e.getitemvisual(i,"color"),a=e.getitemvisual(i,t),o=e.getitemvisual(i,t+"size");if(a&&"none"!==a){k(o)||(o=[o,o]);var r=jp(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function o_(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=nan,t.cpy1=nan)}function e_(t,e,i){si.call(this),this._createline(t,e,i)}var r_=e_.prototype;function z_(t){this._ctor=t||e_,this.group=new si}r_.beforeupdate=function(){var t=this.childofname("fromsymbol"),e=this.childofname("tosymbol"),i=this.childofname("label");if(t||e||!i.ignore){for(var n=1,a=this.parent;a;)a.scale&&(n/=a.scale[0]),a=a.parent;var o=this.childofname("line");if(this.__dirty||o.__dirty){var r=o.shape.percent,s=o.pointat(0),l=o.pointat(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=o.tangentat(0);t.attr("rotation",math.pi/2-math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=o.tangentat(1);e.attr("rotation",-math.pi/2-math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f;i.attr("position",l);var p=5*n;if("end"===i.__position)c=[u[0]*p+l[0],u[1]*p+l[1]],d=.8=t&&(0===e?0:n[e-1][0])o&&(e[1-n]=e[n]+c.sign*o),e}function bw(t,e){var i=t[e]-t[1-e];return{span:math.abs(i),sign:0a*(1-h[0])?(l="jump",r=s-a*(1-h[2])):0<=(r=s-a*h[1])&&(r=s-a*(1-h[1]))<=0&&(r=0),(r*=e.axisexpandwidth/u)?ww(r,n,o,"all"):l="none";else{a=n[1]-n[0];(n=[aw(0,o[1]*s/a-a/2)])[1]=iw(o[1],n[0]+a),n[0]=n[1]-a}return{axisexpandwindow:n,behavior:l}}},hu.register("parallel",{create:function(n,a){var o=[];return n.eachcomponent("parallel",function(t,e){var i=new kw(t,n,a);i.name="parallel_"+e,i.resize(t,a),(t.coordinatesystem=i).model=t,o.push(i)}),n.eachseries(function(t){if("parallel"===t.get("coordinatesystem")){var e=n.querycomponents({maintype:"parallel",index:t.get("parallelindex"),id:t.get("parallelid")})[0];t.coordinatesystem=e.coordinatesystem}}),o}});var nw=fu.extend({type:"baseparallelaxis",axis:null,activeintervals:[],getareaselectstyle:function(){return xa([["fill","color"],["linewidth","borderwidth"],["stroke","bordercolor"],["width","width"],["opacity","opacity"]])(this.getmodel("areaselectstyle"))},setactiveintervals:function(t){var e=this.activeintervals=d(t);if(e)for(var i=e.length-1;0<=i;i--)wl(e[i])},getactivestate:function(t){var e=this.activeintervals;if(!e.length)return"normal";if(null==t||isnan(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;nf&&(f=m.depth),g.setlayout({depth:v?m.depth:c},!0),"vertical"===o?g.setlayout({dy:i},!0):g.setlayout({dx:i},!0);for(var y=0;y "))},preventincremental:function(){return!!this.get("effect.show")},getprogressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getprogressivethreshold:function(){var t=this.option.progressivethreshold;return null==t?this.option.large?2e4:this.get("progressivethreshold"):t},defaultoption:{coordinatesystem:"geo",zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,xaxisindex:0,yaxisindex:0,symbol:["none","none"],symbolsize:[10,10],geoindex:0,effect:{show:!1,period:4,constantspeed:0,symbol:"circle",symbolsize:3,loop:!0,traillength:.2},large:!1,largethreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},linestyle:{opacity:.5}}});function ps(t,e,i){si.call(this),this.add(this.createline(t,e,i)),this._updateeffectsymbol(t,e)}var ns=ps.prototype;function os(t,e,i){si.call(this),this._createpolyline(t,e,i)}ns.createline=function(t,e,i){return new e_(t,e,i)},ns._updateeffectsymbol=function(t,e){var i=t.getitemmodel(e).getmodel("effect"),n=i.get("symbolsize"),a=i.get("symbol");k(n)||(n=[n,n]);var o=i.get("color")||t.getitemvisual(e,"color"),r=this.childat(1);this._symboltype!==a&&(this.remove(r),(r=jp(a,-.5,-.5,1,1,o)).z2=100,r.culling=!0,this.add(r)),r&&(r.setstyle("shadowcolor",o),r.setstyle(i.getitemstyle(["color"])),r.attr("scale",n),r.setcolor(o),r.attr("scale",n),this._symboltype=a,this._updateeffectanimation(t,i,e))},ns._updateeffectanimation=function(e,t,i){var n=this.childat(1);if(n){var a=this,o=e.getitemlayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantspeed"),u=w(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateanimationpoints(n,o),0e);r++);r=math.min(r-1,a-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-math.atan2(l,s)-math.pi/2,this._lastframe=r,this._lastframepercent=e,t.ignore=!1}},w(rs,ps);var bs=ds({shape:{polyline:!1,curveness:0,segs:[]},buildpath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,a){var i=e[1]-e[0],o=(n=n(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e=e.y&&t[1]<=e.y+e.height:i.contain(i.tolocalcoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointtodata:function(t){var e=this.getaxis();return[e.coordtodata(e.tolocalcoord(t["horizontal"===e.orient?0:1]))]},datatopoint:function(t){var e=this.getaxis(),i=this.getrect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof array&&(t=t[0]),n[a]=e.toglobalcoord(e.datatocoord(+t)),n[1-a]=0==a?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var vm=["axisline","axisticklabel","axisname"],ym="splitline",xm=um.extend({type:"singleaxis",axispointerclass:"singleaxispointer",render:function(t,e,i,n){var a=this.group;a.removeall();var o=mm(t),r=new cm(t,o);e(vm,r.add,r),a.add(r.getgroup()),t.get(ym+".show")&&this["_"+ym](t),xm.supercall(this,"render",t,e,i,n)},_splitline:function(t){var e=t.axis;if(!e.scale.isblank()){var i=t.getmodel("splitline"),n=i.getmodel("linestyle"),a=n.get("width"),o=n.get("color");o=o instanceof array?o:[o];for(var r=t.coordinatesystem.getrect(),s=e.ishorizontal(),l=[],u=0,h=e.gettickscoords({tickmodel:i}),c=[],d=[],f=0;fr)return!0;if(o){var s=wm(t).seriesdatacount,l=n.getextent();return math.abs(l[0]-l[1])/s>r}return!1},makeeloption:function(t,e,i,n,a){},createpointerel:function(t,e,i,n){var a=e.pointer;if(a){var o=zm(t).pointerel=new ol[a.type](bm(e.pointer));t.add(o)}},createlabelel:function(t,e,i,n){if(e.label){var a=zm(t).labelel=new hr(bm(e.label));t.add(a),wm(a,n)}},updatepointerel:function(t,e,i){var n=zm(t).pointerel;n&&e.pointer&&(n.setstyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updatelabelel:function(t,e,i,n){var a=zm(t).labelel;a&&(a.setstyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),wm(a,n))},_renderhandle:function(t){if(!this._dragging&&this.updatehandletransform){var e,i=this._axispointermodel,n=this._api.getzr(),a=this._handle,o=i.getmodel("handle"),r=i.get("status");if(!o.get("show")||!r||"hide"===r)return a&&n.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=el(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ft(t.event)},onmousedown:vm(this._onhandledragmove,this,0,0),drift:vm(this._onhandledragmove,this),ondragend:vm(this._onhandledragend,this)}),n.add(a)),zm(a,i,!1);a.setstyle(o.getitemstyle(null,["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"]));var s=o.get("size");k(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),dc(this,"_dodispatchaxispointer",o.get("throttle")||0,"fixrate"),this._movehandletovalue(t,e)}},_movehandletovalue:function(t,e){fm(this._axispointermodel,!e&&this._moveanimation,this._handle,hm(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},_onhandledragmove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updatehandletransform(hm(i),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=n,i.stopanimation(),i.attr(hm(n)),zm(i).lastprop=null,this._dodispatchaxispointer()}},_dodispatchaxispointer:function(){if(this._handle){var t=this._payloadinfo,e=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:t.cursorpoint[0],y:t.cursorpoint[1],tooltipoption:t.tooltipoption,axesinfo:[{axisdim:e.axis.dim,axisindex:e.componentindex}]})}},_onhandledragend:function(t){if(this._dragging=!1,this._handle){var e=this._axispointermodel.get("value");this._movehandletovalue(e),this._api.dispatchaction({type:"hidetip"})}},gethandletransform:null,updatehandletransform:null,clear:function(t){this._lastvalue=null,this._laststatus=null;var e=t.getzr(),i=this._group,n=this._handle;e&&i&&(this._lastgraphickey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadinfo=null)},doclear:function(){},buildlabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=gm);var qm=gm.extend({makeeloption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=ti(r,o).getotheraxis(o).getglobalextent(),u=o.toglobalcoord(o.datatocoord(e,!0));if(s&&"none"!==s){var h=um(n),c=ei[s](o,u,l);c.style=h,t.graphickey=c.type,t.pointer=c}qm(e,t,qm(r.model,i),i,n,a)},gethandletransform:function(t,e,i){var n=qm(e.axis.grid.model,e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:jm(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i,n){var a=i.axis,o=a.grid,r=a.getglobalextent(!0),s=ti(o,a).getotheraxis(a).getglobalextent(),l="x"===a.dim?0:1,u=t.position;u[l]+=e[l],u[l]=math.min(r[1],u[l]),u[l]=math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorpoint:c,tooltipoption:[{verticalalign:"middle"},{align:"center"}][l]}}});function ti(t,e){var i={};return i[e.dim+"axisindex"]=e.index,t.getcartesian(i)}var ei={line:function(t,e,i){return{type:"line",subpixeloptimize:!0,shape:km([e,i[0]],[e,i[1]],ii(t))}},shadow:function(t,e,i){var n=math.max(1,t.getbandwidth()),a=i[1]-i[0];return{type:"rect",shape:$m([e-n/2,i[0]],[n,a],ii(t))}}};function ii(t){return"x"===t.dim?0:1}um.registeraxispointerclass("cartesianaxispointer",qm),jd(function(t){if(t){t.axispointer&&0!==t.axispointer.length||(t.axispointer={});var e=t.axispointer.link;e&&!k(e)&&(t.axispointer.link=[e])}}),qd(cd.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=gm(t,e)}),tf({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},function(t,e,i){var n=t.currtrigger,r=[t.x,t.y],a=t,o=t.dispatchaction||t(i.dispatchaction,i),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){cm(r)&&(r=wm({seriesindex:a.seriesindex,dataindex:a.dataindex},e).point);var l=cm(r),u=a.axesinfo,h=s.axesinfo,c="leave"===n||cm(r),d={},f={},p={list:[],map:{}},g={showpointer:sm(am,f),showtooltip:sm(tm,p)};bm(s.coordsysmap,function(t,e){var o=l||t.containpoint(r);bm(s.coordsysaxesinfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisdim&&e.axis.model.componentindex===n.axisindex)return n}}(u,t);if(!c&&o&&(!u||n)){var a=n&&n.value;null!=a||l||(a=i.pointtodata(r)),null!=a&&im(t,a,g,!1,d)}})});var m={};return bm(h,function(a,t){var o=a.linkgroup;o&&!f[t]&&bm(o.axesinfo,function(t,e){var i=f[e];if(t!==a&&i){var n=i.value;o.mapper&&(n=a.axis.scale.parse(o.mapper(n,dm(t),dm(a)))),m[a.key]=n}})}),bm(m,function(t,e){im(h[e],t,g,!0,d)}),function(a,t,e){var o=e.axesinfo=[];bm(t,function(t,e){var i=t.axispointermodel.option,n=a[e];n?(t.usehandle||(i.status="show"),i.value=n.value,i.seriesdataindices=(n.payloadbatch||[]).slice()):t.usehandle||(i.status="hide"),"show"===i.status&&o.push({axisdim:t.axis.dim,axisindex:t.axis.model.componentindex,value:i.value})})}(f,h,d),function(t,e,i,n){if(cm(e)||!t.list.length)return n({type:"hidetip"});var a=((t.list[0].databyaxis[0]||{}).seriesdataindices||[])[0]||{};n({type:"showtip",escapeconnect:!0,x:e[0],y:e[1],tooltipoption:i.tooltipoption,position:i.position,dataindexinside:a.dataindexinside,dataindex:a.dataindex,seriesindex:a.seriesindex,databycoordsys:t.list})}(p,r,t,o),function(t,e,i){var n=i.getzr(),a="axispointerlasthighlights",o=mm(n)[a]||{},r=mm(n)[a]={};bm(t,function(t,e){var i=t.axispointermodel.option;"show"===i.status&&bm(i.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;r[e]=t})});var s=[],l=[];e(o,function(t,e){r[e]||l.push(t)}),e(r,function(t,e){o[e]||s.push(t)}),l.length&&i.dispatchaction({type:"downplay",escapeconnect:!0,batch:l}),s.length&&i.dispatchaction({type:"highlight",escapeconnect:!0,batch:s})}(h,0,i),d}});var ni=["x","y"],ai=["width","height"],oi=gm.extend({makeeloption:function(t,e,i,n,a){var o=i.axis,r=o.coordinatesystem,s=li(r,1-si(o)),l=r.datatopoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=um(n),c=ri[u](o,l,s);c.style=h,t.graphickey=c.type,t.pointer=c}qm(e,t,mm(i),i,n,a)},gethandletransform:function(t,e,i){var n=mm(e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:jm(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i,n){var a=i.axis,o=a.coordinatesystem,r=si(a),s=li(o,r),l=t.position;l[r]+=e[r],l[r]=math.min(s[1],l[r]),l[r]=math.max(s[0],l[r]);var u=li(o,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorpoint:c,tooltipoption:{verticalalign:"middle"}}}}),ri={line:function(t,e,i){return{type:"line",subpixeloptimize:!0,shape:km([e,i[0]],[e,i[1]],si(t))}},shadow:function(t,e,i){var n=t.getbandwidth(),a=i[1]-i[0];return{type:"rect",shape:$m([e-n/2,i[0]],[n,a],si(t))}}};function si(t){return t.ishorizontal()?0:1}function li(t,e){var i=t.getrect();return[i[ni[e]],i[ni[e]]+i[ai[e]]]}um.registeraxispointerclass("singleaxispointer",oi),lf({type:"single"});var ui=wh.extend({type:"series.themeriver",dependencies:["singleaxis"],namemap:null,init:function(t){ui.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()}},fixdata:function(t){var e=t.length,i=ra(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,datalist:t})});for(var a=n.length,o=-1,r=-1,s=0;smath.pi/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>math.pi/2&&(y="right")):"right"===y&&(d=l.r-v,f>math.pi/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textalign:y,textverticalalign:s("verticalalign")||"middle",opacity:s("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=s("rotate"),b=0;function s(t){var e=o.get(t);return null==e?a.get(t):e}"radial"===w?(b=-f)<-math.pi/2&&(b+=math.pi):"tangential"===w?(b=math.pi/2-f)>math.pi/2?b-=math.pi:b<-math.pi/2&&(b+=math.pi):"number"==typeof w&&(b=w*math.pi/180),c.attr("rotation",b)},vi._initevents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function a(){r.onemphasis(n)}function o(){r.onnormal()}var r=this;i.isanimationenabled()&&t.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",function(){r.ondownplay()}).on("highlight",function(){r.onhighlight()})},w(mi,si);ec.extend({type:"sunburst",init:function(){},render:function(a,o,t,e){var n=this;this.seriesmodel=a,this.api=t,this.ecmodel=o;var r=a.getdata(),s=r.tree.root,i=a.getviewroot(),l=this.group,u=a.get("renderlabelforzerodata"),h=[];i.eachnode(function(t){h.push(t)});var c=this._oldchildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getid()}function e(t,e){!function(t,e){u||!t||t.getvalue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updatedata(!1,t,"normal",a,o),r.setitemgraphicel(t.dataindex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new mi(t,a,o);l.add(i),r.setitemgraphicel(t.dataindex,i)}}(null==t?null:i[t],null==e?null:n[e])}new df(n,i,t,t).add(e).update(e).remove(a(e,null)).execute()}(h,c),function(t,e){if(0=i.r0}}});var yi="sunburstroottonode";tf({type:yi,update:"updateview"},function(a,t){t.eachcomponent({maintype:"series",subtype:"sunburst",query:a},function(t,e){var i=dx(a,[yi],t);if(i){var n=t.getviewroot();n&&(a.direction=px(n,i.node)?"rollup":"drilldown"),t.resetviewroot(i.node)}})});var xi="sunbursthighlight";tf({type:xi,update:"updateview"},function(n,t){t.eachcomponent({maintype:"series",subtype:"sunburst",query:n},function(t,e){var i=dx(n,[xi],t);i&&(n.highlight=i.node)})});tf({type:"sunburstunhighlight",update:"updateview"},function(i,t){t.eachcomponent({maintype:"series",subtype:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var _i=math.pi/180;function wi(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getvalue()-e.getvalue())*(n?1:-1);return 0==i?(t.dataindex-e.dataindex)*(n?-1:1):i})}function bi(o,r){return r=r||[0,0],n(["x","y"],function(t,e){var i=this.getaxis(t),n=r[e],a=o[e]/2;return"category"===i.type?i.getbandwidth():math.abs(i.datatocoord(n-a)-i.datatocoord(n+a))},this)}af(a(av,"sunburst")),nf(a(function(t,e,c,i){e.eachseriesbytype(t,function(t){var e=t.get("center"),i=t.get("radius");k(i)||(i=[0,i]),k(e)||(e=[e,e]);var n=c.getwidth(),a=c.getheight(),h=math.min(n,a),c=xl(e[0],n),d=xl(e[1],a),f=xl(i[0],h/2),o=xl(i[1],h/2),r=-t.get("startangle")*_i,p=t.get("minangle")*_i,g=t.getdata().tree.root,s=t.getviewroot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=wi(n,i);n.length&&e(t.children,function(t){e(t,i)})}(s,l);var u=0;e(s.children,function(t){isnan(t.getvalue())||u++});var v=s.getvalue(),y=math.pi/(v||u)*2,x=0t[1]&&t.reverse(),{coordsys:{type:"polar",cx:a.cx,cy:a.cy,r:t[1],r0:t[0]},api:{coord:t(function(t){var e=o.datatoradius(t[0]),i=r.datatoangle(t[1]),n=a.coordtopoint([e,i]);return n.push(e,i*math.pi/180),n}),size:t(ii,a)}}},calendar:function(i){var t=i.getrect(),e=i.getrangeinfo();return{coordsys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellwidth:i.getcellwidth(),cellheight:i.getcellheight(),rangeinfo:{start:e.start,end:e.end,weeks:e.weeks,daycount:e.allday}},api:{coord:function(t,e){return i.datatopoint(t,e)}}}}};function ni(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function oi(o,r,e,t){var i=o.get("renderitem"),n=o.coordinatesystem,a={};n&&(a=n.preparecustoms?n.preparecustoms():pi[n.type](n));var s,l,u,h,c,d=c({getwidth:t.getwidth,getheight:t.getheight,getzr:t.getzr,getdevicepixelratio:t.getdevicepixelratio,value:function(t,e){return null==e&&(e=s),r.get(r.getdimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getmodel(ti).getitemstyle();null!=c&&(i.fill=c);var n=r.getitemvisual(e,"opacity");null!=n&&(i.opacity=n);var a=t?vi(t,u):u;return gs(i,a,null,{autocolor:c,isrecttext:!0}),i.text=a.getshallow("show")?h(o.getformattedlabel(e,"normal"),bg(r,e)):null,t&&gi(i,t),i},styleemphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getmodel(di).getitemstyle(),n=t?vi(t,h):h;return gs(i,n,null,{isrecttext:!0},!0),i.text=n.getshallow("show")?z(o.getformattedlabel(e,"emphasis"),o.getformattedlabel(e,"normal"),bg(r,e)):null,t&&gi(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getitemvisual(e,t)},barlayout:function(t){if(n.getbaseaxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getbandwidth(),a=0;ae[1]&&e.reverse();var i=t.getextent(),n=math.pi/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startangle:-i[0]*n,endangle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,a=i*i+n*n,o=this.r,r=this.r0;return a<=o*o&&r*r<=a}}}};var ki=fu.extend({type:"polaraxis",axis:null,getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"polar",index:this.option.polarindex,id:this.option.polarid})[0]}});m(ki.prototype,hp);var $i={splitnumber:5};function ji(t,e){return e.type||(e.data?"category":"value")}function qi(t,e){var i=this,n=i.getangleaxis(),a=i.getradiusaxis();if(n.scale.setextent(1/0,-1/0),a.scale.setextent(1/0,-1/0),t.eachseries(function(t){if(t.coordinatesystem===i){var e=t.getdata();e(e.mapdimension("radius",!0),function(t){a.scale.unionextentfromdata(e,uf(e,t))}),e(e.mapdimension("angle",!0),function(t){n.scale.unionextentfromdata(e,uf(e,t))})}}),zp(n.scale,n.model),zp(a.scale,a.model),"category"===n.type&&!n.onband){var o=n.getextent(),r=360/n.scale.count();n.inverse?o[1]+=r:o[1]-=r,n.setextent(o[0],o[1])}}function ta(t,e){if(t.type=e.get("type"),t.scale=bp(e),t.onband=e.get("boundarygap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleaxis"===e.maintype){t.inverse^=e.get("clockwise");var i=e.get("startangle");t.setextent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}mm("angle",ki,ji,{startangle:90,clockwise:!0,splitnumber:12,axislabel:{rotate:!1}}),mm("radius",ki,ji,$i),sf({type:"polar",dependencies:["polaraxis","angleaxis"],coordinatesystem:null,findaxismodel:function(t){var e;return this.ecmodel.eachcomponent(t,function(t){t.getcoordsysmodel()===this&&(e=t)},this),e},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),hu.register("polar",{dimensions:qi.prototype.dimensions,create:function(i,s){var l=[];return i.eachcomponent("polar",function(t,e){var i=new qi(e);i.update=qi;var n=i.getradiusaxis(),a=i.getangleaxis(),o=t.findaxismodel("radiusaxis"),r=t.findaxismodel("angleaxis");ta(n,o),ta(a,r),function(t,e,i){var n=e.get("center"),a=i.getwidth(),o=i.getheight();t.cx=xl(n[0],a),t.cy=xl(n[1],o);var r=t.getradiusaxis(),s=math.min(a,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:k(l)||(l=[0,l]),l=[xl(l[0],s),xl(l[1],s)],r.inverse?r.setextent(l[1],l[0]):r.setextent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinatesystem=i).model=t}),i.eachseries(function(t){if("polar"===t.get("coordinatesystem")){var e=i.querycomponents({maintype:"polar",index:t.get("polarindex"),id:t.get("polarid")})[0];t.coordinatesystem=e.coordinatesystem}}),l}});var ea=["axisline","axislabel","axistick","splitline","splitarea"];function ia(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordtopoint([e[0],i]),a=t.coordtopoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function na(t){return t.getradiusaxis().inverse?0:1}function aa(t){var e=t[0],i=t[t.length-1];e&&i&&math.abs(math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}um.extend({type:"angleaxis",axispointerclass:"polaraxispointer",render:function(e,t){if(this.group.removeall(),e.get("show")){var i=e.axis,n=i.polar,a=n.getradiusaxis().getextent(),o=i.gettickscoords(),r=n(i.getviewlabels(),function(t){return(t=d(t)).coord=i.datatocoord(t.tickvalue),t});aa(r),aa(o),e(ea,function(t){!e.get(t+".show")||i.scale.isblank()&&"axisline"!==t||this["_"+t](e,n,o,a,r)},this)}},_axisline:function(t,e,i,n){var a,o=t.getmodel("axisline.linestyle"),r=na(e),s=r?0:1;(a=0===n[s]?new lr({shape:{cx:e.cx,cy:e.cy,r:n[r]},style:o.getlinestyle(),z2:1,silent:!0}):new nr({shape:{cx:e.cx,cy:e.cy,r:n[r],r0:n[s]},style:o.getlinestyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axistick:function(t,e,i,n){var a=t.getmodel("axistick"),o=(a.get("inside")?-1:1)*a.get("length"),r=n[na(e)],s=n(i,function(t){return new ur({shape:ia(e,[r,r+o],t.coord)})});this.group.add(ys(s,{style:c(a.getmodel("linestyle").getlinestyle(),{stroke:t.get("axisline.linestyle.color")})}))},_axislabel:function(c,d,t,f,e){var p=c.getcategories(!0),g=c.getmodel("axislabel"),m=g.get("margin"),v=c.get("triggerevent");e(e,function(t,e){var i=g,n=t.tickvalue,a=f[na(d)],o=d.coordtopoint([a+m,t.coord]),r=d.cx,s=d.cy,l=math.abs(o[0]-r)/a<.3?"center":o[0]>r?"left":"right",u=math.abs(o[1]-s)/a<.3?"middle":o[1]>s?"top":"bottom";p&&p[n]&&p[n].textstyle&&(i=new dl(p[n].textstyle,g,g.ecmodel));var h=new dr({silent:cm.islabelsilent(c)});this.group.add(h),gs(h.style,i,{x:o[0],y:o[1],textfill:i.gettextcolor()||c.get("axisline.linestyle.color"),text:t.formattedlabel,textalign:l,textverticalalign:u}),v&&(h.eventdata=cm.makeaxiseventdatabase(c),h.eventdata.targettype="axislabel",h.eventdata.value=t.rawlabel)},this)},_splitline:function(t,e,i,n){var a=t.getmodel("splitline").getmodel("linestyle"),o=a.get("color"),r=0;o=o instanceof array?o:[o];for(var s=[],l=0;lm?"left":"right",h=math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalalign:h}}(e,i,0,s,d))}});var la={line:function(t,e,i,n,a){return"angle"===t.dim?{type:"line",shape:km(e.coordtopoint([n[0],i]),e.coordtopoint([n[1],i]))}:{type:"circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,a){var o=math.max(1,t.getbandwidth()),r=math.pi/180;return"angle"===t.dim?{type:"sector",shape:jm(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"sector",shape:jm(e.cx,e.cy,i-o/2,i+o/2,0,2*math.pi)}}};function ua(n,t){t.update="updateview",tf(t,function(t,e){var i={};return e.eachcomponent({maintype:"geo",query:t},function(e){e[n](t.name),e(e.coordinatesystem.regions,function(t){i[t.name]=e.isselected(t.name)||!1})}),{selected:i,name:t.name}})}um.registeraxispointerclass("polaraxispointer",sa),nf(a(function(t,e,i){var n={},o=function(t){var g={};e(t,function(t,e){var i=t.getdata(),n=t.coordinatesystem,a=n.getbaseaxis(),o=ui(n,a),r=a.getextent(),s="category"===a.type?a.getbandwidth():math.abs(r[1]-r[0])/i.count(),l=g[o]||{bandwidth:s,remainedwidth:s,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[o]=l;var h=zi(t);u[h]||l.autowidthcount++,u[h]=u[h]||{width:0,maxwidth:0};var c=xl(t.get("barwidth"),s),d=xl(t.get("barmaxwidth"),s),f=t.get("bargap"),p=t.get("barcategorygap");c&&!u[h].width&&(c=math.min(l.remainedwidth,c),u[h].width=c,l.remainedwidth-=c),d&&(u[h].maxwidth=d),null!=f&&(l.gap=f),null!=p&&(l.categorygap=p)});var d={};return e(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandwidth,a=xl(t.categorygap,n),o=xl(t.gap,1),r=t.remainedwidth,s=t.autowidthcount,l=(r-a)/(s+(s-1)*o);l=math.max(l,0),e(e,function(t,e){var i=t.maxwidth;i&&i=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getrangeinfo:function(t){var e;(t=[this.getdateinfo(t[0]),this.getdateinfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=math.floor(t[1].time/864e5)-math.floor(t[0].time/864e5)+1,n=new date(t[0].time),a=n.getdate(),o=t[1].date.getdate();if(n.setdate(a+i-1),n.getdate()!==o)for(var r=0n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new date(n.start.time);return o.setdate(n.start.d+a),this.getdateinfo(o)}},ha.dimensions=ha.prototype.dimensions,ha.getdimensionsinfo=ha.prototype.getdimensionsinfo,ha.create=function(i,n){var a=[];return i.eachcomponent("calendar",function(t){var e=new ha(t,i,n);a.push(e),t.coordinatesystem=e}),i.eachseries(function(t){"calendar"===t.get("coordinatesystem")&&(t.coordinatesystem=a[t.get("calendarindex")||0])}),a},hu.register("calendar",ha);var da=fu.extend({type:"calendar",coordinatesystem:null,defaultoption:{zlevel:0,z:2,left:80,top:60,cellsize:20,orient:"horizontal",splitline:{show:!0,linestyle:{color:"#000",width:1,type:"solid"}},itemstyle:{color:"#fff",borderwidth:1,bordercolor:"#ccc"},daylabel:{show:!0,firstday:0,position:"start",margin:"50%",namemap:"en",color:"#000"},monthlabel:{show:!0,position:"start",margin:5,align:"center",namemap:"en",formatter:null,color:"#000"},yearlabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontfamily:"sans-serif",fontweight:"bolder",fontsize:20}},init:function(t,e,i,n){var a=su(t);da.superapply(this,"init",arguments),fa(t,a)},mergeoption:function(t,e){da.superapply(this,"mergeoption",arguments),fa(this.option,t)}});function fa(t,e){var i=t.cellsize;k(i)?1===i.length&&(i[1]=i[0]):i=t.cellsize=[i,i];var n=n([0,1],function(t){return function(t,e){return null!=t[eu[e][0]]||null!=t[eu[e][1]]&&null!=t[eu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ru(t,e,{type:"box",ignoresize:n})}var pa={en:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},ga={en:["s","m","t","w","t","f","s"],cn:["日","一","二","三","四","五","六"]};lf({type:"calendar",_tlpoints:null,_blpoints:null,_firstdayofmonth:null,_firstdaypoints:null,render:function(t,e,i){var n=this.group;n.removeall();var a=t.coordinatesystem,o=a.getrangeinfo(),r=a.getorient();this._renderdayrect(t,o,n),this._renderlines(t,o,r,n),this._renderyeartext(t,o,r,n),this._rendermonthtext(t,r,n),this._renderweektext(t,o,r,n)},_renderdayrect:function(t,e,i){for(var n=t.coordinatesystem,a=t.getmodel("itemstyle").getitemstyle(),o=n.getcellwidth(),r=n.getcellheight(),s=e.start.time;s<=e.end.time;s=n.getnextnday(s,1).time){var l=n.datatorect([s],!1).tl,u=new hr({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderlines:function(i,t,n,a){var o=this,r=i.coordinatesystem,s=i.getmodel("splitline.linestyle").getlinestyle(),l=i.get("splitline.show"),e=s.linewidth;this._tlpoints=[],this._blpoints=[],this._firstdayofmonth=[],this._firstdaypoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formateddate),0===h&&(u=r.getdateinfo(t.start.y+"-"+t.start.m));var c=u.date;c.setmonth(c.getmonth()+1),u=r.getdateinfo(c)}function d(t){o._firstdayofmonth.push(r.getdateinfo(t)),o._firstdaypoints.push(r.datatorect([t],!1).tl);var e=o._getlinepointsofoneweek(i,t,n);o._tlpoints.push(e[0]),o._blpoints.push(e[e.length-1]),l&&o._drawsplitline(e,s,a)}d(r.getnextnday(t.end.time,1).formateddate),l&&this._drawsplitline(o._getedgespoints(o._tlpoints,e,n),s,a),l&&this._drawsplitline(o._getedgespoints(o._blpoints,e,n),s,a)},_getedgespoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawsplitline:function(t,e,i){var n=new zr({z2:20,shape:{points:t},style:e});i.add(n)},_getlinepointsofoneweek:function(t,e,i){var n=t.coordinatesystem;e=n.getdateinfo(e);for(var a=[],o=0;o<7;o++){var r=n.getnextnday(e.time,o),s=n.datatorect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterlabel:function(t,e){return"string"==typeof t&&t?xl(t,e):"function"==typeof t?t(e):e.namemap},_yeartextpositioncontrol:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return"left"!==n&&"right"!==n||(r=math.pi/2),{rotation:r,position:e,style:{textalign:o[0],textverticalalign:o[1]}}},_renderyeartext:function(t,e,i,n){var a=t.getmodel("yearlabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,namemap:d},g=this._formatterlabel(f,p),m=new dr({z2:30});gs(m.style,a,{text:g}),m.attr(this._yeartextpositioncontrol(m,c[r],i,r,o)),n.add(m)}},_monthtextpositioncontrol:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textalign:o,textverticalalign:r}},_rendermonthtext:function(t,e,i){var n=t.getmodel("monthlabel");if(n.get("show")){var a=n.get("namemap"),o=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];r(a)&&(a=pa[a.touppercase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;o="start"===r?-o:o;for(var c="center"===s,d=0;dd.getheight()&&(i.textposition="top",o=!0);var r=o?-5-n.height:p+8;a+n.width/2>d.getwidth()?(i.textposition=["100%",r],i.textalign="right"):a-n.width/2<0&&(i.textposition=[0,r],i.textalign="left")}})}function t(t,e){var i,n=g[t],a=g[e],o=new dl(l[n],h,h.ecmodel);if(n&&!a){if(function(t){return 0===t.indexof("my")}(n))i={model:o,onclick:o.option.onclick,featurename:n};else{var r=sa(n);if(!r)return;i=new r(o,c,d)}u[n]=i}else{if(!(i=u[a]))return;i.model=o,i.ecmodel=c,i.api=d}n||!a?o.get("show")&&!i.unusable?(function(a,o,t){var r=a.getmodel("iconstyle"),s=a.getmodel("emphasis.iconstyle"),e=o.geticons?o.geticons():a.get("icon"),l=a.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=a.iconpaths={};e(e,function(t,e){var i=el(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setstyle(r.getitemstyle()),i.hoverstyle=s.getitemstyle(),i.setstyle({text:l[e],textalign:s.get("textalign"),textborderradius:s.get("textborderradius"),textpadding:s.get("textpadding"),textfill:null});var n=h.getmodel("tooltip");n&&n.get("show")&&i.attr("tooltip",l({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterparams:{componenttype:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),os(i),h.get("showtitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getitemstyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setstyle({textfill:s.get("textfill")||t.fill||t.stroke||"#000",textbackgroundcolor:s.get("textbackgroundcolor"),textposition:s.get("textposition")||e})}).on("mouseout",function(){i.setstyle({textfill:null,textbackgroundcolor:null})})),i.trigger(a.get("iconstatus."+e)||"normal"),f.add(i),i.on("click",t(o.onclick,o,c,d,e)),u[e]=i})}(o,i,n),o.seticonstatus=function(t,e){var i=this.option,n=this.iconpaths;i.iconstatus=i.iconstatus||{},i.iconstatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(o,c,d,s)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateview:function(t,e,i,n){e(this._features,function(t){t.updateview&&t.updateview(t.model,e,i,n)})},remove:function(e,i){e(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeall()},dispose:function(e,i){e(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var aa=gc.toolbox.saveasimage;function ta(t){this.model=t}ta.defaultoption={show:!0,icon:"m4.7,22.9l29.3,45.5l54.7,23.4m4.6,43.6l4.6,58l53.8,58l53.8,43.6m29.2,45.1l29.2,0",title:aa.title,type:"png",connectedbackgroundcolor:"#fff",name:"",excludecomponents:["toolbox"],pixelratio:1,lang:aa.lang.slice()},ta.prototype.unusable=!v.canvassupported,ta.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",o=e.getconnecteddataurl({type:a,backgroundcolor:i.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",connectedbackgroundcolor:i.get("connectedbackgroundcolor"),excludecomponents:i.get("excludecomponents"),pixelratio:i.get("pixelratio")});if("function"!=typeof mouseevent||v.browser.ie||v.browser.edge)if(window.navigator.mssaveoropenblob){for(var r=atob(o.split(",")[1]),s=r.length,l=new uint8array(s);s--;)l[s]=r.charcodeat(s);var u=new blob([l]);window.navigator.mssaveoropenblob(u,n+"."+a)}else{var h=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createelement("a");d.download=n+"."+a,d.target="_blank",d.href=o;var f=new mouseevent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchevent(f)}},ba("saveasimage",ta);var da=gc.toolbox.magictype;function ca(t){this.model=t}ca.defaultoption={show:!0,type:[],icon:{line:"m4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9m4.1,58h51.4",bar:"m6.7,22.9h10v48h-10v22.9zm24.9,13h10v35h-10v13zm43.2,2h10v46h-10v2zm3.1,58h53.7",stack:"m8.2,38.4l-8.4,4.1l30.6,15.3l60,42.5l-8.1-4.1l-21.5,11l8.2,38.4z m51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9l8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2l51.9,30z m51.9,21.7l-8.1,4.2l35.7,30l-5.3,2.8l24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2l8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1l51.9,21.7zm30.4,2.2l-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1l30.4,2.2z",tiled:"m2.3,2.2h22.8v25h2.3v2.2z m35,2.2h22.8v25h35v2.2zm2.3,35h22.8v22.8h2.3v35z m35,35h22.8v22.8h35v35z"},title:d(da.title),option:{},seriesindex:{}};var la=ca.prototype;la.geticons=function(){var t=this.model,e=t.get("icon"),i={};return e(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var ka={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){if("line"===t||"bar"===t)return m({id:e,stack:"__ec_magictype_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return m({id:e,stack:""},n.get("option.tiled")||{},!0)}},pa=[["line","bar"],["stack","tiled"]];la.onclick=function(u,t,h){var c=this.model,e=c.get("seriesindex."+h);if(ka[h]){var d={series:[]};e(pa,function(t){0<=_(t,h)&&e(t,function(t){c.seticonstatus(t,"normal")})}),c.seticonstatus(h,"emphasis"),u.eachcomponent({maintype:"series",query:null==e?null:{seriesindex:e}},function(t){var e=t.subtype,i=t.id,n=ka[h](e,i,t,c);n&&(c(n,t.option),d.series.push(n));var a=t.coordinatesystem;if(a&&"cartesian2d"===a.type&&("line"===h||"bar"===h)){var o=a.getaxesbyscale("ordinal")[0];if(o){var r=o.dim+"axis",s=u.querycomponents({maintype:r,index:t.get(name+"index"),id:t.get(name+"id")})[0].componentindex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundarygap="bar"===h}}}),t.dispatchaction({type:"changemagictype",currenttype:h,newoption:d})}},tf({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},function(t,e){e.mergeoption(t.newoption)}),ba("magictype",ca);var na=gc.toolbox.dataview,oa=new array(60).join("-"),ea="\t";function ra(t){var e=function(t){var a={},o=[],r=[];return t.eachrawseries(function(t){var e=t.coordinatesystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)o.push(t);else{var i=e.getbaseaxis();if("category"===i.type){var n=i.dim+"_"+i.index;a[n]||(a[n]={categoryaxis:i,valueaxis:e.getotheraxis(i),series:[]},r.push({axisdim:i.dim,axisindex:i.index})),a[n].series.push(t)}else o.push(t)}}),{seriesgroupbycategoryaxis:a,other:o,meta:r}}(t);return{value:m([function(t){var h=[];return e(t,function(t,e){var i=t.categoryaxis,n=t.valueaxis.dim,a=[" "].concat(n(t.series,function(t){return t.name})),o=[i.model.getcategories()];e(t.series,function(t){o.push(t.getrawdata().maparray(n,function(t){return t}))});for(var r=[a.join(ea)],s=0;st[1]&&t.reverse(),t}function qa(t,e){return pa(t,e,{includemaintypes:ua})}ya.setoutputranges=function(t,e){this.matchoutputranges(t,e,function(t,e,i){if((t.coordranges||(t.coordranges=[])).push(e),!t.coordrange){t.coordrange=e;var n=qa[t.brushtype](0,i,e);t.__rangeoffset={offset:et[t.brushtype](n.values,t.range,[1,1]),xyminmax:n.xyminmax}}})},ya.matchoutputranges=function(t,n,a){fa(t,function(i){var t=this.findtargetinfo(i,n);t&&!0!==t&&e(t.coordsyses,function(t){var e=qa[i.brushtype](1,t,i.range);a(i,e.values,t,n)})},this)},ya.setinputranges=function(t,a){fa(t,function(t){var e=this.findtargetinfo(t,a);if(t.range=t.range||[],e&&!0!==e){t.panelid=e.panelid;var i=qa[t.brushtype](0,e.coordsys,t.coordrange),n=t.__rangeoffset;t.range=n?et[t.brushtype](i.values,n.offset,function(t,e){var i=nt(t),n=nt(e),a=[i[0]/n[0],i[1]/n[1]];return isnan(a[0])&&(a[0]=1),isnan(a[1])&&(a[1]=1),a}(i.xyminmax,n.xyminmax)):i.values}},this)},ya.makepanelopts=function(i,n){return n(this._targetinfolist,function(t){var e=t.getpanelrect();return{panelid:t.panelid,defaultbrushtype:n&&n(t),clippath:mb(e),istargetbycursor:ab(e,i,t.coordsysmodel),getlinearbrushotherextent:ib(e)}})},ya.controlseries=function(t,e,i){var n=this.findtargetinfo(t,i);return!0===n||n&&0<=wa(n.coordsyses,e.coordinatesystem)},ya.findtargetinfo=function(t,e){for(var i=this._targetinfolist,n=qa(e,t),a=0;an[1]&&(n[1]=e[1])})}),n[1]c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):gt(h,function(t){if("empty"===a)i.setdata(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:nan}));else{var e={};e[t]=c,u.selectrange(e)}}),gt(h,function(t){u.setapproximateextent(c,t)}))})}}};var yt=e,xt=dt,_t=sf({type:"datazoom",dependencies:["xaxis","yaxis","zaxis","radiusaxis","angleaxis","singleaxis","series"],defaultoption:{zlevel:0,z:4,orient:null,xaxisindex:null,yaxisindex:null,filtermode:"filter",throttle:null,start:0,end:100,startvalue:null,endvalue:null,minspan:null,maxspan:null,minvaluespan:null,maxvaluespan:null,rangemode:null},init:function(t,e,i){this._dataintervalbyaxis={},this._datainfo={},this._axisproxies={},this.textstylemodel,this._autothrottle=!0,this._rangepropmode=["percent","percent"];var n=wt(t);this.settledoption=n,this.mergedefaultandtheme(t,i),this.doinit(n)},mergeoption:function(t){var e=wt(t);m(this.option,t,!0),m(this.settledoption,e,!0),this.doinit(e)},doinit:function(t){var i=this.option;v.canvassupported||(i.realtime=!1),this._setdefaultthrottle(t),bt(this,t);var n=this.settledoption;yt([["start","startvalue"],["end","endvalue"]],function(t,e){"value"===this._rangepropmode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textstylemodel=this.getmodel("textstyle"),this._resettarget(),this._giveaxisproxies()},_giveaxisproxies:function(){var r=this._axisproxies;this.eachtargetaxis(function(t,e,i,n){var a=this.dependentmodels[t.axis][e],o=a.__dzaxisproxy||(a.__dzaxisproxy=new pt(t.name,e,this,n));r[t.name+"_"+e]=o},this)},_resettarget:function(){var i=this.option,t=this._judgeautomode();xt(function(t){var e=t.axisindex;i[e]=wa(i[e])},this),"axisindex"===t?this._autosetaxisindex():"orient"===t&&this._autosetorient()},_judgeautomode:function(){var e=this.option,i=!1;xt(function(t){null!=e[t.axisindex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisindex")},_autosetaxisindex:function(){var o=!0,e=this.get("orient",!0),r=this.option,t=this.dependentmodels;if(o){var i="vertical"===e?"y":"x";t[i+"axis"].length?(r[i+"axisindex"]=[0],o=!1):yt(t.singleaxis,function(t){o&&t.get("orient",!0)===e&&(r.singleaxisindex=[t.componentindex],o=!1)})}o&&xt(function(t){if(o){var e=[],i=this.dependentmodels[t.axis];if(i.length&&!e.length)for(var n=0,a=i.length;ne[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&sd(e)}};function sd(t){return new bi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var ld=["#ddd"];sf({type:"brush",dependencies:["geo","grid","xaxis","yaxis","parallel","series"],defaultoption:{toolbox:null,brushlink:null,seriesindex:"all",geoindex:null,xaxisindex:null,yaxisindex:null,brushtype:"rect",brushmode:"single",transformable:!0,brushstyle:{borderwidth:1,color:"rgba(120,140,180,0.3)",bordercolor:"rgba(120,140,180,0.8)"},throttletype:"fixrate",throttledelay:0,removeonclick:!0,z:1e4},areas:[],brushtype:null,brushoption:{},coordinfolist:[],optionupdated:function(t,e){var i=this.option;e||qt(i,t,["inbrush","outofbrush"]);var n=i.inbrush=i.inbrush||{};i.outofbrush=i.outofbrush||{color:ld},n.hasownproperty("liftz")||(n.liftz=5)},setareas:function(t){t&&(this.areas=n(t,function(t){return ud(this.option,t)},this))},setbrushoption:function(t){this.brushoption=ud(this.option,t),this.brushtype=this.brushoption.brushtype}});function ud(t,e){return m({brushtype:t.brushtype,brushmode:t.brushmode,transformable:t.transformable,brushstyle:new dl(t.brushstyle).getitemstyle(),removeonclick:t.removeonclick,z:t.z},e,!0)}function hd(t,e,i,n){n&&n.$from===t.id||this._brushcontroller.setpanels(t.brushtargetmanager.makepanelopts(i)).enablebrush(t.brushoption).updatecovers(t.areas.slice())}lf({type:"brush",init:function(t,e){this.ecmodel=t,this.api=e,this.model,(this._brushcontroller=new jw(e.getzr())).on("brush",t(this._onbrush,this)).mount()},render:function(t){return this.model=t,hd.apply(this,arguments)},updatetransform:hd,updateview:hd,dispose:function(){this._brushcontroller.dispose()},_onbrush:function(t,e){var i=this.model.id;this.model.brushtargetmanager.setoutputranges(t,this.ecmodel),e.isend&&!e.removeonclick||this.api.dispatchaction({type:"brush",brushid:i,areas:d(t),$from:i}),e.isend&&this.api.dispatchaction({type:"brushend",brushid:i,areas:d(t),$from:i})}}),tf({type:"brush",event:"brush"},function(e,t){t.eachcomponent({maintype:"brush",query:e},function(t){t.setareas(e.areas)})}),tf({type:"brushselect",event:"brushselected",update:"none"},function(){}),tf({type:"brushend",event:"brushend",update:"none"},function(){});var cd=gc.toolbox.brush;function dd(t,e,i){this.model=t,this.ecmodel=e,this.api=i,this._brushtype,this._brushmode}dd.defaultoption={show:!0,type:["rect","polygon","linex","liney","keep","clear"],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:d(cd.title)};var fd=dd.prototype;fd.render=fd.updateview=function(e,t,i){var n,a,o;t.eachcomponent({maintype:"brush"},function(t){n=t.brushtype,a=t.brushoption.brushmode||"single",o|=t.areas.length}),this._brushtype=n,this._brushmode=a,e(e.get("type",!0),function(t){e.seticonstatus(t,("keep"===t?"multiple"===a:"clear"===t?o:t===n)?"emphasis":"normal")})},fd.geticons=function(){var t=this.model,e=t.get("icon",!0),i={};return e(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},fd.onclick=function(t,e,i){var n=this._brushtype,a=this._brushmode;"clear"===i?(e.dispatchaction({type:"axisareaselect",intervals:[]}),e.dispatchaction({type:"brush",command:"clear",areas:[]})):e.dispatchaction({type:"takeglobalcursor",key:"brush",brushoption:{brushtype:"keep"===i?n:n!==i&&i,brushmode:"keep"===i?"multiple"===a?"single":"multiple":a}})},ba("brush",dd),jd(function(t,e){var i=t&&t.brush;if(k(i)||(i=i?[i]:[]),i.length){var n=[];e(i,function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(n=n.concat(e))});var a=t&&t.toolbox;k(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};e(i,function(t){e[t]=1}),i.length=0,e(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,ut)}}),sf({type:"title",layoutmode:{type:"box",ignoresize:!0},defaultoption:{zlevel:0,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:"bolder",color:"#333"},subtextstyle:{color:"#aaa"}}}),lf({type:"title",render:function(t,e,i){if(this.group.removeall(),t.get("show")){var n=this.group,a=t.getmodel("textstyle"),o=t.getmodel("subtextstyle"),r=t.get("textalign"),s=h(t.get("textbaseline"),t.get("textverticalalign")),l=new dr({style:gs({},a,{text:t.get("text"),textfill:a.gettextcolor()},{disablebox:!0}),z2:10}),u=l.getboundingrect(),h=t.get("subtext"),c=new dr({style:gs({},o,{text:h,textfill:o.gettextcolor(),y:u.height+t.get("itemgap"),textverticalalign:"top"},{disablebox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerevent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventdata=c.eventdata=p?{componenttype:"title",componentindex:t.componentindex}:null,n.add(l),h&&n.add(c);var g=n.getboundingrect(),m=t.getboxlayoutparams();m.width=g.width,m.height=g.height;var v=au(m,{width:i.getwidth(),height:i.getheight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textalign:r,textverticalalign:s};l.setstyle(y),c.setstyle(y),g=n.getboundingrect();var x=v.margin,_=t.getitemstyle(["color","opacity"]);_.fill=t.get("backgroundcolor");var w=new hr({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:t.get("borderradius")},style:_,subpixeloptimize:!0,silent:!0});n.add(w)}}});function pd(t){var e=t.itemstyle||(t.itemstyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};e(n,function(t,e){o[e]||gd(a,e)||(a[e]=t)}),i.label&&!gd(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function gd(t,e){return t.hasownproperty(e)}fu.registersubtypedefaulter("timeline",function(){return"slider"}),tf({type:"timelinechange",event:"timelinechanged",update:"prepareandupdate"},function(t,e){var i=e.getcomponent("timeline");return i&&null!=t.currentindex&&(i.setcurrentindex(t.currentindex),!i.get("loop",!0)&&i.isindexmax()&&i.setplaystate(!1)),e.resetoption("timeline"),c({currentindex:i.option.currentindex},t)}),tf({type:"timelineplaychange",event:"timelineplaychanged",update:"update"},function(t,e){var i=e.getcomponent("timeline");i&&null!=t.playstate&&i.setplaystate(t.playstate)});var md=fu.extend({type:"timeline",layoutmode:"box",defaultoption:{zlevel:0,z:4,show:!0,axistype:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlposition:"left",autoplay:!1,rewind:!1,loop:!0,playinterval:2e3,currentindex:0,itemstyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergedefaultandtheme(t,i),this._initdata()},mergeoption:function(t){md.superapply(this,"mergeoption",arguments),this._initdata()},setcurrentindex:function(t){null==t&&(t=this.option.currentindex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentindex=t},getcurrentindex:function(){return this.option.currentindex},isindexmax:function(){return this.getcurrentindex()>=this._data.count()-1},setplaystate:function(t){this.option.autoplay=!!t},getplaystate:function(){return!!this.option.autoplay},_initdata:function(){var t=this.option,e=t.data||[],i=t.axistype,a=this._names=[];if("category"===i){var o=[];e(e,function(t,e){var i,n=ma(t);z(t)?(i=d(t)).value=e:i=e,o.push(i),r(n)||null!=n&&!isnan(n)||(n=""),a.push(n+"")}),e=o}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new tf([{name:"value",type:n}],this)).initdata(e,a)},getdata:function(){return this._data},getcategories:function(){if("category"===this.get("axistype"))return this._names.slice()}});b(md.extend({type:"timeline.slider",defaultoption:{backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptycircle",symbolsize:10,linestyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemstyle:{color:"#304654",borderwidth:1},checkpointstyle:{symbol:"circle",symbolsize:13,color:"#c23531",borderwidth:5,bordercolor:"rgba(194,53,49, 0.5)",animation:!0,animationduration:300,animationeasing:"quinticinout"},controlstyle:{show:!0,showplaybtn:!0,showprevbtn:!0,shownextbtn:!0,itemsize:22,itemgap:12,position:"left",playicon:"path://m31.6,53c17.5,53,6,41.5,6,27.4s17.5,1.8,31.6,1.8c45.7,1.8,57.2,13.3,57.2,27.4s45.7,53,31.6,53z m31.6,3.3 c18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1c44.9,51.5,55.7,40.7,55.7,27.4c55.7,14.1,44.9,3.3,31.6,3.3z m24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2v21.3z",stopicon:"path://m30.9,53.2c16.8,53.2,5.3,41.7,5.3,27.6s16.8,2,30.9,2c45,2,56.4,13.5,56.4,27.6s45,53.2,30.9,53.2z m30.9,3.5c17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1c44.2,51.7,55,40.9,55,27.6c54.9,14.4,44.1,3.5,30.9,3.5z m36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h36c0.5,0,0.9,0.4,0.9,1v35.8z m27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h27c0.5,0,0.9,0.4,0.9,1l27.8,35.8l27.8,35.8z",nexticon:"path://m18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7l18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1l19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8c18.4,51.2,18.5,51,18.6,50.8z",previcon:"path://m43,52.8l20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7l42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3l18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1l41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8c43.2,53.2,43.1,53,43,52.8z",color:"#304654",bordercolor:"#304654",borderwidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemstyle:{color:"#c23531"},controlstyle:{color:"#c23531",bordercolor:"#c23531",borderwidth:2}},data:[]}}),th);function vd(t,e,i,n){vg.call(this,t,e,i),this.type=n||"value",this.model=null}var yd=kh.extend({type:"timeline"});vd.prototype={constructor:vd,getlabelmodel:function(){return this.model.getmodel("label")},ishorizontal:function(){return"horizontal"===this.model.get("orient")}},w(vd,vg);var xd=t,_d=e,wd=math.pi;function bd(t,e,i,n,a,o){var r=e.get("color");a?(a.setcolor(r),i.add(a),o&&o.onupdate(a)):((a=jp(t.get("symbol"),-1,-1,2,2,r)).setstyle("strokenoscale",!0),i.add(a),o&&o.oncreate(a));var s=e.getitemstyle(["color","symbol","symbolsize"]);a.setstyle(s),n=m({recthover:!0,z2:100},n,!0);var l=t.get("symbolsize");(l=l instanceof array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symboloffset");if(u){var h=n.position=n.position||[0,0];h[0]+=xl(u[0],l[0]),h[1]+=xl(u[1],l[1])}var c=t.get("symbolrotate");return n.rotation=(c||0)*math.pi/180||0,a.attr(n),a.updatetransform(),a}function sd(t,e,i,n,a){if(!t.dragging){var o=n.getmodel("checkpointstyle"),r=i.datatocoord(n.getdata().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopanimation(!0),t.animateto({position:[r,0]},o.get("animationduration",!0),o.get("animationeasing",!0)))}}yd.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewrect,this._timer,this._currentpointer,this._maingroup,this._labelgroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecmodel=t,this.group.removeall(),e.get("show",!0)){var a=this._layout(e,i),o=this._creategroup("maingroup"),r=this._creategroup("labelgroup"),s=this._axis=this._createaxis(a,e);e.formattooltip=function(t){return wl(s.scale.getlabel(t))},_d(["axisline","axistick","control","currentpointer"],function(t){this["_render"+t](a,o,s,e)},this),this._renderaxislabel(a,r,s,e),this._position(a,e)}this._doplaystop()},remove:function(){this._cleartimer(),this.group.removeall()},dispose:function(){this._cleartimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=function(t,e){return au(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2n[1]&&(i=n[1]),i"),a&&(o+=id(a),null!=i&&(o+=" : ")),null!=i&&(o+=id(n)),o},getdata:function(){return this._data},setdata:function(t){this._data=t}});b(td,th),td.extend({type:"markpoint",defaultoption:{zlevel:0,z:5,symbol:"pin",symbolsize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemstyle:{borderwidth:2},emphasis:{label:{show:!0}}}});var dd=_;function cd(t,e,i,n,a,o){var r=[],s=zf(e,n)?e.getcalculationinfo("stackresultdimension"):n,l=rd(e,s,t),u=e.indicesofnearest(s,l)[0];r[a]=e.get(i,u),r[o]=e.get(n,u);var h=bl(e.get(n,u));return 0<=(h=math.min(h,20))&&(r[o]=+r[o].tofixed(h)),r}var ld=a,kd={min:ld(cd,"min"),max:ld(cd,"max"),average:ld(cd,"average")};function pd(t,e){var i=t.getdata(),n=t.coordinatesystem;if(e&&!function(t){return!isnan(parsefloat(t.x))&&!isnan(parsefloat(t.y))}(e)&&!k(e.coord)&&n){var a=n.dimensions,o=nd(e,i,n,t);if((e=d(e)).type&&kd[e.type]&&o.baseaxis&&o.valueaxis){var r=dd(a,o.baseaxis.dim),s=dd(a,o.valueaxis.dim);e.coord=kd[e.type](i,o.basedatadim,o.valuedatadim,r,s),e.value=e.coord[s]}else{for(var l=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],u=0;u<2;u++)kd[l[u]]&&(l[u]=rd(i,i.mapdimension(a[u]),l[u]));e.coord=l}}return e}function nd(t,e,i,n){var a={};return null!=t.valueindex||null!=t.valuedim?(a.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,a.valueaxis=i.getaxis(function(t,e){var i=t.getdata(),n=i.dimensions;e=i.getdimension(e);for(var a=0;ai[a],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=h(t.get("pagebuttongap",!0),t.get("itemgap",!0));d&&("end"===t.get("pagebuttonposition",!0)?g[n]+=i[a]-c[a]:p[n]+=c[a]+m);g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[a]=d?i[a]:h[a],v[o]=math.max(h[o],c[o]),v[r]=math.min(0,c[r]+g[1-n]),l.__rectsize=i[a],d){var y={x:0,y:0};y[a]=math.max(i[a]-c[a]-m,0),y[o]=v[o],l.setclippath(new hr({shape:y})),l.__rectsize=y[a]}else u.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getpageinfo(t);return null!=x.pageindex&&js(s,{position:x.contentposition},d&&t),this._updatepageinfoview(t,x),v},_pagego:function(t,e,i){var n=this._getpageinfo(e)[t];null!=n&&i.dispatchaction({type:"legendscroll",scrolldataindex:n,legendid:e.id})},_updatepageinfoview:function(n,a){var o=this._controllergroup;e(["pageprev","pagenext"],function(t){var e=null!=a[t+"dataindex"],i=o.childofname(t);i&&(i.setstyle("fill",e?n.get("pageiconcolor",!0):n.get("pageiconinactivecolor",!0)),i.cursor=e?"pointer":"default")});var t=o.childofname("pagetext"),e=n.get("pageformatter"),i=a.pageindex,r=null!=i?i+1:0,s=a.pagecount;t&&e&&t.setstyle("text",r(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getpageinfo:function(t){var e=t.get("scrolldataindex",!0),i=this.getcontentgroup(),n=this._containergroup.__rectsize,a=t.getorient().index,o=cc[a],r=dc[a],s=this._findtargetitemindex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentposition:i.position.slice(),pagecount:c,pageindex:c-1,pageprevdataindex:null,pagenextdataindex:null};if(!u)return d;var f=y(u);d.contentposition[a]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pagenextdataindex&&(d.pagenextdataindex=g.i),++d.pagecount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i=e&&t.s<=e+n}},_findtargetitemindex:function(n){var a,o,t=this.getcontentgroup();return this._showcontroller&&t.eachchild(function(t,e){var i=t.__legenddataindex;null==o&&null!=i&&(o=e),i===n&&(a=e)}),null!=a?a:o}});tf("legendscroll","legendscroll",function(t,e){var i=t.scrolldataindex;null!=i&&e.eachcomponent({maintype:"legend",subtype:"scroll",query:t},function(t){t.setscrolldataindex(i)})});_t.extend({type:"datazoom.slider",layoutmode:"box",defaultoption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundcolor:"rgba(47,69,84,0)",databackground:{linestyle:{color:"#2f4554",width:.5,opacity:.3},areastyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},bordercolor:"#ddd",fillercolor:"rgba(167,183,204,0.4)",handleicon:"m8.2,13.6v3.9h6.3v9.7h3.1v14.9h3.3v9.7h1.8v-9.7h3.3v13.6h8.2z m9.7,24.4h4.8v-1.4h4.9v24.4z m9.7,19.1h4.8v-1.4h4.9v19.1z",handlesize:"100%",handlestyle:{color:"#a7b7cc"},labelprecision:null,labelformatter:null,showdetail:!0,showdatashadow:"auto",realtime:!0,zoomlock:!1,textstyle:{color:"#333"}}});var pc=hr,gc=yl,mc=wl,vc=t,yc=e,xc="horizontal",_c="vertical",wc=["line","bar","candlestick","scatter"],bc=st.extend({type:"datazoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleends,this._size,this._handlewidth,this._handleheight,this._location,this._dragging,this._datashadowinfo,this.api=e},render:function(t,e,i,n){bc.superapply(this,"render",arguments),dc(this,"_dispatchzoomaction",this.datazoommodel.get("throttle"),"fixrate"),this._orient=t.get("orient"),!1!==this.datazoommodel.get("show")?(n&&"datazoom"===n.type&&n.from===this.uid||this._buildview(),this._updateview()):this.group.removeall()},remove:function(){bc.superapply(this,"remove",arguments),fc(this,"_dispatchzoomaction")},dispose:function(){bc.superapply(this,"dispose",arguments),fc(this,"_dispatchzoomaction")},_buildview:function(){var t=this.group;t.removeall(),this._resetlocation(),this._resetinterval();var e=this._displayables.bargroup=new si;this._renderbackground(),this._renderhandle(),this._renderdatashadow(),t.add(e),this._positiongroup()},_resetlocation:function(){var t=this.datazoommodel,e=this.api,i=this._findcoordrect(),n={width:e.getwidth(),height:e.getheight()},a=this._orient===xc?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=su(t.option);e(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=a[t])});var r=au(o,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===_c&&this._size.reverse()},_positiongroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.datazoommodel.getfirsttargetaxismodel(),a=n&&n.get("inverse"),o=this._displayables.bargroup,r=(this._datashadowinfo||{}).otheraxisinverse;o.attr(i!==xc||a?i===xc&&a?{scale:r?[-1,1]:[-1,-1]}:i!==_c||a?{scale:r?[-1,-1]:[-1,1],rotation:math.pi/2}:{scale:r?[1,-1]:[1,1],rotation:math.pi/2}:{scale:r?[1,1]:[1,-1]});var s=t.getboundingrect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getviewextent:function(){return[0,this._size[0]]},_renderbackground:function(){var t=this.datazoommodel,e=this._size,i=this._displayables.bargroup;i.add(new pc({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundcolor")},z2:-40})),i.add(new pc({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:t(this._onclickpanelclick,this)}))},_renderdatashadow:function(){var t=this._datashadowinfo=this._preparedatashadowinfo();if(t){var e=this._size,i=t.series,n=i.getrawdata(),a=i.getshadowdim?i.getshadowdim():t.otherdim;if(null!=a){var o=n.getdataextent(a),r=.3*(o[1]-o[0]);o=[o[0]-r,o[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=math.round(n.count()/e[0]);n.each([a],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleends,a=(n[0]+n[1])/2,o=this._updateinterval("all",i[0]-a);this._updateview(),o&&this._dispatchzoomaction()}},_dispatchzoomaction:function(){var t=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,start:t[0],end:t[1]})},_findcoordrect:function(){var i;if(yc(this.gettargetcoordinfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinatesystem;i=e.getrect&&e.getrect()}}),!i){var t=this.api.getwidth(),e=this.api.getheight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function sc(t){return"vertical"===t?"ns-resize":"ew-resize"}_t.extend({type:"datazoom.inside",defaultoption:{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}});var mc="\0_ec_datazoom_roams";function ic(t,n){var e=tc(t),a=n.datazoomid,o=n.coordid;e(e,function(t,e){var i=t.datazoominfos;i[a]&&_(n.allcoordids,o)<0&&(delete i[a],t.count--)}),dc(e);var i=e[o];i||((i=e[o]={coordid:o,datazoominfos:{},count:0}).controller=function(t,r){var e=new uy(t.getzr());return e(["pan","zoom","scrollmove"],function(o){e.on(o,function(n){var a=[];e(r.datazoominfos,function(t){if(n.isavailablebehavior(t.datazoommodel.option)){var e=(t.getrange||{})[o],i=e&&e(r.controller,n);!t.datazoommodel.get("disabled",!0)&&i&&a.push({datazoomid:t.datazoomid,start:i[0],end:i[1]})}}),a.length&&r.dispatchaction(a)})}),e}(t,i),i.dispatchaction=a(cc,t)),i.datazoominfos[a]||i.count++,i.datazoominfos[a]=n;var r=function(t){var n,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e(t,function(t){var e=t.datazoommodel,i=!e.get("disabled",!0)&&(!e.get("zoomlock",!0)||"move");a["type_"+n]"],k(t)&&(t=t.slice(),n=!0),a=e?t:n?[u(t[0]),u(t[1])]:u(t),r(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):o(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+a[1]:t[1]===s[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).tofixed(math.min(r,20))}},resetextent:function(){var t=this.option,e=xc([t.min,t.max]);this._dataextent=e},getdatadimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getdimension(e);for(var n=t.dimensions,a=n.length-1;0<=a;a--){var o=n[a];if(!t.getdimensioninfo(o).iscalculationcoord)return o}}},getextent:function(){return this._dataextent.slice()},completevisualoption:function(){var t=this.ecmodel,e=this.option,i={inrange:e.inrange,outofrange:e.outofrange},n=e.target||(e.target={}),a=e.controller||(e.controller={});m(n,i),m(a,i);var u=this.iscategory();function o(n){zc(e.color)&&!n.inrange&&(n.inrange={color:e.color.slice().reverse()}),n.inrange=n.inrange||{color:t.get("gradientcolor")},uc(this.statelist,function(t){var e=n[t];if(r(e)){var i=gc(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}o.call(this,n),o.call(this,a),function(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},uc(n,function(t,e){if(bx.isvalidtype(e)){var i=gc(e,"inactive",u);null!=i&&(a[e]=i,"color"!==e||a.hasownproperty("opacity")||a.hasownproperty("coloralpha")||(a.opacity=[0,0]))}}))}.call(this,n,"inrange","outofrange"),function(o){var r=(o.inrange||{}).symbol||(o.outofrange||{}).symbol,s=(o.inrange||{}).symbolsize||(o.outofrange||{}).symbolsize,l=this.get("inactivecolor");uc(this.statelist,function(t){var e=this.itemsize,i=o[t];null==(i=i||(o[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&d(r)||(u?"roundrect":["roundrect"])),null==i.symbolsize&&(i.symbolsize=s&&d(s)||(u?e[0]:[e[0],e[0]])),i.symbol=wc(i.symbol,function(t){return"none"===t||"square"===t?"roundrect":t});var n=i.symbolsize;if(null!=n){var a=-1/0;hc(n,function(t){ae[1]&&e.reverse(),e[0]=math.max(e[0],t[0]),e[1]=math.min(e[1],t[1]))},completevisualoption:function(){jc.prototype.completevisualoption.apply(this,arguments),e(this.statelist,function(t){var e=this.option.controller[t].symbolsize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setselected:function(t){this.option.range=t.slice(),this._resetrange()},getselected:function(){var t=this.getextent(),e=wl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inrange":"outofrange"},findtargetdataindices:function(n){var a=[];return this.eachtargetseries(function(t){var i=[],e=t.getdata();e.each(this.getdatadimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),a.push({seriesid:t.id,dataindex:i})},this),a},getvisualmeta:function(i){var t=$c(this,"outofrange",this.getextent()),e=$c(this,"inrange",this.option.range.slice()),n=[];function a(t,e){n.push({value:t,color:i(t,e)})}for(var o=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getcontrollervisual(o,"color",e),offset:a/100})}return i.push({color:this.getcontrollervisual(t[1],"color",e),offset:1}),i},_createbarpoints:function(t,e){var i=this.visualmapmodel.itemsize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createbargroup:function(t){var e=this._orient,i=this.visualmapmodel.get("inverse");return new si("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-math.pi/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:math.pi/2})},_updatehandle:function(n,a){if(this._usehandle){var o=this._shapes,r=this.visualmapmodel,s=o.handlethumbs,l=o.handlelabels;il([0,1],function(t){var e=s[t];e.setstyle("fill",a.handlescolor[t]),e.position[1]=n[t];var i=$s(o.handlelabelpoints[t],ks(e,this.group));l[t].setstyle({x:i[0],y:i[1],text:r.formatvaluetext(this._datainterval[t]),textverticalalign:"middle",textalign:this._applytransform("horizontal"===this._orient?0===t?"bottom":"top":"left",o.bargroup)})},this)}},_showindicator:function(t,e,i,n){var a=this.visualmapmodel,o=a.getextent(),r=a.itemsize,s=[0,r[1]],l=el(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setshape("points",function(t,e,i,n){return t?[[0,-nl(e,al(i,0))],[6,0],[0,nl(e,al(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getcontrollervisual(t,"color",{convertopacitytoalpha:!0});h.setstyle("fill",c);var d=$s(u.indicatorlabelpoint,ks(h,this.group)),f=u.indicatorlabel;f.attr("invisible",!1);var p=this._applytransform("left",u.bargroup),g=this._orient;f.setstyle({text:(i||"")+a.formatvaluetext(e),textverticalalign:"horizontal"===g?p:"middle",textalign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enablehoverlinktoseries:function(){var n=this;this._shapes.bargroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualmapmodel.itemsize,i=n._applytransform([t.offsetx,t.offsety],n._shapes.bargroup,!0,!0);i[1]=nl(al(0,i[1]),e[1]),n._dohoverlinktoseries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearhoverlinktoseries()})},_enablehoverlinkfromseries:function(){var t=this.api.getzr();this.visualmapmodel.option.hoverlink?(t.on("mouseover",this._hoverlinkfromseriesmouseover,this),t.on("mouseout",this._hideindicator,this)):this._clearhoverlinkfromseries()},_dohoverlinktoseries:function(t,e){var i=this.visualmapmodel,n=i.itemsize;if(i.option.hoverlink){var a=[0,n[1]],o=i.getextent();t=nl(al(a[0],t),a[1]);var r=function(t,e,i){var n=6,a=t.get("hoverlinkdatasize");a&&(n=el(a,e,i,!0)/2);return n}(i,o,a),s=[t-r,t+r],l=el(t,a,o,!0),u=[el(s[0],a,o,!0),el(s[1],a,o,!0)];s[0] ",r):this._showindicator(l,l,"≈ ",r));var h=this._hoverlinkdataindices,c=[];(e||sl(i))&&(c=this._hoverlinkdataindices=i.findtargetdataindices(u));var d=function(t,e){var i={},n={};return a(t||[],i),a(e||[],n,i),[o(i),o(n)];function a(t,e,i){for(var n=0,a=t.length;ni&&n([i,e[0]],"outofrange"),n(e.slice()),i=e[1])},this),{stops:o,outercolors:r}}function n(t,e){var i=s.getrepresentvalue({interval:t});e=e||s.getvaluestate(i);var n=a(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:o.push({value:t[0],color:n},{value:t[1],color:n})}}}),hl={splitnumber:function(){var t=this.option,e=this._piecelist,i=math.min(t.precision,20),n=this.getextent(),a=t.splitnumber;a=math.max(parseint(a,10),1),t.splitnumber=a;for(var o=(n[1]-n[0])/a;+o.tofixed(i)!==o&&i<5;)i++;t.precision=i,o=+o.tofixed(i);var r=0;t.minopen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;r","≥"][e[0]]];t.text=t.text||this.formatvaluetext(null!=t.value?t.value:t.interval,!1,i)},this)}};function cl(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}jc.extend({type:"visualmap.piecewise",dorender:function(){var o=this.group;o.removeall();var r=this.visualmapmodel,s=r.get("textgap"),t=r.textstylemodel,l=t.getfont(),u=t.gettextcolor(),h=this._getitemalign(),c=r.itemsize,e=this._getviewdata(),i=e.endstext,d=w(r.get("showlabel",!0),!i);i&&this._renderendstext(o,i[0],c,d,h),e(e.viewpiecelist,function(t){var e=t.piece,i=new si;i.onclick=t(this._onitemclick,this,e),this._enablehoverlink(i,t.indexinmodelpiecelist);var n=r.getrepresentvalue(e);if(this._createitemsymbol(i,n,[0,0,c[0],c[1]]),d){var a=this.visualmapmodel.getvaluestate(n);i.add(new dr({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textverticalalign:"middle",textalign:h,textfont:l,textfill:u,opacity:"outofrange"===a?.5:1}}))}o.add(i)},this),i&&this._renderendstext(o,i[1],c,d,h),nu(r.get("orient"),o,r.get("itemgap")),this.renderbackground(o),this.positiongroup(o)},_enablehoverlink:function(t,i){function e(t){var e=this.visualmapmodel;e.option.hoverlink&&this.api.dispatchaction({type:t,batch:tl(e.findtargetdataindices(i),e)})}t.on("mouseover",t(e,this,"highlight")).on("mouseout",t(e,this,"downplay"))},_getitemalign:function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return qc(t,this.api,t.itemsize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderendstext:function(t,e,i,n,a){if(e){var o=new si,r=this.visualmapmodel.textstylemodel;o.add(new dr({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textverticalalign:"middle",textalign:n?a:"center",text:e,textfont:r.getfont(),textfill:r.gettextcolor()}})),t.add(o)}},_getviewdata:function(){var t=this.visualmapmodel,e=n(t.getpiecelist(),function(t,e){return{piece:t,indexinmodelpiecelist:e}}),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i=i&&i.slice().reverse(),{viewpiecelist:e,endstext:i}},_createitemsymbol:function(t,e,i){t.add(jp(this.getcontrollervisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getcontrollervisual(e,"color")))},_onitemclick:function(t){var e=this.visualmapmodel,i=e.option,n=d(i.selected),a=e.getselectedmapkey(t);"single"===i.selectedmode?(n[a]=!0,e(n,function(t,e){n[e]=e===a})):n[a]=!n[a],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:n})}});jd(oc);var dl,fl="urn:schemas-microsoft-com:vml",pl="undefined"==typeof window?null:window,gl=!1,ml=pl&&pl.document;function vl(t){return dl(t)}if(ml&&!v.canvassupported)try{ml.namespaces.zrvml||ml.namespaces.add("zrvml",fl),dl=function(t){return ml.createelement("')}}catch(t){dl=function(t){return ml.createelement("<"+t+' xmlns="'+fl+'" class="zrvml">')}}var yl,xl=ho.cmd,_l=math.round,wl=math.sqrt,bl=math.abs,sl=math.cos,ml=math.sin,il=math.max;if(!v.canvassupported){var al=",",tl="progid:dximagetransform.microsoft",dl=21600,cl=dl/2,ll=function(t){t.style.csstext="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=dl+","+dl,t.coordorigin="0,0"},kl=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},pl=function(t,e){e&&t&&e.parentnode!==t&&t.appendchild(e)},nl=function(t,e){e&&t&&e.parentnode===t&&t.removechild(e)},ol=function(t,e,i){return 1e5*(parsefloat(t)||0)+1e3*(parsefloat(e)||0)+i},el=fn,rl=function(t,e,i){var n=ee(e);i=+i,isnan(i)&&(i=1),n&&(t.color=kl(n[0],n[1],n[2]),t.opacity=i*n[3])},zl=function(t,e,i,n){var a="fill"===e,o=t.getelementsbytagname(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.linewidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof jr&&nl(t,o),o=o||vl(e),a?function(t,e,i){var n,a,o=e.fill;if(null!=o)if(o instanceof jr){var r,s=0,l=[0,0],u=0,h=1,c=i.getboundingrect(),d=c.width,f=c.height;if("linear"===o.type){r="gradient";var p=i.transform,g=[o.x*d,o.y*f],m=[o.x2*d,o.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*math.atan2(v,y)/math.pi)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[o.x*d,o.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*dl,w/=x[1]*dl;var b=il(_,w);u=0/b,h=2*o.r/b-u}var s=o.colorstops.slice();s.sort(function(t,e){return t.offset-e.offset});for(var m=s.length,i=[],a=[],t=0;t=c&&d<=i+1){for(var n=[],a=0;a=c&&d<=a+1)return ik(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=o();if(r)return r}},pushcomponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractcommon:function(t,e,i,n){for(var a=e.length,o=i.length,r=t.newpos,s=r-n,l=0;r+1