UNPKG

l-ai-chat

Version:

AI CHAT

144 lines 1.12 MB
(function(be,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],Y):(be=typeof globalThis<"u"?globalThis:be||self,Y(be.LAIChat={},be.Vue))})(this,function(be,Y){"use strict";var xY=Object.defineProperty;var bY=(be,Y,Br)=>Y in be?xY(be,Y,{enumerable:!0,configurable:!0,writable:!0,value:Br}):be[Y]=Br;var Ut=(be,Y,Br)=>bY(be,typeof Y!="symbol"?Y+"":Y,Br);var Qm;const Br=(r,e)=>{const t=r.__vccOpts||r;for(const[n,a]of e)t[n]=a;return t},sL={name:"LAIChatComponent"},lL={class:"chat-box"};function uL(r,e,t,n,a,i){return Y.openBlock(),Y.createElementBlock("div",lL,[Y.renderSlot(r.$slots,"content"),Y.renderSlot(r.$slots,"input")])}const gc=Br(sL,[["render",uL]]);function yc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Sa=yc();function r0(r){Sa=r}var jo={exec:()=>null};function Nt(r,e=""){let t=typeof r=="string"?r:r.source;const n={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(Ie.caret,"$1"),t=t.replace(a,o),n},getRegex:()=>new RegExp(t,e)};return n}var Ie={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},hL=/^(?:[ \t]*(?:\n|$))+/,fL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,mc=/(?:[*+-]|\d{1,9}[.)])/,n0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,a0=Nt(n0).replace(/bull/g,mc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),pL=Nt(n0).replace(/bull/g,mc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dL=/^[^\n]+/,Sc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,gL=Nt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yL=Nt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,mc).getRegex(),Ql="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mL=Nt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",xc).replace("tag",Ql).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),i0=Nt(_c).replace("hr",Qo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ql).getRegex(),_L=Nt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",i0).getRegex(),bc={blockquote:_L,code:fL,def:gL,fences:cL,heading:vL,hr:Qo,html:mL,lheading:a0,list:yL,newline:hL,paragraph:i0,table:jo,text:dL},o0=Nt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ql).getRegex(),SL={...bc,lheading:pL,table:o0,paragraph:Nt(_c).replace("hr",Qo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",o0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ql).getRegex()},xL={...bc,html:Nt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:jo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Nt(_c).replace("hr",Qo).replace("heading",` *#{1,6} *[^
]`).replace("lheading",a0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},bL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,s0=/^( {2,}|\\)\n(?!\s*$)/,TL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jl=/[\p{P}\p{S}]/u,wc=/[\s\p{P}\p{S}]/u,l0=/[^\s\p{P}\p{S}]/u,CL=Nt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wc).getRegex(),u0=/(?!~)[\p{P}\p{S}]/u,DL=/(?!~)[\s\p{P}\p{S}]/u,AL=/(?:[^\s\p{P}\p{S}]|~)/u,ML=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,h0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,IL=Nt(h0,"u").replace(/punct/g,Jl).getRegex(),LL=Nt(h0,"u").replace(/punct/g,u0).getRegex(),f0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",EL=Nt(f0,"gu").replace(/notPunctSpace/g,l0).replace(/punctSpace/g,wc).replace(/punct/g,Jl).getRegex(),PL=Nt(f0,"gu").replace(/notPunctSpace/g,AL).replace(/punctSpace/g,DL).replace(/punct/g,u0).getRegex(),kL=Nt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,l0).replace(/punctSpace/g,wc).replace(/punct/g,Jl).getRegex(),RL=Nt(/\\(punct)/,"gu").replace(/punct/g,Jl).getRegex(),NL=Nt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),OL=Nt(xc).replace("(?:-->|$)","-->").getRegex(),VL=Nt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",OL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tu=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,BL=Nt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",tu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),c0=Nt(/^!?\[(label)\]\[(ref)\]/).replace("label",tu).replace("ref",Sc).getRegex(),v0=Nt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sc).getRegex(),zL=Nt("reflink|nolink(?!\\()","g").replace("reflink",c0).replace("nolink",v0).getRegex(),Tc={_backpedal:jo,anyPunctuation:RL,autolink:NL,blockSkip:ML,br:s0,code:wL,del:jo,emStrongLDelim:IL,emStrongRDelimAst:EL,emStrongRDelimUnd:kL,escape:bL,link:BL,nolink:v0,punctuation:CL,reflink:c0,reflinkSearch:zL,tag:VL,text:TL,url:jo},GL={...Tc,link:Nt(/^!?\[(label)\]\((.*?)\)/).replace("label",tu).getRegex(),reflink:Nt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",tu).getRegex()},Cc={...Tc,emStrongRDelimAst:PL,emStrongLDelim:LL,url:Nt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},FL={...Cc,br:Nt(s0).replace("{2,}","*").getRegex(),text:Nt(Cc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},eu={normal:bc,gfm:SL,pedantic:xL},Jo={normal:Tc,gfm:Cc,breaks:FL,pedantic:GL},HL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p0=r=>HL[r];function zr(r,e){if(e){if(Ie.escapeTest.test(r))return r.replace(Ie.escapeReplace,p0)}else if(Ie.escapeTestNoEncode.test(r))return r.replace(Ie.escapeReplaceNoEncode,p0);return r}function d0(r){try{r=encodeURI(r).replace(Ie.percentDecode,"%")}catch{return null}return r}function g0(r,e){var i;const t=r.replace(Ie.findPipe,(o,s,l)=>{let u=!1,h=s;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=t.split(Ie.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ie.slashPipe,"|");return n}function ts(r,e,t){const n=r.length;if(n===0)return"";let a=0;for(;a<n&&r.charAt(n-a-1)===e;)a++;return r.slice(0,n-a)}function WL(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])t++;else if(r[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function y0(r,e,t,n,a){const i=e.href,o=e.title||null,s=r[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}function $L(r,e,t){const n=r.match(t.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
`).map(i=>{const o=i.match(t.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
`)}var ru=class{constructor(r){Ut(this,"options");Ut(this,"rules");Ut(this,"lexer");this.options=r||Sa}space(r){const e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){const e=this.rules.block.code.exec(r);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ts(t,`
`)}}}fences(r){const e=this.rules.block.fences.exec(r);if(e){const t=e[0],n=$L(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){const e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const n=ts(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){const e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:ts(e[0],`
`)}}blockquote(r){const e=this.rules.block.blockquote.exec(r);if(e){let t=ts(e[0],`
`).split(`
`),n="",a="";const i=[];for(;t.length>0;){let o=!1;const s=[];let l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))s.push(t[l]),o=!0;else if(!o)s.push(t[l]);else break;t=t.slice(l);const u=s.join(`
`),h=u.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
${u}`:u,a=a?`${a}
${h}`:h;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,i,!0),this.lexer.state.top=f,t.length===0)break;const c=i.at(-1);if((c==null?void 0:c.type)==="code")break;if((c==null?void 0:c.type)==="blockquote"){const v=c,p=v.raw+`
`+t.join(`
`),d=this.blockquote(p);i[i.length-1]=d,n=n.substring(0,n.length-v.raw.length)+d.raw,a=a.substring(0,a.length-v.text.length)+d.text;break}else if((c==null?void 0:c.type)==="list"){const v=c,p=v.raw+`
`+t.join(`
`),d=this.list(p);i[i.length-1]=d,n=n.substring(0,n.length-c.raw.length)+d.raw,a=a.substring(0,a.length-v.raw.length)+d.raw,t=p.substring(i.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:a}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim();const n=t.length>1,a={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");const i=this.rules.other.listItemRegex(t);let o=!1;for(;r;){let l=!1,u="",h="";if(!(e=i.exec(r))||this.rules.block.hr.test(r))break;u=e[0],r=r.substring(u.length);let f=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),c=r.split(`
`,1)[0],v=!f.trim(),p=0;if(this.options.pedantic?(p=2,h=f.trimStart()):v?p=e[1].length+1:(p=e[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,h=f.slice(p),p+=e[1].length),v&&this.rules.other.blankLine.test(c)&&(u+=c+`
`,r=r.substring(c.length+1),l=!0),!l){const y=this.rules.other.nextBulletRegex(p),m=this.rules.other.hrRegex(p),_=this.rules.other.fencesBeginRegex(p),S=this.rules.other.headingBeginRegex(p),x=this.rules.other.htmlBeginRegex(p);for(;r;){const b=r.split(`
`,1)[0];let w;if(c=b,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting,"  "),w=c):w=c.replace(this.rules.other.tabCharGlobal,"    "),_.test(c)||S.test(c)||x.test(c)||y.test(c)||m.test(c))break;if(w.search(this.rules.other.nonSpaceChar)>=p||!c.trim())h+=`
`+w.slice(p);else{if(v||f.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||_.test(f)||S.test(f)||m.test(f))break;h+=`
`+c}!v&&!c.trim()&&(v=!0),u+=b+`
`,r=r.substring(b.length+1),f=w.slice(p)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let d=null,g;this.options.gfm&&(d=this.rules.other.listIsTask.exec(h),d&&(g=d[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:u,task:!!d,checked:g,loose:!1,text:h,tokens:[]}),a.raw+=u}const s=a.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let l=0;l<a.items.length;l++)if(this.lexer.state.top=!1,a.items[l].tokens=this.lexer.blockTokens(a.items[l].text,[]),!a.loose){const u=a.items[l].tokens.filter(f=>f.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=h}if(a.loose)for(let l=0;l<a.items.length;l++)a.items[l].loose=!0;return a}}html(r){const e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){const e=this.rules.block.def.exec(r);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:a}}}table(r){var o;const e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=g0(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(const s of n)this.rules.other.tableAlignRight.test(s)?i.align.push("right"):this.rules.other.tableAlignCenter.test(s)?i.align.push("center"):this.rules.other.tableAlignLeft.test(s)?i.align.push("left"):i.align.push(null);for(let s=0;s<t.length;s++)i.header.push({text:t[s],tokens:this.lexer.inline(t[s]),header:!0,align:i.align[s]});for(const s of a)i.rows.push(g0(s,i.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[u]})));return i}}lheading(r){const e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){const e=this.rules.block.paragraph.exec(r);if(e){const t=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){const e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){const e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){const e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){const e=this.rules.inline.link.exec(r);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const i=ts(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{const i=WL(e[2],"()");if(i===-2)return;if(i>-1){const s=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let n=e[2],a="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],a=i[3])}else a=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),y0(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){const n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){const i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return y0(t,a,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const i=[...n[0]].length-1;let o,s,l=i,u=0;const h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+i);(n=h.exec(e))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){l+=s;continue}else if((n[5]||n[6])&&i%3&&!((i+s)%3)){u+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+u);const f=[...n[0]][0].length,c=r.slice(0,i+n.index+f+s);if(Math.min(i,s)%2){const p=c.slice(1,-1);return{type:"em",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}const v=c.slice(2,-2);return{type:"strong",raw:c,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(r){const e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),a=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&a&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){const e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){const e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){const e=this.rules.inline.autolink.exec(r);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(r){var t;let e;if(e=this.rules.inline.url.exec(r)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let i;do i=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(i!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(r){const e=this.rules.inline.text.exec(r);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},fn=class t0{constructor(e){Ut(this,"tokens");Ut(this,"options");Ut(this,"state");Ut(this,"tokenizer");Ut(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Sa,this.options.tokenizer=this.options.tokenizer||new ru,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:Ie,block:eu.normal,inline:Jo.normal};this.options.pedantic?(t.block=eu.pedantic,t.inline=Jo.pedantic):this.options.gfm&&(t.block=eu.gfm,this.options.breaks?t.inline=Jo.breaks:t.inline=Jo.gfm),this.tokenizer.rules=t}static get rules(){return{block:eu,inline:Jo}}static lex(e,t){return new t0(t).lex(e)}static lexInline(e,t){return new t0(t).inlineTokens(e)}lex(e){e=e.replace(Ie.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var a,i,o;for(this.options.pedantic&&(e=e.replace(Ie.tabCharGlobal,"    ").replace(Ie.spaceLine,""));e;){let s;if((i=(a=this.options.extensions)==null?void 0:a.block)!=null&&i.some(u=>(s=u.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const u=t.at(-1);s.raw.length===1&&u!==void 0?u.raw+=`
`:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
`+s.raw,u.text+=`
`+s.text,this.inlineQueue.at(-1).src=u.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
`+s.raw,u.text+=`
`+s.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if((o=this.options.extensions)!=null&&o.startBlock){let u=1/0;const h=e.slice(1);let f;this.options.extensions.startBlock.forEach(c=>{f=c.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){const u=t.at(-1);n&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=`
`+s.raw,u.text+=`
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(s),n=l.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const u=t.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=`
`+s.raw,u.text+=`
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(s);continue}if(e){const u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var s,l,u;let n=e,a=null;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)h.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){i||(o=""),i=!1;let h;if((l=(s=this.options.extensions)==null?void 0:s.inline)!=null&&l.some(c=>(h=c.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);const c=t.at(-1);h.type==="text"&&(c==null?void 0:c.type)==="text"?(c.raw+=h.raw,c.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,n,o)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let f=e;if((u=this.options.extensions)!=null&&u.startInline){let c=1/0;const v=e.slice(1);let p;this.options.extensions.startInline.forEach(d=>{p=d.call({lexer:this},v),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(f=e.substring(0,c+1))}if(h=this.tokenizer.inlineText(f)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),i=!0;const c=t.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=h.raw,c.text+=h.text):t.push(h);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},nu=class{constructor(r){Ut(this,"options");Ut(this,"parser");this.options=r||Sa}space(r){return""}code({text:r,lang:e,escaped:t}){var i;const n=(i=(e||"").match(Ie.notSpaceStart))==null?void 0:i[0],a=r.replace(Ie.endingNewline,"")+`
`;return n?'<pre><code class="language-'+zr(n)+'">'+(t?a:zr(a,!0))+`</code></pre>
`:"<pre><code>"+(t?a:zr(a,!0))+`</code></pre>
`}blockquote({tokens:r}){return`<blockquote>
${this.parser.parse(r)}</blockquote>
`}html({text:r}){return r}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
`}hr(r){return`<hr>
`}list(r){const e=r.ordered,t=r.start;let n="";for(let o=0;o<r.items.length;o++){const s=r.items[o];n+=this.listitem(s)}const a=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+a+i+`>
`+n+"</"+a+`>
`}listitem(r){var t;let e="";if(r.task){const n=this.checkbox({checked:!!r.checked});r.loose?((t=r.tokens[0])==null?void 0:t.type)==="paragraph"?(r.tokens[0].text=n+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=n+" "+zr(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
`}table(r){let e="",t="";for(let a=0;a<r.header.length;a++)t+=this.tablecell(r.header[a]);e+=this.tablerow({text:t});let n="";for(let a=0;a<r.rows.length;a++){const i=r.rows[a];t="";for(let o=0;o<i.length;o++)t+=this.tablecell(i[o]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+n+`</table>
`}tablerow({text:r}){return`<tr>
${r}</tr>
`}tablecell(r){const e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${zr(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){const n=this.parser.parseInline(t),a=d0(r);if(a===null)return n;r=a;let i='<a href="'+r+'"';return e&&(i+=' title="'+zr(e)+'"'),i+=">"+n+"</a>",i}image({href:r,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));const a=d0(r);if(a===null)return zr(t);r=a;let i=`<img src="${r}" alt="${t}"`;return e&&(i+=` title="${zr(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:zr(r.text)}},Dc=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},cn=class e0{constructor(e){Ut(this,"options");Ut(this,"renderer");Ut(this,"textRenderer");this.options=e||Sa,this.options.renderer=this.options.renderer||new nu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dc}static parse(e,t){return new e0(t).parse(e)}static parseInline(e,t){return new e0(t).parseInline(e)}parse(e,t=!0){var a,i;let n="";for(let o=0;o<e.length;o++){const s=e[o];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[s.type]){const u=s,h=this.options.extensions.renderers[u.type].call({parser:this},u);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){n+=h||"";continue}}const l=s;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let u=l,h=this.renderer.text(u);for(;o+1<e.length&&e[o+1].type==="text";)u=e[++o],h+=`
`+this.renderer.text(u);t?n+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):n+=h;continue}default:{const u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(e,t=this.renderer){var a,i;let n="";for(let o=0;o<e.length;o++){const s=e[o];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[s.type]){const u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=u||"";continue}}const l=s;switch(l.type){case"escape":{n+=t.text(l);break}case"html":{n+=t.html(l);break}case"link":{n+=t.link(l);break}case"image":{n+=t.image(l);break}case"strong":{n+=t.strong(l);break}case"em":{n+=t.em(l);break}case"codespan":{n+=t.codespan(l);break}case"br":{n+=t.br(l);break}case"del":{n+=t.del(l);break}case"text":{n+=t.text(l);break}default:{const u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}},au=(Qm=class{constructor(r){Ut(this,"options");Ut(this,"block");this.options=r||Sa}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?fn.lex:fn.lexInline}provideParser(){return this.block?cn.parse:cn.parseInline}},Ut(Qm,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Qm),UL=class{constructor(...r){Ut(this,"defaults",yc());Ut(this,"options",this.setOptions);Ut(this,"parse",this.parseMarkdown(!0));Ut(this,"parseInline",this.parseMarkdown(!1));Ut(this,"Parser",cn);Ut(this,"Renderer",nu);Ut(this,"TextRenderer",Dc);Ut(this,"Lexer",fn);Ut(this,"Tokenizer",ru);Ut(this,"Hooks",au);this.use(...r)}walkTokens(r,e){var n,a;let t=[];for(const i of r)switch(t=t.concat(e.call(this,i)),i.type){case"table":{const o=i;for(const s of o.header)t=t.concat(this.walkTokens(s.tokens,e));for(const s of o.rows)for(const l of s)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{const o=i;t=t.concat(this.walkTokens(o.items,e));break}default:{const o=i;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(s=>{const l=o[s].flat(1/0);t=t.concat(this.walkTokens(l,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...r){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=e.renderers[a.name];i?e.renderers[a.name]=function(...o){let s=a.renderer.apply(this,o);return s===!1&&(s=i.apply(this,o)),s}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=e[a.level];i?i.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),n.extensions=e),t.renderer){const a=this.defaults.renderer||new nu(this.defaults);for(const i in t.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const o=i,s=t.renderer[o],l=a[o];a[o]=(...u)=>{let h=s.apply(a,u);return h===!1&&(h=l.apply(a,u)),h||""}}n.renderer=a}if(t.tokenizer){const a=this.defaults.tokenizer||new ru(this.defaults);for(const i in t.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const o=i,s=t.tokenizer[o],l=a[o];a[o]=(...u)=>{let h=s.apply(a,u);return h===!1&&(h=l.apply(a,u)),h}}n.tokenizer=a}if(t.hooks){const a=this.defaults.hooks||new au;for(const i in t.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const o=i,s=t.hooks[o],l=a[o];au.passThroughHooks.has(i)?a[o]=u=>{if(this.defaults.async)return Promise.resolve(s.call(a,u)).then(f=>l.call(a,f));const h=s.call(a,u);return l.call(a,h)}:a[o]=(...u)=>{let h=s.apply(a,u);return h===!1&&(h=l.apply(a,u)),h}}n.hooks=a}if(t.walkTokens){const a=this.defaults.walkTokens,i=t.walkTokens;n.walkTokens=function(o){let s=[];return s.push(i.call(this,o)),a&&(s=s.concat(a.call(this,o))),s}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return fn.lex(r,e??this.defaults)}parser(r,e){return cn.parse(r,e??this.defaults)}parseMarkdown(r){return(t,n)=>{const a={...n},i={...this.defaults,...a},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=r);const s=i.hooks?i.hooks.provideLexer():r?fn.lex:fn.lexInline,l=i.hooks?i.hooks.provideParser():r?cn.parse:cn.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(u=>s(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let u=s(t,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let h=l(u,i);return i.hooks&&(h=i.hooks.postprocess(h)),h}catch(u){return o(u)}}}onError(r,e){return t=>{if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,r){const n="<p>An error occurred:</p><pre>"+zr(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},xa=new UL;function Bt(r,e){return xa.parse(r,e)}Bt.options=Bt.setOptions=function(r){return xa.setOptions(r),Bt.defaults=xa.defaults,r0(Bt.defaults),Bt},Bt.getDefaults=yc,Bt.defaults=Sa,Bt.use=function(...r){return xa.use(...r),Bt.defaults=xa.defaults,r0(Bt.defaults),Bt},Bt.walkTokens=function(r,e){return xa.walkTokens(r,e)},Bt.parseInline=xa.parseInline,Bt.Parser=cn,Bt.parser=cn.parse,Bt.Renderer=nu,Bt.TextRenderer=Dc,Bt.Lexer=fn,Bt.lexer=fn.lex,Bt.Tokenizer=ru,Bt.Hooks=au,Bt.parse=Bt,Bt.options,Bt.setOptions,Bt.use,Bt.walkTokens,Bt.parseInline,cn.parse,fn.lex;const YL={name:"LznLoading",props:{size:{type:Number,default:18},color:{type:String,default:"#1677ff"},txt:{type:String,default:""}}},ZL={class:"l-loading-container"},XL={class:"l-loading-txt"};function qL(r,e,t,n,a,i){return Y.openBlock(),Y.createElementBlock("div",ZL,[Y.createElementVNode("div",{class:"l-circle-container",style:Y.normalizeStyle({width:`${t.size}px`,height:`${t.size}px`})},[Y.createElementVNode("div",{class:"l-circle",style:Y.normalizeStyle({backgroundColor:t.color})},null,4),Y.createElementVNode("div",{class:"l-circle",style:Y.normalizeStyle({backgroundColor:t.color})},null,4),Y.createElementVNode("div",{class:"l-circle",style:Y.normalizeStyle({backgroundColor:t.color})},null,4),Y.createElementVNode("div",{class:"l-circle",style:Y.normalizeStyle({backgroundColor:t.color})},null,4)],4),Y.createElementVNode("span",XL,Y.toDisplayString(t.txt),1)])}const KL=Br(YL,[["render",qL]]);/*! *****************************************************************************
  Copyright (c) Microsoft Corporation.

  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.

  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ***************************************************************************** */var Ac=function(r,e){return Ac=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Ac(r,e)};function O(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ac(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var jL=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),QL=function(){function r(){this.browser=new jL,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),mt=new QL;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(mt.wxa=!0,mt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?mt.worker=!0:!mt.hasGlobalWindow||"Deno"in window?(mt.node=!0,mt.svgSupported=!0):JL(navigator.userAgent,mt);function JL(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var Mc=12,m0="sans-serif",Vn=Mc+"px "+m0,tE=20,eE=100,rE="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function nE(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),a=(r.charCodeAt(t)-tE)/eE;e[n]=a}return e}var aE=nE(rE),Bn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,n){if(!r){var a=Bn.createCanvas();r=a&&a.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Vn),r.measureText(t);t=t||"",n=n||Vn;var i=/((?:\d+)?\.?\d*)px/.exec(n),o=i&&+i[1]||Mc,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=aE[t[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}},_0=Gr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),S0=Gr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Bi=Object.prototype.toString,iu=Array.prototype,iE=iu.forEach,oE=iu.filter,Ic=iu.slice,sE=iu.map,x0=(function(){}).constructor,ou=x0?x0.prototype:null,Lc="__proto__",lE=2311;function b0(){return lE++}function wr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function at(r){if(r==null||typeof r!="object")return r;var e=r,t=Bi.call(r);if(t==="[object Array]"){if(!es(r)){e=[];for(var n=0,a=r.length;n<a;n++)e[n]=at(r[n])}}else if(S0[t]){if(!es(r)){var i=r.constructor;if(i.from)e=i.from(r);else{e=new i(r.length);for(var n=0,a=r.length;n<a;n++)e[n]=r[n]}}}else if(!_0[t]&&!es(r)&&!ba(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==Lc&&(e[o]=at(r[o]))}return e}function ft(r,e,t){if(!J(e)||!J(r))return t?at(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==Lc){var a=r[n],i=e[n];J(i)&&J(a)&&!z(i)&&!z(a)&&!ba(i)&&!ba(a)&&!w0(i)&&!w0(a)&&!es(i)&&!es(a)?ft(a,i,t):(t||!(n in r))&&(r[n]=at(e[n]))}return r}function Ec(r,e){for(var t=r[0],n=1,a=r.length;n<a;n++)t=ft(t,r[n],e);return t}function B(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==Lc&&(r[t]=e[t]);return r}function rt(r,e,t){for(var n=xt(e),a=0,i=n.length;a<i;a++){var o=n[a];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}function dt(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function uE(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var a in t)t.hasOwnProperty(a)&&(r.prototype[a]=t[a]);r.prototype.constructor=r,r.superClass=e}function te(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(t?e[i]!=null:r[i]==null)&&(r[i]=e[i])}else rt(r,e,t)}function we(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function A(r,e,t){if(r&&e)if(r.forEach&&r.forEach===iE)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r);else for(var i in r)r.hasOwnProperty(i)&&e.call(t,r[i],i,r)}function G(r,e,t){if(!r)return[];if(!e)return Pc(r);if(r.map&&r.map===sE)return r.map(e,t);for(var n=[],a=0,i=r.length;a<i;a++)n.push(e.call(t,r[a],a,r));return n}function Gr(r,e,t,n){if(r&&e){for(var a=0,i=r.length;a<i;a++)t=e.call(n,t,r[a],a,r);return t}}function At(r,e,t){if(!r)return[];if(!e)return Pc(r);if(r.filter&&r.filter===oE)return r.filter(e,t);for(var n=[],a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r)&&n.push(r[a]);return n}function hE(r,e,t){if(r&&e){for(var n=0,a=r.length;n<a;n++)if(e.call(t,r[n],n,r))return r[n]}}function xt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function fE(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(Ic.call(arguments)))}}var Z=ou&&j(ou.bind)?ou.call.bind(ou.bind):fE;function ht(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(Ic.call(arguments)))}}function z(r){return Array.isArray?Array.isArray(r):Bi.call(r)==="[object Array]"}function j(r){return typeof r=="function"}function U(r){return typeof r=="string"}function su(r){return Bi.call(r)==="[object String]"}function Ct(r){return typeof r=="number"}function J(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function w0(r){return!!_0[Bi.call(r)]}function Le(r){return!!S0[Bi.call(r)]}function ba(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function lu(r){return r.colorStops!=null}function cE(r){return r.image!=null}function T0(r){return Bi.call(r)==="[object RegExp]"}function wa(r){return r!==r}function ee(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function ot(r,e){return r??e}function rr(r,e,t){return r??e??t}function Pc(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return Ic.apply(r,e)}function kc(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function tt(r,e){if(!r)throw new Error(e)}function Tr(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var C0="__ec_primitive__";function uu(r){r[C0]=!0}function es(r){return r[C0]}var vE=function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return xt(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r}(),D0=typeof Map=="function";function pE(){return D0?new Map:new vE}var dE=function(){function r(e){var t=z(e);this.data=pE();var n=this;e instanceof r?e.each(a):e&&A(e,a);function a(i,o){t?n.set(i,o):n.set(o,i)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,a){e.call(t,n,a)})},r.prototype.keys=function(){var e=this.data.keys();return D0?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function q(r){return new dE(r)}function rs(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var a=r.length,n=0;n<e.length;n++)t[n+a]=e[n];return t}function hu(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&B(t,e),t}function A0(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function X(r,e){return r.hasOwnProperty(e)}function Qt(){}var fu=180/Math.PI;/*! *****************************************************************************
  Copyright (c) Microsoft Corporation.

  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.

  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ***************************************************************************** */var Rc=function(r,e){return Rc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Rc(r,e)};function Wt(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Rc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Ta(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Ee(r,e){return r[0]=e[0],r[1]=e[1],r}function vn(r){return[r[0],r[1]]}function gE(r,e,t){return r[0]=e,r[1]=t,r}function M0(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Nc(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function Ca(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Oc(r){return Math.sqrt(yE(r))}function yE(r){return r[0]*r[0]+r[1]*r[1]}function cu(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function zi(r,e){var t=Oc(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Vc(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var zn=Vc;function mE(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Da=mE;function vu(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function ye(r,e,t){var n=e[0],a=e[1];return r[0]=t[0]*n+t[2]*a+t[4],r[1]=t[1]*n+t[3]*a+t[5],r}function Gn(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function Fn(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var Gi=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),_E=function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Gi(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,a=e.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,t.drift(i,o,e),this.handler.dispatchToElement(new Gi(t,e),"drag",e.event);var s=this.handler.findHover(n,a,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Gi(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Gi(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Gi(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Gi(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}(),nr=function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof t=="function"&&(a=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var s=0;s<i[e].length;s++)if(i[e][s].h===n)return this;var l={h:n,query:t,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},u=i[e].length-1,h=i[e][u];return h&&h.callAtLast?i[e].splice(u,0,l):i[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var a=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&a.push(n[e][i]);n[e]=a}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=a.length,l=0;l<s;l++){var u=a[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=t[o-1],l=a.length,u=0;u<l;u++){var h=a[u];if(!(i&&i.filter&&h.query!=null&&!i.filter(e,h.query)))switch(o){case 0:h.h.call(s);break;case 1:h.h.call(s,t[0]);break;case 2:h.h.call(s,t[0],t[1]);break;default:h.h.apply(s,t.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r}(),SE=Math.log(2);function Bc(r,e,t,n,a,i){var o=n+"-"+a,s=r.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~a)/SE);return r[t][l]}for(var u=n|1<<t,h=t+1;n&1<<h;)h++;for(var f=0,c=0,v=0;c<s;c++){var p=1<<c;p&a||(f+=(v%2?-1:1)*r[t][c]*Bc(r,e-1,h,u,a|p,i),v++)}return i[o]=f,f}function I0(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},a=Bc(t,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*Bc(t,7,o===0?1:0,1<<o,1<<s,n)/a*e[o];return function(l,u,h){var f=u*i[6]+h*i[7]+1;l[0]=(u*i[0]+h*i[1]+i[2])/f,l[1]=(u*i[3]+h*i[4]+i[5])/f}}}var L0="___zrEVENTSAVED",zc=[];function xE(r,e,t,n,a){return Gc(zc,e,n,a,!0)&&Gc(r,t,zc[0],zc[1])}function Gc(r,e,t,n,a){if(e.getBoundingClientRect&&mt.domSupported&&!E0(e)){var i=e[L0]||(e[L0]={}),o=bE(e,i),s=wE(o,i,a);if(s)return s(r,t,n),!0}return!1}function bE(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function wE(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=r[u].getBoundingClientRect(),f=2*u,c=h.left,v=h.top;o.push(c,v),l=l&&i&&c===i[f]&&v===i[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?I0(s,o):I0(o,s))}function E0(r){return r.nodeName.toUpperCase()==="CANVAS"}var TE=/([&<>"'])/g,CE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Pe(r){return r==null?"":(r+"").replace(TE,function(e,t){return CE[t]})}var DE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Fc=[],AE=mt.browser.firefox&&+mt.browser.version.split(".")[0]<39;function Hc(r,e,t,n){return t=t||{},n?P0(r,e,t):AE&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):P0(r,e,t),t}function P0(r,e,t){if(mt.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(E0(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(Gc(Fc,r,n,a)){t.zrX=Fc[0],t.zrY=Fc[1];return}}t.zrX=t.zrY=0}function Wc(r){return r||window.event}function ar(r,e,t){if(e=Wc(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Hc(r,o,e,t)}else{Hc(r,e,e,t);var i=ME(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&DE.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function ME(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function $c(r,e,t,n){r.addEventListener(e,t,n)}function IE(r,e,t,n){r.removeEventListener(e,t,n)}var pn=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function k0(r){return r.which===2||r.which===3}var LE=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o<s;o++){var l=a[o],u=Hc(n,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},r.prototype._recognize=function(e){for(var t in Uc)if(Uc.hasOwnProperty(t)){var n=Uc[t](this._track,e);if(n)return n}},r}();function R0(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function EE(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Uc={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,a=(r[t-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=R0(n)/R0(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=EE(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function qe(){return[1,0,0,1,0,0]}function pu(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Yc(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function dn(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Fr(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Aa(r,e,t,n){n===void 0&&(n=[0,0]);var a=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],h=Math.sin(t),f=Math.cos(t);return r[0]=a*f+s*h,r[1]=-a*h+s*f,r[2]=i*f+l*h,r[3]=-i*h+f*l,r[4]=f*(o-n[0])+h*(u-n[1])+n[0],r[5]=f*(u-n[1])-h*(o-n[0])+n[1],r}function Zc(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function Fi(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function PE(r){var e=qe();return Yc(e,r),e}var ct=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r}(),du=Math.min,gu=Math.max,Ma=new ct,Ia=new ct,La=new ct,Ea=new ct,ns=new ct,as=new ct,vt=function(){function r(e,t,n,a){n<0&&(e=e+n,n=-n),a<0&&(t=t+a,a=-a),this.x=e,this.y=t,this.width=n,this.height=a}return r.prototype.union=function(e){var t=du(e.x,this.x),n=du(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gu(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=gu(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=qe();return Fr(i,i,[-t.x,-t.y]),Zc(i,i,[n,a]),Fr(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var n=this,a=n.x,i=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,h=e.y,f=e.y+e.height,c=!(i<l||u<a||s<h||f<o);if(t){var v=1/0,p=0,d=Math.abs(i-l),g=Math.abs(u-a),y=Math.abs(s-h),m=Math.abs(f-o),_=Math.min(d,g),S=Math.min(y,m);i<l||u<a?_>p&&(p=_,d<g?ct.set(as,-d,0):ct.set(as,g,0)):_<v&&(v=_,d<g?ct.set(ns,d,0):ct.set(ns,-g,0)),s<h||f<o?S>p&&(p=S,y<m?ct.set(as,0,-y):ct.set(as,0,m)):_<v&&(v=_,y<m?ct.set(ns,0,y):ct.set(ns,0,-m))}return t&&ct.copy(t,c?ns:as),c},r.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Ma.x=La.x=t.x,Ma.y=Ea.y=t.y,Ia.x=Ea.x=t.x+t.width,Ia.y=La.y=t.y+t.height,Ma.transform(n),Ea.transform(n),Ia.transform(n),La.transform(n),e.x=du(Ma.x,Ia.x,La.x,Ea.x),e.y=du(Ma.y,Ia.y,La.y,Ea.y);var l=gu(Ma.x,Ia.x,La.x,Ea.x),u=gu(Ma.y,Ia.y,La.y,Ea.y);e.width=l-e.x,e.height=u-e.y},r}(),N0="silent";function kE(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:RE}}function RE(){pn(this.event)}var NE=function(r){Wt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(nr),is=function(){function r(e,t){this.x=e,this.y=t}return r}(),OE=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Xc=new vt(0,0,0,0),O0=function(r){Wt(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new is(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new NE,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new _E(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(A(OE,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,a=t.zrY,i=B0(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new is(n,a):this.findHover(n,a),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new is(0,0)},e.prototype.dispatch=function(t,n){var a=this[t];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,a){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+n,s=kE(n,t,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,a){var i=this.storage.getDisplayList(),o=new is(t,n);if(V0(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new vt(t-u,n-u,l,l),f=i.length-1;f>=0;f--){var c=i[f];c!==a&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Xc.copy(c.getBoundingRect()),c.transform&&Xc.applyTransform(c.transform),Xc.intersect(h)&&s.push(c))}if(s.length)for(var v=4,p=Math.PI/12,d=Math.PI*2,g=0;g<u;g+=v)for(var y=0;y<d;y+=p){var m=t+g*Math.cos(y),_=n+g*Math.sin(y);if(V0(s,o,m,_,a),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new LE);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;t.gestureEvent=o;var s=new is;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e}(nr);A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){O0.prototype[r]=function(e){var t=e.zrX,n=e.zrY,a=B0(this,t,n),i,o;if((r!=="mouseup"||!a)&&(i=this.findHover(t,n),o=i.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||zn(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function VE(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(a=!0);var s=n.__hostTarget;n=s||n.parent}return a?N0:!0}return!1}function V0(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=VE(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==N0)){e.target=o;break}}}function B0(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var z0=32,os=7;function BE(r){for(var e=0;r>=z0;)e|=r&1,r>>=1;return r+e}function G0(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a<t&&n(r[a],r[a-1])<0;)a++;zE(r,e,a)}else for(;a<t&&n(r[a],r[a-1])>=0;)a++;return a-e}function zE(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function F0(r,e,t,n,a){for(n===e&&n++;n<t;n++){for(var i=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function qc(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l<s&&i(r,e[t+a+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&i(r,e[t+a-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var h=o+(l-o>>>1);i(r,e[t+h])>0?o=h+1:l=h}return l}function Kc(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;l<s&&i(r,e[t+a-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l<s&&i(r,e[t+a+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var h=o+(l-o>>>1);i(r,e[t+h])<0?l=h:o=h+1}return l}function GE(r,e){var t=os,n,a,i=0,o=[];n=[],a=[];function s(v,p){n[i]=v,a[i]=p,i+=1}function l(){for(;i>1;){var v=i-2;if(v>=1&&a[v-1]<=a[v]+a[v+1]||v>=2&&a[v-2]<=a[v]+a[v-1])a[v-1]<a[v+1]&&v--;else if(a[v]>a[v+1])break;h(v)}}function u(){for(;i>1;){var v=i-2;v>0&&a[v-1]<a[v+1]&&v--,h(v)}}function h(v){var p=n[v],d=a[v],g=n[v+1],y=a[v+1];a[v]=d+y,v===i-3&&(n[v+1]=n[v+2],a[v+1]=a[v+2]),i--;var m=Kc(r[g],r,p,d,0,e);p+=m,d-=m,d!==0&&(y=qc(r[p+d-1],r,g,y,y-1,e),y!==0&&(d<=y?f(p,d,g,y):c(p,d,g,y)))}function f(v,p,d,g){var y=0;for(y=0;y<p;y++)o[y]=r[v+y];var m=0,_=d,S=v;if(r[S++]=r[_++],--g===0){for(y=0;y<p;y++)r[S+y]=o[m+y];return}if(p===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m];return}for(var x=t,b,w,T;;){b=0,w=0,T=!1;do if(e(r[_],o[m])<0){if(r[S++]=r[_++],w++,b=0,--g===0){T=!0;break}}else if(r[S++]=o[m++],b++,w=0,--p===1){T=!0;break}while((b|w)<x);if(T)break;do{if(b=Kc(r[_],o,m,p,0,e),b!==0){for(y=0;y<b;y++)r[S+y]=o[m+y];if(S+=b,m+=b,p-=b,p<=1){T=!0;break}}if(r[S++]=r[_++],--g===0){T=!0;break}if(w=qc(o[m],r,_,g,0,e),w!==0){for(y=0;y<w;y++)r[S+y]=r[_+y];if(S+=w,_+=w,g-=w,g===0){T=!0;break}}if(r[S++]=o[m++],--p===1){T=!0;break}x--}while(b>=os||w>=os);if(T)break;x<0&&(x=0),x+=2}if(t=x,t<1&&(t=1),p===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m]}else{if(p===0)throw new Error;for(y=0;y<p;y++)r[S+y]=o[m+y]}}function c(v,p,d,g){var y=0;for(y=0;y<g;y++)o[y]=r[d+y];var m=v+p-1,_=g-1,S=d+g-1,x=0,b=0;if(r[S--]=r[m--],--p===0){for(x=S-(g-1),y=0;y<g;y++)r[x+y]=o[y];return}if(g===1){for(S-=p,m-=p,b=S+1,x=m+1,y=p-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_];return}for(var w=t;;){var T=0,C=0,D=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--p===0){D=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){D=!0;break}while((T|C)<w);if(D)break;do{if(T=p-Kc(o[_],r,v,p,p-1,e),T!==0){for(S-=T,m-=T,p-=T,b=S+1,x=m+1,y=T-1;y>=0;y--)r[b+y]=r[x+y];if(p===0){D=!0;break}}if(r[S--]=o[_--],--g===1){D=!0;break}if(C=g-qc(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,b=S+1,x=_+1,y=0;y<C;y++)r[b+y]=o[x+y];if(g<=1){D=!0;break}}if(r[S--]=r[m--],--p===0){D=!0;break}w--}while(T>=os||C>=os);if(D)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,b=S+1,x=m+1,y=p-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_]}else{if(g===0)throw new Error;for(x=S-(g-1),y=0;y<g;y++)r[x+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function yu(r,e,t,n){t||(t=0),n||(n=r.length);var a=n-t;if(!(a<2)){var i=0;if(a<z0){i=G0(r,t,n,e),F0(r,t,n,t+i,e);return}var o=GE(r,e),s=BE(a);do{if(i=G0(r,t,n,e),i<s){var l=a;l>s&&(l=s),F0(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var Hr=1,mu=2,ss=4,H0=!1;function jc(){H0||(H0=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function W0(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var FE=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=W0}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,a=0,i=t.length;a<i;a++)this._updateAndAddDisplayable(t[a],null,e);n.length=this._displayListLen,yu(n,W0)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath();if(e.ignoreClip)t=null;else if(a){t?t=t.slice():t=[];for(var i=a,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var s=e.childrenRef(),l=0;l<s.length;l++){var u=s[l];e.__dirty&&(u.__dirty|=Hr),this._updateAndAddDisplayable(u,t,n)}e.__dirty=0}else{var h=e;t&&t.length?h.__clipPaths=t:h.__clipPaths&&h.__clipPaths.length>0&&(h.__clipPaths=[]),isNaN(h.z)&&(jc(),h.z=0),isNaN(h.z2)&&(jc(),h.z2=0),isNaN(h.zlevel)&&(jc(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,t,n);var c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,t,n);var v=e.getTextContent();v&&this._updateAndAddDisplayable(v,t,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var a=dt(this._roots,e);a>=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),_u;_u=mt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var ls={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-ls.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?ls.bounceIn(r*2)*.5:ls.bounceOut(r*2-1)*.5+.5}},Su=Math.pow,Hn=Math.sqrt,$0=1e-8,U0=1e-4,Y0=Hn(3),xu=1/3,Wr=Ta(),ir=Ta(),Hi=Ta();function Wn(r){return r>-1e-8&&r<$0}function Z0(r){return r>$0||r<-1e-8}function le(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function X0(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function bu(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,h=s*s-3*o*l,f=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Wn(h)&&Wn(f))if(Wn(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[v++]=p)}else{var d=f*f-4*h*c;if(Wn(d)){var g=f/h,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[v++]=p),y>=0&&y<=1&&(i[v++]=y)}else if(d>0){var m=Hn(d),_=h*s+1.5*o*(-f+m),S=h*s+1.5*o*(-f-m);_<0?_=-Su(-_,xu):_=Su(_,xu),S<0?S=-Su(-S,xu):S=Su(S,xu);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[v++]=p)}else{var x=(2*h*s-3*o*f)/(2*Hn(h*h*h)),b=Math.acos(x)/3,w=Hn(h),T=Math.cos(b),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+Y0*Math.sin(b)))/(3*o),C=(-s+w*(T-Y0*Math.sin(b)))/(3*o);p>=0&&p<=1&&(i[v++]=p),y>=0&&y<=1&&(i[v++]=y),C>=0&&C<=1&&(i[v++]=C)}}return v}function q0(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(Wn(o)){if(Z0(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var h=i*i-4*o*s;if(Wn(h))a[0]=-i/(2*o);else if(h>0){var f=Hn(h),u=(-i+f)/(2*o),c=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function $n(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,h=(l-s)*a+s,f=(h-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=h,i[6]=l,i[7]=n}function K0(r,e,t,n,a,i,o,s,l,u,h){var f,c=.005,v=1/0,p,d,g,y;Wr[0]=l,Wr[1]=u;for(var m=0;m<1;m+=.05)ir[0]=le(r,t,a,o,m),ir[1]=le(e,n,i,s,m),g=Da(Wr,ir),g<v&&(f=m,v=g);v=1/0;for(var _=0;_<32&&!(c<U0);_++)p=f-c,d=f+c,ir[0]=le(r,t,a,o,p),ir[1]=le(e,n,i,s,p),g=Da(ir,Wr),p>=0&&g<v?(f=p,v=g):(Hi[0]=le(r,t,a,o,d),Hi[1]=le(e,n,i,s,d),y=Da(Hi,Wr),d<=1&&y<v?(f=d,v=y):c*=.5);return h&&(h[0]=le(r,t,a,o,f),h[1]=le(e,n,i,s,f)),Hn(v)}function HE(r,e,t,n,a,i,o,s,l){for(var u=r,h=e,f=0,c=1/l,v=1;v<=l;v++){var p=v*c,d=le(r,t,a,o,p),g=le(e,n,i,s,p),y=d-u,m=g-h;f+=Math.sqrt(y*y+m*m),u=d,h=g}return f}function de(r,e,t,n){var a=1-n;return a*(a*r+2*n*e)+n*n*t}function Qc(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function WE(r,e,t,n,a){var i=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(Wn(i)){if(Z0(o)){var u=-s/o;u>=0&&u<=1&&(a[l++]=u)}}else{var h=o*o-4*i*s;if(Wn(h)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(h>0){var f=Hn(h),u=(-o+f)/(2*i),c=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function j0(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function us(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function Q0(r,e,t,n,a,i,o,s,l){var u,h=.005,f=1/0;Wr[0]=o,Wr[1]=s;for(var c=0;c<1;c+=.05){ir[0]=de(r,t,a,c),ir[1]=de(e,n,i,c);var v=Da(Wr,ir);v<f&&(u=c,f=v)}f=1/0;for(var p=0;p<32&&!(h<U0);p++){var d=u-h,g=u+h;ir[0]=de(r,t,a,d),ir[1]=de(e,n,i,d);var v=Da(ir,Wr);if(d>=0&&v<f)u=d,f=v;else{Hi[0]=de(r,t,a,g),Hi[1]=de(e,n,i,g);var y=Da(Hi,Wr);g<=1&&y<f?(u=g,f=y):h*=.5}}return l&&(l[0]=de(r,t,a,u),l[1]=de(e,n,i,u)),Hn(f)}function $E(r,e,t,n,a,i,o){for(var s=r,l=e,u=0,h=1/o,f=1;f<=o;f++){var c=f*h,v=de(r,t,a,c),p=de(e,n,i,c),d=v-s,g=p-l;u+=Math.sqrt(d*d+g*g),s=v,l=p}return u}var UE=/cubic-bezier\(([0-9,\.e ]+)\)/;function Jc(r){var e=r&&UE.exec(r);if(e){var t=e[1].split(","),n=+Tr(t[0]),a=+Tr(t[1]),i=+Tr(t[2]),o=+Tr(t[3]);if(isNaN(n+a+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:bu(0,n,i,1,l,s)&&le(0,a,o,1,s[0])}}}var YE=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Qt,this.ondestroy=e.ondestroy||Qt,this.onrestart=e.onrestart||Qt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=j(e)?e:ls[e]||Jc(e)},r}(),J0=function(){function r(e){this.value=e}return r}(),ZE=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new J0(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),hs=function(){function r(e){this._list=new ZE,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new J0(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),t_={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 Cr(r){return r=Math.round(r),r<0?0:r>255?255:r}function XE(r){return r=Math.round(r),r<0?0:r>360?360:r}function fs(r){return r<0?0:r>1?1:r}function tv(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Cr(parseFloat(e)/100*255):Cr(parseInt(e,10))}function Pa(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?fs(parseFloat(e)/100):fs(parseFloat(e))}function ev(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Un(r,e,t){return r+(e-r)*t}function or(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function rv(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var e_=new hs(20),wu=null;function Wi(r,e){wu&&rv(wu,e),wu=e_.put(r,wu||e.slice())}function Ke(r,e){if(r){e=e||[];var t=e_.get(r);if(t)return rv(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in t_)return rv(e,t_[n]),Wi(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){or(e,0,0,0,1);return}return or(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),Wi(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){or(e,0,0,0,1);return}return or(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),Wi(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?or(e,+u[0],+u[1],+u[2],1):or(e,0,0,0,1);h=Pa(u.pop());case"rgb":if(u.length>=3)return or(e,tv(u[0]),tv(u[1]),tv(u[2]),u.length===3?h:Pa(u[3])),Wi(r,e),e;or(e,0,0,0,1);return;case"hsla":if(u.length!==4){or(e,0,0,0,1);return}return u[3]=Pa(u[3]),nv(u,e),Wi(r,e),e;case"hsl":if(u.length!==3){or(e,0,0,0,1);return}return nv(u,e),Wi(r,e),e;default:return}}or(e,0,0,0,1)}}function nv(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Pa(r[1]),a=Pa(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],or(e,Cr(ev(o,i,t+1/3)*255),Cr(ev(o,i,t)*255),Cr(ev(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function qE(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,a=Math.min(e,t,n),i=Math.max(e,t,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var h=((i-e)/6+o/2)/o,f=((i-t)/6+o/2)/o,c=((i-n)/6+o/2)/o;e===i?l=c-f:t===i?l=1/3+h-c:n===i&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function av(r,e){var t=Ke(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return gn(t,t.length===4?"rgba":"rgb")}}function iv(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],s=e[i],l=n-a;return t[0]=Cr(Un(o[0],s[0],l)),t[1]=Cr(Un(o[1],s[1],l)),t[2]=Cr(Un(o[2],s[2],l)),t[3]=fs(Un(o[3],s[3],l)),t}}function KE(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=Ke(e[a]),s=Ke(e[i]),l=n-a,u=gn([Cr(Un(o[0],s[0],l)),Cr(Un(o[1],s[1],l)),Cr(Un(o[2],s[2],l)),fs(Un(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}function cs(r,e,t,n){var a=Ke(r);if(r)return a=qE(a),e!=null&&(a[0]=XE(e)),t!=null&&(a[1]=Pa(t)),n!=null&&(a[2]=Pa(n)),gn(nv(a),"rgba")}function Tu(r,e){var t=Ke(r);if(t&&e!=null)return t[3]=fs(e),gn(t,"rgba")}function gn(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Cu(r,e){var t=Ke(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var r_=new hs(100);function ov(r){if(U(r)){var e=r_.get(r);return e||(e=av(r,-.1),r_.put(r,e)),e}else if(lu(r)){var t=B({},r);return t.colorStops=G(r.colorStops,function(n){return{offset:n.offset,color:av(n.color,-.1)}}),t}return r}var Du=Math.round;function vs(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Ke(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var jE=1e-4;function Yn(r){return r<jE&&r>-1e-4}function Au(r){return Du(r*1e3)/1e3}function sv(r){return Du(r*1e4)/1e4}function QE(r){return"matrix("+Au(r[0])+","+Au(r[1])+","+Au(r[2])+","+Au(r[3])+","+sv(r[4])+","+sv(r[5])+")"}var JE={left:"start",right:"end",center:"middle",middle:"middle"};function tP(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function eP(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function rP(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function n_(r){return r&&!!r.image}function nP(r){return r&&!!r.svgElement}function lv(r){return n_(r)||nP(r)}function a_(r){return r.type==="linear"}function i_(r){return r.type==="radial"}function o_(r){return r&&(r.type==="linear"||r.type==="radial")}function Mu(r){return"url(#"+r+")"}function s_(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function l_(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*fu,a=ot(r.scaleX,1),i=ot(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+Du(o*fu)+"deg, "+Du(s*fu)+"deg)"),l.join(" ")}var aP=function(){return mt.hasGlobalWindow&&j(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return process.env.NODE_ENV!=="production"&&wr("Base64 isn't natively supported in the current environment."),null}}(),uv=Array.prototype.slice;function yn(r,e,t){return(e-r)*t+r}function hv(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=yn(e[i],t[i],n);return r}function iP(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=yn(e[o][s],t[o][s],n)}return r}function Iu(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=e[i]+t[i]*n;return r}function u_(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function oP(r,e){for(var t=r.length,n=e.length,a=t>n?e:r,i=Math.min(t,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(t,n);s++)a.push({offset:o.offset,color:o.color.slice()})}function sP(r,e,t){var n=r,a=e;if(!(!n.push||!a.push)){var i=n.length,o=a.length;if(i!==o){var s=i>o;if(s)n.length=o;else for(var l=i;l<o;l++)n.push(t===1?a[l]:uv.call(a[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=a[l]);else for(var h=0;h<u;h++)isNaN(n[l][h])&&(n[l][h]=a[l][h])}}function ps(r){if(we(r)){var e=r.length;if(we(r[0])){for(var t=[],n=0;n<e;n++)t.push(uv.call(r[n]));return t}return uv.call(r)}return r}function Lu(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function lP(r){return we(r&&r[0])?2:1}var Eu=0,Pu=1,h_=2,ds=3,fv=4,cv=5,f_=6;function c_(r){return r===fv||r===cv}function ku(r){return r===Pu||r===h_}var gs=[0,0,0,0],uP=function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=f_,l=t;if(we(t)){var u=lP(t);s=u,(u===1&&!Ct(t[0])||u===2&&!Ct(t[0][0]))&&(o=!0)}else if(Ct(t)&&!wa(t))s=Eu;else if(U(t))if(!isNaN(+t))s=Eu;else{var h=Ke(t);h&&(l=h,s=ds)}else if(lu(t)){var f=B({},l);f.colorStops=G(t.colorStops,function(v){return{offset:v.offset,color:Ke(v.color)}}),a_(t)?s=fv:i_(t)&&(s=cv),l=f}i===0?this.valType=s:(s!==this.valType||s===f_)&&(o=!0),this.discrete=this.discrete||o;var c={time:e,value:l,rawValue:t,percent:0};return n&&(c.easing=n,c.easingFunc=j(n)?n:ls[n]||Jc(n)),a.push(c),c},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(d,g){return d.time-g.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=ku(a),u=c_(a),h=0;h<i;h++){var f=n[h],c=f.value,v=o.value;f.percent=f.time/e,s||(l&&h!==i-1?sP(c,v,a):u&&oP(c.colorStops,v.colorStops))}if(!s&&a!==cv&&t&&this.needsAnimate()&&t.needsAnimate()&&a===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,h=0;h<i;h++)a===Eu?n[h].additiveValue=n[h].value-p:a===ds?n[h].additiveValue=Iu([],n[h].value,p,-1):ku(a)&&(n[h].additiveValue=a===Pu?Iu([],n[h].value,p,-1):u_([],n[h].value,p,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,a=n?"additiveValue":"value",i=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=i===ds,h,f=this._lastFr,c=Math.min,v,p;if(s===1)v=p=o[0];else{if(t<0)h=0;else if(t<this._lastFrP){var d=c(f+1,s-1);for(h=d;h>=0&&!(o[h].percent<=t);h--);h=c(h,s-2)}else{for(h=f;h<s&&!(o[h].percent>t);h++);h=c(h-1,s-2)}p=o[h+1],v=o[h]}if(v&&p){this._lastFr=h,this._lastFrP=t;var g=p.percent-v.percent,y=g===0?1:c((t-v.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=n?this._additiveValue:u?gs:e[l];if((ku(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:p.rawValue;else if(ku(i))i===Pu?hv(m,v[a],p[a],y):iP(m,v[a],p[a],y);else if(c_(i)){var _=v[a],S=p[a],x=i===fv;e[l]={type:x?"linear":"radial",x:yn(_.x,S.x,y),y:yn(_.y,S.y,y),colorStops:G(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:yn(w.offset,C.offset,y),color:Lu(hv([],w.color,C.color,y))}}),global:S.global},x?(e[l].x2=yn(_.x2,S.x2,y),e[l].y2=yn(_.y2,S.y2,y)):e[l].r=yn(_.r,S.r,y)}else if(u)hv(m,v[a],p[a],y),n||(e[l]=Lu(m));else{var b=yn(v[a],p[a],y);n?this._additiveValue=b:e[l]=b}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===Eu?e[n]=e[n]+a:t===ds?(Ke(e[n],gs),Iu(gs,gs,a,1),e[n]=Lu(gs)):t===Pu?Iu(e[n],e[n],a,1):t===h_&&u_(e[n],e[n],a,1)},r}(),vv=function(){function r(e,t,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){wr("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,xt(t),n)},r.prototype.whenWithKeys=function(e,t,n,a){for(var i=this._tracks,o=0;o<n.length;o++){var s=n[o],l=i[s];if(!l){l=i[s]=new uP(s);var u=void 0,h=this._getAdditiveTrack(s);if(h){var f=h.keyframes,c=f[f.length-1];u=c&&c.value,h.valType===ds&&u&&(u=Lu(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,ps(u),a),this._trackKeys.push(s)}l.addKeyframe(e,ps(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var a=0;a<n.length;a++){var i=n[a].getTrack(e);i&&(t=i)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,h=u.length;if(s.prepare(a,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[h-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var c=new YE({life:a,loop:this._loop,delay:this._delay||0,onframe:function(v){t._started=2;var p=t._additiveAnimators;if(p){for(var d=!1,g=0;g<p.length;g++)if(p[g]._clip){d=!0;break}d||(t._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(t._target,v);var y=t._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](t._target,v)},ondestroy:function(){t._doneCallback()}});this._clip=c,this.animation&&this.animation.addClip(c),e&&c.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return G(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,a=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,i=0;i<a.length;i++)if(!n[a[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var a=0;a<t.length;a++){var i=t[a],o=this._tracks[i];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[i]=ps(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||xt(e);for(var n=0;n<t.length;n++){var a=t[n],i=this._tracks[a];if(i){var o=i.keyframes;if(o.length>1){var s=o.pop();i.addKeyframe(s.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function $i(){return new Date().getTime()}var hP=function(r){Wt(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,a=t.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=$i()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(_u(n),!t._paused&&t.update())}_u(n)},e.prototype.start=function(){this._running||(this._time=$i(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=$i(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=$i()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var a=new vv(t,n.loop);return this.addAnimator(a),a},e}(nr),fP=300,pv=mt.domSupported,dv=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=G(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}}(),v_={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},p_=!1;function gv(r){var e=r.pointerType;return e==="pen"||e==="touch"}function cP(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function yv(r){r&&(r.zrByTouch=!0)}function vP(r,e){return ar(r.dom,new pP(r,e),!0)}function d_(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var pP=function(){function r(e,t){this.stopPropagation=Qt,this.stopImmediatePropagation=Qt,this.preventDefault=Qt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Dr={mousedown:function(r){r=ar(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ar(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=ar(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ar(this.dom,r);var e=r.toElement||r.relatedTarget;d_(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){p_=!0,r=ar(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){p_||(r=ar(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ar(this.dom,r),yv(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Dr.mousemove.call(this,r),Dr.mousedown.call(this,r)},touchmove:function(r){r=ar(this.dom,r),yv(r),this.handler.processGesture(r,"change"),Dr.mousemove.call(this,r)},touchend:function(r){r=ar(this.dom,r),yv(r),this.handler.processGesture(r,"end"),Dr.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<fP&&Dr.click.call(this,r)},pointerdown:function(r){Dr.mousedown.call(this,r)},pointermove:function(r){gv(r)||Dr.mousemove.call(this,r)},pointerup:function(r){Dr.mouseup.call(this,r)},pointerout:function(r){gv(r)||Dr.mouseout.call(this,r)}};A(["click","dblclick","contextmenu"],function(r){Dr[r]=function(e){e=ar(this.dom,e),this.trigger(r,e)}});var mv={pointermove:function(r){gv(r)||mv.mousemove.call(this,r)},pointerup:function(r){mv.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function dP(r,e){var t=e.domHandlers;mt.pointerEventsSupported?A(dv.pointer,function(n){Ru(e,n,function(a){t[n].call(r,a)})}):(mt.touchEventsSupported&&A(dv.touch,function(n){Ru(e,n,function(a){t[n].call(r,a),cP(e)})}),A(dv.mouse,function(n){Ru(e,n,function(a){a=Wc(a),e.touching||t[n].call(r,a)})}))}function gP(r,e){mt.pointerEventsSupported?A(v_.pointer,t):mt.touchEventsSupported||A(v_.mouse,t);function t(n){function a(i){i=Wc(i),d_(r,i.target)||(i=vP(r,i),e.domHandlers[n].call(r,i))}Ru(e,n,a,{capture:!0})}}function Ru(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,$c(r.domTarget,e,t,n)}function _v(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&IE(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var g_=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),yP=function(r){Wt(e,r);function e(t,n){var a=r.call(this)||this;return a.__pointerCapturing=!1,a.dom=t,a.painterRoot=n,a._localHandlerScope=new g_(t,Dr),pv&&(a._globalHandlerScope=new g_(document,mv)),dP(a,a._localHandlerScope),a}return e.prototype.dispose=function(){_v(this._localHandlerScope),pv&&_v(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,pv&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?gP(this,n):_v(n)}},e}(nr),y_=1;mt.hasGlobalWindow&&(y_=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Nu=y_,Sv=.4,xv="#333",bv="#ccc",mP="#eee",m_=pu,_P=5e-5;function ka(r){return r>_P||r<-5e-5}var Ra=[],Ui=[],wv=qe(),Tv=Math.abs,mn=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return ka(this.rotation)||ka(this.x)||ka(this.y)||ka(this.scaleX-1)||ka(this.scaleY-1)||ka(this.skewX)||ka(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(m_(n),this.invTransform=null);return}n=n||qe(),t?this.getLocalTransform(n):m_(n),e&&(t?dn(n,e,n):Yc(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ra);var n=Ra[0]<0?-1:1,a=Ra[1]<0?-1:1,i=((Ra[0]-n)*t+n)/Ra[0]||0,o=((Ra[1]-a)*t+a)/Ra[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||qe(),Fi(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||qe(),dn(Ui,e.invTransform,t),t=Ui);var n=this.originX,a=this.originY;(n||a)&&(wv[4]=n,wv[5]=a,dn(Ui,t,wv),Ui[4]-=n,Ui[5]-=a,t=Ui),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],a=this.invTransform;return a&&ye(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&ye(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&Tv(e[0]-1)>1e-10&&Tv(e[3]-1)>1e-10?Math.sqrt(Tv(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){__(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,h=e.x,f=e.y,c=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var p=n+s,d=a+l;t[4]=-p*i-c*d*o,t[5]=-d*o-v*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=v*i,t[2]=c*o,u&&Aa(t,t,u),t[4]+=n+h,t[5]+=a+f,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),$r=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function __(r,e){for(var t=0;t<$r.length;t++){var n=$r[t];r[n]=e[n]}}var S_={};function je(r,e){e=e||Vn;var t=S_[e];t||(t=S_[e]=new hs(500));var n=t.get(r);return n==null&&(n=Bn.measureText(r,e).width,t.put(r,n)),n}function x_(r,e,t,n){var a=je(r,e),i=Ou(e),o=ms(0,a,t),s=Yi(0,i,n),l=new vt(o,s,a,i);return l}function ys(r,e,t,n){var a=((r||"")+"").split(`
`),i=a.length;if(i===1)return x_(a[0],e,t,n);for(var o=new vt(0,0,0,0),s=0;s<a.length;s++){var l=x_(a[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function ms(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function Yi(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function Ou(r){return je("国",r)}function Ar(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function Vu(r,e,t){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,h="left",f="top";if(n instanceof Array)l+=Ar(n[0],t.width),u+=Ar(n[1],t.height),h=null,f=null;else switch(n){case"left":l-=a,u+=s,h="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,h="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,h="center";break;case"inside":l+=o/2,u+=s,h="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,h="right",f="middle";break;case"insideTop":l+=o/2,u+=a,h="center";break;case"insideBottom":l+=o/2,u+=i-a,h="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,h="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,h="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=h,r.verticalAlign=f,r}var Cv="__zr_normal__",Dv=$r.concat(["ignore"]),SP=Gr($r,function(r,e){return r[e]=!0,r},{ignore:!1}),Zi={},xP=new vt(0,0,0,0),Bu=function(){function r(e){this.id=b0(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;if(i.copyTransform(t),n.position!=null){var h=xP;n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),a||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Zi,n,h):Vu(Zi,n,h),i.x=Zi.x,i.y=Zi.y,o=Zi.align,s=Zi.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var c=void 0,v=void 0;f==="center"?(c=h.width*.5,v=h.height*.5):(c=Ar(f[0],h.width),v=Ar(f[1],h.height)),u=!0,i.originX=-i.x+c+(a?0:h.x),i.originY=-i.y+v+(a?0:h.y)}}n.rotation!=null&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var d=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=n.outsideFill,m=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=Hr,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?bv:xv},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&Ke(t);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,gn(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},B(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(J(e))for(var n=e,a=xt(n),i=0;i<a.length;i++){var o=a[i];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var a=this.animators[n],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==Cv)){var o=a.targetName,s=o?t[o]:t;a.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Dv)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var a=0;a<n.length;a++){var i=n[a];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Cv,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===Cv,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(dt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){wr("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||a);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,c=this._textGuide;return f&&f.useState(e,t,n,h),c&&c.useState(e,t,n,h),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l<o;l++)if(e[l]!==i[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],h=void 0;this.stateProxy&&(h=this.stateProxy(u,e)),h||(h=this.states[u]),h&&a.push(h)}var f=a[o-1],c=!!(f&&f.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(a),p=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(e.join(","),v,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,c),g&&g.useStates(e,t,c),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=dt(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var a=this.currentStates.slice(),i=dt(a,e),o=dt(a,t)>=0;i>=0?o?a.splice(i,1):a[i]=t:n&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,a=0;a<e.length;a++){var i=e[a];B(t,i),i.textConfig&&(n=n||{},B(n,i.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,a,i,o){var s=!(t&&a);t&&t.textConfig?(this.textConfig=B({},a?this.textConfig:n.textConfig),B(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,h=0;h<Dv.length;h++){var f=Dv[h],c=i&&SP[f];t&&t[f]!=null?c?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&n[f]!=null&&(c?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!i)for(var h=0;h<this.animators.length;h++){var v=this.animators[h],p=v.targetName;v.getLoop()||v.__changeFinalValue(p?(t||n)[p]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(e===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;if(t!==e){if(t&&t!==e&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new mn,this._attachComponent(e),this._textContent=e,this.markRedraw()}},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),B(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=Hr;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,n){var a=e?this[e]:this;if(process.env.NODE_ENV!=="production"&&!a){wr('Property "'+e+'" is not existed in element '+this.id);return}var i=new vv(a,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},r.prototype.addAnimator=function(e,t){var n=this.__zr,a=this;e.during(function(){a.updateDuringAnimation(t)}).done(function(){var i=a.animators,o=dt(i,e);o>=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,a=n.length,i=[],o=0;o<a;o++){var s=n[o];!e||e===s.scope?s.stop(t):i.push(s)}return this.animators=i,this},r.prototype.animateTo=function(e,t,n){Av(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){Av(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,a){for(var i=Av(this,t,n,a),o=0;o<i.length;o++)i[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Hr;var t={};function n(i,o,s){t[i+o+s]||(console.warn("DEPRECATED: '"+i+"' has been deprecated. use '"+o+"', '"+s+"' instead"),t[i+o+s]=!0)}function a(i,o,s,l){Object.defineProperty(e,i,{get:function(){if(process.env.NODE_ENV!=="production"&&n(i,s,l),!this[o]){var h=this[o]=[];u(this,h)}return this[o]},set:function(h){process.env.NODE_ENV!=="production"&&n(i,s,l),this[s]=h[0],this[l]=h[1],this[o]=h,u(this,h)}});function u(h,f){Object.defineProperty(f,0,{get:function(){return h[s]},set:function(c){h[s]=c}}),Object.defineProperty(f,1,{get:function(){return h[l]},set:function(c){h[l]=c}})}}Object.defineProperty&&(a("position","_legacyPos","x","y"),a("scale","_legacyScale","scaleX","scaleY"),a("origin","_legacyOrigin","originX","originY"))}(),r}();te(Bu,nr),te(Bu,mn);function Av(r,e,t,n,a){t=t||{};var i=[];b_(r,"",r,e,t,n,i,a);var o=i.length,s=!1,l=t.done,u=t.aborted,h=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),i.length>0&&t.during&&i[0].during(function(p,d){t.during(d)});for(var c=0;c<i.length;c++){var v=i[c];h&&v.done(h),f&&v.aborted(f),t.force&&v.duration(t.duration),v.start(t.easing)}return i}function Mv(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function bP(r){return we(r[0])}function wP(r,e,t){if(we(e[t]))if(we(r[t])||(r[t]=[]),Le(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),Mv(r[t],e[t],n))}else{var a=e[t],i=r[t],o=a.length;if(bP(a))for(var s=a[0].length,l=0;l<o;l++)i[l]?Mv(i[l],a[l],s):i[l]=Array.prototype.slice.call(a[l]);else Mv(i,a,o);i.length=a.length}else r[t]=e[t]}function TP(r,e){return r===e||we(r)&&we(e)&&CP(r,e)}function CP(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function b_(r,e,t,n,a,i,o,s){for(var l=xt(n),u=a.duration,h=a.delay,f=a.additive,c=a.setToFinal,v=!J(i),p=r.animators,d=[],g=0;g<l.length;g++){var y=l[g],m=n[y];if(m!=null&&t[y]!=null&&(v||i[y]))if(J(m)&&!we(m)&&!lu(m)){if(e){s||(t[y]=m,r.updateDuringAnimation(e));continue}b_(r,y,t[y],m,a,i&&i[y],o,s)}else d.push(y);else s||(t[y]=m,r.updateDuringAnimation(e),d.push(y))}var _=d.length;if(!f&&_)for(var S=0;S<p.length;S++){var x=p[S];if(x.targetName===e){var b=x.stopTracks(d);if(b){var w=dt(p,x);p.splice(w,1)}}}if(a.force||(d=At(d,function(M){return!TP(n[M],t[M])}),_=d.length),_>0||a.force&&!o.length){var T=void 0,C=void 0,D=void 0;if(s){C={},c&&(T={});for(var S=0;S<_;S++){var y=d[S];C[y]=t[y],c?T[y]=n[y]:t[y]=n[y]}}else if(c){D={};for(var S=0;S<_;S++){var y=d[S];D[y]=ps(t[y]),wP(t,n,y)}}var x=new vv(t,!1,!1,f?At(p,function(I){return I.targetName===e}):null);x.targetName=e,a.scope&&(x.scope=a.scope),c&&T&&x.whenWithKeys(0,T,d),D&&x.whenWithKeys(0,D,d),x.whenWithKeys(u??500,s?C:n,d).delay(h||0),r.addAnimator(x,e),o.push(x)}}var it=function(r){Wt(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,a=0;a<n.length;a++)if(n[a].name===t)return n[a]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),process.env.NODE_ENV!=="production"&&t.__hostTarget))throw"This elemenet has been used as an attachment";return this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var a=this._children,i=a.indexOf(n);i>=0&&(a.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var a=dt(this._children,t);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(t,n){var a=this._children,i=a[n];if(t&&t!==this&&t.parent!==this&&t!==i){a[n]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,a=this._children,i=dt(a,t);return i<0?this:(a.splice(i,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,a=0;a<t.length;a++){var i=t[a];n&&i.removeSelfFromZr(n),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var a=this._children,i=0;i<a.length;i++){var o=a[i];t.call(n,o,i)}return this},e.prototype.traverse=function(t,n){for(var a=0;a<this._children.length;a++){var i=this._children[a],o=t.call(n,i);i.isGroup&&!o&&i.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new vt(0,0,0,0),a=t||this._children,i=[],o=null,s=0;s<a.length;s++){var l=a[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),h=l.getLocalTransform(i);h?(vt.applyTransform(n,u,h),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(Bu);it.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 _s={},w_={};function DP(r){delete w_[r]}function AP(r){if(!r)return!1;if(typeof r=="string")return Cu(r,1)<Sv;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,a=0;a<n;a++)t+=Cu(e[a].color,1);return t/=n,t<Sv}return!1}var MP=function(){function r(e,t,n){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new FE,o=n.renderer||"canvas";if(_s[o]||(o=xt(_s)[0]),process.env.NODE_ENV!=="production"&&!_s[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new _s[o](t,i,n,e),l=n.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!mt.node&&!mt.worker&&!l?new yP(s.getViewportRoot(),s.root):null,h=n.useCoarsePointer,f=h==null||h==="auto"?mt.touchEventsSupported:!!h,c=44,v;f&&(v=ot(n.pointerSize,c)),this.handler=new O0(i,s,u,s.root,v),this.animation=new hP({stage:{update:l?null:function(){return a._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=AP(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,n=$i();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var a=$i();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof it&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,DP(this.id))},r}();function T_(r,e){var t=new MP(b0(),r,e);return w_[t.id]=t,t}function IP(r,e){_s[r]=e}var Iv;function LP(r){if(typeof Iv=="function")return Iv(r)}function EP(r){Iv=r}var PP=1e-4,C_=20;function kP(r){return r.replace(/^\s+|\s+$/g,"")}function It(r,e,t,n){var a=e[0],i=e[1],o=t[0],s=t[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}function W(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return U(r)?kP(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Kt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),C_),r=(+r).toFixed(e),t?r:+r}function sr(r){return r.sort(function(e,t){return e-t}),r}function Ur(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return Lv(r)}function Lv(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function D_(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function RP(r,e){var t=Gr(r,function(v,p){return v+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=G(r,function(v){return(isNaN(v)?0:v)/t*n*100}),i=n*100,o=G(a,function(v){return Math.floor(v)}),s=Gr(o,function(v,p){return v+p},0),l=G(a,function(v,p){return v-o[p]});s<i;){for(var u=Number.NEGATIVE_INFINITY,h=null,f=0,c=l.length;f<c;++f)l[f]>u&&(u=l[f],h=f);++o[h],l[h]=0,++s}return G(o,function(v){return v/n})}function NP(r,e){var t=Math.max(Ur(r),Ur(e)),n=r+e;return t>C_?n:Kt(n,t)}var A_=9007199254740991;function M_(r){var e=Math.PI*2;return(r%e+e)%e}function Ss(r){return r>-1e-4&&r<PP}var OP=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Yr(r){if(r instanceof Date)return r;if(U(r)){var e=OP.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function VP(r){return Math.pow(10,zu(r))}function zu(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function I_(r,e){var t=zu(r),n=Math.pow(10,t),a=r/n,i;return a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10,r=i*n,t>=-20?+r.toFixed(t<0?-t:0):r}function Ev(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),a=+r[n-1],i=t-n;return i?a+i*(r[n]-a):a}function L_(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n<r.length;){for(var a=r[n].interval,i=r[n].close,o=0;o<2;o++)a[o]<=e&&(a[o]=e,i[o]=o?1:1-t),e=a[o],t=i[o];a[0]===a[1]&&i[0]*i[1]!==1?r.splice(n,1):n++}return r;function s(l,u,h){return l.interval[h]<u.interval[h]||l.interval[h]===u.interval[h]&&(l.close[h]-u.close[h]===(h?-1:1)||!h&&s(l,u,1))}}function _n(r){var e=parseFloat(r);return e==r&&(e!==0||!U(r)||r.indexOf("x")<=0)?e:NaN}function Pv(r){return!isNaN(_n(r))}function E_(){return Math.round(Math.random()*9)}function P_(r,e){return e===0?r:P_(e,r%e)}function k_(r,e){return r==null?e:e==null?r:r*e/P_(r,e)}var BP="[ECharts] ",R_={},zP=typeof console<"u"&&console.warn&&console.log;function Gu(r,e,t){if(zP){if(t){if(R_[e])return;R_[e]=!0}console[r](BP+e)}}function GP(r,e){Gu("log",r,e)}function Xt(r,e){Gu("warn",r,e)}function me(r,e){Gu("error",r,e)}function Mr(r){process.env.NODE_ENV!=="production"&&Gu("warn","DEPRECATED: "+r,!0)}function re(r,e,t){process.env.NODE_ENV!=="production"&&Mr((t?"["+t+"]":"")+(r+" is deprecated, use "+e+" instead."))}function ke(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t="";if(process.env.NODE_ENV!=="production"){var n=function(a){return a===void 0?"undefined":a===1/0?"Infinity":a===-1/0?"-Infinity":wa(a)?"NaN":a instanceof Date?"Date("+a.toISOString()+")":j(a)?"function () { ... }":T0(a)?a+"":null};t=G(r,function(a){if(U(a))return a;var i=n(a);if(i!=null)return i;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(a,function(o,s){var l=n(s);return l??s})}catch{return"?"}else return"?"}).join(" ")}return t}function Mt(r){throw new Error(r)}function N_(r,e,t){return(e-r)*t+r}var O_="series\0",V_="\0_ec_\0";function Pt(r){return r instanceof Array?r:r==null?[]:[r]}function Na(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,a=t.length;n<a;n++){var i=t[n];!r.emphasis[e].hasOwnProperty(i)&&r[e].hasOwnProperty(i)&&(r.emphasis[e][i]=r[e][i])}}}var B_=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Xi(r){return J(r)&&!z(r)&&!(r instanceof Date)?r.value:r}function FP(r){return J(r)&&!(r instanceof Array)}function z_(r,e,t){var n=t==="normalMerge",a=t==="replaceMerge",i=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=q();A(e,function(l,u){if(!J(l)){e[u]=null;return}process.env.NODE_ENV!=="production"&&(l.id!=null&&!H_(l.id)&&F_(l.id),l.name!=null&&!H_(l.name)&&F_(l.name))});var s=HP(r,o,t);return(n||a)&&WP(s,r,o,e),n&&$P(s,e),n||a?UP(s,e,a):i&&YP(s,e),ZP(s),s}function HP(r,e,t){var n=[];if(t==="replaceAll")return n;for(var a=0;a<r.length;a++){var i=r[a];i&&i.id!=null&&e.set(i.id,a),n.push({existing:t==="replaceMerge"||qi(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function WP(r,e,t,n){A(n,function(a,i){if(!(!a||a.id==null)){var o=xs(a.id),s=t.get(o);if(s!=null){var l=r[s];tt(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=a,l.existing=e[s],n[i]=null}}})}function $P(r,e){A(e,function(t,n){if(!(!t||t.name==null))for(var a=0;a<r.length;a++){var i=r[a].existing;if(!r[a].newOption&&i&&(i.id==null||t.id==null)&&!qi(t)&&!qi(i)&&G_("name",i,t)){r[a].newOption=t,e[n]=null;return}}})}function UP(r,e,t){A(e,function(n){if(n){for(var a,i=0;(a=r[i])&&(a.newOption||qi(a.existing)||a.existing&&n.id!=null&&!G_("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),i++}})}function YP(r,e){A(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function ZP(r){var e=q();A(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),A(r,function(t){var n=t.newOption;tt(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),A(r,function(t,n){var a=t.existing,i=t.newOption,o=t.keyInfo;if(J(i)){if(o.name=i.name!=null?xs(i.name):a?a.name:O_+n,a)o.id=xs(a.id);else if(i.id!=null)o.id=xs(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function G_(r,e,t){var n=oe(e[r],null),a=oe(t[r],null);return n!=null&&a!=null&&n===a}function xs(r){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error;return oe(r,"")}function oe(r,e){return r==null?e:U(r)?r:Ct(r)||su(r)?r+"":e}function F_(r){process.env.NODE_ENV!=="production"&&Xt("`"+r+"` is invalid id or name. Must be a string or number.")}function H_(r){return su(r)||Pv(r)}function kv(r){var e=r.name;return!!(e&&e.indexOf(O_))}function qi(r){return r&&r.id!=null&&xs(r.id).indexOf(V_)===0}function XP(r){return V_+r}function qP(r,e,t){A(r,function(n){var a=n.newOption;J(a)&&(n.keyInfo.mainType=e,n.keyInfo.subType=KP(e,a,n.existing,t))})}function KP(r,e,t,n){var a=e.type?e.type:t?t.subType:n.determineSubType(r,e);return a}function jP(r,e){var t={},n={};return a(r||[],t),a(e||[],n,t),[i(t),i(n)];function a(o,s,l){for(var u=0,h=o.length;u<h;u++){var f=oe(o[u].seriesId,null);if(f==null)return;for(var c=Pt(o[u].dataIndex),v=l&&l[f],p=0,d=c.length;p<d;p++){var g=c[p];v&&v[g]?v[g]=null:(s[f]||(s[f]={}))[g]=1}}}function i(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var h=i(o[u],!0);h.length&&l.push({seriesId:u,dataIndex:h})}return l}}function Oa(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return z(e.dataIndex)?G(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return z(e.name)?G(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function bt(){var r="__ec_inner_"+QP++;return function(e){return e[r]||(e[r]={})}}var QP=E_();function bs(r,e,t){var n=Rv(e,t),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!a&&l&&i.set(l,{}),i.each(function(u,h){var f=ws(r,h,u,{useDefault:l===h,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[h+"Models"]=f.models,s[h+"Model"]=f.models[0]}),s}function Rv(r,e){var t;if(U(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var a=q(),i={},o=!1;return A(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],h=u[1],f=(u[2]||"").toLowerCase();if(!(!h||!f||e&&e.includeMainTypes&&dt(e.includeMainTypes,h)<0)){o=o||!!h;var c=a.get(h)||a.set(h,{});c[f]=s}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var ne={useDefault:!0,enableAll:!1,enableNone:!1},JP={useDefault:!1,enableAll:!0,enableNone:!0};function ws(r,e,t,n){n=n||ne;var a=t.index,i=t.id,o=t.name,s={models:null,specified:a!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}return a==="none"||a===!1?(tt(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(a==="all"&&(tt(n.enableAll,'`"all"` is not a valid value on index option.'),a=i=o=null),s.models=r.queryComponents({mainType:e,index:a,id:i,name:o}),s)}function W_(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function tk(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function ek(r){return r==="auto"?mt.domSupported?"html":"richText":r||"html"}function Nv(r,e){var t=q(),n=[];return A(r,function(a){var i=e(a);(t.get(i)||(n.push(i),t.set(i,[]))).push(a)}),{keys:n,buckets:t}}function $_(r,e,t,n,a){var i=e==null||e==="auto";if(n==null)return n;if(Ct(n)){var o=N_(t||0,n,a);return Kt(o,i?Math.max(Ur(t||0),Ur(n)):e)}else{if(U(n))return a<1?t:n;for(var s=[],l=t,u=n,h=Math.max(l?l.length:0,u.length),f=0;f<h;++f){var c=r.getDimensionInfo(f);if(c&&c.type==="ordinal")s[f]=(a<1&&l?l:u)[f];else{var v=l&&l[f]?l[f]:0,p=u[f],o=N_(v,p,a);s[f]=Kt(o,i?Math.max(Ur(v),Ur(p)):e)}}return s}}var rk=".",Va="___EC__COMPONENT__CONTAINER___",U_="___EC__EXTENDED_CLASS___";function Zr(r){var e={main:"",sub:""};if(r){var t=r.split(rk);e.main=t[0]||"",e.sub=t[1]||""}return e}function nk(r){tt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function ak(r){return!!(r&&r[U_])}function Ov(r,e){r.$constructor=r,r.extend=function(t){process.env.NODE_ENV!=="production"&&A(e,function(i){t[i]||console.warn("Method `"+i+"` should be implemented"+(t.type?" in "+t.type:"")+".")});var n=this,a;return ik(n)?a=function(i){O(o,i);function o(){return i.apply(this,arguments)||this}return o}(n):(a=function(){(t.$constructor||n).apply(this,arguments)},uE(a,this)),B(a.prototype,t),a[U_]=!0,a.extend=this.extend,a.superCall=lk,a.superApply=uk,a.superClass=n,a}}function ik(r){return j(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Y_(r,e){r.extend=e.extend}var ok=Math.round(Math.random()*10);function sk(r){var e=["__\0is_clz",ok++].join("_");r.prototype[e]=!0,process.env.NODE_ENV!=="production"&&tt(!r.isInstance,'The method "is" can not be defined.'),r.isInstance=function(t){return!!(t&&t[e])}}function lk(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function uk(r,e,t){return this.superClass.prototype[e].apply(r,t)}function Fu(r){var e={};r.registerClass=function(n){var a=n.type||n.prototype.type;if(a){nk(a),n.prototype.type=a;var i=Zr(a);if(!i.sub)process.env.NODE_ENV!=="production"&&e[i.main]&&console.warn(i.main+" exists."),e[i.main]=n;else if(i.sub!==Va){var o=t(i);o[i.sub]=n}}return n},r.getClass=function(n,a,i){var o=e[n];if(o&&o[Va]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var a=Zr(n),i=[],o=e[a.main];return o&&o[Va]?A(o,function(s,l){l!==Va&&i.push(s)}):i.push(o),i},r.hasClass=function(n){var a=Zr(n);return!!e[a.main]},r.getAllClassMainTypes=function(){var n=[];return A(e,function(a,i){n.push(i)}),n},r.hasSubTypes=function(n){var a=Zr(n),i=e[a.main];return i&&i[Va]};function t(n){var a=e[n.main];return(!a||!a[Va])&&(a=e[n.main]={},a[Va]=!0),a}}function Ba(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,a,i){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(a&&dt(a,l)>=0||i&&dt(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var hk=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],fk=Ba(hk),ck=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return fk(this,e,t)},r}(),Vv=new hs(50);function vk(r){if(typeof r=="string"){var e=Vv.get(r);return e&&e.image}else return r}function Bv(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=Vv.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!Hu(e)&&i.pending.push(o)):(e=Bn.loadImage(r,Z_,Z_),e.__zrImageSrc=r,Vv.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function Z_(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function Hu(r){return r&&r.width&&r.height}var zv=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function pk(r,e,t,n,a,i){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
`);i=X_(t,n,a,i);for(var s=!1,l={},u=0,h=o.length;u<h;u++)q_(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
`),r.isTruncated=s}function X_(r,e,t,n){n=n||{};var a=B({},n);a.font=e,t=ot(t,"..."),a.maxIterations=ot(n.maxIterations,2);var i=a.minChar=ot(n.minChar,0);a.cnCharWidth=je("国",e);var o=a.ascCharWidth=je("a",e);a.placeholder=ot(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<i&&s>=o;l++)s-=o;var u=je(t,e);return u>s&&(t="",u=0),s=r-u,a.ellipsis=t,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=r,a}function q_(r,e,t){var n=t.containerWidth,a=t.font,i=t.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=je(e,a);if(o<=n){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?dk(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=je(e,a)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function dk(r,e,t,n){for(var a=0,i=0,o=r.length;i<o&&a<e;i++){var s=r.charCodeAt(i);a+=0<=s&&s<=127?t:n}return i}function gk(r,e){r!=null&&(r+="");var t=e.overflow,n=e.padding,a=e.font,i=t==="truncate",o=Ou(a),s=ot(e.lineHeight,o),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",h=!1,f=e.width,c;f!=null&&(t==="break"||t==="breakAll")?c=r?j_(r,e.font,f,t==="breakAll",0).lines:[]:c=r?r.split(`
`):[];var v=c.length*s,p=ot(e.height,v);if(v>p&&u){var d=Math.floor(p/s);h=h||c.length>d,c=c.slice(0,d)}if(r&&i&&f!=null)for(var g=X_(f,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),y={},m=0;m<c.length;m++)q_(y,c[m],g),c[m]=y.textLine,h=h||y.isTruncated;for(var _=p,S=0,m=0;m<c.length;m++)S=Math.max(je(c[m],a),S);f==null&&(f=S);var x=S;return n&&(_+=n[0]+n[2],x+=n[1]+n[3],f+=n[1]+n[3]),l&&(x=f),{lines:c,height:p,outerWidth:x,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:S,contentHeight:v,width:f,isTruncated:h}}var yk=function(){function r(){}return r}(),K_=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),mk=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function _k(r,e){var t=new mk;if(r!=null&&(r+=""),!r)return t;for(var n=e.width,a=e.height,i=e.overflow,o=(i==="break"||i==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:i==="breakAll"}:null,s=zv.lastIndex=0,l;(l=zv.exec(r))!=null;){var u=l.index;u>s&&Gv(t,r.substring(s,u),e,o),Gv(t,l[2],e,o,l[1]),s=zv.lastIndex}s<r.length&&Gv(t,r.substring(s,r.length),e,o);var h=[],f=0,c=0,v=e.padding,p=i==="truncate",d=e.lineOverflow==="truncate",g={};function y(F,H,$){F.width=H,F.lineHeight=$,f+=$,c=Math.max(c,H)}t:for(var m=0;m<t.lines.length;m++){for(var _=t.lines[m],S=0,x=0,b=0;b<_.tokens.length;b++){var w=_.tokens[b],T=w.styleName&&e.rich[w.styleName]||{},C=w.textPadding=T.padding,D=C?C[1]+C[3]:0,M=w.font=T.font||e.font;w.contentHeight=Ou(M);var I=ot(T.height,w.contentHeight);if(w.innerHeight=I,C&&(I+=C[0]+C[2]),w.height=I,w.lineHeight=rr(T.lineHeight,e.lineHeight,I),w.align=T&&T.align||e.align,w.verticalAlign=T&&T.verticalAlign||"middle",d&&a!=null&&f+w.lineHeight>a){var L=t.lines.length;b>0?(_.tokens=_.tokens.slice(0,b),y(_,x,S),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m),t.isTruncated=t.isTruncated||t.lines.length<L;break t}var E=T.width,P=E==null||E==="auto";if(typeof E=="string"&&E.charAt(E.length-1)==="%")w.percentWidth=E,h.push(w),w.contentWidth=je(w.text,M);else{if(P){var k=T.backgroundColor,N=k&&k.image;N&&(N=vk(N),Hu(N)&&(w.width=Math.max(w.width,N.width*I/N.height)))}var R=p&&n!=null?n-x:null;R!=null&&R<w.width?!P||R<D?(w.text="",w.width=w.contentWidth=0):(pk(g,w.text,R-D,M,e.ellipsis,{minChar:e.truncateMinChar}),w.text=g.text,t.isTruncated=t.isTruncated||g.isTruncated,w.width=w.contentWidth=je(w.text,M)):w.contentWidth=je(w.text,M)}w.width+=D,x+=w.width,T&&(S=Math.max(S,w.lineHeight))}y(_,x,S)}t.outerWidth=t.width=ot(n,c),t.outerHeight=t.height=ot(a,f),t.contentHeight=f,t.contentWidth=c,v&&(t.outerWidth+=v[1]+v[3],t.outerHeight+=v[0]+v[2]);for(var m=0;m<h.length;m++){var w=h[m],V=w.percentWidth;w.width=parseInt(V,10)/100*t.width}return t}function Gv(r,e,t,n,a){var i=e==="",o=a&&t.rich[a]||{},s=r.lines,l=o.font||t.font,u=!1,h,f;if(n){var c=o.padding,v=c?c[1]+c[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Ar(o.width,n.width)+v;s.length>0&&p+n.accumWidth>n.width&&(h=e.split(`
`),u=!0),n.accumWidth=p}else{var d=j_(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=d.accumWidth+v,f=d.linesWidths,h=d.lines}}else h=e.split(`
`);for(var g=0;g<h.length;g++){var y=h[g],m=new yk;if(m.styleName=a,m.text=y,m.isLineHolder=!y&&!i,typeof o.width=="number"?m.width=o.width:m.width=f?f[g]:je(y,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new K_)).tokens,S=_.length;S===1&&_[0].isLineHolder?_[0]=m:(y||!S||i)&&_.push(m)}else s.push(new K_([m]))}}function Sk(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var xk=Gr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function bk(r){return Sk(r)?!!xk[r]:!0}function j_(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,h=0,f=0;f<r.length;f++){var c=r.charAt(f);if(c===`
`){l&&(s+=l,h+=u),i.push(s),o.push(h),s="",l="",u=0,h=0;continue}var v=je(c,e),p=n?!1:!bk(c);if(i.length?h+v>t:a+h+v>t){h?(s||l)&&(p?(s||(s=l,l="",u=0,h=u),i.push(s),o.push(h-u),l+=c,u+=v,s="",h=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(h),s=c,h=v)):p?(i.push(l),o.push(u),l=c,u=v):(i.push(c),o.push(v));continue}h+=v,p?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(h)),i.length===1&&(h+=a),{accumWidth:h,lines:i,linesWidths:o}}var Fv="__zr_style_"+Math.round(Math.random()*10),za={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Wu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};za[Fv]=!0;var Q_=["z","z2","invisible"],wk=["invisible"],lr=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=xt(t),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(t[i]):r.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Tk(this,t,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new vt(0,0,0,0)),n?vt.applyTransform(t,a,n):t.copy(a),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new vt(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:B(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=mu,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&mu)},e.prototype.styleUpdated=function(){this.__dirty&=-3},e.prototype.createStyle=function(t){return hu(za,t)},e.prototype.useStyle=function(t){t[Fv]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[Fv]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,Q_)},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.style?o?i?u=n.style:(u=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(u,n.style)):l&&(u=a.style),u)if(o){var h=this.style;if(this.style=this.createStyle(l?{}:h),l)for(var f=xt(h),c=0;c<f.length;c++){var v=f[c];v in u&&(u[v]=u[v],this.style[v]=h[v])}for(var p=xt(u),c=0;c<p.length;c++){var v=p[c];this.style[v]=this.style[v]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var d=this.__inHover?wk:Q_,c=0;c<d.length;c++){var v=d[c];n&&n[v]!=null?this[v]=n[v]:l&&a[v]!=null&&(this[v]=a[v])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.style&&(a=a||{},this._mergeStyle(a,o.style))}return a&&(n.style=a),n},e.prototype._mergeStyle=function(t,n){return B(t,n),t},e.prototype.getAnimationStyleProps=function(){return Wu},e.initDefaultProps=function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=Hr|mu}(),e}(Bu),Hv=new vt(0,0,0,0),Wv=new vt(0,0,0,0);function Tk(r,e,t){return Hv.copy(r.getBoundingRect()),r.transform&&Hv.applyTransform(r.transform),Wv.width=e,Wv.height=t,!Hv.intersect(Wv)}var We=Math.min,$e=Math.max,$v=Math.sin,Uv=Math.cos,Ga=Math.PI*2,$u=Ta(),Uu=Ta(),Yu=Ta();function Zu(r,e,t){if(r.length!==0){for(var n=r[0],a=n[0],i=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],a=We(a,n[0]),i=$e(i,n[0]),o=We(o,n[1]),s=$e(s,n[1]);e[0]=a,e[1]=o,t[0]=i,t[1]=s}}function J_(r,e,t,n,a,i){a[0]=We(r,t),a[1]=We(e,n),i[0]=$e(r,t),i[1]=$e(e,n)}var t1=[],e1=[];function Ck(r,e,t,n,a,i,o,s,l,u){var h=q0,f=le,c=h(r,t,a,o,t1);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<c;v++){var p=f(r,t,a,o,t1[v]);l[0]=We(p,l[0]),u[0]=$e(p,u[0])}c=h(e,n,i,s,e1);for(var v=0;v<c;v++){var d=f(e,n,i,s,e1[v]);l[1]=We(d,l[1]),u[1]=$e(d,u[1])}l[0]=We(r,l[0]),u[0]=$e(r,u[0]),l[0]=We(o,l[0]),u[0]=$e(o,u[0]),l[1]=We(e,l[1]),u[1]=$e(e,u[1]),l[1]=We(s,l[1]),u[1]=$e(s,u[1])}function Dk(r,e,t,n,a,i,o,s){var l=j0,u=de,h=$e(We(l(r,t,a),1),0),f=$e(We(l(e,n,i),1),0),c=u(r,t,a,h),v=u(e,n,i,f);o[0]=We(r,a,c),o[1]=We(e,i,v),s[0]=$e(r,a,c),s[1]=$e(e,i,v)}function Ak(r,e,t,n,a,i,o,s,l){var u=Gn,h=Fn,f=Math.abs(a-i);if(f%Ga<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if($u[0]=Uv(a)*t+r,$u[1]=$v(a)*n+e,Uu[0]=Uv(i)*t+r,Uu[1]=$v(i)*n+e,u(s,$u,Uu),h(l,$u,Uu),a=a%Ga,a<0&&(a=a+Ga),i=i%Ga,i<0&&(i=i+Ga),a>i&&!o?i+=Ga:a<i&&o&&(a+=Ga),o){var c=i;i=a,a=c}for(var v=0;v<i;v+=Math.PI/2)v>a&&(Yu[0]=Uv(v)*t+r,Yu[1]=$v(v)*n+e,u(s,Yu,s),h(l,Yu,l))}var Ot={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Fa=[],Ha=[],Xr=[],Zn=[],qr=[],Kr=[],Yv=Math.min,Zv=Math.max,Wa=Math.cos,$a=Math.sin,Sn=Math.abs,Xv=Math.PI,Xn=Xv*2,qv=typeof Float32Array<"u",Ts=[];function Kv(r){var e=Math.round(r/Xv*1e8)/1e8;return e%2*Xv}function jv(r,e){var t=Kv(r[0]);t<0&&(t+=Xn);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=Xn?a=t+Xn:e&&t-a>=Xn?a=t-Xn:!e&&t>a?a=t+(Xn-Kv(t-a)):e&&t<a&&(a=t-(Xn-Kv(a-t))),r[0]=t,r[1]=a}var jr=function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=Sn(n/Nu/e)||0,this._uy=Sn(n/Nu/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ot.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=Sn(e-this._xi),a=Sn(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Ot.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){return this._drawPendingPt(),this.addData(Ot.C,e,t,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,a){return this._drawPendingPt(),this.addData(Ot.Q,e,t,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(e,t,n,a,i,o){this._drawPendingPt(),Ts[0]=a,Ts[1]=i,jv(Ts,o),a=Ts[0],i=Ts[1];var s=i-a;return this.addData(Ot.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=Wa(i)*n+e,this._yi=$a(i)*n+t,this},r.prototype.arcTo=function(e,t,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,a,i),this},r.prototype.rect=function(e,t,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,a),this.addData(Ot.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ot.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&qv&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},r.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,a=this._len,i=0;i<t;i++)n+=e[i].len();qv&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+n));for(var i=0;i<t;i++)for(var o=e[i].data,s=0;s<o.length;s++)this.data[a++]=o[s];this._len=a},r.prototype.addData=function(e,t,n,a,i,o,s,l,u){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var f=0;f<arguments.length;f++)h[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,qv&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Xr[0]=Xr[1]=qr[0]=qr[1]=Number.MAX_VALUE,Zn[0]=Zn[1]=Kr[0]=Kr[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,a=0,i=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],a=t,i=n),s){case Ot.M:t=a=e[o++],n=i=e[o++],qr[0]=a,qr[1]=i,Kr[0]=a,Kr[1]=i;break;case Ot.L:J_(t,n,e[o],e[o+1],qr,Kr),t=e[o++],n=e[o++];break;case Ot.C:Ck(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],qr,Kr),t=e[o++],n=e[o++];break;case Ot.Q:Dk(t,n,e[o++],e[o++],e[o],e[o+1],qr,Kr),t=e[o++],n=e[o++];break;case Ot.A:var u=e[o++],h=e[o++],f=e[o++],c=e[o++],v=e[o++],p=e[o++]+v;o+=1;var d=!e[o++];l&&(a=Wa(v)*f+u,i=$a(v)*c+h),Ak(u,h,f,c,v,p,d,qr,Kr),t=Wa(p)*f+u,n=$a(p)*c+h;break;case Ot.R:a=t=e[o++],i=n=e[o++];var g=e[o++],y=e[o++];J_(a,i,a+g,i+y,qr,Kr);break;case Ot.Z:t=a,n=i;break}Gn(Xr,Xr,qr),Fn(Zn,Zn,Kr)}return o===0&&(Xr[0]=Xr[1]=Zn[0]=Zn[1]=0),new vt(Xr[0],Xr[1],Zn[0]-Xr[0],Zn[1]-Xr[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,a=this._uy,i=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,h=0,f=0,c=0;c<t;){var v=e[c++],p=c===1;p&&(i=e[c],o=e[c+1],s=i,l=o);var d=-1;switch(v){case Ot.M:i=s=e[c++],o=l=e[c++];break;case Ot.L:{var g=e[c++],y=e[c++],m=g-i,_=y-o;(Sn(m)>n||Sn(_)>a||c===t-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case Ot.C:{var S=e[c++],x=e[c++],g=e[c++],y=e[c++],b=e[c++],w=e[c++];d=HE(i,o,S,x,g,y,b,w,10),i=b,o=w;break}case Ot.Q:{var S=e[c++],x=e[c++],g=e[c++],y=e[c++];d=$E(i,o,S,x,g,y,10),i=g,o=y;break}case Ot.A:var T=e[c++],C=e[c++],D=e[c++],M=e[c++],I=e[c++],L=e[c++],E=L+I;c+=1,p&&(s=Wa(I)*D+T,l=$a(I)*M+C),d=Zv(D,M)*Yv(Xn,Math.abs(L)),i=Wa(E)*D+T,o=$a(E)*M+C;break;case Ot.R:{s=i=e[c++],l=o=e[c++];var P=e[c++],k=e[c++];d=P*2+k*2;break}case Ot.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[f++]=d,h+=d)}return this._pathLen=h,h},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,h,f,c,v=t<1,p,d,g=0,y=0,m,_=0,S,x;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m)))t:for(var b=0;b<o;){var w=n[b++],T=b===1;switch(T&&(u=n[b],h=n[b+1],s=u,l=h),w!==Ot.L&&_>0&&(e.lineTo(S,x),_=0),w){case Ot.M:s=u=n[b++],l=h=n[b++],e.moveTo(u,h);break;case Ot.L:{f=n[b++],c=n[b++];var C=Sn(f-u),D=Sn(c-h);if(C>a||D>i){if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;e.lineTo(u*(1-I)+f*I,h*(1-I)+c*I);break t}g+=M}e.lineTo(f,c),u=f,h=c,_=0}else{var L=C*C+D*D;L>_&&(S=f,x=c,_=L)}break}case Ot.C:{var E=n[b++],P=n[b++],k=n[b++],N=n[b++],R=n[b++],V=n[b++];if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;$n(u,E,k,R,I,Fa),$n(h,P,N,V,I,Ha),e.bezierCurveTo(Fa[1],Ha[1],Fa[2],Ha[2],Fa[3],Ha[3]);break t}g+=M}e.bezierCurveTo(E,P,k,N,R,V),u=R,h=V;break}case Ot.Q:{var E=n[b++],P=n[b++],k=n[b++],N=n[b++];if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;us(u,E,k,I,Fa),us(h,P,N,I,Ha),e.quadraticCurveTo(Fa[1],Ha[1],Fa[2],Ha[2]);break t}g+=M}e.quadraticCurveTo(E,P,k,N),u=k,h=N;break}case Ot.A:var F=n[b++],H=n[b++],$=n[b++],Q=n[b++],et=n[b++],lt=n[b++],kt=n[b++],jt=!n[b++],pt=$>Q?$:Q,nt=Sn($-Q)>.001,yt=et+lt,K=!1;if(v){var M=p[y++];g+M>m&&(yt=et+lt*(m-g)/M,K=!0),g+=M}if(nt&&e.ellipse?e.ellipse(F,H,$,Q,kt,et,yt,jt):e.arc(F,H,pt,et,yt,jt),K)break t;T&&(s=Wa(et)*$+F,l=$a(et)*Q+H),u=Wa(yt)*$+F,h=$a(yt)*Q+H;break;case Ot.R:s=u=n[b],l=h=n[b+1],f=n[b++],c=n[b++];var ut=n[b++],Ht=n[b++];if(v){var M=p[y++];if(g+M>m){var Et=m-g;e.moveTo(f,c),e.lineTo(f+Yv(Et,ut),c),Et-=ut,Et>0&&e.lineTo(f+ut,c+Yv(Et,Ht)),Et-=Ht,Et>0&&e.lineTo(f+Zv(ut-Et,0),c+Ht),Et-=ut,Et>0&&e.lineTo(f,c+Zv(Ht-Et,0));break t}g+=M}e.rect(f,c,ut,Ht);break;case Ot.Z:if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;e.lineTo(u*(1-I)+s*I,h*(1-I)+l*I);break t}g+=M}e.closePath(),u=s,h=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=Ot,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function qn(r,e,t,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||i>r+s&&i>t+s||i<r-s&&i<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(i-r)<=s/2;var h=l*i-o+u,f=h*h/(l*l+1);return f<=s/2*s/2}function Mk(r,e,t,n,a,i,o,s,l,u,h){if(l===0)return!1;var f=l;if(h>e+f&&h>n+f&&h>i+f&&h>s+f||h<e-f&&h<n-f&&h<i-f&&h<s-f||u>r+f&&u>t+f&&u>a+f&&u>o+f||u<r-f&&u<t-f&&u<a-f&&u<o-f)return!1;var c=K0(r,e,t,n,a,i,o,s,u,h,null);return c<=f/2}function r1(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>i+u||l<e-u&&l<n-u&&l<i-u||s>r+u&&s>t+u&&s>a+u||s<r-u&&s<t-u&&s<a-u)return!1;var h=Q0(r,e,t,n,a,i,s,l,null);return h<=u/2}var n1=Math.PI*2;function Qe(r){return r%=n1,r<0&&(r+=n1),r}var Cs=Math.PI*2;function Ik(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>t||h+u<t)return!1;if(Math.abs(n-a)%Cs<1e-4)return!0;if(i){var f=n;n=Qe(a),a=Qe(f)}else n=Qe(n),a=Qe(a);n>a&&(a+=Cs);var c=Math.atan2(l,s);return c<0&&(c+=Cs),c>=n&&c<=a||c+Cs>=n&&c+Cs<=a}function xn(r,e,t,n,a,i){if(i>e&&i>n||i<e&&i<n||n===e)return 0;var o=(i-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===a?1/0:l>a?s:0}var Kn=jr.CMD,Ua=Math.PI*2,Lk=1e-4;function Ek(r,e){return Math.abs(r-e)<Lk}var Re=[-1,-1,-1],ur=[-1,-1];function Pk(){var r=ur[0];ur[0]=ur[1],ur[1]=r}function kk(r,e,t,n,a,i,o,s,l,u){if(u>e&&u>n&&u>i&&u>s||u<e&&u<n&&u<i&&u<s)return 0;var h=bu(e,n,i,s,u,Re);if(h===0)return 0;for(var f=0,c=-1,v=void 0,p=void 0,d=0;d<h;d++){var g=Re[d],y=g===0||g===1?.5:1,m=le(r,t,a,o,g);m<l||(c<0&&(c=q0(e,n,i,s,ur),ur[1]<ur[0]&&c>1&&Pk(),v=le(e,n,i,s,ur[0]),c>1&&(p=le(e,n,i,s,ur[1]))),c===2?g<ur[0]?f+=v<e?y:-y:g<ur[1]?f+=p<v?y:-y:f+=s<p?y:-y:g<ur[0]?f+=v<e?y:-y:f+=s<v?y:-y)}return f}function Rk(r,e,t,n,a,i,o,s){if(s>e&&s>n&&s>i||s<e&&s<n&&s<i)return 0;var l=WE(e,n,i,s,Re);if(l===0)return 0;var u=j0(e,n,i);if(u>=0&&u<=1){for(var h=0,f=de(e,n,i,u),c=0;c<l;c++){var v=Re[c]===0||Re[c]===1?.5:1,p=de(r,t,a,Re[c]);p<o||(Re[c]<u?h+=f<e?v:-v:h+=i<f?v:-v)}return h}else{var v=Re[0]===0||Re[0]===1?.5:1,p=de(r,t,a,Re[0]);return p<o?0:i<e?v:-v}}function Nk(r,e,t,n,a,i,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Re[0]=-l,Re[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=Ua-1e-4){n=0,a=Ua;var h=i?1:-1;return o>=Re[0]+r&&o<=Re[1]+r?h:0}if(n>a){var f=n;n=a,a=f}n<0&&(n+=Ua,a+=Ua);for(var c=0,v=0;v<2;v++){var p=Re[v];if(p+r>o){var d=Math.atan2(s,p),h=i?1:-1;d<0&&(d=Ua+d),(d>=n&&d<=a||d+Ua>=n&&d+Ua<=a)&&(d>Math.PI/2&&d<Math.PI*1.5&&(h=-h),c+=h)}}return c}function a1(r,e,t,n,a){for(var i=r.data,o=r.len(),s=0,l=0,u=0,h=0,f=0,c,v,p=0;p<o;){var d=i[p++],g=p===1;switch(d===Kn.M&&p>1&&(t||(s+=xn(l,u,h,f,n,a))),g&&(l=i[p],u=i[p+1],h=l,f=u),d){case Kn.M:h=i[p++],f=i[p++],l=h,u=f;break;case Kn.L:if(t){if(qn(l,u,i[p],i[p+1],e,n,a))return!0}else s+=xn(l,u,i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case Kn.C:if(t){if(Mk(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=kk(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case Kn.Q:if(t){if(r1(l,u,i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=Rk(l,u,i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case Kn.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],x=i[p++],b=i[p++];p+=1;var w=!!(1-i[p++]);c=Math.cos(x)*_+y,v=Math.sin(x)*S+m,g?(h=c,f=v):s+=xn(l,u,c,v,n,a);var T=(n-y)*S/_+y;if(t){if(Ik(y,m,S,x,x+b,w,e,T,a))return!0}else s+=Nk(y,m,S,x,x+b,w,T,a);l=Math.cos(x+b)*_+y,u=Math.sin(x+b)*S+m;break;case Kn.R:h=l=i[p++],f=u=i[p++];var C=i[p++],D=i[p++];if(c=h+C,v=f+D,t){if(qn(h,f,c,f,e,n,a)||qn(c,f,c,v,e,n,a)||qn(c,v,h,v,e,n,a)||qn(h,v,h,f,e,n,a))return!0}else s+=xn(c,f,c,v,n,a),s+=xn(h,v,h,f,n,a);break;case Kn.Z:if(t){if(qn(l,u,h,f,e,n,a))return!0}else s+=xn(l,u,h,f,n,a);l=h,u=f;break}}return!t&&!Ek(u,f)&&(s+=xn(l,u,h,f,n,a)||0),s!==0}function Ok(r,e,t){return a1(r,0,!1,e,t)}function Vk(r,e,t,n){return a1(r,e,!0,t,n)}var Xu=rt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},za),Bk={style:rt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Wu.style)},Qv=$r.concat(["invisible","culling","z","z2","zlevel","parent"]),_t=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s<Qv.length;++s)a[Qv[s]]=this[Qv[s]];a.__dirty|=Hr}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=xt(t);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<n.length;i++){var o=n[i],s=t[o];o==="style"?this.style?B(this.style,s):this.useStyle(s):o==="shape"?B(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(U(t)){var n=Cu(t,0);return n>.5?xv:n>.2?mP:bv}else if(t)return bv}return xv},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(U(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=Cu(t,0)<Sv;if(i===o)return n}},e.prototype.buildPath=function(t,n,a){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new jr(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,a=!t;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&ss)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;u=Math.max(u,h??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect(),o=this.style;if(t=a[0],n=a[1],i.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Vk(s,l/u,t,n)))return!0}if(this.hasFill())return Ok(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=ss,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=n:B(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&ss)},e.prototype.createStyle=function(t){return hu(Xu,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=B({},this.shape))},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=B({},a.shape),B(u,n.shape)):(u=B({},i?this.shape:a.shape),B(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=B({},this.shape);for(var h={},f=xt(u),c=0;c<f.length;c++){var v=f[c];typeof u[v]=="object"?this.shape[v]=u[v]:h[v]=u[v]}this._transitionState(t,{shape:h},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.shape&&(a=a||{},this._mergeStyle(a,o.shape))}return a&&(n.shape=a),n},e.prototype.getAnimationStyleProps=function(){return Bk},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=function(i){Wt(o,i);function o(s){var l=i.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return at(t.style)},o.prototype.getDefaultShape=function(){return at(t.shape)},o}(e);for(var a in t)typeof t[a]=="function"&&(n.prototype[a]=t[a]);return n},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=Hr|mu|ss}(),e}(lr),zk=rt({strokeFirst:!0,font:Vn,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Xu),Ki=function(r){Wt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return n!=null&&n!=="none"&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return hu(zk,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;n!=null?n+="":n="";var a=ys(n,t.font,t.textAlign,t.textBaseline);if(a.x+=t.x||0,a.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(lr);Ki.prototype.type="tspan";var Gk=rt({x:0,y:0},za),Fk={style:rt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Wu.style)};function Hk(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var ge=function(r){Wt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return hu(Gk,t)},e.prototype._getSize=function(t){var n=this.style,a=n[t];if(a!=null)return a;var i=Hk(n.image)?n.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Fk},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new vt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(lr);ge.prototype.type="image";function Wk(r,e){var t=e.x,n=e.y,a=e.width,i=e.height,o=e.r,s,l,u,h;a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var f;s+l>a&&(f=s+l,s*=a/f,l*=a/f),u+h>a&&(f=u+h,u*=a/f,h*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+h>i&&(f=s+h,s*=i/f,h*=i/f),r.moveTo(t+s,n),r.lineTo(t+a-l,n),l!==0&&r.arc(t+a-l,n+l,l,-Math.PI/2,0),r.lineTo(t+a,n+i-u),u!==0&&r.arc(t+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(t+h,n+i),h!==0&&r.arc(t+h,n+i-h,h,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var ji=Math.round;function i1(r,e,t){if(e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(ji(n*2)===ji(a*2)&&(r.x1=r.x2=Ya(n,s,!0)),ji(i*2)===ji(o*2)&&(r.y1=r.y2=Ya(i,s,!0))),r}}function o1(r,e,t){if(e){var n=e.x,a=e.y,i=e.width,o=e.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Ya(n,s,!0),r.y=Ya(a,s,!0),r.width=Math.max(Ya(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(Ya(a+o,s,!1)-r.y,o===0?0:1)),r}}function Ya(r,e,t){if(!e)return r;var n=ji(r*2);return(n+ji(e))%2===0?n/2:(n+(t?1:-1))/2}var $k=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),Uk={},wt=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new $k},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=o1(Uk,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?Wk(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(_t);wt.prototype.type="rect";var s1={fill:"#000"},l1=2,Yk={style:rt({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},Wu.style)},Tt=function(r){Wt(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=s1,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,qk(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new vt(0,0,0,0),n=this._children,a=[],i=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(a);u?(t.copy(l),t.applyTransform(u),i=i||t.clone(),i.union(t)):(i=i||l.clone(),i.union(l))}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||s1},e.prototype.setTextContent=function(t){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(t,n){if(!n)return t;var a=n.rich,i=t.rich||a&&{};return B(t,n),a&&i?(this._mergeRich(i,a),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,n){for(var a=xt(n),i=0;i<a.length;i++){var o=a[i];t[o]=t[o]||{},B(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return Yk},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||Vn,a=t.padding,i=y1(t),o=gk(i,t),s=Jv(t),l=!!t.backgroundColor,u=o.outerHeight,h=o.outerWidth,f=o.contentWidth,c=o.lines,v=o.lineHeight,p=this._defaultStyle;this.isTruncated=!!o.isTruncated;var d=t.x||0,g=t.y||0,y=t.align||p.align||"left",m=t.verticalAlign||p.verticalAlign||"top",_=d,S=Yi(g,o.contentHeight,m);if(s||a){var x=ms(d,h,y),b=Yi(g,u,m);s&&this._renderBackground(t,t,x,b,h,u)}S+=v/2,a&&(_=g1(d,y,a),m==="top"?S+=a[0]:m==="bottom"&&(S-=a[2]));for(var w=0,T=!1,C=d1("fill"in t?t.fill:(T=!0,p.fill)),D=p1("stroke"in t?t.stroke:!l&&(!p.autoStroke||T)?(w=l1,p.stroke):null),M=t.textShadowBlur>0,I=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),L=o.calculatedLineHeight,E=0;E<c.length;E++){var P=this._getOrCreateChild(Ki),k=P.createStyle();P.useStyle(k),k.text=c[E],k.x=_,k.y=S,k.textAlign=y,k.textBaseline="middle",k.opacity=t.opacity,k.strokeFirst=!0,M&&(k.shadowBlur=t.textShadowBlur||0,k.shadowColor=t.textShadowColor||"transparent",k.shadowOffsetX=t.textShadowOffsetX||0,k.shadowOffsetY=t.textShadowOffsetY||0),k.stroke=D,k.fill=C,D&&(k.lineWidth=t.lineWidth||w,k.lineDash=t.lineDash,k.lineDashOffset=t.lineDashOffset||0),k.font=n,f1(k,t),S+=v,I&&P.setBoundingRect(new vt(ms(k.x,f,k.textAlign),Yi(k.y,L,k.textBaseline),f,L))}},e.prototype._updateRichTexts=function(){var t=this.style,n=y1(t),a=_k(n,t),i=a.width,o=a.outerWidth,s=a.outerHeight,l=t.padding,u=t.x||0,h=t.y||0,f=this._defaultStyle,c=t.align||f.align,v=t.verticalAlign||f.verticalAlign;this.isTruncated=!!a.isTruncated;var p=ms(u,o,c),d=Yi(h,s,v),g=p,y=d;l&&(g+=l[3],y+=l[0]);var m=g+i;Jv(t)&&this._renderBackground(t,t,p,d,o,s);for(var _=!!t.backgroundColor,S=0;S<a.lines.length;S++){for(var x=a.lines[S],b=x.tokens,w=b.length,T=x.lineHeight,C=x.width,D=0,M=g,I=m,L=w-1,E=void 0;D<w&&(E=b[D],!E.align||E.align==="left");)this._placeToken(E,t,T,y,M,"left",_),C-=E.width,M+=E.width,D++;for(;L>=0&&(E=b[L],E.align==="right");)this._placeToken(E,t,T,y,I,"right",_),C-=E.width,I-=E.width,L--;for(M+=(i-(M-g)-(m-I)-C)/2;D<=L;)E=b[D],this._placeToken(E,t,T,y,M+E.width/2,"center",_),M+=E.width,D++;y+=T}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var h=t.verticalAlign,f=i+a/2;h==="top"?f=i+t.height/2:h==="bottom"&&(f=i+a-t.height/2);var c=!t.isLineHolder&&Jv(u);c&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var v=!!u.backgroundColor,p=t.textPadding;p&&(o=g1(o,s,p),f-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(Ki),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=d1("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),x=p1("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||m)?(_=l1,y.stroke):null),b=u.textShadowBlur>0||n.textShadowBlur>0;g.text=t.text,g.x=o,g.y=f,b&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||Vn,g.opacity=rr(u.opacity,n.opacity,1),f1(g,u),x&&(g.lineWidth=rr(u.lineWidth,n.lineWidth,_),g.lineDash=ot(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=x),S&&(g.fill=S);var w=t.contentWidth,T=t.contentHeight;d.setBoundingRect(new vt(ms(g.x,w,g.textAlign),Yi(g.y,T,g.textBaseline),w,T))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,h=t.borderColor,f=l&&l.image,c=l&&!f,v=t.borderRadius,p=this,d,g;if(c||t.lineHeight||u&&h){d=this._getOrCreateChild(wt),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=a,y.y=i,y.width=o,y.height=s,y.r=v,d.dirtyShape()}if(c){var m=d.style;m.fill=l||null,m.fillOpacity=ot(t.fillOpacity,1)}else if(f){g=this._getOrCreateChild(ge),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=a,_.y=i,_.width=o,_.height=s}if(u&&h){var m=d.style;m.lineWidth=u,m.stroke=h,m.strokeOpacity=ot(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=rr(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return c1(t)&&(n=[t.fontStyle,t.fontWeight,h1(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Tr(n)||t.textFont||t.font},e}(lr),Zk={left:!0,right:1,center:1},Xk={top:1,bottom:1,middle:1},u1=["fontStyle","fontWeight","fontSize","fontFamily"];function h1(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Mc+"px":r+"px"}function f1(r,e){for(var t=0;t<u1.length;t++){var n=u1[t],a=e[n];a!=null&&(r[n]=a)}}function c1(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function qk(r){return v1(r),A(r.rich,v1),r}function v1(r){if(r){r.font=Tt.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||Zk[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||Xk[t]?t:"top";var n=r.padding;n&&(r.padding=kc(r.padding))}}function p1(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function d1(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function g1(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function y1(r){var e=r.text;return e!=null&&(e+=""),e}function Jv(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var st=bt(),tp=function(r,e,t,n){if(n){var a=st(n);a.dataIndex=t,a.dataType=e,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=st(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},m1=1,_1={},S1=bt(),ep=bt(),rp=0,Ds=1,qu=2,Ne=["emphasis","blur","select"],As=["normal","emphasis","blur","select"],Qi=10,Kk=9,Za="highlight",Ku="downplay",Ms="select",ju="unselect",Is="toggleSelect";function Ji(r){return r!=null&&r!=="none"}function Qu(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function x1(r){Qu(r,"emphasis",qu)}function b1(r){r.hoverState===qu&&Qu(r,"normal",rp)}function np(r){Qu(r,"blur",Ds)}function w1(r){r.hoverState===Ds&&Qu(r,"normal",rp)}function jk(r){r.selected=!0}function Qk(r){r.selected=!1}function T1(r,e,t){e(r,t)}function bn(r,e,t){T1(r,e,t),r.isGroup&&r.traverse(function(n){T1(n,e,t)})}function Ju(r,e){switch(e){case"emphasis":r.hoverState=qu;break;case"normal":r.hoverState=rp;break;case"blur":r.hoverState=Ds;break;case"select":r.selected=!0}}function Jk(r,e,t,n){for(var a=r.style,i={},o=0;o<e.length;o++){var s=e[o],l=a[s];i[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(i,e)}return i}function tR(r,e,t,n){var a=t&&dt(t,"select")>=0,i=!1;if(r instanceof _t){var o=S1(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Ji(s)||Ji(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=B({},n),u=B({},u),u.fill=s):!Ji(u.fill)&&Ji(s)?(i=!0,n=B({},n),u=B({},u),u.fill=ov(s)):!Ji(u.stroke)&&Ji(l)&&(i||(n=B({},n),u=B({},u)),u.stroke=ov(l)),n.style=u}}if(n&&n.z2==null){i||(n=B({},n));var h=r.z2EmphasisLift;n.z2=r.z2+(h??Qi)}return n}function eR(r,e,t){if(t&&t.z2==null){t=B({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??Kk)}return t}function rR(r,e,t){var n=dt(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:Jk(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=B({},t),o=B({opacity:n?a:i.opacity*.1},o),t.style=o),t}function ap(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return tR(this,r,e,t);if(r==="blur")return rR(this,r,t);if(r==="select")return eR(this,r,t)}return t}function Xa(r){r.stateProxy=ap;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=ap),t&&(t.stateProxy=ap)}function C1(r,e){!L1(r,e)&&!r.__highByOuter&&bn(r,x1)}function D1(r,e){!L1(r,e)&&!r.__highByOuter&&bn(r,b1)}function wn(r,e){r.__highByOuter|=1<<(e||0),bn(r,x1)}function Tn(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&bn(r,b1)}function A1(r){bn(r,np)}function ip(r){bn(r,w1)}function M1(r){bn(r,jk)}function I1(r){bn(r,Qk)}function L1(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function E1(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=ep(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){w1(u)}),s&&t.push(i)),o.isBlured=!1}),A(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function op(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,h){for(var f=0;f<h.length;f++){var c=u.getItemGraphicEl(h[f]);c&&ip(c)}}if(r!=null&&!(!e||e==="none")){var o=a.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];a.eachSeries(function(u){var h=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var c=f&&s?f===s:h;if(!(t==="series"&&!h||t==="coordinateSystem"&&!c||e==="series"&&h)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(g){g.__highByOuter&&h&&e==="self"||np(g)}),we(e))i(u.getData(),e);else if(J(e))for(var p=xt(e),d=0;d<p.length;d++)i(u.getData(p[d]),e[p[d]]);l.push(u),ep(u).isBlured=!0}}),a.eachComponent(function(u,h){if(u!=="series"){var f=n.getViewOfComponentModel(h);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,a)}})}}function sp(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){ep(n).isBlured=!0;var a=t.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){np(i)})}}}function nR(r,e,t){var n=r.seriesIndex,a=r.getData(e.dataType);if(!a){process.env.NODE_ENV!=="production"&&me("Unknown dataType "+e.dataType);return}var i=Oa(a,e);i=(z(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var s=a.count(),l=0;!o&&l<s;)o=a.getItemGraphicEl(l++);if(o){var u=st(o);op(n,u.focus,u.blurScope,t)}else{var h=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);h!=null&&op(n,h,f,t)}}function lp(r,e,t,n){var a={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return a;var i=n.getModel().getComponent(r,e);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(process.env.NODE_ENV!=="production"&&!jn(s[u])&&me("param should be highDownDispatcher"),st(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function aR(r,e,t){process.env.NODE_ENV!=="production"&&!jn(r)&&me("param should be highDownDispatcher");var n=st(r),a=lp(n.componentMainType,n.componentIndex,n.componentHighDownName,t),i=a.dispatchers,o=a.focusSelf;i?(o&&sp(n.componentMainType,n.componentIndex,t),A(i,function(s){return C1(s,e)})):(op(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&sp(n.componentMainType,n.componentIndex,t),C1(r,e))}function iR(r,e,t){process.env.NODE_ENV!=="production"&&!jn(r)&&me("param should be highDownDispatcher"),E1(t);var n=st(r),a=lp(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;a?A(a,function(i){return D1(i,e)}):D1(r,e)}function oR(r,e,t){if(hp(e)){var n=e.dataType,a=r.getData(n),i=Oa(a,e);z(i)||(i=[i]),r[e.type===Is?"toggleSelect":e.type===Ms?"select":"unselect"](i,n)}}function P1(r){var e=r.getAllData();A(e,function(t){var n=t.data,a=t.type;n.eachItemGraphicEl(function(i,o){r.isSelected(o,a)?M1(i):I1(i)})})}function sR(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();A(n,function(a){a.data;var i=a.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function qa(r,e,t){Ka(r,!0),bn(r,Xa),up(r,e,t)}function lR(r){Ka(r,!1)}function qt(r,e,t,n){n?lR(r):qa(r,e,t)}function up(r,e,t){var n=st(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var k1=["emphasis","blur","select"],uR={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function _e(r,e,t,n){t=t||"itemStyle";for(var a=0;a<k1.length;a++){var i=k1[a],o=e.getModel([i,t]),s=r.ensureState(i);s.style=n?n(o):o[uR[t]]()}}function Ka(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function jn(r){return!!(r&&r.__highDownDispatcher)}function hR(r,e,t){var n=st(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function fR(r){var e=_1[r];return e==null&&m1<=32&&(e=_1[r]=m1++),e}function hp(r){var e=r.type;return e===Ms||e===ju||e===Is}function R1(r){var e=r.type;return e===Za||e===Ku}function cR(r){var e=S1(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var to=jr.CMD,vR=[[],[],[]],N1=Math.sqrt,pR=Math.atan2;function O1(r,e){if(e){var t=r.data,n=r.len(),a,i,o,s,l,u,h=to.M,f=to.C,c=to.L,v=to.R,p=to.A,d=to.Q;for(o=0,s=0;o<n;){switch(a=t[o++],s=o,i=0,a){case h:i=1;break;case c:i=1;break;case f:i=3;break;case d:i=2;break;case p:var g=e[4],y=e[5],m=N1(e[0]*e[0]+e[1]*e[1]),_=N1(e[2]*e[2]+e[3]*e[3]),S=pR(-e[1]/_,e[0]/m);t[o]*=m,t[o++]+=g,t[o]*=_,t[o++]+=y,t[o++]*=m,t[o++]*=_,t[o++]+=S,t[o++]+=S,o+=2,s=o;break;case v:u[0]=t[o++],u[1]=t[o++],ye(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],ye(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<i;l++){var x=vR[l];x[0]=t[o++],x[1]=t[o++],ye(x,x,e),t[s++]=x[0],t[s++]=x[1]}}r.increaseVersion()}}var fp=Math.sqrt,th=Math.sin,eh=Math.cos,Ls=Math.PI;function V1(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function cp(r,e){return(r[0]*e[0]+r[1]*e[1])/(V1(r)*V1(e))}function B1(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(cp(r,e))}function z1(r,e,t,n,a,i,o,s,l,u,h){var f=l*(Ls/180),c=eh(f)*(r-t)/2+th(f)*(e-n)/2,v=-1*th(f)*(r-t)/2+eh(f)*(e-n)/2,p=c*c/(o*o)+v*v/(s*s);p>1&&(o*=fp(p),s*=fp(p));var d=(a===i?-1:1)*fp((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,g=d*o*v/s,y=d*-s*c/o,m=(r+t)/2+eh(f)*g-th(f)*y,_=(e+n)/2+th(f)*g+eh(f)*y,S=B1([1,0],[(c-g)/o,(v-y)/s]),x=[(c-g)/o,(v-y)/s],b=[(-1*c-g)/o,(-1*v-y)/s],w=B1(x,b);if(cp(x,b)<=-1&&(w=Ls),cp(x,b)>=1&&(w=0),w<0){var T=Math.round(w/Ls*1e6)/1e6;w=Ls*2+T%2*Ls}h.addData(u,m,_,o,s,S,w,f,i)}var dR=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,gR=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function yR(r){var e=new jr;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=jr.CMD,l=r.match(dR);if(!l)return e;for(var u=0;u<l.length;u++){for(var h=l[u],f=h.charAt(0),c=void 0,v=h.match(gR)||[],p=v.length,d=0;d<p;d++)v[d]=parseFloat(v[d]);for(var g=0;g<p;){var y=void 0,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0,w=void 0,T=t,C=n,D=void 0,M=void 0;switch(f){case"l":t+=v[g++],n+=v[g++],c=s.L,e.addData(c,t,n);break;case"L":t=v[g++],n=v[g++],c=s.L,e.addData(c,t,n);break;case"m":t+=v[g++],n+=v[g++],c=s.M,e.addData(c,t,n),a=t,i=n,f="l";break;case"M":t=v[g++],n=v[g++],c=s.M,e.addData(c,t,n),a=t,i=n,f="L";break;case"h":t+=v[g++],c=s.L,e.addData(c,t,n);break;case"H":t=v[g++],c=s.L,e.addData(c,t,n);break;case"v":n+=v[g++],c=s.L,e.addData(c,t,n);break;case"V":n=v[g++],c=s.L,e.addData(c,t,n);break;case"C":c=s.C,e.addData(c,v[g++],v[g++],v[g++],v[g++],v[g++],v[g++]),t=v[g-2],n=v[g-1];break;case"c":c=s.C,e.addData(c,v[g++]+t,v[g++]+n,v[g++]+t,v[g++]+n,v[g++]+t,v[g++]+n),t+=v[g-2],n+=v[g-1];break;case"S":y=t,m=n,D=e.len(),M=e.data,o===s.C&&(y+=t-M[D-4],m+=n-M[D-3]),c=s.C,T=v[g++],C=v[g++],t=v[g++],n=v[g++],e.addData(c,y,m,T,C,t,n);break;case"s":y=t,m=n,D=e.len(),M=e.data,o===s.C&&(y+=t-M[D-4],m+=n-M[D-3]),c=s.C,T=t+v[g++],C=n+v[g++],t+=v[g++],n+=v[g++],e.addData(c,y,m,T,C,t,n);break;case"Q":T=v[g++],C=v[g++],t=v[g++],n=v[g++],c=s.Q,e.addData(c,T,C,t,n);break;case"q":T=v[g++]+t,C=v[g++]+n,t+=v[g++],n+=v[g++],c=s.Q,e.addData(c,T,C,t,n);break;case"T":y=t,m=n,D=e.len(),M=e.data,o===s.Q&&(y+=t-M[D-4],m+=n-M[D-3]),t=v[g++],n=v[g++],c=s.Q,e.addData(c,y,m,t,n);break;case"t":y=t,m=n,D=e.len(),M=e.data,o===s.Q&&(y+=t-M[D-4],m+=n-M[D-3]),t+=v[g++],n+=v[g++],c=s.Q,e.addData(c,y,m,t,n);break;case"A":_=v[g++],S=v[g++],x=v[g++],b=v[g++],w=v[g++],T=t,C=n,t=v[g++],n=v[g++],c=s.A,z1(T,C,t,n,b,w,_,S,x,c,e);break;case"a":_=v[g++],S=v[g++],x=v[g++],b=v[g++],w=v[g++],T=t,C=n,t+=v[g++],n+=v[g++],c=s.A,z1(T,C,t,n,b,w,_,S,x,c,e);break}}(f==="z"||f==="Z")&&(c=s.Z,e.addData(c),t=a,n=i),o=c}return e.toStatic(),e}var G1=function(r){Wt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(_t);function F1(r){return r.setData!=null}function H1(r,e){var t=yR(r),n=B({},e);return n.buildPath=function(a){if(F1(a)){a.setData(t.data);var i=a.getContext();i&&a.rebuildPath(i,1)}else{var i=a;t.rebuildPath(i,1)}},n.applyTransform=function(a){O1(t,a),this.dirtyShape()},n}function W1(r,e){return new G1(H1(r,e))}function mR(r,e){var t=H1(r,e),n=function(a){Wt(i,a);function i(o){var s=a.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return i}(G1);return n}function _R(r,e){for(var t=[],n=r.length,a=0;a<n;a++){var i=r[a];t.push(i.getUpdatedPathProxy(!0))}var o=new _t(e);return o.createPathProxy(),o.buildPath=function(s){if(F1(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function vp(r,e){e=e||{};var t=new _t;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?O1(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var SR=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),Cn=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new SR},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(_t);Cn.prototype.type="circle";var xR=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),rh=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new xR},e.prototype.buildPath=function(t,n){var a=.5522848,i=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*a,h=l*a;t.moveTo(i-s,o),t.bezierCurveTo(i-s,o-h,i-u,o-l,i,o-l),t.bezierCurveTo(i+u,o-l,i+s,o-h,i+s,o),t.bezierCurveTo(i+s,o+h,i+u,o+l,i,o+l),t.bezierCurveTo(i-u,o+l,i-s,o+h,i-s,o),t.closePath()},e}(_t);rh.prototype.type="ellipse";var $1=Math.PI,pp=$1*2,ja=Math.sin,eo=Math.cos,bR=Math.acos,Te=Math.atan2,U1=Math.abs,Es=Math.sqrt,Ps=Math.max,Qr=Math.min,Ir=1e-4;function wR(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,h=o-a,f=s-i,c=f*l-h*u;if(!(c*c<Ir))return c=(h*(e-i)-f*(r-a))/c,[r+c*l,e+c*u]}function nh(r,e,t,n,a,i,o){var s=r-t,l=e-n,u=(o?i:-i)/Es(s*s+l*l),h=u*l,f=-u*s,c=r+h,v=e+f,p=t+h,d=n+f,g=(c+p)/2,y=(v+d)/2,m=p-c,_=d-v,S=m*m+_*_,x=a-i,b=c*d-p*v,w=(_<0?-1:1)*Es(Ps(0,x*x*S-b*b)),T=(b*_-m*w)/S,C=(-b*m-_*w)/S,D=(b*_+m*w)/S,M=(-b*m+_*w)/S,I=T-g,L=C-y,E=D-g,P=M-y;return I*I+L*L>E*E+P*P&&(T=D,C=M),{cx:T,cy:C,x0:-h,y0:-f,x1:T*(a/x-1),y1:C*(a/x-1)}}function TR(r){var e;if(z(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function CR(r,e){var t,n=Ps(e.r,0),a=Ps(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var h=e.cx,f=e.cy,c=!!e.clockwise,v=U1(u-l),p=v>pp&&v%pp;if(p>Ir&&(v=p),!(n>Ir))r.moveTo(h,f);else if(v>pp-Ir)r.moveTo(h+n*eo(l),f+n*ja(l)),r.arc(h,f,n,l,u,!c),a>Ir&&(r.moveTo(h+a*eo(u),f+a*ja(u)),r.arc(h,f,a,u,l,c));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0,w=void 0,T=void 0,C=void 0,D=void 0,M=void 0,I=void 0,L=void 0,E=void 0,P=n*eo(l),k=n*ja(l),N=a*eo(u),R=a*ja(u),V=v>Ir;if(V){var F=e.cornerRadius;F&&(t=TR(F),d=t[0],g=t[1],y=t[2],m=t[3]);var H=U1(n-a)/2;if(_=Qr(H,y),S=Qr(H,m),x=Qr(H,d),b=Qr(H,g),C=w=Ps(_,S),D=T=Ps(x,b),(w>Ir||T>Ir)&&(M=n*eo(u),I=n*ja(u),L=a*eo(l),E=a*ja(l),v<$1)){var $=wR(P,k,L,E,M,I,N,R);if($){var Q=P-$[0],et=k-$[1],lt=M-$[0],kt=I-$[1],jt=1/ja(bR((Q*lt+et*kt)/(Es(Q*Q+et*et)*Es(lt*lt+kt*kt)))/2),pt=Es($[0]*$[0]+$[1]*$[1]);C=Qr(w,(n-pt)/(jt+1)),D=Qr(T,(a-pt)/(jt-1))}}}if(!V)r.moveTo(h+P,f+k);else if(C>Ir){var nt=Qr(y,C),yt=Qr(m,C),K=nh(L,E,P,k,n,nt,c),ut=nh(M,I,N,R,n,yt,c);r.moveTo(h+K.cx+K.x0,f+K.cy+K.y0),C<w&&nt===yt?r.arc(h+K.cx,f+K.cy,C,Te(K.y0,K.x0),Te(ut.y0,ut.x0),!c):(nt>0&&r.arc(h+K.cx,f+K.cy,nt,Te(K.y0,K.x0),Te(K.y1,K.x1),!c),r.arc(h,f,n,Te(K.cy+K.y1,K.cx+K.x1),Te(ut.cy+ut.y1,ut.cx+ut.x1),!c),yt>0&&r.arc(h+ut.cx,f+ut.cy,yt,Te(ut.y1,ut.x1),Te(ut.y0,ut.x0),!c))}else r.moveTo(h+P,f+k),r.arc(h,f,n,l,u,!c);if(!(a>Ir)||!V)r.lineTo(h+N,f+R);else if(D>Ir){var nt=Qr(d,D),yt=Qr(g,D),K=nh(N,R,M,I,a,-yt,c),ut=nh(P,k,L,E,a,-nt,c);r.lineTo(h+K.cx+K.x0,f+K.cy+K.y0),D<T&&nt===yt?r.arc(h+K.cx,f+K.cy,D,Te(K.y0,K.x0),Te(ut.y0,ut.x0),!c):(yt>0&&r.arc(h+K.cx,f+K.cy,yt,Te(K.y0,K.x0),Te(K.y1,K.x1),!c),r.arc(h,f,a,Te(K.cy+K.y1,K.cx+K.x1),Te(ut.cy+ut.y1,ut.cx+ut.x1),c),nt>0&&r.arc(h+ut.cx,f+ut.cy,nt,Te(ut.y1,ut.x1),Te(ut.y0,ut.x0),!c))}else r.lineTo(h+N,f+R),r.arc(h,f,a,u,l,c)}r.closePath()}}}var DR=function(){function r(){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 r}(),Oe=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new DR},e.prototype.buildPath=function(t,n){CR(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(_t);Oe.prototype.type="sector";var AR=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),ks=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new AR},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.PI*2;t.moveTo(a+n.r,i),t.arc(a,i,n.r,0,o,!1),t.moveTo(a+n.r0,i),t.arc(a,i,n.r0,0,o,!0)},e}(_t);ks.prototype.type="ring";function MR(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,h,f;if(n){h=[1/0,1/0],f=[-1/0,-1/0];for(var c=0,v=r.length;c<v;c++)Gn(h,h,r[c]),Fn(f,f,r[c]);Gn(h,h,n[0]),Fn(f,f,n[1])}for(var c=0,v=r.length;c<v;c++){var p=r[c];if(t)l=r[c?c-1:v-1],u=r[(c+1)%v];else if(c===0||c===v-1){a.push(vn(r[c]));continue}else l=r[c-1],u=r[c+1];Ca(i,u,l),cu(i,i,e);var d=Vc(p,l),g=Vc(p,u),y=d+g;y!==0&&(d/=y,g/=y),cu(o,i,-d),cu(s,i,g);var m=M0([],p,o),_=M0([],p,s);n&&(Fn(m,m,h),Gn(m,m,f),Fn(_,_,h),Gn(_,_,f)),a.push(m),a.push(_)}return t&&a.push(a.shift()),a}function Y1(r,e,t){var n=e.smooth,a=e.points;if(a&&a.length>=2){if(n){var i=MR(a,n,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],h=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)r.lineTo(a[s][0],a[s][1])}t&&r.closePath()}}var IR=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),Ve=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new IR},e.prototype.buildPath=function(t,n){Y1(t,n,!0)},e}(_t);Ve.prototype.type="polygon";var LR=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),Be=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new LR},e.prototype.buildPath=function(t,n){Y1(t,n,!1)},e}(_t);Be.prototype.type="polyline";var ER={},PR=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),ue=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PR},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=i1(ER,n,this.style);a=l.x1,i=l.y1,o=l.x2,s=l.y2}else a=n.x1,i=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(a,i),u<1&&(o=a*(1-u)+o*u,s=i*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e}(_t);ue.prototype.type="line";var Ue=[],kR=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function Z1(r,e,t){var n=r.cpx2,a=r.cpy2;return n!=null||a!=null?[(t?X0:le)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?X0:le)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Qc:de)(r.x1,r.cpx1,r.x2,e),(t?Qc:de)(r.y1,r.cpy1,r.y2,e)]}var Rs=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new kR},e.prototype.buildPath=function(t,n){var a=n.x1,i=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,h=n.cpx2,f=n.cpy2,c=n.percent;c!==0&&(t.moveTo(a,i),h==null||f==null?(c<1&&(us(a,l,o,c,Ue),l=Ue[1],o=Ue[2],us(i,u,s,c,Ue),u=Ue[1],s=Ue[2]),t.quadraticCurveTo(l,u,o,s)):(c<1&&($n(a,l,h,o,c,Ue),l=Ue[1],h=Ue[2],o=Ue[3],$n(i,u,f,s,c,Ue),u=Ue[1],f=Ue[2],s=Ue[3]),t.bezierCurveTo(l,u,h,f,o,s)))},e.prototype.pointAt=function(t){return Z1(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=Z1(this.shape,t,!0);return zi(n,n)},e}(_t);Rs.prototype.type="bezier-curve";var RR=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),ah=function(r){Wt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new RR},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,h=Math.cos(s),f=Math.sin(s);t.moveTo(h*o+a,f*o+i),t.arc(a,i,o,s,l,!u)},e}(_t);ah.prototype.type="arc";var dp=function(r){Wt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),a=0;a<t.length;a++)n=n||t[a].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),a=0;a<t.length;a++)t[a].path||t[a].createPathProxy(),t[a].path.setScale(n[0],n[1],t[a].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var a=n.paths||[],i=0;i<a.length;i++)a[i].buildPath(t,a[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),_t.prototype.getBoundingRect.call(this)},e}(_t),X1=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}(),Ns=function(r){Wt(e,r);function e(t,n,a,i,o,s){var l=r.call(this,o)||this;return l.x=t??0,l.y=n??0,l.x2=a??1,l.y2=i??0,l.type="linear",l.global=s||!1,l}return e}(X1),q1=function(r){Wt(e,r);function e(t,n,a,i,o){var s=r.call(this,i)||this;return s.x=t??.5,s.y=n??.5,s.r=a??.5,s.type="radial",s.global=o||!1,s}return e}(X1),Qa=[0,0],Ja=[0,0],ih=new ct,oh=new ct,sh=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new ct;for(var n=0;n<2;n++)this._axes[n]=new ct;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,a=this._axes,i=e.x,o=e.y,s=i+e.width,l=o+e.height;if(n[0].set(i,o),n[1].set(s,o),n[2].set(s,l),n[3].set(i,l),t)for(var u=0;u<4;u++)n[u].transform(t);ct.sub(a[0],n[1],n[0]),ct.sub(a[1],n[3],n[0]),a[0].normalize(),a[1].normalize();for(var u=0;u<2;u++)this._origin[u]=a[u].dot(n[0])},r.prototype.intersect=function(e,t){var n=!0,a=!t;return ih.set(1/0,1/0),oh.set(0,0),!this._intersectCheckOneSide(this,e,ih,oh,a,1)&&(n=!1,a)||!this._intersectCheckOneSide(e,this,ih,oh,a,-1)&&(n=!1,a)||a||ct.copy(t,n?ih:oh),n},r.prototype._intersectCheckOneSide=function(e,t,n,a,i,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,Qa),this._getProjMinMaxOnAxis(l,t._corners,Ja),Qa[1]<Ja[0]||Qa[0]>Ja[1]){if(s=!1,i)return s;var h=Math.abs(Ja[0]-Qa[1]),f=Math.abs(Qa[0]-Ja[1]);Math.min(h,f)>a.len()&&(h<f?ct.scale(a,u,-h*o):ct.scale(a,u,f*o))}else if(n){var h=Math.abs(Ja[0]-Qa[1]),f=Math.abs(Qa[0]-Ja[1]);Math.min(h,f)<n.len()&&(h<f?ct.scale(n,u,h*o):ct.scale(n,u,-f*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var a=this._axes[e],i=this._origin,o=t[0].dot(a)+i[e],s=o,l=o,u=1;u<t.length;u++){var h=t[u].dot(a)+i[e];s=Math.min(h,s),l=Math.max(h,l)}n[0]=s,n[1]=l},r}(),NR=[],OR=function(r){Wt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var a=0;a<t.length;a++)this.addDisplayable(t[a],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new vt(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var a=this._displayables[n],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(NR)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,n))return!0}return!1},e}(lr),K1=bt();function ro(r,e,t,n,a){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,h=void 0,f=void 0;n?(u=ot(n.duration,200),h=ot(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(h=i.easing),i.delay!=null&&(f=i.delay)),j(f)&&(f=f(t,a)),j(u)&&(u=u(t));var c={duration:u||0,delay:f,easing:h};return c}else return null}function gp(r,e,t,n,a,i,o){var s=!1,l;j(a)?(o=i,i=a,a=null):J(a)&&(i=a.cb,o=a.during,s=a.isFrom,l=a.removeOpt,a=a.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var h=ro(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(h&&h.duration>0){var f=h.duration,c=h.delay,v=h.easing,p={duration:f,delay:c||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Dt(r,e,t,n,a,i){gp("update",r,e,t,n,a,i)}function $t(r,e,t,n,a,i){gp("enter",r,e,t,n,a,i)}function no(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function Qn(r,e,t,n,a,i){no(r)||gp("leave",r,e,t,n,a,i)}function j1(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),Qn(r,{style:{opacity:0}},e,t,n)}function Os(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(a){a.isGroup||j1(a,e,t,n)}):j1(r,e,t,n)}function Lr(r){K1(r).oldStyle=r.style}function VR(r){return K1(r).oldStyle}var lh=Math.max,uh=Math.min,yp={};function BR(r){return _t.extend(r)}var zR=mR;function GR(r,e){return zR(r,e)}function Er(r,e){yp[r]=e}function mp(r){if(yp.hasOwnProperty(r))return yp[r]}function hh(r,e,t,n){var a=W1(r,e);return t&&(n==="center"&&(t=J1(t,a.getBoundingRect())),tS(a,t)),a}function Q1(r,e,t){var n=new ge({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(a){if(t==="center"){var i={width:a.width,height:a.height};n.setStyle(J1(e,i))}}});return n}function J1(r,e){var t=e.width/e.height,n=r.height*t,a;n<=r.width?a=r.height:(n=r.width,a=n/t);var i=r.x+r.width/2,o=r.y+r.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var hr=_R;function tS(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function ao(r,e){return i1(r,r,{lineWidth:e}),r}function FR(r){return o1(r.shape,r.shape,r.style),r}var fh=Ya;function ti(r,e){for(var t=pu([]);r&&r!==e;)dn(t,r.getLocalTransform(),t),r=r.parent;return t}function Pr(r,e,t){return e&&!we(e)&&(e=mn.getLocalTransform(e)),t&&(e=Fi([],e)),ye([],r,e)}function ch(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),a=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),i=[r==="left"?-n:r==="right"?n:0,r==="top"?-a:r==="bottom"?a:0];return i=Pr(i,e,t),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function eS(r){return!r.isGroup}function HR(r){return r.shape!=null}function Vs(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){eS(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return HR(o)&&(s.shape=B({},o.shape)),s}var i=n(r);e.traverse(function(o){if(eS(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Dt(o,l,t,st(o).dataIndex)}}})}function rS(r,e){return G(r,function(t){var n=t[0];n=lh(n,e.x),n=uh(n,e.x+e.width);var a=t[1];return a=lh(a,e.y),a=uh(a,e.y+e.height),[n,a]})}function WR(r,e){var t=lh(r.x,e.x),n=uh(r.x+r.width,e.x+e.width),a=lh(r.y,e.y),i=uh(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function Bs(r,e,t){var n=B({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),rt(a,t),new ge(n)):hh(r.replace("path://",""),n,t,"center")}function zs(r,e,t,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var s=a[i];if(nS(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function nS(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,h=o-a,f=s-i,c=_p(h,f,l,u);if($R(c))return!1;var v=r-a,p=e-i,d=_p(v,p,l,u)/c;if(d<0||d>1)return!1;var g=_p(v,p,h,f)/c;return!(g<0||g>1)}function _p(r,e,t,n){return r*n-t*e}function $R(r){return r<=1e-6&&r>=-1e-6}function ei(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=U(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&A(xt(l),function(h){X(s,h)||(s[h]=l[h],s.$vars.push(h))});var u=st(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:rt({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function aS(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Jn(r,e){if(r)if(z(r))for(var t=0;t<r.length;t++)aS(r[t],e);else aS(r,e)}Er("circle",Cn),Er("ellipse",rh),Er("sector",Oe),Er("ring",ks),Er("polygon",Ve),Er("polyline",Be),Er("rect",wt),Er("line",ue),Er("bezierCurve",Rs),Er("arc",ah);const ri=Object.freeze(Object.defineProperty({__proto__:null,Arc:ah,BezierCurve:Rs,BoundingRect:vt,Circle:Cn,CompoundPath:dp,Ellipse:rh,Group:it,Image:ge,IncrementalDisplayable:OR,Line:ue,LinearGradient:Ns,OrientedBoundingRect:sh,Path:_t,Point:ct,Polygon:Ve,Polyline:Be,RadialGradient:q1,Rect:wt,Ring:ks,Sector:Oe,Text:Tt,applyTransform:Pr,clipPointsByRect:rS,clipRectByRect:WR,createIcon:Bs,extendPath:GR,extendShape:BR,getShapeClass:mp,getTransform:ti,groupTransition:Vs,initProps:$t,isElementRemoved:no,lineLineIntersect:nS,linePolygonIntersect:zs,makeImage:Q1,makePath:hh,mergePath:hr,registerShape:Er,removeElement:Qn,removeElementWithFadeOut:Os,resizePath:tS,setTooltipConfig:ei,subPixelOptimize:fh,subPixelOptimizeLine:ao,subPixelOptimizeRect:FR,transformDirection:ch,traverseElements:Jn,updateProps:Dt},Symbol.toStringTag,{value:"Module"}));var vh={};function iS(r,e){for(var t=0;t<Ne.length;t++){var n=Ne[t],a=e[n],i=r.ensureState(n);i.style=i.style||{},i.style.text=a}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function Sp(r,e,t){var n=r.labelFetcher,a=r.labelDataIndex,i=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=j(r.defaultText)?r.defaultText(a,r,t):r.defaultText);for(var l={normal:s},u=0;u<Ne.length;u++){var h=Ne[u],f=e[h];l[h]=ot(n?n.getFormattedLabel(a,h,null,i,f&&f.get("formatter")):null,s)}return l}function Se(r,e,t,n){t=t||vh;for(var a=r instanceof Tt,i=!1,o=0;o<As.length;o++){var s=e[As[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=a?r:r.getTextContent();if(i){a||(l||(l=new Tt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Sp(t,e),h=e.normal,f=!!h.getShallow("show"),c=zt(h,n&&n.normal,t,!1,!a);c.text=u.normal,a||r.setTextConfig(ph(h,t,!1));for(var o=0;o<Ne.length;o++){var v=Ne[o],s=e[v];if(s){var p=l.ensureState(v),d=!!ot(s.getShallow("show"),f);if(d!==f&&(p.ignore=!d),p.style=zt(s,n&&n[v],t,!0,!a),p.style.text=u[v],!a){var g=r.ensureState(v);g.textConfig=ph(s,t,!0)}}}l.silent=!!h.getShallow("silent"),l.style.x!=null&&(c.x=l.style.x),l.style.y!=null&&(c.y=l.style.y),l.ignore=!f,l.useStyle(c),l.dirty(),t.enableTextSetter&&(io(l).setLabelText=function(y){var m=Sp(t,e,y);iS(l,m)})}else l&&(l.ignore=!0);r.dirty()}function he(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<Ne.length;n++){var a=Ne[n];t[a]=r.getModel([a,e])}return t}function zt(r,e,t,n,a){var i={};return UR(i,r,t,n,a),e&&B(i,e),i}function ph(r,e,t){e=e||{};var n={},a,i=r.getShallow("rotate"),o=ot(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return a=r.getShallow("position")||(t?null:"inside"),a==="outside"&&(a=e.defaultOutsidePosition||"top"),a!=null&&(n.position=a),s!=null&&(n.offset=s),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",n}function UR(r,e,t,n,a){t=t||vh;var i=e.ecModel,o=i&&i.option.textStyle,s=YR(e),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var h=e.getModel(["rich",u]);uS(l[u]={},h,o,t,n,a,!1,!0)}}l&&(r.rich=l);var f=e.get("overflow");f&&(r.overflow=f);var c=e.get("minMargin");c!=null&&(r.margin=c),uS(r,e,o,t,n,a,!0,!1)}function YR(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||vh).rich;if(t){e=e||{};for(var n=xt(t),a=0;a<n.length;a++){var i=n[a];e[i]=1}}r=r.parentModel}return e}var oS=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],sS=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],lS=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function uS(r,e,t,n,a,i,o,s){t=!a&&t||vh;var l=n&&n.inheritColor,u=e.getShallow("color"),h=e.getShallow("textBorderColor"),f=ot(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(process.env.NODE_ENV!=="production"&&u==="auto"&&re("color: 'auto'","color: 'inherit'"),l?u=l:u=null),(h==="inherit"||h==="auto")&&(process.env.NODE_ENV!=="production"&&h==="auto"&&re("color: 'auto'","color: 'inherit'"),l?h=l:h=null),i||(u=u||t.color,h=h||t.textBorderColor),u!=null&&(r.fill=u),h!=null&&(r.stroke=h);var c=ot(e.getShallow("textBorderWidth"),t.textBorderWidth);c!=null&&(r.lineWidth=c);var v=ot(e.getShallow("textBorderType"),t.textBorderType);v!=null&&(r.lineDash=v);var p=ot(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!a&&f==null&&!s&&(f=n&&n.defaultOpacity),f!=null&&(r.opacity=f),!a&&!i&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var d=0;d<oS.length;d++){var g=oS[d],y=ot(e.getShallow(g),t[g]);y!=null&&(r[g]=y)}for(var d=0;d<sS.length;d++){var g=sS[d],y=e.getShallow(g);y!=null&&(r[g]=y)}if(r.verticalAlign==null){var m=e.getShallow("baseline");m!=null&&(r.verticalAlign=m)}if(!o||!n.disableBox){for(var d=0;d<lS.length;d++){var g=lS[d],y=e.getShallow(g);y!=null&&(r[g]=y)}var _=e.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.backgroundColor==="auto"&&re("backgroundColor: 'auto'","backgroundColor: 'inherit'"),r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.borderColor==="auto"&&re("borderColor: 'auto'","borderColor: 'inherit'"),r.borderColor=l)}}function xp(r,e){var t=e&&e.getModel("textStyle");return Tr([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var io=bt();function hS(r,e,t,n){if(r){var a=io(r);a.prevValue=a.value,a.value=t;var i=e.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=e)}}function fS(r,e,t,n,a){var i=io(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=ot(i.interpolatedValue,i.prevValue),l=i.value;function u(h){var f=$_(t,i.precision,s,l,h);i.interpolatedValue=h===1?null:f;var c=Sp({labelDataIndex:e,labelFetcher:a,defaultText:o?o(f):f+""},i.statesModels,f);iS(r,c)}r.percent=0,(i.prevValue==null?$t:Dt)(r,{percent:1},n,e,null,u)}var ZR=["textStyle","color"],bp=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],wp=new Tt,XR=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(ZR):null)},r.prototype.getFont=function(){return xp({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<bp.length;n++)t[bp[n]]=this.getShallow(bp[n]);return wp.useStyle(t),wp.update(),wp.getBoundingRect()},r}(),cS=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],qR=Ba(cS),KR=function(){function r(){}return r.prototype.getLineStyle=function(e){return qR(this,e)},r}(),vS=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],jR=Ba(vS),QR=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return jR(this,e,t)},r}(),Lt=function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){ft(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,a=n==null?n:n[e];if(a==null&&!t){var i=this.parentModel;i&&(a=i.getShallow(e))}return a},r.prototype.getModel=function(e,t){var n=e!=null,a=n?this.parsePath(e):null,i=n?this._doGet(a):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new r(i,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(at(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!mt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var a=0;a<e.length&&!(e[a]&&(n=n&&typeof n=="object"?n[e[a]]:null,n==null));a++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r}();Ov(Lt),sk(Lt),te(Lt,KR),te(Lt,QR),te(Lt,ck),te(Lt,XR);var JR=Math.round(Math.random()*10);function oo(r){return[r||"",JR++].join("_")}function tN(r){var e={};r.registerSubTypeDefaulter=function(t,n){var a=Zr(t);e[a.main]=n},r.determineSubType=function(t,n){var a=n.type;if(!a){var i=Zr(t).main;r.hasSubTypes(t)&&e[i]&&(a=e[i](n))}return a}}function eN(r,e){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=t(o),h=u.graph,f=u.noEntryList,c={};for(A(i,function(m){c[m]=!0});f.length;){var v=f.pop(),p=h[v],d=!!c[v];d&&(s.call(l,v,p.originalDeps.slice()),delete c[v]),A(p.successor,d?y:g)}A(c,function(){var m="";throw process.env.NODE_ENV!=="production"&&(m=ke("Circular dependency may exists: ",c,i,o)),new Error(m)});function g(m){h[m].entryCount--,h[m].entryCount===0&&f.push(m)}function y(m){c[m]=!0,g(m)}};function t(i){var o={},s=[];return A(i,function(l){var u=n(o,l),h=u.originalDeps=e(l),f=a(h,i);u.entryCount=f.length,u.entryCount===0&&s.push(l),A(f,function(c){dt(u.predecessor,c)<0&&u.predecessor.push(c);var v=n(o,c);dt(v.successor,c)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var s=[];return A(i,function(l){dt(o,l)>=0&&s.push(l)}),s}}function ta(r,e){return ft(ft({},r,!0),e,!0)}const rN={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},nN={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var dh="ZH",Tp="EN",so=Tp,gh={},Cp={},pS=mt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||so).toUpperCase();return r.indexOf(dh)>-1?dh:so}():so;function dS(r,e){r=r.toUpperCase(),Cp[r]=new Lt(e),gh[r]=e}function aN(r){if(U(r)){var e=gh[r.toUpperCase()]||{};return r===dh||r===Tp?at(e):ft(at(e),at(gh[so]),!1)}else return ft(at(r),at(gh[so]),!1)}function Dp(r){return Cp[r]}function iN(){return Cp[so]}dS(Tp,rN),dS(dh,nN);var Ap=1e3,Mp=Ap*60,Gs=Mp*60,fr=Gs*24,gS=fr*365,Fs={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},yh="{yyyy}-{MM}-{dd}",yS={year:"{yyyy}",month:"{yyyy}-{MM}",day:yh,hour:yh+" "+Fs.hour,minute:yh+" "+Fs.minute,second:yh+" "+Fs.second,millisecond:Fs.none},Ip=["year","month","day","hour","minute","second","millisecond"],mS=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function ea(r,e){return r+="","0000".substr(0,e-r.length)+r}function lo(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function oN(r){return r===lo(r)}function sN(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function mh(r,e,t,n){var a=Yr(r),i=a[Lp(t)](),o=a[uo(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[_h(t)](),u=a["get"+(t?"UTC":"")+"Day"](),h=a[Hs(t)](),f=(h-1)%12+1,c=a[Sh(t)](),v=a[xh(t)](),p=a[bh(t)](),d=h>=12?"pm":"am",g=d.toUpperCase(),y=n instanceof Lt?n:Dp(n||pS)||iN(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),x=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,ea(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,ea(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,ea(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,ea(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,ea(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,ea(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,ea(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,ea(p,3)).replace(/{S}/g,p+"")}function lN(r,e,t,n,a){var i=null;if(U(t))i=t;else if(j(t))i=t(r.value,e,{level:r.level});else{var o=B({},Fs);if(r.level>0)for(var s=0;s<Ip.length;++s)o[Ip[s]]="{primary|"+o[Ip[s]]+"}";var l=t?t.inherit===!1?t:rt(t,o):o,u=_S(r.value,a);if(l[u])i=l[u];else if(l.inherit){for(var h=mS.indexOf(u),s=h-1;s>=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(z(i)){var f=r.level==null?0:r.level>=0?r.level:i.length+r.level;f=Math.min(f,i.length-1),i=i[f]}}return mh(new Date(r.value),i,a,n)}function _S(r,e){var t=Yr(r),n=t[uo(e)]()+1,a=t[_h(e)](),i=t[Hs(e)](),o=t[Sh(e)](),s=t[xh(e)](),l=t[bh(e)](),u=l===0,h=u&&s===0,f=h&&o===0,c=f&&i===0,v=c&&a===1,p=v&&n===1;return p?"year":v?"month":c?"day":f?"hour":h?"minute":u?"second":"millisecond"}function SS(r,e,t){var n=Ct(r)?Yr(r):r;switch(e=e||_S(r,t),e){case"year":return n[Lp(t)]();case"half-year":return n[uo(t)]()>=6?1:0;case"quarter":return Math.floor((n[uo(t)]()+1)/4);case"month":return n[uo(t)]();case"day":return n[_h(t)]();case"half-day":return n[Hs(t)]()/24;case"hour":return n[Hs(t)]();case"minute":return n[Sh(t)]();case"second":return n[xh(t)]();case"millisecond":return n[bh(t)]()}}function Lp(r){return r?"getUTCFullYear":"getFullYear"}function uo(r){return r?"getUTCMonth":"getMonth"}function _h(r){return r?"getUTCDate":"getDate"}function Hs(r){return r?"getUTCHours":"getHours"}function Sh(r){return r?"getUTCMinutes":"getMinutes"}function xh(r){return r?"getUTCSeconds":"getSeconds"}function bh(r){return r?"getUTCMilliseconds":"getMilliseconds"}function uN(r){return r?"setUTCFullYear":"setFullYear"}function xS(r){return r?"setUTCMonth":"setMonth"}function bS(r){return r?"setUTCDate":"setDate"}function wS(r){return r?"setUTCHours":"setHours"}function TS(r){return r?"setUTCMinutes":"setMinutes"}function CS(r){return r?"setUTCSeconds":"setSeconds"}function DS(r){return r?"setUTCMilliseconds":"setMilliseconds"}function AS(r){if(!Pv(r))return U(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function MS(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var ho=kc;function Ep(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(h){return h&&Tr(h)?h:"-"}function i(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Yr(r):r;if(isNaN(+l)){if(s)return"-"}else return mh(l,n,t)}if(e==="ordinal")return su(r)?a(r):Ct(r)&&i(r)?r+"":"-";var u=_n(r);return i(u)?AS(u):su(r)?a(r):typeof r=="boolean"?r+"":"-"}var IS=["a","b","c","d","e","f","g"],Pp=function(r,e){return"{"+r+(e??"")+"}"};function LS(r,e,t){z(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i<a.length;i++){var o=IS[i];r=r.replace(Pp(o),Pp(o,0))}for(var s=0;s<n;s++)for(var l=0;l<a.length;l++){var u=e[s][a[l]];r=r.replace(Pp(IS[l],s),t?Pe(u):u)}return r}function hN(r,e,t){return A(e,function(n,a){r=r.replace("{"+a+"}",n)}),r}function fN(r,e){var t=U(r)?{color:r,extraCssText:e}:r||{},n=t.color,a=t.type;e=t.extraCssText;var i=t.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Pe(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Pe(n)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|}  ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function ni(r,e){return e=e||"transparent",U(r)?r:J(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function wh(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Th=A,ES=["left","right","top","bottom","width","height"],ai=[["width","left","right"],["height","top","bottom"]];function kp(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var h=l.getBoundingRect(),f=e.childAt(u+1),c=f&&f.getBoundingRect(),v,p;if(r==="horizontal"){var d=h.width+(c?-c.x+h.x:0);v=i+d,v>n||l.newline?(i=0,v=d,o+=s+t,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(c?-c.y+h.y:0);p=o+g,p>a||l.newline?(i+=s+t,o=0,p=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+t:o=p+t)})}var ii=kp;ht(kp,"vertical"),ht(kp,"horizontal");function cN(r,e,t){var n=e.width,a=e.height,i=W(r.left,n),o=W(r.top,a),s=W(r.right,n),l=W(r.bottom,a);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=a),t=ho(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function se(r,e,t){t=ho(t||0);var n=e.width,a=e.height,i=W(r.left,n),o=W(r.top,a),s=W(r.right,n),l=W(r.bottom,a),u=W(r.width,n),h=W(r.height,a),f=t[2]+t[0],c=t[1]+t[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-c-i),isNaN(h)&&(h=a-l-f-o),v!=null&&(isNaN(u)&&isNaN(h)&&(v>n/a?u=n*.8:h=a*.8),isNaN(u)&&(u=v*h),isNaN(h)&&(h=u/v)),isNaN(i)&&(i=n-s-u-c),isNaN(o)&&(o=a-l-h-f),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-h/2-t[0];break;case"bottom":o=a-h-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-c-i-(s||0)),isNaN(h)&&(h=a-f-o-(l||0));var p=new vt(i+t[3],o+t[0],u,h);return p.margin=t,p}function Ch(r,e,t,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new vt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var h=r.getLocalTransform();u=u.clone(),u.applyTransform(h)}var f=se(rt({width:u.width,height:u.height},e),t,n),c=o?f.x-u.x:0,v=s?f.y-u.y:0;return l==="raw"?(i.x=c,i.y=v):(i.x+=c,i.y+=v),i===r&&r.markRedraw(),!0}function vN(r,e){return r[ai[e][0]]!=null||r[ai[e][1]]!=null&&r[ai[e][2]]!=null}function Ws(r){var e=r.layoutMode||r.constructor.layoutMode;return J(e)?e:e?{type:e}:null}function ra(r,e,t){var n=t&&t.ignoreSize;!z(n)&&(n=[n,n]);var a=o(ai[0],0),i=o(ai[1],1);u(ai[0],r,a),u(ai[1],r,i);function o(h,f){var c={},v=0,p={},d=0,g=2;if(Th(h,function(_){p[_]=r[_]}),Th(h,function(_){s(e,_)&&(c[_]=p[_]=e[_]),l(c,_)&&v++,l(p,_)&&d++}),n[f])return l(e,h[1])?p[h[2]]=null:l(e,h[2])&&(p[h[1]]=null),p;if(d===g||!v)return p;if(v>=g)return c;for(var y=0;y<h.length;y++){var m=h[y];if(!s(c,m)&&s(r,m)){c[m]=r[m];break}}return c}function s(h,f){return h.hasOwnProperty(f)}function l(h,f){return h[f]!=null&&h[f]!=="auto"}function u(h,f,c){Th(h,function(v){f[v]=c[v]})}}function fo(r){return PS({},r)}function PS(r,e){return e&&r&&Th(ES,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var pN=bt(),St=function(r){O(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.uid=oo("ec_cpt_model"),i}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=Ws(this),i=a?fo(t):{},o=n.getTheme();ft(t,o.get(this.mainType)),ft(t,this.getDefaultOption()),a&&ra(t,i,a)},e.prototype.mergeOption=function(t,n){ft(this.option,t,!0);var a=Ws(this);a&&ra(this.option,t,a)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!ak(t))return t.defaultOption;var n=pN(this);if(!n.defaultOption){for(var a=[],i=t;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var s={},l=a.length-1;l>=0;l--)s=ft(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return ws(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Lt);Y_(St,Lt),Fu(St),tN(St),eN(St,dN);function dN(r){var e=[];return A(St.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=G(e,function(t){return Zr(t).main}),r!=="dataset"&&dt(e,"dataset")<=0&&e.unshift("dataset"),e}var kS="";typeof navigator<"u"&&(kS=navigator.platform||"");var co="rgba(0, 0, 0, 0.2)";const gN={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:co,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:co,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:co,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:co,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:co,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:co,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:kS.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Rp=q(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),cr="original",Ce="arrayRows",vr="objectRows",Jr="keyedColumns",Dn="typedArray",RS="unknown",tn="column",vo="row",xe={Must:1,Might:2,Not:3},NS=bt();function yN(r){NS(r).datasetMap=q()}function OS(r,e,t){var n={},a=Op(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=NS(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,h,f;r=r.slice(),A(r,function(d,g){var y=J(d)?d:r[g]={name:d};y.type==="ordinal"&&h==null&&(h=g,f=p(y)),n[y.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});A(r,function(d,g){var y=d.name,m=p(d);if(h==null){var _=c.valueWayDim;v(n[y],_,m),v(o,_,m),c.valueWayDim+=m}else if(h===g)v(n[y],0,m),v(i,0,m);else{var _=c.categoryWayDim;v(n[y],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(d,g,y){for(var m=0;m<y;m++)d.push(g+m)}function p(d){var g=d.dimsDef;return g?g.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function Np(r,e,t){var n={},a=Op(r);if(!a)return n;var i=e.sourceFormat,o=e.dimensionsDefine,s;(i===vr||i===Jr)&&A(o,function(h,f){(J(h)?h.name:h)==="name"&&(s=f)});var l=function(){for(var h={},f={},c=[],v=0,p=Math.min(5,t);v<p;v++){var d=BS(e.data,i,e.seriesLayoutBy,o,e.startIndex,v);c.push(d);var g=d===xe.Not;if(g&&h.v==null&&v!==s&&(h.v=v),(h.n==null||h.n===h.v||!g&&c[h.n]===xe.Not)&&(h.n=v),y(h)&&c[h.n]!==xe.Not)return h;g||(d===xe.Might&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v)&&(f.n=v))}function y(m){return m.v!=null&&m.n!=null}return y(h)?h:y(f)?f:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function Op(r){var e=r.get("data",!0);if(!e)return ws(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},ne).models[0]}function mN(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:ws(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},ne).models}function VS(r,e){return BS(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function BS(r,e,t,n,a,i){var o,s=5;if(Le(r))return xe.Not;var l,u;if(n){var h=n[i];J(h)?(l=h.name,u=h.type):U(h)&&(l=h)}if(u!=null)return u==="ordinal"?xe.Must:xe.Not;if(e===Ce){var f=r;if(t===vo){for(var c=f[i],v=0;v<(c||[]).length&&v<s;v++)if((o=S(c[a+v]))!=null)return o}else for(var v=0;v<f.length&&v<s;v++){var p=f[a+v];if(p&&(o=S(p[i]))!=null)return o}}else if(e===vr){var d=r;if(!l)return xe.Not;for(var v=0;v<d.length&&v<s;v++){var g=d[v];if(g&&(o=S(g[l]))!=null)return o}}else if(e===Jr){var y=r;if(!l)return xe.Not;var c=y[l];if(!c||Le(c))return xe.Not;for(var v=0;v<c.length&&v<s;v++)if((o=S(c[v]))!=null)return o}else if(e===cr)for(var m=r,v=0;v<m.length&&v<s;v++){var g=m[v],_=Xi(g);if(!z(_))return xe.Not;if((o=S(_[i]))!=null)return o}function S(x){var b=U(x);if(x!=null&&Number.isFinite(Number(x))&&x!=="")return b?xe.Might:xe.Not;if(b&&x!=="-")return xe.Must}return xe.Not}var Vp=q();function _N(r,e){tt(Vp.get(r)==null&&e),Vp.set(r,e)}function SN(r,e,t){var n=Vp.get(e);if(!n)return t;var a=n(r);if(!a)return t;if(process.env.NODE_ENV!=="production")for(var i=0;i<a.length;i++)tt(qi(a[i]));return t.concat(a)}var zS=bt(),xN=bt(),Bp=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var a=Pt(this.get("color",!0)),i=this.get("colorLayer",!0);return GS(this,zS,a,i,e,t,n)},r.prototype.clearColorPalette=function(){wN(this,zS)},r}();function zp(r,e,t,n){var a=Pt(r.get(["aria","decal","decals"]));return GS(r,xN,a,null,e,t,n)}function bN(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function GS(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var h=o==null||!n?t:bN(n,o);if(h=h||t,!(!h||!h.length)){var f=h[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%h.length,f}}function wN(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Dh,$s,FS,Gp="\0_ec_inner",HS=1,TN={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},CN={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Ah={};function DN(r){A(r,function(e,t){if(!St.hasClass(t)){var n=TN[t];n&&!Ah[n]&&(me("Component "+t+` is used but not imported.
import { `+n+` } from 'echarts/components';
echarts.use([`+n+"]);"),Ah[n]=!0)}})}var Fp=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new Lt(i),this._locale=new Lt(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){process.env.NODE_ENV!=="production"&&(tt(t!=null,"option is null/undefined"),tt(t[Gp]!==HS,"please use chart.getOption()"));var i=US(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,US(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");process.env.NODE_ENV!=="production"&&DN(o),!this.option||t==="recreate"?FS(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&A(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=q(),u=n&&n.replaceMergeMainTypeMap;yN(this),A(t,function(f,c){f!=null&&(St.hasClass(c)?c&&(s.push(c),l.set(c,!0)):a[c]=a[c]==null?at(f):ft(a[c],f,!0))}),u&&u.each(function(f,c){St.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),St.topologicalTravel(s,St.getAllClassMainTypes(),h,this);function h(f){var c=SN(this,f,Pt(t[f])),v=i.get(f),p=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",d=z_(v,c,p);qP(d,f,St),a[f]=null,i.set(f,null),o.set(f,0);var g=[],y=[],m=0,_,S;A(d,function(x,b){var w=x.existing,T=x.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=f==="series",D=St.getClass(f,x.keyInfo.subType,!C);if(!D){if(process.env.NODE_ENV!=="production"){var M=x.keyInfo.subType,I=CN[M];Ah[M]||(Ah[M]=!0,me(I?"Series "+M+` is used but not imported.
import { `+I+` } from 'echarts/charts';
echarts.use([`+I+"]);":"Unknown series "+M))}return}if(f==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(S||(Xt("Currently only one tooltip component is allowed."),S=!0));return}_=!0}if(w&&w.constructor===D)w.name=x.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var L=B({componentIndex:b},x.keyInfo);w=new D(T,this,this,L),B(w,L),x.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(g.push(w.option),y.push(w),m++):(g.push(void 0),y.push(void 0))},this),a[f]=g,i.set(f,y),o.set(f,m),f==="series"&&Dh(this)}this._seriesIndices||Dh(this)},e.prototype.getOption=function(){var t=at(this.option);return A(t,function(n,a){if(St.hasClass(a)){for(var i=Pt(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!qi(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[Gp],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var a=t.index,i=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return a!=null?(l=[],A(Pt(a),function(u){s[u]&&l.push(s[u])})):i!=null?l=WS("id",i,s):o!=null?l=WS("name",o,s):l=At(s,function(u){return!!u}),$S(l,t)},e.prototype.findComponents=function(t){var n=t.query,a=t.mainType,i=s(n),o=i?this.queryComponents(i):At(this._componentsMap.get(a),function(u){return!!u});return l($S(o,t));function s(u){var h=a+"Index",f=a+"Id",c=a+"Name";return u&&(u[h]!=null||u[f]!=null||u[c]!=null)?{mainType:a,index:u[h],id:u[f],name:u[c]}:null}function l(u){return t.filter?At(u,t.filter):u}},e.prototype.eachComponent=function(t,n,a){var i=this._componentsMap;if(j(t)){var o=n,s=t;i.each(function(f,c){for(var v=0;f&&v<f.length;v++){var p=f[v];p&&s.call(o,c,p,p.componentIndex)}})}else for(var l=U(t)?i.get(t):J(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var h=l[u];h&&n.call(a,h,h.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=oe(t,null);return At(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return At(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return At(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){$s(this),A(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];t.call(n,i,a)},this)},e.prototype.eachRawSeries=function(t,n){A(this._componentsMap.get("series"),function(a){a&&t.call(n,a,a.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,a){$s(this),A(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===t&&n.call(a,o,i)},this)},e.prototype.eachRawSeriesByType=function(t,n,a){return A(this.getSeriesByType(t),n,a)},e.prototype.isSeriesFiltered=function(t){return $s(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){$s(this);var a=[];A(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];t.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=q(a)},e.prototype.restoreData=function(t){Dh(this);var n=this._componentsMap,a=[];n.each(function(i,o){St.hasClass(o)&&a.push(o)}),St.topologicalTravel(a,St.getAllClassMainTypes(),function(i){A(n.get(i),function(o){o&&(i!=="series"||!AN(o,t))&&o.restoreData()})})},e.internalField=function(){Dh=function(t){var n=t._seriesIndices=[];A(t._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),t._seriesIndicesMap=q(n)},$s=function(t){if(process.env.NODE_ENV!=="production"&&!t._seriesIndices)throw new Error("Option should contains series.")},FS=function(t,n){t.option={},t.option[Gp]=HS,t._componentsMap=q({series:[]}),t._componentsCount=q();var a=n.aria;J(a)&&a.enabled==null&&(a.enabled=!0),MN(n,t._theme.option),ft(n,gN,!1),t._mergeOption(n,null)}}(),e}(Lt);function AN(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,a=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||a!=null&&r.name!==a}}function MN(r,e){var t=r.color&&!r.colorLayer;A(e,function(n,a){a==="colorLayer"&&t||St.hasClass(a)||(typeof n=="object"?r[a]=r[a]?ft(r[a],n,!1):at(n):r[a]==null&&(r[a]=n))})}function WS(r,e,t){if(z(e)){var n=q();return A(e,function(i){if(i!=null){var o=oe(i,null);o!=null&&n.set(i,!0)}}),At(t,function(i){return i&&n.get(i[r])})}else{var a=oe(e,null);return At(t,function(i){return i&&a!=null&&i[r]===a})}}function $S(r,e){return e.hasOwnProperty("subType")?At(r,function(t){return t&&t.subType===e.subType}):r}function US(r){var e=q();return r&&A(Pt(r.replaceMerge),function(t){process.env.NODE_ENV!=="production"&&tt(St.hasClass(t),'"'+t+'" is not valid component main type in "replaceMerge"'),e.set(t,!0)}),{replaceMergeMainTypeMap:e}}te(Fp,Bp);var IN=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],YS=function(){function r(e){A(IN,function(t){this[t]=Z(e[t],e)},this)}return r}(),Hp={},po=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var n=[];A(Hp,function(a,i){var o=a.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(e,t){A(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(e,t){Hp[e]=t},r.get=function(e){return Hp[e]},r}(),LN=/^(min|max)?(.+)$/,EN=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(A(Pt(e.series),function(o){o&&o.data&&Le(o.data)&&uu(o.data)}),A(Pt(e.dataset),function(o){o&&o.source&&Le(o.source)&&uu(o.source)})),e=at(e);var a=this._optionBackup,i=PN(e,t,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],at(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var a=e.getComponent("timeline");a&&(t=at(n[a.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!a.length&&!i)return s;for(var l=0,u=a.length;l<u;l++)kN(a[l].query,t,n)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!NN(o,this._currentMediaIndices)&&(s=G(o,function(h){return at(h===-1?i.option:a[h].option)})),this._currentMediaIndices=o,s},r}();function PN(r,e,t){var n=[],a,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,h=!!r.media,f=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((f||h)&&(r.options=r.media=null),i=r),h&&(z(u)?A(u,function(v){process.env.NODE_ENV!=="production"&&v&&!v.option&&J(v.query)&&J(v.query.option)&&me("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),v&&v.option&&(v.query?n.push(v):a||(a=v))}):process.env.NODE_ENV!=="production"&&me("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),c(i),A(l,function(v){return c(v)}),A(n,function(v){return c(v.option)});function c(v){A(e,function(p){p(v,t)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:a,mediaList:n}}function kN(r,e,t){var n={width:e,height:t,aspectratio:e/t},a=!0;return A(r,function(i,o){var s=o.match(LN);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();RN(n[u],i,l)||(a=!1)}}),a}function RN(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function NN(r,e){return r.join(",")===e.join(",")}var pr=A,Us=J,ZS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Wp(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=ZS.length;t<n;t++){var a=ZS[t],i=e.normal,o=e.emphasis;i&&i[a]&&(process.env.NODE_ENV!=="production"&&re("itemStyle.normal."+a,a),r[a]=r[a]||{},r[a].normal?ft(r[a].normal,i[a]):r[a].normal=i[a],i[a]=null),o&&o[a]&&(process.env.NODE_ENV!=="production"&&re("itemStyle.emphasis."+a,"emphasis."+a),r[a]=r[a]||{},r[a].emphasis?ft(r[a].emphasis,o[a]):r[a].emphasis=o[a],o[a]=null)}}function De(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,a=r[e].emphasis;n&&(process.env.NODE_ENV!=="production"&&Mr("'normal' hierarchy in "+e+" has been removed since 4.0. All style properties are configured in "+e+" directly now."),t?(r[e].normal=r[e].emphasis=null,rt(r[e],n)):r[e]=n),a&&(process.env.NODE_ENV!=="production"&&Mr(e+".emphasis has been changed to emphasis."+e+" since 4.0"),r.emphasis=r.emphasis||{},r.emphasis[e]=a,a.focus&&(r.emphasis.focus=a.focus),a.blurScope&&(r.emphasis.blurScope=a.blurScope))}}function Ys(r){De(r,"itemStyle"),De(r,"lineStyle"),De(r,"areaStyle"),De(r,"label"),De(r,"labelLine"),De(r,"upperLabel"),De(r,"edgeLabel")}function ae(r,e){var t=Us(r)&&r[e],n=Us(t)&&t.textStyle;if(n){process.env.NODE_ENV!=="production"&&Mr("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var a=0,i=B_.length;a<i;a++){var o=B_[a];n.hasOwnProperty(o)&&(t[o]=n[o])}}}function dr(r){r&&(Ys(r),ae(r,"label"),r.emphasis&&ae(r.emphasis,"label"))}function ON(r){if(Us(r)){Wp(r),Ys(r),ae(r,"label"),ae(r,"upperLabel"),ae(r,"edgeLabel"),r.emphasis&&(ae(r.emphasis,"label"),ae(r.emphasis,"upperLabel"),ae(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(Wp(e),dr(e));var t=r.markLine;t&&(Wp(t),dr(t));var n=r.markArea;n&&dr(n);var a=r.data;if(r.type==="graph"){a=a||r.nodes;var i=r.links||r.edges;if(i&&!Le(i))for(var o=0;o<i.length;o++)dr(i[o]);A(r.categories,function(u){Ys(u)})}if(a&&!Le(a))for(var o=0;o<a.length;o++)dr(a[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)dr(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)z(l[o])?(dr(l[o][0]),dr(l[o][1])):dr(l[o]);r.type==="gauge"?(ae(r,"axisLabel"),ae(r,"title"),ae(r,"detail")):r.type==="treemap"?(De(r.breadcrumb,"itemStyle"),A(r.levels,function(u){Ys(u)})):r.type==="tree"&&Ys(r.leaves)}}function An(r){return z(r)?r:r?[r]:[]}function XS(r){return(z(r)?r[0]:r)||{}}function VN(r,e){pr(An(r.series),function(n){Us(n)&&ON(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),pr(t,function(n){pr(An(r[n]),function(a){a&&(ae(a,"axisLabel"),ae(a.axisPointer,"label"))})}),pr(An(r.parallel),function(n){var a=n&&n.parallelAxisDefault;ae(a,"axisLabel"),ae(a&&a.axisPointer,"label")}),pr(An(r.calendar),function(n){De(n,"itemStyle"),ae(n,"dayLabel"),ae(n,"monthLabel"),ae(n,"yearLabel")}),pr(An(r.radar),function(n){ae(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&Mr("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&Mr("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&pr(n.indicator,function(a){a.text&&re("text","name","radar.indicator")})}),pr(An(r.geo),function(n){Us(n)&&(dr(n),pr(An(n.regions),function(a){dr(a)}))}),pr(An(r.timeline),function(n){dr(n),De(n,"label"),De(n,"itemStyle"),De(n,"controlStyle",!0);var a=n.data;z(a)&&A(a,function(i){J(i)&&(De(i,"label"),De(i,"itemStyle"))})}),pr(An(r.toolbox),function(n){De(n,"iconStyle"),pr(n.feature,function(a){De(a,"iconStyle")})}),ae(XS(r.axisPointer),"label"),ae(XS(r.tooltip).axisPointer,"label")}function BN(r,e){for(var t=e.split(","),n=r,a=0;a<t.length&&(n=n&&n[t[a]],n!=null);a++);return n}function zN(r,e,t,n){for(var a=e.split(","),i=r,o,s=0;s<a.length-1;s++)o=a[s],i[o]==null&&(i[o]={}),i=i[o];i[a[s]]==null&&(i[a[s]]=t)}function qS(r){r&&A(GN,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var GN=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],FN=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],$p=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Zs(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<$p.length;t++){var n=$p[t][1],a=$p[t][0];e[n]!=null&&(e[a]=e[n],process.env.NODE_ENV!=="production"&&re(n,a))}}function KS(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&re("label.margin","label.edgeDistance","pie"),r.edgeDistance=r.margin)}function jS(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay,process.env.NODE_ENV!=="production"&&re("downplay","blur","sunburst"))}function HN(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&re("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),r.emphasis.focus="adjacency"))}function QS(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&QS(r[t].children,e)}function JS(r,e){VN(r,e),r.series=Pt(r.series),A(r.series,function(t){if(J(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow,process.env.NODE_ENV!=="production"&&re("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise,process.env.NODE_ENV!=="production"&&re("clockWise","clockwise")),KS(t.label);var a=t.data;if(a&&!Le(a))for(var i=0;i<a.length;i++)KS(a[i]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&re("hoverOffset","emphasis.scaleSize"),t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=BN(t,"pointer.color");o!=null&&zN(t,"itemStyle.color",o)}else if(n==="bar"){Zs(t),Zs(t.backgroundStyle),Zs(t.emphasis);var a=t.data;if(a&&!Le(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(Zs(a[i]),Zs(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s,process.env.NODE_ENV!=="production"&&re("highlightPolicy","emphasis.focus","sunburst"))),jS(t),QS(t.data,jS)}else n==="graph"||n==="sankey"?HN(t):n==="map"&&(t.mapType&&!t.map&&(process.env.NODE_ENV!=="production"&&re("mapType","map","map"),t.map=t.mapType),t.mapLocation&&(process.env.NODE_ENV!=="production"&&Mr("`mapLocation` is not used anymore."),rt(t,t.mapLocation)));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&re("hoverAnimation","emphasis.scale"),t.emphasis.scale=t.hoverAnimation)),qS(t)}}),r.dataRange&&(r.visualMap=r.dataRange),A(FN,function(t){var n=r[t];n&&(z(n)||(n=[n]),A(n,function(a){qS(a)}))})}function WN(r){var e=q();r.eachSeries(function(t){var n=t.get("stack");if(n){var a=e.get(n)||e.set(n,[]),i=t.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.length&&i.setCalculationInfo("stackedOnSeries",a[a.length-1].seriesModel),a.push(o)}}),e.each($N)}function $N(r){A(r,function(e,t){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,h,f){var c=o.get(e.stackedDimension,f);if(isNaN(c))return a;var v,p;s?p=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var d=NaN,g=t-1;g>=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,v)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&c>=0&&m>0||l==="samesign"&&c<=0&&m<0){c=NP(c,m),d=m;break}}}return n[0]=c,n[1]=d,n})})}var Mh=function(){function r(e){this.data=e.data||(e.sourceFormat===Jr?{}:[]),this.sourceFormat=e.sourceFormat||RS,this.seriesLayoutBy=e.seriesLayoutBy||tn,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var a=t[n];a.type==null&&VS(this,n)===xe.Must&&(a.type="ordinal")}}return r}();function Up(r){return r instanceof Mh}function Yp(r,e,t){t=t||tx(r);var n=e.seriesLayoutBy,a=YN(r,t,n,e.sourceHeader,e.dimensions),i=new Mh({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:at(e)});return i}function Zp(r){return new Mh({data:r,sourceFormat:Le(r)?Dn:cr})}function UN(r){return new Mh({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:at(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function tx(r){var e=RS;if(Le(r))e=Dn;else if(z(r)){r.length===0&&(e=Ce);for(var t=0,n=r.length;t<n;t++){var a=r[t];if(a!=null){if(z(a)||Le(a)){e=Ce;break}else if(J(a)){e=vr;break}}}}else if(J(r)){for(var i in r)if(X(r,i)&&we(r[i])){e=Jr;break}}return e}function YN(r,e,t,n,a){var i,o;if(!r)return{dimensionsDefine:ex(a),startIndex:o,dimensionsDetectedCount:i};if(e===Ce){var s=r;n==="auto"||n==null?rx(function(u){u!=null&&u!=="-"&&(U(u)?o==null&&(o=1):o=0)},t,s,10):o=Ct(n)?n:n?1:0,!a&&o===1&&(a=[],rx(function(u,h){a[h]=u!=null?u+"":""},t,s,1/0)),i=a?a.length:t===vo?s.length:s[0]?s[0].length:null}else if(e===vr)a||(a=ZN(r));else if(e===Jr)a||(a=[],A(r,function(u,h){a.push(h)}));else if(e===cr){var l=Xi(r[0]);i=z(l)&&l.length||1}else e===Dn&&process.env.NODE_ENV!=="production"&&tt(!!a,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:ex(a),dimensionsDetectedCount:i}}function ZN(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return xt(t)}function ex(r){if(r){var e=q();return G(r,function(t,n){t=J(t)?t:{name:t};var a={name:t.name,displayName:t.displayName,type:t.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=e.get(a.name);return i?a.name+="-"+i.count++:e.set(a.name,{count:1}),a})}}function rx(r,e,t,n){if(e===vo)for(var a=0;a<t.length&&a<n;a++)r(t[a]?t[a][0]:null,a);else for(var i=t[0]||[],a=0;a<i.length&&a<n;a++)r(i[a],a)}function nx(r){var e=r.sourceFormat;return e===vr||e===Jr}var oi,si,li,ax,ix,ox=function(){function r(e,t){var n=Up(e)?e:Zp(e);this._source=n;var a=this._data=n.data;if(n.sourceFormat===Dn){if(process.env.NODE_ENV!=="production"&&t==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=t,this._data=a}ix(this,a,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=function(){var e=r.prototype;e.pure=!1,e.persistent=!0}(),r.internalField=function(){var e;ix=function(o,s,l){var u=l.sourceFormat,h=l.seriesLayoutBy,f=l.startIndex,c=l.dimensionsDefine,v=ax[qp(u,h)];if(process.env.NODE_ENV!=="production"&&tt(v,"Invalide sourceFormat: "+u),B(o,v),u===Dn)o.getItem=t,o.count=a,o.fillStorage=n;else{var p=lx(u,h);o.getItem=Z(p,null,s,f,c);var d=hx(u,h);o.count=Z(d,null,s,f,c)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,h=u*o,f=0;f<u;f++)s[f]=l[h+f];return s},n=function(o,s,l,u){for(var h=this._data,f=this._dimSize,c=0;c<f;c++){for(var v=u[c],p=v[0]==null?1/0:v[0],d=v[1]==null?-1/0:v[1],g=s-o,y=l[c],m=0;m<g;m++){var _=h[m*f+c];y[o+m]=_,_<p&&(p=_),_>d&&(d=_)}v[0]=p,v[1]=d}},a=function(){return this._data?this._data.length/this._dimSize:0};ax=(e={},e[Ce+"_"+tn]={pure:!0,appendData:i},e[Ce+"_"+vo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[vr]={pure:!0,appendData:i},e[Jr]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var h=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)h.push(l[f])})}},e[cr]={appendData:i},e[Dn]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&tt(Le(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),sx=function(r,e,t,n){return r[n]},XN=(oi={},oi[Ce+"_"+tn]=function(r,e,t,n){return r[n+e]},oi[Ce+"_"+vo]=function(r,e,t,n,a){n+=e;for(var i=a||[],o=r,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[n]:null}return i},oi[vr]=sx,oi[Jr]=function(r,e,t,n,a){for(var i=a||[],o=0;o<t.length;o++){var s=t[o].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var l=r[s];i[o]=l?l[n]:null}return i},oi[cr]=sx,oi);function lx(r,e){var t=XN[qp(r,e)];return process.env.NODE_ENV!=="production"&&tt(t,'Do not support get item on "'+r+'", "'+e+'".'),t}var ux=function(r,e,t){return r.length},qN=(si={},si[Ce+"_"+tn]=function(r,e,t){return Math.max(0,r.length-e)},si[Ce+"_"+vo]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},si[vr]=ux,si[Jr]=function(r,e,t){var n=t[0].name;if(process.env.NODE_ENV!=="production"&&n==null)throw new Error;var a=r[n];return a?a.length:0},si[cr]=ux,si);function hx(r,e){var t=qN[qp(r,e)];return process.env.NODE_ENV!=="production"&&tt(t,'Do not support count on "'+r+'", "'+e+'".'),t}var Xp=function(r,e,t){return r[e]},KN=(li={},li[Ce]=Xp,li[vr]=function(r,e,t){return r[t]},li[Jr]=Xp,li[cr]=function(r,e,t){var n=Xi(r);return n instanceof Array?n[e]:n},li[Dn]=Xp,li);function fx(r){var e=KN[r];return process.env.NODE_ENV!=="production"&&tt(e,'Do not support get value on "'+r+'".'),e}function qp(r,e){return r===Ce?r+"_"+e:r}function go(r,e,t){if(r){var n=r.getRawDataItem(e);if(n!=null){var a=r.getStore(),i=a.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=a.getDimensionProperty(o);return fx(i)(n,o,s)}else{var l=n;return i===cr&&(l=Xi(n)),l}}}}var jN=/\{@(.+?)\}/g,Ih=function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),a=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],h=l&&l.stroke,f=this.mainType,c=f==="series",v=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:i,data:s,dataType:t,value:a,color:u,borderColor:h,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,a,i,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),a!=null&&z(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(e);i=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(j(i))return l.status=t,l.dimensionIndex=a,i(l);if(U(i)){var h=LS(i,l);return h.replace(jN,function(f,c){var v=c.length,p=c;p.charAt(0)==="["&&p.charAt(v-1)==="]"&&(p=+p.slice(1,v-1),process.env.NODE_ENV!=="production"&&isNaN(p)&&me("Invalide label formatter: @"+c+", only support @[0], @[1], @[2], ..."));var d=go(s,e,p);if(o&&z(o.interpolatedValue)){var g=s.getDimensionIndex(p);g>=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return go(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function cx(r){var e,t;return J(r)?r.type?t=r:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+ke(r)):e=r,{text:e,frag:t}}function Xs(r){return new QN(r)}var QN=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=h(this._modBy),s=this._modDataCount||0,l=h(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function h(m){return!(m>=1)&&(m=1),m}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var c=e&&e.step;if(t?(process.env.NODE_ENV!=="production"&&tt(t._outputDueEnd!=null),this._dueEnd=t._outputDueEnd):(process.env.NODE_ENV!=="production"&&tt(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var v=this._dueIndex,p=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(f||v<p)){var d=this._progress;if(z(d))for(var g=0;g<d.length;g++)this._doProgress(d[g],v,p,l,u);else this._doProgress(d,v,p,l,u)}this._dueIndex=p;var y=this._settedOutputEnd!=null?this._settedOutputEnd:p;process.env.NODE_ENV!=="production"&&tt(y>=this._outputDueEnd),this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,a,i){vx.reset(t,n,a,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:vx.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),z(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){process.env.NODE_ENV!=="production"&&tt(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r}(),vx=function(){var r,e,t,n,a,i={reset:function(l,u,h,f){e=l,r=u,t=h,n=f,a=Math.ceil(n/t),i.next=t>1&&n>0?s:o}};return i;function o(){return e<r?e++:null}function s(){var l=e%a*t+Math.ceil(e/a),u=e>=r?null:l<n?l:e;return e++,u}}();function na(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!Ct(r)&&r!=null&&r!=="-"&&(r=+Yr(r)),r==null||r===""?NaN:Number(r))}var JN=q({number:function(r){return parseFloat(r)},time:function(r){return+Yr(r)},trim:function(r){return U(r)?Tr(r):r}});function px(r){return JN.get(r)}var dx={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},tO=function(){function r(e,t){if(!Ct(t)){var n="";process.env.NODE_ENV!=="production"&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Mt(n)}this._opFn=dx[e],this._rvalFloat=_n(t)}return r.prototype.evaluate=function(e){return Ct(e)?this._opFn(e,this._rvalFloat):this._opFn(_n(e),this._rvalFloat)},r}(),gx=function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=Ct(e)?e:_n(e),a=Ct(t)?t:_n(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=U(e),l=U(t);s&&(n=l?e:0),l&&(a=s?t:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},r}(),eO=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=_n(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=_n(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function rO(r,e){return r==="eq"||r==="ne"?new eO(r==="eq",e):X(dx,r)?new tO(r,e):null}var nO=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return na(e,t)},r}();function aO(r,e){var t=new nO,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==tn&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Mt(o));var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";X(l,y)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+y+'" duplicated.'),Mt(_)),l[y]=m}});else for(var h=0;h<r.dimensionsDetectedCount;h++)s.push({index:h});var f=lx(a,tn);e.__isBuiltIn&&(t.getRawDataItem=function(d){return f(n,i,s,d)},t.getRawData=Z(iO,null,r)),t.cloneRawData=Z(oO,null,r);var c=hx(a,tn);t.count=Z(c,null,n,i,s);var v=fx(a);t.retrieveValue=function(d,g){var y=f(n,i,s,d);return p(y,g)};var p=t.retrieveValueFromItem=function(d,g){if(d!=null){var y=s[g];if(y)return v(d,g,y.name)}};return t.getDimensionInfo=Z(sO,null,s,l),t.cloneAllDimensionInfo=Z(lO,null,s),t}function iO(r){var e=r.sourceFormat;if(!Kp(e)){var t="";process.env.NODE_ENV!=="production"&&(t="`getRawData` is not supported in source format "+e),Mt(t)}return r.data}function oO(r){var e=r.sourceFormat,t=r.data;if(!Kp(e)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+e),Mt(n)}if(e===Ce){for(var a=[],i=0,o=t.length;i<o;i++)a.push(t[i].slice());return a}else if(e===vr){for(var a=[],i=0,o=t.length;i<o;i++)a.push(B({},t[i]));return a}}function sO(r,e,t){if(t!=null){if(Ct(t)||!isNaN(t)&&!X(e,t))return r[t];if(X(e,t))return e[t]}}function lO(r){return at(r)}var yx=q();function uO(r){r=at(r);var e=r.type,t="";e||(process.env.NODE_ENV!=="production"&&(t="Must have a `type` when `registerTransform`."),Mt(t));var n=e.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(t='Name must include namespace like "ns:regression".'),Mt(t));var a=!1;n[0]==="echarts"&&(e=n[1],a=!0),r.__isBuiltIn=a,yx.set(e,r)}function hO(r,e,t){var n=Pt(r),a=n.length,i="";a||(process.env.NODE_ENV!=="production"&&(i="If `transform` declared, it should at least contain one transform."),Mt(i));for(var o=0,s=a;o<s;o++){var l=n[o];e=fO(l,e,t,a===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function fO(r,e,t,n){var a="";e.length||(process.env.NODE_ENV!=="production"&&(a="Must have at least one upstream dataset."),Mt(a)),J(r)||(process.env.NODE_ENV!=="production"&&(a="transform declaration must be an object rather than "+typeof r+"."),Mt(a));var i=r.type,o=yx.get(i);o||(process.env.NODE_ENV!=="production"&&(a='Can not find transform on type "'+i+'".'),Mt(a));var s=G(e,function(h){return aO(h,o)}),l=Pt(o.transform({upstream:s[0],upstreamList:s,config:at(r.config)}));if(process.env.NODE_ENV!=="production"&&r.print){var u=G(l,function(h){var f=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+t.datasetIndex+f+" ===","- transform result data:",ke(h.data),"- transform result dimensions:",ke(h.dimensions)].join(`
`)}).join(`
`);GP(u)}return G(l,function(h,f){var c="";J(h)||(process.env.NODE_ENV!=="production"&&(c="A transform should not return some empty results."),Mt(c)),h.data||(process.env.NODE_ENV!=="production"&&(c="Transform result data should be not be null or undefined"),Mt(c));var v=tx(h.data);Kp(v)||(process.env.NODE_ENV!=="production"&&(c="Transform result data should be array rows or object rows."),Mt(c));var p,d=e[0];if(d&&f===0&&!h.dimensions){var g=d.startIndex;g&&(h.data=d.data.slice(0,g).concat(h.data)),p={seriesLayoutBy:tn,sourceHeader:g,dimensions:d.metaRawOption.dimensions}}else p={seriesLayoutBy:tn,sourceHeader:0,dimensions:h.dimensions};return Yp(h.data,p,null)})}function Kp(r){return r===Ce||r===vr}var Lh="undefined",cO=typeof Uint32Array===Lh?Array:Uint32Array,vO=typeof Uint16Array===Lh?Array:Uint16Array,mx=typeof Int32Array===Lh?Array:Int32Array,_x=typeof Float64Array===Lh?Array:Float64Array,Sx={float:_x,int:mx,ordinal:Array,number:Array,time:_x},jp;function yo(r){return r>65535?cO:vO}function mo(){return[1/0,-1/0]}function pO(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function xx(r,e,t,n,a){var i=Sx[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new i(n)}var Qp=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=q()}return r.prototype.initData=function(e,t,n){process.env.NODE_ENV!=="production"&&tt(j(e.getItem)&&j(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),i=this.defaultDimValueGetter=jp[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];var o=nx(a);this._dimensions=G(t,function(s){return process.env.NODE_ENV!=="production"&&o&&tt(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(e);if(i!=null){if(a[i].type===t)return i}else i=a.length;return a[i]={type:t},n.set(e,i),this._chunks[i]=new Sx[t||"float"](this._rawCount),this._rawExtent[i]=mo(),i},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],a=this._dimensions[e],i=this._rawExtent,o=a.ordinalOffset||0,s=n.length;o===0&&(i[e]=mo());for(var l=i[e],u=o;u<s;u++){var h=n[u]=t.parseAndCollect(n[u]);isNaN(h)||(l[0]=Math.min(h,l[0]),l[1]=Math.max(h,l[1]))}a.ordinalMeta=t,a.ordinalOffset=s,a.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){process.env.NODE_ENV!=="production"&&tt(!this._indices,"appendData can only be called on raw data.");var t=this._provider,n=this.count();t.appendData(e);var a=t.count();return t.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<i;u++){var h=a[u];xx(n,u,h.type,l,!0)}for(var f=[],c=s;c<l;c++)for(var v=c-s,p=0;p<i;p++){var h=a[p],d=jp.arrayRows.call(this,e[v]||f,h.property,v,p);n[p][c]=d;var g=o[p];d<g[0]&&(g[0]=d),d>g[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=G(o,function(m){return m.property}),h=0;h<s;h++){var f=o[h];l[h]||(l[h]=mo()),xx(i,h,f.type,t,n)}if(a.fillStorage)a.fillStorage(e,t,i,l);else for(var c=[],v=e;v<t;v++){c=a.getItem(v,c);for(var p=0;p<s;p++){var d=i[p],g=this._dimValueGetter(c,u[p],v,p);d[v]=g;var y=l[p];g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],a=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=e;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var a=0,i=this.count();a<i;a++){var o=this.get(e,a);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];this.each([e],function(i){isNaN(i)||t.push(i)});var n=t.sort(function(i,o){return i-o}),a=this.count();return a===0?0:a%2===1?n[(a-1)/2]:(n[a/2]+n[a/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(t[o]<e)a=o+1;else if(t[o]>e)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,n){var a=this._chunks,i=a[e],o=[];if(!i)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,h=0,f=this.count();h<f;h++){var c=this.getRawIndex(h),v=t-i[c],p=Math.abs(v);p<=n&&((p<s||p===s&&v>=0&&l<0)&&(s=p,l=v,u=0),v===l&&(o[u++]=h))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i<a;i++)e[i]=t[i]}else e=new n(t.buffer,0,a)}else{var n=yo(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=yo(n._rawCount),o=new i(a),s=[],l=e.length,u=0,h=e[0],f=n._chunks,c=0;c<a;c++){var v=void 0,p=n.getRawIndex(c);if(l===0)v=t(c);else if(l===1){var d=f[h][p];v=t(d,c)}else{for(var g=0;g<l;g++)s[g]=f[e[g]][p];s[g]=c,v=t.apply(null,s)}v&&(o[u++]=p)}return u<a&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var a=xt(e),i=a.length;if(!i)return this;var o=t.count(),s=yo(t._rawCount),l=new s(o),u=0,h=a[0],f=e[h][0],c=e[h][1],v=t._chunks,p=!1;if(!t._indices){var d=0;if(i===1){for(var g=v[a[0]],y=0;y<n;y++){var m=g[y];(m>=f&&m<=c||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=v[a[0]],_=v[a[1]],S=e[a[1]][0],x=e[a[1]][1],y=0;y<n;y++){var m=g[y],b=_[y];(m>=f&&m<=c||isNaN(m))&&(b>=S&&b<=x||isNaN(b))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y<o;y++){var w=t.getRawIndex(y),m=v[a[0]][w];(m>=f&&m<=c||isNaN(m))&&(l[u++]=w)}else for(var y=0;y<o;y++){for(var T=!0,w=t.getRawIndex(y),C=0;C<i;C++){var D=a[C],m=v[D][w];(m<e[D][0]||m>e[D][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var a=e._chunks,i=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,h=0;h<t.length;h++)u[t[h]]=mo();for(var f=0;f<s;f++){for(var c=e.getRawIndex(f),v=0;v<o;v++)l[v]=a[t[v]][c];l[o]=f;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(i[0]=p,p=i);for(var h=0;h<p.length;h++){var d=t[h],g=p[h],y=u[d],m=a[d];m&&(m[c]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),h,f,c,v=new(yo(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;p<o-1;p+=l){for(var d=Math.min(p+l,o-1),g=Math.min(p+l*2,o),y=(g+d)/2,m=0,_=d;_<g;_++){var S=this.getRawIndex(_),x=i[S];isNaN(x)||(m+=x)}m/=g-d;var b=p,w=Math.min(p+l,o),T=p-1,C=i[u];h=-1,c=b;for(var D=-1,M=0,_=b;_<w;_++){var S=this.getRawIndex(_),x=i[S];if(isNaN(x)){M++,D<0&&(D=S);continue}f=Math.abs((T-y)*(x-C)-(T-_)*(m-C)),f>h&&(h=f,c=S)}M>0&&M<w-b&&(v[s++]=Math.min(D,c),c=Math.max(D,c)),v[s++]=c,u=c}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),a=n._chunks,i=Math.floor(1/t),o=a[e],s=this.count(),l=new(yo(this._rawCount))(Math.ceil(s/i)*2),u=0,h=0;h<s;h+=i){var f=h,c=o[this.getRawIndex(f)],v=h,p=o[this.getRawIndex(v)],d=i;h+i>s&&(d=s-h);for(var g=0;g<d;g++){var y=this.getRawIndex(h+g),m=o[y];m<c&&(c=m,f=h+g),m>p&&(p=m,v=h+g)}var _=this.getRawIndex(f),S=this.getRawIndex(v);f<v?(l[u++]=_,l[u++]=S):(l[u++]=S,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(e,t,n,a){for(var i=this.clone([e],!0),o=i._chunks,s=[],l=Math.floor(1/t),u=o[e],h=this.count(),f=i._rawExtent[e]=mo(),c=new(yo(this._rawCount))(Math.ceil(h/l)),v=0,p=0;p<h;p+=l){l>h-p&&(l=h-p,s.length=l);for(var d=0;d<l;d++){var g=this.getRawIndex(p+d);s[d]=u[g]}var y=n(s),m=this.getRawIndex(Math.min(p+a(s,y)||0,h-1));u[m]=y,y<f[0]&&(f[0]=y),y>f[1]&&(f[1]=y),c[v++]=m}return i._count=v,i._indices=c,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(a[e[0]][s],i);break;case 2:t(a[e[0]][s],a[e[1]][s],i);break;default:for(var l=0,u=[];l<n;l++)u[l]=a[e[l]][s];u[l]=i,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=mo();if(!t)return n;var a=this.count(),i=!this._indices,o;if(i)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<a;u++){var h=this.getRawIndex(u),f=t[h];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][t]);return n},r.prototype.clone=function(e,t){var n=new r,a=this._chunks,i=e&&Gr(e,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?pO(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=at(this._extent),e._rawExtent=at(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var a=0;a<n;a++)t[a]=this._indices[a]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,a,i){return na(t[i],this._dimensions[i])}jp={arrayRows:e,objectRows:function(t,n,a,i){return na(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return na(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}}(),r}(),bx=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(qs(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var h=t[0];h.prepareSource(),u=h.getSource(),s=u.data,l=u.sourceFormat,i=[h._getVersionSign()]}else s=o.get("data",!0),l=Le(s)?Dn:cr,i=[];var f=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=ot(f.seriesLayoutBy,c.seriesLayoutBy)||null,p=ot(f.sourceHeader,c.sourceHeader),d=ot(f.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!p!=!!c.sourceHeader||d;a=g?[Yp(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(n){var m=this._applyTransform(t);a=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);a=[Yp(_,this._getSourceMetaRawOption(),null)],i=[]}}process.env.NODE_ENV!=="production"&&tt(a&&i),this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&tt(a!=null||n!=null),a!=null){var i="";e.length!==1&&(process.env.NODE_ENV!=="production"&&(i="When using `fromTransformResult`, there should be only one upstream dataset"),Cx(i))}var o,s=[],l=[];return A(e,function(u){u.prepareSource();var h=u.getSource(a||0),f="";a!=null&&!h&&(process.env.NODE_ENV!=="production"&&(f="Can not retrieve result by `fromTransformResult`: "+a),Cx(f)),s.push(h),l.push(u._getVersionSign())}),n?o=hO(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[UN(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){process.env.NODE_ENV!=="production"&&tt(qs(this._sourceHost),"Can only call getDataStore on series source manager.");var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];qs(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new Qp,s.initData(new ox(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(qs(e)){var t=Op(e);return t?[t.getSourceManager()]:[]}else return G(mN(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,a;if(qs(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),a=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:a}},r}();function Tx(r){var e=r.option.transform;e&&uu(r.option.transform)}function qs(r){return r.mainType==="series"}function Cx(r){throw new Error(r)}var dO="line-height:1";function Dx(r){var e=r.lineHeight;return e==null?dO:"line-height:"+Pe(e+"")+"px"}function Ax(r,e){var t=r.color||"#6e7079",n=r.fontSize||12,a=r.fontWeight||"400",i=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Pe(n+"")+"px;color:"+Pe(t)+";font-weight:"+Pe(a+""),valueStyle:"font-size:"+Pe(o+"")+"px;color:"+Pe(i)+";font-weight:"+Pe(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var gO=[0,10,20,30],yO=["",`
`,`

`,`


`];function fe(r,e){return e.type=r,e}function Jp(r){return r.type==="section"}function Mx(r){return Jp(r)?mO:_O}function Ix(r){if(Jp(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return A(r.blocks,function(a){var i=Ix(a);i>=e&&(e=i+ +(n&&(!i||Jp(a)&&!a.noHeader)))}),e}return 0}function mO(r,e,t,n){var a=e.noHeader,i=SO(Ix(e)),o=[],s=e.blocks||[];tt(!s||z(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(X(u,l)){var h=new gx(u[l],null);s.sort(function(d,g){return h.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(d,g){var y=e.valueFormatter,m=Mx(d)(y?B(B({},r),{valueFormatter:y}):r,d,g>0?i.html:0,n);m!=null&&o.push(m)});var f=r.renderMode==="richText"?o.join(i.richText):td(n,o.join(""),a?t:i.html);if(a)return f;var c=Ep(e.header,"ordinal",r.useUTC),v=Ax(n,r.renderMode).nameStyle,p=Dx(n);return r.renderMode==="richText"?Ex(r,c,v)+i.richText+f:td(n,'<div style="'+v+";"+p+';">'+Pe(c)+"</div>"+f,t)}function _O(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,h=e.valueFormatter||r.valueFormatter||function(S){return S=z(S)?S:[S],G(S,function(x,b){return Ep(x,z(v)?v[b]:v,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),c=i?"":Ep(l,"ordinal",u),v=e.valueType,p=o?[]:h(e.value,e.dataIndex),d=!s||!i,g=!s&&i,y=Ax(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":f)+(i?"":Ex(r,c,m))+(o?"":wO(r,p,d,g,_)):td(n,(s?"":f)+(i?"":xO(c,!s,m))+(o?"":bO(p,d,g,_)),t)}}function Lx(r,e,t,n,a,i){if(r){var o=Mx(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function SO(r){return{html:gO[r],richText:yO[r]}}function td(r,e,t){var n='<div style="clear:both"></div>',a="margin: "+t+"px 0 0",i=Dx(r);return'<div style="'+a+";"+i+';">'+e+n+"</div>"}function xO(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+Pe(r)+"</span>"}function bO(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=z(r)?r:[r],'<span style="'+i+";"+n+'">'+G(r,function(o){return Pe(o)}).join("&nbsp;&nbsp;")+"</span>"}function Ex(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function wO(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(z(e)?e.join("  "):e,i)}function Px(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return ni(n)}function kx(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var ed=function(){function r(){this.richTextStyles={},this._nextStyleNameId=E_()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=fN({color:t,type:e,renderMode:n,markerId:a});return U(i)?i:(process.env.NODE_ENV!=="production"&&tt(a),this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};z(t)?A(t,function(i){return B(n,i)}):B(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r}();function Rx(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=z(s),u=Px(e,t),h,f,c,v;if(o>1||l&&!o){var p=TO(s,e,t,i,u);h=p.inlineValues,f=p.inlineValueTypes,c=p.blocks,v=p.inlineValues[0]}else if(o){var d=a.getDimensionInfo(i[0]);v=h=go(a,t,i[0]),f=d.type}else v=h=l?s[0]:s;var g=kv(e),y=g&&e.name||"",m=a.getName(t),_=n?y:m;return fe("section",{header:y,noHeader:n||!g,sortParam:v,blocks:[fe("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Tr(_),value:h,valueType:f,dataIndex:t})].concat(c||[])})}function TO(r,e,t,n,a){var i=e.getData(),o=Gr(r,function(f,c,v){var p=i.getDimensionInfo(v);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?A(n,function(f){h(go(i,t,f),f)}):A(r,h);function h(f,c){var v=i.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(fe("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var aa=bt();function Eh(r,e){return r.getName(e)||r.getId(e)}var Ph="__universalTransitionEnabled",Gt=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Xs({count:DO,reset:AO}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=aa(this).sourceManager=new bx(this);i.prepareSource();var o=this.getInitialData(t,a);Ox(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&tt(o,"getInitialData returned invalid data."),aa(this).dataBeforeProcessed=o,Nx(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=Ws(this),i=a?fo(t):{},o=this.subType;St.hasClass(o)&&(o+="Series"),ft(t,n.getTheme().get(this.subType)),ft(t,this.getDefaultOption()),Na(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&ra(t,i,a)},e.prototype.mergeOption=function(t,n){t=ft(this.option,t,!0),this.fillDataTextStyle(t.data);var a=Ws(this);a&&ra(this.option,t,a);var i=aa(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);Ox(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,aa(this).dataBeforeProcessed=o,Nx(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Le(t))for(var n=["show"],a=0;a<t.length;a++)t[a]&&t[a].label&&Na(t[a],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=rd(this);if(n){var a=n.context.data;return t==null||!a.getLinkedData?a:a.getLinkedData(t)}else return aa(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=rd(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}aa(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return q(t)},e.prototype.getSourceManager=function(){return aa(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return aa(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,n,a){return Rx({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(mt.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=Bp.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Eh(o,l);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var a=[],i=0;i<t.length;i++)a[0]=t[i],this.isSelected(t[i],n)?this.unselect(a,n):this.select(a,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=xt(t),a=[],i=0;i<n.length;i++){var o=t[n[i]];o>=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Eh(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Ph])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){J(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,h=0;h<l;h++){var f=n[h],c=Eh(t,f);u[c]=!0,this._selectedDataIndicesMap[c]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var v=n[l-1],c=Eh(t,v);o.selectedMap=(a={},a[c]=!0,a),this._selectedDataIndicesMap=(i={},i[c]=t.getRawIndex(v),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(a){var i=t.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return St.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(St);te(Gt,Ih),te(Gt,Bp),Y_(Gt,St);function Nx(r){var e=r.name;kv(r)||(r.name=CO(r)||e)}function CO(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return A(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function DO(r){return r.model.getRawData().count()}function AO(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),MO}function MO(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ox(r,e){A(rs(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ht(IO,e))})}function IO(r,e){var t=rd(r);return t&&t.setOutputEnd((e||this).count()),e}function rd(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Yt=function(){function r(){this.group=new it,this.uid=oo("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();Ov(Yt),Fu(Yt);function _o(){var r=bt();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var Vx=bt(),LO=_o(),Rt=function(){function r(){this.group=new it,this.uid=oo("viewChart"),this.renderTask=Xs({plan:EO,reset:PO}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);if(!i){process.env.NODE_ENV!=="production"&&me("Unknown dataType "+a.dataType);return}zx(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);if(!i){process.env.NODE_ENV!=="production"&&me("Unknown dataType "+a.dataType);return}zx(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){Jn(this.group,e)},r.markUpdateMethod=function(e,t){Vx(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function Bx(r,e,t){r&&jn(r)&&(e==="emphasis"?wn:Tn)(r,t)}function zx(r,e,t){var n=Oa(r,e),a=e&&e.highlightKey!=null?fR(e.highlightKey):null;n!=null?A(Pt(n),function(i){Bx(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){Bx(i,t,a)})}Ov(Rt,["dispose"]),Fu(Rt);function EO(r){return LO(r.model)}function PO(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&Vx(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),kO[l]}var kO={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},kh="\0__throttleOriginMethod",Gx="\0__throttleRate",Fx="\0__throttleType";function nd(r,e,t){var n,a=0,i=0,o=null,s,l,u,h;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],p=0;p<arguments.length;p++)v[p]=arguments[p];n=new Date().getTime(),l=this,u=v;var d=h||e,g=h||t;h=null,s=n-(g?a:i)-d,clearTimeout(o),g?o=setTimeout(f,d):s>=0?f():o=setTimeout(f,-s),a=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){h=v},c}function So(r,e,t,n){var a=r[e];if(a){var i=a[kh]||a,o=a[Fx],s=a[Gx];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=nd(i,t,n==="debounce"),a[kh]=i,a[Fx]=n,a[Gx]=t}return a}}function Ks(r,e){var t=r[e];t&&t[kh]&&(t.clear&&t.clear(),r[e]=t[kh])}var Hx=bt(),Wx={itemStyle:Ba(vS,!0),lineStyle:Ba(cS,!0)},RO={lineStyle:"stroke",itemStyle:"fill"};function $x(r,e){var t=r.visualStyleMapper||Wx[e];return t||(console.warn("Unknown style type '"+e+"'."),Wx.itemStyle)}function Ux(r,e){var t=r.visualDrawType||RO[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var NO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=$x(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=Ux(r,n),u=o[l],h=j(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||h||f){var c=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=c,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||j(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||j(o.stroke)?c:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&h)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var d=r.getDataParams(p),g=B({},o);g[l]=h(d),v.setItemVisual(p,"style",g)}}}},js=new Lt,OO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=$x(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){js.option=l[n];var u=a(js),h=o.ensureUniqueItemVisual(s,"style");B(h,u),js.option.decal&&(o.setItemVisual(s,"decal",js.option.decal),js.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},VO={performRawSeries:!0,overallReset:function(r){var e=q();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),Hx(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=Hx(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=Ux(t,s);i.each(function(u){var h=i.getRawIndex(u);a[h]=u}),n.each(function(u){var h=a[u],f=i.getItemVisual(h,"colorFromPalette");if(f){var c=i.ensureUniqueItemVisual(h,"style"),v=n.getName(u)||u+"",p=n.count();c[l]=t.getColorFromPalette(v,o,p)}})}})}},Rh=Math.PI;function BO(r,e){e=e||{},rt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new it,n=new wt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new Tt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new wt({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new ah({shape:{startAngle:-Rh/2,endAngle:-Rh/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Rh*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Rh*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),h=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:h}),i.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var Yx=function(){function r(e,t,n,a){this._stageTaskMap=q(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=q();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;A(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),tt(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;A(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var h=o._stageTaskMap.get(l.uid),f=h.seriesTaskMap,c=h.overallTask;if(c){var v,p=c.agentStubMap;p.each(function(g){s(a,g)&&(g.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var d=o.getPerformArgs(c,a.block);p.each(function(g){g.perform(d)}),c.perform(d)&&(i=!0)}else f&&f.each(function(g,y){s(a,g)&&g.dirty();var m=o.getPerformArgs(g,a.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=q(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(h):l?n.eachRawSeriesByType(l,h):u&&u(n,a).each(h);function h(f){var c=f.uid,v=s.set(c,o&&o.get(c)||Xs({plan:WO,reset:$O,count:YO}));v.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,v)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||Xs({reset:zO});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=q(),u=e.seriesType,h=e.getTargetSeries,f=!0,c=!1,v="";process.env.NODE_ENV!=="production"&&(v='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),tt(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):h?h(n,a).each(p):(f=!1,A(n.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(c=!0,Xs({reset:GO,onDirty:HO})));y.context={model:d,overallProgress:f},y.agent=o,y.__block=f,i._pipe(d,y)}c&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return j(e)&&(e={overallReset:e,seriesType:ZO(e)}),e.uid=oo("stageHandler"),t&&(e.visualType=t),e},r}();function zO(r){r.overallReset(r.ecModel,r.api,r.payload)}function GO(r){return r.overallProgress&&FO}function FO(){this.agent.dirty(),this.getDownstream().dirty()}function HO(){this.agent&&this.agent.dirty()}function WO(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function $O(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Pt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?G(e,function(t,n){return Zx(n)}):UO}var UO=Zx(0);function Zx(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i<e.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(e,n)}}function YO(r){return r.data.count()}function ZO(r){Nh=null;try{r(Qs,Xx)}catch{}return Nh}var Qs={},Xx={},Nh;qx(Qs,Fp),qx(Xx,YS),Qs.eachSeriesByType=Qs.eachRawSeriesByType=function(r){Nh=r},Qs.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Nh=r.subType)};function qx(r,e){for(var t in e.prototype)r[t]=Qt}var Kx=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const XO={color:Kx,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Kx]};var Ae="#B9B8CE",jx="#100C2A",Oh=function(){return{axisLine:{lineStyle:{color:Ae}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Qx=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Jx={darkMode:!0,color:Qx,backgroundColor:jx,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Ae},pageTextStyle:{color:Ae}},textStyle:{color:Ae},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Ae}},dataZoom:{borderColor:"#71708A",textStyle:{color:Ae},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Ae}},timeline:{lineStyle:{color:Ae},label:{color:Ae},controlStyle:{color:Ae,borderColor:Ae}},calendar:{itemStyle:{color:jx},dayLabel:{color:Ae},monthLabel:{color:Ae},yearLabel:{color:Ae}},timeAxis:Oh(),logAxis:Oh(),valueAxis:Oh(),categoryAxis:Oh(),line:{symbol:"circle"},graph:{color:Qx},gauge:{title:{color:Ae},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Ae},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Jx.categoryAxis.splitLine.show=!1;var qO=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},a={};if(U(e)){var i=Zr(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};A(e,function(l,u){for(var h=!1,f=0;f<o.length;f++){var c=o[f],v=u.lastIndexOf(c);if(v>0&&v===u.length-c.length){var p=u.slice(0,v);p!=="data"&&(t.mainType=p,t[c.toLowerCase()]=l,h=!0)}}s.hasOwnProperty(u)&&(n[u]=l,h=!0),h||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,i,"name")&&h(u,i,"dataIndex")&&h(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function h(f,c,v,p){return f[v]==null||c[p||v]===f[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),ad=["symbol","symbolSize","symbolRotate","symbolOffset"],tb=ad.concat(["symbolKeepAspect"]),KO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<ad.length;o++){var s=ad[o],l=r.get(s);j(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(B({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=xt(a);function h(f,c){for(var v=r.getRawValue(c),p=r.getDataParams(c),d=0;d<u.length;d++){var g=u[d];f.setItemVisual(c,g,a[g](v,p))}}return{dataEach:i?h:null}}},jO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(a,i){for(var o=a.getItemModel(i),s=0;s<tb.length;s++){var l=tb[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function id(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function Js(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function eb(r,e,t,n){switch(t){case"color":var a=r.ensureUniqueItemVisual(e,"style");a[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break;default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function rb(r,e){function t(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}A([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(a,i,o){a=B({},a),process.env.NODE_ENV!=="production"&&re(a.type,n[1]),o.dispatchAction(B(a,{type:n[1],seriesIndex:t(i,a)}))})})}function xo(r,e,t,n,a){var i=r+e;t.isSilent(i)||(process.env.NODE_ENV!=="production"&&Mr("event "+i+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,h=0;h<u.length;h++)if(u[h].seriesIndex===s){var f=o.getData(),c=Oa(f,a.fromActionPayload);t.trigger(i,{type:i,seriesId:o.id,name:z(c)?f.getName(c[0]):f.getName(c),selected:U(l)?l:B({},l)})}}))}function QO(r,e,t){r.on("selectchanged",function(n){var a=t.getModel();n.isFromClick?(xo("map","selectchanged",e,a,n),xo("pie","selectchanged",e,a,n)):n.fromAction==="select"?(xo("map","selected",e,a,n),xo("pie","selected",e,a,n)):n.fromAction==="unselect"&&(xo("map","unselected",e,a,n),xo("pie","unselected",e,a,n))})}function ui(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var JO=Math.round(Math.random()*9),tV=typeof Object.defineProperty=="function",eV=function(){function r(){this._id="__ec_inner_"+JO++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return tV?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}(),rV=_t.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n+i),r.lineTo(t-a,n+i),r.closePath()}}),nV=_t.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n),r.lineTo(t,n+i),r.lineTo(t-a,n),r.closePath()}}),aV=_t.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,a=e.width/5*3,i=Math.max(a,e.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,f=Math.sin(u),c=Math.cos(u),v=o*.6,p=o*.7;r.moveTo(t-h,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+h-f*v,l+s+c*v,t,n-p,t,n),r.bezierCurveTo(t,n-p,t-h+f*v,l+s+c*v,t-h,l+s),r.closePath()}}),iV=_t.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,a=e.x,i=e.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+t),r.lineTo(a,i+t/4*3),r.lineTo(a-o,i+t),r.lineTo(a,i),r.closePath()}}),oV={line:ue,rect:wt,roundRect:wt,square:wt,circle:Cn,diamond:nV,pin:aV,arrow:iV,triangle:rV},sV={line:function(r,e,t,n,a){a.x1=r,a.y1=e+n/2,a.x2=r+t,a.y2=e+n/2},rect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n},roundRect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n,a.r=Math.min(t,n)/4},square:function(r,e,t,n,a){var i=Math.min(t,n);a.x=r,a.y=e,a.width=i,a.height=i},circle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.r=Math.min(t,n)/2},diamond:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n},pin:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},arrow:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},triangle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n}},Vh={};A(oV,function(r,e){Vh[e]=new r});var lV=_t.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=Vu(r,e,t),a=this.shape;return a&&a.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var a=Vh[n];a||(n="rect",a=Vh[n]),sV[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(r,a.shape,t)}}});function uV(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function ie(r,e,t,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=Q1(r.slice(8),new vt(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=hh(r.slice(7),{},new vt(e,t,n,a),o?"center":"cover"):l=new lV({shape:{symbolType:r,x:e,y:t,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=uV,i&&l.setColor(i),l}function bo(r){return z(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function hi(r,e){if(r!=null)return z(r)||(r=[r,r]),[W(r[0],e[0])||0,W(ot(r[1],r[0]),e[1])||0]}function fi(r){return isFinite(r)}function hV(r,e,t){var n=e.x==null?0:e.x,a=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,a=a*t.width+t.x,i=i*t.height+t.y,o=o*t.height+t.y),n=fi(n)?n:0,a=fi(a)?a:1,i=fi(i)?i:0,o=fi(o)?o:0;var s=r.createLinearGradient(n,i,a,o);return s}function fV(r,e,t){var n=t.width,a=t.height,i=Math.min(n,a),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*a+t.y,l=l*i),o=fi(o)?o:.5,s=fi(s)?s:.5,l=l>=0&&fi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function od(r,e,t){for(var n=e.type==="radial"?fV(r,e,t):hV(r,e,t),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function cV(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function Bh(r){return parseInt(r,10)}function wo(r,e,t){var n=["width","height"][e],a=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[a]||Bh(s[n])||Bh(r.style[n]))-(Bh(s[i])||0)-(Bh(s[o])||0)|0}function vV(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Ct(r)?[r]:z(r)?r:null}function sd(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&vV(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=G(t,function(i){return i/a}),n/=a)}return[t,n]}var pV=new jr(!0);function zh(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function nb(r){return typeof r=="string"&&r!=="none"}function Gh(r){var e=r.fill;return e!=null&&e!=="none"}function ab(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function ib(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function ld(r,e,t){var n=Bv(e.image,e.__image,t);if(Hu(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*fu),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function dV(r,e,t,n){var a,i=zh(t),o=Gh(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var h=e.path||pV,f=e.__dirty;if(!n){var c=t.fill,v=t.stroke,p=o&&!!c.colorStops,d=i&&!!v.colorStops,g=o&&!!c.image,y=i&&!!v.image,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0;(p||d)&&(b=e.getBoundingRect()),p&&(m=f?od(r,c,b):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=f?od(r,v,b):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=f||!e.__canvasFillPattern?ld(r,c,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(x=f||!e.__canvasStrokePattern?ld(r,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(x?r.strokeStyle=x:i=!1)}var w=e.getGlobalScale();h.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(a=sd(e),T=a[0],C=a[1]);var D=!0;(u||f&ss)&&(h.setDPR(r.dpr),l?h.setContext(null):(h.setContext(r),D=!1),h.reset(),e.buildPath(h,e.shape,n),h.toStatic(),e.pathUpdated()),D&&h.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(t.strokeFirst?(i&&ib(r,t),o&&ab(r,t)):(o&&ab(r,t),i&&ib(r,t))),T&&r.setLineDash([])}function gV(r,e,t){var n=e.__image=Bv(t.image,e.__image,e,e.onload);if(!(!n||!Hu(n))){var a=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,h=t.sy||0;r.drawImage(n,u,h,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,h=t.sy,f=o-u,c=s-h;r.drawImage(n,u,h,f,c,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function yV(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Vn,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=sd(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(zh(t)&&r.strokeText(a,t.x,t.y),Gh(t)&&r.fillText(a,t.x,t.y)):(Gh(t)&&r.fillText(a,t.x,t.y),zh(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var ob=["shadowBlur","shadowOffsetX","shadowOffsetY"],sb=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function lb(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){Ye(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?za.opacity:o}(n||e.blend!==t.blend)&&(i||(Ye(r,a),i=!0),r.globalCompositeOperation=e.blend||za.blend);for(var s=0;s<ob.length;s++){var l=ob[s];(n||e[l]!==t[l])&&(i||(Ye(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(Ye(r,a),i=!0),r.shadowColor=e.shadowColor||za.shadowColor),i}function ub(r,e,t,n,a){var i=tl(e,a.inHover),o=n?null:t&&tl(t,a.inHover)||{};if(i===o)return!1;var s=lb(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(Ye(r,a),s=!0),nb(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(Ye(r,a),s=!0),nb(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(Ye(r,a),s=!0),r.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(Ye(r,a),s=!0),r.lineWidth=u)}for(var h=0;h<sb.length;h++){var f=sb[h],c=f[0];(n||i[c]!==o[c])&&(s||(Ye(r,a),s=!0),r[c]=i[c]||f[1])}return s}function mV(r,e,t,n,a){return lb(r,tl(e,a.inHover),t&&tl(t,a.inHover),n,a)}function hb(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function _V(r,e,t){for(var n=!1,a=0;a<r.length;a++){var i=r[a];n=n||i.isZeroArea(),hb(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=n}function SV(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var fb=1,cb=2,vb=3,pb=4;function xV(r){var e=Gh(r),t=zh(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function Ye(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function tl(r,e){return e&&r.__hoverStyle||r.style}function db(r,e){ci(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function ci(r,e,t,n){var a=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=-2,e.__isRendered=!1;return}var i=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||cV(i,o))&&(o&&o.length&&(Ye(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(Ye(r,t),r.save(),_V(i,r,t),s=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var h=e instanceof _t&&e.autoBatch&&xV(e.style);s||SV(a,u.transform)?(Ye(r,t),hb(r,e)):h||Ye(r,t);var f=tl(e,t.inHover);e instanceof _t?(t.lastDrawType!==fb&&(l=!0,t.lastDrawType=fb),ub(r,e,u,l,t),(!h||!t.batchFill&&!t.batchStroke)&&r.beginPath(),dV(r,e,f,h),h&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Ki?(t.lastDrawType!==vb&&(l=!0,t.lastDrawType=vb),ub(r,e,u,l,t),yV(r,e,f)):e instanceof ge?(t.lastDrawType!==cb&&(l=!0,t.lastDrawType=cb),mV(r,e,u,l,t),gV(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==pb&&(l=!0,t.lastDrawType=pb),bV(r,e,t)),h&&n&&Ye(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function bV(r,e,t){var n=e.getDisplayables(),a=e.getTemporalDisplayables();r.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),ci(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,h=a.length;u<h;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),ci(r,l,i,u===h-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var ud=new eV,gb=new hs(100),yb=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function To(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&ud.delete(r);var i=ud.get(r);if(i)return i;var o=rt(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=a?1:1/t,ud.set(r,s),r.dirty=!1,s;function l(u){for(var h=[t],f=!0,c=0;c<yb.length;++c){var v=o[yb[c]];if(v!=null&&!z(v)&&!U(v)&&!Ct(v)&&typeof v!="boolean"){f=!1;break}h.push(v)}var p;if(f){p=h.join(",")+(a?"-svg":"");var d=gb.get(p);d&&(a?u.svgElement=d:u.image=d)}var g=_b(o.dashArrayX),y=wV(o.dashArrayY),m=mb(o.symbol),_=TV(g),S=Sb(y),x=!a&&Bn.createCanvas(),b=a&&{tag:"g",attrs:{},key:"dcl",children:[]},w=C(),T;x&&(x.width=w.width*t,x.height=w.height*t,T=x.getContext("2d")),D(),f&&gb.put(p,x||b),u.image=x,u.svgElement=b,u.svgWidth=w.width,u.svgHeight=w.height;function C(){for(var M=1,I=0,L=_.length;I<L;++I)M=k_(M,_[I]);for(var E=1,I=0,L=m.length;I<L;++I)E=k_(E,m[I].length);M*=E;var P=S*_.length*m.length;if(process.env.NODE_ENV!=="production"){var k=function(N){console.warn("Calculated decal size is greater than "+N+" due to decal option settings so "+N+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+N+" to be larger to avoid incontinuity.")};M>o.maxTileWidth&&k("maxTileWidth"),P>o.maxTileHeight&&k("maxTileHeight")}return{width:Math.max(1,Math.min(M,o.maxTileWidth)),height:Math.max(1,Math.min(P,o.maxTileHeight))}}function D(){T&&(T.clearRect(0,0,x.width,x.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,x.width,x.height)));for(var M=0,I=0;I<y.length;++I)M+=y[I];if(M<=0)return;for(var L=-S,E=0,P=0,k=0;L<w.height;){if(E%2===0){for(var N=P/2%m.length,R=0,V=0,F=0;R<w.width*2;){for(var H=0,I=0;I<g[k].length;++I)H+=g[k][I];if(H<=0)break;if(V%2===0){var $=(1-o.symbolSize)*.5,Q=R+g[k][V]*$,et=L+y[E]*$,lt=g[k][V]*o.symbolSize,kt=y[E]*o.symbolSize,jt=F/2%m[N].length;pt(Q,et,lt,kt,m[N][jt])}R+=g[k][V],++F,++V,V===g[k].length&&(V=0)}++k,k===g.length&&(k=0)}L+=y[E],++P,++E,E===y.length&&(E=0)}function pt(nt,yt,K,ut,Ht){var Et=a?1:t,Vt=ie(Ht,nt*Et,yt*Et,K*Et,ut*Et,o.color,o.symbolKeepAspect);if(a){var Zt=n.painter.renderOneToVNode(Vt);Zt&&b.children.push(Zt)}else db(T,Vt)}}}}function mb(r){if(!r||r.length===0)return[["rect"]];if(U(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!U(r[t])){e=!1;break}if(e)return mb([r]);for(var n=[],t=0;t<r.length;++t)U(r[t])?n.push([r[t]]):n.push(r[t]);return n}function _b(r){if(!r||r.length===0)return[[0,0]];if(Ct(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!Ct(r[n])){t=!1;break}if(t)return _b([r]);for(var a=[],n=0;n<r.length;++n)if(Ct(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=G(r[n],function(s){return Math.ceil(s)});e.length%2===1?a.push(e.concat(e)):a.push(e)}return a}function wV(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(Ct(r)){var e=Math.ceil(r);return[e,e]}var t=G(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function TV(r){return G(r,function(e){return Sb(e)})}function Sb(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function CV(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=To(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=To(a,e)}}})}var kr=new nr,Fh={};function DV(r,e){process.env.NODE_ENV!=="production"&&Fh[r]&&me("Already has an implementation of "+r+"."),Fh[r]=e}function AV(r){return process.env.NODE_ENV!=="production"&&(Fh[r]||me("Implementation of "+r+" doesn't exists.")),Fh[r]}var MV=1,IV=800,LV=900,EV=1e3,PV=2e3,kV=5e3,xb=1e3,RV=1100,hd=2e3,bb=3e3,NV=4e3,Hh=4500,OV=4600,VV=5e3,BV=6e3,wb=7e3,zV={PROCESSOR:{FILTER:EV,SERIES_FILTER:IV,STATISTIC:kV},VISUAL:{LAYOUT:xb,PROGRESSIVE_LAYOUT:RV,GLOBAL:hd,CHART:bb,POST_CHART_LAYOUT:OV,COMPONENT:NV,BRUSH:VV,CHART_ITEM:Hh,ARIA:BV,DECAL:wb}},Me="__flagInMainProcess",Ze="__pendingUpdate",fd="__needsUpdateStatus",Tb=/^[a-zA-Z0-9_]+$/,cd="__connectUpdateStatus",Cb=0,GV=1,FV=2;function Db(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){Je(this.id);return}return Mb(this,r,e)}}function Ab(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Mb(this,r,e)}}function Mb(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),nr.prototype[e].apply(r,t)}var Ib=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(nr),Lb=Ib.prototype;Lb.on=Ab("on"),Lb.off=Ab("off");var Co,vd,Wh,ia,pd,dd,gd,el,rl,Eb,Pb,yd,kb,$h,Rb,Nb,gr,Ob,Vb=function(r){O(e,r);function e(t,n,a){var i=r.call(this,new qO)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},U(n)&&(n=Bb[n]),i._dom=t;var o="canvas",s="auto",l=!1;if(process.env.NODE_ENV!=="production"){var u=mt.hasGlobalWindow?window:global;u&&(o=ot(u.__ECHARTS__DEFAULT__RENDERER__,o),s=ot(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=ot(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}a.ssr&&EP(function(v){var p=st(v),d=p.dataIndex;if(d!=null){var g=q();return g.set("series_index",p.seriesIndex),g.set("data_index",d),p.ssrType&&g.set("ssr_type",p.ssrType),g}});var h=i._zr=T_(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:ot(a.useDirtyRect,l),useCoarsePointer:ot(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=nd(Z(h.flush,h),17),n=at(n),n&&JS(n,!0),i._theme=n,i._locale=aN(a.locale||pS),i._coordSysMgr=new po;var f=i._api=Rb(i);function c(v,p){return v.__prio-p.__prio}return yu(Yh,c),yu(_d,c),i._scheduler=new Yx(i,f,_d,Yh),i._messageCenter=new Ib,i._initEvents(),i.resize=Z(i.resize,i),h.animation.on("frame",i._onframe,i),Eb(h,i),Pb(h,i),uu(i),i}return e.prototype._onframe=function(){if(!this._disposed){Ob(this);var t=this._scheduler;if(this[Ze]){var n=this[Ze].silent;this[Me]=!0;try{Co(this),ia.update.call(this,null,this[Ze].updateParams)}catch(l){throw this[Me]=!1,this[Ze]=null,l}this._zr.flush(),this[Me]=!1,this[Ze]=null,el.call(this,n),rl.call(this,n)}else if(t.unfinished){var a=MV,i=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),dd(this,i),t.performVisualTasks(i),$h(this,this._model,o,"remain",{}),a-=+new Date-s}while(a>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(this[Me]){process.env.NODE_ENV!=="production"&&me("`setOption` should not be called during main process.");return}if(this._disposed){Je(this.id);return}var i,o,s;if(J(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Me]=!0,!this._model||n){var l=new EN(this._api),u=this._theme,h=this._model=new Fp;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Sd);var f={seriesTransition:s,optionChanged:!0};if(a)this[Ze]={silent:i,updateParams:f},this[Me]=!1,this.getZr().wakeUp();else{try{Co(this),ia.update.call(this,null,f)}catch(c){throw this[Ze]=null,this[Me]=!1,c}this._ssr||this._zr.flush(),this[Ze]=null,this[Me]=!1,el.call(this,i),rl.call(this,i)}},e.prototype.setTheme=function(){Mr("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||mt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return process.env.NODE_ENV!=="production"&&re("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(mt.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return A(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){Je(this.id);return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;A(n,function(l){a.eachComponent({mainType:l},function(u){var h=o._componentsMap[u.__viewId];h.group.ignore||(i.push(h),h.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return A(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){Je(this.id);return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(zb[a]){var l=s,u=s,h=-s,f=-s,c=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();A(al,function(_,S){if(_.group===a){var x=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(at(t)),b=_.getDom().getBoundingClientRect();l=i(b.left,l),u=i(b.top,u),h=o(b.right,h),f=o(b.bottom,f),c.push({dom:x,left:b.left,top:b.top})}}),l*=v,u*=v,h*=v,f*=v;var p=h-l,d=f-u,g=Bn.createCanvas(),y=T_(g,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:d}),n){var m="";return A(c,function(_){var S=_.left-l,x=_.top-u;m+='<g transform="translate('+S+","+x+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new wt({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),A(c,function(_){var S=new ge({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return pd(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return pd(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){Je(this.id);return}var a=this._model,i,o=bs(a,t);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var h=u.coordinateSystem;if(h&&h.containPoint)i=i||!!h.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint?i=i||f.containPoint(n,u):process.env.NODE_ENV!=="production"&&Xt(l+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Xt(l+": containPoint is not supported")},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=bs(a,t,{defaultMainType:"series"}),o=i.seriesModel;process.env.NODE_ENV!=="production"&&(o||Xt("There is no specified series model"));var s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?id(s,l,n):Js(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;A(HV,function(n){var a=function(i){var o=t.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&ui(s,function(p){var d=st(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=B({},d.eventData),!0},!0),l){var h=l.componentType,f=l.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",f=l.seriesIndex);var c=h&&f!=null&&o.getComponent(h,f),v=c&&t[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];process.env.NODE_ENV!=="production"&&!u&&!(c&&v)&&Xt("model or view can not be found by params"),l.event=i,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},t.trigger(n,l)}};a.zrEventfulCallAtLast=!0,t._zr.on(n,a,t)}),A(nl,function(n,a){t._messageCenter.on(a,function(i){this.trigger(a,i)},t)}),A(["selectchanged"],function(n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),QO(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Je(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Je(this.id);return}this._disposed=!0;var t=this.getDom();t&&W_(this.getDom(),bd,"");var n=this,a=n._api,i=n._model;A(n._componentsViews,function(o){o.dispose(i,a)}),A(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete al[n.id]},e.prototype.resize=function(t){if(this[Me]){process.env.NODE_ENV!=="production"&&me("`resize` should not be called during main process.");return}if(this._disposed){Je(this.id);return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[Ze]&&(i==null&&(i=this[Ze].silent),a=!0,this[Ze]=null),this[Me]=!0;try{a&&Co(this),ia.update.call(this,{type:"resize",animation:B({duration:0},t&&t.animation)})}catch(o){throw this[Me]=!1,o}this[Me]=!1,el.call(this,i),rl.call(this,i)}},e.prototype.showLoading=function(t,n){if(this._disposed){Je(this.id);return}if(J(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!xd[t]){process.env.NODE_ENV!=="production"&&Xt("Loading effects "+t+" not exists.");return}var a=xd[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)},e.prototype.hideLoading=function(){if(this._disposed){Je(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=B({},t);return n.type=nl[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){Je(this.id);return}if(J(n)||(n={silent:!!n}),!!Uh[t.type]&&this._model){if(this[Me]){this._pendingActions.push(t);return}var a=n.silent;gd.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&mt.browser.weChat&&this._throttledZrFlush(),el.call(this,a),rl.call(this,a)}},e.prototype.updateLabelLayout=function(){kr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){Je(this.id);return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&tt(t.data&&i),i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Co=function(f){var c=f._scheduler;c.restorePipelines(f._model),c.prepareStageTasks(),vd(f,!0),vd(f,!1),c.plan()},vd=function(f,c){for(var v=f._model,p=f._scheduler,d=c?f._componentsViews:f._chartsViews,g=c?f._componentsMap:f._chartsMap,y=f._zr,m=f._api,_=0;_<d.length;_++)d[_].__alive=!1;c?v.eachComponent(function(b,w){b!=="series"&&S(w)}):v.eachSeries(S);function S(b){var w=b.__requireNewView;b.__requireNewView=!1;var T="_ec_"+b.id+"_"+b.type,C=!w&&g[T];if(!C){var D=Zr(b.type),M=c?Yt.getClass(D.main,D.sub):Rt.getClass(D.sub);process.env.NODE_ENV!=="production"&&tt(M,D.sub+" does not exist."),C=new M,C.init(v,m),g[T]=C,d.push(C),y.add(C.group)}b.__viewId=C.__id=T,C.__alive=!0,C.__model=b,C.group.__ecComponentInfo={mainType:b.mainType,index:b.componentIndex},!c&&p.prepareView(C,b,v,m)}for(var _=0;_<d.length;){var x=d[_];x.__alive?_++:(!c&&x.renderTask.dispose(),y.remove(x.group),x.dispose(v,m),d.splice(_,1),g[x.__id]===x&&delete g[x.__id],x.__id=x.group.__ecComponentInfo=null)}},Wh=function(f,c,v,p,d){var g=f._model;if(g.setUpdatePayload(v),!p){A([].concat(f._componentsViews).concat(f._chartsViews),x);return}var y={};y[p+"Id"]=v[p+"Id"],y[p+"Index"]=v[p+"Index"],y[p+"Name"]=v[p+"Name"];var m={mainType:p,query:y};d&&(m.subType=d);var _=v.excludeSeriesId,S;_!=null&&(S=q(),A(Pt(_),function(b){var w=oe(b,null);w!=null&&S.set(w,!0)})),g&&g.eachComponent(m,function(b){var w=S&&S.get(b.id)!=null;if(!w)if(R1(v))if(b instanceof Gt)v.type===Za&&!v.notBlur&&!b.get(["emphasis","disabled"])&&nR(b,v,f._api);else{var T=lp(b.mainType,b.componentIndex,v.name,f._api),C=T.focusSelf,D=T.dispatchers;v.type===Za&&C&&!v.notBlur&&sp(b.mainType,b.componentIndex,f._api),D&&A(D,function(M){v.type===Za?wn(M):Tn(M)})}else hp(v)&&b instanceof Gt&&(oR(b,v,f._api),P1(b),gr(f))},f),g&&g.eachComponent(m,function(b){var w=S&&S.get(b.id)!=null;w||x(f[p==="series"?"_chartsMap":"_componentsMap"][b.__viewId])},f);function x(b){b&&b.__alive&&b[c]&&b[c](b.__model,g,f._api,v)}},ia={prepareAndUpdate:function(f){Co(this),ia.update.call(this,f,{optionChanged:f.newOption!=null})},update:function(f,c){var v=this._model,p=this._api,d=this._zr,g=this._coordSysMgr,y=this._scheduler;if(v){v.setUpdatePayload(f),y.restoreData(v,f),y.performSeriesTasks(v),g.create(v,p),y.performDataProcessorTasks(v,f),dd(this,v),g.update(v,p),t(v),y.performVisualTasks(v,f),yd(this,v,p,f,c);var m=v.get("backgroundColor")||"transparent",_=v.get("darkMode");d.setBackgroundColor(m),_!=null&&_!=="auto"&&d.setDarkMode(_),kr.trigger("afterupdate",v,p)}},updateTransform:function(f){var c=this,v=this._model,p=this._api;if(v){v.setUpdatePayload(f);var d=[];v.eachComponent(function(y,m){if(y!=="series"){var _=c.getViewOfComponentModel(m);if(_&&_.__alive)if(_.updateTransform){var S=_.updateTransform(m,v,p,f);S&&S.update&&d.push(_)}else d.push(_)}});var g=q();v.eachSeries(function(y){var m=c._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,v,p,f);_&&_.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),t(v),this._scheduler.performVisualTasks(v,f,{setDirty:!0,dirtyMap:g}),$h(this,v,p,f,{},g),kr.trigger("afterupdate",v,p)}},updateView:function(f){var c=this._model;c&&(c.setUpdatePayload(f),Rt.markUpdateMethod(f,"updateView"),t(c),this._scheduler.performVisualTasks(c,f,{setDirty:!0}),yd(this,c,this._api,f,{}),kr.trigger("afterupdate",c,this._api))},updateVisual:function(f){var c=this,v=this._model;v&&(v.setUpdatePayload(f),v.eachSeries(function(p){p.getData().clearAllVisual()}),Rt.markUpdateMethod(f,"updateVisual"),t(v),this._scheduler.performVisualTasks(v,f,{visualType:"visual",setDirty:!0}),v.eachComponent(function(p,d){if(p!=="series"){var g=c.getViewOfComponentModel(d);g&&g.__alive&&g.updateVisual(d,v,c._api,f)}}),v.eachSeries(function(p){var d=c._chartsMap[p.__viewId];d.updateVisual(p,v,c._api,f)}),kr.trigger("afterupdate",v,this._api))},updateLayout:function(f){ia.update.call(this,f)}},pd=function(f,c,v,p){if(f._disposed){Je(f.id);return}for(var d=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,m=bs(d,v),_=0;_<g.length;_++){var S=g[_];if(S[c]&&(y=S[c](d,m,p))!=null)return y}process.env.NODE_ENV!=="production"&&Xt("No coordinate system that supports "+c+" found by the given finder.")},dd=function(f,c){var v=f._chartsMap,p=f._scheduler;c.eachSeries(function(d){p.updateStreamModes(d,v[d.__viewId])})},gd=function(f,c){var v=this,p=this.getModel(),d=f.type,g=f.escapeConnect,y=Uh[d],m=y.actionInfo,_=(m.update||"update").split(":"),S=_.pop(),x=_[0]!=null&&Zr(_[0]);this[Me]=!0;var b=[f],w=!1;f.batch&&(w=!0,b=G(f.batch,function(E){return E=rt(B({},E),f),E.batch=null,E}));var T=[],C,D=hp(f),M=R1(f);if(M&&E1(this._api),A(b,function(E){if(C=y.action(E,v._model,v._api),C=C||B({},E),C.type=m.event||C.type,T.push(C),M){var P=Rv(f),k=P.queryOptionMap,N=P.mainTypeSpecified,R=N?k.keys()[0]:"series";Wh(v,S,E,R),gr(v)}else D?(Wh(v,S,E,"series"),gr(v)):x&&Wh(v,S,E,x.main,x.sub)}),S!=="none"&&!M&&!D&&!x)try{this[Ze]?(Co(this),ia.update.call(this,f),this[Ze]=null):ia[S].call(this,f)}catch(E){throw this[Me]=!1,E}if(w?C={type:m.event||d,escapeConnect:g,batch:T}:C=T[0],this[Me]=!1,!c){var I=this._messageCenter;if(I.trigger(C.type,C),D){var L={type:"selectchanged",escapeConnect:g,selected:sR(p),isFromClick:f.isFromClick||!1,fromAction:f.type,fromActionPayload:f};I.trigger(L.type,L)}}},el=function(f){for(var c=this._pendingActions;c.length;){var v=c.shift();gd.call(this,v,f)}},rl=function(f){!f&&this.trigger("updated")},Eb=function(f,c){f.on("rendered",function(v){c.trigger("rendered",v),f.animation.isFinished()&&!c[Ze]&&!c._scheduler.unfinished&&!c._pendingActions.length&&c.trigger("finished")})},Pb=function(f,c){f.on("mouseover",function(v){var p=v.target,d=ui(p,jn);d&&(aR(d,v,c._api),gr(c))}).on("mouseout",function(v){var p=v.target,d=ui(p,jn);d&&(iR(d,v,c._api),gr(c))}).on("click",function(v){var p=v.target,d=ui(p,function(m){return st(m).dataIndex!=null},!0);if(d){var g=d.selected?"unselect":"select",y=st(d);c._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function t(f){f.clearColorPalette(),f.eachSeries(function(c){c.clearColorPalette()})}function n(f){var c=[],v=[],p=!1;if(f.eachComponent(function(m,_){var S=_.get("zlevel")||0,x=_.get("z")||0,b=_.getZLevelKey();p=p||!!b,(m==="series"?v:c).push({zlevel:S,z:x,idx:_.componentIndex,type:m,key:b})}),p){var d=c.concat(v),g,y;yu(d,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),A(d,function(m){var _=f.getComponent(m.type,m.idx),S=m.zlevel,x=m.key;g!=null&&(S=Math.max(g,S)),x?(S===g&&x!==y&&S++,y=x):y&&(S===g&&S++,y=""),g=S,_.setZLevel(S)})}}yd=function(f,c,v,p,d){n(c),kb(f,c,v,p,d),A(f._chartsViews,function(g){g.__alive=!1}),$h(f,c,v,p,d),A(f._chartsViews,function(g){g.__alive||g.remove(c,v)})},kb=function(f,c,v,p,d,g){A(g||f._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,c,v,p),s(m,y),h(m,y)})},$h=function(f,c,v,p,d,g){var y=f._scheduler;d=B(d||{},{updatedSeries:c.getSeries()}),kr.trigger("series:beforeupdate",c,v,d);var m=!1;c.eachSeries(function(_){var S=f._chartsMap[_.__viewId];S.__alive=!0;var x=S.renderTask;y.updatePayload(x,p),u(_,S),g&&g.get(_.uid)&&x.dirty(),x.perform(y.getPerformArgs(x))&&(m=!0),S.group.silent=!!_.get("silent"),o(_,S),P1(_)}),y.unfinished=m||y.unfinished,kr.trigger("series:layoutlabels",c,v,d),kr.trigger("series:transition",c,v,d),c.eachSeries(function(_){var S=f._chartsMap[_.__viewId];s(_,S),h(_,S)}),i(f,c),kr.trigger("series:afterupdate",c,v,d)},gr=function(f){f[fd]=!0,f.getZr().wakeUp()},Ob=function(f){f[fd]&&(f.getZr().storage.traverse(function(c){no(c)||a(c)}),f[fd]=!1)};function a(f){for(var c=[],v=f.currentStates,p=0;p<v.length;p++){var d=v[p];d==="emphasis"||d==="blur"||d==="select"||c.push(d)}f.selected&&f.states.select&&c.push("select"),f.hoverState===qu&&f.states.emphasis?c.push("emphasis"):f.hoverState===Ds&&f.states.blur&&c.push("blur"),f.useStates(c)}function i(f,c){var v=f._zr,p=v.storage,d=0;p.traverse(function(g){g.isGroup||d++}),d>c.get("hoverLayerThreshold")&&!mt.node&&!mt.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(f,c){var v=f.get("blendMode")||null;c.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function s(f,c){if(!f.preventAutoZ){var v=f.get("z")||0,p=f.get("zlevel")||0;c.eachRendered(function(d){return l(d,v,p,-1/0),!0})}}function l(f,c,v,p){var d=f.getTextContent(),g=f.getTextGuideLine(),y=f.isGroup;if(y)for(var m=f.childrenRef(),_=0;_<m.length;_++)p=Math.max(l(m[_],c,v,p),p);else f.z=c,f.zlevel=v,p=Math.max(f.z2,p);if(d&&(d.z=c,d.zlevel=v,isFinite(p)&&(d.z2=p+2)),g){var S=f.textGuideLineConfig;g.z=c,g.zlevel=v,isFinite(p)&&(g.z2=p+(S&&S.showAbove?1:-1))}return p}function u(f,c){c.eachRendered(function(v){if(!no(v)){var p=v.getTextContent(),d=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function h(f,c){var v=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),d=v.get("duration"),g=d>0?{duration:d,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(y){if(y.states&&y.states.emphasis){if(no(y))return;if(y instanceof _t&&cR(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&a(y)}})}Rb=function(f){return new(function(c){O(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return f._model.getComponent(d.mainType,d.index);p=p.parent}},v.prototype.enterEmphasis=function(p,d){wn(p,d),gr(f)},v.prototype.leaveEmphasis=function(p,d){Tn(p,d),gr(f)},v.prototype.enterBlur=function(p){A1(p),gr(f)},v.prototype.leaveBlur=function(p){ip(p),gr(f)},v.prototype.enterSelect=function(p){M1(p),gr(f)},v.prototype.leaveSelect=function(p){I1(p),gr(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},v}(YS))(f)},Nb=function(f){function c(v,p){for(var d=0;d<v.length;d++){var g=v[d];g[cd]=p}}A(nl,function(v,p){f._messageCenter.on(p,function(d){if(zb[f.group]&&f[cd]!==Cb){if(d&&d.escapeConnect)return;var g=f.makeActionFromEvent(d),y=[];A(al,function(m){m!==f&&m.group===f.group&&y.push(m)}),c(y,Cb),A(y,function(m){m[cd]!==GV&&m.dispatchAction(g)}),c(y,FV)}})})}}(),e}(nr),md=Vb.prototype;md.on=Db("on"),md.off=Db("off"),md.one=function(r,e,t){var n=this;Mr("ECharts#one is deprecated.");function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),n.off(r,a)}this.on.call(this,r,a,t)};var HV=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Je(r){process.env.NODE_ENV!=="production"&&Xt("Instance "+r+" has been disposed")}var Uh={},nl={},_d=[],Sd=[],Yh=[],Bb={},xd={},al={},zb={},WV=+new Date-0,bd="_echarts_instance_";function $V(r,e,t){{if(process.env.NODE_ENV!=="production"&&!r)throw new Error("Initialize failed: invalid dom.");var n=UV(r);if(n)return process.env.NODE_ENV!=="production"&&Xt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&ba(r)&&r.nodeName.toUpperCase()!=="CANVAS"&&(!r.clientWidth||!r.clientHeight)&&Xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var a=new Vb(r,e,t);return a.id="ec_"+WV++,al[a.id]=a,W_(r,bd,a.id),Nb(a),kr.trigger("afterinit",a),a}function UV(r){return al[tk(r,bd)]}function Gb(r,e){Bb[r]=e}function Fb(r){dt(Sd,r)<0&&Sd.push(r)}function Hb(r,e){Td(_d,r,e,PV)}function YV(r){wd("afterinit",r)}function ZV(r){wd("afterupdate",r)}function wd(r,e){kr.on(r,e)}function en(r,e,t){j(e)&&(t=e,e="");var n=J(r)?r.type:[r,r={event:e}][0];r.event=(r.event||n).toLowerCase(),e=r.event,!nl[e]&&(tt(Tb.test(n)&&Tb.test(e)),Uh[n]||(Uh[n]={action:t,actionInfo:r}),nl[e]=n)}function XV(r,e){po.register(r,e)}function qV(r,e){Td(Yh,r,e,xb,"layout")}function vi(r,e){Td(Yh,r,e,bb,"visual")}var Wb=[];function Td(r,e,t,n,a){if((j(e)||J(e))&&(t=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");A(r,function(o){tt(o.__raw!==t)})}if(!(dt(Wb,t)>=0)){Wb.push(t);var i=Yx.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function $b(r,e){xd[r]=e}function KV(r,e,t){var n=AV("registerMap");n&&n(r,e,t)}var jV=uO;vi(hd,NO),vi(Hh,OO),vi(Hh,VO),vi(hd,KO),vi(Hh,jO),vi(wb,CV),Fb(JS),Hb(LV,WN),$b("default",BO),en({type:Za,event:Za,update:Za},Qt),en({type:Ku,event:Ku,update:Ku},Qt),en({type:Ms,event:Ms,update:Ms},Qt),en({type:ju,event:ju,update:ju},Qt),en({type:Is,event:Is,update:Is},Qt),Gb("light",XO),Gb("dark",Jx);var Ub=[],QV={registerPreprocessor:Fb,registerProcessor:Hb,registerPostInit:YV,registerPostUpdate:ZV,registerUpdateLifecycle:wd,registerAction:en,registerCoordinateSystem:XV,registerLayout:qV,registerVisual:vi,registerTransform:jV,registerLoading:$b,registerMap:KV,registerImpl:DV,PRIORITY:zV,ComponentModel:St,ComponentView:Yt,SeriesModel:Gt,ChartView:Rt,registerComponentModel:function(r){St.registerClass(r)},registerComponentView:function(r){Yt.registerClass(r)},registerSeriesModel:function(r){Gt.registerClass(r)},registerChartView:function(r){Rt.registerClass(r)},registerSubTypeDefaulter:function(r,e){St.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){IP(r,e)}};function gt(r){if(z(r)){A(r,function(e){gt(e)});return}dt(Ub,r)>=0||(Ub.push(r),j(r)&&(r={install:r}),r.install(QV))}function il(r){return r==null?0:r.length||1}function Yb(r){return r}var Mn=function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||Yb,this._newKeyGetter=a||Yb,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=a[o],l=n[s],u=il(l);if(u>1){var h=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(h,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=n[l],h=a[l],f=il(u),c=il(h);if(f>1&&c===1)this._updateManyToOne&&this._updateManyToOne(h,u),a[l]=null;else if(f===1&&c>1)this._updateOneToMany&&this._updateOneToMany(h,u),a[l]=null;else if(f===1&&c===1)this._update&&this._update(h,u),a[l]=null;else if(f>1&&c>1)this._updateManyToMany&&this._updateManyToMany(h,u),a[l]=null;else if(f>1)for(var v=0;v<f;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var a=e[n],i=t[a],o=il(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);t[a]=null}},r.prototype._initIndexMap=function(e,t,n,a){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[a](e[o],o);if(i||(n[o]=s),!!t){var l=t[s],u=il(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}(),JV=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function tB(r,e){var t={},n=t.encode={},a=q(),i=[],o=[],s={};A(r.dimensions,function(c){var v=r.getDimensionInfo(c),p=v.coordDim;if(p){process.env.NODE_ENV!=="production"&&tt(Rp.get(p)==null);var d=v.coordDimIndex;Cd(n,p)[d]=c,v.isExtraCoord||(a.set(p,1),eB(v.type)&&(i[0]=c),Cd(s,p)[d]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(c)}Rp.each(function(g,y){var m=Cd(n,y),_=v.otherDims[y];_!=null&&_!==!1&&(m[_]=v.name)})});var l=[],u={};a.each(function(c,v){var p=n[v];u[v]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=G(l,function(c){return r.getDimensionInfo(c).storeDimIndex}),t.encodeFirstDimNotExtra=u;var h=n.label;h&&h.length&&(i=h.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,t.userOutput=new JV(s,e),t}function Cd(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function Zh(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function eB(r){return!(r==="ordinal"||r==="time")}var Xh=function(){function r(e){this.otherDims={},e!=null&&B(this,e)}return r}(),rB=bt(),nB={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Zb=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Kb(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return ot(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=nx(this.source),n=!jb(e),a="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,h=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,h=f.ordinalMeta,s++;else{var c=this.getSourceDimension(o);c&&(l=t?c.name:null,u=c.type)}i.push({property:l,type:u,ordinalMeta:h}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=nB[u]||"f",h&&(a+=h.uid),a+="$"}var v=this.source,p=[v.seriesLayoutBy,v.startIndex,a].join("$$");return{dimensions:i,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(t);o&&(a=o.name)}e.push(a)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function Xb(r){return r instanceof Zb}function qb(r){for(var e=q(),t=0;t<(r||[]).length;t++){var n=r[t],a=J(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,t)}return e}function Kb(r){var e=rB(r);return e.dimNameMap||(e.dimNameMap=qb(r.dimensionsDefine))}function jb(r){return r>30}var ol=J,oa=G,aB=typeof Int32Array>"u"?Array:Int32Array,iB="e\0\0",Qb=-1,oB=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],sB=["_approximateExtent"],Jb,qh,sl,Do,Dd,ll,Ad,ze=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;Xb(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},h=0;h<n.length;h++){var f=n[h],c=U(f)?new Xh({name:f}):f instanceof Xh?f:new Xh(f),v=c.name;c.type=c.type||"float",c.coordDim||(c.coordDim=v,c.coordDimIndex=0);var p=c.otherDims=c.otherDims||{};o.push(v),i[v]=c,u[v]!=null&&(l=!0),c.createInvertedIndices&&(s[v]=[]),p.itemName===0&&(this._nameDimIdx=h),p.itemId===0&&(this._idDimIdx=h),process.env.NODE_ENV!=="production"&&tt(a||c.storeDimIndex>=0),a&&(c.storeDimIndex=h)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var d=this._dimIdxToName=q();A(o,function(g){d.set(i[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var a=this._schema.getSourceDimension(t);if(a)return a.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(Ct(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&t==null)throw new Error("Unknown dimension "+e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var a=this,i;if(e instanceof Qp&&(i=e),!i){var o=this.dimensions,s=Up(e)||we(e)?new ox(e,o.length):e;i=new Qp;var l=oa(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=tB(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=a;s<i;s++){var l=s-a;this._nameList[s]=t[l],o&&Ad(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var a=this._dimInfos[t[n]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Dn&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===cr;if(l&&!a.pure)for(var u=[],h=e;h<t;h++){var f=a.getItem(h,u);if(!this.hasItemOption&&FP(f)&&(this.hasItemOption=!0),f){var c=f.name;i[h]==null&&c!=null&&(i[h]=oe(c,null));var v=f.id;o[h]==null&&v!=null&&(o[h]=oe(v,null))}}if(this._shouldMakeIdFromName())for(var h=e;h<t;h++)Ad(this,h);Jb(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){ol(e)?B(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=sl(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),a=this._store.getOrdinalMeta(e);return a?a.categories[n]:n},r.prototype.getId=function(e){return qh(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.get(a.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.getByRawIndex(a.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,a=this._store;return z(e)?a.getValues(oa(e,function(i){return n._getStoreDimIndex(i)}),t):a.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,a=t.length;n<a;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var a=n&&n[t];return a==null||isNaN(a)?Qb:a},r.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},r.prototype.each=function(e,t,n){j(e)&&(n=t,t=e,e=[]);var a=n||this,i=oa(Do(e),this._getStoreDimIndex,this);this._store.each(i,a?Z(t,a):t)},r.prototype.filterSelf=function(e,t,n){j(e)&&(n=t,t=e,e=[]);var a=n||this,i=oa(Do(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?Z(t,a):t),this},r.prototype.selectRange=function(e){var t=this,n={},a=xt(e);return A(a,function(i){var o=t._getStoreDimIndex(i);n[o]=e[i]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){j(e)&&(n=t,t=e,e=[]),n=n||this;var a=[];return this.each(e,function(){a.push(t&&t.apply(this,arguments))},n),a},r.prototype.map=function(e,t,n,a){var i=n||a||this,o=oa(Do(e),this._getStoreDimIndex,this),s=ll(this);return s._store=this._store.map(o,i?Z(t,i):t),s},r.prototype.modify=function(e,t,n,a){var i=this,o=n||a||this;process.env.NODE_ENV!=="production"&&A(Do(e),function(l){var u=i.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=oa(Do(e),this._getStoreDimIndex,this);this._store.modify(s,o?Z(t,o):t)},r.prototype.downSample=function(e,t,n,a){var i=ll(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.minmaxDownSample=function(e,t){var n=ll(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=ll(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new Lt(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Mn(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return qh(e,n)},function(n){return qh(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},ol(e)?B(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],a=n&&n[t];return a??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),z(i)?i=i.slice():ol(i)&&(i=B({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,ol(t)?B(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){ol(e)?B(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?B(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;tp(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){A(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:oa(this.dimensions,this._getDimInfo,this),this.hostModel)),Dd(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];j(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(Pc(arguments)))})},r.internalField=function(){Jb=function(e){var t=e._invertedIndicesMap;A(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new aB(o.categories.length);for(var l=0;l<n.length;l++)n[l]=Qb;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},sl=function(e,t,n){return oe(e._getCategory(t,n),null)},qh=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=sl(e,e._idDimIdx,t)),n==null&&(n=iB+t),n},Do=function(e){return z(e)||(e=e!=null?[e]:[]),e},ll=function(e){var t=new r(e._schema?e._schema:oa(e.dimensions,e._getDimInfo,e),e.hostModel);return Dd(t,e),t},Dd=function(e,t){A(oB.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,A(sB,function(n){e[n]=at(t[n])}),e._calculationInfo=B({},t._calculationInfo)},Ad=function(e,t){var n=e._nameList,a=e._idList,i=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=a[t];if(s==null&&i!=null&&(n[t]=s=sl(e,i,t)),l==null&&o!=null&&(a[t]=l=sl(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,h=u[s]=(u[s]||0)+1;l=s,h>1&&(l+="__ec__"+h),a[t]=l}}}(),r}();function ul(r,e){Up(r)||(r=Zp(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=q(),i=[],o=uB(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&jb(o),l=n===r.dimensionsDefine,u=l?Kb(r):qb(n),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(r,o));for(var f=q(h),c=new mx(o),v=0;v<c.length;v++)c[v]=-1;function p(C){var D=c[C];if(D<0){var M=n[C],I=J(M)?M:{name:M},L=new Xh,E=I.name;E!=null&&u.get(E)!=null&&(L.name=L.displayName=E),I.type!=null&&(L.type=I.type),I.displayName!=null&&(L.displayName=I.displayName);var P=i.length;return c[C]=P,L.storeDimIndex=C,i.push(L),L}return i[D]}if(!s)for(var v=0;v<o;v++)p(v);f.each(function(C,D){var M=Pt(C).slice();if(M.length===1&&!U(M[0])&&M[0]<0){f.set(D,!1);return}var I=f.set(D,[]);A(M,function(L,E){var P=U(L)?u.get(L):L;P!=null&&P<o&&(I[E]=P,g(p(P),D,E))})});var d=0;A(t,function(C){var D,M,I,L;if(U(C))D=C,L={};else{L=C,D=L.name;var E=L.ordinalMeta;L.ordinalMeta=null,L=B({},L),L.ordinalMeta=E,M=L.dimsDef,I=L.otherDims,L.name=L.coordDim=L.coordDimIndex=L.dimsDef=L.otherDims=null}var P=f.get(D);if(P!==!1){if(P=Pt(P),!P.length)for(var k=0;k<(M&&M.length||1);k++){for(;d<o&&p(d).coordDim!=null;)d++;d<o&&P.push(d++)}A(P,function(N,R){var V=p(N);if(l&&L.type!=null&&(V.type=L.type),g(rt(V,L),D,R),V.name==null&&M){var F=M[R];!J(F)&&(F={name:F}),V.name=V.displayName=F.name,V.defaultTooltip=F.defaultTooltip}I&&rt(V.otherDims,I)})}});function g(C,D,M){Rp.get(D)!=null?C.otherDims[D]=M:(C.coordDim=D,C.coordDimIndex=M,a.set(D,!0))}var y=e.generateCoord,m=e.generateCoordCount,_=m!=null;m=y?m||1:0;var S=y||"value";function x(C){C.name==null&&(C.name=C.coordDim)}if(s)A(i,function(C){x(C)}),i.sort(function(C,D){return C.storeDimIndex-D.storeDimIndex});else for(var b=0;b<o;b++){var w=p(b),T=w.coordDim;T==null&&(w.coordDim=hB(S,a,_),w.coordDimIndex=0,(!y||m<=0)&&(w.isExtraCoord=!0),m--),x(w),w.type==null&&(VS(r,b)===xe.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return lB(i),new Zb({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function lB(r){for(var e=q(),t=0;t<r.length;t++){var n=r[t],a=n.name,i=e.get(a)||0;i>0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function uB(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return A(e,function(i){var o;J(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function hB(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var fB=function(){function r(e){this.coordSysDims=[],this.axisMap=q(),this.categoryAxisMap=q(),this.coordSysName=e}return r}();function cB(r){var e=r.get("coordinateSystem"),t=new fB(e),n=vB[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var vB={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",ne).models[0],i=r.getReferringComponents("yAxis",ne).models[0];if(process.env.NODE_ENV!=="production"){if(!a)throw new Error('xAxis "'+ee(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!i)throw new Error('yAxis "'+ee(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),Ao(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),Ao(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",ne).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],t.set("single",a),Ao(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",ne).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!i)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Ao(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),Ao(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();A(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),h=o[l];t.set(h,u),Ao(u)&&(n.set(h,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Ao(r){return r.get("type")==="category"}function pB(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;dB(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,h,f,c;if(A(i,function(m,_){U(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!h&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(h=m))}),h&&!n&&!u&&(n=!0),h){f="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=h.coordDim,p=h.type,d=0;A(i,function(m){m.coordDim===v&&d++});var g={name:f,coordDim:v,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:c,coordDim:c,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,p),y.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:h&&h.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:f}}function dB(r){return!Xb(r.schema)}function sa(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function tw(r,e){return sa(r,e)?r.getCalculationInfo("stackResultDimension"):e}function gB(r,e){var t=r.get("coordinateSystem"),n=po.get(t),a;return e&&e.coordSysDims&&(a=G(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Zh(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function yB(r,e,t){var n,a;return t&&A(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function In(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=Zp(r)):(a=n.getSource(),i=a.sourceFormat===cr);var o=cB(e),s=gB(e,o),l=t.useEncodeDefaulter,u=j(l)?l:l?ht(OS,s,e):null,h={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=ul(a,h),c=yB(f.dimensions,t.createInvertedIndices,o),v=i?null:n.getSharedDataStore(f),p=pB(e,{schema:f,store:v}),d=new ze(f,e);d.setCalculationInfo(p);var g=c!=null&&mB(a)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(i?a:v,null,g),d}function mB(r){if(r.sourceFormat===cr){var e=_B(r.data||[]);return!z(Xi(e))}}function _B(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var rn=function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();Fu(rn);var SB=0,Md=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++SB}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&G(n,xB);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!U(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=q(this.categories))},r}();function xB(r){return J(r)&&r.value!=null?r.value:r+""}function bB(r){var e=Math.pow(10,zu(Math.abs(r))),t=Math.abs(r/e);return t===0||t===1||t===2||t===3||t===5}function Id(r){return r.type==="interval"||r.type==="log"}function wB(r,e,t,n){var a={},i=r[1]-r[0],o=a.interval=I_(i/e);t!=null&&o<t&&(o=a.interval=t),n!=null&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=ew(o),l=a.niceTickExtent=[Kt(Math.ceil(r[0]/o)*o,s),Kt(Math.floor(r[1]/o)*o,s)];return TB(l,r),a}function Ld(r){var e=Math.pow(10,zu(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Kt(t*e)}function ew(r){return Ur(r)+2}function rw(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function TB(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),rw(r,0,e),rw(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Kh(r,e){return r>=e[0]&&r<=e[1]}function jh(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Qh(r,e){return r*(e[1]-e[0])+e[0]}var Jh=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new Md({})),z(a)&&(a=new Md({categories:G(a,function(i){return J(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:U(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Kh(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),jh(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Qh(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,a=n[0];a<=n[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];a[o]=u,i[u]=o}for(var h=0;o<s;++o){for(;i[h]!=null;)h++;a.push(h),i[h]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(rn);rn.registerClass(Jh);var pi=Kt,Ln=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Kh(t,this._extent)},e.prototype.normalize=function(t){return jh(t,this._extent)},e.prototype.scale=function(t){return Qh(t,this._extent)},e.prototype.setExtent=function(t,n){var a=this._extent;isNaN(t)||(a[0]=parseFloat(t)),isNaN(n)||(a[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ew(t)},e.prototype.getTicks=function(t){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;a[0]<i[0]&&(t?s.push({value:pi(i[0]-n,o)}):s.push({value:a[0]}));for(var u=i[0];u<=i[1]&&(s.push({value:u}),u=pi(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var h=s.length?s[s.length-1].value:i[1];return a[1]>h&&(t?s.push({value:pi(h+n,o)}):s.push({value:a[1]})),s},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,h=[],f=s.value-l.value,c=f/t;u<t-1;){var v=pi(l.value+(u+1)*c);v>i[0]&&v<i[1]&&h.push(v),u++}a.push(h)}return a},e.prototype.getLabel=function(t,n){if(t==null)return"";var a=n&&n.precision;a==null?a=Ur(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=pi(t.value,a,!0);return AS(i)},e.prototype.calcNiceTicks=function(t,n,a){t=t||5;var i=this._extent,o=i[1]-i[0];if(isFinite(o)){o<0&&(o=-o,i.reverse());var s=wB(i,t,n,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var a=Math.abs(n[0]);t.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(n[0]=pi(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=pi(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e}(rn);rn.registerClass(Ln);var nw=typeof Float32Array<"u",CB=nw?Float32Array:Array;function nn(r){return z(r)?nw?new Float32Array(r):r:new CB(r)}var Ed="__ec_stack_";function aw(r){return r.get("stack")||Ed+r.seriesIndex}function Pd(r){return r.dim+r.index}function DB(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var a=t.getBandWidth(),i=0;i<r.count;i++)e.push(rt({bandWidth:a,axisKey:n,stackId:Ed+i},r));for(var o=sw(e),s=[],i=0;i<r.count;i++){var l=o[n][Ed+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function iw(r,e){var t=[];return e.eachSeriesByType(r,function(n){hw(n)&&t.push(n)}),t}function AB(r){var e={};A(r,function(l){var u=l.coordinateSystem,h=u.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var f=l.getData(),c=h.dim+"_"+h.index,v=f.getDimensionIndex(f.mapDimension(h.dim)),p=f.getStore(),d=0,g=p.count();d<g;++d){var y=p.get(v,d);e[c]?e[c].push(y):e[c]=[y]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(l,u){return l-u});for(var i=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function ow(r){var e=AB(r),t=[];return A(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],h=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),c=Math.abs(f[1]-f[0]);s=u?h/c*u:h}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=W(n.get("barWidth"),s),d=W(n.get("barMaxWidth"),s),g=W(n.get("barMinWidth")||(fw(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Pd(i),stackId:aw(n)})}),sw(t)}function sw(r){var e={};A(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=n.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var c=n.barMinWidth;c&&(l[u].minWidth=c);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return A(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=xt(i).length;s=Math.max(35-l*4,15)+"%"}var u=W(s,o),h=W(n.gap,1),f=n.remainedWidth,c=n.autoWidthCount,v=(f-u)/(c+(c-1)*h);v=Math.max(v,0),A(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,f-=S+h*S,c--}else{var S=v;m&&m<S&&(S=Math.min(m,f)),_&&_>S&&(S=_),S!==v&&(y.width=S,f-=S+h*S,c--)}}),v=(f-u)/(c+(c-1)*h),v=Math.max(v,0);var p=0,d;A(i,function(y,m){y.width||(y.width=v),d=y,p+=y.width*(1+h)}),d&&(p-=d.width*h);var g=-p/2;A(i,function(y,m){t[a][m]=t[a][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+h)})}),t}function MB(r,e,t){if(r&&e){var n=r[Pd(e)];return n}}function lw(r,e){var t=iw(r,e),n=ow(t);A(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=aw(a),u=n[Pd(s)][l],h=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:h,size:f})})}function uw(r){return{seriesType:r,plan:_o(),reset:function(e){if(hw(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),h=t.getCalculationInfo("stackResultDimension"),f=sa(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),c=i.isHorizontal(),v=IB(a,i),p=fw(e),d=e.get("barMinHeight")||0,g=h&&t.getDimensionIndex(h),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var x=_.count,b=p&&nn(x*3),w=p&&l&&nn(x*3),T=p&&nn(x),C=n.master.getRect(),D=c?C.width:C.height,M,I=S.getStore(),L=0;(M=_.next())!=null;){var E=I.get(f?g:o,M),P=I.get(s,M),k=v,N=void 0;f&&(N=+E-I.get(o,M));var R=void 0,V=void 0,F=void 0,H=void 0;if(c){var $=n.dataToPoint([E,P]);if(f){var Q=n.dataToPoint([N,P]);k=Q[0]}R=k,V=$[1]+m,F=$[0]-k,H=y,Math.abs(F)<d&&(F=(F<0?-1:1)*d)}else{var $=n.dataToPoint([P,E]);if(f){var Q=n.dataToPoint([P,N]);k=Q[1]}R=$[0]+m,V=k,F=y,H=$[1]-k,Math.abs(H)<d&&(H=(H<=0?-1:1)*d)}p?(b[L]=R,b[L+1]=V,b[L+2]=c?F:H,w&&(w[L]=c?C.x:R,w[L+1]=c?V:C.y,w[L+2]=D),T[M]=M):S.setItemLayout(M,{x:R,y:V,width:F,height:H}),L+=3}p&&S.setLayout({largePoints:b,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:c})}}}}}}function hw(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function fw(r){return r.pipelineContext&&r.pipelineContext.large}function IB(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var LB=function(r,e,t,n){for(;t<n;){var a=t+n>>>1;r[a][1]<e?t=a+1:n=a}return t},kd=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return mh(t.value,yS[sN(lo(this._minLevelUnit))]||yS.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return lN(t,n,a,o,i)},e.prototype.getTicks=function(){var t=this._interval,n=this._extent,a=[];if(!t)return a;a.push({value:n[0],level:0});var i=this.getSetting("useUTC"),o=VB(this._minLevelUnit,this._approxInterval,i,n);return a=a.concat(o),a.push({value:n[1],level:0}),a},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1]&&(n[0]-=fr,n[1]+=fr),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-fr}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,a){t=t||10;var i=this._extent,o=i[1]-i[0];this._approxInterval=o/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var s=tf.length,l=Math.min(LB(tf,this._approxInterval,0,s),s-1);this._interval=tf[l][1],this._minLevelUnit=tf[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Ct(t)?t:+Yr(t)},e.prototype.contain=function(t){return Kh(this.parse(t),this._extent)},e.prototype.normalize=function(t){return jh(this.parse(t),this._extent)},e.prototype.scale=function(t){return Qh(t,this._extent)},e.type="time",e}(Ln),tf=[["second",Ap],["minute",Mp],["hour",Gs],["quarter-day",Gs*6],["half-day",Gs*12],["day",fr*1.2],["half-week",fr*3.5],["week",fr*7],["month",fr*31],["quarter",fr*95],["half-year",gS/2],["year",gS]];function EB(r,e,t,n){var a=Yr(e),i=Yr(t),o=function(p){return SS(a,p,n)===SS(i,p,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},h=function(){return u()&&o("hour")},f=function(){return h()&&o("minute")},c=function(){return f()&&o("second")},v=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return f();case"second":return c();case"millisecond":return v()}}function PB(r,e){return r/=fr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function kB(r){var e=30*fr;return r/=e,r>6?6:r>3?3:r>2?2:1}function RB(r){return r/=Gs,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function cw(r,e){return r/=e?Mp:Ap,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function NB(r){return I_(r)}function OB(r,e,t){var n=new Date(r);switch(lo(e)){case"year":case"month":n[xS(t)](0);case"day":n[bS(t)](1);case"hour":n[wS(t)](0);case"minute":n[TS(t)](0);case"second":n[CS(t)](0),n[DS(t)](0)}return n.getTime()}function VB(r,e,t,n){var a=1e4,i=mS,o=0;function s(D,M,I,L,E,P,k){for(var N=new Date(M),R=M,V=N[L]();R<I&&R<=n[1];)k.push({value:R}),V+=D,N[E](V),R=N.getTime();k.push({value:R,notAdd:!0})}function l(D,M,I){var L=[],E=!M.length;if(!EB(lo(D),n[0],n[1],t)){E&&(M=[{value:OB(new Date(n[0]),D,t)},{value:n[1]}]);for(var P=0;P<M.length-1;P++){var k=M[P].value,N=M[P+1].value;if(k!==N){var R=void 0,V=void 0,F=void 0,H=!1;switch(D){case"year":R=Math.max(1,Math.round(e/fr/365)),V=Lp(t),F=uN(t);break;case"half-year":case"quarter":case"month":R=kB(e),V=uo(t),F=xS(t);break;case"week":case"half-week":case"day":R=PB(e),V=_h(t),F=bS(t),H=!0;break;case"half-day":case"quarter-day":case"hour":R=RB(e),V=Hs(t),F=wS(t);break;case"minute":R=cw(e,!0),V=Sh(t),F=TS(t);break;case"second":R=cw(e,!1),V=xh(t),F=CS(t);break;case"millisecond":R=NB(e),V=bh(t),F=DS(t);break}s(R,k,N,V,F,H,L),D==="year"&&I.length>1&&P===0&&I.unshift({value:I[0].value-R})}}for(var P=0;P<L.length;P++)I.push(L[P]);return L}}for(var u=[],h=[],f=0,c=0,v=0;v<i.length&&o++<a;++v){var p=lo(i[v]);if(oN(i[v])){l(i[v],u[u.length-1]||[],h);var d=i[v+1]?lo(i[v+1]):null;if(p!==d){if(h.length){c=f,h.sort(function(D,M){return D.value-M.value});for(var g=[],y=0;y<h.length;++y){var m=h[y].value;(y===0||h[y-1].value!==m)&&(g.push(h[y]),m>=n[0]&&m<=n[1]&&f++)}var _=(n[1]-n[0])/e;if(f>_*1.5&&c>_/1.5||(u.push(g),f>_||r===i[v]))break}h=[]}}}process.env.NODE_ENV!=="production"&&o>=a&&Xt("Exceed safe limit.");for(var S=At(G(u,function(D){return At(D,function(M){return M.value>=n[0]&&M.value<=n[1]&&!M.notAdd})}),function(D){return D.length>0}),x=[],b=S.length-1,v=0;v<S.length;++v)for(var w=S[v],T=0;T<w.length;++T)x.push({value:w[T].value,level:b-v});x.sort(function(D,M){return D.value-M.value});for(var C=[],v=0;v<x.length;++v)(v===0||x[v].value!==x[v-1].value)&&C.push(x[v]);return C}rn.registerClass(kd);var vw=rn.prototype,hl=Ln.prototype,BB=Kt,zB=Math.floor,GB=Math.ceil,ef=Math.pow,Rr=Math.log,Rd=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Ln,t._interval=0,t}return e.prototype.getTicks=function(t){var n=this._originalScale,a=this._extent,i=n.getExtent(),o=hl.getTicks.call(this,t);return G(o,function(s){var l=s.value,u=Kt(ef(this.base,l));return u=l===a[0]&&this._fixMin?rf(u,i[0]):u,u=l===a[1]&&this._fixMax?rf(u,i[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,n){var a=Rr(this.base);t=Rr(Math.max(0,t))/a,n=Rr(Math.max(0,n))/a,hl.setExtent.call(this,t,n)},e.prototype.getExtent=function(){var t=this.base,n=vw.getExtent.call(this);n[0]=ef(t,n[0]),n[1]=ef(t,n[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(n[0]=rf(n[0],i[0])),this._fixMax&&(n[1]=rf(n[1],i[1])),n},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=Rr(t[0])/Rr(n),t[1]=Rr(t[1])/Rr(n),vw.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent,a=n[1]-n[0];if(!(a===1/0||a<=0)){var i=VP(a),o=t/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[Kt(GB(n[0]/i)*i),Kt(zB(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){hl.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=Rr(t)/Rr(this.base),Kh(t,this._extent)},e.prototype.normalize=function(t){return t=Rr(t)/Rr(this.base),jh(t,this._extent)},e.prototype.scale=function(t){return t=Qh(t,this._extent),ef(this.base,t)},e.type="log",e}(rn),pw=Rd.prototype;pw.getMinorTicks=hl.getMinorTicks,pw.getLabel=hl.getLabel;function rf(r,e){return BB(r,Ur(e))}rn.registerClass(Rd);var FB=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get("min",!0);i==null&&(i=t.get("startValue",!0));var o=this._modelMinRaw=i;j(o)?this._modelMinNum=nf(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=nf(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(j(s)?this._modelMaxNum=nf(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=nf(e,s)),a)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=z(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Ar(u[0],1),Ar(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,h=l!=null;s==null&&(s=e?a?0:NaN:t-i[0]*o),l==null&&(l=e?a?a-1:NaN:n+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=wa(s)||wa(l)||e&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){process.env.NODE_ENV!=="production"&&tt(!this.frozen),this[WB[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=HB[e];process.env.NODE_ENV!=="production"&&tt(!this.frozen&&this[n]==null),this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),HB={min:"_determinedMin",max:"_determinedMax"},WB={min:"_dataMin",max:"_dataMax"};function dw(r,e,t){var n=r.rawExtentInfo;return n||(n=new FB(r,e,t),r.rawExtentInfo=n,n)}function nf(r,e){return e==null?null:wa(e)?NaN:r.parse(e)}function gw(r,e){var t=r.type,n=dw(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=iw("bar",o),l=!1;if(A(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=ow(s),h=$B(a,i,e,u);a=h.min,i=h.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function $B(r,e,t,n){var a=t.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=MB(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;A(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;A(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-r,f=1-(s+l)/i,c=h/f-h;return e+=c*(l/u),r-=c*(s/u),{min:r,max:e}}function Mo(r,e){var t=e,n=gw(r,t),a=n.extent,i=t.get("splitNumber");r instanceof Rd&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function af(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Jh({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new kd({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(rn.getClass(e)||Ln)}}function UB(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Io(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(a,i){return r.scale.getFormattedLabel(a,i,n)}}(e):U(e)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i??"");return o}}(e):j(e)?function(n){return function(a,i){return t!=null&&(i=a.value-t),n(Nd(r,a),i,a.level!=null?{level:a.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function Nd(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function YB(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,a,i=t.getExtent();t instanceof Jh?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=Io(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var h=0;h<a;h+=u){var f=n?n[h]:{value:i[0]+h},c=s(f,h),v=o.getTextRect(c),p=ZB(v,o.get("rotate")||0);l?l.union(p):l=p}return l}}function ZB(r,e){var t=e*Math.PI/180,n=r.width,a=r.height,i=n*Math.abs(Math.cos(t))+Math.abs(a*Math.sin(t)),o=n*Math.abs(Math.sin(t))+Math.abs(a*Math.cos(t)),s=new vt(r.x,r.y,i,o);return s}function Od(r){var e=r.get("interval");return e??"auto"}function yw(r){return r.type==="category"&&Od(r.getLabelModel())===0}function of(r,e){var t={};return A(r.mapDimensionsAll(e),function(n){t[tw(r,n)]=!0}),xt(t)}function XB(r,e,t){e&&A(of(e,t),function(n){var a=e.getApproximateExtent(n);a[0]<r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])})}var fl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),qB=1e-8;function mw(r,e){return Math.abs(r-e)<qB}function di(r,e,t){var n=0,a=r[0];if(!a)return!1;for(var i=1;i<r.length;i++){var o=r[i];n+=xn(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!mw(a[0],s[0])||!mw(a[1],s[1]))&&(n+=xn(a[0],a[1],s[0],s[1],e,t)),n!==0}var KB=[];function Vd(r,e){for(var t=0;t<r.length;t++)ye(r[t],r[t],e)}function _w(r,e,t,n){for(var a=0;a<r.length;a++){var i=r[a];n&&(i=n.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(Gn(e,e,i),Fn(t,t,i))}}function jB(r){for(var e=0,t=0,n=0,a=r.length,i=r[a-1][0],o=r[a-1][1],s=0;s<a;s++){var l=r[s][0],u=r[s][1],h=i*u-l*o;e+=h,t+=(i+l)*h,n+=(o+u)*h,i=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var Sw=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),xw=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),bw=function(){function r(e){this.type="linestring",this.points=e}return r}(),ww=function(r){O(e,r);function e(t,n,a){var i=r.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=a&&[a[0],a[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,a=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>a&&(n=o,a=l)}if(n)return jB(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?_w(s.exterior,a,i,t):A(s.points,function(l){_w(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new vt(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;t:for(var i=0,o=a.length;i<o;i++){var s=a[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(di(l,t[0],t[1])){for(var h=0;h<(u?u.length:0);h++)if(di(u[h],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=o.width/o.height;a?i||(i=a/s):a=s*i;for(var l=new vt(t,n,a,i),u=o.calculateTransform(l),h=this.geometries,f=0;f<h.length;f++){var c=h[f];c.type==="polygon"?(Vd(c.exterior,u),A(c.interiors,function(v){Vd(v,u)})):A(c.points,function(v){Vd(v,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}(Sw),QB=function(r){O(e,r);function e(t,n){var a=r.call(this,t)||this;return a.type="geoSVG",a._elOnlyForCalculate=n,a}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),a=[n.x+n.width/2,n.y+n.height/2],i=pu(KB),o=t;o&&!o.isGeoSVGGraphicRoot;)dn(i,o.getLocalTransform(),i),o=o.parent;return Fi(i,i),ye(a,a,i),a},e}(Sw);function JB(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return A(n,function(a){var i=a.geometry,o=i.encodeOffsets,s=i.coordinates;if(o)switch(i.type){case"LineString":i.coordinates=Tw(s,o,t);break;case"Polygon":Bd(s,o,t);break;case"MultiLineString":Bd(s,o,t);break;case"MultiPolygon":A(s,function(l,u){return Bd(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Bd(r,e,t){for(var n=0;n<r.length;n++)r[n]=Tw(r[n],e[n],t)}function Tw(r,e,t){for(var n=[],a=e[0],i=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function tz(r,e){return r=JB(r),G(At(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new xw(o[0],o.slice(1)));break;case"MultiPolygon":A(a.coordinates,function(l){l[0]&&i.push(new xw(l[0],l.slice(1)))});break;case"LineString":i.push(new bw([a.coordinates]));break;case"MultiLineString":i.push(new bw(a.coordinates))}var s=new ww(n[e||"name"],i,n.cp);return s.properties=n,s})}var cl=bt();function Cw(r,e){var t=G(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function ez(r){var e=r.getLabelModel().get("customValues");if(e){var t=Io(r),n=r.scale.getExtent(),a=Cw(r,e),i=At(a,function(o){return o>=n[0]&&o<=n[1]});return{labels:G(i,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?nz(r):iz(r)}function rz(r,e){var t=r.getTickModel().get("customValues");if(t){var n=r.scale.getExtent(),a=Cw(r,t);return{ticks:At(a,function(i){return i>=n[0]&&i<=n[1]})}}return r.type==="category"?az(r,e):{ticks:G(r.scale.getTicks(),function(i){return i.value})}}function nz(r){var e=r.getLabelModel(),t=Dw(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function Dw(r,e){var t=Aw(r,"labels"),n=Od(e),a=Mw(t,n);if(a)return a;var i,o;return j(n)?i=Ew(r,n):(o=n==="auto"?oz(r):n,i=Lw(r,o)),Iw(t,n,{labels:i,labelCategoryInterval:o})}function az(r,e){var t=Aw(r,"ticks"),n=Od(e),a=Mw(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),j(n))i=Ew(r,n,!0);else if(n==="auto"){var s=Dw(r,r.getLabelModel());o=s.labelCategoryInterval,i=G(s.labels,function(l){return l.tickValue})}else o=n,i=Lw(r,o,!0);return Iw(t,n,{ticks:i,tickCategoryInterval:o})}function iz(r){var e=r.scale.getTicks(),t=Io(r);return{labels:G(e,function(n,a){return{level:n.level,formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function Aw(r,e){return cl(r)[e]||(cl(r)[e]=[])}function Mw(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function Iw(r,e,t){return r.push({key:e,value:t}),t}function oz(r){var e=cl(r).autoInterval;return e??(cl(r).autoInterval=r.calculateCategoryInterval())}function sz(r){var e=lz(r),t=Io(r),n=(e.axisRotate-e.labelRotate)/180*Math.PI,a=r.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),h=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),c=0,v=0;l<=i[1];l+=s){var p=0,d=0,g=ys(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,c=Math.max(c,p,7),v=Math.max(v,d,7)}var y=c/h,m=v/f;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=cl(r.model),x=r.getExtent(),b=S.lastAutoInterval,w=S.lastTickCount;return b!=null&&w!=null&&Math.abs(b-_)<=1&&Math.abs(w-o)<=1&&b>_&&S.axisExtent0===x[0]&&S.axisExtent1===x[1]?_=b:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=x[0],S.axisExtent1=x[1]),_}function lz(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Lw(r,e,t){var n=Io(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],h=a.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=yw(r),c=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;c&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);v&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g})}return s}function Ew(r,e,t){var n=r.scale,a=Io(r),i=[];return A(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var Pw=[0,1],Nr=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return D_(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(e),this.onBand&&a.type==="ordinal"&&(n=n.slice(),kw(n,a.count())),It(e,Pw,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),kw(n,a.count()));var i=It(e,n,Pw,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=rz(this,t),a=n.ticks,i=G(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return uz(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=G(n,function(i){return G(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return ez(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(){return sz(this)},r}();function kw(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function uz(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],o=e[1]={coord:i[1],tickValue:e[0].tickValue};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;A(e,function(v){v.coord-=u/2});var h=r.scale.getExtent();s=1+h[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s,tickValue:h[1]+1},e.push(o)}var f=i[0]>i[1];c(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&c(i[0],e[0].coord)&&e.unshift({coord:i[0]}),c(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&c(o.coord,i[1])&&e.push({coord:i[1]});function c(v,p){return v=Kt(v),p=Kt(p),f?v>p:v<p}}var vl=Math.PI*2,gi=jr.CMD,hz=["top","right","bottom","left"];function fz(r,e,t,n,a){var i=t.width,o=t.height;switch(r){case"top":n.set(t.x+i/2,t.y-e),a.set(0,-1);break;case"bottom":n.set(t.x+i/2,t.y+o+e),a.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),a.set(-1,0);break;case"right":n.set(t.x+i+e,t.y+o/2),a.set(1,0);break}}function cz(r,e,t,n,a,i,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var h=o*t+r,f=s*t+e;if(Math.abs(n-a)%vl<1e-4)return l[0]=h,l[1]=f,u-t;if(i){var c=n;n=Qe(a),a=Qe(c)}else n=Qe(n),a=Qe(a);n>a&&(a+=vl);var v=Math.atan2(s,o);if(v<0&&(v+=vl),v>=n&&v<=a||v+vl>=n&&v+vl<=a)return l[0]=h,l[1]=f,u-t;var p=t*Math.cos(n)+r,d=t*Math.sin(n)+e,g=t*Math.cos(a)+r,y=t*Math.sin(a)+e,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function sf(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,h=t-r,f=n-e,c=Math.sqrt(h*h+f*f);h/=c,f/=c;var v=l*h+u*f,p=v/c;s&&(p=Math.min(Math.max(p,0),1)),p*=c;var d=o[0]=r+p*h,g=o[1]=e+p*f;return Math.sqrt((d-a)*(d-a)+(g-i)*(g-i))}function Rw(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),h=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(h-i)*(h-i))}var Or=[];function vz(r,e,t){var n=Rw(e.x,e.y,e.width,e.height,r.x,r.y,Or);return t.set(Or[0],Or[1]),n}function pz(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,h=e.data,f=r.x,c=r.y,v=0;v<h.length;){var p=h[v++];v===1&&(n=h[v],a=h[v+1],i=n,o=a);var d=u;switch(p){case gi.M:i=h[v++],o=h[v++],n=i,a=o;break;case gi.L:d=sf(n,a,h[v],h[v+1],f,c,Or,!0),n=h[v++],a=h[v++];break;case gi.C:d=K0(n,a,h[v++],h[v++],h[v++],h[v++],h[v],h[v+1],f,c,Or),n=h[v++],a=h[v++];break;case gi.Q:d=Q0(n,a,h[v++],h[v++],h[v],h[v+1],f,c,Or),n=h[v++],a=h[v++];break;case gi.A:var g=h[v++],y=h[v++],m=h[v++],_=h[v++],S=h[v++],x=h[v++];v+=1;var b=!!(1-h[v++]);s=Math.cos(S)*m+g,l=Math.sin(S)*_+y,v<=1&&(i=s,o=l);var w=(f-g)*_/m+g;d=cz(g,y,_,S,S+x,b,w,c,Or),n=Math.cos(S+x)*m+g,a=Math.sin(S+x)*_+y;break;case gi.R:i=n=h[v++],o=a=h[v++];var T=h[v++],C=h[v++];d=Rw(i,o,T,C,f,c,Or);break;case gi.Z:d=sf(n,a,i,o,f,c,Or,!0),n=i,a=o;break}d<u&&(u=d,t.set(Or[0],Or[1]))}return u}var Vr=new ct,Ft=new ct,Jt=new ct,an=new ct,on=new ct;function Nw(r,e){if(r){var t=r.getTextGuideLine(),n=r.getTextContent();if(n&&t){var a=r.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=a.candidates||hz,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,h=r.getComputedTransform(),f=h&&Fi([],h),c=e.get("length2")||0;u&&Jt.copy(u);for(var v=0;v<o.length;v++){var p=o[v];fz(p,0,s,Vr,an),ct.scaleAndAdd(Ft,Vr,an,c),Ft.transform(f);var d=r.getBoundingRect(),g=u?u.distance(Ft):r instanceof _t?pz(Ft,r.path,Jt):vz(Ft,d,Jt);g<l&&(l=g,Ft.transform(h),Jt.transform(h),Jt.toArray(i[0]),Ft.toArray(i[1]),Vr.toArray(i[2]))}Ow(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var lf=[],Ge=new ct;function Ow(r,e){if(e<=180&&e>0){e=e/180*Math.PI,Vr.fromArray(r[0]),Ft.fromArray(r[1]),Jt.fromArray(r[2]),ct.sub(an,Vr,Ft),ct.sub(on,Jt,Ft);var t=an.len(),n=on.len();if(!(t<.001||n<.001)){an.scale(1/t),on.scale(1/n);var a=an.dot(on),i=Math.cos(e);if(i<a){var o=sf(Ft.x,Ft.y,Jt.x,Jt.y,Vr.x,Vr.y,lf,!1);Ge.fromArray(lf),Ge.scaleAndAdd(on,o/Math.tan(Math.PI-e));var s=Jt.x!==Ft.x?(Ge.x-Ft.x)/(Jt.x-Ft.x):(Ge.y-Ft.y)/(Jt.y-Ft.y);if(isNaN(s))return;s<0?ct.copy(Ge,Ft):s>1&&ct.copy(Ge,Jt),Ge.toArray(r[1])}}}}function dz(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Vr.fromArray(r[0]),Ft.fromArray(r[1]),Jt.fromArray(r[2]),ct.sub(an,Ft,Vr),ct.sub(on,Jt,Ft);var n=an.len(),a=on.len();if(!(n<.001||a<.001)){an.scale(1/n),on.scale(1/a);var i=an.dot(e),o=Math.cos(t);if(i<o){var s=sf(Ft.x,Ft.y,Jt.x,Jt.y,Vr.x,Vr.y,lf,!1);Ge.fromArray(lf);var l=Math.PI/2,u=Math.acos(on.dot(e)),h=l+u-t;if(h>=l)ct.copy(Ge,Jt);else{Ge.scaleAndAdd(on,s/Math.tan(Math.PI/2-h));var f=Jt.x!==Ft.x?(Ge.x-Ft.x)/(Jt.x-Ft.x):(Ge.y-Ft.y)/(Jt.y-Ft.y);if(isNaN(f))return;f<0?ct.copy(Ge,Ft):f>1&&ct.copy(Ge,Jt)}Ge.toArray(r[1])}}}}function zd(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function gz(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=zn(n[0],n[1]),i=zn(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=vu([],n[1],n[0],o/a),l=vu([],n[1],n[2],o/i),u=vu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var h=1;h<n.length;h++)r.lineTo(n[h][0],n[h][1])}function Gd(r,e,t){var n=r.getTextGuideLine(),a=r.getTextContent();if(!a){n&&r.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=a.ignore,l=0;l<As.length;l++){var u=As[l],h=e[u],f=u==="normal";if(h){var c=h.get("show"),v=f?s:ot(a.states[u]&&a.states[u].ignore,s);if(v||!ot(c,o)){var p=f?n:n&&n.states[u];p&&(p.ignore=!0),n&&zd(n,!0,u,h);continue}n||(n=new Be,r.setTextGuideLine(n),!f&&(s||!o)&&zd(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),zd(n,!1,u,h)}}if(n){rt(n.style,t),n.style.fill=null;var d=i.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=d||!1,n.buildPath=gz}}function Fd(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<Ne.length;n++){var a=Ne[n];t[a]=r.getModel([a,e])}return t}function Vw(r){for(var e=[],t=0;t<r.length;t++){var n=r[t];if(!n.defaultAttr.ignore){var a=n.label,i=a.getComputedTransform(),o=a.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,l=a.style.margin||0,u=o.clone();u.applyTransform(i),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var h=s?new sh(o,i):null;e.push({label:a,labelLine:n.labelLine,rect:u,localRect:o,obb:h,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:i})}}return e}function Bw(r,e,t,n,a,i){var o=r.length;if(o<2)return;r.sort(function(b,w){return b.rect[e]-w.rect[e]});for(var s=0,l,u=!1,h=0;h<o;h++){var f=r[h],c=f.rect;l=c[e]-s,l<0&&(c[e]-=l,f.label[e]-=l,u=!0),s=c[e]+c[t]}var v=r[0],p=r[o-1],d,g;y(),d<0&&S(-d,.8),g<0&&S(g,.8),y(),m(d,g,1),m(g,d,-1),y(),d<0&&x(-d),g<0&&x(g);function y(){d=v.rect[e]-n,g=a-p.rect[e]-p.rect[t]}function m(b,w,T){if(b<0){var C=Math.min(w,-b);if(C>0){_(C*T,0,o);var D=C+b;D<0&&S(-D*T,1)}else S(-b*T,1)}}function _(b,w,T){b!==0&&(u=!0);for(var C=w;C<T;C++){var D=r[C],M=D.rect;M[e]+=b,D.label[e]+=b}}function S(b,w){for(var T=[],C=0,D=1;D<o;D++){var M=r[D-1].rect,I=Math.max(r[D].rect[e]-M[e]-M[t],0);T.push(I),C+=I}if(C){var L=Math.min(Math.abs(b)/C,w);if(b>0)for(var D=0;D<o-1;D++){var E=T[D]*L;_(E,0,D+1)}else for(var D=o-1;D>0;D--){var E=T[D-1]*L;_(-E,D,o)}}}function x(b){var w=b<0?-1:1;b=Math.abs(b);for(var T=Math.ceil(b/(o-1)),C=0;C<o-1;C++)if(w>0?_(T,0,C+1):_(-T,o-C-1,o),b-=T,b<=0)return}return u}function yz(r,e,t,n){return Bw(r,"x","width",e,t)}function zw(r,e,t,n){return Bw(r,"y","height",e,t)}function Gw(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new vt(0,0,0,0);function n(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var a=0;a<r.length;a++){var i=r[a],o=i.axisAligned,s=i.localRect,l=i.transform,u=i.label,h=i.labelLine;t.copy(i.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var f=i.obb,c=!1,v=0;v<e.length;v++){var p=e[v];if(t.intersect(p.rect)){if(o&&p.axisAligned){c=!0;break}if(p.obb||(p.obb=new sh(p.localRect,p.transform)),f||(f=new sh(s,l)),f.intersect(p.obb)){c=!0;break}}}c?(n(u),h&&n(h)):(u.attr("ignore",i.defaultAttr.ignore),h&&h.attr("ignore",i.defaultAttr.labelGuideIgnore),e.push(i))}}function mz(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function _z(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:mz(n&&n.shape.points)}}var Fw=["align","verticalAlign","width","height","fontSize"],Fe=new mn,Hd=bt(),Sz=bt();function uf(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var hf=["x","y","rotation"],xz=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,a,i){var o=a.style,s=a.__hostTarget,l=s.textConfig||{},u=a.getComputedTransform(),h=a.getBoundingRect().plain();vt.applyTransform(h,h,u),u?Fe.setLocalTransform(u):(Fe.x=Fe.y=Fe.rotation=Fe.originX=Fe.originY=0,Fe.scaleX=Fe.scaleY=1),Fe.rotation=Qe(Fe.rotation);var f=a.__hostTarget,c;if(f){c=f.getBoundingRect().plain();var v=f.getComputedTransform();vt.applyTransform(c,c,v)}var p=c&&f.getTextGuideLine();this._labelList.push({label:a,labelLine:p,seriesModel:n,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:h,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:p&&p.ignore,x:Fe.x,y:Fe.y,scaleX:Fe.scaleX,scaleY:Fe.scaleY,rotation:Fe.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,a=n.get("labelLayout");(j(a)||xt(a).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=st(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,a)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function a(_,S){return function(){Nw(_,S)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,h=void 0;j(o.layoutOption)?h=o.layoutOption(_z(o,l)):h=o.layoutOption,h=h||{},o.computedLayoutOption=h;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:h.x!=null||h.y!=null?null:u.attachedPos,rotation:h.rotate!=null?h.rotate*f:u.attachedRot,offset:[h.dx||0,h.dy||0]});var c=!1;if(h.x!=null?(s.x=W(h.x,t),s.setStyle("x",0),c=!0):(s.x=u.x,s.setStyle("x",u.style.x)),h.y!=null?(s.y=W(h.y,n),s.setStyle("y",0),c=!0):(s.y=u.y,s.setStyle("y",u.style.y)),h.labelLinePoints){var v=l.getTextGuideLine();v&&(v.setShape({points:h.labelLinePoints}),c=!1)}var p=Hd(s);p.needsUpdateLabelLine=c,s.rotation=h.rotate!=null?h.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var d=0;d<Fw.length;d++){var g=Fw[d];s.setStyle(g,h[g]!=null?h[g]:u.style[g])}if(h.draggable){if(s.draggable=!0,s.cursor="move",l){var y=o.seriesModel;if(o.dataIndex!=null){var m=o.seriesModel.getData(o.dataType);y=m.getItemModel(o.dataIndex)}s.on("drag",a(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),a=Vw(this._labelList),i=At(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=At(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});yz(i,0,t),zw(o,0,n);var s=At(a,function(l){return l.layoutOption.hideOverlap});Gw(s)},r.prototype.processLabelsOverall=function(){var e=this;A(this._chartViewList,function(t){var n=t.__model,a=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!a,l=o.getTextContent();!s&&l&&(s=Hd(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),i&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),a=st(e),i=a.dataIndex;if(n&&i!=null){var o=t.getData(a.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var h=o.getVisual("drawType");l.stroke=u[h]}var f=s.getModel("labelLine");Gd(e,Fd(s),l),Nw(e,f)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),a=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!no(e))){var i=Hd(n),o=i.oldLayout,s=st(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},h=t.getData(s.dataType);if(o){n.attr(o);var c=e.prevStates;c&&(dt(c,"select")>=0&&n.attr(i.oldLayoutSelect),dt(c,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),Dt(n,u,t,l)}else if(n.attr(u),!io(n).valueAnimation){var f=ot(n.style.opacity,1);n.style.opacity=0,$t(n,{style:{opacity:f}},t,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};uf(v,u,hf),uf(v,n.states.select,hf)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};uf(p,u,hf),uf(p,n.states.emphasis,hf)}fS(n,l,h,t,t)}if(a&&!a.ignore&&!a.invisible){var i=Sz(a),o=i.oldLayout,d={points:a.shape.points};o?(a.attr({shape:o}),Dt(a,{shape:d},t)):(a.setShape(d),a.style.strokePercent=0,$t(a,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}(),Wd=bt();function bz(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=Wd(t).labelManager;a||(a=Wd(t).labelManager=new xz),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=Wd(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var $d=Math.sin,Ud=Math.cos,Hw=Math.PI,yi=Math.PI*2,wz=180/Hw,Ww=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,h=!l,f=Math.abs(u),c=Yn(f-yi)||(h?u>=yi:-u>=yi),v=u>0?u%yi:u%yi+yi,p=!1;c?p=!0:Yn(f)?p=!1:p=v>=Hw==!!h;var d=e+n*Ud(o),g=t+a*$d(o);this._start&&this._add("M",d,g);var y=Math.round(i*wz);if(c){var m=1/this._p,_=(h?1:-1)*(yi-m);this._add("A",n,a,y,1,+h,e+n*Ud(o+_),t+a*$d(o+_)),m>.01&&this._add("A",n,a,y,0,+h,d,g)}else{var S=e+n*Ud(s),x=t+a*$d(s);this._add("A",n,a,y,+p,+h,S,x)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var h=[],f=this._p,c=1;c<arguments.length;c++){var v=arguments[c];if(isNaN(v)){this._invalid=!0;return}h.push(Math.round(v*f)/f)}this._d.push(e+h.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),Yd="none",Tz=Math.round;function Cz(r){var e=r.fill;return e!=null&&e!==Yd}function Dz(r){var e=r.stroke;return e!=null&&e!==Yd}var Zd=["lineCap","miterLimit","lineJoin"],Az=G(Zd,function(r){return"stroke-"+r.toLowerCase()});function Mz(r,e,t,n){var a=e.opacity==null?1:e.opacity;if(t instanceof ge){r("opacity",a);return}if(Cz(e)){var i=vs(e.fill);r("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*a:i.opacity*a;o<1&&r("fill-opacity",o)}else r("fill",Yd);if(Dz(e)){var s=vs(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,h=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*a:s.opacity*a,f=e.strokeFirst;if(u!==1&&r("stroke-width",u),f&&r("paint-order",f?"stroke":"fill"),h<1&&r("stroke-opacity",h),e.lineDash){var c=sd(t),v=c[0],p=c[1];v&&(p=Tz(p||0),r("stroke-dasharray",v.join(",")),(p||n)&&r("stroke-dashoffset",p))}for(var d=0;d<Zd.length;d++){var g=Zd[d];if(e[g]!==Xu[g]){var y=e[g]||Xu[g];y&&r(Az[d],y)}}}}var $w="http://www.w3.org/2000/svg",Uw="http://www.w3.org/1999/xlink",Iz="http://www.w3.org/2000/xmlns/",Lz="http://www.w3.org/XML/1998/namespace",Yw="ecmeta_";function Zw(r){return document.createElementNS($w,r)}function ce(r,e,t,n,a){return{tag:r,attrs:t||{},children:n,text:a,key:e}}function Ez(r,e){var t=[];if(e)for(var n in e){var a=e[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),t.push(i))}return"<"+r+" "+t.join(" ")+">"}function Pz(r){return"</"+r+">"}function Xd(r,e){e=e||{};var t=e.newline?`
`:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return Ez(o,s)+(o!=="style"?Pe(l):l||"")+(i?""+t+G(i,function(u){return n(u)}).join(t)+t:"")+Pz(o)}return n(r)}function kz(r,e,t){t=t||{};var n=t.newline?`
`:"",a=" {"+n,i=n+"}",o=G(xt(r),function(l){return l+a+G(xt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=G(xt(e),function(l){return"@keyframes "+l+a+G(xt(e[l]),function(u){return u+a+G(xt(e[l][u]),function(h){var f=e[l][u][h];return h==="d"&&(f='path("'+f+'")'),h+":"+f+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function qd(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Xw(r,e,t,n){return ce("svg","root",{width:r,height:e,xmlns:$w,"xmlns:xlink":Uw,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var Rz=0;function qw(){return Rz++}var Kw={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},mi="transform-origin";function Nz(r,e,t){var n=B({},r.shape);B(n,e),r.buildPath(t,n);var a=new Ww;return a.reset(s_(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function Oz(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[mi]=t+"px "+n+"px")}var Vz={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function jw(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function Bz(r,e,t){var n=r.shape.paths,a={},i,o;if(A(n,function(l){var u=qd(t.zrId);u.animation=!0,ff(l,{},u,!0);var h=u.cssAnims,f=u.cssNodes,c=xt(h),v=c.length;if(v){o=c[v-1];var p=h[o];for(var d in p){var g=p[d];a[d]=a[d]||{d:""},a[d].d+=g.d||""}for(var y in f){var m=f[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=jw(a,t);return i.replace(o,s)}}function Qw(r){return U(r)?Kw[r]?"cubic-bezier("+Kw[r]+")":Jc(r)?r:"":""}function ff(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof dp){var s=Bz(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var h=a[u],f=[h.getMaxTime()/1e3+"s"],c=Qw(h.getClip().easing),v=h.getDelay();c?f.push(c):f.push("linear"),v&&f.push(v/1e3+"s"),h.getLoop()&&f.push("infinite");var p=f.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(h)}function d(m){var _=m[1],S=_.length,x={},b={},w={},T="animation-timing-function";function C(pt,nt,yt){for(var K=pt.getTracks(),ut=pt.getMaxTime(),Ht=0;Ht<K.length;Ht++){var Et=K[Ht];if(Et.needsAnimate()){var Vt=Et.keyframes,Zt=Et.propName;if(yt&&(Zt=yt(Zt)),Zt)for(var pe=0;pe<Vt.length;pe++){var er=Vt[pe],Xe=Math.round(er.time/ut*100)+"%",Vi=Qw(er.easing),_a=er.rawValue;(U(_a)||Ct(_a))&&(nt[Xe]=nt[Xe]||{},nt[Xe][Zt]=er.rawValue,Vi&&(nt[Xe][T]=Vi))}}}}for(var D=0;D<S;D++){var M=_[D],I=M.targetName;I?I==="shape"&&C(M,b):!n&&C(M,x)}for(var L in x){var E={};__(E,r),B(E,x[L]);var P=l_(E),k=x[L][T];w[L]=P?{transform:P}:{},Oz(w[L],E),k&&(w[L][T]=k)}var N,R=!0;for(var L in b){w[L]=w[L]||{};var V=!N,k=b[L][T];V&&(N=new jr);var F=N.len();N.reset(),w[L].d=Nz(r,b[L],N);var H=N.len();if(!V&&F!==H){R=!1;break}k&&(w[L][T]=k)}if(!R)for(var L in w)delete w[L].d;if(!n)for(var D=0;D<S;D++){var M=_[D],I=M.targetName;I==="style"&&C(M,w,function(K){return Vz[K]})}for(var $=xt(w),Q=!0,et,D=1;D<$.length;D++){var lt=$[D-1],kt=$[D];if(w[lt][mi]!==w[kt][mi]){Q=!1;break}et=w[lt][mi]}if(Q&&et){for(var L in w)w[L][mi]&&delete w[L][mi];e[mi]=et}if(At($,function(pt){return xt(w[pt]).length>0}).length){var jt=jw(w,t);return jt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+qw();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function zz(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};Jw(n,e,t)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=a.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=ov(l))}var u=a.lineWidth;if(u){var h=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/h}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),Jw(n,e,t)}}function Jw(r,e,t,n){var a=JSON.stringify(r),i=t.cssStyleCache[a];i||(i=t.zrId+"-cls-"+qw(),t.cssStyleCache[a]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var pl=Math.round;function tT(r){return r&&U(r.src)}function eT(r){return r&&j(r.toDataURL)}function Kd(r,e,t,n){Mz(function(a,i){var o=a==="fill"||a==="stroke";o&&o_(i)?sT(e,r,a,n):o&&lv(i)?lT(t,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),Yz(t,r,n)}function jd(r,e){var t=LP(e);t&&(t.each(function(n,a){n!=null&&(r[(Yw+a).toLowerCase()]=n+"")}),e.isSilent()&&(r[Yw+"silent"]="true"))}function rT(r){return Yn(r[0]-1)&&Yn(r[1])&&Yn(r[2])&&Yn(r[3]-1)}function Gz(r){return Yn(r[4])&&Yn(r[5])}function Qd(r,e,t){if(e&&!(Gz(e)&&rT(e))){var n=1e4;r.transform=rT(e)?"translate("+pl(e[4]*n)/n+" "+pl(e[5]*n)/n+")":QE(e)}}function nT(r,e,t){for(var n=r.points,a=[],i=0;i<n.length;i++)a.push(pl(n[i][0]*t)/t),a.push(pl(n[i][1]*t)/t);e.points=a.join(" ")}function aT(r){return!r.smooth}function Fz(r){var e=G(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,n,a){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(n[o[1]]=pl(s*a)/a)}}}var Hz={circle:[Fz(["cx","cy","r"])],polyline:[nT,aT],polygon:[nT,aT]};function Wz(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function iT(r,e){var t=r.style,n=r.shape,a=Hz[r.type],i={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&s_(r)||4;if(a&&!e.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&Wz(r))&&!(l<1)){s=r.type;var h=Math.pow(10,u);a[0](n,i,h)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var c=r.path;f&&(c.beginPath(),r.buildPath(c,r.shape),r.pathUpdated());var v=c.getVersion(),p=r,d=p.__svgPathBuilder;(p.__svgPathVersion!==v||!d||l!==p.__svgPathStrokePercent)&&(d||(d=p.__svgPathBuilder=new Ww),d.reset(u),c.rebuildPath(d,l),d.generateStr(),p.__svgPathVersion=v,p.__svgPathStrokePercent=l),i.d=d.getStr()}return Qd(i,r.transform),Kd(i,t,r,e),jd(i,r),e.animation&&ff(r,i,e),e.emphasis&&zz(r,i,e),ce(s,r.id+"",i)}function $z(r,e){var t=r.style,n=t.image;if(n&&!U(n)&&(tT(n)?n=n.src:eT(n)&&(n=n.toDataURL())),!!n){var a=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:n,width:o,height:s};return a&&(l.x=a),i&&(l.y=i),Qd(l,r.transform),Kd(l,t,r,e),jd(l,r),e.animation&&ff(r,l,e),ce("image",r.id+"",l)}}function Uz(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var a=t.font||Vn,i=t.x||0,o=tP(t.y||0,Ou(a),t.textBaseline),s=JE[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(c1(t)){var u="",h=t.fontStyle,f=h1(t.fontSize);if(!parseFloat(f))return;var c=t.fontFamily||m0,v=t.fontWeight;u+="font-size:"+f+";font-family:"+c+";",h&&h!=="normal"&&(u+="font-style:"+h+";"),v&&v!=="normal"&&(u+="font-weight:"+v+";"),l.style=u}else l.style="font: "+a;return n.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),Qd(l,r.transform),Kd(l,t,r,e),jd(l,r),e.animation&&ff(r,l,e),ce("text",r.id+"",l,void 0,n)}}function oT(r,e){if(r instanceof _t)return iT(r,e);if(r instanceof ge)return $z(r,e);if(r instanceof Ki)return Uz(r,e)}function Yz(r,e,t){var n=r.style;if(eP(n)){var a=rP(r),i=t.shadowCache,o=i[a];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=n.shadowOffsetX||0,f=n.shadowOffsetY||0,c=n.shadowBlur,v=vs(n.shadowColor),p=v.opacity,d=v.color,g=c/2/l,y=c/2/u,m=g+" "+y;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=ce("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[ce("feDropShadow","",{dx:h/l,dy:f/u,stdDeviation:m,"flood-color":d,"flood-opacity":p})]),i[a]=o}e.filter=Mu(o)}}function sT(r,e,t,n){var a=r[t],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(a_(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(i_(a))i="radialGradient",o.cx=ot(a.x,.5),o.cy=ot(a.y,.5),o.r=ot(a.r,.5);else{process.env.NODE_ENV!=="production"&&wr("Illegal gradient type.");return}for(var s=a.colorStops,l=[],u=0,h=s.length;u<h;++u){var f=sv(s[u].offset)*100+"%",c=s[u].color,v=vs(c),p=v.color,d=v.opacity,g={offset:f};g["stop-color"]=p,d<1&&(g["stop-opacity"]=d),l.push(ce("stop",u+"",g))}var y=ce(i,"",o,l),m=Xd(y),_=n.gradientCache,S=_[m];S||(S=n.zrId+"-g"+n.gradientIdx++,_[m]=S,o.id=S,n.defs[S]=ce(i,S,o,l)),e[t]=Mu(S)}function lT(r,e,t,n){var a=r.style[t],i=r.getBoundingRect(),o={},s=a.repeat,l=s==="no-repeat",u=s==="repeat-x",h=s==="repeat-y",f;if(n_(a)){var c=a.imageWidth,v=a.imageHeight,p=void 0,d=a.image;if(U(d)?p=d:tT(d)?p=d.src:eT(d)&&(p=d.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";tt(c,g),tt(v,g)}else if(c==null||v==null){var y=function(D,M){if(D){var I=D.elm,L=c||M.width,E=v||M.height;D.tag==="pattern"&&(u?(E=1,L/=i.width):h&&(L=1,E/=i.height)),D.attrs.width=L,D.attrs.height=E,I&&(I.setAttribute("width",L),I.setAttribute("height",E))}},m=Bv(p,null,r,function(D){l||y(b,D),y(f,D)});m&&m.width&&m.height&&(c=c||m.width,v=v||m.height)}f=ce("image","img",{href:p,width:c,height:v}),o.width=c,o.height=v}else a.svgElement&&(f=at(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(f){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):h?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var x=l_(a);x&&(o.patternTransform=x);var b=ce("pattern","",o,[f]),w=Xd(b),T=n.patternCache,C=T[w];C||(C=n.zrId+"-p"+n.patternIdx++,T[w]=C,o.id=C,b=n.defs[C]=ce("pattern",C,o,[f])),e[t]=Mu(C)}}function Zz(r,e,t){var n=t.clipPathCache,a=t.defs,i=n[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=ce("clipPath",i,o,[iT(r,t)])}e["clip-path"]=Mu(i)}function uT(r){return document.createTextNode(r)}function _i(r,e,t){r.insertBefore(e,t)}function hT(r,e){r.removeChild(e)}function fT(r,e){r.appendChild(e)}function cT(r){return r.parentNode}function vT(r){return r.nextSibling}function Jd(r,e){r.textContent=e}var pT=58,Xz=120,qz=ce("","");function tg(r){return r===void 0}function sn(r){return r!==void 0}function Kz(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(process.env.NODE_ENV!=="production"&&n[i]!=null&&console.error("Duplicate key "+i),n[i]=a)}return n}function dl(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function gl(r){var e,t=r.children,n=r.tag;if(sn(n)){var a=r.elm=Zw(n);if(eg(qz,r),z(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&fT(a,gl(i))}else sn(r.text)&&!J(r.text)&&fT(a,uT(r.text))}else r.elm=uT(r.text);return r.elm}function dT(r,e,t,n,a){for(;n<=a;++n){var i=t[n];i!=null&&_i(r,gl(i),e)}}function cf(r,e,t,n){for(;t<=n;++t){var a=e[t];if(a!=null)if(sn(a.tag)){var i=cT(a.elm);hT(i,a.elm)}else hT(r,a.elm)}}function eg(r,e){var t,n=e.elm,a=r&&r.attrs||{},i=e.attrs||{};if(a!==i){for(t in i){var o=i[t],s=a[t];s!==o&&(o===!0?n.setAttribute(t,""):o===!1?n.removeAttribute(t):t==="style"?n.style.cssText=o:t.charCodeAt(0)!==Xz?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(Iz,t,o):t.charCodeAt(3)===pT?n.setAttributeNS(Lz,t,o):t.charCodeAt(5)===pT?n.setAttributeNS(Uw,t,o):n.setAttribute(t,o))}for(t in a)t in i||n.removeAttribute(t)}}function jz(r,e,t){for(var n=0,a=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],h=t[l],f,c,v,p;n<=i&&a<=l;)o==null?o=e[++n]:s==null?s=e[--i]:u==null?u=t[++a]:h==null?h=t[--l]:dl(o,u)?(Lo(o,u),o=e[++n],u=t[++a]):dl(s,h)?(Lo(s,h),s=e[--i],h=t[--l]):dl(o,h)?(Lo(o,h),_i(r,o.elm,vT(s.elm)),o=e[++n],h=t[--l]):dl(s,u)?(Lo(s,u),_i(r,s.elm,o.elm),s=e[--i],u=t[++a]):(tg(f)&&(f=Kz(e,n,i)),c=f[u.key],tg(c)?_i(r,gl(u),o.elm):(v=e[c],v.tag!==u.tag?_i(r,gl(u),o.elm):(Lo(v,u),e[c]=void 0,_i(r,v.elm,o.elm))),u=t[++a]);(n<=i||a<=l)&&(n>i?(p=t[l+1]==null?null:t[l+1].elm,dT(r,p,t,a,l)):cf(r,e,n,i))}function Lo(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(eg(r,e),tg(e.text)?sn(n)&&sn(a)?n!==a&&jz(t,n,a):sn(a)?(sn(r.text)&&Jd(t,""),dT(t,null,a,0,a.length-1)):sn(n)?cf(t,n,0,n.length-1):sn(r.text)&&Jd(t,""):r.text!==e.text&&(sn(n)&&cf(t,n,0,n.length-1),Jd(t,e.text)))}function Qz(r,e){if(dl(r,e))Lo(r,e);else{var t=r.elm,n=cT(t);gl(e),n!==null&&(_i(n,e.elm,vT(t)),cf(n,[r],0,0))}return e}var Jz=0,t5=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=gT("refreshHover"),this.configLayer=gT("configLayer"),this.storage=t,this._opts=n=B({},n),this.root=e,this._id="zr"+Jz++,this._oldVNode=Xw(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=Zw("svg");eg(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Qz(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return oT(e,qd(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=qd(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=e5(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=ce("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=G(xt(i.defs),function(c){return i.defs[c]});if(u.length&&o.push(ce("defs","defs",{},u)),e.animation){var h=kz(i.cssNodes,i.cssAnims,{newline:!0});if(h){var f=ce("style","stl",{},[],h);o.push(f)}}return Xw(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},Xd(this.renderToVNode({animation:ot(e.cssAnimation,!0),emphasis:ot(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ot(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var a=e.length,i=[],o=0,s,l,u=0,h=0;h<a;h++){var f=e[h];if(!f.invisible){var c=f.__clipPaths,v=c&&c.length||0,p=l&&l.length||0,d=void 0;for(d=Math.max(v-1,p-1);d>=0&&!(c&&l&&c[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y<v;y++){var m={};Zz(c[y],m,t);var _=ce("g","clip-g-"+u++,m,[]);(s?s.children:n).push(_),i[o++]=_,s=_}l=c;var S=oT(f,t);S&&(s?s.children:n).push(S)}}},r.prototype.resize=function(e,t){var n=this._opts,a=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),a&&i&&(i.style.display="none",e=wo(a,0,n),t=wo(a,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(lv(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=aP(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r}();function gT(r){return function(){process.env.NODE_ENV!=="production"&&wr('In SVG mode painter not support method "'+r+'"')}}function e5(r,e,t,n){var a;if(t&&t!=="none")if(a=ce("rect","bg",{width:r,height:e,x:"0",y:"0"}),o_(t))sT({fill:t},a.attrs,"fill",n);else if(lv(t))lT({style:{fill:t},dirty:Qt,getBoundingRect:function(){return{width:r,height:e}}},a.attrs,"fill",n);else{var i=vs(t),o=i.color,s=i.opacity;a.attrs.fill=o,s<1&&(a.attrs["fill-opacity"]=s)}return a}function r5(r){r.registerPainter("svg",t5)}function yT(r,e,t){var n=Bn.createCanvas(),a=e.getWidth(),i=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",r)),n.width=a*t,n.height=i*t,n}var rg=function(r){Wt(e,r);function e(t,n,a){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||Nu,typeof t=="string"?o=yT(t,n,a):J(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(A0(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=n,i.dpr=a,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=yT("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new vt(0,0,0,0);function h(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new vt(0,0,0,0);_.copy(m),o.push(_)}else{for(var S=!1,x=1/0,b=0,w=0;w<o.length;++w){var T=o[w];if(T.intersect(m)){var C=new vt(0,0,0,0);C.copy(T),C.union(m),o[w]=C,S=!0;break}else if(l){u.copy(m),u.union(T);var D=m.width*m.height,M=T.width*T.height,I=u.width*u.height,L=I-D-M;L<x&&(x=L,b=w)}}if(l&&(o[b].union(m),S=!0),!S){var _=new vt(0,0,0,0);_.copy(m),o.push(_)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var c=t[f];if(c){var v=c.shouldBePainted(a,i,!0,!0),p=c.__isRendered&&(c.__dirty&Hr||!v)?c.getPrevPaintRect():null;p&&h(p);var d=v&&(c.__dirty&Hr||!c.__isRendered)?c.getPaintRect():null;d&&h(d)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var c=n[f],v=c&&c.shouldBePainted(a,i,!0,!0);if(c&&(!v||!c.__zr)&&c.__isRendered){var p=c.getPrevPaintRect();p&&h(p)}}var g;do{g=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var y=f+1;y<o.length;)o[f].intersect(o[y])?(g=!0,o[f].union(o[y]),o.splice(y,1)):y++;f++}}while(g);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var a=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),i.width=t*a,i.height=n*a,s&&(s.width=t*a,s.height=n*a,a!==1&&this.ctxBack.scale(a,a))},e.prototype.clear=function(t,n,a){var i=this.dom,o=this.ctx,s=i.width,l=i.height;n=n||this.clearColor;var u=this.motionBlur&&!t,h=this.lastFrameAlpha,f=this.dpr,c=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/f,l/f));var v=this.domBack;function p(d,g,y,m){if(o.clearRect(d,g,y,m),n&&n!=="transparent"){var _=void 0;if(lu(n)){var S=n.global||n.__width===y&&n.__height===m;_=S&&n.__canvasGradient||od(o,n,{x:0,y:0,width:y,height:m}),n.__canvasGradient=_,n.__width=y,n.__height=m}else cE(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,_=ld(o,n,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(d,g,y,m),o.restore()}u&&(o.save(),o.globalAlpha=h,o.drawImage(v,d,g,y,m),o.restore())}!a||u?p(0,0,s,l):a.length&&A(a,function(d){p(d.x*f,d.y*f,d.width*f,d.height*f)})},e}(nr),mT=1e5,Si=314159,vf=.01,n5=.001;function a5(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function i5(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var o5=function(){function r(e,t,n,a){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=B({},n||{}),this.dpr=n.devicePixelRatio||Nu,this._singleCanvas=i,this.root=e;var o=e.style;o&&(A0(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var h=e,f=h.width,c=h.height;n.width!=null&&(f=n.width),n.height!=null&&(c=n.height),this.dpr=n.devicePixelRatio||1,h.width=f*this.dpr,h.height=c*this.dpr,this._width=f,this._height=c;var v=new rg(h,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Si]=v,v.zlevel=Si,s.push(Si),this._domRoot=e}else{this._width=wo(e,0,n),this._height=wo(e,1,n);var u=this._domRoot=i5(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,a=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<a.length;i++){var o=a[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(mT)),i||(i=n.ctx,i.save()),ci(i,s,a,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(mT)},r.prototype.paintOne=function(e,t){db(e,t)},r.prototype._paintList=function(e,t,n,a){if(this._redrawId===a){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;_u(function(){l._paintList(e,t,n,a)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Si).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(a){a.virtual&&e.drawImage(a.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var a=this,i=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&i.push(u)}for(var h=!0,f=!1,c=function(d){var g=i[d],y=g.ctx,m=o&&g.createRepaintRects(e,t,v._width,v._height),_=n?g.__startIndex:g.__drawIndex,S=!n&&g.incremental&&Date.now,x=S&&Date.now(),b=g.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,b,m);else if(_===g.__startIndex){var w=e[_];(!w.incremental||!w.notClear||n)&&g.clear(!1,b,m)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,C=function(L){var E={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(T=_;T<g.__endIndex;T++){var P=e[T];if(P.__inHover&&(f=!0),a._doPaintEl(P,g,o,L,E,T===g.__endIndex-1),S){var k=Date.now()-x;if(k>15)break}}E.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var D=v.dpr,M=0;M<m.length;++M){var I=m[M];y.save(),y.beginPath(),y.rect(I.x*D,I.y*D,I.width*D,I.height*D),y.clip(),C(I),y.restore()}else y.save(),C(),y.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(h=!1)},v=this,p=0;p<i.length;p++)c(p);return mt.wxa&&A(this._layers,function(d){d&&d.ctx&&d.ctx.draw&&d.ctx.draw()}),{finished:h,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,n,a,i,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!a||l&&l.intersect(a))&&(ci(s,e,i,o),e.setPrevPaintRect(l))}else ci(s,e,i,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Si);var n=this._layers[e];return n||(n=new rg("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?ft(n,this._layerConfig[e],!0):this._layerConfig[e-vf]&&ft(n,this._layerConfig[e-vf],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,a=this._zlevelList,i=a.length,o=this._domRoot,s=null,l=-1;if(n[e]){process.env.NODE_ENV!=="production"&&wr("ZLevel "+e+" has been used already");return}if(!a5(t)){process.env.NODE_ENV!=="production"&&wr("Layer of zlevel "+e+" is not valid");return}if(i>0&&e>a[0]){for(l=0;l<i-1&&!(a[l]<e&&a[l+1]>e);l++);s=n[a[l]]}if(a.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a];e.call(t,this._layers[i],i)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,c){f.__dirty=f.__used=!1});function t(f){i&&(i.__endIndex!==f&&(i.__dirty=!0),i.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var a=e[n];if(a.zlevel!==e[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<e.length;l++){var a=e[l],u=a.zlevel,h=void 0;s!==u&&(s=u,o=0),a.incremental?(h=this.getLayer(u+n5,this._needsManuallyCompositing),h.incremental=!0,o=1):h=this.getLayer(u+(o>0?vf:0),this._needsManuallyCompositing),h.__builtin__||wr("ZLevel "+u+" has been used by unkown layer "+h.id),h!==i&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,t(l),i=h),a.__dirty&Hr&&!a.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,c){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,A(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ft(n[e],t,!0):n[e]=t;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===e||i===e+vf){var o=this._layers[i];ft(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,a=t[e];a&&(a.dom.parentNode.removeChild(a.dom),delete t[e],n.splice(dt(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var a=this._opts,i=this.root;if(e!=null&&(a.width=e),t!=null&&(a.height=t),e=wo(i,0,a),t=wo(i,1,a),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Si).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Si].dom;var t=new rg("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var a=t.dom.width,i=t.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,a,i):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var h=s[l];ci(n,h,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function s5(r){r.registerPainter("canvas",o5)}var l5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){if(process.env.NODE_ENV!=="production"){var n=t.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return In(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new it,a=ie("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(a),a.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=t.itemHeight*.8,u=ie(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var h=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=h*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Gt);function Eo(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=go(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<t.length;o++)i.push(go(r,e,t[o]));return i.join(" ")}}function _T(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!z(e))return e+"";for(var n=[],a=0;a<t.length;a++){var i=r.getDimensionIndex(t[a]);i>=0&&n.push(e[i])}return n.join(" ")}var yl=function(r){O(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o){this.removeAll();var s=ie(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=u5,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){wn(this.childAt(0))},e.prototype.downplay=function(){Tn(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=o!==this._symbolType,h=i&&i.disableAnimation;if(u){var f=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,f)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};h?c.attr(v):Dt(c,v,s,n),Lr(c)}if(this._updateCommon(t,n,l,a,i),u){var c=this.childAt(0);if(!h){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,$t(c,v,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,h,f,c,v,p,d,g,y;if(i&&(u=i.emphasisItemStyle,h=i.blurItemStyle,f=i.selectItemStyle,c=i.focus,v=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=m.getModel(["select","itemStyle"]).getItemStyle(),h=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),p=_.get("disabled"),d=he(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var x=hi(t.getItemVisual(n,"symbolOffset"),a);x&&(s.x=x[0],s.y=x[1]),y&&s.attr("cursor",y);var b=t.getItemVisual(n,"style"),w=b.fill;if(s instanceof ge){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(B({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(n,"liftZ"),D=this._z2;C!=null?D==null&&(this._z2=s.z2,s.z2+=C):D!=null&&(s.z2=D,this._z2=null);var M=o&&o.useNameLabel;Se(s,d,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:w,defaultOpacity:b.opacity});function I(P){return M?t.getName(P):Eo(t,P)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=h;var E=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*E,L.scaleY=this._sizeY*E,this.setSymbolScale(1),qt(this,c,v,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=st(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&Qn(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Qn(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return bo(t.getItemVisual(n,"symbolSize"))},e}(it);function u5(r,e){this.parent.drift(r,e)}function ng(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function ST(r){return r!=null&&!J(r)&&(r={isIgnore:r}),r||{}}function xT(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:he(e),cursorStyle:e.get("cursor")}}var ml=function(){function r(e){this.group=new it,this._SymbolCtor=e||yl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=ST(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=xT(e),u={disableAnimation:s},h=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||n.removeAll(),e.diff(i).add(function(f){var c=h(f);if(ng(e,c,f,t)){var v=new o(e,f,l,u);v.setPosition(c),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,c){var v=i.getItemGraphicEl(c),p=h(f);if(!ng(e,p,f,t)){n.remove(v);return}var d=e.getItemVisual(f,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==d)n.remove(v),v=new o(e,f,l,u),v.setPosition(p);else{v.updateData(e,f,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Dt(v,y,a)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var c=i.getItemGraphicEl(f);c&&c.fadeOut(function(){n.remove(c)},a)}).execute(),this._getSymbolPoint=h,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=xT(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=ST(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(ng(t,o,i,n)){var s=new this._SymbolCtor(t,i,this._seriesScope);s.traverse(a),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){Jn(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(a){a.fadeOut(function(){t.remove(a)},n.hostModel)}):t.removeAll()},r}();function bT(r,e,t){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=h5(a,t),o=n.dim,s=a.dim,l=e.mapDimension(s),u=e.mapDimension(o),h=s==="x"||s==="radius"?1:0,f=G(r.dimensions,function(p){return e.mapDimension(p)}),c=!1,v=e.getCalculationInfo("stackResultDimension");return sa(e,f[0])&&(c=!0,f[0]=v),sa(e,f[1])&&(c=!0,f[1]=v),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!c,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function h5(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:Ct(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function wT(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function f5(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function c5(r,e,t,n,a,i,o,s){for(var l=f5(r,e),u=[],h=[],f=[],c=[],v=[],p=[],d=[],g=bT(a,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_<l.length;_++){var S=l[_],x=!0,b=void 0,w=void 0;switch(S.cmd){case"=":b=S.idx*2,w=S.idx1*2;var T=y[b],C=y[b+1],D=m[w],M=m[w+1];(isNaN(T)||isNaN(C))&&(T=D,C=M),u.push(T,C),h.push(D,M),f.push(t[b],t[b+1]),c.push(n[w],n[w+1]),d.push(e.getRawIndex(S.idx1));break;case"+":var I=S.idx,L=g.dataDimsForPoint,E=a.dataToPoint([e.get(L[0],I),e.get(L[1],I)]);w=I*2,u.push(E[0],E[1]),h.push(m[w],m[w+1]);var P=wT(g,a,e,I);f.push(P[0],P[1]),c.push(n[w],n[w+1]),d.push(e.getRawIndex(I));break;case"-":x=!1}x&&(v.push(S),p.push(p.length))}p.sort(function(lt,kt){return d[lt]-d[kt]});for(var k=u.length,N=nn(k),R=nn(k),V=nn(k),F=nn(k),H=[],_=0;_<p.length;_++){var $=p[_],Q=_*2,et=$*2;N[Q]=u[et],N[Q+1]=u[et+1],R[Q]=h[et],R[Q+1]=h[et+1],V[Q]=f[et],V[Q+1]=f[et+1],F[Q]=c[et],F[Q+1]=c[et+1],H[_]=v[$]}return{current:N,next:R,stackedOnCurrent:V,stackedOnNext:F,status:H}}var la=Math.min,ua=Math.max;function xi(r,e){return isNaN(r)||isNaN(e)}function ag(r,e,t,n,a,i,o,s,l){for(var u,h,f,c,v,p,d=t,g=0;g<n;g++){var y=e[d*2],m=e[d*2+1];if(d>=a||d<0)break;if(xi(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),f=y,c=m;else{var _=y-u,S=m-h;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var x=d+i,b=e[x*2],w=e[x*2+1];b===y&&w===m&&g<n;)g++,x+=i,d+=i,b=e[x*2],w=e[x*2+1],y=e[d*2],m=e[d*2+1],_=y-u,S=m-h;var T=g+1;if(l)for(;xi(b,w)&&T<n;)T++,x+=i,b=e[x*2],w=e[x*2+1];var C=.5,D=0,M=0,I=void 0,L=void 0;if(T>=n||xi(b,w))v=y,p=m;else{D=b-u,M=w-h;var E=y-u,P=b-y,k=m-h,N=w-m,R=void 0,V=void 0;if(s==="x"){R=Math.abs(E),V=Math.abs(P);var F=D>0?1:-1;v=y-F*R*o,p=m,I=y+F*V*o,L=m}else if(s==="y"){R=Math.abs(k),V=Math.abs(N);var H=M>0?1:-1;v=y,p=m-H*R*o,I=y,L=m+H*V*o}else R=Math.sqrt(E*E+k*k),V=Math.sqrt(P*P+N*N),C=V/(V+R),v=y-D*o*(1-C),p=m-M*o*(1-C),I=y+D*o*C,L=m+M*o*C,I=la(I,ua(b,y)),L=la(L,ua(w,m)),I=ua(I,la(b,y)),L=ua(L,la(w,m)),D=I-y,M=L-m,v=y-D*R/V,p=m-M*R/V,v=la(v,ua(u,y)),p=la(p,ua(h,m)),v=ua(v,la(u,y)),p=ua(p,la(h,m)),D=y-v,M=m-p,I=y+D*V/R,L=m+M*V/R}r.bezierCurveTo(f,c,v,p,y,m),f=I,c=L}else r.lineTo(y,m)}u=y,h=m,d+=i}return g}var TT=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),v5=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new TT},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&xi(a[o*2-2],a[o*2-1]);o--);for(;i<o&&xi(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=ag(t,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=jr.CMD,s,l,u=n==="x",h=[],f=0;f<i.length;){var c=i[f++],v=void 0,p=void 0,d=void 0,g=void 0,y=void 0,m=void 0,_=void 0;switch(c){case o.M:s=i[f++],l=i[f++];break;case o.L:if(v=i[f++],p=i[f++],_=u?(t-s)/(v-s):(t-l)/(p-l),_<=1&&_>=0){var S=u?(p-l)*_+l:(v-s)*_+s;return u?[t,S]:[S,t]}s=v,l=p;break;case o.C:v=i[f++],p=i[f++],d=i[f++],g=i[f++],y=i[f++],m=i[f++];var x=u?bu(s,v,d,y,t,h):bu(l,p,g,m,t,h);if(x>0)for(var b=0;b<x;b++){var w=h[b];if(w<=1&&w>=0){var S=u?le(l,p,g,m,w):le(s,v,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(_t),p5=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(TT),CT=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new p5},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&xi(a[s*2-2],a[s*2-1]);s--);for(;o<s&&xi(a[o*2],a[o*2+1]);o++);}for(;o<s;){var u=ag(t,a,o,s,s,1,n.smooth,l,n.connectNulls);ag(t,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e}(_t);function DT(r,e,t,n,a){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,h=t.get(["lineStyle","width"])||0;o-=h/2,s-=h/2,l+=h,u+=h,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new wt({shape:{x:o,y:s,width:l,height:u}});if(e){var c=r.getBaseAxis(),v=c.isHorizontal(),p=c.inverse;v?(p&&(f.shape.x+=l),f.shape.width=0):(p||(f.shape.y+=u),f.shape.height=0);var d=j(a)?function(g){a(g,f)}:null;$t(f,{shape:{width:l,height:u,x:o,y:s}},t,null,n,d)}return f}function AT(r,e,t){var n=r.getArea(),a=Kt(n.r0,1),i=Kt(n.r,1),o=new Oe({shape:{cx:Kt(r.cx,1),cy:Kt(r.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=a,$t(o,{shape:{endAngle:n.endAngle,r:i}},t)}return o}function _l(r,e,t,n,a){if(r){if(r.type==="polar")return AT(r,e,t);if(r.type==="cartesian2d")return DT(r,e,t,n,a)}else return null;return null}function bi(r,e){return r.type===e}function MT(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function IT(r){for(var e=1/0,t=1/0,n=-1/0,a=-1/0,i=0;i<r.length;){var o=r[i++],s=r[i++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),a=Math.max(s,a))}return[[e,t],[n,a]]}function LT(r,e){var t=IT(r),n=t[0],a=t[1],i=IT(e),o=i[0],s=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(a[0]-s[0]),Math.abs(a[1]-s[1]))}function ET(r){return Ct(r)?r:r?.5:0}function d5(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),a=nn(n*2),i=0;i<n;i++){var o=wT(t,r,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function ha(r,e,t,n,a){var i=t.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,s=[],l=0,u=[],h=[],f=[],c=[];if(a){for(l=0;l<r.length;l+=2){var v=e||r;!isNaN(v[l])&&!isNaN(v[l+1])&&c.push(r[l],r[l+1])}r=c}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],h[0]=r[l],h[1]=r[l+1],s.push(h[0],h[1]),n){case"end":u[o]=f[o],u[1-o]=h[1-o],s.push(u[0],u[1]);break;case"middle":var p=(h[o]+f[o])/2,d=[];u[o]=d[o]=p,u[1-o]=h[1-o],d[1-o]=f[1-o],s.push(u[0],u[1]),s.push(d[0],d[1]);break;default:u[o]=h[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function g5(r,e){var t=[],n=r.length,a,i;function o(h,f,c){var v=h.coord,p=(c-v)/(f.coord-v),d=KE(p,[h.color,f.color]);return{coord:c,color:d}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)a=l;else if(u>e){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function y5(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(!i){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=e.getAxis(a),u=G(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),h=u.length,f=i.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),f.reverse());var c=g5(u,a==="x"?t.getWidth():t.getHeight()),v=c.length;if(!v&&h)return u[0].coord<0?f[1]?f[1]:u[h-1].color:f[0]?f[0]:u[0].color;var p=10,d=c[0].coord-p,g=c[v-1].coord+p,y=g-d;if(y<.001)return"transparent";A(c,function(_){_.offset=(_.coord-d)/y}),c.push({offset:v?c[v-1].offset:.5,color:f[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:f[0]||"transparent"});var m=new Ns(0,0,0,0,c,!0);return m[a]=d,m[a+"2"]=g,m}}function m5(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&_5(i,e))){var o=e.mapDimension(i.dim),s={};return A(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function _5(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if(yl.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function S5(r,e){return isNaN(r)||isNaN(e)}function x5(r){for(var e=r.length/2;e>0&&S5(r[e*2-2],r[e*2-1]);e--);return e-1}function PT(r,e){return[r[e*2],r[e*2+1]]}function b5(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+a],!(isNaN(o)||isNaN(r[u*2+1-a]))){if(u===0){i=o;continue}if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function kT(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<Ne.length;e++)if(r.get([Ne[e],"endLabel","show"]))return!0;return!1}function ig(r,e,t,n){if(bi(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=kT(n)?function(v,p){r._endLabelOnDuring(v,p,o,s,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),h=DT(e,t,n,function(){var v=r._endLabel;v&&t&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=h.shape,c=Math.max(f.width,f.height);u?(f.y-=c,f.height+=c*2):(f.x-=c,f.width+=c*2)}return l&&l(1,h),h}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),AT(e,t,n)}function w5(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),a=t.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var T5=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new it,n=new ml;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=Z(this._changePolyState,this)},e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),h=s.getLayout("points")||[],f=i.type==="polar",c=this._coordSys,v=this._symbolDraw,p=this._polyline,d=this._polygon,g=this._lineGroup,y=!n.ssr&&t.get("animation"),m=!u.isEmpty(),_=u.get("origin"),S=bT(i,s,_),x=m&&d5(i,s,S),b=t.get("showSymbol"),w=t.get("connectNulls"),T=b&&!f&&m5(t,s,i),C=this._data;C&&C.eachItemGraphicEl(function(lt,kt){lt.__temp&&(o.remove(lt),C.setItemGraphicEl(kt,null))}),b||v.remove(),o.add(g);var D=f?!1:t.get("step"),M;i&&i.getArea&&t.get("clip",!0)&&(M=i.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var I=y5(s,i,a)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&c.type===i.type&&D===this._step))b&&v.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(lt){return[h[lt*2],h[lt*2+1]]}}),y&&this._initSymbolLabelAnimation(s,i,M),D&&(x&&(x=ha(x,h,i,D,w)),h=ha(h,null,i,D,w)),p=this._newPolyline(h),m?d=this._newPolygon(h,x):d&&(g.remove(d),d=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,ni(I)),g.setClipPath(ig(this,i,!0,t));else{m&&!d?d=this._newPolygon(h,x):d&&!m&&(g.remove(d),d=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,ni(I));var L=g.getClipPath();if(L){var E=ig(this,i,!1,t);$t(L,{shape:E.shape},t)}else g.setClipPath(ig(this,i,!0,t));b&&v.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(lt){return[h[lt*2],h[lt*2+1]]}}),(!MT(this._stackedOnPoints,x)||!MT(this._points,h))&&(y?this._doUpdateAnimation(s,x,i,a,D,_,w):(D&&(x&&(x=ha(x,h,i,D,w)),h=ha(h,null,i,D,w)),p.setShape({points:h}),d&&d.setShape({points:h,stackedOnPoints:x})))}var P=t.getModel("emphasis"),k=P.get("focus"),N=P.get("blurScope"),R=P.get("disabled");if(p.useStyle(rt(l.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),_e(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var V=p.getState("emphasis").style;V.lineWidth=+p.style.lineWidth+1}st(p).seriesIndex=t.seriesIndex,qt(p,k,N,R);var F=ET(t.get("smooth")),H=t.get("smoothMonotone");if(p.setShape({smooth:F,smoothMonotone:H,connectNulls:w}),d){var $=s.getCalculationInfo("stackedOnSeries"),Q=0;d.useStyle(rt(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),$&&(Q=ET($.get("smooth"))),d.setShape({smooth:F,stackedOnSmooth:Q,smoothMonotone:H,connectNulls:w}),_e(d,t,"areaStyle"),st(d).seriesIndex=t.seriesIndex,qt(d,k,N,R)}var et=this._changePolyState;s.eachItemGraphicEl(function(lt){lt&&(lt.onHoverStateChange=et)}),this._polyline.onHoverStateChange=et,this._data=s,this._coordSys=i,this._stackedOnPoints=x,this._points=h,this._step=D,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,n){st(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=Oa(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],f=l[s*2+1];if(isNaN(h)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,f))return;var c=t.get("zlevel")||0,v=t.get("z")||0;u=new yl(o,s),u.x=h,u.y=f,u.setZ(c,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=c,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Rt.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=Oa(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Rt.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;Ju(this._polyline,t),n&&Ju(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new v5({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new CT({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,h=u.get("animationDuration");j(h)&&(h=h(null));var f=u.get("animationDelay")||0,c=j(f)?f(null):f;t.eachItemGraphicEl(function(v,p){var d=v;if(d){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(a)if(o){var S=a,x=n.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-x[1]/180*Math.PI):(y=S.r0,m=S.r,_=x[0])}else{var b=a;i?(y=b.x,m=b.x+b.width,_=v.x):(y=b.y+b.height,m=b.y,_=v.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=j(f)?f(p):h*w+c,C=d.getSymbolPath(),D=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(kT(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Tt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=x5(l);h>=0&&(Se(s,he(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:h,defaultText:function(f,c,v){return v!=null?_T(o,v):Eo(o,f)},enableTextSetter:!0},w5(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,h=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),c=a.hostModel,v=c.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,x=(y?d:0)*(m?-1:1),b=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=b5(f,S,w),C=T.range,D=C[1]-C[0],M=void 0;if(D>=1){if(D>1&&!v){var I=PT(f,C[0]);u.attr({x:I[0]+x,y:I[1]+b}),o&&(M=c.getRawValue(C[0]))}else{var I=h.getPointOn(S,w);I&&u.attr({x:I[0]+x,y:I[1]+b});var L=c.getRawValue(C[0]),E=c.getRawValue(C[1]);o&&(M=$_(a,p,L,E,T.t))}i.lastFrameIndex=C[0]}else{var P=t===1||i.lastFrameIndex>0?C[0]:0,I=PT(f,P);o&&(M=c.getRawValue(P)),u.attr({x:I[0]+x,y:I[1]+b})}if(o){var k=io(u);typeof k.setLabelText=="function"&&k.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,h=this._polygon,f=t.hostModel,c=c5(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=c.current,p=c.stackedOnCurrent,d=c.next,g=c.stackedOnNext;if(o&&(p=ha(c.stackedOnCurrent,c.current,a,o,l),v=ha(c.current,null,a,o,l),g=ha(c.stackedOnNext,c.next,a,o,l),d=ha(c.next,null,a,o,l)),LT(v,d)>3e3||h&&LT(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),h&&(h.stopAnimation(),h.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=c.current,u.shape.points=v;var y={shape:{points:d}};c.current!==v&&(y.shape.__points=c.next),u.stopAnimation(),Dt(u,y,f),h&&(h.setShape({points:v,stackedOnPoints:p}),h.stopAnimation(),Dt(h,{shape:{stackedOnPoints:g}},f),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var m=[],_=c.status,S=0;S<_.length;S++){var x=_[S].cmd;if(x==="="){var b=t.getItemGraphicEl(_[S].idx1);b&&m.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){h&&h.dirtyShape();for(var w=u.shape.__points,T=0;T<m.length;T++){var C=m[T].el,D=m[T].ptIdx*2;C.x=w[D],C.y=w[D+1],C.markRedraw()}})},e.prototype.remove=function(t){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Rt);function Sl(r,e){return{seriesType:r,plan:_o(),reset:function(t){var n=t.getData(),a=t.coordinateSystem,i=t.pipelineContext,o=e||i.large;if(a){var s=G(a.dimensions,function(v){return n.mapDimension(v)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");sa(n,s[0])&&(s[0]=u),sa(n,s[1])&&(s[1]=u);var h=n.getStore(),f=n.getDimensionIndex(s[0]),c=n.getDimensionIndex(s[1]);return l&&{progress:function(v,p){for(var d=v.end-v.start,g=o&&nn(d*l),y=[],m=[],_=v.start,S=0;_<v.end;_++){var x=void 0;if(l===1){var b=h.get(f,_);x=a.dataToPoint(b,null,m)}else y[0]=h.get(f,_),y[1]=h.get(c,_),x=a.dataToPoint(y,null,m);o?(g[S++]=x[0],g[S++]=x[1]):p.setItemLayout(_,x.slice())}o&&p.setLayout("points",g)}}}}}}var C5={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},D5=function(r){return Math.round(r.length/2)};function RT(r){return{seriesType:r,reset:function(e,t,n){var a=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,s=a.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),f=n.getDevicePixelRatio(),c=Math.abs(h[1]-h[0])*(f||1),v=Math.round(s/c);if(isFinite(v)&&v>1){i==="lttb"?e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v)):i==="minmax"&&e.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/v));var p=void 0;U(i)?p=C5[i]:j(i)&&(p=i),p&&e.setData(a.downSample(a.mapDimension(u.dim),1/v,p,D5))}}}}}function A5(r){r.registerChartView(T5),r.registerSeriesModel(l5),r.registerLayout(Sl("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,RT("line"))}var xl=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return In(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(a)A(i.getAxes(),function(c,v){if(c.type==="category"&&n!=null){var p=c.getTicksCoords(),d=c.getTickModel().get("alignWithLabel"),g=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[v]=c.toGlobalCoord(c.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,x=0;x<p.length;x++){var b=p[x].coord,w=x===p.length-1?p[x-1].tickValue+S:p[x].tickValue;if(w===g){_=b;break}else if(w<g)m=b;else if(m!=null&&w>g){_=(b+m)/2;break}x===1&&(S=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+h/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Gt);Gt.registerClass(xl);var M5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return In(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ta(xl.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(xl),I5=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),pf=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new I5},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,h=n.startAngle,f=n.endAngle,c=n.clockwise,v=Math.PI*2,p=c?f-h<v:h-f<v;p||(h=f-(c?v:-v));var d=Math.cos(h),g=Math.sin(h),y=Math.cos(f),m=Math.sin(f);p?(t.moveTo(d*o+a,g*o+i),t.arc(d*u+a,g*u+i,l,-Math.PI+h,h,!c)):t.moveTo(d*s+a,g*s+i),t.arc(a,i,s,h,f,!c),t.arc(y*u+a,m*u+i,l,f-Math.PI*2,f-Math.PI,!c),o!==0&&t.arc(a,i,o,f,h,c)},e}(_t);function L5(r,e){e=e||{};var t=e.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return Vu(n,a,i);var s=r(o),l=a.distance!=null?a.distance:5,u=this.shape,h=u.cx,f=u.cy,c=u.r,v=u.r0,p=(c+v)/2,d=u.startAngle,g=u.endAngle,y=(d+g)/2,m=t?Math.abs(c-v)/2:0,_=Math.cos,S=Math.sin,x=h+c*_(d),b=f+c*S(d),w="left",T="top";switch(s){case"startArc":x=h+(v-l)*_(y),b=f+(v-l)*S(y),w="center",T="top";break;case"insideStartArc":x=h+(v+l)*_(y),b=f+(v+l)*S(y),w="center",T="bottom";break;case"startAngle":x=h+p*_(d)+df(d,l+m,!1),b=f+p*S(d)+gf(d,l+m,!1),w="right",T="middle";break;case"insideStartAngle":x=h+p*_(d)+df(d,-l+m,!1),b=f+p*S(d)+gf(d,-l+m,!1),w="left",T="middle";break;case"middle":x=h+p*_(y),b=f+p*S(y),w="center",T="middle";break;case"endArc":x=h+(c+l)*_(y),b=f+(c+l)*S(y),w="center",T="bottom";break;case"insideEndArc":x=h+(c-l)*_(y),b=f+(c-l)*S(y),w="center",T="top";break;case"endAngle":x=h+p*_(g)+df(g,l+m,!0),b=f+p*S(g)+gf(g,l+m,!0),w="left",T="middle";break;case"insideEndAngle":x=h+p*_(g)+df(g,-l+m,!0),b=f+p*S(g)+gf(g,-l+m,!0),w="right",T="middle";break;default:return Vu(n,a,i)}return n=n||{},n.x=x,n.y=b,n.align=w,n.verticalAlign=T,n}}function E5(r,e,t,n){if(Ct(n)){r.setTextConfig({rotation:n});return}else if(z(e)){r.setTextConfig({rotation:0});return}var a=r.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,s=(i+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var h=Math.PI*1.5-l;u==="middle"&&h>Math.PI/2&&h<Math.PI*1.5&&(h-=Math.PI),r.setTextConfig({rotation:h})}function df(r,e,t){return e*Math.sin(r)*(t?-1:1)}function gf(r,e,t){return e*Math.cos(r)*(t?1:-1)}function wi(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;z(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:G(n,function(i){return Ar(i,a)})}}var og=Math.max,sg=Math.min;function P5(r,e){var t=r.getArea&&r.getArea();if(bi(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var a=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=a,t.width+=a*2):(t.y-=a,t.height+=a*2)}}return t}var k5=function(r){O(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,a,i){this._model=t,this._removeOnRenderedListener(a),this._updateDrawMode(t);var o=t.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,a):this._renderNormal(t,n,a,i)):process.env.NODE_ENV!=="production"&&Xt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){Jn(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t,n,a,i){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,h=u.getBaseAxis(),f;u.type==="cartesian2d"?f=h.isHorizontal():u.type==="polar"&&(f=h.dim==="angle");var c=t.isAnimationEnabled()?t:null,v=R5(t,u);v&&this._enableRealtimeSort(v,s,a);var p=t.get("clip",!0)||v,d=P5(u,s);o.removeClipPath();var g=t.get("roundCap",!0),y=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),_=m.get("borderRadius")||0,S=[],x=this._backgroundEls,b=i&&i.isInitSort,w=i&&i.type==="changeAxisOrder";function T(M){var I=yf[u.type](s,M),L=F5(u,f,I);return L.useStyle(m.getItemStyle()),u.type==="cartesian2d"?L.setShape("r",_):L.setShape("cornerRadius",_),S[M]=L,L}s.diff(l).add(function(M){var I=s.getItemModel(M),L=yf[u.type](s,M,I);if(y&&T(M),!(!s.hasValue(M)||!zT[u.type](L))){var E=!1;p&&(E=NT[u.type](d,L));var P=OT[u.type](t,s,M,L,f,c,h.model,!1,g);v&&(P.forceLabelAnimation=!0),FT(P,s,M,I,L,t,f,u.type==="polar"),b?P.attr({shape:L}):v?VT(v,c,P,L,M,f,!1,!1):$t(P,{shape:L},t,M),s.setItemGraphicEl(M,P),o.add(P),P.ignore=E}}).update(function(M,I){var L=s.getItemModel(M),E=yf[u.type](s,M,L);if(y){var P=void 0;x.length===0?P=T(I):(P=x[I],P.useStyle(m.getItemStyle()),u.type==="cartesian2d"?P.setShape("r",_):P.setShape("cornerRadius",_),S[M]=P);var k=yf[u.type](s,M),N=UT(f,k,u);Dt(P,{shape:N},c,M)}var R=l.getItemGraphicEl(I);if(!s.hasValue(M)||!zT[u.type](E)){o.remove(R);return}var V=!1;if(p&&(V=NT[u.type](d,E),V&&o.remove(R)),R?Lr(R):R=OT[u.type](t,s,M,E,f,c,h.model,!!R,g),v&&(R.forceLabelAnimation=!0),w){var F=R.getTextContent();if(F){var H=io(F);H.prevValue!=null&&(H.prevValue=H.value)}}else FT(R,s,M,L,E,t,f,u.type==="polar");b?R.attr({shape:E}):v?VT(v,c,R,E,M,f,!0,w):Dt(R,{shape:E},t,M,null),s.setItemGraphicEl(M,R),R.ignore=V,o.add(R)}).remove(function(M){var I=l.getItemGraphicEl(M);I&&Os(I,t,M)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new it);C.removeAll();for(var D=0;D<S.length;++D)C.add(S[D]);o.add(C),this._backgroundEls=S,this._data=s},e.prototype._renderLarge=function(t,n,a){this._clear(),WT(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),WT(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&_l(t.coordinateSystem,!1,t),a=this.group;n?a.setClipPath(n):a.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,a){var i=this;if(n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,a),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),h=u&&u.shape;return h&&Math.abs(o.isHorizontal()?h.height:h.width)||0};this._onRendered=function(){i._updateSortWithinSameData(n,s,o,a)},a.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,a){var i=[];return t.each(t.mapDimension(n.dim),function(o,s){var l=a(s);l=l??NaN,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:G(i,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,a){for(var i=a.scale,o=t.mapDimension(a.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var h=t.rawIndexOf(o,i.getRawOrdinalNumber(l)),f=h<0?Number.MIN_VALUE:n(t.indexOfRawIndex(h));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Os(i,t,st(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Rt),NT={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=og(e.x,r.x),s=sg(e.x+e.width,a),l=og(e.y,r.y),u=sg(e.y+e.height,i),h=s<o,f=u<l;return e.x=h&&o>a?s:o,e.y=f&&l>i?u:l,e.width=h?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),h||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=sg(e.r,r.r),i=og(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},OT={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new wt({shape:B({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var h=u.shape,f=a?"height":"width";h[f]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?pf:Oe,h=new u({shape:n,z2:1});h.name="item";var f=GT(a);if(h.calculateTextPosition=L5(f,{isRoundCap:u===pf}),i){var c=h.shape,v=a?"r":"endAngle",p={};c[v]=a?n.r0:n.startAngle,p[v]=n[v],(s?Dt:$t)(h,{shape:p},i)}return h}};function R5(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&t&&(n.type!=="category"&&Xt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&Xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function VT(r,e,t,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Dt:$t)(t,{shape:l},e,a,null);var h=e?r.baseAxis.model:null;(o?Dt:$t)(t,{shape:u},h,a)}function BT(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var N5=["x","y","width","height"],O5=["cx","cy","r","startAngle","endAngle"],zT={cartesian2d:function(r){return!BT(r,N5)},polar:function(r){return!BT(r,O5)}},yf={cartesian2d:function(r,e,t){var n=r.getItemLayout(e),a=t?B5(t,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function V5(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function GT(r){return function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}}(r)}function FT(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var h=r.shape,f=wi(n.getModel("itemStyle"),h,!0);B(h,f),r.setShape(h)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=n.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",p=he(n);Se(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:Eo(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var d=r.getTextContent();if(s&&d){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,E5(r,g==="outside"?v:g,GT(o),n.get(["label","rotate"]))}hS(d,p,i.getRawValue(t),function(m){return _T(e,m)});var y=n.getModel(["emphasis"]);qt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),_e(r,n),V5(a)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function B5(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var z5=function(){function r(){}return r}(),HT=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new z5},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h<a.length;h+=3)l[i]=u,l[o]=a[h+2],s[i]=a[h+i],s[o]=a[h+o],t.rect(s[0],s[1],l[0],l[1])},e}(_t);function WT(r,e,t,n){var a=r.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),s=a.getLayout("size"),l=r.getModel("backgroundStyle"),u=a.getLayout("largeBackgroundPoints");if(u){var h=new HT({shape:{points:u},incremental:!!n,silent:!0,z2:0});h.baseDimIdx=i,h.largeDataIndices=o,h.barWidth=s,h.useStyle(l.getItemStyle()),e.add(h),t&&t.push(h)}var f=new HT({shape:{points:a.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(a.getVisual("style")),f.style.stroke=null,st(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",$T),f.on("mousemove",$T)),t&&t.push(f)}var $T=nd(function(r){var e=this,t=G5(e,r.offsetX,r.offsetY);st(e).dataIndex=t>=0?t:null},30,!1);function G5(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,h=0,f=i.length/3;h<f;h++){var c=h*3;if(l[n]=u,l[a]=i[c+2],s[n]=i[c+n],s[a]=i[c+a],l[a]<0&&(s[a]+=l[a],l[a]=-l[a]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[h]}return-1}function UT(r,e,t){if(bi(t,"cartesian2d")){var n=e,a=t.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=t.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function F5(r,e,t){var n=r.type==="polar"?Oe:wt;return new n({shape:UT(e,t,r),silent:!0,z2:0})}function H5(r){r.registerChartView(k5),r.registerSeriesModel(M5),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ht(lw,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,uw("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,RT("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var YT=Math.PI*2,mf=Math.PI/180;function ZT(r,e){return se(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function XT(r,e){var t=ZT(r,e),n=r.get("center"),a=r.get("radius");z(a)||(a=[0,a]);var i=W(t.width,e.getWidth()),o=W(t.height,e.getHeight()),s=Math.min(i,o),l=W(a[0],s/2),u=W(a[1],s/2),h,f,c=r.coordinateSystem;if(c){var v=c.dataToPoint(n);h=v[0]||0,f=v[1]||0}else z(n)||(n=[n,n]),h=W(n[0],i)+t.x,f=W(n[1],o)+t.y;return{cx:h,cy:f,r0:l,r:u}}function W5(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=ZT(n,t),s=XT(n,t),l=s.cx,u=s.cy,h=s.r,f=s.r0,c=-n.get("startAngle")*mf,v=n.get("endAngle"),p=n.get("padAngle")*mf;v=v==="auto"?c-YT:-v*mf;var d=n.get("minAngle")*mf,g=d+p,y=0;a.each(i,function(N){!isNaN(N)&&y++});var m=a.getSum(i),_=Math.PI/(m||y)*2,S=n.get("clockwise"),x=n.get("roseType"),b=n.get("stillShowZeroSum"),w=a.getDataExtent(i);w[0]=0;var T=S?1:-1,C=[c,v],D=T*p/2;jv(C,!S),c=C[0],v=C[1];var M=qT(n);M.startAngle=c,M.endAngle=v,M.clockwise=S;var I=Math.abs(v-c),L=I,E=0,P=c;if(a.setLayout({viewRect:o,r:h}),a.each(i,function(N,R){var V;if(isNaN(N)){a.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:f,r:x?NaN:h});return}x!=="area"?V=m===0&&b?_:N*_:V=I/y,V<g?(V=g,L-=g):E+=N;var F=P+T*V,H=0,$=0;p>V?(H=P+T*V/2,$=H):(H=P+D,$=F-D),a.setItemLayout(R,{angle:V,startAngle:H,endAngle:$,clockwise:S,cx:l,cy:u,r0:f,r:x?It(N,w,[f,h]):h}),P=F}),L<YT&&y)if(L<=.001){var k=I/y;a.each(i,function(N,R){if(!isNaN(N)){var V=a.getItemLayout(R);V.angle=k;var F=0,H=0;k<p?(F=c+T*(R+1/2)*k,H=F):(F=c+T*R*k+D,H=c+T*(R+1)*k-D),V.startAngle=F,V.endAngle=H}})}else _=L/E,P=c,a.each(i,function(N,R){if(!isNaN(N)){var V=a.getItemLayout(R),F=V.angle===g?g:N*_,H=0,$=0;F<p?(H=P+T*F/2,$=H):(H=P+D,$=P+T*F-D),V.startAngle=H,V.endAngle=$,P+=T*F}})})}var qT=bt();function bl(r){return{seriesType:r,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=e.getData();a.filterSelf(function(i){for(var o=a.getName(i),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var $5=Math.PI/180;function KT(r,e,t,n,a,i,o,s,l,u){if(r.length<2)return;function h(d){for(var g=d.rB,y=g*g,m=0;m<d.list.length;m++){var _=d.list[m],S=Math.abs(_.label.y-t),x=n+_.len,b=x*x,w=Math.sqrt(Math.abs((1-S*S/y)*b)),T=e+(w+_.len2)*a,C=T-_.label.x,D=_.targetTextWidth-C*a;jT(_,D,!0),_.label.x=T}}function f(d){for(var g={list:[],maxY:0},y={list:[],maxY:0},m=0;m<d.length;m++)if(d[m].labelAlignTo==="none"){var _=d[m],S=_.label.y>t?y:g,x=Math.abs(_.label.y-t);if(x>=S.maxY){var b=_.label.x-e-_.len2*a,w=n+_.len,T=Math.abs(b)<w?Math.sqrt(x*x/(1-b*b/w/w)):w;S.rB=T,S.maxY=x}S.list.push(_)}h(g),h(y)}for(var c=r.length,v=0;v<c;v++)if(r[v].position==="outer"&&r[v].labelAlignTo==="labelLine"){var p=r[v].label.x-u;r[v].linePoints[1][0]+=p,r[v].label.x=u}zw(r,l,l+o)&&f(r)}function U5(r,e,t,n,a,i,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,f=-Number.MAX_VALUE,c=0;c<r.length;c++){var v=r[c].label;lg(r[c])||(v.x<e?(h=Math.min(h,v.x),l.push(r[c])):(f=Math.max(f,v.x),u.push(r[c])))}for(var c=0;c<r.length;c++){var p=r[c];if(!lg(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var v=p.label,d=p.linePoints,g=void 0;p.labelAlignTo==="edge"?v.x<e?g=d[2][0]-p.labelDistance-o-p.edgeDistance:g=o+a-p.edgeDistance-d[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?v.x<e?g=h-o-p.bleedMargin:g=o+a-f-p.bleedMargin:v.x<e?g=v.x-o-p.bleedMargin:g=o+a-v.x-p.bleedMargin,p.targetTextWidth=g,jT(p,g)}}KT(u,e,t,n,1,a,i,o,s,f),KT(l,e,t,n,-1,a,i,o,s,h);for(var c=0;c<r.length;c++){var p=r[c];if(!lg(p)&&p.linePoints){var v=p.label,d=p.linePoints,y=p.labelAlignTo==="edge",m=v.style.padding,_=m?m[1]+m[3]:0,S=v.style.backgroundColor?0:_,x=p.rect.width+S,b=d[1][0]-d[2][0];y?v.x<e?d[2][0]=o+p.edgeDistance+x+p.labelDistance:d[2][0]=o+a-p.edgeDistance-x-p.labelDistance:(v.x<e?d[2][0]=v.x+p.labelDistance:d[2][0]=v.x-p.labelDistance,d[1][0]=d[2][0]+b),d[1][1]=d[2][1]=v.y}}}function jT(r,e,t){if(t===void 0&&(t=!1),r.labelStyleWidth==null){var n=r.label,a=n.style,i=r.rect,o=a.backgroundColor,s=a.padding,l=s?s[1]+s[3]:0,u=a.overflow,h=i.width+(o?0:l);if(e<h||t){var f=i.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var c=n.getBoundingRect();n.setStyle("width",Math.ceil(c.width)),n.setStyle("backgroundColor",o)}else{var v=e-l,p=e<h?v:t?v>r.unconstrainedWidth?null:v:null;n.setStyle("width",p)}var d=n.getBoundingRect();i.width=d.width;var g=(n.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-f)/2}}}function lg(r){return r.position==="center"}function Y5(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*$5,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,h=s.x,f=s.y,c=s.height;function v(b){b.ignore=!0}function p(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}e.each(function(b){var w=e.getItemGraphicEl(b),T=w.shape,C=w.getTextContent(),D=w.getTextGuideLine(),M=e.getItemModel(b),I=M.getModel("label"),L=I.get("position")||M.get(["emphasis","label","position"]),E=I.get("distanceToLabelLine"),P=I.get("alignTo"),k=W(I.get("edgeDistance"),u),N=I.get("bleedMargin"),R=M.getModel("labelLine"),V=R.get("length");V=W(V,u);var F=R.get("length2");if(F=W(F,u),Math.abs(T.endAngle-T.startAngle)<o){A(C.states,v),C.ignore=!0,D&&(A(D.states,v),D.ignore=!0);return}if(p(C)){var H=(T.startAngle+T.endAngle)/2,$=Math.cos(H),Q=Math.sin(H),et,lt,kt,jt;n=T.cx,a=T.cy;var pt=L==="inside"||L==="inner";if(L==="center")et=T.cx,lt=T.cy,jt="center";else{var nt=(pt?(T.r+T.r0)/2*$:T.r*$)+n,yt=(pt?(T.r+T.r0)/2*Q:T.r*Q)+a;if(et=nt+$*3,lt=yt+Q*3,!pt){var K=nt+$*(V+l-T.r),ut=yt+Q*(V+l-T.r),Ht=K+($<0?-1:1)*F,Et=ut;P==="edge"?et=$<0?h+k:h+u-k:et=Ht+($<0?-E:E),lt=Et,kt=[[nt,yt],[K,ut],[Ht,Et]]}jt=pt?"center":P==="edge"?$>0?"right":"left":$>0?"left":"right"}var Vt=Math.PI,Zt=0,pe=I.get("rotate");if(Ct(pe))Zt=pe*(Vt/180);else if(L==="center")Zt=0;else if(pe==="radial"||pe===!0){var er=$<0?-H+Vt:-H;Zt=er}else if(pe==="tangential"&&L!=="outside"&&L!=="outer"){var Xe=Math.atan2($,Q);Xe<0&&(Xe=Vt*2+Xe);var Vi=Q>0;Vi&&(Xe=Vt+Xe),Zt=Xe-Vt}if(i=!!Zt,C.x=et,C.y=lt,C.rotation=Zt,C.setStyle({verticalAlign:"middle"}),pt){C.setStyle({align:jt});var Jm=C.states.select;Jm&&(Jm.x+=C.x,Jm.y+=C.y)}else{var _a=C.getBoundingRect().clone();_a.applyTransform(C.getComputedTransform());var oL=(C.style.margin||0)+2.1;_a.y-=oL/2,_a.height+=oL,t.push({label:C,labelLine:D,position:L,len:V,len2:F,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new ct($,Q),linePoints:kt,textAlign:jt,labelDistance:E,labelAlignTo:P,edgeDistance:k,bleedMargin:N,rect:_a,unconstrainedWidth:_a.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:pt})}}),!i&&r.get("avoidLabelOverlap")&&U5(t,n,a,l,u,c,h,f);for(var d=0;d<t.length;d++){var g=t[d],y=g.label,m=g.labelLine,_=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),_&&(A(y.states,v),y.ignore=!0);var S=y.states.select;S&&(S.x+=y.x,S.y+=y.y)}if(m){var x=g.linePoints;_||!x?(A(m.states,v),m.ignore=!0):(Ow(x,g.minTurnAngle),dz(x,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:x}),y.__hostTarget.textGuideLineConfig={anchor:new ct(x[0][0],x[0][1])})}}}var Z5=function(r){O(e,r);function e(t,n,a){var i=r.call(this)||this;i.z2=2;var o=new Tt;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.hostModel,l=t.getItemModel(n),u=l.getModel("emphasis"),h=t.getItemLayout(n),f=B(wi(l.getModel("itemStyle"),h,!0),h);if(isNaN(f.startAngle)){o.setShape(f);return}if(i){o.setShape(f);var c=s.getShallow("animationType");s.ecModel.ssr?($t(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):c==="scale"?(o.shape.r=h.r0,$t(o,{shape:{r:h.r}},s,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),$t(o,{shape:{startAngle:h.startAngle,endAngle:h.endAngle}},s,n)):(o.shape.endAngle=h.startAngle,Dt(o,{shape:{endAngle:h.endAngle}},s,n))}else Lr(o),Dt(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),_e(o,l);var v=(h.startAngle+h.endAngle)/2,p=s.get("selectedOffset"),d=Math.cos(v)*p,g=Math.sin(v)*p,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=B({r:h.r+(u.get("scale")&&u.get("scaleSize")||0)},wi(u.getModel("itemStyle"),h)),B(o.ensureState("select"),{x:d,y:g,shape:wi(l.getModel(["select","itemStyle"]),h)}),B(o.ensureState("blur"),{shape:wi(l.getModel(["blur","itemStyle"]),h)});var m=o.getTextGuideLine(),_=o.getTextContent();m&&B(m.ensureState("select"),{x:d,y:g}),B(_.ensureState("select"),{x:d,y:g}),qt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this,o=n.getItemModel(a),s=o.getModel("labelLine"),l=n.getItemVisual(a,"style"),u=l&&l.fill,h=l&&l.opacity;Se(i,he(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:h,defaultText:t.getFormattedLabel(a,"normal")||n.getName(a)});var f=i.getTextContent();i.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var c=t.get(["label","position"]);if(c!=="outside"&&c!=="outer")i.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new Be,this.setTextGuideLine(v)),Gd(this,Fd(o),{stroke:u,opacity:rr(s.get(["lineStyle","opacity"]),h,1)})}},e}(Oe),X5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a,i){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var h=o.getItemLayout(0),f=1;isNaN(h&&h.startAngle)&&f<o.count();++f)h=o.getItemLayout(f);h&&(u=h.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var c=qT(t),v=new Oe({shape:B(XT(t,a),c)});v.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=v,l.add(v)}o.diff(s).add(function(p){var d=new Z5(o,p,u);o.setItemGraphicEl(p,d),l.add(d)}).update(function(p,d){var g=s.getItemGraphicEl(d);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var d=s.getItemGraphicEl(p);Os(d,t,p)}).execute(),Y5(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="pie",e}(Rt);function Po(r,e,t){e=z(e)&&{coordDimensions:e}||B({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=ul(n,e).dimensions,i=new ze(a,r);return i.initData(n,t),i}var wl=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r}(),q5=bt(),K5=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new wl(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Po(this,{coordDimensions:["value"],encodeDefaulter:ht(Np,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=q5(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=RP(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Na(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Gt);function j5(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(Ct(o)&&!isNaN(o)&&o<0)})}}}function Q5(r){r.registerChartView(X5),r.registerSeriesModel(K5),rb("pie",r.registerAction),r.registerLayout(ht(W5,"pie")),r.registerProcessor(bl("pie")),r.registerProcessor(j5("pie"))}var J5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return In(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Gt),QT=4,t3=function(){function r(){}return r}(),e3=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new t3},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<QT,h=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<a.length;){var c=a[f++],v=a[f++];isNaN(c)||isNaN(v)||h&&!h.contain(c,v)||(s.x=c-i[0]/2,s.y=v-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,n=t.points,a=t.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-a[0]/2,u-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,n){for(var a=this.shape,i=a.points,o=a.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var h=u*2,f=i[h]-s/2,c=i[h+1]-l/2;if(t>=f&&n>=c&&t<=f+s&&n<=c+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,h=-1/0,f=-1/0,c=0;c<a.length;){var v=a[c++],p=a[c++];l=Math.min(v,l),h=Math.max(v,h),u=Math.min(p,u),f=Math.max(p,f)}t=this._rect=new vt(l-o/2,u-s/2,h-l+o,f-u+s)}return t},e}(_t),r3=function(){function r(){this.group=new it}return r.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var a=(n.endIndex-n.startIndex)*2,i=n.startIndex*4*2;t=new Float32Array(t.buffer,i,a)}n.setShape("points",t),n.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,n){var a=this._newAdded[0],i=t.getLayout("points"),o=a&&a.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),a.endIndex=e.end,a.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,t,n)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new e3({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=ie(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<QT;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=st(e);u.seriesIndex=a.seriesIndex,e.on("mousemove",function(h){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),n3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Sl("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new r3:new ml,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Rt),a3=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(St),ug=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ne).models[0]},e.type="cartesian2dAxis",e}(St);te(ug,fl);var JT={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},i3=ft({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},JT),hg=ft({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},JT),o3=ft({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},hg),s3=rt({logBase:10},hg);const tC={category:i3,value:hg,time:o3,log:s3};var l3={value:1,category:1,time:1,log:1};function ko(r,e,t,n){A(l3,function(a,i){var o=ft(ft({},tC[i],!0),n,!0),s=function(l){O(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=e+"Axis."+i,h}return u.prototype.mergeDefaultAndTheme=function(h,f){var c=Ws(this),v=c?fo(h):{},p=f.getTheme();ft(h,p.get(i+"Axis")),ft(h,this.getDefaultOption()),h.type=eC(h),c&&ra(h,v,c)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=Md.createByAxisModel(this))},u.prototype.getCategories=function(h){var f=this.option;if(f.type==="category")return h?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",eC)}function eC(r){return r.type||(r.data?"category":"value")}var u3=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),At(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),fg=["x","y"];function rC(r){return r.type==="interval"||r.type==="time"}var h3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=fg,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!rC(t)||!rC(n))){var a=t.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,f=(s[1]-o[1])/u,c=o[0]-a[0]*h,v=o[1]-i[0]*f,p=this._transform=[h,0,0,f,c,v];this._invTransform=Fi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var a=this.dataToPoint(t),i=this.dataToPoint(n),o=this.getArea(),s=new vt(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,a){a=a||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return ye(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},e.prototype.clampData=function(t,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(t[0]),u=i.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n){var a=[];if(this._invTransform)return ye(a,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(t[0]),n),a[1]=o.coordToData(o.toLocalCoord(t[1]),n),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-t,o=Math.min(a[0],a[1])-t,s=Math.max(n[0],n[1])-i+t,l=Math.max(a[0],a[1])-o+t;return new vt(i,o,s,l)},e}(u3),f3=function(r){O(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Nr);function cg(r,e,t){t=t||{};var n=r.coordinateSystem,a=e.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,h=n.getRect(),f=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,p=u==="x"?[f[2]-v,f[3]+v]:[f[0]-v,f[1]+v];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[c.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[c[l]]:f[0],u==="x"?p[c[l]]:f[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[c[s]]-p[c.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),ee(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function nC(r){return r.get("coordinateSystem")==="cartesian2d"}function aC(r){var e={xAxisModel:null,yAxisModel:null};return A(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,ne).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error(a+' "'+rr(r.get(a+"Index"),r.get(a+"Id"),0)+'" not found');e[n]=i}),e}var vg=Math.log;function iC(r,e,t){var n=Ln.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,!0),o=a.length-1,s=n.getInterval.call(t),l=gw(r,e),u=l.extent,h=l.fixMin,f=l.fixMax;if(r.type==="log"){var c=vg(r.base);u=[vg(u[0])/c,vg(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:f});var v=n.getExtent.call(r);h&&(u[0]=v[0]),f&&(u[1]=v[1]);var p=n.getInterval.call(r),d=u[0],g=u[1];if(h&&f)p=(g-d)/o;else if(h)for(g=u[0]+p*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)p=Ld(p),g=u[0]+p*o;else if(f)for(d=u[1]-p*o;d>u[0]&&isFinite(d)&&isFinite(u[0]);)p=Ld(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=Ld(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Kt(g-m),d<0&&u[0]>=0?(d=0,g=Kt(m)):g>0&&u[1]<=0&&(g=0,d=-Kt(m))}var _=(a[0].value-i[0].value)/s,S=(a[o].value-i[o].value)/s;if(n.setExtent.call(r,d+p*_,g+p*S),n.setInterval.call(r,p),(_||S)&&n.setNiceExtent.call(r,d+p,g-p),process.env.NODE_ENV!=="production"){var x=n.getTicks.call(r);x[1]&&(!bB(p)||Lv(x[1].value)>Lv(p))&&Xt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var c3=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=fg,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=xt(o),u=l.length;if(u){for(var h=[],f=u-1;f>=0;f--){var c=+l[f],v=o[c],p=v.model,d=v.scale;Id(d)&&p.get("alignTicks")&&p.get("interval")==null?h.push(v):(Mo(d,p),Id(d)&&(s=v))}h.length&&(s||(s=h.pop(),Mo(s.scale,s.model)),A(h,function(g){iC(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};A(n.x,function(o){oC(n,"y",o,i)}),A(n.y,function(o){oC(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=se(a,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(A(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=YB(u);if(h){var f=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[f]-=h[f]+c,u.position==="top"?o.y+=h.height+c:u.position==="left"&&(o.x+=h.width+c)}}}),l()),A(this._coordsList,function(u){u.calcAffineTransform()});function l(){A(s,function(u){var h=u.isHorizontal(),f=h?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(f[c],f[1-c]),v3(u,h?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===e||i[a].getAxis("y").index===t)return i[a]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",ne).models[0],a=e.yAxisModel||t&&t.getReferringComponents("yAxis",ne).models[0],i=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,dt(o,s)<0&&(s=null);else if(n&&a)s=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(a)l=this.getAxis("y",a.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,A(s.x,function(h,f){A(s.y,function(c,v){var p="x"+f+"y"+v,d=new h3(p);d.master=a,d.model=e,a._coordsMap[p]=d,a._coordsList.push(d),d.addAxis(h),d.addAxis(c)})});function u(h){return function(f,c){if(pg(f,e)){var v=f.get("position");h==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var p=new f3(h,af(f),[0,0],f.get("type"),v),d=p.type==="category";p.onBand=d&&f.get("boundaryGap"),p.inverse=f.get("inverse"),f.axis=p,p.model=f,p.grid=i,p.index=c,i._axesList.push(p),s[h][c]=p,l[h]++}}}},r.prototype._updateScale=function(e,t){A(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),e.eachSeries(function(a){if(nC(a)){var i=aC(a),o=i.xAxisModel,s=i.yAxisModel;if(!pg(o,t)||!pg(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=a.getData(),h=l.getAxis("x"),f=l.getAxis("y");n(u,h),n(u,f)}},this);function n(a,i){A(of(a,i.dim),function(o){i.scale.unionExtentFromData(a,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return A(this.getCartesians(),function(a){var i=e!=null&&e!=="auto"?a.getAxis(e):a.getBaseAxis(),o=a.getOtherAxis(i);dt(t,i)<0&&t.push(i),dt(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(a,i){var o=new r(a,e,t);o.name="grid_"+i,o.resize(a,t,!0),a.coordinateSystem=o,n.push(o)}),e.eachSeries(function(a){if(nC(a)){var i=aC(a),o=i.xAxisModel,s=i.yAxisModel,l=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!l)throw new Error('Grid "'+rr(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var u=l.coordinateSystem;a.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=fg,r}();function pg(r,e){return r.getCoordSysModel()===e}function oC(r,e,t,n){t.getAxesOnZeroOf=function(){return i?[i]:[]};var a=r[e],i,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)sC(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&sC(a[u])&&!n[h(a[u])]){i=a[u];break}i&&(n[h(i)]=!0);function h(f){return f.dim+"_"+f.index}}function sC(r){return r&&r.type!=="category"&&r.type!=="time"&&UB(r)}function v3(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(a){return a+e}:function(a){return n-a+e},r.toLocalCoord=r.dim==="x"?function(a){return a-e}:function(a){return n-a+e}}var fa=Math.PI,He=function(){function r(e,t){this.group=new it,this.opt=t,this.axisModel=e,rt(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new it({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(e){return!!lC[e]},r.prototype.add=function(e){lC[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,n){var a=M_(t-e),i,o;return Ss(a)?(o=n>0?"top":"bottom",i="center"):Ss(a-fa)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<fa?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),lC={axisLine:function(r,e,t,n){var a=e.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var i=e.axis.getExtent(),o=n.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(ye(s,s,o),ye(l,l,o));var h=B({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new ue({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});ao(f.shape,f.style.lineWidth),f.anid="line",t.add(f);var c=e.get(["axisLine","symbol"]);if(c!=null){var v=e.get(["axisLine","symbolSize"]);U(c)&&(c=[c,c]),(U(v)||Ct(v))&&(v=[v,v]);var p=hi(e.get(["axisLine","symbolOffset"])||0,v),d=v[0],g=v[1];A([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(c[m]!=="none"&&c[m]!=null){var _=ie(c[m],-d/2,-g/2,d,g,h.stroke,!0),S=y.r+y.offset,x=u?l:s;_.attr({rotation:y.rotate,x:x[0]+S*Math.cos(r.rotation),y:x[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,n){var a=g3(t,n,e,r),i=m3(t,n,e,r);if(d3(e,i,a),y3(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=Vw(G(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Gw(o)}},axisName:function(r,e,t,n){var a=ee(r.axisName,e.get("name"));if(a){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),h=u[0]>u[1]?-1:1,f=[i==="start"?u[0]-h*l:i==="end"?u[1]+h*l:(u[0]+u[1])/2,hC(i)?r.labelOffset+o*l:0],c,v=e.get("nameRotate");v!=null&&(v=v*fa/180);var p;hC(i)?c=He.innerTextLayout(r.rotation,v??r.rotation,o):(c=p3(r.rotation,i,v||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(c.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=ee(r.nameTruncateMaxWidth,g.maxWidth,p),_=new Tt({x:f[0],y:f[1],rotation:c.rotation,silent:He.isLabelSilent(e),style:zt(s,{text:a,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(ei({el:_,componentModel:e,itemName:a}),_.__fullText=a,_.anid="name",e.get("triggerEvent")){var S=He.makeAxisEventDataBase(e);S.targetType="axisName",S.name=a,st(_).eventData=S}n.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function p3(r,e,t,n){var a=M_(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Ss(a-fa/2)?(o=l?"bottom":"top",i="center"):Ss(a-fa*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<fa*1.5&&a>fa/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function d3(r,e,t){if(!yw(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],h=t[1],f=t[t.length-1],c=t[t.length-2];n===!1?(yr(i),yr(u)):uC(i,o)&&(n?(yr(o),yr(h)):(yr(i),yr(u))),a===!1?(yr(s),yr(f)):uC(l,s)&&(a?(yr(l),yr(c)):(yr(s),yr(f)))}}function yr(r){r&&(r.ignore=!0)}function uC(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var a=pu([]);return Aa(a,a,-r.rotation),t.applyTransform(dn([],a,r.getLocalTransform())),n.applyTransform(dn([],a,e.getLocalTransform())),t.intersect(n)}}function hC(r){return r==="middle"||r==="center"}function fC(r,e,t,n,a){for(var i=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(ye(o,o,e),ye(s,s,e));var h=new ue({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});ao(h.shape,h.style.lineWidth),h.anid=a+"_"+r[l].tickValue,i.push(h)}return i}function g3(r,e,t,n){var a=t.axis,i=t.getModel("axisTick"),o=i.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||a.scale.isBlank())){for(var s=i.getModel("lineStyle"),l=n.tickDirection*i.get("length"),u=a.getTicksCoords(),h=fC(u,e.transform,l,rt(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<h.length;f++)r.add(h[f]);return h}}function y3(r,e,t,n){var a=t.axis,i=t.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var o=a.getMinorTicksCoords();if(o.length)for(var s=i.getModel("lineStyle"),l=n*i.get("length"),u=rt(s.getLineStyle(),rt(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),h=0;h<o.length;h++)for(var f=fC(o[h],e.transform,l,u,"minorticks_"+h),c=0;c<f.length;c++)r.add(f[c])}}function m3(r,e,t,n){var a=t.axis,i=ee(n.axisLabelShow,t.get(["axisLabel","show"]));if(!(!i||a.scale.isBlank())){var o=t.getModel("axisLabel"),s=o.get("margin"),l=a.getViewLabels(),u=(ee(n.labelRotate,o.get("rotate"))||0)*fa/180,h=He.innerTextLayout(n.rotation,u,n.labelDirection),f=t.getCategories&&t.getCategories(!0),c=[],v=He.isLabelSilent(t),p=t.get("triggerEvent");return A(l,function(d,g){var y=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(d.tickValue):d.tickValue,m=d.formattedLabel,_=d.rawLabel,S=o;if(f&&f[y]){var x=f[y];J(x)&&x.textStyle&&(S=new Lt(x.textStyle,o,t.ecModel))}var b=S.getTextColor()||t.get(["axisLine","lineStyle","color"]),w=a.dataToCoord(y),T=S.getShallow("align",!0)||h.textAlign,C=ot(S.getShallow("alignMinLabel",!0),T),D=ot(S.getShallow("alignMaxLabel",!0),T),M=S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||h.textVerticalAlign,I=ot(S.getShallow("verticalAlignMinLabel",!0),M),L=ot(S.getShallow("verticalAlignMaxLabel",!0),M),E=new Tt({x:w,y:n.labelOffset+n.labelDirection*s,rotation:h.rotation,silent:v,z2:10+(d.level||0),style:zt(S,{text:m,align:g===0?C:g===l.length-1?D:T,verticalAlign:g===0?I:g===l.length-1?L:M,fill:j(b)?b(a.type==="category"?_:a.type==="value"?y+"":y,g):b})});if(E.anid="label_"+y,ei({el:E,componentModel:t,itemName:m,formatterParamsExtra:{isTruncated:function(){return E.isTruncated},value:_,tickIndex:g}}),p){var P=He.makeAxisEventDataBase(t);P.targetType="axisLabel",P.value=_,P.tickIndex=g,a.type==="category"&&(P.dataIndex=y),st(E).eventData=P}e.add(E),E.updateTransform(),c.push(E),r.add(E),E.decomposeTransform()}),c}}function _3(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return S3(t,r,e),t.seriesInvolved&&b3(t,r),t}function S3(r,e,t){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];A(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Tl(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var h=s.model,f=h.getModel("tooltip",n);if(A(s.getAxes(),ht(d,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var c=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(c||v)&&A(p.baseAxes,ht(d,v?"cross":!0,c)),v&&A(p.otherAxes,ht(d,"cross",!1))}function d(g,y,m){var _=m.model.getModel("axisPointer",a),S=_.get("show");if(!(!S||S==="auto"&&!g&&!yg(_))){y==null&&(y=_.get("triggerTooltip")),_=g?x3(m,f,a,e,g,y):_;var x=_.get("snap"),b=_.get("triggerEmphasis"),w=Tl(m.model),T=y||x||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:b,involveSeries:T,snap:x,useHandle:yg(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var D=w3(i,m);if(D!=null){var M=o[D]||(o[D]={axesInfo:{}});M.axesInfo[w]=C,M.mapper=i[D].mapper,C.linkGroup=M}}}})}function x3(r,e,t,n,a,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(c){l[c]=at(o.get(c))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var h=o.get(["label","show"]);if(u.show=h??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&rt(u,f.textStyle)}}return r.model.getModel("axisPointer",new Lt(l,t,n))}function b3(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!n||a==="none"||a===!1||a==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[Tl(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function w3(r,e){for(var t=e.model,n=e.dim,a=0;a<r.length;a++){var i=r[a]||{};if(dg(i[n+"AxisId"],t.id)||dg(i[n+"AxisIndex"],t.componentIndex)||dg(i[n+"AxisName"],t.name))return a}}function dg(r,e){return r==="all"||z(r)&&dt(r,e)>=0||r===e}function T3(r){var e=gg(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=yg(t);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function gg(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Tl(r)]}function C3(r){var e=gg(r);return e&&e.axisPointerModel}function yg(r){return!!r.get(["handle","show"])}function Tl(r){return r.type+"||"+r.id}var mg={},Ti=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.axisPointerClass&&T3(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,a,!0)},e.prototype.updateAxisPointer=function(t,n,a,i){this._doUpdateAxisPointerClass(t,a,!1)},e.prototype.remove=function(t,n){var a=this._axisPointer;a&&a.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,a){var i=e.getAxisPointerClass(this.axisPointerClass);if(i){var o=C3(t);o?(this._axisPointer||(this._axisPointer=new i)).render(t,o,n,a):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){if(process.env.NODE_ENV!=="production"&&mg[t])throw new Error("axisPointer "+t+" exists");mg[t]=n},e.getAxisPointerClass=function(t){return t&&mg[t]},e.type="axis",e}(Yt),_g=bt();function cC(r,e,t,n){var a=t.axis;if(!a.scale.isBlank()){var i=t.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:i,clamp:!0});if(u.length){var h=s.length,f=_g(r).splitAreaColors,c=q(),v=0;if(f)for(var p=0;p<u.length;p++){var d=f.get(u[p].tickValue);if(d!=null){v=(d+(h-1)*p)%h;break}}var g=a.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=z(s)?s:[s];for(var p=1;p<u.length;p++){var m=a.toGlobalCoord(u[p].coord),_=void 0,S=void 0,x=void 0,b=void 0;a.isHorizontal()?(_=g,S=l.y,x=m-_,b=l.height,g=_+x):(_=l.x,S=g,x=l.width,b=m-S,g=S+b);var w=u[p-1].tickValue;w!=null&&c.set(w,v),e.add(new wt({anid:w!=null?"area_"+w:null,shape:{x:_,y:S,width:x,height:b},style:rt({fill:s[v]},y),autoBatch:!0,silent:!0})),v=(v+1)%h}_g(r).splitAreaColors=c}}}function vC(r){_g(r).splitAreaColors=null}var D3=["axisLine","axisTickLabel","axisName"],A3=["splitArea","splitLine","minorSplitLine"],pC=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=cg(s,t),u=new He(t,B({handleAutoShown:function(f){for(var c=s.coordinateSystem.getCartesians(),v=0;v<c.length;v++)if(Id(c[v].getOtherAxis(t.axis).scale))return!0;return!1}},l));A(D3,u.add,u),this._axisGroup.add(u.getGroup()),A(A3,function(f){t.get([f,"show"])&&M3[f](this,this._axisGroup,t,s)},this);var h=i&&i.type==="changeAxisOrder"&&i.isInitSort;h||Vs(o,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)}},e.prototype.remove=function(){vC(this)},e.type="cartesianAxis",e}(Ti),M3={splitLine:function(r,e,t,n){var a=t.axis;if(!a.scale.isBlank()){var i=t.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color"),l=i.get("showMinLine")!==!1,u=i.get("showMaxLine")!==!1;s=z(s)?s:[s];for(var h=n.coordinateSystem.getRect(),f=a.isHorizontal(),c=0,v=a.getTicksCoords({tickModel:i}),p=[],d=[],g=o.getLineStyle(),y=0;y<v.length;y++){var m=a.toGlobalCoord(v[y].coord);if(!(y===0&&!l||y===v.length-1&&!u)){var _=v[y].tickValue;f?(p[0]=m,p[1]=h.y,d[0]=m,d[1]=h.y+h.height):(p[0]=h.x,p[1]=m,d[0]=h.x+h.width,d[1]=m);var S=c++%s.length,x=new ue({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:d[0],y2:d[1]},style:rt({stroke:s[S]},g),silent:!0});ao(x.shape,g.lineWidth),e.add(x)}}}},minorSplitLine:function(r,e,t,n){var a=t.axis,i=t.getModel("minorSplitLine"),o=i.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=a.isHorizontal(),u=a.getMinorTicksCoords();if(u.length)for(var h=[],f=[],c=o.getLineStyle(),v=0;v<u.length;v++)for(var p=0;p<u[v].length;p++){var d=a.toGlobalCoord(u[v][p].coord);l?(h[0]=d,h[1]=s.y,f[0]=d,f[1]=s.y+s.height):(h[0]=s.x,h[1]=d,f[0]=s.x+s.width,f[1]=d);var g=new ue({anid:"minor_line_"+u[v][p].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:c,silent:!0});ao(g.shape,c.lineWidth),e.add(g)}},splitArea:function(r,e,t,n){cC(r,e,t,n)}},dC=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(pC),I3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=dC.type,t}return e.type="yAxis",e}(pC),L3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new wt({shape:t.coordinateSystem.getRect(),style:rt({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Yt),gC={offset:0};function yC(r){r.registerComponentView(L3),r.registerComponentModel(a3),r.registerCoordinateSystem("cartesian2d",c3),ko(r,"x",ug,gC),ko(r,"y",ug,gC),r.registerComponentView(dC),r.registerComponentView(I3),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function E3(r){gt(yC),r.registerSeriesModel(J5),r.registerChartView(n3),r.registerLayout(Sl("scatter"))}function P3(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],a=e.coordinateSystem;if(a){var i=a.getIndicatorAxes();A(i,function(o,s){t.each(t.mapDimension(i[s].dim),function(l,u){n[u]=n[u]||[];var h=a.dataToPoint(l,s);n[u][s]=mC(h)?h:_C(a)})}),t.each(function(o){var s=hE(n[o],function(l){return mC(l)})||_C(a);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function mC(r){return!isNaN(r[0])&&!isNaN(r[1])}function _C(r){return[r.cx,r.cy]}function k3(r){var e=r.polar;if(e){z(e)||(e=[e]);var t=[];A(e,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],z(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):t.push(n)}),r.polar=t}A(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var R3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(c,v){var p=c.getItemVisual(v,"symbol")||"circle";if(p!=="none"){var d=bo(c.getItemVisual(v,"symbolSize")),g=ie(p,-1,-1,2,2),y=c.getItemVisual(v,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:d[0]/2,scaleY:d[1]/2,rotation:y*Math.PI/180||0}),g}}function h(c,v,p,d,g,y){p.removeAll();for(var m=0;m<v.length-1;m++){var _=u(d,g);_&&(_.__dimIdx=m,c[m]?(_.setPosition(c[m]),ri[y?"initProps":"updateProps"](_,{x:v[m][0],y:v[m][1]},t,g)):_.setPosition(v[m]),p.add(_))}}function f(c){return G(c,function(v){return[i.cx,i.cy]})}s.diff(l).add(function(c){var v=s.getItemLayout(c);if(v){var p=new Ve,d=new Be,g={shape:{points:v}};p.shape.points=f(v),d.shape.points=f(v),$t(p,g,t,c),$t(d,g,t,c);var y=new it,m=new it;y.add(d),y.add(p),y.add(m),h(d.shape.points,v,m,s,c,!0),s.setItemGraphicEl(c,y)}}).update(function(c,v){var p=l.getItemGraphicEl(v),d=p.childAt(0),g=p.childAt(1),y=p.childAt(2),m={shape:{points:s.getItemLayout(c)}};m.shape.points&&(h(d.shape.points,m.shape.points,y,s,c,!1),Lr(g),Lr(d),Dt(d,m,t),Dt(g,m,t),s.setItemGraphicEl(c,p))}).remove(function(c){o.remove(l.getItemGraphicEl(c))}).execute(),s.eachItemGraphicEl(function(c,v){var p=s.getItemModel(v),d=c.childAt(0),g=c.childAt(1),y=c.childAt(2),m=s.getItemVisual(v,"style"),_=m.fill;o.add(c),d.useStyle(rt(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),_e(d,p,"lineStyle"),_e(g,p,"areaStyle");var S=p.getModel("areaStyle"),x=S.isEmpty()&&S.parentModel.isEmpty();g.ignore=x,A(["emphasis","select","blur"],function(T){var C=p.getModel([T,"areaStyle"]),D=C.isEmpty()&&C.parentModel.isEmpty();g.ensureState(T).ignore=D&&x}),g.useStyle(rt(S.getAreaStyle(),{fill:_,opacity:.7,decal:m.decal}));var b=p.getModel("emphasis"),w=b.getModel("itemStyle").getItemStyle();y.eachChild(function(T){if(T instanceof ge){var C=T.style;T.useStyle(B({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},m))}else T.useStyle(m),T.setColor(_),T.style.strokeNoScale=!0;var D=T.ensureState("emphasis");D.style=at(w);var M=s.getStore().get(s.getDimensionIndex(T.__dimIdx),v);(M==null||isNaN(M))&&(M=""),Se(T,he(p),{labelFetcher:s.hostModel,labelDataIndex:v,labelDimIndex:T.__dimIdx,defaultText:M,inheritColor:_,defaultOpacity:m.opacity})}),qt(c,b.get("focus"),b.get("blurScope"),b.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(Rt),N3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new wl(Z(this.getData,this),Z(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return Po(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,h=Px(this,t);return fe("section",{header:u,sortBlocks:!0,blocks:G(s,function(f){var c=i.get(i.mapDimension(f.dim),t);return fe("nameValue",{markerType:"subItem",markerColor:h,name:f.name,value:c,sortParam:c})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),a=this.coordinateSystem,i=n.getValues(G(a.dimensions,function(u){return n.mapDimension(u)}),t),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=a.getIndicatorAxes();return a.coordToPoint(l[o].dataToCoord(i[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(Gt),Cl=tC.value;function _f(r,e){return rt({show:e},r)}var O3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),a=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),h=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),c=this.get("triggerEvent"),v=G(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=rt({color:p.color},l));var g=ft(at(p),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:d,triggerEvent:c},!1);if(U(h)){var y=g.name;g.name=h.replace("{value}",y??"")}else j(h)&&(g.name=h(g.name,g));var m=new Lt(g,null,this.ecModel);return te(m,fl.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ft({lineStyle:{color:"#bbb"}},Cl.axisLine),axisLabel:_f(Cl.axisLabel,!1),axisTick:_f(Cl.axisTick,!1),splitLine:_f(Cl.splitLine,!0),splitArea:_f(Cl.splitArea,!0),indicator:[]},e}(St),V3=["axisLine","axisTickLabel","axisName"],B3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes(),i=G(a,function(o){var s=o.model.get("showName")?o.name:"",l=new He(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});A(i,function(o){A(V3,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),f=s.get("show"),c=l.get("color"),v=u.get("color"),p=z(c)?c:[c],d=z(v)?v:[v],g=[],y=[];function m(P,k,N){var R=N%k.length;return P[R]=P[R]||[],R}if(i==="circle")for(var _=a[0].getTicksCoords(),S=n.cx,x=n.cy,b=0;b<_.length;b++){if(h){var w=m(g,p,b);g[w].push(new Cn({shape:{cx:S,cy:x,r:_[b].coord}}))}if(f&&b<_.length-1){var w=m(y,d,b);y[w].push(new ks({shape:{cx:S,cy:x,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var T,C=G(a,function(P,k){var N=P.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),G(N,function(R){return n.coordToPoint(R.coord,k)})}),D=[],b=0;b<=T;b++){for(var M=[],I=0;I<a.length;I++)M.push(C[I][b]);if(M[0]?M.push(M[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+b),h){var w=m(g,p,b);g[w].push(new Be({shape:{points:M}}))}if(f&&D){var w=m(y,d,b-1);y[w].push(new Ve({shape:{points:M.concat(D)}}))}D=M.slice().reverse()}var L=l.getLineStyle(),E=u.getAreaStyle();A(y,function(P,k){this.group.add(hr(P,{style:rt({stroke:"none",fill:d[k%d.length]},E),silent:!0}))},this),A(g,function(P,k){this.group.add(hr(P,{style:rt({fill:"none",stroke:p[k%p.length]},L),silent:!0}))},this)},e.type="radar",e}(Yt),z3=function(r){O(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.type="value",i.angle=0,i.name="",i}return e}(Nr),G3=function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=G(e.getIndicatorModels(),function(a,i){var o="indicator_"+i,s=new z3(o,new Ln);return s.name=a.get("name"),s.model=a,a.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t],a=n.angle,i=this.cx+e*Math.cos(a),o=this.cy-e*Math.sin(a);return[i,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=Math.sqrt(t*t+n*n);t/=a,n/=a;for(var i=Math.atan2(-n,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var h=this._indicatorAxes[u],f=Math.abs(i-h.angle);f<o&&(s=h,l=u,o=f)}return[l,+(s&&s.coordToData(a))]},r.prototype.resize=function(e,t){var n=e.get("center"),a=t.getWidth(),i=t.getHeight(),o=Math.min(a,i)/2;this.cx=W(n[0],a),this.cy=W(n[1],i),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(U(s)||Ct(s))&&(s=[0,s]),this.r0=W(s[0],o),this.r=W(s[1],o),A(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var h=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;h=Math.atan2(Math.sin(h),Math.cos(h)),l.angle=h},this)},r.prototype.update=function(e,t){var n=this._indicatorAxes,a=this._model;A(n,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==a)){var u=s.getData();A(n,function(h){h.scale.unionExtentFromData(u,u.mapDimension(h.dim))})}},this);var i=a.get("splitNumber"),o=new Ln;o.setExtent(0,i),o.setInterval(1),A(n,function(s,l){iC(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var n=[];return e.eachComponent("radar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=n[a.get("radarIndex")||0])}),n},r.dimensions=[],r}();function F3(r){r.registerCoordinateSystem("radar",G3),r.registerComponentModel(O3),r.registerComponentView(B3),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(n){t.setItemVisual(n,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function H3(r){gt(F3),r.registerChartView(R3),r.registerSeriesModel(N3),r.registerLayout(P3),r.registerProcessor(bl("radar")),r.registerPreprocessor(k3)}var SC="\0_ec_interaction_mutex";function W3(r,e,t){var n=Sg(r);n[e]=t}function $3(r,e,t){var n=Sg(r),a=n[e];a===t&&(n[e]=null)}function xC(r,e){return!!Sg(r)[e]}function Sg(r){return r[SC]||(r[SC]={})}en({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Qt);var Dl=function(r){O(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var a=Z(n._mousedownHandler,n),i=Z(n._mousemoveHandler,n),o=Z(n._mouseupHandler,n),s=Z(n._mousewheelHandler,n),l=Z(n._pinchHandler,n);return n.enable=function(u,h){this.disable(),this._opt=rt(at(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",a),t.on("mousemove",i),t.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",s),t.on("pinch",l))},n.disable=function(){t.off("mousedown",a),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!k0(t)){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var a=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,a,i)&&(this._x=a,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!Sf("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||xC(this._zr,"globalPan"))){var n=t.offsetX,a=t.offsetY,i=this._x,o=this._y,s=n-i,l=a-o;this._x=n,this._y=a,this._opt.preventDefaultMouseMove&&pn(t.event),bC(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:o,newX:n,newY:a,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){k0(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var n=Sf("zoomOnMouseWheel",t,this._opt),a=Sf("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),s=t.offsetX,l=t.offsetY;if(!(i===0||!n&&!a)){if(n){var u=o>3?1.4:o>1?1.2:1.1,h=i>0?u:1/u;xg(this,"zoom","zoomOnMouseWheel",t,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(a){var f=Math.abs(i),c=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);xg(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!xC(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;xg(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(nr);function xg(r,e,t,n,a){r.pointerChecker&&r.pointerChecker(n,a.originX,a.originY)&&(pn(n.event),bC(r,e,t,n,a))}function bC(r,e,t,n,a){a.isAvailableBehavior=Z(Sf,null,t,n),r.trigger(e,a)}function Sf(r,e,t){var n=t[r];return!r||n&&(!U(n)||e.event[n+"Key"])}function bg(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function wg(r,e,t,n){var a=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,a.x-=(t-a.x)*(u-1),a.y-=(n-a.y)*(u-1),a.scaleX*=u,a.scaleY*=u,a.dirty()}var U3={axisPointer:1,tooltip:1,brush:1};function xf(r,e,t){var n=e.getComponentByElement(r.topTarget),a=n&&n.coordinateSystem;return n&&n!==t&&!U3.hasOwnProperty(n.mainType)&&a&&a.model!==t}function wC(r){if(U(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Tg,bf={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},TC=xt(bf),wf={"alignment-baseline":"textBaseline","stop-color":"stopColor"},CC=xt(wf),Y3=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=wC(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var a=new it;this._root=a;var i=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),tr(n,a,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,a,i,null,!1,!1),u=u.nextSibling;q3(this._defs,this._defsUsePending),this._defsUsePending=[];var h,f;if(o){var c=Tf(o);c.length>=4&&(h={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(h&&s!=null&&l!=null&&(f=kC(h,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var v=a;a=new it,a.add(v),v.scaleX=v.scaleY=f.scale,v.x=f.x,v.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new wt({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:h,viewBoxTransform:f,named:i}},r.prototype._parseNode=function(e,t,n,a,i,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var h=Tg[s];if(h&&X(Tg,s)){l=h.call(this,e,t);var f=e.getAttribute("name");if(f){var c={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(c),s==="g"&&(u=c)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var v=DC[s];if(v&&X(DC,s)){var p=v.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var n=new Ki({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});mr(t,n),tr(e,n,this._defsUsePending,!1,!1),Z3(n,t);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=function(){Tg={g:function(e,t){var n=new it;return mr(t,n),tr(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new wt;return mr(t,n),tr(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new Cn;return mr(t,n),tr(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new ue;return mr(t,n),tr(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new rh;return mr(t,n),tr(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),a;n&&(a=IC(n));var i=new Ve({shape:{points:a||[]},silent:!0});return mr(t,i),tr(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=IC(n));var i=new Be({shape:{points:a||[]},silent:!0});return mr(t,i),tr(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ge;return mr(t,n),tr(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new it;return mr(t,s),tr(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),a=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new it;return mr(t,s),tr(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",a=W1(n);return mr(t,a),tr(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),r}(),DC={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new Ns(e,t,n,a);return AC(r,i),MC(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new q1(e,t,n);return AC(r,a),MC(r,a),a}};function AC(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function MC(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};PC(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function mr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),rt(e.__inheritedStyle,r.__inheritedStyle))}function IC(r){for(var e=Tf(r),t=[],n=0;n<e.length;n+=2){var a=parseFloat(e[n]),i=parseFloat(e[n+1]);t.push([a,i])}return t}function tr(r,e,t,n,a){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(Q3(r,e),PC(r,o,s),n||J3(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=LC(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=LC(i,"stroke",o.stroke,t)),A(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),A(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),a&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=G(Tf(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function Z3(r,e){var t=e.__selfStyle;if(t){var n=t.textBaseline,a=n;!n||n==="auto"||n==="baseline"?a="alphabetic":n==="before-edge"||n==="text-before-edge"?a="top":n==="after-edge"||n==="text-after-edge"?a="bottom":(n==="central"||n==="mathematical")&&(a="middle"),r.style.textBaseline=a}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var X3=/^url\(\s*#(.*?)\)/;function LC(r,e,t,n){var a=t&&t.match(X3);if(a){var i=Tr(a[1]);n.push([r,e,i]);return}return t==="none"&&(t=null),t}function q3(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var K3=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Tf(r){return r.match(K3)||[]}var j3=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Cg=Math.PI/180;function Q3(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],a=null;t.replace(j3,function(f,c,v){return n.push(c,v),""});for(var i=n.length-1;i>0;i-=2){var o=n[i],s=n[i-1],l=Tf(o);switch(a=a||qe(),s){case"translate":Fr(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Zc(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Aa(a,a,-parseFloat(l[0])*Cg,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Cg);dn(a,[1,0,u,1,0,0],a);break;case"skewY":var h=Math.tan(parseFloat(l[0])*Cg);dn(a,[1,h,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var EC=/([^\s:;]+)\s*:\s*([^:;]+)/g;function PC(r,e,t){var n=r.getAttribute("style");if(n){EC.lastIndex=0;for(var a;(a=EC.exec(n))!=null;){var i=a[1],o=X(bf,i)?bf[i]:null;o&&(e[o]=a[2]);var s=X(wf,i)?wf[i]:null;s&&(t[s]=a[2])}}}function J3(r,e,t){for(var n=0;n<TC.length;n++){var a=TC[n],i=r.getAttribute(a);i!=null&&(e[bf[a]]=i)}for(var n=0;n<CC.length;n++){var a=CC[n],i=r.getAttribute(a);i!=null&&(t[wf[a]]=i)}}function kC(r,e){var t=e.width/r.width,n=e.height/r.height,a=Math.min(t,n);return{scale:a,x:-(r.x+r.width/2)*a+(e.x+e.width/2),y:-(r.y+r.height/2)*a+(e.y+e.height/2)}}function tG(r,e){var t=new Y3;return t.parse(r,e)}var eG=q(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),rG=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=q(),this._freedGraphics=[],this._mapName=e,this._parsedXML=wC(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=aG(e.named),n=t.regions,a=t.regionsMap;this._regions=n,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,n;try{t=e&&tG(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,tt(n!=null)}catch(g){throw new Error(`Invalid svg format
`+g.message)}var a=new it;a.add(n),a.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,h=void 0,f=void 0,c=void 0;if(i!=null?(u=0,f=i):s&&(u=s.x,f=s.width),o!=null?(h=0,c=o):s&&(h=s.y,c=s.height),u==null||h==null){var v=n.getBoundingRect();u==null&&(u=v.x,f=v.width),h==null&&(h=v.y,c=v.height)}l=this._boundingRect=new vt(u,h,f,c)}if(s){var p=kC(s,l);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}a.setClipPath(new wt({shape:l.plain()}));var d=[];return A(t.named,function(g){eG.get(g.svgNodeTagLower)!=null&&(d.push(g),nG(g.el))}),{root:a,boundingRect:l,named:d}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},r}();function nG(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function aG(r){var e=[],t=q();return A(r,function(n){if(n.namedFrom==null){var a=new QB(n.name,n.el);e.push(a),t.set(n.name,a)}}),{regions:e,regionsMap:t}}for(var Dg=[126,25],RC="南海诸岛",Ci=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Di=0;Di<Ci.length;Di++)for(var Ro=0;Ro<Ci[Di].length;Ro++)Ci[Di][Ro][0]/=10.5,Ci[Di][Ro][1]/=-10.5/.75,Ci[Di][Ro][0]+=Dg[0],Ci[Di][Ro][1]+=Dg[1];function iG(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===RC)return;e.push(new ww(RC,G(Ci,function(n){return{type:"polygon",exterior:n}}),Dg))}}var oG={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function sG(r,e){if(r==="china"){var t=oG[e.name];if(t){var n=e.getCenter();n[0]+=t[0]/10.5,n[1]+=-t[1]/(10.5/.75),e.setCenter(n)}}}var lG=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function uG(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:lG[0]})}var hG="name",fG=function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=q(),this._mapName=e,this._specialAreas=n,this._geoJSON=vG(t)}return r.prototype.load=function(e,t){t=t||hG;var n=this._parsedMap.get(t);if(!n){var a=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:a,boundingRect:cG(a)})}var i=q(),o=[];return A(n.regions,function(s){var l=s.name;e&&X(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new vt(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,a;try{a=n?tz(n,e):[]}catch(i){throw new Error(`Invalid geoJson format
`+i.message)}return iG(t,a),A(a,function(i){var o=i.name;sG(t,i),uG(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),a},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function cG(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function vG(r){return U(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var Al=q();const En={registerMap:function(r,e,t){if(e.svg){var n=new rG(r,e.svg);Al.set(r,n)}else{var a=e.geoJson||e.geoJSON;a&&!e.features?t=e.specialAreas:a=e;var n=new fG(r,a,t);Al.set(r,n)}},getGeoResource:function(r){return Al.get(r)},getMapForUser:function(r){var e=Al.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=Al.get(r);if(!n){process.env.NODE_ENV!=="production"&&console.error("Map "+r+" not exists. The GeoJSON of the map must be provided.");return}return n.load(e,t)}};var Ag=["rect","circle","line","ellipse","polygon","polyline","path"],pG=q(Ag),dG=q(Ag.concat(["g"])),gG=q(Ag.concat(["g"])),NC=bt();function Cf(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function OC(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var VC=function(){function r(e){var t=new it;this.uid=oo("ec_map_draw"),this._controller=new Dl(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new it),t.add(this._svgGroup=new it)}return r.prototype.draw=function(e,t,n,a,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===e&&(s=y.getData())});var l=e.coordinateSystem,u=this._regionsGroup,h=this.group,f=l.getTransformInfo(),c=f.raw,v=f.roam,p=!u.childAt(0)||i;p?(h.x=v.x,h.y=v.y,h.scaleX=v.scaleX,h.scaleY=v.scaleY,h.dirty()):Dt(h,v,e);var d=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=q(),n=q(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function h(v,p){return p&&(v=p(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function f(v){for(var p=[],d=!u&&l&&l.project,g=0;g<v.length;++g){var y=h(v[g],d);y&&p.push(y)}return p}function c(v){return{shape:{points:f(v)}}}a.removeAll(),A(e.geo.regions,function(v){var p=v.name,d=t.get(p),g=n.get(p)||{},y=g.dataIdx,m=g.regionModel;if(!d){d=t.set(p,new it),a.add(d),y=s?s.indexOfName(p):null,m=e.isGeo?o.getRegionModel(p):s?s.getItemModel(y):null;var _=m.get("silent",!0);_!=null&&(d.silent=_),n.set(p,{dataIdx:y,regionModel:m})}var S=[],x=[];A(v.geometries,function(T){if(T.type==="polygon"){var C=[T.exterior].concat(T.interiors||[]);u&&(C=WC(C,u)),A(C,function(M){S.push(new Ve(c(M)))})}else{var D=T.points;u&&(D=WC(D,u,!0)),A(D,function(M){x.push(new Be(c(M)))})}});var b=h(v.getCenter(),l&&l.project);function w(T,C){if(T.length){var D=new dp({culling:!0,segmentIgnoreThreshold:1,shape:{paths:T}});d.add(D),BC(e,D,y,m),zC(e,D,p,m,o,y,b),C&&(OC(D),A(D.states,OC))}}w(S),w(x,!0)}),t.each(function(v,p){var d=n.get(p),g=d.dataIdx,y=d.regionModel;GC(e,v,p,y,o,g),FC(e,v,p,y,o),HC(e,v,p,y,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var a=this._svgDispatcherMap=q(),i=!1;A(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,h=o.svgNodeTagLower,f=o.el,c=u?u.indexOfName(s):null,v=l.getRegionModel(s);pG.get(h)!=null&&f instanceof lr&&BC(e,f,c,v),f instanceof lr&&(f.culling=!0);var p=v.get("silent",!0);if(p!=null&&(f.silent=p),f.z2EmphasisLift=0,!o.namedFrom&&(gG.get(h)!=null&&zC(e,f,s,v,l,c,null),GC(e,f,s,v,l,c),FC(e,f,s,v,l),dG.get(h)!=null)){var d=HC(e,f,s,v,l);d==="self"&&(i=!0);var g=a.get(s)||a.set(s,[]);g.push(f)}},this),this._enableBlurEntireSVG(i,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=n.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){Xa(i);var o=i.ensureState("blur").style||{};o.opacity==null&&a!=null&&(o.opacity=a),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var i=a.get(e);return i?[i]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=En.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=En.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n){var a=e.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=a.getZoom(),i.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}i.off("pan").on("pan",function(u){this._mouseDownFlag=!1,bg(o,u.dx,u.dy),n.dispatchAction(B(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,wg(o,u.scale,u.originX,u.originY),n.dispatchAction(B(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,h,f){return a.containPoint([h,f])&&!xf(u,n,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=NC(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,a){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},r}();function BC(r,e,t,n){var a=n.getModel("itemStyle"),i=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=Cf(a),u=Cf(i),h=Cf(s),f=Cf(o),c=r.data;if(c){var v=c.getItemVisual(t,"style"),p=c.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&v.fill&&(l.fill=v.fill),p&&(l.decal=To(p,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=h,e.ensureState("blur").style=f,Xa(e)}function zC(r,e,t,n,a,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),h=s&&s.getItemLayout(i);if(l||u||h&&h.showLabel){var f=l?t:i,c=void 0;(!s||i>=0)&&(c=a);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Se(e,he(n),{labelFetcher:c,labelDataIndex:f,defaultText:t},v);var p=e.getTextContent();if(p&&(NC(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function GC(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):st(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function FC(r,e,t,n,a){r.data||ei({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function HC(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return qt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&hR(e,a,t),o}function WC(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}var yG=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new VC(a);o.add(s.group),s.draw(t,n,a,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,a)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,a){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var h=u.point,f=u.offset,c=new Cn({style:{fill:t.getData().getVisual("style").fill},shape:{cx:h[0]+f*9,cy:h[1],r:3},silent:!0,z2:8+(f?0:Qi+1)});if(!f){var v=t.mainSeries.getData(),p=i.getName(l),d=v.indexOfName(p),g=i.getItemModel(l),y=g.getModel("label"),m=v.getItemGraphicEl(d);Se(c,he(g),{labelFetcher:{getFormattedLabel:function(_,S){return t.getFormattedLabel(d,S)}},defaultText:p}),c.disableLabelAnimation=!0,y.get("position")||c.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(_){Ju(c,_)}}o.add(c)}}})},e.type="map",e}(Rt),mG=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var a=this.getData().getName(n),i=this.coordinateSystem,o=i.getRegion(a);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=Po(this,{coordDimensions:["value"],encodeDefaulter:ht(Np,this)}),a=q(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,o)}var u=En.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return A(u.regions,function(h){var f=h.name,c=a.get(f),v=h.properties&&h.properties.echartsStyle,p;c==null?(p={name:f},i.push(p)):p=n.getRawDataItem(c),v&&ft(p,v)}),n.appendData(i),n},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],h=0;h<l.length;h++){var f=l[h].originalData.indexOfName(s),c=i.mapDimension("value");isNaN(l[h].originalData.get(c,f))||u.push(l[h].name)}return fe("section",{header:u.join(", "),noHeader:!u.length,blocks:[fe("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",a=ie(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return a.setStyle(t.itemStyle),a.style.stroke="none",n.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Gt);function _G(r,e){var t={};return A(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,h=0;h<u;h++)s=Math.min(s,t[i][h]),l=Math.max(l,t[i][h]),o+=t[i][h];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function SG(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),a=n?"o"+n.id:"i"+t.getMapType();(e[a]=e[a]||[]).push(t)}),A(e,function(t,n){for(var a=_G(G(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(a.cloneShallow()),t[i].mainSeries=t[0]})}function xG(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var a={};A(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,h){var f=l.getName(h),c=s.getRegion(f);if(!(!c||isNaN(u))){var v=a[f]||0,p=s.dataToPoint(c.getCenter());a[f]=v+1,l.setItemLayout(h,{point:p,offset:v})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!a[s],i.setItemLayout(o,l)}),e[n]=!0}})}var $C=ye,Ml=function(r){O(e,r);function e(t){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new mn,n._rawTransformable=new mn,n.name=t,n}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new vt(t,n,a,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,a,i){this._transformTo(t,n,a,i),this._viewRect=new vt(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new vt(t,n,a,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,n){t&&(this._center=[W(t[0],n.getWidth()),W(t[1],n.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var n=this.zoomLimit;n&&(n.max!=null&&(t=Math.min(n.max,t)),n.min!=null&&(t=Math.max(n.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,a=t.y+t.height/2;return[n,a]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,a=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=ye([],i,t),a=ye([],a,t),n.originX=i[0],n.originY=i[1],n.x=a[0]-i[0],n.y=a[1]-i[1],n.scaleX=n.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),Yc(this.transform||(this.transform=[]),n.transform||qe()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Fi(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,a=new mn;return a.transform=n.transform,a.decomposeTransform(),{roam:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,a){var i=n?this._rawTransform:this.transform;return a=a||[],i?$C(a,t,i):Ee(a,t)},e.prototype.pointToData=function(t){var n=this.invTransform;return n?$C([],t,n):[t[0],t[1]]},e.prototype.convertToPixel=function(t,n,a){var i=UC(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=UC(n);return i===this?i.pointToData(a):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(mn);function UC(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var bG={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},YC=["lng","lat"],Mg=function(r){O(e,r);function e(t,n,a){var i=r.call(this,t)||this;i.dimensions=YC,i.type="geo",i._nameCoordMap=q(),i.map=n;var o=a.projection,s=En.load(n,a.nameMap,a.nameProperty),l=En.getGeoResource(n),u=i.resourceType=l?l.type:null,h=i.regions=s.regions,f=bG[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,process.env.NODE_ENV!=="production"&&o&&(u==="geoSVG"&&(process.env.NODE_ENV!=="production"&&Xt("Map "+n+" with SVG source can't use projection. Only GeoJSON source supports projection."),o=null),o.project&&o.unproject||(process.env.NODE_ENV!=="production"&&Xt("project and unproject must be both provided in the projeciton."),o=null)),i.projection=o;var c;if(o)for(var v=0;v<h.length;v++){var p=h[v].getBoundingRect(o);c=c||p.clone(),c.union(p)}else c=s.boundingRect;return i.setBoundingRect(c.x,c.y,c.width,c.height),i.aspectScale=o?1:ot(a.aspectScale,f.aspectScale),i._invertLongitute=o?!1:f.invertLongitute,i}return e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new vt(t,n,a,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,a=0;a<n.length;a++){var i=n[a];if(i.type==="geoJSON"&&i.contain(t))return n[a]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,a){if(U(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,n,a)}},e.prototype.pointToData=function(t){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,n,a){return r.prototype.dataToPoint.call(this,t,n,a)},e.prototype.convertToPixel=function(t,n,a){var i=ZC(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=ZC(n);return i===this?i.pointToData(a):null},e}(Ml);te(Mg,Ml);function ZC(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",ne).models[0]||{}).coordinateSystem:null}function XC(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],a=t[1];if(!(isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])))process.env.NODE_ENV!=="production"&&console.error("Invalid boundingCoords");else{var i=this.projection;if(i){var o=n[0],s=n[1],l=a[0],u=a[1];n=[1/0,1/0],a=[-1/0,-1/0];var h=function(b,w,T,C){for(var D=T-b,M=C-w,I=0;I<=100;I++){var L=I/100,E=i.project([b+D*L,w+M*L]);Gn(n,n,E),Fn(a,a,E)}};h(o,s,l,s),h(l,s,l,u),h(l,u,o,u),h(o,u,l,s)}this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}}var f=this.getBoundingRect(),c=r.get("layoutCenter"),v=r.get("layoutSize"),p=e.getWidth(),d=e.getHeight(),g=f.width/f.height*this.aspectScale,y=!1,m,_;c&&v&&(m=[W(c[0],p),W(c[1],d)],_=W(v,Math.min(p,d)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(_)?y=!0:process.env.NODE_ENV!=="production"&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var S;if(y)S={},g>1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var x=r.getBoxLayoutParams();x.aspect=g,S=se(x,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function wG(r,e){A(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var TG=function(){function r(){this.dimensions=YC}return r.prototype.create=function(e,t){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Mg(l+s,l,B({nameMap:o.get("nameMap")},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=XC,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),A(i,function(o,s){var l=G(o,function(h){return h.get("nameMap")}),u=new Mg(s,s,B({nameMap:Ec(l)},a(o[0])));u.zoomLimit=ee.apply(null,G(o,function(h){return h.get("scaleLimit")})),n.push(u),u.resize=XC,u.resize(o[0],t),A(o,function(h){h.coordinateSystem=u,wG(u,h)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=q(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=En.load(t,n,a);return A(l.regions,function(u){var h=u.name,f=o.get(h),c=u.properties&&u.properties.echartsStyle;f||(f={name:h},i.push(f)),c&&ft(f,c)}),i},r}(),qC=new TG,CG=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=En.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,a),Na(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=qC.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=Gr(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new Lt(o,t,t.ecModel)),o.selected&&(a[s]=!0)),i},q()),n.selectedMap||(n.selectedMap=a)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Lt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var a=this.getRegionModel(t),i=n==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),o={name:t};if(j(i))return o.status=n,i(o);if(U(i))return i.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,a=n.selectedMode;if(a){a!=="multiple"&&(n.selectedMap=null);var i=n.selectedMap||(n.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(St);function KC(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function Ig(r,e,t,n){var a=r.getZoom(),i=r.getCenter(),o=e.zoom,s=r.projectedToPoint?r.projectedToPoint(i):r.dataToPoint(i);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,r.setCenter(KC(r,s),n)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(a*o,u),l)/a}r.scaleX*=o,r.scaleY*=o;var h=(e.originX-r.x)*(o-1),f=(e.originY-r.y)*(o-1);r.x-=h,r.y-=f,r.updateTransform(),r.setCenter(KC(r,s),n),r.setZoom(o*a)}return{center:r.getCenter(),zoom:r.getZoom()}}var DG=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,a,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new VC(a));var o=this._mapDraw;o.draw(t,n,a,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,a)},e.prototype._handleRegionClick=function(t){var n;ui(t.target,function(a){return(n=st(a).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,a){var i=this;this._mapDraw.group.traverse(function(o){var s=st(o).eventData;if(s)return i._model.isSelected(s.name)?a.enterSelect(o):a.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(Yt);function AG(r,e,t){En.registerMap(r,e,t)}function jC(r){r.registerCoordinateSystem("geo",qC),r.registerComponentModel(CG),r.registerComponentView(DG),r.registerImpl("registerMap",AG),r.registerImpl("getMap",function(t){return En.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(a,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:a},function(l){l[t](a.name);var u=l.coordinateSystem;A(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var h=[];A(o,function(f,c){o[c]&&h.push(c)}),s.push({geoIndex:l.componentIndex,name:h})}),{selected:o,allSelected:s,name:a.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,a){var i=t.componentType||"series";n.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=Ig(s,t,o.get("scaleLimit"),a);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&A(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function MG(r){gt(jC),r.registerChartView(yG),r.registerSeriesModel(mG),r.registerLayout(xG),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,SG),rb("map",r.registerAction)}function IG(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,a;n=t.pop();)if(a=n.children,n.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function LG(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){kG(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=RG(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function EG(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function QC(r){return arguments.length?r:VG}function Il(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function PG(r,e){return se(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function kG(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function RG(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,h=o.hierNode.modifier,f=s.hierNode.modifier;s=Lg(s),i=Eg(i),s&&i;){a=Lg(a),o=Eg(o),a.hierNode.ancestor=r;var c=s.hierNode.prelim+f-i.hierNode.prelim-u+n(s,i);c>0&&(OG(NG(s,r,t),r,c),u+=c,l+=c),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,h+=o.hierNode.modifier}s&&!Lg(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!Eg(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-h,t=r)}return t}function Lg(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Eg(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function NG(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function OG(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function VG(r,e){return r.parentNode===e.parentNode?1:2}var BG=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),zG=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new BG},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,h=u==="TB"||u==="BT"?0:1,f=1-h,c=W(n.forkPosition,1),v=[];v[h]=o[h],v[f]=o[f]+(l[f]-o[f])*c,t.moveTo(o[0],o[1]),t.lineTo(v[0],v[1]),t.moveTo(s[0],s[1]),v[h]=s[h],t.lineTo(v[0],v[1]),v[h]=l[h],t.lineTo(v[0],v[1]),t.lineTo(l[0],l[1]);for(var p=1;p<i-1;p++){var d=a[p];t.moveTo(d[0],d[1]),v[h]=d[h],t.lineTo(v[0],v[1])}},e}(_t),GG=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new it,t}return e.prototype.init=function(t,n){this._controller=new Dl(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,a),this._updateController(t,n,a);var u=this._data;i.diff(u).add(function(h){JC(i,h)&&tD(i,h,null,s,t)}).update(function(h,f){var c=u.getItemGraphicEl(f);if(!JC(i,h)){c&&nD(u,f,c,s,t);return}tD(i,h,c,s,t)}).remove(function(h){var f=u.getItemGraphicEl(h);f&&nD(u,h,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(h,f){h.off("click").on("click",function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,n){var a=t.getData(),i=[];a.each(function(f){var c=a.getItemLayout(f);c&&!isNaN(c.x)&&!isNaN(c.y)&&i.push([+c.x,+c.y])});var o=[],s=[];Zu(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var h=t.coordinateSystem=new Ml;h.zoomLimit=t.get("scaleLimit"),h.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),h.setCenter(t.get("center"),n),h.setZoom(t.get("zoom")),this.group.attr({x:h.x,y:h.y,scaleX:h.scaleX,scaleY:h.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,n,a){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,h,f){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(h,f)&&!xf(u,a,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){bg(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){wg(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),a=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(i,o){i.setSymbolScale(a)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var a=this._nodeScaleRatio,i=n.scaleX||1,o=n.getZoom(),s=(o-1)*a+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(Rt);function JC(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function tD(r,e,t,n,a){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",h=r.tree.root,f=o.parentNode===h?o:o.parentNode||o,c=r.getItemGraphicEl(f.dataIndex),v=f.getLayout(),p=c?{x:c.__oldX,y:c.__oldY,rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:v,d=o.getLayout();i?(t=new yl(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=d.rawX,t.__radialRawY=d.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,Dt(t,{x:d.x,y:d.y},a);var g=t.getSymbolPath();if(a.get("layout")==="radial"){var y=h.children[0],m=y.getLayout(),_=y.children.length,S=void 0,x=void 0;if(d.x===m.x&&o.isExpand===!0&&y.children.length){var b={x:(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2};S=Math.atan2(b.y-m.y,b.x-m.x),S<0&&(S=Math.PI*2+S),x=b.x<m.x,x&&(S=S-Math.PI)}else S=Math.atan2(d.y-m.y,d.x-m.x),S<0&&(S=Math.PI*2+S),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(x=d.x<m.x,x&&(S=S-Math.PI)):(x=d.x>m.x,x||(S=S-Math.PI));var w=x?"left":"right",T=s.getModel("label"),C=T.get("rotate"),D=C*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-S:D,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?rs(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(st(t).focus=L),FG(a,o,h,t,p,v,d,n),t.__edge&&(t.onHoverStateChange=function(E){if(E!=="blur"){var P=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);P&&P.hoverState===Ds||Ju(t.__edge,E)}})}function FG(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),h=r.get("layout"),f=r.getOrient(),c=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=n.__edge=new Rs({shape:Pg(h,f,c,a,a)})),Dt(d,{shape:Pg(h,f,c,i,o)},r));else if(u==="polyline"){if(h==="orthogonal"){if(e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;m<g.length;m++){var _=g[m].getLayout();y.push([_.x,_.y])}d||(d=n.__edge=new zG({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:v}})),Dt(d,{shape:{parentPoint:[o.x,o.y],childPoints:y}},r)}}else if(process.env.NODE_ENV!=="production")throw new Error("The polyline edgeShape can only be used in orthogonal layout")}d&&!(u==="polyline"&&!e.isExpand)&&(d.useStyle(rt({strokeNoScale:!0,fill:null},p)),_e(d,l,"lineStyle"),Xa(d),s.add(d))}function eD(r,e,t,n,a){var i=e.tree.root,o=rD(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var h=e.getItemGraphicEl(s.dataIndex),f=h.__edge,c=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),v=n.get("edgeShape"),p=n.get("layout"),d=n.get("orient"),g=n.get(["lineStyle","curveness"]);c&&(v==="curve"?Qn(c,{shape:Pg(p,d,g,l,l),style:{opacity:0}},n,{cb:function(){t.remove(c)},removeOpt:a}):v==="polyline"&&n.get("layout")==="orthogonal"&&Qn(c,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(c)},removeOpt:a}))}}function rD(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function nD(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=rD(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};Qn(t,{x:s.x+1,y:s.y+1},a,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){eD(u,r,n,a,l)}),eD(i,r,n,a,l)}function Pg(r,e,t,n,a){var i,o,s,l,u,h,f,c;if(r==="radial"){u=n.rawX,f=n.rawY,h=a.rawX,c=a.rawY;var v=Il(u,f),p=Il(u,f+(c-f)*t),d=Il(h,c+(f-c)*t),g=Il(h,c);return{x1:v.x||0,y1:v.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:d.x||0,cpy2:d.y||0}}else u=n.x,f=n.y,h=a.x,c=a.y,(e==="LR"||e==="RL")&&(i=u+(h-u)*t,o=f,s=h+(u-h)*t,l=c),(e==="TB"||e==="BT")&&(i=u,o=f+(c-f)*t,s=h,l=c+(f-c)*t);return{x1:u,y1:f,x2:h,y2:c,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var _r=bt();function aD(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,iD(e,t,r),A(t,function(n){A(e.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,ht(HG,r))})}),e.wrapMethod("cloneShallow",ht($G,r)),A(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,ht(WG,r))}),tt(t[e.dataType]===e)}function HG(r,e){if(ZG(this)){var t=B({},_r(this).datas);t[this.dataType]=e,iD(e,t,r)}else kg(e,this.dataType,_r(this).mainData,r);return e}function WG(r,e){return r.struct&&r.struct.update(),e}function $G(r,e){return A(_r(e).datas,function(t,n){t!==e&&kg(t.cloneShallow(),n,e,r)}),e}function UG(r){var e=_r(this).mainData;return r==null||e==null?e:_r(e).datas[r]}function YG(){var r=_r(this).mainData;return r==null?[{data:r}]:G(xt(_r(r).datas),function(e){return{type:e,data:_r(r).datas[e]}})}function ZG(r){return _r(r).mainData===r}function iD(r,e,t){_r(r).datas={},A(e,function(n,a){kg(n,a,r,t)})}function kg(r,e,t,n){_r(t).datas[e]=r,_r(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=UG,r.getLinkedDataAll=YG}var XG=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){j(e)&&(n=t,t=e,e=null),e=e||{},U(e)&&(e={order:e});var a=e.order||"preorder",i=this[e.attr||"children"],o;a==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,n);a==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(e+1),a.height>t&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),Rg=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,a=t.length;n<a;n++)t[n].dataIndex=-1;for(var n=0,a=e.count();n<a;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var a=new r(t),i=[],o=1;s(e);function s(h,f){var c=h.value;o=Math.max(o,z(c)?c.length:1),i.push(h);var v=new XG(oe(h.name,""),a);f?qG(v,f):a.root=v,a._nodes.push(v);var p=h.children;if(p)for(var d=0;d<p.length;d++)s(p[d],v)}a.root.updateDepthAndHeight(0);var l=ul(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new ze(l,t);return u.initData(i),n&&n(u),aD({mainData:u,struct:a,structAttr:"tree"}),a.update(),a},r}();function qG(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function Ll(r,e,t){if(r&&dt(e,r.type)>=0){var n=t.getData().tree.root,a=r.targetNode;if(U(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function oD(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Ng(r,e){var t=oD(r);return dt(t,e)>=0}function Df(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var KG=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new Lt(a,this,this.ecModel),o=Rg.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(c,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(c.parentModel=i),c})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,h=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var c=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=c&&c.collapsed!=null?!c.collapsed:f.depth<=h}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return fe("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Df(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Gt);function jG(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;i=a.pop();)e(i,t)}function El(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var a=n.children;if(a.length)for(var i=a.length-1;i>=0;i--)t.push(a[i])}}function QG(r,e){r.eachSeriesByType("tree",function(t){JG(t,e)})}function JG(r,e){var t=PG(r,e);r.layoutInfo=t;var n=r.get("layout"),a=0,i=0,o=null;n==="radial"?(a=2*Math.PI,i=Math.min(t.height,t.width)/2,o=QC(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(a=t.width,i=t.height,o=QC());var s=r.getData().tree.root,l=s.children[0];if(l){IG(s),jG(l,LG,o),s.hierNode.modifier=-l.hierNode.prelim,El(l,EG);var u=l,h=l,f=l;El(l,function(_){var S=_.getLayout().x;S<u.getLayout().x&&(u=_),S>h.getLayout().x&&(h=_),_.depth>f.depth&&(f=_)});var c=u===h?1:o(u,h)/2,v=c-u.getLayout().x,p=0,d=0,g=0,y=0;if(n==="radial")p=a/(h.getLayout().x+c+v),d=i/(f.depth-1||1),El(l,function(_){g=(_.getLayout().x+v)*p,y=(_.depth-1)*d;var S=Il(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(h.getLayout().x+c+v),p=a/(f.depth-1||1),El(l,function(_){y=(_.getLayout().x+v)*d,g=m==="LR"?(_.depth-1)*p:a-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=a/(h.getLayout().x+c+v),d=i/(f.depth-1||1),El(l,function(_){g=(_.getLayout().x+v)*p,y=m==="TB"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function tF(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");B(s,o)})})}function eF(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=Ig(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}function rF(r){r.registerChartView(GG),r.registerSeriesModel(KG),r.registerLayout(QG),r.registerVisual(tF),eF(r)}var sD=["treemapZoomToNode","treemapRender","treemapMove"];function nF(r){for(var e=0;e<sD.length;e++)r.registerAction({type:sD[e],update:"updateView"},Qt);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},a);function a(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Ll(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Ng(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function lD(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(a){for(var i=a;i&&i.depth>1;)i=i.parentNode;var o=zp(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var aF=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};uD(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Lt({itemStyle:o},this,n);i=t.levels=iF(i,n);var l=G(i||[],function(f){return new Lt(f,s,n)},this),u=Rg.createTree(a,this,h);function h(f){f.wrapMethod("getItemModel",function(c,v){var p=u.getNodeByDataIndex(v),d=p?l[p.depth]:null;return c.parentModel=d||s,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return fe("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Df(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=q(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){lD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Gt);function uD(r){var e=0;A(r.children,function(n){uD(n);var a=n.value;z(a)&&(a=a[0]),e+=a});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function iF(r,e){var t=Pt(e.get("color")),n=Pt(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,i;A(r,function(s){var l=new Lt(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var oF=8,hD=8,Og=5,sF=function(){function r(e){this.group=new it,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),f={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,f,u),this._renderContent(e,f,s,l,u,h,a),Ch(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=oe(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+oF*2,t.emptyItemWidth);t.totalWidth+=s+hD,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s){for(var l=0,u=t.emptyItemWidth,h=e.get(["breadcrumb","height"]),f=cN(t.pos,t.box),c=t.totalWidth,v=t.renderList,p=a.getModel("itemStyle").getItemStyle(),d=v.length-1;d>=0;d--){var g=v[d],y=g.node,m=g.width,_=g.text;c>f.width&&(c-=m-u,m=u,_=null);var S=new Ve({shape:{points:lF(l,0,m,h,d===v.length-1,d===0)},style:rt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Tt({style:zt(i,{text:_})}),textConfig:{position:"inside"},z2:Qi*1e4,onclick:ht(s,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=zt(o,{text:_}),S.ensureState("emphasis").style=p,qt(S,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(S),uF(S,e,y),l+=m+hD}},r.prototype.remove=function(){this.group.removeAll()},r}();function lF(r,e,t,n,a,i){var o=[[a?r:r-Og,e],[r+t,e],[r+t,e+n],[a?r:r-Og,e+n]];return!i&&o.splice(2,0,[r+t+Og,e+n/2]),!a&&o.push([r,e+n/2]),o}function uF(r,e,t){st(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Df(t,e)}}var hF=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r}();function fF(){return new hF}var Vg=it,fD=wt,cD=3,vD="label",pD="upperLabel",cF=Qi*10,vF=Qi*2,pF=Qi*3,Ai=Ba([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),dD=function(r){var e=Ai(r);return e.stroke=e.fill=e.lineWidth=null,e},Af=bt(),dF=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Pl(),t}return e.prototype.render=function(t,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(dt(o,t)<0)){this.seriesModel=t,this.api=a,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Ll(i,s,t),u=i&&i.type,h=t.layoutInfo,f=!this._oldTree,c=this._storage,v=u==="treemapRootToNode"&&l&&c?{rootNodeGroup:c.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,p=this._giveContainerGroup(h),d=t.get("animation"),g=this._doRender(p,t,v);d&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,v):g.renderFinally(),this._resetController(a),this._renderBreadcrumb(t,a,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new Vg,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,a){var i=n.getData().tree,o=this._oldTree,s=Pl(),l=Pl(),u=this._storage,h=[];function f(m,_,S,x){return gF(n,l,u,a,s,h,m,_,S,x)}d(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var c=g(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var v=this.seriesModel.layoutInfo,p=i.root.getLayout();p.width===v.width&&p.height===v.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:c,renderFinally:y};function d(m,_,S,x,b){x?(_=m,A(m,function(C,D){!C.isRemoved()&&T(D,D)})):new Mn(_,m,w,w).add(T).update(T).remove(ht(T,null)).execute();function w(C){return C.getId()}function T(C,D){var M=C!=null?m[C]:null,I=D!=null?_[D]:null,L=f(M,I,S,b);L&&d(M&&M.viewChildren||[],I&&I.viewChildren||[],L,x,b+1)}}function g(m){var _=Pl();return m&&A(m,function(S,x){var b=_[x];A(S,function(w){w&&(b.push(w),Af(w).willDelete=!0)})}),_}function y(){A(c,function(m){A(m,function(_){_.parent&&_.parent.remove(_)})}),A(h,function(m){m.invisible=!0,m.dirty()})}},e.prototype._doAnimation=function(t,n,a,i){var o=a.get("animationDurationUpdate"),s=a.get("animationEasing"),l=(j(o)?0:o)||0,u=(j(s)?null:s)||"cubicOut",h=fF();A(n.willDeleteEls,function(f,c){A(f,function(v,p){if(!v.invisible){var d=v.parent,g,y=Af(d);if(i&&i.direction==="drillDown")g=d===i.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,_=0;y.willDelete||(m=y.nodeWidth/2,_=y.nodeHeight/2),g=c==="nodeGroup"?{x:m,y:_,style:{opacity:0}}:{shape:{x:m,y:_,width:0,height:0},style:{opacity:0}}}g&&h.add(v,g,l,0,u)}})}),A(this._storage,function(f,c){A(f,function(v,p){var d=n.lastsForAnimation[c][p],g={};d&&(v instanceof it?d.oldX!=null&&(g.x=v.x,g.y=v.y,v.x=d.oldX,v.y=d.oldY):(d.oldShape&&(g.shape=B({},v.shape),v.setShape(d.oldShape)),d.fadein?(v.setStyle("opacity",0),g.style={opacity:1}):v.style.opacity!==1&&(g.style={opacity:1})),h.add(v,g,l,0,u))})},this),this._state="animating",h.finished(Z(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this._controller,a=this._controllerHost;a||(this._controllerHost={target:this.group},a=this._controllerHost),n||(n=this._controller=new Dl(t.getZr()),n.enable(this.seriesModel.get("roam")),a.zoomLimit=this.seriesModel.get("scaleLimit"),a.zoom=this.seriesModel.get("zoom"),n.on("pan",Z(this._onPan,this)),n.on("zoom",Z(this._onZoom,this)));var i=new vt(0,0,t.getWidth(),t.getHeight());n.setPointerChecker(function(o,s,l){return i.contain(s,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>cD||Math.abs(t.dy)>cD)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new vt(s.x,s.y,s.width,s.height),u=null,h=this._controllerHost;u=h.zoomLimit;var f=h.zoom=h.zoom||1;if(f*=i,u){var c=u.min||0,v=u.max||1/0;f=Math.max(Math.min(v,f),c)}var p=f/h.zoom;h.zoom=f;var d=this.seriesModel.layoutInfo;n-=d.x,a-=d.y;var g=qe();Fr(g,g,[-n,-a]),Zc(g,g,[p,p]),Fr(g,g,[n,a]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&wh(u,h)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new sF(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(Ng(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Pl(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e}(Rt);function Pl(){return{nodeGroup:[],background:[],content:[]}}function gF(r,e,t,n,a,i,o,s,l,u){if(!o)return;var h=o.getLayout(),f=r.getData(),c=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var v=h.width,p=h.height,d=h.borderWidth,g=h.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=h.upperHeight,x=_&&_.length,b=c.getModel("itemStyle"),w=c.getModel(["emphasis","itemStyle"]),T=c.getModel(["blur","itemStyle"]),C=c.getModel(["select","itemStyle"]),D=b.get("borderRadius")||0,M=lt("nodeGroup",Vg);if(!M)return;if(l.add(M),M.x=h.x||0,M.y=h.y||0,M.markRedraw(),Af(M).nodeWidth=v,Af(M).nodeHeight=p,h.isAboveViewRoot)return M;var I=lt("background",fD,u,vF);I&&F(M,I,x&&h.upperLabelHeight);var L=c.getModel("emphasis"),E=L.get("focus"),P=L.get("blurScope"),k=L.get("disabled"),N=E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():E;if(x)jn(M)&&Ka(M,!1),I&&(Ka(I,!k),f.setItemGraphicEl(o.dataIndex,I),up(I,N,P));else{var R=lt("content",fD,u,pF);R&&H(M,R),I.disableMorphing=!0,I&&jn(I)&&Ka(I,!1),Ka(M,!k),f.setItemGraphicEl(o.dataIndex,M);var V=c.getShallow("cursor");V&&R.attr("cursor",V),up(M,N,P)}return M;function F(pt,nt,yt){var K=st(nt);if(K.dataIndex=o.dataIndex,K.seriesIndex=r.seriesIndex,nt.setShape({x:0,y:0,width:v,height:p,r:D}),g)$(nt);else{nt.invisible=!1;var ut=o.getVisual("style"),Ht=ut.stroke,Et=dD(b);Et.fill=Ht;var Vt=Ai(w);Vt.fill=w.get("borderColor");var Zt=Ai(T);Zt.fill=T.get("borderColor");var pe=Ai(C);if(pe.fill=C.get("borderColor"),yt){var er=v-2*d;Q(nt,Ht,ut.opacity,{x:d,y:0,width:er,height:S})}else nt.removeTextContent();nt.setStyle(Et),nt.ensureState("emphasis").style=Vt,nt.ensureState("blur").style=Zt,nt.ensureState("select").style=pe,Xa(nt)}pt.add(nt)}function H(pt,nt){var yt=st(nt);yt.dataIndex=o.dataIndex,yt.seriesIndex=r.seriesIndex;var K=Math.max(v-2*d,0),ut=Math.max(p-2*d,0);if(nt.culling=!0,nt.setShape({x:d,y:d,width:K,height:ut,r:D}),g)$(nt);else{nt.invisible=!1;var Ht=o.getVisual("style"),Et=Ht.fill,Vt=dD(b);Vt.fill=Et,Vt.decal=Ht.decal;var Zt=Ai(w),pe=Ai(T),er=Ai(C);Q(nt,Et,Ht.opacity,null),nt.setStyle(Vt),nt.ensureState("emphasis").style=Zt,nt.ensureState("blur").style=pe,nt.ensureState("select").style=er,Xa(nt)}pt.add(nt)}function $(pt){!pt.invisible&&i.push(pt)}function Q(pt,nt,yt,K){var ut=c.getModel(K?pD:vD),Ht=oe(c.get("name"),null),Et=ut.getShallow("show");Se(pt,he(c,K?pD:vD),{defaultText:Et?Ht:null,inheritColor:nt,defaultOpacity:yt,labelFetcher:r,labelDataIndex:o.dataIndex});var Vt=pt.getTextContent();if(Vt){var Zt=Vt.style,pe=kc(Zt.padding||0);K&&(pt.setTextConfig({layoutRect:K}),Vt.disableLabelLayout=!0),Vt.beforeUpdate=function(){var Xe=Math.max((K?K.width:pt.shape.width)-pe[1]-pe[3],0),Vi=Math.max((K?K.height:pt.shape.height)-pe[0]-pe[2],0);(Zt.width!==Xe||Zt.height!==Vi)&&Vt.setStyle({width:Xe,height:Vi})},Zt.truncateMinChar=2,Zt.lineOverflow="truncate",et(Zt,K,h);var er=Vt.getState("emphasis");et(er?er.style:null,K,h)}}function et(pt,nt,yt){var K=pt?pt.text:null;if(!nt&&yt.isLeafRoot&&K!=null){var ut=r.get("drillDownIcon",!0);pt.text=ut?ut+" "+K:K}}function lt(pt,nt,yt,K){var ut=m!=null&&t[pt][m],Ht=a[pt];return ut?(t[pt][m]=null,kt(Ht,ut)):g||(ut=new nt,ut instanceof lr&&(ut.z2=yF(yt,K)),jt(Ht,ut)),e[pt][y]=ut}function kt(pt,nt){var yt=pt[y]={};nt instanceof Vg?(yt.oldX=nt.x,yt.oldY=nt.y):yt.oldShape=B({},nt.shape)}function jt(pt,nt){var yt=pt[y]={},K=o.parentNode,ut=nt instanceof it;if(K&&(!n||n.direction==="drillDown")){var Ht=0,Et=0,Vt=a.background[K.getRawIndex()];!n&&Vt&&Vt.oldShape&&(Ht=Vt.oldShape.width,Et=Vt.oldShape.height),ut?(yt.oldX=0,yt.oldY=Et):yt.oldShape={x:Ht,y:Et,width:0,height:0}}yt.fadein=!ut}}function yF(r,e){return r*cF+e}var kl=A,mF=J,Mf=-1,ve=function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=at(e);this.type=n,this.mappingMethod=t,this._normalizeData=xF[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Bg(a),_F(a)):t==="category"?a.categories?SF(a):Bg(a,!0):(tt(t!=="linear"||a.dataExtent),Bg(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Z(this._normalizeData,this)},r.listVisualTypes=function(){return xt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){J(e)?A(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=z(e)?[]:J(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&kl(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(mF(e)){var t=[];kl(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||U(l)&&l===e+"")return o;n&&c(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],h=u.interval,f=u.close;if(h){if(h[0]===-1/0){if(Lf(f[1],e,h[1]))return o}else if(h[1]===1/0){if(Lf(f[0],h[0],e))return o}else if(Lf(f[0],h[0],e)&&Lf(f[1],e,h[1]))return o;n&&c(h[0],o),n&&c(h[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:a;function c(v,p){var d=Math.abs(v-e);d<i&&(i=d,a=p)}},r.visualHandlers={color:{applyVisual:Rl("color"),getColorMapper:function(){var e=this.option;return Z(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),Nl.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=iv(t,e.parsedVisual,a),i?a:gn(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return gn(iv(e,this.option.parsedVisual),"rgba")},category:Nl,piecewise:function(e,t){var n=Gg.call(this,t);return n==null&&(n=gn(iv(e,this.option.parsedVisual),"rgba")),n},fixed:Mi}},colorHue:If(function(e,t){return cs(e,t)}),colorSaturation:If(function(e,t){return cs(e,null,t)}),colorLightness:If(function(e,t){return cs(e,null,null,t)}),colorAlpha:If(function(e,t){return Tu(e,t)}),decal:{applyVisual:Rl("decal"),_normalizedToVisual:{linear:null,category:Nl,piecewise:null,fixed:null}},opacity:{applyVisual:Rl("opacity"),_normalizedToVisual:zg([0,1])},liftZ:{applyVisual:Rl("liftZ"),_normalizedToVisual:{linear:Mi,category:Mi,piecewise:Mi,fixed:Mi}},symbol:{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:gD,category:Nl,piecewise:function(e,t){var n=Gg.call(this,t);return n==null&&(n=gD.call(this,e)),n},fixed:Mi}},symbolSize:{applyVisual:Rl("symbolSize"),_normalizedToVisual:zg([0,1])}},r}();function _F(r){var e=r.pieceList;r.hasSpecialVisual=!1,A(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function SF(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(kl(e,function(o,s){t[o]=s}),!z(n)){var a=[];J(n)?kl(n,function(o,s){var l=t[s];a[l??Mf]=o}):a[Mf]=n,n=yD(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function Bg(r,e){var t=r.visual,n=[];J(t)?kl(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),yD(r,n)}function If(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:zg([0,1])}}function gD(r){var e=this.option.visual;return e[Math.round(It(r,[0,1],[0,e.length-1],!0))]||{}}function Rl(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function Nl(r){var e=this.option.visual;return e[this.option.loop&&r!==Mf?r%e.length:r]}function Mi(){return this.option.visual[0]}function zg(r){return{linear:function(e){return It(e,r,this.option.visual,!0)},category:Nl,piecewise:function(e,t){var n=Gg.call(this,t);return n==null&&(n=It(e,r,this.option.visual,!0)),n},fixed:Mi}}function Gg(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=ve.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function yD(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var n=Ke(t);return!n&&process.env.NODE_ENV!=="production"&&Xt("'"+t+"' is an illegal color, fallback to '#000000'",!0),n||[0,0,0,1]})),e}var xF={linear:function(r){return It(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=ve.findPieceIndex(r,e,!0);if(t!=null)return It(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??Mf},fixed:Qt};function Lf(r,e,t){return r?e<=t:e<t}var bF="itemStyle",mD=bt();const wF={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||_D(t,{},r.getViewRoot().getAncestors(),r)}};function _D(r,e,t,n){var a=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=a.getModel(bF),l=TF(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),h=s.get("borderColor"),f=s.get("borderColorSaturation"),c;f!=null&&(c=SD(l),h=CF(f,c)),u.stroke=h;var v=r.viewChildren;if(!v||!v.length)c=SD(l),u.fill=c;else{var p=DF(r,a,i,s,l,v);A(v,function(d,g){if(d.depth>=t.length||d===t[d.depth]){var y=AF(a,l,d,g,p,n);_D(d,y,t,n)}})}}}function TF(r,e,t){var n=B({},e),a=t.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function SD(r){var e=Fg(r,"color");if(e){var t=Fg(r,"colorAlpha"),n=Fg(r,"colorSaturation");return n&&(e=cs(e,null,null,n)),t&&(e=Tu(e,t)),e}}function CF(r,e){return e!=null?cs(e,null,null,r):null}function Fg(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function DF(r,e,t,n,a,i){if(!(!i||!i.length)){var o=Hg(e,"color")||a.color!=null&&a.color!=="none"&&(Hg(e,"colorAlpha")||Hg(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(h==="index"||h==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var c=new ve(f);return mD(c).drColorMappingBy=h,c}}}function Hg(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function AF(r,e,t,n,a,i){var o=B({},e);if(a){var s=a.type,l=s==="color"&&mD(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var Ol=Math.max,Ef=Math.min,xD=ee,Wg=A,bD=["itemStyle","borderWidth"],MF=["itemStyle","gapWidth"],IF=["upperLabel","show"],LF=["upperLabel","height"];const EF={seriesType:"treemap",reset:function(r,e,t,n){var a=t.getWidth(),i=t.getHeight(),o=r.option,s=se(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=W(xD(s.width,l[0]),a),h=W(xD(s.height,l[1]),i),f=n&&n.type,c=["treemapZoomToNode","treemapRootToNode"],v=Ll(n,c,r),p=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,d=r.getViewRoot(),g=oD(d);if(f!=="treemapMove"){var y=f==="treemapZoomToNode"?VF(r,v,d,u,h):p?[p.width,p.height]:[u,h],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),wD(d,_,!1,0),S=d.getLayout(),Wg(g,function(b,w){var T=(g[w+1]||d).getValue();b.setLayout(B({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var x=r.getData().tree.root;x.setLayout(BF(s,p,v),!0),r.setLayoutInfo(s),CD(x,new vt(-s.x,-s.y,a,i),g,d,0)}};function wD(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(bD),u=s.get(MF)/2,h=DD(s),f=Math.max(l,h),c=l-u,v=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:h},!0),a=Ol(a-2*c,0),i=Ol(i-c-v,0);var p=a*i,d=PF(r,s,p,e,t,n);if(d.length){var g={x:c,y:v,width:a,height:i},y=Ef(a,i),m=1/0,_=[];_.area=0;for(var S=0,x=d.length;S<x;){var b=d[S];_.push(b),_.area+=b.getLayout().area;var w=OF(_,y,e.squareRatio);w<=m?(S++,m=w):(_.area-=_.pop().getLayout().area,TD(_,y,g,u,!1),y=Ef(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&TD(_,y,g,u,!0),!t){var T=s.get("childrenVisibleMin");T!=null&&p<T&&(t=!0)}for(var S=0,x=d.length;S<x;S++)wD(d[S],e,t,n+1)}}}function PF(r,e,t,n,a,i){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=i;if(a&&!l)return r.viewChildren=[];o=At(o,function(v){return!v.isRemoved()}),RF(o,s);var u=NF(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=kF(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var h=0,f=o.length;h<f;h++){var c=o[h].getValue()/u.sum*t;o[h].setLayout({area:c})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function kF(r,e,t,n,a){if(!n)return t;for(var i=r.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return n==="asc"?a.splice(0,o-s):a.splice(s,o-s),t}function RF(r,e){return e&&r.sort(function(t,n){var a=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return a===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:a}),r}function NF(r,e,t){for(var n=0,a=0,i=e.length;a<i;a++)n+=e[a].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],Wg(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function OF(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<a&&(a=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?Ol(u*n/l,l/(u*a)):1/0}function TD(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],h=e?r.area/e:0;(a||h>t[l[o]])&&(h=t[l[o]]);for(var f=0,c=r.length;f<c;f++){var v=r[f],p={},d=h?v.getLayout().area/h:0,g=p[l[o]]=Ol(h-2*n,0),y=t[s[i]]+t[l[i]]-u,m=f===c-1||y<d?y:d,_=p[l[i]]=Ol(m-2*n,0);p[s[o]]=t[s[o]]+Ef(n,g/2),p[s[i]]=u+Ef(n,_/2),u+=m,v.setLayout(p,!0)}t[s[o]]+=h,t[l[o]]-=h}function VF(r,e,t,n,a){var i=(e||{}).node,o=[n,a];if(!i||i===t)return o;for(var s,l=n*a,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var h=0,f=s.children,c=0,v=f.length;c<v;c++)h+=f[c].getValue();var p=i.getValue();if(p===0)return o;u*=h/p;var d=s.getModel(),g=d.get(bD),y=Math.max(g,DD(d));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>A_&&(u=A_),i=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[n*m,a*m]}function BF(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var a=t.node,i=a.getLayout();if(!i)return n;for(var o=[i.width/2,i.height/2],s=a;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function CD(r,e,t,n,a){var i=r.getLayout(),o=t[a],s=o&&o===r;if(!(o&&!s||a===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new vt(e.x-i.x,e.y-i.y,e.width,e.height);Wg(r.viewChildren||[],function(u){CD(u,l,t,n,a+1)})}}function DD(r){return r.get(IF)?r.get(LF):0}function zF(r){r.registerSeriesModel(aF),r.registerChartView(dF),r.registerVisual(wF),r.registerLayout(EF),nF(r)}function GF(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getGraph(),i=a.data,o=n.mapArray(n.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){Ct(u)&&(u=o[u]);for(var h=0;h<e.length;h++)if(!e[h].isSelected(u))return!1}return!0})})}function FF(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getData(),i={};n.each(function(o){var s=n.getName(o);i["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++){var c=l.getShallow(h[f],!0);c!=null&&n.setItemVisual(o,h[f],c)}}),n.count()&&a.each(function(o){var s=a.getItemModel(o),l=s.getShallow("category");if(l!=null){U(l)&&(l=i["ec-"+l]);var u=n.getItemVisual(l,"style"),h=a.ensureUniqueItemVisual(o,"style");B(h,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],c=0;c<f.length;c++)a.setItemVisual(o,f[c],n.getItemVisual(l,f[c]))}})})}function Pf(r){return r instanceof Array||(r=[r,r]),r}function HF(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),a=Pf(e.get("edgeSymbol")),i=Pf(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=Pf(s.getShallow("symbol",!0)),h=Pf(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),c=n.ensureUniqueItemVisual(o,"style");switch(B(c,f),c.stroke){case"source":{var v=l.node1.getVisual("style");c.stroke=v&&v.fill;break}case"target":{var v=l.node2.getVisual("style");c.stroke=v&&v.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),h[0]&&l.setVisual("fromSymbolSize",h[0]),h[1]&&l.setVisual("toSymbolSize",h[1])})})}var $g="-->",kf=function(r){return r.get("autoCurveness")||null},AD=function(r,e){var t=kf(r),n=20,a=[];if(Ct(t))n=t;else if(z(t)){r.__curvenessList=t;return}e>n&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o<i;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=a},Vl=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join($g)},MD=function(r){var e=r.split($g);return[e[0],e[2],e[1]].join($g)},WF=function(r,e){var t=Vl(r.node1,r.node2,e);return e.__edgeMap[t]},$F=function(r,e){var t=Ug(Vl(r.node1,r.node2,e),e),n=Ug(Vl(r.node2,r.node1,e),e);return t+n},Ug=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function UF(r){kf(r)&&(r.__curvenessList=[],r.__edgeMap={},AD(r))}function YF(r,e,t,n){if(kf(t)){var a=Vl(r,e,t),i=t.__edgeMap,o=i[MD(a)];i[a]&&!o?i[a].isForward=!0:o&&i[a]&&(o.isForward=!0,i[a].isForward=!1),i[a]=i[a]||[],i[a].push(n)}}function Yg(r,e,t,n){var a=kf(e),i=z(a);if(!a)return null;var o=WF(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=$F(r,e);AD(e,u),r.lineStyle=r.lineStyle||{};var h=Vl(r.node1,r.node2,e),f=e.__curvenessList,c=i||u%2?0:1;if(o.isForward)return f[c+s];var v=MD(h),p=Ug(v,e),d=f[s+p+c];return n?i?a&&a[0]===0?(p+c)%2?d:-d:((p%2?0:1)+c)%2?d:-d:(p+c)%2?d:-d:f[s+p+c]}function ID(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var a=n.getModel();n.setLayout([+a.get("x"),+a.get("y")])}),Zg(t,r)}}function Zg(r,e){r.eachEdge(function(t,n){var a=rr(t.getModel().get(["lineStyle","curveness"]),-Yg(t,e,n,!0),0),i=vn(t.node1.getLayout()),o=vn(t.node2.getLayout()),s=[i,o];+a&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),t.setLayout(s)})}function ZF(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),a=t.coordinateSystem;if(a&&a.type!=="view"){var i=t.getData(),o=[];A(a.dimensions,function(c){o=o.concat(i.mapDimensionsAll(c))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,h=0;h<o.length;h++){var f=i.get(o[h],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,a.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}Zg(i.graph,t)}else(!n||n==="none")&&ID(t)})}function Bl(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,a=e.getZoom(),i=(a-1)*t+1;return i/n}function zl(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var LD=Math.PI,Xg=[];function qg(r,e,t,n){var a=r.coordinateSystem;if(!(a&&a.type!=="view")){var i=a.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,h=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var c=a.pointToData(n),v=c[0],p=c[1],d=[v-l,p-u];zi(d,d),cu(d,d,h),t.setLayout([l+d[0],u+d[1]],!0);var g=r.get(["circular","rotateLabel"]);ED(t,g,l,u)}XF[e](r,s,o,h,l,u,f),s.eachEdge(function(y,m){var _=rr(y.getModel().get(["lineStyle","curveness"]),Yg(y,r,m),0),S=vn(y.node1.getLayout()),x=vn(y.node2.getLayout()),b,w=(S[0]+x[0])/2,T=(S[1]+x[1])/2;+_&&(_*=3,b=[l*_+w*(1-_),u*_+T*(1-_)]),y.setLayout([S,x,b])})}}}var XF={value:function(r,e,t,n,a,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(h){var f=h.getValue("value"),c=u*(l?f:1)/2;s+=c,h.setLayout([n*Math.cos(s)+a,n*Math.sin(s)+i]),s+=c})},symbolSize:function(r,e,t,n,a,i,o){var s=0;Xg.length=o;var l=Bl(r);e.eachNode(function(f){var c=zl(f);isNaN(c)&&(c=2),c<0&&(c=0),c*=l;var v=Math.asin(c/2/n);isNaN(v)&&(v=LD/2),Xg[f.dataIndex]=v,s+=v*2});var u=(2*LD-s)/o/2,h=0;e.eachNode(function(f){var c=u+Xg[f.dataIndex];h+=c,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(h)+a,n*Math.sin(h)+i]),h+=c})}};function ED(r,e,t,n){var a=r.getGraphicEl();if(a){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=a.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var h=l[0]<t;h&&(u=u-Math.PI);var f=h?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var c=s.ensureState("emphasis");B(c.textConfig||(c.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function qF(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&qg(e,"symbolSize")})}var No=Nc;function KF(r,e,t){for(var n=r,a=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,h=0;h<n.length;h++){var f=n[h];f.p||(f.p=Ta(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=vn(f.p),f.edges=null}var c=t.friction==null?.6:t.friction,v=c,p,d;return{warmUp:function(){v=c*.8},setFixed:function(g){n[g].fixed=!0},setUnfixed:function(g){n[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){d=g},step:function(g){p&&p(n,a);for(var y=[],m=n.length,_=0;_<a.length;_++){var S=a[_];if(!S.ignoreForceLayout){var x=S.n1,b=S.n2;Ca(y,b.p,x.p);var w=Oc(y)-S.d,T=b.w/(x.w+b.w);isNaN(T)&&(T=0),zi(y,y),!x.fixed&&No(x.p,x.p,y,T*w*v),!b.fixed&&No(b.p,b.p,y,-(1-T)*w*v)}}for(var _=0;_<m;_++){var C=n[_];C.fixed||(Ca(y,l,C.p),No(C.p,C.p,y,u*v))}for(var _=0;_<m;_++)for(var x=n[_],D=_+1;D<m;D++){var b=n[D];Ca(y,b.p,x.p);var w=Oc(y);w===0&&(gE(y,Math.random()-.5,Math.random()-.5),w=1);var M=(x.rep+b.rep)/w/w;!x.fixed&&No(x.pp,x.pp,y,M),!b.fixed&&No(b.pp,b.pp,y,-M)}for(var I=[],_=0;_<m;_++){var C=n[_];C.fixed||(Ca(I,C.p,C.pp),No(C.p,C.p,I,v),Ee(C.pp,C.p))}v=v*.992;var L=v<.01;d&&d(n,a,L),g&&g(L)}}}function jF(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},a=e.getGraph(),i=a.data,o=a.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(_){var S=i.getId(_);i.setItemLayout(_,n[S]||[NaN,NaN])}):!l||l==="none"?ID(e):l==="circular"&&qg(e,"value");var u=i.getDataExtent("value"),h=o.getDataExtent("value"),f=s.get("repulsion"),c=s.get("edgeLength"),v=z(f)?f:[f,f],p=z(c)?c:[c,c];p=[p[1],p[0]];var d=i.mapArray("value",function(_,S){var x=i.getItemLayout(S),b=It(_,u,v);return isNaN(b)&&(b=(v[0]+v[1])/2),{w:b,rep:b,fixed:i.getItemModel(S).get("fixed"),p:!x||isNaN(x[0])||isNaN(x[1])?null:x}}),g=o.mapArray("value",function(_,S){var x=a.getEdgeByIndex(S),b=It(_,h,p);isNaN(b)&&(b=(p[0]+p[1])/2);var w=x.getModel(),T=rr(x.getModel().get(["lineStyle","curveness"]),-Yg(x,e,S,!0),0);return{n1:d[x.node1.dataIndex],n2:d[x.node2.dataIndex],d:b,curveness:T,ignoreForceLayout:w.get("ignoreForceLayout")}}),y=t.getBoundingRect(),m=KF(d,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(_,S){for(var x=0,b=_.length;x<b;x++)_[x].fixed&&Ee(_[x].p,a.getNodeByIndex(x).getLayout())}),m.afterStep(function(_,S,x){for(var b=0,w=_.length;b<w;b++)_[b].fixed||a.getNodeByIndex(b).setLayout(_[b].p),n[i.getId(b)]=_[b].p;for(var b=0,w=S.length;b<w;b++){var T=S[b],C=a.getEdgeByIndex(b),D=T.n1.p,M=T.n2.p,I=C.getLayout();I=I?I.slice():[],I[0]=I[0]||[],I[1]=I[1]||[],Ee(I[0],D),Ee(I[1],M),+T.curveness&&(I[2]=[(D[0]+M[0])/2-(D[1]-M[1])*T.curveness,(D[1]+M[1])/2-(M[0]-D[0])*T.curveness]),C.setLayout(I)}}),e.forceLayout=m,e.preservedPoints=n,m.step()}else e.forceLayout=null})}function QF(r,e,t){var n=B(r.getBoxLayoutParams(),{aspect:t});return se(n,{width:e.getWidth(),height:e.getHeight()})}function JF(r,e){var t=[];return r.eachSeriesByType("graph",function(n){var a=n.get("coordinateSystem");if(!a||a==="view"){var i=n.getData(),o=i.mapArray(function(g){var y=i.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];Zu(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),h=QF(n,e,u);isNaN(u)&&(s=[h.x,h.y],l=[h.x+h.width,h.y+h.height]);var f=l[0]-s[0],c=l[1]-s[1],v=h.width,p=h.height,d=n.coordinateSystem=new Ml;d.zoomLimit=n.get("scaleLimit"),d.setBoundingRect(s[0],s[1],f,c),d.setViewRect(h.x,h.y,v,p),d.setCenter(n.get("center"),e),d.setZoom(n.get("zoom")),t.push(d)}}),t}var PD=ue.prototype,Kg=Rs.prototype,kD=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(kD);function jg(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var t4=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new kD},e.prototype.buildPath=function(t,n){jg(n)?PD.buildPath.call(this,t,n):Kg.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return jg(this.shape)?PD.pointAt.call(this,t):Kg.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=jg(n)?[n.x2-n.x1,n.y2-n.y1]:Kg.tangentAt.call(this,t);return zi(a,a)},e}(_t),Qg=["fromSymbol","toSymbol"];function RD(r){return"_"+r+"Type"}function ND(r,e,t){var n=e.getItemVisual(t,r);if(!n||n==="none")return n;var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=bo(a),u=hi(o||0,l);return n+l+u+(i||"")+(s||"")}function OD(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=bo(a),u=hi(o||0,l),h=ie(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return h.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,h.name=r,h}}function e4(r){var e=new t4({name:"line",subPixelOptimize:!0});return Jg(e.shape,r),e}function Jg(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var ty=function(r){O(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createLine(t,n,a),i}return e.prototype._createLine=function(t,n,a){var i=t.hostModel,o=t.getItemLayout(n),s=e4(o);s.shape.percent=0,$t(s,{shape:{percent:1}},i,n),this.add(s),A(Qg,function(l){var u=OD(l,t,n);this.add(u),this[RD(l)]=ND(l,t,n)},this),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};Jg(l.shape,s),Dt(o,l,i,n),A(Qg,function(u){var h=ND(u,t,n),f=RD(u);if(this[f]!==h){this.remove(this.childOfName(u));var c=OD(u,t,n);this.add(c)}this[f]=h},this),this._updateCommonStl(t,n,a)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=a&&a.emphasisLineStyle,l=a&&a.blurLineStyle,u=a&&a.selectLineStyle,h=a&&a.labelStatesModels,f=a&&a.emphasisDisabled,c=a&&a.focus,v=a&&a.blurScope;if(!a||t.hasItemOption){var p=t.getItemModel(n),d=p.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),f=d.get("disabled"),c=d.get("focus"),v=d.get("blurScope"),h=he(p)}var g=t.getItemVisual(n,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,A(Qg,function(b){var w=this.childOfName(b);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var T=0;T<Ne.length;T++){var C=Ne[T],D=o.getState(C);if(D){var M=D.style||{},I=w.ensureState(C),L=I.style||(I.style={});M.stroke!=null&&(L[w.__isEmptyBrush?"stroke":"fill"]=M.stroke),M.opacity!=null&&(L.opacity=M.opacity)}}w.markRedraw()}},this);var m=i.getRawValue(n);Se(this,h,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(b,w){return i.getFormattedLabel(b,w,t.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(n):isFinite(m)?Kt(m):m)+""});var _=this.getTextContent();if(_){var S=h.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=S.get("position")||"middle";var x=S.get("distance");z(x)||(x=[x,x]),_.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),qt(this,c,v,f)},e.prototype.highlight=function(){wn(this)},e.prototype.downplay=function(){Tn(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");Jg(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),a=t.childOfName("toSymbol"),i=t.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,h=l.pointAt(0),f=l.pointAt(u),c=Ca([],f,h);zi(c,c);function v(D,M){var I=D.__specifiedRotation;if(I==null){var L=l.tangentAt(M);D.attr("rotation",(M===1?-1:1)*Math.PI/2-Math.atan2(L[1],L[0]))}else D.attr("rotation",I)}if(n&&(n.setPosition(h),v(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(f),v(a,1),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var p=void 0,d=void 0,g=i.__labelDistance,y=g[0]*o,m=g[1]*o,_=u/2,S=l.tangentAt(_),x=[S[1],-S[0]],b=l.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);f[0]<h[0]&&(T=Math.PI+T),i.rotation=T}var C=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":C=-m,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":C=m,d="top";break;default:C=0,d="middle"}switch(i.__position){case"end":i.x=c[0]*y+f[0],i.y=c[1]*m+f[1],p=c[0]>.8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*y+h[0],i.y=-c[1]*m+h[1],p=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+h[0],i.y=h[1]+C,p=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=b[0],i.y=b[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+f[0],i.y=f[1]+C,p=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(it),ey=function(){function r(e){this.group=new it,this._LineCtor=e||ty}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=VD(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=VD(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!r4(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=t.getItemLayout(a);if(ry(i)){var o=new this._LineCtor(t,a,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){Jn(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(ry(a)){var i=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,n,a,i){var o=e.getItemGraphicEl(n);if(!ry(t.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(t,a,i):o=new this._LineCtor(t,a,i),t.setItemGraphicEl(a,o),this.group.add(o)},r}();function r4(r){return r.animators&&r.animators.length>0}function VD(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:he(e)}}function BD(r){return isNaN(r[0])||isNaN(r[1])}function ry(r){return r&&!BD(r[0])&&!BD(r[1])}var ny=[],ay=[],iy=[],Oo=de,oy=Da,zD=Math.abs;function GD(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,h=.1;h<=.9;h+=.1){ny[0]=Oo(n[0],a[0],i[0],h),ny[1]=Oo(n[1],a[1],i[1],h);var f=zD(oy(ny,e)-l);f<o&&(o=f,s=h)}for(var c=0;c<32;c++){var v=s+u;ay[0]=Oo(n[0],a[0],i[0],s),ay[1]=Oo(n[1],a[1],i[1],s),iy[0]=Oo(n[0],a[0],i[0],v),iy[1]=Oo(n[1],a[1],i[1],v);var f=oy(ay,e)-l;if(zD(f)<.01)break;var p=oy(iy,e)-l;u/=2,f<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function sy(r,e){var t=[],n=us,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[vn(u[0]),vn(u[1])],u[2]&&u.__original.push(vn(u[2])));var c=u.__original;if(u[2]!=null){if(Ee(a[0],c[0]),Ee(a[1],c[2]),Ee(a[2],c[1]),h&&h!=="none"){var v=zl(s.node1),p=GD(a,c[0],v*e);n(a[0][0],a[1][0],a[2][0],p,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],p,t),a[0][1]=t[3],a[1][1]=t[4]}if(f&&f!=="none"){var v=zl(s.node2),p=GD(a,c[1],v*e);n(a[0][0],a[1][0],a[2][0],p,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],p,t),a[1][1]=t[1],a[2][1]=t[2]}Ee(u[0],a[0]),Ee(u[1],a[2]),Ee(u[2],a[1])}else{if(Ee(i[0],c[0]),Ee(i[1],c[1]),Ca(o,i[1],i[0]),zi(o,o),h&&h!=="none"){var v=zl(s.node1);Nc(i[0],i[0],o,v*e)}if(f&&f!=="none"){var v=zl(s.node2);Nc(i[1],i[1],o,-v*e)}Ee(u[0],i[0]),Ee(u[1],i[1])}})}function FD(r){return r.type==="view"}var n4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new ml,i=new ey,o=this.group;this._controller=new Dl(n.getZr()),this._controllerHost={target:o},o.add(a.group),o.add(i.group),this._symbolDraw=a,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(FD(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(h):Dt(u,h,t)}sy(t.getGraph(),Bl(t));var f=t.getData();s.updateData(f);var c=t.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,n,a),clearTimeout(this._layoutTimeout);var v=t.forceLayout,p=t.get(["force","layoutAnimation"]);v&&this._startForceLayoutIteration(v,p);var d=t.get("layout");f.graph.eachNode(function(_){var S=_.dataIndex,x=_.getGraphicEl(),b=_.getModel();if(x){x.off("drag").off("dragend");var w=b.get("draggable");w&&x.on("drag",function(C){switch(d){case"force":v.warmUp(),!i._layouting&&i._startForceLayoutIteration(v,p),v.setFixed(S),f.setItemLayout(S,[x.x,x.y]);break;case"circular":f.setItemLayout(S,[x.x,x.y]),_.setLayout({fixed:!0},!0),qg(t,"symbolSize",_,[C.offsetX,C.offsetY]),i.updateLayout(t);break;case"none":default:f.setItemLayout(S,[x.x,x.y]),Zg(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){v&&v.setUnfixed(S)}),x.setDraggable(w,!!b.get("cursor"));var T=b.get(["emphasis","focus"]);T==="adjacency"&&(st(x).focus=_.getAdjacentDataIndices())}}),f.graph.eachEdge(function(_){var S=_.getGraphicEl(),x=_.getModel().get(["emphasis","focus"]);S&&x==="adjacency"&&(st(S).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=f.getLayout("cx"),m=f.getLayout("cy");f.graph.eachNode(function(_){ED(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var a=this;(function i(){t.step(function(o){a.updateLayout(a._model),(a._layouting=!o)&&(n?a._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,n,a){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,h,f){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(h,f)&&!xf(u,a,t)}),!FD(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){bg(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){wg(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),sy(t.getGraph(),Bl(t)),i._lineDraw.updateLayout(),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=Bl(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){sy(t.getGraph(),Bl(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Rt);function Vo(r){return"_EC_"+r}var a4=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(n[Vo(e)]){process.env.NODE_ENV!=="production"&&console.error("Graph nodes have duplicate name or id");return}var a=new Ii(e,t);return a.hostGraph=this,this.nodes.push(a),n[Vo(e)]=a,a},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Vo(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(Ct(e)&&(e=this.nodes[e]),Ct(t)&&(t=this.nodes[t]),e instanceof Ii||(e=a[Vo(e)]),t instanceof Ii||(t=a[Vo(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new HD(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof Ii&&(e=e.id),t instanceof Ii&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof Ii||(t=this._nodesMap[Vo(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(a,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var h=u[o],f=h.node1===l?h.node2:h.node1;if(!f.__visited){if(e.call(a,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=a[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,a=0;a<t.length;a++)e.addNode(t[a].id,t[a].dataIndex);for(var a=0;a<n.length;a++){var i=n[a];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r}(),Ii=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=q(),t=q(),n=0;n<this.edges.length;n++){var a=this.edges[n];if(!(a.dataIndex<0)){e.set(a.dataIndex,!0);for(var i=[a.node1],o=[a.node2],s=0;s<i.length;){var l=i[s];s++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),i.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var h=o[s];s++,t.set(h.dataIndex,!0);for(var u=0;u<h.outEdges.length;u++)e.set(h.outEdges[u].dataIndex,!0),o.push(h.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r}(),HD=function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=q(),t=q();e.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i<n.length;){var o=n[i];i++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),n.push(o.inEdges[s].node1)}for(i=0;i<a.length;){var l=a[i];i++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),a.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},r}();function WD(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}te(Ii,WD("hostGraph","data")),te(HD,WD("hostGraph","edgeData"));function $D(r,e,t,n,a){for(var i=new a4(n),o=0;o<r.length;o++)i.addNode(ee(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var h=e[o],f=h.source,c=h.target;i.addEdge(f,c,u)&&(l.push(h),s.push(ee(oe(h.id,null),f+" > "+c)),u++)}var v=t.get("coordinateSystem"),p;if(v==="cartesian2d"||v==="polar")p=In(r,t);else{var d=po.get(v),g=d?d.dimensions||[]:[];dt(g,"value")<0&&g.concat(["value"]);var y=ul(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new ze(y,t),p.initData(r)}var m=new ze(["value"],t);return m.initData(l,s),a&&a(p,m),aD({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var i4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new wl(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Na(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){UF(this);var s=$D(i,a,this,!0,l);return A(s.edges,function(u){YF(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var f=Lt.prototype.getModel;function c(p,d){var g=f.call(this,p,d);return g.resolveParentPath=v,g}h.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=c,p});function v(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),fe("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var f=Rx({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(a){return a.value!=null?a:B({value:0},a)}),n=new ze(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Gt),o4={type:"graphRoam",event:"graphRoam",update:"none"};function s4(r){r.registerChartView(n4),r.registerSeriesModel(i4),r.registerProcessor(GF),r.registerVisual(FF),r.registerVisual(HF),r.registerLayout(ZF),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,qF),r.registerLayout(jF),r.registerCoordinateSystem("graphView",{dimensions:Ml.dimensions,create:JF}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Qt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Qt),r.registerAction(o4,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=a.coordinateSystem,o=Ig(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}var l4=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),u4=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new l4},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),h=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,h),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,h)},e}(_t);function h4(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=W(t[0],e.getWidth()),s=W(t[1],e.getHeight()),l=W(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Rf(r,e){var t=r==null?"":r+"";return e&&(U(e)?t=e.replace("{value}",t):j(e)&&(t=e(r))),t}var f4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=h4(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),c=f.get("roundCap"),v=c?pf:Oe,p=f.get("show"),d=f.getModel("lineStyle"),g=d.get("width"),y=[u,h];jv(y,!l),u=y[0],h=y[1];for(var m=h-u,_=u,S=[],x=0;p&&x<i.length;x++){var b=Math.min(Math.max(i[x][0],0),1);h=u+m*b;var w=new v({shape:{startAngle:_,endAngle:h,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:i[x][1]}),w.setStyle(d.getLineStyle(["color","width"])),S.push(w),_=h}S.reverse(),A(S,function(C){return s.add(C)});var T=function(C){if(C<=0)return i[0][1];var D;for(D=0;D<i.length;D++)if(i[D][0]>=C&&(D===0?0:i[D-1][0])<C)return i[D][1];return i[D-1][1]};this._renderTicks(t,n,a,T,o,u,h,l,g),this._renderTitleAndDetail(t,n,a,T,o),this._renderAnchor(t,o),this._renderPointer(t,n,a,T,o,u,h,l,g)},e.prototype._renderTicks=function(t,n,a,i,o,s,l,u,h){for(var f=this.group,c=o.cx,v=o.cy,p=o.r,d=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),_=t.getModel("axisLabel"),S=t.get("splitNumber"),x=m.get("splitNumber"),b=W(y.get("length"),p),w=W(m.get("length"),p),T=s,C=(l-s)/S,D=C/x,M=y.getModel("lineStyle").getLineStyle(),I=m.getModel("lineStyle").getLineStyle(),L=y.get("distance"),E,P,k=0;k<=S;k++){if(E=Math.cos(T),P=Math.sin(T),y.get("show")){var N=L?L+h:h,R=new ue({shape:{x1:E*(p-N)+c,y1:P*(p-N)+v,x2:E*(p-b-N)+c,y2:P*(p-b-N)+v},style:M,silent:!0});M.stroke==="auto"&&R.setStyle({stroke:i(k/S)}),f.add(R)}if(_.get("show")){var N=_.get("distance")+L,V=Rf(Kt(k/S*(g-d)+d),_.get("formatter")),F=i(k/S),H=E*(p-b-N)+c,$=P*(p-b-N)+v,Q=_.get("rotate"),et=0;Q==="radial"?(et=-T+2*Math.PI,et>Math.PI/2&&(et+=Math.PI)):Q==="tangential"?et=-T-Math.PI/2:Ct(Q)&&(et=Q*Math.PI/180),et===0?f.add(new Tt({style:zt(_,{text:V,x:H,y:$,verticalAlign:P<-.8?"top":P>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:F}),silent:!0})):f.add(new Tt({style:zt(_,{text:V,x:H,y:$,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:H,originY:$,rotation:et}))}if(m.get("show")&&k!==S){var N=m.get("distance");N=N?N+h:h;for(var lt=0;lt<=x;lt++){E=Math.cos(T),P=Math.sin(T);var kt=new ue({shape:{x1:E*(p-N)+c,y1:P*(p-N)+v,x2:E*(p-w-N)+c,y2:P*(p-w-N)+v},silent:!0,style:I});I.stroke==="auto"&&kt.setStyle({stroke:i((k+lt/x)/S)}),f.add(kt),T+=D}T-=D}else T+=C}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,h){var f=this.group,c=this._data,v=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),x=+t.get("max"),b=[S,x],w=[s,l];function T(D,M){var I=m.getItemModel(D),L=I.getModel("pointer"),E=W(L.get("width"),o.r),P=W(L.get("length"),o.r),k=t.get(["pointer","icon"]),N=L.get("offsetCenter"),R=W(N[0],o.r),V=W(N[1],o.r),F=L.get("keepAspect"),H;return k?H=ie(k,R-E/2,V-P,E,P,null,F):H=new u4({shape:{angle:-Math.PI/2,width:E,r:P,x:R,y:V}}),H.rotation=-(M+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function C(D,M){var I=g.get("roundCap"),L=I?pf:Oe,E=g.get("overlap"),P=E?g.get("width"):h/m.count(),k=E?o.r-P:o.r-(D+1)*P,N=E?o.r:o.r-D*P,R=new L({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:k,r:N}});return E&&(R.z2=It(m.get(_,D),[S,x],[100,0],!0)),R}(y||d)&&(m.diff(c).add(function(D){var M=m.get(_,D);if(d){var I=T(D,s);$t(I,{rotation:-((isNaN(+M)?w[0]:It(M,b,w,!0))+Math.PI/2)},t),f.add(I),m.setItemGraphicEl(D,I)}if(y){var L=C(D,s),E=g.get("clip");$t(L,{shape:{endAngle:It(M,b,w,E)}},t),f.add(L),tp(t.seriesIndex,m.dataType,D,L),p[D]=L}}).update(function(D,M){var I=m.get(_,D);if(d){var L=c.getItemGraphicEl(M),E=L?L.rotation:s,P=T(D,E);P.rotation=E,Dt(P,{rotation:-((isNaN(+I)?w[0]:It(I,b,w,!0))+Math.PI/2)},t),f.add(P),m.setItemGraphicEl(D,P)}if(y){var k=v[M],N=k?k.shape.endAngle:s,R=C(D,N),V=g.get("clip");Dt(R,{shape:{endAngle:It(I,b,w,V)}},t),f.add(R),tp(t.seriesIndex,m.dataType,D,R),p[D]=R}}).execute(),m.each(function(D){var M=m.getItemModel(D),I=M.getModel("emphasis"),L=I.get("focus"),E=I.get("blurScope"),P=I.get("disabled");if(d){var k=m.getItemGraphicEl(D),N=m.getItemVisual(D,"style"),R=N.fill;if(k instanceof ge){var V=k.style;k.useStyle(B({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},N))}else k.useStyle(N),k.type!=="pointer"&&k.setColor(R);k.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",i(It(m.get(_,D),b,[0,1],!0))),k.z2EmphasisLift=0,_e(k,M),qt(k,L,E,P)}if(y){var F=p[D];F.useStyle(m.getItemVisual(D,"style")),F.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,_e(F,M),qt(F,L,E,P)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),h=ie(s,n.cx-o/2+W(l[0],n.r),n.cy-o/2+W(l[1],n.r),o,o,null,u);h.z2=a.get("showAbove")?1:0,h.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(h)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),h=+t.get("min"),f=+t.get("max"),c=new it,v=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new Tt({silent:!0}),p[y]=new Tt({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new it,x=i(It(_,[h,f],[0,1],!0)),b=m.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),T=o.cx+W(w[0],o.r),C=o.cy+W(w[1],o.r),D=v[y];D.attr({z2:g?0:2,style:zt(b,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:x})}),S.add(D)}var M=m.getModel("detail");if(M.get("show")){var I=M.get("offsetCenter"),L=o.cx+W(I[0],o.r),E=o.cy+W(I[1],o.r),P=W(M.get("width"),o.r),k=W(M.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:x,D=p[y],R=M.get("formatter");D.attr({z2:g?0:2,style:zt(M,{x:L,y:E,text:Rf(_,R),width:isNaN(P)?null:P,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:N})}),hS(D,{normal:M},_,function(F){return Rf(F,R)}),d&&fS(D,y,l,t,{getFormattedLabel:function(F,H,$,Q,et,lt){return Rf(lt?lt.interpolatedValue:_,R)}}),S.add(D)}c.add(S)}),this.group.add(c),this._titleEls=v,this._detailEls=p},e.type="gauge",e}(Rt),c4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return Po(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Gt);function v4(r){r.registerChartView(f4),r.registerSeriesModel(c4)}var p4=["itemStyle","opacity"],d4=function(r){O(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new Be,s=new Tt;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),h=s.get(p4);h=h??1,a||Lr(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,$t(i,{style:{opacity:h}},o,n)):Dt(i,{style:{opacity:h},shape:{points:l.points}},o,n),_e(i,s),this._updateLabel(t,n),qt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),h=u.label,f=t.getItemVisual(n,"style"),c=f.fill;Se(o,he(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}}),a.setTextConfig({local:!0,inside:!!h.inside,insideStroke:c,outsideFill:c});var v=h.linePoints;i.setShape({points:v}),a.textGuideLineConfig={anchor:v?new ct(v[0][0],v[0][1]):null},Dt(o,{style:{x:h.x,y:h.y}},s,n),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),Gd(a,Fd(l),{stroke:c})},e}(Ve),g4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new d4(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(i,l),s.add(h),i.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);Os(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Rt),y4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new wl(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Po(this,{coordDimensions:["value"],encodeDefaulter:ht(Np,this)})},e.prototype._defaultLabelLine=function(t){Na(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Gt);function m4(r,e){return se(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function _4(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();o<s;o++)a[o]=o;return j(e)?a.sort(e):e!=="none"&&a.sort(function(l,u){return i?n[l]-n[u]:n[u]-n[l]}),a}function S4(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var a=r.getItemModel(n),i=a.getModel("label"),o=i.get("position"),s=a.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,h=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,c,v,p;if(h)o==="insideLeft"?(c=(u[0][0]+u[3][0])/2+5,v=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(c=(u[1][0]+u[2][0])/2-5,v=(u[1][1]+u[2][1])/2,f="right"):(c=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,v=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),p=[[c,v],[c,v]];else{var d=void 0,g=void 0,y=void 0,m=void 0,_=s.get("length");process.env.NODE_ENV!=="production"&&(t==="vertical"&&["top","bottom"].indexOf(o)>-1&&(o="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),t==="horizontal"&&["left","right"].indexOf(o)>-1&&(o="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))),o==="left"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=d-_,c=y-5,f="right"):o==="right"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=d+_,c=y+5,f="left"):o==="top"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,v=m-5,f="center"):o==="bottom"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,v=m+5,f="center"):o==="rightTop"?(d=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,f="center"):(y=d+_,c=y+5,f="top")):o==="rightBottom"?(d=u[2][0],g=u[2][1],t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=d+_,c=y+5,f="bottom")):o==="leftTop"?(d=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,f="center"):(y=d-_,c=y-5,f="right")):o==="leftBottom"?(d=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=d-_,c=y-5,f="right")):(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=d+_,c=y+5,f="left")),t==="horizontal"?(y=d,c=y):(m=g,v=m),p=[[d,g],[y,m]]}l.label={linePoints:p,x:c,y:v,verticalAlign:"middle",textAlign:f,inside:h}})}function x4(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=m4(t,e),s=t.get("orient"),l=o.width,u=o.height,h=_4(n,i),f=o.x,c=o.y,v=s==="horizontal"?[W(t.get("minSize"),u),W(t.get("maxSize"),u)]:[W(t.get("minSize"),l),W(t.get("maxSize"),l)],p=n.getDataExtent(a),d=t.get("min"),g=t.get("max");d==null&&(d=Math.min(p[0],0)),g==null&&(g=p[1]);var y=t.get("funnelAlign"),m=t.get("gap"),_=s==="horizontal"?l:u,S=(_-m*(n.count()-1))/n.count(),x=function(E,P){if(s==="horizontal"){var k=n.get(a,E)||0,N=It(k,[d,g],v,!0),R=void 0;switch(y){case"top":R=c;break;case"center":R=c+(u-N)/2;break;case"bottom":R=c+(u-N);break}return[[P,R],[P,R+N]]}var V=n.get(a,E)||0,F=It(V,[d,g],v,!0),H;switch(y){case"left":H=f;break;case"center":H=f+(l-F)/2;break;case"right":H=f+l-F;break}return[[H,P],[H+F,P]]};i==="ascending"&&(S=-S,m=-m,s==="horizontal"?f+=l:c+=u,h=h.reverse());for(var b=0;b<h.length;b++){var w=h[b],T=h[b+1],C=n.getItemModel(w);if(s==="horizontal"){var D=C.get(["itemStyle","width"]);D==null?D=S:(D=W(D,l),i==="ascending"&&(D=-D));var M=x(w,f),I=x(T,f+D);f+=D+m,n.setItemLayout(w,{points:M.concat(I.slice().reverse())})}else{var L=C.get(["itemStyle","height"]);L==null?L=S:(L=W(L,u),i==="ascending"&&(L=-L));var M=x(w,c),I=x(T,c+L);c+=L+m,n.setItemLayout(w,{points:M.concat(I.slice().reverse())})}}S4(n)})}function b4(r){r.registerChartView(g4),r.registerSeriesModel(y4),r.registerLayout(x4),r.registerProcessor(bl("funnel"))}var w4=.3,T4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new it,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,h=u.dimensions,f=ZD(t);s.diff(l).add(c).update(v).remove(p).execute();function c(g){var y=YD(s,o,g,h,u);ly(y,s,g,f)}function v(g,y){var m=l.getItemGraphicEl(y),_=UD(s,g,h,u);s.setItemGraphicEl(g,m),Dt(m,{shape:{points:_}},t,g),Lr(m),ly(m,s,g,f)}function p(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var d=C4(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(d)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,a){for(var i=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=ZD(n),u=this._progressiveEls=[],h=t.start;h<t.end;h++){var f=YD(i,this._dataGroup,h,s,o);f.incremental=!0,ly(f,i,h,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(Rt);function C4(r,e,t){var n=r.model,a=r.getRect(),i=new wt({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o=n.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),$t(i,{shape:{width:a.width,height:a.height}},e,t),i}function UD(r,e,t,n){for(var a=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);D4(s,n.getAxis(o).type)||a.push(n.dataToPoint(s,o))}return a}function YD(r,e,t,n,a){var i=UD(r,t,n,a),o=new Be({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function ZD(r){var e=r.get("smooth",!0);return e===!0&&(e=w4),e=_n(e),wa(e)&&(e=0),{smooth:e}}function ly(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var a=e.getItemModel(t),i=a.getModel("emphasis");_e(r,a,"lineStyle"),qt(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function D4(r,e){return e==="category"?r==null:r==null||isNaN(r)}var A4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,n){return In(null,this,{useEncodeDefaulter:Z(M4,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,a=this.getData(),i=[];return n.eachActiveState(a,function(o,s){t===o&&i.push(a.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(Gt);function M4(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return A(e.dimensions,function(n){var a=I4(n);t[n]=a}),t}}function I4(r){return+r.replace("dim","")}var L4=["lineStyle","opacity"],E4={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(a,i){t.eachActiveState(i,function(o,s){var l=n[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(L4,!0);u!=null&&(l=u)}var h=i.ensureUniqueItemVisual(s,"style");h.opacity=l},a.start,a.end)}}}};function P4(r){k4(r),R4(r)}function k4(r){if(!r.parallel){var e=!1;A(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function R4(r){var e=Pt(r.parallelAxis);A(e,function(t){if(J(t)){var n=t.parallelIndex||0,a=Pt(r.parallel)[n];a&&a.parallelAxisDefault&&ft(t,a.parallelAxisDefault,!1)}})}var N4=5,O4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this._model=t,this._api=a,this._handlers||(this._handlers={},A(V4,function(i,o){a.getZr().on(o,this._handlers[o]=Z(i,this))},this)),So(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){Ks(this,"_throttledDispatchExpand"),A(this._handlers,function(a,i){n.getZr().off(i,a)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(B({type:"parallelAxisExpand"},t))},e.type="parallel",e}(Yt),V4={mousedown:function(r){uy(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(uy(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>N4)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!uy(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function uy(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var B4=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&ft(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=At(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);A(a,function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(St),z4=function(r){O(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Nr);function Li(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Bo(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Bo(s,[0,o]),a=i=Bo(s,[a,i]),n=0}e[0]=Bo(e[0],t),e[1]=Bo(e[1],t);var l=hy(e,n);e[n]+=r;var u=a||0,h=t.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=Bo(e[n],h);var f;return f=hy(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=hy(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function hy(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Bo(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var fy=A,XD=Math.min,qD=Math.max,KD=Math.floor,G4=Math.ceil,jD=Kt,F4=Math.PI,H4=function(){function r(e,t,n){this.type="parallel",this._axesMap=q(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;fy(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),h=this._axesMap.set(o,new z4(o,af(u),[0,0],u.get("type"),l)),f=h.type==="category";h.onBand=f&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var a=n.getData();fy(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),Mo(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=se(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,h=Nf(e.get("axisExpandWidth"),l),f=Nf(e.get("axisExpandCount")||0,[0,u]),c=e.get("axisExpandable")&&u>3&&u>f&&f>1&&h>0&&s>0,v=e.get("axisExpandWindow"),p;if(v)p=Nf(v[1]-v[0],l),v[1]=v[0]+p;else{p=Nf(h*(f-1),l);var d=e.get("axisExpandCenter")||KD(u/2);v=[h*d-p/2],v[1]=v[0]+p}var g=(s-p)/(u-f);g<3&&(g=0);var y=[KD(jD(v[0]/h,1))+1,G4(jD(v[1]/h,1))-1],m=g/h*v[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:c,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),fy(n,function(o,s){var l=(a.axisExpandable?$4:W4)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},h={horizontal:F4/2,vertical:0},f=[u[i].x+e.x,u[i].y+e.y],c=h[i],v=qe();Aa(v,v,c),Fr(v,v,f),this._axesLayout[o]={position:f,rotation:c,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),h=n;h<a;h++){var f=void 0;if(!u)f="normal";else{f="active";for(var c=e.getValues(s,h),v=0,p=o.length;v<p;v++){var d=l[v].getActiveState(c[v]);if(d==="inactive"){f="inactive";break}}}t(f,h)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,a=0,i=e.length;a<i;a++)t.get(e[a]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return Pr([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return at(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,a=t.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:a};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",h=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),c=f[0]!=null;if(h)c&&h&&s<i*f[0]?(u="jump",l=s-i*f[2]):c&&h&&s>i*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/h,l?Li(l,a,o,"all"):u="none";else{var v=a[1]-a[0],p=o[1]*s/v;a=[qD(0,p-v/2)],a[1]=XD(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r}();function Nf(r,e){return XD(qD(r,e[0]),e[1])}function W4(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function $4(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,h;return r<o[0]?(s=r*i,h=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(a-1-r)*i,h=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:h}}function U4(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new H4(n,r,e);i.name="parallel_"+a,i.resize(n,e),n.coordinateSystem=i,i.model=n,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var a=n.getReferringComponents("parallel",ne).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var Y4={create:U4},cy=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return Ba([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=at(t);if(n)for(var a=n.length-1;a>=0;a--)sr(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;i<o;i++)if(n[i][0]<=t&&t<=n[i][1])return"active";return"inactive"},e}(St);te(cy,fl);var Ei=!0,Gl=Math.min,zo=Math.max,Z4=Math.pow,X4=1e4,q4=6,K4=6,QD="globalPan",j4={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Q4={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},JD={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},J4=0,vy=function(r){O(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},process.env.NODE_ENV!=="production"&&tt(t),n._zr=t,n.group=new it,n._uid="brushController_"+J4++,A(oH,function(a,i){this._handlers[i]=Z(a,this)},n),n}return e.prototype.enableBrush=function(t){return process.env.NODE_ENV!=="production"&&tt(this._mounted),this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||W3(n,QD,this._uid),A(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=ft(at(JD),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;$3(t,QD,this._uid),A(this._handlers,function(n,a){t.off(a,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};A(t,function(a){n[a.panelId]=at(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},process.env.NODE_ENV!=="production"&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){process.env.NODE_ENV!=="production"&&tt(this._mounted),t=G(t,function(c){return ft(at(JD),c,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Mn(a,t,u,l).add(h).update(h).remove(f).execute(),this;function l(c,v){return(c.id!=null?c.id:n+v)+"-"+c.brushType}function u(c,v){return l(c.__brushOption,v)}function h(c,v){var p=t[c];if(v!=null&&a[v]===s)i[c]=a[v];else{var d=i[c]=v!=null?(a[v].__brushOption=p,a[v]):eA(o,tA(o,p));py(o,d)}}function f(c){a[c]!==s&&o.group.remove(a[c])}},e.prototype.unmount=function(){if(!(process.env.NODE_ENV!=="production"&&!this._mounted))return this.enableBrush(!1),yy(this),this._zr.remove(this.group),process.env.NODE_ENV!=="production"&&(this._mounted=!1),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(nr);function tA(r,e){var t=Of[e.brushType].createCover(r,e);return t.__brushOption=e,nA(t,e),r.group.add(t),t}function eA(r,e){var t=dy(e);return t.endCreating&&(t.endCreating(r,e),nA(e,e.__brushOption)),e}function rA(r,e){var t=e.__brushOption;dy(e).updateCoverShape(r,e,t.range,t)}function nA(r,e){var t=e.z;t==null&&(t=X4),r.traverse(function(n){n.z=t,n.z2=t})}function py(r,e){dy(e).updateCommon(r,e),rA(r,e)}function dy(r){return Of[r.__brushOption.brushType]}function gy(r,e,t){var n=r._panels;if(!n)return Ei;var a,i=r._transform;return A(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function aA(r,e){var t=r._panels;if(!t)return Ei;var n=e.__brushOption.panelId;return n!=null?t[n]:Ei}function yy(r){var e=r._covers,t=e.length;return A(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function Pi(r,e){var t=G(r._covers,function(n){var a=n.__brushOption,i=at(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function tH(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],a=t[0]-n[0],i=t[1]-n[1],o=Z4(a*a+i*i,.5);return o>q4}function iA(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function oA(r,e,t,n){var a=new it;return a.add(new wt({name:"main",style:_y(t),silent:!0,draggable:!0,cursor:"move",drift:ht(uA,r,e,a,["n","s","w","e"]),ondragend:ht(Pi,e,{isEnd:!0})})),A(n,function(i){a.add(new wt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ht(uA,r,e,a,i),ondragend:ht(Pi,e,{isEnd:!0})}))}),a}function sA(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=zo(a,K4),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,h=t[0][1],f=t[1][1],c=h-i+a/2,v=f-i+a/2,p=h-o,d=f-s,g=p+a,y=d+a;Pn(r,e,"main",o,s,p,d),n.transformable&&(Pn(r,e,"w",l,u,i,y),Pn(r,e,"e",c,u,i,y),Pn(r,e,"n",l,u,g,i),Pn(r,e,"s",l,v,g,i),Pn(r,e,"nw",l,u,i,i),Pn(r,e,"ne",c,u,i,i),Pn(r,e,"sw",l,v,i,i),Pn(r,e,"se",c,v,i,i))}function my(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(_y(t)),a.attr({silent:!n,cursor:n?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Sy(r,i[0]):rH(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?Q4[s]+"-resize":null})})}function Pn(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(aH(xy(r,e,[[n,a],[n+i,a+o]])))}function _y(r){return rt({strokeNoScale:!0},r.brushStyle)}function lA(r,e,t,n){var a=[Gl(r,t),Gl(e,n)],i=[zo(r,t),zo(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function eH(r){return ti(r.group)}function Sy(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=ch(t[e],eH(r));return n[a]}function rH(r,e){var t=[Sy(r,e[0]),Sy(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function uA(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=hA(e,a,i);A(n,function(u){var h=j4[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=r.fromRectRange(lA(s[0][0],s[1][0],s[0][1],s[1][1])),py(e,t),Pi(e,{isEnd:!1})}function nH(r,e,t,n){var a=e.__brushOption.range,i=hA(r,t,n);A(a,function(o){o[0]+=i[0],o[1]+=i[1]}),py(r,e),Pi(r,{isEnd:!1})}function hA(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function xy(r,e,t){var n=aA(r,e);return n&&n!==Ei?n.clipPath(t,r._transform):at(t)}function aH(r){var e=Gl(r[0][0],r[1][0]),t=Gl(r[0][1],r[1][1]),n=zo(r[0][0],r[1][0]),a=zo(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function iH(r,e,t){if(!(!r._brushType||sH(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=gy(r,e,t);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===Ei||s.panelId===i.panelId)&&Of[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function by(r){var e=r.event;e.preventDefault&&e.preventDefault()}function wy(r,e,t){return r.childOfName("main").contain(e,t)}function fA(r,e,t,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),tH(r)||a){if(i&&!a){o.brushMode==="single"&&yy(r);var l=at(o);l.brushType=cA(l.brushType,i),l.panelId=i===Ei?null:i.panelId,a=r._creatingCover=tA(r,l),r._covers.push(a)}if(a){var u=Of[cA(r._brushType,i)],h=a.__brushOption;h.range=u.getCreatingRange(xy(r,a,r._track)),n&&(eA(r,a),u.updateCommon(r,a)),rA(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&gy(r,e,t)&&yy(r)&&(s={isEnd:n,removeOnClick:!0});return s}function cA(r,e){return r==="auto"?(process.env.NODE_ENV!=="production"&&tt(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):r}var oH={mousedown:function(r){if(this._dragging)vA(this,r);else if(!r.target||!r.target.draggable){by(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=gy(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(iH(this,r,n),this._dragging){by(r);var a=fA(this,r,n,!1);a&&Pi(this,a)}},mouseup:function(r){vA(this,r)}};function vA(r,e){if(r._dragging){by(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=fA(r,e,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&Pi(r,i)}}function sH(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var Of={lineX:pA(0),lineY:pA(1),rect:{createCover:function(r,e){function t(n){return n}return oA({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=iA(r);return lA(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){sA(r,e,t,n)},updateCommon:my,contain:wy},polygon:{createCover:function(r,e){var t=new it;return t.add(new Be({name:"main",style:_y(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Ve({name:"main",draggable:!0,drift:ht(nH,r,e),ondragend:ht(Pi,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:xy(r,e,t)})},updateCommon:my,contain:wy}};function pA(r){return{createCover:function(e,t){return oA({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=iA(e),n=Gl(t[0][r],t[1][r]),a=zo(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=aA(e,t);if(o!==Ei&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),sA(e,t,l,a)},updateCommon:my,contain:wy}}function dA(r){return r=Ty(r),function(e){return rS(e,r)}}function gA(r,e){return r=Ty(r),function(t){var n=e??t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function yA(r,e,t){var n=Ty(r);return function(a,i){return n.contain(i[0],i[1])&&!xf(a,e,t)}}function Ty(r){return vt.create(r)}var lH=["axisLine","axisTickLabel","axisName"],uH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new vy(n.getZr())).on("brush",Z(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!hH(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it,this.group.add(this._axisGroup),!!t.get("show")){var s=cH(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),h=u.width,f=t.axis.dim,c=l.getAxisLayout(f),v=B({strokeContainThreshold:h},c),p=new He(t,v);A(lH,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(v,u,t,s,h,a),Vs(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),f=vt.create({x:l[0],y:-o/2,width:u,height:o});f.x-=h,f.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:dA(f),isTargetByCursor:yA(f,s,i),getLinearBrushOtherExtent:gA(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(fH(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=G(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Yt);function hH(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function fH(r){var e=r.axis;return G(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function cH(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var vH={type:"axisAreaSelect",event:"axisAreaSelected"};function pH(r){r.registerAction(vH,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var dH={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function mA(r){r.registerComponentView(O4),r.registerComponentModel(B4),r.registerCoordinateSystem("parallel",Y4),r.registerPreprocessor(P4),r.registerComponentModel(cy),r.registerComponentView(uH),ko(r,"parallel",cy,dH),pH(r)}function gH(r){gt(mA),r.registerChartView(T4),r.registerSeriesModel(A4),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,E4)}var yH=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),mH=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new yH},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){wn(this)},e.prototype.downplay=function(){Tn(this)},e}(_t),_H=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,h=l.height,f=t.getData(),c=t.getData("edge"),v=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new mH,g=st(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=p.node1.getLayout(),x=p.node1.getModel(),b=x.get("localX"),w=x.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),D=C.get("localX"),M=C.get("localY"),I=p.getLayout(),L,E,P,k,N,R,V,F;d.shape.extent=Math.max(1,I.dy),d.shape.orient=v,v==="vertical"?(L=(b!=null?b*u:S.x)+I.sy,E=(w!=null?w*h:S.y)+S.dy,P=(D!=null?D*u:T.x)+I.ty,k=M!=null?M*h:T.y,N=L,R=E*(1-_)+k*_,V=P,F=E*_+k*(1-_)):(L=(b!=null?b*u:S.x)+S.dx,E=(w!=null?w*h:S.y)+I.sy,P=D!=null?D*u:T.x,k=(M!=null?M*h:T.y)+I.ty,N=L*(1-_)+P*_,R=E,V=L*_+P*(1-_),F=k),d.setShape({x1:L,y1:E,x2:P,y2:k,cpx1:N,cpy1:R,cpx2:V,cpy2:F}),d.useStyle(m.getItemStyle()),_A(d.style,v,p);var H=""+y.get("value"),$=he(y,"edgeLabel");Se(d,$,{labelFetcher:{getFormattedLabel:function(lt,kt,jt,pt,nt,yt){return t.getFormattedLabel(lt,kt,"edge",pt,rr(nt,$.normal&&$.normal.get("formatter"),H),yt)}},labelDataIndex:p.dataIndex,defaultText:H}),d.setTextConfig({position:"inside"});var Q=y.getModel("emphasis");_e(d,y,"lineStyle",function(lt){var kt=lt.getItemStyle();return _A(kt,v,p),kt}),s.add(d),c.setItemGraphicEl(p.dataIndex,d);var et=Q.get("focus");qt(d,et==="adjacency"?p.getAdjacentDataIndices():et==="trajectory"?p.getTrajectoryDataIndices():et,Q.get("blurScope"),Q.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,x=new wt({shape:{x:y!=null?y*u:d.x,y:m!=null?m*h:d.y,width:d.dx,height:d.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});Se(x,he(g),{labelFetcher:{getFormattedLabel:function(w,T){return t.getFormattedLabel(w,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),_e(x,g),s.add(x),f.setItemGraphicEl(p.dataIndex,x),st(x).dataType="node";var b=_.get("focus");qt(x,b==="adjacency"?p.getAdjacentDataIndices():b==="trajectory"?p.getTrajectoryDataIndices():b,_.get("blurScope"),_.get("disabled"))}),f.eachItemGraphicEl(function(p,d){var g=f.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/h})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(SH(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Rt);function _A(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),a=t.node2.getVisual("color");U(n)&&U(a)&&(r.fill=new Ns(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function SH(r,e,t){var n=new wt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return $t(n,{shape:{width:r.width+20}},e,t),n}var xH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)if(o[l].depth!=null&&o[l].depth>=0)s[o[l].depth]=new Lt(o[l],this,n);else if(process.env.NODE_ENV!=="production")throw new Error("levels[i].depth is mandatory and should be natural number");var u=$D(i,a,this,!0,h);return u.data;function h(f,c){f.wrapMethod("getItemModel",function(v,p){var d=v.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(v.parentModel=m)}return v}),c.wrapMethod("getItemModel",function(v,p){var d=v.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(v.parentModel=_)}return v})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(v){return isNaN(v)||v==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return fe("nameValue",{name:u,value:l,noValue:i(l)})}else{var h=this.getGraph().getNodeByIndex(t),f=h.getLayout().value,c=this.getDataParams(t,a).data.name;return fe("nameValue",{name:c!=null?c+"":null,value:f,noValue:i(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Gt);function bH(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=wH(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,h=l.edges;CH(u);var f=At(u,function(d){return d.getLayout().value===0}),c=f.length!==0?0:t.get("layoutIterations"),v=t.get("orient"),p=t.get("nodeAlign");TH(u,h,n,a,o,s,c,v,p)})}function wH(r,e){return se(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function TH(r,e,t,n,a,i,o,s,l){DH(r,e,t,a,i,s,l),LH(r,e,i,a,n,o,s),zH(r,s)}function CH(r){A(r,function(e){var t=va(e.outEdges,Vf),n=va(e.inEdges,Vf),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function DH(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],h=[],f=0,c=0;c<e.length;c++)s[c]=1;for(var c=0;c<r.length;c++)l[c]=r[c].inEdges.length,l[c]===0&&u.push(r[c]);for(var v=-1;u.length;){for(var p=0;p<u.length;p++){var d=u[p],g=d.hostGraph.data.getRawDataItem(d.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>v&&(v=g.depth),d.setLayout({depth:y?g.depth:f},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;m<d.outEdges.length;m++){var _=d.outEdges[m],S=e.indexOf(_);s[S]=0;var x=_.node2,b=r.indexOf(x);--l[b]===0&&h.indexOf(x)<0&&h.push(x)}}++f,u=h,h=[]}for(var c=0;c<s.length;c++)if(s[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=v>f-1?v:f-1;o&&o!=="left"&&AH(r,o,i,w);var T=i==="vertical"?(a-t)/w:(n-t)/w;IH(r,T,i)}function SA(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function AH(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];a.indexOf(h.node1)<0&&a.push(h.node1)}}i=a,a=[],++o}A(r,function(f){SA(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&MH(r,n)}function MH(r,e){A(r,function(t){!SA(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function IH(r,e,t){A(r,function(n){var a=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:a},!0):n.setLayout({x:a},!0)})}function LH(r,e,t,n,a,i,o){var s=EH(r,o);PH(s,e,t,n,a,o),Cy(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,kH(s,l,o),Cy(s,a,t,n,o),BH(s,l,o),Cy(s,a,t,n,o)}function EH(r,e){var t=[],n=e==="vertical"?"y":"x",a=Nv(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),A(a.keys,function(i){t.push(a.buckets.get(i))}),t}function PH(r,e,t,n,a,i){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(f){u+=f.getLayout().value});var h=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;h<o&&(o=h)}),A(r,function(s){A(s,function(l,u){var h=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:h},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:h},!0))})}),A(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Cy(r,e,t,n,a){var i=a==="vertical"?"x":"y";A(r,function(o){o.sort(function(d,g){return d.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,h=0,f=o.length,c=a==="vertical"?"dx":"dy",v=0;v<f;v++)l=o[v],u=h-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[i]+l.getLayout()[c]+e;var p=a==="vertical"?n:t;if(u=h-e-p,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[i]+l.getLayout()[c]+e-h,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[i]}})}function kH(r,e,t){A(r.slice().reverse(),function(n){A(n,function(a){if(a.outEdges.length){var i=va(a.outEdges,RH,t)/va(a.outEdges,Vf);if(isNaN(i)){var o=a.outEdges.length;i=o?va(a.outEdges,NH,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-ca(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-ca(a,t))*e;a.setLayout({y:l},!0)}}})})}function RH(r,e){return ca(r.node2,e)*r.getValue()}function NH(r,e){return ca(r.node2,e)}function OH(r,e){return ca(r.node1,e)*r.getValue()}function VH(r,e){return ca(r.node1,e)}function ca(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Vf(r){return r.getValue()}function va(r,e,t){for(var n=0,a=r.length,i=-1;++i<a;){var o=+e(r[i],t);isNaN(o)||(n+=o)}return n}function BH(r,e,t){A(r,function(n){A(n,function(a){if(a.inEdges.length){var i=va(a.inEdges,OH,t)/va(a.inEdges,Vf);if(isNaN(i)){var o=a.inEdges.length;i=o?va(a.inEdges,VH,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-ca(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-ca(a,t))*e;a.setLayout({y:l},!0)}}})})}function zH(r,e){var t=e==="vertical"?"x":"y";A(r,function(n){n.outEdges.sort(function(a,i){return a.node2.getLayout()[t]-i.node2.getLayout()[t]}),n.inEdges.sort(function(a,i){return a.node1.getLayout()[t]-i.node1.getLayout()[t]})}),A(r,function(n){var a=0,i=0;A(n.outEdges,function(o){o.setLayout({sy:a},!0),a+=o.getLayout().dy}),A(n.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function GH(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,a=t.edges;if(n.length){var i=1/0,o=-1/0;A(n,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),A(n,function(s){var l=new ve({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&A(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function FH(r){r.registerChartView(_H),r.registerSeriesModel(xH),r.registerLayout(bH),r.registerVisual(GH),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var xA=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],h=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[h],c=u[1-h],v=[a,i],p=v[h].get("type"),d=v[1-h].get("type"),g=e.data;if(g&&l){var y=[];A(g,function(S,x){var b;z(S)?(b=S.slice(),S.unshift(x)):z(S.value)?(b=B({},S),b.value=b.value.slice(),S.value.unshift(x)):b=S,y.push(b)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:f,type:Zh(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Zh(d),dimsDef:m.slice()}];return Po(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:ht(OS,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),bA=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Gt);te(bA,xA,!0);var HH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var h=i.getItemLayout(u),f=wA(h,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,h){var f=s.getItemGraphicEl(h);if(!i.hasValue(u)){o.remove(f);return}var c=i.getItemLayout(u);f?(Lr(f),TA(c,f,i,u)):f=wA(c,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e}(Rt),WH=function(){function r(){}return r}(),$H=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new WH},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();i<a.length;i++)t.moveTo(a[i][0],a[i][1]),i++,t.lineTo(a[i][0],a[i][1])},e}(_t);function wA(r,e,t,n,a){var i=r.ends,o=new $H({shape:{points:a?UH(i,n,r):i}});return TA(r,o,e,t,a),o}function TA(r,e,t,n,a){var i=t.hostModel,o=ri[a?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");_e(e,s),qt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function UH(r,e,t){return G(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var Fl=A;function YH(r){var e=ZH(r);Fl(e,function(t){var n=t.seriesModels;n.length&&(XH(t),Fl(n,function(a,i){qH(a,t.boxOffsetList[i],t.boxWidthList[i])}))})}function ZH(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var a=n.getBaseAxis(),i=dt(t,a);i<0&&(i=t.length,t[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(n)}),e}function XH(r){var e=r.axis,t=r.seriesModels,n=t.length,a=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Fl(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Fl(t,function(p){var d=p.get("boxWidth");z(d)||(d=[d,d]),o.push([W(d[0],s)||0,W(d[1],s)||0])});var h=s*.8-2,f=h/n*.3,c=(h-f*(n-1))/n,v=c/2-h/2;Fl(t,function(p,d){i.push(v),v+=f+c,a.push(Math.min(Math.max(c,o[d][0]),o[d][1]))})}function qH(r,e,t){var n=r.coordinateSystem,a=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),h=a.mapDimensionsAll(l[s]);if(u==null||h.length<5)return;for(var f=0;f<a.count();f++){var c=a.get(u,f),v=_(c,h[2],f),p=_(c,h[0],f),d=_(c,h[1],f),g=_(c,h[3],f),y=_(c,h[4],f),m=[];S(m,d,!1),S(m,g,!0),m.push(p,d,y,g),x(m,p),x(m,y),x(m,v),a.setItemLayout(f,{initBaseline:v[s],ends:m})}function _(b,w,T){var C=a.get(w,T),D=[];D[o]=b,D[s]=C;var M;return isNaN(b)||isNaN(C)?M=[NaN,NaN]:(M=n.dataToPoint(D),M[o]+=e),M}function S(b,w,T){var C=w.slice(),D=w.slice();C[o]+=i,D[o]-=i,T?b.push(C,D):b.push(D,C)}function x(b,w){var T=w.slice(),C=w.slice();T[o]-=i,C[o]+=i,b.push(T,C)}}function KH(r,e){e=e||{};for(var t=[],n=[],a=e.boundIQR,i=a==="none"||a===0,o=0;o<r.length;o++){var s=sr(r[o].slice()),l=Ev(s,.25),u=Ev(s,.5),h=Ev(s,.75),f=s[0],c=s[s.length-1],v=(a??1.5)*(h-l),p=i?f:Math.max(f,l-v),d=i?c:Math.min(c,h+v),g=e.itemNameFormatter,y=j(g)?g({value:o}):U(g)?g.replace("{value}",o+""):o+"";t.push([y,p,l,u,h,d]);for(var m=0;m<s.length;m++){var _=s[m];if(_<p||_>d){var S=[y,_];n.push(S)}}}return{boxData:t,outliers:n}}var jH={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ce){var n="";process.env.NODE_ENV!=="production"&&(n=ke("source data is not applicable for this boxplot transform. Expect number[][].")),Mt(n)}var a=KH(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function QH(r){r.registerSeriesModel(bA),r.registerChartView(HH),r.registerLayout(YH),r.registerTransform(jH)}var JH=["itemStyle","borderColor"],tW=["itemStyle","borderColor0"],eW=["itemStyle","borderColorDoji"],rW=["itemStyle","color"],nW=["itemStyle","color0"];function Dy(r,e){return e.get(r>0?rW:nW)}function Ay(r,e){return e.get(r===0?eW:r>0?JH:tW)}var aW={seriesType:"candlestick",plan:_o(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=Dy(s,o),l.stroke=Ay(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");B(u,l)}}}}}},iW=["color","borderColor"],oW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){Jn(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(h){if(n.hasValue(h)){var f=n.getItemLayout(h);if(s&&CA(u,f))return;var c=My(f,h,!0);$t(c,{shape:{points:f.ends}},t,h),Iy(c,n,h,o),i.add(c),n.setItemGraphicEl(h,c)}}).update(function(h,f){var c=a.getItemGraphicEl(f);if(!n.hasValue(h)){i.remove(c);return}var v=n.getItemLayout(h);if(s&&CA(u,v)){i.remove(c);return}c?(Dt(c,{shape:{points:v.ends}},t,h),Lr(c)):c=My(v),Iy(c,n,h,o),i.add(c),n.setItemGraphicEl(h,c)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),DA(t,this.group);var n=t.get("clip",!0)?_l(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=My(s);Iy(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){DA(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Rt),sW=function(){function r(){}return r}(),lW=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new sW},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e}(_t);function My(r,e,t){var n=r.ends;return new lW({shape:{points:t?uW(n,r):n},z2:100})}function CA(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function Iy(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,_e(r,a);var i=e.getItemLayout(t).sign;A(r.states,function(s,l){var u=a.getModel(l),h=Dy(i,u),f=Ay(i,u)||h,c=s.style||(s.style={});h&&(c.fill=h),f&&(c.stroke=f)});var o=a.getModel("emphasis");qt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function uW(r,e){return G(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var hW=function(){function r(){}return r}(),Ly=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new hW},e.prototype.buildPath=function(t,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];t.moveTo(o,a[i++]),t.lineTo(o,a[i++])}else i+=3},e}(_t);function DA(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new Ly({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new Ly({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new Ly({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),Ey(1,o,r),Ey(-1,s,r),Ey(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Ey(r,e,t,n){var a=Ay(r,t)||Dy(r,t),i=t.getModel("itemStyle").getItemStyle(iW);e.useStyle(i),e.style.fill=null,e.style.stroke=a}var AA=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,a){var i=n.getItemLayout(t);return i&&a.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Gt);te(AA,xA,!0);function fW(r){!r||!z(r.series)||A(r.series,function(e){J(e)&&e.type==="k"&&(e.type="candlestick")})}var cW={seriesType:"candlestick",plan:_o(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=vW(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=G(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],h=l[1],f=l[2],c=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:v};function v(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var _=m.get(s,y),S=m.get(u,y),x=m.get(h,y),b=m.get(f,y),w=m.get(c,y),T=Math.min(S,x),C=Math.max(S,x),D=N(T,_),M=N(C,_),I=N(b,_),L=N(w,_),E=[];R(E,M,0),R(E,D,1),E.push(F(L),F(M),F(I),F(D));var P=g.getItemModel(y),k=!!P.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:MA(m,y,S,x,h,k),initBaseline:S>x?M[i]:D[i],ends:E,brushRect:V(b,w,_)})}function N(H,$){var Q=[];return Q[a]=$,Q[i]=H,isNaN($)||isNaN(H)?[NaN,NaN]:e.dataToPoint(Q)}function R(H,$,Q){var et=$.slice(),lt=$.slice();et[a]=fh(et[a]+n/2,1,!1),lt[a]=fh(lt[a]-n/2,1,!0),Q?H.push(et,lt):H.push(lt,et)}function V(H,$,Q){var et=N(H,Q),lt=N($,Q);return et[a]-=n/2,lt[a]-=n/2,{x:et[0],y:et[1],width:n,height:lt[1]-et[1]}}function F(H){return H[a]=fh(H[a],1),H}}function p(d,g){for(var y=nn(d.count*4),m=0,_,S=[],x=[],b,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(b=d.next())!=null;){var C=w.get(s,b),D=w.get(u,b),M=w.get(h,b),I=w.get(f,b),L=w.get(c,b);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=MA(w,b,D,M,h,T),S[a]=C,S[i]=I,_=e.dataToPoint(S,null,x),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=L,_=e.dataToPoint(S,null,x),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function MA(r,e,t,n,a,i){var o;return t>n?o=-1:t<n?o=1:o=i?0:e>0?r.get(a,e-1)<=n?1:-1:1,o}function vW(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=W(ot(r.get("barMaxWidth"),a),a),o=W(ot(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?W(s,a):Math.max(Math.min(a/2,i),o)}function pW(r){r.registerChartView(oW),r.registerSeriesModel(AA),r.registerPreprocessor(fW),r.registerVisual(aW),r.registerLayout(cW)}function IA(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var dW=function(r){O(e,r);function e(t,n){var a=r.call(this)||this,i=new yl(t,n),o=new it;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=ie(n,-1,-1,2,2,a);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}IA(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,a=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}IA(a,t)},e.prototype.highlight=function(){wn(this)},e.prototype.downplay=function(){Tn(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var a=this,i=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=bo(t.getItemVisual(n,"symbolSize")),h=t.getItemVisual(n,"style"),f=h&&h.fill,c=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",f)});var v=hi(t.getItemVisual(n,"symbolOffset"),u);v&&(o.x=v[0],o.y=v[1]);var p=t.getItemVisual(n,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var d={};d.showEffectOn=i.get("showEffectOn"),d.rippleScale=s.get(["rippleEffect","scale"]),d.brushType=s.get(["rippleEffect","brushType"]),d.period=s.get(["rippleEffect","period"])*1e3,d.effectOffset=n/t.count(),d.z=i.getShallow("z")||0,d.zlevel=i.getShallow("zlevel")||0,d.symbolType=l,d.color=f,d.rippleEffectColor=s.get(["rippleEffect","color"]),d.rippleNumber=s.get(["rippleEffect","number"]),d.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?d.showEffectOn!=="render"&&a.startEffectAnimation(d):g==="normal"&&d.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=d,qt(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(it),gW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new ml(dW)},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype.updateTransform=function(t,n,a){var i=t.getData();this.group.dirty();var o=Sl("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=PE(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(Rt),yW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return In(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(Gt);function mW(r){r.registerChartView(gW),r.registerSeriesModel(yW),r.registerLayout(Sl("effectScatter"))}var LA=function(r){O(e,r);function e(t,n,a){var i=r.call(this)||this;return i.add(i.createLine(t,n,a)),i._updateEffectSymbol(t,n),i}return e.prototype.createLine=function(t,n,a){return new ty(t,n,a)},e.prototype._updateEffectSymbol=function(t,n){var a=t.getItemModel(n),i=a.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");z(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=i.get("color")||l&&l.stroke,h=this.childAt(1);this._symbolType!==s&&(this.remove(h),h=ie(s,-.5,-.5,1,1,u),h.z2=100,h.culling=!0,this.add(h)),h&&(h.setStyle("shadowColor",u),h.setStyle(i.getItemStyle(["color"])),h.scaleX=o[0],h.scaleY=o[1],h.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,n))},e.prototype._updateEffectAnimation=function(t,n,a){var i=this.childAt(1);if(i){var o=t.getItemLayout(a),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),h=n.get("constantSpeed"),f=ee(n.get("delay"),function(v){return v/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),h>0&&(s=this._getLineLength(i)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var c=void 0;j(f)?c=f(a):c=f,i.__t>0&&(c=-s*i.__t),this._animateSymbol(i,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return zn(t.__p1,t.__cp1)+zn(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=de,h=Qc;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var f=t.__t<1?h(n[0],i[0],a[0],o):h(a[0],i[0],n[0],1-o),c=t.__t<1?h(n[1],i[1],a[1],o):h(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(c,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=zn(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*zn(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var a=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,a,n)},e}(it),EA=function(r){O(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createPolyline(t,n,a),i}return e.prototype._createPolyline=function(t,n,a){var i=t.getItemLayout(n),o=new Be({shape:{points:i}});this.add(o),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};Dt(o,s,i,n),this._updateCommonStl(t,n,a)},e.prototype._updateCommonStl=function(t,n,a){var i=this.childAt(0),o=t.getItemModel(n),s=a&&a.emphasisLineStyle,l=a&&a.focus,u=a&&a.blurScope,h=a&&a.emphasisDisabled;if(!a||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),h=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}i.useStyle(t.getItemVisual(n,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var c=i.ensureState("emphasis");c.style=s,qt(this,l,u,h)},e.prototype.updateLayout=function(t,n){var a=this.childAt(0);a.setShape("points",t.getItemLayout(n))},e}(it),_W=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,a){return new EA(t,n,a)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var a=[0],i=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];i+=zn(s,l),a.push(i)}if(i===0){this._length=0;return}for(var o=0;o<a.length;o++)a[o]/=i;this._offsets=a,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,a=this._points,i=this._offsets,o=a.length;if(i){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>n);l++);l=Math.min(l-1,o-2)}var h=(n-i[l])/(i[l+1]-i[l]),f=a[l],c=a[l+1];t.x=f[0]*(1-h)+h*c[0],t.y=f[1]*(1-h)+h*c[1];var v=t.__t<1?c[0]-f[0]:f[0]-c[0],p=t.__t<1?c[1]-f[1]:f[1]-c[1];t.rotation=-Math.atan2(p,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(LA),SW=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),xW=function(r){O(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new SW},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o<a.length;){var s=a[o++];if(s>0){t.moveTo(a[o++],a[o++]);for(var l=1;l<s;l++)t.lineTo(a[o++],a[o++])}}else for(o=this._off;o<a.length;){var u=a[o++],h=a[o++],f=a[o++],c=a[o++];if(t.moveTo(u,h),i>0){var v=(u+f)/2-(h-c)*i,p=(h+c)/2-(f-u)*i;t.quadraticCurveTo(v,p,f,c)}else t.lineTo(f,c)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u<i.length;){var h=i[u++];if(h>0)for(var f=i[u++],c=i[u++],v=1;v<h;v++){var p=i[u++],d=i[u++];if(qn(f,c,p,d,s,t,n))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],c=i[u++],p=i[u++],d=i[u++];if(o>0){var g=(f+p)/2-(c-d)*o,y=(c+d)/2-(p-f)*o;if(r1(f,c,g,y,p,d,s,t,n))return l}else if(qn(f,c,p,d,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<a.length;){var h=a[u++],f=a[u++];i=Math.min(h,i),s=Math.max(h,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new vt(i,o,s,l)}return t},e}(_t),bW=function(){function r(){this.group=new it}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],a=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+a.length);s.set(i),s.set(a,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:a}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new xW({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;e.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),e.useStyle(a.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=st(e);o.seriesIndex=a.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),PA={seriesType:"lines",plan:_o(),reset:function(r){var e=r.coordinateSystem;if(!e){process.env.NODE_ENV!=="production"&&me("The lines series must have a coordinate system.");return}var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,h=a.start;h<a.end;h++)u+=r.getLineCoordsCount(h);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,c=[],h=a.start;h<a.end;h++){var v=r.getLineCoords(h,o);t&&(s[f++]=v);for(var p=0;p<v;p++)c=e.dataToPoint(o[p],!1,c),s[f++]=c[0],s[f++]=c[1]}i.setLayout("linesPoints",s)}else for(var h=a.start;h<a.end;h++){var d=i.getItemModel(h),v=r.getLineCoords(h,o),g=[];if(t)for(var y=0;y<v;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=d.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}i.setItemLayout(h,g)}}}}},wW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=a.getZr(),h=u.painter.getType()==="svg";h||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!h&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(h?process.env.NODE_ENV!=="production"&&console.warn("SVG render mode doesn't support lines with trail effect"):u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=t.get("clip",!0)&&_l(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=PA.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return process.env.NODE_ENV!=="production"&&i&&l&&console.warn("Large lines not support effect"),(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new bW:new ey(o?i?_W:EA:i?LA:ty),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e}(Rt),TW=typeof Uint32Array>"u"?Array:Uint32Array,CW=typeof Float64Array>"u"?Array:Float64Array;function kA(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(process.env.NODE_ENV!=="production"&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),r.data=G(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),Ec([a,t[0],t[1]])}))}var DW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],kA(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(kA(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=rs(this._flatCoords,n.flatCoords),this._flatCoordsOffset=rs(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");if(process.env.NODE_ENV!=="production"&&!(a instanceof Array&&a.length>0&&a[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(a)+". Lines must have 2d coords array in data item.");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[a+o*2],n[o][1]=this._flatCoords[a+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),Ct(t[0])){for(var a=t.length,i=new TW(a),o=new CW(a),s=0,l=0,u=0,h=0;h<a;){u++;var f=t[h++];i[l++]=s+n,i[l++]=f;for(var c=0;c<f;c++){var v=t[h++],p=t[h++];if(o[s++]=v,o[s++]=p,h>a&&process.env.NODE_ENV!=="production")throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){if(process.env.NODE_ENV!=="production"){var a=po.get(t.coordinateSystem);if(!a)throw new Error("Unknown coordinate system "+t.coordinateSystem)}var i=new ze(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;i.hasItemOption=!0;var h=o.value;if(h!=null)return h instanceof Array?h[u]:h}),i},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),fe("nameValue",{name:h.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Gt);function Bf(r){return r instanceof Array||(r=[r,r]),r}var AW={seriesType:"lines",reset:function(r){var e=Bf(r.get("symbol")),t=Bf(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=Bf(s.getShallow("symbol",!0)),u=Bf(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?a:null}}};function MW(r){r.registerChartView(wW),r.registerSeriesModel(DW),r.registerLayout(PA),r.registerVisual(AW)}var IW=256,LW=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Bn.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),h=this.pointSize+this.blurSize,f=this.canvas,c=f.getContext("2d"),v=e.length;f.width=t,f.height=n;for(var p=0;p<v;++p){var d=e[p],g=d[0],y=d[1],m=d[2],_=a(m);c.globalAlpha=_,c.drawImage(s,g-h,y-h)}if(!f.width||!f.height)return f;for(var S=c.getImageData(0,0,f.width,f.height),x=S.data,b=0,w=x.length,T=this.minOpacity,C=this.maxOpacity,D=C-T;b<w;){var _=x[b+3]/256,M=Math.floor(_*(IW-1))*4;if(_>0){var I=o(_)?l:u;_>0&&(_=_*D+T),x[b++]=I[M],x[b++]=I[M+1],x[b++]=I[M+2],x[b++]=I[M+3]*_*256}else b+=4}return c.putImageData(S,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Bn.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r}();function EW(r,e,t){var n=r[1]-r[0];e=G(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s<a;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===a)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<a&&t[s]}}function PW(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function RA(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var kW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;if(n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),process.env.NODE_ENV!=="production"&&!i)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,a,0,t.getData().count()):RA(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(RA(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Jn(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,a,i,o){var s=t.coordinateSystem,l=bi(s,"cartesian2d"),u,h,f,c;if(l){var v=s.getAxis("x"),p=s.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(v.type==="category"&&p.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(v.onBand&&p.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}u=v.getBandWidth()+.5,h=p.getBandWidth()+.5,f=v.scale.getExtent(),c=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),S=t.get(["itemStyle","borderRadius"]),x=he(t),b=t.getModel("emphasis"),w=b.get("focus"),T=b.get("blurScope"),C=b.get("disabled"),D=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],M=a;M<i;M++){var I=void 0,L=g.getItemVisual(M,"style");if(l){var E=g.get(D[0],M),P=g.get(D[1],M);if(isNaN(g.get(D[2],M))||isNaN(E)||isNaN(P)||E<f[0]||E>f[1]||P<c[0]||P>c[1])continue;var k=s.dataToPoint([E,P]);I=new wt({shape:{x:k[0]-u/2,y:k[1]-h/2,width:u,height:h},style:L})}else{if(isNaN(g.get(D[1],M)))continue;I=new wt({z2:1,shape:s.dataToRect([g.get(D[0],M)]).contentShape,style:L})}if(g.hasItemOption){var N=g.getItemModel(M),R=N.getModel("emphasis");y=R.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),S=N.get(["itemStyle","borderRadius"]),w=R.get("focus"),T=R.get("blurScope"),C=R.get("disabled"),x=he(N)}I.shape.r=S;var V=t.getRawValue(M),F="-";V&&V[2]!=null&&(F=V[2]+""),Se(I,x,{labelFetcher:t,labelDataIndex:M,defaultOpacity:L.opacity,defaultText:F}),I.ensureState("emphasis").style=y,I.ensureState("blur").style=m,I.ensureState("select").style=_,qt(I,w,T,C),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),d.add(I),g.setItemGraphicEl(M,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new LW;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var h=t.getViewRect().clone(),f=t.getRoamTransform();h.applyTransform(f);var c=Math.max(h.x,0),v=Math.max(h.y,0),p=Math.min(h.width+h.x,i.getWidth()),d=Math.min(h.height+h.y,i.getHeight()),g=p-c,y=d-v,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,C){var D=t.dataToPoint([w,T]);return D[0]-=c,D[1]-=v,D.push(C),D}),S=a.getExtent(),x=a.type==="visualMap.continuous"?PW(S,a.option.range):EW(S,a.getPieceList(),a.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var b=new ge({style:{width:g,height:y,x:c,y:v,image:u.canvas},silent:!0});this.group.add(b)},e.type="heatmap",e}(Rt),RW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return In(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=po.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Gt);function NW(r){r.registerChartView(kW),r.registerSeriesModel(RW)}var OW=["itemStyle","borderWidth"],NA=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Py=new Cn,VW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),f=l.master.getRect(),c={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:h,valueDim:NA[+h],categoryDim:NA[1-+h]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=HA(o,p),g=OA(o,p,d,c),y=WA(o,c,g);o.setItemGraphicEl(p,y),i.add(y),YA(y,c,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=HA(o,p),m=OA(o,p,y,c),_=UA(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?$W(g,c,m):g=WA(o,c,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),YA(g,c,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&$A(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var v=t.get("clip",!0)?_l(t.coordinateSystem,!1,t):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){$A(i,st(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(Rt);function OA(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),c={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};BW(t,i,a,n,c),zW(r,e,a,i,o,c.boundingLength,c.pxSign,h,n,c),GW(t,c.symbolScale,u,n,c);var v=c.symbolSize,p=hi(t.get("symbolOffset"),v);return FW(t,v,a,i,o,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function BW(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),h;if(z(o)){var f=[ky(s,o[0])-l,ky(s,o[1])-l];f[1]<f[0]&&f.reverse(),h=f[u]}else o!=null?h=ky(s,o)-l:e?h=n.coordSysExtent[i.index][u]-l:h=t[i.wh];a.boundingLength=h,e&&(a.repeatCutLength=t[i.wh]);var c=i.xy==="x",v=s.inverse;a.pxSign=c&&!v||!c&&v?h>=0?1:-1:h>0?1:-1}function ky(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function zW(r,e,t,n,a,i,o,s,l,u){var h=l.valueDim,f=l.categoryDim,c=Math.abs(t[f.wh]),v=r.getItemVisual(e,"symbolSize"),p;z(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[f.index]=W(p[f.index],c),p[h.index]=W(p[h.index],n?c:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[h.index]*=(l.isHorizontal?-1:1)*o}function GW(r,e,t,n,a){var i=r.get(OW)||0;i&&(Py.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Py.updateTransform(),i/=Py.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function FW(r,e,t,n,a,i,o,s,l,u,h,f){var c=h.categoryDim,v=h.valueDim,p=f.pxSign,d=Math.max(e[v.index]+s,0),g=d;if(n){var y=Math.abs(l),m=ee(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=W(m,e[v.index]),x=Math.max(d+S*2,0),b=_?0:S*2,w=Pv(n),T=w?n:ZA((y+b)/x),C=y-T*d;S=C/2/(_?T:Math.max(T-1,1)),x=d+S*2,b=_?0:S*2,!w&&n!=="fixed"&&(T=u?ZA((Math.abs(u)+b)/x):0),g=T*x-b,f.repeatTimes=T,f.symbolMargin=S}var D=p*(g/2),M=f.pathPosition=[];M[c.index]=t[c.wh]/2,M[v.index]=o==="start"?D:o==="end"?l-D:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var I=f.bundlePosition=[];I[c.index]=t[c.xy],I[v.index]=t[v.xy];var L=f.barRectShape=B({},t);L[v.wh]=p*Math.max(Math.abs(t[v.wh]),Math.abs(M[v.index]+D)),L[c.wh]=t[c.wh];var E=f.clipShape={};E[c.xy]=-t[c.xy],E[c.wh]=h.ecSize[c.wh],E[v.xy]=0,E[v.wh]=t[v.wh]}function VA(r){var e=r.symbolPatternSize,t=ie(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function BA(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,h=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(Ry(r,function(d){d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,h<u?Go(d,null,p(h),t,n):Go(d,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(d)}),h++});h<u;h++){var c=VA(t);c.__pictorialAnimationIndex=h,c.__pictorialRepeatTimes=u,a.add(c);var v=p(h);Go(c,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},t,n)}function p(d){var g=s.slice(),y=t.pxSign,m=d;return(t.symbolRepeatDirection==="start"?y>0:y<0)&&(m=u-1-d),g[l.index]=f*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function zA(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Go(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=VA(t),a.add(i),Go(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function GA(r,e,t){var n=B({},e.barRectShape),a=r.__pictorialBarRect;a?Go(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new wt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function FA(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=B({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)Dt(a,{shape:i},s,l);else{i[o.wh]=0,a=new wt({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],ri[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function HA(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=HW,t.isAnimationEnabled=WW,t}function HW(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function WW(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function WA(r,e,t,n){var a=new it,i=new it;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?BA(a,e,t):zA(a,e,t),GA(a,t,n),FA(a,e,t,n),a.__pictorialShapeStr=UA(r,t),a.__pictorialSymbolMeta=t,a}function $W(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;Dt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?BA(r,e,t,!0):zA(r,e,t,!0),GA(r,t,!0),FA(r,e,t,!0)}function $A(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];Ry(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),A(i,function(o){Qn(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function UA(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ry(r,e,t){A(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Go(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&ri[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function YA(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),h=i.get("focus"),f=i.get("blurScope"),c=i.get("scale");Ry(r,function(d){if(d instanceof ge){var g=d.style;d.useStyle(B({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,c&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,Se(p,he(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Eo(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),qt(r,h,f,i.get("disabled"))}function ZA(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var UW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ta(xl.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(xl);function YW(r){r.registerChartView(VW),r.registerSeriesModel(UW),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ht(lw,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,uw("pictorialBar"))}var ZW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),h=u.rect,f=u.boundaryGap;s.x=0,s.y=h.y+f[0];function c(g){return g.name}var v=new Mn(this._layersSeries||[],l,c,c),p=[];v.add(Z(d,this,"add")).update(Z(d,this,"update")).remove(Z(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],x=[],b,w=l[y].indices,T=0;T<w.length;T++){var C=i.getItemLayout(w[T]),D=C.x,M=C.y0,I=C.y;S.push(D,M),x.push(D,M+I),b=i.getItemVisual(w[T],"style")}var L,E=i.getItemLayout(w[0]),P=t.getModel("label"),k=P.get("margin"),N=t.getModel("emphasis");if(g==="add"){var R=p[y]=new it;L=new CT({shape:{points:S,stackedOnPoints:x,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),R.add(L),s.add(R),t.isAnimationEnabled()&&L.setClipPath(XW(L.getBoundingRect(),t,function(){L.removeClipPath()}))}else{var R=_[m];L=R.childAt(0),s.add(R),p[y]=R,Dt(L,{shape:{points:S,stackedOnPoints:x}},t),Lr(L)}Se(L,he(t),{labelDataIndex:w[T-1],defaultText:i.getName(w[T-1]),inheritColor:b.fill},{normal:{verticalAlign:"middle"}}),L.setTextConfig({position:null,local:!0});var V=L.getTextContent();V&&(V.x=E.x-k,V.y=E.y0+E.y/2),L.useStyle(b),i.setItemGraphicEl(y,L),_e(L,t),qt(L,N.get("focus"),N.get("blurScope"),N.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(Rt);function XW(r,e,t){var n=new wt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return $t(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var Ny=2,qW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new wl(Z(this.getData,this),Z(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=Nv(t,function(c){return a.hasOwnProperty(c[0]+"")||(a[c[0]+""]=-1),c[2]}),o=[];i.buckets.each(function(c,v){o.push({name:v,dataList:c})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,h=0;h<o[l].dataList.length;++h){var f=o[l].dataList[h][0]+"";a[f]=l}for(var f in a)a.hasOwnProperty(f)&&a[f]!==l&&(a[f]=l,t[n]=[f,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var a=this.getReferringComponents("singleAxis",ne).models[0],i=a.get("type"),o=At(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=q(),h=0,f=0;f<s.length;++f)l.push(s[f][Ny]),u.get(s[f][Ny])||(u.set(s[f][Ny],h),h++);var c=ul(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Zh(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new ze(c,this);return v.initData(s),v},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),a=[],i=0;i<n;++i)a[i]=i;var o=t.mapDimension("single"),s=Nv(a,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,h){u.sort(function(f,c){return t.get(o,f)-t.get(o,c)}),l.push({name:h,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,a){z(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,h=0;h<l;++h){for(var f=Number.MAX_VALUE,c=-1,v=o[h].indices.length,p=0;p<v;++p){var d=i.get(t[0],o[h].indices[p]),g=Math.abs(d-n);g<=f&&(u=d,f=g,c=o[h].indices[p])}s.push(c)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return fe("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(Gt);function KW(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),a=t.coordinateSystem,i={},o=a.getRect();i.rect=o;var s=t.get("boundaryGap"),l=a.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=W(s[0],o.height),s[1]=W(s[1],o.height);var u=o.height-s[0]-s[1];XA(n,t,u)}else{s[0]=W(s[0],o.width),s[1]=W(s[1],o.width);var h=o.width-s[0]-s[1];XA(n,t,h)}n.setLayout("layoutInfo",i)})}function XA(r,e,t){if(r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=G(a,function(g){return G(g.indices,function(y){var m=n.dataToPoint(r.get(i,y));return m[1]=r.get(o,y),m})}),l=jW(s),u=l.y0,h=t/l.max,f=a.length,c=a[0].indices.length,v,p=0;p<c;++p){v=u[p]*h,r.setItemLayout(a[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:v,y:s[0][p][1]*h});for(var d=1;d<f;++d)v+=s[d-1][p][1]*h,r.setItemLayout(a[d].indices[p],{layerIndex:d,x:s[d][p][0],y0:v,y:s[d][p][1]*h})}}function jW(r){for(var e=r.length,t=r[0].length,n=[],a=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),n.push(s)}for(var u=0;u<t;++u)a[u]=(i-n[u])/2;i=0;for(var h=0;h<t;++h){var f=n[h]+a[h];f>i&&(i=f)}return{y0:a,max:i}}function QW(r){r.registerChartView(ZW),r.registerSeriesModel(qW),r.registerLayout(KW),r.registerProcessor(bl("themeRiver"))}var JW=2,t6=4,qA=function(r){O(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=JW,o.textConfig={inside:!0},st(o).seriesIndex=n.seriesIndex;var s=new Tt({z2:t6,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;st(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),h=n.getLayout(),f=B({},h);f.label=null;var c=n.getVisual("style");c.lineJoin="bevel";var v=n.getVisual("decal");v&&(c.decal=To(v,o));var p=wi(l.getModel("itemStyle"),f,!0);B(f,p),A(Ne,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var x=wi(S,f);x&&(_.shape=x)}),t?(s.setShape(f),s.shape.r=h.r0,$t(s,{shape:{r:h.r}},a,n.dataIndex)):(Dt(s,{shape:f},a),Lr(s)),s.useStyle(c),this._updateLabel(a);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?rs(n.getAncestorsIndices(),n.getDescendantIndices()):g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;qt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),f=this,c=f.getTextContent(),v=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)<p);c.ignore=!d,A(As,function(y){var m=y==="normal"?a.getModel("label"):a.getModel([y,"label"]),_=y==="normal",S=_?c:c.ensureState(y),x=t.getFormattedLabel(v,y);_&&(x=x||n.node.name),S.style=zt(m,{},null,y!=="normal",!0),x&&(S.style.text=x);var b=m.get("show");b!=null&&!_&&(S.ignore=!b);var w=g(m,"position"),T=_?f:f.states[y],C=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?C:null,inside:w!=="outside"};var D,M=g(m,"distance")||0,I=g(m,"align"),L=g(m,"rotate"),E=Math.PI*.5,P=Math.PI*1.5,k=Qe(L==="tangential"?Math.PI/2-l:l),N=k>E&&!Ss(k-E)&&k<P;w==="outside"?(D=o.r+M,I=N?"right":"left"):!I||I==="center"?(s===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,I="center"):I==="left"?(D=o.r0+M,I=N?"right":"left"):I==="right"&&(D=o.r-M,I=N?"left":"right"),S.style.align=I,S.style.verticalAlign=g(m,"verticalAlign")||"middle",S.x=D*u+o.cx,S.y=D*h+o.cy;var R=0;L==="radial"?R=Qe(-l)+(N?Math.PI:0):L==="tangential"?R=Qe(Math.PI/2-l)+(N?Math.PI:0):Ct(L)&&(R=L*Math.PI/180),S.rotation=Qe(R)});function g(y,m){var _=y.get(m);return _??i.get(m)}c.dirtyStyle()},e}(Oe),Oy="sunburstRootToNode",KA="sunburstHighlight",e6="sunburstUnhighlight";function r6(r){r.registerAction({type:Oy,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=Ll(e,[Oy],a);if(o){var s=a.getViewRoot();s&&(e.direction=Ng(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:KA,update:"none"},function(e,t,n){e=B({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=Ll(e,[KA],i);o&&(e.dataIndex=o.node.dataIndex)}process.env.NODE_ENV!=="production"&&re("sunburstHighlight","highlight"),n.dispatchAction(B(e,{type:"highlight"}))}),r.registerAction({type:e6,update:"updateView"},function(e,t,n){e=B({},e),process.env.NODE_ENV!=="production"&&re("sunburstUnhighlight","downplay"),n.dispatchAction(B(e,{type:"downplay"}))})}var n6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){var o=this;this.seriesModel=t,this.api=a,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),h=this.group,f=t.get("renderLabelForZeroData"),c=[];u.eachNode(function(m){c.push(m)});var v=this._oldChildren||[];p(c,v),y(l,u),this._initEvents(),this._oldChildren=c;function p(m,_){if(m.length===0&&_.length===0)return;new Mn(_,m,S,S).add(x).update(x).remove(ht(x,null)).execute();function S(b){return b.getId()}function x(b,w){var T=b==null?null:m[b],C=w==null?null:_[w];d(T,C)}}function d(m,_){if(!f&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,t,n,a),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var S=new qA(m,t,n,a);h.add(S),s.setItemGraphicEl(m.dataIndex,S)}}}function g(m){m&&m.piece&&(h.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,n,a):(o.virtualPiece=new qA(m,t,n,a),h.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var h=l.get("target",!0)||"_blank";wh(u,h)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Oy,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(Rt),a6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};jA(a);var i=this._levelModels=G(t.levels||[],function(l){return new Lt(l,this,n)},this),o=Rg.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var f=o.getNodeByDataIndex(h),c=i[f.depth];return c&&(u.parentModel=c),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=Df(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){lD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Gt);function jA(r){var e=0;A(r.children,function(n){jA(n);var a=n.value;z(a)&&(a=a[0]),e+=a});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}var QA=Math.PI/180;function i6(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");z(i)||(i=[0,i]),z(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=W(a[0],o),h=W(a[1],s),f=W(i[0],l/2),c=W(i[1],l/2),v=-n.get("startAngle")*QA,p=n.get("minAngle")*QA,d=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&JA(g,m);var _=0;A(g.children,function(k){!isNaN(k.getValue())&&_++});var S=g.getValue(),x=Math.PI/(S||_)*2,b=g.depth>0,w=g.height-(b?-1:1),T=(c-f)/(w||1),C=n.get("clockwise"),D=n.get("stillShowZeroSum"),M=C?1:-1,I=function(k,N){if(k){var R=N;if(k!==d){var V=k.getValue(),F=S===0&&D?x:V*x;F<p&&(F=p),R=N+M*F;var H=k.depth-y-(b?-1:1),$=f+T*H,Q=f+T*(H+1),et=n.getLevelModel(k);if(et){var lt=et.get("r0",!0),kt=et.get("r",!0),jt=et.get("radius",!0);jt!=null&&(lt=jt[0],kt=jt[1]),lt!=null&&($=W(lt,l/2)),kt!=null&&(Q=W(kt,l/2))}k.setLayout({angle:F,startAngle:N,endAngle:R,clockwise:C,cx:u,cy:h,r0:$,r:Q})}if(k.children&&k.children.length){var pt=0;A(k.children,function(nt){pt+=I(nt,N+pt)})}return R-N}};if(b){var L=f,E=f+T,P=Math.PI*2;d.setLayout({angle:P,startAngle:v,endAngle:v+P,clockwise:C,cx:u,cy:h,r0:L,r:E})}I(g,v)})}function JA(r,e){var t=r.children||[];r.children=o6(t,e),t.length&&A(r.children,function(n){JA(n,e)})}function o6(r,e){if(j(e)){var t=G(r,function(a,i){var o=a.getValue();return{params:{depth:a.depth,height:a.height,dataIndex:a.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(a,i){return e(a.params,i.params)}),G(t,function(a){return r[a.index]})}else{var n=e==="asc";return r.sort(function(a,i){var o=(a.getValue()-i.getValue())*(n?1:-1);return o===0?(a.dataIndex-i.dataIndex)*(n?-1:1):o})}}function s6(r){var e={};function t(n,a,i){for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&U(s)&&(s=av(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");B(u,l)})})}function l6(r){r.registerChartView(n6),r.registerSeriesModel(a6),r.registerLayout(ht(i6,"sunburst")),r.registerProcessor(ht(bl,"sunburst")),r.registerVisual(s6),r6(r)}var tM={color:"fill",borderColor:"stroke"},u6={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},kn=bt(),h6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return In(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=kn(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Gt);function f6(r,e){return e=e||[0,0],G(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function c6(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z(f6,r)}}}function v6(r,e){return e=e||[0,0],G([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function p6(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Z(v6,r)}}}function d6(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function g6(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z(d6,r)}}}function y6(r,e){return e=e||[0,0],G(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function m6(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:Z(y6,r)}}}function _6(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)}}}}var eM={};function rM(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||X(r,"text")))}function nM(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},X(n,"text")&&(o.text=n.text),X(n,"rich")&&(o.rich=n.rich),X(n,"textFill")&&(o.fill=n.textFill),X(n,"textStroke")&&(o.stroke=n.textStroke),X(n,"fontFamily")&&(o.fontFamily=n.fontFamily),X(n,"fontSize")&&(o.fontSize=n.fontSize),X(n,"fontStyle")&&(o.fontStyle=n.fontStyle),X(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=X(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),X(n,"textPosition")&&(a.position=n.textPosition),X(n,"textOffset")&&(a.offset=n.textOffset),X(n,"textRotation")&&(a.rotation=n.textRotation),X(n,"textDistance")&&(a.distance=n.textDistance)}return aM(o,r),A(o.rich,function(l){aM(l,l)}),{textConfig:a,textContent:i}}function aM(r,e){e&&(e.font=e.textFont||e.font,X(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),X(e,"textAlign")&&(r.align=e.textAlign),X(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),X(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),X(e,"textWidth")&&(r.width=e.textWidth),X(e,"textHeight")&&(r.height=e.textHeight),X(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),X(e,"textPadding")&&(r.padding=e.textPadding),X(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),X(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),X(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),X(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),X(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),X(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),X(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function iM(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||"#000";oM(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,A(e.rich,function(s){oM(s,s)}),n}function oM(r,e){e&&(X(e,"fill")&&(r.textFill=e.fill),X(e,"stroke")&&(r.textStroke=e.fill),X(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),X(e,"font")&&(r.font=e.font),X(e,"fontStyle")&&(r.fontStyle=e.fontStyle),X(e,"fontWeight")&&(r.fontWeight=e.fontWeight),X(e,"fontSize")&&(r.fontSize=e.fontSize),X(e,"fontFamily")&&(r.fontFamily=e.fontFamily),X(e,"align")&&(r.textAlign=e.align),X(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),X(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),X(e,"width")&&(r.textWidth=e.width),X(e,"height")&&(r.textHeight=e.height),X(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),X(e,"padding")&&(r.textPadding=e.padding),X(e,"borderColor")&&(r.textBorderColor=e.borderColor),X(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),X(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),X(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),X(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),X(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),X(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),X(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),X(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),X(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),X(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}function sM(r,e){if(process.env.NODE_ENV!=="production"){var t=r+"^_^"+e;eM[t]||(console.warn('[ECharts] DEPRECATED: "'+r+'" has been deprecated. '+e),eM[t]=!0)}}var lM={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},uM=xt(lM),zf=Gr($r,function(r,e){return r[e]=1,r},{}),hM=$r.join(", "),Gf=["","style","shape","extra"],Fo=bt();function Vy(r,e,t,n,a){var i=r+"Animation",o=ro(r,n,a)||{},s=Fo(e).userDuring;return o.duration>0&&(o.during=s?Z(T6,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),B(o,t[i]),o}function Ff(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Fo(r),u=e.style;l.userDuring=e.during;var h={},f={};if(D6(r,e,f),vM("shape",e,f),vM("extra",e,f),!i&&s&&(C6(r,e,h),cM("shape",r,e,h),cM("extra",r,e,h),A6(r,e,u,h)),f.style=u,S6(r,f,o),b6(r,e),s)if(i){var c={};A(Gf,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(c[p]=c[p]||{}),B(p?c[p]:c,d.enterFrom))});var v=Vy("enter",r,e,t,a);v.duration>0&&r.animateFrom(c,v)}else x6(r,e,a||0,t,h);fM(r,e),u?r.dirty():r.markRedraw()}function fM(r,e){for(var t=Fo(r).leaveToProps,n=0;n<Gf.length;n++){var a=Gf[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=Fo(r).leaveToProps={}),a&&(t[a]=t[a]||{}),B(a?t[a]:t,i.leaveTo))}}function Hf(r,e,t,n){if(r){var a=r.parent,i=Fo(r).leaveToProps;if(i){var o=Vy("update",r,e,t,0);o.done=function(){a.remove(r)},r.animateTo(i,o)}else a.remove(r)}}function ki(r){return r==="all"}function S6(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var a=r.animators,i=0;i<a.length;i++){var o=a[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function x6(r,e,t,n,a){if(a){var i=Vy("update",r,e,n,t);i.duration>0&&r.animateFrom(a,i)}}function b6(r,e){X(e,"silent")&&(r.silent=e.silent),X(e,"ignore")&&(r.ignore=e.ignore),r instanceof lr&&X(e,"invisible")&&(r.invisible=e.invisible),r instanceof _t&&X(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var ln={},w6={setTransform:function(r,e){return process.env.NODE_ENV!=="production"&&tt(X(zf,r),"Only "+hM+" available in `setTransform`."),ln.el[r]=e,this},getTransform:function(r){return process.env.NODE_ENV!=="production"&&tt(X(zf,r),"Only "+hM+" available in `getTransform`."),ln.el[r]},setShape:function(r,e){process.env.NODE_ENV!=="production"&&Ho(r);var t=ln.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){process.env.NODE_ENV!=="production"&&Ho(r);var e=ln.el.shape;if(e)return e[r]},setStyle:function(r,e){process.env.NODE_ENV!=="production"&&Ho(r);var t=ln.el,n=t.style;return n&&(process.env.NODE_ENV!=="production"&&wa(e)&&Xt("style."+r+" must not be assigned with NaN."),n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){process.env.NODE_ENV!=="production"&&Ho(r);var e=ln.el.style;if(e)return e[r]},setExtra:function(r,e){process.env.NODE_ENV!=="production"&&Ho(r);var t=ln.el.extra||(ln.el.extra={});return t[r]=e,this},getExtra:function(r){process.env.NODE_ENV!=="production"&&Ho(r);var e=ln.el.extra;if(e)return e[r]}};function Ho(r){if(process.env.NODE_ENV!=="production"&&(r==="transition"||r==="enterFrom"||r==="leaveTo"))throw new Error('key must not be "'+r+'"')}function T6(){var r=this,e=r.el;if(e){var t=Fo(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}ln.el=e,n(w6)}}function cM(r,e,t,n){var a=t[r];if(a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),ki(l))B(o,i);else for(var u=Pt(l),h=0;h<u.length;h++){var f=u[h],c=i[f];o[f]=c}else if(ki(s)||dt(s,r)>=0){!o&&(o=n[r]={});for(var v=xt(i),h=0;h<v.length;h++){var f=v[h],c=i[f];M6(a[f],c)&&(o[f]=c)}}}}}function vM(r,e,t){var n=e[r];if(n)for(var a=t[r]={},i=xt(n),o=0;o<i.length;o++){var s=i[o];a[s]=ps(n[s])}}function C6(r,e,t){for(var n=e.transition,a=ki(n)?$r:Pt(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];process.env.NODE_ENV!=="production"&&pM(o,"el.transition"),t[o]=s}}}function D6(r,e,t){for(var n=0;n<uM.length;n++){var a=uM[n],i=lM[a],o=e[a];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<$r.length;n++){var s=$r[n];e[s]!=null&&(t[s]=e[s])}}function A6(r,e,t,n){if(t){var a=r.style,i;if(a){var o=t.transition,s=e.transition;if(o&&!ki(o)){var l=Pt(o);!i&&(i=n.style={});for(var u=0;u<l.length;u++){var h=l[u],f=a[h];i[h]=f}}else if(r.getAnimationStyleProps&&(ki(s)||ki(o)||dt(s,"style")>=0)){var c=r.getAnimationStyleProps(),v=c?c.style:null;if(v){!i&&(i=n.style={});for(var p=xt(t),u=0;u<p.length;u++){var h=p[u];if(v[h]){var f=a[h];i[h]=f}}}}}}}function M6(r,e){return we(r)?r!==e:r!=null&&isFinite(r)}var pM;process.env.NODE_ENV!=="production"&&(pM=function(r,e){X(zf,r)||Xt("Prop `"+r+"` is not a permitted in `"+e+"`. Only `"+xt(zf).join("`, `")+"` are permitted.")});var dM=bt(),I6=["percent","easing","shape","style","extra"];function gM(r){r.stopAnimation("keyframe"),r.attr(dM(r))}function Wf(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(z(e)){A(e,function(s){Wf(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=ro("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=dM(r);A(Gf,function(s){if(!(s&&!r[s])){var l,u=!1;n.sort(function(h,f){return h.percent-f.percent}),A(n,function(h){var f=r.animators,c=s?h[s]:h;if(process.env.NODE_ENV!=="production"&&h.percent>=1&&(u=!0),!!c){var v=xt(c);if(s||(v=At(v,function(g){return dt(I6,g)<0})),!!v.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var p=0;p<f.length;p++)f[p]!==l&&f[p].targetName===l.targetName&&f[p].stopTracks(v);s&&(o[s]=o[s]||{});var d=s?o[s]:o;A(v,function(g){d[g]=((s?r[s]:r)||{})[g]}),l.whenWithKeys(a*h.percent,c,v,h.easing)}}}),l&&(process.env.NODE_ENV!=="production"&&(u||Xt("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),l.delay(e.delay||0).duration(a).start(e.easing))}})}}}var Rn="emphasis",pa="normal",By="blur",zy="select",da=[pa,Rn,By,zy],Gy={normal:["itemStyle"],emphasis:[Rn,"itemStyle"],blur:[By,"itemStyle"],select:[zy,"itemStyle"]},Fy={normal:["label"],emphasis:[Rn,"label"],blur:[By,"label"],select:[zy,"label"]},L6=["x","y"],E6="e\0\0",Sr={normal:{},emphasis:{},blur:{},select:{}},yM={cartesian2d:c6,geo:p6,single:g6,polar:m6,calendar:_6};function $f(r){return r instanceof _t}function Hy(r){return r instanceof lr}function P6(r,e){e.copyTransform(r),Hy(e)&&Hy(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,$f(e)&&$f(r)&&e.setShape(r.shape))}var k6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=_M(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){Uy(a,null,f,u(f,i),t,l,s)}).remove(function(f){var c=o.getItemGraphicEl(f);c&&Hf(c,kn(c).option,t)}).update(function(f,c){var v=o.getItemGraphicEl(c);Uy(a,v,f,u(f,i),t,l,s)}).execute();var h=t.get("clip",!0)?_l(t.coordinateSystem,!1,t):null;h?l.setClipPath(h):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,a,i,o){var s=n.getData(),l=_M(n,s,a,i),u=this._progressiveEls=[];function h(v){v.isGroup||(v.incremental=!0,v.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var c=Uy(null,null,f,l(f,o),n,this.group,s);c&&(c.traverse(h),u.push(c))}},e.prototype.eachRendered=function(t){Jn(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,a,i){var o=n.element;if(o==null||a.name===o)return!0;for(;(a=a.__hostTarget||a.parent)&&a!==this.group;)if(a.name===o)return!0;return!1},e.type="custom",e}(Rt);function Wy(r){var e=r.type,t;if(e==="path"){var n=r.shape,a=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=TM(n);t=hh(i,null,a,n.layout||"center"),kn(t).customPathData=i}else if(e==="image")t=new ge({}),kn(t).customImagePath=r.style.image;else if(e==="text")t=new Tt({});else if(e==="group")t=new it;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=mp(e);if(!o){var s="";process.env.NODE_ENV!=="production"&&(s='graphic type "'+e+'" can not be found.'),Mt(s)}t=new o}return kn(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function $y(r,e,t,n,a,i,o){gM(e);var s=a&&a.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=L6);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;X(u,"textFill")&&(u.fill=u.textFill),X(u,"textStroke")&&(u.stroke=u.textStroke)}var h=void 0,f=$f(e)?l.decal:null;r&&f&&(f.dirty=!0,h=To(f,r)),l.__decalPattern=h}if(Hy(e)&&l){var h=l.__decalPattern;h&&(l.decal=h)}Ff(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),Wf(e,n.keyframeAnimation,i)}function mM(r,e,t,n,a){var i=e.isGroup?null:e,o=a&&a[r].cfg;if(i){var s=i.ensureState(r);if(n===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),Xa(i)}}function R6(r,e,t){if(!r.isGroup){var n=r,a=t.currentZ,i=t.currentZLevel;n.z=a,n.zlevel=i;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<da.length;s++)N6(n,e,da[s])}}function N6(r,e,t){var n=t===pa,a=n?e:Uf(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function _M(r,e,t,n){var a=r.get("renderItem"),i=r.coordinateSystem,o={};i&&(process.env.NODE_ENV!=="production"&&(tt(a,"series.render is required."),tt(i.prepareCustoms||yM[i.type],"This coordSys does not support custom series.")),o=i.prepareCustoms?i.prepareCustoms(i):yM[i.type](i));for(var s=rt({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:S,style:b,ordinalRawValue:x,styleEmphasis:w,visual:D,barLayout:M,currentSeriesIndices:I,font:L},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:O6(r.getData())},u,h,f={},c={},v={},p={},d=0;d<da.length;d++){var g=da[d];v[g]=r.getModel(Gy[g]),p[g]=r.getModel(Fy[g])}function y(E){return E===u?h||(h=e.getItemModel(E)):e.getItemModel(E)}function m(E,P){return e.hasItemOption?E===u?f[P]||(f[P]=y(E).getModel(Gy[P])):y(E).getModel(Gy[P]):v[P]}function _(E,P){return e.hasItemOption?E===u?c[P]||(c[P]=y(E).getModel(Fy[P])):y(E).getModel(Fy[P]):p[P]}return function(E,P){return u=E,h=null,f={},c={},a&&a(rt({dataIndexInside:E,dataIndex:e.getRawIndex(E),actionType:P?P.type:null},l),s)};function S(E,P){return P==null&&(P=u),e.getStore().get(e.getDimensionIndex(E||0),P)}function x(E,P){P==null&&(P=u),E=E||0;var k=e.getDimensionInfo(E);if(!k){var N=e.getDimensionIndex(E);return N>=0?e.getStore().get(N,P):void 0}var R=e.get(k.name,P),V=k&&k.ordinalMeta;return V?V.categories[R]:R}function b(E,P){process.env.NODE_ENV!=="production"&&sM("api.style","Please write literal style directly instead."),P==null&&(P=u);var k=e.getItemVisual(P,"style"),N=k&&k.fill,R=k&&k.opacity,V=m(P,pa).getItemStyle();N!=null&&(V.fill=N),R!=null&&(V.opacity=R);var F={inheritColor:U(N)?N:"#000"},H=_(P,pa),$=zt(H,null,F,!1,!0);$.text=H.getShallow("show")?ot(r.getFormattedLabel(P,pa),Eo(e,P)):null;var Q=ph(H,F,!1);return C(E,V),V=iM(V,$,Q),E&&T(V,E),V.legacy=!0,V}function w(E,P){process.env.NODE_ENV!=="production"&&sM("api.styleEmphasis","Please write literal style directly instead."),P==null&&(P=u);var k=m(P,Rn).getItemStyle(),N=_(P,Rn),R=zt(N,null,null,!0,!0);R.text=N.getShallow("show")?rr(r.getFormattedLabel(P,Rn),r.getFormattedLabel(P,pa),Eo(e,P)):null;var V=ph(N,null,!0);return C(E,k),k=iM(k,R,V),E&&T(k,E),k.legacy=!0,k}function T(E,P){for(var k in P)X(P,k)&&(E[k]=P[k])}function C(E,P){E&&(E.textFill&&(P.textFill=E.textFill),E.textPosition&&(P.textPosition=E.textPosition))}function D(E,P){if(P==null&&(P=u),X(tM,E)){var k=e.getItemVisual(P,"style");return k?k[tM[E]]:null}if(X(u6,E))return e.getItemVisual(P,E)}function M(E){if(i.type==="cartesian2d"){var P=i.getBaseAxis();return DB(rt({axis:P},E))}}function I(){return t.getCurrentSeriesIndices()}function L(E){return xp(E,t)}}function O6(r){var e={};return A(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Uy(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=Yy(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&qt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function Yy(r,e,t,n,a,i){process.env.NODE_ENV!=="production"&&tt(n,"should not have an null/undefined element setting");var o=-1,s=e;e&&SM(e,n,a)&&(o=dt(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Wy(n),s&&P6(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Sr.normal.cfg=Sr.normal.conOpt=Sr.emphasis.cfg=Sr.emphasis.conOpt=Sr.blur.cfg=Sr.blur.conOpt=Sr.select.cfg=Sr.select.conOpt=null,Sr.isLegacy=!1,B6(u,t,n,a,l,Sr),V6(u,t,n,a,l),$y(r,u,t,n,Sr,a,l),X(n,"info")&&(kn(u).info=n.info);for(var h=0;h<da.length;h++){var f=da[h];if(f!==pa){var c=Uf(n,f),v=Zy(n,c,f);mM(f,u,c,v,Sr)}}return R6(u,n,a),n.type==="group"&&z6(r,u,t,n,a),o>=0?i.replaceAt(u,o):i.add(u),u}function SM(r,e,t){var n=kn(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&W6(i)&&TM(i)!==n.customPathData||a==="image"&&X(o,"image")&&o.image!==n.customImagePath}function V6(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&SM(o,i,n)&&(o=null),o||(o=Wy(i),process.env.NODE_ENV!=="production"&&tt($f(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),r.setClipPath(o)),$y(null,o,e,i,null,n,a)}}function B6(r,e,t,n,a,i){if(!r.isGroup){xM(t,null,i),xM(t,Rn,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=r.getTextContent();if(o===!1)h&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=Wy(o),r.setTextContent(h)),$y(null,h,e,o,null,n,a);for(var f=o&&o.style,c=0;c<da.length;c++){var v=da[c];if(v!==pa){var p=i[v].conOpt;mM(v,h,p,Zy(o,p,v),null)}}f?h.dirty():h.markRedraw()}}}}function xM(r,e,t){var n=e?Uf(r,e):r,a=e?Zy(r,n,Rn):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?Uf(s,e):s:null;if(a&&(t.isLegacy||rM(a,i,!!o,!!l))){t.isLegacy=!0;var u=nM(a,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text"),process.env.NODE_ENV!=="production"&&tt(h.type==="text",'textContent.type must be "text"')}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function Uf(r,e){return e?r?r[e]:null:r}function Zy(r,e,t){var n=e&&e.style;return n==null&&t===Rn&&r&&(n=r.styleEmphasis),n}function z6(r,e,t,n,a){var i=n.children,o=i?i.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){F6({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:a,group:e});return}u&&e.removeAll();for(var h=0;h<o;h++){var f=i[h],c=e.childAt(h);f?(f.ignore==null&&(f.ignore=!1),Yy(r,c,t,f,a,e)):(process.env.NODE_ENV!=="production"&&tt(c,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),c.ignore=!0)}for(var v=e.childCount()-1;v>=h;v--){var p=e.childAt(v);G6(e,p,a)}}}function G6(r,e,t){e&&Hf(e,kn(r).option,t)}function F6(r){new Mn(r.oldChildren,r.newChildren,bM,bM,r).add(wM).update(wM).remove(H6).execute()}function bM(r,e){var t=r&&r.name;return t??E6+e}function wM(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;Yy(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function H6(r){var e=this.context,t=e.oldChildren[r];t&&Hf(t,kn(t).option,e.seriesModel)}function TM(r){return r&&(r.pathData||r.d)}function W6(r){return r&&(X(r,"pathData")||X(r,"d"))}function $6(r){r.registerChartView(k6),r.registerSeriesModel(h6)}var Ri=bt(),CM=at,Xy=Z,qy=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,n);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new it,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var c=ht(DM,t,f);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,t)}IM(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=gg(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=Ri(e).pointerEl=new ri[i.type](CM(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=Ri(e).labelEl=new Tt(CM(t.label));e.add(i),MM(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=Ri(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=Ri(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),MM(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=Bs(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){pn(u.event)},onmousedown:Xy(this._onHandleDragMove,this,0,0),drift:Xy(this._onHandleDragMove,this),ondragend:Xy(this._onHandleDragEnd,this)}),n.add(a)),IM(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");z(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,So(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){DM(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Ky(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(Ky(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(Ky(a)),Ri(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),Ks(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function DM(r,e,t,n){AM(Ri(t).lastProp,n)||(Ri(t).lastProp=n,e?Dt(t,n,r):(t.stopAnimation(),t.attr(n)))}function AM(r,e){if(J(r)&&J(e)){var t=!0;return A(e,function(n,a){t=t&&AM(r[a],n)}),!!t}else return r===e}function MM(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Ky(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function IM(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}function jy(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function LM(r,e,t,n,a){var i=t.get("value"),o=EM(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=ho(s.get("padding")||0),u=s.getFont(),h=ys(o,u),f=a.position,c=h.width+l[1]+l[3],v=h.height+l[0]+l[2],p=a.align;p==="right"&&(f[0]-=c),p==="center"&&(f[0]-=c/2);var d=a.verticalAlign;d==="bottom"&&(f[1]-=v),d==="middle"&&(f[1]-=v/2),U6(f,c,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:zt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function U6(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function EM(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Nd(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};A(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),U(o)?i=o.replace("{value}",i):j(o)&&(i=o(s))}return i}function Qy(r,e,t){var n=qe();return Aa(n,n,t.rotation),Fr(n,n,t.position),Pr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function PM(r,e,t,n,a,i){var o=He.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),LM(e,n,a,i,{position:Qy(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Jy(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function kM(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function RM(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var Y6=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),h=NM(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var c=jy(i),v=Z6[u](s,f,h);v.style=c,t.graphicKey=v.type,t.pointer=v}var p=cg(l.model,a);PM(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=cg(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=Qy(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=NM(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,f=[t.x,t.y];f[h]+=n[h],f[h]=Math.min(l[1],f[h]),f[h]=Math.max(l[0],f[h]);var c=(u[1]+u[0])/2,v=[c,c];v[h]=f[h];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:v,tooltipOption:p[h]}},e}(qy);function NM(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Z6={line:function(r,e,t){var n=Jy([e,t[0]],[e,t[1]],OM(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:kM([e-n/2,t[0]],[n,a],OM(r))}}};function OM(r){return r.dim==="x"?0:1}var X6=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(St),Nn=bt(),q6=A;function VM(r,e,t){if(!mt.node){var n=e.getZr();Nn(n).records||(Nn(n).records={}),K6(n,e);var a=Nn(n).records[r]||(Nn(n).records[r]={});a.handler=t}}function K6(r,e){if(Nn(r).initialized)return;Nn(r).initialized=!0,t("click",ht(BM,"click")),t("mousemove",ht(BM,"mousemove")),t("globalout",Q6);function t(n,a){r.on(n,function(i){var o=J6(e);q6(Nn(r).records,function(s){s&&a(s,i,o.dispatchAction)}),j6(o.pendings,e)})}}function j6(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function Q6(r,e,t){r.handler("leave",null,t)}function BM(r,e,t,n){e.handler(r,t,n)}function J6(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function tm(r,e){if(!mt.node){var t=e.getZr(),n=(Nn(t).records||{})[r];n&&(Nn(t).records[r]=null)}}var t8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";VM("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){tm("axisPointer",n)},e.prototype.dispose=function(t,n){tm("axisPointer",n)},e.type="axisPointer",e}(Yt);function zM(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=Oa(i,r);if(o==null||o<0||z(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),f=h.dim,c=u.dim,v=f==="x"||f==="radius"?1:0,p=i.mapDimension(c),d=[];d[v]=i.get(p,o),d[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues(G(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var GM=bt();function e8(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||Z(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Yf(a)&&(a=zM({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Yf(a),u=i.axesInfo,h=s.axesInfo,f=n==="leave"||Yf(a),c={},v={},p={list:[],map:{}},d={showPointer:ht(n8,v),showTooltip:ht(a8,p)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(a);A(s.coordSysAxesInfo[m],function(S,x){var b=S.axis,w=l8(u,S);if(!f&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=b.pointToData(a)),T!=null&&FM(S,T,d,!1,c)}})});var g={};return A(h,function(y,m){var _=y.linkGroup;_&&!v[m]&&A(_.axesInfo,function(S,x){var b=v[x];if(S!==y&&b){var w=b.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,HM(S),HM(y)))),g[y.key]=w}})}),A(g,function(y,m){FM(h[m],y,d,!0,c)}),i8(v,h,c),o8(p,a,r,o),s8(h,o,t),c}}function FM(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=r8(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&B(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function r8(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return A(e.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(n),f,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(h,r,t);c=v.dataIndices,f=v.nestestValue}else{if(c=l.getData().indicesOfNearest(h[0],r,t.type==="category"?.5:null),!c.length)return;f=l.getData().get(h[0],c[0])}if(!(f==null||!isFinite(f))){var p=r-f,d=Math.abs(p);d<=o&&((d<o||p>=0&&s<0)&&(o=d,s=p,a=f,i.length=0),A(c,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function n8(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function a8(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=Tl(l),h=r.map[u];h||(h=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(h)),h.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function i8(r,e,t){var n=t.axesInfo=[];A(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function o8(r,e,t,n){if(Yf(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function s8(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=GM(n)[a]||{},o=GM(n)[a]={};A(r,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&A(f.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];A(i,function(u,h){!o[h]&&l.push(u)}),A(o,function(u,h){!i[h]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function l8(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function HM(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Yf(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Hl(r){Ti.registerAxisPointerClass("CartesianAxisPointer",Y6),r.registerComponentModel(X6),r.registerComponentView(t8),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=_3(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},e8)}function u8(r){gt(yC),gt(Hl)}var h8=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),f=s.dataToCoord(n),c=i.get("type");if(c&&c!=="none"){var v=jy(i),p=c8[c](s,l,f,h);p.style=v,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=f8(n,a,i,l,d);LM(t,a,i,o,g)},e}(qy);function f8(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,h,f;if(i.dim==="radius"){var c=qe();Aa(c,c,s),Fr(c,c,[n.cx,n.cy]),u=Pr([o,-a],c);var v=e.getModel("axisLabel").get("rotate")||0,p=He.innerTextLayout(s,v*Math.PI/180,-1);h=p.textAlign,f=p.textVerticalAlign}else{var d=l[1];u=n.coordToPoint([d+a,o]);var g=n.cx,y=n.cy;h=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:h,verticalAlign:f}}var c8={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:Jy(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:RM(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:RM(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},v8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(St),em=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ne).models[0]},e.type="polarAxis",e}(St);te(em,fl);var p8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(em),d8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(em),rm=function(r){O(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e}(Nr);rm.prototype.dataToRadius=Nr.prototype.dataToCoord,rm.prototype.radiusToData=Nr.prototype.coordToData;var g8=bt(),nm=function(r){O(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),h=ys(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(h.height,7),c=f/u;isNaN(c)&&(c=1/0);var v=Math.max(0,Math.floor(c)),p=g8(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-v)<=1&&Math.abs(g-o)<=1&&d>v?v=d:(p.lastTickCount=o,p.lastAutoInterval=v),v},e}(Nr);nm.prototype.dataToAngle=Nr.prototype.dataToCoord,nm.prototype.angleToData=Nr.prototype.coordToData;var WM=["radius","angle"],y8=function(){function r(e){this.dimensions=WM,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new rm,this._angleAxis=new nm,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,h=u<o?1:-1;u<o||u>s;)u+=h*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,a=Math.cos(n)*t+this.cx,i=-Math.sin(n)*t+this.cy;return[a,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,h=l-this.cy,f=u*u+h*h,c=this.r,v=this.r0;return c!==v&&f-o<=c*c&&f+o>=v*v}}},r.prototype.convertToPixel=function(e,t,n){var a=$M(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=$M(t);return a===this?this.pointToData(n):null},r}();function $M(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function m8(r,e,t){var n=e.get("center"),a=t.getWidth(),i=t.getHeight();r.cx=W(n[0],a),r.cy=W(n[1],i);var o=r.getRadiusAxis(),s=Math.min(a,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]);var u=[W(l[0],s),W(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function _8(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();A(of(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),A(of(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Mo(n.scale,n.model),Mo(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function S8(r){return r.mainType==="angleAxis"}function UM(r,e){var t;if(r.type=e.get("type"),r.scale=af(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),S8(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,a)}e.axis=r,r.model=e}var x8={dimensions:WM,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new y8(a+"");i.update=_8;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");UM(o,l),UM(s,u),m8(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",ne).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error('Polar "'+ee(n.get("polarIndex"),n.get("polarId"),0)+'" not found');n.coordinateSystem=a.coordinateSystem}}),t}},b8=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Zf(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function Xf(r){var e=r.getRadiusAxis();return e.inverse?0:1}function YM(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var w8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=G(a.getViewLabels(),function(h){h=at(h);var f=a.scale,c=f.type==="ordinal"?f.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=a.dataToCoord(c),h});YM(u),YM(s),A(b8,function(h){t.get([h,"show"])&&(!a.scale.isBlank()||h==="axisLine")&&T8[h](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Ti),T8={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=Xf(t),f=h?0:1,c,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[f]===0?c=new ri[v]({shape:{cx:t.cx,cy:t.cy,r:i[h],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):c=new ks({shape:{cx:t.cx,cy:t.cy,r:i[h],r0:i[f]},style:o.getLineStyle(),z2:1,silent:!0}),c.style.fill=null,r.add(c)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Xf(t)],u=G(n,function(h){return new ue({shape:Zf(t,[l,l+s],h.coord)})});r.add(hr(u,{style:rt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Xf(t)],h=[],f=0;f<a.length;f++)for(var c=0;c<a[f].length;c++)h.push(new ue({shape:Zf(t,[u,u+l],a[f][c].coord)}));r.add(hr(h,{style:rt(s.getModel("lineStyle").getLineStyle(),rt(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,a,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),h=e.get("triggerEvent");A(o,function(f,c){var v=l,p=f.tickValue,d=i[Xf(t)],g=t.coordToPoint([d+u,f.coord]),y=t.cx,m=t.cy,_=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var x=s[p];J(x)&&x.textStyle&&(v=new Lt(x.textStyle,l,l.ecModel))}var b=new Tt({silent:He.isLabelSilent(e),style:zt(v,{x:g[0],y:g[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:S})});if(r.add(b),h){var w=He.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=f.rawLabel,st(b).eventData=w}},this)},splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],f=0;f<n.length;f++){var c=u++%l.length;h[c]=h[c]||[],h[c].push(new ue({shape:Zf(t,i,n[f].coord)}))}for(var f=0;f<h.length;f++)r.add(hr(h[f],{style:rt({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var h=0;h<a[u].length;h++)l.push(new ue({shape:Zf(t,i,a[u][h].coord)}));r.add(hr(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,a,i){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],f=Math.PI/180,c=-n[0].coord*f,v=Math.min(i[0],i[1]),p=Math.max(i[0],i[1]),d=e.get("clockwise"),g=1,y=n.length;g<=y;g++){var m=g===y?n[0].coord:n[g].coord,_=u++%l.length;h[_]=h[_]||[],h[_].push(new Oe({shape:{cx:t.cx,cy:t.cy,r0:v,r:p,startAngle:c,endAngle:-m*f,clockwise:d},silent:!0})),c=-m*f}for(var g=0;g<h.length;g++)r.add(hr(h[g],{style:rt({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},C8=["axisLine","axisTickLabel","axisName"],D8=["splitLine","splitArea","minorSplitLine"],A8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=this._axisGroup,i=this._axisGroup=new it;this.group.add(i);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),h=o.getMinorTicksCoords(),f=l.getExtent()[0],c=o.getExtent(),v=I8(s,t,f),p=new He(t,v);A(C8,p.add,p),i.add(p.getGroup()),Vs(a,i,t),A(D8,function(d){t.get([d,"show"])&&!o.scale.isBlank()&&M8[d](this.group,t,s,f,c,u,h)},this)}},e.type="radiusAxis",e}(Ti),M8={splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,h=t.getAngleAxis(),f=Math.PI/180,c=h.getExtent(),v=Math.abs(c[1]-c[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],d=0;d<i.length;d++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new ri[v]({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[d].coord,0),startAngle:-c[0]*f,endAngle:-c[1]*f,clockwise:h.inverse}}))}for(var d=0;d<p.length;d++)r.add(hr(p[d],{style:rt({stroke:l[d%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,a,i,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],h=0;h<o.length;h++)for(var f=0;f<o[h].length;f++)u.push(new Cn({shape:{cx:t.cx,cy:t.cy,r:o[h][f].coord}}));r.add(hr(u,{style:rt({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,a,i){if(i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],f=i[0].coord,c=1;c<i.length;c++){var v=u++%l.length;h[v]=h[v]||[],h[v].push(new Oe({shape:{cx:t.cx,cy:t.cy,r0:f,r:i[c].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=i[c].coord}for(var c=0;c<h.length;c++)r.add(hr(h[c],{style:rt({fill:l[c%l.length]},s.getAreaStyle()),silent:!0}))}}};function I8(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function ZM(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function XM(r,e){return e.dim+r.model.componentIndex}function L8(r,e,t){var n={},a=E8(At(e.getSeriesByType(r),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=XM(s,l),h=ZM(i),f=a[u][h],c=f.offset,v=f.width,p=s.getOtherAxis(l),d=i.coordinateSystem.cx,g=i.coordinateSystem.cy,y=i.get("barMinHeight")||0,m=i.get("barMinAngle")||0;n[h]=n[h]||[];for(var _=o.mapDimension(p.dim),S=o.mapDimension(l.dim),x=sa(o,_),b=l.dim!=="radius"||!i.get("roundCap",!0),w=p.model,T=w.get("startValue"),C=p.dataToCoord(T||0),D=0,M=o.count();D<M;D++){var I=o.get(_,D),L=o.get(S,D),E=I>=0?"p":"n",P=C;x&&(n[h][L]||(n[h][L]={p:C,n:C}),P=n[h][L][E]);var k=void 0,N=void 0,R=void 0,V=void 0;if(p.dim==="radius"){var F=p.dataToCoord(I)-C,H=l.dataToCoord(L);Math.abs(F)<y&&(F=(F<0?-1:1)*y),k=P,N=P+F,R=H-c,V=R-v,x&&(n[h][L][E]=N)}else{var $=p.dataToCoord(I,b)-C,Q=l.dataToCoord(L);Math.abs($)<m&&($=($<0?-1:1)*m),k=Q+c,N=k+v,R=P,V=P+$,x&&(n[h][L][E]=V)}o.setItemLayout(D,{cx:d,cy:g,r0:k,r:N,startAngle:-R*Math.PI/180,endAngle:-V*Math.PI/180,clockwise:R>=V})}}})}function E8(r){var e={};A(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=XM(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=f.stacks;e[l]=f;var v=ZM(n);c[v]||f.autoWidthCount++,c[v]=c[v]||{width:0,maxWidth:0};var p=W(n.get("barWidth"),h),d=W(n.get("barMaxWidth"),h),g=n.get("barGap"),y=n.get("barCategoryGap");p&&!c[v].width&&(p=Math.min(f.remainedWidth,p),c[v].width=p,f.remainedWidth-=p),d&&(c[v].maxWidth=d),g!=null&&(f.gap=g),y!=null&&(f.categoryGap=y)});var t={};return A(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=W(n.categoryGap,o),l=W(n.gap,1),u=n.remainedWidth,h=n.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),A(i,function(d,g){var y=d.maxWidth;y&&y<f&&(y=Math.min(y,u),d.width&&(y=Math.min(y,d.width)),u-=y,d.width=y,h--)}),f=(u-s)/(h+(h-1)*l),f=Math.max(f,0);var c=0,v;A(i,function(d,g){d.width||(d.width=f),v=d,c+=d.width*(1+l)}),v&&(c-=v.width*l);var p=-c/2;A(i,function(d,g){t[a][g]=t[a][g]||{offset:p,width:d.width},p+=d.width*(1+l)})}),t}var P8={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},k8={splitNumber:5},R8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(Yt);function N8(r){gt(Hl),Ti.registerAxisPointerClass("PolarAxisPointer",h8),r.registerCoordinateSystem("polar",x8),r.registerComponentModel(v8),r.registerComponentView(R8),ko(r,"angle",p8,P8),ko(r,"radius",d8,k8),r.registerComponentView(w8),r.registerComponentView(A8),r.registerLayout(ht(L8,"bar"))}function am(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,a={},i=n.position,o=n.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var h={horizontal:0,vertical:1};a.rotation=Math.PI/2*h[o];var f={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=f[i],r.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),ee(e.labelInside,r.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var c=e.rotate;return c==null&&(c=r.get(["axisLabel","rotate"])),a.labelRotation=i==="top"?-c:c,a.z2=1,a}var O8=["axisLine","axisTickLabel","axisName"],V8=["splitArea","splitLine"],B8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,a,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new it;var l=am(t),u=new He(t,l);A(O8,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),A(V8,function(h){t.get([h,"show"])&&z8[h](this,this.group,this._axisGroup,t)},this),Vs(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){vC(this)},e.type="singleAxis",e}(Ti),z8={splitLine:function(r,e,t,n){var a=n.axis;if(!a.scale.isBlank()){var i=n.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=n.coordinateSystem.getRect(),h=a.isHorizontal(),f=[],c=0,v=a.getTicksCoords({tickModel:i}),p=[],d=[],g=0;g<v.length;++g){var y=a.toGlobalCoord(v[g].coord);h?(p[0]=y,p[1]=u.y,d[0]=y,d[1]=u.y+u.height):(p[0]=u.x,p[1]=y,d[0]=u.x+u.width,d[1]=y);var m=new ue({shape:{x1:p[0],y1:p[1],x2:d[0],y2:d[1]},silent:!0});ao(m.shape,l);var _=c++%s.length;f[_]=f[_]||[],f[_].push(m)}for(var S=o.getLineStyle(["color"]),g=0;g<f.length;++g)e.add(hr(f[g],{style:rt({stroke:s[g%s.length]},S),silent:!0}))}},splitArea:function(r,e,t,n){cC(r,t,n,n)}},qf=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(St);te(qf,fl.prototype);var G8=function(r){O(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e}(Nr),qM=["single"],F8=function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=qM,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=this.dimension,i=new G8(a,af(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var a=n.getData();A(a.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Mo(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=se({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),a=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(a[i],a[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),a=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return a-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),a=n.orient;return a==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),a=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[i]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-i]=i===0?n.y+n.height/2:n.x+n.width/2,a},r.prototype.convertToPixel=function(e,t,n){var a=KM(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=KM(t);return a===this?this.pointToData(n):null},r}();function KM(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function H8(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new F8(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",ne).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var W8={create:H8,dimensions:qM},jM=["x","y"],$8=["width","height"],U8=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=im(l,1-Kf(s)),h=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var c=jy(i),v=Y8[f](s,h,u);v.style=c,t.graphicKey=v.type,t.pointer=v}var p=am(a);PM(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=am(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=Qy(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=Kf(o),u=im(s,l),h=[t.x,t.y];h[l]+=n[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var f=im(s,1-l),c=(f[1]+f[0])/2,v=[c,c];return v[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(qy),Y8={line:function(r,e,t){var n=Jy([e,t[0]],[e,t[1]],Kf(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:kM([e-n/2,t[0]],[n,a],Kf(r))}}};function Kf(r){return r.isHorizontal()?0:1}function im(r,e){var t=r.getRect();return[t[jM[e]],t[jM[e]]+t[$8[e]]]}var Z8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Yt);function X8(r){gt(Hl),Ti.registerAxisPointerClass("SingleAxisPointer",U8),r.registerComponentView(Z8),r.registerComponentView(B8),r.registerComponentModel(qf),ko(r,"single",qf,qf.defaultOption),r.registerCoordinateSystem("single",W8)}var q8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=fo(t);r.prototype.init.apply(this,arguments),QM(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),QM(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(St);function QM(r,e){var t=r.cellSize,n;z(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=G([0,1],function(i){return vN(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});ra(r,e,{type:"box",ignoreSize:a})}var K8=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var h=i.dataToRect([u],!1).tl,f=new wt({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});a.add(f)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,c=0;f.time<=n.end.time;c++){p(f.formatedDate),c===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,a);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new Be({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),h=i.dataToRect([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return U(t)&&t?hN(t,n):j(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(i==="left"||i==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,c=a==="horizontal"?0:1,v={top:[h,u[c][1]],bottom:[h,u[1-c][1]],left:[u[1-c][0],f],right:[u[c][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var d=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new Tt({z2:30,style:zt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,v[l],a,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],h=t[1];return a==="horizontal"?(h=h+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||U(s))&&(s&&(n=Dp(s)||n),s=n.get(["time","monthAbbr"])||[]);var c=u==="start"?0:1,v=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=h==="center",d=o.get("silent"),g=0;g<f[c].length-1;g++){var y=f[c][g].slice(),m=this._firstDayOfMonth[g];if(p){var _=this._firstDayPoints[g];y[v]=(_[v]+f[0][g+1][v])/2}var S=o.get("formatter"),x=s[+m.m-1],b={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:x},w=this._formatterLabel(S,b),T=new Tt({z2:30,style:B(zt(o,{text:w}),this._monthTextPositionControl(y,p,a,u,l)),silent:d});i.add(T)}}},e.prototype._weekTextPositionControl=function(t,n,a,i,o){var s="center",l="middle",u=t[0],h=t[1],f=a==="start";return n==="horizontal"?(u=u+i+(f?1:-1)*o[0]/2,s=f?"right":"left"):(h=h+i+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,a,i,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),h=s.get("nameMap"),f=s.get("margin"),c=l.getFirstDayOfWeek();if(!h||U(h)){h&&(n=Dp(h)||n);var v=n.get(["time","dayOfWeekShort"]);h=v||G(n.get(["time","dayOfWeekAbbr"]),function(b){return b[0]})}var p=l.getNextNDay(a.end.time,7-a.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];f=W(f,Math.min(d[1],d[0])),u==="start"&&(p=l.getNextNDay(a.start.time,-(7+a.fweek)).time,f=-f);for(var g=s.get("silent"),y=0;y<7;y++){var m=l.getNextNDay(p,y),_=l.dataToRect([m.time],!1).center,S=y;S=Math.abs((y+c)%7);var x=new Tt({z2:30,style:B(zt(s,{text:h[S]}),this._weekTextPositionControl(_,i,u,f,d)),silent:g});o.add(x)}}},e.type="calendar",e}(Yt),om=864e5,j8=function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=Yr(e);var t=e.getFullYear(),n=e.getMonth()+1,a=n<10?"0"+n:""+n,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];A([0,1],function(f){h(i,f)&&(o[a[f]]=i[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=se(o,l);A([0,1],function(f){h(i,f)||(i[f]=u[a[f]]/s[f])});function h(f,c){return f[c]!=null&&f[c]!=="auto"}this._sw=i[0],this._sh=i[1]},r.prototype.dataToPoint=function(e,t){z(e)&&(e=e[0]),t==null&&(t=!0);var n=this.getDateInfo(e),a=this._rangeInfo,i=n.formatedDate;if(t&&!(n.time>=a.start.time&&n.time<a.end.time+om))return[NaN,NaN];var o=n.day,s=this._getRangeInfo([a.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,a):this._getDateByWeeksAndDay(t,n-1,a)},r.prototype.convertToPixel=function(e,t,n){var a=JM(t);return a===this?a.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=JM(t);return a===this?a.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(z(e)&&e.length===1&&(e=e[0]),z(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return process.env.NODE_ENV!=="production"&&wr("Invalid date range."),e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/om)-Math.floor(t[0].time/om)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var h=Math.floor((a+t[0].day+6)/7),f=n?-h+1:h-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:h,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a);n.push(i),a.coordinateSystem=i}),e.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=n[a.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function JM(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function Q8(r){r.registerComponentModel(q8),r.registerComponentView(K8),r.registerCoordinateSystem("calendar",j8)}function J8(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function t2(r,e){var t;return A(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function t7(r,e,t){var n=B({},t),a=r[e],i=t.$action||"merge";if(i==="merge")if(a){if(process.env.NODE_ENV!=="production"){var o=t.type;tt(!o||a.type===o,'Please set $action: "replace" to change `type`')}ft(a,n,!0),ra(a,n,{ignoreSize:!0}),PS(t,a),jf(t,a),jf(t,a,"shape"),jf(t,a,"style"),jf(t,a,"extra"),t.clipPath=a.clipPath}else r[e]=n;else i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var e2=["transition","enterFrom","leaveTo"],e7=e2.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function jf(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?e2:e7,a=0;a<n.length;a++){var i=n[a];r[i]==null&&e[i]!=null&&(r[i]=e[i])}}function r7(r,e){if(r&&(r.hv=e.hv=[t2(e,["left","right"]),t2(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var n7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,n){var a=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=a},e.prototype.optionUpdated=function(t,n){var a=this.option,i=(n?a:t).elements,o=a.elements=n?[]:a.elements,s=[];this._flatten(i,s,null);var l=z_(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];A(l,function(h,f){var c=h.newOption;process.env.NODE_ENV!=="production"&&tt(J(c)||h.existing,"Empty graphic option definition"),c&&(u.push(c),J8(h,c),t7(o,f,c),r7(o[f],c))},this),a.elements=At(o,function(h){return h&&delete h.$action,h!=null})},e.prototype._flatten=function(t,n,a){A(t,function(i){if(i){a&&(i.parentOption=a),n.push(i);var o=i.children;o&&o.length&&this._flatten(o,n,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(St),r2={path:null,compoundPath:null,group:it,image:ge,text:Tt},xr=bt(),a7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=q()},e.prototype.render=function(t,n,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(n){var a=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");A(n,function(l){var u=oe(l.id,null),h=u!=null?a.get(u):null,f=oe(l.parentId,null),c=f!=null?a.get(f):i,v=l.type,p=l.style;v==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var d=l.textContent,g=l.textConfig;if(p&&rM(p,v,!!g,!!d)){var y=nM(p,v,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var m=i7(l);process.env.NODE_ENV!=="production"&&h&&tt(c===h.parent,"Changing parent is not supported.");var _=l.$action||"merge",S=_==="merge",x=_==="replace";if(S){var b=!h,w=h;b?w=n2(u,c,l.type,a):(w&&(xr(w).isNew=!1),gM(w)),w&&(Ff(w,m,t,{isInit:b}),a2(w,l,o,s))}else if(x){Qf(h,l,a,t);var T=n2(u,c,l.type,a);T&&(Ff(T,m,t,{isInit:!0}),a2(T,l,o,s))}else _==="remove"&&(fM(h,l),Qf(h,l,a,t));var C=a.get(u);if(C&&d)if(S){var D=C.getTextContent();D?D.attr(d):C.setTextContent(new Tt(d))}else x&&C.setTextContent(new Tt(d));if(C){var M=l.clipPath;if(M){var I=M.type,L=void 0,b=!1;if(S){var E=C.getClipPath();b=!E||xr(E).type!==I,L=b?sm(I):E}else x&&(b=!0,L=sm(I));C.setClipPath(L),Ff(L,M,t,{isInit:b}),Wf(L,M.keyframeAnimation,t)}var P=xr(C);C.setTextConfig(g),P.option=l,o7(C,t,l),ei({el:C,componentModel:t,itemName:C.name,itemTooltipOption:l.tooltip}),Wf(C,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var a=t.option.elements,i=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],h=0;h<a.length;h++){var f=a[h],c=oe(f.id,null),v=c!=null?o.get(c):null;if(!(!v||!v.isGroup)){var p=v.parent,d=p===i,g=xr(v),y=xr(p);g.width=W(g.option.width,d?s:y.width)||0,g.height=W(g.option.height,d?l:y.height)||0}}for(var h=a.length-1;h>=0;h--){var f=a[h],c=oe(f.id,null),v=c!=null?o.get(c):null;if(v){var p=v.parent,y=xr(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=Ch(v,f,m,null,{hv:f.hv,boundingMode:f.bounding},_);if(!xr(v).isNew&&S){for(var x=f.transition,b={},w=0;w<u.length;w++){var T=u[w],C=_[T];x&&(ki(x)||dt(x,T)>=0)?b[T]=C:v[T]=C}Dt(v,b,t,0)}else v.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){Qf(a,xr(a).option,n,t._lastGraphicModel)}),this._elMap=q()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Yt);function sm(r){process.env.NODE_ENV!=="production"&&tt(r,"graphic type MUST be set");var e=X(r2,r)?r2[r]:mp(r);process.env.NODE_ENV!=="production"&&tt(e,"graphic type "+r+" can not be found");var t=new e({});return xr(t).type=r,t}function n2(r,e,t,n){var a=sm(t);return e.add(a),n.set(r,a),xr(a).id=r,xr(a).isNew=!0,a}function Qf(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){Qf(i,e,t,n)}),Hf(r,e,n),t.removeKey(xr(r).id))}function a2(r,e,t,n){r.isGroup||A([["cursor",lr.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];X(e,i)?r[i]=ot(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),A(xt(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=j(i)?i:null}}),X(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function i7(r){return r=B({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(ES),function(e){delete r[e]}),r}function o7(r,e,t){var n=st(r).eventData;!r.silent&&!r.ignore&&!n&&(n=st(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function s7(r){r.registerComponentModel(n7),r.registerComponentView(a7),r.registerPreprocessor(function(e){var t=e.graphic;z(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var i2=["x","y","radius","angle","single"],l7=["cartesian2d","polar","singleAxis"];function u7(r){var e=r.get("coordinateSystem");return dt(l7,e)>=0}function ga(r){return process.env.NODE_ENV!=="production"&&tt(r),r+"Axis"}function h7(r,e){var t=q(),n=[],a=q();r.eachComponent({mainType:"dataZoom",query:e},function(h){a.get(h.uid)||s(h)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(h){!a.get(h.uid)&&l(h)&&(s(h),i=!0)}function s(h){a.set(h.uid,!0),n.push(h),u(h)}function l(h){var f=!1;return h.eachTargetAxis(function(c,v){var p=t.get(c);p&&p[v]&&(f=!0)}),f}function u(h){h.eachTargetAxis(function(f,c){(t.get(f)||t.set(f,[]))[c]=!0})}return n}function o2(r){var e=r.ecModel,t={infoList:[],infoMap:q()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(ga(n),a);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var lm=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),Wl=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=s2(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=s2(t);ft(this.option,t,!0),ft(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=q(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return A(i2,function(a){var i=this.getReferringComponents(ga(a),JP);if(i.specified){n=!0;var o=new lm;A(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===n}});l(s,"single")}function l(u,h){var f=u[0];if(f){var c=new lm;if(c.add(f.componentIndex),t.set(h,c),i=!1,h==="x"||h==="y"){var v=f.getReferringComponents("grid",ne).models[0];v&&A(u,function(p){f.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",ne).models[0]&&c.add(p.componentIndex)})}}}i&&A(i2,function(u){if(i){var h=a.findComponents({mainType:ga(u),filter:function(c){return c.get("type",!0)==="category"}});if(h[0]){var f=new lm;f.add(h[0].componentIndex),t.set(u,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(ga(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){A(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){process.env.NODE_ENV!=="production"&&tt(t&&n!=null);var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(ga(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;A(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&tt(this._orient),this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(St);function s2(r){var e={};return A(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var f7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(Wl),um=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.dataZoomModel=t,this.ecModel=n,this.api=a},e.type="dataZoom",e}(Yt),c7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(um),Wo=A,l2=sr,v7=function(){function r(e,t,n,a){this._dimName=e,this._axisIndex=t,this.ecModel=a,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(u7(t)){var n=ga(this._dimName),a=t.getReferringComponents(n,ne).models[0];a&&this._axisIndex===a.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return at(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),a=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Wo(["start","end"],function(c,v){var p=e[c],d=e[c+"Value"];i[v]==="percent"?(p==null&&(p=o[v]),d=a.parse(It(p,o,t))):(u=!0,d=d==null?t[v]:a.parse(d),p=It(d,t,o)),l[v]=d==null||isNaN(d)?t[v]:d,s[v]=p==null||isNaN(p)?o[v]:p}),l2(l),l2(s);var h=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(c,v,p,d,g){var y=g?"Span":"ValueSpan";Li(0,c,p,"all",h["min"+y],h["max"+y]);for(var m=0;m<2;m++)v[m]=It(c[m],p,d,!0),g&&(v[m]=a.parse(v[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=p7(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,a=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;if(i==="none")return;Wo(a,function(l){var u=l.getData(),h=u.mapDimensionsAll(n);if(h.length){if(i==="weakFilter"){var f=u.getStore(),c=G(h,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var p,d,g,y=0;y<h.length;y++){var m=f.get(c[y],v),_=!isNaN(m),S=m<o[0],x=m>o[1];if(_&&!S&&!x)return!0;_&&(g=!0),S&&(p=!0),x&&(d=!0)}return g&&p&&d})}else Wo(h,function(v){if(i==="empty")l.setData(u=u.map(v,function(d){return s(d)?d:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});Wo(h,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Wo(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=It(n[0]+o,n,[0,100],!0):i!=null&&(o=It(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var a=D_(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function p7(r,e,t){var n=[1/0,-1/0];Wo(t,function(o){XB(n,o.getData(),e)});var a=r.getAxisModel(),i=dw(a.axis.scale,a,n).calculate();return[i.min,i.max]}var d7={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(ga(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new v7(a,i,s,r),t.push(o.__dzAxisProxy))});var n=q();return A(t,function(a){A(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function g7(r){r.registerAction("dataZoom",function(e,t){var n=h7(t,e);A(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var u2=!1;function hm(r){u2||(u2=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,d7),g7(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function y7(r){r.registerComponentModel(f7),r.registerComponentView(c7),hm(r)}var br=function(){function r(){}return r}(),h2={};function $o(r,e){h2[r]=e}function f2(r){return h2[r]}var m7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;A(this.option.feature,function(n,a){var i=f2(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),ft(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(St);function _7(r,e,t){var n=e.getBoxLayoutParams(),a=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=se(n,i,a);ii(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Ch(r,n,i,a)}function c2(r,e){var t=ho(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new wt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var S7=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},h=this._features||(this._features={}),f=[];A(u,function(p,d){f.push(d)}),new Mn(this._featureNames||[],f).add(c).update(c).remove(ht(c,null)).execute(),this._featureNames=f;function c(p,d){var g=f[p],y=f[d],m=u[g],_=new Lt(m,t,t.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(x7(g))S={onclick:_.option.onclick,featureName:g};else{var x=f2(g);if(!x)return;S=new x}h[g]=S}else if(S=h[y],!S)return;S.uid=oo("toolbox-feature"),S.model=_,S.ecModel=n,S.api=a;var b=S instanceof br;if(!g&&y){b&&S.dispose&&S.dispose(n,a);return}if(!_.get("show")||b&&S.unusable){b&&S.remove&&S.remove(n,a);return}v(_,S,g),_.setIconStatus=function(w,T){var C=this.option,D=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[w]=T,D[w]&&(T==="emphasis"?wn:Tn)(D[w])},S instanceof br&&S.render&&S.render(_,n,a,i)}function v(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof br&&d.getIcons?d.getIcons():p.get("icon"),S=p.get("title")||{},x,b;U(_)?(x={},x[g]=_):x=_,U(S)?(b={},b[g]=S):b=S;var w=p.iconPaths={};A(x,function(T,C){var D=Bs(T,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(y.getItemStyle());var M=D.ensureState("emphasis");M.style=m.getItemStyle();var I=new Tt({style:{text:b[C],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:xp({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},n)},ignore:!0});D.setTextContent(I),ei({el:D,componentModel:t,itemName:C,formatterParamsExtra:{title:b[C]}}),D.__title=b[C],D.on("mouseover",function(){var L=m.getItemStyle(),E=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),D.setTextConfig({position:m.get("textPosition")||E}),I.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&a.leaveEmphasis(this),I.hide()}),(p.get(["iconStatus",C])==="emphasis"?wn:Tn)(D),o.add(D),D.on("click",Z(d.onclick,d,n,a,C)),w[C]=D})}_7(o,t,a),o.add(c2(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!j(_)&&d){var S=_.style||(_.style={}),x=ys(d,Tt.makeFont(S)),b=p.x+o.x,w=p.y+o.y+s,T=!1;w+x.height>a.getHeight()&&(y.position="top",T=!0);var C=T?-5-x.height:s+10;b+x.width/2>a.getWidth()?(y.position=["100%",C],S.align="right"):b-x.width/2<0&&(y.position=[0,C],S.align="left")}})},e.prototype.updateView=function(t,n,a,i){A(this._features,function(o){o instanceof br&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){A(this._features,function(a){a instanceof br&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){A(this._features,function(a){a instanceof br&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e}(Yt);function x7(r){return r.indexOf("my")===0}var b7=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=mt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=i+"."+s,h.target="_blank",h.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),v=c[0].indexOf("base64")>-1,p=o?decodeURIComponent(c[1]):c[1];v&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,x=S.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),S.focus(),x.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var b=a.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',T=window.open();T.document.write(w),T.document.title=i}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(br),v2="__ec_magicType_stack__",w7=[["line","bar"],["stack"]],T7=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return A(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(p2[a]){var s={series:[]},l=function(f){var c=f.subType,v=f.id,p=p2[a](c,v,f,i);p&&(rt(p,f.option),s.series.push(p));var d=f.coordinateSystem;if(d&&d.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=f.getReferringComponents(m,ne).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var x=0;x<=S;x++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=a==="bar"}}};A(w7,function(f){dt(f,a)>=0&&A(f,function(c){i.setIconStatus(c,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=a;a==="stack"&&(u=ft({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(h="tiled")),n.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},e}(br),p2={line:function(r,e,t,n){if(r==="bar")return ft({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return ft({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===v2;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),ft({id:e,stack:a?"":v2},n.get(["option","stack"])||{},!0)}};en({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Jf=new Array(60).join("-"),Uo="	";function C7(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function D7(r){var e=[];return A(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(G(t.series,function(v){return v.name})),l=[a.model.getCategories()];A(t.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(Uo)],h=0;h<l[0].length;h++){for(var f=[],c=0;c<l.length;c++)f.push(l[c][h]);u.push(f.join(Uo))}e.push(u.join(`
`))}),e.join(`

`+Jf+`

`)}function A7(r){return G(r,function(e){var t=e.getRawData(),n=[e.name],a=[];return t.each(t.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=t.getName(o),l=0;l<i-1;l++)a[l]=arguments[l];n.push((s?s+Uo:"")+a.join(Uo))}),n.join(`
`)}).join(`

`+Jf+`

`)}function M7(r){var e=C7(r);return{value:At([D7(e.seriesGroupByCategoryAxis),A7(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`

`+Jf+`

`),meta:e.meta}}function tc(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function I7(r){var e=r.slice(0,r.indexOf(`
`));if(e.indexOf(Uo)>=0)return!0}var fm=new RegExp("["+Uo+"]+","g");function L7(r){for(var e=r.split(/\n+/g),t=tc(e.shift()).split(fm),n=[],a=G(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=tc(e[i]).split(fm);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[i]=o[s])}return{series:a,categories:n}}function E7(r){for(var e=r.split(/\n+/g),t=tc(e.shift()),n=[],a=0;a<e.length;a++){var i=tc(e[a]);if(i){var o=i.split(fm),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},l=n[a].value):l=n[a]=[];for(var h=0;h<o.length;h++)l.push(+o[h]);l.length===1&&(u?n[a].value=l[0]:n[a]=l[0])}}return{name:t,data:n}}function P7(r,e){var t=r.split(new RegExp(`
*`+Jf+`
*`,"g")),n={series:[]};return A(t,function(a,i){if(I7(a)){var o=L7(a),s=e[i],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=E7(a);n.series.push(o)}}),n}var k7=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var a=n.getDom(),i=this.model;this._dom&&a.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),h=document.createElement("textarea");u.style.cssText="overflow:auto";var f=i.get("optionToContent"),c=i.get("contentToOption"),v=M7(t);if(j(f)){var p=f(n.getOption());U(p)?u.innerHTML=p:ba(p)&&u.appendChild(p)}else{h.readOnly=i.get("readOnly");var d=h.style;d.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",d.color=i.get("textColor"),d.borderColor=i.get("textareaBorderColor"),d.backgroundColor=i.get("textareaColor"),h.value=v.value,u.appendChild(h)}var g=v.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),S=document.createElement("div");m+=";background-color:"+i.get("buttonColor"),m+=";color:"+i.get("buttonTextColor");var x=this;function b(){a.removeChild(o),x._dom=null}$c(_,"click",b),$c(S,"click",function(){if(c==null&&f!=null||c!=null&&f==null){process.env.NODE_ENV!=="production"&&Xt("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),b();return}var w;try{j(c)?w=c(u,n.getOption()):w=P7(h.value,g)}catch(T){throw b(),new Error("Data view format error "+T)}w&&n.dispatchAction({type:"changeDataView",newOption:w}),b()}),_.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=_.style.cssText=m,!i.get("readOnly")&&y.appendChild(S),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=a.clientHeight-80+"px",a.appendChild(o),this._dom=o},e.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.getDefaultOption=function(t){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return n},e}(br);function R7(r,e){return G(r,function(t,n){var a=e&&e[n];if(J(a)&&!z(a)){var i=J(t)&&!z(t);i||(t={value:t});var o=a.name!=null&&t.name==null;return t=rt(t,a),o&&delete t.name,t}else return t})}en({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];A(r.newOption.series,function(n){var a=e.getSeriesByName(n.name)[0];if(!a)t.push(B({type:"scatter"},n));else{var i=a.get("data");t.push({name:n.name,data:R7(n.data,i)})}}),e.mergeOption(rt({series:t},r.newOption))});var d2=A,g2=bt();function N7(r,e){var t=cm(r);d2(e,function(n,a){for(var i=t.length-1;i>=0;i--){var o=t[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function O7(r){var e=cm(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return d2(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function V7(r){g2(r).snapshots=null}function B7(r){return cm(r).length}function cm(r){var e=g2(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var z7=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){V7(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(br);en({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var G7=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],vm=function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=y2(t,e);A(F7,function(o,s){(!n||!n.include||dt(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=dm[n.brushType](0,i,a);n.__rangeOffset={offset:x2[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){A(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&A(i.coordSyses,function(o){var s=dm[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){A(e,function(n){var a=this.findTargetInfo(n,t);if(process.env.NODE_ENV!=="production"&&(tt(!a||a===!0||n.coordRange,"coordRange must be specified when coord index specified."),tt(!a||a!==!0||n.range,"range must be specified in global brush.")),n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=dm[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?x2[n.brushType](i.values,o.offset,H7(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return G(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:dA(a),isTargetByCursor:yA(a,e,n.coordSysModel),getLinearBrushOtherExtent:gA(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&dt(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=y2(t,e),i=0;i<n.length;i++){var o=n[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<m2.length;l++)if(m2[l](a,o))return o}return!0},r}();function pm(r){return r[0]>r[1]&&r.reverse(),r}function y2(r,e){return bs(r,e,{includeMainTypes:G7})}var F7={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=q(),o={},s={};!t&&!n&&!a||(A(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),A(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),A(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,h=[];A(u.getCartesians(),function(f,c){(dt(t,f.getAxis("x").model)>=0||dt(n,f.getAxis("y").model)>=0)&&h.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:_2.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){A(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:_2.geo})})}},m2=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],_2={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(ti(r)),e}},dm={lineX:ht(S2,0),lineY:ht(S2,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[pm([a[0],i[0]]),pm([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=G(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function S2(r,e,t,n){process.env.NODE_ENV!=="production"&&tt(t.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var a=t.getAxis(["x","y"][r]),i=pm(G([0,1],function(s){return e?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var x2={lineX:ht(b2,0),lineY:ht(b2,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return G(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function b2(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function H7(r,e){var t=w2(r),n=w2(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function w2(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var gm=A,W7=XP("toolbox-dataZoom_"),$7=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new vy(a.getZr()),this._brushController.on("brush",Z(this._onBrush,this)).mount()),Z7(t,n,this,i,a),Y7(t,n)},e.prototype.onclick=function(t,n,a){U7[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new vm(ym(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,h,f){if(f.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",f,h[0]),s("y",f,h[1])):s({lineX:"x",lineY:"y"}[c],f,h)}}),N7(i,a),this._dispatchZoomAction(a);function s(u,h,f){var c=h.getAxis(u),v=c.model,p=l(u,v,i),d=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(f=Li(0,f.slice(),c.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(a[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,h,f){var c;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var p=v.getAxisModel(u,h.componentIndex);p&&(c=v)}),c}},e.prototype._dispatchZoomAction=function(t){var n=[];gm(t,function(a,i){n.push(at(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(br),U7={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(O7(this.ecModel))}};function ym(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Y7(r,e){r.setIconStatus("back",B7(e)>1?"emphasis":"normal")}function Z7(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new vm(ym(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}_N("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=ym(n),o=bs(r,i);gm(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),gm(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var f=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:W7+u+f};c[h]=f,a.push(c)}return a});function X7(r){r.registerComponentModel(m7),r.registerComponentView(S7),$o("saveAsImage",b7),$o("magicType",T7),$o("dataView",k7),$o("dataZoom",$7),$o("restore",z7),gt(y7)}var q7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(St);function T2(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function C2(r){if(mt.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var D2=C2(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),K7=C2(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function A2(r,e){if(!r)return e;e=MS(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function j7(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var Q7=A2(K7,"transition"),mm=A2(D2,"transform"),J7="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(mt.transform3dSupported?"will-change:transform;":"");function t9(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function e9(r,e,t){if(!U(t)||t==="inside")return"";var n=r.get("backgroundColor"),a=r.get("borderWidth");e=ni(e);var i=t9(t),o=Math.max(Math.round(a)*1.5,6),s="",l=mm+":",u;dt(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var h=u*Math.PI/180,f=o+a,c=f*Math.abs(Math.cos(h))+f*Math.abs(Math.sin(h)),v=Math.round(((c-Math.SQRT2*a)/2+Math.SQRT2*a-(c-f)/2)*100)/100;s+=";"+i+":-"+v+"px";var p=e+" solid "+a+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+d.join("")+'"></div>'}function r9(r,e){var t="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+t,a="opacity"+n+",visibility"+n;return e||(n=" "+r+"s "+t,a+=mt.transformSupported?","+mm+n:",left"+n+",top"+n),Q7+":"+a}function M2(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!mt.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=mt.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+mm+":"+o+";":[["top",0],["left",0],[D2,o]]}function n9(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var a=ot(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),A(["decoration","align"],function(u){var h=r.get(u);h&&e.push("text-"+u+":"+h)}),e.join(";")}function a9(r,e,t){var n=[],a=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),h=r.getModel("textStyle"),f=kx(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+c),e&&a&&n.push(r9(a,t)),i&&n.push("background-color:"+i),A(["width","color","radius"],function(v){var p="border-"+v,d=MS(p),g=r.get(d);g!=null&&n.push(p+":"+g+(v==="color"?"":"px"))}),n.push(n9(h)),f!=null&&n.push("padding:"+ho(f).join("px ")+"px"),n.join(";")+";"}function I2(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&xE(r,o,t,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var i9=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,mt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),i=t.appendTo,o=i&&(U(i)?document.querySelector(i):ba(i)?i:j(i)&&i(e.getDom()));I2(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,h=a.painter.getViewportRoot();ar(h,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=j7(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=J7+a9(e,!this._firstShow,this._longHide)+M2(i[0],i[1],!0)+("border-color:"+ni(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(U(i)&&n.get("trigger")==="item"&&!T2(n)&&(s=e9(n,a,i)),U(e))o.innerHTML=e+s;else if(e){o.innerHTML="",z(e)||(e=[e]);for(var l=0;l<e.length;l++)ba(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(I2(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var a=this.el.style,i=M2(n[0],n[1]);A(i,function(o){a[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",mt.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Z(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},r}(),o9=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),E2(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,a,i){var o=this;J(e)&&Mt(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Tt({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:kx(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),A(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),A(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=L2(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var a=this._styleCoord;E2(a,this._zr,e,t),e=a[0],t=a[1];var i=n.style,o=ya(i.borderWidth||0),s=L2(i);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Z(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function ya(r){return Math.max(0,r)}function L2(r){var e=ya(r.shadowBlur||0),t=ya(r.shadowOffsetX||0),n=ya(r.shadowOffsetY||0);return{left:ya(e-t),right:ya(e+t),top:ya(e-n),bottom:ya(e+n)}}function E2(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var s9=new wt({shape:{x:-1,y:-1,width:2,height:2}}),l9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){if(!(mt.node||!n.getDom())){var a=t.getComponent("tooltip"),i=this._renderMode=ek(a.get("renderMode"));this._tooltipContent=i==="richText"?new o9(n):new i9(n,{appendTo:a.get("appendToBody",!0)?"body":a.get("appendTo",!0)})}},e.prototype.render=function(t,n,a){if(!(mt.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=a;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?So(this,"_updatePosition",50,"fixRate"):Ks(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");VM("itemTooltip",this._api,Z(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||mt.node||!a.getDom())){var o=P2(i,a);this._ticket="";var s=i.dataByCoordSys,l=c9(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var h=s9;h.x=i.x,h.y=i.y,h.update(),st(h).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:h},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,a,i))return;var f=zM(i,n),c=f.point[0],v=f.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(P2(i,a))},e.prototype._manuallyAxisShowTip=function(t,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var h=u.getData(),f=$l([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){var s=st(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;ui(a,function(h){if(st(h).dataIndex!=null)return l=h,!0;if(st(h).tooltipConfig!=null)return u=h,!0},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=Z(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=$l([n.tooltipOption],i),l=this._renderMode,u=[],h=fe("section",{blocks:[],noHeader:!0}),f=[],c=new ed;A(t,function(m){A(m.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!S||x==null)){var b=EM(x,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),w=fe("section",{header:b,noHeader:!Tr(b),sortBlocks:!0,blocks:[]});h.blocks.push(w),A(_.seriesDataIndices,function(T){var C=a.getSeriesByIndex(T.seriesIndex),D=T.dataIndexInside,M=C.getDataParams(D);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=Nd(S.axis,{value:x}),M.axisValueLabel=b,M.marker=c.makeTooltipMarker("item",ni(M.color),l);var I=cx(C.formatTooltip(D,!0,null)),L=I.frag;if(L){var E=$l([C],i).get("valueFormatter");w.blocks.push(E?B({valueFormatter:E},L):L)}I.text&&f.push(I.text),u.push(M)}})}})}),h.blocks.reverse(),f.reverse();var v=n.position,p=s.get("order"),d=Lx(h,c,l,p,a.get("useUTC"),s.get("textStyle"));d&&f.unshift(d);var g=l==="richText"?`

`:"<br/>",y=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,c)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=st(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,f=o.dataType,c=u.getData(f),v=this._renderMode,p=t.positionDefault,d=$l([c.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(h,f),m=new ed;y.marker=m.makeTooltipMarker("item",ni(y.color),v);var _=cx(u.formatTooltip(h,!1,f)),S=d.get("order"),x=d.get("valueFormatter"),b=_.frag,w=b?Lx(x?B({valueFormatter:x},b):b,m,v,S,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+h;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),a({type:"showTip",dataIndexInside:h,dataIndex:c.getRawIndex(h),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=this._renderMode==="html",o=st(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(U(l)){var h=l;l={content:h,formatter:h},u=!0}u&&i&&l.content&&(l=at(l),l.content=Pe(l.content));var f=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&f.push(c),f.push({formatter:l.content});var v=t.positionDefault,p=$l(f,this._tooltipModel,v?{position:v}:null),d=p.get("content"),g=Math.random()+"",y=new ed;this._showOrMove(p,function(){var m=at(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,t.offsetX,t.offsetY,t.position,n,y)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,h){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var c=t.get("formatter");l=l||t.get("position");var v=n,p=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor")),d=p.color;if(c)if(U(c)){var g=t.ecModel.get("useUTC"),y=z(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=mh(y.axisValue,v,g)),v=LS(v,a,!0)}else if(j(c)){var _=Z(function(S,x){S===this._ticket&&(f.setContent(x,h,t,d,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,v=c(a,i,_)}else v=c;f.setContent(v,h,t,d,l),f.show(t,d),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i){if(a==="axis"||z(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!z(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),c=t.get("align"),v=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),j(n)&&(n=n([a,i],s,o.el,p,{viewSize:[u,h],contentSize:f.slice()})),z(n))a=W(n[0],u),i=W(n[1],h);else if(J(n)){var d=n;d.width=f[0],d.height=f[1];var g=se(d,{width:u,height:h});a=g.x,i=g.y,c=null,v=null}else if(U(n)&&l){var y=f9(n,p,f,t.get("borderWidth"));a=y[0],i=y[1]}else{var y=u9(a,i,o,u,h,c?null:20,v?null:20);a=y[0],i=y[1]}if(c&&(a-=k2(c)?f[0]/2:c==="right"?f[0]:0),v&&(i-=k2(v)?f[1]/2:v==="bottom"?f[1]:0),T2(t)){var y=h9(a,i,o,u,h);a=y[0],i=y[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&A(a,function(s,l){var u=s.dataByAxis||[],h=t[l]||{},f=h.dataByAxis||[];o=o&&u.length===f.length,o&&A(u,function(c,v){var p=f[v]||{},d=c.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&c.value===p.value&&c.axisType===p.axisType&&c.axisId===p.axisId&&d.length===g.length,o&&A(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&A(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){mt.node||!n.getDom()||(Ks(this,"_updatePosition"),this._tooltipContent.dispose(),tm("itemTooltip",n))},e.type="tooltip",e}(Yt);function $l(r,e,t){var n=e.ecModel,a;t?(a=new Lt(t,n,n),a=new Lt(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Lt&&(o=o.get("tooltip",!0)),U(o)&&(o={formatter:o}),o&&(a=new Lt(o,a,n)))}return a}function P2(r,e){return r.dispatchAction||Z(e.dispatchAction,e)}function u9(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function h9(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function f9(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,h=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+h/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+h+o;break;case"left":s=e.x-a-o,l=e.y+h/2-i/2;break;case"right":s=e.x+u+o,l=e.y+h/2-i/2}return[s,l]}function k2(r){return r==="center"||r==="middle"}function c9(r,e,t){var n=Rv(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=ws(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=st(u).tooltipConfig;if(h&&h.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function v9(r){gt(Hl),r.registerComponentModel(q7),r.registerComponentView(l9),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Qt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Qt)}var p9=["rect","polygon","keep","clear"];function d9(r,e){var t=Pt(r?r.brush:[]);if(t.length){var n=[];A(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;z(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),g9(s),e&&!s.length&&s.push.apply(s,p9)}}function g9(r){var e={};A(r,function(t){e[t]=1}),r.length=0,A(e,function(t,n){r.push(n)})}var R2=A;function N2(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function _m(r,e,t){var n={};return R2(e,function(i){var o=n[i]=a();R2(r[i],function(s,l){if(ve.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new ve(u),l==="opacity"&&(u=at(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ve(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function O2(r,e,t){var n;A(t,function(a){e.hasOwnProperty(a)&&N2(e[a])&&(n=!0)}),n&&A(t,function(a){e.hasOwnProperty(a)&&N2(e[a])?r[a]=at(e[a]):delete r[a]})}function y9(r,e,t,n,a,i){var o={};A(r,function(f){var c=ve.prepareVisualTypes(e[f]);o[f]=c});var s;function l(f){return id(t,s,f)}function u(f,c){eb(t,s,f,c)}t.each(h);function h(f,c){s=f;var v=t.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=n.call(a,f),d=e[p],g=o[p],y=0,m=g.length;y<m;y++){var _=g[y];d[_]&&d[_].applyVisual(f,l,u)}}}function m9(r,e,t,n){var a={};return A(r,function(i){var o=ve.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(x){return id(s,f,x)}function h(x,b){eb(s,f,x,b)}for(var f,c=s.getStore();(f=o.next())!=null;){var v=s.getRawDataItem(f);if(!(v&&v.visualMap===!1))for(var p=n!=null?c.get(l,f):f,d=t(p),g=e[d],y=a[d],m=0,_=y.length;m<_;m++){var S=y[m];g[S]&&g[S].applyVisual(p,u,h)}}}}}function _9(r){var e=r.brushType,t={point:function(n){return V2[e].point(n,t,r)},rect:function(n){return V2[e].rect(n,t,r)}};return t}var V2={lineX:B2(0),lineY:B2(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&di(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var a=r.x,i=r.y,o=r.width,s=r.height,l=n[0];if(di(n,a,i)||di(n,a+o,i)||di(n,a,i+s)||di(n,a+o,i+s)||vt.create(r).contain(l[0],l[1])||zs(a,i,a+o,i,n)||zs(a,i,a,i+s,n)||zs(a+o,i,a+o,i+s,n)||zs(a,i+s,a+o,i+s,n))return!0}}};function B2(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return Ul(s,o)}},rect:function(n,a,i){if(n){var o=i.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),Ul(s[0],o)||Ul(s[1],o)||Ul(o[0],s)||Ul(o[1],s)}}}}function Ul(r,e){return e[0]<=r&&r<=e[1]}var z2=["inBrush","outOfBrush"],Sm="__ecBrushSelect",xm="__ecInBrushSelectEvent";function G2(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new vm(e.option,r);t.setInputRanges(e.areas,r)})}function S9(r,e,t){var n=[],a,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),G2(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:at(o.areas),selected:[]};n.push(l);var u=o.option,h=u.brushLink,f=[],c=[],v=[],p=!1;s||(a=u.throttleType,i=u.throttleDelay);var d=G(o.areas,function(x){var b=T9[x.brushType],w=rt({boundingRect:b?b(x):void 0},x);return w.selectors=_9(w),w}),g=_m(o.option,z2,function(x){x.mappingMethod="fixed"});z(h)&&A(h,function(x){f[x]=1});function y(x){return h==="all"||!!f[x]}function m(x){return!!x.length}r.eachSeries(function(x,b){var w=v[b]=[];x.subType==="parallel"?_(x,b):S(x,b,w)});function _(x,b){var w=x.coordinateSystem;p=p||w.hasAxisBrushed(),y(b)&&w.eachActiveState(x.getData(),function(T,C){T==="active"&&(c[C]=1)})}function S(x,b,w){if(!(!x.brushSelector||w9(o,b))&&(A(d,function(C){o.brushTargetManager.controlSeries(C,x,r)&&w.push(C),p=p||m(w)}),y(b)&&m(w))){var T=x.getData();T.each(function(C){F2(x,w,T,C)&&(c[C]=1)})}}r.eachSeries(function(x,b){var w={seriesId:x.id,seriesIndex:b,seriesName:x.name,dataIndex:[]};l.selected.push(w);var T=v[b],C=x.getData(),D=y(b)?function(M){return c[M]?(w.dataIndex.push(C.getRawIndex(M)),"inBrush"):"outOfBrush"}:function(M){return F2(x,T,C,M)?(w.dataIndex.push(C.getRawIndex(M)),"inBrush"):"outOfBrush"};(y(b)?p:m(T))&&y9(z2,g,C,D)})}),x9(e,a,i,n,t)}function x9(r,e,t,n,a){if(a){var i=r.getZr();if(!i[xm]){i[Sm]||(i[Sm]=b9);var o=So(i,Sm,t,e);o(r,n)}}}function b9(r,e){if(!r.isDisposed()){var t=r.getZr();t[xm]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[xm]=!1}}function F2(r,e,t,n){for(var a=0,i=e.length;a<i;a++){var o=e[a];if(r.brushSelector(n,t,o.selectors,o))return!0}}function w9(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(z(t)?dt(t,e)<0:e!==t)}var T9={rect:function(r){return H2(r.range)},polygon:function(r){for(var e,t=r.range,n=0,a=t.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[n];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&H2(e)}};function H2(r){return new vt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var C9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new vy(n.getZr())).on("brush",Z(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){G2(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:at(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:at(a),$from:n})},e.type="brush",e}(Yt),D9="#ddd",A9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&O2(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:D9},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){process.env.NODE_ENV!=="production"&&(tt(z(t)),A(t,function(n){tt(n.brushType,"Illegal areas")})),t&&(this.areas=G(t,function(n){return W2(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=W2(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(St);function W2(r,e){return ft({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Lt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var M9=["rect","polygon","lineX","lineY","keep","clear"],I9=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,A(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return A(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:M9.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(br);function L9(r){r.registerComponentView(C9),r.registerComponentModel(A9),r.registerPreprocessor(d9),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,S9),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Qt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Qt),$o("brush",I9)}var E9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(St),P9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=ot(t.get("textBaseline"),t.get("textVerticalAlign")),h=new Tt({style:zt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=h.getBoundingRect(),c=t.get("subtext"),v=new Tt({style:zt(s,{text:c,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);h.silent=!p&&!g,v.silent=!d&&!g,p&&h.on("click",function(){wh(p,"_"+t.get("target"))}),d&&v.on("click",function(){wh(d,"_"+t.get("subtarget"))}),st(h).eventData=st(v).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(h),c&&i.add(v);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=se(m,{width:a.getWidth(),height:a.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:l,verticalAlign:u};h.setStyle(S),v.setStyle(S),y=i.getBoundingRect();var x=_.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var w=new wt({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:t.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(w)}},e.type="title",e}(Yt);function k9(r){r.registerComponentModel(E9),r.registerComponentView(P9)}var $2=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],A(n,function(u,h){var f=oe(Xi(u),""),c;J(u)?(c=at(u),c.value=h):c=h,o.push(c),i.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new ze([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(St),U2=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=ta($2.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}($2);te(U2,Ih.prototype);var R9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Yt),N9=function(r){O(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Nr),bm=Math.PI,Y2=bt(),O9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return fe("nameValue",{noName:!0,value:h})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var a=t.get(["label","position"]),i=t.get("orient"),o=B9(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":U(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:bm/2},f=i==="vertical"?o.height:o.width,c=t.getModel("controlStyle"),v=c.get("show",!0),p=v?c.get("itemSize"):0,d=v?c.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*bm/180;var m,_,S,x=c.get("position",!0),b=v&&c.get("showPlayBtn",!0),w=v&&c.get("showPrevBtn",!0),T=v&&c.get("showNextBtn",!0),C=0,D=f;x==="left"||x==="bottom"?(b&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(S=[D-p,0],D-=g)):(b&&(m=[D-p,0],D-=g),w&&(_=[0,0],C+=g),T&&(S=[D-p,0],D-=g));var M=[C,D];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:h[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:M,controlSize:p,controlGap:d}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=qe(),l=o.x,u=o.y+o.height;Fr(s,s,[-l,-u]),Aa(s,s,-bm/2),Fr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=m(o),f=m(a.getBoundingRect()),c=m(i.getBoundingRect()),v=[a.x,a.y],p=[i.x,i.y];p[0]=v[0]=h[0][0];var d=t.labelPosOpt;if(d==null||U(d)){var g=d==="+"?0:1;_(v,f,h,1,g),_(p,c,h,1,1-g)}else{var g=d>=0?0:1;_(v,f,h,1,g),p[1]=v[1]+d}a.setPosition(v),i.setPosition(p),a.rotation=i.rotation=t.rotation,y(a),y(i);function y(S){S.originX=h[0][0]-S.x,S.originY=h[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,x,b,w,T){S[w]+=b[w][T]-x[w][T]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=V9(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new N9("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new it;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var s=new ue({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:B({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new ue({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:rt({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],A(l,function(u){var h=a.dataToCoord(u.value),f=s.getItemModel(u.value),c=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),d={x:h,y:0,onclick:Z(o._changeTimeline,o,u.value)},g=Z2(f,c,n,d);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),qa(g);var y=st(g);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],A(u,function(h){var f=h.tickValue,c=l.getItemModel(f),v=c.getModel("label"),p=c.getModel(["emphasis","label"]),d=c.getModel(["progress","label"]),g=a.dataToCoord(h.tickValue),y=new Tt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:Z(o._changeTimeline,o,f),silent:!1,style:zt(v,{text:h.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=zt(p),y.ensureState("progress").style=zt(d),n.add(y),qa(y),Y2(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),h=i.getPlayState(),f=i.get("inverse",!0);c(t.nextBtnPosition,"next",Z(this._changeTimeline,this,f?"-":"+")),c(t.prevBtnPosition,"prev",Z(this._changeTimeline,this,f?"+":"-")),c(t.playPosition,h?"stop":"play",Z(this._handlePlayClick,this,!h),!0);function c(v,p,d,g){if(v){var y=Ar(ot(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=z9(i,p+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,n.add(_),qa(_)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(f){f.draggable=!0,f.drift=Z(u._handlePointerDrag,u),f.ondragend=Z(u._handlePointerDragend,u),X2(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){X2(f,u._progressLine,s,a,i)}};this._currentPointer=Z2(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=sr(i.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return Pr(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),a=1/0,i,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),h=Math.abs(u-t);h<a&&(a=h,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,a=this._tickLabels;if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",i<t);if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",Y2(a[i]).dataIndex<=t)},e.type="timeline.slider",e}(R9);function V9(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Jh({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new kd({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Ln}}function B9(r,e){return se(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function z9(r,e,t,n){var a=n.style,i=Bs(r.get(["controlStyle",e]),n||{},new vt(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function Z2(r,e,t,n,a,i){var o=e.get("color");if(a)a.setColor(o),t.add(a),i&&i.onUpdate(a);else{var s=r.get("symbol");a=ie(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),i&&i.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),n=ft({rectHover:!0,z2:100},n,!0);var u=bo(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var h=hi(r.get("symbolOffset"),u);h&&(n.x=(n.x||0)+h[0],n.y=(n.y||0)+h[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function X2(r,e,t,n,a,i){if(!r.dragging){var o=a.getModel("checkpointStyle"),s=n.dataToCoord(a.getData().get("value",t));if(i||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function G9(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),rt({currentIndex:a.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function F9(r){var e=r&&r.timeline;z(e)||(e=e?[e]:[]),A(e,function(t){t&&H9(t)})}function H9(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),q2(r),Ni(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});Ni(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!Ni(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}A(r.data||[],function(a){J(a)&&!z(a)&&(!Ni(a,"value")&&Ni(a,"name")&&(a.value=a.name),q2(a))})}function q2(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},a=n.normal||(n.normal={}),i={normal:1,emphasis:1};A(n,function(o,s){!i[s]&&!Ni(a,s)&&(a[s]=o)}),t.label&&!Ni(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function Ni(r,e){return r.hasOwnProperty(e)}function W9(r){r.registerComponentModel(U2),r.registerComponentView(O9),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),G9(r),r.registerPreprocessor(F9)}function wm(r,e){if(!r)return!1;for(var t=z(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function ec(r){Na(r,"label",["show"])}var rc=bt(),On=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,n,a){if(process.env.NODE_ENV!=="production"&&this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(mt.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,a,i){var o=this.mainType;a||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=rc(s)[o];if(!l||!l.data){rc(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&ec(l),A(l.data,function(h){h instanceof Array?(ec(h[0]),ec(h[1])):ec(h)}),u=this.createMarkerModelFromSeries(l,this,n),B(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),rc(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return fe("section",{header:this.name,blocks:[fe("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,n){var a=Ih.prototype.getDataParams.call(this,t,n),i=this.__hostSeries;return i&&(a.seriesId=i.id,a.seriesName=i.name,a.seriesType=i.subType),a},e.getMarkerModelFromSeries=function(t,n){return rc(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(St);te(On,Ih.prototype);var $9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(On);function Tm(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function U9(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function nc(r,e,t,n,a,i){var o=[],s=sa(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=Dm(e,l,r),h=e.indicesOfNearest(l,u)[0];o[a]=e.get(t,h),o[i]=e.get(l,h);var f=e.get(n,h),c=Ur(e.get(n,h));return c=Math.min(c,20),c>=0&&(o[i]=+o[i].toFixed(c)),[o,f]}var Cm={min:ht(nc,"min"),max:ht(nc,"max"),average:ht(nc,"average"),median:ht(nc,"median")};function Yl(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!U9(e)&&!z(e.coord)&&z(a)){var i=K2(e,t,n,r);if(e=at(e),e.type&&Cm[e.type]&&i.baseAxis&&i.valueAxis){var o=dt(a,i.baseAxis.dim),s=dt(a,i.valueAxis.dim),l=Cm[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!z(a))e.coord=[];else for(var u=e.coord,h=0;h<2;h++)Cm[u[h]]&&(u[h]=Dm(t,t.mapDimension(a[h]),u[h]));return e}}function K2(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(Y9(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function Y9(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Zl(r,e){return r&&r.containData&&e.coord&&!Tm(e)?r.containData(e.coord):!0}function Z9(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Tm(e)&&!Tm(t)?r.containZone(e.coord,t.coord):!0}function j2(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return na(o,e[i])}:function(t,n,a,i){return na(t.value,e[i])}}function Dm(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Am=bt(),Mm=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=q()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){Am(s).keep=!1}),n.eachSeries(function(s){var l=On.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!Am(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Am(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;A(t,function(i){var o=On.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?A1(l):ip(l))})}})},e.type="marker",e}(Yt);function Q2(r,e,t){var n=e.coordinateSystem;r.each(function(a){var i=r.getItemModel(a),o,s=W(i.get("x"),t.getWidth()),l=W(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,a));else if(n){var u=r.get(n.dimensions[0],a),h=r.get(n.dimensions[1],a);o=n.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(a,o)})}var X9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=On.getMarkerModelFromSeries(i,"markPoint");o&&(Q2(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new ml),f=q9(o,t,n);n.setData(f),Q2(n.getData(),t,i),f.each(function(c){var v=f.getItemModel(c),p=v.getShallow("symbol"),d=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),m=v.getShallow("symbolKeepAspect");if(j(p)||j(d)||j(g)||j(y)){var _=n.getRawValue(c),S=n.getDataParams(c);j(p)&&(p=p(_,S)),j(d)&&(d=d(_,S)),j(g)&&(g=g(_,S)),j(y)&&(y=y(_,S))}var x=v.getModel("itemStyle").getItemStyle(),b=Js(l,"color");x.fill||(x.fill=b),f.setItemVisual(c,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:x})}),h.updateData(f),this.group.add(h.group),f.eachItemGraphicEl(function(c){c.traverse(function(v){st(v).dataModel=n})}),this.markKeep(h),h.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(Mm);function q9(r,e,t){var n;r?n=G(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return B(B({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new ze(n,t),i=G(t.get("data"),ht(Yl,e));r&&(i=At(i,ht(Zl,r)));var o=j2(!!r,n);return a.initData(i,null,o),a}function K9(r){r.registerComponentModel($9),r.registerComponentView(X9),r.registerPreprocessor(function(e){wm(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var j9=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(On),ac=bt(),Q9=function(r,e,t,n){var a=r.getData(),i;if(z(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=ee(n.yAxis,n.xAxis);else{var u=K2(n,a,e,r);s=u.valueAxis;var h=tw(a,u.valueDataDim);l=Dm(a,h,o)}var f=s.dim==="x"?0:1,c=1-f,v=at(n),p={coord:[]};v.type=null,v.coord=[],v.coord[c]=-1/0,p.coord[c]=1/0;var d=t.get("precision");d>=0&&Ct(l)&&(l=+l.toFixed(Math.min(d,20))),v.coord[f]=p.coord[f]=l,i=[v,p,{type:o,valueIndex:n.valueIndex,value:l}]}else process.env.NODE_ENV!=="production"&&wr("Invalid markLine data."),i=[]}var g=[Yl(r,i[0]),Yl(r,i[1]),B({},i[2])];return g[2].type=g[2].type||null,ft(g[2],g[0]),ft(g[2],g[1]),g};function ic(r){return!isNaN(r)&&!isFinite(r)}function J2(r,e,t,n){var a=1-r,i=n.dimensions[r];return ic(e[a])&&ic(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function J9(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(J2(1,t,n,r)||J2(0,t,n,r)))return!0}return Zl(r,e[0])&&Zl(r,e[1])}function Im(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=W(o.get("x"),a.getWidth()),u=W(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var h=i.dimensions,f=r.get(h[0],e),c=r.get(h[1],e);s=i.dataToPoint([f,c])}if(bi(i,"cartesian2d")){var v=i.getAxis("x"),p=i.getAxis("y"),h=i.dimensions;ic(r.get(h[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[t?0:1]):ic(r.get(h[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var t$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=On.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=ac(o).from,u=ac(o).to;l.each(function(h){Im(l,h,!0,i,a),Im(u,h,!1,i,a)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new ey);this.group.add(h.group);var f=e$(o,t,n),c=f.from,v=f.to,p=f.line;ac(n).from=c,ac(n).to=v,n.setData(p);var d=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");z(d)||(d=[d,d]),z(g)||(g=[g,g]),z(y)||(y=[y,y]),z(m)||(m=[m,m]),f.from.each(function(S){_(c,S,!0),_(v,S,!1)}),p.each(function(S){var x=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[c.getItemLayout(S),v.getItemLayout(S)]),x.stroke==null&&(x.stroke=c.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(S,"symbolOffset"),fromSymbolRotate:c.getItemVisual(S,"symbolRotate"),fromSymbolSize:c.getItemVisual(S,"symbolSize"),fromSymbol:c.getItemVisual(S,"symbol"),toSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(S,"symbolOffset"),toSymbolRotate:v.getItemVisual(S,"symbolRotate"),toSymbolSize:v.getItemVisual(S,"symbolSize"),toSymbol:v.getItemVisual(S,"symbol"),style:x})}),h.updateData(p),f.line.eachItemGraphicEl(function(S){st(S).dataModel=n,S.traverse(function(x){st(x).dataModel=n})});function _(S,x,b){var w=S.getItemModel(x);Im(S,x,b,t,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Js(l,"color")),S.setItemVisual(x,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:ot(w.get("symbolOffset",!0),m[b?0:1]),symbolRotate:ot(w.get("symbolRotate",!0),y[b?0:1]),symbolSize:ot(w.get("symbolSize"),g[b?0:1]),symbol:ot(w.get("symbol",!0),d[b?0:1]),style:T})}this.markKeep(h),h.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(Mm);function e$(r,e,t){var n;r?n=G(r&&r.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return B(B({},h),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new ze(n,t),i=new ze(n,t),o=new ze([],t),s=G(t.get("data"),ht(Q9,e,r,t));r&&(s=At(s,ht(J9,r)));var l=j2(!!r,n);return a.initData(G(s,function(u){return u[0]}),null,l),i.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function r$(r){r.registerComponentModel(j9),r.registerComponentView(t$),r.registerPreprocessor(function(e){wm(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var n$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(On),oc=bt(),a$=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=Yl(r,a),s=Yl(r,i),l=o.coord,u=s.coord;l[0]=ee(l[0],-1/0),l[1]=ee(l[1],-1/0),u[0]=ee(u[0],1/0),u[1]=ee(u[1],1/0);var h=Ec([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function sc(r){return!isNaN(r)&&!isFinite(r)}function tI(r,e,t,n){var a=1-r;return sc(e[a])&&sc(t[a])}function i$(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return bi(r,"cartesian2d")?t&&n&&(tI(1,t,n)||tI(0,t,n))?!0:Z9(r,a,i):Zl(r,a)||Zl(r,i)}function eI(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=W(o.get(t[0]),a.getWidth()),u=W(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var h=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),c=i.clampData(h),v=i.clampData(f),p=[];t[0]==="x0"?p[0]=c[0]>v[0]?f[0]:h[0]:p[0]=c[0]>v[0]?h[0]:f[0],t[1]==="y0"?p[1]=c[1]>v[1]?f[1]:h[1]:p[1]=c[1]>v[1]?h[1]:f[1],s=n.getMarkerPosition(p,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(bi(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);sc(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):sc(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var rI=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],o$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=On.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(rI,function(f){return eI(s,l,f,i,a)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new it});this.group.add(h.group),this.markKeep(h);var f=s$(o,t,n);n.setData(f),f.each(function(c){var v=G(rI,function(T){return eI(f,c,T,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(f.get("x0",c)),p.parse(f.get("x1",c))],_=[d.parse(f.get("y0",c)),d.parse(f.get("y1",c))];sr(m),sr(_);var S=!(g[0]>m[1]||g[1]<m[0]||y[0]>_[1]||y[1]<_[0]),x=!S;f.setItemLayout(c,{points:v,allClipped:x});var b=f.getItemModel(c).getModel("itemStyle").getItemStyle(),w=Js(l,"color");b.fill||(b.fill=w,U(b.fill)&&(b.fill=Tu(b.fill,.4))),b.stroke||(b.stroke=w),f.setItemVisual(c,"style",b)}),f.diff(oc(h).data).add(function(c){var v=f.getItemLayout(c);if(!v.allClipped){var p=new Ve({shape:{points:v.points}});f.setItemGraphicEl(c,p),h.group.add(p)}}).update(function(c,v){var p=oc(h).data.getItemGraphicEl(v),d=f.getItemLayout(c);d.allClipped?p&&h.group.remove(p):(p?Dt(p,{shape:{points:d.points}},n,c):p=new Ve({shape:{points:d.points}}),f.setItemGraphicEl(c,p),h.group.add(p))}).remove(function(c){var v=oc(h).data.getItemGraphicEl(c);h.group.remove(v)}).execute(),f.eachItemGraphicEl(function(c,v){var p=f.getItemModel(v),d=f.getItemVisual(v,"style");c.useStyle(f.getItemVisual(v,"style")),Se(c,he(p),{labelFetcher:n,labelDataIndex:v,defaultText:f.getName(v)||"",inheritColor:U(d.fill)?Tu(d.fill,1):"#000"}),_e(c,p),qt(c,null,null,p.get(["emphasis","disabled"])),st(c).dataModel=n}),oc(h).data=f,h.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(Mm);function s$(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=G(r&&r.dimensions,function(u){var h=e.getData(),f=h.getDimensionInfo(h.mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})});a=G(i,function(u,h){return{name:u,type:o[h%2].type}}),n=new ze(a,t)}else a=[{name:"value",type:"float"}],n=new ze(a,t);var s=G(t.get("data"),ht(a$,e,r,t));r&&(s=At(s,ht(i$,r)));var l=r?function(u,h,f,c){var v=u.coord[Math.floor(c/2)][c%2];return na(v,a[c])}:function(u,h,f,c){return na(u.value,a[c])};return n.initData(s,null,l),n.hasItemOption=!0,n}function l$(r){r.registerComponentModel(n$),r.registerComponentView(o$),r.registerPreprocessor(function(e){wm(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var u$=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Lm=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),z(n)&&A(n,function(i,o){U(i)&&(i={type:i}),n[o]=ft(i,u$(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<t.length;a++){var i=t[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],a=[];t.eachRawSeries(function(l){var u=l.name;a.push(u);var h;if(l.legendVisualProvider){var f=l.legendVisualProvider,c=f.getAllNames();t.isSeriesFiltered(l)||(a=a.concat(c)),c.length?n=n.concat(c):h=!0}else h=!0;h&&kv(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=q(),s=G(i,function(l){return(U(l)||Ct(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Lt(l,this,this.ecModel))},this);this._data=At(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;A(i,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;A(t,function(a){n[a.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;A(t,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&dt(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(St),Yo=ht,Em=A,lc=it,nI=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new lc),this.group.add(this._selectorGroup=new lc),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var h=t.getBoxLayoutParams(),f={width:a.getWidth(),height:a.getHeight()},c=t.get("padding"),v=se(h,f,c),p=this.layoutInner(t,o,v,i,l,u),d=se(rt({width:p.width,height:p.height},h),f,c);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=c2(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),h=q(),f=n.get("selectedMode"),c=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Em(n.getData(),function(v,p){var d=v.get("name");if(!this.newlineDisabled&&(d===""||d===`
`)){var g=new lc;g.newline=!0,u.add(g);return}var y=a.getSeriesByName(d)[0];if(!h.get(d)){if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),x=m.getVisual("style"),b=this._createItem(y,d,p,v,n,t,_,x,S,f,i);b.on("click",Yo(aI,d,null,i,c)).on("mouseover",Yo(Pm,y.name,null,i,c)).on("mouseout",Yo(km,y.name,null,i,c)),a.ssr&&b.eachChild(function(w){var T=st(w);T.seriesIndex=y.seriesIndex,T.dataIndex=p,T.ssrType="legend"}),h.set(d,!0)}else a.eachRawSeries(function(w){if(!h.get(d)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(d))return;var C=T.indexOfName(d),D=T.getItemVisual(C,"style"),M=T.getItemVisual(C,"legendIcon"),I=Ke(D.fill);I&&I[3]===0&&(I[3]=.2,D=B(B({},D),{fill:gn(I,"rgba")}));var L=this._createItem(w,d,p,v,n,t,{},D,M,f,i);L.on("click",Yo(aI,null,d,i,c)).on("mouseover",Yo(Pm,null,d,i,c)).on("mouseout",Yo(km,null,d,i,c)),a.ssr&&L.eachChild(function(E){var P=st(E);P.seriesIndex=w.seriesIndex,P.dataIndex=p,P.ssrType="legend"}),h.set(d,!0)}},this);process.env.NODE_ENV!=="production"&&(h.get(d)||console.warn(d+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,i,s,l)},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();Em(t,function(u){var h=u.type,f=new Tt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Se(f,{normal:c,emphasis:v},{defaultText:u.title}),qa(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,h,f,c){var v=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");h=_||h||"roundRect";var S=h$(h,i,l,u,v,g,c),x=new lc,b=i.getModel("textStyle");if(j(t.getLegendIcon)&&(!_||_==="inherit"))x.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:h,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;x.add(f$({itemWidth:p,itemHeight:d,icon:h,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,C=s,D=o.get("formatter"),M=n;U(D)&&D?M=D.replace("{name}",n??""):j(D)&&(M=D(n));var I=g?b.getTextColor():i.get("inactiveColor");x.add(new Tt({style:zt(b,{text:M,x:T,y:d/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new wt({shape:x.getBoundingRect(),style:{fill:"transparent"}}),E=i.getModel("tooltip");return E.get("show")&&ei({el:L,componentModel:o,itemName:n,itemTooltipOption:E.option}),x.add(L),x.eachChild(function(P){P.silent=!0}),L.silent=!f,this.getContentGroup().add(x),qa(x),x.__legendDataIndex=a,x},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ii(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var h=l.getBoundingRect(),f=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){ii("horizontal",u,t.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?v[d]+=h[g]+p:f[d]+=c[g]+p,v[1-d]+=h[y]/2-c[y]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=h[g]+p+c[g],_[y]=Math.max(h[y],c[y]),_[m]=Math.min(0,c[m]+v[1-d]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Yt);function h$(r,e,t,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Em(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:To(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[h]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var c=e.getModel("lineStyle"),v=c.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[h];u.lineWidth=p==="auto"?n.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function f$(r){var e=r.icon||"roundRect",t=ie(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function aI(r,e,t,n){km(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Pm(r,e,t,n)}function iI(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;n<a&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function Pm(r,e,t,n){iI(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function km(r,e,t,n){iI(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}function c$(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function Xl(r,e,t){var n=r==="allSelect"||r==="inverseSelect",a={},i=[];t.eachComponent({mainType:"legend",query:e},function(s){n?s[r]():s[r](e.name),oI(s,a),i.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){A(a,function(l,u){s[l?"select":"unSelect"](u)}),oI(s,o)}),n?{selected:o,legendIndex:i}:{name:e.name,selected:o}}function oI(r,e){var t=e||{};return A(r.getData(),function(n){var a=n.get("name");if(!(a===`
`||a==="")){var i=r.isSelected(a);X(t,a)?t[a]=t[a]&&i:t[a]=i}}),t}function v$(r){r.registerAction("legendToggleSelect","legendselectchanged",ht(Xl,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",ht(Xl,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",ht(Xl,"inverseSelect")),r.registerAction("legendSelect","legendselected",ht(Xl,"select")),r.registerAction("legendUnSelect","legendunselected",ht(Xl,"unSelect"))}function sI(r){r.registerComponentModel(Lm),r.registerComponentView(nI),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,c$),r.registerSubTypeDefaulter("legend",function(){return"plain"}),v$(r)}var p$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,a){var i=fo(t);r.prototype.init.call(this,t,n,a),lI(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),lI(this,this.option,t)},e.type="legend.scroll",e.defaultOption=ta(Lm.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(Lm);function lI(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,ra(e,t,{type:"box",ignoreSize:!!a})}var uI=it,Rm=["width","height"],Nm=["x","y"],d$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new uI),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new uI)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var h=this._controllerGroup,f=n.get("pageIconSize",!0),c=z(f)?f:[f,f];p("pagePrev",0);var v=n.getModel("pageTextStyle");h.add(new Tt({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(d,g){var y=d+"DataIndex",m=Bs(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:Z(u._pageGo,u,y,n,i)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});m.name=d,h.add(m)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,h=Rm[u],f=Nm[u],c=Rm[1-u],v=Nm[1-u];o&&ii("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),d=l.getBoundingRect(),g=[-d.x,-d.y],y=at(a);o&&(y[h]=a[h]-d[h]-p);var m=this._layoutContentAndController(t,i,y,u,h,c,v,f);if(o){if(s==="end")g[u]+=m[h]+p;else{var _=d[h]+p;g[u]-=_,m[f]-=_}m[h]+=d[h]+p,g[1-u]+=m[v]+m[c]/2-d[c]/2,m[c]=Math.max(m[c],d[c]),m[v]=Math.min(m[v],d[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var h=this.getContentGroup(),f=this._containerGroup,c=this._controllerGroup;ii(t.get("orient"),h,t.get("itemGap"),i?a.width:null,i?null:a.height),ii("horizontal",c,t.get("pageButtonItemGap",!0));var v=h.getBoundingRect(),p=c.getBoundingRect(),d=this._showController=v[o]>a[o],g=[-v.x,-v.y];n||(g[i]=h[u]);var y=[0,0],m=[-p.x,-p.y],_=ot(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[i]+=a[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=v[s]/2-p[s]/2,h.setPosition(g),f.setPosition(y),c.setPosition(m);var x={x:0,y:0};if(x[o]=d?a[o]:v[o],x[s]=Math.max(v[s],p[s]),x[l]=Math.min(0,p[l]+m[1-i]),f.__rectSize=a[o],d){var b={x:0,y:0};b[o]=Math.max(a[o]-p[o]-_,0),b[s]=x[s],f.setClipPath(new wt({shape:b})),f.__rectSize=b[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Dt(h,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),x},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;A(["pagePrev","pageNext"],function(h){var f=h+"DataIndex",c=n[f]!=null,v=a.childOfName(h);v&&(v.setStyle("fill",c?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",U(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=Rm[o],l=Nm[o],u=this._findTargetItemIndex(n),h=a.children(),f=h[u],c=h.length,v=c?1:0,p={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var d=S(f);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=c;++g)_=S(h[g]),(!_&&m.e>y.s+i||_&&!x(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(h[g]),(!_||!x(m,_.s))&&y.i<m.i&&(m=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=_;return p;function S(b){if(b){var w=b.getBoundingRect(),T=w[l]+b[l];return{s:T,e:T+w[s],i:b.__legendDataIndex}}}function x(b,w){return b.e>=w&&b.s<=w+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n??i},e.type="legend.scroll",e}(nI);function g$(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function y$(r){gt(sI),r.registerComponentModel(p$),r.registerComponentView(d$),g$(r)}function m$(r){gt(sI),gt(y$)}var _$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=ta(Wl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Wl),Om=bt();function S$(r,e,t){Om(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function x$(r,e){for(var t=Om(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||hI(t,o))}}}function hI(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function b$(r,e){var t={model:e,containsPoint:ht(T$,e),dispatchAction:ht(w$,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Dl(r.getZr());return A(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function w$(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function T$(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function C$(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return r.each(function(i){var o=i.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function D$(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Om(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=q());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=o2(i);A(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,b$(t,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());h.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){hI(a,i);return}var h=C$(l);o.enable(h.controlType,h.opt),o.setPointerChecker(i.containsPoint),So(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var A$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),S$(a,t,{pan:Z(Vm.pan,this),zoom:Z(Vm.zoom,this),scrollMove:Z(Vm.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){x$(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(um),Vm={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=Bm[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Li(0,i,[0,100],0,h.minSpan,h.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:fI(function(r,e,t,n,a,i){var o=Bm[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:fI(function(r,e,t,n,a,i){var o=Bm[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function fI(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,a);if(Li(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Bm={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function cI(r){hm(r),r.registerComponentModel(_$),r.registerComponentView(A$),D$(r)}var M$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ta(Wl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Wl),ql=wt,vI=7,I$=1,zm=30,L$=7,Kl="horizontal",pI="vertical",E$=5,P$=["line","bar","candlestick","scatter"],k$={easing:"cubicOut",duration:100,delay:0},R$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),So(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Ks(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new it;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?L$:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Kl?{right:s.width-o.x-o.width,top:s.height-zm-vI-i,width:o.width,height:zm}:{right:vI,top:o.y,width:zm,height:o.height},u=fo(t.option);A(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var h=se(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===pI&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===Kl&&!o?{scaleY:l?1:-1,scaleX:1}:a===Kl&&o?{scaleY:l?1:-1,scaleX:-1}:a===pI&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new ql({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ql({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(l),c=(f[1]-f[0])*.3;f=[f[0]-c,f[1]+c];var v=[0,n[1]],p=[0,n[0]],d=[[n[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),S;o.each([l],function(C,D){if(_>0&&D%_){m+=y;return}var M=C==null||isNaN(C)||C==="",I=M?0:It(C,f,v,!0);M&&!S&&D?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&S&&(d.push([m,0]),g.push([m,0])),d.push([m,I]),g.push([m,I]),m+=y,S=M}),u=this._shadowPolygonPts=d,h=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var x=this.dataZoomModel;function b(C){var D=x.getModel(C?"selectedDataBackground":"dataBackground"),M=new it,I=new Ve({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new Be({shape:{points:h},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(I),M.add(L),M}for(var w=0;w<3;w++){var T=b(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!a&&!(n!==!0&&dt(P$,u.get("type"))<0)){var h=i.getComponent(ga(o),s).axis,f=N$(o),c,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(c=v.getOtherAxis(h).inverse),f=u.getData().mapDimension(f),a={thisAxis:h,series:u,thisDim:o,otherDim:f,otherAxisInverse:c}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,f=l.get("brushSelect"),c=n.filler=new ql({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new ql({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:I$,fill:"rgba(0,0,0,0)"}})),A([0,1],function(_){var S=l.get("handleIcon");!Vh[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S,process.env.NODE_ENV!=="production"&&Mr("handleIcon now needs 'path://' prefix when using a path string"));var x=ie(S,-1,0,2,2,null,!0);x.attr({cursor:dI(this._orient),draggable:!0,drift:Z(this._onDragMove,this,_),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var b=x.getBoundingRect(),w=l.get("handleSize");this._handleHeight=W(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),qa(x);var T=l.get("handleColor");T!=null&&(x.style.fill=T),o.add(a[_]=x);var C=l.getModel("textStyle"),D=l.get("handleLabel")||{},M=D.show||!1;t.add(i[_]=new Tt({silent:!0,invisible:!M,style:zt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var v=c;if(f){var p=W(l.get("moveHandleSize"),s[1]),d=n.moveHandle=new wt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=n.moveHandleIcon=ie(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));v=n.moveZone=new wt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),v.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:dI(this._orient),drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[It(t[0],[0,100],n,!0),It(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Li(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?It(s.minSpan,l,o,!0):null,s.maxSpan!=null?It(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=sr([It(i[0],o,l,!0),It(i[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=sr(a.slice()),o=this._size;A([0,1],function(v){var p=n.handles[v],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:a[v]+(v?-1:1),y:o[1]/2-d/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],h=0;h<l.length;h++){var f=l[h],c=f.getClipPath();c||(c=new wt,f.setClipPath(c)),c.setShape({x:u[h],y:0,width:u[h+1]-u[h],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,h=this._range,f=t?l.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var c=sr(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(p){var d=ti(a.handles[p].parent,this.group),g=ch(p===0?"right":"left",d),y=this._handleWidth/2+E$,m=Pr([c[p]+(p===0?-y:y),this._size[1]/2],d);i[p].setStyle({x:m[0],y:m[1],verticalAlign:o===Kl?"middle":g,align:o===Kl?g:"center",text:s[p]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return j(i)?i(t,s):U(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},a=n.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=t||this._dragging?o:a,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,pn(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Pr([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new ct(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=sr([It(a.x,o,s,!0),It(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(pn(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new ql({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),h=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?k$:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=o2(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(um);function N$(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function dI(r){return r==="vertical"?"ns-resize":"ew-resize"}function gI(r){r.registerComponentModel(M$),r.registerComponentView(R$),hm(r)}function O$(r){gt(cI),gt(gI)}var yI={get:function(r,e,t){var n=at((V$[r]||{})[e]);return t&&z(n)?n[n.length-1]:n}},V$={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},mI=ve.mapVisual,B$=ve.eachVisual,z$=z,_I=A,G$=sr,F$=It,uc=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&O2(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=Z(t,this),this.controllerVisuals=_m(this.option.controller,n,t),this.targetVisuals=_m(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=Pt(t),n},e.prototype.eachTargetSeries=function(t,n){A(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],z(t)&&(t=t.slice(),u=!0);var h=n?t:u?[f(t[0]),f(t[1])]:f(t);if(U(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(j(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+h[1]:t[1]===s[1]?a[1]+" "+h[0]:h[0]+" - "+h[1];return h;function f(c){return c===s[0]?"min":c===s[1]?"max":(+c).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=G$([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});ft(i,a),ft(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),h.call(this,o);function l(f){z$(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,c,v){var p=f[c],d=f[v];p&&!d&&(d=f[v]={},_I(p,function(g,y){if(ve.isValidType(y)){var m=yI.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function h(f){var c=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";_I(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=c&&at(c)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&at(v)||(s?m[0]:[m[0],m[0]])),_.symbol=mI(_.symbol,function(b){return b==="none"?g:b});var S=_.symbolSize;if(S!=null){var x=-1/0;B$(S,function(b){b>x&&(x=b)}),_.symbolSize=mI(S,function(b){return F$(b,[0,x],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(St),SI=[20,140],H$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=SI[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=SI[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):z(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=sr((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent();return(n[0]<=a[0]||n[0]<=t)&&(n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=xI(this,"outOfRange",this.getExtent()),a=xI(this,"inRange",this.option.range.slice()),i=[];function o(v,p){i.push({value:v,color:t(v,p)})}for(var s=0,l=0,u=a.length,h=n.length;l<h&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<h;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ta(uc.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(uc);function xI(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var bI=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=ho(n.get("padding")||0),i=t.getBoundingRect();t.add(new wt({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function h(v,p){s[v]=p}var f=o.controllerVisuals[i||o.getValueState(t)],c=ve.prepareVisualTypes(f);return A(c,function(v){var p=f[v];a.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",p=f.__alphaForOpacity),ve.dependsOn(v,n)&&p&&p.applyVisual(t,u,h)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;Ch(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(Yt),wI=[["left","right","width"],["top","bottom","height"]];function TI(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=wI[o],l=[0,null,10],u={},h=0;h<3;h++)u[wI[1-o][h]]=l[h],u[s[h]]=h===2?t[0]:n[s[h]];var f=[["x","width",3],["y","height",0]][o],c=se(u,i,n.padding);return s[(c.margin[f[2]]||0)+c[f[0]]+c[f[1]]*.5<i[f[1]]*.5?0:1]}function hc(r,e){return A(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var un=It,W$=A,CI=Math.min,Gm=Math.max,$$=12,U$=6,Y$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,n){r.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=Z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Z(this._hideIndicator,this)},e.prototype.doRender=function(t,n,a,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),c=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new Tt({style:zt(v,{x:h[0],y:h[1],verticalAlign:c==="horizontal"?"middle":f,align:c==="horizontal"?f:"center",text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=TI(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),h=new it;u.add(h),h.add(a.outOfRange=DI()),h.add(a.inRange=DI(null,s?MI(this._orient):null,Z(this._dragHandle,this,"all",!1),Z(this._dragHandle,this,"all",!0))),h.setClipPath(new wt({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),c=Gm(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,c,o),this._createHandle(n,u,1,i,c,o)),this._createIndicator(n,u,i,c,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=Z(this._dragHandle,this,a,!1),u=Z(this._dragHandle,this,a,!0),h=Ar(t.get("handleSize"),i[0]),f=ie(t.get("handleIcon"),-h/2,-h/2,h,h,null,!0),c=MI(this._orient);f.attr({cursor:c,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){pn(y.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Ka(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,p=new Tt({cursor:c,draggable:!0,drift:l,onmousemove:function(y){pn(y.event)},ondragend:u,style:zt(v,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var d=[h,0],g=this._shapes;g.handleThumbs[a]=f,g.handleLabelPoints[a]=d,g.handleLabels[a]=p},e.prototype._createIndicator=function(t,n,a,i,o){var s=Ar(t.get("indicatorSize"),a[0]),l=ie(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ge){var h=l.style;l.useStyle(B({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,c=new Tt({silent:!0,invisible:!0,style:zt(f,{x:0,y:0,text:""})});this.group.add(c);var v=[(o==="horizontal"?i/2:U$)+a[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=c,p.indicatorLabelPoint=v,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():AI(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[un(n[0],a,i,!0),un(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];Li(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[un(i[0],o,s,!0),un(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new Ns(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new it(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent(),h=this._applyTransform("left",a.mainGroup);W$([0,1],function(f){var c=o[f];c.setStyle("fill",n.handlesColor[f]),c.y=t[f];var v=un(t[f],[0,l[1]],u,!0),p=this.getControllerVisual(v,"symbolSize");c.scaleX=c.scaleY=p/l[0],c.x=l[0]-p/2;var d=Pr(a.handleLabelPoints[f],ti(c,this.group));if(this._orient==="horizontal"){var g=h==="left"||h==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[f].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,f=h.indicator;if(f){f.attr("invisible",!1);var c={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",c),p=this.getControllerVisual(t,"symbolSize"),d=un(t,s,u,!0),g=l[0]-p/2,y={x:f.x,y:f.y};f.y=d,f.x=g;var m=Pr(h.indicatorLabelPoint,ti(f,this.group)),_=h.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",h.mainGroup),x=this._orient,b=x==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:b?S:"middle",align:b?"center":S});var w={x:g,y:d,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(w,C),_.animateTo(T,C)}else f.attr(w),_.attr(T);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var M=0;M<D.length;M++)this.api.enterBlur(D[M])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=CI(Gm(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=CI(Gm(o[0],t),o[1]);var l=Z$(a,s,o),u=[t-l,t+l],h=un(t,o,s,!0),f=[un(u[0],o,s,!0),un(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(h,f[1],"< ",l):f[1]===1/0?this._showIndicator(h,f[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var c=this._hoverLinkDataIndices,v=[];(n||AI(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var p=jP(c,v);this._dispatchHighDown("downplay",hc(p[0],a)),this._dispatchHighDown("highlight",hc(p[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(ui(t.target,function(l){var u=st(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this.api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",hc(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,a,i){var o=ti(n,i?null:this.group);return z(t)?Pr(t,o,a):ch(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(bI);function DI(r,e,t,n){return new Ve({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){pn(a.event)},ondragend:n})}function Z$(r,e,t){var n=$$/2,a=r.get("hoverLinkDataSize");return a&&(n=un(a,e,t,!0)/2),n}function AI(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function MI(r){return r==="vertical"?"ns-resize":"ew-resize"}var X$={type:"selectDataRange",event:"dataRangeSelected",update:"update"},q$=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},K$=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(m9(n.stateList,n.targetVisuals,Z(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(Z(j$,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function j$(r,e,t,n){for(var a=e.targetVisuals[n],i=ve.prepareVisualTypes(a),o={color:Js(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],h=a[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(t,f,c)}return o.color;function f(v){return o[v]}function c(v,p){o[v]=p}}var II=A;function Q$(r){var e=r&&r.visualMap;z(e)||(e=e?[e]:[]),II(e,function(t){if(t){Zo(t,"splitList")&&!Zo(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&z(n)&&II(n,function(a){J(a)&&(Zo(a,"start")&&!Zo(a,"min")&&(a.min=a.start),Zo(a,"end")&&!Zo(a,"max")&&(a.max=a.end))})}})}function Zo(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var LI=!1;function EI(r){LI||(LI=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(X$,q$),A(K$,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Q$))}function PI(r){r.registerComponentModel(H$),r.registerComponentView(Y$),EI(r)}var J$=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],tU[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=at(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=at(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=ve.listVisualTypes(),i=this.isCategory();A(t.pieces,function(s){A(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),A(n,function(s,l){var u=!1;A(this.stateList,function(h){u=u||o(t,h,l)||o(t.target,h,l)},this),!u&&A(this.stateList,function(h){(t[h]||(t[h]={}))[l]=yI.get(l,h==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,A(i,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),a.selectedMode==="single"){var s=!1;A(i,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=at(t)},e.prototype.getValueState=function(t){var n=ve.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=ve.findPieceIndex(l,a);h===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(h,f){var c=i.getRepresentValue({interval:h});f||(f=i.getValueState(c));var v=t(c,f);h[0]===-1/0?a[0]=v:h[1]===1/0?a[1]=v:n.push({value:h[0],color:v},{value:h[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return A(s,function(h){var f=h.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=ta(uc.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(uc),tU={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),L_(r),A(r,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;A(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),kI(e,r)},pieces:function(r){var e=this.option;A(e.pieces,function(t,n){J(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],f=0;f<2;f++){for(var c=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=t[c[v]],s[f]=l[v],h[f]=v===2;o[f]==null&&(o[f]=u[f])}h[0]&&o[1]===1/0&&(s[0]=0),h[1]&&o[0]===-1/0&&(s[1]=0),process.env.NODE_ENV!=="production"&&o[0]>o[1]&&console.warn("Piece "+n+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=ve.retrieveVisuals(t),r.push(a)},this),kI(e,r),L_(r),A(r,function(t){var n=t.close,a=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function kI(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var eU=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=n.itemSize,h=this._getViewData(),f=h.endsText,c=ee(n.get("showLabel",!0),!f),v=!n.get("selectedMode");f&&this._renderEndsText(t,f[0],u,c,l),A(h.viewPieceList,function(p){var d=p.piece,g=new it;g.onclick=Z(this._onItemClick,this,d),this._enableHoverLink(g,p.indexInModelPieceList);var y=n.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],v),c){var m=this.visualMapModel.getValueState(y);g.add(new Tt({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:v}))}t.add(g)},this),f&&this._renderEndsText(t,f[1],u,c,l),ii(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:hc(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return TI(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(n){var s=new it,l=this.visualMapModel.textStyleModel;s.add(new Tt({style:zt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a,i){var o=ie(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=at(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,A(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(bI);function RI(r){r.registerComponentModel(J$),r.registerComponentView(eU),EI(r)}function rU(r){gt(PI),gt(RI)}var nU={label:{enabled:!0},decal:{show:!1}},NI=bt(),aU={};function iU(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=at(nU);ft(n.label,r.getLocaleModel().get("aria"),!1),ft(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),h=u.get("show");if(h){var f=q();r.eachSeries(function(c){if(!c.isColorBySeries()){var v=f.get(c.type);v||(v={},f.set(c.type,v)),NI(c).scope=v}}),r.eachRawSeries(function(c){if(r.isSeriesFiltered(c))return;if(j(c.enableAriaDecal)){c.enableAriaDecal();return}var v=c.getData();if(c.isColorBySeries()){var m=zp(c.ecModel,c.name,aU,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,m))}else{var p=c.getRawData(),d={},g=NI(c).scope;v.each(function(x){var b=v.getRawIndex(x);d[b]=x});var y=p.count();p.each(function(x){var b=d[x],w=p.getName(x)||x+"",T=zp(c.ecModel,w,g,y),C=v.getItemVisual(b,"decal");v.setItemVisual(b,"decal",S(C,T))})}function S(x,b){var w=x?B(B({},b),x):b;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(u){var h=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=rt(f.option,h),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var c=r.getSeriesCount(),v=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,d=Math.min(c,p),g;if(!(c<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],S=c>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(S,{seriesCount:c}),r.eachSeries(function(T,C){if(C<d){var D=void 0,M=T.get("name"),I=M?"withName":"withoutName";D=c>1?f.get(["series","multiple",I]):f.get(["series","single",I]),D=o(D,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>v){var E=f.get(["data","partialData"]);D+=o(E,{displayCnt:v})}else D+=f.get(["data","allData"]);for(var P=f.get(["data","separator","middle"]),k=f.get(["data","separator","end"]),N=f.get(["data","excludeDimensionId"]),R=[],V=0;V<L.count();V++)if(V<v){var F=L.getName(V),H=N?At(L.getValues(V),function(Q,et){return dt(N,et)===-1}):L.getValues(V),$=f.get(["data",F?"withName":"withoutName"]);R.push(o($,{name:F,value:H.join(P)}))}D+=R.join(P)+k,_.push(D)}});var x=f.getModel(["series","multiple","separator"]),b=x.get("middle"),w=x.get("end");g+=_.join(b)+w,u.setAttribute("aria-label",g)}}}}function o(u,h){if(!U(u))return u;var f=u;return A(h,function(c,v){f=f.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),c)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var h=r.getLocaleModel().get(["series","typeNames"]);return h[u]||h.chart}}function oU(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},A(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function sU(r){r.registerPreprocessor(oU),r.registerVisual(r.PRIORITY.VISUAL.ARIA,iU)}var OI={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},lU=function(){function r(e){var t=this._condVal=U(e)?new RegExp(e):T0(e)?e:null;if(t==null){var n="";process.env.NODE_ENV!=="production"&&(n=ke("Illegal regexp",e,"in")),Mt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return U(t)?this._condVal.test(e):Ct(t)?this._condVal.test(e+""):!1},r}(),uU=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),hU=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),fU=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),cU=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),vU=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r}();function Fm(r,e){if(r===!0||r===!1){var t=new uU;return t.value=r,t}var n="";return BI(r)||(process.env.NODE_ENV!=="production"&&(n=ke("Illegal config. Expect a plain object but actually",r)),Mt(n)),r.and?VI("and",r,e):r.or?VI("or",r,e):r.not?pU(r,e):dU(r,e)}function VI(r,e,t){var n=e[r],a="";process.env.NODE_ENV!=="production"&&(a=ke('"and"/"or" condition should only be `'+r+": [...]` and must not be empty array.","Illegal condition:",e)),z(n)||Mt(a),n.length||Mt(a);var i=r==="and"?new hU:new fU;return i.children=G(n,function(o){return Fm(o,t)}),i.children.length||Mt(a),i}function pU(r,e){var t=r.not,n="";process.env.NODE_ENV!=="production"&&(n=ke('"not" condition should only be `not: {}`.',"Illegal condition:",r)),BI(t)||Mt(n);var a=new cU;return a.child=Fm(t,e),a.child||Mt(n),a}function dU(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=xt(r),o=r.parser,s=o?px(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var h=X(OI,u)?OI[u]:u,f=r[u],c=s?s(f):f,v=rO(h,c)||h==="reg"&&new lU(c);v||(process.env.NODE_ENV!=="production"&&(t=ke('Illegal relational operation: "'+u+'" in condition:',r)),Mt(t)),a.push(v)}}a.length||(process.env.NODE_ENV!=="production"&&(t=ke("Relational condition must have at least one operator.","Illegal condition:",r)),Mt(t));var p=new vU;return p.valueGetterParam=n,p.valueParser=s,p.getValue=e.getValue,p.subCondList=a,p}function BI(r){return J(r)&&!we(r)}var gU=function(){function r(e,t){this._cond=Fm(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function yU(r,e){return new gU(r,e)}var mU={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=yU(r.config,{valueGetterAttrMap:q({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;X(s,"dimension")||(process.env.NODE_ENV!=="production"&&(l=ke('Relation condition must has prop "dimension" specified.',"Illegal condition:",s)),Mt(l));var h=e.getDimensionInfo(u);return h||(process.env.NODE_ENV!=="production"&&(l=ke("Can not find dimension info via: "+u+`.
`,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
`,"Illegal condition:",s,`.
`)),Mt(l)),{dimIdx:h.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},Hm="";process.env.NODE_ENV!=="production"&&(Hm=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var _U={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=Pt(t);a.length||(process.env.NODE_ENV!=="production"&&(n="Empty `config` in sort transform."),Mt(n));var i=[];A(a,function(h){var f=h.dimension,c=h.order,v=h.parser,p=h.incomparable;if(f==null&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "dimension" specified.'+Hm),Mt(n)),c!=="asc"&&c!=="desc"&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "order" specified.'+Hm),Mt(n)),p&&p!=="min"&&p!=="max"){var d="";process.env.NODE_ENV!=="production"&&(d='incomparable must be "min" or "max" rather than "'+p+'".'),Mt(d)}if(c!=="asc"&&c!=="desc"){var g="";process.env.NODE_ENV!=="production"&&(g='order must be "asc" or "desc" rather than "'+c+'".'),Mt(g)}var y=e.getDimensionInfo(f);y||(process.env.NODE_ENV!=="production"&&(n=ke("Can not find dimension info via: "+f+`.
`,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
`,"Illegal config:",h,`.
`)),Mt(n));var m=v?px(v):null;v&&!m&&(process.env.NODE_ENV!=="production"&&(n=ke("Invalid parser name "+v+`.
`,"Illegal config:",h,`.
`)),Mt(n)),i.push({dimIdx:y.index,parser:m,comparator:new gx(c,p)})});var o=e.sourceFormat;o!==Ce&&o!==vr&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),Mt(n));for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(h,f){for(var c=0;c<i.length;c++){var v=i[c],p=e.retrieveValueFromItem(h,v.dimIdx),d=e.retrieveValueFromItem(f,v.dimIdx);v.parser&&(p=v.parser(p),d=v.parser(d));var g=v.comparator.evaluate(p,d);if(g!==0)return g}return 0}),{data:s}}};function SU(r){r.registerTransform(mU),r.registerTransform(_U)}var xU=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new bx(this),Tx(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),Tx(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:tn},e}(St),bU=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Yt);function wU(r){r.registerComponentModel(xU),r.registerComponentView(bU)}var hn=jr.CMD;function Xo(r,e){return Math.abs(r-e)<1e-5}function Wm(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(L,E){a&&a.length>2&&n.push(a),a=[L,E]}function h(L,E,P,k){Xo(L,P)&&Xo(E,k)||a.push(L,E,P,k,P,k)}function f(L,E,P,k,N,R){var V=Math.abs(E-L),F=Math.tan(V/4)*4/3,H=E<L?-1:1,$=Math.cos(L),Q=Math.sin(L),et=Math.cos(E),lt=Math.sin(E),kt=$*N+P,jt=Q*R+k,pt=et*N+P,nt=lt*R+k,yt=N*F*H,K=R*F*H;a.push(kt-yt*Q,jt+K*$,pt+yt*lt,nt-K*et,pt,nt)}for(var c,v,p,d,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(y===hn.L||y===hn.C||y===hn.Q)&&(a=[s,l])),y){case hn.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case hn.L:c=e[g++],v=e[g++],h(i,o,c,v),i=c,o=v;break;case hn.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case hn.Q:c=e[g++],v=e[g++],p=e[g++],d=e[g++],a.push(i+2/3*(c-i),o+2/3*(v-o),p+2/3*(c-p),d+2/3*(v-d),p,d),i=p,o=d;break;case hn.A:var _=e[g++],S=e[g++],x=e[g++],b=e[g++],w=e[g++],T=e[g++]+w;g+=1;var C=!e[g++];c=Math.cos(w)*x+_,v=Math.sin(w)*b+S,m?(s=c,l=v,u(s,l)):h(i,o,c,v),i=Math.cos(T)*x+_,o=Math.sin(T)*b+S;for(var D=(C?-1:1)*Math.PI/2,M=w;C?M>T:M<T;M+=D){var I=C?Math.max(M+D,T):Math.min(M+D,T);f(M,I,_,S,x,b)}break;case hn.R:s=i=e[g++],l=o=e[g++],c=s+e[g++],v=l+e[g++],u(c,l),h(c,l,c,v),h(c,v,s,v),h(s,v,s,l),h(s,l,c,l);break;case hn.Z:a&&h(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function $m(r,e,t,n,a,i,o,s,l,u){if(Xo(r,t)&&Xo(e,n)&&Xo(a,o)&&Xo(i,s)){l.push(o,s);return}var h=2/u,f=h*h,c=o-r,v=s-e,p=Math.sqrt(c*c+v*v);c/=p,v/=p;var d=t-r,g=n-e,y=a-o,m=i-s,_=d*d+g*g,S=y*y+m*m;if(_<f&&S<f){l.push(o,s);return}var x=c*d+v*g,b=-c*y-v*m,w=_-x*x,T=S-b*b;if(w<f&&x>=0&&T<f&&b>=0){l.push(o,s);return}var C=[],D=[];$n(r,t,a,o,.5,C),$n(e,n,i,s,.5,D),$m(C[0],D[0],C[1],D[1],C[2],D[2],C[3],D[3],l,u),$m(C[4],D[4],C[5],D[5],C[6],D[6],C[7],D[7],l,u)}function TU(r,e){var t=Wm(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var h=i[u++],f=i[u++],c=i[u++],v=i[u++],p=i[u++],d=i[u++];$m(s,l,h,f,c,v,p,d,o,e),s=p,l=d}n.push(o)}return n}function zI(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var h=o*s,f=t-h;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function GI(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,h=l>Math.abs(u),f=zI([l,u],h?0:1,e),c=(h?s:u)/f.length,v=0;v<f.length;v++)for(var p=(h?u:s)/f[v],d=0;d<f[v];d++){var g={};h?(g.startAngle=i+c*v,g.endAngle=i+c*(v+1),g.r0=n+p*d,g.r=n+p*(d+1)):(g.startAngle=i+p*d,g.endAngle=i+p*(d+1),g.r0=n+c*v,g.r=n+c*(v+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function CU(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=zI([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",h=i?"y":"x",f=r[s]/o.length,c=0;c<o.length;c++)for(var v=r[l]/o[c],p=0;p<o[c];p++){var d={};d[u]=c*f,d[h]=p*v,d[s]=f,d[l]=v,d.x+=r.x,d.y+=r.y,t.push(d)}}function FI(r,e,t,n){return r*n-t*e}function DU(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,h=o-a,f=s-i,c=FI(h,f,l,u);if(Math.abs(c)<1e-6)return null;var v=r-a,p=e-i,d=FI(v,p,h,f)/c;return d<0||d>1?null:new ct(d*l+r,d*u+e)}function AU(r,e,t){var n=new ct;ct.sub(n,t,e),n.normalize();var a=new ct;ct.sub(a,r,e);var i=a.dot(n);return i}function qo(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function MU(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=DU(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:AU(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(g,y){return g.projPt-y.projPt});var u=a[0],h=a[a.length-1];if(h.idx<u.idx){var f=u;u=h,h=f}for(var c=[u.pt.x,u.pt.y],v=[h.pt.x,h.pt.y],p=[c],d=[v],i=u.idx+1;i<=h.idx;i++)qo(p,r[i].slice());qo(p,v),qo(p,c);for(var i=h.idx+1;i<=u.idx+n;i++)qo(d,r[i%n].slice());return qo(d,c),qo(d,v),[{points:p},{points:d}]}function HI(r){var e=r.points,t=[],n=[];Zu(e,t,n);var a=new vt(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new ct,h=new ct;return i>o?(u.x=h.x=s+i/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+i),MU(e,u,h)}function fc(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);fc(r,i[0],a,n),fc(r,i[1],t-a,n)}return n}function IU(r,e){for(var t=[],n=0;n<e;n++)t.push(vp(r));return t}function LU(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function EU(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function PU(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":CU(n,e,t),a=wt;break;case"sector":GI(n,e,t),a=Oe;break;case"circle":GI({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Oe;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=G(TU(r.getUpdatedPathProxy(),o),function(y){return EU(y)}),l=s.length;if(l===0)fc(HI,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var h=0,f=G(s,function(y){var m=[],_=[];Zu(y,m,_);var S=(_[1]-m[1])*(_[0]-m[0]);return h+=S,{poly:y,area:S}});f.sort(function(y,m){return m.area-y.area});for(var c=e,u=0;u<l;u++){var v=f[u];if(c<=0)break;var p=u===l-1?c:Math.ceil(v.area/h*e);p<0||(fc(HI,{points:v.poly},p,t),c-=p)}}a=Ve;break}if(!a)return IU(r,e);for(var d=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),LU(r,g),d.push(g)}return d}function kU(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,h=Math.ceil(l/u)+1,f=[o[0],o[1]],c=l,v=2;v<s;){var p=o[v-2],d=o[v-1],g=o[v++],y=o[v++],m=o[v++],_=o[v++],S=o[v++],x=o[v++];if(c<=0){f.push(g,y,m,_,S,x);continue}for(var b=Math.min(c,h-1)+1,w=1;w<=b;w++){var T=w/b;$n(p,g,m,S,T,a),$n(d,y,_,x,T,i),p=a[3],d=i[3],f.push(a[1],i[1],a[2],i[2],p,d),g=a[5],y=i[5],m=a[6],_=i[6]}c-=b-1}return o===r?[f,e]:[r,f]}function WI(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function RU(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],h=void 0,f=void 0;l?u?(t=kU(l,u),h=t[0],f=t[1],n=h,a=f):(f=WI(a||l,l),h=l):(h=WI(n||u,u),f=u),i.push(h),o.push(f)}return[i,o]}function $I(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],h=r[i+1],f=s*h-u*l;e+=f,t+=(s+u)*f,n+=(l+h)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function NU(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var h=u*6,f=0,c=0;c<s;c+=2){var v=c===0?h:(h+c-2)%l+2,p=r[v]-t[0],d=r[v+1]-t[1],g=e[c]-n[0],y=e[c+1]-n[1],m=g-p,_=y-d;f+=m*m+_*_}f<i&&(i=f,o=u)}return o}function OU(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function VU(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=$I(s),h=$I(l);i==null&&(i=u[2]<0!=h[2]<0);var f=[],c=[],v=0,p=1/0,d=[],g=s.length;i&&(s=OU(s));for(var y=NU(s,l,u,h)*6,m=g-2,_=0;_<m;_+=2){var S=(y+_)%m+2;f[_+2]=s[S]-u[0],f[_+3]=s[S+1]-u[1]}f[0]=s[y]-u[0],f[1]=s[y+1]-u[1];for(var x=n/t,b=-n/2;b<=n/2;b+=x){for(var w=Math.sin(b),T=Math.cos(b),C=0,_=0;_<s.length;_+=2){var D=f[_],M=f[_+1],I=l[_]-h[0],L=l[_+1]-h[1],E=I*T-L*w,P=I*w+L*T;d[_]=E,d[_+1]=P;var k=E-D,N=P-M;C+=k*k+N*N}if(C<p){p=C,v=b;for(var R=0;R<d.length;R++)c[R]=d[R]}}a.push({from:f,to:c,fromCp:u,toCp:h,rotation:-v})}return a}function cc(r){return r.__isCombineMorphing}var UI="__mOriginal_";function vc(r,e,t){var n=UI+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function jl(r,e){var t=UI+e;r[t]&&(r[e]=r[t],r[t]=null)}function YI(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function ZI(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=RU(Wm(t),Wm(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&YI(i,s),l&&YI(o,l),vc(e,"updateTransform",{replace:u}),e.transform=null;var h=VU(i,o,10,Math.PI),f=[];vc(e,"buildPath",{replace:function(c){for(var v=e.__morphT,p=1-v,d=[],g=0;g<h.length;g++){var y=h[g],m=y.from,_=y.to,S=y.rotation*v,x=y.fromCp,b=y.toCp,w=Math.sin(S),T=Math.cos(S);vu(d,x,b,v);for(var C=0;C<m.length;C+=2){var D=m[C],M=m[C+1],I=_[C],L=_[C+1],E=D*p+I*v,P=M*p+L*v;f[C]=E*T-P*w+d[0],f[C+1]=E*w+P*T+d[1]}var k=f[0],N=f[1];c.moveTo(k,N);for(var C=2;C<m.length;){var I=f[C++],L=f[C++],R=f[C++],V=f[C++],F=f[C++],H=f[C++];k===I&&N===L&&R===F&&V===H?c.lineTo(F,H):c.bezierCurveTo(I,L,R,V,F,H),k=F,N=H}}}})}function Um(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;ZI(r,e),e.__morphT=0;function i(){jl(e,"buildPath"),jl(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},rt({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function BU(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var h=0,f=0;(r&u)>0&&(h=1),(e&u)>0&&(f=1),s+=u*u*(3*h^f),f===0&&(h===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function pc(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=G(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(h,e),t=Math.min(f,t),n=Math.max(h,n),a=Math.max(f,a),[h,f]}),o=G(i,function(s,l){return{cp:s,z:BU(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function XI(r){return PU(r.path,r.count)}function Ym(){return{fromIndividuals:[],toIndividuals:[],count:0}}function zU(r,e,t){var n=[];function a(x){for(var b=0;b<x.length;b++){var w=x[b];cc(w)?a(w.childrenRef()):w instanceof _t&&n.push(w)}}a(r);var i=n.length;if(!i)return Ym();var o=t.dividePath||XI,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Ym();n=pc(n),s=pc(s);for(var l=t.done,u=t.during,h=t.individualDelay,f=new mn,c=0;c<i;c++){var v=n[c],p=s[c];p.parent=e,p.copyTransform(f),h||ZI(v,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function d(x){for(var b=0;b<s.length;b++)s[b].addSelfToZr(x)}vc(e,"addSelfToZr",{after:function(x){d(x)}}),vc(e,"removeSelfFromZr",{after:function(x){for(var b=0;b<s.length;b++)s[b].removeSelfFromZr(x)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,jl(e,"addSelfToZr"),jl(e,"removeSelfFromZr")}var y=s.length;if(h)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},c=0;c<y;c++){var S=h?rt({delay:(t.delay||0)+h(c,y,n[c],s[c]),done:_},t):t;Um(n[c],s[c],S)}else e.__morphT=0,e.animateTo({__morphT:1},rt({during:function(x){for(var b=0;b<y;b++){var w=s[b];w.__morphT=e.__morphT,w.dirtyShape()}u&&u(x)},done:function(){g();for(var x=0;x<r.length;x++)jl(r[x],"updateTransform");l&&l()}},t));return e.__zr&&d(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function GU(r,e,t){var n=e.length,a=[],i=t.dividePath||XI;function o(v){for(var p=0;p<v.length;p++){var d=v[p];cc(d)?o(d.childrenRef()):d instanceof _t&&a.push(d)}}if(cc(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(vp(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var h=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(h);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Ym()}a=pc(a),e=pc(e);for(var f=t.individualDelay,u=0;u<n;u++){var c=f?rt({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;Um(a[u],e[u],c)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function qI(r){return z(r[0])}function KI(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var FU={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=vp(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function Zm(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=ro("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;qI(r)&&(u=r,h=e),qI(e)&&(u=e,h=r);function f(y,m,_,S,x){var b=y.many,w=y.one;if(b.length===1&&!x){var T=m?b[0]:w,C=m?w:b[0];if(cc(T))f({many:[T],one:C},!0,_,S,!0);else{var D=s?rt({delay:s(_,S)},l):l;Um(T,C,D),i(T,C,T,C,D)}}else for(var M=rt({dividePath:FU[t],individualDelay:s&&function(N,R,V,F){return s(N+_,S)}},l),I=m?zU(b,w,M):GU(w,b,M),L=I.fromIndividuals,E=I.toIndividuals,P=L.length,k=0;k<P;k++){var D=s?rt({delay:s(k,P)},l):l;i(L[k],E[k],m?b[k]:y.one,m?y.one:b[k],D)}}for(var c=u?u===r:r.length>e.length,v=u?KI(h,u):KI(c?e:r,[c?r:e]),p=0,d=0;d<v.length;d++)p+=v[d].many.length;for(var g=0,d=0;d<v.length;d++)f(v[d],c,g,p),g+=v[d].many.length}function Oi(r){if(!r)return[];if(z(r)){for(var e=[],t=0;t<r.length;t++)e.push(Oi(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof _t&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var jI=1e4,HU=0,QI=1,JI=2,WU=bt();function $U(r,e){for(var t=r.dimensions,n=0;n<t.length;n++){var a=r.getDimensionInfo(t[n]);if(a&&a.otherDims[e]===0)return t[n]}}function UU(r,e,t){var n=r.getDimensionInfo(t),a=n&&n.ordinalMeta;if(n){var i=r.get(n.name,e);return a&&a.categories[i]||i+""}}function tL(r,e,t,n){var a=n?"itemChildGroupId":"itemGroupId",i=$U(r,a);if(i){var o=UU(r,e,i);return o}var s=r.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return t||r.getId(e)}function eL(r){var e=[];return A(r,function(t){var n=t.data,a=t.dataGroupId;if(n.count()>jI){process.env.NODE_ENV!=="production"&&Xt("Universal transition is disabled on large data > 10k.");return}for(var i=n.getIndices(),o=0;o<i.length;o++)e.push({data:n,groupId:tL(n,o,a,!1),childGroupId:tL(n,o,a,!0),divide:t.divide,dataIndex:o})}),e}function Xm(r,e,t){r.traverse(function(n){n instanceof _t&&$t(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function qm(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Ko(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function YU(r,e,t){var n=ro("update",t,e);n&&r.traverse(function(a){if(a instanceof lr){var i=VR(a);i&&a.animateFrom({style:i},n)}})}function ZU(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function rL(r,e,t){var n=eL(r),a=eL(e);function i(_,S,x,b,w){(x||_)&&S.animateFrom({style:x&&x!==_?B(B({},x.style),_.style):_.style},w)}var o=!1,s=HU,l=q(),u=q();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var h=0;h<a.length;h++){var f=a[h].groupId;if(u.get(f)){s=QI;break}var c=a[h].childGroupId;if(c&&l.get(c)){s=JI;break}}function v(_,S){return function(x){var b=x.data,w=x.dataIndex;return S?b.getId(w):_?s===QI?x.childGroupId:x.groupId:s===JI?x.childGroupId:x.groupId}}var p=ZU(n,a),d={};if(!p)for(var h=0;h<a.length;h++){var g=a[h],y=g.data.getItemGraphicEl(g.dataIndex);y&&(d[y.id]=!0)}function m(_,S){var x=n[S],b=a[_],w=b.data.hostModel,T=x.data.getItemGraphicEl(x.dataIndex),C=b.data.getItemGraphicEl(b.dataIndex);if(T===C){C&&YU(C,b.dataIndex,w);return}T&&d[T.id]||C&&(Ko(C),T?(Ko(T),qm(T),o=!0,Zm(Oi(T),Oi(C),b.divide,w,_,i)):Xm(C,w,_))}new Mn(n,a,v(!0,p),v(!1,p),null,"multiple").update(m).updateManyToOne(function(_,S){var x=a[_],b=x.data,w=b.hostModel,T=b.getItemGraphicEl(x.dataIndex),C=At(G(S,function(D){return n[D].data.getItemGraphicEl(n[D].dataIndex)}),function(D){return D&&D!==T&&!d[D.id]});T&&(Ko(T),C.length?(A(C,function(D){Ko(D),qm(D)}),o=!0,Zm(Oi(C),Oi(T),x.divide,w,_,i)):Xm(T,w,x.dataIndex))}).updateOneToMany(function(_,S){var x=n[S],b=x.data.getItemGraphicEl(x.dataIndex);if(!(b&&d[b.id])){var w=At(G(_,function(C){return a[C].data.getItemGraphicEl(a[C].dataIndex)}),function(C){return C&&C!==b}),T=a[_[0]].data.hostModel;w.length&&(A(w,function(C){return Ko(C)}),b?(Ko(b),qm(b),o=!0,Zm(Oi(b),Oi(w),x.divide,T,_[0],i)):A(w,function(C){return Xm(C,T,_[0])}))}}).updateManyToMany(function(_,S){new Mn(S,_,function(x){return n[x].data.getId(n[x].dataIndex)},function(x){return a[x].data.getId(a[x].dataIndex)}).update(function(x,b){m(_[x],S[b])}).execute()}).execute(),o&&A(e,function(_){var S=_.data,x=S.hostModel,b=x&&t.getViewOfSeriesModel(x),w=ro("update",x,0);b&&x.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(T){T instanceof _t&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function nL(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function aL(r){return z(r)?r.sort().join(","):r}function ma(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function XU(r,e){var t=q(),n=q(),a=q();A(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],h=nL(o),f=aL(h);n.set(f,{dataGroupId:l,data:u}),z(h)&&A(h,function(c){a.set(c,{key:f,dataGroupId:l,data:u})})});function i(o){t.get(o)&&Xt("Duplicated seriesKey in universalTransition "+o)}return A(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=nL(o),h=aL(u),f=n.get(h);if(f)process.env.NODE_ENV!=="production"&&i(h),t.set(h,{oldSeries:[{dataGroupId:f.dataGroupId,divide:ma(f.data),data:f.data}],newSeries:[{dataGroupId:s,divide:ma(l),data:l}]});else if(z(u)){process.env.NODE_ENV!=="production"&&i(h);var c=[];A(u,function(d){var g=n.get(d);g.data&&c.push({dataGroupId:g.dataGroupId,divide:ma(g.data),data:g.data})}),c.length&&t.set(h,{oldSeries:c,newSeries:[{dataGroupId:s,data:l,divide:ma(l)}]})}else{var v=a.get(u);if(v){var p=t.get(v.key);p||(p={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:ma(v.data)}],newSeries:[]},t.set(v.key,p)),p.newSeries.push({dataGroupId:s,data:l,divide:ma(l)})}}}}),t}function iL(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function qU(r,e,t,n){var a=[],i=[];A(Pt(r.from),function(o){var s=iL(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:ma(e.oldData[s]),groupIdDim:o.dimension})}),A(Pt(r.to),function(o){var s=iL(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:ma(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&rL(a,i,n)}function KU(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){A(Pt(n.seriesTransition),function(a){A(Pt(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Ph]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=WU(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)A(Pt(i),function(v){qU(v,a,n,t)});else{var o=XU(a,n);A(o.keys(),function(v){var p=o.get(v);rL(p.oldSeries,p.newSeries,t)})}A(n.updatedSeries,function(v){v[Ph]&&(v[Ph]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],h=a.oldData=[],f=0;f<s.length;f++){var c=s[f].getData();c.count()<jI&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),h.push(c))}})}gt([s5]),gt([r5]),gt([A5,H5,Q5,E3,H3,MG,rF,zF,s4,v4,b4,gH,FH,QH,pW,mW,MW,NW,YW,QW,l6,$6]),gt(u8),gt(N8),gt(jC),gt(X8),gt(mA),gt(Q8),gt(s7),gt(X7),gt(v9),gt(Hl),gt(L9),gt(k9),gt(W9),gt(K9),gt(r$),gt(l$),gt(m$),gt(O$),gt(cI),gt(gI),gt(rU),gt(PI),gt(RI),gt(sU),gt(SU),gt(wU),gt(KU),gt(bz);const jU={name:"ECharts",props:{option:{type:Object,default(){return{title:{text:"ECharts 示例"},tooltip:{},xAxis:{data:["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]},yAxis:{},series:[{name:"销量",type:"bar",data:[5,20,36,10,10,20]}]}}}},data(){return{myChart:null}},mounted(){this.$refs.chartRef&&(this.myChart=$V(this.$refs.chartRef),this.myChart.setOption(this.option))},beforeUnmount(){this.myChart!==null&&this.myChart!==void 0&&this.myChart.dispose()},watch:{option:{handler(r,e){this.myChart.setOption(r,!0)},deep:!0}},methods:{}},QU={class:"chart-container"},JU={ref:"chartRef",class:"chart"};function tY(r,e,t,n,a,i){return Y.openBlock(),Y.createElementBlock("div",QU,[Y.createElementVNode("div",JU,null,512)])}const eY={name:"LChatContent",props:{dataSource:{type:Array,default(){return[]}}},data(){return{needScrollControl:!0,marked:Bt}},components:{ECharts:Br(jU,[["render",tY],["__scopeId","data-v-94c83b5e"]]),LznLoading:KL},mounted(){this.$refs.lChatContent.addEventListener("scroll",this.handleScroll)},onUnmounted(){this.$refs.lChatContent.removeEventListener("scroll",this.handleScroll)},watch:{dataSource:{handler(r,e){this.scrollControl()},deep:!0}},methods:{handleScroll(r){const e=r.target;e.scrollHeight-e.scrollTop>=e.clientHeight-35&&e.scrollHeight-e.scrollTop<=e.clientHeight+35?this.needScrollControl=!0:this.needScrollControl=!1},scrollControl(){this.needScrollControl&&(this.$refs.lChatContent.scrollTop=this.$refs.lChatContent.scrollHeight)}}},rY={class:"l-chat-content",ref:"lChatContent"},nY={class:"lContentSection"},aY={key:0,class:"headImg",style:{left:"0"}},iY=["src"],oY={key:0,class:"response-status"},sY={key:0,class:"status-sign"},lY={key:1,class:"status-sign"},uY=["innerHTML"],hY={key:1},fY={key:1,class:"echarts_loading"},cY={key:1,class:"headImg",style:{right:"0"}},vY=["src"];function pY(r,e,t,n,a,i){const o=Y.resolveComponent("LznLoading"),s=Y.resolveComponent("ECharts");return Y.openBlock(),Y.createElementBlock("div",rY,[Y.createElementVNode("div",nY,[(Y.openBlock(!0),Y.createElementBlock(Y.Fragment,null,Y.renderList(t.dataSource,(l,u)=>(Y.openBlock(),Y.createElementBlock("div",{key:u,class:Y.normalizeClass([l.type==="myMsg"?"my-msg-item":"other-msg-item","msg-item"])},[l.type!=="myMsg"?(Y.openBlock(),Y.createElementBlock("div",aY,[Y.createElementVNode("img",{src:l.avatar},null,8,iY)])):Y.createCommentVNode("",!0),Y.createElementVNode("div",{class:Y.normalizeClass([l.type==="myMsg"?"my-msg-content":"other-msg-content","msg-content"])},[l.type==="ai"?(Y.openBlock(),Y.createElementBlock("div",oY,[l.contentLoading?(Y.openBlock(),Y.createElementBlock("span",sY,[Y.createVNode(o,{txt:"正在响应..."})])):(Y.openBlock(),Y.createElementBlock("span",lY,"回答结束"))])):Y.createCommentVNode("",!0),Y.createElementVNode("div",{innerHTML:a.marked(l.content)},null,8,uY),l.echartsType?(Y.openBlock(),Y.createElementBlock("div",hY,[l.echartsData?(Y.openBlock(),Y.createBlock(s,{key:0,option:l.echartsData,ref_for:!0,ref:l.id},null,8,["option"])):!l.echartsData&&l.contentLoading?(Y.openBlock(),Y.createElementBlock("div",fY,[Y.createVNode(o,{txt:"echarts图表加载中..."})])):Y.createCommentVNode("",!0)])):Y.createCommentVNode("",!0)],2),l.type==="myMsg"?(Y.openBlock(),Y.createElementBlock("div",cY,[Y.createElementVNode("img",{src:l.avatar},null,8,vY)])):Y.createCommentVNode("",!0)],2))),128))])],512)}const Km=Br(eY,[["render",pY]]),dY={name:"LChatInput",props:{stopAnswerShow:{type:Boolean,default:!1},value:{type:String,default:""},questionWordsData:{type:Array,default(){return[]}}},data(){return{newMyMsg:""}},created(){this.initData()},watch:{newMyMsg:{handler(r,e){r?(this.$refs.textarea.style.backgroundColor="white",this.$refs.entBtn.style.backgroundColor="#0052d9",this.$refs.entBtn.style.color="#fff",this.$refs.entBtn.style.cursor="pointer"):(this.$refs.entBtn.style.backgroundColor="transparent",this.$refs.entBtn.style.color="#B6C8E7",this.$refs.entBtn.style.cursor="not-allowed")}},value:{handler(r,e){this.newMyMsg=r}}},methods:{initData(){this.newMyMsg=this.value},questionWordsClick(r){this.$emit("questionWordsClick",r)},handleKeyDown(r){r.keyCode===13&&(r.ctrlKey&&r.keyCode===13?(console.log("Ctrl+Enter被按下"),this.newMyMsg+=`
`):(r.preventDefault(),this.sendMessage()))},sendMessage(){this.newMyMsg.trim()!==""&&(this.$emit("send",this.newMyMsg),this.newMyMsg="",this.inputTextArea(),this.$nextTick(()=>{let r=document.getElementsByClassName("l-chat-content")[0];r.scrollTop=r.scrollHeight}))},stopAnswer(){this.$emit("stopAnswer")},focusTextArea(){this.newMyMsg?this.$refs.entBtn.style.color="#fff":this.$refs.entBtn.style.color="#B6C8E7",this.$refs.textarea.style.backgroundColor="white"},inputTextArea(){this.$emit("input",this.newMyMsg)},blurTextArea(){this.newMyMsg?(this.$refs.entBtn.style.color="#B6C8E7",this.$refs.textarea.style.backgroundColor="white"):(this.$refs.entBtn.style.color="lightgray",this.$refs.textarea.style.backgroundColor="#f3f3f3")}}},gY={class:"ai_chat_input_area"},yY={class:"input_area_box"};function mY(r,e,t,n,a,i){return Y.openBlock(),Y.createElementBlock("div",gY,[Y.withDirectives(Y.createElementVNode("div",{class:"stop_answer_box",style:Y.normalizeStyle({top:t.questionWordsData.length?"-110%":"-55%"})},[Y.createElementVNode("span",{class:"stop_btn",onClick:e[0]||(e[0]=(...o)=>i.stopAnswer&&i.stopAnswer(...o))},e[7]||(e[7]=[Y.createElementVNode("svg",{width:"10",height:"10",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"mr-[5px] h-3.5 w-3.5 text-gray-500","data-icon":"StopCircle","aria-hidden":"true"},[Y.createElementVNode("g",{id:"stop-circle"},[Y.createElementVNode("path",{id:"Solid","fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.99992 0.833984C4.93731 0.833984 0.833252 4.93804 0.833252 10.0007C0.833252 15.0633 4.93731 19.1673 9.99992 19.1673C15.0625 19.1673 19.1666 15.0633 19.1666 10.0007C19.1666 4.93804 15.0625 0.833984 9.99992 0.833984ZM6.75741 7.12232C6.66658 7.30058 6.66658 7.53394 6.66658 8.00065V12.0006C6.66658 12.4674 6.66658 12.7007 6.75741 12.879C6.83731 13.0358 6.96479 13.1633 7.12159 13.2432C7.29985 13.334 7.53321 13.334 7.99992 13.334H11.9999C12.4666 13.334 12.7 13.334 12.8782 13.2432C13.035 13.1633 13.1625 13.0358 13.2424 12.879C13.3333 12.7007 13.3333 12.4674 13.3333 12.0006V8.00065C13.3333 7.53394 13.3333 7.30058 13.2424 7.12232C13.1625 6.96552 13.035 6.83804 12.8782 6.75814C12.7 6.66732 12.4666 6.66732 11.9999 6.66732H7.99992C7.53321 6.66732 7.29985 6.66732 7.12159 6.75814C6.96479 6.83804 6.83731 6.96552 6.75741 7.12232Z",fill:"currentColor"})])],-1),Y.createTextVNode(" 停止回答 ")]))],4),[[Y.vShow,t.stopAnswerShow]]),Y.createElementVNode("div",yY,[Y.withDirectives(Y.createElementVNode("textarea",{class:"input_area_inner",ref:"textarea",placeholder:"请输入关键词查询,Ctrl+Enter换行","onUpdate:modelValue":e[1]||(e[1]=o=>a.newMyMsg=o),style:{"min-height":"63.6px",height:"63.6px"},onFocus:e[2]||(e[2]=(...o)=>i.focusTextArea&&i.focusTextArea(...o)),onBlur:e[3]||(e[3]=(...o)=>i.blurTextArea&&i.blurTextArea(...o)),onInput:e[4]||(e[4]=(...o)=>i.inputTextArea&&i.inputTextArea(...o)),onKeydown:e[5]||(e[5]=(...o)=>i.handleKeyDown&&i.handleKeyDown(...o))},null,544),[[Y.vModelText,a.newMyMsg]]),Y.createElementVNode("button",{class:"enter-btn",type:"button",ref:"entBtn",onClick:e[6]||(e[6]=(...o)=>i.sendMessage&&i.sendMessage(...o))},e[8]||(e[8]=[Y.createElementVNode("span",{role:"img","aria-label":"rocket"},[Y.createElementVNode("svg",{focusable:"false","data-icon":"rocket",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"64 64 896 896"},[Y.createElementVNode("path",{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z"})])],-1)]),512)])])}const jm=Br(dY,[["render",mY]]),_Y=[gc,Km,jm],dc=function(r){dc.installed||(dc.installed=!0,_Y.forEach(e=>r.component(e.name,e)))};typeof window<"u"&&window.Vue&&dc(window.Vue);const SY={install:dc,LAIChatComponent:gc,LChatContent:Km,LChatInput:jm};be.LAIChatComponent=gc,be.LChatContent=Km,be.LChatInput=jm,be.default=SY,Object.defineProperties(be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});