|
|
var Bf=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Hf=function(){function r(){this.browser=new Bf,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),X=new Hf;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(X.wxa=!0,X.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?X.worker=!0:!X.hasGlobalWindow||"Deno"in window?(X.node=!0,X.svgSupported=!0):zf(navigator.userAgent,X);function zf(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),a&&(e.ie=!0,e.version=a[1]),n&&(e.edge=!0,e.version=n[1],e.newEdge=+n[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var on=12,vs="sans-serif",Qt=on+"px "+vs,Nf=20,Yf=100,Gf="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Xf(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),a=(r.charCodeAt(e)-Nf)/Yf;t[i]=a}return t}var Uf=Xf(Gf),Ci={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,t;return function(e,i){if(!r){var a=Ci.createCanvas();r=a&&a.getContext("2d")}if(r)return t!==i&&(t=r.font=i||Qt),r.measureText(e);e=e||"",i=i||Qt;var n=/((?:\d+)?\.?\d*)px/.exec(i),o=n&&+n[1]||on,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var f=0;f<e.length;f++){var h=Uf[e[f]];s+=h==null?o:h*o}return{width:s}}}(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i}},ls=Pi(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),cs=Pi(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Kr=Object.prototype.toString,Mi=Array.prototype,Wf=Mi.forEach,qf=Mi.filter,sn=Mi.slice,$f=Mi.map,Ln=(function(){}).constructor,Fe=Ln?Ln.prototype:null,fn="__proto__",Vf=2311;function ds(){return Vf++}function hn(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t]}function Pr(r){if(r==null||typeof r!="object")return r;var t=r,e=Kr.call(r);if(e==="[object Array]"){if(!de(r)){t=[];for(var i=0,a=r.length;i<a;i++)t[i]=Pr(r[i])}}else if(cs[e]){if(!de(r)){var n=r.constructor;if(n.from)t=n.from(r);else{t=new n(r.length);for(var i=0,a=r.length;i<a;i++)t[i]=r[i]}}}else if(!ls[e]&&!de(r)&&!Pa(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==fn&&(t[o]=Pr(r[o]))}return t}function Br(r,t,e){if(!Xt(t)||!Xt(r))return e?Pr(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==fn){var a=r[i],n=t[i];Xt(n)&&Xt(a)&&!Vr(n)&&!Vr(a)&&!Pa(n)&&!Pa(a)&&!xn(n)&&!xn(a)&&!de(n)&&!de(a)?Br(a,n,e):(e||!(i in r))&&(r[i]=Pr(t[i]))}return r}function pc(r,t){for(var e=r[0],i=1,a=r.length;i<a;i++)e=Br(e,r[i],t);return e}function z(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==fn&&(r[e]=t[e]);return r}function wt(r,t,e){for(var i=G(t),a=0,n=i.length;a<n;a++){var o=i[a];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}function It(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e}return-1}function gc(r,t){var e=r.prototype;function i(){}i.prototype=t.prototype,r.prototype=new i;for(var a in e)e.hasOwnProperty(a)&&(r.p Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var La=function(r,t){return La=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])},La(r,t)};function N(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");La(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Qr(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function Pc(r,t){return r[0]=t[0],r[1]=t[1],r}function ih(r){return[r[0],r[1]]}function Lc(r,t,e){return r[0]=t,r[1]=e,r}function An(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function xc(r,t,e,i){return r[0]=t[0]+e[0]*i,r[1]=t[1]+e[1]*i,r}function ah(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function nh(r){return Math.sqrt(oh(r))}function oh(r){return r[0]*r[0]+r[1]*r[1]}function Hi(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function sh(r,t){var e=nh(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function xa(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var fh=xa;function hh(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var qr=hh;function uh(r,t,e,i){return r[0]=t[0]+i*(e[0]-t[0]),r[1]=t[1]+i*(e[1]-t[1]),r}function pe(r,t,e){var i=t[0],a=t[1];return r[0]=e[0]*i+e[2]*a+e[4],r[1]=e[1]*i+e[3]*a+e[5],r}function zr(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Nr(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Lr=function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r}(),vh=function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Lr(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,a=t.offsetY,n=i-this._x,o=a-this._y;this._x=i,this._y=a,e.drift(n,o,t),this.handler.dispatchToElement(new Lr(e,t),"drag",t.event);var s=this.handler.findHover(i,a,e).target,f=this._dropTarget;this._dropTarget=s,e!==s&&(f&&s!==f&&this.handler.dispatchToElement(new Lr(f,t),"dragleave",t.event),s&&s!==f&&this.handler.dispatchToElement(new Lr(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Lr(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Lr(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r}(),Jr=function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,i,a){this._$handlers||(this._$handlers={});var n=this._$handlers;if(typeof e=="function"&&(a=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),n[t]||(n[t]=[]);for(var s=0;s<n[t].length;s++)if(n[t][s].h===i)return this;var f={h:i,query:e,ctx:a||this,callAtLast:i.zrEventfulCallAtLast},h=n[t].length-1,u=n[t][h];return u&&u.callAtLast?n[t].splice(h,0,f):n[t].push(f),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var a=[],n=0,o=i[t].length;n<o;n++)i[t][n].h!==e&&a.push(i[t][n]);i[t]=a}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},r.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var a=this._$handlers[t],n=this._$eventProcessor;if(a)for(var o=e.length,s=a.length,f=0;f<s;f++){var h=a[f];if(!(n&&n.filter&&h.query!=null&&!n.filter(t,h.query)))switch(o){case 0:h.h.call(h.ctx);break;case 1:h.h.call(h.ctx,e[0]);break;case 2:h.h.cal `),n=a.length;if(n===1)return to(a[0],t,e,i);for(var o=new U(0,0,0,0),s=0;s<a.length;s++){var f=to(a[s],t,e,i);s===0?o.copy(f):o.union(f)}return o}function ue(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function Or(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Di(r){return ct("国",r)}function Se(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function mu(r,t,e){var i=t.position||"inside",a=t.distance!=null?t.distance:5,n=e.height,o=e.width,s=n/2,f=e.x,h=e.y,u="left",v="top";if(i instanceof Array)f+=Se(i[0],e.width),h+=Se(i[1],e.height),u=null,v=null;else switch(i){case"left":f-=a,h+=s,u="right",v="middle";break;case"right":f+=a+o,h+=s,v="middle";break;case"top":f+=o/2,h-=a,u="center",v="bottom";break;case"bottom":f+=o/2,h+=n+a,u="center";break;case"inside":f+=o/2,h+=s,u="center",v="middle";break;case"insideLeft":f+=a,h+=s,v="middle";break;case"insideRight":f+=o-a,h+=s,u="right",v="middle";break;case"insideTop":f+=o/2,h+=a,u="center";break;case"insideBottom":f+=o/2,h+=n-a,u="center",v="bottom";break;case"insideTopLeft":f+=a,h+=a;break;case"insideTopRight":f+=o-a,h+=a,u="right";break;case"insideBottomLeft":f+=a,h+=n-a,v="bottom";break;case"insideBottomRight":f+=o-a,h+=n-a,u="right",v="bottom";break}return r=r||{},r.x=f,r.y=h,r.align=u,r.verticalAlign=v,r}var ra="__zr_normal__",ea=be.concat(["ignore"]),wu=Pi(be,function(r,t){return r[t]=!0,r},{ignore:!1}),Ar={},Tu=new U(0,0,0,0),Ii=function(){function r(t){this.id=ds(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,a=i.local,n=e.innerTransformable,o=void 0,s=void 0,f=!1;n.parent=a?this:null;var h=!1;if(n.copyTransform(e),i.position!=null){var u=Tu;i.layoutRect?u.copy(i.layoutRect):u.copy(this.getBoundingRect()),a||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ar,i,u):mu(Ar,i,u),n.x=Ar.x,n.y=Ar.y,o=Ar.align,s=Ar.verticalAlign;var v=i.origin;if(v&&i.rotation!=null){var l=void 0,c=void 0;v==="center"?(l=u.width*.5,c=u.height*.5):(l=Se(v[0],u.width),c=Se(v[1],u.height)),h=!0,n.originX=-n.x+l+(a?0:u.x),n.originY=-n.y+c+(a?0:u.y)}}i.rotation!=null&&(n.rotation=i.rotation);var p=i.offset;p&&(n.x+=p[0],n.y+=p[1],h||(n.originX=-p[0],n.originY=-p[1]));var _=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,d=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,y=void 0,m=void 0;_&&this.canBeInsideText()?(g=i.insideFill,y=i.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(g),m=!0)):(g=i.outsideFill,y=i.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(g),m=!0)),g=g||"#000",(g!==d.fill||y!==d.stroke||m!==d.autoStroke||o!==d.align||s!==d.verticalAlign)&&(f=!0,d.fill=g,d.stroke=y,d.autoStroke=m,d.align=o,d.verticalAlign=s,e.setDefaultTextStyle(d)),e.__dirty|=Ft,f&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Xa:Ga},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Mt(e);i||(i=[255,255,255,1]);for(var a=i[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*a+(n?0:255)*(1-a);return i[3]=1,Re(i,"rgba")},r.prototype.traverse=functi
* ZRender, a high performance 2d drawing library. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var fi={},$s={};function Pu(r){delete $s[r]}function Lu(r){if(!r)return!1;if(typeof r=="string")return li(r,1)<Ya;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,a=0;a<i;a++)e+=li(t[a].color,1);return e/=i,e<Ya}return!1}var xu=function(){function r(t,e,i){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var n=new Bh,o=i.renderer||"canvas";fi[o]||(o=G(fi)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new fi[o](e,n,i,t),f=i.ssr||s.ssrOnly;this.storage=n,this.painter=s;var h=!X.node&&!X.worker&&!f?new pu(s.getViewportRoot(),s.root):null,u=i.useCoarsePointer,v=u==null||u==="auto"?X.touchEventsSupported:!!u,l=44,c;v&&(c=$(i.pointerSize,l)),this.handler=new Ms(n,s,h,s.root,c),this.animation=new fu({stage:{update:f?null:function(){return a._flush(!0)}}}),f||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=Lu(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,i=Yr();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var a=Yr();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof yr&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Pu(this.id))},r}();function kc(r,t){var e=new xu(ds(),r,t);return $s[e.id]=e,e}function Bc(r,t){fi[r]=t}var Ua;function Ru(r){if(typeof Ua=="function")ret `);n=Vs(e,i,a,n);for(var s=!1,f={},h=0,u=o.length;h<u;h++)Zs(f,o[h],n),o[h]=f.textLine,s=s||f.isTruncated;r.text=o.join(` `),r.isTruncated=s}function Vs(r,t,e,i){i=i||{};var a=z({},i);a.font=t,e=$(e,"..."),a.maxIterations=$(i.maxIterations,2);var n=a.minChar=$(i.minChar,0);a.cnCharWidth=ct("国",t);var o=a.ascCharWidth=ct("a",t);a.placeholder=$(i.placeholder,"");for(var s=r=Math.max(0,r-1),f=0;f<n&&s>=o;f++)s-=o;var h=ct(e,t);return h>s&&(e="",h=0),s=r-h,a.ellipsis=e,a.ellipsisWidth=h,a.contentWidth=s,a.containerWidth=r,a}function Zs(r,t,e){var i=e.containerWidth,a=e.font,n=e.contentWidth;if(!i){r.textLine="",r.isTruncated=!1;return}var o=ct(t,a);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var f=s===0?Iu(t,n,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,f),o=ct(t,a)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Iu(r,t,e,i){for(var a=0,n=0,o=r.length;n<o&&a<t;n++){var s=r.charCodeAt(n);a+=0<=s&&s<=127?e:i}return n}function Eu(r,t){r!=null&&(r+="");var e=t.overflow,i=t.padding,a=t.font,n=e==="truncate",o=Di(a),s=$(t.lineHeight,o),f=!!t.backgroundColor,h=t.lineOverflow==="truncate",u=!1,v=t.width,l;v!=null&&(e==="break"||e==="breakAll")?l=r?Ks(r,t.font,v,e==="breakAll",0).lines:[]:l=r?r.split(` `):[];var c=l.length*s,p=$(t.height,c);if(c>p&&h){var _=Math.floor(p/s);u=u||l.length>_,l=l.slice(0,_)}if(r&&n&&v!=null)for(var d=Vs(v,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g={},y=0;y<l.length;y++)Zs(g,l[y],d),l[y]=g.textLine,u=u||g.isTruncated;for(var m=p,w=0,y=0;y<l.length;y++)w=Math.max(ct(l[y],a),w);v==null&&(v=w);var S=w;return i&&(m+=i[0]+i[2],S+=i[1]+i[3],v+=i[1]+i[3]),f&&(S=v),{lines:l,height:p,outerWidth:S,outerHeight:m,lineHeight:s,calculatedLineHeight:o,contentWidth:w,contentHeight:c,width:v,isTruncated:u}}var Fu=function(){function r(){}return r}(),eo=function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r}(),Ou=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function ku(r,t){var e=new Ou;if(r!=null&&(r+=""),!r)return e;for(var i=t.width,a=t.height,n=t.overflow,o=(n==="break"||n==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:n==="breakAll"}:null,s=na.lastIndex=0,f;(f=na.exec(r))!=null;){var h=f.index;h>s&&oa(e,r.substring(s,h),t,o),oa(e,f[2],t,o,f[1]),s=na.lastIndex}s<r.length&&oa(e,r.substring(s,r.length),t,o);var u=[],v=0,l=0,c=t.padding,p=n==="truncate",_=t.lineOverflow==="truncate",d={};function g(V,W,Y){V.width=W,V.lineHeight=Y,v+=Y,l=Math.max(l,W)}t:for(var y=0;y<e.lines.length;y++){for(var m=e.lines[y],w=0,S=0,b=0;b<m.tokens.length;b++){var T=m.tokens[b],C=T.styleName&&t.rich[T.styleName]||{},M=T.textPadding=C.padding,P=M?M[1]+M[3]:0,L=T.font=C.font||t.font;T.contentHeight=Di(L);var R=$(C.height,T.contentHeight);if(T.innerHeight=R,M&&(R+=M[0]+M[2]),T.height=R,T.lineHeight=ri(C.lineHeight,t.lineHeight,R),T.align=C&&C.align||t.align,T.verticalAlign=C&&C.verticalAlign||"middle",_&&a!=null&&v+T.lineHeight>a){var A=e.lines.length;b>0?(m.tokens=m.tokens.slice(0,b),g(m,S,w),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y),e.isTruncated=e.isTruncated||e.lines.length<A;break t}var x=C.width,E=x==null||x==="auto";if(typeof x=="string"&&x.charAt(x.length-1)==="%")T.percentWidth=x,u.push(T),T.contentWidth=ct(T.text,L);else{if(E){var D=C.backgroundColor,F=D&&D.image;F&&(F=Au(F),Ei(F)&&(T.width=Math.max(T.width,F.width*R/F.height)))}var H=p&&i!=null?i-S:null;H!=null&&H<T.width?!E||H<P?(T.text="",T.width=T.contentWidth=0):(Du(d,T.text,H-P,L,t.ellipsis,{minChar:t.truncateMinChar}),T.text=d.text,e.isTruncated=e.isTruncated||d.isTruncated,T.width=T.contentWidth=ct(T.text,L)):T.contentWidth=ct(T.text,L)}T.width+=P,S+=T.width,C&&(w=Math.max(w,T.lineHeight))}g(m,S,w)}e.outerWidth=e.width=$(i,l),e.outerHeight=e.height=$(a,v),e.contentHeight=v,e.contentWidth=l,c&&(e.outerWidth+=c[1]+c[3],e.outerHeight+=c[0]+c[2]);for(var y=0;y<u.length;y++){var T=u[y],j=T.percentWidth;T.width=parseInt(j,10)/100*e.width}return e}function oa(r,t,e,i,a){var n=t==="",o=a&&e.rich[a]||{},s=r.lines,f=o.font||e.font,h=!1,u,v;if(i){var l=o.padding,c=l?l[1]+l[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Se(o.width,i.width)+c;s.length>0&&p+i.accumWidth>i.width&&(u=t.split(` `),h=!0),i.accumWidth=p}else{var _=Ks(t,f,i.width,i.breakAll,i.accumWidth);i.accumWidth=_.accumWidth+c,v=_.linesWidths,u=_.lines}}else u=t.split(` `);for(var d=0;d<u.length;d++){var g=u[d],y=new Fu;if(y.styleName=a,y.text=g,y.isLineHolder=!g&&!n,typeof o.width=="number"?y.width=o.width:y.width=v?v[d]:ct(g,f),!d&&!h){var m=(s[s.length-1]||(s[0]=new eo)).tokens,w=m.length;w===1&&m[0].isLineHolder?m[0]=y:(g||!w||n)&&m.push(y)}else s.push(new eo([y]))}}function Bu(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Hu=Pi(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function zu(r){return Bu(r)?!!Hu[r]:!0}function Ks(r,t,e,i,a){for(var n=[],o=[],s="",f="",h=0,u=0,v=0;v<r.length;v++){var l=r.charAt(v);if(l===` `){f&&(s+=f,u+=h),n.push(s),o.push(u),s="",f="",h=0,u=0;continue}var c=ct(l,t),p=i?!1:!zu(l);if(n.length?u+c>e:a+u+c>e){u?(s||f)&&(p?(s||(s=f,f="",h=0,u=h),n.push(s),o.push(u-h),f+=l,h+=c,s="",u=h):(f&&(s+=f,f="",h=0),n.push(s),o.push(u),s=l,u=c)):p?(n.push(f),o.push(h),f=l,h=c):(n.push(l),o.push(c));continue}u+=c,p?(f+=l,h+=c):(f&&(s+=f,f="",h=0),s+=l)}return!n.length&&!s&&(s=r,f="",h=0),f&&(s+=f),s&&(n.push(s),o.push(u)),n.length===1&&(u+=a),{accumWidth:u,lines:n,linesWidths:o}}var qa="__zr_style_"+Math.round(Math.random()*10),Mr={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Fi={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Mr[qa]=!0;var io=["z","z2","invisible"],Nu=["invisible"],Ae=function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=G(e),a=0;a<i.length;a++){var n=i[a];n==="style"?this.useStyle(e[n]):r.prototype.attrKV.call(this,n,e[n])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,i,a,n){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Yu(this,e,i)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(n&&this.parent)for(var f=this.parent;f;){if(f.ignore)return!1;f=f.parent}return!0},t.prototype.contain=function(e,i){return this.rectContain(e,i)},t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.rectContain=function(e,i){var a=this.transformCoordToLocal(e,i),n=this.getBoundingRect();return n.contain(a[0],a[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,a=this.getBoundingRect(),n=this.style,o=n.shadowBlur||0,s=n.shadowOffsetX||0,f=n.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new U(0,0,0,0)),i?U.applyTransform(e,a,i):e.copy(a),(o||s||f)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(f),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+f-o));var h=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-h),e.y=Math.floor(e.y-h),e.width=Math.ceil(e.width+1+h*2),e.height=Math.ceil(e.height+1+h*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new U(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,i){e!=="style"?r.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(e,i){return typeof e=="string"?this.style[e]=i:z(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=ii,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&ii)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return xi(Mr,e)},t.prototype.useStyle=function(e){e[qa]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[qa]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,io)},t.prototype._applyStateObj=function(e,i,a,n,o,s){r.prototype._applyStateObj.call(this,e,i,a,n,o,s);var f=!(i&&n),h;if(i&&i.style?o?n?h=i.style:(h=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(h,i.style)):(h=this._mergeStyle(this.createStyle(),n?this.style:a.style),this._mergeStyle(h,i.style)):f&&(h=a.style),h)if(o){var u=this.style;if(this
`:"";function i(a){var n=a.children,o=a.tag,s=a.attrs,f=a.text;return _l(o,s)+(o!=="style"?_h(f):f||"")+(n?""+e+Z(n,function(h){return i(h)}).join(e)+e:"")+yl(o)}return i(r)}function ml(r,t,e){e=e||{};var i=e.newline?` `:"",a=" {"+i,n=i+"}",o=Z(G(r),function(f){return f+a+Z(G(r[f]),function(h){return h+":"+r[f][h]+";"}).join(i)+n}).join(i),s=Z(G(t),function(f){return"@keyframes "+f+a+Z(G(t[f]),function(h){return h+a+Z(G(t[f][h]),function(u){var v=t[f][h][u];return u==="d"&&(v='path("'+v+'")'),u+":"+v+";"}).join(i)+n}).join(i)+n}).join(i);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(i)}function ja(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ko(r,t,e,i){return J("svg","root",{width:r,height:t,xmlns:yf,"xmlns:xlink":mf,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+t:!1},e)}var wl=0;function Tf(){return wl++}var Bo={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},_r="transform-origin";function Tl(r,t,e){var i=z({},r.shape);z(i,t),r.buildPath(e,i);var a=new _f;return a.reset(Ns(r)),e.rebuildPath(a,1),a.generateStr(),a.getStr()}function bl(r,t){var e=t.originX,i=t.originY;(e||i)&&(r[_r]=e+"px "+i+"px")}var Sl={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function bf(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function Cl(r,t,e){var i=r.shape.paths,a={},n,o;if(nt(i,function(f){var h=ja(e.zrId);h.animation=!0,Oi(f,{},h,!0);var u=h.cssAnims,v=h.cssNodes,l=G(u),c=l.length;if(c){o=l[c-1];var p=u[o];for(var _ in p){var d=p[_];a[_]=a[_]||{d:""},a[_].d+=d.d||""}for(var g in v){var y=v[g].animation;y.indexOf(o)>=0&&(n=y)}}}),!!n){t.d=!1;var s=bf(a,e);return n.replace(o,s)}}function Ho(r){return kt(r)?Bo[r]?"cubic-bezier("+Bo[r]+")":vn(r)?r:"":""}function Oi(r,t,e,i){var a=r.animators,n=a.length,o=[];if(r instanceof Gv){var s=Cl(r,t,e);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var f={},h=0;h<n;h++){var u=a[h],v=[u.getMaxTime()/1e3+"s"],l=Ho(u.getClip().easing),c=u.getDelay();l?v.push(l):v.push("linear"),c&&v.push(c/1e3+"s"),u.getLoop()&&v.push("infinite");var p=v.join(" ");f[p]=f[p]||[p,[]],f[p][1].push(u)}function _(y){var m=y[1],w=m.length,S={},b={},T={},C="animation-timing-function";function M(pt,Q,q){for(var I=pt.getTracks(),O=pt.getMaxTime(),zt=0;zt<I.length;zt++){var st=I[zt];if(st.needsAnimate()){var Cn=st.keyframes,De=st.propName;if(q&&(De=q(De)),De)for(var Bi=0;Bi<Cn.length;Bi++){var Ie=Cn[Bi],Ee=Math.round(Ie.time/O*100)+"%",Mn=Ho(Ie.easing),Pn=Ie.rawValue;(kt(Pn)||ce(Pn))&&(Q[Ee]=Q[Ee]||{},Q[Ee][De]=Ie.rawValue,Mn&&(Q[Ee][C]=Mn))}}}}for(var P=0;P<w;P++){var L=m[P],R=L.targetName;R?R==="shape"&&M(L,b):!i&&M(L,S)}for(var A in S){var x={};Ws(x,r),z(x,S[A]);var E=Ys(x),D=S[A][C];T[A]=E?{transform:E}:{},bl(T[A],x),D&&(T[A][C]=D)}var F,H=!0;for(var A in b){T[A]=T[A]||{};var j=!F,D=b[A][C];j&&(F=new jt);var V=F.len();F.reset(),T[A].d=Tl(r,b[A],F);var W=F.len();if(!j&&V!==W){H=!1;break}D&&(T[A][C]=D)}if(!H)for(var A in T)delete T[A].d;if(!i)for(var P=0;P<w;P++){var L=m[P],R=L.targetName;R==="style"&&M(L,T,function(I){return Sl[I]})}for(var Y=G(T),et=!0,tt,P=1;P<Y.length;P++){var dt=Y[P-1],Bt=Y[P];if(T[dt][_r]!==T[Bt][_r]){et=!1;break}tt=T[dt][_r]}if(et&&tt){for(var A in T)T[A][_r]&&delete T[A][_r];t[_r]=tt}if(Ma(Y,function(pt){return G(T[pt]).length>0}).length){var Ht=bf(T,e);return Ht+" "+y[0]+" both"}}for(var d in f){var s=_(f[d]);s&&o.push(s)}if(o.length){var g=e.zrId+"-cls-"+Tf();e.cssNodes["."+g]={animation:o.join(",")},t.class=g}}function Ml(r,t,e){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};zo(i,t,e)}else{var a=r.states.emphasis&&r.states.
|