mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-04-06 03:57:49 +08:00
17 lines
178 KiB
JavaScript
17 lines
178 KiB
JavaScript
import{_ as H}from"./tslib@2.3.0-BDyQ-Jie.js";var jo=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),ts=function(){function e(){this.browser=new jo,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 e}(),G=new ts;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(G.wxa=!0,G.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?G.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(G.node=!0,G.svgSupported=!0):rs(navigator.userAgent,G);function rs(e,t){var r=t.browser,i=e.match(/Firefox\/([\d.]+)/),n=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);i&&(r.firefox=!0,r.version=i[1]),n&&(r.ie=!0,r.version=n[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}var ln=12,es="sans-serif",hr=ln+"px "+es,is=20,ns=100,as="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function os(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var i=String.fromCharCode(r+32),n=(e.charCodeAt(r)-is)/ns;t[i]=n}return t}var ss=os(as),qe={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,i){if(!e){var n=qe.createCanvas();e=n&&n.getContext("2d")}if(e)return t!==i&&(t=e.font=i||hr),e.measureText(r);r=r||"",i=i||hr;var a=/(\d+)px/.exec(i),o=a&&+a[1]||ln,s=0;if(i.indexOf("mono")>=0)s=o*r.length;else for(var f=0;f<r.length;f++){var h=ss[r[f]];s+=h==null?o:h*o}return{width:s}}}(),loadImage:function(e,t,r){var i=new Image;return i.onload=t,i.onerror=r,i.src=e,i}},Na=Ue(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),Wa=Ue(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Ar=Object.prototype.toString,Ze=Array.prototype,fs=Ze.forEach,hs=Ze.filter,cn=Ze.slice,us=Ze.map,bn=(function(){}).constructor,se=bn?bn.prototype:null,dn="__proto__",vs=2311;function Ya(){return vs++}function pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function xr(e){if(e==null||typeof e!="object")return e;var t=e,r=Ar.call(e);if(r==="[object Array]"){if(!Vr(e)){t=[];for(var i=0,n=e.length;i<n;i++)t[i]=xr(e[i])}}else if(Wa[r]){if(!Vr(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}}}else if(!Na[r]&&!Vr(e)&&!zi(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==dn&&(t[o]=xr(e[o]))}return t}function Gr(e,t,r){if(!Ft(t)||!Ft(e))return r?xr(t):e;for(var i in t)if(t.hasOwnProperty(i)&&i!==dn){var n=e[i],a=t[i];Ft(a)&&Ft(n)&&!ee(a)&&!ee(n)&&!zi(a)&&!zi(n)&&!Mn(a)&&!Mn(n)&&!Vr(a)&&!Vr(n)?Gr(n,a,r):(r||!(i in e))&&(e[i]=xr(t[i]))}return e}function k(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==dn&&(e[r]=t[r]);return e}function gt(e,t,r){for(var i=ht(t),n=0;n<i.length;n++){var a=i[n];(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}return e}function Mt(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r}return-1}function qu(e,t){var r=e.prototype;function i(){}i.prototype=t.prototype,e.prototype=new i;for(var n in r)r.hasOwnProperty(n)&&(e.prototype[n]=r[n]);e.prototype.constructor=e,e.superClass=t}function Ga(e,t,r){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else gt(e,t,r)}function Pt(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function ft(e,t,r){if(e&&t)if(e.forEach&&e.forEach===fs)e.forEach(t,r);else if(e.length===+e.length)for(var i=0,n=e.length;i<n;i++)t.call(r,e[i],i,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(r,e[a],a,e)}function St(e,t,r){if(!e)return[];if(!t)return $a(e);if(e.map&&e.map===us)return e.map(t,r);for(var i=[],n=0,a=e.length;n<a;n++)i.push(t.call(r,e[n],n,e));return i}function Ue(e,t,r,i){if(e&&t){for(var n=0,a=e.length;n<a;n++)r=t.call(i,r,e[n],n,e);return r}}function Cn(e,t,r){if(!e)return[];if(!t)return $a(e);if(e.filter&&e.filter===hs)return e.filter(t,r);for(var i=[],n=0,a=e.length;n<a;n++)t.call(r,e[n],n,e)&&i.push(e[n]);return i}function ht(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}function ls(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return function(){return e.apply(t,r.concat(cn.call(arguments)))}}var Zu=se&&Ve(se.bind)?se.call.bind(se.bind):ls;function Uu(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(cn.call(arguments)))}}function ee(e){return Array.isArray?Array.isArray(e):Ar.call(e)==="[object Array]"}function Ve(e){return typeof e=="function"}function Be(e){return typeof e=="string"}function Vu(e){return Ar.call(e)==="[object String]"}function De(e){return typeof e=="number"}function Ft(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function Mn(e){return!!Na[Ar.call(e)]}function cs(e){return!!Wa[Ar.call(e)]}function zi(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function Qe(e){return e.colorStops!=null}function ds(e){return e.image!=null}function Qu(e){return Ar.call(e)==="[object RegExp]"}function ps(e){return e!==e}function Ku(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,i=e.length;r<i;r++)if(e[r]!=null)return e[r]}function st(e,t){return e??t}function xe(e,t,r){return e??t??r}function $a(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return cn.apply(e,t)}function _s(e){if(typeof e=="number")return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function Ju(e,t){if(!e)throw new Error(t)}function $r(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Xa="__ec_primitive__";function ju(e){e[Xa]=!0}function Vr(e){return e[Xa]}var gs=function(){function e(){this.data={}}return e.prototype.delete=function(t){var r=this.has(t);return r&&delete this.data[t],r},e.prototype.has=function(t){return this.data.hasOwnProperty(t)},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,r){return this.data[t]=r,this},e.prototype.keys=function(){return ht(this.data)},e.prototype.forEach=function(t){var r=this.data;for(var i in r)r.hasOwnProperty(i)&&t(r[i],i)},e}(),qa=typeof Map=="function";function ys(){return qa?new Map:new gs}var ms=function(){function e(t){var r=ee(t);this.data=ys();var i=this;t instanceof e?t.each(n):t&&ft(t,n);function n(a,o){r?i.set(a,o):i.set(o,a)}}return e.prototype.hasKey=function(t){return this.data.has(t)},e.prototype.get=function(t){return this.data.get(t)},e.prototype.set=function(t,r){return this.data.set(t,r),r},e.prototype.each=function(t,r){this.data.forEach(function(i,n){t.call(r,i,n)})},e.prototype.keys=function(){var t=this.data.keys();return qa?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e}();function tv(e){return new ms(e)}function rv(e,t){for(var r=new e.constructor(e.length+t.length),i=0;i<e.length;i++)r[i]=e[i];for(var n=e.length,i=0;i<t.length;i++)r[i+n]=t[i];return r}function Ke(e,t){var r;if(Object.create)r=Object.create(e);else{var i=function(){};i.prototype=e,r=new i}return t&&k(r,t),r}function Za(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function ev(e,t){return e.hasOwnProperty(t)}function Sr(){}var ws=180/Math.PI;function Er(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function Ts(e){return[e[0],e[1]]}function Ln(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function bs(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Cs(e){return Math.sqrt(Ms(e))}function Ms(e){return e[0]*e[0]+e[1]*e[1]}function ri(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function Ls(e,t){var r=Cs(t);return r===0?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function ki(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Ps=ki;function Ss(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Rr=Ss;function Rs(e,t,r,i){return e[0]=t[0]+i*(r[0]-t[0]),e[1]=t[1]+i*(r[1]-t[1]),e}function Qr(e,t,r){var i=t[0],n=t[1];return e[0]=r[0]*i+r[2]*n+r[4],e[1]=r[1]*i+r[3]*n+r[5],e}function Tr(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function br(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}var vr=function(){function e(t,r){this.target=t,this.topTarget=r&&r.topTarget}return e}(),Ds=function(){function e(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(t){for(var r=t.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new vr(r,t),"dragstart",t.event))},e.prototype._drag=function(t){var r=this._draggingTarget;if(r){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,r.drift(a,o,t),this.handler.dispatchToElement(new vr(r,t),"drag",t.event);var s=this.handler.findHover(i,n,r).target,f=this._dropTarget;this._dropTarget=s,r!==s&&(f&&s!==f&&this.handler.dispatchToElement(new vr(f,t),"dragleave",t.event),s&&s!==f&&this.handler.dispatchToElement(new vr(s,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new vr(r,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new vr(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e}(),Ir=function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,r,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(n=i,i=r,r=null),!i||!t)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===i)return this;var f={h:i,query:r,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},h=a[t].length-1,u=a[t][h];return u&&u.callAtLast?a[t].splice(h,0,f):a[t].push(f),this},e.prototype.isSilent=function(t){var r=this._$handlers;return!r||!r[t]||!r[t].length},e.prototype.off=function(t,r){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(r){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!==r&&n.push(i[t][a]);i[t]=n}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},e.prototype.trigger=function(t){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=r.length,s=n.length,f=0;f<s;f++){var h=n[f];if(!(a&&a.filter&&h.query!=null&&!a.filter(t,h.query)))switch(o){case 0:h.h.call(h.ctx);break;case 1:h.h.call(h.ctx,r[0]);break;case 2:h.h.call(h.ctx,r[0],r[1]);break;default:h.h.apply(h.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e.prototype.triggerWithContext=function(t){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=r.length,s=r[o-1],f=n.length,h=0;h<f;h++){var u=n[h];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(s);break;case 1:u.h.call(s,r[0]);break;case 2:u.h.call(s,r[0],r[1]);break;default:u.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e}(),xs=Math.log(2);function Ni(e,t,r,i,n,a){var o=i+"-"+n,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var f=Math.round(Math.log((1<<s)-1&~n)/xs);return e[r][f]}for(var h=i|1<<r,u=r+1;i&1<<u;)u++;for(var v=0,l=0,c=0;l<s;l++){var _=1<<l;_&n||(v+=(c%2?-1:1)*e[r][l]*Ni(e,t-1,u,h,n|_,a),c++)}return a[o]=v,v}function Pn(e,t){var r=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},n=Ni(r,8,0,0,0,i);if(n!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Ni(r,7,o===0?1:0,1<<o,1<<s,i)/n*t[o];return function(f,h,u){var v=h*a[6]+u*a[7]+1;f[0]=(h*a[0]+u*a[1]+a[2])/v,f[1]=(h*a[3]+u*a[4]+a[5])/v}}}var Sn="___zrEVENTSAVED",ei=[];function iv(e,t,r,i,n){return Wi(ei,t,i,n,!0)&&Wi(e,r,ei[0],ei[1])}function Wi(e,t,r,i,n){if(t.getBoundingClientRect&&G.domSupported&&!Ua(t)){var a=t[Sn]||(t[Sn]={}),o=As(t,a),s=Es(o,a,n);if(s)return s(e,r,i),!0}return!1}function As(e,t){var r=t.markers;if(r)return r;r=t.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,f=a%2,h=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[f]+":0",n[h]+":0",i[1-f]+":auto",n[1-h]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function Es(e,t,r){for(var i=r?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],f=!0,h=0;h<4;h++){var u=e[h].getBoundingClientRect(),v=2*h,l=u.left,c=u.top;o.push(l,c),f=f&&a&&l===a[v]&&c===a[v+1],s.push(e[h].offsetLeft,e[h].offsetTop)}return f&&n?n:(t.srcCoords=o,t[i]=r?Pn(s,o):Pn(o,s))}function Ua(e){return e.nodeName.toUpperCase()==="CANVAS"}var Is=/([&<>"'])/g,Fs={"&":"&","<":"<",">":">",'"':""","'":"'"};function nv(e){return e==null?"":(e+"").replace(Is,function(t,r){return Fs[r]})}var Os=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ii=[],Bs=G.browser.firefox&&+G.browser.version.split(".")[0]<39;function Yi(e,t,r,i){return r=r||{},i?Rn(e,t,r):Bs&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):Rn(e,t,r),r}function Rn(e,t,r){if(G.domSupported&&e.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(Ua(e)){var a=e.getBoundingClientRect();r.zrX=i-a.left,r.zrY=n-a.top;return}else if(Wi(ii,e,i,n)){r.zrX=ii[0],r.zrY=ii[1];return}}r.zrX=r.zrY=0}function _n(e){return e||window.event}function pt(e,t,r){if(t=_n(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Yi(e,o,t,r)}else{Yi(e,t,t,r);var a=Hs(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Os.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Hs(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,i=e.deltaY;if(r==null||i==null)return t;var n=Math.abs(i!==0?i:r),a=i>0?-1:i<0?1:r>0?-1:1;return 3*n*a}function zs(e,t,r,i){e.addEventListener(t,r,i)}function ks(e,t,r,i){e.removeEventListener(t,r,i)}var Ns=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Ws=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,i){return this._doTrack(t,r,i),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:r,event:t},o=0,s=n.length;o<s;o++){var f=n[o],h=Yi(i,f,{});a.points.push([h.zrX,h.zrY]),a.touches.push(f)}this._track.push(a)}},e.prototype._recognize=function(t){for(var r in ni)if(ni.hasOwnProperty(r)){var i=ni[r](this._track,t);if(i)return i}},e}();function Dn(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function Ys(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var ni={pinch:function(e,t){var r=e.length;if(r){var i=(e[r-1]||{}).points,n=(e[r-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=Dn(i)/Dn(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Ys(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Kr(){return[1,0,0,1,0,0]}function Gs(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function $s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function ai(e,t,r){var i=t[0]*r[0]+t[2]*r[1],n=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],f=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=i,e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=f,e}function xn(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function Xs(e,t,r,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],f=t[3],h=t[5],u=Math.sin(r),v=Math.cos(r);return e[0]=n*v+s*u,e[1]=-n*u+s*v,e[2]=a*v+f*u,e[3]=-a*u+v*f,e[4]=v*(o-i[0])+u*(h-i[1])+i[0],e[5]=v*(h-i[1])-u*(o-i[0])+i[1],e}function qs(e,t,r){var i=r[0],n=r[1];return e[0]=t[0]*i,e[1]=t[1]*n,e[2]=t[2]*i,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*n,e}function Zs(e,t){var r=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],f=r*o-a*i;return f?(f=1/f,e[0]=o*f,e[1]=-a*f,e[2]=-i*f,e[3]=r*f,e[4]=(i*s-o*n)*f,e[5]=(a*n-r*s)*f,e):null}var F=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,i=this.y-t.y;return Math.sqrt(r*r+i*i)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,i=this.y-t.y;return r*r+i*i},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,i=this.y;return this.x=t[0]*r+t[2]*i+t[4],this.y=t[1]*r+t[3]*i+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,i){t.x=r,t.y=i},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,i){t.x=r.x+i.x,t.y=r.y+i.y},e.sub=function(t,r,i){t.x=r.x-i.x,t.y=r.y-i.y},e.scale=function(t,r,i){t.x=r.x*i,t.y=r.y*i},e.scaleAndAdd=function(t,r,i,n){t.x=r.x+i.x*n,t.y=r.y+i.y*n},e.lerp=function(t,r,i,n){var a=1-n;t.x=a*r.x+n*i.x,t.y=a*r.y+n*i.y},e}(),fe=Math.min,he=Math.max,Gt=new F,$t=new F,Xt=new F,qt=new F,Or=new F,Br=new F,W=function(){function e(t,r,i,n){i<0&&(t=t+i,i=-i),n<0&&(r=r+n,n=-n),this.x=t,this.y=r,this.width=i,this.height=n}return e.prototype.union=function(t){var r=fe(t.x,this.x),i=fe(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=he(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=he(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=r,this.y=i},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,i=t.width/r.width,n=t.height/r.height,a=Kr();return xn(a,a,[-r.x,-r.y]),qs(a,a,[i,n]),xn(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,f=t.x,h=t.x+t.width,u=t.y,v=t.y+t.height,l=!(a<f||h<n||s<u||v<o);if(r){var c=1/0,_=0,g=Math.abs(a-f),d=Math.abs(h-n),p=Math.abs(s-u),y=Math.abs(v-o),m=Math.min(g,d),T=Math.min(p,y);a<f||h<n?m>_&&(_=m,g<d?F.set(Br,-g,0):F.set(Br,d,0)):m<c&&(c=m,g<d?F.set(Or,g,0):F.set(Or,-d,0)),s<u||v<o?T>_&&(_=T,p<y?F.set(Br,0,-p):F.set(Br,0,y)):m<c&&(c=m,p<y?F.set(Or,0,p):F.set(Or,0,-y))}return r&&F.copy(r,l?Or:Br),l},e.prototype.contain=function(t,r){var i=this;return t>=i.x&&t<=i.x+i.width&&r>=i.y&&r<=i.y+i.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,i){if(!i){t!==r&&e.copy(t,r);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=r.x*n+o,t.y=r.y*a+s,t.width=r.width*n,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Gt.x=Xt.x=r.x,Gt.y=qt.y=r.y,$t.x=qt.x=r.x+r.width,$t.y=Xt.y=r.y+r.height,Gt.transform(i),qt.transform(i),$t.transform(i),Xt.transform(i),t.x=fe(Gt.x,$t.x,Xt.x,qt.x),t.y=fe(Gt.y,$t.y,Xt.y,qt.y);var f=he(Gt.x,$t.x,Xt.x,qt.x),h=he(Gt.y,$t.y,Xt.y,qt.y);t.width=f-t.x,t.height=h-t.y},e}(),Va="silent";function Us(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Vs}}function Vs(){Ns(this.event)}var Qs=function(e){H(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ir),Hr=function(){function e(t,r){this.x=t,this.y=r}return e}(),Ks=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],oi=new W(0,0,0,0),Qa=function(e){H(t,e);function t(r,i,n,a,o){var s=e.call(this)||this;return s._hovered=new Hr(0,0),s.storage=r,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new Qs,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new Ds(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(ft(Ks,function(i){r.on&&r.on(i,this[i],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var i=r.zrX,n=r.zrY,a=Ka(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var f=this._hovered=a?new Hr(i,n):this.findHover(i,n),h=f.target,u=this.proxy;u.setCursor&&u.setCursor(h?h.cursor:"default"),s&&h!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(f,"mousemove",r),h&&h!==s&&this.dispatchToElement(f,"mouseover",r)},t.prototype.mouseout=function(r){var i=r.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new Hr(0,0)},t.prototype.dispatch=function(r,i){var n=this[r];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var i=this.proxy;i.setCursor&&i.setCursor(r)},t.prototype.dispatchToElement=function(r,i,n){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+i,s=Us(i,r,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(f){typeof f[o]=="function"&&f[o].call(f,s),f.trigger&&f.trigger(i,s)}))}},t.prototype.findHover=function(r,i,n){var a=this.storage.getDisplayList(),o=new Hr(r,i);if(An(a,o,r,i,n),this._pointerSize&&!o.target){for(var s=[],f=this._pointerSize,h=f/2,u=new W(r-h,i-h,f,f),v=a.length-1;v>=0;v--){var l=a[v];l!==n&&!l.ignore&&!l.ignoreCoarsePointer&&(!l.parent||!l.parent.ignoreCoarsePointer)&&(oi.copy(l.getBoundingRect()),l.transform&&oi.applyTransform(l.transform),oi.intersect(u)&&s.push(l))}if(s.length)for(var c=4,_=Math.PI/12,g=Math.PI*2,d=0;d<h;d+=c)for(var p=0;p<g;p+=_){var y=r+d*Math.cos(p),m=i+d*Math.sin(p);if(An(s,o,y,m,n),o.target)return o}}return o},t.prototype.processGesture=function(r,i){this._gestureMgr||(this._gestureMgr=new Ws);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var o=a.type;r.gestureEvent=o;var s=new Hr;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(Ir);ft(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Qa.prototype[e]=function(t){var r=t.zrX,i=t.zrY,n=Ka(this,r,i),a,o;if((e!=="mouseup"||!n)&&(a=this.findHover(r,i),o=a.target),e==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e==="mouseup")this._upEl=o;else if(e==="click"){if(this._downEl!==this._upEl||!this._downPoint||Ps(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Js(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var i=e,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,r))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?Va:!0}return!1}function An(e,t,r,i,n){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==n&&!o.ignore&&(s=Js(o,r,i))&&(!t.topTarget&&(t.topTarget=o),s!==Va)){t.target=o;break}}}function Ka(e,t,r){var i=e.painter;return t<0||t>i.getWidth()||r<0||r>i.getHeight()}const js=Qa;var Ja=32,zr=7;function tf(e){for(var t=0;e>=Ja;)t|=e&1,e>>=1;return e+t}function En(e,t,r,i){var n=t+1;if(n===r)return 1;if(i(e[n++],e[t])<0){for(;n<r&&i(e[n],e[n-1])<0;)n++;rf(e,t,n)}else for(;n<r&&i(e[n],e[n-1])>=0;)n++;return n-t}function rf(e,t,r){for(r--;t<r;){var i=e[t];e[t++]=e[r],e[r--]=i}}function In(e,t,r,i,n){for(i===t&&i++;i<r;i++){for(var a=e[i],o=t,s=i,f;o<s;)f=o+s>>>1,n(a,e[f])<0?s=f:o=f+1;var h=i-o;switch(h){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;h>0;)e[o+h]=e[o+h-1],h--}e[o]=a}}function si(e,t,r,i,n,a){var o=0,s=0,f=1;if(a(e,t[r+n])>0){for(s=i-n;f<s&&a(e,t[r+n+f])>0;)o=f,f=(f<<1)+1,f<=0&&(f=s);f>s&&(f=s),o+=n,f+=n}else{for(s=n+1;f<s&&a(e,t[r+n-f])<=0;)o=f,f=(f<<1)+1,f<=0&&(f=s);f>s&&(f=s);var h=o;o=n-f,f=n-h}for(o++;o<f;){var u=o+(f-o>>>1);a(e,t[r+u])>0?o=u+1:f=u}return f}function fi(e,t,r,i,n,a){var o=0,s=0,f=1;if(a(e,t[r+n])<0){for(s=n+1;f<s&&a(e,t[r+n-f])<0;)o=f,f=(f<<1)+1,f<=0&&(f=s);f>s&&(f=s);var h=o;o=n-f,f=n-h}else{for(s=i-n;f<s&&a(e,t[r+n+f])>=0;)o=f,f=(f<<1)+1,f<=0&&(f=s);f>s&&(f=s),o+=n,f+=n}for(o++;o<f;){var u=o+(f-o>>>1);a(e,t[r+u])<0?f=u:o=u+1}return f}function ef(e,t){var r=zr,i,n,a=0,o=[];i=[],n=[];function s(c,_){i[a]=c,n[a]=_,a+=1}function f(){for(;a>1;){var c=a-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]<n[c+1]&&c--;else if(n[c]>n[c+1])break;u(c)}}function h(){for(;a>1;){var c=a-2;c>0&&n[c-1]<n[c+1]&&c--,u(c)}}function u(c){var _=i[c],g=n[c],d=i[c+1],p=n[c+1];n[c]=g+p,c===a-3&&(i[c+1]=i[c+2],n[c+1]=n[c+2]),a--;var y=fi(e[d],e,_,g,0,t);_+=y,g-=y,g!==0&&(p=si(e[_+g-1],e,d,p,p-1,t),p!==0&&(g<=p?v(_,g,d,p):l(_,g,d,p)))}function v(c,_,g,d){var p=0;for(p=0;p<_;p++)o[p]=e[c+p];var y=0,m=g,T=c;if(e[T++]=e[m++],--d===0){for(p=0;p<_;p++)e[T+p]=o[y+p];return}if(_===1){for(p=0;p<d;p++)e[T+p]=e[m+p];e[T+d]=o[y];return}for(var b=r,w,M,C;;){w=0,M=0,C=!1;do if(t(e[m],o[y])<0){if(e[T++]=e[m++],M++,w=0,--d===0){C=!0;break}}else if(e[T++]=o[y++],w++,M=0,--_===1){C=!0;break}while((w|M)<b);if(C)break;do{if(w=fi(e[m],o,y,_,0,t),w!==0){for(p=0;p<w;p++)e[T+p]=o[y+p];if(T+=w,y+=w,_-=w,_<=1){C=!0;break}}if(e[T++]=e[m++],--d===0){C=!0;break}if(M=si(o[y],e,m,d,0,t),M!==0){for(p=0;p<M;p++)e[T+p]=e[m+p];if(T+=M,m+=M,d-=M,d===0){C=!0;break}}if(e[T++]=o[y++],--_===1){C=!0;break}b--}while(w>=zr||M>=zr);if(C)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),_===1){for(p=0;p<d;p++)e[T+p]=e[m+p];e[T+d]=o[y]}else{if(_===0)throw new Error;for(p=0;p<_;p++)e[T+p]=o[y+p]}}function l(c,_,g,d){var p=0;for(p=0;p<d;p++)o[p]=e[g+p];var y=c+_-1,m=d-1,T=g+d-1,b=0,w=0;if(e[T--]=e[y--],--_===0){for(b=T-(d-1),p=0;p<d;p++)e[b+p]=o[p];return}if(d===1){for(T-=_,y-=_,w=T+1,b=y+1,p=_-1;p>=0;p--)e[w+p]=e[b+p];e[T]=o[m];return}for(var M=r;;){var C=0,L=0,P=!1;do if(t(o[m],e[y])<0){if(e[T--]=e[y--],C++,L=0,--_===0){P=!0;break}}else if(e[T--]=o[m--],L++,C=0,--d===1){P=!0;break}while((C|L)<M);if(P)break;do{if(C=_-fi(o[m],e,c,_,_-1,t),C!==0){for(T-=C,y-=C,_-=C,w=T+1,b=y+1,p=C-1;p>=0;p--)e[w+p]=e[b+p];if(_===0){P=!0;break}}if(e[T--]=o[m--],--d===1){P=!0;break}if(L=d-si(e[y],o,0,d,d-1,t),L!==0){for(T-=L,m-=L,d-=L,w=T+1,b=m+1,p=0;p<L;p++)e[w+p]=o[b+p];if(d<=1){P=!0;break}}if(e[T--]=e[y--],--_===0){P=!0;break}M--}while(C>=zr||L>=zr);if(P)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),d===1){for(T-=_,y-=_,w=T+1,b=y+1,p=_-1;p>=0;p--)e[w+p]=e[b+p];e[T]=o[m]}else{if(d===0)throw new Error;for(b=T-(d-1),p=0;p<d;p++)e[b+p]=o[p]}}return{mergeRuns:f,forceMergeRuns:h,pushRun:s}}function nf(e,t,r,i){r||(r=0),i||(i=e.length);var n=i-r;if(!(n<2)){var a=0;if(n<Ja){a=En(e,r,i,t),In(e,r,i,r+a,t);return}var o=ef(e,t),s=tf(n);do{if(a=En(e,r,i,t),a<s){var f=n;f>s&&(f=s),In(e,r,r+f,r+a,t),a=f}o.pushRun(r,a),o.mergeRuns(),n-=a,r+=a}while(n!==0);o.forceMergeRuns()}}var ot=1,Xr=2,mr=4,Fn=!1;function hi(){Fn||(Fn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function On(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var af=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=On}return e.prototype.traverse=function(t,r){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,r)},e.prototype.getDisplayList=function(t,r){r=r||!1;var i=this._displayList;return(t||!i.length)&&this.updateDisplayList(r),i},e.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var r=this._roots,i=this._displayList,n=0,a=r.length;n<a;n++)this._updateAndAddDisplayable(r[n],null,t);i.length=this._displayListLen,nf(i,On)},e.prototype._updateAndAddDisplayable=function(t,r,i){if(!(t.ignore&&!i)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath();if(t.ignoreClip)r=null;else if(n){r?r=r.slice():r=[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),r.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),f=0;f<s.length;f++){var h=s[f];t.__dirty&&(h.__dirty|=ot),this._updateAndAddDisplayable(h,r,i)}t.__dirty=0}else{var u=t;r&&r.length?u.__clipPaths=r:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(hi(),u.z=0),isNaN(u.z2)&&(hi(),u.z2=0),isNaN(u.zlevel)&&(hi(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var v=t.getDecalElement&&t.getDecalElement();v&&this._updateAndAddDisplayable(v,r,i);var l=t.getTextGuideLine();l&&this._updateAndAddDisplayable(l,r,i);var c=t.getTextContent();c&&this._updateAndAddDisplayable(c,r,i)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,i=t.length;r<i;r++)this.delRoot(t[r]);return}var n=Mt(this._roots,t);n>=0&&this._roots.splice(n,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),ja;ja=G.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};const Gi=ja;var Jr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,i=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=i/4):t=i*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)))},elasticOut:function(e){var t,r=.1,i=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=i/4):t=i*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/i)+1)},elasticInOut:function(e){var t,r=.1,i=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=i/4):t=i*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Jr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Jr.bounceIn(e*2)*.5:Jr.bounceOut(e*2-1)*.5+.5}},ue=Math.pow,Bt=Math.sqrt,He=1e-8,to=1e-4,Bn=Bt(3),ve=1/3,Lt=Er(),ct=Er(),Dr=Er();function Ot(e){return e>-He&&e<He}function ro(e){return e>He||e<-He}function V(e,t,r,i,n){var a=1-n;return a*a*(a*e+3*n*t)+n*n*(n*i+3*a*r)}function Hn(e,t,r,i,n){var a=1-n;return 3*(((t-e)*a+2*(r-t)*n)*a+(i-r)*n*n)}function eo(e,t,r,i,n,a){var o=i+3*(t-r)-e,s=3*(r-t*2+e),f=3*(t-e),h=e-n,u=s*s-3*o*f,v=s*f-9*o*h,l=f*f-3*s*h,c=0;if(Ot(u)&&Ot(v))if(Ot(s))a[0]=0;else{var _=-f/s;_>=0&&_<=1&&(a[c++]=_)}else{var g=v*v-4*u*l;if(Ot(g)){var d=v/u,_=-s/o+d,p=-d/2;_>=0&&_<=1&&(a[c++]=_),p>=0&&p<=1&&(a[c++]=p)}else if(g>0){var y=Bt(g),m=u*s+1.5*o*(-v+y),T=u*s+1.5*o*(-v-y);m<0?m=-ue(-m,ve):m=ue(m,ve),T<0?T=-ue(-T,ve):T=ue(T,ve);var _=(-s-(m+T))/(3*o);_>=0&&_<=1&&(a[c++]=_)}else{var b=(2*u*s-3*o*v)/(2*Bt(u*u*u)),w=Math.acos(b)/3,M=Bt(u),C=Math.cos(w),_=(-s-2*M*C)/(3*o),p=(-s+M*(C+Bn*Math.sin(w)))/(3*o),L=(-s+M*(C-Bn*Math.sin(w)))/(3*o);_>=0&&_<=1&&(a[c++]=_),p>=0&&p<=1&&(a[c++]=p),L>=0&&L<=1&&(a[c++]=L)}}return c}function io(e,t,r,i,n){var a=6*r-12*t+6*e,o=9*t+3*i-3*e-9*r,s=3*t-3*e,f=0;if(Ot(o)){if(ro(a)){var h=-s/a;h>=0&&h<=1&&(n[f++]=h)}}else{var u=a*a-4*o*s;if(Ot(u))n[0]=-a/(2*o);else if(u>0){var v=Bt(u),h=(-a+v)/(2*o),l=(-a-v)/(2*o);h>=0&&h<=1&&(n[f++]=h),l>=0&&l<=1&&(n[f++]=l)}}return f}function kt(e,t,r,i,n,a){var o=(t-e)*n+e,s=(r-t)*n+t,f=(i-r)*n+r,h=(s-o)*n+o,u=(f-s)*n+s,v=(u-h)*n+h;a[0]=e,a[1]=o,a[2]=h,a[3]=v,a[4]=v,a[5]=u,a[6]=f,a[7]=i}function of(e,t,r,i,n,a,o,s,f,h,u){var v,l=.005,c=1/0,_,g,d,p;Lt[0]=f,Lt[1]=h;for(var y=0;y<1;y+=.05)ct[0]=V(e,r,n,o,y),ct[1]=V(t,i,a,s,y),d=Rr(Lt,ct),d<c&&(v=y,c=d);c=1/0;for(var m=0;m<32&&!(l<to);m++)_=v-l,g=v+l,ct[0]=V(e,r,n,o,_),ct[1]=V(t,i,a,s,_),d=Rr(ct,Lt),_>=0&&d<c?(v=_,c=d):(Dr[0]=V(e,r,n,o,g),Dr[1]=V(t,i,a,s,g),p=Rr(Dr,Lt),g<=1&&p<c?(v=g,c=p):l*=.5);return u&&(u[0]=V(e,r,n,o,v),u[1]=V(t,i,a,s,v)),Bt(c)}function sf(e,t,r,i,n,a,o,s,f){for(var h=e,u=t,v=0,l=1/f,c=1;c<=f;c++){var _=c*l,g=V(e,r,n,o,_),d=V(t,i,a,s,_),p=g-h,y=d-u;v+=Math.sqrt(p*p+y*y),h=g,u=d}return v}function K(e,t,r,i){var n=1-i;return n*(n*e+2*i*t)+i*i*r}function zn(e,t,r,i){return 2*((1-i)*(t-e)+i*(r-t))}function ff(e,t,r,i,n){var a=e-2*t+r,o=2*(t-e),s=e-i,f=0;if(Ot(a)){if(ro(o)){var h=-s/o;h>=0&&h<=1&&(n[f++]=h)}}else{var u=o*o-4*a*s;if(Ot(u)){var h=-o/(2*a);h>=0&&h<=1&&(n[f++]=h)}else if(u>0){var v=Bt(u),h=(-o+v)/(2*a),l=(-o-v)/(2*a);h>=0&&h<=1&&(n[f++]=h),l>=0&&l<=1&&(n[f++]=l)}}return f}function no(e,t,r){var i=e+r-2*t;return i===0?.5:(e-t)/i}function ze(e,t,r,i,n){var a=(t-e)*i+e,o=(r-t)*i+t,s=(o-a)*i+a;n[0]=e,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=r}function hf(e,t,r,i,n,a,o,s,f){var h,u=.005,v=1/0;Lt[0]=o,Lt[1]=s;for(var l=0;l<1;l+=.05){ct[0]=K(e,r,n,l),ct[1]=K(t,i,a,l);var c=Rr(Lt,ct);c<v&&(h=l,v=c)}v=1/0;for(var _=0;_<32&&!(u<to);_++){var g=h-u,d=h+u;ct[0]=K(e,r,n,g),ct[1]=K(t,i,a,g);var c=Rr(ct,Lt);if(g>=0&&c<v)h=g,v=c;else{Dr[0]=K(e,r,n,d),Dr[1]=K(t,i,a,d);var p=Rr(Dr,Lt);d<=1&&p<v?(h=d,v=p):u*=.5}}return f&&(f[0]=K(e,r,n,h),f[1]=K(t,i,a,h)),Bt(v)}function uf(e,t,r,i,n,a,o){for(var s=e,f=t,h=0,u=1/o,v=1;v<=o;v++){var l=v*u,c=K(e,r,n,l),_=K(t,i,a,l),g=c-s,d=_-f;h+=Math.sqrt(g*g+d*d),s=c,f=_}return h}var vf=/cubic-bezier\(([0-9,\.e ]+)\)/;function ao(e){var t=e&&vf.exec(e);if(t){var r=t[1].split(","),i=+$r(r[0]),n=+$r(r[1]),a=+$r(r[2]),o=+$r(r[3]);if(isNaN(i+n+a+o))return;var s=[];return function(f){return f<=0?0:f>=1?1:eo(0,i,a,1,f,s)&&V(0,n,o,1,s[0])}}}var lf=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Sr,this.ondestroy=t.ondestroy||Sr,this.onrestart=t.onrestart||Sr,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var f=n%i;this._startTime=t-f,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Ve(t)?t:Jr[t]||ao(t)},e}();const cf=lf;var oo=function(){function e(t){this.value=t}return e}(),df=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new oo(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,i=t.next;r?r.next=i:this.head=i,i?i.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Je=function(){function e(t){this._list=new df,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var f=i.head;i.remove(f),delete n[f.key],a=f.value,this._lastRemovedEntry=f}s?s.value=r:s=new oo(r),s.key=t,i.insertEntry(s),n[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],i=this._list;if(r!=null)return r!==i.tail&&(i.remove(r),i.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),kn={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ht(e){return e=Math.round(e),e<0?0:e>255?255:e}function $i(e){return e<0?0:e>1?1:e}function ui(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Ht(parseFloat(t)/100*255):Ht(parseInt(t,10))}function jr(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?$i(parseFloat(t)/100):$i(parseFloat(t))}function vi(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){return e+(t-e)*r}function vt(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}function Xi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var so=new Je(20),ce=null;function lr(e,t){ce&&Xi(ce,t),ce=so.put(e,ce||t.slice())}function zt(e,t){if(e){t=t||[];var r=so.get(e);if(r)return Xi(t,r);e=e+"";var i=e.replace(/ /g,"").toLowerCase();if(i in kn)return Xi(t,kn[i]),lr(e,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){vt(t,0,0,0,1);return}return vt(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),lr(e,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){vt(t,0,0,0,1);return}return vt(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),lr(e,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var f=i.substr(0,o),h=i.substr(o+1,s-(o+1)).split(","),u=1;switch(f){case"rgba":if(h.length!==4)return h.length===3?vt(t,+h[0],+h[1],+h[2],1):vt(t,0,0,0,1);u=jr(h.pop());case"rgb":if(h.length>=3)return vt(t,ui(h[0]),ui(h[1]),ui(h[2]),h.length===3?u:jr(h[3])),lr(e,t),t;vt(t,0,0,0,1);return;case"hsla":if(h.length!==4){vt(t,0,0,0,1);return}return h[3]=jr(h[3]),Nn(h,t),lr(e,t),t;case"hsl":if(h.length!==3){vt(t,0,0,0,1);return}return Nn(h,t),lr(e,t),t;default:return}}vt(t,0,0,0,1)}}function Nn(e,t){var r=(parseFloat(e[0])%360+360)%360/360,i=jr(e[1]),n=jr(e[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],vt(t,Ht(vi(o,a,r+1/3)*255),Ht(vi(o,a,r)*255),Ht(vi(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Wn(e,t){var r=zt(e);if(r){for(var i=0;i<3;i++)t<0?r[i]=r[i]*(1-t)|0:r[i]=(255-r[i])*t+r[i]|0,r[i]>255?r[i]=255:r[i]<0&&(r[i]=0);return gn(r,r.length===4?"rgba":"rgb")}}function av(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var i=e*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=zt(t[n]),s=zt(t[a]),f=i-n,h=gn([Ht(le(o[0],s[0],f)),Ht(le(o[1],s[1],f)),Ht(le(o[2],s[2],f)),$i(le(o[3],s[3],f))],"rgba");return r?{color:h,leftIndex:n,rightIndex:a,value:i}:h}}function gn(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function ke(e,t){var r=zt(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var Yn=new Je(100);function ov(e){if(Be(e)){var t=Yn.get(e);return t||(t=Wn(e,-.1),Yn.put(e,t)),t}else if(Qe(e)){var r=k({},e);return r.colorStops=St(e.colorStops,function(i){return{offset:i.offset,color:Wn(i.color,-.1)}}),r}return e}function pf(e){return e.type==="linear"}function _f(e){return e.type==="radial"}(function(){return G.hasGlobalWindow&&Ve(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var qi=Array.prototype.slice;function xt(e,t,r){return(t-e)*r+e}function li(e,t,r,i){for(var n=t.length,a=0;a<n;a++)e[a]=xt(t[a],r[a],i);return e}function gf(e,t,r,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=xt(t[o][s],r[o][s],i)}return e}function de(e,t,r,i){for(var n=t.length,a=0;a<n;a++)e[a]=t[a]+r[a]*i;return e}function Gn(e,t,r,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+r[o][s]*i}return e}function yf(e,t){for(var r=e.length,i=t.length,n=r>i?t:e,a=Math.min(r,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,i);s++)n.push({offset:o.offset,color:o.color.slice()})}function mf(e,t,r){var i=e,n=t;if(!(!i.push||!n.push)){var a=i.length,o=n.length;if(a!==o){var s=a>o;if(s)i.length=o;else for(var f=a;f<o;f++)i.push(r===1?n[f]:qi.call(n[f]))}for(var h=i[0]&&i[0].length,f=0;f<i.length;f++)if(r===1)isNaN(i[f])&&(i[f]=n[f]);else for(var u=0;u<h;u++)isNaN(i[f][u])&&(i[f][u]=n[f][u])}}function Ae(e){if(Pt(e)){var t=e.length;if(Pt(e[0])){for(var r=[],i=0;i<t;i++)r.push(qi.call(e[i]));return r}return qi.call(e)}return e}function Ee(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],"rgba("+e.join(",")+")"}function wf(e){return Pt(e&&e[0])?2:1}var pe=0,Ie=1,fo=2,qr=3,Zi=4,Ui=5,$n=6;function Xn(e){return e===Zi||e===Ui}function _e(e){return e===Ie||e===fo}var kr=[0,0,0,0],Tf=function(){function e(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=$n,f=r;if(Pt(r)){var h=wf(r);s=h,(h===1&&!De(r[0])||h===2&&!De(r[0][0]))&&(o=!0)}else if(De(r)&&!ps(r))s=pe;else if(Be(r))if(!isNaN(+r))s=pe;else{var u=zt(r);u&&(f=u,s=qr)}else if(Qe(r)){var v=k({},f);v.colorStops=St(r.colorStops,function(c){return{offset:c.offset,color:zt(c.color)}}),pf(r)?s=Zi:_f(r)&&(s=Ui),f=v}a===0?this.valType=s:(s!==this.valType||s===$n)&&(o=!0),this.discrete=this.discrete||o;var l={time:t,value:f,rawValue:r,percent:0};return i&&(l.easing=i,l.easingFunc=Ve(i)?i:Jr[i]||ao(i)),n.push(l),l},e.prototype.prepare=function(t,r){var i=this.keyframes;this._needsSort&&i.sort(function(g,d){return g.time-d.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,f=_e(n),h=Xn(n),u=0;u<a;u++){var v=i[u],l=v.value,c=o.value;v.percent=v.time/t,s||(f&&u!==a-1?mf(l,c,n):h&&yf(l.colorStops,c.colorStops))}if(!s&&n!==Ui&&r&&this.needsAnimate()&&r.needsAnimate()&&n===r.valType&&!r._finished){this._additiveTrack=r;for(var _=i[0].value,u=0;u<a;u++)n===pe?i[u].additiveValue=i[u].value-_:n===qr?i[u].additiveValue=de([],i[u].value,_,-1):_e(n)&&(i[u].additiveValue=n===Ie?de([],i[u].value,_,-1):Gn([],i[u].value,_,-1))}},e.prototype.step=function(t,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,f=this.propName,h=a===qr,u,v=this._lastFr,l=Math.min,c,_;if(s===1)c=_=o[0];else{if(r<0)u=0;else if(r<this._lastFrP){var g=l(v+1,s-1);for(u=g;u>=0&&!(o[u].percent<=r);u--);u=l(u,s-2)}else{for(u=v;u<s&&!(o[u].percent>r);u++);u=l(u-1,s-2)}_=o[u+1],c=o[u]}if(c&&_){this._lastFr=u,this._lastFrP=r;var d=_.percent-c.percent,p=d===0?1:l((r-c.percent)/d,1);_.easingFunc&&(p=_.easingFunc(p));var y=i?this._additiveValue:h?kr:t[f];if((_e(a)||h)&&!y&&(y=this._additiveValue=[]),this.discrete)t[f]=p<1?c.rawValue:_.rawValue;else if(_e(a))a===Ie?li(y,c[n],_[n],p):gf(y,c[n],_[n],p);else if(Xn(a)){var m=c[n],T=_[n],b=a===Zi;t[f]={type:b?"linear":"radial",x:xt(m.x,T.x,p),y:xt(m.y,T.y,p),colorStops:St(m.colorStops,function(M,C){var L=T.colorStops[C];return{offset:xt(M.offset,L.offset,p),color:Ee(li([],M.color,L.color,p))}}),global:T.global},b?(t[f].x2=xt(m.x2,T.x2,p),t[f].y2=xt(m.y2,T.y2,p)):t[f].r=xt(m.r,T.r,p)}else if(h)li(y,c[n],_[n],p),i||(t[f]=Ee(y));else{var w=xt(c[n],_[n],p);i?this._additiveValue=w:t[f]=w}i&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,i=this.propName,n=this._additiveValue;r===pe?t[i]=t[i]+n:r===qr?(zt(t[i],kr),de(kr,kr,n,1),t[i]=Ee(kr)):r===Ie?de(t[i],t[i],n,1):r===fo&&Gn(t[i],t[i],n,1)},e}(),yn=function(){function e(t,r,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&n){pn("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,i){return this.whenWithKeys(t,r,ht(r),i)},e.prototype.whenWithKeys=function(t,r,i,n){for(var a=this._tracks,o=0;o<i.length;o++){var s=i[o],f=a[s];if(!f){f=a[s]=new Tf(s);var h=void 0,u=this._getAdditiveTrack(s);if(u){var v=u.keyframes,l=v[v.length-1];h=l&&l.value,u.valType===qr&&h&&(h=Ee(h))}else h=this._target[s];if(h==null)continue;t>0&&f.addKeyframe(0,Ae(h),n),this._trackKeys.push(s)}f.addKeyframe(t,Ae(r[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,i=0;i<r;i++)t[i].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,r=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,r)for(var i=0;i<r.length;i++)r[i].call(this)},e.prototype._setTracksFinished=function(){for(var t=this._tracks,r=this._trackKeys,i=0;i<r.length;i++)t[r[i]].setFinished()},e.prototype._getAdditiveTrack=function(t){var r,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(t);a&&(r=a)}return r},e.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var r=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],f=this._getAdditiveTrack(o),h=s.keyframes,u=h.length;if(s.prepare(n,f),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var v=h[u-1];v&&(r._target[s.propName]=v.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var l=new cf({life:n,loop:this._loop,delay:this._delay||0,onframe:function(c){r._started=2;var _=r._additiveAnimators;if(_){for(var g=!1,d=0;d<_.length;d++)if(_[d]._clip){g=!0;break}g||(r._additiveAnimators=null)}for(var d=0;d<i.length;d++)i[d].step(r._target,c);var p=r._onframeCbs;if(p)for(var d=0;d<p.length;d++)p[d](r._target,c)},ondestroy:function(){r._doneCallback()}});this._clip=l,this.animation&&this.animation.addClip(l),t&&l.setEasing(t)}else this._doneCallback();return this}},e.prototype.stop=function(t){if(this._clip){var r=this._clip;t&&r.onframe(1),this._abortedCallback()}},e.prototype.delay=function(t){return this._delay=t,this},e.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},e.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},e.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(t){return this._tracks[t]},e.prototype.getTracks=function(){var t=this;return St(this._trackKeys,function(r){return t._tracks[r]})},e.prototype.stopTracks=function(t,r){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<t.length;a++){var o=i[t[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},e.prototype.saveTo=function(t,r,i){if(t){r=r||this._trackKeys;for(var n=0;n<r.length;n++){var a=r[n],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,f=s[i?0:s.length-1];f&&(t[a]=Ae(f.rawValue))}}}},e.prototype.__changeFinalValue=function(t,r){r=r||ht(t);for(var i=0;i<r.length;i++){var n=r[i],a=this._tracks[n];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}();function Cr(){return new Date().getTime()}var bf=function(e){H(t,e);function t(r){var i=e.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,r=r||{},i.stage=r.stage||{},i}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var i=r.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(r){if(r.animation){var i=r.prev,n=r.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var i=r.getClip();i&&this.removeClip(i),r.animation=null},t.prototype.update=function(r){for(var i=Cr()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,r||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function i(){r._running&&(Gi(i),!r._paused&&r.update())}Gi(i)},t.prototype.start=function(){this._running||(this._time=Cr(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Cr(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Cr()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var i=r.next;r.prev=r.next=r.animation=null,r=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,i){i=i||{},this.start();var n=new yn(r,i.loop);return this.addAnimator(n),n},t}(Ir),Cf=300,ci=G.domSupported,di=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=St(e,function(n){var a=n.replace("mouse","pointer");return r.hasOwnProperty(a)?a:n});return{mouse:e,touch:t,pointer:i}}(),qn={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Zn=!1;function Vi(e){var t=e.pointerType;return t==="pen"||t==="touch"}function Mf(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function pi(e){e&&(e.zrByTouch=!0)}function Lf(e,t){return pt(e.dom,new Pf(e,t),!0)}function ho(e,t){for(var r=t,i=!1;r&&r.nodeType!==9&&!(i=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return i}var Pf=function(){function e(t,r){this.stopPropagation=Sr,this.stopImmediatePropagation=Sr,this.preventDefault=Sr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),_t={mousedown:function(e){e=pt(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=pt(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=pt(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=pt(this.dom,e);var t=e.toElement||e.relatedTarget;ho(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Zn=!0,e=pt(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Zn||(e=pt(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=pt(this.dom,e),pi(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),_t.mousemove.call(this,e),_t.mousedown.call(this,e)},touchmove:function(e){e=pt(this.dom,e),pi(e),this.handler.processGesture(e,"change"),_t.mousemove.call(this,e)},touchend:function(e){e=pt(this.dom,e),pi(e),this.handler.processGesture(e,"end"),_t.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<Cf&&_t.click.call(this,e)},pointerdown:function(e){_t.mousedown.call(this,e)},pointermove:function(e){Vi(e)||_t.mousemove.call(this,e)},pointerup:function(e){_t.mouseup.call(this,e)},pointerout:function(e){Vi(e)||_t.mouseout.call(this,e)}};ft(["click","dblclick","contextmenu"],function(e){_t[e]=function(t){t=pt(this.dom,t),this.trigger(e,t)}});var Qi={pointermove:function(e){Vi(e)||Qi.mousemove.call(this,e)},pointerup:function(e){Qi.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Sf(e,t){var r=t.domHandlers;G.pointerEventsSupported?ft(di.pointer,function(i){Fe(t,i,function(n){r[i].call(e,n)})}):(G.touchEventsSupported&&ft(di.touch,function(i){Fe(t,i,function(n){r[i].call(e,n),Mf(t)})}),ft(di.mouse,function(i){Fe(t,i,function(n){n=_n(n),t.touching||r[i].call(e,n)})}))}function Rf(e,t){G.pointerEventsSupported?ft(qn.pointer,r):G.touchEventsSupported||ft(qn.mouse,r);function r(i){function n(a){a=_n(a),ho(e,a.target)||(a=Lf(e,a),t.domHandlers[i].call(e,a))}Fe(t,i,n,{capture:!0})}}function Fe(e,t,r,i){e.mounted[t]=r,e.listenerOpts[t]=i,zs(e.domTarget,t,r,i)}function _i(e){var t=e.mounted;for(var r in t)t.hasOwnProperty(r)&&ks(e.domTarget,r,t[r],e.listenerOpts[r]);e.mounted={}}var Un=function(){function e(t,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=r}return e}(),Df=function(e){H(t,e);function t(r,i){var n=e.call(this)||this;return n.__pointerCapturing=!1,n.dom=r,n.painterRoot=i,n._localHandlerScope=new Un(r,_t),ci&&(n._globalHandlerScope=new Un(document,Qi)),Sf(n,n._localHandlerScope),n}return t.prototype.dispose=function(){_i(this._localHandlerScope),ci&&_i(this._globalHandlerScope)},t.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},t.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,ci&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var i=this._globalHandlerScope;r?Rf(this,i):_i(i)}},t}(Ir);const xf=Df;var uo=1;G.hasGlobalWindow&&(uo=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ne=uo,Ki=.4,Ji="#333",ji="#ccc",Af="#eee",Vn=Gs,Qn=5e-5;function Zt(e){return e>Qn||e<-Qn}var Ut=[],cr=[],gi=Kr(),yi=Math.abs,mn=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Zt(this.rotation)||Zt(this.x)||Zt(this.y)||Zt(this.scaleX-1)||Zt(this.scaleY-1)||Zt(this.skewX)||Zt(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),i=this.transform;if(!(r||t)){i&&(Vn(i),this.invTransform=null);return}i=i||Kr(),r?this.getLocalTransform(i):Vn(i),t&&(r?ai(i,t,i):$s(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Ut);var i=Ut[0]<0?-1:1,n=Ut[1]<0?-1:1,a=((Ut[0]-i)*r+i)/Ut[0]||0,o=((Ut[1]-n)*r+n)/Ut[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Kr(),Zs(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=i,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Kr(),ai(cr,t.invTransform,r),r=cr);var i=this.originX,n=this.originY;(i||n)&&(gi[4]=i,gi[5]=n,ai(cr,r,gi),cr[4]-=i,cr[5]-=n,r=cr),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var i=[t,r],n=this.invTransform;return n&&Qr(i,i,n),i},e.prototype.transformCoordToGlobal=function(t,r){var i=[t,r],n=this.transform;return n&&Qr(i,i,n),i},e.prototype.getLineScale=function(){var t=this.transform;return t&&yi(t[0]-1)>1e-10&&yi(t[3]-1)>1e-10?Math.sqrt(yi(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){Ef(this,t)},e.getLocalTransform=function(t,r){r=r||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,f=t.anchorY,h=t.rotation||0,u=t.x,v=t.y,l=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||f){var _=i+s,g=n+f;r[4]=-_*a-l*g*o,r[5]=-g*o-c*_*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=c*a,r[2]=l*o,h&&Xs(r,r,h),r[4]+=i+u,r[5]+=n+v,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),ie=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Ef(e,t){for(var r=0;r<ie.length;r++){var i=ie[r];e[i]=t[i]}}var Kn={};function ut(e,t){t=t||hr;var r=Kn[t];r||(r=Kn[t]=new Je(500));var i=r.get(e);return i==null&&(i=qe.measureText(e,t).width,r.put(e,i)),i}function Jn(e,t,r,i){var n=ut(e,t),a=wn(t),o=Zr(0,n,r),s=wr(0,a,i),f=new W(o,s,n,a);return f}function If(e,t,r,i){var n=((e||"")+"").split(`
|
|
`),a=n.length;if(a===1)return Jn(n[0],t,r,i);for(var o=new W(0,0,0,0),s=0;s<n.length;s++){var f=Jn(n[s],t,r,i);s===0?o.copy(f):o.union(f)}return o}function Zr(e,t,r){return r==="right"?e-=t:r==="center"&&(e-=t/2),e}function wr(e,t,r){return r==="middle"?e-=t/2:r==="bottom"&&(e-=t),e}function wn(e){return ut("国",e)}function ne(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Ff(e,t,r){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,f=r.x,h=r.y,u="left",v="top";if(i instanceof Array)f+=ne(i[0],r.width),h+=ne(i[1],r.height),u=null,v=null;else switch(i){case"left":f-=n,h+=s,u="right",v="middle";break;case"right":f+=n+o,h+=s,v="middle";break;case"top":f+=o/2,h-=n,u="center",v="bottom";break;case"bottom":f+=o/2,h+=a+n,u="center";break;case"inside":f+=o/2,h+=s,u="center",v="middle";break;case"insideLeft":f+=n,h+=s,v="middle";break;case"insideRight":f+=o-n,h+=s,u="right",v="middle";break;case"insideTop":f+=o/2,h+=n,u="center";break;case"insideBottom":f+=o/2,h+=a-n,u="center",v="bottom";break;case"insideTopLeft":f+=n,h+=n;break;case"insideTopRight":f+=o-n,h+=n,u="right";break;case"insideBottomLeft":f+=n,h+=a-n,v="bottom";break;case"insideBottomRight":f+=o-n,h+=a-n,u="right",v="bottom";break}return e=e||{},e.x=f,e.y=h,e.align=u,e.verticalAlign=v,e}var mi="__zr_normal__",wi=ie.concat(["ignore"]),Of=Ue(ie,function(e,t){return e[t]=!0,e},{ignore:!1}),dr={},Bf=new W(0,0,0,0),Tn=function(){function e(t){this.id=Ya(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,i){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=r.innerTransformable,o=void 0,s=void 0,f=!1;a.parent=n?this:null;var h=!1;if(a.copyTransform(r),i.position!=null){var u=Bf;i.layoutRect?u.copy(i.layoutRect):u.copy(this.getBoundingRect()),n||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(dr,i,u):Ff(dr,i,u),a.x=dr.x,a.y=dr.y,o=dr.align,s=dr.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=ne(v[0],u.width),c=ne(v[1],u.height)),h=!0,a.originX=-a.x+l+(n?0:u.x),a.originY=-a.y+c+(n?0:u.y)}}i.rotation!=null&&(a.rotation=i.rotation);var _=i.offset;_&&(a.x+=_[0],a.y+=_[1],h||(a.originX=-_[0],a.originY=-_[1]));var g=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,d=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),p=void 0,y=void 0,m=void 0;g&&this.canBeInsideText()?(p=i.insideFill,y=i.insideStroke,(p==null||p==="auto")&&(p=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(p),m=!0)):(p=i.outsideFill,y=i.outsideStroke,(p==null||p==="auto")&&(p=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(p),m=!0)),p=p||"#000",(p!==d.fill||y!==d.stroke||m!==d.autoStroke||o!==d.align||s!==d.verticalAlign)&&(f=!0,d.fill=p,d.stroke=y,d.autoStroke=m,d.align=o,d.verticalAlign=s,r.setDefaultTextStyle(d)),r.__dirty|=ot,f&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ji:Ji},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),i=typeof r=="string"&&zt(r);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,gn(i,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},k(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Ft(t))for(var i=t,n=ht(i),a=0;a<n.length;a++){var o=n[a];this.attrKV(o,t[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var r=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==mi)){var o=n.targetName,s=o?r[o]:r;n.saveTo(s)}}},e.prototype._innerSaveToNormal=function(t){var r=this._normalState;r||(r=this._normalState={}),t.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(t,r,wi)},e.prototype._savePrimaryToNormal=function(t,r,i){for(var n=0;n<i.length;n++){var a=i[n];t[a]!=null&&!(a in r)&&(r[a]=this[a])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(mi,!1,t)},e.prototype.useState=function(t,r,i,n){var a=t===mi,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,f=this.stateTransition;if(!(Mt(s,t)>=0&&(r||s.length===1))){var h;if(this.stateProxy&&!a&&(h=this.stateProxy(t)),h||(h=this.states&&this.states[t]),!h&&!a){pn("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(h);var u=!!(h&&h.hoverLayer||n);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,h,this._normalState,r,!i&&!this.__inHover&&f&&f.duration>0,f);var v=this._textContent,l=this._textGuide;return v&&v.useState(t,r,i,u),l&&l.useState(t,r,i,u),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ot),h}}},e.prototype.useStates=function(t,r,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var f=0;f<o;f++)if(t[f]!==a[f]){s=!1;break}}if(s)return;for(var f=0;f<o;f++){var h=t[f],u=void 0;this.stateProxy&&(u=this.stateProxy(h,t)),u||(u=this.states[h]),u&&n.push(u)}var v=n[o-1],l=!!(v&&v.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0);var c=this._mergeStates(n),_=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(t.join(","),c,this._normalState,!1,!r&&!this.__inHover&&_&&_.duration>0,_);var g=this._textContent,d=this._textGuide;g&&g.useStates(t,r,l),d&&d.useStates(t,r,l),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ot)}},e.prototype.isSilent=function(){for(var t=this.silent,r=this.parent;!t&&r;){if(r.silent){t=!0;break}r=r.parent}return t},e.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var r=this.animators[t];r.targetName&&r.changeTarget(this[r.targetName])}},e.prototype.removeState=function(t){var r=Mt(this.currentStates,t);if(r>=0){var i=this.currentStates.slice();i.splice(r,1),this.useStates(i)}},e.prototype.replaceState=function(t,r,i){var n=this.currentStates.slice(),a=Mt(n,t),o=Mt(n,r)>=0;a>=0?o?n.splice(a,1):n[a]=r:i&&!o&&n.push(r),this.useStates(n)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},i,n=0;n<t.length;n++){var a=t[n];k(r,a),a.textConfig&&(i=i||{},k(i,a.textConfig))}return i&&(r.textConfig=i),r},e.prototype._applyStateObj=function(t,r,i,n,a,o){var s=!(r&&n);r&&r.textConfig?(this.textConfig=k({},n?this.textConfig:i.textConfig),k(this.textConfig,r.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var f={},h=!1,u=0;u<wi.length;u++){var v=wi[u],l=a&&Of[v];r&&r[v]!=null?l?(h=!0,f[v]=r[v]):this[v]=r[v]:s&&i[v]!=null&&(l?(h=!0,f[v]=i[v]):this[v]=i[v])}if(!a)for(var u=0;u<this.animators.length;u++){var c=this.animators[u],_=c.targetName;c.getLoop()||c.__changeFinalValue(_?(r||i)[_]:r||i)}h&&this._transitionState(t,f,o)},e.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var r=this.__zr;r&&t.addSelfToZr(r),t.__zr=r,t.__hostTarget=this}},e.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},e.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(t){var r=this._textContent;r!==t&&(r&&r!==t&&this.removeTextContent(),t.innerTransformable=new mn,this._attachComponent(t),this._textContent=t,this.markRedraw())},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),k(this.textConfig,t),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=ot;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var r=this._textContent,i=this._textGuide;r&&(r.__inHover=t),i&&(i.__inHover=t)},e.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var r=this.animators;if(r)for(var i=0;i<r.length;i++)t.animation.addAnimator(r[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var i=0;i<r.length;i++)t.animation.removeAnimator(r[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},e.prototype.animate=function(t,r,i){var n=t?this[t]:this,a=new yn(n,r,i);return t&&(a.targetName=t),this.addAnimator(a,t),a},e.prototype.addAnimator=function(t,r){var i=this.__zr,n=this;t.during(function(){n.updateDuringAnimation(r)}).done(function(){var a=n.animators,o=Mt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var i=this.animators,n=i.length,a=[],o=0;o<n;o++){var s=i[o];!t||t===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},e.prototype.animateTo=function(t,r,i){Ti(this,t,r,i)},e.prototype.animateFrom=function(t,r,i){Ti(this,t,r,i,!0)},e.prototype._transitionState=function(t,r,i,n){for(var a=Ti(this,r,i,n),o=0;o<a.length;o++)a[o].__fromStateTransition=t},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=ot;function r(i,n,a,o){Object.defineProperty(t,i,{get:function(){if(!this[n]){var f=this[n]=[];s(this,f)}return this[n]},set:function(f){this[a]=f[0],this[o]=f[1],this[n]=f,s(this,f)}});function s(f,h){Object.defineProperty(h,0,{get:function(){return f[a]},set:function(u){f[a]=u}}),Object.defineProperty(h,1,{get:function(){return f[o]},set:function(u){f[o]=u}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),e}();Ga(Tn,Ir);Ga(Tn,mn);function Ti(e,t,r,i,n){r=r||{};var a=[];vo(e,"",e,t,r,i,a,n);var o=a.length,s=!1,f=r.done,h=r.aborted,u=function(){s=!0,o--,o<=0&&(s?f&&f():h&&h())},v=function(){o--,o<=0&&(s?f&&f():h&&h())};o||f&&f(),a.length>0&&r.during&&a[0].during(function(_,g){r.during(g)});for(var l=0;l<a.length;l++){var c=a[l];u&&c.done(u),v&&c.aborted(v),r.force&&c.duration(r.duration),c.start(r.easing)}return a}function bi(e,t,r){for(var i=0;i<r;i++)e[i]=t[i]}function Hf(e){return Pt(e[0])}function zf(e,t,r){if(Pt(t[r]))if(Pt(e[r])||(e[r]=[]),cs(t[r])){var i=t[r].length;e[r].length!==i&&(e[r]=new t[r].constructor(i),bi(e[r],t[r],i))}else{var n=t[r],a=e[r],o=n.length;if(Hf(n))for(var s=n[0].length,f=0;f<o;f++)a[f]?bi(a[f],n[f],s):a[f]=Array.prototype.slice.call(n[f]);else bi(a,n,o);a.length=n.length}else e[r]=t[r]}function kf(e,t){return e===t||Pt(e)&&Pt(t)&&Nf(e,t)}function Nf(e,t){var r=e.length;if(r!==t.length)return!1;for(var i=0;i<r;i++)if(e[i]!==t[i])return!1;return!0}function vo(e,t,r,i,n,a,o,s){for(var f=ht(i),h=n.duration,u=n.delay,v=n.additive,l=n.setToFinal,c=!Ft(a),_=e.animators,g=[],d=0;d<f.length;d++){var p=f[d],y=i[p];if(y!=null&&r[p]!=null&&(c||a[p]))if(Ft(y)&&!Pt(y)&&!Qe(y)){if(t){s||(r[p]=y,e.updateDuringAnimation(t));continue}vo(e,p,r[p],y,n,a&&a[p],o,s)}else g.push(p);else s||(r[p]=y,e.updateDuringAnimation(t),g.push(p))}var m=g.length;if(!v&&m)for(var T=0;T<_.length;T++){var b=_[T];if(b.targetName===t){var w=b.stopTracks(g);if(w){var M=Mt(_,b);_.splice(M,1)}}}if(n.force||(g=Cn(g,function(S){return!kf(i[S],r[S])}),m=g.length),m>0||n.force&&!o.length){var C=void 0,L=void 0,P=void 0;if(s){L={},l&&(C={});for(var T=0;T<m;T++){var p=g[T];L[p]=r[p],l?C[p]=i[p]:r[p]=i[p]}}else if(l){P={};for(var T=0;T<m;T++){var p=g[T];P[p]=Ae(r[p]),zf(r,i,p)}}var b=new yn(r,!1,!1,v?Cn(_,function(R){return R.targetName===t}):null);b.targetName=t,n.scope&&(b.scope=n.scope),l&&C&&b.whenWithKeys(0,C,g),P&&b.whenWithKeys(0,P,g),b.whenWithKeys(h??500,s?L:i,g).delay(u||0),e.addAnimator(b,t),o.push(b)}}const lo=Tn;var co=function(e){H(t,e);function t(r){var i=e.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(r),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(r){return this._children[r]},t.prototype.childOfName=function(r){for(var i=this._children,n=0;n<i.length;n++)if(i[n].name===r)return i[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(r){return r&&r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),this},t.prototype.addBefore=function(r,i){if(r&&r!==this&&r.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,i){var n=Mt(this._children,r);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(r,i){var n=this._children,a=n[i];if(r&&r!==this&&r.parent!==this&&r!==a){n[i]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var i=this.__zr;i&&i!==r.__zr&&r.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(r){var i=this.__zr,n=this._children,a=Mt(n,r);return a<0?this:(n.splice(a,1),r.parent=null,i&&r.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,i=this.__zr,n=0;n<r.length;n++){var a=r[n];i&&a.removeSelfFromZr(i),a.parent=null}return r.length=0,this},t.prototype.eachChild=function(r,i){for(var n=this._children,a=0;a<n.length;a++){var o=n[a];r.call(i,o,a)}return this},t.prototype.traverse=function(r,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],o=r.call(i,a);a.isGroup&&!o&&a.traverse(r,i)}return this},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(r)}},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(r)}},t.prototype.getBoundingRect=function(r){for(var i=new W(0,0,0,0),n=r||this._children,a=[],o=null,s=0;s<n.length;s++){var f=n[s];if(!(f.ignore||f.invisible)){var h=f.getBoundingRect(),u=f.getLocalTransform(a);u?(W.applyTransform(i,h,u),o=o||i.clone(),o.union(i)):(o=o||h.clone(),o.union(h))}}return o||i},t}(lo);co.prototype.type="group";/*!
|
|
* 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 Oe={},po={};function Wf(e){delete po[e]}function Yf(e){if(!e)return!1;if(typeof e=="string")return ke(e,1)<Ki;if(e.colorStops){for(var t=e.colorStops,r=0,i=t.length,n=0;n<i;n++)r+=ke(t[n].color,1);return r/=i,r<Ki}return!1}var Gf=function(){function e(t,r,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=r,this.id=t;var a=new af,o=i.renderer||"canvas";Oe[o]||(o=ht(Oe)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new Oe[o](r,a,i,t),f=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var h=!G.node&&!G.worker&&!f?new xf(s.getViewportRoot(),s.root):null,u=i.useCoarsePointer,v=u==null||u==="auto"?G.touchEventsSupported:!!u,l=44,c;v&&(c=st(i.pointerSize,l)),this.handler=new js(a,s,h,s.root,c),this.animation=new bf({stage:{update:f?null:function(){return n._flush(!0)}}}),f||this.animation.start()}return e.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,r),this.refresh())},e.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=Yf(t))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(t){var r,i=Cr();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var n=Cr();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,i){return this._disposed||this.handler.on(t,r,i),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r<t.length;r++)t[r]instanceof co&&t[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.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,Wf(this.id))},e}();function sv(e,t){var r=new Gf(Ya(),e,t);return po[r.id]=r,r}function fv(e,t){Oe[e]=t}var tn=new Je(50);function $f(e){if(typeof e=="string"){var t=tn.get(e);return t&&t.image}else return e}function _o(e,t,r,i,n){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=tn.get(e),o={hostEl:r,cb:i,cbPayload:n};return a?(t=a.image,!je(t)&&a.pending.push(o)):(t=qe.loadImage(e,jn,jn),t.__zrImageSrc=e,tn.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function jn(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var r=e.pending[t],i=r.cb;i&&i(this,r.cbPayload),r.hostEl.dirty()}e.pending.length=0}function je(e){return e&&e.width&&e.height}var Ci=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Xf(e,t,r,i,n){if(!t)return"";var a=(e+"").split(`
|
|
`);n=go(t,r,i,n);for(var o=0,s=a.length;o<s;o++)a[o]=yo(a[o],n);return a.join(`
|
|
`)}function go(e,t,r,i){i=i||{};var n=k({},i);n.font=t,r=st(r,"..."),n.maxIterations=st(i.maxIterations,2);var a=n.minChar=st(i.minChar,0);n.cnCharWidth=ut("国",t);var o=n.ascCharWidth=ut("a",t);n.placeholder=st(i.placeholder,"");for(var s=e=Math.max(0,e-1),f=0;f<a&&s>=o;f++)s-=o;var h=ut(r,t);return h>s&&(r="",h=0),s=e-h,n.ellipsis=r,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=e,n}function yo(e,t){var r=t.containerWidth,i=t.font,n=t.contentWidth;if(!r)return"";var a=ut(e,i);if(a<=r)return e;for(var o=0;;o++){if(a<=n||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?qf(e,n,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*n/a):0;e=e.substr(0,s),a=ut(e,i)}return e===""&&(e=t.placeholder),e}function qf(e,t,r,i){for(var n=0,a=0,o=e.length;a<o&&n<t;a++){var s=e.charCodeAt(a);n+=0<=s&&s<=127?r:i}return a}function Zf(e,t){e!=null&&(e+="");var r=t.overflow,i=t.padding,n=t.font,a=r==="truncate",o=wn(n),s=st(t.lineHeight,o),f=!!t.backgroundColor,h=t.lineOverflow==="truncate",u=t.width,v;u!=null&&(r==="break"||r==="breakAll")?v=e?mo(e,t.font,u,r==="breakAll",0).lines:[]:v=e?e.split(`
|
|
`):[];var l=v.length*s,c=st(t.height,l);if(l>c&&h){var _=Math.floor(c/s);v=v.slice(0,_)}if(e&&a&&u!=null)for(var g=go(u,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),d=0;d<v.length;d++)v[d]=yo(v[d],g);for(var p=c,y=0,d=0;d<v.length;d++)y=Math.max(ut(v[d],n),y);u==null&&(u=y);var m=y;return i&&(p+=i[0]+i[2],m+=i[1]+i[3],u+=i[1]+i[3]),f&&(m=u),{lines:v,height:c,outerWidth:m,outerHeight:p,lineHeight:s,calculatedLineHeight:o,contentWidth:y,contentHeight:l,width:u}}var Uf=function(){function e(){}return e}(),ta=function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e}(),Vf=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return e}();function Qf(e,t){var r=new Vf;if(e!=null&&(e+=""),!e)return r;for(var i=t.width,n=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,s=Ci.lastIndex=0,f;(f=Ci.exec(e))!=null;){var h=f.index;h>s&&Mi(r,e.substring(s,h),t,o),Mi(r,f[2],t,o,f[1]),s=Ci.lastIndex}s<e.length&&Mi(r,e.substring(s,e.length),t,o);var u=[],v=0,l=0,c=t.padding,_=a==="truncate",g=t.lineOverflow==="truncate";function d(N,Y,q){N.width=Y,N.lineHeight=q,v+=q,l=Math.max(l,Y)}t:for(var p=0;p<r.lines.length;p++){for(var y=r.lines[p],m=0,T=0,b=0;b<y.tokens.length;b++){var w=y.tokens[b],M=w.styleName&&t.rich[w.styleName]||{},C=w.textPadding=M.padding,L=C?C[1]+C[3]:0,P=w.font=M.font||t.font;w.contentHeight=wn(P);var S=st(M.height,w.contentHeight);if(w.innerHeight=S,C&&(S+=C[0]+C[2]),w.height=S,w.lineHeight=xe(M.lineHeight,t.lineHeight,S),w.align=M&&M.align||t.align,w.verticalAlign=M&&M.verticalAlign||"middle",g&&n!=null&&v+w.lineHeight>n){b>0?(y.tokens=y.tokens.slice(0,b),d(y,T,m),r.lines=r.lines.slice(0,p+1)):r.lines=r.lines.slice(0,p);break t}var R=M.width,A=R==null||R==="auto";if(typeof R=="string"&&R.charAt(R.length-1)==="%")w.percentWidth=R,u.push(w),w.contentWidth=ut(w.text,P);else{if(A){var x=M.backgroundColor,E=x&&x.image;E&&(E=$f(E),je(E)&&(w.width=Math.max(w.width,E.width*S/E.height)))}var D=_&&i!=null?i-T:null;D!=null&&D<w.width?!A||D<L?(w.text="",w.width=w.contentWidth=0):(w.text=Xf(w.text,D-L,P,t.ellipsis,{minChar:t.truncateMinChar}),w.width=w.contentWidth=ut(w.text,P)):w.contentWidth=ut(w.text,P)}w.width+=L,T+=w.width,M&&(m=Math.max(m,w.lineHeight))}d(y,T,m)}r.outerWidth=r.width=st(i,l),r.outerHeight=r.height=st(n,v),r.contentHeight=v,r.contentWidth=l,c&&(r.outerWidth+=c[1]+c[3],r.outerHeight+=c[0]+c[2]);for(var p=0;p<u.length;p++){var w=u[p],z=w.percentWidth;w.width=parseInt(z,10)/100*r.width}return r}function Mi(e,t,r,i,n){var a=t==="",o=n&&r.rich[n]||{},s=e.lines,f=o.font||r.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 _=ne(o.width,i.width)+c;s.length>0&&_+i.accumWidth>i.width&&(u=t.split(`
|
|
`),h=!0),i.accumWidth=_}else{var g=mo(t,f,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+c,v=g.linesWidths,u=g.lines}}else u=t.split(`
|
|
`);for(var d=0;d<u.length;d++){var p=u[d],y=new Uf;if(y.styleName=n,y.text=p,y.isLineHolder=!p&&!a,typeof o.width=="number"?y.width=o.width:y.width=v?v[d]:ut(p,f),!d&&!h){var m=(s[s.length-1]||(s[0]=new ta)).tokens,T=m.length;T===1&&m[0].isLineHolder?m[0]=y:(p||!T||a)&&m.push(y)}else s.push(new ta([y]))}}function Kf(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Jf=Ue(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function jf(e){return Kf(e)?!!Jf[e]:!0}function mo(e,t,r,i,n){for(var a=[],o=[],s="",f="",h=0,u=0,v=0;v<e.length;v++){var l=e.charAt(v);if(l===`
|
|
`){f&&(s+=f,u+=h),a.push(s),o.push(u),s="",f="",h=0,u=0;continue}var c=ut(l,t),_=i?!1:!jf(l);if(a.length?u+c>r:n+u+c>r){u?(s||f)&&(_?(s||(s=f,f="",h=0,u=h),a.push(s),o.push(u-h),f+=l,h+=c,s="",u=h):(f&&(s+=f,f="",h=0),a.push(s),o.push(u),s=l,u=c)):_?(a.push(f),o.push(h),f=l,h=c):(a.push(l),o.push(c));continue}u+=c,_?(f+=l,h+=c):(f&&(s+=f,f="",h=0),s+=l)}return!a.length&&!s&&(s=e,f="",h=0),f&&(s+=f),s&&(a.push(s),o.push(u)),a.length===1&&(u+=n),{accumWidth:u,lines:a,linesWidths:o}}var rn="__zr_style_"+Math.round(Math.random()*10),fr={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ti={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fr[rn]=!0;var ra=["z","z2","invisible"],th=["invisible"],rh=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var i=ht(r),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(r[a]):e.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,i,n,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&eh(this,r,i)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var f=this.parent;f;){if(f.ignore)return!1;f=f.parent}return!0},t.prototype.contain=function(r,i){return this.rectContain(r,i)},t.prototype.traverse=function(r,i){r.call(i,this)},t.prototype.rectContain=function(r,i){var n=this.transformCoordToLocal(r,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,f=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new W(0,0,0,0)),i?W.applyTransform(r,n,i):r.copy(n),(o||s||f)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(f),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+f-o));var h=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-h),r.y=Math.floor(r.y-h),r.width=Math.ceil(r.width+1+h*2),r.height=Math.ceil(r.height+1+h*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new W(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(r){return this.animate("style",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(r,i){r!=="style"?e.prototype.attrKV.call(this,r,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(r,i){return typeof r=="string"?this.style[r]=i:k(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=Xr,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Xr)},t.prototype.styleUpdated=function(){this.__dirty&=~Xr},t.prototype.createStyle=function(r){return Ke(fr,r)},t.prototype.useStyle=function(r){r[rn]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[rn]},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var i=this._normalState;r.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,i,ra)},t.prototype._applyStateObj=function(r,i,n,a,o,s){e.prototype._applyStateObj.call(this,r,i,n,a,o,s);var f=!(i&&a),h;if(i&&i.style?o?a?h=i.style:(h=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(h,i.style)):(h=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(h,i.style)):f&&(h=n.style),h)if(o){var u=this.style;if(this.style=this.createStyle(f?{}:u),f)for(var v=ht(u),l=0;l<v.length;l++){var c=v[l];c in h&&(h[c]=h[c],this.style[c]=u[c])}for(var _=ht(h),l=0;l<_.length;l++){var c=_[l];this.style[c]=this.style[c]}this._transitionState(r,{style:h},s,this.getAnimationStyleProps())}else this.useStyle(h);for(var g=this.__inHover?th:ra,l=0;l<g.length;l++){var c=g[l];i&&i[c]!=null?this[c]=i[c]:f&&n[c]!=null&&(this[c]=n[c])}},t.prototype._mergeStates=function(r){for(var i=e.prototype._mergeStates.call(this,r),n,a=0;a<r.length;a++){var o=r[a];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},t.prototype._mergeStyle=function(r,i){return k(r,i),r},t.prototype.getAnimationStyleProps=function(){return ti},t.initDefaultProps=function(){var r=t.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=ot|Xr}(),t}(lo),Li=new W(0,0,0,0),Pi=new W(0,0,0,0);function eh(e,t,r){return Li.copy(e.getBoundingRect()),e.transform&&Li.applyTransform(e.transform),Pi.width=t,Pi.height=r,!Li.intersect(Pi)}const oe=rh;var rt=Math.min,et=Math.max,Si=Math.sin,Ri=Math.cos,Vt=Math.PI*2,ge=Er(),ye=Er(),me=Er();function wo(e,t,r){if(e.length!==0){for(var i=e[0],n=i[0],a=i[0],o=i[1],s=i[1],f=1;f<e.length;f++)i=e[f],n=rt(n,i[0]),a=et(a,i[0]),o=rt(o,i[1]),s=et(s,i[1]);t[0]=n,t[1]=o,r[0]=a,r[1]=s}}function ea(e,t,r,i,n,a){n[0]=rt(e,r),n[1]=rt(t,i),a[0]=et(e,r),a[1]=et(t,i)}var ia=[],na=[];function ih(e,t,r,i,n,a,o,s,f,h){var u=io,v=V,l=u(e,r,n,o,ia);f[0]=1/0,f[1]=1/0,h[0]=-1/0,h[1]=-1/0;for(var c=0;c<l;c++){var _=v(e,r,n,o,ia[c]);f[0]=rt(_,f[0]),h[0]=et(_,h[0])}l=u(t,i,a,s,na);for(var c=0;c<l;c++){var g=v(t,i,a,s,na[c]);f[1]=rt(g,f[1]),h[1]=et(g,h[1])}f[0]=rt(e,f[0]),h[0]=et(e,h[0]),f[0]=rt(o,f[0]),h[0]=et(o,h[0]),f[1]=rt(t,f[1]),h[1]=et(t,h[1]),f[1]=rt(s,f[1]),h[1]=et(s,h[1])}function nh(e,t,r,i,n,a,o,s){var f=no,h=K,u=et(rt(f(e,r,n),1),0),v=et(rt(f(t,i,a),1),0),l=h(e,r,n,u),c=h(t,i,a,v);o[0]=rt(e,n,l),o[1]=rt(t,a,c),s[0]=et(e,n,l),s[1]=et(t,a,c)}function ah(e,t,r,i,n,a,o,s,f){var h=Tr,u=br,v=Math.abs(n-a);if(v%Vt<1e-4&&v>1e-4){s[0]=e-r,s[1]=t-i,f[0]=e+r,f[1]=t+i;return}if(ge[0]=Ri(n)*r+e,ge[1]=Si(n)*i+t,ye[0]=Ri(a)*r+e,ye[1]=Si(a)*i+t,h(s,ge,ye),u(f,ge,ye),n=n%Vt,n<0&&(n=n+Vt),a=a%Vt,a<0&&(a=a+Vt),n>a&&!o?a+=Vt:n<a&&o&&(n+=Vt),o){var l=a;a=n,n=l}for(var c=0;c<a;c+=Math.PI/2)c>n&&(me[0]=Ri(c)*r+e,me[1]=Si(c)*i+t,h(s,me,s),u(f,me,f))}var B={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qt=[],Kt=[],mt=[],At=[],wt=[],Tt=[],Di=Math.min,xi=Math.max,Jt=Math.cos,jt=Math.sin,Dt=Math.abs,en=Math.PI,It=en*2,Ai=typeof Float32Array<"u",Nr=[];function Ei(e){var t=Math.round(e/en*1e8)/1e8;return t%2*en}function oh(e,t){var r=Ei(e[0]);r<0&&(r+=It);var i=r-e[0],n=e[1];n+=i,!t&&n-r>=It?n=r+It:t&&r-n>=It?n=r-It:!t&&r>n?n=r+(It-Ei(r-n)):t&&r<n&&(n=r-(It-Ei(n-r))),e[0]=r,e[1]=n}var ur=function(){function e(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(t,r,i){i=i||0,i>0&&(this._ux=Dt(i/Ne/t)||0,this._uy=Dt(i/Ne/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(B.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var i=Dt(t-this._xi),n=Dt(r-this._yi),a=i>this._ux||n>this._uy;if(this.addData(B.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,i,n,a,o){return this._drawPendingPt(),this.addData(B.C,t,r,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,i,n,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,i,n){return this._drawPendingPt(),this.addData(B.Q,t,r,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,r,i,n),this._xi=i,this._yi=n,this},e.prototype.arc=function(t,r,i,n,a,o){this._drawPendingPt(),Nr[0]=n,Nr[1]=a,oh(Nr,o),n=Nr[0],a=Nr[1];var s=a-n;return this.addData(B.A,t,r,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,i,n,a,o),this._xi=Jt(a)*i+t,this._yi=jt(a)*i+r,this},e.prototype.arcTo=function(t,r,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,i,n,a),this},e.prototype.rect=function(t,r,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,i,n),this.addData(B.R,t,r,i,n),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(B.Z);var t=this._ctx,r=this._x0,i=this._y0;return t&&t.closePath(),this._xi=r,this._yi=i,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var r=t.length;!(this.data&&this.data.length===r)&&Ai&&(this.data=new Float32Array(r));for(var i=0;i<r;i++)this.data[i]=t[i];this._len=r},e.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var r=t.length,i=0,n=this._len,a=0;a<r;a++)i+=t[a].len();Ai&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;a<r;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[n++]=o[s];this._len=n},e.prototype.addData=function(t,r,i,n,a,o,s,f,h){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var v=0;v<arguments.length;v++)u[this._len++]=arguments[v]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r<this._len;r++)t[r]=this.data[r];this.data=t}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Ai&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){mt[0]=mt[1]=wt[0]=wt[1]=Number.MAX_VALUE,At[0]=At[1]=Tt[0]=Tt[1]=-Number.MAX_VALUE;var t=this.data,r=0,i=0,n=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],f=o===1;switch(f&&(r=t[o],i=t[o+1],n=r,a=i),s){case B.M:r=n=t[o++],i=a=t[o++],wt[0]=n,wt[1]=a,Tt[0]=n,Tt[1]=a;break;case B.L:ea(r,i,t[o],t[o+1],wt,Tt),r=t[o++],i=t[o++];break;case B.C:ih(r,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],wt,Tt),r=t[o++],i=t[o++];break;case B.Q:nh(r,i,t[o++],t[o++],t[o],t[o+1],wt,Tt),r=t[o++],i=t[o++];break;case B.A:var h=t[o++],u=t[o++],v=t[o++],l=t[o++],c=t[o++],_=t[o++]+c;o+=1;var g=!t[o++];f&&(n=Jt(c)*v+h,a=jt(c)*l+u),ah(h,u,v,l,c,_,g,wt,Tt),r=Jt(_)*v+h,i=jt(_)*l+u;break;case B.R:n=r=t[o++],a=i=t[o++];var d=t[o++],p=t[o++];ea(n,a,n+d,a+p,wt,Tt);break;case B.Z:r=n,i=a;break}Tr(mt,mt,wt),br(At,At,Tt)}return o===0&&(mt[0]=mt[1]=At[0]=At[1]=0),new W(mt[0],mt[1],At[0]-mt[0],At[1]-mt[1])},e.prototype._calculateLength=function(){var t=this.data,r=this._len,i=this._ux,n=this._uy,a=0,o=0,s=0,f=0;this._pathSegLen||(this._pathSegLen=[]);for(var h=this._pathSegLen,u=0,v=0,l=0;l<r;){var c=t[l++],_=l===1;_&&(a=t[l],o=t[l+1],s=a,f=o);var g=-1;switch(c){case B.M:a=s=t[l++],o=f=t[l++];break;case B.L:{var d=t[l++],p=t[l++],y=d-a,m=p-o;(Dt(y)>i||Dt(m)>n||l===r-1)&&(g=Math.sqrt(y*y+m*m),a=d,o=p);break}case B.C:{var T=t[l++],b=t[l++],d=t[l++],p=t[l++],w=t[l++],M=t[l++];g=sf(a,o,T,b,d,p,w,M,10),a=w,o=M;break}case B.Q:{var T=t[l++],b=t[l++],d=t[l++],p=t[l++];g=uf(a,o,T,b,d,p,10),a=d,o=p;break}case B.A:var C=t[l++],L=t[l++],P=t[l++],S=t[l++],R=t[l++],A=t[l++],x=A+R;l+=1,_&&(s=Jt(R)*P+C,f=jt(R)*S+L),g=xi(P,S)*Di(It,Math.abs(A)),a=Jt(x)*P+C,o=jt(x)*S+L;break;case B.R:{s=a=t[l++],f=o=t[l++];var E=t[l++],D=t[l++];g=E*2+D*2;break}case B.Z:{var y=s-a,m=f-o;g=Math.sqrt(y*y+m*m),a=s,o=f;break}}g>=0&&(h[v++]=g,u+=g)}return this._pathLen=u,u},e.prototype.rebuildPath=function(t,r){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,f,h,u,v,l,c=r<1,_,g,d=0,p=0,y,m=0,T,b;if(!(c&&(this._pathSegLen||this._calculateLength(),_=this._pathSegLen,g=this._pathLen,y=r*g,!y)))t:for(var w=0;w<o;){var M=i[w++],C=w===1;switch(C&&(h=i[w],u=i[w+1],s=h,f=u),M!==B.L&&m>0&&(t.lineTo(T,b),m=0),M){case B.M:s=h=i[w++],f=u=i[w++],t.moveTo(h,u);break;case B.L:{v=i[w++],l=i[w++];var L=Dt(v-h),P=Dt(l-u);if(L>n||P>a){if(c){var S=_[p++];if(d+S>y){var R=(y-d)/S;t.lineTo(h*(1-R)+v*R,u*(1-R)+l*R);break t}d+=S}t.lineTo(v,l),h=v,u=l,m=0}else{var A=L*L+P*P;A>m&&(T=v,b=l,m=A)}break}case B.C:{var x=i[w++],E=i[w++],D=i[w++],z=i[w++],N=i[w++],Y=i[w++];if(c){var S=_[p++];if(d+S>y){var R=(y-d)/S;kt(h,x,D,N,R,Qt),kt(u,E,z,Y,R,Kt),t.bezierCurveTo(Qt[1],Kt[1],Qt[2],Kt[2],Qt[3],Kt[3]);break t}d+=S}t.bezierCurveTo(x,E,D,z,N,Y),h=N,u=Y;break}case B.Q:{var x=i[w++],E=i[w++],D=i[w++],z=i[w++];if(c){var S=_[p++];if(d+S>y){var R=(y-d)/S;ze(h,x,D,R,Qt),ze(u,E,z,R,Kt),t.quadraticCurveTo(Qt[1],Kt[1],Qt[2],Kt[2]);break t}d+=S}t.quadraticCurveTo(x,E,D,z),h=D,u=z;break}case B.A:var q=i[w++],U=i[w++],$=i[w++],nt=i[w++],at=i[w++],Rt=i[w++],Nt=i[w++],Wt=!i[w++],Yt=$>nt?$:nt,j=Dt($-nt)>.001,Z=at+Rt,I=!1;if(c){var S=_[p++];d+S>y&&(Z=at+Rt*(y-d)/S,I=!0),d+=S}if(j&&t.ellipse?t.ellipse(q,U,$,nt,Nt,at,Z,Wt):t.arc(q,U,Yt,at,Z,Wt),I)break t;C&&(s=Jt(at)*$+q,f=jt(at)*nt+U),h=Jt(Z)*$+q,u=jt(Z)*nt+U;break;case B.R:s=h=i[w],f=u=i[w+1],v=i[w++],l=i[w++];var O=i[w++],Fr=i[w++];if(c){var S=_[p++];if(d+S>y){var yt=y-d;t.moveTo(v,l),t.lineTo(v+Di(yt,O),l),yt-=O,yt>0&&t.lineTo(v+O,l+Di(yt,Fr)),yt-=Fr,yt>0&&t.lineTo(v+xi(O-yt,0),l+Fr),yt-=O,yt>0&&t.lineTo(v,l+xi(Fr-yt,0));break t}d+=S}t.rect(v,l,O,Fr);break;case B.Z:if(c){var S=_[p++];if(d+S>y){var R=(y-d)/S;t.lineTo(h*(1-R)+s*R,u*(1-R)+f*R);break t}d+=S}t.closePath(),h=s,u=f}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=B,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function pr(e,t,r,i,n,a,o){if(n===0)return!1;var s=n,f=0,h=e;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>e+s&&a>r+s||a<e-s&&a<r-s)return!1;if(e!==r)f=(t-i)/(e-r),h=(e*i-r*t)/(e-r);else return Math.abs(a-e)<=s/2;var u=f*a-o+h,v=u*u/(f*f+1);return v<=s/2*s/2}function sh(e,t,r,i,n,a,o,s,f,h,u){if(f===0)return!1;var v=f;if(u>t+v&&u>i+v&&u>a+v&&u>s+v||u<t-v&&u<i-v&&u<a-v&&u<s-v||h>e+v&&h>r+v&&h>n+v&&h>o+v||h<e-v&&h<r-v&&h<n-v&&h<o-v)return!1;var l=of(e,t,r,i,n,a,o,s,h,u,null);return l<=v/2}function fh(e,t,r,i,n,a,o,s,f){if(o===0)return!1;var h=o;if(f>t+h&&f>i+h&&f>a+h||f<t-h&&f<i-h&&f<a-h||s>e+h&&s>r+h&&s>n+h||s<e-h&&s<r-h&&s<n-h)return!1;var u=hf(e,t,r,i,n,a,s,f,null);return u<=h/2}var aa=Math.PI*2;function we(e){return e%=aa,e<0&&(e+=aa),e}var Wr=Math.PI*2;function hh(e,t,r,i,n,a,o,s,f){if(o===0)return!1;var h=o;s-=e,f-=t;var u=Math.sqrt(s*s+f*f);if(u-h>r||u+h<r)return!1;if(Math.abs(i-n)%Wr<1e-4)return!0;if(a){var v=i;i=we(n),n=we(v)}else i=we(i),n=we(n);i>n&&(n+=Wr);var l=Math.atan2(f,s);return l<0&&(l+=Wr),l>=i&&l<=n||l+Wr>=i&&l+Wr<=n}function tr(e,t,r,i,n,a){if(a>t&&a>i||a<t&&a<i||i===t)return 0;var o=(a-t)/(i-t),s=i<t?1:-1;(o===1||o===0)&&(s=i<t?.5:-.5);var f=o*(r-e)+e;return f===n?1/0:f>n?s:0}var Et=ur.CMD,rr=Math.PI*2,uh=1e-4;function vh(e,t){return Math.abs(e-t)<uh}var J=[-1,-1,-1],lt=[-1,-1];function lh(){var e=lt[0];lt[0]=lt[1],lt[1]=e}function ch(e,t,r,i,n,a,o,s,f,h){if(h>t&&h>i&&h>a&&h>s||h<t&&h<i&&h<a&&h<s)return 0;var u=eo(t,i,a,s,h,J);if(u===0)return 0;for(var v=0,l=-1,c=void 0,_=void 0,g=0;g<u;g++){var d=J[g],p=d===0||d===1?.5:1,y=V(e,r,n,o,d);y<f||(l<0&&(l=io(t,i,a,s,lt),lt[1]<lt[0]&&l>1&&lh(),c=V(t,i,a,s,lt[0]),l>1&&(_=V(t,i,a,s,lt[1]))),l===2?d<lt[0]?v+=c<t?p:-p:d<lt[1]?v+=_<c?p:-p:v+=s<_?p:-p:d<lt[0]?v+=c<t?p:-p:v+=s<c?p:-p)}return v}function dh(e,t,r,i,n,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var f=ff(t,i,a,s,J);if(f===0)return 0;var h=no(t,i,a);if(h>=0&&h<=1){for(var u=0,v=K(t,i,a,h),l=0;l<f;l++){var c=J[l]===0||J[l]===1?.5:1,_=K(e,r,n,J[l]);_<o||(J[l]<h?u+=v<t?c:-c:u+=a<v?c:-c)}return u}else{var c=J[0]===0||J[0]===1?.5:1,_=K(e,r,n,J[0]);return _<o?0:a<t?c:-c}}function ph(e,t,r,i,n,a,o,s){if(s-=t,s>r||s<-r)return 0;var f=Math.sqrt(r*r-s*s);J[0]=-f,J[1]=f;var h=Math.abs(i-n);if(h<1e-4)return 0;if(h>=rr-1e-4){i=0,n=rr;var u=a?1:-1;return o>=J[0]+e&&o<=J[1]+e?u:0}if(i>n){var v=i;i=n,n=v}i<0&&(i+=rr,n+=rr);for(var l=0,c=0;c<2;c++){var _=J[c];if(_+e>o){var g=Math.atan2(s,_),u=a?1:-1;g<0&&(g=rr+g),(g>=i&&g<=n||g+rr>=i&&g+rr<=n)&&(g>Math.PI/2&&g<Math.PI*1.5&&(u=-u),l+=u)}}return l}function To(e,t,r,i,n){for(var a=e.data,o=e.len(),s=0,f=0,h=0,u=0,v=0,l,c,_=0;_<o;){var g=a[_++],d=_===1;switch(g===Et.M&&_>1&&(r||(s+=tr(f,h,u,v,i,n))),d&&(f=a[_],h=a[_+1],u=f,v=h),g){case Et.M:u=a[_++],v=a[_++],f=u,h=v;break;case Et.L:if(r){if(pr(f,h,a[_],a[_+1],t,i,n))return!0}else s+=tr(f,h,a[_],a[_+1],i,n)||0;f=a[_++],h=a[_++];break;case Et.C:if(r){if(sh(f,h,a[_++],a[_++],a[_++],a[_++],a[_],a[_+1],t,i,n))return!0}else s+=ch(f,h,a[_++],a[_++],a[_++],a[_++],a[_],a[_+1],i,n)||0;f=a[_++],h=a[_++];break;case Et.Q:if(r){if(fh(f,h,a[_++],a[_++],a[_],a[_+1],t,i,n))return!0}else s+=dh(f,h,a[_++],a[_++],a[_],a[_+1],i,n)||0;f=a[_++],h=a[_++];break;case Et.A:var p=a[_++],y=a[_++],m=a[_++],T=a[_++],b=a[_++],w=a[_++];_+=1;var M=!!(1-a[_++]);l=Math.cos(b)*m+p,c=Math.sin(b)*T+y,d?(u=l,v=c):s+=tr(f,h,l,c,i,n);var C=(i-p)*T/m+p;if(r){if(hh(p,y,T,b,b+w,M,t,C,n))return!0}else s+=ph(p,y,T,b,b+w,M,C,n);f=Math.cos(b+w)*m+p,h=Math.sin(b+w)*T+y;break;case Et.R:u=f=a[_++],v=h=a[_++];var L=a[_++],P=a[_++];if(l=u+L,c=v+P,r){if(pr(u,v,l,v,t,i,n)||pr(l,v,l,c,t,i,n)||pr(l,c,u,c,t,i,n)||pr(u,c,u,v,t,i,n))return!0}else s+=tr(l,v,l,c,i,n),s+=tr(u,c,u,v,i,n);break;case Et.Z:if(r){if(pr(f,h,u,v,t,i,n))return!0}else s+=tr(f,h,u,v,i,n);f=u,h=v;break}}return!r&&!vh(h,v)&&(s+=tr(f,h,u,v,i,n)||0),s!==0}function _h(e,t,r){return To(e,0,!1,t,r)}function gh(e,t,r,i){return To(e,t,!0,r,i)}var bo=gt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fr),yh={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ti.style)},Ii=ie.concat(["invisible","culling","z","z2","zlevel","parent"]),mh=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(f){r.buildPath(f,r.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<Ii.length;++s)n[Ii[s]]=this[Ii[s]];n.__dirty|=ot}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(r){var i=ht(r);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var o=i[a],s=r[o];o==="style"?this.style?k(this.style,s):this.useStyle(s):o==="shape"?k(this.shape,s):e.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(Be(r)){var i=ke(r,0);return i>.5?Ji:i>.2?Af:ji}else if(r)return ji}return Ji},t.prototype.getInsideTextStroke=function(r){var i=this.style.fill;if(Be(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=ke(r,0)<Ki;if(a===o)return i}},t.prototype.buildPath=function(r,i,n){},t.prototype.pathUpdated=function(){this.__dirty&=~mr},t.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},t.prototype.createPathProxy=function(){this.path=new ur(!1)},t.prototype.hasStroke=function(){var r=this.style,i=r.stroke;return!(i==null||i==="none"||!(r.lineWidth>0))},t.prototype.hasFill=function(){var r=this.style,i=r.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,i=this.style,n=!r;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&mr)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||n){s.copy(r);var f=i.strokeNoScale?this.getLineScale():1,h=i.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;h=Math.max(h,u??4)}f>1e-10&&(s.width+=h/f,s.height+=h/f,s.x-=h/f/2,s.y-=h/f/2)}return s}return r},t.prototype.contain=function(r,i){var n=this.transformCoordToLocal(r,i),a=this.getBoundingRect(),o=this.style;if(r=n[0],i=n[1],a.contain(r,i)){var s=this.path;if(this.hasStroke()){var f=o.lineWidth,h=o.strokeNoScale?this.getLineScale():1;if(h>1e-10&&(this.hasFill()||(f=Math.max(f,this.strokeContainThreshold)),gh(s,f/h,r,i)))return!0}if(this.hasFill())return _h(s,r,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=mr,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,i){r==="shape"?this.setShape(i):e.prototype.attrKV.call(this,r,i)},t.prototype.setShape=function(r,i){var n=this.shape;return n||(n=this.shape={}),typeof r=="string"?n[r]=i:k(n,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&mr)},t.prototype.createStyle=function(r){return Ke(bo,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var i=this._normalState;r.shape&&!i.shape&&(i.shape=k({},this.shape))},t.prototype._applyStateObj=function(r,i,n,a,o,s){e.prototype._applyStateObj.call(this,r,i,n,a,o,s);var f=!(i&&a),h;if(i&&i.shape?o?a?h=i.shape:(h=k({},n.shape),k(h,i.shape)):(h=k({},a?this.shape:n.shape),k(h,i.shape)):f&&(h=n.shape),h)if(o){this.shape=k({},this.shape);for(var u={},v=ht(h),l=0;l<v.length;l++){var c=v[l];typeof h[c]=="object"?this.shape[c]=h[c]:u[c]=h[c]}this._transitionState(r,{shape:u},s)}else this.shape=h,this.dirtyShape()},t.prototype._mergeStates=function(r){for(var i=e.prototype._mergeStates.call(this,r),n,a=0;a<r.length;a++){var o=r[a];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},t.prototype.getAnimationStyleProps=function(){return yh},t.prototype.isZeroArea=function(){return!1},t.extend=function(r){var i=function(a){H(o,a);function o(s){var f=a.call(this,s)||this;return r.init&&r.init.call(f,s),f}return o.prototype.getDefaultStyle=function(){return xr(r.style)},o.prototype.getDefaultShape=function(){return xr(r.shape)},o}(t);for(var n in r)typeof r[n]=="function"&&(i.prototype[n]=r[n]);return i},t.initDefaultProps=function(){var r=t.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=ot|Xr|mr}(),t}(oe);const X=mh;var wh=gt({strokeFirst:!0,font:hr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},bo),Co=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var r=this.style,i=r.stroke;return i!=null&&i!=="none"&&r.lineWidth>0},t.prototype.hasFill=function(){var r=this.style,i=r.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(r){return Ke(wh,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var i=r.text;i!=null?i+="":i="";var n=If(i,r.font,r.textAlign,r.textBaseline);if(n.x+=r.x||0,n.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(oe);Co.prototype.type="tspan";const nn=Co;var Th=gt({x:0,y:0},fr),bh={style:gt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ti.style)};function Ch(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Mo=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return Ke(Th,r)},t.prototype._getSize=function(r){var i=this.style,n=i[r];if(n!=null)return n;var a=Ch(i.image)?i.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=i[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return bh},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new W(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(oe);Mo.prototype.type="image";const Lo=Mo;function Mh(e,t){var r=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,f,h,u;n<0&&(r=r+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=f=h=u=o:o instanceof Array?o.length===1?s=f=h=u=o[0]:o.length===2?(s=h=o[0],f=u=o[1]):o.length===3?(s=o[0],f=u=o[1],h=o[2]):(s=o[0],f=o[1],h=o[2],u=o[3]):s=f=h=u=0;var v;s+f>n&&(v=s+f,s*=n/v,f*=n/v),h+u>n&&(v=h+u,h*=n/v,u*=n/v),f+h>a&&(v=f+h,f*=a/v,h*=a/v),s+u>a&&(v=s+u,s*=a/v,u*=a/v),e.moveTo(r+s,i),e.lineTo(r+n-f,i),f!==0&&e.arc(r+n-f,i+f,f,-Math.PI/2,0),e.lineTo(r+n,i+a-h),h!==0&&e.arc(r+n-h,i+a-h,h,0,Math.PI/2),e.lineTo(r+u,i+a),u!==0&&e.arc(r+u,i+a-u,u,Math.PI/2,Math.PI),e.lineTo(r,i+s),s!==0&&e.arc(r+s,i+s,s,Math.PI,Math.PI*1.5)}var Mr=Math.round;function Lh(e,t,r){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;e.x1=i,e.x2=n,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Mr(i*2)===Mr(n*2)&&(e.x1=e.x2=Lr(i,s,!0)),Mr(a*2)===Mr(o*2)&&(e.y1=e.y2=Lr(a,s,!0))),e}}function Ph(e,t,r){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;e.x=i,e.y=n,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=Lr(i,s,!0),e.y=Lr(n,s,!0),e.width=Math.max(Lr(i+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Lr(n+o,s,!1)-e.y,o===0?0:1)),e}}function Lr(e,t,r){if(!t)return e;var i=Mr(e*2);return(i+Mr(t))%2===0?i/2:(i+(r?1:-1))/2}var Sh=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Rh={},Po=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Sh},t.prototype.buildPath=function(r,i){var n,a,o,s;if(this.subPixelOptimize){var f=Ph(Rh,i,this.style);n=f.x,a=f.y,o=f.width,s=f.height,f.r=i.r,i=f}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?Mh(r,i):r.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(X);Po.prototype.type="rect";const So=Po;var oa={fill:"#000"},sa=2,Dh={style:gt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ti.style)},Ro=function(e){H(t,e);function t(r){var i=e.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=oa,i.attr(r),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var i=this._children[r];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},t.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(r){var i=this.innerTransformable;return i?i.getLocalTransform(r):e.prototype.getLocalTransform.call(this,r)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Fh(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var i=0;i<this._children.length;i++)this._children[i].__zr=r},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new W(0,0,0,0),i=this._children,n=[],a=null,o=0;o<i.length;o++){var s=i[o],f=s.getBoundingRect(),h=s.getLocalTransform(n);h?(r.copy(f),r.applyTransform(h),a=a||r.clone(),a.union(r)):(a=a||f.clone(),a.union(f))}this._rect=a||r}return this._rect},t.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||oa},t.prototype.setTextContent=function(r){},t.prototype._mergeStyle=function(r,i){if(!i)return r;var n=i.rich,a=r.rich||n&&{};return k(r,i),n&&a?(this._mergeRich(a,n),r.rich=a):a&&(r.rich=a),r},t.prototype._mergeRich=function(r,i){for(var n=ht(i),a=0;a<n.length;a++){var o=n[a];r[o]=r[o]||{},k(r[o],i[o])}},t.prototype.getAnimationStyleProps=function(){return Dh},t.prototype._getOrCreateChild=function(r){var i=this._children[this._childCursor];return(!i||!(i instanceof r))&&(i=new r),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},t.prototype._updatePlainTexts=function(){var r=this.style,i=r.font||hr,n=r.padding,a=da(r),o=Zf(a,r),s=Fi(r),f=!!r.backgroundColor,h=o.outerHeight,u=o.outerWidth,v=o.contentWidth,l=o.lines,c=o.lineHeight,_=this._defaultStyle,g=r.x||0,d=r.y||0,p=r.align||_.align||"left",y=r.verticalAlign||_.verticalAlign||"top",m=g,T=wr(d,o.contentHeight,y);if(s||n){var b=Zr(g,u,p),w=wr(d,h,y);s&&this._renderBackground(r,r,b,w,u,h)}T+=c/2,n&&(m=ca(g,p,n),y==="top"?T+=n[0]:y==="bottom"&&(T-=n[2]));for(var M=0,C=!1,L=la("fill"in r?r.fill:(C=!0,_.fill)),P=va("stroke"in r?r.stroke:!f&&(!_.autoStroke||C)?(M=sa,_.stroke):null),S=r.textShadowBlur>0,R=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),A=o.calculatedLineHeight,x=0;x<l.length;x++){var E=this._getOrCreateChild(nn),D=E.createStyle();E.useStyle(D),D.text=l[x],D.x=m,D.y=T,p&&(D.textAlign=p),D.textBaseline="middle",D.opacity=r.opacity,D.strokeFirst=!0,S&&(D.shadowBlur=r.textShadowBlur||0,D.shadowColor=r.textShadowColor||"transparent",D.shadowOffsetX=r.textShadowOffsetX||0,D.shadowOffsetY=r.textShadowOffsetY||0),D.stroke=P,D.fill=L,P&&(D.lineWidth=r.lineWidth||M,D.lineDash=r.lineDash,D.lineDashOffset=r.lineDashOffset||0),D.font=i,ha(D,r),T+=c,R&&E.setBoundingRect(new W(Zr(D.x,r.width,D.textAlign),wr(D.y,A,D.textBaseline),v,A))}},t.prototype._updateRichTexts=function(){var r=this.style,i=da(r),n=Qf(i,r),a=n.width,o=n.outerWidth,s=n.outerHeight,f=r.padding,h=r.x||0,u=r.y||0,v=this._defaultStyle,l=r.align||v.align,c=r.verticalAlign||v.verticalAlign,_=Zr(h,o,l),g=wr(u,s,c),d=_,p=g;f&&(d+=f[3],p+=f[0]);var y=d+a;Fi(r)&&this._renderBackground(r,r,_,g,o,s);for(var m=!!r.backgroundColor,T=0;T<n.lines.length;T++){for(var b=n.lines[T],w=b.tokens,M=w.length,C=b.lineHeight,L=b.width,P=0,S=d,R=y,A=M-1,x=void 0;P<M&&(x=w[P],!x.align||x.align==="left");)this._placeToken(x,r,C,p,S,"left",m),L-=x.width,S+=x.width,P++;for(;A>=0&&(x=w[A],x.align==="right");)this._placeToken(x,r,C,p,R,"right",m),L-=x.width,R-=x.width,A--;for(S+=(a-(S-d)-(y-R)-L)/2;P<=A;)x=w[P],this._placeToken(x,r,C,p,S+x.width/2,"center",m),S+=x.width,P++;p+=C}},t.prototype._placeToken=function(r,i,n,a,o,s,f){var h=i.rich[r.styleName]||{};h.text=r.text;var u=r.verticalAlign,v=a+n/2;u==="top"?v=a+r.height/2:u==="bottom"&&(v=a+n-r.height/2);var l=!r.isLineHolder&&Fi(h);l&&this._renderBackground(h,i,s==="right"?o-r.width:s==="center"?o-r.width/2:o,v-r.height/2,r.width,r.height);var c=!!h.backgroundColor,_=r.textPadding;_&&(o=ca(o,s,_),v-=r.height/2-_[0]-r.innerHeight/2);var g=this._getOrCreateChild(nn),d=g.createStyle();g.useStyle(d);var p=this._defaultStyle,y=!1,m=0,T=la("fill"in h?h.fill:"fill"in i?i.fill:(y=!0,p.fill)),b=va("stroke"in h?h.stroke:"stroke"in i?i.stroke:!c&&!f&&(!p.autoStroke||y)?(m=sa,p.stroke):null),w=h.textShadowBlur>0||i.textShadowBlur>0;d.text=r.text,d.x=o,d.y=v,w&&(d.shadowBlur=h.textShadowBlur||i.textShadowBlur||0,d.shadowColor=h.textShadowColor||i.textShadowColor||"transparent",d.shadowOffsetX=h.textShadowOffsetX||i.textShadowOffsetX||0,d.shadowOffsetY=h.textShadowOffsetY||i.textShadowOffsetY||0),d.textAlign=s,d.textBaseline="middle",d.font=r.font||hr,d.opacity=xe(h.opacity,i.opacity,1),ha(d,h),b&&(d.lineWidth=xe(h.lineWidth,i.lineWidth,m),d.lineDash=st(h.lineDash,i.lineDash),d.lineDashOffset=i.lineDashOffset||0,d.stroke=b),T&&(d.fill=T);var M=r.contentWidth,C=r.contentHeight;g.setBoundingRect(new W(Zr(d.x,M,d.textAlign),wr(d.y,C,d.textBaseline),M,C))},t.prototype._renderBackground=function(r,i,n,a,o,s){var f=r.backgroundColor,h=r.borderWidth,u=r.borderColor,v=f&&f.image,l=f&&!v,c=r.borderRadius,_=this,g,d;if(l||r.lineHeight||h&&u){g=this._getOrCreateChild(So),g.useStyle(g.createStyle()),g.style.fill=null;var p=g.shape;p.x=n,p.y=a,p.width=o,p.height=s,p.r=c,g.dirtyShape()}if(l){var y=g.style;y.fill=f||null,y.fillOpacity=st(r.fillOpacity,1)}else if(v){d=this._getOrCreateChild(Lo),d.onload=function(){_.dirtyStyle()};var m=d.style;m.image=f.image,m.x=n,m.y=a,m.width=o,m.height=s}if(h&&u){var y=g.style;y.lineWidth=h,y.stroke=u,y.strokeOpacity=st(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var T=(g||d).style;T.shadowBlur=r.shadowBlur||0,T.shadowColor=r.shadowColor||"transparent",T.shadowOffsetX=r.shadowOffsetX||0,T.shadowOffsetY=r.shadowOffsetY||0,T.opacity=xe(r.opacity,i.opacity,1)},t.makeFont=function(r){var i="";return Ih(r)&&(i=[r.fontStyle,r.fontWeight,Eh(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),i&&$r(i)||r.textFont||r.font},t}(oe),xh={left:!0,right:1,center:1},Ah={top:1,bottom:1,middle:1},fa=["fontStyle","fontWeight","fontSize","fontFamily"];function Eh(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?ln+"px":e+"px"}function ha(e,t){for(var r=0;r<fa.length;r++){var i=fa[r],n=t[i];n!=null&&(e[i]=n)}}function Ih(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Fh(e){return ua(e),ft(e.rich,ua),e}function ua(e){if(e){e.font=Ro.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||xh[t]?t:"left";var r=e.verticalAlign;r==="center"&&(r="middle"),e.verticalAlign=r==null||Ah[r]?r:"top";var i=e.padding;i&&(e.padding=_s(e.padding))}}function va(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function la(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function ca(e,t,r){return t==="right"?e-r[1]:t==="center"?e+r[3]/2-r[1]/2:e+r[3]}function da(e){var t=e.text;return t!=null&&(t+=""),t}function Fi(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}const hv=Ro;var _r=ur.CMD,Oh=[[],[],[]],pa=Math.sqrt,Bh=Math.atan2;function Do(e,t){if(t){var r=e.data,i=e.len(),n,a,o,s,f,h,u=_r.M,v=_r.C,l=_r.L,c=_r.R,_=_r.A,g=_r.Q;for(o=0,s=0;o<i;){switch(n=r[o++],s=o,a=0,n){case u:a=1;break;case l:a=1;break;case v:a=3;break;case g:a=2;break;case _:var d=t[4],p=t[5],y=pa(t[0]*t[0]+t[1]*t[1]),m=pa(t[2]*t[2]+t[3]*t[3]),T=Bh(-t[1]/m,t[0]/y);r[o]*=y,r[o++]+=d,r[o]*=m,r[o++]+=p,r[o++]*=y,r[o++]*=m,r[o++]+=T,r[o++]+=T,o+=2,s=o;break;case c:h[0]=r[o++],h[1]=r[o++],Qr(h,h,t),r[s++]=h[0],r[s++]=h[1],h[0]+=r[o++],h[1]+=r[o++],Qr(h,h,t),r[s++]=h[0],r[s++]=h[1]}for(f=0;f<a;f++){var b=Oh[f];b[0]=r[o++],b[1]=r[o++],Qr(b,b,t),r[s++]=b[0],r[s++]=b[1]}}e.increaseVersion()}}var Oi=Math.sqrt,Te=Math.sin,be=Math.cos,Yr=Math.PI;function _a(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function an(e,t){return(e[0]*t[0]+e[1]*t[1])/(_a(e)*_a(t))}function ga(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(an(e,t))}function ya(e,t,r,i,n,a,o,s,f,h,u){var v=f*(Yr/180),l=be(v)*(e-r)/2+Te(v)*(t-i)/2,c=-1*Te(v)*(e-r)/2+be(v)*(t-i)/2,_=l*l/(o*o)+c*c/(s*s);_>1&&(o*=Oi(_),s*=Oi(_));var g=(n===a?-1:1)*Oi((o*o*(s*s)-o*o*(c*c)-s*s*(l*l))/(o*o*(c*c)+s*s*(l*l)))||0,d=g*o*c/s,p=g*-s*l/o,y=(e+r)/2+be(v)*d-Te(v)*p,m=(t+i)/2+Te(v)*d+be(v)*p,T=ga([1,0],[(l-d)/o,(c-p)/s]),b=[(l-d)/o,(c-p)/s],w=[(-1*l-d)/o,(-1*c-p)/s],M=ga(b,w);if(an(b,w)<=-1&&(M=Yr),an(b,w)>=1&&(M=0),M<0){var C=Math.round(M/Yr*1e6)/1e6;M=Yr*2+C%2*Yr}u.addData(h,y,m,o,s,T,M,v,a)}var Hh=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,zh=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function kh(e){var t=new ur;if(!e)return t;var r=0,i=0,n=r,a=i,o,s=ur.CMD,f=e.match(Hh);if(!f)return t;for(var h=0;h<f.length;h++){for(var u=f[h],v=u.charAt(0),l=void 0,c=u.match(zh)||[],_=c.length,g=0;g<_;g++)c[g]=parseFloat(c[g]);for(var d=0;d<_;){var p=void 0,y=void 0,m=void 0,T=void 0,b=void 0,w=void 0,M=void 0,C=r,L=i,P=void 0,S=void 0;switch(v){case"l":r+=c[d++],i+=c[d++],l=s.L,t.addData(l,r,i);break;case"L":r=c[d++],i=c[d++],l=s.L,t.addData(l,r,i);break;case"m":r+=c[d++],i+=c[d++],l=s.M,t.addData(l,r,i),n=r,a=i,v="l";break;case"M":r=c[d++],i=c[d++],l=s.M,t.addData(l,r,i),n=r,a=i,v="L";break;case"h":r+=c[d++],l=s.L,t.addData(l,r,i);break;case"H":r=c[d++],l=s.L,t.addData(l,r,i);break;case"v":i+=c[d++],l=s.L,t.addData(l,r,i);break;case"V":i=c[d++],l=s.L,t.addData(l,r,i);break;case"C":l=s.C,t.addData(l,c[d++],c[d++],c[d++],c[d++],c[d++],c[d++]),r=c[d-2],i=c[d-1];break;case"c":l=s.C,t.addData(l,c[d++]+r,c[d++]+i,c[d++]+r,c[d++]+i,c[d++]+r,c[d++]+i),r+=c[d-2],i+=c[d-1];break;case"S":p=r,y=i,P=t.len(),S=t.data,o===s.C&&(p+=r-S[P-4],y+=i-S[P-3]),l=s.C,C=c[d++],L=c[d++],r=c[d++],i=c[d++],t.addData(l,p,y,C,L,r,i);break;case"s":p=r,y=i,P=t.len(),S=t.data,o===s.C&&(p+=r-S[P-4],y+=i-S[P-3]),l=s.C,C=r+c[d++],L=i+c[d++],r+=c[d++],i+=c[d++],t.addData(l,p,y,C,L,r,i);break;case"Q":C=c[d++],L=c[d++],r=c[d++],i=c[d++],l=s.Q,t.addData(l,C,L,r,i);break;case"q":C=c[d++]+r,L=c[d++]+i,r+=c[d++],i+=c[d++],l=s.Q,t.addData(l,C,L,r,i);break;case"T":p=r,y=i,P=t.len(),S=t.data,o===s.Q&&(p+=r-S[P-4],y+=i-S[P-3]),r=c[d++],i=c[d++],l=s.Q,t.addData(l,p,y,r,i);break;case"t":p=r,y=i,P=t.len(),S=t.data,o===s.Q&&(p+=r-S[P-4],y+=i-S[P-3]),r+=c[d++],i+=c[d++],l=s.Q,t.addData(l,p,y,r,i);break;case"A":m=c[d++],T=c[d++],b=c[d++],w=c[d++],M=c[d++],C=r,L=i,r=c[d++],i=c[d++],l=s.A,ya(C,L,r,i,w,M,m,T,b,l,t);break;case"a":m=c[d++],T=c[d++],b=c[d++],w=c[d++],M=c[d++],C=r,L=i,r+=c[d++],i+=c[d++],l=s.A,ya(C,L,r,i,w,M,m,T,b,l,t);break}}(v==="z"||v==="Z")&&(l=s.Z,t.addData(l),r=n,i=a),o=l}return t.toStatic(),t}var xo=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(r){},t}(X);function Ao(e){return e.setData!=null}function Eo(e,t){var r=kh(e),i=k({},t);return i.buildPath=function(n){if(Ao(n)){n.setData(r.data);var a=n.getContext();a&&n.rebuildPath(a,1)}else{var a=n;r.rebuildPath(a,1)}},i.applyTransform=function(n){Do(r,n),this.dirtyShape()},i}function uv(e,t){return new xo(Eo(e,t))}function vv(e,t){var r=Eo(e,t),i=function(n){H(a,n);function a(o){var s=n.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(xo);return i}function lv(e,t){for(var r=[],i=e.length,n=0;n<i;n++){var a=e[n];r.push(a.getUpdatedPathProxy(!0))}var o=new X(t);return o.createPathProxy(),o.buildPath=function(s){if(Ao(s)){s.appendPath(r);var f=s.getContext();f&&s.rebuildPath(f,1)}},o}function Io(e,t){t=t||{};var r=new X;return e.shape&&r.setShape(e.shape),r.setStyle(e.style),t.bakeTransform?Do(r.path,e.getComputedTransform()):t.toLocal?r.setLocalTransform(e.getComputedTransform()):r.copyTransform(e),r.buildPath=e.buildPath,r.applyTransform=r.applyTransform,r.z=e.z,r.z2=e.z2,r.zlevel=e.zlevel,r}var Nh=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Fo=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Nh},t.prototype.buildPath=function(r,i){r.moveTo(i.cx+i.r,i.cy),r.arc(i.cx,i.cy,i.r,0,Math.PI*2)},t}(X);Fo.prototype.type="circle";const cv=Fo;var Wh=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Oo=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Wh},t.prototype.buildPath=function(r,i){var n=.5522848,a=i.cx,o=i.cy,s=i.rx,f=i.ry,h=s*n,u=f*n;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-u,a-h,o-f,a,o-f),r.bezierCurveTo(a+h,o-f,a+s,o-u,a+s,o),r.bezierCurveTo(a+s,o+u,a+h,o+f,a,o+f),r.bezierCurveTo(a-h,o+f,a-s,o+u,a-s,o),r.closePath()},t}(X);Oo.prototype.type="ellipse";const dv=Oo;var Bo=Math.PI,Bi=Bo*2,er=Math.sin,gr=Math.cos,Yh=Math.acos,Q=Math.atan2,ma=Math.abs,te=Math.sqrt,Ur=Math.max,bt=Math.min,dt=1e-4;function Gh(e,t,r,i,n,a,o,s){var f=r-e,h=i-t,u=o-n,v=s-a,l=v*f-u*h;if(!(l*l<dt))return l=(u*(t-a)-v*(e-n))/l,[e+l*f,t+l*h]}function Ce(e,t,r,i,n,a,o){var s=e-r,f=t-i,h=(o?a:-a)/te(s*s+f*f),u=h*f,v=-h*s,l=e+u,c=t+v,_=r+u,g=i+v,d=(l+_)/2,p=(c+g)/2,y=_-l,m=g-c,T=y*y+m*m,b=n-a,w=l*g-_*c,M=(m<0?-1:1)*te(Ur(0,b*b*T-w*w)),C=(w*m-y*M)/T,L=(-w*y-m*M)/T,P=(w*m+y*M)/T,S=(-w*y+m*M)/T,R=C-d,A=L-p,x=P-d,E=S-p;return R*R+A*A>x*x+E*E&&(C=P,L=S),{cx:C,cy:L,x0:-u,y0:-v,x1:C*(n/b-1),y1:L*(n/b-1)}}function $h(e){var t;if(ee(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function Xh(e,t){var r,i=Ur(t.r,0),n=Ur(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var f=t.startAngle,h=t.endAngle;if(!(isNaN(f)||isNaN(h))){var u=t.cx,v=t.cy,l=!!t.clockwise,c=ma(h-f),_=c>Bi&&c%Bi;if(_>dt&&(c=_),!(i>dt))e.moveTo(u,v);else if(c>Bi-dt)e.moveTo(u+i*gr(f),v+i*er(f)),e.arc(u,v,i,f,h,!l),n>dt&&(e.moveTo(u+n*gr(h),v+n*er(h)),e.arc(u,v,n,h,f,l));else{var g=void 0,d=void 0,p=void 0,y=void 0,m=void 0,T=void 0,b=void 0,w=void 0,M=void 0,C=void 0,L=void 0,P=void 0,S=void 0,R=void 0,A=void 0,x=void 0,E=i*gr(f),D=i*er(f),z=n*gr(h),N=n*er(h),Y=c>dt;if(Y){var q=t.cornerRadius;q&&(r=$h(q),g=r[0],d=r[1],p=r[2],y=r[3]);var U=ma(i-n)/2;if(m=bt(U,p),T=bt(U,y),b=bt(U,g),w=bt(U,d),L=M=Ur(m,T),P=C=Ur(b,w),(M>dt||C>dt)&&(S=i*gr(h),R=i*er(h),A=n*gr(f),x=n*er(f),c<Bo)){var $=Gh(E,D,A,x,S,R,z,N);if($){var nt=E-$[0],at=D-$[1],Rt=S-$[0],Nt=R-$[1],Wt=1/er(Yh((nt*Rt+at*Nt)/(te(nt*nt+at*at)*te(Rt*Rt+Nt*Nt)))/2),Yt=te($[0]*$[0]+$[1]*$[1]);L=bt(M,(i-Yt)/(Wt+1)),P=bt(C,(n-Yt)/(Wt-1))}}}if(!Y)e.moveTo(u+E,v+D);else if(L>dt){var j=bt(p,L),Z=bt(y,L),I=Ce(A,x,E,D,i,j,l),O=Ce(S,R,z,N,i,Z,l);e.moveTo(u+I.cx+I.x0,v+I.cy+I.y0),L<M&&j===Z?e.arc(u+I.cx,v+I.cy,L,Q(I.y0,I.x0),Q(O.y0,O.x0),!l):(j>0&&e.arc(u+I.cx,v+I.cy,j,Q(I.y0,I.x0),Q(I.y1,I.x1),!l),e.arc(u,v,i,Q(I.cy+I.y1,I.cx+I.x1),Q(O.cy+O.y1,O.cx+O.x1),!l),Z>0&&e.arc(u+O.cx,v+O.cy,Z,Q(O.y1,O.x1),Q(O.y0,O.x0),!l))}else e.moveTo(u+E,v+D),e.arc(u,v,i,f,h,!l);if(!(n>dt)||!Y)e.lineTo(u+z,v+N);else if(P>dt){var j=bt(g,P),Z=bt(d,P),I=Ce(z,N,S,R,n,-Z,l),O=Ce(E,D,A,x,n,-j,l);e.lineTo(u+I.cx+I.x0,v+I.cy+I.y0),P<C&&j===Z?e.arc(u+I.cx,v+I.cy,P,Q(I.y0,I.x0),Q(O.y0,O.x0),!l):(Z>0&&e.arc(u+I.cx,v+I.cy,Z,Q(I.y0,I.x0),Q(I.y1,I.x1),!l),e.arc(u,v,n,Q(I.cy+I.y1,I.cx+I.x1),Q(O.cy+O.y1,O.cx+O.x1),l),j>0&&e.arc(u+O.cx,v+O.cy,j,Q(O.y1,O.x1),Q(O.y0,O.x0),!l))}else e.lineTo(u+z,v+N),e.arc(u,v,n,h,f,l)}e.closePath()}}}var qh=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),Ho=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new qh},t.prototype.buildPath=function(r,i){Xh(r,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(X);Ho.prototype.type="sector";const wa=Ho;var Zh=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),zo=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Zh},t.prototype.buildPath=function(r,i){var n=i.cx,a=i.cy,o=Math.PI*2;r.moveTo(n+i.r,a),r.arc(n,a,i.r,0,o,!1),r.moveTo(n+i.r0,a),r.arc(n,a,i.r0,0,o,!0)},t}(X);zo.prototype.type="ring";const pv=zo;function Uh(e,t,r,i){var n=[],a=[],o=[],s=[],f,h,u,v;if(i){u=[1/0,1/0],v=[-1/0,-1/0];for(var l=0,c=e.length;l<c;l++)Tr(u,u,e[l]),br(v,v,e[l]);Tr(u,u,i[0]),br(v,v,i[1])}for(var l=0,c=e.length;l<c;l++){var _=e[l];if(r)f=e[l?l-1:c-1],h=e[(l+1)%c];else if(l===0||l===c-1){n.push(Ts(e[l]));continue}else f=e[l-1],h=e[l+1];bs(a,h,f),ri(a,a,t);var g=ki(_,f),d=ki(_,h),p=g+d;p!==0&&(g/=p,d/=p),ri(o,a,-g),ri(s,a,d);var y=Ln([],_,o),m=Ln([],_,s);i&&(br(y,y,u),Tr(y,y,v),br(m,m,u),Tr(m,m,v)),n.push(y),n.push(m)}return r&&n.push(n.shift()),n}function ko(e,t,r){var i=t.smooth,n=t.points;if(n&&n.length>=2){if(i){var a=Uh(n,i,r,t.smoothConstraint);e.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(r?o:o-1);s++){var f=a[s*2],h=a[s*2+1],u=n[(s+1)%o];e.bezierCurveTo(f[0],f[1],h[0],h[1],u[0],u[1])}}else{e.moveTo(n[0][0],n[0][1]);for(var s=1,v=n.length;s<v;s++)e.lineTo(n[s][0],n[s][1])}r&&e.closePath()}}var Vh=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),No=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Vh},t.prototype.buildPath=function(r,i){ko(r,i,!0)},t}(X);No.prototype.type="polygon";const Qh=No;var Kh=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),Jh=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Kh},t.prototype.buildPath=function(r,i){ko(r,i,!1)},t}(X);Jh.prototype.type="polyline";var jh={},tu=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),Wo=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new tu},t.prototype.buildPath=function(r,i){var n,a,o,s;if(this.subPixelOptimize){var f=Lh(jh,i,this.style);n=f.x1,a=f.y1,o=f.x2,s=f.y2}else n=i.x1,a=i.y1,o=i.x2,s=i.y2;var h=i.percent;h!==0&&(r.moveTo(n,a),h<1&&(o=n*(1-h)+o*h,s=a*(1-h)+s*h),r.lineTo(o,s))},t.prototype.pointAt=function(r){var i=this.shape;return[i.x1*(1-r)+i.x2*r,i.y1*(1-r)+i.y2*r]},t}(X);Wo.prototype.type="line";const _v=Wo;var tt=[],ru=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function Ta(e,t,r){var i=e.cpx2,n=e.cpy2;return i!=null||n!=null?[(r?Hn:V)(e.x1,e.cpx1,e.cpx2,e.x2,t),(r?Hn:V)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(r?zn:K)(e.x1,e.cpx1,e.x2,t),(r?zn:K)(e.y1,e.cpy1,e.y2,t)]}var Yo=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ru},t.prototype.buildPath=function(r,i){var n=i.x1,a=i.y1,o=i.x2,s=i.y2,f=i.cpx1,h=i.cpy1,u=i.cpx2,v=i.cpy2,l=i.percent;l!==0&&(r.moveTo(n,a),u==null||v==null?(l<1&&(ze(n,f,o,l,tt),f=tt[1],o=tt[2],ze(a,h,s,l,tt),h=tt[1],s=tt[2]),r.quadraticCurveTo(f,h,o,s)):(l<1&&(kt(n,f,u,o,l,tt),f=tt[1],u=tt[2],o=tt[3],kt(a,h,v,s,l,tt),h=tt[1],v=tt[2],s=tt[3]),r.bezierCurveTo(f,h,u,v,o,s)))},t.prototype.pointAt=function(r){return Ta(this.shape,r,!1)},t.prototype.tangentAt=function(r){var i=Ta(this.shape,r,!0);return Ls(i,i)},t}(X);Yo.prototype.type="bezier-curve";const gv=Yo;var eu=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Go=function(e){H(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new eu},t.prototype.buildPath=function(r,i){var n=i.cx,a=i.cy,o=Math.max(i.r,0),s=i.startAngle,f=i.endAngle,h=i.clockwise,u=Math.cos(s),v=Math.sin(s);r.moveTo(u*o+n,v*o+a),r.arc(n,a,o,s,f,!h)},t}(X);Go.prototype.type="arc";const yv=Go;var iu=function(e){H(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="compound",r}return t.prototype._updatePathDirty=function(){for(var r=this.shape.paths,i=this.shapeChanged(),n=0;n<r.length;n++)i=i||r[n].shapeChanged();i&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<r.length;n++)r[n].path||r[n].createPathProxy(),r[n].path.setScale(i[0],i[1],r[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(r,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(r,n[a].shape,!0)},t.prototype.afterBrush=function(){for(var r=this.shape.paths||[],i=0;i<r.length;i++)r[i].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),X.prototype.getBoundingRect.call(this)},t}(X);const mv=iu;var nu=function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,r){this.colorStops.push({offset:t,color:r})},e}();const $o=nu;var wv=function(e){H(t,e);function t(r,i,n,a,o,s){var f=e.call(this,o)||this;return f.x=r??0,f.y=i??0,f.x2=n??1,f.y2=a??0,f.type="linear",f.global=s||!1,f}return t}($o),au=function(e){H(t,e);function t(r,i,n,a,o){var s=e.call(this,a)||this;return s.x=r??.5,s.y=i??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return t}($o);const Tv=au;var ir=[0,0],nr=[0,0],Me=new F,Le=new F,ou=function(){function e(t,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new F;for(var i=0;i<2;i++)this._axes[i]=new F;t&&this.fromBoundingRect(t,r)}return e.prototype.fromBoundingRect=function(t,r){var i=this._corners,n=this._axes,a=t.x,o=t.y,s=a+t.width,f=o+t.height;if(i[0].set(a,o),i[1].set(s,o),i[2].set(s,f),i[3].set(a,f),r)for(var h=0;h<4;h++)i[h].transform(r);F.sub(n[0],i[1],i[0]),F.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var h=0;h<2;h++)this._origin[h]=n[h].dot(i[0])},e.prototype.intersect=function(t,r){var i=!0,n=!r;return Me.set(1/0,1/0),Le.set(0,0),!this._intersectCheckOneSide(this,t,Me,Le,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(t,this,Me,Le,n,-1)&&(i=!1,n)||n||F.copy(r,i?Me:Le),i},e.prototype._intersectCheckOneSide=function(t,r,i,n,a,o){for(var s=!0,f=0;f<2;f++){var h=this._axes[f];if(this._getProjMinMaxOnAxis(f,t._corners,ir),this._getProjMinMaxOnAxis(f,r._corners,nr),ir[1]<nr[0]||ir[0]>nr[1]){if(s=!1,a)return s;var u=Math.abs(nr[0]-ir[1]),v=Math.abs(ir[0]-nr[1]);Math.min(u,v)>n.len()&&(u<v?F.scale(n,h,-u*o):F.scale(n,h,v*o))}else if(i){var u=Math.abs(nr[0]-ir[1]),v=Math.abs(ir[0]-nr[1]);Math.min(u,v)<i.len()&&(u<v?F.scale(i,h,u*o):F.scale(i,h,-v*o))}}return s},e.prototype._getProjMinMaxOnAxis=function(t,r,i){for(var n=this._axes[t],a=this._origin,o=r[0].dot(n)+a[t],s=o,f=o,h=1;h<r.length;h++){var u=r[h].dot(n)+a[t];s=Math.min(u,s),f=Math.max(u,f)}i[0]=s,i[1]=f},e}();const bv=ou;var su=[],fu=function(e){H(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return t.prototype.traverse=function(r,i){r.call(i,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(r,i){i?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},t.prototype.addDisplayables=function(r,i){i=i||!1;for(var n=0;n<r.length;n++)this.addDisplayable(r[n],i)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(r){for(var i=this._cursor;i<this._displayables.length;i++)r&&r(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)r&&r(this._temporaryDisplayables[i])},t.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var i=this._displayables[r];i.parent=this,i.update(),i.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var i=this._temporaryDisplayables[r];i.parent=this,i.update(),i.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new W(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(su)),r.union(a)}this._rect=r}return this._rect},t.prototype.contain=function(r,i){var n=this.transformCoordToLocal(r,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,i))return!0}return!1},t}(oe);const Cv=fu;var hu=Math.round(Math.random()*9),uu=typeof Object.defineProperty=="function",Mv=function(){function e(){this._id="__ec_inner_"+hu++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var i=this._guard(t);return uu?Object.defineProperty(i,this._id,{value:r,enumerable:!1,configurable:!0}):i[this._id]=r,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e}();function or(e){return isFinite(e)}function vu(e,t,r){var i=t.x==null?0:t.x,n=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(i=i*r.width+r.x,n=n*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),i=or(i)?i:0,n=or(n)?n:1,a=or(a)?a:0,o=or(o)?o:0;var s=e.createLinearGradient(i,a,n,o);return s}function lu(e,t,r){var i=r.width,n=r.height,a=Math.min(i,n),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,f=t.r==null?.5:t.r;t.global||(o=o*i+r.x,s=s*n+r.y,f=f*a),o=or(o)?o:.5,s=or(s)?s:.5,f=f>=0&&or(f)?f:.5;var h=e.createRadialGradient(o,s,0,o,s,f);return h}function on(e,t,r){for(var i=t.type==="radial"?lu(e,t,r):vu(e,t,r),n=t.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function cu(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function Pe(e){return parseInt(e,10)}function Se(e,t,r){var i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[i]!=null&&r[i]!=="auto")return parseFloat(r[i]);var s=document.defaultView.getComputedStyle(e);return(e[n]||Pe(s[i])||Pe(e.style[i]))-(Pe(s[a])||0)-(Pe(s[o])||0)|0}function du(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:De(e)?[e]:ee(e)?e:null}function Xo(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&du(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(r){var n=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;n&&n!==1&&(r=St(r,function(a){return a/n}),i/=n)}return[r,i]}var pu=new ur(!0);function We(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function ba(e){return typeof e=="string"&&e!=="none"}function Ye(e){var t=e.fill;return t!=null&&t!=="none"}function Ca(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function Ma(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function sn(e,t,r){var i=_o(t.image,t.__image,r);if(je(i)){var n=e.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*ws),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function _u(e,t,r,i){var n,a=We(r),o=Ye(r),s=r.strokePercent,f=s<1,h=!t.path;(!t.silent||f)&&h&&t.createPathProxy();var u=t.path||pu,v=t.__dirty;if(!i){var l=r.fill,c=r.stroke,_=o&&!!l.colorStops,g=a&&!!c.colorStops,d=o&&!!l.image,p=a&&!!c.image,y=void 0,m=void 0,T=void 0,b=void 0,w=void 0;(_||g)&&(w=t.getBoundingRect()),_&&(y=v?on(e,l,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(m=v?on(e,c,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=m),d&&(T=v||!t.__canvasFillPattern?sn(e,l,t):t.__canvasFillPattern,t.__canvasFillPattern=T),p&&(b=v||!t.__canvasStrokePattern?sn(e,c,t):t.__canvasStrokePattern,t.__canvasStrokePattern=T),_?e.fillStyle=y:d&&(T?e.fillStyle=T:o=!1),g?e.strokeStyle=m:p&&(b?e.strokeStyle=b:a=!1)}var M=t.getGlobalScale();u.setScale(M[0],M[1],t.segmentIgnoreThreshold);var C,L;e.setLineDash&&r.lineDash&&(n=Xo(t),C=n[0],L=n[1]);var P=!0;(h||v&mr)&&(u.setDPR(e.dpr),f?u.setContext(null):(u.setContext(e),P=!1),u.reset(),t.buildPath(u,t.shape,i),u.toStatic(),t.pathUpdated()),P&&u.rebuildPath(e,f?s:1),C&&(e.setLineDash(C),e.lineDashOffset=L),i||(r.strokeFirst?(a&&Ma(e,r),o&&Ca(e,r)):(o&&Ca(e,r),a&&Ma(e,r))),C&&e.setLineDash([])}function gu(e,t,r){var i=t.__image=_o(r.image,t.__image,t,t.onload);if(!(!i||!je(i))){var n=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),f=i.width/i.height;if(o==null&&s!=null?o=s*f:s==null&&o!=null?s=o/f:o==null&&s==null&&(o=i.width,s=i.height),r.sWidth&&r.sHeight){var h=r.sx||0,u=r.sy||0;e.drawImage(i,h,u,r.sWidth,r.sHeight,n,a,o,s)}else if(r.sx&&r.sy){var h=r.sx,u=r.sy,v=o-h,l=s-u;e.drawImage(i,h,u,v,l,n,a,o,s)}else e.drawImage(i,n,a,o,s)}}function yu(e,t,r){var i,n=r.text;if(n!=null&&(n+=""),n){e.font=r.font||hr,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(i=Xo(t),a=i[0],o=i[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(We(r)&&e.strokeText(n,r.x,r.y),Ye(r)&&e.fillText(n,r.x,r.y)):(Ye(r)&&e.fillText(n,r.x,r.y),We(r)&&e.strokeText(n,r.x,r.y)),a&&e.setLineDash([])}}var La=["shadowBlur","shadowOffsetX","shadowOffsetY"],Pa=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function qo(e,t,r,i,n){var a=!1;if(!i&&(r=r||{},t===r))return!1;if(i||t.opacity!==r.opacity){it(e,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?fr.opacity:o}(i||t.blend!==r.blend)&&(a||(it(e,n),a=!0),e.globalCompositeOperation=t.blend||fr.blend);for(var s=0;s<La.length;s++){var f=La[s];(i||t[f]!==r[f])&&(a||(it(e,n),a=!0),e[f]=e.dpr*(t[f]||0))}return(i||t.shadowColor!==r.shadowColor)&&(a||(it(e,n),a=!0),e.shadowColor=t.shadowColor||fr.shadowColor),a}function Sa(e,t,r,i,n){var a=ae(t,n.inHover),o=i?null:r&&ae(r,n.inHover)||{};if(a===o)return!1;var s=qo(e,a,o,i,n);if((i||a.fill!==o.fill)&&(s||(it(e,n),s=!0),ba(a.fill)&&(e.fillStyle=a.fill)),(i||a.stroke!==o.stroke)&&(s||(it(e,n),s=!0),ba(a.stroke)&&(e.strokeStyle=a.stroke)),(i||a.opacity!==o.opacity)&&(s||(it(e,n),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var f=a.lineWidth,h=f/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==h&&(s||(it(e,n),s=!0),e.lineWidth=h)}for(var u=0;u<Pa.length;u++){var v=Pa[u],l=v[0];(i||a[l]!==o[l])&&(s||(it(e,n),s=!0),e[l]=a[l]||v[1])}return s}function mu(e,t,r,i,n){return qo(e,ae(t,n.inHover),r&&ae(r,n.inHover),i,n)}function Zo(e,t){var r=t.transform,i=e.dpr||1;r?e.setTransform(i*r[0],i*r[1],i*r[2],i*r[3],i*r[4],i*r[5]):e.setTransform(i,0,0,i,0,0)}function wu(e,t,r){for(var i=!1,n=0;n<e.length;n++){var a=e[n];i=i||a.isZeroArea(),Zo(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=i}function Tu(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var Ra=1,Da=2,xa=3,Aa=4;function bu(e){var t=Ye(e),r=We(e);return!(e.lineDash||!(+t^+r)||t&&typeof e.fill!="string"||r&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function it(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function ae(e,t){return t&&e.__hoverStyle||e.style}function Cu(e,t){sr(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function sr(e,t,r,i){var n=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~ot,t.__isRendered=!1;return}var a=t.__clipPaths,o=r.prevElClipPaths,s=!1,f=!1;if((!o||cu(a,o))&&(o&&o.length&&(it(e,r),e.restore(),f=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(it(e,r),e.save(),wu(a,e,r),s=!0),r.prevElClipPaths=a),r.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var h=r.prevEl;h||(f=s=!0);var u=t instanceof X&&t.autoBatch&&bu(t.style);s||Tu(n,h.transform)?(it(e,r),Zo(e,t)):u||it(e,r);var v=ae(t,r.inHover);t instanceof X?(r.lastDrawType!==Ra&&(f=!0,r.lastDrawType=Ra),Sa(e,t,h,f,r),(!u||!r.batchFill&&!r.batchStroke)&&e.beginPath(),_u(e,t,v,u),u&&(r.batchFill=v.fill||"",r.batchStroke=v.stroke||"")):t instanceof nn?(r.lastDrawType!==xa&&(f=!0,r.lastDrawType=xa),Sa(e,t,h,f,r),yu(e,t,v)):t instanceof Lo?(r.lastDrawType!==Da&&(f=!0,r.lastDrawType=Da),mu(e,t,h,f,r),gu(e,t,v)):t.getTemporalDisplayables&&(r.lastDrawType!==Aa&&(f=!0,r.lastDrawType=Aa),Mu(e,t,r)),u&&i&&it(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function Mu(e,t,r){var i=t.getDisplayables(),n=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=t.getCursor(),s=i.length;o<s;o++){var f=i[o];f.beforeBrush&&f.beforeBrush(),f.innerBeforeBrush(),sr(e,f,a,o===s-1),f.innerAfterBrush(),f.afterBrush&&f.afterBrush(),a.prevEl=f}for(var h=0,u=n.length;h<u;h++){var f=n[h];f.beforeBrush&&f.beforeBrush(),f.innerBeforeBrush(),sr(e,f,a,h===u-1),f.innerAfterBrush(),f.afterBrush&&f.afterBrush(),a.prevEl=f}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Ct=ur.CMD;function Pr(e,t){return Math.abs(e-t)<1e-5}function fn(e){var t=e.data,r=e.len(),i=[],n,a=0,o=0,s=0,f=0;function h(A,x){n&&n.length>2&&i.push(n),n=[A,x]}function u(A,x,E,D){Pr(A,E)&&Pr(x,D)||n.push(A,x,E,D,E,D)}function v(A,x,E,D,z,N){var Y=Math.abs(x-A),q=Math.tan(Y/4)*4/3,U=x<A?-1:1,$=Math.cos(A),nt=Math.sin(A),at=Math.cos(x),Rt=Math.sin(x),Nt=$*z+E,Wt=nt*N+D,Yt=at*z+E,j=Rt*N+D,Z=z*q*U,I=N*q*U;n.push(Nt-Z*nt,Wt+I*$,Yt+Z*Rt,j-I*at,Yt,j)}for(var l,c,_,g,d=0;d<r;){var p=t[d++],y=d===1;switch(y&&(a=t[d],o=t[d+1],s=a,f=o,(p===Ct.L||p===Ct.C||p===Ct.Q)&&(n=[s,f])),p){case Ct.M:a=s=t[d++],o=f=t[d++],h(s,f);break;case Ct.L:l=t[d++],c=t[d++],u(a,o,l,c),a=l,o=c;break;case Ct.C:n.push(t[d++],t[d++],t[d++],t[d++],a=t[d++],o=t[d++]);break;case Ct.Q:l=t[d++],c=t[d++],_=t[d++],g=t[d++],n.push(a+2/3*(l-a),o+2/3*(c-o),_+2/3*(l-_),g+2/3*(c-g),_,g),a=_,o=g;break;case Ct.A:var m=t[d++],T=t[d++],b=t[d++],w=t[d++],M=t[d++],C=t[d++]+M;d+=1;var L=!t[d++];l=Math.cos(M)*b+m,c=Math.sin(M)*w+T,y?(s=l,f=c,h(s,f)):u(a,o,l,c),a=Math.cos(C)*b+m,o=Math.sin(C)*w+T;for(var P=(L?-1:1)*Math.PI/2,S=M;L?S>C:S<C;S+=P){var R=L?Math.max(S+P,C):Math.min(S+P,C);v(S,R,m,T,b,w)}break;case Ct.R:s=a=t[d++],f=o=t[d++],l=s+t[d++],c=f+t[d++],h(l,f),u(l,f,l,c),u(l,c,s,c),u(s,c,s,f),u(s,f,l,f);break;case Ct.Z:n&&u(a,o,s,f),a=s,o=f;break}}return n&&n.length>2&&i.push(n),i}function hn(e,t,r,i,n,a,o,s,f,h){if(Pr(e,r)&&Pr(t,i)&&Pr(n,o)&&Pr(a,s)){f.push(o,s);return}var u=2/h,v=u*u,l=o-e,c=s-t,_=Math.sqrt(l*l+c*c);l/=_,c/=_;var g=r-e,d=i-t,p=n-o,y=a-s,m=g*g+d*d,T=p*p+y*y;if(m<v&&T<v){f.push(o,s);return}var b=l*g+c*d,w=-l*p-c*y,M=m-b*b,C=T-w*w;if(M<v&&b>=0&&C<v&&w>=0){f.push(o,s);return}var L=[],P=[];kt(e,r,n,o,.5,L),kt(t,i,a,s,.5,P),hn(L[0],P[0],L[1],P[1],L[2],P[2],L[3],P[3],f,h),hn(L[4],P[4],L[5],P[5],L[6],P[6],L[7],P[7],f,h)}function Lu(e,t){var r=fn(e),i=[];t=t||1;for(var n=0;n<r.length;n++){var a=r[n],o=[],s=a[0],f=a[1];o.push(s,f);for(var h=2;h<a.length;){var u=a[h++],v=a[h++],l=a[h++],c=a[h++],_=a[h++],g=a[h++];hn(s,f,u,v,l,c,_,g,o,t),s=_,f=g}i.push(o)}return i}function Uo(e,t,r){var i=e[t],n=e[1-t],a=Math.abs(i/n),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var f=[],h=0;h<o;h++)f.push(s);var u=o*s,v=r-u;if(v>0)for(var h=0;h<v;h++)f[h%o]+=1;return f}function Ea(e,t,r){for(var i=e.r0,n=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),f=s*n,h=n-i,u=f>Math.abs(h),v=Uo([f,h],u?0:1,t),l=(u?s:h)/v.length,c=0;c<v.length;c++)for(var _=(u?h:s)/v[c],g=0;g<v[c];g++){var d={};u?(d.startAngle=a+l*c,d.endAngle=a+l*(c+1),d.r0=i+_*g,d.r=i+_*(g+1)):(d.startAngle=a+_*g,d.endAngle=a+_*(g+1),d.r0=i+l*c,d.r=i+l*(c+1)),d.clockwise=e.clockwise,d.cx=e.cx,d.cy=e.cy,r.push(d)}}function Pu(e,t,r){for(var i=e.width,n=e.height,a=i>n,o=Uo([i,n],a?0:1,t),s=a?"width":"height",f=a?"height":"width",h=a?"x":"y",u=a?"y":"x",v=e[s]/o.length,l=0;l<o.length;l++)for(var c=e[f]/o[l],_=0;_<o[l];_++){var g={};g[h]=l*v,g[u]=_*c,g[s]=v,g[f]=c,g.x+=e.x,g.y+=e.y,r.push(g)}}function Ia(e,t,r,i){return e*i-r*t}function Su(e,t,r,i,n,a,o,s){var f=r-e,h=i-t,u=o-n,v=s-a,l=Ia(u,v,f,h);if(Math.abs(l)<1e-6)return null;var c=e-n,_=t-a,g=Ia(c,_,u,v)/l;return g<0||g>1?null:new F(g*f+e,g*h+t)}function Ru(e,t,r){var i=new F;F.sub(i,r,t),i.normalize();var n=new F;F.sub(n,e,t);var a=n.dot(i);return a}function yr(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function Du(e,t,r){for(var i=e.length,n=[],a=0;a<i;a++){var o=e[a],s=e[(a+1)%i],f=Su(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);f&&n.push({projPt:Ru(f,t,r),pt:f,idx:a})}if(n.length<2)return[{points:e},{points:e}];n.sort(function(d,p){return d.projPt-p.projPt});var h=n[0],u=n[n.length-1];if(u.idx<h.idx){var v=h;h=u,u=v}for(var l=[h.pt.x,h.pt.y],c=[u.pt.x,u.pt.y],_=[l],g=[c],a=h.idx+1;a<=u.idx;a++)yr(_,e[a].slice());yr(_,c),yr(_,l);for(var a=u.idx+1;a<=h.idx+i;a++)yr(g,e[a%i].slice());return yr(g,l),yr(g,c),[{points:_},{points:g}]}function Fa(e){var t=e.points,r=[],i=[];wo(t,r,i);var n=new W(r[0],r[1],i[0]-r[0],i[1]-r[1]),a=n.width,o=n.height,s=n.x,f=n.y,h=new F,u=new F;return a>o?(h.x=u.x=s+a/2,h.y=f,u.y=f+o):(h.y=u.y=f+o/2,h.x=s,u.x=s+a),Du(t,h,u)}function Ge(e,t,r,i){if(r===1)i.push(t);else{var n=Math.floor(r/2),a=e(t);Ge(e,a[0],n,i),Ge(e,a[1],r-n,i)}return i}function xu(e,t){for(var r=[],i=0;i<t;i++)r.push(Io(e));return r}function Au(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function Eu(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function Iu(e,t){var r=[],i=e.shape,n;switch(e.type){case"rect":Pu(i,t,r),n=So;break;case"sector":Ea(i,t,r),n=wa;break;case"circle":Ea({r0:0,r:i.r,startAngle:0,endAngle:Math.PI*2,cx:i.cx,cy:i.cy},t,r),n=wa;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=St(Lu(e.getUpdatedPathProxy(),o),function(p){return Eu(p)}),f=s.length;if(f===0)Ge(Fa,{points:s[0]},t,r);else if(f===t)for(var h=0;h<f;h++)r.push({points:s[h]});else{var u=0,v=St(s,function(p){var y=[],m=[];wo(p,y,m);var T=(m[1]-y[1])*(m[0]-y[0]);return u+=T,{poly:p,area:T}});v.sort(function(p,y){return y.area-p.area});for(var l=t,h=0;h<f;h++){var c=v[h];if(l<=0)break;var _=h===f-1?l:Math.ceil(c.area/u*t);_<0||(Ge(Fa,{points:c.poly},_,r),l-=_)}}n=Qh;break}if(!n)return xu(e,t);for(var g=[],h=0;h<r.length;h++){var d=new n;d.setShape(r[h]),Au(e,d),g.push(d)}return g}function Fu(e,t){var r=e.length,i=t.length;if(r===i)return[e,t];for(var n=[],a=[],o=r<i?e:t,s=Math.min(r,i),f=Math.abs(i-r)/6,h=(s-2)/6,u=Math.ceil(f/h)+1,v=[o[0],o[1]],l=f,c=2;c<s;){var _=o[c-2],g=o[c-1],d=o[c++],p=o[c++],y=o[c++],m=o[c++],T=o[c++],b=o[c++];if(l<=0){v.push(d,p,y,m,T,b);continue}for(var w=Math.min(l,u-1)+1,M=1;M<=w;M++){var C=M/w;kt(_,d,y,T,C,n),kt(g,p,m,b,C,a),_=n[3],g=a[3],v.push(n[1],a[1],n[2],a[2],_,g),d=n[5],p=a[5],y=n[6],m=a[6]}l-=w-1}return o===e?[v,t]:[e,v]}function Oa(e,t){for(var r=e.length,i=e[r-2],n=e[r-1],a=[],o=0;o<t.length;)a[o++]=i,a[o++]=n;return a}function Ou(e,t){for(var r,i,n,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var f=e[s],h=t[s],u=void 0,v=void 0;f?h?(r=Fu(f,h),u=r[0],v=r[1],i=u,n=v):(v=Oa(n||f,f),u=f):(u=Oa(i||h,h),v=h),a.push(u),o.push(v)}return[a,o]}function Ba(e){for(var t=0,r=0,i=0,n=e.length,a=0,o=n-2;a<n;o=a,a+=2){var s=e[o],f=e[o+1],h=e[a],u=e[a+1],v=s*u-h*f;t+=v,r+=(s+h)*v,i+=(f+u)*v}return t===0?[e[0]||0,e[1]||0]:[r/t/3,i/t/3,t]}function Bu(e,t,r,i){for(var n=(e.length-2)/6,a=1/0,o=0,s=e.length,f=s-2,h=0;h<n;h++){for(var u=h*6,v=0,l=0;l<s;l+=2){var c=l===0?u:(u+l-2)%f+2,_=e[c]-r[0],g=e[c+1]-r[1],d=t[l]-i[0],p=t[l+1]-i[1],y=d-_,m=p-g;v+=y*y+m*m}v<a&&(a=v,o=h)}return o}function Hu(e){for(var t=[],r=e.length,i=0;i<r;i+=2)t[i]=e[r-i-2],t[i+1]=e[r-i-1];return t}function zu(e,t,r,i){for(var n=[],a,o=0;o<e.length;o++){var s=e[o],f=t[o],h=Ba(s),u=Ba(f);a==null&&(a=h[2]<0!=u[2]<0);var v=[],l=[],c=0,_=1/0,g=[],d=s.length;a&&(s=Hu(s));for(var p=Bu(s,f,h,u)*6,y=d-2,m=0;m<y;m+=2){var T=(p+m)%y+2;v[m+2]=s[T]-h[0],v[m+3]=s[T+1]-h[1]}if(v[0]=s[p]-h[0],v[1]=s[p+1]-h[1],r>0)for(var b=i/r,w=-i/2;w<=i/2;w+=b){for(var M=Math.sin(w),C=Math.cos(w),L=0,m=0;m<s.length;m+=2){var P=v[m],S=v[m+1],R=f[m]-u[0],A=f[m+1]-u[1],x=R*C-A*M,E=R*M+A*C;g[m]=x,g[m+1]=E;var D=x-P,z=E-S;L+=D*D+z*z}if(L<_){_=L,c=w;for(var N=0;N<g.length;N++)l[N]=g[N]}}else for(var Y=0;Y<d;Y+=2)l[Y]=f[Y]-u[0],l[Y+1]=f[Y+1]-u[1];n.push({from:v,to:l,fromCp:h,toCp:u,rotation:-c})}return n}function un(e){return e.__isCombineMorphing}var Vo="__mOriginal_";function $e(e,t,r){var i=Vo+t,n=e[i]||e[t];e[i]||(e[i]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var f=arguments,h;return s&&s.apply(this,f),a?h=a.apply(this,f):h=n.apply(this,f),o&&o.apply(this,f),h}}function re(e,t){var r=Vo+t;e[r]&&(e[t]=e[r],e[r]=null)}function Ha(e,t){for(var r=0;r<e.length;r++)for(var i=e[r],n=0;n<i.length;){var a=i[n],o=i[n+1];i[n++]=t[0]*a+t[2]*o+t[4],i[n++]=t[1]*a+t[3]*o+t[5]}}function Qo(e,t){var r=e.getUpdatedPathProxy(),i=t.getUpdatedPathProxy(),n=Ou(fn(r),fn(i)),a=n[0],o=n[1],s=e.getComputedTransform(),f=t.getComputedTransform();function h(){this.transform=null}s&&Ha(a,s),f&&Ha(o,f),$e(t,"updateTransform",{replace:h}),t.transform=null;var u=zu(a,o,10,Math.PI),v=[];$e(t,"buildPath",{replace:function(l){for(var c=t.__morphT,_=1-c,g=[],d=0;d<u.length;d++){var p=u[d],y=p.from,m=p.to,T=p.rotation*c,b=p.fromCp,w=p.toCp,M=Math.sin(T),C=Math.cos(T);Rs(g,b,w,c);for(var L=0;L<y.length;L+=2){var P=y[L],S=y[L+1],R=m[L],A=m[L+1],x=P*_+R*c,E=S*_+A*c;v[L]=x*C-E*M+g[0],v[L+1]=x*M+E*C+g[1]}var D=v[0],z=v[1];l.moveTo(D,z);for(var L=2;L<y.length;){var R=v[L++],A=v[L++],N=v[L++],Y=v[L++],q=v[L++],U=v[L++];D===R&&z===A&&N===q&&Y===U?l.lineTo(q,U):l.bezierCurveTo(R,A,N,Y,q,U),D=q,z=U}}}})}function Ko(e,t,r){if(!e||!t)return t;var i=r.done,n=r.during;Qo(e,t),t.__morphT=0;function a(){re(t,"buildPath"),re(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},gt({during:function(o){t.dirtyShape(),n&&n(o)},done:function(){a(),i&&i()}},r)),t}function ku(e,t,r,i,n,a){var o=16;e=n===r?0:Math.round(32767*(e-r)/(n-r)),t=a===i?0:Math.round(32767*(t-i)/(a-i));for(var s=0,f,h=(1<<o)/2;h>0;h/=2){var u=0,v=0;(e&h)>0&&(u=1),(t&h)>0&&(v=1),s+=h*h*(3*u^v),v===0&&(u===1&&(e=h-1-e,t=h-1-t),f=e,e=t,t=f)}return s}function Xe(e){var t=1/0,r=1/0,i=-1/0,n=-1/0,a=St(e,function(s){var f=s.getBoundingRect(),h=s.getComputedTransform(),u=f.x+f.width/2+(h?h[4]:0),v=f.y+f.height/2+(h?h[5]:0);return t=Math.min(u,t),r=Math.min(v,r),i=Math.max(u,i),n=Math.max(v,n),[u,v]}),o=St(a,function(s,f){return{cp:s,z:ku(s[0],s[1],t,r,i,n),path:e[f]}});return o.sort(function(s,f){return s.z-f.z}).map(function(s){return s.path})}function Jo(e){return Iu(e.path,e.count)}function vn(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Lv(e,t,r){var i=[];function n(b){for(var w=0;w<b.length;w++){var M=b[w];un(M)?n(M.childrenRef()):M instanceof X&&i.push(M)}}n(e);var a=i.length;if(!a)return vn();var o=r.dividePath||Jo,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),vn();i=Xe(i),s=Xe(s);for(var f=r.done,h=r.during,u=r.individualDelay,v=new mn,l=0;l<a;l++){var c=i[l],_=s[l];_.parent=t,_.copyTransform(v),u||Qo(c,_)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function g(b){for(var w=0;w<s.length;w++)s[w].addSelfToZr(b)}$e(t,"addSelfToZr",{after:function(b){g(b)}}),$e(t,"removeSelfFromZr",{after:function(b){for(var w=0;w<s.length;w++)s[w].removeSelfFromZr(b)}});function d(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,re(t,"addSelfToZr"),re(t,"removeSelfFromZr")}var p=s.length;if(u)for(var y=p,m=function(){y--,y===0&&(d(),f&&f())},l=0;l<p;l++){var T=u?gt({delay:(r.delay||0)+u(l,p,i[l],s[l]),done:m},r):r;Ko(i[l],s[l],T)}else t.__morphT=0,t.animateTo({__morphT:1},gt({during:function(b){for(var w=0;w<p;w++){var M=s[w];M.__morphT=t.__morphT,M.dirtyShape()}h&&h(b)},done:function(){d();for(var b=0;b<e.length;b++)re(e[b],"updateTransform");f&&f()}},r));return t.__zr&&g(t.__zr),{fromIndividuals:i,toIndividuals:s,count:p}}function Pv(e,t,r){var i=t.length,n=[],a=r.dividePath||Jo;function o(c){for(var _=0;_<c.length;_++){var g=c[_];un(g)?o(g.childrenRef()):g instanceof X&&n.push(g)}}if(un(e)){o(e.childrenRef());var s=n.length;if(s<i)for(var f=0,h=s;h<i;h++)n.push(Io(n[f++%s]));n.length=i}else{n=a({path:e,count:i});for(var u=e.getComputedTransform(),h=0;h<n.length;h++)n[h].setLocalTransform(u);if(n.length!==i)return console.error("Invalid morphing: unmatched splitted path"),vn()}n=Xe(n),t=Xe(t);for(var v=r.individualDelay,h=0;h<i;h++){var l=v?gt({delay:(r.delay||0)+v(h,i,n[h],t[h])},r):r;Ko(n[h],t[h],l)}return{fromIndividuals:n,toIndividuals:t,count:t.length}}function za(e,t,r){var i=qe.createCanvas(),n=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",e)),i.width=n*r,i.height=a*r,i}var Nu=function(e){H(t,e);function t(r,i,n){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;n=n||Ne,typeof r=="string"?o=za(r,i,n):Ft(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(Za(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=n,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=za("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,f=!1,h=new W(0,0,0,0);function u(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var m=new W(0,0,0,0);m.copy(y),o.push(m)}else{for(var T=!1,b=1/0,w=0,M=0;M<o.length;++M){var C=o[M];if(C.intersect(y)){var L=new W(0,0,0,0);L.copy(C),L.union(y),o[M]=L,T=!0;break}else if(f){h.copy(y),h.union(C);var P=y.width*y.height,S=C.width*C.height,R=h.width*h.height,A=R-P-S;A<b&&(b=A,w=M)}}if(f&&(o[w].union(y),T=!0),!T){var m=new W(0,0,0,0);m.copy(y),o.push(m)}f||(f=o.length>=s)}}for(var v=this.__startIndex;v<this.__endIndex;++v){var l=r[v];if(l){var c=l.shouldBePainted(n,a,!0,!0),_=l.__isRendered&&(l.__dirty&ot||!c)?l.getPrevPaintRect():null;_&&u(_);var g=c&&(l.__dirty&ot||!l.__isRendered)?l.getPaintRect():null;g&&u(g)}}for(var v=this.__prevStartIndex;v<this.__prevEndIndex;++v){var l=i[v],c=l&&l.shouldBePainted(n,a,!0,!0);if(l&&(!c||!l.__zr)&&l.__isRendered){var _=l.getPrevPaintRect();_&&u(_)}}var d;do{d=!1;for(var v=0;v<o.length;){if(o[v].isZero()){o.splice(v,1);continue}for(var p=v+1;p<o.length;)o[v].intersect(o[p])?(d=!0,o[v].union(o[p]),o.splice(p,1)):p++;v++}}while(d);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,i){var n=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=i+"px"),a.width=r*n,a.height=i*n,s&&(s.width=r*n,s.height=i*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(r,i,n){var a=this.dom,o=this.ctx,s=a.width,f=a.height;i=i||this.clearColor;var h=this.motionBlur&&!r,u=this.lastFrameAlpha,v=this.dpr,l=this;h&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/v,f/v));var c=this.domBack;function _(g,d,p,y){if(o.clearRect(g,d,p,y),i&&i!=="transparent"){var m=void 0;if(Qe(i)){var T=i.global||i.__width===p&&i.__height===y;m=T&&i.__canvasGradient||on(o,i,{x:0,y:0,width:p,height:y}),i.__canvasGradient=m,i.__width=p,i.__height=y}else ds(i)&&(i.scaleX=i.scaleX||v,i.scaleY=i.scaleY||v,m=sn(o,i,{dirty:function(){l.setUnpainted(),l.painter.refresh()}}));o.save(),o.fillStyle=m||i,o.fillRect(g,d,p,y),o.restore()}h&&(o.save(),o.globalAlpha=u,o.drawImage(c,g,d,p,y),o.restore())}!n||h?_(0,0,s,f):n.length&&ft(n,function(g){_(g.x*v,g.y*v,g.width*v,g.height*v)})},t}(Ir);const Hi=Nu;var ka=1e5,ar=314159,Re=.01,Wu=.001;function Yu(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function Gu(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var $u=function(){function e(t,r,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=i=k({},i||{}),this.dpr=i.devicePixelRatio||Ne,this._singleCanvas=a,this.root=t;var o=t.style;o&&(Za(t),t.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var f=this._layers;if(a){var u=t,v=u.width,l=u.height;i.width!=null&&(v=i.width),i.height!=null&&(l=i.height),this.dpr=i.devicePixelRatio||1,u.width=v*this.dpr,u.height=l*this.dpr,this._width=v,this._height=l;var c=new Hi(u,this,this.dpr);c.__builtin__=!0,c.initContext(),f[ar]=c,c.zlevel=ar,s.push(ar),this._domRoot=t}else{this._width=Se(t,0,i),this._height=Se(t,1,i);var h=this._domRoot=Gu(this._width,this._height);t.appendChild(h)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,i,t,this._redrawId);for(var a=0;a<n.length;a++){var o=n[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var f=a===0?this._backgroundColor:null;s.refresh(f)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,i=this._hoverlayer;if(i&&i.clear(),!!r){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=t[o];s.__inHover&&(i||(i=this._hoverlayer=this.getLayer(ka)),a||(a=i.ctx,a.save()),sr(a,s,n,o===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(ka)},e.prototype.paintOne=function(t,r){Cu(t,r)},e.prototype._paintList=function(t,r,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,i),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(h){h.afterBrush&&h.afterBrush()});else{var f=this;Gi(function(){f._paintList(t,r,i,n)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(ar).ctx,r=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,r,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,r,i)})},e.prototype._doPaintList=function(t,r,i){for(var n=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var f=this._zlevelList[s],h=this._layers[f];h.__builtin__&&h!==this._hoverlayer&&(h.__dirty||i)&&a.push(h)}for(var u=!0,v=!1,l=function(g){var d=a[g],p=d.ctx,y=o&&d.createRepaintRects(t,r,c._width,c._height),m=i?d.__startIndex:d.__drawIndex,T=!i&&d.incremental&&Date.now,b=T&&Date.now(),w=d.zlevel===c._zlevelList[0]?c._backgroundColor:null;if(d.__startIndex===d.__endIndex)d.clear(!1,w,y);else if(m===d.__startIndex){var M=t[m];(!M.incremental||!M.notClear||i)&&d.clear(!1,w,y)}m===-1&&(console.error("For some unknown reason. drawIndex is -1"),m=d.__startIndex);var C,L=function(A){var x={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(C=m;C<d.__endIndex;C++){var E=t[C];if(E.__inHover&&(v=!0),n._doPaintEl(E,d,o,A,x,C===d.__endIndex-1),T){var D=Date.now()-b;if(D>15)break}}x.prevElClipPaths&&p.restore()};if(y)if(y.length===0)C=d.__endIndex;else for(var P=c.dpr,S=0;S<y.length;++S){var R=y[S];p.save(),p.beginPath(),p.rect(R.x*P,R.y*P,R.width*P,R.height*P),p.clip(),L(R),p.restore()}else p.save(),L(),p.restore();d.__drawIndex=C,d.__drawIndex<d.__endIndex&&(u=!1)},c=this,_=0;_<a.length;_++)l(_);return G.wxa&&ft(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:u,needsRefreshHover:v}},e.prototype._doPaintEl=function(t,r,i,n,a,o){var s=r.ctx;if(i){var f=t.getPaintRect();(!n||f&&f.intersect(n))&&(sr(s,t,a,o),t.setPrevPaintRect(f))}else sr(s,t,a,o)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ar);var i=this._layers[t];return i||(i=new Hi("zr_"+t,this,this.dpr),i.zlevel=t,i.__builtin__=!0,this._layerConfig[t]?Gr(i,this._layerConfig[t],!0):this._layerConfig[t-Re]&&Gr(i,this._layerConfig[t-Re],!0),r&&(i.virtual=r),this.insertLayer(t,i),i.initContext()),i},e.prototype.insertLayer=function(t,r){var i=this._layers,n=this._zlevelList,a=n.length,o=this._domRoot,s=null,f=-1;if(!i[t]&&Yu(r)){if(a>0&&t>n[0]){for(f=0;f<a-1&&!(n[f]<t&&n[f+1]>t);f++);s=i[n[f]]}if(n.splice(f+1,0,t),i[t]=r,!r.virtual)if(s){var h=s.dom;h.nextSibling?o.insertBefore(r.dom,h.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],o=this._layers[a];o.__builtin__&&t.call(r,o,a)}},e.prototype.eachOtherLayer=function(t,r){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],o=this._layers[a];o.__builtin__||t.call(r,o,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(v,l){v.__dirty=v.__used=!1});function r(v){a&&(a.__endIndex!==v&&(a.__dirty=!0),a.__endIndex=v)}if(this._singleCanvas)for(var i=1;i<t.length;i++){var n=t[i];if(n.zlevel!==t[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,f;for(f=0;f<t.length;f++){var n=t[f],h=n.zlevel,u=void 0;s!==h&&(s=h,o=0),n.incremental?(u=this.getLayer(h+Wu,this._needsManuallyCompositing),u.incremental=!0,o=1):u=this.getLayer(h+(o>0?Re:0),this._needsManuallyCompositing),u.__builtin__||pn("ZLevel "+h+" has been used by unkown layer "+u.id),u!==a&&(u.__used=!0,u.__startIndex!==f&&(u.__dirty=!0),u.__startIndex=f,u.incremental?u.__drawIndex=-1:u.__drawIndex=f,r(f),a=u),n.__dirty&ot&&!n.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=f))}r(f),this.eachBuiltinLayer(function(v,l){!v.__used&&v.getElementCount()>0&&(v.__dirty=!0,v.__startIndex=v.__endIndex=v.__drawIndex=0),v.__dirty&&v.__drawIndex<0&&(v.__drawIndex=v.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,ft(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var i=this._layerConfig;i[t]?Gr(i[t],r,!0):i[t]=r;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];if(a===t||a===t+Re){var o=this._layers[a];Gr(o,i[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,i=this._zlevelList,n=r[t];n&&(n.dom.parentNode.removeChild(n.dom),delete r[t],i.splice(Mt(i,t),1))},e.prototype.resize=function(t,r){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,a=this.root;if(t!=null&&(n.width=t),r!=null&&(n.height=r),t=Se(a,0,n),r=Se(a,1,n),i.style.display="",this._width!==t||r!==this._height){i.style.width=t+"px",i.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(ar).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[ar].dom;var r=new Hi("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var i=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=r.dom.width,a=r.dom.height;this.eachLayer(function(v){v.__builtin__?i.drawImage(v.dom,0,0,n,a):v.renderToCanvas&&(i.save(),v.renderToCanvas(i),i.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),f=0,h=s.length;f<h;f++){var u=s[f];sr(i,u,o,f===h-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();const Sv=$u;export{$r as $,Gs as A,ai as B,Zs as C,Qr as D,vv as E,cv as F,dv as G,Qh as H,Jh as I,So as J,gv as K,_v as L,yv as M,W as N,mv as O,X as P,co as Q,pv as R,wa as S,mn as T,Cv as U,wv as V,bv as W,F as X,Tv as Y,Lo as Z,hv as _,Mt as a,Gr as a0,xr as a1,Ga as a2,nv as a3,_s as a4,Uu as a5,cs as a6,Cn as a7,Zu as a8,ju as a9,zi as aA,zs as aB,pt as aC,iv as aD,zt as aE,gn as aF,Qu as aG,eo as aH,V as aI,av as aJ,oh as aK,xe as aL,un as aM,Ko as aN,Lv as aO,Pv as aP,Io as aQ,oe as aR,Sv as aS,rv as aa,Sr as ab,Ff as ac,qe as ad,Cu as ae,Mv as af,Je as ag,Ir as ah,sv as ai,nf as aj,$a as ak,ne as al,ps as am,fv as an,If as ao,Ps as ap,Rs as aq,hf as ar,of as as,ur as at,we as au,Ku as av,Xs as aw,Ns as ax,xn as ay,Kr as az,Ju as b,tv as c,Ft as d,ft as e,De as f,Vu as g,ee as h,Be as i,G as j,qu as k,k as l,St as m,Ve as n,Pt as o,ht as p,ov as q,Ue as r,st as s,uv as t,Lr as u,gt as v,ev as w,lv as x,Lh as y,Ph as z};
|