import{i as qt,e as H,p as Qt,S as er,_ as A,c as _t,t as D,a as Ie,G as R,B as O,P as tr,b as Re,g as ce,d as ge,f as St,C as Ge,u as Pe,h as rr,m as Le,r as ar,n as nr,j as De,k as J,l as bt,o as wt,q as ze,s as ke,E as or,v as ae,w as Tt,R as pe,x as te,T as ir,y as sr,Z as lr,z as Dt,A as Ct,D as ur,L as cr,F as Mt,H as pr,I as fr,J as hr,K as gr,M as vr,N as y,O as j,Q as dr,U as Ce,V as mr,W as yr,X as _r,Y as At,$ as Oe,a0 as Sr,a1 as It,a2 as re,a3 as Rt,a4 as Gt,a5 as C,a6 as br,a7 as wr,a8 as Tr,a9 as Dr,aa as Cr,ab as xe,ac as Pt,ad as Mr,ae as Lt,af as Ft,ag as Ar,ah as Et,ai as Ir,aj as Rr,ak as Gr,al as Pr,am as Lr,an as zt,ao as Fr,ap as Er,aq as Ve,ar as ie,as as Y,at as zr,au as kr,av as Or,aw as xr,ax as kt,ay as Vr,az as Nr,aA as Ur,aB as Yr,aC as Hr,aD as Br,aE as Zr,aF as Xr,aG as Ne,aH as Jr,aI as jr,aJ as Wr,aK as Kr,aL as $r,aM as qr,aN as Qr,aO as ea,aP as ta,aQ as ra,aR as aa,aS as na,aT as oa,aU as ia,aV as sa}from"./CdVaIdsN.js";import{e as la,f as ua,q as Ue,p as ca,D as pa,c as W,a as se,F as Ye,t as ye,s as fa,g as He,x as ha,n as ga,v as _e,h as K,o as Z,_ as va}from"./DAAb38x0.js";function da(o,t,e){t=qt(t)&&{coordDimensions:t}||H({encodeDefine:o.getEncode()},t);var r=o.getSource(),a=Qt(r,t).dimensions,n=new er(a,o);return n.initData(r,e),n}var ma=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,r){return _t(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,r,a){return a.point(r.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:D.color.primary}},universalTransition:{divideShape:"clone"}},t})(Ie),Ot=4,ya=(function(){function o(){}return o})(),_a=(function(o){A(t,o);function t(e){var r=o.call(this,e)||this;return r._off=0,r.hoverDataIdx=-1,r}return t.prototype.getDefaultShape=function(){return new ya},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,r){var a=r.points,n=r.size,i=this.symbolProxy,s=i.shape,l=e.getContext?e.getContext():e,u=l&&n[0]<Ot,c=this.softClipShape,p;if(u){this._ctx=l;return}for(this._ctx=null,p=this._off;p<a.length;){var f=a[p++],h=a[p++];isNaN(f)||isNaN(h)||c&&!c.contain(f,h)||(s.x=f-n[0]/2,s.y=h-n[1]/2,s.width=n[0],s.height=n[1],i.buildPath(e,s,!0))}this.incremental&&(this._off=p,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,r=e.points,a=e.size,n=this._ctx,i=this.softClipShape,s;if(n){for(s=this._off;s<r.length;){var l=r[s++],u=r[s++];isNaN(l)||isNaN(u)||i&&!i.contain(l,u)||n.fillRect(l-a[0]/2,u-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,r){for(var a=this.shape,n=a.points,i=a.size,s=Math.max(i[0],4),l=Math.max(i[1],4),u=n.length/2-1;u>=0;u--){var c=u*2,p=n[c]-s/2,f=n[c+1]-l/2;if(e>=p&&r>=f&&e<=p+s&&r<=f+l)return u}return-1},t.prototype.contain=function(e,r){var a=this.transformCoordToLocal(e,r),n=this.getBoundingRect();if(e=a[0],r=a[1],n.contain(e,r)){var i=this.hoverDataIdx=this.findDataIndex(e,r);return i>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var r=this.shape,a=r.points,n=r.size,i=n[0],s=n[1],l=1/0,u=1/0,c=-1/0,p=-1/0,f=0;f<a.length;){var h=a[f++],v=a[f++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(v,u),p=Math.max(v,p)}e=this._rect=new O(l-i/2,u-s/2,c-l+i,p-u+s)}return e},t})(tr),Sa=(function(){function o(){this.group=new R}return o.prototype.updateData=function(t,e){this._clear();var r=this._create();r.setShape({points:t.getLayout("points")}),this._setCommon(r,t,e)},o.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(r){if(r.startIndex!=null){var a=(r.endIndex-r.startIndex)*2,n=r.startIndex*4*2;e=new Float32Array(e.buffer,n,a)}r.setShape("points",e),r.reset()})},o.prototype.incrementalPrepareUpdate=function(t){this._clear()},o.prototype.incrementalUpdate=function(t,e,r){var a=this._newAdded[0],n=e.getLayout("points"),i=a&&a.shape.points;if(i&&i.length<2e4){var s=i.length,l=new Float32Array(s+n.length);l.set(i),l.set(n,s),a.endIndex=t.end,a.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:n}),this._setCommon(u,e,r)}},o.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},o.prototype._create=function(){var t=new _a({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},o.prototype._setCommon=function(t,e,r){var a=e.hostModel;r=r||{};var n=e.getVisual("symbolSize");t.setShape("size",n instanceof Array?n:[n,n]),t.softClipShape=r.clipShape||null,t.symbolProxy=Re(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var i=t.shape.size[0]<Ot;t.useStyle(a.getModel("itemStyle").getItemStyle(i?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=ce(t);u.seriesIndex=a.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var p=t.hoverDataIdx;p>=0&&(u.dataIndex=p+(t.startIndex||0))})},o.prototype.remove=function(){this._clear()},o.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},o})(),ba=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,r,a){var n=e.getData(),i=this._updateSymbolDraw(n,e);i.updateData(n,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,r,a){var n=e.getData(),i=this._updateSymbolDraw(n,e);i.incrementalPrepareUpdate(n),this._finished=!1},t.prototype.incrementalRender=function(e,r,a){this._symbolDraw.incrementalUpdate(e,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=e.end===r.getData().count()},t.prototype.updateTransform=function(e,r,a){var n=e.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var i=ge("").reset(e,r,a);i.progress&&i.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var r=e.coordinateSystem;return r&&r.getArea&&r.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,r){var a=this._symbolDraw,n=r.pipelineContext,i=n.large;return(!a||i!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=i?new Sa:new St,this._isLargeDraw=i,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(e,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Ge);function wa(o){Pe(rr),o.registerSeriesModel(ma),o.registerChartView(ba),o.registerLayout(ge("scatter"))}var Ta=Le();function Be(o,t){return!!Ta(o)[t]}ar({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},nr);var Da={axisPointer:1,tooltip:1,brush:1};function Ca(o,t,e){var r=t.getComponentByElement(o.topTarget);if(!r||r===e||Da.hasOwnProperty(r.mainType))return!1;var a=r.coordinateSystem;if(!a||a.model===e)return!1;var n=De(r),i=De(e);return!((n.zlevel-i.zlevel||n.z-i.z)<=0)}var Ma=(function(o){A(t,o);function t(e){var r=o.call(this)||this;r._zr=e;var a=J(r._mousedownHandler,r),n=J(r._mousemoveHandler,r),i=J(r._mouseupHandler,r),s=J(r._mousewheelHandler,r),l=J(r._pinchHandler,r);return r.enable=function(u,c){var p=c.zInfo,f=De(p.component),h=f.z,v=f.zlevel,g={component:p.component,z:h,zlevel:v,z2:bt(p.z2,-1/0)},m=H({},c.triggerInfo);this._opt=wt(H({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:g,triggerInfo:m}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(q(e,"mousedown",a,g),q(e,"mousemove",n,g),q(e,"mouseup",i,g)),(u===!0||u==="scale"||u==="zoom")&&(q(e,"mousewheel",s,g),q(e,"pinch",l,g)))},r.disable=function(){this._enabled=!1,Q(e,"mousedown",a),Q(e,"mousemove",n),Q(e,"mouseup",i),Q(e,"mousewheel",s),Q(e,"pinch",l)},r}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,r,a){var n=this._opt,i=n.zInfoParsed;if(Ca(e,n.api,i.component))return!1;var s=n.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(e,r,a)),u&&s.isInClip&&!s.isInClip(e,r,a)&&(u=!1),u},t.prototype._decideCursorStyle=function(e,r,a,n){var i=e.target;if(!i&&this._checkPointer(e,r,a))return"grab";if(n)return i&&i.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(ze(e)||$(e))){for(var r=e.target;r;){if(r.draggable)return;r=r.__hostTarget||r.parent}var a=e.offsetX,n=e.offsetY;this._checkPointer(e,a,n)&&(this._x=a,this._y=n,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var r=this._zr;if(!(e.gestureEvent==="pinch"||Be(r,"globalPan")||$(e))){var a=e.offsetX,n=e.offsetY;if(!this._dragging||!ue("moveOnMouseMove",e,this._opt)){var i=this._decideCursorStyle(e,a,n,!1);i&&r.setCursorStyle(i);return}r.setCursorStyle("grabbing");var s=this._x,l=this._y,u=a-s,c=n-l;this._x=a,this._y=n,this._opt.preventDefaultMouseMove&&ke(e.event),e.__ecRoamConsumed=!0,Ze(this,"pan","moveOnMouseMove",e,{dx:u,dy:c,oldX:s,oldY:l,newX:a,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!$(e)){var r=this._zr;if(!ze(e)){this._dragging=!1;var a=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);a&&r.setCursorStyle(a)}}},t.prototype._mousewheelHandler=function(e){if(!$(e)){var r=ue("zoomOnMouseWheel",e,this._opt),a=ue("moveOnMouseWheel",e,this._opt),n=e.wheelDelta,i=Math.abs(n),s=e.offsetX,l=e.offsetY;if(!(n===0||!r&&!a)){if(r){var u=i>3?1.4:i>1?1.2:1.1,c=n>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(a){var p=Math.abs(n),f=(n>0?1:-1)*(p>3?.4:p>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(Be(this._zr,"globalPan")||$(e))){var r=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:r,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,r,a,n,i){e._checkPointer(n,i.originX,i.originY)&&(ke(n.event),n.__ecRoamConsumed=!0,Ze(e,r,a,n,i))},t})(or);function $(o){return o.__ecRoamConsumed}var Aa=Le();function ve(o){var t=Aa(o);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function q(o,t,e,r){for(var a=ve(o),n=a.roam,i=n[t]=n[t]||[],s=0;s<i.length;s++){var l=i[s].zInfoParsed;if((l.zlevel-r.zlevel||l.z-r.z||l.z2-r.z2)<=0)break}i.splice(s,0,{listener:e,zInfoParsed:r}),Ia(o,t)}function Q(o,t,e){for(var r=ve(o),a=r.roam[t]||[],n=0;n<a.length;n++)if(a[n].listener===e){a.splice(n,1),a.length||Ra(o,t);return}}function Ia(o,t){var e=ve(o);e.uniform[t]||o.on(t,e.uniform[t]=function(r){var a=e.roam[t];if(a)for(var n=0;n<a.length;n++)a[n].listener(r)})}function Ra(o,t){var e=ve(o),r=e.uniform;r[t]&&(o.off(t,r[t]),r[t]=null)}function Ze(o,t,e,r,a){a.isAvailableBehavior=J(ue,null,e,r),o.trigger(t,a)}function ue(o,t,e){var r=e[o];return!o||r&&(!ae(r)||t.event[r+"Key"])}function Ga(o,t,e){var r=o.target;r.x+=t,r.y+=e,r.dirty()}function Pa(o,t,e,r){var a=o.target,n=o.zoomLimit,i=o.zoom=o.zoom||1;i*=t,i=Fe(i,n);var s=i/o.zoom;o.zoom=i,xt(a,e,r,s),a.dirty()}function Xe(o,t){return o.pointToProjected?o.pointToProjected(t):o.pointToData(t)}function La(o,t,e){var r=o.getZoom(),a=o.getCenter(),n=t.zoom,i=o.projectedToPoint?o.projectedToPoint(a):o.dataToPoint(a);return t.dx!=null&&t.dy!=null&&(i[0]-=t.dx,i[1]-=t.dy,o.setCenter(Xe(o,i))),n!=null&&(n=Fe(r*n,e)/r,xt(o,t.originX,t.originY,n),o.updateTransform(),o.setCenter(Xe(o,i)),o.setZoom(n*r)),{center:o.getCenter(),zoom:o.getZoom()}}function xt(o,t,e,r){o.x-=(t-o.x)*(r-1),o.y-=(e-o.y)*(r-1),o.scaleX*=r,o.scaleY*=r}function Fe(o,t){if(t){var e=t.min||0,r=t.max||1/0;o=Math.max(Math.min(r,o),e)}return o}function Vt(o){if(ae(o)){var t=new DOMParser;o=t.parseFromString(o,"text/xml")}var e=o;for(e.nodeType===9&&(e=e.firstChild);e.nodeName.toLowerCase()!=="svg"||e.nodeType!==1;)e=e.nextSibling;return e}var Se,fe={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Je=Tt(fe),he={"alignment-baseline":"textBaseline","stop-color":"stopColor"},je=Tt(he),Fa=(function(){function o(){this._defs={},this._root=null}return o.prototype.parse=function(t,e){e=e||{};var r=Vt(t);this._defsUsePending=[];var a=new R;this._root=a;var n=[],i=r.getAttribute("viewBox")||"",s=parseFloat(r.getAttribute("width")||e.width),l=parseFloat(r.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),G(r,a,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,a,n,null,!1,!1),u=u.nextSibling;ka(this._defs,this._defsUsePending),this._defsUsePending=[];var c,p;if(i){var f=de(i);f.length>=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(p=Ut(c,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var h=a;a=new R,a.add(h),h.scaleX=h.scaleY=p.scale,h.x=p.x,h.y=p.y}return!e.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new pe({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:c,viewBoxTransform:p,named:n}},o.prototype._parseNode=function(t,e,r,a,n,i){var s=t.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(n=!0),s==="text"&&(i=!0),s==="defs"||s==="switch")l=e;else{if(!n){var c=Se[s];if(c&&te(Se,s)){l=c.call(this,t,e);var p=t.getAttribute("name");if(p){var f={name:p,namedFrom:null,svgNodeTagLower:s,el:l};r.push(f),s==="g"&&(u=f)}else a&&r.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});e.add(l)}}var h=We[s];if(h&&te(We,s)){var v=h.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=v)}}if(l&&l.isGroup)for(var m=t.firstChild;m;)m.nodeType===1?this._parseNode(m,l,r,u,n,i):m.nodeType===3&&i&&this._parseText(m,l),m=m.nextSibling},o.prototype._parseText=function(t,e){var r=new ir({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});L(e,r),G(t,r,this._defsUsePending,!1,!1),Ea(r,e);var a=r.style,n=a.fontSize;n&&n<9&&(a.fontSize=9,r.scaleX*=n/9,r.scaleY*=n/9);var i=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=i;var s=r.getBoundingRect();return this._textX+=s.width,e.add(r),r},o.internalField=(function(){Se={g:function(t,e){var r=new R;return L(e,r),G(t,r,this._defsUsePending,!1,!1),r},rect:function(t,e){var r=new pe;return L(e,r),G(t,r,this._defsUsePending,!1,!1),r.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),r.silent=!0,r},circle:function(t,e){var r=new Mt;return L(e,r),G(t,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),r.silent=!0,r},line:function(t,e){var r=new cr;return L(e,r),G(t,r,this._defsUsePending,!1,!1),r.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),r.silent=!0,r},ellipse:function(t,e){var r=new ur;return L(e,r),G(t,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),r.silent=!0,r},polygon:function(t,e){var r=t.getAttribute("points"),a;r&&(a=qe(r));var n=new Ct({shape:{points:a||[]},silent:!0});return L(e,n),G(t,n,this._defsUsePending,!1,!1),n},polyline:function(t,e){var r=t.getAttribute("points"),a;r&&(a=qe(r));var n=new Dt({shape:{points:a||[]},silent:!0});return L(e,n),G(t,n,this._defsUsePending,!1,!1),n},image:function(t,e){var r=new lr;return L(e,r),G(t,r,this._defsUsePending,!1,!1),r.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),r.silent=!0,r},text:function(t,e){var r=t.getAttribute("x")||"0",a=t.getAttribute("y")||"0",n=t.getAttribute("dx")||"0",i=t.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(n),this._textY=parseFloat(a)+parseFloat(i);var s=new R;return L(e,s),G(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var r=t.getAttribute("x"),a=t.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),a!=null&&(this._textY=parseFloat(a));var n=t.getAttribute("dx")||"0",i=t.getAttribute("dy")||"0",s=new R;return L(e,s),G(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(i),s},path:function(t,e){var r=t.getAttribute("d")||"",a=sr(r);return L(e,a),G(t,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),o})(),We={lineargradient:function(o){var t=parseInt(o.getAttribute("x1")||"0",10),e=parseInt(o.getAttribute("y1")||"0",10),r=parseInt(o.getAttribute("x2")||"10",10),a=parseInt(o.getAttribute("y2")||"0",10),n=new fr(t,e,r,a);return Ke(o,n),$e(o,n),n},radialgradient:function(o){var t=parseInt(o.getAttribute("cx")||"0",10),e=parseInt(o.getAttribute("cy")||"0",10),r=parseInt(o.getAttribute("r")||"0",10),a=new pr(t,e,r);return Ke(o,a),$e(o,a),a}};function Ke(o,t){var e=o.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function $e(o,t){for(var e=o.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var r=e.getAttribute("offset"),a=void 0;r&&r.indexOf("%")>0?a=parseInt(r,10)/100:r?a=parseFloat(r):a=0;var n={};Nt(e,n,n);var i=n.stopColor||e.getAttribute("stop-color")||"#000000",s=n.stopOpacity||e.getAttribute("stop-opacity");if(s){var l=hr(i),u=l&&l[3];u&&(l[3]*=gr(s),i=vr(l,"rgba"))}t.colorStops.push({offset:a,color:i})}e=e.nextSibling}}function L(o,t){o&&o.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),wt(t.__inheritedStyle,o.__inheritedStyle))}function qe(o){for(var t=de(o),e=[],r=0;r<t.length;r+=2){var a=parseFloat(t[r]),n=parseFloat(t[r+1]);e.push([a,n])}return e}function G(o,t,e,r,a){var n=t,i=n.__inheritedStyle=n.__inheritedStyle||{},s={};o.nodeType===1&&(Va(o,t),Nt(o,i,s),r||Na(o,i,s)),n.style=n.style||{},i.fill!=null&&(n.style.fill=Qe(n,"fill",i.fill,e)),i.stroke!=null&&(n.style.stroke=Qe(n,"stroke",i.stroke,e)),y(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){i[l]!=null&&(n.style[l]=parseFloat(i[l]))}),y(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){i[l]!=null&&(n.style[l]=i[l])}),a&&(n.__selfStyle=s),i.lineDash&&(n.style.lineDash=j(de(i.lineDash),function(l){return parseFloat(l)})),(i.visibility==="hidden"||i.visibility==="collapse")&&(n.invisible=!0),i.display==="none"&&(n.ignore=!0)}function Ea(o,t){var e=t.__selfStyle;if(e){var r=e.textBaseline,a=r;!r||r==="auto"||r==="baseline"?a="alphabetic":r==="before-edge"||r==="text-before-edge"?a="top":r==="after-edge"||r==="text-after-edge"?a="bottom":(r==="central"||r==="mathematical")&&(a="middle"),o.style.textBaseline=a}var n=t.__inheritedStyle;if(n){var i=n.textAlign,s=i;i&&(i==="middle"&&(s="center"),o.style.textAlign=s)}}var za=/^url\(\s*#(.*?)\)/;function Qe(o,t,e,r){var a=e&&e.match(za);if(a){var n=dr(a[1]);r.push([o,t,n]);return}return e==="none"&&(e=null),e}function ka(o,t){for(var e=0;e<t.length;e++){var r=t[e];r[0].style[r[1]]=o[r[2]]}}var Oa=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function de(o){return o.match(Oa)||[]}var xa=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,be=Math.PI/180;function Va(o,t){var e=o.getAttribute("transform");if(e){e=e.replace(/,/g," ");var r=[],a=null;e.replace(xa,function(p,f,h){return r.push(f,h),""});for(var n=r.length-1;n>0;n-=2){var i=r[n],s=r[n-1],l=de(i);switch(a=a||At(),s){case"translate":_r(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":yr(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":mr(a,a,-parseFloat(l[0])*be,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*be);Ce(a,[1,0,u,1,0,0],a);break;case"skewY":var c=Math.tan(parseFloat(l[0])*be);Ce(a,[1,c,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}t.setLocalTransform(a)}}var et=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Nt(o,t,e){var r=o.getAttribute("style");if(r){et.lastIndex=0;for(var a;(a=et.exec(r))!=null;){var n=a[1],i=te(fe,n)?fe[n]:null;i&&(t[i]=a[2]);var s=te(he,n)?he[n]:null;s&&(e[s]=a[2])}}}function Na(o,t,e){for(var r=0;r<Je.length;r++){var a=Je[r],n=o.getAttribute(a);n!=null&&(t[fe[a]]=n)}for(var r=0;r<je.length;r++){var a=je[r],n=o.getAttribute(a);n!=null&&(e[he[a]]=n)}}function Ut(o,t){var e=t.width/o.width,r=t.height/o.height,a=Math.min(e,r);return{scale:a,x:-(o.x+o.width/2)*a+(t.x+t.width/2),y:-(o.y+o.height/2)*a+(t.y+t.height/2)}}function Ua(o,t){var e=new Fa;return e.parse(o,t)}var Ya=1e-8;function tt(o,t){return Math.abs(o-t)<Ya}function rt(o,t,e){var r=0,a=o[0];if(!a)return!1;for(var n=1;n<o.length;n++){var i=o[n];r+=Oe(a[0],a[1],i[0],i[1],t,e),a=i}var s=o[0];return(!tt(a[0],s[0])||!tt(a[1],s[1]))&&(r+=Oe(a[0],a[1],s[0],s[1],t,e)),r!==0}var Ha=[];function we(o,t){for(var e=0;e<o.length;e++)re(o[e],o[e],t)}function at(o,t,e,r){for(var a=0;a<o.length;a++){var n=o[a];r&&(n=r.project(n)),n&&isFinite(n[0])&&isFinite(n[1])&&(Rt(t,t,n),Gt(e,e,n))}}function Ba(o){for(var t=0,e=0,r=0,a=o.length,n=o[a-1][0],i=o[a-1][1],s=0;s<a;s++){var l=o[s][0],u=o[s][1],c=n*u-l*i;t+=c,e+=(n+l)*c,r+=(i+u)*c,n=l,i=u}return t?[e/t/3,r/t/3,t]:[o[0][0]||0,o[0][1]||0]}var Yt=(function(){function o(t){this.name=t}return o.prototype.setCenter=function(t){this._center=t},o.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},o})(),nt=(function(){function o(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return o})(),ot=(function(){function o(t){this.type="linestring",this.points=t}return o})(),Ht=(function(o){A(t,o);function t(e,r,a){var n=o.call(this,e)||this;return n.type="geoJSON",n.geometries=r,n._center=a&&[a[0],a[1]],n}return t.prototype.calcCenter=function(){for(var e=this.geometries,r,a=0,n=0;n<e.length;n++){var i=e[n],s=i.exterior,l=s&&s.length;l>a&&(r=i,a=l)}if(r)return Ba(r.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var r=this._rect;if(r&&!e)return r;var a=[1/0,1/0],n=[-1/0,-1/0],i=this.geometries;return y(i,function(s){s.type==="polygon"?at(s.exterior,a,n,e):y(s.points,function(l){at(l,a,n,e)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(n[0])&&isFinite(n[1])||(a[0]=a[1]=n[0]=n[1]=0),r=new O(a[0],a[1],n[0]-a[0],n[1]-a[1]),e||(this._rect=r),r},t.prototype.contain=function(e){var r=this.getBoundingRect(),a=this.geometries;if(!r.contain(e[0],e[1]))return!1;e:for(var n=0,i=a.length;n<i;n++){var s=a[n];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(rt(l,e[0],e[1])){for(var c=0;c<(u?u.length:0);c++)if(rt(u[c],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,r,a,n){var i=this.getBoundingRect(),s=i.width/i.height;a?n||(n=a/s):a=s*n;for(var l=new O(e,r,a,n),u=i.calculateTransform(l),c=this.geometries,p=0;p<c.length;p++){var f=c[p];f.type==="polygon"?(we(f.exterior,u),y(f.interiors,function(h){we(h,u)})):y(f.points,function(h){we(h,u)})}i=this._rect,i.copy(l),this._center=[i.x+i.width/2,i.y+i.height/2]},t.prototype.cloneShallow=function(e){e==null&&(e=this.name);var r=new t(e,this.geometries,this._center);return r._rect=this._rect,r.transformTo=null,r},t})(Yt),Za=(function(o){A(t,o);function t(e,r){var a=o.call(this,e)||this;return a.type="geoSVG",a._elOnlyForCalculate=r,a}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,r=e.getBoundingRect(),a=[r.x+r.width/2,r.y+r.height/2],n=Sr(Ha),i=e;i&&!i.isGeoSVGGraphicRoot;)Ce(n,i.getLocalTransform(),n),i=i.parent;return It(n,n),re(a,a,n),a},t})(Yt),Xa=C(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Ja=(function(){function o(t,e){this.type="geoSVG",this._usedGraphicMap=C(),this._freedGraphics=[],this._mapName=t,this._parsedXML=Vt(e)}return o.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=Wa(t.named),r=e.regions,a=e.regionsMap;this._regions=r,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},o.prototype._buildGraphic=function(t){var e,r;try{e=t&&Ua(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},r=e.root,br(r!=null)}catch(m){throw new Error(`Invalid svg format
`+m.message)}var a=new R;a.add(r),a.isGeoSVGGraphicRoot=!0;var n=e.width,i=e.height,s=e.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,p=void 0,f=void 0;if(n!=null?(u=0,p=n):s&&(u=s.x,p=s.width),i!=null?(c=0,f=i):s&&(c=s.y,f=s.height),u==null||c==null){var h=r.getBoundingRect();u==null&&(u=h.x,p=h.width),c==null&&(c=h.y,f=h.height)}l=this._boundingRect=new O(u,c,p,f)}if(s){var v=Ut(s,l);r.scaleX=r.scaleY=v.scale,r.x=v.x,r.y=v.y}a.setClipPath(new pe({shape:l.plain()}));var g=[];return y(e.named,function(m){Xa.get(m.svgNodeTagLower)!=null&&(g.push(m),ja(m.el))}),{root:a,boundingRect:l,named:g}},o.prototype.useGraphic=function(t){var e=this._usedGraphicMap,r=e.get(t);return r||(r=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,r),r)},o.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,r=e.get(t);r&&(e.removeKey(t),this._freedGraphics.push(r))},o})();function ja(o){o.silent=!1,o.isGroup&&o.traverse(function(t){t.silent=!1})}function Wa(o){var t=[],e=C();return y(o,function(r){if(r.namedFrom==null){var a=new Za(r.name,r.el);t.push(a),e.set(r.name,a)}}),{regions:t,regionsMap:e}}function Ka(o){if(!o.UTF8Encoding)return o;var t=o,e=t.UTF8Scale;e==null&&(e=1024);var r=t.features;return y(r,function(a){var n=a.geometry,i=n.encodeOffsets,s=n.coordinates;if(i)switch(n.type){case"LineString":n.coordinates=Bt(s,i,e);break;case"Polygon":Te(s,i,e);break;case"MultiLineString":Te(s,i,e);break;case"MultiPolygon":y(s,function(l,u){return Te(l,i[u],e)})}}),t.UTF8Encoding=!1,t}function Te(o,t,e){for(var r=0;r<o.length;r++)o[r]=Bt(o[r],t[r],e)}function Bt(o,t,e){for(var r=[],a=t[0],n=t[1],i=0;i<o.length;i+=2){var s=o.charCodeAt(i)-64,l=o.charCodeAt(i+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=n,a=s,n=l,r.push([s/e,l/e])}return r}function $a(o,t){return o=Ka(o),j(wr(o.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var r=e.properties,a=e.geometry,n=[];switch(a.type){case"Polygon":var i=a.coordinates;n.push(new nt(i[0],i.slice(1)));break;case"MultiPolygon":y(a.coordinates,function(l){l[0]&&n.push(new nt(l[0],l.slice(1)))});break;case"LineString":n.push(new ot([a.coordinates]));break;case"MultiLineString":n.push(new ot(a.coordinates))}var s=new Ht(r[t||"name"],n,r.cp);return s.properties=r,s})}var Me=[126,25],it="南海诸岛",U=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var N=0;N<U.length;N++)for(var X=0;X<U[N].length;X++)U[N][X][0]/=10.5,U[N][X][1]/=-10.5/.75,U[N][X][0]+=Me[0],U[N][X][1]+=Me[1];function qa(o,t){if(o==="china"){for(var e=0;e<t.length;e++)if(t[e].name===it)return;t.push(new Ht(it,j(U,function(r){return{type:"polygon",exterior:r}}),Me))}}var Qa={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function en(o,t){if(o==="china"){var e=Qa[t.name];if(e){var r=t.getCenter();r[0]+=e[0]/10.5,r[1]+=-e[1]/(10.5/.75),t.setCenter(r)}}}var tn=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function rn(o,t){o==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:tn[0]})}var an="name",nn=(function(){function o(t,e,r){this.type="geoJSON",this._parsedMap=C(),this._mapName=t,this._specialAreas=r,this._geoJSON=sn(e)}return o.prototype.load=function(t,e){e=e||an;var r=this._parsedMap.get(e);if(!r){var a=this._parseToRegions(e);r=this._parsedMap.set(e,{regions:a,boundingRect:on(a)})}var n=C(),i=[];return y(r.regions,function(s){var l=s.name;t&&te(t,l)&&(s=s.cloneShallow(l=t[l])),i.push(s),n.set(l,s)}),{regions:i,boundingRect:r.boundingRect||new O(0,0,0,0),regionsMap:n}},o.prototype._parseToRegions=function(t){var e=this._mapName,r=this._geoJSON,a;try{a=r?$a(r,t):[]}catch(n){throw new Error(`Invalid geoJson format
`+n.message)}return qa(e,a),y(a,function(n){var i=n.name;en(e,n),rn(e,n);var s=this._specialAreas&&this._specialAreas[i];s&&n.transformTo(s.left,s.top,s.width,s.height)},this),a},o.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},o})();function on(o){for(var t,e=0;e<o.length;e++){var r=o[e].getBoundingRect();t=t||r.clone(),t.union(r)}return t}function sn(o){return ae(o)?typeof JSON<"u"&&JSON.parse?JSON.parse(o):new Function("return ("+o+");")():o}var ee=C();const x={registerMap:function(o,t,e){if(t.svg){var r=new Ja(o,t.svg);ee.set(o,r)}else{var a=t.geoJson||t.geoJSON;a&&!t.features?e=t.specialAreas:a=t;var r=new nn(o,a,e);ee.set(o,r)}},getGeoResource:function(o){return ee.get(o)},getMapForUser:function(o){var t=ee.get(o);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(o,t,e){var r=ee.get(o);if(r)return r.load(t,e)}};var Ee=["rect","circle","line","ellipse","polygon","polyline","path"],ln=C(Ee),un=C(Ee.concat(["g"])),cn=C(Ee.concat(["g"])),Zt=Le();function le(o){var t=o.getItemStyle(),e=o.get("areaColor");return e!=null&&(t.fill=e),t}function st(o){var t=o.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var Xt=(function(){function o(t){var e=this.group=new R,r=this._transformGroup=new R;e.add(r),this.uid=Tr("ec_map_draw"),this._controller=new Ma(t.getZr()),this._controllerHost={target:r},r.add(this._regionsGroup=new R),r.add(this._svgGroup=new R)}return o.prototype.draw=function(t,e,r,a,n){var i=t.mainType==="geo",s=t.getData&&t.getData();i&&e.eachComponent({mainType:"series",subType:"map"},function(_){!s&&_.getHostGeoModel()===t&&(s=_.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,p=l.getTransformInfo(),f=p.raw,h=p.roam,v=!u.childAt(0)||n,g=t.getShallow("clip",!0),m;g?(m=l.getViewRect().clone(),this.group.setClipPath(new pe({shape:m.clone()}))):this.group.removeClipPath(),v?(c.x=h.x,c.y=h.y,c.scaleX=h.scaleX,c.scaleY=h.scaleY,c.dirty()):Dr(c,h,t);var S=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,w={api:r,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:S,isGeo:i,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(w):l.resourceType==="geoSVG"&&this._buildSVG(w),this._updateController(t,m,e,r),this._updateMapSelectHandler(t,u,r,a)},o.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=C(),r=C(),a=this._regionsGroup,n=t.transformInfoRaw,i=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(h,v){return v&&(h=v(h)),h&&[h[0]*n.scaleX+n.x,h[1]*n.scaleY+n.y]}function p(h){for(var v=[],g=!u&&l&&l.project,m=0;m<h.length;++m){var S=c(h[m],g);S&&v.push(S)}return v}function f(h){return{shape:{points:p(h)}}}a.removeAll(),y(t.geo.regions,function(h){var v=h.name,g=e.get(v),m=r.get(v)||{},S=m.dataIdx,w=m.regionModel;if(!g){g=e.set(v,new R),a.add(g),S=s?s.indexOfName(v):null,w=t.isGeo?i.getRegionModel(v):s?s.getItemModel(S):null;var _=w.get("silent",!0);_!=null&&(g.silent=_),r.set(v,{dataIdx:S,regionModel:w})}var E=[],P=[];y(h.geometries,function(F){if(F.type==="polygon"){var z=[F.exterior].concat(F.interiors||[]);u&&(z=ht(z,u)),y(z,function(k){E.push(new Ct(f(k)))})}else{var M=F.points;u&&(M=ht(M,u,!0)),y(M,function(k){P.push(new Dt(f(k)))})}});var B=c(h.getCenter(),l&&l.project);function V(F,z){if(F.length){var M=new Cr({culling:!0,segmentIgnoreThreshold:1,shape:{paths:F}});g.add(M),lt(t,M,S,w),ut(t,M,v,w,i,S,B),z&&(st(M),y(M.states,st))}}V(E),V(P,!0)}),e.each(function(h,v){var g=r.get(v),m=g.dataIdx,S=g.regionModel;ct(t,h,v,S,i,m),pt(t,h,v,S,i),ft(t,h,v,S,i)},this)},o.prototype._buildSVG=function(t){var e=t.geo.map,r=t.transformInfoRaw;this._svgGroup.x=r.x,this._svgGroup.y=r.y,this._svgGroup.scaleX=r.scaleX,this._svgGroup.scaleY=r.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var a=this._svgDispatcherMap=C(),n=!1;y(this._svgGraphicRecord.named,function(i){var s=i.name,l=t.mapOrGeoModel,u=t.data,c=i.svgNodeTagLower,p=i.el,f=u?u.indexOfName(s):null,h=l.getRegionModel(s);ln.get(c)!=null&&p instanceof xe&&lt(t,p,f,h),p instanceof xe&&(p.culling=!0);var v=h.get("silent",!0);if(v!=null&&(p.silent=v),p.z2EmphasisLift=0,!i.namedFrom&&(cn.get(c)!=null&&ut(t,p,s,h,l,f,null),ct(t,p,s,h,l,f),pt(t,p,s,h,l),un.get(c)!=null)){var g=ft(t,p,s,h,l);g==="self"&&(n=!0);var m=a.get(s)||a.set(s,[]);m.push(p)}},this),this._enableBlurEntireSVG(n,t)},o.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var r=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=r.opacity;this._svgGraphicRecord.root.traverse(function(n){if(!n.isGroup){Pt(n);var i=n.ensureState("blur").style||{};i.opacity==null&&a!=null&&(i.opacity=a),n.ensureState("emphasis")}})}},o.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},o.prototype.findHighDownDispatchers=function(t,e){if(t==null)return[];var r=e.coordinateSystem;if(r.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var n=a.get(t);return n?[n]:[]}}else if(r.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},o.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},o.prototype._useSVG=function(t){var e=x.getGeoResource(t);if(e&&e.type==="geoSVG"){var r=e.useGraphic(this.uid);this._svgGroup.add(r.root),this._svgGraphicRecord=r,this._svgMapName=t}},o.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var e=x.getGeoResource(t);e&&e.type==="geoSVG"&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},o.prototype._updateController=function(t,e,r,a){var n=t.coordinateSystem,i=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=n.getZoom(),i.enable(t.get("roam")||!1,{api:a,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(c,p,f){return n.containPoint([p,f])},isInClip:function(c,p,f){return!e||e.contain(p,f)}}});var l=t.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=t.id,c}i.off("pan").on("pan",function(c){this._mouseDownFlag=!1,Ga(s,c.dx,c.dy),a.dispatchAction(H(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,Pa(s,c.scale,c.originX,c.originY),a.dispatchAction(H(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},o.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=Zt(e).ignore)})},o.prototype._updateMapSelectHandler=function(t,e,r,a){var n=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){n._mouseDownFlag=!0}),e.on("click",function(i){n._mouseDownFlag&&(n._mouseDownFlag=!1)}))},o})();function lt(o,t,e,r){var a=r.getModel("itemStyle"),n=r.getModel(["emphasis","itemStyle"]),i=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=le(a),u=le(n),c=le(s),p=le(i),f=o.data;if(f){var h=f.getItemVisual(e,"style"),v=f.getItemVisual(e,"decal");o.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),v&&(l.decal=Mr(v,o.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=p,Pt(t)}function ut(o,t,e,r,a,n,i){var s=o.data,l=o.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),n)),c=s&&s.getItemLayout(n);if(l||u||c&&c.showLabel){var p=l?e:n,f=void 0;(!s||n>=0)&&(f=a);var h=i?{normal:{align:"center",verticalAlign:"middle"}}:null;Lt(t,Ft(r),{labelFetcher:f,labelDataIndex:p,defaultText:e},h);var v=t.getTextContent();if(v&&(Zt(v).ignore=v.ignore,t.textConfig&&i)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(i[0]-g.x)/g.width*100+"%",(i[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function ct(o,t,e,r,a,n){o.data?o.data.setItemGraphicEl(n,t):ce(t).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:e,region:r&&r.option||{}}}function pt(o,t,e,r,a){o.data||Ar({el:t,componentModel:a,itemName:e,itemTooltipOption:r.get("tooltip")})}function ft(o,t,e,r,a){t.highDownSilentOnTouch=!!a.get("selectedMode");var n=r.getModel("emphasis"),i=n.get("focus");return Et(t,i,n.get("blurScope"),n.get("disabled")),o.isGeo&&Ir(t,a,e),i}function ht(o,t,e){var r=[],a;function n(){a=[]}function i(){a.length&&(r.push(a),a=[])}var s=t({polygonStart:n,polygonEnd:i,lineStart:n,lineEnd:i,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),y(o,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!e&&s.polygonEnd(),r}var pn=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,r,a,n){if(!(n&&n.type==="mapToggleSelect"&&n.from===this.uid)){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&n&&n.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),n&&n.type==="geoRoam"&&n.componentType==="series"&&n.seriesId===e.id){var s=this._mapDraw;s&&i.add(s.group)}else if(e.needsDrawMap){var s=this._mapDraw||new Xt(a);i.add(s.group),s.draw(e,r,a,this,n),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&r.getComponent("legend")&&this._renderSymbols(e,r,a)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,r,a){var n=e.originalData,i=this.group;n.each(n.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=n.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,p=u.offset,f=new Mt({style:{fill:e.getData().getVisual("style").fill},shape:{cx:c[0]+p*9,cy:c[1],r:3},silent:!0,z2:8+(p?0:Rr+1)});if(!p){var h=e.mainSeries.getData(),v=n.getName(l),g=h.indexOfName(v),m=n.getItemModel(l),S=m.getModel("label"),w=h.getItemGraphicEl(g);Lt(f,Ft(m),{labelFetcher:{getFormattedLabel:function(_,E){return e.getFormattedLabel(g,E)}},defaultText:v}),f.disableLabelAnimation=!0,S.get("position")||f.setTextConfig({position:"bottom"}),w.onHoverStateChange=function(_){Gr(f,_)}}i.add(f)}}})},t.type="map",t})(Ge),fn=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e.needsDrawMap=!1,e.seriesGroup=[],e.getTooltipPosition=function(r){if(r!=null){var a=this.getData().getName(r),n=this.coordinateSystem,i=n.getRegion(a);return i&&n.dataToPoint(i.getCenter())}},e}return t.prototype.getInitialData=function(e){for(var r=da(this,{coordDimensions:["value"],encodeDefaulter:Pr(Lr,this)}),a=C(),n=[],i=0,s=r.count();i<s;i++){var l=r.getName(i);a.set(l,i)}var u=x.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return y(u.regions,function(c){var p=c.name,f=a.get(p),h=c.properties&&c.properties.echartsStyle,v;f==null?(v={name:p},n.push(v)):v=r.getRawDataItem(f),h&&zt(v,h)}),r.appendData(n),r},t.prototype.getHostGeoModel=function(){if(Fr(this).kind!==Er.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var r=this.getData();return r.get(r.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var r=this.getData();return r.getItemModel(r.indexOfName(e))},t.prototype.formatTooltip=function(e,r,a){for(var n=this.getData(),i=this.getRawValue(e),s=n.getName(e),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var p=l[c].originalData.indexOfName(s),f=n.mapDimension("value");isNaN(l[c].originalData.get(f,p))||u.push(l[c].name)}return Ve("section",{header:u.join(", "),noHeader:!u.length,blocks:[Ve("nameValue",{name:s,value:i})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var r=e.icon||"roundRect",a=Re(r,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return a.setStyle(e.itemStyle),a.style.stroke="none",r.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill=D.color.neutral00,a.style.lineWidth=2),a},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:D.color.tertiary},itemStyle:{borderWidth:.5,borderColor:D.color.border,areaColor:D.color.background},emphasis:{label:{show:!0,color:D.color.primary},itemStyle:{areaColor:D.color.highlight}},select:{label:{show:!0,color:D.color.primary},itemStyle:{color:D.color.highlight}},nameProperty:"name"},t})(Ie);function hn(o,t){var e={};return y(o,function(r){r.each(r.mapDimension("value"),function(a,n){var i="ec-"+r.getName(n);e[i]=e[i]||[],isNaN(a)||e[i].push(a)})}),o[0].map(o[0].mapDimension("value"),function(r,a){for(var n="ec-"+o[0].getName(a),i=0,s=1/0,l=-1/0,u=e[n].length,c=0;c<u;c++)s=Math.min(s,e[n][c]),l=Math.max(l,e[n][c]),i+=e[n][c];var p;return t==="min"?p=s:t==="max"?p=l:t==="average"?p=i/u:p=i,u===0?NaN:p})}function gn(o){var t={};o.eachSeriesByType("map",function(e){var r=e.getHostGeoModel(),a=r?"o"+r.id:"i"+e.getMapType();(t[a]=t[a]||[]).push(e)}),y(t,function(e,r){for(var a=hn(j(e,function(i){return i.getData()}),e[0].get("mapValueCalculation")),n=0;n<e.length;n++)e[n].originalData=e[n].getData();for(var n=0;n<e.length;n++)e[n].seriesGroup=e,e[n].needsDrawMap=n===0&&!e[n].getHostGeoModel(),e[n].setData(a.cloneShallow()),e[n].mainSeries=e[0]})}function vn(o){var t={};o.eachSeriesByType("map",function(e){var r=e.getMapType();if(!(e.getHostGeoModel()||t[r])){var a={};y(e.seriesGroup,function(i){var s=i.coordinateSystem,l=i.originalData;i.get("showLegendSymbol")&&o.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var p=l.getName(c),f=s.getRegion(p);if(!(!f||isNaN(u))){var h=a[p]||0,v=s.dataToPoint(f.getCenter());a[p]=h+1,l.setItemLayout(c,{point:v,offset:h})}})});var n=e.getData();n.each(function(i){var s=n.getName(i),l=n.getItemLayout(i)||{};l.showLabel=!a[s],n.setItemLayout(i,l)}),t[r]=!0}})}var gt=re,Jt=(function(o){A(t,o);function t(e,r){var a=o.call(this)||this;return a.type="view",a.dimensions=["x","y"],a._roamTransformable=new ie,a._rawTransformable=new ie,a.name=e,a._opt=r,a}return t.prototype.setBoundingRect=function(e,r,a,n){return this._rect=new O(e,r,a,n),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,r,a,n){this._transformTo(e,r,a,n),this._viewRect=new O(e,r,a,n)},t.prototype._transformTo=function(e,r,a,n){var i=this.getBoundingRect(),s=this._rawTransformable;s.transform=i.calculateTransform(new O(e,r,a,n));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(e){var r=this._opt;r&&r.api&&r.ecModel&&r.ecModel.getShallow("legacyViewCoordSysCenterBase")&&e&&(e=[Y(e[0],r.api.getWidth()),Y(e[1],r.api.getWidth())]),this._centerOption=zr(e),this._updateCenterAndZoom()},t.prototype.setZoom=function(e){this._zoom=Fe(e||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),r=e.x+e.width/2,a=e.y+e.height/2;return[r,a]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._centerOption,r=this._rect;e&&r&&(this._center=[Y(e[0],r.width,r.x),Y(e[1],r.height,r.y)]);var a=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,i=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=re([],s,a),i=re([],i,a),n.originX=s[0],n.originY=s[1],n.x=i[0]-s[0],n.y=i[1]-s[1],n.scaleX=n.scaleY=l,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,r=this._rawTransformable;r.parent=e,e.updateTransform(),r.updateTransform(),kr(this.transform||(this.transform=[]),r.transform||At()),this._rawTransform=r.getLocalTransform(),this.invTransform=this.invTransform||[],It(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,r=this._roamTransformable,a=new ie;return a.transform=r.transform,a.decomposeTransform(),{roam:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,r,a){var n=r?this._rawTransform:this.transform;return a=a||[],n?gt(a,e,n):Or(a,e)},t.prototype.pointToData=function(e,r,a){a=a||[];var n=this.invTransform;return n?gt(a,e,n):(a[0]=e[0],a[1]=e[1],a)},t.prototype.convertToPixel=function(e,r,a){var n=vt(r);return n===this?n.dataToPoint(a):null},t.prototype.convertFromPixel=function(e,r,a){var n=vt(r);return n===this?n.pointToData(a):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t})(ie);function vt(o){var t=o.seriesModel;return t?t.coordinateSystem:null}var dn={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},jt=["lng","lat"],Ae=(function(o){A(t,o);function t(e,r,a){var n=o.call(this,e,{api:a.api,ecModel:a.ecModel})||this;n.dimensions=jt,n.type="geo",n._nameCoordMap=C(),n.map=r;var i=a.projection,s=x.load(r,a.nameMap,a.nameProperty),l=x.getGeoResource(r);n.resourceType=l?l.type:null;var u=n.regions=s.regions,c=dn[l.type];n._regionsMap=s.regionsMap,n.regions=s.regions,n.projection=i;var p;if(i)for(var f=0;f<u.length;f++){var h=u[f].getBoundingRect(i);p=p||h.clone(),p.union(h)}else p=s.boundingRect;return n.setBoundingRect(p.x,p.y,p.width,p.height),n.aspectScale=i?1:bt(a.aspectScale,c.aspectScale),n._invertLongitute=i?!1:c.invertLongitute,n}return t.prototype._transformTo=function(e,r,a,n){var i=this.getBoundingRect(),s=this._invertLongitute;i=i.clone(),s&&(i.y=-i.y-i.height);var l=this._rawTransformable;l.transform=i.calculateTransform(new O(e,r,a,n));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var r=this.regions,a=0;a<r.length;a++){var n=r[a];if(n.type==="geoJSON"&&n.contain(e))return r[a]}},t.prototype.addGeoCoord=function(e,r){this._nameCoordMap.set(e,r)},t.prototype.getGeoCoord=function(e){var r=this._regionsMap.get(e);return this._nameCoordMap.get(e)||r&&r.getCenter()},t.prototype.dataToPoint=function(e,r,a){if(ae(e)&&(e=this.getGeoCoord(e)),e){var n=this.projection;return n&&(e=n.project(e)),e&&this.projectedToPoint(e,r,a)}},t.prototype.pointToData=function(e,r,a){var n=this.projection;return n&&(e=n.unproject(e)),e&&this.pointToProjected(e,a)},t.prototype.pointToProjected=function(e,r){return o.prototype.pointToData.call(this,e,0,r)},t.prototype.projectedToPoint=function(e,r,a){return o.prototype.dataToPoint.call(this,e,r,a)},t.prototype.convertToPixel=function(e,r,a){var n=dt(r);return n===this?n.dataToPoint(a):null},t.prototype.convertFromPixel=function(e,r,a){var n=dt(r);return n===this?n.pointToData(a):null},t})(Jt);xr(Ae,Jt);function dt(o){var t=o.geoModel,e=o.seriesModel;return t?t.coordinateSystem:e?e.coordinateSystem||(e.getReferringComponents("geo",kt).models[0]||{}).coordinateSystem:null}function mt(o,t){var e=o.get("boundingCoords");if(e!=null){var r=e[0],a=e[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(a[0])&&isFinite(a[1])){var n=this.projection;if(n){var i=r[0],s=r[1],l=a[0],u=a[1];r=[1/0,1/0],a=[-1/0,-1/0];var c=function(P,B,V,F){for(var z=V-P,M=F-B,k=0;k<=100;k++){var ne=k/100,d=n.project([P+z*ne,B+M*ne]);Rt(r,r,d),Gt(a,a,d)}};c(i,s,l,s),c(l,s,l,u),c(l,u,i,u),c(i,u,l,s)}this.setBoundingRect(r[0],r[1],a[0]-r[0],a[1]-r[1])}}var p=this.getBoundingRect(),f=o.get("layoutCenter"),h=o.get("layoutSize"),v=Yr(o,t).refContainer,g=p.width/p.height*this.aspectScale,m=!1,S,w;f&&h&&(S=[Y(f[0],v.width)+v.x,Y(f[1],v.height)+v.y],w=Y(h,Math.min(v.width,v.height)),!isNaN(S[0])&&!isNaN(S[1])&&!isNaN(w)&&(m=!0));var _;if(m)_={},g>1?(_.width=w,_.height=w/g):(_.height=w,_.width=w*g),_.y=S[1]-_.height/2,_.x=S[0]-_.width/2;else{var E=o.getBoxLayoutParams();E.aspect=g,_=Hr(E,v),_=Br(o,_,g)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(o.get("center")),this.setZoom(o.get("zoom"))}function mn(o,t){y(t.get("geoCoord"),function(e,r){o.addGeoCoord(r,e)})}var yn=(function(){function o(){this.dimensions=jt}return o.prototype.create=function(t,e){var r=[];function a(i){return{nameProperty:i.get("nameProperty"),aspectScale:i.get("aspectScale"),projection:i.get("projection")}}t.eachComponent("geo",function(i,s){var l=i.get("map"),u=new Ae(l+s,l,H({nameMap:i.get("nameMap"),api:e,ecModel:t},a(i)));u.zoomLimit=i.get("scaleLimit"),r.push(u),i.coordinateSystem=u,u.model=i,u.resize=mt,u.resize(i,e)}),t.eachSeries(function(i){Vr({targetModel:i,coordSysType:"geo",coordSysProvider:function(){var s=i.subType==="map"?i.getHostGeoModel():i.getReferringComponents("geo",kt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var n={};return t.eachSeriesByType("map",function(i){if(!i.getHostGeoModel()){var s=i.getMapType();n[s]=n[s]||[],n[s].push(i)}}),y(n,function(i,s){var l=j(i,function(c){return c.get("nameMap")}),u=new Ae(s,s,H({nameMap:Nr(l),api:e,ecModel:t},a(i[0])));u.zoomLimit=Ur.apply(null,j(i,function(c){return c.get("scaleLimit")})),r.push(u),u.resize=mt,u.resize(i[0],e),y(i,function(c){c.coordinateSystem=u,mn(u,c)})}),r},o.prototype.getFilledRegions=function(t,e,r,a){for(var n=(t||[]).slice(),i=C(),s=0;s<n.length;s++)i.set(n[s].name,n[s]);var l=x.load(e,r,a);return y(l.regions,function(u){var c=u.name,p=i.get(c),f=u.properties&&u.properties.echartsStyle;p||(p={name:c},n.push(p)),f&&zt(p,f)}),n},o})(),Wt=new yn,_n=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,r,a){this.mergeDefaultAndTheme(e,a);var n=x.getGeoResource(e.map);if(n&&n.type==="geoJSON"){var i=e.itemStyle=e.itemStyle||{};"color"in i||(i.color=e.defaultItemStyleColor||D.color.backgroundTint)}Zr(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,r=this.option;r.regions=Wt.getFilledRegions(r.regions,r.map,r.nameMap,r.nameProperty);var a={};this._optionModelMap=Xr(r.regions||[],function(n,i){var s=i.name;return s&&(n.set(s,new Ne(i,e,e.ecModel)),i.selected&&(a[s]=!0)),n},C()),r.selectedMap||(r.selectedMap=a)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Ne(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,r){var a=this.getRegionModel(e),n=r==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),i={name:e};if(Jr(n))return i.status=r,n(i);if(ae(n))return n.replace("{a}",e??"")},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var r=this.option,a=r.selectedMode;if(a){a!=="multiple"&&(r.selectedMap=null);var n=r.selectedMap||(r.selectedMap={});n[e]=!0}},t.prototype.unSelect=function(e){var r=this.option.selectedMap;r&&(r[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var r=this.option.selectedMap;return!!(r&&r[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:D.color.tertiary},itemStyle:{borderWidth:.5,borderColor:D.color.border},emphasis:{label:{show:!0,color:D.color.primary},itemStyle:{color:D.color.highlight}},select:{label:{show:!0,color:D.color.primary},itemStyle:{color:D.color.highlight}},regions:[]},t})(jr),Sn=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e.focusBlurEnabled=!0,e}return t.prototype.init=function(e,r){this._api=r},t.prototype.render=function(e,r,a,n){if(this._model=e,!e.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new Xt(a));var i=this._mapDraw;i.draw(e,r,a,this,n),i.group.on("click",this._handleRegionClick,this),i.group.silent=e.get("silent"),this.group.add(i.group),this.updateSelectStatus(e,r,a)},t.prototype._handleRegionClick=function(e){var r;Wr(e.target,function(a){return(r=ce(a).eventData)!=null},!0),r&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:r.name})},t.prototype.updateSelectStatus=function(e,r,a){var n=this;this._mapDraw.group.traverse(function(i){var s=ce(i).eventData;if(s)return n._model.isSelected(s.name)?a.enterSelect(i):a.leaveSelect(i),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t})(Kr);function bn(o,t,e){x.registerMap(o,t,e)}function Kt(o){o.registerCoordinateSystem("geo",Wt),o.registerComponentModel(_n),o.registerComponentView(Sn),o.registerImpl("registerMap",bn),o.registerImpl("getMap",function(e){return x.getMapForUser(e)});function t(e,r){r.update="geo:updateSelectStatus",o.registerAction(r,function(a,n){var i={},s=[];return n.eachComponent({mainType:"geo",query:a},function(l){l[e](a.name);var u=l.coordinateSystem;y(u.regions,function(p){i[p.name]=l.isSelected(p.name)||!1});var c=[];y(i,function(p,f){i[f]&&c.push(f)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:i,allSelected:s,name:a.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),o.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,r,a){var n=e.componentType;n||(e.geoId!=null?n="geo":e.seriesId!=null&&(n="series")),n||(n="series"),r.eachComponent({mainType:n,query:e},function(i){var s=i.coordinateSystem;if(s.type==="geo"){var l=La(s,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(l.center),i.setZoom&&i.setZoom(l.zoom),n==="series"&&y(i.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function wn(o){Pe(Kt),o.registerChartView(pn),o.registerSeriesModel(fn),o.registerLayout(vn),o.registerProcessor(o.PRIORITY.PROCESSOR.STATISTIC,gn),$r("map",o.registerAction)}function yt(o,t){var e=t.rippleEffectColor||t.color;o.eachChild(function(r){r.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var Tn=(function(o){A(t,o);function t(e,r){var a=o.call(this)||this,n=new qr(e,r),i=new R;return a.add(n),a.add(i),a.updateData(e,r),a}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var r=e.symbolType,a=e.color,n=e.rippleNumber,i=this.childAt(1),s=0;s<n;s++){var l=Re(r,-1,-1,2,2,a);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/n*e.period+e.effectOffset;l.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(e.period,{opacity:0}).delay(u).start(),i.add(l)}yt(i,e)},t.prototype.updateEffectAnimation=function(e){for(var r=this._effectCfg,a=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],i=0;i<n.length;i++){var s=n[i];if(r[s]!==e[s]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}yt(a,e)},t.prototype.highlight=function(){Qr(this)},t.prototype.downplay=function(){ea(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,r){var a=this,n=e.hostModel;this.childAt(0).updateData(e,r);var i=this.childAt(1),s=e.getItemModel(r),l=e.getItemVisual(r,"symbol"),u=ta(e.getItemVisual(r,"symbolSize")),c=e.getItemVisual(r,"style"),p=c&&c.fill,f=s.getModel("emphasis");i.setScale(u),i.traverse(function(m){m.setStyle("fill",p)});var h=ra(e.getItemVisual(r,"symbolOffset"),u);h&&(i.x=h[0],i.y=h[1]);var v=e.getItemVisual(r,"symbolRotate");i.rotation=(v||0)*Math.PI/180||0;var g={};g.showEffectOn=n.get("showEffectOn"),g.rippleScale=s.get(["rippleEffect","scale"]),g.brushType=s.get(["rippleEffect","brushType"]),g.period=s.get(["rippleEffect","period"])*1e3,g.effectOffset=r/e.count(),g.z=n.getShallow("z")||0,g.zlevel=n.getShallow("zlevel")||0,g.symbolType=l,g.color=p,g.rippleEffectColor=s.get(["rippleEffect","color"]),g.rippleNumber=s.get(["rippleEffect","number"]),g.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(g):this.startEffectAnimation(g),this._effectCfg=g):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(m){m==="emphasis"?g.showEffectOn!=="render"&&a.startEffectAnimation(g):m==="normal"&&g.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=g,Et(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t})(R),Dn=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this._symbolDraw=new St(Tn)},t.prototype.render=function(e,r,a){var n=e.getData(),i=this._symbolDraw;i.updateData(n,{clipShape:this._getClipShape(e)}),this.group.add(i.group)},t.prototype._getClipShape=function(e){var r=e.coordinateSystem,a=r&&r.getArea&&r.getArea();return e.get("clip",!0)?a:null},t.prototype.updateTransform=function(e,r,a){var n=e.getData();this.group.dirty();var i=ge("").reset(e,r,a);i.progress&&i.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var r=e.coordinateSystem;r&&r.getRoamTransform&&(this.group.transform=aa(r.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,r){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t})(Ge),Cn=(function(o){A(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,r){return _t(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,r,a){return a.point(r.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t})(Ie);function Mn(o){o.registerChartView(Dn),o.registerSeriesModel(Cn),o.registerLayout(ge("effectScatter"))}const An={class:"service-map-wrapper"},In={class:"service-map-info"},Rn={class:"service-map-info__title"},Gn={class:"service-map-info__list"},Pn={key:1,class:"service-map-info__empty"},Ln={id:"service-map-container",class:"service-map"},Fn=la({__name:"ServiceMap",props:{selectedKey:{}},emits:["update:selectedKey"],setup(o,{emit:t}){const e=o,r=t;Pe([ia,wn,Mn,wa,Kt,sa]);const{t:a,tm:n,rt:i,locale:s}=ua(),l={玉林:[110.15,22.63],柳州:[109.41,24.33],西安:[108.94,34.26],芜湖:[118.38,31.33],合肥:[117.27,31.86],北京:[116.41,39.9],扬中:[119.82,32.24],郑州:[113.65,34.76],济南:[117,36.65],抚州:[116.35,28],重庆:[106.55,29.56],长沙:[112.94,28.23],武汉:[114.3,30.59],襄阳:[112.14,32.04],十堰:[110.79,32.65],桂林:[110.29,25.27],东莞:[113.75,23.04],常州:[119.97,31.81],宁波:[121.55,29.87],义乌:[120.07,29.31],贵阳:[106.71,26.65],无锡:[120.3,31.57],平湖:[121.02,30.7]},u={zh:{玉林:"玉林",柳州:"柳州",西安:"西安",芜湖:"芜湖",合肥:"合肥",北京:"北京",扬中:"扬中",郑州:"郑州",济南:"济南",抚州:"抚州",重庆:"重庆",长沙:"长沙",武汉:"武汉",襄阳:"襄阳",十堰:"十堰",桂林:"桂林",东莞:"东莞",常州:"常州",义乌:"义乌",贵阳:"贵阳",无锡:"无锡",平湖:"平湖"},en:{玉林:"Yulin",柳州:"Liuzhou",西安:"Xi'an",芜湖:"Wuhu",合肥:"Hefei",北京:"Beijing",扬中:"Yangzhong",郑州:"Zhengzhou",济南:"Jinan",抚州:"Fuzhou",重庆:"Chongqing",长沙:"Changsha",武汉:"Wuhan",襄阳:"Xiangyang",十堰:"Shiyan",桂林:"Guilin",东莞:"Dongguan",常州:"Changzhou",义乌:"Yiwu",贵阳:"Guiyang",无锡:"Wuxi",平湖:"Pinghu"}};function c(d){const b=s.value.startsWith("en")?"en":"zh";return u[b]?.[d]||d}const p=[{key:"guangxi_office",name:"广西办",value:1800,type:"office",cities:["玉林","柳州"],coord:[110.14,22.63]},{key:"xian_office",name:"陕西",value:1800,type:"office",cities:["西安"]},{key:"anhui_office",name:"安徽",value:1800,type:"office",cities:["芜湖","合肥"]},{key:"north_office",name:"北京",value:1800,type:"office",cities:["北京","扬中"]},{key:"zhengzhou_office",name:"河南",value:1800,type:"office",cities:["郑州","济南","抚州"]},{key:"chongqing_office",name:"重庆",value:1800,type:"office",cities:["重庆"]},{key:"dongqi_office",name:"湖南",value:1800,type:"office",cities:["长沙","武汉","襄阳","十堰"]},{key:"guilin_hq",name:"广东",value:1800,type:"office",cities:["东莞","常州"]},{key:"ningbo_office",name:"浙江",value:1800,type:"office",cities:["义乌","贵阳","无锡"],coord:[121.55,29.87]},{key:"production_base",name:"广西",value:2400,type:"base",cities:["桂林","襄阳","平湖"],coord:[110.29,25.27]}];function f(d){return a(`about_service.map.${d}.title`)}function h(d){const b=n(`about_service.map.${d}.items`);return Array.isArray(b)?b.map(T=>i(T)):[]}function v(d){return a(`about_service.map.${d}.desc`)}const g=K(()=>p.map(d=>{const b=v(d.key),T=d.cities.map(I=>c(I));return{...d,title:f(d.key),items:h(d.key),desc:b,cityLabels:T}})),m=_e(!1),S=_e(null);let w=null;const _=_e([]),E={replaceMerge:["series"]},P=K({get:()=>e.selectedKey??"guangxi_office",set:d=>{r("update:selectedKey",d)}}),B=new Map,V=K(()=>{const d=g.value.find(b=>b.key===P.value);return d?{title:d.title,items:d.items,desc:d.desc}:null}),F=K(()=>p.map(d=>({name:d.name,value:d.value})));function z(d){if(d?.data?.parentKey){P.value=d.data.parentKey;return}if(d?.name){const b=_.value.find(I=>I.name===d.name);if(b){P.value=b.parentKey;return}const T=g.value.find(I=>I.title===d.name);T&&(P.value=T.key)}}Ue(P,()=>{M()},{immediate:!0}),Ue(s,()=>{M()});function M(){const d=P.value,b=[];g.value.forEach(T=>{const I=T.key===d;T.cities.forEach((oe,$t)=>{const me=l[oe];me&&b.push({id:`${T.key}-${oe}`,name:T.cityLabels[$t]||oe,cityKey:oe,value:[me[0],me[1],800],isActive:I,parentKey:T.key})})}),_.value=b}const k=K(()=>m.value?{backgroundColor:"transparent",geo:{map:"china",zoom:1,roam:!1,left:"0%",top:"0%",right:"0%",bottom:"0%",aspectScale:.75,label:{show:!0,color:"transparent",fontSize:10,formatter:d=>({内蒙古自治区:"内蒙古",西藏自治区:"西藏",新疆维吾尔自治区:"新疆",宁夏回族自治区:"宁夏",广西壮族自治区:"广西",香港特别行政区:"香港",澳门特别行政区:"澳门"})[d.name]||d.name},itemStyle:{areaColor:"#ACDBEE",borderColor:"#eeeeee",borderWidth:1},emphasis:{itemStyle:{areaColor:"#ACDBEE"}},select:{itemStyle:{areaColor:"#ACDBEE"}}},series:[{id:"service-network-map",name:"服务网络",type:"map",geoIndex:0,data:F.value,label:{show:!1},emphasis:{itemStyle:{areaColor:"#ACDBEE"}},select:{itemStyle:{areaColor:"#ACDBEE"}}},{id:"inactive-city-points",name:"城市网点",type:"scatter",coordinateSystem:"geo",itemStyle:{color:"rgba(35, 90, 194)"},data:_.value.filter(d=>!d.isActive).filter((d,b,T)=>T.findIndex(I=>I.cityKey===d.cityKey)===b),symbolSize:()=>8,label:{show:!1},z:8},{id:"active-city-points",name:"选中城市",type:"effectScatter",coordinateSystem:"geo",rippleEffect:{brushType:"fill",scale:3,period:4},itemStyle:{color:"#e70011",shadowBlur:10,shadowColor:"rgba(231, 0, 17, 0.4)"},data:_.value.filter(d=>d.isActive),symbolSize:()=>12,showEffectOn:"render",label:{show:!0,formatter:d=>d.data?.name||"",color:"#fff",fontSize:10,fontWeight:500,position:"inside"},z:15}]}:{});ca(async()=>{try{const I=await(await fetch("/china.geo.json")).json();na("china",I),m.value=!0,ne(I),M()}catch{}const d=document.getElementById("service-map-container");d&&(w=new ResizeObserver(()=>{S.value?.resize()}),w.observe(d))}),pa(()=>{w?.disconnect()});function ne(d){d.features&&d.features.forEach(b=>{b.properties?.name&&b.properties?.center&&B.set(b.properties.name,b.properties.center)})}return(d,b)=>(Z(),W("div",An,[se("div",In,[V.value?(Z(),W(Ye,{key:0},[se("h3",Rn,ye(V.value.title),1),se("div",Gn,[(Z(!0),W(Ye,null,fa(V.value.items,(T,I)=>(Z(),W("div",{key:I,class:"service-map-info__item"},ye(T),1))),128))])],64)):(Z(),W("div",Pn,ye(He(a)("about_service.map.empty")),1))]),se("div",Ln,[m.value?(Z(),ha(He(oa),{key:0,ref_key:"chartRef",ref:S,class:"service-map__chart",option:k.value,"update-options":E,autoresize:"",onClick:z},null,8,["option"])):ga("",!0)])]))}}),kn=va(Fn,[["__scopeId","data-v-39bc20dc"]]);export{kn as default};
