@opengis/bi 1.2.7 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bi.js +14 -10
- package/dist/bi.umd.cjs +248 -85
- package/dist/import-file-B5MQcuRd.js +62467 -0
- package/dist/style.css +7 -1
- package/dist/{vs-funnel-bar-BzIfzGso.js → vs-funnel-bar-Lb-T2BvP.js} +11 -11
- package/dist/vs-list-CqZhcJTj.js +525 -0
- package/dist/{vs-map-BsmBbjRv.js → vs-map-BREwpKyt.js} +81 -79
- package/dist/vs-map-cluster-B3VVh2Th.js +314 -0
- package/dist/{vs-number-D28OvROP.js → vs-number-BYY_Gd6m.js} +1 -1
- package/dist/{vs-table-YpK1qNz6.js → vs-table-Deb8wNdP.js} +1 -1
- package/dist/vs-text-C_KFUoCE.js +40 -0
- package/package.json +2 -3
- package/dist/assets/charts/bar.png +0 -0
- package/dist/assets/charts/funnel.png +0 -0
- package/dist/assets/charts/no_data.jpg +0 -0
- package/dist/assets/charts/number.png +0 -0
- package/dist/assets/charts/pie.png +0 -0
- package/dist/assets/charts/progress.png +0 -0
- package/dist/assets/charts/stat.png +0 -0
- package/dist/assets/images/bar.png +0 -0
- package/dist/assets/images/funnel.png +0 -0
- package/dist/assets/images/no_data.jpg +0 -0
- package/dist/assets/images/number.png +0 -0
- package/dist/assets/images/pie.png +0 -0
- package/dist/assets/images/progress.png +0 -0
- package/dist/assets/images/stat.png +0 -0
- package/dist/import-file-DnbEvuUN.js +0 -3681
- package/dist/vs-list-_I6Z56hC.js +0 -525
- package/dist/vs-map-cluster-DT3jfiks.js +0 -356
- package/dist/vs-text-BU0n2bXl.js +0 -1521
package/dist/bi.umd.cjs
CHANGED
|
@@ -1,126 +1,289 @@
|
|
|
1
|
-
(function(T,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(T=typeof globalThis<"u"?globalThis:T||self,o(T.bi={},T.Vue))})(this,function(T,o){"use strict";var dc=Object.defineProperty;var hc=(T,o,R)=>o in T?dc(T,o,{enumerable:!0,configurable:!0,writable:!0,value:R}):T[o]=R;var D=(T,o,R)=>hc(T,typeof o!="symbol"?o+"":o,R);function R(t,e){return t!=null&&t.value?isNaN(t==null?void 0:t.value)?t==null?void 0:t.value:new Intl.NumberFormat("en",e||{notation:"compact"}).format(t==null?void 0:t.value):isNaN(t)?t:new Intl.NumberFormat("en",e||{notation:"compact"}).format(t)}function X(t){if(!(t!=null&&t.includes("T")))return t;const[e,n,s]=t.split("T")[0].split("-");return`${s}.${n}.${e}`}function xn(t){return Intl.NumberFormat("en").format(t)}function et(t,e){return function(){return t.apply(e,arguments)}}const{toString:kn}=Object.prototype,{getPrototypeOf:Be}=Object,ce=(t=>e=>{const n=kn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),j=t=>(t=t.toLowerCase(),e=>ce(e)===t),de=t=>e=>typeof e===t,{isArray:K}=Array,Y=de("undefined");function _n(t){return t!==null&&!Y(t)&&t.constructor!==null&&!Y(t.constructor)&&F(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const tt=j("ArrayBuffer");function En(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&tt(t.buffer),e}const Sn=de("string"),F=de("function"),nt=de("number"),he=t=>t!==null&&typeof t=="object",$n=t=>t===!0||t===!1,pe=t=>{if(ce(t)!=="object")return!1;const e=Be(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Cn=j("Date"),Bn=j("File"),Dn=j("Blob"),Nn=j("FileList"),Vn=t=>he(t)&&F(t.pipe),Tn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||F(t.append)&&((e=ce(t))==="formdata"||e==="object"&&F(t.toString)&&t.toString()==="[object FormData]"))},Rn=j("URLSearchParams"),[zn,Ln,On,An]=["ReadableStream","Request","Response","Headers"].map(j),Fn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function v(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,r;if(typeof t!="object"&&(t=[t]),K(t))for(s=0,r=t.length;s<r;s++)e.call(null,t[s],s,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let l;for(s=0;s<a;s++)l=i[s],e.call(null,t[l],l,t)}}function st(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,r;for(;s-- >0;)if(r=n[s],e===r.toLowerCase())return r;return null}const q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rt=t=>!Y(t)&&t!==q;function De(){const{caseless:t}=rt(this)&&this||{},e={},n=(s,r)=>{const i=t&&st(e,r)||r;pe(e[i])&&pe(s)?e[i]=De(e[i],s):pe(s)?e[i]=De({},s):K(s)?e[i]=s.slice():e[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&v(arguments[s],n);return e}const In=(t,e,n,{allOwnKeys:s}={})=>(v(e,(r,i)=>{n&&F(r)?t[i]=et(r,n):t[i]=r},{allOwnKeys:s}),t),Mn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Pn=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},jn=(t,e,n,s)=>{let r,i,a;const l={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)a=r[i],(!s||s(a,t,e))&&!l[a]&&(e[a]=t[a],l[a]=!0);t=n!==!1&&Be(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Un=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},qn=t=>{if(!t)return null;if(K(t))return t;let e=t.length;if(!nt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Hn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Be(Uint8Array)),Wn=(t,e)=>{const s=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=s.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},Zn=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},Jn=j("HTMLFormElement"),Gn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),ot=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Kn=j("RegExp"),it=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};v(n,(r,i)=>{let a;(a=e(r,i,t))!==!1&&(s[i]=a||r)}),Object.defineProperties(t,s)},Qn=t=>{it(t,(e,n)=>{if(F(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if(F(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xn=(t,e)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return K(t)?s(t):s(String(t).split(e)),n},Yn=()=>{},vn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ne="abcdefghijklmnopqrstuvwxyz",at="0123456789",lt={DIGIT:at,ALPHA:Ne,ALPHA_DIGIT:Ne+Ne.toUpperCase()+at},es=(t=16,e=lt.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function ts(t){return!!(t&&F(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ns=t=>{const e=new Array(10),n=(s,r)=>{if(he(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[r]=s;const i=K(s)?[]:{};return v(s,(a,l)=>{const c=n(a,r+1);!Y(c)&&(i[l]=c)}),e[r]=void 0,i}}return s};return n(t,0)},ss=j("AsyncFunction"),rs=t=>t&&(he(t)||F(t))&&F(t.then)&&F(t.catch),ct=((t,e)=>t?setImmediate:e?((n,s)=>(q.addEventListener("message",({source:r,data:i})=>{r===q&&i===n&&s.length&&s.shift()()},!1),r=>{s.push(r),q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",F(q.postMessage)),os=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||ct,f={isArray:K,isArrayBuffer:tt,isBuffer:_n,isFormData:Tn,isArrayBufferView:En,isString:Sn,isNumber:nt,isBoolean:$n,isObject:he,isPlainObject:pe,isReadableStream:zn,isRequest:Ln,isResponse:On,isHeaders:An,isUndefined:Y,isDate:Cn,isFile:Bn,isBlob:Dn,isRegExp:Kn,isFunction:F,isStream:Vn,isURLSearchParams:Rn,isTypedArray:Hn,isFileList:Nn,forEach:v,merge:De,extend:In,trim:Fn,stripBOM:Mn,inherits:Pn,toFlatObject:jn,kindOf:ce,kindOfTest:j,endsWith:Un,toArray:qn,forEachEntry:Wn,matchAll:Zn,isHTMLForm:Jn,hasOwnProperty:ot,hasOwnProp:ot,reduceDescriptors:it,freezeMethods:Qn,toObjectSet:Xn,toCamelCase:Gn,noop:Yn,toFiniteNumber:vn,findKey:st,global:q,isContextDefined:rt,ALPHABET:lt,generateString:es,isSpecCompliantForm:ts,toJSONObject:ns,isAsyncFn:ss,isThenable:rs,setImmediate:ct,asap:os};function k(t,e,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r,this.status=r.status?r.status:null)}f.inherits(k,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const dt=k.prototype,ht={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{ht[t]={value:t}}),Object.defineProperties(k,ht),Object.defineProperty(dt,"isAxiosError",{value:!0}),k.from=(t,e,n,s,r,i)=>{const a=Object.create(dt);return f.toFlatObject(t,a,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),k.call(a,t.message,e,n,s,r),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const is=null;function Ve(t){return f.isPlainObject(t)||f.isArray(t)}function pt(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function ut(t,e,n){return t?t.concat(e).map(function(r,i){return r=pt(r),!n&&i?"["+r+"]":r}).join(n?".":""):e}function as(t){return f.isArray(t)&&!t.some(Ve)}const ls=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function ue(t,e,n){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!f.isUndefined(y[b])});const s=n.metaTokens,r=n.visitor||d,i=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(r))throw new TypeError("visitor must be a function");function h(u){if(u===null)return"";if(f.isDate(u))return u.toISOString();if(!c&&f.isBlob(u))throw new k("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(u)||f.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function d(u,b,y){let _=u;if(u&&!y&&typeof u=="object"){if(f.endsWith(b,"{}"))b=s?b:b.slice(0,-2),u=JSON.stringify(u);else if(f.isArray(u)&&as(u)||(f.isFileList(u)||f.endsWith(b,"[]"))&&(_=f.toArray(u)))return b=pt(b),_.forEach(function(w,N){!(f.isUndefined(w)||w===null)&&e.append(a===!0?ut([b],N,i):a===null?b:b+"[]",h(w))}),!1}return Ve(u)?!0:(e.append(ut(y,b,i),h(u)),!1)}const p=[],m=Object.assign(ls,{defaultVisitor:d,convertValue:h,isVisitable:Ve});function g(u,b){if(!f.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(u),f.forEach(u,function(_,x){(!(f.isUndefined(_)||_===null)&&r.call(e,_,f.isString(x)?x.trim():x,b,m))===!0&&g(_,b?b.concat(x):[x])}),p.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return g(t),e}function ft(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Te(t,e){this._pairs=[],t&&ue(t,this,e)}const mt=Te.prototype;mt.append=function(e,n){this._pairs.push([e,n])},mt.toString=function(e){const n=e?function(s){return e.call(this,s,ft)}:ft;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function cs(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gt(t,e,n){if(!e)return t;const s=n&&n.encode||cs;f.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let i;if(r?i=r(e,n):i=f.isURLSearchParams(e)?e.toString():new Te(e,n).toString(s),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class bt{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(s){s!==null&&e(s)})}}const yt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ds={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Te,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Re=typeof window<"u"&&typeof document<"u",ze=typeof navigator=="object"&&navigator||void 0,hs=Re&&(!ze||["ReactNative","NativeScript","NS"].indexOf(ze.product)<0),ps=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",us=Re&&window.location.href||"http://localhost",z={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Re,hasStandardBrowserEnv:hs,hasStandardBrowserWebWorkerEnv:ps,navigator:ze,origin:us},Symbol.toStringTag,{value:"Module"})),...ds};function fs(t,e){return ue(t,new z.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,i){return z.isNode&&f.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function ms(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gs(t){const e={},n=Object.keys(t);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],e[i]=t[i];return e}function wt(t){function e(n,s,r,i){let a=n[i++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=i>=n.length;return a=!a&&f.isArray(r)?r.length:a,c?(f.hasOwnProp(r,a)?r[a]=[r[a],s]:r[a]=s,!l):((!r[a]||!f.isObject(r[a]))&&(r[a]=[]),e(n,s,r[a],i)&&f.isArray(r[a])&&(r[a]=gs(r[a])),!l)}if(f.isFormData(t)&&f.isFunction(t.entries)){const n={};return f.forEachEntry(t,(s,r)=>{e(ms(s),r,n,0)}),n}return null}function bs(t,e,n){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const ee={transitional:yt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=f.isObject(e);if(i&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return r?JSON.stringify(wt(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return fs(e,this.formSerializer).toString();if((l=f.isFileList(e))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ue(l?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),bs(e)):e}],transformResponse:[function(e){const n=this.transitional||ee.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(s&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(l){if(a)throw l.name==="SyntaxError"?k.from(l,k.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:z.classes.FormData,Blob:z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{ee.headers[t]={}});const ys=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ws=t=>{const e={};let n,s,r;return t&&t.split(`
|
|
2
|
-
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(r=>s.set(r)),s}static accessor(e){const s=(this[xt]=this[xt]={accessors:{}}).accessors,r=this.prototype;function i(a){const l=te(a);s[l]||(Es(r,a),s[l]=!0)}return f.isArray(e)?e.forEach(i):i(e),this}};L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f.reduceDescriptors(L.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}}),f.freezeMethods(L);function Oe(t,e){const n=this||ee,s=e||n,r=L.from(s.headers);let i=s.data;return f.forEach(t,function(l){i=l.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function kt(t){return!!(t&&t.__CANCEL__)}function Q(t,e,n){k.call(this,t??"canceled",k.ERR_CANCELED,e,n),this.name="CanceledError"}f.inherits(Q,k,{__CANCEL__:!0});function _t(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new k("Request failed with status code "+n.status,[k.ERR_BAD_REQUEST,k.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ss(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $s(t,e){t=t||10;const n=new Array(t),s=new Array(t);let r=0,i=0,a;return e=e!==void 0?e:1e3,function(c){const h=Date.now(),d=s[i];a||(a=h),n[r]=c,s[r]=h;let p=i,m=0;for(;p!==r;)m+=n[p++],p=p%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),h-a<e)return;const g=d&&h-d;return g?Math.round(m*1e3/g):void 0}}function Cs(t,e){let n=0,s=1e3/e,r,i;const a=(h,d=Date.now())=>{n=d,r=null,i&&(clearTimeout(i),i=null),t.apply(null,h)};return[(...h)=>{const d=Date.now(),p=d-n;p>=s?a(h,d):(r=h,i||(i=setTimeout(()=>{i=null,a(r)},s-p)))},()=>r&&a(r)]}const me=(t,e,n=3)=>{let s=0;const r=$s(50,250);return Cs(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,c=a-s,h=r(c),d=a<=l;s=a;const p={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:h||void 0,estimated:h&&l&&d?(l-a)/h:void 0,event:i,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(p)},n)},Et=(t,e)=>{const n=t!=null;return[s=>e[0]({lengthComputable:n,total:t,loaded:s}),e[1]]},St=t=>(...e)=>f.asap(()=>t(...e)),Bs=z.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,z.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(z.origin),z.navigator&&/(msie|trident)/i.test(z.navigator.userAgent)):()=>!0,Ds=z.hasStandardBrowserEnv?{write(t,e,n,s,r,i){const a=[t+"="+encodeURIComponent(e)];f.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),f.isString(s)&&a.push("path="+s),f.isString(r)&&a.push("domain="+r),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ns(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Vs(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function $t(t,e){return t&&!Ns(e)?Vs(t,e):e}const Ct=t=>t instanceof L?{...t}:t;function H(t,e){e=e||{};const n={};function s(h,d,p,m){return f.isPlainObject(h)&&f.isPlainObject(d)?f.merge.call({caseless:m},h,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function r(h,d,p,m){if(f.isUndefined(d)){if(!f.isUndefined(h))return s(void 0,h,p,m)}else return s(h,d,p,m)}function i(h,d){if(!f.isUndefined(d))return s(void 0,d)}function a(h,d){if(f.isUndefined(d)){if(!f.isUndefined(h))return s(void 0,h)}else return s(void 0,d)}function l(h,d,p){if(p in e)return s(h,d);if(p in t)return s(void 0,h)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(h,d,p)=>r(Ct(h),Ct(d),p,!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(d){const p=c[d]||r,m=p(t[d],e[d],d);f.isUndefined(m)&&p!==l||(n[d]=m)}),n}const Bt=t=>{const e=H({},t);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:a,auth:l}=e;e.headers=a=L.from(a),e.url=gt($t(e.baseURL,e.url),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(f.isFormData(n)){if(z.hasStandardBrowserEnv||z.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[h,...d]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([h||"multipart/form-data",...d].join("; "))}}if(z.hasStandardBrowserEnv&&(s&&f.isFunction(s)&&(s=s(e)),s||s!==!1&&Bs(e.url))){const h=r&&i&&Ds.read(i);h&&a.set(r,h)}return e},Ts=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,s){const r=Bt(t);let i=r.data;const a=L.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:h}=r,d,p,m,g,u;function b(){g&&g(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout;function _(){if(!y)return;const w=L.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),$={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:t,request:y};_t(function(A){n(A),b()},function(A){s(A),b()},$),y=null}"onloadend"in y?y.onloadend=_:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(_)},y.onabort=function(){y&&(s(new k("Request aborted",k.ECONNABORTED,t,y)),y=null)},y.onerror=function(){s(new k("Network Error",k.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let N=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const $=r.transitional||yt;r.timeoutErrorMessage&&(N=r.timeoutErrorMessage),s(new k(N,$.clarifyTimeoutError?k.ETIMEDOUT:k.ECONNABORTED,t,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&f.forEach(a.toJSON(),function(N,$){y.setRequestHeader($,N)}),f.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),l&&l!=="json"&&(y.responseType=r.responseType),h&&([m,u]=me(h,!0),y.addEventListener("progress",m)),c&&y.upload&&([p,g]=me(c),y.upload.addEventListener("progress",p),y.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(d=w=>{y&&(s(!w||w.type?new Q(null,t,y):w),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const x=Ss(r.url);if(x&&z.protocols.indexOf(x)===-1){s(new k("Unsupported protocol "+x+":",k.ERR_BAD_REQUEST,t));return}y.send(i||null)})},Rs=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let s=new AbortController,r;const i=function(h){if(!r){r=!0,l();const d=h instanceof Error?h:this.reason;s.abort(d instanceof k?d:new Q(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new k(`timeout ${e} of ms exceeded`,k.ETIMEDOUT))},e);const l=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(i):h.removeEventListener("abort",i)}),t=null)};t.forEach(h=>h.addEventListener("abort",i));const{signal:c}=s;return c.unsubscribe=()=>f.asap(l),c}},zs=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let s=0,r;for(;s<n;)r=s+e,yield t.slice(s,r),s=r},Ls=async function*(t,e){for await(const n of Os(t))yield*zs(n,e)},Os=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:s}=await e.read();if(n)break;yield s}}finally{await e.cancel()}},Dt=(t,e,n,s)=>{const r=Ls(t,e);let i=0,a,l=c=>{a||(a=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:h,value:d}=await r.next();if(h){l(),c.close();return}let p=d.byteLength;if(n){let m=i+=p;n(m)}c.enqueue(new Uint8Array(d))}catch(h){throw l(h),h}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},ge=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nt=ge&&typeof ReadableStream=="function",As=ge&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Vt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Fs=Nt&&Vt(()=>{let t=!1;const e=new Request(z.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Tt=64*1024,Ae=Nt&&Vt(()=>f.isReadableStream(new Response("").body)),be={stream:Ae&&(t=>t.body)};ge&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!be[e]&&(be[e]=f.isFunction(t[e])?n=>n[e]():(n,s)=>{throw new k(`Response type '${e}' is not supported`,k.ERR_NOT_SUPPORT,s)})})})(new Response);const Is=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(z.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await As(t)).byteLength},Ms=async(t,e)=>{const n=f.toFiniteNumber(t.getContentLength());return n??Is(e)},Fe={http:is,xhr:Ts,fetch:ge&&(async t=>{let{url:e,method:n,data:s,signal:r,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:c,responseType:h,headers:d,withCredentials:p="same-origin",fetchOptions:m}=Bt(t);h=h?(h+"").toLowerCase():"text";let g=Rs([r,i&&i.toAbortSignal()],a),u;const b=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(c&&Fs&&n!=="get"&&n!=="head"&&(y=await Ms(d,s))!==0){let $=new Request(e,{method:"POST",body:s,duplex:"half"}),S;if(f.isFormData(s)&&(S=$.headers.get("content-type"))&&d.setContentType(S),$.body){const[A,Ce]=Et(y,me(St(c)));s=Dt($.body,Tt,A,Ce)}}f.isString(p)||(p=p?"include":"omit");const _="credentials"in Request.prototype;u=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:s,duplex:"half",credentials:_?p:void 0});let x=await fetch(u);const w=Ae&&(h==="stream"||h==="response");if(Ae&&(l||w&&b)){const $={};["status","statusText","headers"].forEach(yn=>{$[yn]=x[yn]});const S=f.toFiniteNumber(x.headers.get("content-length")),[A,Ce]=l&&Et(S,me(St(l),!0))||[];x=new Response(Dt(x.body,Tt,A,()=>{Ce&&Ce(),b&&b()}),$)}h=h||"text";let N=await be[f.findKey(be,h)||"text"](x,t);return!w&&b&&b(),await new Promise(($,S)=>{_t($,S,{data:N,headers:L.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:u})})}catch(_){throw b&&b(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new k("Network Error",k.ERR_NETWORK,t,u),{cause:_.cause||_}):k.from(_,_&&_.code,t,u)}})};f.forEach(Fe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Rt=t=>`- ${t}`,Ps=t=>f.isFunction(t)||t===null||t===!1,zt={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let n,s;const r={};for(let i=0;i<e;i++){n=t[i];let a;if(s=n,!Ps(n)&&(s=Fe[(a=String(n)).toLowerCase()],s===void 0))throw new k(`Unknown adapter '${a}'`);if(s)break;r[a||"#"+i]=s}if(!s){const i=Object.entries(r).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</div>`},prepareData(){var t,e,n,s,r;try{this.styleData=this.styleData||{};const i=Array.from(new Set((this.sourceData||[]).map(g=>g[this.dimensions[0]]))),a=Array.from(new Set((this.sourceData||[]).map(g=>g[this.dimensions[1]]))),l=parseInt((this.sourceData||[]).reduce((g,u)=>g+parseFloat(u==null?void 0:u.metric),0),10),c=i.map((g,u)=>{const b=(a[u]/l*100).toFixed(2);return{name:`${g} (${b}%)`,value:a[u]}}),h=((t=this.styleData)==null?void 0:t.innerRadius)||"0%",d=((e=this.styleData)==null?void 0:e.outerRadius)||"100%",p=[h,d];return this.styleData.legend=xe.getLegendOpions({borderRadius:10,height:"100%",padding:10,type:"scroll",itemWidth:14,itemHeight:14,formatter:g=>g==null?void 0:g.replace("null","Не визначено"),textStyle:{fontSize:"14px"},...((n=this.styleData)==null?void 0:n.legend)||{}}),this.styleData.label=xe.getLabelOptions((s=this.styleData)==null?void 0:s.label),this.styleData.show_legend=((r=this.styleData)==null?void 0:r.show_legend)??!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:p,center:["50%","60%"],height:"75%",...Z(this.styleData),data:c}]}}catch(i){return console.error("Error in prepareData:",i),null}},async initChart(t){try{if(!t){console.warn("No series data available for chart initialization");return}const e=this.$refs.chart;if(!e){console.warn("Chart DOM element not found");return}this.chartInstance=echarts.init(e);const n={tooltip:{trigger:"item",formatter:s=>this.buildTooltipForDonut(s,[s.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:t,...Z(this.styleData||{})};this.chartInstance.setOption(n),this.$emit("update:currentWidget",this.chartInstance),this.chartInstance.resize(),window.addEventListener("resize",()=>{var s;(s=this.chartInstance)==null||s.resize()})}catch(e){console.error("Error in initChart:",e)}}}},sr=["id"];function rr(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",{id:i.uniqueID,ref:"chart",class:"h-full min-h-[200px] flex items-center"},null,8,sr)}const jt=E(nr,[["render",rr]]),or=Object.freeze(Object.defineProperty({__proto__:null,default:jt},Symbol.toStringTag,{value:"Module"})),ir={name:"VsLine",mixins:[O],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:t,xs:e}=this.prepareData();t&&this.initChart(t,e)},methods:{onChangedData(){try{if(this.sourceData){const{series:t,xs:e,ys:n}=this.prepareData();t&&(this==null||this.initChart(t,e,n))}}catch(t){console.error(t)}},prepareData(){var t,e;try{const n=Array.from(new Set(this.sourceData.map(a=>a[this.dimensions[0]])));let s;this.dimensions[0].includes("date")?s=n.map(a=>X(a)):s=[...n];const r=this.sourceData.map(a=>parseFloat(a[this.dimensions[1]]));let i;return(t=this.styleData)!=null&&t.stack?i=this.dimensions.slice(1).map(l=>({name:l,type:"line",stack:"a",areaStyle:this.styleData.area?{}:null,data:this.sourceData.filter(c=>parseFloat(c[l])).map(c=>parseFloat(c[l]))})):i=[{name:this.title,type:"line",areaStyle:(e=this.styleData)!=null&&e.area?{}:null,data:r,stack:"a"}],{series:i,xs:s}}catch(n){return console.error(n),null}}}},ar=["id"];function lr(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",{id:r.uniqueID,ref:"chart",style:{height:"400px"}},null,8,ar)}const Ut=E(ir,[["render",lr]]),cr=Object.freeze(Object.defineProperty({__proto__:null,default:Ut},Symbol.toStringTag,{value:"Module"})),dr={name:"VsStat",mixins:[O],data(){return{restDimensions:[],sumValue:0,columns:null,showTooltip:-1}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){this.columns=Object.keys(this.sourceData[0]);const t=this.getValues();this.sumValue=t.reduce((e,n)=>e+n,0),this.sourceData.forEach((e,n)=>{e.color=n<Mt.length-1?Mt[n]:Js()})},formattedValue(t){const e=parseFloat(t);return R(e)}}},hr={class:"flex flex-col w-full h-full pt-[16px] rounded-xl"},pr={class:"flex flex-col justify-between w-full h-full"},ur={class:"w-full h-full pb-6 space-y-4"},fr={class:"flex w-full h-3 rounded-full gap-x-1 min-h-3 custom-x-scrollbar"},mr=["onMouseover"],gr={key:0,class:"absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"},br={class:"h-[calc(100%-20px)] w-full custom-scrollbar"},yr={class:"grid items-center justify-between grid-cols-2 py-2 gap-x-4"},wr={class:"flex items-center"},xr={class:"text-sm text-gray-800"},kr={class:"text-end"},_r={class:"text-sm text-gray-500"};function Er(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",hr,[o.createElementVNode("div",pr,[o.createElementVNode("div",ur,[o.createElementVNode("div",fr,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.sourceData,(a,l)=>{var c,h,d,p;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap",`bg-[${a.color}]`]),style:o.normalizeStyle({width:`${parseFloat(a==null?void 0:a[(c=r.columns)==null?void 0:c[1]])/r.sumValue*100}%`}),role:"progressbar","aria-valuenow":"42","aria-valuemin":"0","aria-valuemax":"100",onMouseover:m=>r.showTooltip=l,onMouseleave:e[0]||(e[0]=m=>r.showTooltip=-1)},[r.showTooltip>-1?(o.openBlock(),o.createElementBlock("div",gr,o.toDisplayString(t.sourceData[r.showTooltip][r.columns[0]])+" "+o.toDisplayString((parseFloat((p=(h=t.sourceData)==null?void 0:h[r.showTooltip])==null?void 0:p[(d=r.columns)==null?void 0:d[1]])/r.sumValue*100).toFixed(2))+"% ",1)):o.createCommentVNode("",!0)],46,mr)}),256))]),o.createElementVNode("ul",br,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.sourceData,a=>{var l,c;return o.openBlock(),o.createElementBlock("li",yr,[o.createElementVNode("div",wr,[o.createElementVNode("span",{class:o.normalizeClass(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]",`bg-[${a.color}]`])},null,2),o.createElementVNode("span",xr,o.toDisplayString((a==null?void 0:a[(l=r.columns)==null?void 0:l[0]])||"Не визначено"),1)]),o.createElementVNode("div",kr,[o.createElementVNode("span",_r,o.toDisplayString(i.formattedValue(a==null?void 0:a[(c=r.columns)==null?void 0:c[1]])||"-"),1)])])}),256))])])])])}const qt=E(dr,[["render",Er]]),Sr=Object.freeze(Object.defineProperty({__proto__:null,default:qt},Symbol.toStringTag,{value:"Module"})),$r={name:"VsProgressBar",mixins:[O],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){var e;this.columns=Object.keys((e=this.sourceData)==null?void 0:e[0])||null;const t=this.getValues();this.maxValue=Math.max(...t)},formattedValue(t){return R(t)}}},Cr={key:0,class:"flex flex-col h-full pt-[16px] rounded-xl"},Br={class:"h-full pt-0 pb-6 space-y-4"},Dr={class:"h-full space-y-4 custom-scrollbar"},Nr={class:"flex items-center justify-between mr-2 gap-x-2"},Vr={class:"grid items-center w-full grid-cols-2 gap-x-2"},Tr={class:"text-sm text-gray-800"},Rr={class:"flex justify-end",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100"},zr={class:"min-w-[60px] text-end"},Lr={class:"text-sm text-gray-500"};function Or(t,e,n,s,r,i){return r.columns?(o.openBlock(),o.createElementBlock("div",Cr,[o.createElementVNode("div",Br,[o.createElementVNode("ul",Dr,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.sourceData,(a,l)=>(o.openBlock(),o.createElementBlock("li",Nr,[o.createElementVNode("div",Vr,[o.createElementVNode("span",Tr,o.toDisplayString(a[r.columns[0]]),1),o.createElementVNode("div",Rr,[o.createElementVNode("div",{class:"h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",style:o.normalizeStyle({width:`${parseFloat(a[r.columns[1]])/r.maxValue*100}%`})},null,4)])]),o.createElementVNode("div",zr,[o.createElementVNode("span",Lr,o.toDisplayString(i.formattedValue(a[r.columns[1]])),1)])]))),256))])])])):o.createCommentVNode("",!0)}const Ht=E($r,[["render",Or]]),Ar=Object.freeze(Object.defineProperty({__proto__:null,default:Ht},Symbol.toStringTag,{value:"Module"})),Fr={name:"VsListbar",mixins:[O],props:["source"],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch(t){console.error(t)}},prepareData(){var e,n,s;this.columns=Object.keys(((e=this.sourceData)==null?void 0:e[0])||{});const t=(n=this.sourceData)==null?void 0:n.map(r=>{var i;return r==null?void 0:r[(i=this.columns)==null?void 0:i[1]]});this.maxValue=Math.max(...t||[]),this.restDimensions=(s=this.columns)==null?void 0:s.filter((r,i)=>i!==0)},formattedValue(t){return R(t)},getWidth(t){return`${t/this.maxValue*100}%`}}},Ir={class:"h-full pt-[20px] list-bar"},Mr={class:"space-y-2 custom-scrollbar h-full h-[calc(100%-20px)]"},Pr={class:"relative w-full truncate"},jr={class:"relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800"},Ur={class:"text-[14px] text-gray-500"};function qr(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",Ir,[o.createElementVNode("ul",Mr,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.sourceData,(a,l)=>{var c,h,d;return o.openBlock(),o.createElementBlock("li",{key:l,class:"flex items-center justify-between w-full gap-x-2"},[o.createElementVNode("div",Pr,[o.createElementVNode("span",jr,o.toDisplayString((a==null?void 0:a[(c=r.columns)==null?void 0:c[0]])||"Без категорії"),1),o.createElementVNode("div",{class:o.normalizeClass(["absolute inset-y-0 h-full rounded start-0",a!=null&&a[(h=r.columns)==null?void 0:h[0]]?"bg-indigo-100":"bg-gray-100"]),style:o.normalizeStyle({width:i.getWidth(a==null?void 0:a[(d=r.columns)==null?void 0:d[1]])})},null,6)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.restDimensions,(p,m)=>(o.openBlock(),o.createElementBlock("div",{key:m,class:"w-20 mr-2 text-end"},[o.createElementVNode("span",Ur,o.toDisplayString(i.formattedValue(a==null?void 0:a[p])),1)]))),128))])}),128))])])}const Wt=E(Fr,[["render",qr]]),Hr=Object.freeze(Object.defineProperty({__proto__:null,default:Wt},Symbol.toStringTag,{value:"Module"})),je={week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік"},Wr=["onClick"],Zr={class:"flex items-center justify-between w-full"},Jr={key:0},Gr={__name:"vs-bi-dropdown",props:{title:String,options:[Array,String],value:{type:String}},emits:["selected"],setup(t,{emit:e}){const n=t,s=e,r=o.ref(!1),i=o.ref(n.value||null),a=o.ref(null),l=o.computed(()=>typeof n.options=="string"?n.options.split(",").map((g,u)=>({id:u,text:g.trim()})):n.options),c=o.computed(()=>{const g=l.value.find(u=>(u.id||u)===i.value);return g?g.text||g:n.title}),h=g=>{i.value=g.id||g,r.value=!1,s("selected",(g==null?void 0:g.id)||g),document.removeEventListener("click",d)},d=g=>{a.value&&!a.value.contains(g.target)&&(r.value=!1,document.removeEventListener("click",d))},p=()=>{r.value=!r.value,r.value?setTimeout(()=>{document.addEventListener("click",d)},200):document.removeEventListener("click",d)},m=g=>(je==null?void 0:je[g])||g;return o.onUnmounted(()=>{document.removeEventListener("click",d)}),(g,u)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("button",{type:"button","aria-expanded":"true",class:"hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",onClick:p},[o.createTextVNode(o.toDisplayString(m(c.value))+" ",1),u[0]||(u[0]=o.createElementVNode("svg",{class:"shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),r.value?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"biDropdown",ref:a,"data-hs-select-dropdown":"",class:"absolute mt-2 z-50 w-48 p-1 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-950 opened",role:"listbox",tabindex:"-1","aria-orientation":"vertical",style:{"margin-top":"10px"}},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,b=>(o.openBlock(),o.createElementBlock("div",{key:b.id||b,class:"cursor-pointer selected hs-selected:bg-gray-100 dark:hs-selected:bg-neutral-800 py-1.5 px-2 w-full text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:y=>h(b)},[o.createElementVNode("div",Zr,[o.createElementVNode("span",null,o.toDisplayString(m(b.text||b)),1),i.value===(b.id||b)?(o.openBlock(),o.createElementBlock("span",Jr,u[1]||(u[1]=[o.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):o.createCommentVNode("",!0)])],8,Wr))),128))],512)):o.createCommentVNode("",!0)],64))}},Kr={"bi-bar":o.defineAsyncComponent(()=>Promise.resolve().then(()=>Xs)),"bi-number":o.defineAsyncComponent(()=>Promise.resolve().then(()=>Ci)),"bi-text":o.defineAsyncComponent(()=>Promise.resolve().then(()=>ca)),"bi-listbar":o.defineAsyncComponent(()=>Promise.resolve().then(()=>Hr)),"bi-pie":o.defineAsyncComponent(()=>Promise.resolve().then(()=>or)),"bi-donut":o.defineAsyncComponent(()=>Promise.resolve().then(()=>tr)),"bi-line":o.defineAsyncComponent(()=>Promise.resolve().then(()=>cr)),"bi-stat":o.defineAsyncComponent(()=>Promise.resolve().then(()=>Sr)),"bi-pivot":o.defineAsyncComponent(()=>Promise.resolve().then(()=>_i)),"bi-progress":o.defineAsyncComponent(()=>Promise.resolve().then(()=>Ar)),"bi-funnel":o.defineAsyncComponent(()=>Promise.resolve().then(()=>ua)),"bi-map":o.defineAsyncComponent(()=>Promise.resolve().then(()=>wl)),"bi-cluster":o.defineAsyncComponent(()=>Promise.resolve().then(()=>Ql)),"bi-table":o.defineAsyncComponent(()=>Promise.resolve().then(()=>cc))},Qr={class:"flex items-center space-x-2"},Xr=o.defineComponent({__name:"vs-bi-switch",props:o.mergeModels({leftLabel:{},rightLabel:{},modelValue:{type:Boolean}},{modelValue:{default:()=>!1,type:Boolean},modelModifiers:{}}),emits:o.mergeModels(["update:is-enabled"],["update:modelValue"]),setup(t,{emit:e}){const n=e,s=o.useModel(t,"modelValue"),r=()=>{n("update:is-enabled",s)};return(i,a)=>(o.openBlock(),o.createElementBlock("div",Qr,[i.leftLabel?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["transition-colors",{"text-blue-500":!s.value}])},o.toDisplayString(i.leftLabel),3)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>s.value=l),type:"checkbox",class:"relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",onChange:r},null,544),[[o.vModelCheckbox,s.value]]),i.rightLabel?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["transition-colors",{"text-blue-500":s.value}])},o.toDisplayString(i.rightLabel),3)):o.createCommentVNode("",!0)]))}}),Yr={},vr={class:"flex items-center justify-center h-full"};function eo(t,e){return o.openBlock(),o.createElementBlock("div",vr,e[0]||(e[0]=[o.createElementVNode("div",{class:"text-center text-gray-500"},[o.createElementVNode("h2",{class:"text-2xl font-bold"},"No data available")],-1)]))}const to=E(Yr,[["render",eo]]),no={},so={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function ro(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("svg",so,e[0]||(e[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),o.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),o.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const oo={components:{VsBiDropdown:Gr,VsBiSwitch:Xr,VsNoDataChart:to,IconDownload:E(no,[["render",ro]]),...Kr},props:{dashboard:{type:String},prefix:{type:String,default:""},widget:{type:String},filterURl:{type:String},dashboardWidgets:{type:Object},selectedWidget:{type:String}},data(){return{checked:[],selected:[],currentWidget:null,widgetData:[]}},computed:{computedTitle(){var e,n;const t=(e=this.dashboardWidgets)==null?void 0:e.find(s=>s.name===this.widget);return((n=t==null?void 0:t.data)==null?void 0:n.title)||(t==null?void 0:t.title)||""},computedType(){var e;const t=(e=this.dashboardWidgets)==null?void 0:e.find(n=>n.name===this.widget);return(t==null?void 0:t.type)||"text"},controls(){var e;return Object.keys(((e=this.widgetData)==null?void 0:e.controls)||{}).map(n=>{var s,r,i;return{name:n,options:typeof((s=this.widgetData)==null?void 0:s.controls)=="boolean"?!1:(i=(r=this.widgetData)==null?void 0:r.controls)==null?void 0:i[n]}})}},mounted(){this.prefix&&(V.defaults.baseURL=this.prefix)},watch:{filterURl(t){var e,n;(n=(e=this.$refs)==null?void 0:e.chart)==null||n.setFilter(t)},selectedWidget(t,e){var n;t!==e&&t===((n=this.widgetData)==null?void 0:n.id)&&this.$emit("update:current-widget-data",this.widgetData)},widgetData(t,e){if((t==null?void 0:t.id)===(e==null?void 0:e.id))return;const s=new URLSearchParams(window.top.location.search).get("widget");s&&s===(t==null?void 0:t.id)&&this.$emit("update:current-widget-data",t)}},methods:{changeStyleHandler(t,e){var n;(n=this.$refs.chart)==null||n.changeStyle(t,e)},selectedOptionHandler(t,e){let n=!0;this.selected.forEach(s=>{s.name===e&&(s.option=t,n=!1)}),n&&this.selected.push({name:e,option:t}),this.makeUpUrl()},makeUpUrl(){var e;let t=`/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`;this.selected.forEach((n,s)=>{t+=`&${n.name}=${n.option}`}),(e=this.$refs.chart)==null||e.getDataFromURL(t)},exportChart(){if(this.currentWidget){const t=this.currentWidget.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),e=document.createElement("a");e.href=t,e.download="chart.png",document.body.appendChild(e),e.click(),document.body.removeChild(e)}}}},io={key:0,class:"text-[16px] flex max-w-full items-center min-h-0 flex justify-between max-h-[50px] h-fit shrink-0"},ao={class:"flex items-center justify-between w-full"},lo={class:"grid"},co={class:"text-gray-800 max-h-[30px] inline-block line-clamp-1 font-semibold"},ho={class:"flex flex-col justify-end"},po={key:0,class:"flex items-center justify-end w-full gap-2"},uo={class:"w-full h-full"};function fo(t,e,n,s,r,i){var d,p,m,g,u,b,y,_,x;const a=o.resolveComponent("VsBiDropdown"),l=o.resolveComponent("VsBiSwitch"),c=o.resolveComponent("IconDownload"),h=o.resolveComponent("VsNoDataChart");return o.openBlock(),o.createElementBlock("div",{ref:"widget",class:o.normalizeClass(["box-border relative h-full p-4 bg-white border border-gray-200 select-auto rounded-xl",[(p=(d=r.widgetData)==null?void 0:d.style)!=null&&p.height?`max-h-[${(g=(m=r.widgetData)==null?void 0:m.style)==null?void 0:g.height}px] h-[${(b=(u=r.widgetData)==null?void 0:u.style)==null?void 0:b.height}px]`:"max-h-[460px]"]])},[["text","cluster","map"].includes(i.computedType)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",io,[o.createElementVNode("div",ao,[o.createElementVNode("div",lo,[o.createElementVNode("span",co,o.toDisplayString(i.computedTitle),1)]),o.createElementVNode("div",ho,[(y=i.controls)!=null&&y.length?(o.openBlock(),o.createElementBlock("span",po,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((_=i.controls)==null?void 0:_.filter(w=>(w==null?void 0:w.options)&&(w==null?void 0:w.name)!=="export"),w=>{var N;return o.openBlock(),o.createElementBlock("div",null,[Array.isArray(w==null?void 0:w.options)?(o.openBlock(),o.createBlock(a,{key:0,title:w==null?void 0:w.name,options:w==null?void 0:w.options,value:(N=r.widgetData)==null?void 0:N.data[w==null?void 0:w.name],onSelected:$=>i.selectedOptionHandler($,w==null?void 0:w.name)},null,8,["title","options","value","onSelected"])):typeof w.options=="boolean"?(o.openBlock(),o.createBlock(l,{key:1,"left-label":w==null?void 0:w.name,"is-enabled":w==null?void 0:w.options,"onUpdate:isEnabled":$=>i.changeStyleHandler(w==null?void 0:w.name,$)},null,8,["left-label","is-enabled","onUpdate:isEnabled"])):o.createCommentVNode("",!0)])}),256)),(x=i.controls)!=null&&x.some(w=>(w==null?void 0:w.name)==="export")?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:e[0]||(e[0]=(...w)=>i.exportChart&&i.exportChart(...w)),class:"h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center"},[o.createVNode(c,{height:"16",width:"16",class:"text-gray-800"})])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])])])),o.createElementVNode("div",uo,[r.widgetData?(o.openBlock(),o.createBlock(o.resolveDynamicComponent("bi-"+i.computedType),{key:0,currentWidget:r.currentWidget,"onUpdate:currentWidget":e[1]||(e[1]=w=>r.currentWidget=w),widgetData:r.widgetData,"onUpdate:widgetData":e[2]||(e[2]=w=>r.widgetData=w),ref:"chart",dashboard:n.dashboard,title:i.computedTitle,widget:n.widget},null,40,["currentWidget","widgetData","dashboard","title","widget"])):(o.openBlock(),o.createBlock(h,{key:1,class:"w-full h-full"}))])],2)}const Zt=E(oo,[["render",fo]]),mo={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},go={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},bo={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},yo={class:"max-w-sm mx-auto mt-6"},wo={class:"font-medium text-gray-800 dark:text-neutral-200"},xo={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function ko(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",go,[o.createElementVNode("div",null,[o.createElementVNode("div",bo,[e[0]||(e[0]=o.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),o.createElementVNode("div",yo,[o.createElementVNode("p",wo,o.toDisplayString(n.title),1),o.createElementVNode("p",xo,o.toDisplayString(n.text),1)])])])])}const _o=E(mo,[["render",ko]]),Eo={},So={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function $o(t,e){return o.openBlock(),o.createElementBlock("svg",So,e[0]||(e[0]=[o.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const Co=E(Eo,[["render",$o]]),Bo={},Do={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-refresh"};function No(t,e){return o.openBlock(),o.createElementBlock("svg",Do,e[0]||(e[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null,-1),o.createElementVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null,-1)]))}const Vo={components:{filterIcon:Co,refreshIcon:E(Bo,[["render",No]])},props:["filterScheme"],emits:["filters:changed"],data(){return{rows:[],isFilterVisible:!1,rowList:[],activeFilters:"",filters:{}}},async mounted(){const e=await(await new URLSearchParams(window.top.location.search)).get("filter");this.filters.url=e||""},computed:{activeFiltersCount(){var t,e;return(t=this.filters)!=null&&t.url?((e=this.filters)==null?void 0:e.url.split("=").length)-1:0}},methods:{toggleFilterShown(){this.isFilterVisible=!this.isFilterVisible},handleFilterChange(t){var e,n;this.filters=t,this.activeFilters=(n=(e=this.$refs)==null?void 0:e.filter)==null?void 0:n.activeFilters,this.$emit("filters:changed",this.filters)},resetFilters(){this.$refs.filter&&this.$refs.filter.clearAll(),this.isFilterVisible=!1,this.$emit("filters:changed",""),this.activeFilters=null},closeFilter({target:t}){this.isFilterVisible&&t.classList.contains("filter-container")&&(this.isFilterVisible=!1)}}},To={class:"flex items-center"},Ro={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"};function zo(t,e,n,s,r,i){const a=o.resolveComponent("filterIcon"),l=o.resolveComponent("VsFilterList");return o.openBlock(),o.createElementBlock("div",To,[n.filterScheme?(o.openBlock(),o.createBlock(l,{key:0,ref:"filter",scheme:n.filterScheme,closeFilterBtn:!0,onFilterClose:e[1]||(e[1]=c=>r.isFilterVisible=!1),layout:"default","apply-vue-router":"",history:"",view:"plain",token:t.table,name:"filter",footer:!0,background:!0,onFilterChange:i.handleFilterChange},{button:o.withCtx(()=>[o.createElementVNode("button",{type:"button",class:"py-2 px-2.5 ml-3 h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[0]||(e[0]=(...c)=>i.toggleFilterShown&&i.toggleFilterShown(...c))},[o.createVNode(a),e[2]||(e[2]=o.createTextVNode(" Фільтри ")),i.activeFiltersCount>=1?(o.openBlock(),o.createElementBlock("span",Ro,o.toDisplayString(i.activeFiltersCount),1)):o.createCommentVNode("",!0)])]),_:1},8,["scheme","token","onFilterChange"])):o.createCommentVNode("",!0)])}const Lo=E(Vo,[["render",zo]]),Oo={},Ao={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-edit"};function Fo(t,e){return o.openBlock(),o.createElementBlock("svg",Ao,e[0]||(e[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"},null,-1),o.createElementVNode("path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z"},null,-1),o.createElementVNode("path",{d:"M16 5l3 3"},null,-1)]))}const Io={components:{VsFilterHeader:Lo,IconEditor:E(Oo,[["render",Fo]])},props:{dashboardData:{type:Object,default:null},filters:{type:Array,default:null},dashboardId:{type:String,default:""}},computed:{editorUrl(){return this.dashboardId?`${typeof window<"u"?window.location.origin:""}/editor?dashboard=${encodeURIComponent(this.dashboardId)}`:"#"}},methods:{goToEditor(){var t;this.dashboardId&&((t=this.$router)==null||t.push({path:"/editor",query:{dashboard:this.dashboardId}}))}}},Mo={class:"bg-white px-5 flex gap-4 h-[90px] border border-gray-200 rounded-xl mb-2 pt-[3px] justify-between items-center"},Po={class:"grow"},jo={class:"text-lg font-semibold text-stone-800 dark:text-neutral-200"},Uo={key:0,class:"inline-flex items-center text-sm gap-x-2 text-stone-800 hover:text-stone-500 focus:outline-none focus:text-stone-500 dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400"},qo={class:"flex items-center gap-3"},Ho=["href"];function Wo(t,e,n,s,r,i){var c,h,d;const a=o.resolveComponent("VsFilterHeader"),l=o.resolveComponent("IconEditor");return o.openBlock(),o.createElementBlock("div",Mo,[o.createElementVNode("div",Po,[o.createElementVNode("h1",jo,o.toDisplayString((c=n.dashboardData)==null?void 0:c.title),1),(h=n.dashboardData)!=null&&h.description?(o.openBlock(),o.createElementBlock("button",Uo,o.toDisplayString((d=n.dashboardData)==null?void 0:d.description),1)):o.createCommentVNode("",!0)]),o.createElementVNode("div",qo,[n.filters?(o.openBlock(),o.createBlock(a,{key:0,filterScheme:n.filters,"onFilters:changed":e[0]||(e[0]=p=>t.$emit("filters:changed",p))},null,8,["filterScheme"])):o.createCommentVNode("",!0),n.dashboardId?(o.openBlock(),o.createElementBlock("a",{key:1,href:i.editorUrl,class:"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-stone-700 bg-stone-100 hover:bg-stone-200 rounded-lg transition-colors dark:text-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500",onClick:e[1]||(e[1]=o.withModifiers((...p)=>i.goToEditor&&i.goToEditor(...p),["prevent"]))},[o.createVNode(l,{class:"w-4 h-4 shrink-0"}),e[2]||(e[2]=o.createTextVNode(" Налаштування "))],8,Ho)):o.createCommentVNode("",!0)])])}const Zo=E(Io,[["render",Wo]]);/**
|
|
1
|
+
(function(ot,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],b):(ot=typeof globalThis<"u"?globalThis:ot||self,b(ot.bi={},ot.Vue))})(this,function(ot,b){"use strict";var Gne=Object.defineProperty;var Hne=(ot,b,Ua)=>b in ot?Gne(ot,b,{enumerable:!0,configurable:!0,writable:!0,value:Ua}):ot[b]=Ua;var rt=(ot,b,Ua)=>Hne(ot,typeof b!="symbol"?b+"":b,Ua);/**
|
|
2
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Ua=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cR=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),fR=r=>{const e=cR(r);return e.charAt(0).toUpperCase()+e.slice(1)},hR=(...r)=>r.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim(),ab=r=>r==="";/**
|
|
7
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var ks={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
12
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const dR=({name:r,iconNode:e,absoluteStrokeWidth:t,"absolute-stroke-width":n,strokeWidth:a,"stroke-width":i,size:o=ks.width,color:s=ks.stroke,...l},{slots:u})=>b.h("svg",{...ks,...l,width:o,height:o,stroke:s,"stroke-width":ab(t)||ab(n)||t===!0||n===!0?Number(a||i||ks["stroke-width"])*24/Number(o):a||i||ks["stroke-width"],class:hR("lucide",l.class,...r?[`lucide-${Ua(fR(r))}-icon`,`lucide-${Ua(r)}`]:["lucide-icon"])},[...e.map(c=>b.h(...c)),...u.default?[u.default()]:[]]);/**
|
|
17
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Mt=(r,e)=>(t,{slots:n,attrs:a})=>b.h(dR,{...a,...t,iconNode:e,name:r},n);/**
|
|
22
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const pR=Mt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
27
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const ib=Mt("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
32
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const vR=Mt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
37
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const gR=Mt("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
|
|
42
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const ob=Mt("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
|
|
47
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const sb=Mt("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
|
|
52
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const mR=Mt("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
57
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const yR=Mt("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);/**
|
|
62
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const lb=Mt("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
67
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const _R=Mt("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);/**
|
|
26
72
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
27
73
|
*
|
|
28
74
|
* This source code is licensed under the ISC license.
|
|
29
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/const
|
|
76
|
+
*/const bR=Mt("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
|
31
77
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
32
78
|
*
|
|
33
79
|
* This source code is licensed under the ISC license.
|
|
34
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/
|
|
81
|
+
*/const ub=Mt("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
36
82
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
37
83
|
*
|
|
38
84
|
* This source code is licensed under the ISC license.
|
|
39
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/const
|
|
86
|
+
*/const cb=Mt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
41
87
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
42
88
|
*
|
|
43
89
|
* This source code is licensed under the ISC license.
|
|
44
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const
|
|
91
|
+
*/const xR=Mt("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
46
92
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
47
93
|
*
|
|
48
94
|
* This source code is licensed under the ISC license.
|
|
49
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
96
|
+
*/const wR=Mt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
|
|
97
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const SR=Mt("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]);/**
|
|
102
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const ER=Mt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
|
|
107
|
+
* @license lucide-vue-next v0.546.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const fb=Mt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),yd={week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік"},TR=["onClick"],CR={class:"flex items-center justify-between w-full"},DR={key:0},AR=b.defineComponent({__name:"vs-bi-dropdown",props:{title:{},options:{},value:{default:null}},emits:["selected"],setup(r,{emit:e}){const t=r,n=e,a=b.ref(!1),i=b.ref(t.value??null),o=b.ref(null),s=b.computed(()=>{const d=t.options;return typeof d=="string"?d.split(",").map((p,v)=>({id:v,text:p.trim()})):Array.isArray(d)?d:[]}),l=b.computed(()=>{const d=s.value.find(p=>(p.id??p)===i.value);return d?d.text??String(d):t.title??""}),u=d=>{const p=(d==null?void 0:d.id)??d;i.value=p,a.value=!1,n("selected",p),document.removeEventListener("click",c)},c=d=>{o.value&&!o.value.contains(d.target)&&(a.value=!1,document.removeEventListener("click",c))},f=()=>{a.value=!a.value,a.value?setTimeout(()=>{document.addEventListener("click",c)},200):document.removeEventListener("click",c)},h=d=>(yd==null?void 0:yd[d])??d;return b.onUnmounted(()=>{document.removeEventListener("click",c)}),(d,p)=>(b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("button",{type:"button","aria-expanded":"true",class:"hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",onClick:f},[b.createTextVNode(b.toDisplayString(h(l.value))+" ",1),p[0]||(p[0]=b.createElementVNode("svg",{class:"shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[b.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),a.value?(b.openBlock(),b.createElementBlock("div",{key:0,ref_key:"biDropdown",ref:o,"data-hs-select-dropdown":"",class:"absolute mt-2 z-50 w-48 p-1 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-950 opened",role:"listbox",tabindex:"-1","aria-orientation":"vertical",style:{"margin-top":"10px"}},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(s.value,v=>(b.openBlock(),b.createElementBlock("div",{key:v.id||v,class:"cursor-pointer selected hs-selected:bg-gray-100 dark:hs-selected:bg-neutral-800 py-1.5 px-2 w-full text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:g=>u(v)},[b.createElementVNode("div",CR,[b.createElementVNode("span",null,b.toDisplayString(h(v.text||v)),1),i.value===(v.id||v)?(b.openBlock(),b.createElementBlock("span",DR,p[1]||(p[1]=[b.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[b.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):b.createCommentVNode("",!0)])],8,TR))),128))],512)):b.createCommentVNode("",!0)],64))}}),MR={class:"flex items-center space-x-2"},kR=b.defineComponent({__name:"vs-bi-switch",props:b.mergeModels({leftLabel:{},rightLabel:{},modelValue:{type:Boolean}},{modelValue:{default:()=>!1,type:Boolean},modelModifiers:{}}),emits:b.mergeModels(["update:is-enabled"],["update:modelValue"]),setup(r,{emit:e}){const t=e,n=b.useModel(r,"modelValue"),a=()=>{t("update:is-enabled",n)};return(i,o)=>(b.openBlock(),b.createElementBlock("div",MR,[i.leftLabel?(b.openBlock(),b.createElementBlock("div",{key:0,class:b.normalizeClass(["transition-colors",{"text-blue-500":!n.value}])},b.toDisplayString(i.leftLabel),3)):b.createCommentVNode("",!0),b.withDirectives(b.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=s=>n.value=s),type:"checkbox",class:"relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",onChange:a},null,544),[[b.vModelCheckbox,n.value]]),i.rightLabel?(b.openBlock(),b.createElementBlock("div",{key:1,class:b.normalizeClass(["transition-colors",{"text-blue-500":n.value}])},b.toDisplayString(i.rightLabel),3)):b.createCommentVNode("",!0)]))}}),nt=(r,e)=>{const t=r.__vccOpts||r;for(const[n,a]of e)t[n]=a;return t},NR={},IR={class:"flex items-center justify-center h-full"};function LR(r,e){return b.openBlock(),b.createElementBlock("div",IR,e[0]||(e[0]=[b.createElementVNode("div",{class:"text-center text-gray-500"},[b.createElementVNode("h2",{class:"text-2xl font-bold"},"No data available")],-1)]))}const RR=nt(NR,[["render",LR]]),hb={"bi-bar":b.defineAsyncComponent(()=>Promise.resolve().then(()=>Oee)),"bi-number":b.defineAsyncComponent(()=>Promise.resolve().then(()=>qte)),"bi-text":b.defineAsyncComponent(()=>Promise.resolve().then(()=>Jte)),"bi-listbar":b.defineAsyncComponent(()=>Promise.resolve().then(()=>Ate)),"bi-pie":b.defineAsyncComponent(()=>Promise.resolve().then(()=>Hee)),"bi-donut":b.defineAsyncComponent(()=>Promise.resolve().then(()=>zee)),"bi-line":b.defineAsyncComponent(()=>Promise.resolve().then(()=>Zee)),"bi-stat":b.defineAsyncComponent(()=>Promise.resolve().then(()=>lte)),"bi-pivot":b.defineAsyncComponent(()=>Promise.resolve().then(()=>Ute)),"bi-progress":b.defineAsyncComponent(()=>Promise.resolve().then(()=>bte)),"bi-funnel":b.defineAsyncComponent(()=>Promise.resolve().then(()=>nre)),"bi-map":b.defineAsyncComponent(()=>Promise.resolve().then(()=>tne)),"bi-cluster":b.defineAsyncComponent(()=>Promise.resolve().then(()=>xne)),"bi-table":b.defineAsyncComponent(()=>Promise.resolve().then(()=>Rne))};let db="/api";function $u(r){db=r||"/api"}function OR(r,e){const t=db.replace(/\/$/,""),a=r.startsWith("http")||r.startsWith("//")||t&&r.startsWith(t)?r:`${t}${r.startsWith("/")?r:`/${r}`}`;if(!e||!Object.keys(e).length)return a;const i=new URLSearchParams;Object.entries(e).forEach(([s,l])=>{l!==void 0&&l!==""&&i.set(s,String(l))});const o=i.toString();return o?`${a}${a.includes("?")?"&":"?"}${o}`:a}async function Gu(r,e={}){const{params:t,...n}=e,a=OR(r,t),i=await fetch(a,{...n,headers:{"Content-Type":"application/json",...n.headers}});if(!i.ok){const s=new Error(i.statusText);throw s.status=i.status,s}const o=await i.text();if(o)try{return JSON.parse(o)}catch{return o}}const kt={get(r,e){return Gu(r,{...e,method:"GET"})},post(r,e){return Gu(r,{method:"POST",body:e!=null?JSON.stringify(e):void 0})},put(r,e){return Gu(r,{method:"PUT",body:e!=null?JSON.stringify(e):void 0})},delete(r){return Gu(r,{method:"DELETE"})}},PR={key:0,class:"text-[16px] flex max-w-full items-center min-h-0 justify-between max-h-[50px] h-fit shrink-0"},BR={class:"flex items-center justify-between w-full"},VR={class:"grid"},zR={class:"text-gray-800 max-h-[30px] inline-block line-clamp-1 font-semibold"},FR={class:"flex flex-col justify-end"},$R={key:0,class:"flex items-center justify-end w-full gap-2"},GR={class:"w-full h-full"},Ns=b.defineComponent({__name:"vs-widget",props:{dashboard:{},prefix:{default:""},widget:{},filterURl:{},dashboardWidgets:{},selectedWidget:{}},emits:["update:current-widget-data"],setup(r,{emit:e}){const t=r,n=e,a=b.ref(null),i=b.ref(null),o=b.ref(null),s=b.ref({}),l=b.ref([]),u=b.computed(()=>{var y,_;const m=(y=t.dashboardWidgets)==null?void 0:y.find(x=>x.name===t.widget);return((_=m==null?void 0:m.data)==null?void 0:_.title)??(m==null?void 0:m.title)??""}),c=b.computed(()=>{var y;const m=(y=t.dashboardWidgets)==null?void 0:y.find(_=>_.name===t.widget);return(m==null?void 0:m.type)??"text"}),f=b.computed(()=>{var y;const m=(y=s.value)==null?void 0:y.controls;return!m||typeof m=="boolean"?[]:Object.keys(m).map(_=>({name:_,options:m[_]}))}),h=b.computed(()=>{const m=c.value?`bi-${c.value}`:"";return m&&m in hb?hb[m]:null});function d(m,y){var _,x;(x=(_=i.value)==null?void 0:_.changeStyle)==null||x.call(_,m,y)}function p(m,y){const _=l.value.find(x=>x.name===y);_?_.option=m:l.value.push({name:y,option:m}),v()}function v(){var y,_;let m=`/bi-data?dashboard=${t.dashboard}&widget=${t.widget}`;l.value.forEach(x=>{m+=`&${x.name}=${x.option}`}),(_=(y=i.value)==null?void 0:y.getDataFromURL)==null||_.call(y,m)}function g(){const m=o.value;if(m!=null&&m.getDataURL){const y=m.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),_=document.createElement("a");_.href=y,_.download="chart.png",document.body.appendChild(_),_.click(),document.body.removeChild(_)}}return b.onMounted(()=>{t.prefix&&$u(t.prefix)}),b.watch(()=>t.filterURl,m=>{var y,_;m&&((_=(y=i.value)==null?void 0:y.setFilter)==null||_.call(y,m))}),b.watch(()=>t.selectedWidget,(m,y)=>{var _;m!==y&&m===((_=s.value)==null?void 0:_.id)&&n("update:current-widget-data",s.value)}),b.watch(s,(m,y)=>{if((m==null?void 0:m.id)===(y==null?void 0:y.id))return;const _=typeof window<"u"?new URLSearchParams(window.top.location.search).get("widget"):null;_&&_===(m==null?void 0:m.id)&&n("update:current-widget-data",m)},{deep:!0}),(m,y)=>{var _,x,w,S,E,T,C,D,M;return b.openBlock(),b.createElementBlock("div",{ref_key:"widgetRef",ref:a,class:b.normalizeClass(["box-border relative h-full p-4 bg-white border border-gray-200 select-auto rounded-xl",[(x=(_=s.value)==null?void 0:_.style)!=null&&x.height?`max-h-[${(S=(w=s.value)==null?void 0:w.style)==null?void 0:S.height}px] h-[${(T=(E=s.value)==null?void 0:E.style)==null?void 0:T.height}px]`:"max-h-[460px]"]])},[["text","cluster","map"].includes(c.value)?b.createCommentVNode("",!0):(b.openBlock(),b.createElementBlock("div",PR,[b.createElementVNode("div",BR,[b.createElementVNode("div",VR,[b.createElementVNode("span",zR,b.toDisplayString(u.value),1)]),b.createElementVNode("div",FR,[(C=f.value)!=null&&C.length?(b.openBlock(),b.createElementBlock("span",$R,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList((D=f.value)==null?void 0:D.filter(k=>(k==null?void 0:k.options)&&(k==null?void 0:k.name)!=="export"),k=>{var N,L;return b.openBlock(),b.createElementBlock("div",{key:k==null?void 0:k.name},[Array.isArray(k==null?void 0:k.options)?(b.openBlock(),b.createBlock(AR,{key:0,title:k==null?void 0:k.name,options:k==null?void 0:k.options,value:((L=(N=s.value)==null?void 0:N.data)==null?void 0:L[k==null?void 0:k.name])??null,onSelected:R=>p(R,k==null?void 0:k.name)},null,8,["title","options","value","onSelected"])):typeof k.options=="boolean"?(b.openBlock(),b.createBlock(kR,{key:1,"left-label":k==null?void 0:k.name,"model-value":!!(k!=null&&k.options),"onUpdate:isEnabled":R=>d(k==null?void 0:k.name,R)},null,8,["left-label","model-value","onUpdate:isEnabled"])):b.createCommentVNode("",!0)])}),128)),(M=f.value)!=null&&M.some(k=>(k==null?void 0:k.name)==="export")?(b.openBlock(),b.createElementBlock("button",{key:0,type:"button",class:"h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center",onClick:g},[b.createVNode(b.unref(gR),{size:16,class:"text-gray-800"})])):b.createCommentVNode("",!0)])):b.createCommentVNode("",!0)])])])),b.createElementVNode("div",GR,[h.value?(b.openBlock(),b.createBlock(b.resolveDynamicComponent(h.value),{key:0,ref_key:"chartRef",ref:i,"current-widget":o.value,"onUpdate:currentWidget":y[0]||(y[0]=k=>o.value=k),"widget-data":s.value,"onUpdate:widgetData":y[1]||(y[1]=k=>s.value=k),dashboard:m.dashboard,title:u.value,widget:m.widget},null,40,["current-widget","widget-data","dashboard","title","widget"])):(b.openBlock(),b.createBlock(RR,{key:1,class:"w-full h-full"}))])],2)}}}),HR={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},UR={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},WR={class:"max-w-sm mx-auto mt-6"},YR={class:"font-medium text-gray-800 dark:text-neutral-200"},ZR={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"},Hu=b.defineComponent({__name:"vs-new-nodata",props:{title:{default:"Дані для відображення відсутні"},text:{default:"Змініть параметри пошуку або спробуйте пізніше"}},setup(r){return(e,t)=>(b.openBlock(),b.createElementBlock("div",HR,[b.createElementVNode("div",null,[b.createElementVNode("div",UR,[t[0]||(t[0]=b.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),b.createElementVNode("div",WR,[b.createElementVNode("p",YR,b.toDisplayString(e.title),1),b.createElementVNode("p",ZR,b.toDisplayString(e.text),1)])])])]))}}),qR={components:{filterIcon:{__name:"filter",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(sb),b.mergeProps(e.$attrs,{size:24}),null,16))}},refreshIcon:{__name:"refresh",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(xR),b.mergeProps(e.$attrs,{size:24}),null,16))}}},props:["filterScheme"],emits:["filters:changed"],data(){return{rows:[],isFilterVisible:!1,rowList:[],activeFilters:"",filters:{}}},async mounted(){const e=await(await new URLSearchParams(window.top.location.search)).get("filter");this.filters.url=e||""},computed:{activeFiltersCount(){var r,e;return(r=this.filters)!=null&&r.url?((e=this.filters)==null?void 0:e.url.split("=").length)-1:0}},methods:{toggleFilterShown(){this.isFilterVisible=!this.isFilterVisible},handleFilterChange(r){var e,t;this.filters=r,this.activeFilters=(t=(e=this.$refs)==null?void 0:e.filter)==null?void 0:t.activeFilters,this.$emit("filters:changed",this.filters)},resetFilters(){this.$refs.filter&&this.$refs.filter.clearAll(),this.isFilterVisible=!1,this.$emit("filters:changed",""),this.activeFilters=null},closeFilter({target:r}){this.isFilterVisible&&r.classList.contains("filter-container")&&(this.isFilterVisible=!1)}}},XR={class:"flex items-center"},KR={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"};function QR(r,e,t,n,a,i){const o=b.resolveComponent("filterIcon"),s=b.resolveComponent("VsFilterList");return b.openBlock(),b.createElementBlock("div",XR,[t.filterScheme?(b.openBlock(),b.createBlock(s,{key:0,ref:"filter",scheme:t.filterScheme,closeFilterBtn:!0,onFilterClose:e[1]||(e[1]=l=>a.isFilterVisible=!1),layout:"default","apply-vue-router":"",history:"",view:"plain",token:r.table,name:"filter",footer:!0,background:!0,onFilterChange:i.handleFilterChange},{button:b.withCtx(()=>[b.createElementVNode("button",{type:"button",class:"py-2 px-2.5 ml-3 h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[0]||(e[0]=(...l)=>i.toggleFilterShown&&i.toggleFilterShown(...l))},[b.createVNode(o),e[2]||(e[2]=b.createTextVNode(" Фільтри ")),i.activeFiltersCount>=1?(b.openBlock(),b.createElementBlock("span",KR,b.toDisplayString(i.activeFiltersCount),1)):b.createCommentVNode("",!0)])]),_:1},8,["scheme","token","onFilterChange"])):b.createCommentVNode("",!0)])}const jR={components:{VsFilterHeader:nt(qR,[["render",QR]])},props:{dashboardData:{type:Object,default:null},filters:{type:Array,default:null}}},JR={class:"bg-white px-5 flex gap-4 h-[90px] border border-gray-200 rounded-xl mb-2 pt-[3px] justify-between items-center"},eO={class:"grow"},tO={class:"text-lg font-semibold text-stone-800 dark:text-neutral-200"},rO={key:0,class:"inline-flex items-center text-sm gap-x-2 text-stone-800 hover:text-stone-500 focus:outline-none focus:text-stone-500 dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400"},nO={key:0,class:"flex items-center gap-3"};function aO(r,e,t,n,a,i){var s,l,u;const o=b.resolveComponent("VsFilterHeader");return b.openBlock(),b.createElementBlock("div",JR,[b.createElementVNode("div",eO,[b.createElementVNode("h1",tO,b.toDisplayString((s=t.dashboardData)==null?void 0:s.title),1),(l=t.dashboardData)!=null&&l.description?(b.openBlock(),b.createElementBlock("button",rO,b.toDisplayString((u=t.dashboardData)==null?void 0:u.description),1)):b.createCommentVNode("",!0)]),t.filters?(b.openBlock(),b.createElementBlock("div",nO,[b.createVNode(o,{filterScheme:t.filters,"onFilters:changed":e[0]||(e[0]=c=>r.$emit("filters:changed",c))},null,8,["filterScheme"])])):b.createCommentVNode("",!0)])}const iO=nt(jR,[["render",aO]]),oO={class:"flex items-center gap-2 py-6 text-sm text-gray-600","aria-label":"Breadcrumb"},sO={key:0,class:"text-gray-400 shrink-0"},lO={key:2,class:"text-gray-900 font-medium truncate"},pb={__name:"vs-breadcrumbs",props:{items:{type:Array,default:()=>[]}},setup(r){return(e,t)=>{const n=b.resolveComponent("router-link");return b.openBlock(),b.createElementBlock("nav",oO,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.items,(a,i)=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:i},[i>0?(b.openBlock(),b.createElementBlock("span",sO,[b.createVNode(b.unref(vR),{class:"w-4 h-4"})])):b.createCommentVNode("",!0),a.to?(b.openBlock(),b.createBlock(n,{key:1,to:a.to,class:"hover:text-gray-900 transition-colors"},{default:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(a.label),1)]),_:2},1032,["to"])):(b.openBlock(),b.createElementBlock("span",lO,b.toDisplayString(a.label),1))],64))),128))])}}},uO={components:{VsWidget:Ns,VsNewNodata:Hu,VsHeader:iO,VsBreadcrumbs:pb},props:["id","prefix"],data(){return{widgets:[],panels:[],error:!1,selectedPanel:"",filterURl:null,dashboardData:null}},async mounted(){$u(this.prefix||"/api"),await this.fetchData()},methods:{async fetchData(){if(this.id)try{const r=await kt.get(`/bi-dashboard/${this.id}`);this.dashboardData=r}catch(r){console.error(r)}},columnClass(r){const e=r!=null&&r.col?r==null?void 0:r.col:12;return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[e]||"w-full"},async filterHandler(r){var t;this.filterURl="";let e="&filter=";(t=r==null?void 0:r.url)!=null&&t.length&&(r.url.split("|").forEach(a=>{const i=a.split("=");e+=`${i[0]}=${i[1]}`}),this.filterURl+=e)}}},cO={class:"w-full pb-8 overflow-y-auto mx-auto"},fO={class:"grid flex-grow w-full grid-cols-12 gap-4 h-fit"};function hO(r,e,t,n,a,i){var l;const o=b.resolveComponent("VsNewNodata"),s=b.resolveComponent("VsWidget");return b.openBlock(),b.createElementBlock("div",cO,[b.createElementVNode("div",fO,[a.error||!a.dashboardData?(b.openBlock(),b.createBlock(o,{key:0,class:"col-span-12"})):b.createCommentVNode("",!0),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(((l=a.dashboardData)==null?void 0:l.panels)||[],(u,c)=>{var f;return b.openBlock(),b.createElementBlock("div",{key:c,class:b.normalizeClass([`col-span-${u.col||12}`,"flex flex-col gap-[10px]"])},[(f=u.widgets)!=null&&f.length?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(u.widgets,h=>(b.openBlock(),b.createBlock(s,{key:h,dashboard:t.id,widget:h,"dashboard-widgets":a.dashboardData.widgets,"filter-u-rl":a.filterURl},null,8,["dashboard","widget","dashboard-widgets","filter-u-rl"]))),128)):(b.openBlock(),b.createBlock(s,{key:1,class:"flex flex-col",dashboard:t.id,widget:u.widget,"dashboard-widgets":a.dashboardData.widgets,"filter-u-rl":a.filterURl},null,8,["dashboard","widget","dashboard-widgets","filter-u-rl"]))],2)}),128))])])}const dO=nt(uO,[["render",hO]]);var vb={},gb;(function(r){r.pop="pop",r.push="push"})(gb||(gb={}));var mb;(function(r){r.back="back",r.forward="forward",r.unknown=""})(mb||(mb={}));var yb;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(yb||(yb={}));const pO=Symbol(vb.NODE_ENV!=="production"?"router":""),vO=Symbol(vb.NODE_ENV!=="production"?"route location":"");function _b(){return b.inject(pO)}function gO(r){return b.inject(vO)}const mO={__name:"icon-plus",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(cb),b.mergeProps(e.$attrs,{size:24}),null,16))}},yO={class:"mb-4 overflow-auto scrollbar max-h-96"},_O={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},bO={__name:"vs-editor-create-widget",props:{columns:{type:Array,default:()=>[]},selectedDashboard:String},emits:"update-data",setup(r,{emit:e}){var c;const t=(c=b.getCurrentInstance().proxy)==null?void 0:c.$notify,n=e,a=r,i=b.ref(!1),o=b.ref({}),s=b.ref(),l=async()=>{try{await s.value.doValidation(),await kt.post(`/bi-dashboard/${a.selectedDashboard}`,o.value),await t({type:"success",title:"Успішно!",message:"Віджет успішно створено"}),await n("update-data"),o.value={},i.value=!1}catch{t({type:"error",title:"Помилка!",message:"При спробі створити віджет сталася помилка"})}},u=b.computed(()=>{var f,h,d,p;return{title:{type:"text",label:"Widget title",placeholder:"Widget title",validators:["required"]},x:{type:"radio",label:"X Axis",view:"buttons",style:{size:"xs"},validators:["required"],options:(h=(f=a.columns)==null?void 0:f.filter(v=>(v==null?void 0:v.type)=="text"||(v==null?void 0:v.type)==="date"||(v==null?void 0:v.type)==="timestamp without time zone"||(v==null?void 0:v.type)==="boolean"||(v==null?void 0:v.type)==="integer"))==null?void 0:h.map(({name:v,type:g})=>({id:v,label:v,type:g}))},metric:{type:"radio",label:"Y Axis",view:"buttons",validators:["required"],style:{size:"xs"},options:[{id:"count",label:"count"},...(p=(d=a.columns)==null?void 0:d.filter(v=>(v==null?void 0:v.type)==="numeric"||(v==null?void 0:v.type)==="double precision"))==null?void 0:p.map(({name:v,type:g})=>({id:v,label:v,type:g}))]},col:{type:"radio",label:"Columns count",validators:["required"],options:[{id:1,label:1},{id:2,label:2},{id:3,label:3},{id:4,label:4},{id:6,label:6},{id:9,label:9},{id:12,label:12}]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"Text",ua:"Table",placeholder:"Table"},query:{type:"Text",ua:"Query",placeholder:"Query"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}}});return(f,h)=>{const d=b.resolveComponent("VsPopover"),p=b.resolveComponent("VsForm"),v=b.resolveComponent("VsDialog");return b.openBlock(),b.createElementBlock("div",null,[b.createVNode(d,{placement:"right",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("div",null,[b.createElementVNode("button",{class:"z-50 flex items-center justify-center h-[50px] !w-[50px] text-2xl text-white transition-colors bg-blue-500 rounded-full cursor-pointer hover:bg-blue-700",onClick:h[0]||(h[0]=g=>i.value=!0)},[b.createVNode(mO,{height:"20",width:"20"})])])]),default:b.withCtx(()=>[h[4]||(h[4]=b.createTextVNode(" Створити віджет "))]),_:1}),b.createVNode(v,{visible:i.value,"onUpdate:visible":h[3]||(h[3]=g=>i.value=g),title:"Створити віджет"},{footer:b.withCtx(()=>[b.createElementVNode("div",_O,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:h[2]||(h[2]=g=>i.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:l,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:b.withCtx(()=>[b.createElementVNode("div",yO,[b.createVNode(p,{ref_key:"form",ref:s,scheme:u.value,modelValue:o.value,"onUpdate:modelValue":h[1]||(h[1]=g=>o.value=g)},null,8,["scheme","modelValue"])])]),_:1},8,["visible"])])}}},bb={__name:"delete",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(ER),b.mergeProps(e.$attrs,{size:24}),null,16))}},_d={__name:"close",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(fb),b.mergeProps(e.$attrs,{size:24}),null,16))}},xb={__name:"edit",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(ub),b.mergeProps(e.$attrs,{size:24}),null,16))}},xO={class:"pt-[10px]"},wO={__name:"vs-editor-form-style",props:{widgetName:{type:String},data:{type:Object,default:()=>{}}},setup(r){var h,d,p,v,g,m;const{$notify:e}=b.getCurrentInstance().proxy,t=r,n=b.ref(null),a={show:{label:"Label",type:"switcher",title:"Show label"},rotate:{type:"number",label:"Rotate angel",conditions:["show","==",!0]},align:{type:"radio",view:"buttons",style:{size:"xs"},conditions:["show","==",!0],options:[{id:"center",text:"Center"},{id:"left",text:"Left"},{id:"right",text:"Right"}]},position:{type:"radio",view:"buttons",style:{size:"xs"},conditions:["show","==",!0],options:[{id:"top",text:"Top"},{id:"right",text:"Right"},{id:"left",text:"Left"},{id:"bottom",text:"Bottom"}]}},i={show:{label:"Legend",type:"switcher",title:"Show legend"}},o={show:{label:"Tooltip ",type:"switcher",title:"Show tooltip"}},s=b.ref({...((d=(h=t.data)==null?void 0:h.style)==null?void 0:d.label)||{}}),l=b.ref({...((v=(p=t.data)==null?void 0:p.style)==null?void 0:v.legend)||{}}),u=b.ref({...((m=(g=t.data)==null?void 0:g.style)==null?void 0:m.tooltip)||{}}),c=()=>{const y=new CustomEvent(`update-style-${t.widgetName}`);y.chartId=t.widgetName,y.options={options:{legend:l.value,tooltip:u.value,label:s.value},seriesOptions:s.value},window.dispatchEvent(y)};b.watch(s,c,{deep:!0}),b.watch(l,c,{deep:!0}),b.watch(u,c,{deep:!0});const f=async()=>{try{await kt.put(`/bi-dashboard/${n.value}/${t.widgetName}`,{style:{legend:l.value,tooltip:u.value,label:s.value}});const y=new CustomEvent(`update-style-${t.widgetName}`);y.chartId=t.widgetName,y.options={options:{legend:l.value,tooltip:u.value,label:s.value},seriesOptions:s.value},window.dispatchEvent(y),await e({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{await e({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return b.onMounted(()=>{const y=new URLSearchParams(window.top.location.search);n.value=y.get("dashboard")}),(y,_)=>{const x=b.resolveComponent("VsButton"),w=b.resolveComponent("VsForm");return b.openBlock(),b.createElementBlock("div",xO,[b.createVNode(x,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:f},{default:b.withCtx(()=>_[3]||(_[3]=[b.createTextVNode(" Зберегти ")])),_:1}),b.createVNode(w,{scheme:a,modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=S=>s.value=S),class:"p-0"},null,8,["modelValue"]),b.createVNode(w,{scheme:i,modelValue:l.value,"onUpdate:modelValue":_[1]||(_[1]=S=>l.value=S),class:"p-0"},null,8,["modelValue"]),b.createVNode(w,{scheme:o,modelValue:u.value,"onUpdate:modelValue":_[2]||(_[2]=S=>u.value=S),class:"p-0"},null,8,["modelValue"])])}}};function bd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Wa=bd();function wb(r){Wa=r}const Sb=/[&<>"']/,SO=new RegExp(Sb.source,"g"),Eb=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,EO=new RegExp(Eb.source,"g"),TO={"&":"&","<":"<",">":">",'"':""","'":"'"},Tb=r=>TO[r];function cr(r,e){if(e){if(Sb.test(r))return r.replace(SO,Tb)}else if(Eb.test(r))return r.replace(EO,Tb);return r}const CO=/(^|[^\[])\^/g;function Je(r,e){let t=typeof r=="string"?r:r.source;e=e||"";const n={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(CO,"$1"),t=t.replace(a,o),n},getRegex:()=>new RegExp(t,e)};return n}function Cb(r){try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const Is={exec:()=>null};function Db(r,e){const t=r.replace(/\|/g,(i,o,s)=>{let l=!1,u=o;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),n=t.split(/ \|/);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].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(/\\\|/g,"|");return n}function Ls(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 DO(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-1}function Ab(r,e,t,n){const a=e.href,i=e.title?cr(e.title):null,o=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){n.state.inLink=!0;const s={type:"link",raw:t,href:a,title:i,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,s}return{type:"image",raw:t,href:a,title:i,text:cr(o)}}function AO(r,e){const t=r.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
|
|
112
|
+
`).map(a=>{const i=a.match(/^\s+/);if(i===null)return a;const[o]=i;return o.length>=n.length?a.slice(n.length):a}).join(`
|
|
113
|
+
`)}class Uu{constructor(e){rt(this,"options");rt(this,"rules");rt(this,"lexer");this.options=e||Wa}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ls(n,`
|
|
114
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],a=AO(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const a=Ls(n,"#");(this.options.pedantic||!a||/ $/.test(a))&&(n=a.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ls(t[0],`
|
|
115
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=Ls(t[0],`
|
|
55
116
|
`).split(`
|
|
56
|
-
`),
|
|
57
|
-
`),
|
|
58
|
-
$1`).replace(/^ {0,3}>[ \t]?/gm,"");
|
|
59
|
-
${
|
|
60
|
-
${
|
|
61
|
-
`+
|
|
62
|
-
`),
|
|
63
|
-
`+
|
|
64
|
-
`),
|
|
65
|
-
`);continue}}return{type:"blockquote",raw:
|
|
66
|
-
`,1)[0].replace(/^\t+/,
|
|
67
|
-
`,1)[0],
|
|
68
|
-
`,e=e.substring(
|
|
69
|
-
`,1)[0];let
|
|
70
|
-
`+
|
|
71
|
-
`+
|
|
72
|
-
`,e=e.substring(S.length+1),
|
|
73
|
-
`):[],
|
|
74
|
-
`?
|
|
75
|
-
]`).replace("lheading",
|
|
76
|
-
`),this.blockTokens(e,this.tokens);for(let
|
|
77
|
-
`:
|
|
78
|
-
`+
|
|
79
|
-
`+
|
|
80
|
-
`+
|
|
81
|
-
`+
|
|
82
|
-
`+
|
|
83
|
-
`+
|
|
84
|
-
`+
|
|
85
|
-
`+
|
|
86
|
-
`;return
|
|
87
|
-
`:"<pre><code>"+(
|
|
117
|
+
`),a="",i="";const o=[];for(;n.length>0;){let s=!1;const l=[];let u;for(u=0;u<n.length;u++)if(/^ {0,3}>/.test(n[u]))l.push(n[u]),s=!0;else if(!s)l.push(n[u]);else break;n=n.slice(u);const c=l.join(`
|
|
118
|
+
`),f=c.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
119
|
+
$1`).replace(/^ {0,3}>[ \t]?/gm,"");a=a?`${a}
|
|
120
|
+
${c}`:c,i=i?`${i}
|
|
121
|
+
${f}`:f;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=h,n.length===0)break;const d=o[o.length-1];if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){const p=d,v=p.raw+`
|
|
122
|
+
`+n.join(`
|
|
123
|
+
`),g=this.blockquote(v);o[o.length-1]=g,a=a.substring(0,a.length-p.raw.length)+g.raw,i=i.substring(0,i.length-p.text.length)+g.text;break}else if((d==null?void 0:d.type)==="list"){const p=d,v=p.raw+`
|
|
124
|
+
`+n.join(`
|
|
125
|
+
`),g=this.list(v);o[o.length-1]=g,a=a.substring(0,a.length-d.raw.length)+g.raw,i=i.substring(0,i.length-p.raw.length)+g.raw,n=v.substring(o[o.length-1].raw.length).split(`
|
|
126
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:o,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const a=n.length>1,i={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");const o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let s=!1;for(;e;){let l=!1,u="",c="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let f=t[2].split(`
|
|
127
|
+
`,1)[0].replace(/^\t+/,m=>" ".repeat(3*m.length)),h=e.split(`
|
|
128
|
+
`,1)[0],d=!f.trim(),p=0;if(this.options.pedantic?(p=2,c=f.trimStart()):d?p=t[1].length+1:(p=t[2].search(/[^ ]/),p=p>4?1:p,c=f.slice(p),p+=t[1].length),d&&/^[ \t]*$/.test(h)&&(u+=h+`
|
|
129
|
+
`,e=e.substring(h.length+1),l=!0),!l){const m=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),_=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),x=new RegExp(`^ {0,${Math.min(3,p-1)}}#`),w=new RegExp(`^ {0,${Math.min(3,p-1)}}<(?:[a-z].*>|!--)`,"i");for(;e;){const S=e.split(`
|
|
130
|
+
`,1)[0];let E;if(h=S,this.options.pedantic?(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),E=h):E=h.replace(/\t/g," "),_.test(h)||x.test(h)||w.test(h)||m.test(h)||y.test(h))break;if(E.search(/[^ ]/)>=p||!h.trim())c+=`
|
|
131
|
+
`+E.slice(p);else{if(d||f.replace(/\t/g," ").search(/[^ ]/)>=4||_.test(f)||x.test(f)||y.test(f))break;c+=`
|
|
132
|
+
`+h}!d&&!h.trim()&&(d=!0),u+=S+`
|
|
133
|
+
`,e=e.substring(S.length+1),f=E.slice(p)}}i.loose||(s?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(u)&&(s=!0));let v=null,g;this.options.gfm&&(v=/^\[[ xX]\] /.exec(c),v&&(g=v[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:u,task:!!v,checked:g,loose:!1,text:c,tokens:[]}),i.raw+=u}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){const u=i.items[l].tokens.filter(f=>f.type==="space"),c=u.length>0&&u.some(f=>/\n.*\n/.test(f.raw));i.loose=c}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),a=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:a,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=Db(t[1]),a=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
|
|
134
|
+
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===a.length){for(const s of a)/^ *-+: *$/.test(s)?o.align.push("right"):/^ *:-+: *$/.test(s)?o.align.push("center"):/^ *:-+ *$/.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<n.length;s++)o.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:o.align[s]});for(const s of i)o.rows.push(Db(s,o.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[u]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
|
|
135
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:cr(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const o=Ls(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=DO(t[2],"()");if(o>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let a=t[2],i="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);o&&(a=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(this.options.pedantic&&!/>$/.test(n)?a=a.slice(1):a=a.slice(1,-1)),Ab(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const a=(n[2]||n[1]).replace(/\s+/g," "),i=t[a.toLowerCase()];if(!i){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Ab(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!a||a[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(a[1]||a[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...a[0]].length-1;let s,l,u=o,c=0;const f=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+o);(a=f.exec(t))!=null;){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s)continue;if(l=[...s].length,a[3]||a[4]){u+=l;continue}else if((a[5]||a[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);const h=[...a[0]][0].length,d=e.slice(0,o+a.index+h+l);if(Math.min(o,l)%2){const v=d.slice(1,-1);return{type:"em",raw:d,text:v,tokens:this.lexer.inlineTokens(v)}}const p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const a=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return a&&i&&(n=n.substring(1,n.length-1)),n=cr(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,a;return t[2]==="@"?(n=cr(t[1]),a="mailto:"+n):(n=cr(t[1]),a=n),{type:"link",raw:t[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let a,i;if(t[2]==="@")a=cr(t[0]),i="mailto:"+a;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);a=cr(t[0]),t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:a,href:i,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=cr(t[0]),{type:"text",raw:t[0],text:n}}}}const MO=/^(?:[ \t]*(?:\n|$))+/,kO=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,NO=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,IO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Mb=/(?:[*+-]|\d{1,9}[.)])/,kb=Je(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Mb).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/).getRegex(),xd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,LO=/^[^\n]+/,wd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,RO=Je(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),OO=Je(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Mb).getRegex(),Wu="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",Sd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,PO=Je("^ {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",Sd).replace("tag",Wu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Nb=Je(xd).replace("hr",Rs).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",Wu).getRegex(),Ed={blockquote:Je(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Nb).getRegex(),code:kO,def:RO,fences:NO,heading:IO,hr:Rs,html:PO,lheading:kb,list:OO,newline:MO,paragraph:Nb,table:Is,text:LO},Ib=Je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rs).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",Wu).getRegex(),BO={...Ed,table:Ib,paragraph:Je(xd).replace("hr",Rs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ib).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",Wu).getRegex()},VO={...Ed,html:Je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sd).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:Is,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Je(xd).replace("hr",Rs).replace("heading",` *#{1,6} *[^
|
|
136
|
+
]`).replace("lheading",kb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zO=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Rb=/^( {2,}|\\)\n(?!\s*$)/,FO=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Os="\\p{P}\\p{S}",$O=Je(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Os).getRegex(),GO=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,HO=Je(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Os).getRegex(),UO=Je("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Os).getRegex(),WO=Je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Os).getRegex(),YO=Je(/\\([punct])/,"gu").replace(/punct/g,Os).getRegex(),ZO=Je(/^<(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(),qO=Je(Sd).replace("(?:-->|$)","-->").getRegex(),XO=Je("^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",qO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yu=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,KO=Je(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Yu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ob=Je(/^!?\[(label)\]\[(ref)\]/).replace("label",Yu).replace("ref",wd).getRegex(),Pb=Je(/^!?\[(ref)\](?:\[\])?/).replace("ref",wd).getRegex(),QO=Je("reflink|nolink(?!\\()","g").replace("reflink",Ob).replace("nolink",Pb).getRegex(),Td={_backpedal:Is,anyPunctuation:YO,autolink:ZO,blockSkip:GO,br:Rb,code:zO,del:Is,emStrongLDelim:HO,emStrongRDelimAst:UO,emStrongRDelimUnd:WO,escape:Lb,link:KO,nolink:Pb,punctuation:$O,reflink:Ob,reflinkSearch:QO,tag:XO,text:FO,url:Is},jO={...Td,link:Je(/^!?\[(label)\]\((.*?)\)/).replace("label",Yu).getRegex(),reflink:Je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yu).getRegex()},Cd={...Td,escape:Je(Lb).replace("])","~|])").getRegex(),url:Je(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},JO={...Cd,br:Je(Rb).replace("{2,}","*").getRegex(),text:Je(Cd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zu={normal:Ed,gfm:BO,pedantic:VO},Ps={normal:Td,gfm:Cd,breaks:JO,pedantic:jO};class yr{constructor(e){rt(this,"tokens");rt(this,"options");rt(this,"state");rt(this,"tokenizer");rt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Wa,this.options.tokenizer=this.options.tokenizer||new Uu,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={block:Zu.normal,inline:Ps.normal};this.options.pedantic?(t.block=Zu.pedantic,t.inline=Ps.pedantic):this.options.gfm&&(t.block=Zu.gfm,this.options.breaks?t.inline=Ps.breaks:t.inline=Ps.gfm),this.tokenizer.rules=t}static get rules(){return{block:Zu,inline:Ps}}static lex(e,t){return new yr(t).lex(e)}static lexInline(e,t){return new yr(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
|
|
137
|
+
`),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){this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));let a,i,o;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(a=s.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))){if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length),a.raw.length===1&&t.length>0?t[t.length-1].raw+=`
|
|
138
|
+
`:t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
139
|
+
`+a.raw,i.text+=`
|
|
140
|
+
`+a.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
141
|
+
`+a.raw,i.text+=`
|
|
142
|
+
`+a.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const l=e.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(o=e.substring(0,s+1))}if(this.state.top&&(a=this.tokenizer.paragraph(o))){i=t[t.length-1],n&&(i==null?void 0:i.type)==="paragraph"?(i.raw+=`
|
|
143
|
+
`+a.raw,i.text+=`
|
|
144
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(a),n=o.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length),i=t[t.length-1],i&&i.type==="text"?(i.raw+=`
|
|
145
|
+
`+a.raw,i.text+=`
|
|
146
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(a);continue}if(e){const s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,a,i,o=e,s,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,s.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),a=t[t.length-1],a&&n.type==="text"&&a.type==="text"?(a.raw+=n.raw,a.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),a=t[t.length-1],a&&n.type==="text"&&a.type==="text"?(a.raw+=n.raw,a.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,o,u)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const f=e.slice(1);let h;this.options.extensions.startInline.forEach(d=>{h=d.call({lexer:this},f),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(n=this.tokenizer.inlineText(i)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),l=!0,a=t[t.length-1],a&&a.type==="text"?(a.raw+=n.raw,a.text+=n.text):t.push(n);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}}class qu{constructor(e){rt(this,"options");rt(this,"parser");this.options=e||Wa}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const a=(o=(t||"").match(/^\S*/))==null?void 0:o[0],i=e.replace(/\n$/,"")+`
|
|
147
|
+
`;return a?'<pre><code class="language-'+cr(a)+'">'+(n?i:cr(i,!0))+`</code></pre>
|
|
148
|
+
`:"<pre><code>"+(n?i:cr(i,!0))+`</code></pre>
|
|
88
149
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
89
150
|
${this.parser.parse(e)}</blockquote>
|
|
90
|
-
`}html({text:e}){return e}heading({tokens:e,depth:
|
|
151
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
91
152
|
`}hr(e){return`<hr>
|
|
92
|
-
`}list(e){const
|
|
93
|
-
`+
|
|
94
|
-
`}listitem(e){let
|
|
153
|
+
`}list(e){const t=e.ordered,n=e.start;let a="";for(let s=0;s<e.items.length;s++){const l=e.items[s];a+=this.listitem(l)}const i=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
|
|
154
|
+
`+a+"</"+i+`>
|
|
155
|
+
`}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
95
156
|
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
96
|
-
`}table(e){let
|
|
157
|
+
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let a="";for(let i=0;i<e.rows.length;i++){const o=e.rows[i];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
97
158
|
<thead>
|
|
98
|
-
`+
|
|
99
|
-
`+
|
|
159
|
+
`+t+`</thead>
|
|
160
|
+
`+a+`</table>
|
|
100
161
|
`}tablerow({text:e}){return`<tr>
|
|
101
162
|
${e}</tr>
|
|
102
|
-
`}tablecell(e){const
|
|
103
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:
|
|
104
|
-
`+this.renderer.text(
|
|
105
|
-
Please report this to https://github.com/markedjs/marked.`,e){const
|
|
163
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
164
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const a=this.parser.parseInline(n),i=Cb(e);if(i===null)return a;e=i;let o='<a href="'+e+'"';return t&&(o+=' title="'+t+'"'),o+=">"+a+"</a>",o}image({href:e,title:t,text:n}){const a=Cb(e);if(a===null)return n;e=a;let i=`<img src="${e}" alt="${n}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class Dd{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class _r{constructor(e){rt(this,"options");rt(this,"renderer");rt(this,"textRenderer");this.options=e||Wa,this.options.renderer=this.options.renderer||new qu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dd}static parse(e,t){return new _r(t).parse(e)}static parseInline(e,t){return new _r(t).parseInline(e)}parse(e,t=!0){let n="";for(let a=0;a<e.length;a++){const i=e[a];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const s=i,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){n+=l||"";continue}}const o=i;switch(o.type){case"space":{n+=this.renderer.space(o);continue}case"hr":{n+=this.renderer.hr(o);continue}case"heading":{n+=this.renderer.heading(o);continue}case"code":{n+=this.renderer.code(o);continue}case"table":{n+=this.renderer.table(o);continue}case"blockquote":{n+=this.renderer.blockquote(o);continue}case"list":{n+=this.renderer.list(o);continue}case"html":{n+=this.renderer.html(o);continue}case"paragraph":{n+=this.renderer.paragraph(o);continue}case"text":{let s=o,l=this.renderer.text(s);for(;a+1<e.length&&e[a+1].type==="text";)s=e[++a],l+=`
|
|
165
|
+
`+this.renderer.text(s);t?n+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):n+=l;continue}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let a=0;a<e.length;a++){const i=e[a];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const s=this.options.extensions.renderers[i.type].call({parser:this},i);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=s||"";continue}}const o=i;switch(o.type){case"escape":{n+=t.text(o);break}case"html":{n+=t.html(o);break}case"link":{n+=t.link(o);break}case"image":{n+=t.image(o);break}case"strong":{n+=t.strong(o);break}case"em":{n+=t.em(o);break}case"codespan":{n+=t.codespan(o);break}case"br":{n+=t.br(o);break}case"del":{n+=t.del(o);break}case"text":{n+=t.text(o);break}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}}class Bs{constructor(e){rt(this,"options");rt(this,"block");this.options=e||Wa}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?yr.lex:yr.lexInline}provideParser(){return this.block?_r.parse:_r.parseInline}}rt(Bs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class eP{constructor(...e){rt(this,"defaults",bd());rt(this,"options",this.setOptions);rt(this,"parse",this.parseMarkdown(!0));rt(this,"parseInline",this.parseMarkdown(!1));rt(this,"Parser",_r);rt(this,"Renderer",qu);rt(this,"TextRenderer",Dd);rt(this,"Lexer",yr);rt(this,"Tokenizer",Uu);rt(this,"Hooks",Bs);this.use(...e)}walkTokens(e,t){var a,i;let n=[];for(const o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{const s=o;for(const l of s.header)n=n.concat(this.walkTokens(l.tokens,t));for(const l of s.rows)for(const u of l)n=n.concat(this.walkTokens(u.tokens,t));break}case"list":{const s=o;n=n.concat(this.walkTokens(s.items,t));break}default:{const s=o;(i=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{const u=s[l].flat(1/0);n=n.concat(this.walkTokens(u,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const o=t.renderers[i.name];o?t.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[i.level];o?o.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),a.extensions=t),n.renderer){const i=this.defaults.renderer||new qu(this.defaults);for(const o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const s=o,l=n.renderer[s],u=i[s];i[s]=(...c)=>{let f=l.apply(i,c);return f===!1&&(f=u.apply(i,c)),f||""}}a.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Uu(this.defaults);for(const o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const s=o,l=n.tokenizer[s],u=i[s];i[s]=(...c)=>{let f=l.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}a.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Bs;for(const o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const s=o,l=n.hooks[s],u=i[s];Bs.passThroughHooks.has(o)?i[s]=c=>{if(this.defaults.async)return Promise.resolve(l.call(i,c)).then(h=>u.call(i,h));const f=l.call(i,c);return u.call(i,f)}:i[s]=(...c)=>{let f=l.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}a.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,o=n.walkTokens;a.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return yr.lex(e,t??this.defaults)}parser(e,t){return _r.parse(e,t??this.defaults)}parseMarkdown(e){return(n,a)=>{const i={...a},o={...this.defaults,...i},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return s(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 n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?yr.lex:yr.lexInline,u=o.hooks?o.hooks.provideParser():e?_r.parse:_r.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>u(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(s);try{o.hooks&&(n=o.hooks.preprocess(n));let c=l(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let f=u(c,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(c){return s(c)}}}onError(e,t){return n=>{if(n.message+=`
|
|
166
|
+
Please report this to https://github.com/markedjs/marked.`,e){const a="<p>An error occurred:</p><pre>"+cr(n.message+"",!0)+"</pre>";return t?Promise.resolve(a):a}if(t)return Promise.reject(n);throw n}}}const Ya=new eP;function qe(r,e){return Ya.parse(r,e)}qe.options=qe.setOptions=function(r){return Ya.setOptions(r),qe.defaults=Ya.defaults,wb(qe.defaults),qe},qe.getDefaults=bd,qe.defaults=Wa,qe.use=function(...r){return Ya.use(...r),qe.defaults=Ya.defaults,wb(qe.defaults),qe},qe.walkTokens=function(r,e){return Ya.walkTokens(r,e)},qe.parseInline=Ya.parseInline,qe.Parser=_r,qe.parser=_r.parse,qe.Renderer=qu,qe.TextRenderer=Dd,qe.Lexer=yr,qe.lexer=yr.lex,qe.Tokenizer=Uu,qe.Hooks=Bs,qe.parse=qe,qe.options,qe.setOptions,qe.use,qe.walkTokens,qe.parseInline,_r.parse,yr.lex;const tP={class:"pt-[10px]"},rP={__name:"vs-editor-form-data",props:{widgetName:{type:String},data:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(r,{emit:e}){var c,f,h,d,p,v,g,m,y,_,x,w,S,E,T,C,D,M,k,N,L,R,I,O,P,B,z,$,U,j,Z,ee,he,Ee,re,J,ue,q,ae;const{$notify:t}=b.getCurrentInstance().proxy,n=e,a=r,i=b.ref(null),o={text:{type:"Text",label:"Text",conditions:["type","==","text"]},x:{type:"radio",label:"X Axis",view:"buttons",style:{size:"xs"},conditions:["type","not_in",["text","table","map"]],options:[...(f=(c=a.columns)==null?void 0:c.filter(Y=>(Y==null?void 0:Y.type)=="text"||(Y==null?void 0:Y.type)==="date"||(Y==null?void 0:Y.type)==="timestamp without time zone"||(Y==null?void 0:Y.type)==="boolean"||(Y==null?void 0:Y.type)==="integer"))==null?void 0:f.map(({name:Y,type:ye})=>({id:Y,label:Y,type:ye}))]},cls:{label:"X Axis classifier",type:"text",conditions:["type","not_in",["text","table","map","cluster"]]},y_type:{label:"Y type",type:"radio",options:["columns","function"],conditions:["type","not_in",["text","table","map","number","cluster"]]},tableSQL:{label:"tableSQL",type:"text",hidden:!0},metric:{type:"radio",label:"Y Axis",view:"buttons",style:{size:"xs"},conditions:[["type","not_in",["text","table","map","cluster"]],["y_type","!=","function"]],options:[{id:"count",label:"count"},...(d=(h=a.columns)==null?void 0:h.filter(Y=>(Y==null?void 0:Y.type)==="numeric"||(Y==null?void 0:Y.type)==="double precision"))==null?void 0:d.map(({name:Y,type:ye})=>({id:Y,label:Y,type:ye}))]},fx:{type:"text",label:"Function",conditions:[["y_type","==","function"]]},query:{label:"Query",type:"text",conditions:["type","not_in",["text","table","map","number"]]},groupby:{type:"radio",label:"Groupby",view:"buttons",style:{size:"xs"},options:[{id:"null",label:"null"},...(v=(p=a.columns)==null?void 0:p.filter(Y=>(Y==null?void 0:Y.type)=="text"||(Y==null?void 0:Y.type)==="boolean"||(Y==null?void 0:Y.type)==="integer"))==null?void 0:v.map(({name:Y})=>({id:Y,label:Y}))],conditions:["type","==","bar"]},columns:{type:"checkbox",label:"Columns",style:{size:"xs"},options:(g=a.columns)==null?void 0:g.map(({name:Y})=>Y),conditions:["type","in",["table","map"]]},granularity:{type:"radio",label:"Granularity",options:[{id:"year",label:"year"},{id:"quarter",label:"quarter"},{id:"month",label:"month"},{id:"week",label:"week"}],conditions:["x.type","==","date"]},type:{type:"Text",hidden:!0}},s=b.ref({x:((y=(m=a.data)==null?void 0:m.data)==null?void 0:y.x)||((_=a.data)==null?void 0:_.x)||null,metric:((w=(x=a.data)==null?void 0:x.data)==null?void 0:w.metric)||((S=a.data)==null?void 0:S.metric)||null,columns:((T=(E=a.data)==null?void 0:E.data)==null?void 0:T.columns)||((C=a.data)==null?void 0:C.columns)||null,granularity:((M=(D=a.data)==null?void 0:D.data)==null?void 0:M.granularity)||((k=a.data)==null?void 0:k.granularity)||null,type:((L=(N=a.data)==null?void 0:N.data)==null?void 0:L.type)||((R=a.data)==null?void 0:R.type)||null,groupby:((O=(I=a.data)==null?void 0:I.data)==null?void 0:O.groupby)||a.data.groupby||null,fx:((B=(P=a.data)==null?void 0:P.data)==null?void 0:B.fx)||((z=a.data)==null?void 0:z.fx)||null,query:((U=($=a.data)==null?void 0:$.data)==null?void 0:U.query)||((j=a.data)==null?void 0:j.query)||null,y_type:((ee=(Z=a.data)==null?void 0:Z.data)==null?void 0:ee.y_type)||((he=a.data)==null?void 0:he.y_type)||null,tableSQL:((re=(Ee=a.data)==null?void 0:Ee.data)==null?void 0:re.tableSQL)||((J=a.data)==null?void 0:J.tableSQL)||null,cls:((q=(ue=a.data)==null?void 0:ue.data)==null?void 0:q.cls)||((ae=a.data)==null?void 0:ae.cls)||null}),l=async()=>{try{await kt.put(`/bi-dashboard/${i.value}/${a.widgetName}`,{data:s.value});let Y=`/bi-data?dashboard=${i.value}&widget=${a.widgetName}`;Object.entries(s.value).forEach(([Se,Be])=>{Y+=`&${Se}=${Be}`});const ye=new CustomEvent(`update-data-${a.widgetName}`);ye.filterUrl=Y,window.dispatchEvent(ye),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}},u=async()=>{try{let Y=`/bi-data?dashboard=${i.value}&widget=${a.widgetName}`;Object.entries(s.value).forEach(([Se,Be])=>{Y+=`&${Se}=${Be}`});const ye=new CustomEvent(`update-data-${a.widgetName}`);ye.filterUrl=Y,window.dispatchEvent(ye),n("update-dashboard")}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return b.watch(s,(Y,ye)=>{var Ye,de;const Se=(Ye=Object.entries(Y))==null?void 0:Ye.reduce((ut,[je,ke])=>ke?ut+ke:ut),Be=(de=Object.entries(ye))==null?void 0:de.reduce((ut,[je,ke])=>ke?ut+ke:ut);Se!==Be&&u()},{deep:!0}),b.onMounted(()=>{const Y=new URLSearchParams(window.top.location.search);i.value=Y.get("dashboard")}),(Y,ye)=>{const Se=b.resolveComponent("VsButton"),Be=b.resolveComponent("VsForm");return b.openBlock(),b.createElementBlock("div",tP,[b.createVNode(Se,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:l},{default:b.withCtx(()=>ye[1]||(ye[1]=[b.createTextVNode(" Зберегти ")])),_:1}),b.createVNode(Be,{scheme:o,modelValue:s.value,"onUpdate:modelValue":ye[0]||(ye[0]=Ye=>s.value=Ye)},null,8,["modelValue"])])}}};/*! *****************************************************************************
|
|
167
|
+
Copyright (c) Microsoft Corporation.
|
|
168
|
+
|
|
169
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
170
|
+
purpose with or without fee is hereby granted.
|
|
171
|
+
|
|
172
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
173
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
174
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
175
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
176
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
177
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
178
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
179
|
+
***************************************************************************** */var Ad=function(r,e){return Ad=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])},Ad(r,e)};function V(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ad(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var nP=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),aP=function(){function r(){this.browser=new nP,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}(),Ce=new aP;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ce.wxa=!0,Ce.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ce.worker=!0:!Ce.hasGlobalWindow||"Deno"in window?(Ce.node=!0,Ce.svgSupported=!0):iP(navigator.userAgent,Ce);function iP(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 Md=12,Bb="sans-serif",na=Md+"px "+Bb,oP=20,sP=100,lP="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function uP(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)-oP)/sP;e[n]=a}return e}var cP=uP(lP),aa={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,n){if(!r){var a=aa.createCanvas();r=a&&a.getContext("2d")}if(r)return e!==n&&(e=r.font=n||na),r.measureText(t);t=t||"",n=n||na;var i=/((?:\d+)?\.?\d*)px/.exec(n),o=i&&+i[1]||Md,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=cP[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}},Vb=sn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),zb=sn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),ho=Object.prototype.toString,Xu=Array.prototype,fP=Xu.forEach,hP=Xu.filter,kd=Xu.slice,dP=Xu.map,Fb=(function(){}).constructor,Ku=Fb?Fb.prototype:null,Nd="__proto__",pP=2311;function $b(){return pP++}function Hr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function ce(r){if(r==null||typeof r!="object")return r;var e=r,t=ho.call(r);if(t==="[object Array]"){if(!Vs(r)){e=[];for(var n=0,a=r.length;n<a;n++)e[n]=ce(r[n])}}else if(zb[t]){if(!Vs(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(!Vb[t]&&!Vs(r)&&!Za(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==Nd&&(e[o]=ce(r[o]))}return e}function _e(r,e,t){if(!oe(e)||!oe(r))return t?ce(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==Nd){var a=r[n],i=e[n];oe(i)&&oe(a)&&!G(i)&&!G(a)&&!Za(i)&&!Za(a)&&!Gb(i)&&!Gb(a)&&!Vs(i)&&!Vs(a)?_e(a,i,t):(t||!(n in r))&&(r[n]=ce(e[n]))}return r}function Id(r,e){for(var t=r[0],n=1,a=r.length;n<a;n++)t=_e(t,r[n],e);return t}function F(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==Nd&&(r[t]=e[t]);return r}function le(r,e,t){for(var n=Me(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 we(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 vP(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 dt(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 le(r,e,t)}function Vt(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function A(r,e,t){if(r&&e)if(r.forEach&&r.forEach===fP)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 H(r,e,t){if(!r)return[];if(!e)return Ld(r);if(r.map&&r.map===dP)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 sn(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 ze(r,e,t){if(!r)return[];if(!e)return Ld(r);if(r.filter&&r.filter===hP)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 gP(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 Me(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 mP(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(kd.call(arguments)))}}var K=Ku&&ie(Ku.bind)?Ku.call.bind(Ku.bind):mP;function me(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(kd.call(arguments)))}}function G(r){return Array.isArray?Array.isArray(r):ho.call(r)==="[object Array]"}function ie(r){return typeof r=="function"}function X(r){return typeof r=="string"}function Qu(r){return ho.call(r)==="[object String]"}function Oe(r){return typeof r=="number"}function oe(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function Gb(r){return!!Vb[ho.call(r)]}function Ut(r){return!!zb[ho.call(r)]}function Za(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function ju(r){return r.colorStops!=null}function yP(r){return r.image!=null}function Hb(r){return ho.call(r)==="[object RegExp]"}function qa(r){return r!==r}function pt(){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 pe(r,e){return r??e}function br(r,e,t){return r??e??t}function Ld(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return kd.apply(r,e)}function Rd(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 se(r,e){if(!r)throw new Error(e)}function Ur(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Ub="__ec_primitive__";function Ju(r){r[Ub]=!0}function Vs(r){return r[Ub]}var _P=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 Me(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r}(),Wb=typeof Map=="function";function bP(){return Wb?new Map:new _P}var xP=function(){function r(e){var t=G(e);this.data=bP();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 Wb?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function te(r){return new xP(r)}function zs(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 ec(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&F(t,e),t}function Yb(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Q(r,e){return r.hasOwnProperty(e)}function ft(){}var tc=180/Math.PI;/*! *****************************************************************************
|
|
180
|
+
Copyright (c) Microsoft Corporation.
|
|
181
|
+
|
|
182
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
183
|
+
purpose with or without fee is hereby granted.
|
|
184
|
+
|
|
185
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
186
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
187
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
188
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
189
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
190
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
191
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
192
|
+
***************************************************************************** */var Od=function(r,e){return Od=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])},Od(r,e)};function et(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Od(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Xa(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Wt(r,e){return r[0]=e[0],r[1]=e[1],r}function Nn(r){return[r[0],r[1]]}function wP(r,e,t){return r[0]=e,r[1]=t,r}function Zb(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Pd(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function Ka(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Bd(r){return Math.sqrt(SP(r))}function SP(r){return r[0]*r[0]+r[1]*r[1]}function rc(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function po(r,e){var t=Bd(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Vd(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var ia=Vd;function EP(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Qa=EP;function nc(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 Lt(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 oa(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function sa(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var vo=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),TP=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 vo(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 vo(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 vo(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new vo(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new vo(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new vo(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}(),xr=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,c=i[e][u];return c&&c.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 c=a[u];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r}(),CP=Math.log(2);function zd(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)/CP);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var f=0,h=0,d=0;h<s;h++){var p=1<<h;p&a||(f+=(d%2?-1:1)*r[t][h]*zd(r,e-1,c,u,a|p,i),d++)}return i[o]=f,f}function qb(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=zd(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)*zd(t,7,o===0?1:0,1<<o,1<<s,n)/a*e[o];return function(l,u,c){var f=u*i[6]+c*i[7]+1;l[0]=(u*i[0]+c*i[1]+i[2])/f,l[1]=(u*i[3]+c*i[4]+i[5])/f}}}var Xb="___zrEVENTSAVED",Fd=[];function DP(r,e,t,n,a){return $d(Fd,e,n,a,!0)&&$d(r,t,Fd[0],Fd[1])}function $d(r,e,t,n,a){if(e.getBoundingClientRect&&Ce.domSupported&&!Kb(e)){var i=e[Xb]||(e[Xb]={}),o=AP(e,i),s=MP(o,i,a);if(s)return s(r,t,n),!0}return!1}function AP(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 MP(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 c=r[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&i&&h===i[f]&&d===i[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?qb(s,o):qb(o,s))}function Kb(r){return r.nodeName.toUpperCase()==="CANVAS"}var kP=/([&<>"'])/g,NP={"&":"&","<":"<",">":">",'"':""","'":"'"};function Yt(r){return r==null?"":(r+"").replace(kP,function(e,t){return NP[t]})}var IP=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gd=[],LP=Ce.browser.firefox&&+Ce.browser.version.split(".")[0]<39;function Hd(r,e,t,n){return t=t||{},n?Qb(r,e,t):LP&&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):Qb(r,e,t),t}function Qb(r,e,t){if(Ce.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(Kb(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if($d(Gd,r,n,a)){t.zrX=Gd[0],t.zrY=Gd[1];return}}t.zrX=t.zrY=0}function Ud(r){return r||window.event}function wr(r,e,t){if(e=Ud(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&&Hd(r,o,e,t)}else{Hd(r,e,e,t);var i=RP(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&IP.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function RP(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 Wd(r,e,t,n){r.addEventListener(e,t,n)}function OP(r,e,t,n){r.removeEventListener(e,t,n)}var In=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function jb(r){return r.which===2||r.which===3}var PP=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=Hd(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 Yd)if(Yd.hasOwnProperty(t)){var n=Yd[t](this._track,e);if(n)return n}},r}();function Jb(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function BP(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Yd={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=Jb(n)/Jb(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=BP(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function fr(){return[1,0,0,1,0,0]}function ac(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Zd(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 Ln(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 ln(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 ja(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],c=Math.sin(t),f=Math.cos(t);return r[0]=a*f+s*c,r[1]=-a*c+s*f,r[2]=i*f+l*c,r[3]=-i*c+f*l,r[4]=f*(o-n[0])+c*(u-n[1])+n[0],r[5]=f*(u-n[1])-c*(o-n[0])+n[1],r}function qd(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 go(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 VP(r){var e=fr();return Zd(e,r),e}var be=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}(),ic=Math.min,oc=Math.max,Ja=new be,ei=new be,ti=new be,ri=new be,Fs=new be,$s=new be,xe=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=ic(e.x,this.x),n=ic(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=oc(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=oc(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=fr();return ln(i,i,[-t.x,-t.y]),qd(i,i,[n,a]),ln(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,c=e.y,f=e.y+e.height,h=!(i<l||u<a||s<c||f<o);if(t){var d=1/0,p=0,v=Math.abs(i-l),g=Math.abs(u-a),m=Math.abs(s-c),y=Math.abs(f-o),_=Math.min(v,g),x=Math.min(m,y);i<l||u<a?_>p&&(p=_,v<g?be.set($s,-v,0):be.set($s,g,0)):_<d&&(d=_,v<g?be.set(Fs,v,0):be.set(Fs,-g,0)),s<c||f<o?x>p&&(p=x,m<y?be.set($s,0,-m):be.set($s,0,y)):_<d&&(d=_,m<y?be.set(Fs,0,m):be.set(Fs,0,-y))}return t&&be.copy(t,h?Fs:$s),h},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}Ja.x=ti.x=t.x,Ja.y=ri.y=t.y,ei.x=ri.x=t.x+t.width,ei.y=ti.y=t.y+t.height,Ja.transform(n),ri.transform(n),ei.transform(n),ti.transform(n),e.x=ic(Ja.x,ei.x,ti.x,ri.x),e.y=ic(Ja.y,ei.y,ti.y,ri.y);var l=oc(Ja.x,ei.x,ti.x,ri.x),u=oc(Ja.y,ei.y,ti.y,ri.y);e.width=l-e.x,e.height=u-e.y},r}(),ex="silent";function zP(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:FP}}function FP(){In(this.event)}var $P=function(r){et(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}(xr),Gs=function(){function r(e,t){this.x=e,this.y=t}return r}(),GP=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Xd=new xe(0,0,0,0),tx=function(r){et(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new Gs(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new $P,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new TP(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(A(GP,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=nx(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 Gs(n,a):this.findHover(n,a),u=l.target,c=this.proxy;c.setCursor&&c.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 Gs(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=zP(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 Gs(t,n);if(rx(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new xe(t-u,n-u,l,l),f=i.length-1;f>=0;f--){var h=i[f];h!==a&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Xd.copy(h.getBoundingRect()),h.transform&&Xd.applyTransform(h.transform),Xd.intersect(c)&&s.push(h))}if(s.length)for(var d=4,p=Math.PI/12,v=Math.PI*2,g=0;g<u;g+=d)for(var m=0;m<v;m+=p){var y=t+g*Math.cos(m),_=n+g*Math.sin(m);if(rx(s,o,y,_,a),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new PP);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 Gs;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e}(xr);A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){tx.prototype[r]=function(e){var t=e.zrX,n=e.zrY,a=nx(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||ia(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function HP(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?ex:!0}return!1}function rx(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=HP(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==ex)){e.target=o;break}}}function nx(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var ax=32,Hs=7;function UP(r){for(var e=0;r>=ax;)e|=r&1,r>>=1;return r+e}function ix(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++;WP(r,e,a)}else for(;a<t&&n(r[a],r[a-1])>=0;)a++;return a-e}function WP(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function ox(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 Kd(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 c=o+(l-o>>>1);i(r,e[t+c])>0?o=c+1:l=c}return l}function Qd(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 c=o+(l-o>>>1);i(r,e[t+c])<0?l=c:o=c+1}return l}function YP(r,e){var t=Hs,n,a,i=0,o=[];n=[],a=[];function s(d,p){n[i]=d,a[i]=p,i+=1}function l(){for(;i>1;){var d=i-2;if(d>=1&&a[d-1]<=a[d]+a[d+1]||d>=2&&a[d-2]<=a[d]+a[d-1])a[d-1]<a[d+1]&&d--;else if(a[d]>a[d+1])break;c(d)}}function u(){for(;i>1;){var d=i-2;d>0&&a[d-1]<a[d+1]&&d--,c(d)}}function c(d){var p=n[d],v=a[d],g=n[d+1],m=a[d+1];a[d]=v+m,d===i-3&&(n[d+1]=n[d+2],a[d+1]=a[d+2]),i--;var y=Qd(r[g],r,p,v,0,e);p+=y,v-=y,v!==0&&(m=Kd(r[p+v-1],r,g,m,m-1,e),m!==0&&(v<=m?f(p,v,g,m):h(p,v,g,m)))}function f(d,p,v,g){var m=0;for(m=0;m<p;m++)o[m]=r[d+m];var y=0,_=v,x=d;if(r[x++]=r[_++],--g===0){for(m=0;m<p;m++)r[x+m]=o[y+m];return}if(p===1){for(m=0;m<g;m++)r[x+m]=r[_+m];r[x+g]=o[y];return}for(var w=t,S,E,T;;){S=0,E=0,T=!1;do if(e(r[_],o[y])<0){if(r[x++]=r[_++],E++,S=0,--g===0){T=!0;break}}else if(r[x++]=o[y++],S++,E=0,--p===1){T=!0;break}while((S|E)<w);if(T)break;do{if(S=Qd(r[_],o,y,p,0,e),S!==0){for(m=0;m<S;m++)r[x+m]=o[y+m];if(x+=S,y+=S,p-=S,p<=1){T=!0;break}}if(r[x++]=r[_++],--g===0){T=!0;break}if(E=Kd(o[y],r,_,g,0,e),E!==0){for(m=0;m<E;m++)r[x+m]=r[_+m];if(x+=E,_+=E,g-=E,g===0){T=!0;break}}if(r[x++]=o[y++],--p===1){T=!0;break}w--}while(S>=Hs||E>=Hs);if(T)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),p===1){for(m=0;m<g;m++)r[x+m]=r[_+m];r[x+g]=o[y]}else{if(p===0)throw new Error;for(m=0;m<p;m++)r[x+m]=o[y+m]}}function h(d,p,v,g){var m=0;for(m=0;m<g;m++)o[m]=r[v+m];var y=d+p-1,_=g-1,x=v+g-1,w=0,S=0;if(r[x--]=r[y--],--p===0){for(w=x-(g-1),m=0;m<g;m++)r[w+m]=o[m];return}if(g===1){for(x-=p,y-=p,S=x+1,w=y+1,m=p-1;m>=0;m--)r[S+m]=r[w+m];r[x]=o[_];return}for(var E=t;;){var T=0,C=0,D=!1;do if(e(o[_],r[y])<0){if(r[x--]=r[y--],T++,C=0,--p===0){D=!0;break}}else if(r[x--]=o[_--],C++,T=0,--g===1){D=!0;break}while((T|C)<E);if(D)break;do{if(T=p-Qd(o[_],r,d,p,p-1,e),T!==0){for(x-=T,y-=T,p-=T,S=x+1,w=y+1,m=T-1;m>=0;m--)r[S+m]=r[w+m];if(p===0){D=!0;break}}if(r[x--]=o[_--],--g===1){D=!0;break}if(C=g-Kd(r[y],o,0,g,g-1,e),C!==0){for(x-=C,_-=C,g-=C,S=x+1,w=_+1,m=0;m<C;m++)r[S+m]=o[w+m];if(g<=1){D=!0;break}}if(r[x--]=r[y--],--p===0){D=!0;break}E--}while(T>=Hs||C>=Hs);if(D)break;E<0&&(E=0),E+=2}if(t=E,t<1&&(t=1),g===1){for(x-=p,y-=p,S=x+1,w=y+1,m=p-1;m>=0;m--)r[S+m]=r[w+m];r[x]=o[_]}else{if(g===0)throw new Error;for(w=x-(g-1),m=0;m<g;m++)r[w+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function sc(r,e,t,n){t||(t=0),n||(n=r.length);var a=n-t;if(!(a<2)){var i=0;if(a<ax){i=ix(r,t,n,e),ox(r,t,n,t+i,e);return}var o=YP(r,e),s=UP(a);do{if(i=ix(r,t,n,e),i<s){var l=a;l>s&&(l=s),ox(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 un=1,lc=2,Us=4,sx=!1;function jd(){sx||(sx=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function lx(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var ZP=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=lx}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,sc(n,lx)},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|=un),this._updateAndAddDisplayable(u,t,n)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(jd(),c.z=0),isNaN(c.z2)&&(jd(),c.z2=0),isNaN(c.zlevel)&&(jd(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,t,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,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=we(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}(),uc;uc=Ce.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Ws={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-Ws.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?Ws.bounceIn(r*2)*.5:Ws.bounceOut(r*2-1)*.5+.5}},cc=Math.pow,la=Math.sqrt,ux=1e-8,cx=1e-4,fx=la(3),fc=1/3,cn=Xa(),Sr=Xa(),mo=Xa();function ua(r){return r>-1e-8&&r<ux}function hx(r){return r>ux||r<-1e-8}function wt(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 dx(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function hc(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,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(ua(c)&&ua(f))if(ua(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[d++]=p)}else{var v=f*f-4*c*h;if(ua(v)){var g=f/c,p=-s/o+g,m=-g/2;p>=0&&p<=1&&(i[d++]=p),m>=0&&m<=1&&(i[d++]=m)}else if(v>0){var y=la(v),_=c*s+1.5*o*(-f+y),x=c*s+1.5*o*(-f-y);_<0?_=-cc(-_,fc):_=cc(_,fc),x<0?x=-cc(-x,fc):x=cc(x,fc);var p=(-s-(_+x))/(3*o);p>=0&&p<=1&&(i[d++]=p)}else{var w=(2*c*s-3*o*f)/(2*la(c*c*c)),S=Math.acos(w)/3,E=la(c),T=Math.cos(S),p=(-s-2*E*T)/(3*o),m=(-s+E*(T+fx*Math.sin(S)))/(3*o),C=(-s+E*(T-fx*Math.sin(S)))/(3*o);p>=0&&p<=1&&(i[d++]=p),m>=0&&m<=1&&(i[d++]=m),C>=0&&C<=1&&(i[d++]=C)}}return d}function px(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(ua(o)){if(hx(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var c=i*i-4*o*s;if(ua(c))a[0]=-i/(2*o);else if(c>0){var f=la(c),u=(-i+f)/(2*o),h=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function ca(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,c=(l-s)*a+s,f=(c-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}function vx(r,e,t,n,a,i,o,s,l,u,c){var f,h=.005,d=1/0,p,v,g,m;cn[0]=l,cn[1]=u;for(var y=0;y<1;y+=.05)Sr[0]=wt(r,t,a,o,y),Sr[1]=wt(e,n,i,s,y),g=Qa(cn,Sr),g<d&&(f=y,d=g);d=1/0;for(var _=0;_<32&&!(h<cx);_++)p=f-h,v=f+h,Sr[0]=wt(r,t,a,o,p),Sr[1]=wt(e,n,i,s,p),g=Qa(Sr,cn),p>=0&&g<d?(f=p,d=g):(mo[0]=wt(r,t,a,o,v),mo[1]=wt(e,n,i,s,v),m=Qa(mo,cn),v<=1&&m<d?(f=v,d=m):h*=.5);return c&&(c[0]=wt(r,t,a,o,f),c[1]=wt(e,n,i,s,f)),la(d)}function qP(r,e,t,n,a,i,o,s,l){for(var u=r,c=e,f=0,h=1/l,d=1;d<=l;d++){var p=d*h,v=wt(r,t,a,o,p),g=wt(e,n,i,s,p),m=v-u,y=g-c;f+=Math.sqrt(m*m+y*y),u=v,c=g}return f}function Nt(r,e,t,n){var a=1-n;return a*(a*r+2*n*e)+n*n*t}function Jd(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function XP(r,e,t,n,a){var i=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(ua(i)){if(hx(o)){var u=-s/o;u>=0&&u<=1&&(a[l++]=u)}}else{var c=o*o-4*i*s;if(ua(c)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(c>0){var f=la(c),u=(-o+f)/(2*i),h=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function gx(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Ys(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 mx(r,e,t,n,a,i,o,s,l){var u,c=.005,f=1/0;cn[0]=o,cn[1]=s;for(var h=0;h<1;h+=.05){Sr[0]=Nt(r,t,a,h),Sr[1]=Nt(e,n,i,h);var d=Qa(cn,Sr);d<f&&(u=h,f=d)}f=1/0;for(var p=0;p<32&&!(c<cx);p++){var v=u-c,g=u+c;Sr[0]=Nt(r,t,a,v),Sr[1]=Nt(e,n,i,v);var d=Qa(Sr,cn);if(v>=0&&d<f)u=v,f=d;else{mo[0]=Nt(r,t,a,g),mo[1]=Nt(e,n,i,g);var m=Qa(mo,cn);g<=1&&m<f?(u=g,f=m):c*=.5}}return l&&(l[0]=Nt(r,t,a,u),l[1]=Nt(e,n,i,u)),la(f)}function KP(r,e,t,n,a,i,o){for(var s=r,l=e,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,d=Nt(r,t,a,h),p=Nt(e,n,i,h),v=d-s,g=p-l;u+=Math.sqrt(v*v+g*g),s=d,l=p}return u}var QP=/cubic-bezier\(([0-9,\.e ]+)\)/;function ep(r){var e=r&&QP.exec(r);if(e){var t=e[1].split(","),n=+Ur(t[0]),a=+Ur(t[1]),i=+Ur(t[2]),o=+Ur(t[3]);if(isNaN(n+a+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:hc(0,n,i,1,l,s)&&wt(0,a,o,1,s[0])}}}var jP=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||ft,this.ondestroy=e.ondestroy||ft,this.onrestart=e.onrestart||ft,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=ie(e)?e:Ws[e]||ep(e)},r}(),yx=function(){function r(e){this.value=e}return r}(),JP=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new yx(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}(),Zs=function(){function r(e){this._list=new JP,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 yx(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}(),_x={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 Wr(r){return r=Math.round(r),r<0?0:r>255?255:r}function eB(r){return r=Math.round(r),r<0?0:r>360?360:r}function qs(r){return r<0?0:r>1?1:r}function tp(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Wr(parseFloat(e)/100*255):Wr(parseInt(e,10))}function ni(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?qs(parseFloat(e)/100):qs(parseFloat(e))}function rp(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 fa(r,e,t){return r+(e-r)*t}function Er(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function np(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var bx=new Zs(20),dc=null;function yo(r,e){dc&&np(dc,e),dc=bx.put(r,dc||e.slice())}function hr(r,e){if(r){e=e||[];var t=bx.get(r);if(t)return np(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in _x)return np(e,_x[n]),yo(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)){Er(e,0,0,0,1);return}return Er(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),yo(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){Er(e,0,0,0,1);return}return Er(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),yo(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(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Er(e,+u[0],+u[1],+u[2],1):Er(e,0,0,0,1);c=ni(u.pop());case"rgb":if(u.length>=3)return Er(e,tp(u[0]),tp(u[1]),tp(u[2]),u.length===3?c:ni(u[3])),yo(r,e),e;Er(e,0,0,0,1);return;case"hsla":if(u.length!==4){Er(e,0,0,0,1);return}return u[3]=ni(u[3]),ap(u,e),yo(r,e),e;case"hsl":if(u.length!==3){Er(e,0,0,0,1);return}return ap(u,e),yo(r,e),e;default:return}}Er(e,0,0,0,1)}}function ap(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=ni(r[1]),a=ni(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],Er(e,Wr(rp(o,i,t+1/3)*255),Wr(rp(o,i,t)*255),Wr(rp(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function tB(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 c=((i-e)/6+o/2)/o,f=((i-t)/6+o/2)/o,h=((i-n)/6+o/2)/o;e===i?l=h-f:t===i?l=1/3+c-h:n===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function ip(r,e){var t=hr(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 Rn(t,t.length===4?"rgba":"rgb")}}function op(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]=Wr(fa(o[0],s[0],l)),t[1]=Wr(fa(o[1],s[1],l)),t[2]=Wr(fa(o[2],s[2],l)),t[3]=qs(fa(o[3],s[3],l)),t}}function rB(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=hr(e[a]),s=hr(e[i]),l=n-a,u=Rn([Wr(fa(o[0],s[0],l)),Wr(fa(o[1],s[1],l)),Wr(fa(o[2],s[2],l)),qs(fa(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}function Xs(r,e,t,n){var a=hr(r);if(r)return a=tB(a),e!=null&&(a[0]=eB(e)),t!=null&&(a[1]=ni(t)),n!=null&&(a[2]=ni(n)),Rn(ap(a),"rgba")}function pc(r,e){var t=hr(r);if(t&&e!=null)return t[3]=qs(e),Rn(t,"rgba")}function Rn(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 vc(r,e){var t=hr(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var xx=new Zs(100);function sp(r){if(X(r)){var e=xx.get(r);return e||(e=ip(r,-.1),xx.put(r,e)),e}else if(ju(r)){var t=F({},r);return t.colorStops=H(r.colorStops,function(n){return{offset:n.offset,color:ip(n.color,-.1)}}),t}return r}var nB={},gc=Math.round;function Ks(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=hr(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var aB=1e-4;function ha(r){return r<aB&&r>-1e-4}function mc(r){return gc(r*1e3)/1e3}function lp(r){return gc(r*1e4)/1e4}function iB(r){return"matrix("+mc(r[0])+","+mc(r[1])+","+mc(r[2])+","+mc(r[3])+","+lp(r[4])+","+lp(r[5])+")"}var oB={left:"start",right:"end",center:"middle",middle:"middle"};function sB(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function lB(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function uB(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 Sx(r){return r&&!!r.image}function cB(r){return r&&!!r.svgElement}function up(r){return Sx(r)||cB(r)}function Ex(r){return r.type==="linear"}function Tx(r){return r.type==="radial"}function Cx(r){return r&&(r.type==="linear"||r.type==="radial")}function yc(r){return"url(#"+r+")"}function Dx(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 Ax(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*tc,a=pe(r.scaleX,1),i=pe(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("+gc(o*tc)+"deg, "+gc(s*tc)+"deg)"),l.join(" ")}var fB=function(){return Ce.hasGlobalWindow&&ie(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return nB.NODE_ENV!=="production"&&Hr("Base64 isn't natively supported in the current environment."),null}}(),cp=Array.prototype.slice;function On(r,e,t){return(e-r)*t+r}function fp(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=On(e[i],t[i],n);return r}function hB(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]=On(e[o][s],t[o][s],n)}return r}function _c(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=e[i]+t[i]*n;return r}function Mx(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 dB(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 pB(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]:cp.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 c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=a[l][c])}}function Qs(r){if(Vt(r)){var e=r.length;if(Vt(r[0])){for(var t=[],n=0;n<e;n++)t.push(cp.call(r[n]));return t}return cp.call(r)}return r}function bc(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 vB(r){return Vt(r&&r[0])?2:1}var xc=0,wc=1,kx=2,js=3,hp=4,dp=5,Nx=6;function Ix(r){return r===hp||r===dp}function Sc(r){return r===wc||r===kx}var Js=[0,0,0,0],gB=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=Nx,l=t;if(Vt(t)){var u=vB(t);s=u,(u===1&&!Oe(t[0])||u===2&&!Oe(t[0][0]))&&(o=!0)}else if(Oe(t)&&!qa(t))s=xc;else if(X(t))if(!isNaN(+t))s=xc;else{var c=hr(t);c&&(l=c,s=js)}else if(ju(t)){var f=F({},l);f.colorStops=H(t.colorStops,function(d){return{offset:d.offset,color:hr(d.color)}}),Ex(t)?s=hp:Tx(t)&&(s=dp),l=f}i===0?this.valType=s:(s!==this.valType||s===Nx)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return n&&(h.easing=n,h.easingFunc=ie(n)?n:Ws[n]||ep(n)),a.push(h),h},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(v,g){return v.time-g.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=Sc(a),u=Ix(a),c=0;c<i;c++){var f=n[c],h=f.value,d=o.value;f.percent=f.time/e,s||(l&&c!==i-1?pB(h,d,a):u&&dB(h.colorStops,d.colorStops))}if(!s&&a!==dp&&t&&this.needsAnimate()&&t.needsAnimate()&&a===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,c=0;c<i;c++)a===xc?n[c].additiveValue=n[c].value-p:a===js?n[c].additiveValue=_c([],n[c].value,p,-1):Sc(a)&&(n[c].additiveValue=a===wc?_c([],n[c].value,p,-1):Mx([],n[c].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===js,c,f=this._lastFr,h=Math.min,d,p;if(s===1)d=p=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var v=h(f+1,s-1);for(c=v;c>=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=h(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=t;var g=p.percent-d.percent,m=g===0?1:h((t-d.percent)/g,1);p.easingFunc&&(m=p.easingFunc(m));var y=n?this._additiveValue:u?Js:e[l];if((Sc(i)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?d.rawValue:p.rawValue;else if(Sc(i))i===wc?fp(y,d[a],p[a],m):hB(y,d[a],p[a],m);else if(Ix(i)){var _=d[a],x=p[a],w=i===hp;e[l]={type:w?"linear":"radial",x:On(_.x,x.x,m),y:On(_.y,x.y,m),colorStops:H(_.colorStops,function(E,T){var C=x.colorStops[T];return{offset:On(E.offset,C.offset,m),color:bc(fp([],E.color,C.color,m))}}),global:x.global},w?(e[l].x2=On(_.x2,x.x2,m),e[l].y2=On(_.y2,x.y2,m)):e[l].r=On(_.r,x.r,m)}else if(u)fp(y,d[a],p[a],m),n||(e[l]=bc(y));else{var S=On(d[a],p[a],m);n?this._additiveValue=S:e[l]=S}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===xc?e[n]=e[n]+a:t===js?(hr(e[n],Js),_c(Js,Js,a,1),e[n]=bc(Js)):t===wc?_c(e[n],e[n],a,1):t===kx&&Mx(e[n],e[n],a,1)},r}(),pp=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){Hr("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,Me(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 gB(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,h=f[f.length-1];u=h&&h.value,c.valType===js&&u&&(u=bc(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Qs(u),a),this._trackKeys.push(s)}l.addKeyframe(e,Qs(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,c=u.length;if(s.prepare(a,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var h=new jP({life:a,loop:this._loop,delay:this._delay||0,onframe:function(d){t._started=2;var p=t._additiveAnimators;if(p){for(var v=!1,g=0;g<p.length;g++)if(p[g]._clip){v=!0;break}v||(t._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(t._target,d);var m=t._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](t._target,d)},ondestroy:function(){t._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.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 H(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]=Qs(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||Me(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 _o(){return new Date().getTime()}var mB=function(r){et(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=_o()-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&&(uc(n),!t._paused&&t.update())}uc(n)},e.prototype.start=function(){this._running||(this._time=_o(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=_o(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=_o()-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 pp(t,n.loop);return this.addAnimator(a),a},e}(xr),yB=300,vp=Ce.domSupported,gp=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=H(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}}(),Lx={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Rx=!1;function mp(r){var e=r.pointerType;return e==="pen"||e==="touch"}function _B(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 yp(r){r&&(r.zrByTouch=!0)}function bB(r,e){return wr(r.dom,new xB(r,e),!0)}function Ox(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 xB=function(){function r(e,t){this.stopPropagation=ft,this.stopImmediatePropagation=ft,this.preventDefault=ft,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Yr={mousedown:function(r){r=wr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=wr(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=wr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=wr(this.dom,r);var e=r.toElement||r.relatedTarget;Ox(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Rx=!0,r=wr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Rx||(r=wr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=wr(this.dom,r),yp(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Yr.mousemove.call(this,r),Yr.mousedown.call(this,r)},touchmove:function(r){r=wr(this.dom,r),yp(r),this.handler.processGesture(r,"change"),Yr.mousemove.call(this,r)},touchend:function(r){r=wr(this.dom,r),yp(r),this.handler.processGesture(r,"end"),Yr.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<yB&&Yr.click.call(this,r)},pointerdown:function(r){Yr.mousedown.call(this,r)},pointermove:function(r){mp(r)||Yr.mousemove.call(this,r)},pointerup:function(r){Yr.mouseup.call(this,r)},pointerout:function(r){mp(r)||Yr.mouseout.call(this,r)}};A(["click","dblclick","contextmenu"],function(r){Yr[r]=function(e){e=wr(this.dom,e),this.trigger(r,e)}});var _p={pointermove:function(r){mp(r)||_p.mousemove.call(this,r)},pointerup:function(r){_p.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 wB(r,e){var t=e.domHandlers;Ce.pointerEventsSupported?A(gp.pointer,function(n){Ec(e,n,function(a){t[n].call(r,a)})}):(Ce.touchEventsSupported&&A(gp.touch,function(n){Ec(e,n,function(a){t[n].call(r,a),_B(e)})}),A(gp.mouse,function(n){Ec(e,n,function(a){a=Ud(a),e.touching||t[n].call(r,a)})}))}function SB(r,e){Ce.pointerEventsSupported?A(Lx.pointer,t):Ce.touchEventsSupported||A(Lx.mouse,t);function t(n){function a(i){i=Ud(i),Ox(r,i.target)||(i=bB(r,i),e.domHandlers[n].call(r,i))}Ec(e,n,a,{capture:!0})}}function Ec(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,Wd(r.domTarget,e,t,n)}function bp(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&OP(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var Px=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),EB=function(r){et(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 Px(t,Yr),vp&&(a._globalHandlerScope=new Px(document,_p)),wB(a,a._localHandlerScope),a}return e.prototype.dispose=function(){bp(this._localHandlerScope),vp&&bp(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,vp&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?SB(this,n):bp(n)}},e}(xr),Bx=1;Ce.hasGlobalWindow&&(Bx=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Tc=Bx,xp=.4,wp="#333",Sp="#ccc",TB="#eee",Vx=ac,CB=5e-5;function ai(r){return r>CB||r<-5e-5}var ii=[],bo=[],Ep=fr(),Tp=Math.abs,Pn=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 ai(this.rotation)||ai(this.x)||ai(this.y)||ai(this.scaleX-1)||ai(this.scaleY-1)||ai(this.skewX)||ai(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Vx(n),this.invTransform=null);return}n=n||fr(),t?this.getLocalTransform(n):Vx(n),e&&(t?Ln(n,e,n):Zd(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ii);var n=ii[0]<0?-1:1,a=ii[1]<0?-1:1,i=((ii[0]-n)*t+n)/ii[0]||0,o=((ii[1]-a)*t+a)/ii[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),go(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||fr(),Ln(bo,e.invTransform,t),t=bo);var n=this.originX,a=this.originY;(n||a)&&(Ep[4]=n,Ep[5]=a,Ln(bo,t,Ep),bo[4]-=n,bo[5]-=a,t=bo),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&&Lt(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&Lt(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&Tp(e[0]-1)>1e-10&&Tp(e[3]-1)>1e-10?Math.sqrt(Tp(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){zx(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,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var p=n+s,v=a+l;t[4]=-p*i-h*v*o,t[5]=-v*o-d*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=d*i,t[2]=h*o,u&&ja(t,t,u),t[4]+=n+c,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}(),fn=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function zx(r,e){for(var t=0;t<fn.length;t++){var n=fn[t];r[n]=e[n]}}var Fx={};function dr(r,e){e=e||na;var t=Fx[e];t||(t=Fx[e]=new Zs(500));var n=t.get(r);return n==null&&(n=aa.measureText(r,e).width,t.put(r,n)),n}function $x(r,e,t,n){var a=dr(r,e),i=Cc(e),o=tl(0,a,t),s=xo(0,i,n),l=new xe(o,s,a,i);return l}function el(r,e,t,n){var a=((r||"")+"").split(`
|
|
193
|
+
`),i=a.length;if(i===1)return $x(a[0],e,t,n);for(var o=new xe(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 tl(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function xo(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function Cc(r){return dr("国",r)}function Zr(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function Dc(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,c="left",f="top";if(n instanceof Array)l+=Zr(n[0],t.width),u+=Zr(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=a,u+=s,c="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=a,c="center";break;case"insideBottom":l+=o/2,u+=i-a,c="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,c="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var wo={},Cp="__zr_normal__",Dp=fn.concat(["ignore"]),DB=sn(fn,function(r,e){return r[e]=!0,r},{ignore:!1}),So={},AB=new xe(0,0,0,0),Ac=function(){function r(e){this.id=$b(),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 c=AB;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),a||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(So,n,c):Dc(So,n,c),i.x=So.x,i.y=So.y,o=So.align,s=So.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var h=void 0,d=void 0;f==="center"?(h=c.width*.5,d=c.height*.5):(h=Zr(f[0],c.width),d=Zr(f[1],c.height)),u=!0,i.originX=-i.x+h+(a?0:c.x),i.originY=-i.y+d+(a?0:c.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 v=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;v&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=un,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()?Sp:wp},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&hr(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,Rn(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||{},F(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(oe(e))for(var n=e,a=Me(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!==Cp)){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,Dp)},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(Cp,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===Cp,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(we(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){Hr("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,t,n,c),h&&h.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&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],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&a.push(c)}var f=a[o-1],h=!!(f&&f.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(a),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(e,t,h),g&&g.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&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=we(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=we(a,e),o=we(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];F(t,i),i.textConfig&&(n=n||{},F(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=F({},a?this.textConfig:n.textConfig),F(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<Dp.length;c++){var f=Dp[c],h=i&&DB[f];t&&t[f]!=null?h?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&n[f]!=null&&(h?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!i)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(t||n)[p]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(wo.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(e===this){if(wo.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(),wo.NODE_ENV!=="production"&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new Pn,this._attachComponent(e),this._textContent=e,this.markRedraw()}},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),F(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|=un;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(wo.NODE_ENV!=="production"&&!a){Hr('Property "'+e+'" is not existed in element '+this.id);return}var i=new pp(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=we(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){Ap(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){Ap(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,a){for(var i=Ap(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=un;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(wo.NODE_ENV!=="production"&&n(i,s,l),!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){wo.NODE_ENV!=="production"&&n(i,s,l),this[s]=c[0],this[l]=c[1],this[o]=c,u(this,c)}});function u(c,f){Object.defineProperty(f,0,{get:function(){return c[s]},set:function(h){c[s]=h}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(h){c[l]=h}})}}Object.defineProperty&&(a("position","_legacyPos","x","y"),a("scale","_legacyScale","scaleX","scaleY"),a("origin","_legacyOrigin","originX","originY"))}(),r}();dt(Ac,xr),dt(Ac,Pn);function Ap(r,e,t,n,a){t=t||{};var i=[];Gx(r,"",r,e,t,n,i,a);var o=i.length,s=!1,l=t.done,u=t.aborted,c=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,v){t.during(v)});for(var h=0;h<i.length;h++){var d=i[h];c&&d.done(c),f&&d.aborted(f),t.force&&d.duration(t.duration),d.start(t.easing)}return i}function Mp(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function MB(r){return Vt(r[0])}function kB(r,e,t){if(Vt(e[t]))if(Vt(r[t])||(r[t]=[]),Ut(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),Mp(r[t],e[t],n))}else{var a=e[t],i=r[t],o=a.length;if(MB(a))for(var s=a[0].length,l=0;l<o;l++)i[l]?Mp(i[l],a[l],s):i[l]=Array.prototype.slice.call(a[l]);else Mp(i,a,o);i.length=a.length}else r[t]=e[t]}function NB(r,e){return r===e||Vt(r)&&Vt(e)&&IB(r,e)}function IB(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 Gx(r,e,t,n,a,i,o,s){for(var l=Me(n),u=a.duration,c=a.delay,f=a.additive,h=a.setToFinal,d=!oe(i),p=r.animators,v=[],g=0;g<l.length;g++){var m=l[g],y=n[m];if(y!=null&&t[m]!=null&&(d||i[m]))if(oe(y)&&!Vt(y)&&!ju(y)){if(e){s||(t[m]=y,r.updateDuringAnimation(e));continue}Gx(r,m,t[m],y,a,i&&i[m],o,s)}else v.push(m);else s||(t[m]=y,r.updateDuringAnimation(e),v.push(m))}var _=v.length;if(!f&&_)for(var x=0;x<p.length;x++){var w=p[x];if(w.targetName===e){var S=w.stopTracks(v);if(S){var E=we(p,w);p.splice(E,1)}}}if(a.force||(v=ze(v,function(M){return!NB(n[M],t[M])}),_=v.length),_>0||a.force&&!o.length){var T=void 0,C=void 0,D=void 0;if(s){C={},h&&(T={});for(var x=0;x<_;x++){var m=v[x];C[m]=t[m],h?T[m]=n[m]:t[m]=n[m]}}else if(h){D={};for(var x=0;x<_;x++){var m=v[x];D[m]=Qs(t[m]),kB(t,n,m)}}var w=new pp(t,!1,!1,f?ze(p,function(k){return k.targetName===e}):null);w.targetName=e,a.scope&&(w.scope=a.scope),h&&T&&w.whenWithKeys(0,T,v),D&&w.whenWithKeys(0,D,v),w.whenWithKeys(u??500,s?C:n,v).delay(c||0),r.addAnimator(w,e),o.push(w)}}var LB={},fe=function(r){et(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)),LB.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=we(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=we(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 xe(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(),c=l.getLocalTransform(i);c?(xe.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(Ac);fe.prototype.type="group";var RB={},rl={},Hx={};function OB(r){delete Hx[r]}function PB(r){if(!r)return!1;if(typeof r=="string")return vc(r,1)<xp;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,a=0;a<n;a++)t+=vc(e[a].color,1);return t/=n,t<xp}return!1}var BB=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 ZP,o=n.renderer||"canvas";if(rl[o]||(o=Me(rl)[0]),RB.NODE_ENV!=="production"&&!rl[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new rl[o](t,i,n,e),l=n.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!Ce.node&&!Ce.worker&&!l?new EB(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?Ce.touchEventsSupported:!!c,h=44,d;f&&(d=pe(n.pointerSize,h)),this.handler=new tx(i,s,u,s.root,d),this.animation=new mB({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=PB(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=_o();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var a=_o();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 fe&&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,OB(this.id))},r}();function Ux(r,e){var t=new BB($b(),r,e);return Hx[t.id]=t,t}function VB(r,e){rl[r]=e}var kp;function zB(r){if(typeof kp=="function")return kp(r)}function FB(r){kp=r}var $B=1e-4,Wx=20;function GB(r){return r.replace(/^\s+|\s+$/g,"")}function $e(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 X(r)?GB(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function ct(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),Wx),r=(+r).toFixed(e),t?r:+r}function Tr(r){return r.sort(function(e,t){return e-t}),r}function hn(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 Np(r)}function Np(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 Yx(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 HB(r,e){var t=sn(r,function(d,p){return d+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=H(r,function(d){return(isNaN(d)?0:d)/t*n*100}),i=n*100,o=H(a,function(d){return Math.floor(d)}),s=sn(o,function(d,p){return d+p},0),l=H(a,function(d,p){return d-o[p]});s<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,h=l.length;f<h;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return H(o,function(d){return d/n})}function UB(r,e){var t=Math.max(hn(r),hn(e)),n=r+e;return t>Wx?n:ct(n,t)}var Zx=9007199254740991;function qx(r){var e=Math.PI*2;return(r%e+e)%e}function nl(r){return r>-1e-4&&r<$B}var WB=/^(?:(\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 dn(r){if(r instanceof Date)return r;if(X(r)){var e=WB.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 YB(r){return Math.pow(10,Mc(r))}function Mc(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 Xx(r,e){var t=Mc(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 Ip(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 Kx(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,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function Bn(r){var e=parseFloat(r);return e==r&&(e!==0||!X(r)||r.indexOf("x")<=0)?e:NaN}function Lp(r){return!isNaN(Bn(r))}function Qx(){return Math.round(Math.random()*9)}function jx(r,e){return e===0?r:jx(e,r%e)}function Jx(r,e){return r==null?e:e==null?r:r*e/jx(r,e)}var Rp={},ZB="[ECharts] ",e1={},qB=typeof console<"u"&&console.warn&&console.log;function kc(r,e,t){if(qB){if(t){if(e1[e])return;e1[e]=!0}console[r](ZB+e)}}function XB(r,e){kc("log",r,e)}function st(r,e){kc("warn",r,e)}function Rt(r,e){kc("error",r,e)}function qr(r){Rp.NODE_ENV!=="production"&&kc("warn","DEPRECATED: "+r,!0)}function vt(r,e,t){Rp.NODE_ENV!=="production"&&qr((t?"["+t+"]":"")+(r+" is deprecated, use "+e+" instead."))}function Zt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t="";if(Rp.NODE_ENV!=="production"){var n=function(a){return a===void 0?"undefined":a===1/0?"Infinity":a===-1/0?"-Infinity":qa(a)?"NaN":a instanceof Date?"Date("+a.toISOString()+")":ie(a)?"function () { ... }":Hb(a)?a+"":null};t=H(r,function(a){if(X(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 Fe(r){throw new Error(r)}var Op={};function t1(r,e,t){return(e-r)*t+r}var r1="series\0",n1="\0_ec_\0";function He(r){return r instanceof Array?r:r==null?[]:[r]}function oi(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 a1=["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 Eo(r){return oe(r)&&!G(r)&&!(r instanceof Date)?r.value:r}function KB(r){return oe(r)&&!(r instanceof Array)}function i1(r,e,t){var n=t==="normalMerge",a=t==="replaceMerge",i=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=te();A(e,function(l,u){if(!oe(l)){e[u]=null;return}Op.NODE_ENV!=="production"&&(l.id!=null&&!l1(l.id)&&s1(l.id),l.name!=null&&!l1(l.name)&&s1(l.name))});var s=QB(r,o,t);return(n||a)&&jB(s,r,o,e),n&&JB(s,e),n||a?eV(s,e,a):i&&tV(s,e),rV(s),s}function QB(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"||To(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function jB(r,e,t,n){A(n,function(a,i){if(!(!a||a.id==null)){var o=al(a.id),s=t.get(o);if(s!=null){var l=r[s];se(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=a,l.existing=e[s],n[i]=null}}})}function JB(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)&&!To(t)&&!To(i)&&o1("name",i,t)){r[a].newOption=t,e[n]=null;return}}})}function eV(r,e,t){A(e,function(n){if(n){for(var a,i=0;(a=r[i])&&(a.newOption||To(a.existing)||a.existing&&n.id!=null&&!o1("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),i++}})}function tV(r,e){A(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function rV(r){var e=te();A(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),A(r,function(t){var n=t.newOption;se(!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(oe(i)){if(o.name=i.name!=null?al(i.name):a?a.name:r1+n,a)o.id=al(a.id);else if(i.id!=null)o.id=al(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 o1(r,e,t){var n=_t(e[r],null),a=_t(t[r],null);return n!=null&&a!=null&&n===a}function al(r){if(Op.NODE_ENV!=="production"&&r==null)throw new Error;return _t(r,"")}function _t(r,e){return r==null?e:X(r)?r:Oe(r)||Qu(r)?r+"":e}function s1(r){Op.NODE_ENV!=="production"&&st("`"+r+"` is invalid id or name. Must be a string or number.")}function l1(r){return Qu(r)||Lp(r)}function Pp(r){var e=r.name;return!!(e&&e.indexOf(r1))}function To(r){return r&&r.id!=null&&al(r.id).indexOf(n1)===0}function nV(r){return n1+r}function aV(r,e,t){A(r,function(n){var a=n.newOption;oe(a)&&(n.keyInfo.mainType=e,n.keyInfo.subType=iV(e,a,n.existing,t))})}function iV(r,e,t,n){var a=e.type?e.type:t?t.subType:n.determineSubType(r,e);return a}function oV(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,c=o.length;u<c;u++){var f=_t(o[u].seriesId,null);if(f==null)return;for(var h=He(o[u].dataIndex),d=l&&l[f],p=0,v=h.length;p<v;p++){var g=h[p];d&&d[g]?d[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 c=i(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function si(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return G(e.dataIndex)?H(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return G(e.name)?H(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function Ne(){var r="__ec_inner_"+sV++;return function(e){return e[r]||(e[r]={})}}var sV=Qx();function il(r,e,t){var n=Bp(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,c){var f=ol(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function Bp(r,e){var t;if(X(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var a=te(),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)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&we(e.includeMainTypes,c)<0)){o=o||!!c;var h=a.get(c)||a.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var gt={useDefault:!0,enableAll:!1,enableNone:!1},lV={useDefault:!1,enableAll:!0,enableNone:!0};function ol(r,e,t,n){n=n||gt;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?(se(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(a==="all"&&(se(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 u1(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function uV(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function cV(r){return r==="auto"?Ce.domSupported?"html":"richText":r||"html"}function Vp(r,e){var t=te(),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 c1(r,e,t,n,a){var i=e==null||e==="auto";if(n==null)return n;if(Oe(n)){var o=t1(t||0,n,a);return ct(o,i?Math.max(hn(t||0),hn(n)):e)}else{if(X(n))return a<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var h=r.getDimensionInfo(f);if(h&&h.type==="ordinal")s[f]=(a<1&&l?l:u)[f];else{var d=l&&l[f]?l[f]:0,p=u[f],o=t1(d,p,a);s[f]=ct(o,i?Math.max(hn(d),hn(p)):e)}}return s}}var zp={},fV=".",li="___EC__COMPONENT__CONTAINER___",f1="___EC__EXTENDED_CLASS___";function pn(r){var e={main:"",sub:""};if(r){var t=r.split(fV);e.main=t[0]||"",e.sub=t[1]||""}return e}function hV(r){se(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function dV(r){return!!(r&&r[f1])}function Fp(r,e){r.$constructor=r,r.extend=function(t){zp.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 pV(n)?a=function(i){V(o,i);function o(){return i.apply(this,arguments)||this}return o}(n):(a=function(){(t.$constructor||n).apply(this,arguments)},vP(a,this)),F(a.prototype,t),a[f1]=!0,a.extend=this.extend,a.superCall=mV,a.superApply=yV,a.superClass=n,a}}function pV(r){return ie(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function h1(r,e){r.extend=e.extend}var vV=Math.round(Math.random()*10);function gV(r){var e=["__\0is_clz",vV++].join("_");r.prototype[e]=!0,zp.NODE_ENV!=="production"&&se(!r.isInstance,'The method "is" can not be defined.'),r.isInstance=function(t){return!!(t&&t[e])}}function mV(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 yV(r,e,t){return this.superClass.prototype[e].apply(r,t)}function Nc(r){var e={};r.registerClass=function(n){var a=n.type||n.prototype.type;if(a){hV(a),n.prototype.type=a;var i=pn(a);if(!i.sub)zp.NODE_ENV!=="production"&&e[i.main]&&console.warn(i.main+" exists."),e[i.main]=n;else if(i.sub!==li){var o=t(i);o[i.sub]=n}}return n},r.getClass=function(n,a,i){var o=e[n];if(o&&o[li]&&(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=pn(n),i=[],o=e[a.main];return o&&o[li]?A(o,function(s,l){l!==li&&i.push(s)}):i.push(o),i},r.hasClass=function(n){var a=pn(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=pn(n),i=e[a.main];return i&&i[li]};function t(n){var a=e[n.main];return(!a||!a[li])&&(a=e[n.main]={},a[li]=!0),a}}function ui(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&&we(a,l)>=0||i&&we(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var _V=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],bV=ui(_V),xV=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return bV(this,e,t)},r}(),$p=new Zs(50);function wV(r){if(typeof r=="string"){var e=$p.get(r);return e&&e.image}else return r}function Gp(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=$p.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!Ic(e)&&i.pending.push(o)):(e=aa.loadImage(r,d1,d1),e.__zrImageSrc=r,$p.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function d1(){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 Ic(r){return r&&r.width&&r.height}var Hp=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function SV(r,e,t,n,a,i){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
|
|
194
|
+
`);i=p1(t,n,a,i);for(var s=!1,l={},u=0,c=o.length;u<c;u++)v1(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
195
|
+
`),r.isTruncated=s}function p1(r,e,t,n){n=n||{};var a=F({},n);a.font=e,t=pe(t,"..."),a.maxIterations=pe(n.maxIterations,2);var i=a.minChar=pe(n.minChar,0);a.cnCharWidth=dr("国",e);var o=a.ascCharWidth=dr("a",e);a.placeholder=pe(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<i&&s>=o;l++)s-=o;var u=dr(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 v1(r,e,t){var n=t.containerWidth,a=t.font,i=t.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=dr(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?EV(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=dr(e,a)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function EV(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 TV(r,e){r!=null&&(r+="");var t=e.overflow,n=e.padding,a=e.font,i=t==="truncate",o=Cc(a),s=pe(e.lineHeight,o),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",c=!1,f=e.width,h;f!=null&&(t==="break"||t==="breakAll")?h=r?m1(r,e.font,f,t==="breakAll",0).lines:[]:h=r?r.split(`
|
|
196
|
+
`):[];var d=h.length*s,p=pe(e.height,d);if(d>p&&u){var v=Math.floor(p/s);c=c||h.length>v,h=h.slice(0,v)}if(r&&i&&f!=null)for(var g=p1(f,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m={},y=0;y<h.length;y++)v1(m,h[y],g),h[y]=m.textLine,c=c||m.isTruncated;for(var _=p,x=0,y=0;y<h.length;y++)x=Math.max(dr(h[y],a),x);f==null&&(f=x);var w=x;return n&&(_+=n[0]+n[2],w+=n[1]+n[3],f+=n[1]+n[3]),l&&(w=f),{lines:h,height:p,outerWidth:w,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:x,contentHeight:d,width:f,isTruncated:c}}var CV=function(){function r(){}return r}(),g1=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),DV=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 AV(r,e){var t=new DV;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=Hp.lastIndex=0,l;(l=Hp.exec(r))!=null;){var u=l.index;u>s&&Up(t,r.substring(s,u),e,o),Up(t,l[2],e,o,l[1]),s=Hp.lastIndex}s<r.length&&Up(t,r.substring(s,r.length),e,o);var c=[],f=0,h=0,d=e.padding,p=i==="truncate",v=e.lineOverflow==="truncate",g={};function m(z,$,U){z.width=$,z.lineHeight=U,f+=U,h=Math.max(h,$)}e:for(var y=0;y<t.lines.length;y++){for(var _=t.lines[y],x=0,w=0,S=0;S<_.tokens.length;S++){var E=_.tokens[S],T=E.styleName&&e.rich[E.styleName]||{},C=E.textPadding=T.padding,D=C?C[1]+C[3]:0,M=E.font=T.font||e.font;E.contentHeight=Cc(M);var k=pe(T.height,E.contentHeight);if(E.innerHeight=k,C&&(k+=C[0]+C[2]),E.height=k,E.lineHeight=br(T.lineHeight,e.lineHeight,k),E.align=T&&T.align||e.align,E.verticalAlign=T&&T.verticalAlign||"middle",v&&a!=null&&f+E.lineHeight>a){var N=t.lines.length;S>0?(_.tokens=_.tokens.slice(0,S),m(_,w,x),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y),t.isTruncated=t.isTruncated||t.lines.length<N;break e}var L=T.width,R=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")E.percentWidth=L,c.push(E),E.contentWidth=dr(E.text,M);else{if(R){var I=T.backgroundColor,O=I&&I.image;O&&(O=wV(O),Ic(O)&&(E.width=Math.max(E.width,O.width*k/O.height)))}var P=p&&n!=null?n-w:null;P!=null&&P<E.width?!R||P<D?(E.text="",E.width=E.contentWidth=0):(SV(g,E.text,P-D,M,e.ellipsis,{minChar:e.truncateMinChar}),E.text=g.text,t.isTruncated=t.isTruncated||g.isTruncated,E.width=E.contentWidth=dr(E.text,M)):E.contentWidth=dr(E.text,M)}E.width+=D,w+=E.width,T&&(x=Math.max(x,E.lineHeight))}m(_,w,x)}t.outerWidth=t.width=pe(n,h),t.outerHeight=t.height=pe(a,f),t.contentHeight=f,t.contentWidth=h,d&&(t.outerWidth+=d[1]+d[3],t.outerHeight+=d[0]+d[2]);for(var y=0;y<c.length;y++){var E=c[y],B=E.percentWidth;E.width=parseInt(B,10)/100*t.width}return t}function Up(r,e,t,n,a){var i=e==="",o=a&&t.rich[a]||{},s=r.lines,l=o.font||t.font,u=!1,c,f;if(n){var h=o.padding,d=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Zr(o.width,n.width)+d;s.length>0&&p+n.accumWidth>n.width&&(c=e.split(`
|
|
197
|
+
`),u=!0),n.accumWidth=p}else{var v=m1(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=v.accumWidth+d,f=v.linesWidths,c=v.lines}}else c=e.split(`
|
|
198
|
+
`);for(var g=0;g<c.length;g++){var m=c[g],y=new CV;if(y.styleName=a,y.text=m,y.isLineHolder=!m&&!i,typeof o.width=="number"?y.width=o.width:y.width=f?f[g]:dr(m,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new g1)).tokens,x=_.length;x===1&&_[0].isLineHolder?_[0]=y:(m||!x||i)&&_.push(y)}else s.push(new g1([y]))}}function MV(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var kV=sn(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function NV(r){return MV(r)?!!kV[r]:!0}function m1(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,c=0,f=0;f<r.length;f++){var h=r.charAt(f);if(h===`
|
|
199
|
+
`){l&&(s+=l,c+=u),i.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=dr(h,e),p=n?!1:!NV(h);if(i.length?c+d>t:a+c+d>t){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=h,c=d)):p?(i.push(l),o.push(u),l=h,u=d):(i.push(h),o.push(d));continue}c+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=a),{accumWidth:c,lines:i,linesWidths:o}}var Wp="__zr_style_"+Math.round(Math.random()*10),ci={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Lc={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ci[Wp]=!0;var y1=["z","z2","invisible"],IV=["invisible"],Cr=function(r){et(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=Me(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&&LV(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 xe(0,0,0,0)),n?xe.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 xe(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:F(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=lc,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&lc)},e.prototype.styleUpdated=function(){this.__dirty&=-3},e.prototype.createStyle=function(t){return ec(ci,t)},e.prototype.useStyle=function(t){t[Wp]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[Wp]},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,y1)},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 c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=Me(c),h=0;h<f.length;h++){var d=f[h];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var p=Me(u),h=0;h<p.length;h++){var d=p[h];this.style[d]=this.style[d]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?IV:y1,h=0;h<v.length;h++){var d=v[h];n&&n[d]!=null?this[d]=n[d]:l&&a[d]!=null&&(this[d]=a[d])}},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 F(t,n),t},e.prototype.getAnimationStyleProps=function(){return Lc},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=un|lc}(),e}(Ac),Yp=new xe(0,0,0,0),Zp=new xe(0,0,0,0);function LV(r,e,t){return Yp.copy(r.getBoundingRect()),r.transform&&Yp.applyTransform(r.transform),Zp.width=e,Zp.height=t,!Yp.intersect(Zp)}var nr=Math.min,ar=Math.max,qp=Math.sin,Xp=Math.cos,fi=Math.PI*2,Rc=Xa(),Oc=Xa(),Pc=Xa();function Bc(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=nr(a,n[0]),i=ar(i,n[0]),o=nr(o,n[1]),s=ar(s,n[1]);e[0]=a,e[1]=o,t[0]=i,t[1]=s}}function _1(r,e,t,n,a,i){a[0]=nr(r,t),a[1]=nr(e,n),i[0]=ar(r,t),i[1]=ar(e,n)}var b1=[],x1=[];function RV(r,e,t,n,a,i,o,s,l,u){var c=px,f=wt,h=c(r,t,a,o,b1);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<h;d++){var p=f(r,t,a,o,b1[d]);l[0]=nr(p,l[0]),u[0]=ar(p,u[0])}h=c(e,n,i,s,x1);for(var d=0;d<h;d++){var v=f(e,n,i,s,x1[d]);l[1]=nr(v,l[1]),u[1]=ar(v,u[1])}l[0]=nr(r,l[0]),u[0]=ar(r,u[0]),l[0]=nr(o,l[0]),u[0]=ar(o,u[0]),l[1]=nr(e,l[1]),u[1]=ar(e,u[1]),l[1]=nr(s,l[1]),u[1]=ar(s,u[1])}function OV(r,e,t,n,a,i,o,s){var l=gx,u=Nt,c=ar(nr(l(r,t,a),1),0),f=ar(nr(l(e,n,i),1),0),h=u(r,t,a,c),d=u(e,n,i,f);o[0]=nr(r,a,h),o[1]=nr(e,i,d),s[0]=ar(r,a,h),s[1]=ar(e,i,d)}function PV(r,e,t,n,a,i,o,s,l){var u=oa,c=sa,f=Math.abs(a-i);if(f%fi<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(Rc[0]=Xp(a)*t+r,Rc[1]=qp(a)*n+e,Oc[0]=Xp(i)*t+r,Oc[1]=qp(i)*n+e,u(s,Rc,Oc),c(l,Rc,Oc),a=a%fi,a<0&&(a=a+fi),i=i%fi,i<0&&(i=i+fi),a>i&&!o?i+=fi:a<i&&o&&(a+=fi),o){var h=i;i=a,a=h}for(var d=0;d<i;d+=Math.PI/2)d>a&&(Pc[0]=Xp(d)*t+r,Pc[1]=qp(d)*n+e,u(s,Pc,s),c(l,Pc,l))}var Ze={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},hi=[],di=[],vn=[],da=[],gn=[],mn=[],Kp=Math.min,Qp=Math.max,pi=Math.cos,vi=Math.sin,Vn=Math.abs,jp=Math.PI,pa=jp*2,Jp=typeof Float32Array<"u",sl=[];function ev(r){var e=Math.round(r/jp*1e8)/1e8;return e%2*jp}function tv(r,e){var t=ev(r[0]);t<0&&(t+=pa);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=pa?a=t+pa:e&&t-a>=pa?a=t-pa:!e&&t>a?a=t+(pa-ev(t-a)):e&&t<a&&(a=t-(pa-ev(a-t))),r[0]=t,r[1]=a}var yn=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=Vn(n/Tc/e)||0,this._uy=Vn(n/Tc/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(Ze.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=Vn(e-this._xi),a=Vn(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Ze.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(Ze.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(Ze.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(),sl[0]=a,sl[1]=i,tv(sl,o),a=sl[0],i=sl[1];var s=i-a;return this.addData(Ze.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=pi(i)*n+e,this._yi=vi(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(Ze.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ze.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)&&Jp&&(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();Jp&&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 c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[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,Jp&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){vn[0]=vn[1]=gn[0]=gn[1]=Number.MAX_VALUE,da[0]=da[1]=mn[0]=mn[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 Ze.M:t=a=e[o++],n=i=e[o++],gn[0]=a,gn[1]=i,mn[0]=a,mn[1]=i;break;case Ze.L:_1(t,n,e[o],e[o+1],gn,mn),t=e[o++],n=e[o++];break;case Ze.C:RV(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],gn,mn),t=e[o++],n=e[o++];break;case Ze.Q:OV(t,n,e[o++],e[o++],e[o],e[o+1],gn,mn),t=e[o++],n=e[o++];break;case Ze.A:var u=e[o++],c=e[o++],f=e[o++],h=e[o++],d=e[o++],p=e[o++]+d;o+=1;var v=!e[o++];l&&(a=pi(d)*f+u,i=vi(d)*h+c),PV(u,c,f,h,d,p,v,gn,mn),t=pi(p)*f+u,n=vi(p)*h+c;break;case Ze.R:a=t=e[o++],i=n=e[o++];var g=e[o++],m=e[o++];_1(a,i,a+g,i+m,gn,mn);break;case Ze.Z:t=a,n=i;break}oa(vn,vn,gn),sa(da,da,mn)}return o===0&&(vn[0]=vn[1]=da[0]=da[1]=0),new xe(vn[0],vn[1],da[0]-vn[0],da[1]-vn[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,c=0,f=0,h=0;h<t;){var d=e[h++],p=h===1;p&&(i=e[h],o=e[h+1],s=i,l=o);var v=-1;switch(d){case Ze.M:i=s=e[h++],o=l=e[h++];break;case Ze.L:{var g=e[h++],m=e[h++],y=g-i,_=m-o;(Vn(y)>n||Vn(_)>a||h===t-1)&&(v=Math.sqrt(y*y+_*_),i=g,o=m);break}case Ze.C:{var x=e[h++],w=e[h++],g=e[h++],m=e[h++],S=e[h++],E=e[h++];v=qP(i,o,x,w,g,m,S,E,10),i=S,o=E;break}case Ze.Q:{var x=e[h++],w=e[h++],g=e[h++],m=e[h++];v=KP(i,o,x,w,g,m,10),i=g,o=m;break}case Ze.A:var T=e[h++],C=e[h++],D=e[h++],M=e[h++],k=e[h++],N=e[h++],L=N+k;h+=1,p&&(s=pi(k)*D+T,l=vi(k)*M+C),v=Qp(D,M)*Kp(pa,Math.abs(N)),i=pi(L)*D+T,o=vi(L)*M+C;break;case Ze.R:{s=i=e[h++],l=o=e[h++];var R=e[h++],I=e[h++];v=R*2+I*2;break}case Ze.Z:{var y=s-i,_=l-o;v=Math.sqrt(y*y+_*_),i=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,c,f,h,d=t<1,p,v,g=0,m=0,y,_=0,x,w;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,y=t*v,!y)))e:for(var S=0;S<o;){var E=n[S++],T=S===1;switch(T&&(u=n[S],c=n[S+1],s=u,l=c),E!==Ze.L&&_>0&&(e.lineTo(x,w),_=0),E){case Ze.M:s=u=n[S++],l=c=n[S++],e.moveTo(u,c);break;case Ze.L:{f=n[S++],h=n[S++];var C=Vn(f-u),D=Vn(h-c);if(C>a||D>i){if(d){var M=p[m++];if(g+M>y){var k=(y-g)/M;e.lineTo(u*(1-k)+f*k,c*(1-k)+h*k);break e}g+=M}e.lineTo(f,h),u=f,c=h,_=0}else{var N=C*C+D*D;N>_&&(x=f,w=h,_=N)}break}case Ze.C:{var L=n[S++],R=n[S++],I=n[S++],O=n[S++],P=n[S++],B=n[S++];if(d){var M=p[m++];if(g+M>y){var k=(y-g)/M;ca(u,L,I,P,k,hi),ca(c,R,O,B,k,di),e.bezierCurveTo(hi[1],di[1],hi[2],di[2],hi[3],di[3]);break e}g+=M}e.bezierCurveTo(L,R,I,O,P,B),u=P,c=B;break}case Ze.Q:{var L=n[S++],R=n[S++],I=n[S++],O=n[S++];if(d){var M=p[m++];if(g+M>y){var k=(y-g)/M;Ys(u,L,I,k,hi),Ys(c,R,O,k,di),e.quadraticCurveTo(hi[1],di[1],hi[2],di[2]);break e}g+=M}e.quadraticCurveTo(L,R,I,O),u=I,c=O;break}case Ze.A:var z=n[S++],$=n[S++],U=n[S++],j=n[S++],Z=n[S++],ee=n[S++],he=n[S++],Ee=!n[S++],re=U>j?U:j,J=Vn(U-j)>.001,ue=Z+ee,q=!1;if(d){var M=p[m++];g+M>y&&(ue=Z+ee*(y-g)/M,q=!0),g+=M}if(J&&e.ellipse?e.ellipse(z,$,U,j,he,Z,ue,Ee):e.arc(z,$,re,Z,ue,Ee),q)break e;T&&(s=pi(Z)*U+z,l=vi(Z)*j+$),u=pi(ue)*U+z,c=vi(ue)*j+$;break;case Ze.R:s=u=n[S],l=c=n[S+1],f=n[S++],h=n[S++];var ae=n[S++],Y=n[S++];if(d){var M=p[m++];if(g+M>y){var ye=y-g;e.moveTo(f,h),e.lineTo(f+Kp(ye,ae),h),ye-=ae,ye>0&&e.lineTo(f+ae,h+Kp(ye,Y)),ye-=Y,ye>0&&e.lineTo(f+Qp(ae-ye,0),h+Y),ye-=ae,ye>0&&e.lineTo(f,h+Qp(Y-ye,0));break e}g+=M}e.rect(f,h,ae,Y);break;case Ze.Z:if(d){var M=p[m++];if(g+M>y){var k=(y-g)/M;e.lineTo(u*(1-k)+s*k,c*(1-k)+l*k);break e}g+=M}e.closePath(),u=s,c=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=Ze,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function va(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 c=l*i-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function BV(r,e,t,n,a,i,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>i+f&&c>s+f||c<e-f&&c<n-f&&c<i-f&&c<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 h=vx(r,e,t,n,a,i,o,s,u,c,null);return h<=f/2}function w1(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 c=mx(r,e,t,n,a,i,s,l,null);return c<=u/2}var S1=Math.PI*2;function pr(r){return r%=S1,r<0&&(r+=S1),r}var ll=Math.PI*2;function VV(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-a)%ll<1e-4)return!0;if(i){var f=n;n=pr(a),a=pr(f)}else n=pr(n),a=pr(a);n>a&&(a+=ll);var h=Math.atan2(l,s);return h<0&&(h+=ll),h>=n&&h<=a||h+ll>=n&&h+ll<=a}function zn(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 ga=yn.CMD,gi=Math.PI*2,zV=1e-4;function FV(r,e){return Math.abs(r-e)<zV}var qt=[-1,-1,-1],Dr=[-1,-1];function $V(){var r=Dr[0];Dr[0]=Dr[1],Dr[1]=r}function GV(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 c=hc(e,n,i,s,u,qt);if(c===0)return 0;for(var f=0,h=-1,d=void 0,p=void 0,v=0;v<c;v++){var g=qt[v],m=g===0||g===1?.5:1,y=wt(r,t,a,o,g);y<l||(h<0&&(h=px(e,n,i,s,Dr),Dr[1]<Dr[0]&&h>1&&$V(),d=wt(e,n,i,s,Dr[0]),h>1&&(p=wt(e,n,i,s,Dr[1]))),h===2?g<Dr[0]?f+=d<e?m:-m:g<Dr[1]?f+=p<d?m:-m:f+=s<p?m:-m:g<Dr[0]?f+=d<e?m:-m:f+=s<d?m:-m)}return f}function HV(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=XP(e,n,i,s,qt);if(l===0)return 0;var u=gx(e,n,i);if(u>=0&&u<=1){for(var c=0,f=Nt(e,n,i,u),h=0;h<l;h++){var d=qt[h]===0||qt[h]===1?.5:1,p=Nt(r,t,a,qt[h]);p<o||(qt[h]<u?c+=f<e?d:-d:c+=i<f?d:-d)}return c}else{var d=qt[0]===0||qt[0]===1?.5:1,p=Nt(r,t,a,qt[0]);return p<o?0:i<e?d:-d}}function UV(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);qt[0]=-l,qt[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=gi-1e-4){n=0,a=gi;var c=i?1:-1;return o>=qt[0]+r&&o<=qt[1]+r?c:0}if(n>a){var f=n;n=a,a=f}n<0&&(n+=gi,a+=gi);for(var h=0,d=0;d<2;d++){var p=qt[d];if(p+r>o){var v=Math.atan2(s,p),c=i?1:-1;v<0&&(v=gi+v),(v>=n&&v<=a||v+gi>=n&&v+gi<=a)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),h+=c)}}return h}function E1(r,e,t,n,a){for(var i=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,h,d,p=0;p<o;){var v=i[p++],g=p===1;switch(v===ga.M&&p>1&&(t||(s+=zn(l,u,c,f,n,a))),g&&(l=i[p],u=i[p+1],c=l,f=u),v){case ga.M:c=i[p++],f=i[p++],l=c,u=f;break;case ga.L:if(t){if(va(l,u,i[p],i[p+1],e,n,a))return!0}else s+=zn(l,u,i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case ga.C:if(t){if(BV(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=GV(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 ga.Q:if(t){if(w1(l,u,i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=HV(l,u,i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case ga.A:var m=i[p++],y=i[p++],_=i[p++],x=i[p++],w=i[p++],S=i[p++];p+=1;var E=!!(1-i[p++]);h=Math.cos(w)*_+m,d=Math.sin(w)*x+y,g?(c=h,f=d):s+=zn(l,u,h,d,n,a);var T=(n-m)*x/_+m;if(t){if(VV(m,y,x,w,w+S,E,e,T,a))return!0}else s+=UV(m,y,x,w,w+S,E,T,a);l=Math.cos(w+S)*_+m,u=Math.sin(w+S)*x+y;break;case ga.R:c=l=i[p++],f=u=i[p++];var C=i[p++],D=i[p++];if(h=c+C,d=f+D,t){if(va(c,f,h,f,e,n,a)||va(h,f,h,d,e,n,a)||va(h,d,c,d,e,n,a)||va(c,d,c,f,e,n,a))return!0}else s+=zn(h,f,h,d,n,a),s+=zn(c,d,c,f,n,a);break;case ga.Z:if(t){if(va(l,u,c,f,e,n,a))return!0}else s+=zn(l,u,c,f,n,a);l=c,u=f;break}}return!t&&!FV(u,f)&&(s+=zn(l,u,c,f,n,a)||0),s!==0}function WV(r,e,t){return E1(r,0,!1,e,t)}function YV(r,e,t,n){return E1(r,e,!0,t,n)}var Vc=le({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ci),ZV={style:le({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Lc.style)},rv=fn.concat(["invisible","culling","z","z2","zlevel","parent"]),De=function(r){et(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<rv.length;++s)a[rv[s]]=this[rv[s]];a.__dirty|=un}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=Me(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?F(this.style,s):this.useStyle(s):o==="shape"?F(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(X(t)){var n=vc(t,0);return n>.5?wp:n>.2?TB:Sp}else if(t)return Sp}return wp},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(X(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=vc(t,0)<xp;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 yn(!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&Us)&&(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 c=this.strokeContainThreshold;u=Math.max(u,c??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)),YV(s,l/u,t,n)))return!0}if(this.hasFill())return WV(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Us,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:F(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Us)},e.prototype.createStyle=function(t){return ec(Vc,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=F({},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=F({},a.shape),F(u,n.shape)):(u=F({},i?this.shape:a.shape),F(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=F({},this.shape);for(var c={},f=Me(u),h=0;h<f.length;h++){var d=f[h];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(t,{shape:c},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 ZV},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=function(i){et(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 ce(t.style)},o.prototype.getDefaultShape=function(){return ce(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=un|lc|Us}(),e}(Cr),qV=le({strokeFirst:!0,font:na,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Vc),Co=function(r){et(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 ec(qV,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=el(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}(Cr);Co.prototype.type="tspan";var XV=le({x:0,y:0},ci),KV={style:le({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Lc.style)};function QV(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var It=function(r){et(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return ec(XV,t)},e.prototype._getSize=function(t){var n=this.style,a=n[t];if(a!=null)return a;var i=QV(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 KV},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new xe(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Cr);It.prototype.type="image";function jV(r,e){var t=e.x,n=e.y,a=e.width,i=e.height,o=e.r,s,l,u,c;a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>a&&(f=s+l,s*=a/f,l*=a/f),u+c>a&&(f=u+c,u*=a/f,c*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=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+c,n+i),c!==0&&r.arc(t+c,n+i-c,c,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 Do=Math.round;function T1(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&&(Do(n*2)===Do(a*2)&&(r.x1=r.x2=mi(n,s,!0)),Do(i*2)===Do(o*2)&&(r.y1=r.y2=mi(i,s,!0))),r}}function C1(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=mi(n,s,!0),r.y=mi(a,s,!0),r.width=Math.max(mi(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(mi(a+o,s,!1)-r.y,o===0?0:1)),r}}function mi(r,e,t){if(!e)return r;var n=Do(r*2);return(n+Do(e))%2===0?n/2:(n+(t?1:-1))/2}var JV=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),ez={},Ie=function(r){et(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new JV},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=C1(ez,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?jV(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(De);Ie.prototype.type="rect";var tz={},D1={fill:"#000"},A1=2,rz={style:le({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},Lc.style)},Le=function(r){et(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=D1,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,iz(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 xe(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||D1},e.prototype.setTextContent=function(t){if(tz.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 F(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=Me(n),i=0;i<a.length;i++){var o=a[i];t[o]=t[o]||{},F(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return rz},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||na,a=t.padding,i=B1(t),o=TV(i,t),s=nv(t),l=!!t.backgroundColor,u=o.outerHeight,c=o.outerWidth,f=o.contentWidth,h=o.lines,d=o.lineHeight,p=this._defaultStyle;this.isTruncated=!!o.isTruncated;var v=t.x||0,g=t.y||0,m=t.align||p.align||"left",y=t.verticalAlign||p.verticalAlign||"top",_=v,x=xo(g,o.contentHeight,y);if(s||a){var w=tl(v,c,m),S=xo(g,u,y);s&&this._renderBackground(t,t,w,S,c,u)}x+=d/2,a&&(_=P1(v,m,a),y==="top"?x+=a[0]:y==="bottom"&&(x-=a[2]));for(var E=0,T=!1,C=O1("fill"in t?t.fill:(T=!0,p.fill)),D=R1("stroke"in t?t.stroke:!l&&(!p.autoStroke||T)?(E=A1,p.stroke):null),M=t.textShadowBlur>0,k=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),N=o.calculatedLineHeight,L=0;L<h.length;L++){var R=this._getOrCreateChild(Co),I=R.createStyle();R.useStyle(I),I.text=h[L],I.x=_,I.y=x,I.textAlign=m,I.textBaseline="middle",I.opacity=t.opacity,I.strokeFirst=!0,M&&(I.shadowBlur=t.textShadowBlur||0,I.shadowColor=t.textShadowColor||"transparent",I.shadowOffsetX=t.textShadowOffsetX||0,I.shadowOffsetY=t.textShadowOffsetY||0),I.stroke=D,I.fill=C,D&&(I.lineWidth=t.lineWidth||E,I.lineDash=t.lineDash,I.lineDashOffset=t.lineDashOffset||0),I.font=n,N1(I,t),x+=d,k&&R.setBoundingRect(new xe(tl(I.x,f,I.textAlign),xo(I.y,N,I.textBaseline),f,N))}},e.prototype._updateRichTexts=function(){var t=this.style,n=B1(t),a=AV(n,t),i=a.width,o=a.outerWidth,s=a.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,f=this._defaultStyle,h=t.align||f.align,d=t.verticalAlign||f.verticalAlign;this.isTruncated=!!a.isTruncated;var p=tl(u,o,h),v=xo(c,s,d),g=p,m=v;l&&(g+=l[3],m+=l[0]);var y=g+i;nv(t)&&this._renderBackground(t,t,p,v,o,s);for(var _=!!t.backgroundColor,x=0;x<a.lines.length;x++){for(var w=a.lines[x],S=w.tokens,E=S.length,T=w.lineHeight,C=w.width,D=0,M=g,k=y,N=E-1,L=void 0;D<E&&(L=S[D],!L.align||L.align==="left");)this._placeToken(L,t,T,m,M,"left",_),C-=L.width,M+=L.width,D++;for(;N>=0&&(L=S[N],L.align==="right");)this._placeToken(L,t,T,m,k,"right",_),C-=L.width,k-=L.width,N--;for(M+=(i-(M-g)-(y-k)-C)/2;D<=N;)L=S[D],this._placeToken(L,t,T,m,M+L.width/2,"center",_),M+=L.width,D++;m+=T}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=i+a/2;c==="top"?f=i+t.height/2:c==="bottom"&&(f=i+a-t.height/2);var h=!t.isLineHolder&&nv(u);h&&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 d=!!u.backgroundColor,p=t.textPadding;p&&(o=P1(o,s,p),f-=t.height/2-p[0]-t.innerHeight/2);var v=this._getOrCreateChild(Co),g=v.createStyle();v.useStyle(g);var m=this._defaultStyle,y=!1,_=0,x=O1("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),w=R1("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!m.autoStroke||y)?(_=A1,m.stroke):null),S=u.textShadowBlur>0||n.textShadowBlur>0;g.text=t.text,g.x=o,g.y=f,S&&(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||na,g.opacity=br(u.opacity,n.opacity,1),N1(g,u),w&&(g.lineWidth=br(u.lineWidth,n.lineWidth,_),g.lineDash=pe(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=w),x&&(g.fill=x);var E=t.contentWidth,T=t.contentHeight;v.setBoundingRect(new xe(tl(g.x,E,g.textAlign),xo(g.y,T,g.textBaseline),E,T))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,h=l&&!f,d=t.borderRadius,p=this,v,g;if(h||t.lineHeight||u&&c){v=this._getOrCreateChild(Ie),v.useStyle(v.createStyle()),v.style.fill=null;var m=v.shape;m.x=a,m.y=i,m.width=o,m.height=s,m.r=d,v.dirtyShape()}if(h){var y=v.style;y.fill=l||null,y.fillOpacity=pe(t.fillOpacity,1)}else if(f){g=this._getOrCreateChild(It),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=a,_.y=i,_.width=o,_.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=pe(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var x=(v||g).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=br(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return I1(t)&&(n=[t.fontStyle,t.fontWeight,k1(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Ur(n)||t.textFont||t.font},e}(Cr),nz={left:!0,right:1,center:1},az={top:1,bottom:1,middle:1},M1=["fontStyle","fontWeight","fontSize","fontFamily"];function k1(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Md+"px":r+"px"}function N1(r,e){for(var t=0;t<M1.length;t++){var n=M1[t],a=e[n];a!=null&&(r[n]=a)}}function I1(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function iz(r){return L1(r),A(r.rich,L1),r}function L1(r){if(r){r.font=Le.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||nz[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||az[t]?t:"top";var n=r.padding;n&&(r.padding=Rd(r.padding))}}function R1(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function O1(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function P1(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function B1(r){var e=r.text;return e!=null&&(e+=""),e}function nv(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var ve=Ne(),av=function(r,e,t,n){if(n){var a=ve(n);a.dataIndex=t,a.dataType=e,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=ve(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},zc={},V1=1,z1={},F1=Ne(),iv=Ne(),ov=0,ul=1,Fc=2,Xt=["emphasis","blur","select"],cl=["normal","emphasis","blur","select"],Ao=10,oz=9,yi="highlight",$c="downplay",fl="select",Gc="unselect",hl="toggleSelect";function Mo(r){return r!=null&&r!=="none"}function Hc(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function $1(r){Hc(r,"emphasis",Fc)}function G1(r){r.hoverState===Fc&&Hc(r,"normal",ov)}function sv(r){Hc(r,"blur",ul)}function H1(r){r.hoverState===ul&&Hc(r,"normal",ov)}function sz(r){r.selected=!0}function lz(r){r.selected=!1}function U1(r,e,t){e(r,t)}function Fn(r,e,t){U1(r,e,t),r.isGroup&&r.traverse(function(n){U1(n,e,t)})}function Uc(r,e){switch(e){case"emphasis":r.hoverState=Fc;break;case"normal":r.hoverState=ov;break;case"blur":r.hoverState=ul;break;case"select":r.selected=!0}}function uz(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 cz(r,e,t,n){var a=t&&we(t,"select")>=0,i=!1;if(r instanceof De){var o=F1(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Mo(s)||Mo(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=F({},n),u=F({},u),u.fill=s):!Mo(u.fill)&&Mo(s)?(i=!0,n=F({},n),u=F({},u),u.fill=sp(s)):!Mo(u.stroke)&&Mo(l)&&(i||(n=F({},n),u=F({},u)),u.stroke=sp(l)),n.style=u}}if(n&&n.z2==null){i||(n=F({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??Ao)}return n}function fz(r,e,t){if(t&&t.z2==null){t=F({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??oz)}return t}function hz(r,e,t){var n=we(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:uz(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=F({},t),o=F({opacity:n?a:i.opacity*.1},o),t.style=o),t}function lv(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return cz(this,r,e,t);if(r==="blur")return hz(this,r,t);if(r==="select")return fz(this,r,t)}return t}function _i(r){r.stateProxy=lv;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=lv),t&&(t.stateProxy=lv)}function W1(r,e){!K1(r,e)&&!r.__highByOuter&&Fn(r,$1)}function Y1(r,e){!K1(r,e)&&!r.__highByOuter&&Fn(r,G1)}function $n(r,e){r.__highByOuter|=1<<(e||0),Fn(r,$1)}function Gn(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Fn(r,G1)}function Z1(r){Fn(r,sv)}function uv(r){Fn(r,H1)}function q1(r){Fn(r,sz)}function X1(r){Fn(r,lz)}function K1(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function Q1(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=iv(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){H1(u)}),s&&t.push(i)),o.isBlured=!1}),A(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function cv(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&uv(h)}}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 c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var h=f&&s?f===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!h||e==="series"&&c)){var d=n.getViewOfSeriesModel(u);if(d.group.traverse(function(g){g.__highByOuter&&c&&e==="self"||sv(g)}),Vt(e))i(u.getData(),e);else if(oe(e))for(var p=Me(e),v=0;v<p.length;v++)i(u.getData(p[v]),e[p[v]]);l.push(u),iv(u).isBlured=!0}}),a.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,a)}})}}function fv(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){iv(n).isBlured=!0;var a=t.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){sv(i)})}}}function dz(r,e,t){var n=r.seriesIndex,a=r.getData(e.dataType);if(!a){zc.NODE_ENV!=="production"&&Rt("Unknown dataType "+e.dataType);return}var i=si(a,e);i=(G(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=ve(o);cv(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&cv(n,c,f,t)}}function hv(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(zc.NODE_ENV!=="production"&&!ma(s[u])&&Rt("param should be highDownDispatcher"),ve(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function pz(r,e,t){zc.NODE_ENV!=="production"&&!ma(r)&&Rt("param should be highDownDispatcher");var n=ve(r),a=hv(n.componentMainType,n.componentIndex,n.componentHighDownName,t),i=a.dispatchers,o=a.focusSelf;i?(o&&fv(n.componentMainType,n.componentIndex,t),A(i,function(s){return W1(s,e)})):(cv(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&fv(n.componentMainType,n.componentIndex,t),W1(r,e))}function vz(r,e,t){zc.NODE_ENV!=="production"&&!ma(r)&&Rt("param should be highDownDispatcher"),Q1(t);var n=ve(r),a=hv(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;a?A(a,function(i){return Y1(i,e)}):Y1(r,e)}function gz(r,e,t){if(pv(e)){var n=e.dataType,a=r.getData(n),i=si(a,e);G(i)||(i=[i]),r[e.type===hl?"toggleSelect":e.type===fl?"select":"unselect"](i,n)}}function j1(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)?q1(i):X1(i)})})}function mz(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 bi(r,e,t){xi(r,!0),Fn(r,_i),dv(r,e,t)}function yz(r){xi(r,!1)}function lt(r,e,t,n){n?yz(r):bi(r,e,t)}function dv(r,e,t){var n=ve(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var J1=["emphasis","blur","select"],_z={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ot(r,e,t,n){t=t||"itemStyle";for(var a=0;a<J1.length;a++){var i=J1[a],o=e.getModel([i,t]),s=r.ensureState(i);s.style=n?n(o):o[_z[t]]()}}function xi(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 ma(r){return!!(r&&r.__highDownDispatcher)}function bz(r,e,t){var n=ve(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function xz(r){var e=z1[r];return e==null&&V1<=32&&(e=z1[r]=V1++),e}function pv(r){var e=r.type;return e===fl||e===Gc||e===hl}function ew(r){var e=r.type;return e===yi||e===$c}function wz(r){var e=F1(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 ko=yn.CMD,Sz=[[],[],[]],tw=Math.sqrt,Ez=Math.atan2;function rw(r,e){if(e){var t=r.data,n=r.len(),a,i,o,s,l,u,c=ko.M,f=ko.C,h=ko.L,d=ko.R,p=ko.A,v=ko.Q;for(o=0,s=0;o<n;){switch(a=t[o++],s=o,i=0,a){case c:i=1;break;case h:i=1;break;case f:i=3;break;case v:i=2;break;case p:var g=e[4],m=e[5],y=tw(e[0]*e[0]+e[1]*e[1]),_=tw(e[2]*e[2]+e[3]*e[3]),x=Ez(-e[1]/_,e[0]/y);t[o]*=y,t[o++]+=g,t[o]*=_,t[o++]+=m,t[o++]*=y,t[o++]*=_,t[o++]+=x,t[o++]+=x,o+=2,s=o;break;case d:u[0]=t[o++],u[1]=t[o++],Lt(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],Lt(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<i;l++){var w=Sz[l];w[0]=t[o++],w[1]=t[o++],Lt(w,w,e),t[s++]=w[0],t[s++]=w[1]}}r.increaseVersion()}}var vv=Math.sqrt,Wc=Math.sin,Yc=Math.cos,dl=Math.PI;function nw(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function gv(r,e){return(r[0]*e[0]+r[1]*e[1])/(nw(r)*nw(e))}function aw(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(gv(r,e))}function iw(r,e,t,n,a,i,o,s,l,u,c){var f=l*(dl/180),h=Yc(f)*(r-t)/2+Wc(f)*(e-n)/2,d=-1*Wc(f)*(r-t)/2+Yc(f)*(e-n)/2,p=h*h/(o*o)+d*d/(s*s);p>1&&(o*=vv(p),s*=vv(p));var v=(a===i?-1:1)*vv((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,g=v*o*d/s,m=v*-s*h/o,y=(r+t)/2+Yc(f)*g-Wc(f)*m,_=(e+n)/2+Wc(f)*g+Yc(f)*m,x=aw([1,0],[(h-g)/o,(d-m)/s]),w=[(h-g)/o,(d-m)/s],S=[(-1*h-g)/o,(-1*d-m)/s],E=aw(w,S);if(gv(w,S)<=-1&&(E=dl),gv(w,S)>=1&&(E=0),E<0){var T=Math.round(E/dl*1e6)/1e6;E=dl*2+T%2*dl}c.addData(u,y,_,o,s,x,E,f,i)}var Tz=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Cz=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Dz(r){var e=new yn;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=yn.CMD,l=r.match(Tz);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,d=c.match(Cz)||[],p=d.length,v=0;v<p;v++)d[v]=parseFloat(d[v]);for(var g=0;g<p;){var m=void 0,y=void 0,_=void 0,x=void 0,w=void 0,S=void 0,E=void 0,T=t,C=n,D=void 0,M=void 0;switch(f){case"l":t+=d[g++],n+=d[g++],h=s.L,e.addData(h,t,n);break;case"L":t=d[g++],n=d[g++],h=s.L,e.addData(h,t,n);break;case"m":t+=d[g++],n+=d[g++],h=s.M,e.addData(h,t,n),a=t,i=n,f="l";break;case"M":t=d[g++],n=d[g++],h=s.M,e.addData(h,t,n),a=t,i=n,f="L";break;case"h":t+=d[g++],h=s.L,e.addData(h,t,n);break;case"H":t=d[g++],h=s.L,e.addData(h,t,n);break;case"v":n+=d[g++],h=s.L,e.addData(h,t,n);break;case"V":n=d[g++],h=s.L,e.addData(h,t,n);break;case"C":h=s.C,e.addData(h,d[g++],d[g++],d[g++],d[g++],d[g++],d[g++]),t=d[g-2],n=d[g-1];break;case"c":h=s.C,e.addData(h,d[g++]+t,d[g++]+n,d[g++]+t,d[g++]+n,d[g++]+t,d[g++]+n),t+=d[g-2],n+=d[g-1];break;case"S":m=t,y=n,D=e.len(),M=e.data,o===s.C&&(m+=t-M[D-4],y+=n-M[D-3]),h=s.C,T=d[g++],C=d[g++],t=d[g++],n=d[g++],e.addData(h,m,y,T,C,t,n);break;case"s":m=t,y=n,D=e.len(),M=e.data,o===s.C&&(m+=t-M[D-4],y+=n-M[D-3]),h=s.C,T=t+d[g++],C=n+d[g++],t+=d[g++],n+=d[g++],e.addData(h,m,y,T,C,t,n);break;case"Q":T=d[g++],C=d[g++],t=d[g++],n=d[g++],h=s.Q,e.addData(h,T,C,t,n);break;case"q":T=d[g++]+t,C=d[g++]+n,t+=d[g++],n+=d[g++],h=s.Q,e.addData(h,T,C,t,n);break;case"T":m=t,y=n,D=e.len(),M=e.data,o===s.Q&&(m+=t-M[D-4],y+=n-M[D-3]),t=d[g++],n=d[g++],h=s.Q,e.addData(h,m,y,t,n);break;case"t":m=t,y=n,D=e.len(),M=e.data,o===s.Q&&(m+=t-M[D-4],y+=n-M[D-3]),t+=d[g++],n+=d[g++],h=s.Q,e.addData(h,m,y,t,n);break;case"A":_=d[g++],x=d[g++],w=d[g++],S=d[g++],E=d[g++],T=t,C=n,t=d[g++],n=d[g++],h=s.A,iw(T,C,t,n,S,E,_,x,w,h,e);break;case"a":_=d[g++],x=d[g++],w=d[g++],S=d[g++],E=d[g++],T=t,C=n,t+=d[g++],n+=d[g++],h=s.A,iw(T,C,t,n,S,E,_,x,w,h,e);break}}(f==="z"||f==="Z")&&(h=s.Z,e.addData(h),t=a,n=i),o=h}return e.toStatic(),e}var ow=function(r){et(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(De);function sw(r){return r.setData!=null}function lw(r,e){var t=Dz(r),n=F({},e);return n.buildPath=function(a){if(sw(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){rw(t,a),this.dirtyShape()},n}function uw(r,e){return new ow(lw(r,e))}function Az(r,e){var t=lw(r,e),n=function(a){et(i,a);function i(o){var s=a.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return i}(ow);return n}function Mz(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 De(e);return o.createPathProxy(),o.buildPath=function(s){if(sw(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function mv(r,e){e=e||{};var t=new De;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?rw(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 kz=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),Hn=function(r){et(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new kz},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}(De);Hn.prototype.type="circle";var Nz=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),Zc=function(r){et(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Nz},e.prototype.buildPath=function(t,n){var a=.5522848,i=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*a,c=l*a;t.moveTo(i-s,o),t.bezierCurveTo(i-s,o-c,i-u,o-l,i,o-l),t.bezierCurveTo(i+u,o-l,i+s,o-c,i+s,o),t.bezierCurveTo(i+s,o+c,i+u,o+l,i,o+l),t.bezierCurveTo(i-u,o+l,i-s,o+c,i-s,o),t.closePath()},e}(De);Zc.prototype.type="ellipse";var cw=Math.PI,yv=cw*2,wi=Math.sin,No=Math.cos,Iz=Math.acos,zt=Math.atan2,fw=Math.abs,pl=Math.sqrt,vl=Math.max,_n=Math.min,Xr=1e-4;function Lz(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=f*l-c*u;if(!(h*h<Xr))return h=(c*(e-i)-f*(r-a))/h,[r+h*l,e+h*u]}function qc(r,e,t,n,a,i,o){var s=r-t,l=e-n,u=(o?i:-i)/pl(s*s+l*l),c=u*l,f=-u*s,h=r+c,d=e+f,p=t+c,v=n+f,g=(h+p)/2,m=(d+v)/2,y=p-h,_=v-d,x=y*y+_*_,w=a-i,S=h*v-p*d,E=(_<0?-1:1)*pl(vl(0,w*w*x-S*S)),T=(S*_-y*E)/x,C=(-S*y-_*E)/x,D=(S*_+y*E)/x,M=(-S*y+_*E)/x,k=T-g,N=C-m,L=D-g,R=M-m;return k*k+N*N>L*L+R*R&&(T=D,C=M),{cx:T,cy:C,x0:-c,y0:-f,x1:T*(a/w-1),y1:C*(a/w-1)}}function Rz(r){var e;if(G(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 Oz(r,e){var t,n=vl(e.r,0),a=vl(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 c=e.cx,f=e.cy,h=!!e.clockwise,d=fw(u-l),p=d>yv&&d%yv;if(p>Xr&&(d=p),!(n>Xr))r.moveTo(c,f);else if(d>yv-Xr)r.moveTo(c+n*No(l),f+n*wi(l)),r.arc(c,f,n,l,u,!h),a>Xr&&(r.moveTo(c+a*No(u),f+a*wi(u)),r.arc(c,f,a,u,l,h));else{var v=void 0,g=void 0,m=void 0,y=void 0,_=void 0,x=void 0,w=void 0,S=void 0,E=void 0,T=void 0,C=void 0,D=void 0,M=void 0,k=void 0,N=void 0,L=void 0,R=n*No(l),I=n*wi(l),O=a*No(u),P=a*wi(u),B=d>Xr;if(B){var z=e.cornerRadius;z&&(t=Rz(z),v=t[0],g=t[1],m=t[2],y=t[3]);var $=fw(n-a)/2;if(_=_n($,m),x=_n($,y),w=_n($,v),S=_n($,g),C=E=vl(_,x),D=T=vl(w,S),(E>Xr||T>Xr)&&(M=n*No(u),k=n*wi(u),N=a*No(l),L=a*wi(l),d<cw)){var U=Lz(R,I,N,L,M,k,O,P);if(U){var j=R-U[0],Z=I-U[1],ee=M-U[0],he=k-U[1],Ee=1/wi(Iz((j*ee+Z*he)/(pl(j*j+Z*Z)*pl(ee*ee+he*he)))/2),re=pl(U[0]*U[0]+U[1]*U[1]);C=_n(E,(n-re)/(Ee+1)),D=_n(T,(a-re)/(Ee-1))}}}if(!B)r.moveTo(c+R,f+I);else if(C>Xr){var J=_n(m,C),ue=_n(y,C),q=qc(N,L,R,I,n,J,h),ae=qc(M,k,O,P,n,ue,h);r.moveTo(c+q.cx+q.x0,f+q.cy+q.y0),C<E&&J===ue?r.arc(c+q.cx,f+q.cy,C,zt(q.y0,q.x0),zt(ae.y0,ae.x0),!h):(J>0&&r.arc(c+q.cx,f+q.cy,J,zt(q.y0,q.x0),zt(q.y1,q.x1),!h),r.arc(c,f,n,zt(q.cy+q.y1,q.cx+q.x1),zt(ae.cy+ae.y1,ae.cx+ae.x1),!h),ue>0&&r.arc(c+ae.cx,f+ae.cy,ue,zt(ae.y1,ae.x1),zt(ae.y0,ae.x0),!h))}else r.moveTo(c+R,f+I),r.arc(c,f,n,l,u,!h);if(!(a>Xr)||!B)r.lineTo(c+O,f+P);else if(D>Xr){var J=_n(v,D),ue=_n(g,D),q=qc(O,P,M,k,a,-ue,h),ae=qc(R,I,N,L,a,-J,h);r.lineTo(c+q.cx+q.x0,f+q.cy+q.y0),D<T&&J===ue?r.arc(c+q.cx,f+q.cy,D,zt(q.y0,q.x0),zt(ae.y0,ae.x0),!h):(ue>0&&r.arc(c+q.cx,f+q.cy,ue,zt(q.y0,q.x0),zt(q.y1,q.x1),!h),r.arc(c,f,a,zt(q.cy+q.y1,q.cx+q.x1),zt(ae.cy+ae.y1,ae.cx+ae.x1),h),J>0&&r.arc(c+ae.cx,f+ae.cy,J,zt(ae.y1,ae.x1),zt(ae.y0,ae.x0),!h))}else r.lineTo(c+O,f+P),r.arc(c,f,a,u,l,h)}r.closePath()}}}var Pz=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}(),Kt=function(r){et(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Pz},e.prototype.buildPath=function(t,n){Oz(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(De);Kt.prototype.type="sector";var Bz=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),gl=function(r){et(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Bz},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}(De);gl.prototype.type="ring";function Vz(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=r.length;h<d;h++)oa(c,c,r[h]),sa(f,f,r[h]);oa(c,c,n[0]),sa(f,f,n[1])}for(var h=0,d=r.length;h<d;h++){var p=r[h];if(t)l=r[h?h-1:d-1],u=r[(h+1)%d];else if(h===0||h===d-1){a.push(Nn(r[h]));continue}else l=r[h-1],u=r[h+1];Ka(i,u,l),rc(i,i,e);var v=Vd(p,l),g=Vd(p,u),m=v+g;m!==0&&(v/=m,g/=m),rc(o,i,-v),rc(s,i,g);var y=Zb([],p,o),_=Zb([],p,s);n&&(sa(y,y,c),oa(y,y,f),sa(_,_,c),oa(_,_,f)),a.push(y),a.push(_)}return t&&a.push(a.shift()),a}function hw(r,e,t){var n=e.smooth,a=e.points;if(a&&a.length>=2){if(n){var i=Vz(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],c=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[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 zz=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),Qt=function(r){et(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new zz},e.prototype.buildPath=function(t,n){hw(t,n,!0)},e}(De);Qt.prototype.type="polygon";var Fz=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),jt=function(r){et(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 Fz},e.prototype.buildPath=function(t,n){hw(t,n,!1)},e}(De);jt.prototype.type="polyline";var $z={},Gz=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),St=function(r){et(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 Gz},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=T1($z,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}(De);St.prototype.type="line";var ir=[],Hz=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 dw(r,e,t){var n=r.cpx2,a=r.cpy2;return n!=null||a!=null?[(t?dx:wt)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?dx:wt)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Jd:Nt)(r.x1,r.cpx1,r.x2,e),(t?Jd:Nt)(r.y1,r.cpy1,r.y2,e)]}var ml=function(r){et(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 Hz},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,c=n.cpx2,f=n.cpy2,h=n.percent;h!==0&&(t.moveTo(a,i),c==null||f==null?(h<1&&(Ys(a,l,o,h,ir),l=ir[1],o=ir[2],Ys(i,u,s,h,ir),u=ir[1],s=ir[2]),t.quadraticCurveTo(l,u,o,s)):(h<1&&(ca(a,l,c,o,h,ir),l=ir[1],c=ir[2],o=ir[3],ca(i,u,f,s,h,ir),u=ir[1],f=ir[2],s=ir[3]),t.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(t){return dw(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=dw(this.shape,t,!0);return po(n,n)},e}(De);ml.prototype.type="bezier-curve";var Uz=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}(),Xc=function(r){et(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 Uz},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,c=Math.cos(s),f=Math.sin(s);t.moveTo(c*o+a,f*o+i),t.arc(a,i,o,s,l,!u)},e}(De);Xc.prototype.type="arc";var _v=function(r){et(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),De.prototype.getBoundingRect.call(this)},e}(De),pw=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}(),yl=function(r){et(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}(pw),vw=function(r){et(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}(pw),Si=[0,0],Ei=[0,0],Kc=new be,Qc=new be,jc=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new be;for(var n=0;n<2;n++)this._axes[n]=new be;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);be.sub(a[0],n[1],n[0]),be.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 Kc.set(1/0,1/0),Qc.set(0,0),!this._intersectCheckOneSide(this,e,Kc,Qc,a,1)&&(n=!1,a)||!this._intersectCheckOneSide(e,this,Kc,Qc,a,-1)&&(n=!1,a)||a||be.copy(t,n?Kc:Qc),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,Si),this._getProjMinMaxOnAxis(l,t._corners,Ei),Si[1]<Ei[0]||Si[0]>Ei[1]){if(s=!1,i)return s;var c=Math.abs(Ei[0]-Si[1]),f=Math.abs(Si[0]-Ei[1]);Math.min(c,f)>a.len()&&(c<f?be.scale(a,u,-c*o):be.scale(a,u,f*o))}else if(n){var c=Math.abs(Ei[0]-Si[1]),f=Math.abs(Si[0]-Ei[1]);Math.min(c,f)<n.len()&&(c<f?be.scale(n,u,c*o):be.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 c=t[u].dot(a)+i[e];s=Math.min(c,s),l=Math.max(c,l)}n[0]=s,n[1]=l},r}(),Wz=[],Yz=function(r){et(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 xe(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(Wz)),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}(Cr),gw=Ne();function Io(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,c=void 0,f=void 0;n?(u=pe(n.duration,200),c=pe(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(c=i.easing),i.delay!=null&&(f=i.delay)),ie(f)&&(f=f(t,a)),ie(u)&&(u=u(t));var h={duration:u||0,delay:f,easing:c};return h}else return null}function bv(r,e,t,n,a,i,o){var s=!1,l;ie(a)?(o=i,i=a,a=null):oe(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 c=Io(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,d=c.easing,p={duration:f,delay:h||0,easing:d,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 Ve(r,e,t,n,a,i){bv("update",r,e,t,n,a,i)}function tt(r,e,t,n,a,i){bv("enter",r,e,t,n,a,i)}function Lo(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 ya(r,e,t,n,a,i){Lo(r)||bv("leave",r,e,t,n,a,i)}function mw(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),ya(r,{style:{opacity:0}},e,t,n)}function _l(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(a){a.isGroup||mw(a,e,t,n)}):mw(r,e,t,n)}function Kr(r){gw(r).oldStyle=r.style}function Zz(r){return gw(r).oldStyle}var Jc=Math.max,ef=Math.min,xv={};function qz(r){return De.extend(r)}var Xz=Az;function Kz(r,e){return Xz(r,e)}function Qr(r,e){xv[r]=e}function wv(r){if(xv.hasOwnProperty(r))return xv[r]}function tf(r,e,t,n){var a=uw(r,e);return t&&(n==="center"&&(t=_w(t,a.getBoundingRect())),bw(a,t)),a}function yw(r,e,t){var n=new It({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(_w(e,i))}}});return n}function _w(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 Ar=Mz;function bw(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function Ro(r,e){return T1(r,r,{lineWidth:e}),r}function Qz(r){return C1(r.shape,r.shape,r.style),r}var rf=mi;function Ti(r,e){for(var t=ac([]);r&&r!==e;)Ln(t,r.getLocalTransform(),t),r=r.parent;return t}function jr(r,e,t){return e&&!Vt(e)&&(e=Pn.getLocalTransform(e)),t&&(e=go([],e)),Lt([],r,e)}function nf(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=jr(i,e,t),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function xw(r){return!r.isGroup}function jz(r){return r.shape!=null}function bl(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){xw(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return jz(o)&&(s.shape=F({},o.shape)),s}var i=n(r);e.traverse(function(o){if(xw(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Ve(o,l,t,ve(o).dataIndex)}}})}function ww(r,e){return H(r,function(t){var n=t[0];n=Jc(n,e.x),n=ef(n,e.x+e.width);var a=t[1];return a=Jc(a,e.y),a=ef(a,e.y+e.height),[n,a]})}function Jz(r,e){var t=Jc(r.x,e.x),n=ef(r.x+r.width,e.x+e.width),a=Jc(r.y,e.y),i=ef(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 xl(r,e,t){var n=F({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),le(a,t),new It(n)):tf(r.replace("path://",""),n,t,"center")}function wl(r,e,t,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var s=a[i];if(Sw(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Sw(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=Sv(c,f,l,u);if(eF(h))return!1;var d=r-a,p=e-i,v=Sv(d,p,l,u)/h;if(v<0||v>1)return!1;var g=Sv(d,p,c,f)/h;return!(g<0||g>1)}function Sv(r,e,t,n){return r*n-t*e}function eF(r){return r<=1e-6&&r>=-1e-6}function Ci(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=X(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(Me(l),function(c){Q(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ve(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:le({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function Ew(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function _a(r,e){if(r)if(G(r))for(var t=0;t<r.length;t++)Ew(r[t],e);else Ew(r,e)}Qr("circle",Hn),Qr("ellipse",Zc),Qr("sector",Kt),Qr("ring",gl),Qr("polygon",Qt),Qr("polyline",jt),Qr("rect",Ie),Qr("line",St),Qr("bezierCurve",ml),Qr("arc",Xc);const Di=Object.freeze(Object.defineProperty({__proto__:null,Arc:Xc,BezierCurve:ml,BoundingRect:xe,Circle:Hn,CompoundPath:_v,Ellipse:Zc,Group:fe,Image:It,IncrementalDisplayable:Yz,Line:St,LinearGradient:yl,OrientedBoundingRect:jc,Path:De,Point:be,Polygon:Qt,Polyline:jt,RadialGradient:vw,Rect:Ie,Ring:gl,Sector:Kt,Text:Le,applyTransform:jr,clipPointsByRect:ww,clipRectByRect:Jz,createIcon:xl,extendPath:Kz,extendShape:qz,getShapeClass:wv,getTransform:Ti,groupTransition:bl,initProps:tt,isElementRemoved:Lo,lineLineIntersect:Sw,linePolygonIntersect:wl,makeImage:yw,makePath:tf,mergePath:Ar,registerShape:Qr,removeElement:ya,removeElementWithFadeOut:_l,resizePath:bw,setTooltipConfig:Ci,subPixelOptimize:rf,subPixelOptimizeLine:Ro,subPixelOptimizeRect:Qz,transformDirection:nf,traverseElements:_a,updateProps:Ve},Symbol.toStringTag,{value:"Module"}));var af={},of={};function Tw(r,e){for(var t=0;t<Xt.length;t++){var n=Xt[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 Ev(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=ie(r.defaultText)?r.defaultText(a,r,t):r.defaultText);for(var l={normal:s},u=0;u<Xt.length;u++){var c=Xt[u],f=e[c];l[c]=pe(n?n.getFormattedLabel(a,c,null,i,f&&f.get("formatter")):null,s)}return l}function Pt(r,e,t,n){t=t||of;for(var a=r instanceof Le,i=!1,o=0;o<cl.length;o++){var s=e[cl[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=a?r:r.getTextContent();if(i){a||(l||(l=new Le,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Ev(t,e),c=e.normal,f=!!c.getShallow("show"),h=Xe(c,n&&n.normal,t,!1,!a);h.text=u.normal,a||r.setTextConfig(sf(c,t,!1));for(var o=0;o<Xt.length;o++){var d=Xt[o],s=e[d];if(s){var p=l.ensureState(d),v=!!pe(s.getShallow("show"),f);if(v!==f&&(p.ignore=!v),p.style=Xe(s,n&&n[d],t,!0,!a),p.style.text=u[d],!a){var g=r.ensureState(d);g.textConfig=sf(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!f,l.useStyle(h),l.dirty(),t.enableTextSetter&&(Oo(l).setLabelText=function(m){var y=Ev(t,e,m);Tw(l,y)})}else l&&(l.ignore=!0);r.dirty()}function Et(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<Xt.length;n++){var a=Xt[n];t[a]=r.getModel([a,e])}return t}function Xe(r,e,t,n,a){var i={};return tF(i,r,t,n,a),e&&F(i,e),i}function sf(r,e,t){e=e||{};var n={},a,i=r.getShallow("rotate"),o=pe(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 tF(r,e,t,n,a){t=t||of;var i=e.ecModel,o=i&&i.option.textStyle,s=rF(e),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var c=e.getModel(["rich",u]);Mw(l[u]={},c,o,t,n,a,!1,!0)}}l&&(r.rich=l);var f=e.get("overflow");f&&(r.overflow=f);var h=e.get("minMargin");h!=null&&(r.margin=h),Mw(r,e,o,t,n,a,!0,!1)}function rF(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||of).rich;if(t){e=e||{};for(var n=Me(t),a=0;a<n.length;a++){var i=n[a];e[i]=1}}r=r.parentModel}return e}var Cw=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Dw=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Aw=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Mw(r,e,t,n,a,i,o,s){t=!a&&t||of;var l=n&&n.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),f=pe(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(af.NODE_ENV!=="production"&&u==="auto"&&vt("color: 'auto'","color: 'inherit'"),l?u=l:u=null),(c==="inherit"||c==="auto")&&(af.NODE_ENV!=="production"&&c==="auto"&&vt("color: 'auto'","color: 'inherit'"),l?c=l:c=null),i||(u=u||t.color,c=c||t.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var h=pe(e.getShallow("textBorderWidth"),t.textBorderWidth);h!=null&&(r.lineWidth=h);var d=pe(e.getShallow("textBorderType"),t.textBorderType);d!=null&&(r.lineDash=d);var p=pe(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 v=0;v<Cw.length;v++){var g=Cw[v],m=pe(e.getShallow(g),t[g]);m!=null&&(r[g]=m)}for(var v=0;v<Dw.length;v++){var g=Dw[v],m=e.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!n.disableBox){for(var v=0;v<Aw.length;v++){var g=Aw[v],m=e.getShallow(g);m!=null&&(r[g]=m)}var _=e.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(af.NODE_ENV!=="production"&&r.backgroundColor==="auto"&&vt("backgroundColor: 'auto'","backgroundColor: 'inherit'"),r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(af.NODE_ENV!=="production"&&r.borderColor==="auto"&&vt("borderColor: 'auto'","borderColor: 'inherit'"),r.borderColor=l)}}function Tv(r,e){var t=e&&e.getModel("textStyle");return Ur([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 Oo=Ne();function kw(r,e,t,n){if(r){var a=Oo(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 Nw(r,e,t,n,a){var i=Oo(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=pe(i.interpolatedValue,i.prevValue),l=i.value;function u(c){var f=c1(t,i.precision,s,l,c);i.interpolatedValue=c===1?null:f;var h=Ev({labelDataIndex:e,labelFetcher:a,defaultText:o?o(f):f+""},i.statesModels,f);Tw(r,h)}r.percent=0,(i.prevValue==null?tt:Ve)(r,{percent:1},n,e,null,u)}var nF=["textStyle","color"],Cv=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Dv=new Le,aF=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(nF):null)},r.prototype.getFont=function(){return Tv({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<Cv.length;n++)t[Cv[n]]=this.getShallow(Cv[n]);return Dv.useStyle(t),Dv.update(),Dv.getBoundingRect()},r}(),Iw=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],iF=ui(Iw),oF=function(){function r(){}return r.prototype.getLineStyle=function(e){return iF(this,e)},r}(),Lw=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],sF=ui(Lw),lF=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return sF(this,e,t)},r}(),Ge=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){_e(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(ce(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(!Ce.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}();Fp(Ge),gV(Ge),dt(Ge,oF),dt(Ge,lF),dt(Ge,xV),dt(Ge,aF);var uF={},cF=Math.round(Math.random()*10);function Po(r){return[r||"",cF++].join("_")}function fF(r){var e={};r.registerSubTypeDefaulter=function(t,n){var a=pn(t);e[a.main]=n},r.determineSubType=function(t,n){var a=n.type;if(!a){var i=pn(t).main;r.hasSubTypes(t)&&e[i]&&(a=e[i](n))}return a}}function hF(r,e){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=t(o),c=u.graph,f=u.noEntryList,h={};for(A(i,function(y){h[y]=!0});f.length;){var d=f.pop(),p=c[d],v=!!h[d];v&&(s.call(l,d,p.originalDeps.slice()),delete h[d]),A(p.successor,v?m:g)}A(h,function(){var y="";throw uF.NODE_ENV!=="production"&&(y=Zt("Circular dependency may exists: ",h,i,o)),new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function m(y){h[y]=!0,g(y)}};function t(i){var o={},s=[];return A(i,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=a(c,i);u.entryCount=f.length,u.entryCount===0&&s.push(l),A(f,function(h){we(u.predecessor,h)<0&&u.predecessor.push(h);var d=n(o,h);we(d.successor,h)<0&&d.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){we(o,l)>=0&&s.push(l)}),s}}function ba(r,e){return _e(_e({},r,!0),e,!0)}const dF={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:". "}}}},pF={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 lf="ZH",Av="EN",Bo=Av,uf={},Mv={},Rw=Ce.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Bo).toUpperCase();return r.indexOf(lf)>-1?lf:Bo}():Bo;function Ow(r,e){r=r.toUpperCase(),Mv[r]=new Ge(e),uf[r]=e}function vF(r){if(X(r)){var e=uf[r.toUpperCase()]||{};return r===lf||r===Av?ce(e):_e(ce(e),ce(uf[Bo]),!1)}else return _e(ce(r),ce(uf[Bo]),!1)}function kv(r){return Mv[r]}function gF(){return Mv[Bo]}Ow(Av,dF),Ow(lf,pF);var Nv=1e3,Iv=Nv*60,Sl=Iv*60,Mr=Sl*24,Pw=Mr*365,El={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}"},cf="{yyyy}-{MM}-{dd}",Bw={year:"{yyyy}",month:"{yyyy}-{MM}",day:cf,hour:cf+" "+El.hour,minute:cf+" "+El.minute,second:cf+" "+El.second,millisecond:El.none},Lv=["year","month","day","hour","minute","second","millisecond"],Vw=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function xa(r,e){return r+="","0000".substr(0,e-r.length)+r}function Vo(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 mF(r){return r===Vo(r)}function yF(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ff(r,e,t,n){var a=dn(r),i=a[Rv(t)](),o=a[zo(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[hf(t)](),u=a["get"+(t?"UTC":"")+"Day"](),c=a[Tl(t)](),f=(c-1)%12+1,h=a[df(t)](),d=a[pf(t)](),p=a[vf(t)](),v=c>=12?"pm":"am",g=v.toUpperCase(),m=n instanceof Ge?n:kv(n||Rw)||gF(),y=m.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),w=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,xa(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,xa(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,xa(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,xa(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,xa(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,xa(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,xa(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,xa(p,3)).replace(/{S}/g,p+"")}function _F(r,e,t,n,a){var i=null;if(X(t))i=t;else if(ie(t))i=t(r.value,e,{level:r.level});else{var o=F({},El);if(r.level>0)for(var s=0;s<Lv.length;++s)o[Lv[s]]="{primary|"+o[Lv[s]]+"}";var l=t?t.inherit===!1?t:le(t,o):o,u=zw(r.value,a);if(l[u])i=l[u];else if(l.inherit){for(var c=Vw.indexOf(u),s=c-1;s>=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(G(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 ff(new Date(r.value),i,a,n)}function zw(r,e){var t=dn(r),n=t[zo(e)]()+1,a=t[hf(e)](),i=t[Tl(e)](),o=t[df(e)](),s=t[pf(e)](),l=t[vf(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&i===0,d=h&&a===1,p=d&&n===1;return p?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Fw(r,e,t){var n=Oe(r)?dn(r):r;switch(e=e||zw(r,t),e){case"year":return n[Rv(t)]();case"half-year":return n[zo(t)]()>=6?1:0;case"quarter":return Math.floor((n[zo(t)]()+1)/4);case"month":return n[zo(t)]();case"day":return n[hf(t)]();case"half-day":return n[Tl(t)]()/24;case"hour":return n[Tl(t)]();case"minute":return n[df(t)]();case"second":return n[pf(t)]();case"millisecond":return n[vf(t)]()}}function Rv(r){return r?"getUTCFullYear":"getFullYear"}function zo(r){return r?"getUTCMonth":"getMonth"}function hf(r){return r?"getUTCDate":"getDate"}function Tl(r){return r?"getUTCHours":"getHours"}function df(r){return r?"getUTCMinutes":"getMinutes"}function pf(r){return r?"getUTCSeconds":"getSeconds"}function vf(r){return r?"getUTCMilliseconds":"getMilliseconds"}function bF(r){return r?"setUTCFullYear":"setFullYear"}function $w(r){return r?"setUTCMonth":"setMonth"}function Gw(r){return r?"setUTCDate":"setDate"}function Hw(r){return r?"setUTCHours":"setHours"}function Uw(r){return r?"setUTCMinutes":"setMinutes"}function Ww(r){return r?"setUTCSeconds":"setSeconds"}function Yw(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Zw(r){if(!Lp(r))return X(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function qw(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 Fo=Rd;function Ov(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&Ur(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?dn(r):r;if(isNaN(+l)){if(s)return"-"}else return ff(l,n,t)}if(e==="ordinal")return Qu(r)?a(r):Oe(r)&&i(r)?r+"":"-";var u=Bn(r);return i(u)?Zw(u):Qu(r)?a(r):typeof r=="boolean"?r+"":"-"}var Xw=["a","b","c","d","e","f","g"],Pv=function(r,e){return"{"+r+(e??"")+"}"};function Kw(r,e,t){G(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i<a.length;i++){var o=Xw[i];r=r.replace(Pv(o),Pv(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(Pv(Xw[l],s),t?Yt(u):u)}return r}function xF(r,e,t){return A(e,function(n,a){r=r.replace("{"+a+"}",n)}),r}function wF(r,e){var t=X(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:'+Yt(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Yt(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 Ai(r,e){return e=e||"transparent",X(r)?r:oe(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function gf(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var mf=A,Qw=["left","right","top","bottom","width","height"],Mi=[["width","left","right"],["height","top","bottom"]];function Bv(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 c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),d,p;if(r==="horizontal"){var v=c.width+(h?-h.x+c.x:0);d=i+v,d>n||l.newline?(i=0,d=v,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(h?-h.y+c.y:0);p=o+g,p>a||l.newline?(i+=s+t,o=0,p=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=d+t:o=p+t)})}var ki=Bv;me(Bv,"vertical"),me(Bv,"horizontal");function SF(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=Fo(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function bt(r,e,t){t=Fo(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),c=W(r.height,a),f=t[2]+t[0],h=t[1]+t[3],d=r.aspect;switch(isNaN(u)&&(u=n-s-h-i),isNaN(c)&&(c=a-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/a?u=n*.8:c=a*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(i)&&(i=n-s-u-h),isNaN(o)&&(o=a-l-c-f),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-c/2-t[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var p=new xe(i+t[3],o+t[0],u,c);return p.margin=t,p}function yf(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 xe(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=bt(le({width:u.width,height:u.height},e),t,n),h=o?f.x-u.x:0,d=s?f.y-u.y:0;return l==="raw"?(i.x=h,i.y=d):(i.x+=h,i.y+=d),i===r&&r.markRedraw(),!0}function EF(r,e){return r[Mi[e][0]]!=null||r[Mi[e][1]]!=null&&r[Mi[e][2]]!=null}function Cl(r){var e=r.layoutMode||r.constructor.layoutMode;return oe(e)?e:e?{type:e}:null}function wa(r,e,t){var n=t&&t.ignoreSize;!G(n)&&(n=[n,n]);var a=o(Mi[0],0),i=o(Mi[1],1);u(Mi[0],r,a),u(Mi[1],r,i);function o(c,f){var h={},d=0,p={},v=0,g=2;if(mf(c,function(_){p[_]=r[_]}),mf(c,function(_){s(e,_)&&(h[_]=p[_]=e[_]),l(h,_)&&d++,l(p,_)&&v++}),n[f])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(v===g||!d)return p;if(d>=g)return h;for(var m=0;m<c.length;m++){var y=c[m];if(!s(h,y)&&s(r,y)){h[y]=r[y];break}}return h}function s(c,f){return c.hasOwnProperty(f)}function l(c,f){return c[f]!=null&&c[f]!=="auto"}function u(c,f,h){mf(c,function(d){f[d]=h[d]})}}function $o(r){return jw({},r)}function jw(r,e){return e&&r&&mf(Qw,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var TF=Ne(),Ae=function(r){V(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.uid=Po("ec_cpt_model"),i}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=Cl(this),i=a?$o(t):{},o=n.getTheme();_e(t,o.get(this.mainType)),_e(t,this.getDefaultOption()),a&&wa(t,i,a)},e.prototype.mergeOption=function(t,n){_e(this.option,t,!0);var a=Cl(this);a&&wa(this.option,t,a)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!dV(t))return t.defaultOption;var n=TF(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=_e(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return ol(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}(Ge);h1(Ae,Ge),Nc(Ae),fF(Ae),hF(Ae,CF);function CF(r){var e=[];return A(Ae.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=H(e,function(t){return pn(t).main}),r!=="dataset"&&we(e,"dataset")<=0&&e.unshift("dataset"),e}var Jw="";typeof navigator<"u"&&(Jw=navigator.platform||"");var Go="rgba(0, 0, 0, 0.2)";const DF={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Go,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Go,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Go,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Go,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Go,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Go,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Jw.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 Vv=te(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),kr="original",Ft="arrayRows",Nr="objectRows",bn="keyedColumns",Un="typedArray",eS="unknown",xn="column",Ho="row",Bt={Must:1,Might:2,Not:3},tS=Ne();function AF(r){tS(r).datasetMap=te()}function rS(r,e,t){var n={},a=Fv(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=tS(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),A(r,function(v,g){var m=oe(v)?v:r[g]={name:v};m.type==="ordinal"&&c==null&&(c=g,f=p(m)),n[m.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});A(r,function(v,g){var m=v.name,y=p(v);if(c==null){var _=h.valueWayDim;d(n[m],_,y),d(o,_,y),h.valueWayDim+=y}else if(c===g)d(n[m],0,y),d(i,0,y);else{var _=h.categoryWayDim;d(n[m],_,y),d(o,_,y),h.categoryWayDim+=y}});function d(v,g,m){for(var y=0;y<m;y++)v.push(g+y)}function p(v){var g=v.dimsDef;return g?g.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function zv(r,e,t){var n={},a=Fv(r);if(!a)return n;var i=e.sourceFormat,o=e.dimensionsDefine,s;(i===Nr||i===bn)&&A(o,function(c,f){(oe(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},h=[],d=0,p=Math.min(5,t);d<p;d++){var v=aS(e.data,i,e.seriesLayoutBy,o,e.startIndex,d);h.push(v);var g=v===Bt.Not;if(g&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!g&&h[c.n]===Bt.Not)&&(c.n=d),m(c)&&h[c.n]!==Bt.Not)return c;g||(v===Bt.Might&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v)&&(f.n=d))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(f)?f:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function Fv(r){var e=r.get("data",!0);if(!e)return ol(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},gt).models[0]}function MF(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:ol(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},gt).models}function nS(r,e){return aS(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function aS(r,e,t,n,a,i){var o,s=5;if(Ut(r))return Bt.Not;var l,u;if(n){var c=n[i];oe(c)?(l=c.name,u=c.type):X(c)&&(l=c)}if(u!=null)return u==="ordinal"?Bt.Must:Bt.Not;if(e===Ft){var f=r;if(t===Ho){for(var h=f[i],d=0;d<(h||[]).length&&d<s;d++)if((o=x(h[a+d]))!=null)return o}else for(var d=0;d<f.length&&d<s;d++){var p=f[a+d];if(p&&(o=x(p[i]))!=null)return o}}else if(e===Nr){var v=r;if(!l)return Bt.Not;for(var d=0;d<v.length&&d<s;d++){var g=v[d];if(g&&(o=x(g[l]))!=null)return o}}else if(e===bn){var m=r;if(!l)return Bt.Not;var h=m[l];if(!h||Ut(h))return Bt.Not;for(var d=0;d<h.length&&d<s;d++)if((o=x(h[d]))!=null)return o}else if(e===kr)for(var y=r,d=0;d<y.length&&d<s;d++){var g=y[d],_=Eo(g);if(!G(_))return Bt.Not;if((o=x(_[i]))!=null)return o}function x(w){var S=X(w);if(w!=null&&Number.isFinite(Number(w))&&w!=="")return S?Bt.Might:Bt.Not;if(S&&w!=="-")return Bt.Must}return Bt.Not}var kF={},$v=te();function NF(r,e){se($v.get(r)==null&&e),$v.set(r,e)}function IF(r,e,t){var n=$v.get(e);if(!n)return t;var a=n(r);if(!a)return t;if(kF.NODE_ENV!=="production")for(var i=0;i<a.length;i++)se(To(a[i]));return t.concat(a)}var iS=Ne(),LF=Ne(),Gv=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var a=He(this.get("color",!0)),i=this.get("colorLayer",!0);return oS(this,iS,a,i,e,t,n)},r.prototype.clearColorPalette=function(){OF(this,iS)},r}();function Hv(r,e,t,n){var a=He(r.get(["aria","decal","decals"]));return oS(r,LF,a,null,e,t,n)}function RF(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 oS(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 c=o==null||!n?t:RF(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function OF(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Uo={},_f,Dl,sS,Uv="\0_ec_inner",lS=1,PF={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"},BF={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"},bf={};function VF(r){A(r,function(e,t){if(!Ae.hasClass(t)){var n=PF[t];n&&!bf[n]&&(Rt("Component "+t+` is used but not imported.
|
|
200
|
+
import { `+n+` } from 'echarts/components';
|
|
201
|
+
echarts.use([`+n+"]);"),bf[n]=!0)}})}var Wv=function(r){V(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 Ge(i),this._locale=new Ge(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){Uo.NODE_ENV!=="production"&&(se(t!=null,"option is null/undefined"),se(t[Uv]!==lS,"please use chart.getOption()"));var i=fS(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,fS(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");Uo.NODE_ENV!=="production"&&VF(o),!this.option||t==="recreate"?sS(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=te(),u=n&&n.replaceMergeMainTypeMap;AF(this),A(t,function(f,h){f!=null&&(Ae.hasClass(h)?h&&(s.push(h),l.set(h,!0)):a[h]=a[h]==null?ce(f):_e(a[h],f,!0))}),u&&u.each(function(f,h){Ae.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Ae.topologicalTravel(s,Ae.getAllClassMainTypes(),c,this);function c(f){var h=IF(this,f,He(t[f])),d=i.get(f),p=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=i1(d,h,p);aV(v,f,Ae),a[f]=null,i.set(f,null),o.set(f,0);var g=[],m=[],y=0,_,x;A(v,function(w,S){var E=w.existing,T=w.newOption;if(!T)E&&(E.mergeOption({},this),E.optionUpdated({},!1));else{var C=f==="series",D=Ae.getClass(f,w.keyInfo.subType,!C);if(!D){if(Uo.NODE_ENV!=="production"){var M=w.keyInfo.subType,k=BF[M];bf[M]||(bf[M]=!0,Rt(k?"Series "+M+` is used but not imported.
|
|
202
|
+
import { `+k+` } from 'echarts/charts';
|
|
203
|
+
echarts.use([`+k+"]);":"Unknown series "+M))}return}if(f==="tooltip"){if(_){Uo.NODE_ENV!=="production"&&(x||(st("Currently only one tooltip component is allowed."),x=!0));return}_=!0}if(E&&E.constructor===D)E.name=w.keyInfo.name,E.mergeOption(T,this),E.optionUpdated(T,!1);else{var N=F({componentIndex:S},w.keyInfo);E=new D(T,this,this,N),F(E,N),w.brandNew&&(E.__requireNewView=!0),E.init(T,this,this),E.optionUpdated(null,!0)}}E?(g.push(E.option),m.push(E),y++):(g.push(void 0),m.push(void 0))},this),a[f]=g,i.set(f,m),o.set(f,y),f==="series"&&_f(this)}this._seriesIndices||_f(this)},e.prototype.getOption=function(){var t=ce(this.option);return A(t,function(n,a){if(Ae.hasClass(a)){for(var i=He(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!To(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[Uv],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(He(a),function(u){s[u]&&l.push(s[u])})):i!=null?l=uS("id",i,s):o!=null?l=uS("name",o,s):l=ze(s,function(u){return!!u}),cS(l,t)},e.prototype.findComponents=function(t){var n=t.query,a=t.mainType,i=s(n),o=i?this.queryComponents(i):ze(this._componentsMap.get(a),function(u){return!!u});return l(cS(o,t));function s(u){var c=a+"Index",f=a+"Id",h=a+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:a,index:u[c],id:u[f],name:u[h]}:null}function l(u){return t.filter?ze(u,t.filter):u}},e.prototype.eachComponent=function(t,n,a){var i=this._componentsMap;if(ie(t)){var o=n,s=t;i.each(function(f,h){for(var d=0;f&&d<f.length;d++){var p=f[d];p&&s.call(o,h,p,p.componentIndex)}})}else for(var l=X(t)?i.get(t):oe(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(a,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=_t(t,null);return ze(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 ze(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return ze(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){Dl(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){Dl(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 Dl(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){Dl(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=te(a)},e.prototype.restoreData=function(t){_f(this);var n=this._componentsMap,a=[];n.each(function(i,o){Ae.hasClass(o)&&a.push(o)}),Ae.topologicalTravel(a,Ae.getAllClassMainTypes(),function(i){A(n.get(i),function(o){o&&(i!=="series"||!zF(o,t))&&o.restoreData()})})},e.internalField=function(){_f=function(t){var n=t._seriesIndices=[];A(t._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),t._seriesIndicesMap=te(n)},Dl=function(t){if(Uo.NODE_ENV!=="production"&&!t._seriesIndices)throw new Error("Option should contains series.")},sS=function(t,n){t.option={},t.option[Uv]=lS,t._componentsMap=te({series:[]}),t._componentsCount=te();var a=n.aria;oe(a)&&a.enabled==null&&(a.enabled=!0),FF(n,t._theme.option),_e(n,DF,!1),t._mergeOption(n,null)}}(),e}(Ge);function zF(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 FF(r,e){var t=r.color&&!r.colorLayer;A(e,function(n,a){a==="colorLayer"&&t||Ae.hasClass(a)||(typeof n=="object"?r[a]=r[a]?_e(r[a],n,!1):ce(n):r[a]==null&&(r[a]=n))})}function uS(r,e,t){if(G(e)){var n=te();return A(e,function(i){if(i!=null){var o=_t(i,null);o!=null&&n.set(i,!0)}}),ze(t,function(i){return i&&n.get(i[r])})}else{var a=_t(e,null);return ze(t,function(i){return i&&a!=null&&i[r]===a})}}function cS(r,e){return e.hasOwnProperty("subType")?ze(r,function(t){return t&&t.subType===e.subType}):r}function fS(r){var e=te();return r&&A(He(r.replaceMerge),function(t){Uo.NODE_ENV!=="production"&&se(Ae.hasClass(t),'"'+t+'" is not valid component main type in "replaceMerge"'),e.set(t,!0)}),{replaceMergeMainTypeMap:e}}dt(Wv,Gv);var $F=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],hS=function(){function r(e){A($F,function(t){this[t]=K(e[t],e)},this)}return r}(),Yv={},Wo=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var n=[];A(Yv,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){Yv[e]=t},r.get=function(e){return Yv[e]},r}(),dS={},GF=/^(min|max)?(.+)$/,HF=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(A(He(e.series),function(o){o&&o.data&&Ut(o.data)&&Ju(o.data)}),A(He(e.dataset),function(o){o&&o.source&&Ut(o.source)&&Ju(o.source)})),e=ce(e);var a=this._optionBackup,i=UF(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=[],ce(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=ce(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++)WF(a[l].query,t,n)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!ZF(o,this._currentMediaIndices)&&(s=H(o,function(c){return ce(c===-1?i.option:a[c].option)})),this._currentMediaIndices=o,s},r}();function UF(r,e,t){var n=[],a,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((f||c)&&(r.options=r.media=null),i=r),c&&(G(u)?A(u,function(d){dS.NODE_ENV!=="production"&&d&&!d.option&&oe(d.query)&&oe(d.query.option)&&Rt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),d&&d.option&&(d.query?n.push(d):a||(a=d))}):dS.NODE_ENV!=="production"&&Rt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),h(i),A(l,function(d){return h(d)}),A(n,function(d){return h(d.option)});function h(d){A(e,function(p){p(d,t)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:a,mediaList:n}}function WF(r,e,t){var n={width:e,height:t,aspectratio:e/t},a=!0;return A(r,function(i,o){var s=o.match(GF);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();YF(n[u],i,l)||(a=!1)}}),a}function YF(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function ZF(r,e){return r.join(",")===e.join(",")}var Sa={},Ir=A,Al=oe,pS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Zv(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=pS.length;t<n;t++){var a=pS[t],i=e.normal,o=e.emphasis;i&&i[a]&&(Sa.NODE_ENV!=="production"&&vt("itemStyle.normal."+a,a),r[a]=r[a]||{},r[a].normal?_e(r[a].normal,i[a]):r[a].normal=i[a],i[a]=null),o&&o[a]&&(Sa.NODE_ENV!=="production"&&vt("itemStyle.emphasis."+a,"emphasis."+a),r[a]=r[a]||{},r[a].emphasis?_e(r[a].emphasis,o[a]):r[a].emphasis=o[a],o[a]=null)}}function $t(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,a=r[e].emphasis;n&&(Sa.NODE_ENV!=="production"&&qr("'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,le(r[e],n)):r[e]=n),a&&(Sa.NODE_ENV!=="production"&&qr(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 Ml(r){$t(r,"itemStyle"),$t(r,"lineStyle"),$t(r,"areaStyle"),$t(r,"label"),$t(r,"labelLine"),$t(r,"upperLabel"),$t(r,"edgeLabel")}function mt(r,e){var t=Al(r)&&r[e],n=Al(t)&&t.textStyle;if(n){Sa.NODE_ENV!=="production"&&qr("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var a=0,i=a1.length;a<i;a++){var o=a1[a];n.hasOwnProperty(o)&&(t[o]=n[o])}}}function Lr(r){r&&(Ml(r),mt(r,"label"),r.emphasis&&mt(r.emphasis,"label"))}function qF(r){if(Al(r)){Zv(r),Ml(r),mt(r,"label"),mt(r,"upperLabel"),mt(r,"edgeLabel"),r.emphasis&&(mt(r.emphasis,"label"),mt(r.emphasis,"upperLabel"),mt(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(Zv(e),Lr(e));var t=r.markLine;t&&(Zv(t),Lr(t));var n=r.markArea;n&&Lr(n);var a=r.data;if(r.type==="graph"){a=a||r.nodes;var i=r.links||r.edges;if(i&&!Ut(i))for(var o=0;o<i.length;o++)Lr(i[o]);A(r.categories,function(u){Ml(u)})}if(a&&!Ut(a))for(var o=0;o<a.length;o++)Lr(a[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Lr(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)G(l[o])?(Lr(l[o][0]),Lr(l[o][1])):Lr(l[o]);r.type==="gauge"?(mt(r,"axisLabel"),mt(r,"title"),mt(r,"detail")):r.type==="treemap"?($t(r.breadcrumb,"itemStyle"),A(r.levels,function(u){Ml(u)})):r.type==="tree"&&Ml(r.leaves)}}function Wn(r){return G(r)?r:r?[r]:[]}function vS(r){return(G(r)?r[0]:r)||{}}function XF(r,e){Ir(Wn(r.series),function(n){Al(n)&&qF(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),Ir(t,function(n){Ir(Wn(r[n]),function(a){a&&(mt(a,"axisLabel"),mt(a.axisPointer,"label"))})}),Ir(Wn(r.parallel),function(n){var a=n&&n.parallelAxisDefault;mt(a,"axisLabel"),mt(a&&a.axisPointer,"label")}),Ir(Wn(r.calendar),function(n){$t(n,"itemStyle"),mt(n,"dayLabel"),mt(n,"monthLabel"),mt(n,"yearLabel")}),Ir(Wn(r.radar),function(n){mt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,Sa.NODE_ENV!=="production"&&qr("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,Sa.NODE_ENV!=="production"&&qr("nameGap property in radar component has been changed to axisNameGap")),Sa.NODE_ENV!=="production"&&Ir(n.indicator,function(a){a.text&&vt("text","name","radar.indicator")})}),Ir(Wn(r.geo),function(n){Al(n)&&(Lr(n),Ir(Wn(n.regions),function(a){Lr(a)}))}),Ir(Wn(r.timeline),function(n){Lr(n),$t(n,"label"),$t(n,"itemStyle"),$t(n,"controlStyle",!0);var a=n.data;G(a)&&A(a,function(i){oe(i)&&($t(i,"label"),$t(i,"itemStyle"))})}),Ir(Wn(r.toolbox),function(n){$t(n,"iconStyle"),Ir(n.feature,function(a){$t(a,"iconStyle")})}),mt(vS(r.axisPointer),"label"),mt(vS(r.tooltip).axisPointer,"label")}var Jr={};function KF(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 QF(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 gS(r){r&&A(jF,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var jF=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],JF=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],qv=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function kl(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<qv.length;t++){var n=qv[t][1],a=qv[t][0];e[n]!=null&&(e[a]=e[n],Jr.NODE_ENV!=="production"&&vt(n,a))}}function mS(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(Jr.NODE_ENV!=="production"&&vt("label.margin","label.edgeDistance","pie"),r.edgeDistance=r.margin)}function yS(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay,Jr.NODE_ENV!=="production"&&vt("downplay","blur","sunburst"))}function e5(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(Jr.NODE_ENV!=="production"&&vt("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),r.emphasis.focus="adjacency"))}function _S(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&_S(r[t].children,e)}function bS(r,e){XF(r,e),r.series=He(r.series),A(r.series,function(t){if(oe(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow,Jr.NODE_ENV!=="production"&&vt("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise,Jr.NODE_ENV!=="production"&&vt("clockWise","clockwise")),mS(t.label);var a=t.data;if(a&&!Ut(a))for(var i=0;i<a.length;i++)mS(a[i]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(Jr.NODE_ENV!=="production"&&vt("hoverOffset","emphasis.scaleSize"),t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=KF(t,"pointer.color");o!=null&&QF(t,"itemStyle.color",o)}else if(n==="bar"){kl(t),kl(t.backgroundStyle),kl(t.emphasis);var a=t.data;if(a&&!Ut(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(kl(a[i]),kl(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,Jr.NODE_ENV!=="production"&&vt("highlightPolicy","emphasis.focus","sunburst"))),yS(t),_S(t.data,yS)}else n==="graph"||n==="sankey"?e5(t):n==="map"&&(t.mapType&&!t.map&&(Jr.NODE_ENV!=="production"&&vt("mapType","map","map"),t.map=t.mapType),t.mapLocation&&(Jr.NODE_ENV!=="production"&&qr("`mapLocation` is not used anymore."),le(t,t.mapLocation)));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(Jr.NODE_ENV!=="production"&&vt("hoverAnimation","emphasis.scale"),t.emphasis.scale=t.hoverAnimation)),gS(t)}}),r.dataRange&&(r.visualMap=r.dataRange),A(JF,function(t){var n=r[t];n&&(G(n)||(n=[n]),A(n,function(a){gS(a)}))})}function t5(r){var e=te();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(r5)}function r5(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,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return a;var d,p;s?p=o.getRawIndex(f):d=o.get(e.stackedByDimension,f);for(var v=NaN,g=t-1;g>=0;g--){var m=r[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=UB(h,y),v=y;break}}}return n[0]=h,n[1]=v,n})})}var n5={},xf=function(){function r(e){this.data=e.data||(e.sourceFormat===bn?{}:[]),this.sourceFormat=e.sourceFormat||eS,this.seriesLayoutBy=e.seriesLayoutBy||xn,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&&nS(this,n)===Bt.Must&&(a.type="ordinal")}}return r}();function Xv(r){return r instanceof xf}function Kv(r,e,t){t=t||xS(r);var n=e.seriesLayoutBy,a=i5(r,t,n,e.sourceHeader,e.dimensions),i=new xf({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:ce(e)});return i}function Qv(r){return new xf({data:r,sourceFormat:Ut(r)?Un:kr})}function a5(r){return new xf({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:ce(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function xS(r){var e=eS;if(Ut(r))e=Un;else if(G(r)){r.length===0&&(e=Ft);for(var t=0,n=r.length;t<n;t++){var a=r[t];if(a!=null){if(G(a)||Ut(a)){e=Ft;break}else if(oe(a)){e=Nr;break}}}}else if(oe(r)){for(var i in r)if(Q(r,i)&&Vt(r[i])){e=bn;break}}return e}function i5(r,e,t,n,a){var i,o;if(!r)return{dimensionsDefine:wS(a),startIndex:o,dimensionsDetectedCount:i};if(e===Ft){var s=r;n==="auto"||n==null?SS(function(u){u!=null&&u!=="-"&&(X(u)?o==null&&(o=1):o=0)},t,s,10):o=Oe(n)?n:n?1:0,!a&&o===1&&(a=[],SS(function(u,c){a[c]=u!=null?u+"":""},t,s,1/0)),i=a?a.length:t===Ho?s.length:s[0]?s[0].length:null}else if(e===Nr)a||(a=o5(r));else if(e===bn)a||(a=[],A(r,function(u,c){a.push(c)}));else if(e===kr){var l=Eo(r[0]);i=G(l)&&l.length||1}else e===Un&&n5.NODE_ENV!=="production"&&se(!!a,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:wS(a),dimensionsDetectedCount:i}}function o5(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return Me(t)}function wS(r){if(r){var e=te();return H(r,function(t,n){t=oe(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 SS(r,e,t,n){if(e===Ho)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 ES(r){var e=r.sourceFormat;return e===Nr||e===bn}var Ea={},Ni,Ii,Li,TS,CS,DS=function(){function r(e,t){var n=Xv(e)?e:Qv(e);this._source=n;var a=this._data=n.data;if(n.sourceFormat===Un){if(Ea.NODE_ENV!=="production"&&t==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=t,this._data=a}CS(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;CS=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,d=TS[Jv(u,c)];if(Ea.NODE_ENV!=="production"&&se(d,"Invalide sourceFormat: "+u),F(o,d),u===Un)o.getItem=t,o.count=a,o.fillStorage=n;else{var p=MS(u,c);o.getItem=K(p,null,s,f,h);var v=NS(u,c);o.count=K(v,null,s,f,h)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var d=u[h],p=d[0]==null?1/0:d[0],v=d[1]==null?-1/0:d[1],g=s-o,m=l[h],y=0;y<g;y++){var _=c[y*f+h];m[o+y]=_,_<p&&(p=_),_>v&&(v=_)}d[0]=p,d[1]=v}},a=function(){return this._data?this._data.length/this._dimSize:0};TS=(e={},e[Ft+"_"+xn]={pure:!0,appendData:i},e[Ft+"_"+Ho]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Nr]={pure:!0,appendData:i},e[bn]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[kr]={appendData:i},e[Un]={persistent:!1,pure:!0,appendData:function(o){Ea.NODE_ENV!=="production"&&se(Ut(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}(),AS=function(r,e,t,n){return r[n]},s5=(Ni={},Ni[Ft+"_"+xn]=function(r,e,t,n){return r[n+e]},Ni[Ft+"_"+Ho]=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},Ni[Nr]=AS,Ni[bn]=function(r,e,t,n,a){for(var i=a||[],o=0;o<t.length;o++){var s=t[o].name;if(Ea.NODE_ENV!=="production"&&s==null)throw new Error;var l=r[s];i[o]=l?l[n]:null}return i},Ni[kr]=AS,Ni);function MS(r,e){var t=s5[Jv(r,e)];return Ea.NODE_ENV!=="production"&&se(t,'Do not support get item on "'+r+'", "'+e+'".'),t}var kS=function(r,e,t){return r.length},l5=(Ii={},Ii[Ft+"_"+xn]=function(r,e,t){return Math.max(0,r.length-e)},Ii[Ft+"_"+Ho]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},Ii[Nr]=kS,Ii[bn]=function(r,e,t){var n=t[0].name;if(Ea.NODE_ENV!=="production"&&n==null)throw new Error;var a=r[n];return a?a.length:0},Ii[kr]=kS,Ii);function NS(r,e){var t=l5[Jv(r,e)];return Ea.NODE_ENV!=="production"&&se(t,'Do not support count on "'+r+'", "'+e+'".'),t}var jv=function(r,e,t){return r[e]},u5=(Li={},Li[Ft]=jv,Li[Nr]=function(r,e,t){return r[t]},Li[bn]=jv,Li[kr]=function(r,e,t){var n=Eo(r);return n instanceof Array?n[e]:n},Li[Un]=jv,Li);function IS(r){var e=u5[r];return Ea.NODE_ENV!=="production"&&se(e,'Do not support get value on "'+r+'".'),e}function Jv(r,e){return r===Ft?r+"_"+e:r}function Yo(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 IS(i)(n,o,s)}else{var l=n;return i===kr&&(l=Eo(n)),l}}}}var LS={},c5=/\{@(.+?)\}/g,wf=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"],c=l&&l.stroke,f=this.mainType,h=f==="series",d=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:i,data:s,dataType:t,value:a,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.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&&G(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(e);i=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(ie(i))return l.status=t,l.dimensionIndex=a,i(l);if(X(i)){var c=Kw(i,l);return c.replace(c5,function(f,h){var d=h.length,p=h;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1),LS.NODE_ENV!=="production"&&isNaN(p)&&Rt("Invalide label formatter: @"+h+", only support @[0], @[1], @[2], ..."));var v=Yo(s,e,p);if(o&&G(o.interpolatedValue)){var g=s.getDimensionIndex(p);g>=0&&(v=o.interpolatedValue[g])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(e,t){return Yo(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function RS(r){var e,t;return oe(r)?r.type?t=r:LS.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+Zt(r)):e=r,{text:e,frag:t}}var Sf={};function Nl(r){return new f5(r)}var f5=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=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?(Sf.NODE_ENV!=="production"&&se(t._outputDueEnd!=null),this._dueEnd=t._outputDueEnd):(Sf.NODE_ENV!=="production"&&se(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var d=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d<p)){var v=this._progress;if(G(v))for(var g=0;g<v.length;g++)this._doProgress(v[g],d,p,l,u);else this._doProgress(v,d,p,l,u)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;Sf.NODE_ENV!=="production"&&se(m>=this._outputDueEnd),this._outputDueEnd=m}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){OS.reset(t,n,a,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:OS.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),G(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){Sf.NODE_ENV!=="production"&&se(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}(),OS=function(){var r,e,t,n,a,i={reset:function(l,u,c,f){e=l,r=u,t=c,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}}(),h5={};function Ta(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!Oe(r)&&r!=null&&r!=="-"&&(r=+dn(r)),r==null||r===""?NaN:Number(r))}var d5=te({number:function(r){return parseFloat(r)},time:function(r){return+dn(r)},trim:function(r){return X(r)?Ur(r):r}});function PS(r){return d5.get(r)}var BS={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}},p5=function(){function r(e,t){if(!Oe(t)){var n="";h5.NODE_ENV!=="production"&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Fe(n)}this._opFn=BS[e],this._rvalFloat=Bn(t)}return r.prototype.evaluate=function(e){return Oe(e)?this._opFn(e,this._rvalFloat):this._opFn(Bn(e),this._rvalFloat)},r}(),VS=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=Oe(e)?e:Bn(e),a=Oe(t)?t:Bn(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=X(e),l=X(t);s&&(n=l?e:0),l&&(a=s?t:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},r}(),v5=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Bn(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=Bn(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function g5(r,e){return r==="eq"||r==="ne"?new v5(r==="eq",e):Q(BS,r)?new p5(r,e):null}var or={},m5=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 Ta(e,t)},r}();function y5(r,e){var t=new m5,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==xn&&(or.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Fe(o));var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(v,g){var m=v.name,y={index:g,name:m,displayName:v.displayName};if(s.push(y),m!=null){var _="";Q(l,m)&&(or.NODE_ENV!=="production"&&(_='dimension name "'+m+'" duplicated.'),Fe(_)),l[m]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=MS(a,xn);e.__isBuiltIn&&(t.getRawDataItem=function(v){return f(n,i,s,v)},t.getRawData=K(_5,null,r)),t.cloneRawData=K(b5,null,r);var h=NS(a,xn);t.count=K(h,null,n,i,s);var d=IS(a);t.retrieveValue=function(v,g){var m=f(n,i,s,v);return p(m,g)};var p=t.retrieveValueFromItem=function(v,g){if(v!=null){var m=s[g];if(m)return d(v,g,m.name)}};return t.getDimensionInfo=K(x5,null,s,l),t.cloneAllDimensionInfo=K(w5,null,s),t}function _5(r){var e=r.sourceFormat;if(!eg(e)){var t="";or.NODE_ENV!=="production"&&(t="`getRawData` is not supported in source format "+e),Fe(t)}return r.data}function b5(r){var e=r.sourceFormat,t=r.data;if(!eg(e)){var n="";or.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+e),Fe(n)}if(e===Ft){for(var a=[],i=0,o=t.length;i<o;i++)a.push(t[i].slice());return a}else if(e===Nr){for(var a=[],i=0,o=t.length;i<o;i++)a.push(F({},t[i]));return a}}function x5(r,e,t){if(t!=null){if(Oe(t)||!isNaN(t)&&!Q(e,t))return r[t];if(Q(e,t))return e[t]}}function w5(r){return ce(r)}var zS=te();function S5(r){r=ce(r);var e=r.type,t="";e||(or.NODE_ENV!=="production"&&(t="Must have a `type` when `registerTransform`."),Fe(t));var n=e.split(":");n.length!==2&&(or.NODE_ENV!=="production"&&(t='Name must include namespace like "ns:regression".'),Fe(t));var a=!1;n[0]==="echarts"&&(e=n[1],a=!0),r.__isBuiltIn=a,zS.set(e,r)}function E5(r,e,t){var n=He(r),a=n.length,i="";a||(or.NODE_ENV!=="production"&&(i="If `transform` declared, it should at least contain one transform."),Fe(i));for(var o=0,s=a;o<s;o++){var l=n[o];e=T5(l,e,t,a===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function T5(r,e,t,n){var a="";e.length||(or.NODE_ENV!=="production"&&(a="Must have at least one upstream dataset."),Fe(a)),oe(r)||(or.NODE_ENV!=="production"&&(a="transform declaration must be an object rather than "+typeof r+"."),Fe(a));var i=r.type,o=zS.get(i);o||(or.NODE_ENV!=="production"&&(a='Can not find transform on type "'+i+'".'),Fe(a));var s=H(e,function(c){return y5(c,o)}),l=He(o.transform({upstream:s[0],upstreamList:s,config:ce(r.config)}));if(or.NODE_ENV!=="production"&&r.print){var u=H(l,function(c){var f=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+t.datasetIndex+f+" ===","- transform result data:",Zt(c.data),"- transform result dimensions:",Zt(c.dimensions)].join(`
|
|
204
|
+
`)}).join(`
|
|
205
|
+
`);XB(u)}return H(l,function(c,f){var h="";oe(c)||(or.NODE_ENV!=="production"&&(h="A transform should not return some empty results."),Fe(h)),c.data||(or.NODE_ENV!=="production"&&(h="Transform result data should be not be null or undefined"),Fe(h));var d=xS(c.data);eg(d)||(or.NODE_ENV!=="production"&&(h="Transform result data should be array rows or object rows."),Fe(h));var p,v=e[0];if(v&&f===0&&!c.dimensions){var g=v.startIndex;g&&(c.data=v.data.slice(0,g).concat(c.data)),p={seriesLayoutBy:xn,sourceHeader:g,dimensions:v.metaRawOption.dimensions}}else p={seriesLayoutBy:xn,sourceHeader:0,dimensions:c.dimensions};return Kv(c.data,p,null)})}function eg(r){return r===Ft||r===Nr}var tg={},Ef="undefined",C5=typeof Uint32Array===Ef?Array:Uint32Array,D5=typeof Uint16Array===Ef?Array:Uint16Array,FS=typeof Int32Array===Ef?Array:Int32Array,$S=typeof Float64Array===Ef?Array:Float64Array,GS={float:$S,int:FS,ordinal:Array,number:Array,time:$S},rg;function Zo(r){return r>65535?C5:D5}function qo(){return[1/0,-1/0]}function A5(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function HS(r,e,t,n,a){var i=GS[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 ng=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=te()}return r.prototype.initData=function(e,t,n){tg.NODE_ENV!=="production"&&se(ie(e.getItem)&&ie(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),i=this.defaultDimValueGetter=rg[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];var o=ES(a);this._dimensions=H(t,function(s){return tg.NODE_ENV!=="production"&&o&&se(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 GS[t||"float"](this._rawCount),this._rawExtent[i]=qo(),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]=qo());for(var l=i[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,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){tg.NODE_ENV!=="production"&&se(!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 c=a[u];HS(n,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var d=h-s,p=0;p<i;p++){var c=a[p],v=rg.arrayRows.call(this,e[d]||f,c.property,d,p);n[p][h]=v;var g=o[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}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=H(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=qo()),HS(i,c,f.type,t,n)}if(a.fillStorage)a.fillStorage(e,t,i,l);else for(var h=[],d=e;d<t;d++){h=a.getItem(d,h);for(var p=0;p<s;p++){var v=i[p],g=this._dimValueGetter(h,u[p],d,p);v[d]=g;var m=l[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[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,c=0,f=this.count();c<f;c++){var h=this.getRawIndex(c),d=t-i[h],p=Math.abs(d);p<=n&&((p<s||p===s&&d>=0&&l<0)&&(s=p,l=d,u=0),d===l&&(o[u++]=c))}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=Zo(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=Zo(n._rawCount),o=new i(a),s=[],l=e.length,u=0,c=e[0],f=n._chunks,h=0;h<a;h++){var d=void 0,p=n.getRawIndex(h);if(l===0)d=t(h);else if(l===1){var v=f[c][p];d=t(v,h)}else{for(var g=0;g<l;g++)s[g]=f[e[g]][p];s[g]=h,d=t.apply(null,s)}d&&(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=Me(e),i=a.length;if(!i)return this;var o=t.count(),s=Zo(t._rawCount),l=new s(o),u=0,c=a[0],f=e[c][0],h=e[c][1],d=t._chunks,p=!1;if(!t._indices){var v=0;if(i===1){for(var g=d[a[0]],m=0;m<n;m++){var y=g[m];(y>=f&&y<=h||isNaN(y))&&(l[u++]=v),v++}p=!0}else if(i===2){for(var g=d[a[0]],_=d[a[1]],x=e[a[1]][0],w=e[a[1]][1],m=0;m<n;m++){var y=g[m],S=_[m];(y>=f&&y<=h||isNaN(y))&&(S>=x&&S<=w||isNaN(S))&&(l[u++]=v),v++}p=!0}}if(!p)if(i===1)for(var m=0;m<o;m++){var E=t.getRawIndex(m),y=d[a[0]][E];(y>=f&&y<=h||isNaN(y))&&(l[u++]=E)}else for(var m=0;m<o;m++){for(var T=!0,E=t.getRawIndex(m),C=0;C<i;C++){var D=a[C],y=d[D][E];(y<e[D][0]||y>e[D][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(m))}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,c=0;c<t.length;c++)u[t[c]]=qo();for(var f=0;f<s;f++){for(var h=e.getRawIndex(f),d=0;d<o;d++)l[d]=a[t[d]][h];l[o]=f;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(i[0]=p,p=i);for(var c=0;c<p.length;c++){var v=t[c],g=p[c],m=u[v],y=a[v];y&&(y[h]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[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),c,f,h,d=new(Zo(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;p<o-1;p+=l){for(var v=Math.min(p+l,o-1),g=Math.min(p+l*2,o),m=(g+v)/2,y=0,_=v;_<g;_++){var x=this.getRawIndex(_),w=i[x];isNaN(w)||(y+=w)}y/=g-v;var S=p,E=Math.min(p+l,o),T=p-1,C=i[u];c=-1,h=S;for(var D=-1,M=0,_=S;_<E;_++){var x=this.getRawIndex(_),w=i[x];if(isNaN(w)){M++,D<0&&(D=x);continue}f=Math.abs((T-m)*(w-C)-(T-_)*(y-C)),f>c&&(c=f,h=x)}M>0&&M<E-S&&(d[s++]=Math.min(D,h),h=Math.max(D,h)),d[s++]=h,u=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,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(Zo(this._rawCount))(Math.ceil(s/i)*2),u=0,c=0;c<s;c+=i){var f=c,h=o[this.getRawIndex(f)],d=c,p=o[this.getRawIndex(d)],v=i;c+i>s&&(v=s-c);for(var g=0;g<v;g++){var m=this.getRawIndex(c+g),y=o[m];y<h&&(h=y,f=c+g),y>p&&(p=y,d=c+g)}var _=this.getRawIndex(f),x=this.getRawIndex(d);f<d?(l[u++]=_,l[u++]=x):(l[u++]=x,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],c=this.count(),f=i._rawExtent[e]=qo(),h=new(Zo(this._rawCount))(Math.ceil(c/l)),d=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var v=0;v<l;v++){var g=this.getRawIndex(p+v);s[v]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(p+a(s,m)||0,c-1));u[y]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),h[d++]=y}return i._count=d,i._indices=h,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=qo();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 c=this.getRawIndex(u),f=t[c];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&&sn(e,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?A5(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=ce(this._extent),e._rawExtent=ce(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 Ta(t[i],this._dimensions[i])}rg={arrayRows:e,objectRows:function(t,n,a,i){return Ta(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return Ta(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}}(),r}(),Il={},US=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(Ll(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=Ut(s)?Un:kr,i=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=pe(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=pe(f.sourceHeader,h.sourceHeader),v=pe(f.dimensions,h.dimensions),g=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||v;a=g?[Kv(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:v},l)]:[]}else{var m=e;if(n){var y=this._applyTransform(t);a=y.sourceList,i=y.upstreamSignList}else{var _=m.get("source",!0);a=[Kv(_,this._getSourceMetaRawOption(),null)],i=[]}}Il.NODE_ENV!=="production"&&se(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(Il.NODE_ENV!=="production"&&se(a!=null||n!=null),a!=null){var i="";e.length!==1&&(Il.NODE_ENV!=="production"&&(i="When using `fromTransformResult`, there should be only one upstream dataset"),YS(i))}var o,s=[],l=[];return A(e,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&(Il.NODE_ENV!=="production"&&(f="Can not retrieve result by `fromTransformResult`: "+a),YS(f)),s.push(c),l.push(u._getVersionSign())}),n?o=E5(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[a5(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){Il.NODE_ENV!=="production"&&se(Ll(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];Ll(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new ng,s.initData(new DS(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Ll(e)){var t=Fv(e);return t?[t.getSourceManager()]:[]}else return H(MF(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,a;if(Ll(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 WS(r){var e=r.option.transform;e&&Ju(r.option.transform)}function Ll(r){return r.mainType==="series"}function YS(r){throw new Error(r)}var M5={},k5="line-height:1";function ZS(r){var e=r.lineHeight;return e==null?k5:"line-height:"+Yt(e+"")+"px"}function qS(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:"+Yt(n+"")+"px;color:"+Yt(t)+";font-weight:"+Yt(a+""),valueStyle:"font-size:"+Yt(o+"")+"px;color:"+Yt(i)+";font-weight:"+Yt(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var N5=[0,10,20,30],I5=["",`
|
|
206
|
+
`,`
|
|
207
|
+
|
|
208
|
+
`,`
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
`];function Tt(r,e){return e.type=r,e}function ag(r){return r.type==="section"}function XS(r){return ag(r)?L5:R5}function KS(r){if(ag(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return A(r.blocks,function(a){var i=KS(a);i>=e&&(e=i+ +(n&&(!i||ag(a)&&!a.noHeader)))}),e}return 0}function L5(r,e,t,n){var a=e.noHeader,i=O5(KS(e)),o=[],s=e.blocks||[];se(!s||G(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Q(u,l)){var c=new VS(u[l],null);s.sort(function(v,g){return c.evaluate(v.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(v,g){var m=e.valueFormatter,y=XS(v)(m?F(F({},r),{valueFormatter:m}):r,v,g>0?i.html:0,n);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(i.richText):ig(n,o.join(""),a?t:i.html);if(a)return f;var h=Ov(e.header,"ordinal",r.useUTC),d=qS(n,r.renderMode).nameStyle,p=ZS(n);return r.renderMode==="richText"?jS(r,h,d)+i.richText+f:ig(n,'<div style="'+d+";"+p+';">'+Yt(h)+"</div>"+f,t)}function R5(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(x){return x=G(x)?x:[x],H(x,function(w,S){return Ov(w,G(d)?d[S]:d,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),h=i?"":Ov(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),v=!s||!i,g=!s&&i,m=qS(n,a),y=m.nameStyle,_=m.valueStyle;return a==="richText"?(s?"":f)+(i?"":jS(r,h,y))+(o?"":V5(r,p,v,g,_)):ig(n,(s?"":f)+(i?"":P5(h,!s,y))+(o?"":B5(p,v,g,_)),t)}}function QS(r,e,t,n,a,i){if(r){var o=XS(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function O5(r){return{html:N5[r],richText:I5[r]}}function ig(r,e,t){var n='<div style="clear:both"></div>',a="margin: "+t+"px 0 0",i=ZS(r);return'<div style="'+a+";"+i+';">'+e+n+"</div>"}function P5(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+Yt(r)+"</span>"}function B5(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=G(r)?r:[r],'<span style="'+i+";"+n+'">'+H(r,function(o){return Yt(o)}).join(" ")+"</span>"}function jS(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function V5(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(G(e)?e.join(" "):e,i)}function JS(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return Ai(n)}function eE(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var og=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Qx()}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=wF({color:t,type:e,renderMode:n,markerId:a});return X(i)?i:(M5.NODE_ENV!=="production"&&se(a),this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?A(t,function(i){return F(n,i)}):F(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r}();function tE(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=G(s),u=JS(e,t),c,f,h,d;if(o>1||l&&!o){var p=z5(s,e,t,i,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var v=a.getDimensionInfo(i[0]);d=c=Yo(a,t,i[0]),f=v.type}else d=c=l?s[0]:s;var g=Pp(e),m=g&&e.name||"",y=a.getName(t),_=n?m:y;return Tt("section",{header:m,noHeader:n||!g,sortParam:d,blocks:[Tt("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Ur(_),value:c,valueType:f,dataIndex:t})].concat(h||[])})}function z5(r,e,t,n,a){var i=e.getData(),o=sn(r,function(f,h,d){var p=i.getDimensionInfo(d);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?A(n,function(f){c(Yo(i,t,f),f)}):A(r,c);function c(f,h){var d=i.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Tt("nameValue",{markerType:"subItem",markerColor:a,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var F5={},Ca=Ne();function Tf(r,e){return r.getName(e)||r.getId(e)}var Cf="__universalTransitionEnabled",Ke=function(r){V(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=Nl({count:G5,reset:H5}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=Ca(this).sourceManager=new US(this);i.prepareSource();var o=this.getInitialData(t,a);nE(o,this),this.dataTask.context.data=o,F5.NODE_ENV!=="production"&&se(o,"getInitialData returned invalid data."),Ca(this).dataBeforeProcessed=o,rE(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=Cl(this),i=a?$o(t):{},o=this.subType;Ae.hasClass(o)&&(o+="Series"),_e(t,n.getTheme().get(this.subType)),_e(t,this.getDefaultOption()),oi(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&wa(t,i,a)},e.prototype.mergeOption=function(t,n){t=_e(this.option,t,!0),this.fillDataTextStyle(t.data);var a=Cl(this);a&&wa(this.option,t,a);var i=Ca(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);nE(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ca(this).dataBeforeProcessed=o,rE(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ut(t))for(var n=["show"],a=0;a<t.length;a++)t[a]&&t[a].label&&oi(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=sg(this);if(n){var a=n.context.data;return t==null||!a.getLinkedData?a:a.getLinkedData(t)}else return Ca(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=sg(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}Ca(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return te(t)},e.prototype.getSourceManager=function(){return Ca(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Ca(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 tE({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Ce.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=Gv.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=Tf(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=Me(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[Tf(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Cf])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"){oe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],h=Tf(t,f);u[h]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var d=n[l-1],h=Tf(t,d);o.selectedMap=(a={},a[h]=!0,a),this._selectedDataIndicesMap=(i={},i[h]=t.getRawIndex(d),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 Ae.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}(Ae);dt(Ke,wf),dt(Ke,Gv),h1(Ke,Ae);function rE(r){var e=r.name;Pp(r)||(r.name=$5(r)||e)}function $5(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 G5(r){return r.model.getRawData().count()}function H5(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),U5}function U5(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function nE(r,e){A(zs(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,me(W5,e))})}function W5(r,e){var t=sg(r);return t&&t.setOutputEnd((e||this).count()),e}function sg(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 at=function(){function r(){this.group=new fe,this.uid=Po("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}();Fp(at),Nc(at);function Xo(){var r=Ne();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 lg={},aE=Ne(),Y5=Xo(),We=function(){function r(){this.group=new fe,this.uid=Po("viewChart"),this.renderTask=Nl({plan:Z5,reset:q5}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){if(lg.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){lg.NODE_ENV!=="production"&&Rt("Unknown dataType "+a.dataType);return}oE(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);if(!i){lg.NODE_ENV!=="production"&&Rt("Unknown dataType "+a.dataType);return}oE(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){_a(this.group,e)},r.markUpdateMethod=function(e,t){aE(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function iE(r,e,t){r&&ma(r)&&(e==="emphasis"?$n:Gn)(r,t)}function oE(r,e,t){var n=si(r,e),a=e&&e.highlightKey!=null?xz(e.highlightKey):null;n!=null?A(He(n),function(i){iE(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){iE(i,t,a)})}Fp(We,["dispose"]),Nc(We);function Z5(r){return Y5(r.model)}function q5(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&aE(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),X5[l]}var X5={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)}}},Df="\0__throttleOriginMethod",sE="\0__throttleRate",lE="\0__throttleType";function ug(r,e,t){var n,a=0,i=0,o=null,s,l,u,c;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),l=this,u=d;var v=c||e,g=c||t;c=null,s=n-(g?a:i)-v,clearTimeout(o),g?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function Ko(r,e,t,n){var a=r[e];if(a){var i=a[Df]||a,o=a[lE],s=a[sE];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=ug(i,t,n==="debounce"),a[Df]=i,a[lE]=n,a[sE]=t}return a}}function Rl(r,e){var t=r[e];t&&t[Df]&&(t.clear&&t.clear(),r[e]=t[Df])}var uE=Ne(),cE={itemStyle:ui(Lw,!0),lineStyle:ui(Iw,!0)},K5={lineStyle:"stroke",itemStyle:"fill"};function fE(r,e){var t=r.visualStyleMapper||cE[e];return t||(console.warn("Unknown style type '"+e+"'."),cE.itemStyle)}function hE(r,e){var t=r.visualDrawType||K5[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var Q5={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=fE(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=hE(r,n),u=o[l],c=ie(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ie(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||ie(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var v=r.getDataParams(p),g=F({},o);g[l]=c(v),d.setItemVisual(p,"style",g)}}}},Ol=new Ge,j5={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=fE(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Ol.option=l[n];var u=a(Ol),c=o.ensureUniqueItemVisual(s,"style");F(c,u),Ol.option.decal&&(o.setItemVisual(s,"decal",Ol.option.decal),Ol.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},J5={performRawSeries:!0,overallReset:function(r){var e=te();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)),uE(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=uE(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=hE(t,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var h=i.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();h[l]=t.getColorFromPalette(d,o,p)}})}})}},Af=Math.PI;function e3(r,e){e=e||{},le(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 fe,n=new Ie({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new Le({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 Ie({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 Xc({shape:{startAngle:-Af/2,endAngle:-Af/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:Af*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Af*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),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var dE={},pE=function(){function r(e,t,n,a){this._stageTaskMap=te(),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=te();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="";dE.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),se(!(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 c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(g){s(a,g)&&(g.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var v=o.getPerformArgs(h,a.block);p.each(function(g){g.perform(v)}),h.perform(v)&&(i=!0)}else f&&f.each(function(g,m){s(a,g)&&g.dirty();var y=o.getPerformArgs(g,a.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(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=te(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||Nl({plan:i3,reset:o3,count:l3}));d.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,d)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||Nl({reset:t3});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=te(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,d="";dE.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),se(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,a).each(p):(f=!1,A(n.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,s&&s.get(g)||(h=!0,Nl({reset:r3,onDirty:a3})));m.context={model:v,overallProgress:f},m.agent=o,m.__block=f,i._pipe(v,m)}h&&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 ie(e)&&(e={overallReset:e,seriesType:u3(e)}),e.uid=Po("stageHandler"),t&&(e.visualType=t),e},r}();function t3(r){r.overallReset(r.ecModel,r.api,r.payload)}function r3(r){return r.overallProgress&&n3}function n3(){this.agent.dirty(),this.getDownstream().dirty()}function a3(){this.agent&&this.agent.dirty()}function i3(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function o3(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=He(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?H(e,function(t,n){return vE(n)}):s3}var s3=vE(0);function vE(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 l3(r){return r.data.count()}function u3(r){Mf=null;try{r(Pl,gE)}catch{}return Mf}var Pl={},gE={},Mf;mE(Pl,Wv),mE(gE,hS),Pl.eachSeriesByType=Pl.eachRawSeriesByType=function(r){Mf=r},Pl.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Mf=r.subType)};function mE(r,e){for(var t in e.prototype)r[t]=ft}var yE=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const c3={color:yE,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],yE]};var Gt="#B9B8CE",_E="#100C2A",kf=function(){return{axisLine:{lineStyle:{color:Gt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},bE=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],xE={darkMode:!0,color:bE,backgroundColor:_E,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Gt},pageTextStyle:{color:Gt}},textStyle:{color:Gt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Gt}},dataZoom:{borderColor:"#71708A",textStyle:{color:Gt},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:Gt}},timeline:{lineStyle:{color:Gt},label:{color:Gt},controlStyle:{color:Gt,borderColor:Gt}},calendar:{itemStyle:{color:_E},dayLabel:{color:Gt},monthLabel:{color:Gt},yearLabel:{color:Gt}},timeAxis:kf(),logAxis:kf(),valueAxis:kf(),categoryAxis:kf(),line:{symbol:"circle"},graph:{color:bE},gauge:{title:{color:Gt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Gt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};xE.categoryAxis.splitLine.show=!1;var f3=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},a={};if(X(e)){var i=pn(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 c=!1,f=0;f<o.length;f++){var h=o[f],d=u.lastIndexOf(h);if(d>0&&d===u.length-h.length){var p=u.slice(0,d);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(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 c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function c(f,h,d,p){return f[d]==null||h[p||d]===f[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),cg=["symbol","symbolSize","symbolRotate","symbolOffset"],wE=cg.concat(["symbolKeepAspect"]),h3={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<cg.length;o++){var s=cg[o],l=r.get(s);ie(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(F({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=Me(a);function c(f,h){for(var d=r.getRawValue(h),p=r.getDataParams(h),v=0;v<u.length;v++){var g=u[v];f.setItemVisual(h,g,a[g](d,p))}}return{dataEach:i?c:null}}},d3={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<wE.length;s++){var l=wE[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}},fg={};function hg(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:fg.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function Bl(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:fg.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function SE(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:fg.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}var EE={};function TE(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=F({},a),EE.NODE_ENV!=="production"&&vt(a.type,n[1]),o.dispatchAction(F(a,{type:n[1],seriesIndex:t(i,a)}))})})}function Qo(r,e,t,n,a){var i=r+e;t.isSilent(i)||(EE.NODE_ENV!=="production"&&qr("event "+i+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=si(f,a.fromActionPayload);t.trigger(i,{type:i,seriesId:o.id,name:G(h)?f.getName(h[0]):f.getName(h),selected:X(l)?l:F({},l)})}}))}function p3(r,e,t){r.on("selectchanged",function(n){var a=t.getModel();n.isFromClick?(Qo("map","selectchanged",e,a,n),Qo("pie","selectchanged",e,a,n)):n.fromAction==="select"?(Qo("map","selected",e,a,n),Qo("pie","selected",e,a,n)):n.fromAction==="unselect"&&(Qo("map","unselected",e,a,n),Qo("pie","unselected",e,a,n))})}function Ri(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var v3=Math.round(Math.random()*9),g3=typeof Object.defineProperty=="function",m3=function(){function r(){this._id="__ec_inner_"+v3++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return g3?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}(),y3=De.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()}}),_3=De.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()}}),b3=De.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),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),d=o*.6,p=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-f*d,l+s+h*d,t,n-p,t,n),r.bezierCurveTo(t,n-p,t-c+f*d,l+s+h*d,t-c,l+s),r.closePath()}}),x3=De.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()}}),w3={line:St,rect:Ie,roundRect:Ie,square:Ie,circle:Hn,diamond:_3,pin:b3,arrow:x3,triangle:y3},S3={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}},Nf={};A(w3,function(r,e){Nf[e]=new r});var E3=De.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=Dc(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=Nf[n];a||(n="rect",a=Nf[n]),S3[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(r,a.shape,t)}}});function T3(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 yt(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=yw(r.slice(8),new xe(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=tf(r.slice(7),{},new xe(e,t,n,a),o?"center":"cover"):l=new E3({shape:{symbolType:r,x:e,y:t,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=T3,i&&l.setColor(i),l}function jo(r){return G(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Oi(r,e){if(r!=null)return G(r)||(r=[r,r]),[W(r[0],e[0])||0,W(pe(r[1],r[0]),e[1])||0]}function Pi(r){return isFinite(r)}function C3(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=Pi(n)?n:0,a=Pi(a)?a:1,i=Pi(i)?i:0,o=Pi(o)?o:0;var s=r.createLinearGradient(n,i,a,o);return s}function D3(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=Pi(o)?o:.5,s=Pi(s)?s:.5,l=l>=0&&Pi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function dg(r,e,t){for(var n=e.type==="radial"?D3(r,e,t):C3(r,e,t),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function A3(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 If(r){return parseInt(r,10)}function Jo(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]||If(s[n])||If(r.style[n]))-(If(s[i])||0)-(If(s[o])||0)|0}function M3(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Oe(r)?[r]:G(r)?r:null}function pg(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&M3(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=H(t,function(i){return i/a}),n/=a)}return[t,n]}var k3=new yn(!0);function Lf(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function CE(r){return typeof r=="string"&&r!=="none"}function Rf(r){var e=r.fill;return e!=null&&e!=="none"}function DE(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 AE(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 vg(r,e,t){var n=Gp(e.image,e.__image,t);if(Ic(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)*tc),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function N3(r,e,t,n){var a,i=Lf(t),o=Rf(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||k3,f=e.__dirty;if(!n){var h=t.fill,d=t.stroke,p=o&&!!h.colorStops,v=i&&!!d.colorStops,g=o&&!!h.image,m=i&&!!d.image,y=void 0,_=void 0,x=void 0,w=void 0,S=void 0;(p||v)&&(S=e.getBoundingRect()),p&&(y=f?dg(r,h,S):e.__canvasFillGradient,e.__canvasFillGradient=y),v&&(_=f?dg(r,d,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(x=f||!e.__canvasFillPattern?vg(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=x),m&&(w=f||!e.__canvasStrokePattern?vg(r,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),p?r.fillStyle=y:g&&(x?r.fillStyle=x:o=!1),v?r.strokeStyle=_:m&&(w?r.strokeStyle=w:i=!1)}var E=e.getGlobalScale();c.setScale(E[0],E[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(a=pg(e),T=a[0],C=a[1]);var D=!0;(u||f&Us)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),D=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),D&&c.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(t.strokeFirst?(i&&AE(r,t),o&&DE(r,t)):(o&&DE(r,t),i&&AE(r,t))),T&&r.setLineDash([])}function I3(r,e,t){var n=e.__image=Gp(t.image,e.__image,e,e.onload);if(!(!n||!Ic(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,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,h=s-c;r.drawImage(n,u,c,f,h,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function L3(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||na,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=pg(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(Lf(t)&&r.strokeText(a,t.x,t.y),Rf(t)&&r.fillText(a,t.x,t.y)):(Rf(t)&&r.fillText(a,t.x,t.y),Lf(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var ME=["shadowBlur","shadowOffsetX","shadowOffsetY"],kE=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function NE(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){sr(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?ci.opacity:o}(n||e.blend!==t.blend)&&(i||(sr(r,a),i=!0),r.globalCompositeOperation=e.blend||ci.blend);for(var s=0;s<ME.length;s++){var l=ME[s];(n||e[l]!==t[l])&&(i||(sr(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(sr(r,a),i=!0),r.shadowColor=e.shadowColor||ci.shadowColor),i}function IE(r,e,t,n,a){var i=Vl(e,a.inHover),o=n?null:t&&Vl(t,a.inHover)||{};if(i===o)return!1;var s=NE(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(sr(r,a),s=!0),CE(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(sr(r,a),s=!0),CE(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(sr(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||(sr(r,a),s=!0),r.lineWidth=u)}for(var c=0;c<kE.length;c++){var f=kE[c],h=f[0];(n||i[h]!==o[h])&&(s||(sr(r,a),s=!0),r[h]=i[h]||f[1])}return s}function R3(r,e,t,n,a){return NE(r,Vl(e,a.inHover),t&&Vl(t,a.inHover),n,a)}function LE(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 O3(r,e,t){for(var n=!1,a=0;a<r.length;a++){var i=r[a];n=n||i.isZeroArea(),LE(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=n}function P3(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 RE=1,OE=2,PE=3,BE=4;function B3(r){var e=Rf(r),t=Lf(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 sr(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Vl(r,e){return e&&r.__hoverStyle||r.style}function VE(r,e){Bi(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Bi(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||A3(i,o))&&(o&&o.length&&(sr(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(sr(r,t),r.save(),O3(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 c=e instanceof De&&e.autoBatch&&B3(e.style);s||P3(a,u.transform)?(sr(r,t),LE(r,e)):c||sr(r,t);var f=Vl(e,t.inHover);e instanceof De?(t.lastDrawType!==RE&&(l=!0,t.lastDrawType=RE),IE(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),N3(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Co?(t.lastDrawType!==PE&&(l=!0,t.lastDrawType=PE),IE(r,e,u,l,t),L3(r,e,f)):e instanceof It?(t.lastDrawType!==OE&&(l=!0,t.lastDrawType=OE),R3(r,e,u,l,t),I3(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==BE&&(l=!0,t.lastDrawType=BE),V3(r,e,t)),c&&n&&sr(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function V3(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(),Bi(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Bi(r,l,i,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var z3={},gg=new m3,zE=new Zs(100),FE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function es(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&gg.delete(r);var i=gg.get(r);if(i)return i;var o=le(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,gg.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,h=0;h<FE.length;++h){var d=o[FE[h]];if(d!=null&&!G(d)&&!X(d)&&!Oe(d)&&typeof d!="boolean"){f=!1;break}c.push(d)}var p;if(f){p=c.join(",")+(a?"-svg":"");var v=zE.get(p);v&&(a?u.svgElement=v:u.image=v)}var g=GE(o.dashArrayX),m=F3(o.dashArrayY),y=$E(o.symbol),_=$3(g),x=HE(m),w=!a&&aa.createCanvas(),S=a&&{tag:"g",attrs:{},key:"dcl",children:[]},E=C(),T;w&&(w.width=E.width*t,w.height=E.height*t,T=w.getContext("2d")),D(),f&&zE.put(p,w||S),u.image=w,u.svgElement=S,u.svgWidth=E.width,u.svgHeight=E.height;function C(){for(var M=1,k=0,N=_.length;k<N;++k)M=Jx(M,_[k]);for(var L=1,k=0,N=y.length;k<N;++k)L=Jx(L,y[k].length);M*=L;var R=x*_.length*y.length;if(z3.NODE_ENV!=="production"){var I=function(O){console.warn("Calculated decal size is greater than "+O+" due to decal option settings so "+O+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+O+" to be larger to avoid incontinuity.")};M>o.maxTileWidth&&I("maxTileWidth"),R>o.maxTileHeight&&I("maxTileHeight")}return{width:Math.max(1,Math.min(M,o.maxTileWidth)),height:Math.max(1,Math.min(R,o.maxTileHeight))}}function D(){T&&(T.clearRect(0,0,w.width,w.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,w.width,w.height)));for(var M=0,k=0;k<m.length;++k)M+=m[k];if(M<=0)return;for(var N=-x,L=0,R=0,I=0;N<E.height;){if(L%2===0){for(var O=R/2%y.length,P=0,B=0,z=0;P<E.width*2;){for(var $=0,k=0;k<g[I].length;++k)$+=g[I][k];if($<=0)break;if(B%2===0){var U=(1-o.symbolSize)*.5,j=P+g[I][B]*U,Z=N+m[L]*U,ee=g[I][B]*o.symbolSize,he=m[L]*o.symbolSize,Ee=z/2%y[O].length;re(j,Z,ee,he,y[O][Ee])}P+=g[I][B],++z,++B,B===g[I].length&&(B=0)}++I,I===g.length&&(I=0)}N+=m[L],++R,++L,L===m.length&&(L=0)}function re(J,ue,q,ae,Y){var ye=a?1:t,Se=yt(Y,J*ye,ue*ye,q*ye,ae*ye,o.color,o.symbolKeepAspect);if(a){var Be=n.painter.renderOneToVNode(Se);Be&&S.children.push(Be)}else VE(T,Se)}}}}function $E(r){if(!r||r.length===0)return[["rect"]];if(X(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!X(r[t])){e=!1;break}if(e)return $E([r]);for(var n=[],t=0;t<r.length;++t)X(r[t])?n.push([r[t]]):n.push(r[t]);return n}function GE(r){if(!r||r.length===0)return[[0,0]];if(Oe(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!Oe(r[n])){t=!1;break}if(t)return GE([r]);for(var a=[],n=0;n<r.length;++n)if(Oe(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=H(r[n],function(s){return Math.ceil(s)});e.length%2===1?a.push(e.concat(e)):a.push(e)}return a}function F3(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(Oe(r)){var e=Math.ceil(r);return[e,e]}var t=H(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function $3(r){return H(r,function(e){return HE(e)})}function HE(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function G3(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=es(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=es(a,e)}}})}var en=new xr,UE={},Of={};function H3(r,e){UE.NODE_ENV!=="production"&&Of[r]&&Rt("Already has an implementation of "+r+"."),Of[r]=e}function U3(r){return UE.NODE_ENV!=="production"&&(Of[r]||Rt("Implementation of "+r+" doesn't exists.")),Of[r]}var Ct={},W3=1,Y3=800,Z3=900,q3=1e3,X3=2e3,K3=5e3,WE=1e3,Q3=1100,mg=2e3,YE=3e3,j3=4e3,Pf=4500,J3=4600,e$=5e3,t$=6e3,ZE=7e3,r$={PROCESSOR:{FILTER:q3,SERIES_FILTER:Y3,STATISTIC:K3},VISUAL:{LAYOUT:WE,PROGRESSIVE_LAYOUT:Q3,GLOBAL:mg,CHART:YE,POST_CHART_LAYOUT:J3,COMPONENT:j3,BRUSH:e$,CHART_ITEM:Pf,ARIA:t$,DECAL:ZE}},Ht="__flagInMainProcess",lr="__pendingUpdate",yg="__needsUpdateStatus",qE=/^[a-zA-Z0-9_]+$/,_g="__connectUpdateStatus",XE=0,n$=1,a$=2;function KE(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){vr(this.id);return}return jE(this,r,e)}}function QE(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return jE(this,r,e)}}function jE(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),xr.prototype[e].apply(r,t)}var JE=function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(xr),eT=JE.prototype;eT.on=QE("on"),eT.off=QE("off");var ts,bg,Bf,Da,xg,wg,Sg,zl,Fl,tT,rT,Eg,nT,Vf,aT,iT,Rr,oT,sT=function(r){V(e,r);function e(t,n,a){var i=r.call(this,new f3)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},X(n)&&(n=lT[n]),i._dom=t;var o="canvas",s="auto",l=!1;if(Ct.NODE_ENV!=="production"){var u=Ce.hasGlobalWindow?window:global;u&&(o=pe(u.__ECHARTS__DEFAULT__RENDERER__,o),s=pe(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=pe(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}a.ssr&&FB(function(d){var p=ve(d),v=p.dataIndex;if(v!=null){var g=te();return g.set("series_index",p.seriesIndex),g.set("data_index",v),p.ssrType&&g.set("ssr_type",p.ssrType),g}});var c=i._zr=Ux(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:pe(a.useDirtyRect,l),useCoarsePointer:pe(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=ug(K(c.flush,c),17),n=ce(n),n&&bS(n,!0),i._theme=n,i._locale=vF(a.locale||Rw),i._coordSysMgr=new Wo;var f=i._api=aT(i);function h(d,p){return d.__prio-p.__prio}return sc(Ff,h),sc(Cg,h),i._scheduler=new pE(i,f,Cg,Ff),i._messageCenter=new JE,i._initEvents(),i.resize=K(i.resize,i),c.animation.on("frame",i._onframe,i),tT(c,i),rT(c,i),Ju(i),i}return e.prototype._onframe=function(){if(!this._disposed){oT(this);var t=this._scheduler;if(this[lr]){var n=this[lr].silent;this[Ht]=!0;try{ts(this),Da.update.call(this,null,this[lr].updateParams)}catch(l){throw this[Ht]=!1,this[lr]=null,l}this._zr.flush(),this[Ht]=!1,this[lr]=null,zl.call(this,n),Fl.call(this,n)}else if(t.unfinished){var a=W3,i=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),wg(this,i),t.performVisualTasks(i),Vf(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[Ht]){Ct.NODE_ENV!=="production"&&Rt("`setOption` should not be called during main process.");return}if(this._disposed){vr(this.id);return}var i,o,s;if(oe(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Ht]=!0,!this._model||n){var l=new HF(this._api),u=this._theme,c=this._model=new Wv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Dg);var f={seriesTransition:s,optionChanged:!0};if(a)this[lr]={silent:i,updateParams:f},this[Ht]=!1,this.getZr().wakeUp();else{try{ts(this),Da.update.call(this,null,f)}catch(h){throw this[lr]=null,this[Ht]=!1,h}this._ssr||this._zr.flush(),this[lr]=null,this[Ht]=!1,zl.call(this,i),Fl.call(this,i)}},e.prototype.setTheme=function(){qr("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||Ce.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return Ct.NODE_ENV!=="production"&&vt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;if(Ct.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(Ct.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(Ce.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){vr(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 c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.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){vr(this.id);return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(uT[a]){var l=s,u=s,c=-s,f=-s,h=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();A(Gl,function(_,x){if(_.group===a){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ce(t)),S=_.getDom().getBoundingClientRect();l=i(S.left,l),u=i(S.top,u),c=o(S.right,c),f=o(S.bottom,f),h.push({dom:w,left:S.left,top:S.top})}}),l*=d,u*=d,c*=d,f*=d;var p=c-l,v=f-u,g=aa.createCanvas(),m=Ux(g,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:v}),n){var y="";return A(h,function(_){var x=_.left-l,w=_.top-u;y+='<g transform="translate('+x+","+w+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return t.connectedBackgroundColor&&m.add(new Ie({shape:{x:0,y:0,width:p,height:v},style:{fill:t.connectedBackgroundColor}})),A(h,function(_){var x=new It({style:{x:_.left*d-l,y:_.top*d-u,image:_.dom}});m.add(x)}),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return xg(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return xg(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){vr(this.id);return}var a=this._model,i,o=il(a,t);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint?i=i||f.containPoint(n,u):Ct.NODE_ENV!=="production"&&st(l+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else Ct.NODE_ENV!=="production"&&st(l+": containPoint is not supported")},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=il(a,t,{defaultMainType:"series"}),o=i.seriesModel;Ct.NODE_ENV!=="production"&&(o||st("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?hg(s,l,n):Bl(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(i$,function(n){var a=function(i){var o=t.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&Ri(s,function(p){var v=ve(p);if(v&&v.dataIndex!=null){var g=v.dataModel||o.getSeriesByIndex(v.seriesIndex);return l=g&&g.getDataParams(v.dataIndex,v.dataType,s)||{},!0}else if(v.eventData)return l=F({},v.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),d=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];Ct.NODE_ENV!=="production"&&!u&&!(h&&d)&&st("model or view can not be found by params"),l.event=i,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:d},t.trigger(n,l)}};a.zrEventfulCallAtLast=!0,t._zr.on(n,a,t)}),A($l,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)}),p3(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){vr(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){vr(this.id);return}this._disposed=!0;var t=this.getDom();t&&u1(this.getDom(),Mg,"");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 Gl[n.id]},e.prototype.resize=function(t){if(this[Ht]){Ct.NODE_ENV!=="production"&&Rt("`resize` should not be called during main process.");return}if(this._disposed){vr(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[lr]&&(i==null&&(i=this[lr].silent),a=!0,this[lr]=null),this[Ht]=!0;try{a&&ts(this),Da.update.call(this,{type:"resize",animation:F({duration:0},t&&t.animation)})}catch(o){throw this[Ht]=!1,o}this[Ht]=!1,zl.call(this,i),Fl.call(this,i)}},e.prototype.showLoading=function(t,n){if(this._disposed){vr(this.id);return}if(oe(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!Ag[t]){Ct.NODE_ENV!=="production"&&st("Loading effects "+t+" not exists.");return}var a=Ag[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)},e.prototype.hideLoading=function(){if(this._disposed){vr(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=F({},t);return n.type=$l[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){vr(this.id);return}if(oe(n)||(n={silent:!!n}),!!zf[t.type]&&this._model){if(this[Ht]){this._pendingActions.push(t);return}var a=n.silent;Sg.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&Ce.browser.weChat&&this._throttledZrFlush(),zl.call(this,a),Fl.call(this,a)}},e.prototype.updateLabelLayout=function(){en.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){vr(this.id);return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);Ct.NODE_ENV!=="production"&&se(t.data&&i),i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ts=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),bg(f,!0),bg(f,!1),h.plan()},bg=function(f,h){for(var d=f._model,p=f._scheduler,v=h?f._componentsViews:f._chartsViews,g=h?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_<v.length;_++)v[_].__alive=!1;h?d.eachComponent(function(S,E){S!=="series"&&x(E)}):d.eachSeries(x);function x(S){var E=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,C=!E&&g[T];if(!C){var D=pn(S.type),M=h?at.getClass(D.main,D.sub):We.getClass(D.sub);Ct.NODE_ENV!=="production"&&se(M,D.sub+" does not exist."),C=new M,C.init(d,y),g[T]=C,v.push(C),m.add(C.group)}S.__viewId=C.__id=T,C.__alive=!0,C.__model=S,C.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!h&&p.prepareView(C,S,d,y)}for(var _=0;_<v.length;){var w=v[_];w.__alive?_++:(!h&&w.renderTask.dispose(),m.remove(w.group),w.dispose(d,y),v.splice(_,1),g[w.__id]===w&&delete g[w.__id],w.__id=w.group.__ecComponentInfo=null)}},Bf=function(f,h,d,p,v){var g=f._model;if(g.setUpdatePayload(d),!p){A([].concat(f._componentsViews).concat(f._chartsViews),w);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};v&&(y.subType=v);var _=d.excludeSeriesId,x;_!=null&&(x=te(),A(He(_),function(S){var E=_t(S,null);E!=null&&x.set(E,!0)})),g&&g.eachComponent(y,function(S){var E=x&&x.get(S.id)!=null;if(!E)if(ew(d))if(S instanceof Ke)d.type===yi&&!d.notBlur&&!S.get(["emphasis","disabled"])&&dz(S,d,f._api);else{var T=hv(S.mainType,S.componentIndex,d.name,f._api),C=T.focusSelf,D=T.dispatchers;d.type===yi&&C&&!d.notBlur&&fv(S.mainType,S.componentIndex,f._api),D&&A(D,function(M){d.type===yi?$n(M):Gn(M)})}else pv(d)&&S instanceof Ke&&(gz(S,d,f._api),j1(S),Rr(f))},f),g&&g.eachComponent(y,function(S){var E=x&&x.get(S.id)!=null;E||w(f[p==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},f);function w(S){S&&S.__alive&&S[h]&&S[h](S.__model,g,f._api,d)}},Da={prepareAndUpdate:function(f){ts(this),Da.update.call(this,f,{optionChanged:f.newOption!=null})},update:function(f,h){var d=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(f),m.restoreData(d,f),m.performSeriesTasks(d),g.create(d,p),m.performDataProcessorTasks(d,f),wg(this,d),g.update(d,p),t(d),m.performVisualTasks(d,f),Eg(this,d,p,f,h);var y=d.get("backgroundColor")||"transparent",_=d.get("darkMode");v.setBackgroundColor(y),_!=null&&_!=="auto"&&v.setDarkMode(_),en.trigger("afterupdate",d,p)}},updateTransform:function(f){var h=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(f);var v=[];d.eachComponent(function(m,y){if(m!=="series"){var _=h.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,d,p,f);x&&x.update&&v.push(_)}else v.push(_)}});var g=te();d.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,d,p,f);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),t(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0,dirtyMap:g}),Vf(this,d,p,f,{},g),en.trigger("afterupdate",d,p)}},updateView:function(f){var h=this._model;h&&(h.setUpdatePayload(f),We.markUpdateMethod(f,"updateView"),t(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),Eg(this,h,this._api,f,{}),en.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,d=this._model;d&&(d.setUpdatePayload(f),d.eachSeries(function(p){p.getData().clearAllVisual()}),We.markUpdateMethod(f,"updateVisual"),t(d),this._scheduler.performVisualTasks(d,f,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,v){if(p!=="series"){var g=h.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,d,h._api,f)}}),d.eachSeries(function(p){var v=h._chartsMap[p.__viewId];v.updateVisual(p,d,h._api,f)}),en.trigger("afterupdate",d,this._api))},updateLayout:function(f){Da.update.call(this,f)}},xg=function(f,h,d,p){if(f._disposed){vr(f.id);return}for(var v=f._model,g=f._coordSysMgr.getCoordinateSystems(),m,y=il(v,d),_=0;_<g.length;_++){var x=g[_];if(x[h]&&(m=x[h](v,y,p))!=null)return m}Ct.NODE_ENV!=="production"&&st("No coordinate system that supports "+h+" found by the given finder.")},wg=function(f,h){var d=f._chartsMap,p=f._scheduler;h.eachSeries(function(v){p.updateStreamModes(v,d[v.__viewId])})},Sg=function(f,h){var d=this,p=this.getModel(),v=f.type,g=f.escapeConnect,m=zf[v],y=m.actionInfo,_=(y.update||"update").split(":"),x=_.pop(),w=_[0]!=null&&pn(_[0]);this[Ht]=!0;var S=[f],E=!1;f.batch&&(E=!0,S=H(f.batch,function(L){return L=le(F({},L),f),L.batch=null,L}));var T=[],C,D=pv(f),M=ew(f);if(M&&Q1(this._api),A(S,function(L){if(C=m.action(L,d._model,d._api),C=C||F({},L),C.type=y.event||C.type,T.push(C),M){var R=Bp(f),I=R.queryOptionMap,O=R.mainTypeSpecified,P=O?I.keys()[0]:"series";Bf(d,x,L,P),Rr(d)}else D?(Bf(d,x,L,"series"),Rr(d)):w&&Bf(d,x,L,w.main,w.sub)}),x!=="none"&&!M&&!D&&!w)try{this[lr]?(ts(this),Da.update.call(this,f),this[lr]=null):Da[x].call(this,f)}catch(L){throw this[Ht]=!1,L}if(E?C={type:y.event||v,escapeConnect:g,batch:T}:C=T[0],this[Ht]=!1,!h){var k=this._messageCenter;if(k.trigger(C.type,C),D){var N={type:"selectchanged",escapeConnect:g,selected:mz(p),isFromClick:f.isFromClick||!1,fromAction:f.type,fromActionPayload:f};k.trigger(N.type,N)}}},zl=function(f){for(var h=this._pendingActions;h.length;){var d=h.shift();Sg.call(this,d,f)}},Fl=function(f){!f&&this.trigger("updated")},tT=function(f,h){f.on("rendered",function(d){h.trigger("rendered",d),f.animation.isFinished()&&!h[lr]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},rT=function(f,h){f.on("mouseover",function(d){var p=d.target,v=Ri(p,ma);v&&(pz(v,d,h._api),Rr(h))}).on("mouseout",function(d){var p=d.target,v=Ri(p,ma);v&&(vz(v,d,h._api),Rr(h))}).on("click",function(d){var p=d.target,v=Ri(p,function(y){return ve(y).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=ve(v);h._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function t(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function n(f){var h=[],d=[],p=!1;if(f.eachComponent(function(y,_){var x=_.get("zlevel")||0,w=_.get("z")||0,S=_.getZLevelKey();p=p||!!S,(y==="series"?d:h).push({zlevel:x,z:w,idx:_.componentIndex,type:y,key:S})}),p){var v=h.concat(d),g,m;sc(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),A(v,function(y){var _=f.getComponent(y.type,y.idx),x=y.zlevel,w=y.key;g!=null&&(x=Math.max(g,x)),w?(x===g&&w!==m&&x++,m=w):m&&(x===g&&x++,m=""),g=x,_.setZLevel(x)})}}Eg=function(f,h,d,p,v){n(h),nT(f,h,d,p,v),A(f._chartsViews,function(g){g.__alive=!1}),Vf(f,h,d,p,v),A(f._chartsViews,function(g){g.__alive||g.remove(h,d)})},nT=function(f,h,d,p,v,g){A(g||f._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,h,d,p),s(y,m),c(y,m)})},Vf=function(f,h,d,p,v,g){var m=f._scheduler;v=F(v||{},{updatedSeries:h.getSeries()}),en.trigger("series:beforeupdate",h,d,v);var y=!1;h.eachSeries(function(_){var x=f._chartsMap[_.__viewId];x.__alive=!0;var w=x.renderTask;m.updatePayload(w,p),u(_,x),g&&g.get(_.uid)&&w.dirty(),w.perform(m.getPerformArgs(w))&&(y=!0),x.group.silent=!!_.get("silent"),o(_,x),j1(_)}),m.unfinished=y||m.unfinished,en.trigger("series:layoutlabels",h,d,v),en.trigger("series:transition",h,d,v),h.eachSeries(function(_){var x=f._chartsMap[_.__viewId];s(_,x),c(_,x)}),i(f,h),en.trigger("series:afterupdate",h,d,v)},Rr=function(f){f[yg]=!0,f.getZr().wakeUp()},oT=function(f){f[yg]&&(f.getZr().storage.traverse(function(h){Lo(h)||a(h)}),f[yg]=!1)};function a(f){for(var h=[],d=f.currentStates,p=0;p<d.length;p++){var v=d[p];v==="emphasis"||v==="blur"||v==="select"||h.push(v)}f.selected&&f.states.select&&h.push("select"),f.hoverState===Fc&&f.states.emphasis?h.push("emphasis"):f.hoverState===ul&&f.states.blur&&h.push("blur"),f.useStates(h)}function i(f,h){var d=f._zr,p=d.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>h.get("hoverLayerThreshold")&&!Ce.node&&!Ce.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(f,h){if(!f.preventAutoZ){var d=f.get("z")||0,p=f.get("zlevel")||0;h.eachRendered(function(v){return l(v,d,p,-1/0),!0})}}function l(f,h,d,p){var v=f.getTextContent(),g=f.getTextGuideLine(),m=f.isGroup;if(m)for(var y=f.childrenRef(),_=0;_<y.length;_++)p=Math.max(l(y[_],h,d,p),p);else f.z=h,f.zlevel=d,p=Math.max(f.z2,p);if(v&&(v.z=h,v.zlevel=d,isFinite(p)&&(v.z2=p+2)),g){var x=f.textGuideLineConfig;g.z=h,g.zlevel=d,isFinite(p)&&(g.z2=p+(x&&x.showAbove?1:-1))}return p}function u(f,h){h.eachRendered(function(d){if(!Lo(d)){var p=d.getTextContent(),v=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(f,h){var d=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),v=d.get("duration"),g=v>0?{duration:v,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Lo(m))return;if(m instanceof De&&wz(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=g;var _=m.getTextContent(),x=m.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}m.__dirty&&a(m)}})}aT=function(f){return new(function(h){V(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);p=p.parent}},d.prototype.enterEmphasis=function(p,v){$n(p,v),Rr(f)},d.prototype.leaveEmphasis=function(p,v){Gn(p,v),Rr(f)},d.prototype.enterBlur=function(p){Z1(p),Rr(f)},d.prototype.leaveBlur=function(p){uv(p),Rr(f)},d.prototype.enterSelect=function(p){q1(p),Rr(f)},d.prototype.leaveSelect=function(p){X1(p),Rr(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},d}(hS))(f)},iT=function(f){function h(d,p){for(var v=0;v<d.length;v++){var g=d[v];g[_g]=p}}A($l,function(d,p){f._messageCenter.on(p,function(v){if(uT[f.group]&&f[_g]!==XE){if(v&&v.escapeConnect)return;var g=f.makeActionFromEvent(v),m=[];A(Gl,function(y){y!==f&&y.group===f.group&&m.push(y)}),h(m,XE),A(m,function(y){y[_g]!==n$&&y.dispatchAction(g)}),h(m,a$)}})})}}(),e}(xr),Tg=sT.prototype;Tg.on=KE("on"),Tg.off=KE("off"),Tg.one=function(r,e,t){var n=this;qr("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 i$=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function vr(r){Ct.NODE_ENV!=="production"&&st("Instance "+r+" has been disposed")}var zf={},$l={},Cg=[],Dg=[],Ff=[],lT={},Ag={},Gl={},uT={},o$=+new Date-0,Mg="_echarts_instance_";function $f(r,e,t){{if(Ct.NODE_ENV!=="production"&&!r)throw new Error("Initialize failed: invalid dom.");var n=kg(r);if(n)return Ct.NODE_ENV!=="production"&&st("There is a chart instance already initialized on the dom."),n;Ct.NODE_ENV!=="production"&&Za(r)&&r.nodeName.toUpperCase()!=="CANVAS"&&(!r.clientWidth||!r.clientHeight)&&st("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 sT(r,e,t);return a.id="ec_"+o$++,Gl[a.id]=a,u1(r,Mg,a.id),iT(a),en.trigger("afterinit",a),a}function kg(r){return Gl[uV(r,Mg)]}function cT(r,e){lT[r]=e}function fT(r){we(Dg,r)<0&&Dg.push(r)}function hT(r,e){Ig(Cg,r,e,X3)}function s$(r){Ng("afterinit",r)}function l$(r){Ng("afterupdate",r)}function Ng(r,e){en.on(r,e)}function wn(r,e,t){ie(e)&&(t=e,e="");var n=oe(r)?r.type:[r,r={event:e}][0];r.event=(r.event||n).toLowerCase(),e=r.event,!$l[e]&&(se(qE.test(n)&&qE.test(e)),zf[n]||(zf[n]={action:t,actionInfo:r}),$l[e]=n)}function u$(r,e){Wo.register(r,e)}function c$(r,e){Ig(Ff,r,e,WE,"layout")}function Vi(r,e){Ig(Ff,r,e,YE,"visual")}var dT=[];function Ig(r,e,t,n,a){if((ie(e)||oe(e))&&(t=e,e=n),Ct.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");A(r,function(o){se(o.__raw!==t)})}if(!(we(dT,t)>=0)){dT.push(t);var i=pE.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function pT(r,e){Ag[r]=e}function f$(r,e,t){var n=U3("registerMap");n&&n(r,e,t)}var h$=S5;Vi(mg,Q5),Vi(Pf,j5),Vi(Pf,J5),Vi(mg,h3),Vi(Pf,d3),Vi(ZE,G3),fT(bS),hT(Z3,t5),pT("default",e3),wn({type:yi,event:yi,update:yi},ft),wn({type:$c,event:$c,update:$c},ft),wn({type:fl,event:fl,update:fl},ft),wn({type:Gc,event:Gc,update:Gc},ft),wn({type:hl,event:hl,update:hl},ft),cT("light",c3),cT("dark",xE);var vT=[],d$={registerPreprocessor:fT,registerProcessor:hT,registerPostInit:s$,registerPostUpdate:l$,registerUpdateLifecycle:Ng,registerAction:wn,registerCoordinateSystem:u$,registerLayout:c$,registerVisual:Vi,registerTransform:h$,registerLoading:pT,registerMap:f$,registerImpl:H3,PRIORITY:r$,ComponentModel:Ae,ComponentView:at,SeriesModel:Ke,ChartView:We,registerComponentModel:function(r){Ae.registerClass(r)},registerComponentView:function(r){at.registerClass(r)},registerSeriesModel:function(r){Ke.registerClass(r)},registerChartView:function(r){We.registerClass(r)},registerSubTypeDefaulter:function(r,e){Ae.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){VB(r,e)}};function Te(r){if(G(r)){A(r,function(e){Te(e)});return}we(vT,r)>=0||(vT.push(r),ie(r)&&(r={install:r}),r.install(d$))}function Hl(r){return r==null?0:r.length||1}function gT(r){return r}var Yn=function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||gT,this._newKeyGetter=a||gT,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=Hl(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,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],c=a[l],f=Hl(u),h=Hl(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var d=0;d<f;d++)this._remove&&this._remove(u[d]);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=Hl(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=Hl(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}(),p$={},v$=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 g$(r,e){var t={},n=t.encode={},a=te(),i=[],o=[],s={};A(r.dimensions,function(h){var d=r.getDimensionInfo(h),p=d.coordDim;if(p){p$.NODE_ENV!=="production"&&se(Vv.get(p)==null);var v=d.coordDimIndex;Lg(n,p)[v]=h,d.isExtraCoord||(a.set(p,1),m$(d.type)&&(i[0]=h),Lg(s,p)[v]=r.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}Vv.each(function(g,m){var y=Lg(n,m),_=d.otherDims[m];_!=null&&_!==!1&&(y[_]=d.name)})});var l=[],u={};a.each(function(h,d){var p=n[d];u[d]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=H(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(i=c.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 v$(s,e),t}function Lg(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function Gf(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function m$(r){return!(r==="ordinal"||r==="time")}var Hf=function(){function r(e){this.otherDims={},e!=null&&F(this,e)}return r}(),y$=Ne(),_$={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},mT=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=bT(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return pe(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=ES(this.source),n=!xT(e),a="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=t?h.name:null,u=h.type)}i.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=_$[u]||"f",c&&(a+=c.uid),a+="$"}var d=this.source,p=[d.seriesLayoutBy,d.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 yT(r){return r instanceof mT}function _T(r){for(var e=te(),t=0;t<(r||[]).length;t++){var n=r[t],a=oe(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,t)}return e}function bT(r){var e=y$(r);return e.dimNameMap||(e.dimNameMap=_T(r.dimensionsDefine))}function xT(r){return r>30}var Uf={},Ul=oe,Aa=H,b$=typeof Int32Array>"u"?Array:Int32Array,x$="e\0\0",wT=-1,w$=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],S$=["_approximateExtent"],ST,Wf,Wl,rs,Rg,Yl,Og,Jt=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;yT(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={},c=0;c<n.length;c++){var f=n[c],h=X(f)?new Hf({name:f}):f instanceof Hf?f:new Hf(f),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),i[d]=h,u[d]!=null&&(l=!0),h.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=c),p.itemId===0&&(this._idDimIdx=c),Uf.NODE_ENV!=="production"&&se(a||h.storeDimIndex>=0),a&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var v=this._dimIdxToName=te();A(o,function(g){v.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(Oe(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(Uf.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 ng&&(i=e),!i){var o=this.dimensions,s=Xv(e)||Vt(e)?new DS(e,o.length):e;i=new ng;var l=Aa(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=g$(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&&Og(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!==Un&&!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===kr;if(l&&!a.pure)for(var u=[],c=e;c<t;c++){var f=a.getItem(c,u);if(!this.hasItemOption&&KB(f)&&(this.hasItemOption=!0),f){var h=f.name;i[c]==null&&h!=null&&(i[c]=_t(h,null));var d=f.id;o[c]==null&&d!=null&&(o[c]=_t(d,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)Og(this,c);ST(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){Ul(e)?F(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=Wl(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 Wf(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 G(e)?a.getValues(Aa(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(Uf.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var a=n&&n[t];return a==null||isNaN(a)?wT:a},r.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},r.prototype.each=function(e,t,n){ie(e)&&(n=t,t=e,e=[]);var a=n||this,i=Aa(rs(e),this._getStoreDimIndex,this);this._store.each(i,a?K(t,a):t)},r.prototype.filterSelf=function(e,t,n){ie(e)&&(n=t,t=e,e=[]);var a=n||this,i=Aa(rs(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?K(t,a):t),this},r.prototype.selectRange=function(e){var t=this,n={},a=Me(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){ie(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=Aa(rs(e),this._getStoreDimIndex,this),s=Yl(this);return s._store=this._store.map(o,i?K(t,i):t),s},r.prototype.modify=function(e,t,n,a){var i=this,o=n||a||this;Uf.NODE_ENV!=="production"&&A(rs(e),function(l){var u=i.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Aa(rs(e),this._getStoreDimIndex,this);this._store.modify(s,o?K(t,o):t)},r.prototype.downSample=function(e,t,n,a){var i=Yl(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.minmaxDownSample=function(e,t){var n=Yl(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=Yl(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 Ge(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Yn(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Wf(e,n)},function(n){return Wf(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||{},Ul(e)?F(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),G(i)?i=i.slice():Ul(i)&&(i=F({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Ul(t)?F(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Ul(e)?F(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?F(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;av(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:Aa(this.dimensions,this._getDimInfo,this),this.hostModel)),Rg(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];ie(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(Ld(arguments)))})},r.internalField=function(){ST=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 b$(o.categories.length);for(var l=0;l<n.length;l++)n[l]=wT;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Wl=function(e,t,n){return _t(e._getCategory(t,n),null)},Wf=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Wl(e,e._idDimIdx,t)),n==null&&(n=x$+t),n},rs=function(e){return G(e)||(e=e!=null?[e]:[]),e},Yl=function(e){var t=new r(e._schema?e._schema:Aa(e.dimensions,e._getDimInfo,e),e.hostModel);return Rg(t,e),t},Rg=function(e,t){A(w$.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,A(S$,function(n){e[n]=ce(t[n])}),e._calculationInfo=F({},t._calculationInfo)},Og=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=Wl(e,i,t)),l==null&&o!=null&&(a[t]=l=Wl(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),a[t]=l}}}(),r}();function Zl(r,e){Xv(r)||(r=Qv(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=te(),i=[],o=T$(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&xT(o),l=n===r.dimensionsDefine,u=l?bT(r):_T(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=te(c),h=new FS(o),d=0;d<h.length;d++)h[d]=-1;function p(C){var D=h[C];if(D<0){var M=n[C],k=oe(M)?M:{name:M},N=new Hf,L=k.name;L!=null&&u.get(L)!=null&&(N.name=N.displayName=L),k.type!=null&&(N.type=k.type),k.displayName!=null&&(N.displayName=k.displayName);var R=i.length;return h[C]=R,N.storeDimIndex=C,i.push(N),N}return i[D]}if(!s)for(var d=0;d<o;d++)p(d);f.each(function(C,D){var M=He(C).slice();if(M.length===1&&!X(M[0])&&M[0]<0){f.set(D,!1);return}var k=f.set(D,[]);A(M,function(N,L){var R=X(N)?u.get(N):N;R!=null&&R<o&&(k[L]=R,g(p(R),D,L))})});var v=0;A(t,function(C){var D,M,k,N;if(X(C))D=C,N={};else{N=C,D=N.name;var L=N.ordinalMeta;N.ordinalMeta=null,N=F({},N),N.ordinalMeta=L,M=N.dimsDef,k=N.otherDims,N.name=N.coordDim=N.coordDimIndex=N.dimsDef=N.otherDims=null}var R=f.get(D);if(R!==!1){if(R=He(R),!R.length)for(var I=0;I<(M&&M.length||1);I++){for(;v<o&&p(v).coordDim!=null;)v++;v<o&&R.push(v++)}A(R,function(O,P){var B=p(O);if(l&&N.type!=null&&(B.type=N.type),g(le(B,N),D,P),B.name==null&&M){var z=M[P];!oe(z)&&(z={name:z}),B.name=B.displayName=z.name,B.defaultTooltip=z.defaultTooltip}k&&le(B.otherDims,k)})}});function g(C,D,M){Vv.get(D)!=null?C.otherDims[D]=M:(C.coordDim=D,C.coordDimIndex=M,a.set(D,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var x=m||"value";function w(C){C.name==null&&(C.name=C.coordDim)}if(s)A(i,function(C){w(C)}),i.sort(function(C,D){return C.storeDimIndex-D.storeDimIndex});else for(var S=0;S<o;S++){var E=p(S),T=E.coordDim;T==null&&(E.coordDim=C$(x,a,_),E.coordDimIndex=0,(!m||y<=0)&&(E.isExtraCoord=!0),y--),w(E),E.type==null&&(nS(r,S)===Bt.Must||E.isExtraCoord&&(E.otherDims.itemName!=null||E.otherDims.seriesName!=null))&&(E.type="ordinal")}return E$(i),new mT({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function E$(r){for(var e=te(),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 T$(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return A(e,function(i){var o;oe(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function C$(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 Pg={},D$=function(){function r(e){this.coordSysDims=[],this.axisMap=te(),this.categoryAxisMap=te(),this.coordSysName=e}return r}();function A$(r){var e=r.get("coordinateSystem"),t=new D$(e),n=M$[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var M$={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",gt).models[0],i=r.getReferringComponents("yAxis",gt).models[0];if(Pg.NODE_ENV!=="production"){if(!a)throw new Error('xAxis "'+pt(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!i)throw new Error('yAxis "'+pt(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),ns(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),ns(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",gt).models[0];if(Pg.NODE_ENV!=="production"&&!a)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],t.set("single",a),ns(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",gt).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");if(Pg.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),ns(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),ns(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),c=o[l];t.set(c,u),ns(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function ns(r){return r.get("type")==="category"}function k$(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;N$(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(A(i,function(y,_){X(y)&&(i[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!a||a===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,v=0;A(i,function(y){y.coordDim===d&&v++});var g={name:f,coordDim:d,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:h,coordDim:h,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,p),m.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(i.push(g),i.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function N$(r){return!yT(r.schema)}function Ma(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function ET(r,e){return Ma(r,e)?r.getCalculationInfo("stackResultDimension"):e}function I$(r,e){var t=r.get("coordinateSystem"),n=Wo.get(t),a;return e&&e.coordSysDims&&(a=H(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Gf(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function L$(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 Zn(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=Qv(r)):(a=n.getSource(),i=a.sourceFormat===kr);var o=A$(e),s=I$(e,o),l=t.useEncodeDefaulter,u=ie(l)?l:l?me(rS,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=Zl(a,c),h=L$(f.dimensions,t.createInvertedIndices,o),d=i?null:n.getSharedDataStore(f),p=k$(e,{schema:f,store:d}),v=new Jt(f,e);v.setCalculationInfo(p);var g=h!=null&&R$(a)?function(m,y,_,x){return x===h?_:this.defaultDimValueGetter(m,y,_,x)}:null;return v.hasItemOption=!1,v.initData(i?a:d,null,g),v}function R$(r){if(r.sourceFormat===kr){var e=O$(r.data||[]);return!G(Eo(e))}}function O$(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var Sn=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}();Nc(Sn);var P$=0,Bg=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++P$}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&H(n,B$);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(!X(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=te(this.categories))},r}();function B$(r){return oe(r)&&r.value!=null?r.value:r+""}function V$(r){var e=Math.pow(10,Mc(Math.abs(r))),t=Math.abs(r/e);return t===0||t===1||t===2||t===3||t===5}function Vg(r){return r.type==="interval"||r.type==="log"}function z$(r,e,t,n){var a={},i=r[1]-r[0],o=a.interval=Xx(i/e);t!=null&&o<t&&(o=a.interval=t),n!=null&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=TT(o),l=a.niceTickExtent=[ct(Math.ceil(r[0]/o)*o,s),ct(Math.floor(r[1]/o)*o,s)];return F$(l,r),a}function zg(r){var e=Math.pow(10,Mc(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,ct(t*e)}function TT(r){return hn(r)+2}function CT(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function F$(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),CT(r,0,e),CT(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Yf(r,e){return r>=e[0]&&r<=e[1]}function Zf(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function qf(r,e){return r*(e[1]-e[0])+e[0]}var Xf=function(r){V(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new Bg({})),G(a)&&(a=new Bg({categories:H(a,function(i){return oe(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:X(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Yf(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Zf(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(qf(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 c=0;o<s;++o){for(;i[c]!=null;)c++;a.push(c),i[c]=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}(Sn);Sn.registerClass(Xf);var zi=ct,qn=function(r){V(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 Yf(t,this._extent)},e.prototype.normalize=function(t){return Zf(t,this._extent)},e.prototype.scale=function(t){return qf(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=TT(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:zi(i[0]-n,o)}):s.push({value:a[0]}));for(var u=i[0];u<=i[1]&&(s.push({value:u}),u=zi(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:i[1];return a[1]>c&&(t?s.push({value:zi(c+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,c=[],f=s.value-l.value,h=f/t;u<t-1;){var d=zi(l.value+(u+1)*h);d>i[0]&&d<i[1]&&c.push(d),u++}a.push(c)}return a},e.prototype.getLabel=function(t,n){if(t==null)return"";var a=n&&n.precision;a==null?a=hn(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=zi(t.value,a,!0);return Zw(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=z$(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]=zi(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=zi(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e}(Sn);Sn.registerClass(qn);var DT=typeof Float32Array<"u",$$=DT?Float32Array:Array;function En(r){return G(r)?DT?new Float32Array(r):r:new $$(r)}var Fg="__ec_stack_";function AT(r){return r.get("stack")||Fg+r.seriesIndex}function $g(r){return r.dim+r.index}function G$(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(le({bandWidth:a,axisKey:n,stackId:Fg+i},r));for(var o=NT(e),s=[],i=0;i<r.count;i++){var l=o[n][Fg+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function MT(r,e){var t=[];return e.eachSeriesByType(r,function(n){RT(n)&&t.push(n)}),t}function H$(r){var e={};A(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,d=f.getDimensionIndex(f.mapDimension(c.dim)),p=f.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(d,v);e[h]?e[h].push(m):e[h]=[m]}});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 kT(r){var e=H$(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],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=W(n.get("barWidth"),s),v=W(n.get("barMaxWidth"),s),g=W(n.get("barMinWidth")||(OT(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:$g(i),stackId:AT(n)})}),NT(t)}function NT(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 c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);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=Me(i).length;s=Math.max(35-l*4,15)+"%"}var u=W(s,o),c=W(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),A(i,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var x=m.width;y&&(x=Math.min(x,y)),_&&(x=Math.max(x,_)),m.width=x,f-=x+c*x,h--}else{var x=d;y&&y<x&&(x=Math.min(y,f)),_&&_>x&&(x=_),x!==d&&(m.width=x,f-=x+c*x,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var p=0,v;A(i,function(m,y){m.width||(m.width=d),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;A(i,function(m,y){t[a][y]=t[a][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),t}function U$(r,e,t){if(r&&e){var n=r[$g(e)];return n}}function IT(r,e){var t=MT(r,e),n=kT(t);A(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=AT(a),u=n[$g(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function LT(r){return{seriesType:r,plan:Xo(),reset:function(e){if(RT(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),c=t.getCalculationInfo("stackResultDimension"),f=Ma(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),d=W$(a,i),p=OT(e),v=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),m=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(_,x){for(var w=_.count,S=p&&En(w*3),E=p&&l&&En(w*3),T=p&&En(w),C=n.master.getRect(),D=h?C.width:C.height,M,k=x.getStore(),N=0;(M=_.next())!=null;){var L=k.get(f?g:o,M),R=k.get(s,M),I=d,O=void 0;f&&(O=+L-k.get(o,M));var P=void 0,B=void 0,z=void 0,$=void 0;if(h){var U=n.dataToPoint([L,R]);if(f){var j=n.dataToPoint([O,R]);I=j[0]}P=I,B=U[1]+y,z=U[0]-I,$=m,Math.abs(z)<v&&(z=(z<0?-1:1)*v)}else{var U=n.dataToPoint([R,L]);if(f){var j=n.dataToPoint([R,O]);I=j[1]}P=U[0]+y,B=I,z=m,$=U[1]-I,Math.abs($)<v&&($=($<=0?-1:1)*v)}p?(S[N]=P,S[N+1]=B,S[N+2]=h?z:$,E&&(E[N]=h?C.x:P,E[N+1]=h?B:C.y,E[N+2]=D),T[M]=M):x.setItemLayout(M,{x:P,y:B,width:z,height:$}),N+=3}p&&x.setLayout({largePoints:S,largeDataIndices:T,largeBackgroundPoints:E,valueAxisHorizontal:h})}}}}}}function RT(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function OT(r){return r.pipelineContext&&r.pipelineContext.large}function W$(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 Y$={},Z$=function(r,e,t,n){for(;t<n;){var a=t+n>>>1;r[a][1]<e?t=a+1:n=a}return t},Gg=function(r){V(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 ff(t.value,Bw[yF(Vo(this._minLevelUnit))]||Bw.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return _F(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=eG(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]-=Mr,n[1]+=Mr),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]-Mr}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=Kf.length,l=Math.min(Z$(Kf,this._approxInterval,0,s),s-1);this._interval=Kf[l][1],this._minLevelUnit=Kf[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Oe(t)?t:+dn(t)},e.prototype.contain=function(t){return Yf(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Zf(this.parse(t),this._extent)},e.prototype.scale=function(t){return qf(t,this._extent)},e.type="time",e}(qn),Kf=[["second",Nv],["minute",Iv],["hour",Sl],["quarter-day",Sl*6],["half-day",Sl*12],["day",Mr*1.2],["half-week",Mr*3.5],["week",Mr*7],["month",Mr*31],["quarter",Mr*95],["half-year",Pw/2],["year",Pw]];function q$(r,e,t,n){var a=dn(e),i=dn(t),o=function(p){return Fw(a,p,n)===Fw(i,p,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},d=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return d()}}function X$(r,e){return r/=Mr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function K$(r){var e=30*Mr;return r/=e,r>6?6:r>3?3:r>2?2:1}function Q$(r){return r/=Sl,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function PT(r,e){return r/=e?Iv:Nv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function j$(r){return Xx(r)}function J$(r,e,t){var n=new Date(r);switch(Vo(e)){case"year":case"month":n[$w(t)](0);case"day":n[Gw(t)](1);case"hour":n[Hw(t)](0);case"minute":n[Uw(t)](0);case"second":n[Ww(t)](0),n[Yw(t)](0)}return n.getTime()}function eG(r,e,t,n){var a=1e4,i=Vw,o=0;function s(D,M,k,N,L,R,I){for(var O=new Date(M),P=M,B=O[N]();P<k&&P<=n[1];)I.push({value:P}),B+=D,O[L](B),P=O.getTime();I.push({value:P,notAdd:!0})}function l(D,M,k){var N=[],L=!M.length;if(!q$(Vo(D),n[0],n[1],t)){L&&(M=[{value:J$(new Date(n[0]),D,t)},{value:n[1]}]);for(var R=0;R<M.length-1;R++){var I=M[R].value,O=M[R+1].value;if(I!==O){var P=void 0,B=void 0,z=void 0,$=!1;switch(D){case"year":P=Math.max(1,Math.round(e/Mr/365)),B=Rv(t),z=bF(t);break;case"half-year":case"quarter":case"month":P=K$(e),B=zo(t),z=$w(t);break;case"week":case"half-week":case"day":P=X$(e),B=hf(t),z=Gw(t),$=!0;break;case"half-day":case"quarter-day":case"hour":P=Q$(e),B=Tl(t),z=Hw(t);break;case"minute":P=PT(e,!0),B=df(t),z=Uw(t);break;case"second":P=PT(e,!1),B=pf(t),z=Ww(t);break;case"millisecond":P=j$(e),B=vf(t),z=Yw(t);break}s(P,I,O,B,z,$,N),D==="year"&&k.length>1&&R===0&&k.unshift({value:k[0].value-P})}}for(var R=0;R<N.length;R++)k.push(N[R]);return N}}for(var u=[],c=[],f=0,h=0,d=0;d<i.length&&o++<a;++d){var p=Vo(i[d]);if(mF(i[d])){l(i[d],u[u.length-1]||[],c);var v=i[d+1]?Vo(i[d+1]):null;if(p!==v){if(c.length){h=f,c.sort(function(D,M){return D.value-M.value});for(var g=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(g.push(c[m]),y>=n[0]&&y<=n[1]&&f++)}var _=(n[1]-n[0])/e;if(f>_*1.5&&h>_/1.5||(u.push(g),f>_||r===i[d]))break}c=[]}}}Y$.NODE_ENV!=="production"&&o>=a&&st("Exceed safe limit.");for(var x=ze(H(u,function(D){return ze(D,function(M){return M.value>=n[0]&&M.value<=n[1]&&!M.notAdd})}),function(D){return D.length>0}),w=[],S=x.length-1,d=0;d<x.length;++d)for(var E=x[d],T=0;T<E.length;++T)w.push({value:E[T].value,level:S-d});w.sort(function(D,M){return D.value-M.value});for(var C=[],d=0;d<w.length;++d)(d===0||w[d].value!==w[d-1].value)&&C.push(w[d]);return C}Sn.registerClass(Gg);var BT=Sn.prototype,ql=qn.prototype,tG=ct,rG=Math.floor,nG=Math.ceil,Qf=Math.pow,tn=Math.log,Hg=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new qn,t._interval=0,t}return e.prototype.getTicks=function(t){var n=this._originalScale,a=this._extent,i=n.getExtent(),o=ql.getTicks.call(this,t);return H(o,function(s){var l=s.value,u=ct(Qf(this.base,l));return u=l===a[0]&&this._fixMin?jf(u,i[0]):u,u=l===a[1]&&this._fixMax?jf(u,i[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,n){var a=tn(this.base);t=tn(Math.max(0,t))/a,n=tn(Math.max(0,n))/a,ql.setExtent.call(this,t,n)},e.prototype.getExtent=function(){var t=this.base,n=BT.getExtent.call(this);n[0]=Qf(t,n[0]),n[1]=Qf(t,n[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(n[0]=jf(n[0],i[0])),this._fixMax&&(n[1]=jf(n[1],i[1])),n},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=tn(t[0])/tn(n),t[1]=tn(t[1])/tn(n),BT.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=YB(a),o=t/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[ct(nG(n[0]/i)*i),ct(rG(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){ql.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=tn(t)/tn(this.base),Yf(t,this._extent)},e.prototype.normalize=function(t){return t=tn(t)/tn(this.base),Zf(t,this._extent)},e.prototype.scale=function(t){return t=qf(t,this._extent),Qf(this.base,t)},e.type="log",e}(Sn),VT=Hg.prototype;VT.getMinorTicks=ql.getMinorTicks,VT.getLabel=ql.getLabel;function jf(r,e){return tG(r,hn(e))}Sn.registerClass(Hg);var Ug={},aG=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;ie(o)?this._modelMinNum=Jf(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Jf(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(ie(s)?this._modelMaxNum=Jf(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Jf(e,s)),a)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=G(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(Ug.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=[Zr(u[0],1),Zr(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,c=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=qa(s)||qa(l)||e&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){Ug.NODE_ENV!=="production"&&se(!this.frozen),this[oG[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=iG[e];Ug.NODE_ENV!=="production"&&se(!this.frozen&&this[n]==null),this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),iG={min:"_determinedMin",max:"_determinedMax"},oG={min:"_dataMin",max:"_dataMax"};function zT(r,e,t){var n=r.rawExtentInfo;return n||(n=new aG(r,e,t),r.rawExtentInfo=n,n)}function Jf(r,e){return e==null?null:qa(e)?NaN:r.parse(e)}function FT(r,e){var t=r.type,n=zT(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=MT("bar",o),l=!1;if(A(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=kT(s),c=sG(a,i,e,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function sG(r,e,t,n){var a=t.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=U$(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;A(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;A(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/i,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function as(r,e){var t=e,n=FT(r,t),a=n.extent,i=t.get("splitNumber");r instanceof Hg&&(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 eh(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Xf({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Gg({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Sn.getClass(e)||qn)}}function lG(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function is(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):X(e)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i??"");return o}}(e):ie(e)?function(n){return function(a,i){return t!=null&&(i=a.value-t),n(Wg(r,a),i,a.level!=null?{level:a.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function Wg(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function uG(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,a,i=t.getExtent();t instanceof Xf?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=is(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var c=0;c<a;c+=u){var f=n?n[c]:{value:i[0]+c},h=s(f,c),d=o.getTextRect(h),p=cG(d,o.get("rotate")||0);l?l.union(p):l=p}return l}}function cG(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 xe(r.x,r.y,i,o);return s}function Yg(r){var e=r.get("interval");return e??"auto"}function $T(r){return r.type==="category"&&Yg(r.getLabelModel())===0}function th(r,e){var t={};return A(r.mapDimensionsAll(e),function(n){t[ET(r,n)]=!0}),Me(t)}function fG(r,e,t){e&&A(th(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 Xl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),hG=1e-8;function GT(r,e){return Math.abs(r-e)<hG}function Fi(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+=zn(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!GT(a[0],s[0])||!GT(a[1],s[1]))&&(n+=zn(a[0],a[1],s[0],s[1],e,t)),n!==0}var dG=[];function Zg(r,e){for(var t=0;t<r.length;t++)Lt(r[t],r[t],e)}function HT(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])&&(oa(e,e,i),sa(t,t,i))}}function pG(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],c=i*u-l*o;e+=c,t+=(i+l)*c,n+=(o+u)*c,i=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var UT=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}(),WT=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),YT=function(){function r(e){this.type="linestring",this.points=e}return r}(),ZT=function(r){V(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 pG(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"?HT(s.exterior,a,i,t):A(s.points,function(l){HT(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 xe(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;e: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(Fi(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Fi(u[c],t[0],t[1]))continue e;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 xe(t,n,a,i),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(Zg(h.exterior,u),A(h.interiors,function(d){Zg(d,u)})):A(h.points,function(d){Zg(d,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}(UT),vG=function(r){V(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=ac(dG),o=t;o&&!o.isGeoSVGGraphicRoot;)Ln(i,o.getLocalTransform(),i),o=o.parent;return go(i,i),Lt(a,a,i),a},e}(UT);function gG(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=qT(s,o,t);break;case"Polygon":qg(s,o,t);break;case"MultiLineString":qg(s,o,t);break;case"MultiPolygon":A(s,function(l,u){return qg(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function qg(r,e,t){for(var n=0;n<r.length;n++)r[n]=qT(r[n],e[n],t)}function qT(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 mG(r,e){return r=gG(r),H(ze(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 WT(o[0],o.slice(1)));break;case"MultiPolygon":A(a.coordinates,function(l){l[0]&&i.push(new WT(l[0],l.slice(1)))});break;case"LineString":i.push(new YT([a.coordinates]));break;case"MultiLineString":i.push(new YT(a.coordinates))}var s=new ZT(n[e||"name"],i,n.cp);return s.properties=n,s})}var Kl=Ne();function XT(r,e){var t=H(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 yG(r){var e=r.getLabelModel().get("customValues");if(e){var t=is(r),n=r.scale.getExtent(),a=XT(r,e),i=ze(a,function(o){return o>=n[0]&&o<=n[1]});return{labels:H(i,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?bG(r):wG(r)}function _G(r,e){var t=r.getTickModel().get("customValues");if(t){var n=r.scale.getExtent(),a=XT(r,t);return{ticks:ze(a,function(i){return i>=n[0]&&i<=n[1]})}}return r.type==="category"?xG(r,e):{ticks:H(r.scale.getTicks(),function(i){return i.value})}}function bG(r){var e=r.getLabelModel(),t=KT(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function KT(r,e){var t=QT(r,"labels"),n=Yg(e),a=jT(t,n);if(a)return a;var i,o;return ie(n)?i=tC(r,n):(o=n==="auto"?SG(r):n,i=eC(r,o)),JT(t,n,{labels:i,labelCategoryInterval:o})}function xG(r,e){var t=QT(r,"ticks"),n=Yg(e),a=jT(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),ie(n))i=tC(r,n,!0);else if(n==="auto"){var s=KT(r,r.getLabelModel());o=s.labelCategoryInterval,i=H(s.labels,function(l){return l.tickValue})}else o=n,i=eC(r,o,!0);return JT(t,n,{ticks:i,tickCategoryInterval:o})}function wG(r){var e=r.scale.getTicks(),t=is(r);return{labels:H(e,function(n,a){return{level:n.level,formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function QT(r,e){return Kl(r)[e]||(Kl(r)[e]=[])}function jT(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function JT(r,e,t){return r.push({key:e,value:t}),t}function SG(r){var e=Kl(r).autoInterval;return e??(Kl(r).autoInterval=r.calculateCategoryInterval())}function EG(r){var e=TG(r),t=is(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),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),h=0,d=0;l<=i[1];l+=s){var p=0,v=0,g=el(t({value:l}),e.font,"center","top");p=g.width*1.3,v=g.height*1.3,h=Math.max(h,p,7),d=Math.max(d,v,7)}var m=h/c,y=d/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=Kl(r.model),w=r.getExtent(),S=x.lastAutoInterval,E=x.lastTickCount;return S!=null&&E!=null&&Math.abs(S-_)<=1&&Math.abs(E-o)<=1&&S>_&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?_=S:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtent0=w[0],x.axisExtent1=w[1]),_}function TG(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 eC(r,e,t){var n=is(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=$T(r),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==i[0]&&v(i[0]);for(var p=u;p<=i[1];p+=l)v(p);d&&p-l!==i[1]&&v(i[1]);function v(g){var m={value:g};s.push(t?g:{formattedLabel:n(m),rawLabel:a.getLabel(m),tickValue:g})}return s}function tC(r,e,t){var n=r.scale,a=is(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 rC=[0,1],rn=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 Yx(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(),nC(n,a.count())),$e(e,rC,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),nC(n,a.count()));var i=$e(e,n,rC,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=_G(this,t),a=n.ticks,i=H(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return CG(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=H(n,function(i){return H(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return yG(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 EG(this)},r}();function nC(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function CG(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(d){d.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s,tickValue:c[1]+1},e.push(o)}var f=i[0]>i[1];h(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&h(i[0],e[0].coord)&&e.unshift({coord:i[0]}),h(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&h(o.coord,i[1])&&e.push({coord:i[1]});function h(d,p){return d=ct(d),p=ct(p),f?d>p:d<p}}var Ql=Math.PI*2,$i=yn.CMD,DG=["top","right","bottom","left"];function AG(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 MG(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 c=o*t+r,f=s*t+e;if(Math.abs(n-a)%Ql<1e-4)return l[0]=c,l[1]=f,u-t;if(i){var h=n;n=pr(a),a=pr(h)}else n=pr(n),a=pr(a);n>a&&(a+=Ql);var d=Math.atan2(s,o);if(d<0&&(d+=Ql),d>=n&&d<=a||d+Ql>=n&&d+Ql<=a)return l[0]=c,l[1]=f,u-t;var p=t*Math.cos(n)+r,v=t*Math.sin(n)+e,g=t*Math.cos(a)+r,m=t*Math.sin(a)+e,y=(p-o)*(p-o)+(v-s)*(v-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=p,l[1]=v,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function rh(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,c=t-r,f=n-e,h=Math.sqrt(c*c+f*f);c/=h,f/=h;var d=l*c+u*f,p=d/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var v=o[0]=r+p*c,g=o[1]=e+p*f;return Math.sqrt((v-a)*(v-a)+(g-i)*(g-i))}function aC(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),c=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(c-i)*(c-i))}var nn=[];function kG(r,e,t){var n=aC(e.x,e.y,e.width,e.height,r.x,r.y,nn);return t.set(nn[0],nn[1]),n}function NG(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,c=e.data,f=r.x,h=r.y,d=0;d<c.length;){var p=c[d++];d===1&&(n=c[d],a=c[d+1],i=n,o=a);var v=u;switch(p){case $i.M:i=c[d++],o=c[d++],n=i,a=o;break;case $i.L:v=rh(n,a,c[d],c[d+1],f,h,nn,!0),n=c[d++],a=c[d++];break;case $i.C:v=vx(n,a,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],f,h,nn),n=c[d++],a=c[d++];break;case $i.Q:v=mx(n,a,c[d++],c[d++],c[d],c[d+1],f,h,nn),n=c[d++],a=c[d++];break;case $i.A:var g=c[d++],m=c[d++],y=c[d++],_=c[d++],x=c[d++],w=c[d++];d+=1;var S=!!(1-c[d++]);s=Math.cos(x)*y+g,l=Math.sin(x)*_+m,d<=1&&(i=s,o=l);var E=(f-g)*_/y+g;v=MG(g,m,_,x,x+w,S,E,h,nn),n=Math.cos(x+w)*y+g,a=Math.sin(x+w)*_+m;break;case $i.R:i=n=c[d++],o=a=c[d++];var T=c[d++],C=c[d++];v=aC(i,o,T,C,f,h,nn);break;case $i.Z:v=rh(n,a,i,o,f,h,nn,!0),n=i,a=o;break}v<u&&(u=v,t.set(nn[0],nn[1]))}return u}var an=new be,Qe=new be,ht=new be,Tn=new be,Cn=new be;function iC(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||DG,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,c=r.getComputedTransform(),f=c&&go([],c),h=e.get("length2")||0;u&&ht.copy(u);for(var d=0;d<o.length;d++){var p=o[d];AG(p,0,s,an,Tn),be.scaleAndAdd(Qe,an,Tn,h),Qe.transform(f);var v=r.getBoundingRect(),g=u?u.distance(Qe):r instanceof De?NG(Qe,r.path,ht):kG(Qe,v,ht);g<l&&(l=g,Qe.transform(c),ht.transform(c),ht.toArray(i[0]),Qe.toArray(i[1]),an.toArray(i[2]))}oC(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var nh=[],er=new be;function oC(r,e){if(e<=180&&e>0){e=e/180*Math.PI,an.fromArray(r[0]),Qe.fromArray(r[1]),ht.fromArray(r[2]),be.sub(Tn,an,Qe),be.sub(Cn,ht,Qe);var t=Tn.len(),n=Cn.len();if(!(t<.001||n<.001)){Tn.scale(1/t),Cn.scale(1/n);var a=Tn.dot(Cn),i=Math.cos(e);if(i<a){var o=rh(Qe.x,Qe.y,ht.x,ht.y,an.x,an.y,nh,!1);er.fromArray(nh),er.scaleAndAdd(Cn,o/Math.tan(Math.PI-e));var s=ht.x!==Qe.x?(er.x-Qe.x)/(ht.x-Qe.x):(er.y-Qe.y)/(ht.y-Qe.y);if(isNaN(s))return;s<0?be.copy(er,Qe):s>1&&be.copy(er,ht),er.toArray(r[1])}}}}function IG(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,an.fromArray(r[0]),Qe.fromArray(r[1]),ht.fromArray(r[2]),be.sub(Tn,Qe,an),be.sub(Cn,ht,Qe);var n=Tn.len(),a=Cn.len();if(!(n<.001||a<.001)){Tn.scale(1/n),Cn.scale(1/a);var i=Tn.dot(e),o=Math.cos(t);if(i<o){var s=rh(Qe.x,Qe.y,ht.x,ht.y,an.x,an.y,nh,!1);er.fromArray(nh);var l=Math.PI/2,u=Math.acos(Cn.dot(e)),c=l+u-t;if(c>=l)be.copy(er,ht);else{er.scaleAndAdd(Cn,s/Math.tan(Math.PI/2-c));var f=ht.x!==Qe.x?(er.x-Qe.x)/(ht.x-Qe.x):(er.y-Qe.y)/(ht.y-Qe.y);if(isNaN(f))return;f<0?be.copy(er,Qe):f>1&&be.copy(er,ht)}er.toArray(r[1])}}}}function Xg(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 LG(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=ia(n[0],n[1]),i=ia(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=nc([],n[1],n[0],o/a),l=nc([],n[1],n[2],o/i),u=nc([],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 c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function Kg(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<cl.length;l++){var u=cl[l],c=e[u],f=u==="normal";if(c){var h=c.get("show"),d=f?s:pe(a.states[u]&&a.states[u].ignore,s);if(d||!pe(h,o)){var p=f?n:n&&n.states[u];p&&(p.ignore=!0),n&&Xg(n,!0,u,c);continue}n||(n=new jt,r.setTextGuideLine(n),!f&&(s||!o)&&Xg(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),Xg(n,!1,u,c)}}if(n){le(n.style,t),n.style.fill=null;var v=i.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=v||!1,n.buildPath=LG}}function Qg(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<Xt.length;n++){var a=Xt[n];t[a]=r.getModel([a,e])}return t}function sC(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 c=s?new jc(o,i):null;e.push({label:a,labelLine:n.labelLine,rect:u,localRect:o,obb:c,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:i})}}return e}function lC(r,e,t,n,a,i){var o=r.length;if(o<2)return;r.sort(function(S,E){return S.rect[e]-E.rect[e]});for(var s=0,l,u=!1,c=0;c<o;c++){var f=r[c],h=f.rect;l=h[e]-s,l<0&&(h[e]-=l,f.label[e]-=l,u=!0),s=h[e]+h[t]}var d=r[0],p=r[o-1],v,g;m(),v<0&&x(-v,.8),g<0&&x(g,.8),m(),y(v,g,1),y(g,v,-1),m(),v<0&&w(-v),g<0&&w(g);function m(){v=d.rect[e]-n,g=a-p.rect[e]-p.rect[t]}function y(S,E,T){if(S<0){var C=Math.min(E,-S);if(C>0){_(C*T,0,o);var D=C+S;D<0&&x(-D*T,1)}else x(-S*T,1)}}function _(S,E,T){S!==0&&(u=!0);for(var C=E;C<T;C++){var D=r[C],M=D.rect;M[e]+=S,D.label[e]+=S}}function x(S,E){for(var T=[],C=0,D=1;D<o;D++){var M=r[D-1].rect,k=Math.max(r[D].rect[e]-M[e]-M[t],0);T.push(k),C+=k}if(C){var N=Math.min(Math.abs(S)/C,E);if(S>0)for(var D=0;D<o-1;D++){var L=T[D]*N;_(L,0,D+1)}else for(var D=o-1;D>0;D--){var L=T[D-1]*N;_(-L,D,o)}}}function w(S){var E=S<0?-1:1;S=Math.abs(S);for(var T=Math.ceil(S/(o-1)),C=0;C<o-1;C++)if(E>0?_(T,0,C+1):_(-T,o-C-1,o),S-=T,S<=0)return}return u}function RG(r,e,t,n){return lC(r,"x","width",e,t)}function uC(r,e,t,n){return lC(r,"y","height",e,t)}function cC(r){var e=[];r.sort(function(v,g){return g.priority-v.priority});var t=new xe(0,0,0,0);function n(v){if(!v.ignore){var g=v.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}v.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,c=i.labelLine;t.copy(i.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var f=i.obb,h=!1,d=0;d<e.length;d++){var p=e[d];if(t.intersect(p.rect)){if(o&&p.axisAligned){h=!0;break}if(p.obb||(p.obb=new jc(p.localRect,p.transform)),f||(f=new jc(s,l)),f.intersect(p.obb)){h=!0;break}}}h?(n(u),c&&n(c)):(u.attr("ignore",i.defaultAttr.ignore),c&&c.attr("ignore",i.defaultAttr.labelGuideIgnore),e.push(i))}}function OG(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function PG(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:OG(n&&n.shape.points)}}var fC=["align","verticalAlign","width","height","fontSize"],tr=new Pn,jg=Ne(),BG=Ne();function ah(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var ih=["x","y","rotation"],VG=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(),c=a.getBoundingRect().plain();xe.applyTransform(c,c,u),u?tr.setLocalTransform(u):(tr.x=tr.y=tr.rotation=tr.originX=tr.originY=0,tr.scaleX=tr.scaleY=1),tr.rotation=pr(tr.rotation);var f=a.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var d=f.getComputedTransform();xe.applyTransform(h,h,d)}var p=h&&f.getTextGuideLine();this._labelList.push({label:a,labelLine:p,seriesModel:n,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:p&&p.ignore,x:tr.x,y:tr.y,scaleX:tr.scaleX,scaleY:tr.scaleY,rotation:tr.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");(ie(a)||Me(a).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=ve(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(_,x){return function(){iC(_,x)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;ie(o.layoutOption)?c=o.layoutOption(PG(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=W(c.x,t),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=W(c.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),h=!1)}var p=jg(s);p.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var v=0;v<fC.length;v++){var g=fC[v];s.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",a(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),a=sC(this._labelList),i=ze(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=ze(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});RG(i,0,t),uC(o,0,n);var s=ze(a,function(l){return l.layoutOption.hideOverlap});cC(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=jg(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),i&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),a=ve(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 c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");Kg(e,Qg(s),l),iC(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&&!Lo(e))){var i=jg(n),o=i.oldLayout,s=ve(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(we(h,"select")>=0&&n.attr(i.oldLayoutSelect),we(h,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),Ve(n,u,t,l)}else if(n.attr(u),!Oo(n).valueAnimation){var f=pe(n.style.opacity,1);n.style.opacity=0,tt(n,{style:{opacity:f}},t,l)}if(i.oldLayout=u,n.states.select){var d=i.oldLayoutSelect={};ah(d,u,ih),ah(d,n.states.select,ih)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};ah(p,u,ih),ah(p,n.states.emphasis,ih)}Nw(n,l,c,t,t)}if(a&&!a.ignore&&!a.invisible){var i=BG(a),o=i.oldLayout,v={points:a.shape.points};o?(a.attr({shape:o}),Ve(a,{shape:v},t)):(a.setShape(v),a.style.strokePercent=0,tt(a,{style:{strokePercent:1}},t)),i.oldLayout=v}},r}(),Jg=Ne();function zG(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=Jg(t).labelManager;a||(a=Jg(t).labelManager=new VG),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=Jg(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var em=Math.sin,tm=Math.cos,hC=Math.PI,Gi=Math.PI*2,FG=180/hC,dC=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,c=!l,f=Math.abs(u),h=ha(f-Gi)||(c?u>=Gi:-u>=Gi),d=u>0?u%Gi:u%Gi+Gi,p=!1;h?p=!0:ha(f)?p=!1:p=d>=hC==!!c;var v=e+n*tm(o),g=t+a*em(o);this._start&&this._add("M",v,g);var m=Math.round(i*FG);if(h){var y=1/this._p,_=(c?1:-1)*(Gi-y);this._add("A",n,a,m,1,+c,e+n*tm(o+_),t+a*em(o+_)),y>.01&&this._add("A",n,a,m,0,+c,v,g)}else{var x=e+n*tm(s),w=t+a*em(s);this._add("A",n,a,m,+p,+c,x,w)}},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 c=[],f=this._p,h=1;h<arguments.length;h++){var d=arguments[h];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*f)/f)}this._d.push(e+c.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}(),rm="none",$G=Math.round;function GG(r){var e=r.fill;return e!=null&&e!==rm}function HG(r){var e=r.stroke;return e!=null&&e!==rm}var nm=["lineCap","miterLimit","lineJoin"],UG=H(nm,function(r){return"stroke-"+r.toLowerCase()});function WG(r,e,t,n){var a=e.opacity==null?1:e.opacity;if(t instanceof It){r("opacity",a);return}if(GG(e)){var i=Ks(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",rm);if(HG(e)){var s=Ks(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=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"),c<1&&r("stroke-opacity",c),e.lineDash){var h=pg(t),d=h[0],p=h[1];d&&(p=$G(p||0),r("stroke-dasharray",d.join(",")),(p||n)&&r("stroke-dashoffset",p))}for(var v=0;v<nm.length;v++){var g=nm[v];if(e[g]!==Vc[g]){var m=e[g]||Vc[g];m&&r(UG[v],m)}}}}var pC="http://www.w3.org/2000/svg",vC="http://www.w3.org/1999/xlink",YG="http://www.w3.org/2000/xmlns/",ZG="http://www.w3.org/XML/1998/namespace",gC="ecmeta_";function mC(r){return document.createElementNS(pC,r)}function Dt(r,e,t,n,a){return{tag:r,attrs:t||{},children:n,text:a,key:e}}function qG(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 XG(r){return"</"+r+">"}function am(r,e){e=e||{};var t=e.newline?`
|
|
212
|
+
`:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return qG(o,s)+(o!=="style"?Yt(l):l||"")+(i?""+t+H(i,function(u){return n(u)}).join(t)+t:"")+XG(o)}return n(r)}function KG(r,e,t){t=t||{};var n=t.newline?`
|
|
213
|
+
`:"",a=" {"+n,i=n+"}",o=H(Me(r),function(l){return l+a+H(Me(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=H(Me(e),function(l){return"@keyframes "+l+a+H(Me(e[l]),function(u){return u+a+H(Me(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function im(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function yC(r,e,t,n){return Dt("svg","root",{width:r,height:e,xmlns:pC,"xmlns:xlink":vC,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var QG=0;function _C(){return QG++}var bC={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"},Hi="transform-origin";function jG(r,e,t){var n=F({},r.shape);F(n,e),r.buildPath(t,n);var a=new dC;return a.reset(Dx(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function JG(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[Hi]=t+"px "+n+"px")}var e4={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function xC(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function t4(r,e,t){var n=r.shape.paths,a={},i,o;if(A(n,function(l){var u=im(t.zrId);u.animation=!0,oh(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=Me(c),d=h.length;if(d){o=h[d-1];var p=c[o];for(var v in p){var g=p[v];a[v]=a[v]||{d:""},a[v].d+=g.d||""}for(var m in f){var y=f[m].animation;y.indexOf(o)>=0&&(i=y)}}}),!!i){e.d=!1;var s=xC(a,t);return i.replace(o,s)}}function wC(r){return X(r)?bC[r]?"cubic-bezier("+bC[r]+")":ep(r)?r:"":""}function oh(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof _v){var s=t4(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 c=a[u],f=[c.getMaxTime()/1e3+"s"],h=wC(c.getClip().easing),d=c.getDelay();h?f.push(h):f.push("linear"),d&&f.push(d/1e3+"s"),c.getLoop()&&f.push("infinite");var p=f.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var _=y[1],x=_.length,w={},S={},E={},T="animation-timing-function";function C(re,J,ue){for(var q=re.getTracks(),ae=re.getMaxTime(),Y=0;Y<q.length;Y++){var ye=q[Y];if(ye.needsAnimate()){var Se=ye.keyframes,Be=ye.propName;if(ue&&(Be=ue(Be)),Be)for(var Ye=0;Ye<Se.length;Ye++){var de=Se[Ye],ut=Math.round(de.time/ae*100)+"%",je=wC(de.easing),ke=de.rawValue;(X(ke)||Oe(ke))&&(J[ut]=J[ut]||{},J[ut][Be]=de.rawValue,je&&(J[ut][T]=je))}}}}for(var D=0;D<x;D++){var M=_[D],k=M.targetName;k?k==="shape"&&C(M,S):!n&&C(M,w)}for(var N in w){var L={};zx(L,r),F(L,w[N]);var R=Ax(L),I=w[N][T];E[N]=R?{transform:R}:{},JG(E[N],L),I&&(E[N][T]=I)}var O,P=!0;for(var N in S){E[N]=E[N]||{};var B=!O,I=S[N][T];B&&(O=new yn);var z=O.len();O.reset(),E[N].d=jG(r,S[N],O);var $=O.len();if(!B&&z!==$){P=!1;break}I&&(E[N][T]=I)}if(!P)for(var N in E)delete E[N].d;if(!n)for(var D=0;D<x;D++){var M=_[D],k=M.targetName;k==="style"&&C(M,E,function(q){return e4[q]})}for(var U=Me(E),j=!0,Z,D=1;D<U.length;D++){var ee=U[D-1],he=U[D];if(E[ee][Hi]!==E[he][Hi]){j=!1;break}Z=E[ee][Hi]}if(j&&Z){for(var N in E)E[N][Hi]&&delete E[N][Hi];e[Hi]=Z}if(ze(U,function(re){return Me(E[re]).length>0}).length){var Ee=xC(E,t);return Ee+" "+y[0]+" both"}}for(var g in l){var s=v(l[g]);s&&o.push(s)}if(o.length){var m=t.zrId+"-cls-"+_C();t.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function r4(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};SC(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=sp(l))}var u=a.lineWidth;if(u){var c=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),SC(n,e,t)}}function SC(r,e,t,n){var a=JSON.stringify(r),i=t.cssStyleCache[a];i||(i=t.zrId+"-cls-"+_C(),t.cssStyleCache[a]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var n4={},jl=Math.round;function EC(r){return r&&X(r.src)}function TC(r){return r&&ie(r.toDataURL)}function om(r,e,t,n){WG(function(a,i){var o=a==="fill"||a==="stroke";o&&Cx(i)?NC(e,r,a,n):o&&up(i)?IC(t,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),c4(t,r,n)}function sm(r,e){var t=zB(e);t&&(t.each(function(n,a){n!=null&&(r[(gC+a).toLowerCase()]=n+"")}),e.isSilent()&&(r[gC+"silent"]="true"))}function CC(r){return ha(r[0]-1)&&ha(r[1])&&ha(r[2])&&ha(r[3]-1)}function a4(r){return ha(r[4])&&ha(r[5])}function lm(r,e,t){if(e&&!(a4(e)&&CC(e))){var n=1e4;r.transform=CC(e)?"translate("+jl(e[4]*n)/n+" "+jl(e[5]*n)/n+")":iB(e)}}function DC(r,e,t){for(var n=r.points,a=[],i=0;i<n.length;i++)a.push(jl(n[i][0]*t)/t),a.push(jl(n[i][1]*t)/t);e.points=a.join(" ")}function AC(r){return!r.smooth}function i4(r){var e=H(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]]=jl(s*a)/a)}}}var o4={circle:[i4(["cx","cy","r"])],polyline:[DC,AC],polygon:[DC,AC]};function s4(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function MC(r,e){var t=r.style,n=r.shape,a=o4[r.type],i={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&Dx(r)||4;if(a&&!e.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&s4(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);a[0](n,i,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var h=r.path;f&&(h.beginPath(),r.buildPath(h,r.shape),r.pathUpdated());var d=h.getVersion(),p=r,v=p.__svgPathBuilder;(p.__svgPathVersion!==d||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new dC),v.reset(u),h.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),i.d=v.getStr()}return lm(i,r.transform),om(i,t,r,e),sm(i,r),e.animation&&oh(r,i,e),e.emphasis&&r4(r,i,e),Dt(s,r.id+"",i)}function l4(r,e){var t=r.style,n=t.image;if(n&&!X(n)&&(EC(n)?n=n.src:TC(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),lm(l,r.transform),om(l,t,r,e),sm(l,r),e.animation&&oh(r,l,e),Dt("image",r.id+"",l)}}function u4(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var a=t.font||na,i=t.x||0,o=sB(t.y||0,Cc(a),t.textBaseline),s=oB[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(I1(t)){var u="",c=t.fontStyle,f=k1(t.fontSize);if(!parseFloat(f))return;var h=t.fontFamily||Bb,d=t.fontWeight;u+="font-size:"+f+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+a;return n.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),lm(l,r.transform),om(l,t,r,e),sm(l,r),e.animation&&oh(r,l,e),Dt("text",r.id+"",l,void 0,n)}}function kC(r,e){if(r instanceof De)return MC(r,e);if(r instanceof It)return l4(r,e);if(r instanceof Co)return u4(r,e)}function c4(r,e,t){var n=r.style;if(lB(n)){var a=uB(r),i=t.shadowCache,o=i[a];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,h=n.shadowBlur,d=Ks(n.shadowColor),p=d.opacity,v=d.color,g=h/2/l,m=h/2/u,y=g+" "+m;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=Dt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Dt("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),i[a]=o}e.filter=yc(o)}}function NC(r,e,t,n){var a=r[t],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(Ex(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(Tx(a))i="radialGradient",o.cx=pe(a.x,.5),o.cy=pe(a.y,.5),o.r=pe(a.r,.5);else{n4.NODE_ENV!=="production"&&Hr("Illegal gradient type.");return}for(var s=a.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=lp(s[u].offset)*100+"%",h=s[u].color,d=Ks(h),p=d.color,v=d.opacity,g={offset:f};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(Dt("stop",u+"",g))}var m=Dt(i,"",o,l),y=am(m),_=n.gradientCache,x=_[y];x||(x=n.zrId+"-g"+n.gradientIdx++,_[y]=x,o.id=x,n.defs[x]=Dt(i,x,o,l)),e[t]=yc(x)}function IC(r,e,t,n){var a=r.style[t],i=r.getBoundingRect(),o={},s=a.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(Sx(a)){var h=a.imageWidth,d=a.imageHeight,p=void 0,v=a.image;if(X(v)?p=v:EC(v)?p=v.src:TC(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";se(h,g),se(d,g)}else if(h==null||d==null){var m=function(D,M){if(D){var k=D.elm,N=h||M.width,L=d||M.height;D.tag==="pattern"&&(u?(L=1,N/=i.width):c&&(N=1,L/=i.height)),D.attrs.width=N,D.attrs.height=L,k&&(k.setAttribute("width",N),k.setAttribute("height",L))}},y=Gp(p,null,r,function(D){l||m(S,D),m(f,D)});y&&y.width&&y.height&&(h=h||y.width,d=d||y.height)}f=Dt("image","img",{href:p,width:h,height:d}),o.width=h,o.height=d}else a.svgElement&&(f=ce(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(f){var _,x;l?_=x=1:u?(x=1,_=o.width/i.width):c?(_=1,x=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var w=Ax(a);w&&(o.patternTransform=w);var S=Dt("pattern","",o,[f]),E=am(S),T=n.patternCache,C=T[E];C||(C=n.zrId+"-p"+n.patternIdx++,T[E]=C,o.id=C,S=n.defs[C]=Dt("pattern",C,o,[f])),e[t]=yc(C)}}function f4(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]=Dt("clipPath",i,o,[MC(r,t)])}e["clip-path"]=yc(i)}function LC(r){return document.createTextNode(r)}function Ui(r,e,t){r.insertBefore(e,t)}function RC(r,e){r.removeChild(e)}function OC(r,e){r.appendChild(e)}function PC(r){return r.parentNode}function BC(r){return r.nextSibling}function um(r,e){r.textContent=e}var h4={},VC=58,d4=120,p4=Dt("","");function cm(r){return r===void 0}function Dn(r){return r!==void 0}function v4(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(h4.NODE_ENV!=="production"&&n[i]!=null&&console.error("Duplicate key "+i),n[i]=a)}return n}function Jl(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function eu(r){var e,t=r.children,n=r.tag;if(Dn(n)){var a=r.elm=mC(n);if(fm(p4,r),G(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&OC(a,eu(i))}else Dn(r.text)&&!oe(r.text)&&OC(a,LC(r.text))}else r.elm=LC(r.text);return r.elm}function zC(r,e,t,n,a){for(;n<=a;++n){var i=t[n];i!=null&&Ui(r,eu(i),e)}}function sh(r,e,t,n){for(;t<=n;++t){var a=e[t];if(a!=null)if(Dn(a.tag)){var i=PC(a.elm);RC(i,a.elm)}else RC(r,a.elm)}}function fm(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)!==d4?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(YG,t,o):t.charCodeAt(3)===VC?n.setAttributeNS(ZG,t,o):t.charCodeAt(5)===VC?n.setAttributeNS(vC,t,o):n.setAttribute(t,o))}for(t in a)t in i||n.removeAttribute(t)}}function g4(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],c=t[l],f,h,d,p;n<=i&&a<=l;)o==null?o=e[++n]:s==null?s=e[--i]:u==null?u=t[++a]:c==null?c=t[--l]:Jl(o,u)?(os(o,u),o=e[++n],u=t[++a]):Jl(s,c)?(os(s,c),s=e[--i],c=t[--l]):Jl(o,c)?(os(o,c),Ui(r,o.elm,BC(s.elm)),o=e[++n],c=t[--l]):Jl(s,u)?(os(s,u),Ui(r,s.elm,o.elm),s=e[--i],u=t[++a]):(cm(f)&&(f=v4(e,n,i)),h=f[u.key],cm(h)?Ui(r,eu(u),o.elm):(d=e[h],d.tag!==u.tag?Ui(r,eu(u),o.elm):(os(d,u),e[h]=void 0,Ui(r,d.elm,o.elm))),u=t[++a]);(n<=i||a<=l)&&(n>i?(p=t[l+1]==null?null:t[l+1].elm,zC(r,p,t,a,l)):sh(r,e,n,i))}function os(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(fm(r,e),cm(e.text)?Dn(n)&&Dn(a)?n!==a&&g4(t,n,a):Dn(a)?(Dn(r.text)&&um(t,""),zC(t,null,a,0,a.length-1)):Dn(n)?sh(t,n,0,n.length-1):Dn(r.text)&&um(t,""):r.text!==e.text&&(Dn(n)&&sh(t,n,0,n.length-1),um(t,e.text)))}function m4(r,e){if(Jl(r,e))os(r,e);else{var t=r.elm,n=PC(t);eu(e),n!==null&&(Ui(n,e.elm,BC(t)),sh(n,[r],0,0))}return e}var y4={},_4=0,b4=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=FC("refreshHover"),this.configLayer=FC("configLayer"),this.storage=t,this._opts=n=F({},n),this.root=e,this._id="zr"+_4++,this._oldVNode=yC(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=mC("svg");fm(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",m4(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return kC(e,im(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=im(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=x4(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=Dt("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=H(Me(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(Dt("defs","defs",{},u)),e.animation){var c=KG(i.cssNodes,i.cssAnims,{newline:!0});if(c){var f=Dt("style","stl",{},[],c);o.push(f)}}return yC(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},am(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(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,c=0;c<a;c++){var f=e[c];if(!f.invisible){var h=f.__clipPaths,d=h&&h.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(d-1,p-1);v>=0&&!(h&&l&&h[v]===l[v]);v--);for(var g=p-1;g>v;g--)o--,s=i[o-1];for(var m=v+1;m<d;m++){var y={};f4(h[m],y,t);var _=Dt("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),i[o++]=_,s=_}l=h;var x=kC(f,t);x&&(s?s.children:n).push(x)}}},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=Jo(a,0,n),t=Jo(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(up(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=fB(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r}();function FC(r){return function(){y4.NODE_ENV!=="production"&&Hr('In SVG mode painter not support method "'+r+'"')}}function x4(r,e,t,n){var a;if(t&&t!=="none")if(a=Dt("rect","bg",{width:r,height:e,x:"0",y:"0"}),Cx(t))NC({fill:t},a.attrs,"fill",n);else if(up(t))IC({style:{fill:t},dirty:ft,getBoundingRect:function(){return{width:r,height:e}}},a.attrs,"fill",n);else{var i=Ks(t),o=i.color,s=i.opacity;a.attrs.fill=o,s<1&&(a.attrs["fill-opacity"]=s)}return a}function w4(r){r.registerPainter("svg",b4)}function $C(r,e,t){var n=aa.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 hm=function(r){et(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||Tc,typeof t=="string"?o=$C(t,n,a):oe(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(Yb(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=$C("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 xe(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new xe(0,0,0,0);_.copy(y),o.push(_)}else{for(var x=!1,w=1/0,S=0,E=0;E<o.length;++E){var T=o[E];if(T.intersect(y)){var C=new xe(0,0,0,0);C.copy(T),C.union(y),o[E]=C,x=!0;break}else if(l){u.copy(y),u.union(T);var D=y.width*y.height,M=T.width*T.height,k=u.width*u.height,N=k-D-M;N<w&&(w=N,S=E)}}if(l&&(o[S].union(y),x=!0),!x){var _=new xe(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var h=t[f];if(h){var d=h.shouldBePainted(a,i,!0,!0),p=h.__isRendered&&(h.__dirty&un||!d)?h.getPrevPaintRect():null;p&&c(p);var v=d&&(h.__dirty&un||!h.__isRendered)?h.getPaintRect():null;v&&c(v)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var h=n[f],d=h&&h.shouldBePainted(a,i,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var m=f+1;m<o.length;)o[f].intersect(o[m])?(g=!0,o[f].union(o[m]),o.splice(m,1)):m++;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,c=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/f,l/f));var d=this.domBack;function p(v,g,m,y){if(o.clearRect(v,g,m,y),n&&n!=="transparent"){var _=void 0;if(ju(n)){var x=n.global||n.__width===m&&n.__height===y;_=x&&n.__canvasGradient||dg(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=_,n.__width=m,n.__height=y}else yP(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,_=vg(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(v,g,m,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,v,g,m,y),o.restore())}!a||u?p(0,0,s,l):a.length&&A(a,function(v){p(v.x*f,v.y*f,v.width*f,v.height*f)})},e}(xr),GC={},HC=1e5,Wi=314159,lh=.01,S4=.001;function E4(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function T4(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 C4=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=F({},n||{}),this.dpr=n.devicePixelRatio||Tc,this._singleCanvas=i,this.root=e;var o=e.style;o&&(Yb(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var c=e,f=c.width,h=c.height;n.width!=null&&(f=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=h*this.dpr,this._width=f,this._height=h;var d=new hm(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[Wi]=d,d.zlevel=Wi,s.push(Wi),this._domRoot=e}else{this._width=Jo(e,0,n),this._height=Jo(e,1,n);var u=this._domRoot=T4(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(HC)),i||(i=n.ctx,i.save()),Bi(i,s,a,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(HC)},r.prototype.paintOne=function(e,t){VE(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;uc(function(){l._paintList(e,t,n,a)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Wi).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 c=!0,f=!1,h=function(v){var g=i[v],m=g.ctx,y=o&&g.createRepaintRects(e,t,d._width,d._height),_=n?g.__startIndex:g.__drawIndex,x=!n&&g.incremental&&Date.now,w=x&&Date.now(),S=g.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,y);else if(_===g.__startIndex){var E=e[_];(!E.incremental||!E.notClear||n)&&g.clear(!1,S,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,C=function(N){var L={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(T=_;T<g.__endIndex;T++){var R=e[T];if(R.__inHover&&(f=!0),a._doPaintEl(R,g,o,N,L,T===g.__endIndex-1),x){var I=Date.now()-w;if(I>15)break}}L.prevElClipPaths&&m.restore()};if(y)if(y.length===0)T=g.__endIndex;else for(var D=d.dpr,M=0;M<y.length;++M){var k=y[M];m.save(),m.beginPath(),m.rect(k.x*D,k.y*D,k.width*D,k.height*D),m.clip(),C(k),m.restore()}else m.save(),C(),m.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(c=!1)},d=this,p=0;p<i.length;p++)h(p);return Ce.wxa&&A(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,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))&&(Bi(s,e,i,o),e.setPrevPaintRect(l))}else Bi(s,e,i,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Wi);var n=this._layers[e];return n||(n=new hm("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?_e(n,this._layerConfig[e],!0):this._layerConfig[e-lh]&&_e(n,this._layerConfig[e-lh],!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]){GC.NODE_ENV!=="production"&&Hr("ZLevel "+e+" has been used already");return}if(!E4(t)){GC.NODE_ENV!=="production"&&Hr("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,h){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,c=void 0;s!==u&&(s=u,o=0),a.incremental?(c=this.getLayer(u+S4,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?lh:0),this._needsManuallyCompositing),c.__builtin__||Hr("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),i=c),a.__dirty&un&&!a.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,h){!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]?_e(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+lh){var o=this._layers[i];_e(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(we(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=Jo(i,0,a),t=Jo(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(Wi).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[Wi].dom;var t=new hm("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 c=s[l];Bi(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function D4(r){r.registerPainter("canvas",C4)}var A4={},M4=function(r){V(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(A4.NODE_ENV!=="production"){var n=t.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Zn(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new fe,a=yt("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=yt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*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}(Ke);function ss(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=Yo(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<t.length;o++)i.push(Yo(r,e,t[o]));return i.join(" ")}}function UC(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!G(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 tu=function(r){V(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=yt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=k4,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(){$n(this.childAt(0))},e.prototype.downplay=function(){Gn(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,c=i&&i.disableAnimation;if(u){var f=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,f)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(d):Ve(h,d,s,n),Kr(h)}if(this._updateCommon(t,n,l,a,i),u){var h=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,tt(h,d,s,n)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,c,f,h,d,p,v,g,m;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,h=i.focus,d=i.blurScope,v=i.labelStatesModels,g=i.hoverScale,m=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var y=i&&i.itemModel?i.itemModel:t.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),d=_.get("blurScope"),p=_.get("disabled"),v=Et(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var x=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var w=Oi(t.getItemVisual(n,"symbolOffset"),a);w&&(s.x=w[0],s.y=w[1]),m&&s.attr("cursor",m);var S=t.getItemVisual(n,"style"),E=S.fill;if(s instanceof It){var T=s.style;s.useStyle(F({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(F({},S)):s.useStyle(S),s.style.decal=null,s.setColor(E,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;Pt(s,v,{labelFetcher:l,labelDataIndex:n,defaultText:k,inheritColor:E,defaultOpacity:S.opacity});function k(R){return M?t.getName(R):ss(t,R)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var N=s.ensureState("emphasis");N.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var L=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;N.scaleX=this._sizeX*L,N.scaleY=this._sizeY*L,this.setSymbolScale(1),lt(this,h,d,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=ve(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&ya(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ya(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return jo(t.getItemVisual(n,"symbolSize"))},e}(fe);function k4(r,e){this.parent.drift(r,e)}function dm(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 WC(r){return r!=null&&!oe(r)&&(r={isIgnore:r}),r||{}}function YC(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:Et(e),cursorStyle:e.get("cursor")}}var ru=function(){function r(e){this.group=new fe,this._SymbolCtor=e||tu}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=WC(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=YC(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||n.removeAll(),e.diff(i).add(function(f){var h=c(f);if(dm(e,h,f,t)){var d=new o(e,f,l,u);d.setPosition(h),e.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=i.getItemGraphicEl(h),p=c(f);if(!dm(e,p,f,t)){n.remove(d);return}var v=e.getItemVisual(f,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==v)n.remove(d),d=new o(e,f,l,u),d.setPosition(p);else{d.updateData(e,f,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):Ve(d,m,a)}n.add(d),e.setItemGraphicEl(f,d)}).remove(function(f){var h=i.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=c,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=YC(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=WC(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(dm(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){_a(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 ZC(r,e,t){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=N4(a,t),o=n.dim,s=a.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=H(r.dimensions,function(p){return e.mapDimension(p)}),h=!1,d=e.getCalculationInfo("stackResultDimension");return Ma(e,f[0])&&(h=!0,f[0]=d),Ma(e,f[1])&&(h=!0,f[1]=d),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function N4(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:Oe(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function qC(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 I4(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 L4(r,e,t,n,a,i,o,s){for(var l=I4(r,e),u=[],c=[],f=[],h=[],d=[],p=[],v=[],g=ZC(a,e,o),m=r.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],w=!0,S=void 0,E=void 0;switch(x.cmd){case"=":S=x.idx*2,E=x.idx1*2;var T=m[S],C=m[S+1],D=y[E],M=y[E+1];(isNaN(T)||isNaN(C))&&(T=D,C=M),u.push(T,C),c.push(D,M),f.push(t[S],t[S+1]),h.push(n[E],n[E+1]),v.push(e.getRawIndex(x.idx1));break;case"+":var k=x.idx,N=g.dataDimsForPoint,L=a.dataToPoint([e.get(N[0],k),e.get(N[1],k)]);E=k*2,u.push(L[0],L[1]),c.push(y[E],y[E+1]);var R=qC(g,a,e,k);f.push(R[0],R[1]),h.push(n[E],n[E+1]),v.push(e.getRawIndex(k));break;case"-":w=!1}w&&(d.push(x),p.push(p.length))}p.sort(function(ee,he){return v[ee]-v[he]});for(var I=u.length,O=En(I),P=En(I),B=En(I),z=En(I),$=[],_=0;_<p.length;_++){var U=p[_],j=_*2,Z=U*2;O[j]=u[Z],O[j+1]=u[Z+1],P[j]=c[Z],P[j+1]=c[Z+1],B[j]=f[Z],B[j+1]=f[Z+1],z[j]=h[Z],z[j+1]=h[Z+1],$[_]=d[U]}return{current:O,next:P,stackedOnCurrent:B,stackedOnNext:z,status:$}}var ka=Math.min,Na=Math.max;function Yi(r,e){return isNaN(r)||isNaN(e)}function pm(r,e,t,n,a,i,o,s,l){for(var u,c,f,h,d,p,v=t,g=0;g<n;g++){var m=e[v*2],y=e[v*2+1];if(v>=a||v<0)break;if(Yi(m,y)){if(l){v+=i;continue}break}if(v===t)r[i>0?"moveTo":"lineTo"](m,y),f=m,h=y;else{var _=m-u,x=y-c;if(_*_+x*x<.5){v+=i;continue}if(o>0){for(var w=v+i,S=e[w*2],E=e[w*2+1];S===m&&E===y&&g<n;)g++,w+=i,v+=i,S=e[w*2],E=e[w*2+1],m=e[v*2],y=e[v*2+1],_=m-u,x=y-c;var T=g+1;if(l)for(;Yi(S,E)&&T<n;)T++,w+=i,S=e[w*2],E=e[w*2+1];var C=.5,D=0,M=0,k=void 0,N=void 0;if(T>=n||Yi(S,E))d=m,p=y;else{D=S-u,M=E-c;var L=m-u,R=S-m,I=y-c,O=E-y,P=void 0,B=void 0;if(s==="x"){P=Math.abs(L),B=Math.abs(R);var z=D>0?1:-1;d=m-z*P*o,p=y,k=m+z*B*o,N=y}else if(s==="y"){P=Math.abs(I),B=Math.abs(O);var $=M>0?1:-1;d=m,p=y-$*P*o,k=m,N=y+$*B*o}else P=Math.sqrt(L*L+I*I),B=Math.sqrt(R*R+O*O),C=B/(B+P),d=m-D*o*(1-C),p=y-M*o*(1-C),k=m+D*o*C,N=y+M*o*C,k=ka(k,Na(S,m)),N=ka(N,Na(E,y)),k=Na(k,ka(S,m)),N=Na(N,ka(E,y)),D=k-m,M=N-y,d=m-D*P/B,p=y-M*P/B,d=ka(d,Na(u,m)),p=ka(p,Na(c,y)),d=Na(d,ka(u,m)),p=Na(p,ka(c,y)),D=m-d,M=y-p,k=m+D*B/P,N=y+M*B/P}r.bezierCurveTo(f,h,d,p,m,y),f=k,h=N}else r.lineTo(m,y)}u=m,c=y,v+=i}return g}var XC=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),R4=function(r){V(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 XC},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&Yi(a[o*2-2],a[o*2-1]);o--);for(;i<o&&Yi(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=pm(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=yn.CMD,s,l,u=n==="x",c=[],f=0;f<i.length;){var h=i[f++],d=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(h){case o.M:s=i[f++],l=i[f++];break;case o.L:if(d=i[f++],p=i[f++],_=u?(t-s)/(d-s):(t-l)/(p-l),_<=1&&_>=0){var x=u?(p-l)*_+l:(d-s)*_+s;return u?[t,x]:[x,t]}s=d,l=p;break;case o.C:d=i[f++],p=i[f++],v=i[f++],g=i[f++],m=i[f++],y=i[f++];var w=u?hc(s,d,v,m,t,c):hc(l,p,g,y,t,c);if(w>0)for(var S=0;S<w;S++){var E=c[S];if(E<=1&&E>=0){var x=u?wt(l,p,g,y,E):wt(s,d,v,m,E);return u?[t,x]:[x,t]}}s=m,l=y;break}}},e}(De),O4=function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(XC),KC=function(r){V(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 O4},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&&Yi(a[s*2-2],a[s*2-1]);s--);for(;o<s&&Yi(a[o*2],a[o*2+1]);o++);}for(;o<s;){var u=pm(t,a,o,s,s,1,n.smooth,l,n.connectNulls);pm(t,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e}(De);function QC(r,e,t,n,a){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,c=t.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new Ie({shape:{x:o,y:s,width:l,height:u}});if(e){var h=r.getBaseAxis(),d=h.isHorizontal(),p=h.inverse;d?(p&&(f.shape.x+=l),f.shape.width=0):(p||(f.shape.y+=u),f.shape.height=0);var v=ie(a)?function(g){a(g,f)}:null;tt(f,{shape:{width:l,height:u,x:o,y:s}},t,null,n,v)}return f}function jC(r,e,t){var n=r.getArea(),a=ct(n.r0,1),i=ct(n.r,1),o=new Kt({shape:{cx:ct(r.cx,1),cy:ct(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,tt(o,{shape:{endAngle:n.endAngle,r:i}},t)}return o}function nu(r,e,t,n,a){if(r){if(r.type==="polar")return jC(r,e,t);if(r.type==="cartesian2d")return QC(r,e,t,n,a)}else return null;return null}function Zi(r,e){return r.type===e}var vm={};function JC(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function eD(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 tD(r,e){var t=eD(r),n=t[0],a=t[1],i=eD(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 rD(r){return Oe(r)?r:r?.5:0}function P4(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),a=En(n*2),i=0;i<n;i++){var o=qC(t,r,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function Ia(r,e,t,n,a){var i=t.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],h=[];if(a){for(l=0;l<r.length;l+=2){var d=e||r;!isNaN(d[l])&&!isNaN(d[l+1])&&h.push(r[l],r[l+1])}r=h}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+f[o])/2,v=[];u[o]=v[o]=p,u[1-o]=c[1-o],v[1-o]=f[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function B4(r,e){var t=[],n=r.length,a,i;function o(c,f,h){var d=c.coord,p=(h-d)/(f.coord-d),v=rB(p,[c.color,f.color]);return{coord:h,color:v}}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 V4(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())){if(e.type!=="cartesian2d"){vm.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){vm.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=e.getAxis(a),u=H(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=B4(u,a==="x"?t.getWidth():t.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,v=h[0].coord-p,g=h[d-1].coord+p,m=g-v;if(m<.001)return"transparent";A(h,function(_){_.offset=(_.coord-v)/m}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var y=new yl(0,0,0,0,h,!0);return y[a]=v,y[a+"2"]=g,y}}function z4(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&F4(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 F4(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(tu.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function $4(r,e){return isNaN(r)||isNaN(e)}function G4(r){for(var e=r.length/2;e>0&&$4(r[e*2-2],r[e*2-1]);e--);return e-1}function nD(r,e){return[r[e*2],r[e*2+1]]}function H4(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 aD(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<Xt.length;e++)if(r.get([Xt[e],"endLabel","show"]))return!0;return!1}function gm(r,e,t,n){if(Zi(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=aD(n)?function(d,p){r._endLabelOnDuring(d,p,o,s,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),c=QC(e,t,n,function(){var d=r._endLabel;d&&t&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,h=Math.max(f.width,f.height);u?(f.y-=h,f.height+=h*2):(f.x-=h,f.width+=h*2)}return l&&l(1,c),c}else return vm.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),jC(e,t,n)}function U4(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 W4=function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new fe,n=new ru;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=K(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"),c=s.getLayout("points")||[],f=i.type==="polar",h=this._coordSys,d=this._symbolDraw,p=this._polyline,v=this._polygon,g=this._lineGroup,m=!n.ssr&&t.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=ZC(i,s,_),w=y&&P4(i,s,x),S=t.get("showSymbol"),E=t.get("connectNulls"),T=S&&!f&&z4(t,s,i),C=this._data;C&&C.eachItemGraphicEl(function(ee,he){ee.__temp&&(o.remove(ee),C.setItemGraphicEl(he,null))}),S||d.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 k=V4(s,i,a)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&h.type===i.type&&D===this._step))S&&d.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(ee){return[c[ee*2],c[ee*2+1]]}}),m&&this._initSymbolLabelAnimation(s,i,M),D&&(w&&(w=Ia(w,c,i,D,E)),c=Ia(c,null,i,D,E)),p=this._newPolyline(c),y?v=this._newPolygon(c,w):v&&(g.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Ai(k)),g.setClipPath(gm(this,i,!0,t));else{y&&!v?v=this._newPolygon(c,w):v&&!y&&(g.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Ai(k));var N=g.getClipPath();if(N){var L=gm(this,i,!1,t);tt(N,{shape:L.shape},t)}else g.setClipPath(gm(this,i,!0,t));S&&d.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(ee){return[c[ee*2],c[ee*2+1]]}}),(!JC(this._stackedOnPoints,w)||!JC(this._points,c))&&(m?this._doUpdateAnimation(s,w,i,a,D,_,E):(D&&(w&&(w=Ia(w,c,i,D,E)),c=Ia(c,null,i,D,E)),p.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:w})))}var R=t.getModel("emphasis"),I=R.get("focus"),O=R.get("blurScope"),P=R.get("disabled");if(p.useStyle(le(l.getLineStyle(),{fill:"none",stroke:k,lineJoin:"bevel"})),Ot(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var B=p.getState("emphasis").style;B.lineWidth=+p.style.lineWidth+1}ve(p).seriesIndex=t.seriesIndex,lt(p,I,O,P);var z=rD(t.get("smooth")),$=t.get("smoothMonotone");if(p.setShape({smooth:z,smoothMonotone:$,connectNulls:E}),v){var U=s.getCalculationInfo("stackedOnSeries"),j=0;v.useStyle(le(u.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),U&&(j=rD(U.get("smooth"))),v.setShape({smooth:z,stackedOnSmooth:j,smoothMonotone:$,connectNulls:E}),Ot(v,t,"areaStyle"),ve(v).seriesIndex=t.seriesIndex,lt(v,I,O,P)}var Z=this._changePolyState;s.eachItemGraphicEl(function(ee){ee&&(ee.onHoverStateChange=Z)}),this._polyline.onHoverStateChange=Z,this._data=s,this._coordSys=i,this._stackedOnPoints=w,this._points=c,this._step=D,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),v&&this.packEventData(t,v))},e.prototype.packEventData=function(t,n){ve(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=si(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 c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=t.get("zlevel")||0,d=t.get("z")||0;u=new tu(o,s),u.x=c,u.y=f,u.setZ(h,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else We.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=si(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 We.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;Uc(this._polyline,t),n&&Uc(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new R4({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 KC({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,c=u.get("animationDuration");ie(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=ie(f)?f(null):f;t.eachItemGraphicEl(function(d,p){var v=d;if(v){var g=[d.x,d.y],m=void 0,y=void 0,_=void 0;if(a)if(o){var x=a,w=n.pointToCoord(g);i?(m=x.startAngle,y=x.endAngle,_=-w[1]/180*Math.PI):(m=x.r0,y=x.r,_=w[0])}else{var S=a;i?(m=S.x,y=S.x+S.width,_=d.x):(m=S.y+S.height,y=S.y,_=d.y)}var E=y===m?0:(_-m)/(y-m);l&&(E=1-E);var T=ie(f)?f(p):c*E+h,C=v.getSymbolPath(),D=C.getTextContent();v.attr({scaleX:0,scaleY:0}),v.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(aD(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 Le({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=G4(l);c>=0&&(Pt(s,Et(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?UC(o,d):ss(o,f)},enableTextSetter:!0},U4(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,c=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),h=a.hostModel,d=h.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,x=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,w=(m?v:0)*(y?-1:1),S=(m?0:-v)*(y?-1:1),E=m?"x":"y",T=H4(f,x,E),C=T.range,D=C[1]-C[0],M=void 0;if(D>=1){if(D>1&&!d){var k=nD(f,C[0]);u.attr({x:k[0]+w,y:k[1]+S}),o&&(M=h.getRawValue(C[0]))}else{var k=c.getPointOn(x,E);k&&u.attr({x:k[0]+w,y:k[1]+S});var N=h.getRawValue(C[0]),L=h.getRawValue(C[1]);o&&(M=c1(a,p,N,L,T.t))}i.lastFrameIndex=C[0]}else{var R=t===1||i.lastFrameIndex>0?C[0]:0,k=nD(f,R);o&&(M=h.getRawValue(R)),u.attr({x:k[0]+w,y:k[1]+S})}if(o){var I=Oo(u);typeof I.setLabelText=="function"&&I.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,h=L4(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,v=h.next,g=h.stackedOnNext;if(o&&(p=Ia(h.stackedOnCurrent,h.current,a,o,l),d=Ia(h.current,null,a,o,l),g=Ia(h.stackedOnNext,h.next,a,o,l),v=Ia(h.next,null,a,o,l)),tD(d,v)>3e3||c&&tD(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=d;var m={shape:{points:v}};h.current!==d&&(m.shape.__points=h.next),u.stopAnimation(),Ve(u,m,f),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Ve(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=h.status,x=0;x<_.length;x++){var w=_[x].cmd;if(w==="="){var S=t.getItemGraphicEl(_[x].idx1);S&&y.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var E=u.shape.__points,T=0;T<y.length;T++){var C=y[T].el,D=y[T].ptIdx*2;C.x=E[D],C.y=E[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}(We);function au(r,e){return{seriesType:r,plan:Xo(),reset:function(t){var n=t.getData(),a=t.coordinateSystem,i=t.pipelineContext,o=e||i.large;if(a){var s=H(a.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Ma(n,s[0])&&(s[0]=u),Ma(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(d,p){for(var v=d.end-d.start,g=o&&En(v*l),m=[],y=[],_=d.start,x=0;_<d.end;_++){var w=void 0;if(l===1){var S=c.get(f,_);w=a.dataToPoint(S,null,y)}else m[0]=c.get(f,_),m[1]=c.get(h,_),w=a.dataToPoint(m,null,y);o?(g[x++]=w[0],g[x++]=w[1]):p.setItemLayout(_,w.slice())}o&&p.setLayout("points",g)}}}}}}var Y4={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]}},Z4=function(r){return Math.round(r.length/2)};function iD(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),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){i==="lttb"?e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/d)):i==="minmax"&&e.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/d));var p=void 0;X(i)?p=Y4[i]:ie(i)&&(p=i),p&&e.setData(a.downSample(a.mapDimension(u.dim),1/d,p,Z4))}}}}}function q4(r){r.registerChartView(W4),r.registerSeriesModel(M4),r.registerLayout(au("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,iD("line"))}var iu=function(r){V(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 Zn(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(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),v=h.getTickModel().get("alignWithLabel"),g=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,x=1,w=0;w<p.length;w++){var S=p[w].coord,E=w===p.length-1?p[w-1].tickValue+x:p[w].tickValue;if(E===g){_=S;break}else if(E<g)y=S;else if(y!=null&&E>g){_=(S+y)/2;break}w===1&&(x=E-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),s[d]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/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}(Ke);Ke.registerClass(iu);var X4=function(r){V(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 Zn(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=ba(iu.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}(iu),K4=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}(),uh=function(r){V(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new K4},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,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?f-c<d:c-f<d;p||(c=f-(h?d:-d));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(f),y=Math.sin(f);p?(t.moveTo(v*o+a,g*o+i),t.arc(v*u+a,g*u+i,l,-Math.PI+c,c,!h)):t.moveTo(v*s+a,g*s+i),t.arc(a,i,s,c,f,!h),t.arc(m*u+a,y*u+i,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&t.arc(a,i,o,f,c,h)},e}(De);function Q4(r,e){e=e||{};var t=e.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return Dc(n,a,i);var s=r(o),l=a.distance!=null?a.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,d=u.r0,p=(h+d)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=t?Math.abs(h-d)/2:0,_=Math.cos,x=Math.sin,w=c+h*_(v),S=f+h*x(v),E="left",T="top";switch(s){case"startArc":w=c+(d-l)*_(m),S=f+(d-l)*x(m),E="center",T="top";break;case"insideStartArc":w=c+(d+l)*_(m),S=f+(d+l)*x(m),E="center",T="bottom";break;case"startAngle":w=c+p*_(v)+ch(v,l+y,!1),S=f+p*x(v)+fh(v,l+y,!1),E="right",T="middle";break;case"insideStartAngle":w=c+p*_(v)+ch(v,-l+y,!1),S=f+p*x(v)+fh(v,-l+y,!1),E="left",T="middle";break;case"middle":w=c+p*_(m),S=f+p*x(m),E="center",T="middle";break;case"endArc":w=c+(h+l)*_(m),S=f+(h+l)*x(m),E="center",T="bottom";break;case"insideEndArc":w=c+(h-l)*_(m),S=f+(h-l)*x(m),E="center",T="top";break;case"endAngle":w=c+p*_(g)+ch(g,l+y,!0),S=f+p*x(g)+fh(g,l+y,!0),E="left",T="middle";break;case"insideEndAngle":w=c+p*_(g)+ch(g,-l+y,!0),S=f+p*x(g)+fh(g,-l+y,!0),E="right",T="middle";break;default:return Dc(n,a,i)}return n=n||{},n.x=w,n.y=S,n.align=E,n.verticalAlign=T,n}}function j4(r,e,t,n){if(Oe(n)){r.setTextConfig({rotation:n});return}else if(G(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 c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function ch(r,e,t){return e*Math.sin(r)*(t?-1:1)}function fh(r,e,t){return e*Math.cos(r)*(t?1:-1)}function qi(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;G(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:H(n,function(i){return Zr(i,a)})}}var oD={},mm=Math.max,ym=Math.min;function J4(r,e){var t=r.getArea&&r.getArea();if(Zi(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 eH=function(r){V(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)):oD.NODE_ENV!=="production"&&st("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){_a(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,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var h=t.isAnimationEnabled()?t:null,d=tH(t,u);d&&this._enableRealtimeSort(d,s,a);var p=t.get("clip",!0)||d,v=J4(u,s);o.removeClipPath();var g=t.get("roundCap",!0),m=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],w=this._backgroundEls,S=i&&i.isInitSort,E=i&&i.type==="changeAxisOrder";function T(M){var k=hh[u.type](s,M),N=lH(u,f,k);return N.useStyle(y.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",_):N.setShape("cornerRadius",_),x[M]=N,N}s.diff(l).add(function(M){var k=s.getItemModel(M),N=hh[u.type](s,M,k);if(m&&T(M),!(!s.hasValue(M)||!fD[u.type](N))){var L=!1;p&&(L=sD[u.type](v,N));var R=lD[u.type](t,s,M,N,f,h,c.model,!1,g);d&&(R.forceLabelAnimation=!0),dD(R,s,M,k,N,t,f,u.type==="polar"),S?R.attr({shape:N}):d?uD(d,h,R,N,M,f,!1,!1):tt(R,{shape:N},t,M),s.setItemGraphicEl(M,R),o.add(R),R.ignore=L}}).update(function(M,k){var N=s.getItemModel(M),L=hh[u.type](s,M,N);if(m){var R=void 0;w.length===0?R=T(k):(R=w[k],R.useStyle(y.getItemStyle()),u.type==="cartesian2d"?R.setShape("r",_):R.setShape("cornerRadius",_),x[M]=R);var I=hh[u.type](s,M),O=mD(f,I,u);Ve(R,{shape:O},h,M)}var P=l.getItemGraphicEl(k);if(!s.hasValue(M)||!fD[u.type](L)){o.remove(P);return}var B=!1;if(p&&(B=sD[u.type](v,L),B&&o.remove(P)),P?Kr(P):P=lD[u.type](t,s,M,L,f,h,c.model,!!P,g),d&&(P.forceLabelAnimation=!0),E){var z=P.getTextContent();if(z){var $=Oo(z);$.prevValue!=null&&($.prevValue=$.value)}}else dD(P,s,M,N,L,t,f,u.type==="polar");S?P.attr({shape:L}):d?uD(d,h,P,L,M,f,!0,E):Ve(P,{shape:L},t,M,null),s.setItemGraphicEl(M,P),P.ignore=B,o.add(P)}).remove(function(M){var k=l.getItemGraphicEl(M);k&&_l(k,t,M)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new fe);C.removeAll();for(var D=0;D<x.length;++D)C.add(x[D]);o.add(C),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(t,n,a){this._clear(),vD(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),vD(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&nu(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),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.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:H(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 c=t.rawIndexOf(o,i.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));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){_l(i,t,ve(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}(We),sD={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=mm(e.x,r.x),s=ym(e.x+e.width,a),l=mm(e.y,r.y),u=ym(e.y+e.height,i),c=s<o,f=u<l;return e.x=c&&o>a?s:o,e.y=f&&l>i?u:l,e.width=c?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),c||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=ym(e.r,r.r),i=mm(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}},lD={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new Ie({shape:F({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?uh:Kt,c=new u({shape:n,z2:1});c.name="item";var f=hD(a);if(c.calculateTextPosition=Q4(f,{isRoundCap:u===uh}),i){var h=c.shape,d=a?"r":"endAngle",p={};h[d]=a?n.r0:n.startAngle,p[d]=n[d],(s?Ve:tt)(c,{shape:p},i)}return c}};function tH(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(oD.NODE_ENV!=="production"&&t&&(n.type!=="category"&&st("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&st("`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 uD(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?Ve:tt)(t,{shape:l},e,a,null);var c=e?r.baseAxis.model:null;(o?Ve:tt)(t,{shape:u},c,a)}function cD(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var rH=["x","y","width","height"],nH=["cx","cy","r","startAngle","endAngle"],fD={cartesian2d:function(r){return!cD(r,rH)},polar:function(r){return!cD(r,nH)}},hh={cartesian2d:function(r,e,t){var n=r.getItemLayout(e),a=t?iH(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 aH(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function hD(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 dD(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=qi(n.getModel("itemStyle"),c,!0);F(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var d=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=Et(n);Pt(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:ss(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var v=r.getTextContent();if(s&&v){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,j4(r,g==="outside"?d:g,hD(o),n.get(["label","rotate"]))}kw(v,p,i.getRawValue(t),function(y){return UC(e,y)});var m=n.getModel(["emphasis"]);lt(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ot(r,n),aH(a)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function iH(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 oH=function(){function r(){}return r}(),pD=function(r){V(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new oH},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<a.length;c+=3)l[i]=u,l[o]=a[c+2],s[i]=a[c+i],s[o]=a[c+o],t.rect(s[0],s[1],l[0],l[1])},e}(De);function vD(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 c=new pD({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var f=new pD({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,ve(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",gD),f.on("mousemove",gD)),t&&t.push(f)}var gD=ug(function(r){var e=this,t=sH(e,r.offsetX,r.offsetY);ve(e).dataIndex=t>=0?t:null},30,!1);function sH(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c<f;c++){var h=c*3;if(l[n]=u,l[a]=i[h+2],s[n]=i[h+n],s[a]=i[h+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[c]}return-1}function mD(r,e,t){if(Zi(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 lH(r,e,t){var n=r.type==="polar"?Kt:Ie;return new n({shape:mD(e,t,r),silent:!0,z2:0})}function uH(r){r.registerChartView(eH),r.registerSeriesModel(X4),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,me(IT,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,LT("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,iD("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 yD=Math.PI*2,dh=Math.PI/180;function _D(r,e){return bt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function bD(r,e){var t=_D(r,e),n=r.get("center"),a=r.get("radius");G(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),c,f,h=r.coordinateSystem;if(h){var d=h.dataToPoint(n);c=d[0]||0,f=d[1]||0}else G(n)||(n=[n,n]),c=W(n[0],i)+t.x,f=W(n[1],o)+t.y;return{cx:c,cy:f,r0:l,r:u}}function cH(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=_D(n,t),s=bD(n,t),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-n.get("startAngle")*dh,d=n.get("endAngle"),p=n.get("padAngle")*dh;d=d==="auto"?h-yD:-d*dh;var v=n.get("minAngle")*dh,g=v+p,m=0;a.each(i,function(O){!isNaN(O)&&m++});var y=a.getSum(i),_=Math.PI/(y||m)*2,x=n.get("clockwise"),w=n.get("roseType"),S=n.get("stillShowZeroSum"),E=a.getDataExtent(i);E[0]=0;var T=x?1:-1,C=[h,d],D=T*p/2;tv(C,!x),h=C[0],d=C[1];var M=xD(n);M.startAngle=h,M.endAngle=d,M.clockwise=x;var k=Math.abs(d-h),N=k,L=0,R=h;if(a.setLayout({viewRect:o,r:c}),a.each(i,function(O,P){var B;if(isNaN(O)){a.setItemLayout(P,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:f,r:w?NaN:c});return}w!=="area"?B=y===0&&S?_:O*_:B=k/m,B<g?(B=g,N-=g):L+=O;var z=R+T*B,$=0,U=0;p>B?($=R+T*B/2,U=$):($=R+D,U=z-D),a.setItemLayout(P,{angle:B,startAngle:$,endAngle:U,clockwise:x,cx:l,cy:u,r0:f,r:w?$e(O,E,[f,c]):c}),R=z}),N<yD&&m)if(N<=.001){var I=k/m;a.each(i,function(O,P){if(!isNaN(O)){var B=a.getItemLayout(P);B.angle=I;var z=0,$=0;I<p?(z=h+T*(P+1/2)*I,$=z):(z=h+T*P*I+D,$=h+T*(P+1)*I-D),B.startAngle=z,B.endAngle=$}})}else _=N/L,R=h,a.each(i,function(O,P){if(!isNaN(O)){var B=a.getItemLayout(P),z=B.angle===g?g:O*_,$=0,U=0;z<p?($=R+T*z/2,U=$):($=R+D,U=R+T*z-D),B.startAngle=$,B.endAngle=U,R+=T*z}})})}var xD=Ne();function ou(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 fH=Math.PI/180;function wD(r,e,t,n,a,i,o,s,l,u){if(r.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],x=Math.abs(_.label.y-t),w=n+_.len,S=w*w,E=Math.sqrt(Math.abs((1-x*x/m)*S)),T=e+(E+_.len2)*a,C=T-_.label.x,D=_.targetTextWidth-C*a;SD(_,D,!0),_.label.x=T}}function f(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],x=_.label.y>t?m:g,w=Math.abs(_.label.y-t);if(w>=x.maxY){var S=_.label.x-e-_.len2*a,E=n+_.len,T=Math.abs(S)<E?Math.sqrt(w*w/(1-S*S/E/E)):E;x.rB=T,x.maxY=w}x.list.push(_)}c(g),c(m)}for(var h=r.length,d=0;d<h;d++)if(r[d].position==="outer"&&r[d].labelAlignTo==="labelLine"){var p=r[d].label.x-u;r[d].linePoints[1][0]+=p,r[d].label.x=u}uC(r,l,l+o)&&f(r)}function hH(r,e,t,n,a,i,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=0;h<r.length;h++){var d=r[h].label;_m(r[h])||(d.x<e?(c=Math.min(c,d.x),l.push(r[h])):(f=Math.max(f,d.x),u.push(r[h])))}for(var h=0;h<r.length;h++){var p=r[h];if(!_m(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?d.x<e?g=v[2][0]-p.labelDistance-o-p.edgeDistance:g=o+a-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?g=c-o-p.bleedMargin:g=o+a-f-p.bleedMargin:d.x<e?g=d.x-o-p.bleedMargin:g=o+a-d.x-p.bleedMargin,p.targetTextWidth=g,SD(p,g)}}wD(u,e,t,n,1,a,i,o,s,f),wD(l,e,t,n,-1,a,i,o,s,c);for(var h=0;h<r.length;h++){var p=r[h];if(!_m(p)&&p.linePoints){var d=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,_=y?y[1]+y[3]:0,x=d.style.backgroundColor?0:_,w=p.rect.width+x,S=v[1][0]-v[2][0];m?d.x<e?v[2][0]=o+p.edgeDistance+w+p.labelDistance:v[2][0]=o+a-p.edgeDistance-w-p.labelDistance:(d.x<e?v[2][0]=d.x+p.labelDistance:v[2][0]=d.x-p.labelDistance,v[1][0]=v[2][0]+S),v[1][1]=v[2][1]=d.y}}}function SD(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,c=i.width+(o?0:l);if(e<c||t){var f=i.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=e-l,p=e<c?d:t?d>r.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var v=n.getBoundingRect();i.width=v.width;var g=(n.style.margin||0)+2.1;i.height=v.height+g,i.y-=(i.height-f)/2}}}function _m(r){return r.position==="center"}function dH(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*fH,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var E in S.states)if(S.states[E].ignore===!1)return!0;return!1}e.each(function(S){var E=e.getItemGraphicEl(S),T=E.shape,C=E.getTextContent(),D=E.getTextGuideLine(),M=e.getItemModel(S),k=M.getModel("label"),N=k.get("position")||M.get(["emphasis","label","position"]),L=k.get("distanceToLabelLine"),R=k.get("alignTo"),I=W(k.get("edgeDistance"),u),O=k.get("bleedMargin"),P=M.getModel("labelLine"),B=P.get("length");B=W(B,u);var z=P.get("length2");if(z=W(z,u),Math.abs(T.endAngle-T.startAngle)<o){A(C.states,d),C.ignore=!0,D&&(A(D.states,d),D.ignore=!0);return}if(p(C)){var $=(T.startAngle+T.endAngle)/2,U=Math.cos($),j=Math.sin($),Z,ee,he,Ee;n=T.cx,a=T.cy;var re=N==="inside"||N==="inner";if(N==="center")Z=T.cx,ee=T.cy,Ee="center";else{var J=(re?(T.r+T.r0)/2*U:T.r*U)+n,ue=(re?(T.r+T.r0)/2*j:T.r*j)+a;if(Z=J+U*3,ee=ue+j*3,!re){var q=J+U*(B+l-T.r),ae=ue+j*(B+l-T.r),Y=q+(U<0?-1:1)*z,ye=ae;R==="edge"?Z=U<0?c+I:c+u-I:Z=Y+(U<0?-L:L),ee=ye,he=[[J,ue],[q,ae],[Y,ye]]}Ee=re?"center":R==="edge"?U>0?"right":"left":U>0?"left":"right"}var Se=Math.PI,Be=0,Ye=k.get("rotate");if(Oe(Ye))Be=Ye*(Se/180);else if(N==="center")Be=0;else if(Ye==="radial"||Ye===!0){var de=U<0?-$+Se:-$;Be=de}else if(Ye==="tangential"&&N!=="outside"&&N!=="outer"){var ut=Math.atan2(U,j);ut<0&&(ut=Se*2+ut);var je=j>0;je&&(ut=Se+ut),Be=ut-Se}if(i=!!Be,C.x=Z,C.y=ee,C.rotation=Be,C.setStyle({verticalAlign:"middle"}),re){C.setStyle({align:Ee});var mr=C.states.select;mr&&(mr.x+=C.x,mr.y+=C.y)}else{var ke=C.getBoundingRect().clone();ke.applyTransform(C.getComputedTransform());var ra=(C.style.margin||0)+2.1;ke.y-=ra/2,ke.height+=ra,t.push({label:C,labelLine:D,position:N,len:B,len2:z,minTurnAngle:P.get("minTurnAngle"),maxSurfaceAngle:P.get("maxSurfaceAngle"),surfaceNormal:new be(U,j),linePoints:he,textAlign:Ee,labelDistance:L,labelAlignTo:R,edgeDistance:I,bleedMargin:O,rect:ke,unconstrainedWidth:ke.width,labelStyleWidth:C.style.width})}E.setTextConfig({inside:re})}}),!i&&r.get("avoidLabelOverlap")&&hH(t,n,a,l,u,h,c,f);for(var v=0;v<t.length;v++){var g=t[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(A(m.states,d),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(y){var w=g.linePoints;_||!w?(A(y.states,d),y.ignore=!0):(oC(w,g.minTurnAngle),IG(w,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:w}),m.__hostTarget.textGuideLineConfig={anchor:new be(w[0][0],w[0][1])})}}}var pH=function(r){V(e,r);function e(t,n,a){var i=r.call(this)||this;i.z2=2;var o=new Le;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"),c=t.getItemLayout(n),f=F(qi(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(i){o.setShape(f);var h=s.getShallow("animationType");s.ecModel.ssr?(tt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):h==="scale"?(o.shape.r=c.r0,tt(o,{shape:{r:c.r}},s,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),tt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,Ve(o,{shape:{endAngle:c.endAngle}},s,n))}else Kr(o),Ve(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),Ot(o,l);var d=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),v=Math.cos(d)*p,g=Math.sin(d)*p,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=F({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},qi(u.getModel("itemStyle"),c)),F(o.ensureState("select"),{x:v,y:g,shape:qi(l.getModel(["select","itemStyle"]),c)}),F(o.ensureState("blur"),{shape:qi(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&F(y.ensureState("select"),{x:v,y:g}),F(_.ensureState("select"),{x:v,y:g}),lt(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,c=l&&l.opacity;Pt(i,Et(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(a,"normal")||n.getName(a)});var f=i.getTextContent();i.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var h=t.get(["label","position"]);if(h!=="outside"&&h!=="outer")i.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new jt,this.setTextGuideLine(d)),Kg(this,Qg(o),{stroke:u,opacity:br(s.get(["lineStyle","opacity"]),c,1)})}},e}(Kt),vH=function(r){V(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 c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var h=xD(t),d=new Kt({shape:F(bD(t,a),h)});d.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(p){var v=new pH(o,p,u);o.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=s.getItemGraphicEl(v);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var v=s.getItemGraphicEl(p);_l(v,t,p)}).execute(),dH(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}(We);function ls(r,e,t){e=G(e)&&{coordDimensions:e}||F({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=Zl(n,e).dimensions,i=new Jt(a,r);return i.initData(n,t),i}var su=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}(),gH=Ne(),mH=function(r){V(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 su(K(this.getData,this),K(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return ls(this,{coordDimensions:["value"],encodeDefaulter:me(zv,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=gH(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=HB(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){oi(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}(Ke);function yH(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!(Oe(o)&&!isNaN(o)&&o<0)})}}}function _H(r){r.registerChartView(vH),r.registerSeriesModel(mH),TE("pie",r.registerAction),r.registerLayout(me(cH,"pie")),r.registerProcessor(ou("pie")),r.registerProcessor(yH("pie"))}var bH=function(r){V(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 Zn(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}(Ke),ED=4,xH=function(){function r(){}return r}(),wH=function(r){V(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 xH},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]<ED,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<a.length;){var h=a[f++],d=a[f++];isNaN(h)||isNaN(d)||c&&!c.contain(h,d)||(s.x=h-i[0]/2,s.y=d-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 c=u*2,f=i[c]-s/2,h=i[c+1]-l/2;if(t>=f&&n>=h&&t<=f+s&&n<=h+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,c=-1/0,f=-1/0,h=0;h<a.length;){var d=a[h++],p=a[h++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(p,u),f=Math.max(p,f)}t=this._rect=new xe(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e}(De),SH=function(){function r(){this.group=new fe}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 wH({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=yt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<ED;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=ve(e);u.seriesIndex=a.seriesIndex,e.on("mousemove",function(c){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}(),EH=function(r){V(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=au("").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 SH:new ru,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}(We),TH=function(r){V(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}(Ae),bm=function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",gt).models[0]},e.type="cartesian2dAxis",e}(Ae);dt(bm,Xl);var TD={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)"]}}},CH=_e({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},TD),xm=_e({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}}},TD),DH=_e({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},xm),AH=le({logBase:10},xm);const CD={category:CH,value:xm,time:DH,log:AH};var MH={value:1,category:1,time:1,log:1};function us(r,e,t,n){A(MH,function(a,i){var o=_e(_e({},CD[i],!0),n,!0),s=function(l){V(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Cl(this),d=h?$o(c):{},p=f.getTheme();_e(c,p.get(i+"Axis")),_e(c,this.getDefaultOption()),c.type=DD(c),h&&wa(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=Bg.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?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",DD)}function DD(r){return r.type||(r.data?"category":"value")}var kH=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 H(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ze(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}(),wm=["x","y"];function AD(r){return r.type==="interval"||r.type==="time"}var NH=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=wm,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!AD(t)||!AD(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 c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-a[0]*c,d=o[1]-i[0]*f,p=this._transform=[c,0,0,f,h,d];this._invTransform=go([],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 xe(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 Lt(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 Lt(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 xe(i,o,s,l)},e}(kH),IH=function(r){V(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}(rn),LH={};function Sm(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,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=u==="x"?[f[2]-d,f[3]+d]:[f[0]-d,f[1]+d];if(o){var v=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(v,p[1]),p[0])}i.position=[u==="y"?p[h[l]]:f[0],u==="x"?p[h[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[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),pt(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-m:m,i.z2=1,i}function MD(r){return r.get("coordinateSystem")==="cartesian2d"}function kD(r){var e={xAxisModel:null,yAxisModel:null};return A(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,gt).models[0];if(LH.NODE_ENV!=="production"&&!i)throw new Error(a+' "'+br(r.get(a+"Index"),r.get(a+"Id"),0)+'" not found');e[n]=i}),e}var RH={},Em=Math.log;function ND(r,e,t){var n=qn.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,!0),o=a.length-1,s=n.getInterval.call(t),l=FT(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=Em(r.base);u=[Em(u[0])/h,Em(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var p=n.getInterval.call(r),v=u[0],g=u[1];if(c&&f)p=(g-v)/o;else if(c)for(g=u[0]+p*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)p=zg(p),g=u[0]+p*o;else if(f)for(v=u[1]-p*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)p=zg(p),v=u[1]-p*o;else{var m=r.getTicks().length-1;m>o&&(p=zg(p));var y=p*o;g=Math.ceil(u[1]/p)*p,v=ct(g-y),v<0&&u[0]>=0?(v=0,g=ct(y)):g>0&&u[1]<=0&&(g=0,v=-ct(y))}var _=(a[0].value-i[0].value)/s,x=(a[o].value-i[o].value)/s;if(n.setExtent.call(r,v+p*_,g+p*x),n.setInterval.call(r,p),(_||x)&&n.setNiceExtent.call(r,v+p,g-p),RH.NODE_ENV!=="production"){var w=n.getTicks.call(r);w[1]&&(!V$(p)||Np(w[1].value)>Np(p))&&st("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var OH={},PH=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=wm,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=Me(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],p=d.model,v=d.scale;Vg(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(as(v,p),Vg(v)&&(s=d))}c.length&&(s||(s=c.pop(),as(s.scale,s.model)),A(c,function(g){ND(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};A(n.x,function(o){ID(n,"y",o,i)}),A(n.y,function(o){ID(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=bt(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 c=uG(u);if(c){var f=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),A(this._coordsList,function(u){u.calcAffineTransform()});function l(){A(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(f[h],f[1-h]),BH(u,c?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]}oe(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",gt).models[0],a=e.yAxisModel||t&&t.getReferringComponents("yAxis",gt).models[0],i=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,we(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(c,f){A(s.y,function(h,d){var p="x"+f+"y"+d,v=new NH(p);v.master=a,v.model=e,a._coordsMap[p]=v,a._coordsList.push(v),v.addAxis(c),v.addAxis(h)})});function u(c){return function(f,h){if(Tm(f,e)){var d=f.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new IH(c,eh(f),[0,0],f.get("type"),d),v=p.type==="category";p.onBand=v&&f.get("boundaryGap"),p.inverse=f.get("inverse"),f.axis=p,p.model=f,p.grid=i,p.index=h,i._axesList.push(p),s[c][h]=p,l[c]++}}}},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(MD(a)){var i=kD(a),o=i.xAxisModel,s=i.yAxisModel;if(!Tm(o,t)||!Tm(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=a.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(a,i){A(th(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);we(t,i)<0&&t.push(i),we(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(MD(a)){var i=kD(a),o=i.xAxisModel,s=i.yAxisModel,l=o.getCoordSysModel();if(OH.NODE_ENV!=="production"){if(!l)throw new Error('Grid "'+br(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=wm,r}();function Tm(r,e){return r.getCoordSysModel()===e}function ID(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)LD(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&LD(a[u])&&!n[c(a[u])]){i=a[u];break}i&&(n[c(i)]=!0);function c(f){return f.dim+"_"+f.index}}function LD(r){return r&&r.type!=="category"&&r.type!=="time"&&lG(r)}function BH(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 La=Math.PI,rr=function(){function r(e,t){this.group=new fe,this.opt=t,this.axisModel=e,le(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new fe({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(e){return!!RD[e]},r.prototype.add=function(e){RD[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,n){var a=qx(t-e),i,o;return nl(a)?(o=n>0?"top":"bottom",i="center"):nl(a-La)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<La?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}(),RD={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&&(Lt(s,s,o),Lt(l,l,o));var c=F({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new St({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Ro(f.shape,f.style.lineWidth),f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);X(h)&&(h=[h,h]),(X(d)||Oe(d))&&(d=[d,d]);var p=Oi(e.get(["axisLine","symbolOffset"])||0,d),v=d[0],g=d[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(m,y){if(h[y]!=="none"&&h[y]!=null){var _=yt(h[y],-v/2,-g/2,v,g,c.stroke,!0),x=m.r+m.offset,w=u?l:s;_.attr({rotation:m.rotate,x:w[0]+x*Math.cos(r.rotation),y:w[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,n){var a=FH(t,n,e,r),i=GH(t,n,e,r);if(zH(e,i,a),$H(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=sC(H(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));cC(o)}},axisName:function(r,e,t,n){var a=pt(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(),c=u[0]>u[1]?-1:1,f=[i==="start"?u[0]-c*l:i==="end"?u[1]+c*l:(u[0]+u[1])/2,PD(i)?r.labelOffset+o*l:0],h,d=e.get("nameRotate");d!=null&&(d=d*La/180);var p;PD(i)?h=rr.innerTextLayout(r.rotation,d??r.rotation,o):(h=VH(r.rotation,i,d||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var v=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,y=pt(r.nameTruncateMaxWidth,g.maxWidth,p),_=new Le({x:f[0],y:f[1],rotation:h.rotation,silent:rr.isLabelSilent(e),style:Xe(s,{text:a,font:v,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Ci({el:_,componentModel:e,itemName:a}),_.__fullText=a,_.anid="name",e.get("triggerEvent")){var x=rr.makeAxisEventDataBase(e);x.targetType="axisName",x.name=a,ve(_).eventData=x}n.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function VH(r,e,t,n){var a=qx(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return nl(a-La/2)?(o=l?"bottom":"top",i="center"):nl(a-La*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<La*1.5&&a>La/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function zH(r,e,t){if(!$T(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],c=t[1],f=t[t.length-1],h=t[t.length-2];n===!1?(Or(i),Or(u)):OD(i,o)&&(n?(Or(o),Or(c)):(Or(i),Or(u))),a===!1?(Or(s),Or(f)):OD(l,s)&&(a?(Or(l),Or(h)):(Or(s),Or(f)))}}function Or(r){r&&(r.ignore=!0)}function OD(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var a=ac([]);return ja(a,a,-r.rotation),t.applyTransform(Ln([],a,r.getLocalTransform())),n.applyTransform(Ln([],a,e.getLocalTransform())),t.intersect(n)}}function PD(r){return r==="middle"||r==="center"}function BD(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&&(Lt(o,o,e),Lt(s,s,e));var c=new St({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Ro(c.shape,c.style.lineWidth),c.anid=a+"_"+r[l].tickValue,i.push(c)}return i}function FH(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(),c=BD(u,e.transform,l,le(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)r.add(c[f]);return c}}function $H(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=le(s.getLineStyle(),le(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var f=BD(o[c],e.transform,l,u,"minorticks_"+c),h=0;h<f.length;h++)r.add(f[h])}}function GH(r,e,t,n){var a=t.axis,i=pt(n.axisLabelShow,t.get(["axisLabel","show"]));if(!(!i||a.scale.isBlank())){var o=t.getModel("axisLabel"),s=o.get("margin"),l=a.getViewLabels(),u=(pt(n.labelRotate,o.get("rotate"))||0)*La/180,c=rr.innerTextLayout(n.rotation,u,n.labelDirection),f=t.getCategories&&t.getCategories(!0),h=[],d=rr.isLabelSilent(t),p=t.get("triggerEvent");return A(l,function(v,g){var m=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(v.tickValue):v.tickValue,y=v.formattedLabel,_=v.rawLabel,x=o;if(f&&f[m]){var w=f[m];oe(w)&&w.textStyle&&(x=new Ge(w.textStyle,o,t.ecModel))}var S=x.getTextColor()||t.get(["axisLine","lineStyle","color"]),E=a.dataToCoord(m),T=x.getShallow("align",!0)||c.textAlign,C=pe(x.getShallow("alignMinLabel",!0),T),D=pe(x.getShallow("alignMaxLabel",!0),T),M=x.getShallow("verticalAlign",!0)||x.getShallow("baseline",!0)||c.textVerticalAlign,k=pe(x.getShallow("verticalAlignMinLabel",!0),M),N=pe(x.getShallow("verticalAlignMaxLabel",!0),M),L=new Le({x:E,y:n.labelOffset+n.labelDirection*s,rotation:c.rotation,silent:d,z2:10+(v.level||0),style:Xe(x,{text:y,align:g===0?C:g===l.length-1?D:T,verticalAlign:g===0?k:g===l.length-1?N:M,fill:ie(S)?S(a.type==="category"?_:a.type==="value"?m+"":m,g):S})});if(L.anid="label_"+m,Ci({el:L,componentModel:t,itemName:y,formatterParamsExtra:{isTruncated:function(){return L.isTruncated},value:_,tickIndex:g}}),p){var R=rr.makeAxisEventDataBase(t);R.targetType="axisLabel",R.value=_,R.tickIndex=g,a.type==="category"&&(R.dataIndex=m),ve(L).eventData=R}e.add(L),L.updateTransform(),h.push(L),r.add(L),L.decomposeTransform()}),h}}function HH(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return UH(t,r,e),t.seriesInvolved&&YH(t,r),t}function UH(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=lu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(A(s.getAxes(),me(v,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",d=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||d)&&A(p.baseAxes,me(v,d?"cross":!0,h)),d&&A(p.otherAxes,me(v,"cross",!1))}function v(g,m,y){var _=y.model.getModel("axisPointer",a),x=_.get("show");if(!(!x||x==="auto"&&!g&&!Am(_))){m==null&&(m=_.get("triggerTooltip")),_=g?WH(y,f,a,e,g,m):_;var w=_.get("snap"),S=_.get("triggerEmphasis"),E=lu(y.model),T=m||w||y.type==="category",C=r.axesInfo[E]={key:E,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:S,involveSeries:T,snap:w,useHandle:Am(_),seriesModels:[],linkGroup:null};u[E]=C,r.seriesInvolved=r.seriesInvolved||T;var D=ZH(i,y);if(D!=null){var M=o[D]||(o[D]={axesInfo:{}});M.axesInfo[E]=C,M.mapper=i[D].mapper,C.linkGroup=M}}}})}function WH(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(h){l[h]=ce(o.get(h))}),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 c=o.get(["label","show"]);if(u.show=c??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&le(u,f.textStyle)}}return r.model.getModel("axisPointer",new Ge(l,t,n))}function YH(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[lu(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 ZH(r,e){for(var t=e.model,n=e.dim,a=0;a<r.length;a++){var i=r[a]||{};if(Cm(i[n+"AxisId"],t.id)||Cm(i[n+"AxisIndex"],t.componentIndex)||Cm(i[n+"AxisName"],t.name))return a}}function Cm(r,e){return r==="all"||G(r)&&we(r,e)>=0||r===e}function qH(r){var e=Dm(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=Am(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 Dm(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[lu(r)]}function XH(r){var e=Dm(r);return e&&e.axisPointerModel}function Am(r){return!!r.get(["handle","show"])}function lu(r){return r.type+"||"+r.id}var KH={},Mm={},Xi=function(r){V(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&&qH(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=XH(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(KH.NODE_ENV!=="production"&&Mm[t])throw new Error("axisPointer "+t+" exists");Mm[t]=n},e.getAxisPointerClass=function(t){return t&&Mm[t]},e.type="axis",e}(at),km=Ne();function VD(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 c=s.length,f=km(r).splitAreaColors,h=te(),d=0;if(f)for(var p=0;p<u.length;p++){var v=f.get(u[p].tickValue);if(v!=null){d=(v+(c-1)*p)%c;break}}var g=a.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=G(s)?s:[s];for(var p=1;p<u.length;p++){var y=a.toGlobalCoord(u[p].coord),_=void 0,x=void 0,w=void 0,S=void 0;a.isHorizontal()?(_=g,x=l.y,w=y-_,S=l.height,g=_+w):(_=l.x,x=g,w=l.width,S=y-x,g=x+S);var E=u[p-1].tickValue;E!=null&&h.set(E,d),e.add(new Ie({anid:E!=null?"area_"+E:null,shape:{x:_,y:x,width:w,height:S},style:le({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%c}km(r).splitAreaColors=h}}}function zD(r){km(r).splitAreaColors=null}var QH=["axisLine","axisTickLabel","axisName"],jH=["splitArea","splitLine","minorSplitLine"],FD=function(r){V(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 fe,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=Sm(s,t),u=new rr(t,F({handleAutoShown:function(f){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(Vg(h[d].getOtherAxis(t.axis).scale))return!0;return!1}},l));A(QH,u.add,u),this._axisGroup.add(u.getGroup()),A(jH,function(f){t.get([f,"show"])&&JH[f](this,this._axisGroup,t,s)},this);var c=i&&i.type==="changeAxisOrder"&&i.isInitSort;c||bl(o,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)}},e.prototype.remove=function(){zD(this)},e.type="cartesianAxis",e}(Xi),JH={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=G(s)?s:[s];for(var c=n.coordinateSystem.getRect(),f=a.isHorizontal(),h=0,d=a.getTicksCoords({tickModel:i}),p=[],v=[],g=o.getLineStyle(),m=0;m<d.length;m++){var y=a.toGlobalCoord(d[m].coord);if(!(m===0&&!l||m===d.length-1&&!u)){var _=d[m].tickValue;f?(p[0]=y,p[1]=c.y,v[0]=y,v[1]=c.y+c.height):(p[0]=c.x,p[1]=y,v[0]=c.x+c.width,v[1]=y);var x=h++%s.length,w=new St({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},style:le({stroke:s[x]},g),silent:!0});Ro(w.shape,g.lineWidth),e.add(w)}}}},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 c=[],f=[],h=o.getLineStyle(),d=0;d<u.length;d++)for(var p=0;p<u[d].length;p++){var v=a.toGlobalCoord(u[d][p].coord);l?(c[0]=v,c[1]=s.y,f[0]=v,f[1]=s.y+s.height):(c[0]=s.x,c[1]=v,f[0]=s.x+s.width,f[1]=v);var g=new St({anid:"minor_line_"+u[d][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]},style:h,silent:!0});Ro(g.shape,h.lineWidth),e.add(g)}},splitArea:function(r,e,t,n){VD(r,e,t,n)}},$D=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(FD),eU=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=$D.type,t}return e.type="yAxis",e}(FD),tU=function(r){V(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 Ie({shape:t.coordinateSystem.getRect(),style:le({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(at),GD={offset:0};function HD(r){r.registerComponentView(tU),r.registerComponentModel(TH),r.registerCoordinateSystem("cartesian2d",PH),us(r,"x",bm,GD),us(r,"y",bm,GD),r.registerComponentView($D),r.registerComponentView(eU),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function rU(r){Te(HD),r.registerSeriesModel(bH),r.registerChartView(EH),r.registerLayout(au("scatter"))}function nU(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 c=a.dataToPoint(l,s);n[u][s]=UD(c)?c:WD(a)})}),t.each(function(o){var s=gP(n[o],function(l){return UD(l)})||WD(a);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function UD(r){return!isNaN(r[0])&&!isNaN(r[1])}function WD(r){return[r.cx,r.cy]}function aU(r){var e=r.polar;if(e){G(e)||(e=[e]);var t=[];A(e,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],G(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 iU=function(r){V(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(h,d){var p=h.getItemVisual(d,"symbol")||"circle";if(p!=="none"){var v=jo(h.getItemVisual(d,"symbolSize")),g=yt(p,-1,-1,2,2),m=h.getItemVisual(d,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(h,d,p,v,g,m){p.removeAll();for(var y=0;y<d.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,h[y]?(_.setPosition(h[y]),Di[m?"initProps":"updateProps"](_,{x:d[y][0],y:d[y][1]},t,g)):_.setPosition(d[y]),p.add(_))}}function f(h){return H(h,function(d){return[i.cx,i.cy]})}s.diff(l).add(function(h){var d=s.getItemLayout(h);if(d){var p=new Qt,v=new jt,g={shape:{points:d}};p.shape.points=f(d),v.shape.points=f(d),tt(p,g,t,h),tt(v,g,t,h);var m=new fe,y=new fe;m.add(v),m.add(p),m.add(y),c(v.shape.points,d,y,s,h,!0),s.setItemGraphicEl(h,m)}}).update(function(h,d){var p=l.getItemGraphicEl(d),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:s.getItemLayout(h)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,s,h,!1),Kr(g),Kr(v),Ve(v,y,t),Ve(g,y,t),s.setItemGraphicEl(h,p))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,d){var p=s.getItemModel(d),v=h.childAt(0),g=h.childAt(1),m=h.childAt(2),y=s.getItemVisual(d,"style"),_=y.fill;o.add(h),v.useStyle(le(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Ot(v,p,"lineStyle"),Ot(g,p,"areaStyle");var x=p.getModel("areaStyle"),w=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=w,A(["emphasis","select","blur"],function(T){var C=p.getModel([T,"areaStyle"]),D=C.isEmpty()&&C.parentModel.isEmpty();g.ensureState(T).ignore=D&&w}),g.useStyle(le(x.getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var S=p.getModel("emphasis"),E=S.getModel("itemStyle").getItemStyle();m.eachChild(function(T){if(T instanceof It){var C=T.style;T.useStyle(F({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},y))}else T.useStyle(y),T.setColor(_),T.style.strokeNoScale=!0;var D=T.ensureState("emphasis");D.style=ce(E);var M=s.getStore().get(s.getDimensionIndex(T.__dimIdx),d);(M==null||isNaN(M))&&(M=""),Pt(T,Et(p),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:T.__dimIdx,defaultText:M,inheritColor:_,defaultOpacity:y.opacity})}),lt(h,S.get("focus"),S.get("blurScope"),S.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(We),oU=function(r){V(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 su(K(this.getData,this),K(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return ls(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,c=JS(this,t);return Tt("section",{header:u,sortBlocks:!0,blocks:H(s,function(f){var h=i.get(i.mapDimension(f.dim),t);return Tt("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),a=this.coordinateSystem,i=n.getValues(H(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}(Ke),uu=CD.value;function ph(r,e){return le({show:e},r)}var sU=function(r){V(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"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),h=this.get("triggerEvent"),d=H(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 v=l;p.color!=null&&(v=le({color:p.color},l));var g=_e(ce(p),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:v,triggerEvent:h},!1);if(X(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else ie(c)&&(g.name=c(g.name,g));var y=new Ge(g,null,this.ecModel);return dt(y,Xl.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},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:_e({lineStyle:{color:"#bbb"}},uu.axisLine),axisLabel:ph(uu.axisLabel,!1),axisTick:ph(uu.axisTick,!1),splitLine:ph(uu.splitLine,!0),splitArea:ph(uu.splitArea,!0),indicator:[]},e}(Ae),lU={},uU=["axisLine","axisTickLabel","axisName"],cU=function(r){V(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=H(a,function(o){var s=o.model.get("showName")?o.name:"",l=new rr(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(uU,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"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),p=G(h)?h:[h],v=G(d)?d:[d],g=[],m=[];function y(R,I,O){var P=O%I.length;return R[P]=R[P]||[],P}if(i==="circle")for(var _=a[0].getTicksCoords(),x=n.cx,w=n.cy,S=0;S<_.length;S++){if(c){var E=y(g,p,S);g[E].push(new Hn({shape:{cx:x,cy:w,r:_[S].coord}}))}if(f&&S<_.length-1){var E=y(m,v,S);m[E].push(new gl({shape:{cx:x,cy:w,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,C=H(a,function(R,I){var O=R.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),H(O,function(P){return n.coordToPoint(P.coord,I)})}),D=[],S=0;S<=T;S++){for(var M=[],k=0;k<a.length;k++)M.push(C[k][S]);if(M[0]?M.push(M[0].slice()):lU.NODE_ENV!=="production"&&console.error("Can't draw value axis "+S),c){var E=y(g,p,S);g[E].push(new jt({shape:{points:M}}))}if(f&&D){var E=y(m,v,S-1);m[E].push(new Qt({shape:{points:M.concat(D)}}))}D=M.slice().reverse()}var N=l.getLineStyle(),L=u.getAreaStyle();A(m,function(R,I){this.group.add(Ar(R,{style:le({stroke:"none",fill:v[I%v.length]},L),silent:!0}))},this),A(g,function(R,I){this.group.add(Ar(R,{style:le({fill:"none",stroke:p[I%p.length]},N),silent:!0}))},this)},e.type="radar",e}(at),fU=function(r){V(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}(rn),hU=function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=H(e.getIndicatorModels(),function(a,i){var o="indicator_"+i,s=new fU(o,new qn);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 c=this._indicatorAxes[u],f=Math.abs(i-c.angle);f<o&&(s=c,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");(X(s)||Oe(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 c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},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(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var i=a.get("splitNumber"),o=new qn;o.setExtent(0,i),o.setInterval(1),A(n,function(s,l){ND(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 dU(r){r.registerCoordinateSystem("radar",hU),r.registerComponentModel(sU),r.registerComponentView(cU),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 pU(r){Te(dU),r.registerChartView(iU),r.registerSeriesModel(oU),r.registerLayout(nU),r.registerProcessor(ou("radar")),r.registerPreprocessor(aU)}var YD="\0_ec_interaction_mutex";function vU(r,e,t){var n=Nm(r);n[e]=t}function gU(r,e,t){var n=Nm(r),a=n[e];a===t&&(n[e]=null)}function ZD(r,e){return!!Nm(r)[e]}function Nm(r){return r[YD]||(r[YD]={})}wn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ft);var cu=function(r){V(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var a=K(n._mousedownHandler,n),i=K(n._mousemoveHandler,n),o=K(n._mouseupHandler,n),s=K(n._mousewheelHandler,n),l=K(n._pinchHandler,n);return n.enable=function(u,c){this.disable(),this._opt=le(ce(c)||{},{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(!jb(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||!vh("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||ZD(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&&In(t.event),qD(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:o,newX:n,newY:a,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){jb(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var n=vh("zoomOnMouseWheel",t,this._opt),a=vh("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,c=i>0?u:1/u;Im(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(a){var f=Math.abs(i),h=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);Im(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!ZD(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;Im(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(xr);function Im(r,e,t,n,a){r.pointerChecker&&r.pointerChecker(n,a.originX,a.originY)&&(In(n.event),qD(r,e,t,n,a))}function qD(r,e,t,n,a){a.isAvailableBehavior=K(vh,null,t,n),r.trigger(e,a)}function vh(r,e,t){var n=t[r];return!r||n&&(!X(n)||e.event[n+"Key"])}function Lm(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function Rm(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 mU={axisPointer:1,tooltip:1,brush:1};function gh(r,e,t){var n=e.getComponentByElement(r.topTarget),a=n&&n.coordinateSystem;return n&&n!==t&&!mU.hasOwnProperty(n.mainType)&&a&&a.model!==t}function XD(r){if(X(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 yU={},Om,mh={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"},KD=Me(mh),yh={"alignment-baseline":"textBaseline","stop-color":"stopColor"},QD=Me(yh),_U=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=XD(e);if(yU.NODE_ENV!=="production"&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var a=new fe;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),gr(n,a,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,a,i,null,!1,!1),u=u.nextSibling;wU(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=_h(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=iA(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var d=a;a=new fe,a.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Ie({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:c,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 c=Om[s];if(c&&Q(Om,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var d=jD[s];if(d&&Q(jD,s)){var p=d.call(this,e),v=e.getAttribute("id");v&&(this._defs[v]=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 Co({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Pr(t,n),gr(e,n,this._defsUsePending,!1,!1),bU(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(){Om={g:function(e,t){var n=new fe;return Pr(t,n),gr(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Ie;return Pr(t,n),gr(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 Hn;return Pr(t,n),gr(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 St;return Pr(t,n),gr(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 Zc;return Pr(t,n),gr(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=tA(n));var i=new Qt({shape:{points:a||[]},silent:!0});return Pr(t,i),gr(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=tA(n));var i=new jt({shape:{points:a||[]},silent:!0});return Pr(t,i),gr(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new It;return Pr(t,n),gr(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 fe;return Pr(t,s),gr(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 fe;return Pr(t,s),gr(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=uw(n);return Pr(t,a),gr(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),r}(),jD={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 yl(e,t,n,a);return JD(r,i),eA(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 vw(e,t,n);return JD(r,a),eA(r,a),a}};function JD(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function eA(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={};aA(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function Pr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),le(e.__inheritedStyle,r.__inheritedStyle))}function tA(r){for(var e=_h(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 gr(r,e,t,n,a){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(TU(r,e),aA(r,o,s),n||CU(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=rA(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=rA(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=H(_h(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function bU(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 xU=/^url\(\s*#(.*?)\)/;function rA(r,e,t,n){var a=t&&t.match(xU);if(a){var i=Ur(a[1]);n.push([r,e,i]);return}return t==="none"&&(t=null),t}function wU(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var SU=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function _h(r){return r.match(SU)||[]}var EU=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Pm=Math.PI/180;function TU(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],a=null;t.replace(EU,function(f,h,d){return n.push(h,d),""});for(var i=n.length-1;i>0;i-=2){var o=n[i],s=n[i-1],l=_h(o);switch(a=a||fr(),s){case"translate":ln(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":qd(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ja(a,a,-parseFloat(l[0])*Pm,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Pm);Ln(a,[1,0,u,1,0,0],a);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Pm);Ln(a,[1,c,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var nA=/([^\s:;]+)\s*:\s*([^:;]+)/g;function aA(r,e,t){var n=r.getAttribute("style");if(n){nA.lastIndex=0;for(var a;(a=nA.exec(n))!=null;){var i=a[1],o=Q(mh,i)?mh[i]:null;o&&(e[o]=a[2]);var s=Q(yh,i)?yh[i]:null;s&&(t[s]=a[2])}}}function CU(r,e,t){for(var n=0;n<KD.length;n++){var a=KD[n],i=r.getAttribute(a);i!=null&&(e[mh[a]]=i)}for(var n=0;n<QD.length;n++){var a=QD[n],i=r.getAttribute(a);i!=null&&(t[yh[a]]=i)}}function iA(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 DU(r,e){var t=new _U;return t.parse(r,e)}var AU=te(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),MU=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=te(),this._freedGraphics=[],this._mapName=e,this._parsedXML=XD(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=NU(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&&DU(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,se(n!=null)}catch(g){throw new Error(`Invalid svg format
|
|
214
|
+
`+g.message)}var a=new fe;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,c=void 0,f=void 0,h=void 0;if(i!=null?(u=0,f=i):s&&(u=s.x,f=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,f=d.width),c==null&&(c=d.y,h=d.height)}l=this._boundingRect=new xe(u,c,f,h)}if(s){var p=iA(s,l);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}a.setClipPath(new Ie({shape:l.plain()}));var v=[];return A(t.named,function(g){AU.get(g.svgNodeTagLower)!=null&&(v.push(g),kU(g.el))}),{root:a,boundingRect:l,named:v}},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 kU(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function NU(r){var e=[],t=te();return A(r,function(n){if(n.namedFrom==null){var a=new vG(n.name,n.el);e.push(a),t.set(n.name,a)}}),{regions:e,regionsMap:t}}for(var Bm=[126,25],oA="南海诸岛",Ki=[[[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]]],Qi=0;Qi<Ki.length;Qi++)for(var cs=0;cs<Ki[Qi].length;cs++)Ki[Qi][cs][0]/=10.5,Ki[Qi][cs][1]/=-10.5/.75,Ki[Qi][cs][0]+=Bm[0],Ki[Qi][cs][1]+=Bm[1];function IU(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===oA)return;e.push(new ZT(oA,H(Ki,function(n){return{type:"polygon",exterior:n}}),Bm))}}var LU={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function RU(r,e){if(r==="china"){var t=LU[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 OU=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function PU(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:OU[0]})}var BU="name",VU=function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=te(),this._mapName=e,this._specialAreas=n,this._geoJSON=FU(t)}return r.prototype.load=function(e,t){t=t||BU;var n=this._parsedMap.get(t);if(!n){var a=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:a,boundingRect:zU(a)})}var i=te(),o=[];return A(n.regions,function(s){var l=s.name;e&&Q(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new xe(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,a;try{a=n?mG(n,e):[]}catch(i){throw new Error(`Invalid geoJson format
|
|
215
|
+
`+i.message)}return IU(t,a),A(a,function(i){var o=i.name;RU(t,i),PU(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 zU(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 FU(r){return X(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var $U={},fu=te();const Xn={registerMap:function(r,e,t){if(e.svg){var n=new MU(r,e.svg);fu.set(r,n)}else{var a=e.geoJson||e.geoJSON;a&&!e.features?t=e.specialAreas:a=e;var n=new VU(r,a,t);fu.set(r,n)}},getGeoResource:function(r){return fu.get(r)},getMapForUser:function(r){var e=fu.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=fu.get(r);if(!n){$U.NODE_ENV!=="production"&&console.error("Map "+r+" not exists. The GeoJSON of the map must be provided.");return}return n.load(e,t)}};var Vm=["rect","circle","line","ellipse","polygon","polyline","path"],GU=te(Vm),HU=te(Vm.concat(["g"])),UU=te(Vm.concat(["g"])),sA=Ne();function bh(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function lA(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var uA=function(){function r(e){var t=new fe;this.uid=Po("ec_map_draw"),this._controller=new cu(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new fe),t.add(this._svgGroup=new fe)}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(m){!s&&m.getHostGeoModel()===e&&(s=m.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,f=l.getTransformInfo(),h=f.raw,d=f.roam,p=!u.childAt(0)||i;p?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):Ve(c,d,e);var v=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:v,isGeo:o,transformInfoRaw:h};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=te(),n=te(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*i.scaleX+i.x,d[1]*i.scaleY+i.y]}function f(d){for(var p=[],v=!u&&l&&l.project,g=0;g<d.length;++g){var m=c(d[g],v);m&&p.push(m)}return p}function h(d){return{shape:{points:f(d)}}}a.removeAll(),A(e.geo.regions,function(d){var p=d.name,v=t.get(p),g=n.get(p)||{},m=g.dataIdx,y=g.regionModel;if(!v){v=t.set(p,new fe),a.add(v),m=s?s.indexOfName(p):null,y=e.isGeo?o.getRegionModel(p):s?s.getItemModel(m):null;var _=y.get("silent",!0);_!=null&&(v.silent=_),n.set(p,{dataIdx:m,regionModel:y})}var x=[],w=[];A(d.geometries,function(T){if(T.type==="polygon"){var C=[T.exterior].concat(T.interiors||[]);u&&(C=vA(C,u)),A(C,function(M){x.push(new Qt(h(M)))})}else{var D=T.points;u&&(D=vA(D,u,!0)),A(D,function(M){w.push(new jt(h(M)))})}});var S=c(d.getCenter(),l&&l.project);function E(T,C){if(T.length){var D=new _v({culling:!0,segmentIgnoreThreshold:1,shape:{paths:T}});v.add(D),cA(e,D,m,y),fA(e,D,p,y,o,m,S),C&&(lA(D),A(D.states,lA))}}E(x),E(w,!0)}),t.each(function(d,p){var v=n.get(p),g=v.dataIdx,m=v.regionModel;hA(e,d,p,m,o,g),dA(e,d,p,m,o),pA(e,d,p,m,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=te(),i=!1;A(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,h=u?u.indexOfName(s):null,d=l.getRegionModel(s);GU.get(c)!=null&&f instanceof Cr&&cA(e,f,h,d),f instanceof Cr&&(f.culling=!0);var p=d.get("silent",!0);if(p!=null&&(f.silent=p),f.z2EmphasisLift=0,!o.namedFrom&&(UU.get(c)!=null&&fA(e,f,s,d,l,h,null),hA(e,f,s,d,l,h),dA(e,f,s,d,l),HU.get(c)!=null)){var v=pA(e,f,s,d,l);v==="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){_i(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=Xn.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=Xn.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,Lm(o,u.dx,u.dy),n.dispatchAction(F(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Rm(o,u.scale,u.originX,u.originY),n.dispatchAction(F(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,c,f){return a.containPoint([c,f])&&!gh(u,n,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=sA(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 cA(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=bh(a),u=bh(i),c=bh(s),f=bh(o),h=r.data;if(h){var d=h.getItemVisual(t,"style"),p=h.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),p&&(l.decal=es(p,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,_i(e)}function fA(r,e,t,n,a,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var f=l?t:i,h=void 0;(!s||i>=0)&&(h=a);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Pt(e,Et(n),{labelFetcher:h,labelDataIndex:f,defaultText:t},d);var p=e.getTextContent();if(p&&(sA(p).ignore=p.ignore,e.textConfig&&o)){var v=e.getBoundingRect().clone();e.textConfig.layoutRect=v,e.textConfig.position=[(o[0]-v.x)/v.width*100+"%",(o[1]-v.y)/v.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function hA(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):ve(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function dA(r,e,t,n,a){r.data||Ci({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function pA(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return lt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&bz(e,a,t),o}function vA(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 WU=function(r){V(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 uA(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 c=u.point,f=u.offset,h=new Hn({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:Ao+1)});if(!f){var d=t.mainSeries.getData(),p=i.getName(l),v=d.indexOfName(p),g=i.getItemModel(l),m=g.getModel("label"),y=d.getItemGraphicEl(v);Pt(h,Et(g),{labelFetcher:{getFormattedLabel:function(_,x){return t.getFormattedLabel(v,x)}},defaultText:p}),h.disableLabelAnimation=!0,m.get("position")||h.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){Uc(h,_)}}o.add(h)}}})},e.type="map",e}(We),YU=function(r){V(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=ls(this,{coordDimensions:["value"],encodeDefaulter:me(zv,this)}),a=te(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,o)}var u=Xn.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return A(u.regions,function(c){var f=c.name,h=a.get(f),d=c.properties&&c.properties.echartsStyle,p;h==null?(p={name:f},i.push(p)):p=n.getRawDataItem(h),d&&_e(p,d)}),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=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),h=i.mapDimension("value");isNaN(l[c].originalData.get(h,f))||u.push(l[c].name)}return Tt("section",{header:u.join(", "),noHeader:!u.length,blocks:[Tt("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=yt(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}(Ke);function ZU(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,c=0;c<u;c++)s=Math.min(s,t[i][c]),l=Math.max(l,t[i][c]),o+=t[i][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function qU(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=ZU(H(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 XU(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,c){var f=l.getName(c),h=s.getRegion(f);if(!(!h||isNaN(u))){var d=a[f]||0,p=s.dataToPoint(h.getCenter());a[f]=d+1,l.setItemLayout(c,{point:p,offset:d})}})});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 gA=Lt,hu=function(r){V(e,r);function e(t){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Pn,n._rawTransformable=new Pn,n.name=t,n}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new xe(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 xe(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new xe(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=Lt([],i,t),a=Lt([],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(),Zd(this.transform||(this.transform=[]),n.transform||fr()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],go(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,a=new Pn;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?gA(a,t,i):Wt(a,t)},e.prototype.pointToData=function(t){var n=this.invTransform;return n?gA([],t,n):[t[0],t[1]]},e.prototype.convertToPixel=function(t,n,a){var i=mA(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=mA(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}(Pn);function mA(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var zm={},KU={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},yA=["lng","lat"],Fm=function(r){V(e,r);function e(t,n,a){var i=r.call(this,t)||this;i.dimensions=yA,i.type="geo",i._nameCoordMap=te(),i.map=n;var o=a.projection,s=Xn.load(n,a.nameMap,a.nameProperty),l=Xn.getGeoResource(n),u=i.resourceType=l?l.type:null,c=i.regions=s.regions,f=KU[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,zm.NODE_ENV!=="production"&&o&&(u==="geoSVG"&&(zm.NODE_ENV!=="production"&&st("Map "+n+" with SVG source can't use projection. Only GeoJSON source supports projection."),o=null),o.project&&o.unproject||(zm.NODE_ENV!=="production"&&st("project and unproject must be both provided in the projeciton."),o=null)),i.projection=o;var h;if(o)for(var d=0;d<c.length;d++){var p=c[d].getBoundingRect(o);h=h||p.clone(),h.union(p)}else h=s.boundingRect;return i.setBoundingRect(h.x,h.y,h.width,h.height),i.aspectScale=o?1:pe(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 xe(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(X(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=_A(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=_A(n);return i===this?i.pointToData(a):null},e}(hu);dt(Fm,hu);function _A(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",gt).models[0]||{}).coordinateSystem:null}var bA={};function xA(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])))bA.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 c=function(S,E,T,C){for(var D=T-S,M=C-E,k=0;k<=100;k++){var N=k/100,L=i.project([S+D*N,E+M*N]);oa(n,n,L),sa(a,a,L)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}}var f=this.getBoundingRect(),h=r.get("layoutCenter"),d=r.get("layoutSize"),p=e.getWidth(),v=e.getHeight(),g=f.width/f.height*this.aspectScale,m=!1,y,_;h&&d&&(y=[W(h[0],p),W(h[1],v)],_=W(d,Math.min(p,v)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(_)?m=!0:bA.NODE_ENV!=="production"&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var x;if(m)x={},g>1?(x.width=_,x.height=_/g):(x.height=_,x.width=_*g),x.y=y[1]-x.height/2,x.x=y[0]-x.width/2;else{var w=r.getBoxLayoutParams();w.aspect=g,x=bt(w,{width:p,height:v})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function QU(r,e){A(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var jU=function(){function r(){this.dimensions=yA}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 Fm(l+s,l,F({nameMap:o.get("nameMap")},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=xA,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=H(o,function(c){return c.get("nameMap")}),u=new Fm(s,s,F({nameMap:Id(l)},a(o[0])));u.zoomLimit=pt.apply(null,H(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=xA,u.resize(o[0],t),A(o,function(c){c.coordinateSystem=u,QU(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=te(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=Xn.load(t,n,a);return A(l.regions,function(u){var c=u.name,f=o.get(c),h=u.properties&&u.properties.echartsStyle;f||(f={name:c},i.push(f)),h&&_e(f,h)}),i},r}(),wA=new jU,JU=function(r){V(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=Xn.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,a),oi(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=wA.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=sn(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new Ge(o,t,t.ecModel)),o.selected&&(a[s]=!0)),i},te()),n.selectedMap||(n.selectedMap=a)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Ge(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(ie(i))return o.status=n,i(o);if(X(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}(Ae);function SA(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function $m(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(SA(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 c=(e.originX-r.x)*(o-1),f=(e.originY-r.y)*(o-1);r.x-=c,r.y-=f,r.updateTransform(),r.setCenter(SA(r,s),n),r.setZoom(o*a)}return{center:r.getCenter(),zoom:r.getZoom()}}var eW=function(r){V(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 uA(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;Ri(t.target,function(a){return(n=ve(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=ve(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}(at);function tW(r,e,t){Xn.registerMap(r,e,t)}function EA(r){r.registerCoordinateSystem("geo",wA),r.registerComponentModel(JU),r.registerComponentView(eW),r.registerImpl("registerMap",tW),r.registerImpl("getMap",function(t){return Xn.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 c=[];A(o,function(f,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{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=$m(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 rW(r){Te(EA),r.registerChartView(WU),r.registerSeriesModel(YU),r.registerLayout(XU),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,qU),TE("map",r.registerAction)}function nW(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 aW(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){sW(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=lW(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function iW(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function TA(r){return arguments.length?r:fW}function du(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function oW(r,e){return bt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function sW(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 lW(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,c=o.hierNode.modifier,f=s.hierNode.modifier;s=Gm(s),i=Hm(i),s&&i;){a=Gm(a),o=Hm(o),a.hierNode.ancestor=r;var h=s.hierNode.prelim+f-i.hierNode.prelim-u+n(s,i);h>0&&(cW(uW(s,r,t),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!Gm(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!Hm(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function Gm(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Hm(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function uW(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function cW(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 fW(r,e){return r.parentNode===e.parentNode?1:2}var hW={},dW=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),pW=function(r){V(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 dW},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,c=u==="TB"||u==="BT"?0:1,f=1-c,h=W(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(s[0],s[1]),d[c]=s[c],t.lineTo(d[0],d[1]),d[c]=l[c],t.lineTo(d[0],d[1]),t.lineTo(l[0],l[1]);for(var p=1;p<i-1;p++){var v=a[p];t.moveTo(v[0],v[1]),d[c]=v[c],t.lineTo(d[0],d[1])}},e}(De),vW=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new fe,t}return e.prototype.init=function(t,n){this._controller=new cu(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(c){CA(i,c)&&DA(i,c,null,s,t)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!CA(i,c)){h&&kA(u,f,h,s,t);return}DA(i,c,h,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&kA(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(c,f){c.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 h=a.getItemLayout(f);h&&!isNaN(h.x)&&!isNaN(h.y)&&i.push([+h.x,+h.y])});var o=[],s=[];Bc(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 c=t.coordinateSystem=new hu;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center"),n),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.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,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!gh(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){Lm(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Rm(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}(We);function CA(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function DA(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",c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,h=r.getItemGraphicEl(f.dataIndex),d=f.getLayout(),p=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,v=o.getLayout();i?(t=new tu(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=v.rawX,t.__radialRawY=v.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,Ve(t,{x:v.x,y:v.y},a);var g=t.getSymbolPath();if(a.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,x=void 0,w=void 0;if(v.x===y.x&&o.isExpand===!0&&m.children.length){var S={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};x=Math.atan2(S.y-y.y,S.x-y.x),x<0&&(x=Math.PI*2+x),w=S.x<y.x,w&&(x=x-Math.PI)}else x=Math.atan2(v.y-y.y,v.x-y.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(w=v.x<y.x,w&&(x=x-Math.PI)):(w=v.x>y.x,w||(x=x-Math.PI));var E=w?"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")||E,rotation:C==null?-x:D,origin:"center"}),M.setStyle("verticalAlign","middle"))}var k=s.get(["emphasis","focus"]),N=k==="relative"?zs(o.getAncestorsIndices(),o.getDescendantIndices()):k==="ancestor"?o.getAncestorsIndices():k==="descendant"?o.getDescendantIndices():null;N&&(ve(t).focus=N),gW(a,o,c,t,p,d,v,n),t.__edge&&(t.onHoverStateChange=function(L){if(L!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===ul||Uc(t.__edge,L)}})}function gW(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),d=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),v=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(v||(v=n.__edge=new ml({shape:Um(c,f,h,a,a)})),Ve(v,{shape:Um(c,f,h,i,o)},r));else if(u==="polyline"){if(c==="orthogonal"){if(e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],y=0;y<g.length;y++){var _=g[y].getLayout();m.push([_.x,_.y])}v||(v=n.__edge=new pW({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:d}})),Ve(v,{shape:{parentPoint:[o.x,o.y],childPoints:m}},r)}}else if(hW.NODE_ENV!=="production")throw new Error("The polyline edgeShape can only be used in orthogonal layout")}v&&!(u==="polyline"&&!e.isExpand)&&(v.useStyle(le({strokeNoScale:!0,fill:null},p)),Ot(v,l,"lineStyle"),_i(v),s.add(v))}function AA(r,e,t,n,a){var i=e.tree.root,o=MA(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),d=n.get("edgeShape"),p=n.get("layout"),v=n.get("orient"),g=n.get(["lineStyle","curveness"]);h&&(d==="curve"?ya(h,{shape:Um(p,v,g,l,l),style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}):d==="polyline"&&n.get("layout")==="orthogonal"&&ya(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}))}}function MA(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 kA(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=MA(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};ya(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){AA(u,r,n,a,l)}),AA(i,r,n,a,l)}function Um(r,e,t,n,a){var i,o,s,l,u,c,f,h;if(r==="radial"){u=n.rawX,f=n.rawY,c=a.rawX,h=a.rawY;var d=du(u,f),p=du(u,f+(h-f)*t),v=du(c,h+(f-h)*t),g=du(c,h);return{x1:d.x||0,y1:d.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=n.x,f=n.y,c=a.x,h=a.y,(e==="LR"||e==="RL")&&(i=u+(c-u)*t,o=f,s=c+(u-c)*t,l=h),(e==="TB"||e==="BT")&&(i=u,o=f+(h-f)*t,s=c,l=h+(f-h)*t);return{x1:u,y1:f,x2:c,y2:h,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var Br=Ne();function NA(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,IA(e,t,r),A(t,function(n){A(e.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,me(mW,r))})}),e.wrapMethod("cloneShallow",me(_W,r)),A(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,me(yW,r))}),se(t[e.dataType]===e)}function mW(r,e){if(wW(this)){var t=F({},Br(this).datas);t[this.dataType]=e,IA(e,t,r)}else Wm(e,this.dataType,Br(this).mainData,r);return e}function yW(r,e){return r.struct&&r.struct.update(),e}function _W(r,e){return A(Br(e).datas,function(t,n){t!==e&&Wm(t.cloneShallow(),n,e,r)}),e}function bW(r){var e=Br(this).mainData;return r==null||e==null?e:Br(e).datas[r]}function xW(){var r=Br(this).mainData;return r==null?[{data:r}]:H(Me(Br(r).datas),function(e){return{type:e,data:Br(r).datas[e]}})}function wW(r){return Br(r).mainData===r}function IA(r,e,t){Br(r).datas={},A(e,function(n,a){Wm(n,a,r,t)})}function Wm(r,e,t,n){Br(t).datas[e]=r,Br(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=bW,r.getLinkedDataAll=xW}var SW=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){ie(e)&&(n=t,t=e,e=null),e=e||{},X(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}(),Ym=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(c,f){var h=c.value;o=Math.max(o,G(h)?h.length:1),i.push(c);var d=new SW(_t(c.name,""),a);f?EW(d,f):a.root=d,a._nodes.push(d);var p=c.children;if(p)for(var v=0;v<p.length;v++)s(p[v],d)}a.root.updateDepthAndHeight(0);var l=Zl(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Jt(l,t);return u.initData(i),n&&n(u),NA({mainData:u,struct:a,structAttr:"tree"}),a.update(),a},r}();function EW(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function pu(r,e,t){if(r&&we(e,r.type)>=0){var n=t.getData().tree.root,a=r.targetNode;if(X(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 LA(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Zm(r,e){var t=LA(r);return we(t,e)>=0}function xh(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 TW=function(r){V(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 Ge(a,this,this.ecModel),o=Ym.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),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 Tt("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=xh(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}(Ke);function CW(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 vu(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 DW(r,e){r.eachSeriesByType("tree",function(t){AW(t,e)})}function AW(r,e){var t=oW(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=TA(function(_,x){return(_.parentNode===x.parentNode?1:2)/_.depth})):(a=t.width,i=t.height,o=TA());var s=r.getData().tree.root,l=s.children[0];if(l){nW(s),CW(l,aW,o),s.hierNode.modifier=-l.hierNode.prelim,vu(l,iW);var u=l,c=l,f=l;vu(l,function(_){var x=_.getLayout().x;x<u.getLayout().x&&(u=_),x>c.getLayout().x&&(c=_),_.depth>f.depth&&(f=_)});var h=u===c?1:o(u,c)/2,d=h-u.getLayout().x,p=0,v=0,g=0,m=0;if(n==="radial")p=a/(c.getLayout().x+h+d),v=i/(f.depth-1||1),vu(l,function(_){g=(_.getLayout().x+d)*p,m=(_.depth-1)*v;var x=du(g,m);_.setLayout({x:x.x,y:x.y,rawX:g,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(v=i/(c.getLayout().x+h+d),p=a/(f.depth-1||1),vu(l,function(_){m=(_.getLayout().x+d)*v,g=y==="LR"?(_.depth-1)*p:a-(_.depth-1)*p,_.setLayout({x:g,y:m},!0)})):(y==="TB"||y==="BT")&&(p=a/(c.getLayout().x+h+d),v=i/(f.depth-1||1),vu(l,function(_){g=(_.getLayout().x+d)*p,m=y==="TB"?(_.depth-1)*v:i-(_.depth-1)*v,_.setLayout({x:g,y:m},!0)}))}}}function MW(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");F(s,o)})})}function kW(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=$m(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}function NW(r){r.registerChartView(vW),r.registerSeriesModel(TW),r.registerLayout(DW),r.registerVisual(MW),kW(r)}var RA=["treemapZoomToNode","treemapRender","treemapMove"];function IW(r){for(var e=0;e<RA.length;e++)r.registerAction({type:RA[e],update:"updateView"},ft);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=pu(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Zm(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function OA(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=Hv(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var LW=function(r){V(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};PA(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Ge({itemStyle:o},this,n);i=t.levels=RW(i,n);var l=H(i||[],function(f){return new Ge(f,s,n)},this),u=Ym.createTree(a,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var p=u.getNodeByDataIndex(d),v=p?l[p.depth]:null;return h.parentModel=v||s,h})}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 Tt("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=xh(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=te(),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(){OA(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}(Ke);function PA(r){var e=0;A(r.children,function(n){PA(n);var a=n.value;G(a)&&(a=a[0]),e+=a});var t=r.value;G(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),G(r.value)?r.value[0]=t:r.value=t}function RW(r,e){var t=He(e.get("color")),n=He(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,i;A(r,function(s){var l=new Ge(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var OW=8,BA=8,qm=5,PW=function(){function r(e){this.group=new fe,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"),c=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,c,a),yf(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=_t(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+OW*2,t.emptyItemWidth);t.totalWidth+=s+BA,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,c=e.get(["breadcrumb","height"]),f=SF(t.pos,t.box),h=t.totalWidth,d=t.renderList,p=a.getModel("itemStyle").getItemStyle(),v=d.length-1;v>=0;v--){var g=d[v],m=g.node,y=g.width,_=g.text;h>f.width&&(h-=y-u,y=u,_=null);var x=new Qt({shape:{points:BW(l,0,y,c,v===d.length-1,v===0)},style:le(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Le({style:Xe(i,{text:_})}),textConfig:{position:"inside"},z2:Ao*1e4,onclick:me(s,m)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Xe(o,{text:_}),x.ensureState("emphasis").style=p,lt(x,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(x),VW(x,e,m),l+=y+BA}},r.prototype.remove=function(){this.group.removeAll()},r}();function BW(r,e,t,n,a,i){var o=[[a?r:r-qm,e],[r+t,e],[r+t,e+n],[a?r:r-qm,e+n]];return!i&&o.splice(2,0,[r+t+qm,e+n/2]),!a&&o.push([r,e+n/2]),o}function VW(r,e,t){ve(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&&xh(t,e)}}var zW=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 FW(){return new zW}var Xm=fe,VA=Ie,zA=3,FA="label",$A="upperLabel",$W=Ao*10,GW=Ao*2,HW=Ao*3,ji=ui([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),GA=function(r){var e=ji(r);return e.stroke=e.fill=e.lineWidth=null,e},wh=Ne(),UW=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=gu(),t}return e.prototype.render=function(t,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(we(o,t)<0)){this.seriesModel=t,this.api=a,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=pu(i,s,t),u=i&&i.type,c=t.layoutInfo,f=!this._oldTree,h=this._storage,d=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,p=this._giveContainerGroup(c),v=t.get("animation"),g=this._doRender(p,t,d);v&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,d):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 Xm,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=gu(),l=gu(),u=this._storage,c=[];function f(y,_,x,w){return WW(n,l,u,a,s,c,y,_,x,w)}v(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var h=g(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=i.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:h,renderFinally:m};function v(y,_,x,w,S){w?(_=y,A(y,function(C,D){!C.isRemoved()&&T(D,D)})):new Yn(_,y,E,E).add(T).update(T).remove(me(T,null)).execute();function E(C){return C.getId()}function T(C,D){var M=C!=null?y[C]:null,k=D!=null?_[D]:null,N=f(M,k,x,S);N&&v(M&&M.viewChildren||[],k&&k.viewChildren||[],N,w,S+1)}}function g(y){var _=gu();return y&&A(y,function(x,w){var S=_[w];A(x,function(E){E&&(S.push(E),wh(E).willDelete=!0)})}),_}function m(){A(h,function(y){A(y,function(_){_.parent&&_.parent.remove(_)})}),A(c,function(y){y.invisible=!0,y.dirty()})}},e.prototype._doAnimation=function(t,n,a,i){var o=a.get("animationDurationUpdate"),s=a.get("animationEasing"),l=(ie(o)?0:o)||0,u=(ie(s)?null:s)||"cubicOut",c=FW();A(n.willDeleteEls,function(f,h){A(f,function(d,p){if(!d.invisible){var v=d.parent,g,m=wh(v);if(i&&i.direction==="drillDown")g=v===i.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),g=h==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(d,g,l,0,u)}})}),A(this._storage,function(f,h){A(f,function(d,p){var v=n.lastsForAnimation[h][p],g={};v&&(d instanceof fe?v.oldX!=null&&(g.x=d.x,g.y=d.y,d.x=v.oldX,d.y=v.oldY):(v.oldShape&&(g.shape=F({},d.shape),d.setShape(v.oldShape)),v.fadein?(d.setStyle("opacity",0),g.style={opacity:1}):d.style.opacity!==1&&(g.style={opacity:1})),c.add(d,g,l,0,u))})},this),this._state="animating",c.finished(K(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 cu(t.getZr()),n.enable(this.seriesModel.get("roam")),a.zoomLimit=this.seriesModel.get("scaleLimit"),a.zoom=this.seriesModel.get("zoom"),n.on("pan",K(this._onPan,this)),n.on("zoom",K(this._onZoom,this)));var i=new xe(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)>zA||Math.abs(t.dy)>zA)){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 xe(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=i,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var p=f/c.zoom;c.zoom=f;var v=this.seriesModel.layoutInfo;n-=v.x,a-=v.y;var g=fr();ln(g,g,[-n,-a]),qd(g,g,[p,p]),ln(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),c=l.get("target",!0)||"blank";u&&gf(u,c)}}}}},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 PW(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(Zm(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=gu(),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}(We);function gu(){return{nodeGroup:[],background:[],content:[]}}function WW(r,e,t,n,a,i,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,v=c.borderWidth,g=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,x=c.upperHeight,w=_&&_.length,S=h.getModel("itemStyle"),E=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),C=h.getModel(["select","itemStyle"]),D=S.get("borderRadius")||0,M=ee("nodeGroup",Xm);if(!M)return;if(l.add(M),M.x=c.x||0,M.y=c.y||0,M.markRedraw(),wh(M).nodeWidth=d,wh(M).nodeHeight=p,c.isAboveViewRoot)return M;var k=ee("background",VA,u,GW);k&&z(M,k,w&&c.upperLabelHeight);var N=h.getModel("emphasis"),L=N.get("focus"),R=N.get("blurScope"),I=N.get("disabled"),O=L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():L;if(w)ma(M)&&xi(M,!1),k&&(xi(k,!I),f.setItemGraphicEl(o.dataIndex,k),dv(k,O,R));else{var P=ee("content",VA,u,HW);P&&$(M,P),k.disableMorphing=!0,k&&ma(k)&&xi(k,!1),xi(M,!I),f.setItemGraphicEl(o.dataIndex,M);var B=h.getShallow("cursor");B&&P.attr("cursor",B),dv(M,O,R)}return M;function z(re,J,ue){var q=ve(J);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,J.setShape({x:0,y:0,width:d,height:p,r:D}),g)U(J);else{J.invisible=!1;var ae=o.getVisual("style"),Y=ae.stroke,ye=GA(S);ye.fill=Y;var Se=ji(E);Se.fill=E.get("borderColor");var Be=ji(T);Be.fill=T.get("borderColor");var Ye=ji(C);if(Ye.fill=C.get("borderColor"),ue){var de=d-2*v;j(J,Y,ae.opacity,{x:v,y:0,width:de,height:x})}else J.removeTextContent();J.setStyle(ye),J.ensureState("emphasis").style=Se,J.ensureState("blur").style=Be,J.ensureState("select").style=Ye,_i(J)}re.add(J)}function $(re,J){var ue=ve(J);ue.dataIndex=o.dataIndex,ue.seriesIndex=r.seriesIndex;var q=Math.max(d-2*v,0),ae=Math.max(p-2*v,0);if(J.culling=!0,J.setShape({x:v,y:v,width:q,height:ae,r:D}),g)U(J);else{J.invisible=!1;var Y=o.getVisual("style"),ye=Y.fill,Se=GA(S);Se.fill=ye,Se.decal=Y.decal;var Be=ji(E),Ye=ji(T),de=ji(C);j(J,ye,Y.opacity,null),J.setStyle(Se),J.ensureState("emphasis").style=Be,J.ensureState("blur").style=Ye,J.ensureState("select").style=de,_i(J)}re.add(J)}function U(re){!re.invisible&&i.push(re)}function j(re,J,ue,q){var ae=h.getModel(q?$A:FA),Y=_t(h.get("name"),null),ye=ae.getShallow("show");Pt(re,Et(h,q?$A:FA),{defaultText:ye?Y:null,inheritColor:J,defaultOpacity:ue,labelFetcher:r,labelDataIndex:o.dataIndex});var Se=re.getTextContent();if(Se){var Be=Se.style,Ye=Rd(Be.padding||0);q&&(re.setTextConfig({layoutRect:q}),Se.disableLabelLayout=!0),Se.beforeUpdate=function(){var ut=Math.max((q?q.width:re.shape.width)-Ye[1]-Ye[3],0),je=Math.max((q?q.height:re.shape.height)-Ye[0]-Ye[2],0);(Be.width!==ut||Be.height!==je)&&Se.setStyle({width:ut,height:je})},Be.truncateMinChar=2,Be.lineOverflow="truncate",Z(Be,q,c);var de=Se.getState("emphasis");Z(de?de.style:null,q,c)}}function Z(re,J,ue){var q=re?re.text:null;if(!J&&ue.isLeafRoot&&q!=null){var ae=r.get("drillDownIcon",!0);re.text=ae?ae+" "+q:q}}function ee(re,J,ue,q){var ae=y!=null&&t[re][y],Y=a[re];return ae?(t[re][y]=null,he(Y,ae)):g||(ae=new J,ae instanceof Cr&&(ae.z2=YW(ue,q)),Ee(Y,ae)),e[re][m]=ae}function he(re,J){var ue=re[m]={};J instanceof Xm?(ue.oldX=J.x,ue.oldY=J.y):ue.oldShape=F({},J.shape)}function Ee(re,J){var ue=re[m]={},q=o.parentNode,ae=J instanceof fe;if(q&&(!n||n.direction==="drillDown")){var Y=0,ye=0,Se=a.background[q.getRawIndex()];!n&&Se&&Se.oldShape&&(Y=Se.oldShape.width,ye=Se.oldShape.height),ae?(ue.oldX=0,ue.oldY=ye):ue.oldShape={x:Y,y:ye,width:0,height:0}}ue.fadein=!ae}}function YW(r,e){return r*$W+e}var ZW={},mu=A,qW=oe,Sh=-1,At=function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=ce(e);this.type=n,this.mappingMethod=t,this._normalizeData=QW[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Km(a),XW(a)):t==="category"?a.categories?KW(a):Km(a,!0):(se(t!=="linear"||a.dataExtent),Km(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return K(this._normalizeData,this)},r.listVisualTypes=function(){return Me(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){oe(e)?A(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=G(e)?[]:oe(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&&mu(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(qW(e)){var t=[];mu(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||X(l)&&l===e+"")return o;n&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(Th(f[1],e,c[1]))return o}else if(c[1]===1/0){if(Th(f[0],c[0],e))return o}else if(Th(f[0],c[0],e)&&Th(f[1],e,c[1]))return o;n&&h(c[0],o),n&&h(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:a;function h(d,p){var v=Math.abs(d-e);v<i&&(i=v,a=p)}},r.visualHandlers={color:{applyVisual:yu("color"),getColorMapper:function(){var e=this.option;return K(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),_u.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=op(t,e.parsedVisual,a),i?a:Rn(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Rn(op(e,this.option.parsedVisual),"rgba")},category:_u,piecewise:function(e,t){var n=jm.call(this,t);return n==null&&(n=Rn(op(e,this.option.parsedVisual),"rgba")),n},fixed:Ji}},colorHue:Eh(function(e,t){return Xs(e,t)}),colorSaturation:Eh(function(e,t){return Xs(e,null,t)}),colorLightness:Eh(function(e,t){return Xs(e,null,null,t)}),colorAlpha:Eh(function(e,t){return pc(e,t)}),decal:{applyVisual:yu("decal"),_normalizedToVisual:{linear:null,category:_u,piecewise:null,fixed:null}},opacity:{applyVisual:yu("opacity"),_normalizedToVisual:Qm([0,1])},liftZ:{applyVisual:yu("liftZ"),_normalizedToVisual:{linear:Ji,category:Ji,piecewise:Ji,fixed:Ji}},symbol:{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:HA,category:_u,piecewise:function(e,t){var n=jm.call(this,t);return n==null&&(n=HA.call(this,e)),n},fixed:Ji}},symbolSize:{applyVisual:yu("symbolSize"),_normalizedToVisual:Qm([0,1])}},r}();function XW(r){var e=r.pieceList;r.hasSpecialVisual=!1,A(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function KW(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(mu(e,function(o,s){t[o]=s}),!G(n)){var a=[];oe(n)?mu(n,function(o,s){var l=t[s];a[l??Sh]=o}):a[Sh]=n,n=UA(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function Km(r,e){var t=r.visual,n=[];oe(t)?mu(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]),UA(r,n)}function Eh(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:Qm([0,1])}}function HA(r){var e=this.option.visual;return e[Math.round($e(r,[0,1],[0,e.length-1],!0))]||{}}function yu(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function _u(r){var e=this.option.visual;return e[this.option.loop&&r!==Sh?r%e.length:r]}function Ji(){return this.option.visual[0]}function Qm(r){return{linear:function(e){return $e(e,r,this.option.visual,!0)},category:_u,piecewise:function(e,t){var n=jm.call(this,t);return n==null&&(n=$e(e,r,this.option.visual,!0)),n},fixed:Ji}}function jm(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=At.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function UA(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=H(e,function(t){var n=hr(t);return!n&&ZW.NODE_ENV!=="production"&&st("'"+t+"' is an illegal color, fallback to '#000000'",!0),n||[0,0,0,1]})),e}var QW={linear:function(r){return $e(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=At.findPieceIndex(r,e,!0);if(t!=null)return $e(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??Sh},fixed:ft};function Th(r,e,t){return r?e<=t:e<t}var jW="itemStyle",WA=Ne();const JW={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||YA(t,{},r.getViewRoot().getAncestors(),r)}};function YA(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(jW),l=e6(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),h;f!=null&&(h=ZA(l),c=t6(f,h)),u.stroke=c;var d=r.viewChildren;if(!d||!d.length)h=ZA(l),u.fill=h;else{var p=r6(r,a,i,s,l,d);A(d,function(v,g){if(v.depth>=t.length||v===t[v.depth]){var m=n6(a,l,v,g,p,n);YA(v,m,t,n)}})}}}function e6(r,e,t){var n=F({},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 ZA(r){var e=Jm(r,"color");if(e){var t=Jm(r,"colorAlpha"),n=Jm(r,"colorSaturation");return n&&(e=Xs(e,null,null,n)),t&&(e=pc(e,t)),e}}function t6(r,e){return e!=null?Xs(e,null,null,r):null}function Jm(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function r6(r,e,t,n,a,i){if(!(!i||!i.length)){var o=ey(e,"color")||a.color!=null&&a.color!=="none"&&(ey(e,"colorAlpha")||ey(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 c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new At(f);return WA(h).drColorMappingBy=c,h}}}function ey(r,e){var t=r.get(e);return G(t)&&t.length?{name:e,range:t}:null}function n6(r,e,t,n,a,i){var o=F({},e);if(a){var s=a.type,l=s==="color"&&WA(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 bu=Math.max,Ch=Math.min,qA=pt,ty=A,XA=["itemStyle","borderWidth"],a6=["itemStyle","gapWidth"],i6=["upperLabel","show"],o6=["upperLabel","height"];const s6={seriesType:"treemap",reset:function(r,e,t,n){var a=t.getWidth(),i=t.getHeight(),o=r.option,s=bt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=W(qA(s.width,l[0]),a),c=W(qA(s.height,l[1]),i),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],d=pu(n,h,r),p=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,v=r.getViewRoot(),g=LA(v);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?d6(r,d,v,u,c):p?[p.width,p.height]:[u,c],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};v.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(x),KA(v,_,!1,0),x=v.getLayout(),ty(g,function(S,E){var T=(g[E+1]||v).getValue();S.setLayout(F({dataExtent:[T,T],borderWidth:0,upperHeight:0},x))})}var w=r.getData().tree.root;w.setLayout(p6(s,p,d),!0),r.setLayoutInfo(s),jA(w,new xe(-s.x,-s.y,a,i),g,v,0)}};function KA(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(XA),u=s.get(a6)/2,c=JA(s),f=Math.max(l,c),h=l-u,d=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),a=bu(a-2*h,0),i=bu(i-h-d,0);var p=a*i,v=l6(r,s,p,e,t,n);if(v.length){var g={x:h,y:d,width:a,height:i},m=Ch(a,i),y=1/0,_=[];_.area=0;for(var x=0,w=v.length;x<w;){var S=v[x];_.push(S),_.area+=S.getLayout().area;var E=h6(_,m,e.squareRatio);E<=y?(x++,y=E):(_.area-=_.pop().getLayout().area,QA(_,m,g,u,!1),m=Ch(g.width,g.height),_.length=_.area=0,y=1/0)}if(_.length&&QA(_,m,g,u,!0),!t){var T=s.get("childrenVisibleMin");T!=null&&p<T&&(t=!0)}for(var x=0,w=v.length;x<w;x++)KA(v[x],e,t,n+1)}}}function l6(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=ze(o,function(d){return!d.isRemoved()}),c6(o,s);var u=f6(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=u6(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var h=o[c].getValue()/u.sum*t;o[c].setLayout({area:h})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function u6(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 c6(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 f6(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],ty(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 h6(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?bu(u*n/l,l/(u*a)):1/0}function QA(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]],c=e?r.area/e:0;(a||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,h=r.length;f<h;f++){var d=r[f],p={},v=c?d.getLayout().area/c:0,g=p[l[o]]=bu(c-2*n,0),m=t[s[i]]+t[l[i]]-u,y=f===h-1||m<v?m:v,_=p[l[i]]=bu(y-2*n,0);p[s[o]]=t[s[o]]+Ch(n,g/2),p[s[i]]=u+Ch(n,_/2),u+=y,d.setLayout(p,!0)}t[s[o]]+=c,t[l[o]]-=c}function d6(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 c=0,f=s.children,h=0,d=f.length;h<d;h++)c+=f[h].getValue();var p=i.getValue();if(p===0)return o;u*=c/p;var v=s.getModel(),g=v.get(XA),m=Math.max(g,JA(v));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>Zx&&(u=Zx),i=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,a*y]}function p6(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 jA(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 xe(e.x-i.x,e.y-i.y,e.width,e.height);ty(r.viewChildren||[],function(u){jA(u,l,t,n,a+1)})}}function JA(r){return r.get(i6)?r.get(o6):0}function v6(r){r.registerSeriesModel(LW),r.registerChartView(UW),r.registerVisual(JW),r.registerLayout(s6),IW(r)}function g6(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){Oe(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function m6(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 c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var h=l.getShallow(c[f],!0);h!=null&&n.setItemVisual(o,c[f],h)}}),n.count()&&a.each(function(o){var s=a.getItemModel(o),l=s.getShallow("category");if(l!=null){X(l)&&(l=i["ec-"+l]);var u=n.getItemVisual(l,"style"),c=a.ensureUniqueItemVisual(o,"style");F(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++)a.setItemVisual(o,f[h],n.getItemVisual(l,f[h]))}})})}function Dh(r){return r instanceof Array||(r=[r,r]),r}function y6(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),a=Dh(e.get("edgeSymbol")),i=Dh(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=Dh(s.getShallow("symbol",!0)),c=Dh(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),h=n.ensureUniqueItemVisual(o,"style");switch(F(h,f),h.stroke){case"source":{var d=l.node1.getVisual("style");h.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");h.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var ry="-->",Ah=function(r){return r.get("autoCurveness")||null},eM=function(r,e){var t=Ah(r),n=20,a=[];if(Oe(t))n=t;else if(G(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},xu=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join(ry)},tM=function(r){var e=r.split(ry);return[e[0],e[2],e[1]].join(ry)},_6=function(r,e){var t=xu(r.node1,r.node2,e);return e.__edgeMap[t]},b6=function(r,e){var t=ny(xu(r.node1,r.node2,e),e),n=ny(xu(r.node2,r.node1,e),e);return t+n},ny=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function x6(r){Ah(r)&&(r.__curvenessList=[],r.__edgeMap={},eM(r))}function w6(r,e,t,n){if(Ah(t)){var a=xu(r,e,t),i=t.__edgeMap,o=i[tM(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 ay(r,e,t,n){var a=Ah(e),i=G(a);if(!a)return null;var o=_6(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=b6(r,e);eM(e,u),r.lineStyle=r.lineStyle||{};var c=xu(r.node1,r.node2,e),f=e.__curvenessList,h=i||u%2?0:1;if(o.isForward)return f[h+s];var d=tM(c),p=ny(d,e),v=f[s+p+h];return n?i?a&&a[0]===0?(p+h)%2?v:-v:((p%2?0:1)+h)%2?v:-v:(p+h)%2?v:-v:f[s+p+h]}function rM(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")])}),iy(t,r)}}function iy(r,e){r.eachEdge(function(t,n){var a=br(t.getModel().get(["lineStyle","curveness"]),-ay(t,e,n,!0),0),i=Nn(t.node1.getLayout()),o=Nn(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 S6(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(h){o=o.concat(i.mapDimensionsAll(h))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=i.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,a.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}iy(i.graph,t)}else(!n||n==="none")&&rM(t)})}function wu(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 Su(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var nM=Math.PI,oy=[];function sy(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,c=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var h=a.pointToData(n),d=h[0],p=h[1],v=[d-l,p-u];po(v,v),rc(v,v,c),t.setLayout([l+v[0],u+v[1]],!0);var g=r.get(["circular","rotateLabel"]);aM(t,g,l,u)}E6[e](r,s,o,c,l,u,f),s.eachEdge(function(m,y){var _=br(m.getModel().get(["lineStyle","curveness"]),ay(m,r,y),0),x=Nn(m.node1.getLayout()),w=Nn(m.node2.getLayout()),S,E=(x[0]+w[0])/2,T=(x[1]+w[1])/2;+_&&(_*=3,S=[l*_+E*(1-_),u*_+T*(1-_)]),m.setLayout([x,w,S])})}}}var E6={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(c){var f=c.getValue("value"),h=u*(l?f:1)/2;s+=h,c.setLayout([n*Math.cos(s)+a,n*Math.sin(s)+i]),s+=h})},symbolSize:function(r,e,t,n,a,i,o){var s=0;oy.length=o;var l=wu(r);e.eachNode(function(f){var h=Su(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var d=Math.asin(h/2/n);isNaN(d)&&(d=nM/2),oy[f.dataIndex]=d,s+=d*2});var u=(2*nM-s)/o/2,c=0;e.eachNode(function(f){var h=u+oy[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+a,n*Math.sin(c)+i]),c+=h})}};function aM(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 c=l[0]<t;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var h=s.ensureState("emphasis");F(h.textConfig||(h.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function T6(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&sy(e,"symbolSize")})}var fs=Pd;function C6(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,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=Xa(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Nn(f.p),f.edges=null}var h=t.friction==null?.6:t.friction,d=h,p,v;return{warmUp:function(){d=h*.8},setFixed:function(g){n[g].fixed=!0},setUnfixed:function(g){n[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){v=g},step:function(g){p&&p(n,a);for(var m=[],y=n.length,_=0;_<a.length;_++){var x=a[_];if(!x.ignoreForceLayout){var w=x.n1,S=x.n2;Ka(m,S.p,w.p);var E=Bd(m)-x.d,T=S.w/(w.w+S.w);isNaN(T)&&(T=0),po(m,m),!w.fixed&&fs(w.p,w.p,m,T*E*d),!S.fixed&&fs(S.p,S.p,m,-(1-T)*E*d)}}for(var _=0;_<y;_++){var C=n[_];C.fixed||(Ka(m,l,C.p),fs(C.p,C.p,m,u*d))}for(var _=0;_<y;_++)for(var w=n[_],D=_+1;D<y;D++){var S=n[D];Ka(m,S.p,w.p);var E=Bd(m);E===0&&(wP(m,Math.random()-.5,Math.random()-.5),E=1);var M=(w.rep+S.rep)/E/E;!w.fixed&&fs(w.pp,w.pp,m,M),!S.fixed&&fs(S.pp,S.pp,m,-M)}for(var k=[],_=0;_<y;_++){var C=n[_];C.fixed||(Ka(k,C.p,C.pp),fs(C.p,C.p,k,d),Wt(C.pp,C.p))}d=d*.992;var N=d<.01;v&&v(n,a,N),g&&g(N)}}}function D6(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 x=i.getId(_);i.setItemLayout(_,n[x]||[NaN,NaN])}):!l||l==="none"?rM(e):l==="circular"&&sy(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),d=G(f)?f:[f,f],p=G(h)?h:[h,h];p=[p[1],p[0]];var v=i.mapArray("value",function(_,x){var w=i.getItemLayout(x),S=$e(_,u,d);return isNaN(S)&&(S=(d[0]+d[1])/2),{w:S,rep:S,fixed:i.getItemModel(x).get("fixed"),p:!w||isNaN(w[0])||isNaN(w[1])?null:w}}),g=o.mapArray("value",function(_,x){var w=a.getEdgeByIndex(x),S=$e(_,c,p);isNaN(S)&&(S=(p[0]+p[1])/2);var E=w.getModel(),T=br(w.getModel().get(["lineStyle","curveness"]),-ay(w,e,x,!0),0);return{n1:v[w.node1.dataIndex],n2:v[w.node2.dataIndex],d:S,curveness:T,ignoreForceLayout:E.get("ignoreForceLayout")}}),m=t.getBoundingRect(),y=C6(v,g,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(_,x){for(var w=0,S=_.length;w<S;w++)_[w].fixed&&Wt(_[w].p,a.getNodeByIndex(w).getLayout())}),y.afterStep(function(_,x,w){for(var S=0,E=_.length;S<E;S++)_[S].fixed||a.getNodeByIndex(S).setLayout(_[S].p),n[i.getId(S)]=_[S].p;for(var S=0,E=x.length;S<E;S++){var T=x[S],C=a.getEdgeByIndex(S),D=T.n1.p,M=T.n2.p,k=C.getLayout();k=k?k.slice():[],k[0]=k[0]||[],k[1]=k[1]||[],Wt(k[0],D),Wt(k[1],M),+T.curveness&&(k[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(k)}}),e.forceLayout=y,e.preservedPoints=n,y.step()}else e.forceLayout=null})}function A6(r,e,t){var n=F(r.getBoxLayoutParams(),{aspect:t});return bt(n,{width:e.getWidth(),height:e.getHeight()})}function M6(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 m=i.getItemModel(g);return[+m.get("x"),+m.get("y")]}),s=[],l=[];Bc(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]),c=A6(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],h=l[1]-s[1],d=c.width,p=c.height,v=n.coordinateSystem=new hu;v.zoomLimit=n.get("scaleLimit"),v.setBoundingRect(s[0],s[1],f,h),v.setViewRect(c.x,c.y,d,p),v.setCenter(n.get("center"),e),v.setZoom(n.get("zoom")),t.push(v)}}),t}var iM=St.prototype,ly=ml.prototype,oM=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(oM);function uy(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var k6=function(r){V(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 oM},e.prototype.buildPath=function(t,n){uy(n)?iM.buildPath.call(this,t,n):ly.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return uy(this.shape)?iM.pointAt.call(this,t):ly.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=uy(n)?[n.x2-n.x1,n.y2-n.y1]:ly.tangentAt.call(this,t);return po(a,a)},e}(De),cy=["fromSymbol","toSymbol"];function sM(r){return"_"+r+"Type"}function lM(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=jo(a),u=Oi(o||0,l);return n+l+u+(i||"")+(s||"")}function uM(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=jo(a),u=Oi(o||0,l),c=yt(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=r,c}}function N6(r){var e=new k6({name:"line",subPixelOptimize:!0});return fy(e.shape,r),e}function fy(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 hy=function(r){V(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=N6(o);s.shape.percent=0,tt(s,{shape:{percent:1}},i,n),this.add(s),A(cy,function(l){var u=uM(l,t,n);this.add(u),this[sM(l)]=lM(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:{}};fy(l.shape,s),Ve(o,l,i,n),A(cy,function(u){var c=lM(u,t,n),f=sM(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=uM(u,t,n);this.add(h)}this[f]=c},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,c=a&&a.labelStatesModels,f=a&&a.emphasisDisabled,h=a&&a.focus,d=a&&a.blurScope;if(!a||t.hasItemOption){var p=t.getItemModel(n),v=p.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),f=v.get("disabled"),h=v.get("focus"),d=v.get("blurScope"),c=Et(p)}var g=t.getItemVisual(n,"style"),m=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(cy,function(S){var E=this.childOfName(S);if(E){E.setColor(m),E.style.opacity=g.opacity;for(var T=0;T<Xt.length;T++){var C=Xt[T],D=o.getState(C);if(D){var M=D.style||{},k=E.ensureState(C),N=k.style||(k.style={});M.stroke!=null&&(N[E.__isEmptyBrush?"stroke":"fill"]=M.stroke),M.opacity!=null&&(N.opacity=M.opacity)}}E.markRedraw()}},this);var y=i.getRawValue(n);Pt(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(S,E){return i.getFormattedLabel(S,E,t.dataType)}},inheritColor:m||"#000",defaultOpacity:g.opacity,defaultText:(y==null?t.getName(n):isFinite(y)?ct(y):y)+""});var _=this.getTextContent();if(_){var x=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var w=x.get("distance");G(w)||(w=[w,w]),_.__labelDistance=w}this.setTextConfig({position:null,local:!0,inside:!1}),lt(this,h,d,f)},e.prototype.highlight=function(){$n(this)},e.prototype.downplay=function(){Gn(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");fy(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,c=l.pointAt(0),f=l.pointAt(u),h=Ka([],f,c);po(h,h);function d(D,M){var k=D.__specifiedRotation;if(k==null){var N=l.tangentAt(M);D.attr("rotation",(M===1?-1:1)*Math.PI/2-Math.atan2(N[1],N[0]))}else D.attr("rotation",k)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(f),d(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,v=void 0,g=i.__labelDistance,m=g[0]*o,y=g[1]*o,_=u/2,x=l.tangentAt(_),w=[x[1],-x[0]],S=l.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var E=x[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(x[1],x[0]);f[0]<c[0]&&(T=Math.PI+T),i.rotation=T}var C=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":C=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":C=y,v="top";break;default:C=0,v="middle"}switch(i.__position){case"end":i.x=h[0]*m+f[0],i.y=h[1]*y+f[1],p=h[0]>.8?"left":h[0]<-.8?"right":"center",v=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*m+c[0],i.y=-h[1]*y+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",v=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=m*E+c[0],i.y=c[1]+C,p=x[0]<0?"right":"left",i.originX=-m*E,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=S[0],i.y=S[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-m*E+f[0],i.y=f[1]+C,p=x[0]>=0?"right":"left",i.originX=m*E,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||v,align:i.__align||p})}},e}(fe),dy=function(){function r(e){this.group=new fe,this._LineCtor=e||hy}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=cM(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=cM(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!I6(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=t.getItemLayout(a);if(py(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){_a(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(py(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(!py(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 I6(r){return r.animators&&r.animators.length>0}function cM(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:Et(e)}}function fM(r){return isNaN(r[0])||isNaN(r[1])}function py(r){return r&&!fM(r[0])&&!fM(r[1])}var vy=[],gy=[],my=[],hs=Nt,yy=Qa,hM=Math.abs;function dM(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){vy[0]=hs(n[0],a[0],i[0],c),vy[1]=hs(n[1],a[1],i[1],c);var f=hM(yy(vy,e)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var d=s+u;gy[0]=hs(n[0],a[0],i[0],s),gy[1]=hs(n[1],a[1],i[1],s),my[0]=hs(n[0],a[0],i[0],d),my[1]=hs(n[1],a[1],i[1],d);var f=yy(gy,e)-l;if(hM(f)<.01)break;var p=yy(my,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 _y(r,e){var t=[],n=Ys,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Nn(u[0]),Nn(u[1])],u[2]&&u.__original.push(Nn(u[2])));var h=u.__original;if(u[2]!=null){if(Wt(a[0],h[0]),Wt(a[1],h[2]),Wt(a[2],h[1]),c&&c!=="none"){var d=Su(s.node1),p=dM(a,h[0],d*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 d=Su(s.node2),p=dM(a,h[1],d*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]}Wt(u[0],a[0]),Wt(u[1],a[2]),Wt(u[2],a[1])}else{if(Wt(i[0],h[0]),Wt(i[1],h[1]),Ka(o,i[1],i[0]),po(o,o),c&&c!=="none"){var d=Su(s.node1);Pd(i[0],i[0],o,d*e)}if(f&&f!=="none"){var d=Su(s.node2);Pd(i[1],i[1],o,-d*e)}Wt(u[0],i[0]),Wt(u[1],i[1])}})}function pM(r){return r.type==="view"}var L6=function(r){V(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 ru,i=new dy,o=this.group;this._controller=new cu(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(pM(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Ve(u,c,t)}_y(t.getGraph(),wu(t));var f=t.getData();s.updateData(f);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,n,a),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var v=t.get("layout");f.graph.eachNode(function(_){var x=_.dataIndex,w=_.getGraphicEl(),S=_.getModel();if(w){w.off("drag").off("dragend");var E=S.get("draggable");E&&w.on("drag",function(C){switch(v){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,p),d.setFixed(x),f.setItemLayout(x,[w.x,w.y]);break;case"circular":f.setItemLayout(x,[w.x,w.y]),_.setLayout({fixed:!0},!0),sy(t,"symbolSize",_,[C.offsetX,C.offsetY]),i.updateLayout(t);break;case"none":default:f.setItemLayout(x,[w.x,w.y]),iy(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(x)}),w.setDraggable(E,!!S.get("cursor"));var T=S.get(["emphasis","focus"]);T==="adjacency"&&(ve(w).focus=_.getAdjacentDataIndices())}}),f.graph.eachEdge(function(_){var x=_.getGraphicEl(),w=_.getModel().get(["emphasis","focus"]);x&&w==="adjacency"&&(ve(x).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=f.getLayout("cx"),y=f.getLayout("cy");f.graph.eachNode(function(_){aM(_,g,m,y)}),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,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!gh(u,a,t)}),!pM(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){Lm(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Rm(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(),_y(t.getGraph(),wu(t)),i._lineDraw.updateLayout(),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=wu(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){_y(t.getGraph(),wu(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}(We),R6={};function ds(r){return"_EC_"+r}var O6=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[ds(e)]){R6.NODE_ENV!=="production"&&console.error("Graph nodes have duplicate name or id");return}var a=new eo(e,t);return a.hostGraph=this,this.nodes.push(a),n[ds(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[ds(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(Oe(e)&&(e=this.nodes[e]),Oe(t)&&(t=this.nodes[t]),e instanceof eo||(e=a[ds(e)]),t instanceof eo||(t=a[ds(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new vM(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 eo&&(e=e.id),t instanceof eo&&(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 eo||(t=this._nodesMap[ds(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 c=u[o],f=c.node1===l?c.node2:c.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}(),eo=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=te(),t=te(),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 c=o[s];s++,t.set(c.dataIndex,!0);for(var u=0;u<c.outEdges.length;u++)e.set(c.outEdges[u].dataIndex,!0),o.push(c.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r}(),vM=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=te(),t=te();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 gM(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)}}}dt(eo,gM("hostGraph","data")),dt(vM,gM("hostGraph","edgeData"));function mM(r,e,t,n,a){for(var i=new O6(n),o=0;o<r.length;o++)i.addNode(pt(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],f=c.source,h=c.target;i.addEdge(f,h,u)&&(l.push(c),s.push(pt(_t(c.id,null),f+" > "+h)),u++)}var d=t.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar")p=Zn(r,t);else{var v=Wo.get(d),g=v?v.dimensions||[]:[];we(g,"value")<0&&g.concat(["value"]);var m=Zl(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Jt(m,t),p.initData(r)}var y=new Jt(["value"],t);return y.initData(l,s),a&&a(p,y),NA({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var P6=function(r){V(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 su(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),oi(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){x6(this);var s=mM(i,a,this,!0,l);return A(s.edges,function(u){w6(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var v=o._categoriesModels,g=p.getShallow("category"),m=v[g];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var f=Ge.prototype.getModel;function h(p,v){var g=f.call(this,p,v);return g.resolveParentPath=d,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=h,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var v=p.slice();return p[0]==="label"?v[0]="edgeLabel":p[1]==="label"&&(v[1]="edgeLabel"),v}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),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Tt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=tE({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=H(this.option.categories||[],function(a){return a.value!=null?a:F({value:0},a)}),n=new Jt(["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}(Ke),B6={type:"graphRoam",event:"graphRoam",update:"none"};function V6(r){r.registerChartView(L6),r.registerSeriesModel(P6),r.registerProcessor(g6),r.registerVisual(m6),r.registerVisual(y6),r.registerLayout(S6),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,T6),r.registerLayout(D6),r.registerCoordinateSystem("graphView",{dimensions:hu.dimensions,create:M6}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ft),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ft),r.registerAction(B6,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=a.coordinateSystem,o=$m(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}var z6=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),F6=function(r){V(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new z6},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),c=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),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,c)},e}(De);function $6(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 Mh(r,e){var t=r==null?"":r+"";return e&&(X(e)?t=e.replace("{value}",t):ie(e)&&(t=e(r))),t}var G6=function(r){V(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=$6(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,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),h=f.get("roundCap"),d=h?uh:Kt,p=f.get("show"),v=f.getModel("lineStyle"),g=v.get("width"),m=[u,c];tv(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,x=[],w=0;p&&w<i.length;w++){var S=Math.min(Math.max(i[w][0],0),1);c=u+y*S;var E=new d({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});E.setStyle({fill:i[w][1]}),E.setStyle(v.getLineStyle(["color","width"])),x.push(E),_=c}x.reverse(),A(x,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,c,l,g),this._renderTitleAndDetail(t,n,a,T,o),this._renderAnchor(t,o),this._renderPointer(t,n,a,T,o,u,c,l,g)},e.prototype._renderTicks=function(t,n,a,i,o,s,l,u,c){for(var f=this.group,h=o.cx,d=o.cy,p=o.r,v=+t.get("min"),g=+t.get("max"),m=t.getModel("splitLine"),y=t.getModel("axisTick"),_=t.getModel("axisLabel"),x=t.get("splitNumber"),w=y.get("splitNumber"),S=W(m.get("length"),p),E=W(y.get("length"),p),T=s,C=(l-s)/x,D=C/w,M=m.getModel("lineStyle").getLineStyle(),k=y.getModel("lineStyle").getLineStyle(),N=m.get("distance"),L,R,I=0;I<=x;I++){if(L=Math.cos(T),R=Math.sin(T),m.get("show")){var O=N?N+c:c,P=new St({shape:{x1:L*(p-O)+h,y1:R*(p-O)+d,x2:L*(p-S-O)+h,y2:R*(p-S-O)+d},style:M,silent:!0});M.stroke==="auto"&&P.setStyle({stroke:i(I/x)}),f.add(P)}if(_.get("show")){var O=_.get("distance")+N,B=Mh(ct(I/x*(g-v)+v),_.get("formatter")),z=i(I/x),$=L*(p-S-O)+h,U=R*(p-S-O)+d,j=_.get("rotate"),Z=0;j==="radial"?(Z=-T+2*Math.PI,Z>Math.PI/2&&(Z+=Math.PI)):j==="tangential"?Z=-T-Math.PI/2:Oe(j)&&(Z=j*Math.PI/180),Z===0?f.add(new Le({style:Xe(_,{text:B,x:$,y:U,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:L<-.4?"left":L>.4?"right":"center"},{inheritColor:z}),silent:!0})):f.add(new Le({style:Xe(_,{text:B,x:$,y:U,verticalAlign:"middle",align:"center"},{inheritColor:z}),silent:!0,originX:$,originY:U,rotation:Z}))}if(y.get("show")&&I!==x){var O=y.get("distance");O=O?O+c:c;for(var ee=0;ee<=w;ee++){L=Math.cos(T),R=Math.sin(T);var he=new St({shape:{x1:L*(p-O)+h,y1:R*(p-O)+d,x2:L*(p-E-O)+h,y2:R*(p-E-O)+d},silent:!0,style:k});k.stroke==="auto"&&he.setStyle({stroke:i((I+ee/w)/x)}),f.add(he),T+=D}T-=D}else T+=C}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,p=[],v=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),y=t.getData(),_=y.mapDimension("value"),x=+t.get("min"),w=+t.get("max"),S=[x,w],E=[s,l];function T(D,M){var k=y.getItemModel(D),N=k.getModel("pointer"),L=W(N.get("width"),o.r),R=W(N.get("length"),o.r),I=t.get(["pointer","icon"]),O=N.get("offsetCenter"),P=W(O[0],o.r),B=W(O[1],o.r),z=N.get("keepAspect"),$;return I?$=yt(I,P-L/2,B-R,L,R,null,z):$=new F6({shape:{angle:-Math.PI/2,width:L,r:R,x:P,y:B}}),$.rotation=-(M+Math.PI/2),$.x=o.cx,$.y=o.cy,$}function C(D,M){var k=g.get("roundCap"),N=k?uh:Kt,L=g.get("overlap"),R=L?g.get("width"):c/y.count(),I=L?o.r-R:o.r-(D+1)*R,O=L?o.r:o.r-D*R,P=new N({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:I,r:O}});return L&&(P.z2=$e(y.get(_,D),[x,w],[100,0],!0)),P}(m||v)&&(y.diff(h).add(function(D){var M=y.get(_,D);if(v){var k=T(D,s);tt(k,{rotation:-((isNaN(+M)?E[0]:$e(M,S,E,!0))+Math.PI/2)},t),f.add(k),y.setItemGraphicEl(D,k)}if(m){var N=C(D,s),L=g.get("clip");tt(N,{shape:{endAngle:$e(M,S,E,L)}},t),f.add(N),av(t.seriesIndex,y.dataType,D,N),p[D]=N}}).update(function(D,M){var k=y.get(_,D);if(v){var N=h.getItemGraphicEl(M),L=N?N.rotation:s,R=T(D,L);R.rotation=L,Ve(R,{rotation:-((isNaN(+k)?E[0]:$e(k,S,E,!0))+Math.PI/2)},t),f.add(R),y.setItemGraphicEl(D,R)}if(m){var I=d[M],O=I?I.shape.endAngle:s,P=C(D,O),B=g.get("clip");Ve(P,{shape:{endAngle:$e(k,S,E,B)}},t),f.add(P),av(t.seriesIndex,y.dataType,D,P),p[D]=P}}).execute(),y.each(function(D){var M=y.getItemModel(D),k=M.getModel("emphasis"),N=k.get("focus"),L=k.get("blurScope"),R=k.get("disabled");if(v){var I=y.getItemGraphicEl(D),O=y.getItemVisual(D,"style"),P=O.fill;if(I instanceof It){var B=I.style;I.useStyle(F({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},O))}else I.useStyle(O),I.type!=="pointer"&&I.setColor(P);I.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),I.style.fill==="auto"&&I.setStyle("fill",i($e(y.get(_,D),S,[0,1],!0))),I.z2EmphasisLift=0,Ot(I,M),lt(I,N,L,R)}if(m){var z=p[D];z.useStyle(y.getItemVisual(D,"style")),z.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),z.z2EmphasisLift=0,Ot(z,M),lt(z,N,L,R)}}),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"),c=yt(s,n.cx-o/2+W(l[0],n.r),n.cy-o/2+W(l[1],n.r),o,o,null,u);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),h=new fe,d=[],p=[],v=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new Le({silent:!0}),p[m]=new Le({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],p[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),x=new fe,w=i($e(_,[c,f],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var E=S.get("offsetCenter"),T=o.cx+W(E[0],o.r),C=o.cy+W(E[1],o.r),D=d[m];D.attr({z2:g?0:2,style:Xe(S,{x:T,y:C,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:w})}),x.add(D)}var M=y.getModel("detail");if(M.get("show")){var k=M.get("offsetCenter"),N=o.cx+W(k[0],o.r),L=o.cy+W(k[1],o.r),R=W(M.get("width"),o.r),I=W(M.get("height"),o.r),O=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:w,D=p[m],P=M.get("formatter");D.attr({z2:g?0:2,style:Xe(M,{x:N,y:L,text:Mh(_,P),width:isNaN(R)?null:R,height:isNaN(I)?null:I,align:"center",verticalAlign:"middle"},{inheritColor:O})}),kw(D,{normal:M},_,function(z){return Mh(z,P)}),v&&Nw(D,m,l,t,{getFormattedLabel:function(z,$,U,j,Z,ee){return Mh(ee?ee.interpolatedValue:_,P)}}),x.add(D)}h.add(x)}),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(We),H6=function(r){V(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 ls(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}(Ke);function U6(r){r.registerChartView(G6),r.registerSeriesModel(H6)}var W6=["itemStyle","opacity"],Y6=function(r){V(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new jt,s=new Le;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"),c=s.get(W6);c=c??1,a||Kr(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,tt(i,{style:{opacity:c}},o,n)):Ve(i,{style:{opacity:c},shape:{points:l.points}},o,n),Ot(i,s),this._updateLabel(t,n),lt(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),c=u.label,f=t.getItemVisual(n,"style"),h=f.fill;Pt(o,Et(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),a.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var d=c.linePoints;i.setShape({points:d}),a.textGuideLineConfig={anchor:d?new be(d[0][0],d[0][1]):null},Ve(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),Kg(a,Qg(l),{stroke:h})},e}(Qt),Z6=function(r){V(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 Y6(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);_l(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}(We),q6=function(r){V(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 su(K(this.getData,this),K(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return ls(this,{coordDimensions:["value"],encodeDefaulter:me(zv,this)})},e.prototype._defaultLabelLine=function(t){oi(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}(Ke),X6={};function K6(r,e){return bt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Q6(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 ie(e)?a.sort(e):e!=="none"&&a.sort(function(l,u){return i?n[l]-n[u]:n[u]-n[l]}),a}function j6(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,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,h,d,p;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,f="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),p=[[h,d],[h,d]];else{var v=void 0,g=void 0,m=void 0,y=void 0,_=s.get("length");X6.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"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=v-_,h=m-5,f="right"):o==="right"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=v+_,h=m+5,f="left"):o==="top"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=g-_,d=y-5,f="center"):o==="bottom"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=g+_,d=y+5,f="center"):o==="rightTop"?(v=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(y=g-_,d=y-5,f="center"):(m=v+_,h=m+5,f="top")):o==="rightBottom"?(v=u[2][0],g=u[2][1],t==="horizontal"?(y=g+_,d=y+5,f="center"):(m=v+_,h=m+5,f="bottom")):o==="leftTop"?(v=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(y=g-_,d=y-5,f="center"):(m=v-_,h=m-5,f="right")):o==="leftBottom"?(v=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(y=g+_,d=y+5,f="center"):(m=v-_,h=m-5,f="right")):(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(y=g+_,d=y+5,f="center"):(m=v+_,h=m+5,f="left")),t==="horizontal"?(m=v,h=m):(y=g,d=y),p=[[v,g],[m,y]]}l.label={linePoints:p,x:h,y:d,verticalAlign:"middle",textAlign:f,inside:c}})}function J6(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=K6(t,e),s=t.get("orient"),l=o.width,u=o.height,c=Q6(n,i),f=o.x,h=o.y,d=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),v=t.get("min"),g=t.get("max");v==null&&(v=Math.min(p[0],0)),g==null&&(g=p[1]);var m=t.get("funnelAlign"),y=t.get("gap"),_=s==="horizontal"?l:u,x=(_-y*(n.count()-1))/n.count(),w=function(L,R){if(s==="horizontal"){var I=n.get(a,L)||0,O=$e(I,[v,g],d,!0),P=void 0;switch(m){case"top":P=h;break;case"center":P=h+(u-O)/2;break;case"bottom":P=h+(u-O);break}return[[R,P],[R,P+O]]}var B=n.get(a,L)||0,z=$e(B,[v,g],d,!0),$;switch(m){case"left":$=f;break;case"center":$=f+(l-z)/2;break;case"right":$=f+l-z;break}return[[$,R],[$+z,R]]};i==="ascending"&&(x=-x,y=-y,s==="horizontal"?f+=l:h+=u,c=c.reverse());for(var S=0;S<c.length;S++){var E=c[S],T=c[S+1],C=n.getItemModel(E);if(s==="horizontal"){var D=C.get(["itemStyle","width"]);D==null?D=x:(D=W(D,l),i==="ascending"&&(D=-D));var M=w(E,f),k=w(T,f+D);f+=D+y,n.setItemLayout(E,{points:M.concat(k.slice().reverse())})}else{var N=C.get(["itemStyle","height"]);N==null?N=x:(N=W(N,u),i==="ascending"&&(N=-N));var M=w(E,h),k=w(T,h+N);h+=N+y,n.setItemLayout(E,{points:M.concat(k.slice().reverse())})}}j6(n)})}function e8(r){r.registerChartView(Z6),r.registerSeriesModel(q6),r.registerLayout(J6),r.registerProcessor(ou("funnel"))}var t8=.3,r8=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new fe,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,c=u.dimensions,f=bM(t);s.diff(l).add(h).update(d).remove(p).execute();function h(g){var m=_M(s,o,g,c,u);by(m,s,g,f)}function d(g,m){var y=l.getItemGraphicEl(m),_=yM(s,g,c,u);s.setItemGraphicEl(g,y),Ve(y,{shape:{points:_}},t,g),Kr(y),by(y,s,g,f)}function p(g){var m=l.getItemGraphicEl(g);o.remove(m)}if(!this._initialized){this._initialized=!0;var v=n8(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(v)}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=bM(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=_M(i,this._dataGroup,c,s,o);f.incremental=!0,by(f,i,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(We);function n8(r,e,t){var n=r.model,a=r.getRect(),i=new Ie({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),tt(i,{shape:{width:a.width,height:a.height}},e,t),i}function yM(r,e,t,n){for(var a=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);a8(s,n.getAxis(o).type)||a.push(n.dataToPoint(s,o))}return a}function _M(r,e,t,n,a){var i=yM(r,t,n,a),o=new jt({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function bM(r){var e=r.get("smooth",!0);return e===!0&&(e=t8),e=Bn(e),qa(e)&&(e=0),{smooth:e}}function by(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");Ot(r,a,"lineStyle"),lt(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function a8(r,e){return e==="category"?r==null:r==null||isNaN(r)}var i8=function(r){V(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 Zn(null,this,{useEncodeDefaulter:K(o8,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}(Ke);function o8(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return A(e.dimensions,function(n){var a=s8(n);t[n]=a}),t}}function s8(r){return+r.replace("dim","")}var l8=["lineStyle","opacity"],u8={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(l8,!0);u!=null&&(l=u)}var c=i.ensureUniqueItemVisual(s,"style");c.opacity=l},a.start,a.end)}}}};function c8(r){f8(r),h8(r)}function f8(r){if(!r.parallel){var e=!1;A(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function h8(r){var e=He(r.parallelAxis);A(e,function(t){if(oe(t)){var n=t.parallelIndex||0,a=He(r.parallel)[n];a&&a.parallelAxisDefault&&_e(t,a.parallelAxisDefault,!1)}})}var d8=5,p8=function(r){V(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(v8,function(i,o){a.getZr().on(o,this._handlers[o]=K(i,this))},this)),Ko(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){Rl(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(F({type:"parallelAxisExpand"},t))},e.type="parallel",e}(at),v8={mousedown:function(r){xy(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(xy(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>d8)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||!xy(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 xy(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var g8=function(r){V(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&&_e(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=ze(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}(Ae),m8=function(r){V(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}(rn);function to(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=ps(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=ps(s,[0,o]),a=i=ps(s,[a,i]),n=0}e[0]=ps(e[0],t),e[1]=ps(e[1],t);var l=wy(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=ps(e[n],c);var f;return f=wy(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=wy(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function wy(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 ps(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Sy=A,xM=Math.min,wM=Math.max,SM=Math.floor,y8=Math.ceil,EM=ct,_8=Math.PI,b8=function(){function r(e,t,n){this.type="parallel",this._axesMap=te(),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;Sy(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new m8(o,eh(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.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();Sy(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),as(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=bt(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,c=kh(e.get("axisExpandWidth"),l),f=kh(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=kh(d[1]-d[0],l),d[1]=d[0]+p;else{p=kh(c*(f-1),l);var v=e.get("axisExpandCenter")||SM(u/2);d=[c*v-p/2],d[1]=d[0]+p}var g=(s-p)/(u-f);g<3&&(g=0);var m=[SM(EM(d[0]/c,1))+1,y8(EM(d[1]/c,1))-1],y=g/c*d[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},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])}),Sy(n,function(o,s){var l=(a.axisExpandable?w8:x8)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},c={horizontal:_8/2,vertical:0},f=[u[i].x+e.x,u[i].y+e.y],h=c[i],d=fr();ja(d,d,h),ln(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,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(),c=n;c<a;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var h=e.getValues(s,c),d=0,p=o.length;d<p;d++){var v=l[d].getActiveState(h[d]);if(v==="inactive"){f="inactive";break}}}t(f,c)}},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 jr([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return ce(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",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),h=f[0]!=null;if(c)h&&c&&s<i*f[0]?(u="jump",l=s-i*f[2]):h&&c&&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/c,l?to(l,a,o,"all"):u="none";else{var d=a[1]-a[0],p=o[1]*s/d;a=[wM(0,p-d/2)],a[1]=xM(o[1],a[0]+d),a[0]=a[1]-d}return{axisExpandWindow:a,behavior:u}},r}();function kh(r,e){return xM(wM(r,e[0]),e[1])}function x8(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function w8(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r<o[0]?(s=r*i,c=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(a-1-r)*i,c=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function S8(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new b8(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",gt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var E8={create:S8},Ey=function(r){V(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 ui([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=ce(t);if(n)for(var a=n.length-1;a>=0;a--)Tr(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}(Ae);dt(Ey,Xl);var ro={},no=!0,Eu=Math.min,vs=Math.max,T8=Math.pow,C8=1e4,D8=6,A8=6,TM="globalPan",M8={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},k8={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},CM={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},N8=0,Ty=function(r){V(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},ro.NODE_ENV!=="production"&&se(t),n._zr=t,n.group=new fe,n._uid="brushController_"+N8++,A(V8,function(a,i){this._handlers[i]=K(a,this)},n),n}return e.prototype.enableBrush=function(t){return ro.NODE_ENV!=="production"&&se(this._mounted),this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||vU(n,TM,this._uid),A(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=_e(ce(CM),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;gU(t,TM,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]=ce(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},ro.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){ro.NODE_ENV!=="production"&&se(this._mounted),t=H(t,function(h){return _e(ce(CM),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Yn(a,t,u,l).add(c).update(c).remove(f).execute(),this;function l(h,d){return(h.id!=null?h.id:n+d)+"-"+h.brushType}function u(h,d){return l(h.__brushOption,d)}function c(h,d){var p=t[h];if(d!=null&&a[d]===s)i[h]=a[d];else{var v=i[h]=d!=null?(a[d].__brushOption=p,a[d]):AM(o,DM(o,p));Cy(o,v)}}function f(h){a[h]!==s&&o.group.remove(a[h])}},e.prototype.unmount=function(){if(!(ro.NODE_ENV!=="production"&&!this._mounted))return this.enableBrush(!1),My(this),this._zr.remove(this.group),ro.NODE_ENV!=="production"&&(this._mounted=!1),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(xr);function DM(r,e){var t=Nh[e.brushType].createCover(r,e);return t.__brushOption=e,kM(t,e),r.group.add(t),t}function AM(r,e){var t=Dy(e);return t.endCreating&&(t.endCreating(r,e),kM(e,e.__brushOption)),e}function MM(r,e){var t=e.__brushOption;Dy(e).updateCoverShape(r,e,t.range,t)}function kM(r,e){var t=e.z;t==null&&(t=C8),r.traverse(function(n){n.z=t,n.z2=t})}function Cy(r,e){Dy(e).updateCommon(r,e),MM(r,e)}function Dy(r){return Nh[r.__brushOption.brushType]}function Ay(r,e,t){var n=r._panels;if(!n)return no;var a,i=r._transform;return A(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function NM(r,e){var t=r._panels;if(!t)return no;var n=e.__brushOption.panelId;return n!=null?t[n]:no}function My(r){var e=r._covers,t=e.length;return A(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function ao(r,e){var t=H(r._covers,function(n){var a=n.__brushOption,i=ce(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function I8(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=T8(a*a+i*i,.5);return o>D8}function IM(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function LM(r,e,t,n){var a=new fe;return a.add(new Ie({name:"main",style:Ny(t),silent:!0,draggable:!0,cursor:"move",drift:me(PM,r,e,a,["n","s","w","e"]),ondragend:me(ao,e,{isEnd:!0})})),A(n,function(i){a.add(new Ie({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:me(PM,r,e,a,i),ondragend:me(ao,e,{isEnd:!0})}))}),a}function RM(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=vs(a,A8),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,c=t[0][1],f=t[1][1],h=c-i+a/2,d=f-i+a/2,p=c-o,v=f-s,g=p+a,m=v+a;Kn(r,e,"main",o,s,p,v),n.transformable&&(Kn(r,e,"w",l,u,i,m),Kn(r,e,"e",h,u,i,m),Kn(r,e,"n",l,u,g,i),Kn(r,e,"s",l,d,g,i),Kn(r,e,"nw",l,u,i,i),Kn(r,e,"ne",h,u,i,i),Kn(r,e,"sw",l,d,i,i),Kn(r,e,"se",h,d,i,i))}function ky(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(Ny(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?Iy(r,i[0]):R8(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?k8[s]+"-resize":null})})}function Kn(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(P8(Ly(r,e,[[n,a],[n+i,a+o]])))}function Ny(r){return le({strokeNoScale:!0},r.brushStyle)}function OM(r,e,t,n){var a=[Eu(r,t),Eu(e,n)],i=[vs(r,t),vs(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function L8(r){return Ti(r.group)}function Iy(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=nf(t[e],L8(r));return n[a]}function R8(r,e){var t=[Iy(r,e[0]),Iy(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function PM(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=BM(e,a,i);A(n,function(u){var c=M8[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(OM(s[0][0],s[1][0],s[0][1],s[1][1])),Cy(e,t),ao(e,{isEnd:!1})}function O8(r,e,t,n){var a=e.__brushOption.range,i=BM(r,t,n);A(a,function(o){o[0]+=i[0],o[1]+=i[1]}),Cy(r,e),ao(r,{isEnd:!1})}function BM(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 Ly(r,e,t){var n=NM(r,e);return n&&n!==no?n.clipPath(t,r._transform):ce(t)}function P8(r){var e=Eu(r[0][0],r[1][0]),t=Eu(r[0][1],r[1][1]),n=vs(r[0][0],r[1][0]),a=vs(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function B8(r,e,t){if(!(!r._brushType||z8(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=Ay(r,e,t);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===no||s.panelId===i.panelId)&&Nh[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function Ry(r){var e=r.event;e.preventDefault&&e.preventDefault()}function Oy(r,e,t){return r.childOfName("main").contain(e,t)}function VM(r,e,t,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),I8(r)||a){if(i&&!a){o.brushMode==="single"&&My(r);var l=ce(o);l.brushType=zM(l.brushType,i),l.panelId=i===no?null:i.panelId,a=r._creatingCover=DM(r,l),r._covers.push(a)}if(a){var u=Nh[zM(r._brushType,i)],c=a.__brushOption;c.range=u.getCreatingRange(Ly(r,a,r._track)),n&&(AM(r,a),u.updateCommon(r,a)),MM(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&Ay(r,e,t)&&My(r)&&(s={isEnd:n,removeOnClick:!0});return s}function zM(r,e){return r==="auto"?(ro.NODE_ENV!=="production"&&se(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):r}var V8={mousedown:function(r){if(this._dragging)FM(this,r);else if(!r.target||!r.target.draggable){Ry(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=Ay(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(B8(this,r,n),this._dragging){Ry(r);var a=VM(this,r,n,!1);a&&ao(this,a)}},mouseup:function(r){FM(this,r)}};function FM(r,e){if(r._dragging){Ry(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=VM(r,e,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&ao(r,i)}}function z8(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var Nh={lineX:$M(0),lineY:$M(1),rect:{createCover:function(r,e){function t(n){return n}return LM({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=IM(r);return OM(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){RM(r,e,t,n)},updateCommon:ky,contain:Oy},polygon:{createCover:function(r,e){var t=new fe;return t.add(new jt({name:"main",style:Ny(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Qt({name:"main",draggable:!0,drift:me(O8,r,e),ondragend:me(ao,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:Ly(r,e,t)})},updateCommon:ky,contain:Oy}};function $M(r){return{createCover:function(e,t){return LM({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=IM(e),n=Eu(t[0][r],t[1][r]),a=vs(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=NM(e,t);if(o!==no&&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(),RM(e,t,l,a)},updateCommon:ky,contain:Oy}}function GM(r){return r=Py(r),function(e){return ww(e,r)}}function HM(r,e){return r=Py(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 UM(r,e,t){var n=Py(r);return function(a,i){return n.contain(i[0],i[1])&&!gh(a,e,t)}}function Py(r){return xe.create(r)}var F8=["axisLine","axisTickLabel","axisName"],$8=function(r){V(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 Ty(n.getZr())).on("brush",K(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!G8(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new fe,this.group.add(this._axisGroup),!!t.get("show")){var s=U8(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,h=l.getAxisLayout(f),d=F({strokeContainThreshold:c},h),p=new rr(t,d);A(F8,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,u,t,s,c,a),bl(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=xe.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:GM(f),isTargetByCursor:UM(f,s,i),getLinearBrushOtherExtent:HM(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(H8(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=H(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}(at);function G8(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function H8(r){var e=r.axis;return H(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function U8(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var W8={type:"axisAreaSelect",event:"axisAreaSelected"};function Y8(r){r.registerAction(W8,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 Z8={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function WM(r){r.registerComponentView(p8),r.registerComponentModel(g8),r.registerCoordinateSystem("parallel",E8),r.registerPreprocessor(c8),r.registerComponentModel(Ey),r.registerComponentView($8),us(r,"parallel",Ey,Z8),Y8(r)}function q8(r){Te(WM),r.registerChartView(r8),r.registerSeriesModel(i8),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,u8)}var X8=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}(),K8=function(r){V(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new X8},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(){$n(this)},e.prototype.downplay=function(){Gn(this)},e}(De),Q8=function(r){V(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,c=l.height,f=t.getData(),h=t.getData("edge"),d=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var v=new K8,g=ve(v);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),x=p.node1.getLayout(),w=p.node1.getModel(),S=w.get("localX"),E=w.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),D=C.get("localX"),M=C.get("localY"),k=p.getLayout(),N,L,R,I,O,P,B,z;v.shape.extent=Math.max(1,k.dy),v.shape.orient=d,d==="vertical"?(N=(S!=null?S*u:x.x)+k.sy,L=(E!=null?E*c:x.y)+x.dy,R=(D!=null?D*u:T.x)+k.ty,I=M!=null?M*c:T.y,O=N,P=L*(1-_)+I*_,B=R,z=L*_+I*(1-_)):(N=(S!=null?S*u:x.x)+x.dx,L=(E!=null?E*c:x.y)+k.sy,R=D!=null?D*u:T.x,I=(M!=null?M*c:T.y)+k.ty,O=N*(1-_)+R*_,P=L,B=N*_+R*(1-_),z=I),v.setShape({x1:N,y1:L,x2:R,y2:I,cpx1:O,cpy1:P,cpx2:B,cpy2:z}),v.useStyle(y.getItemStyle()),YM(v.style,d,p);var $=""+m.get("value"),U=Et(m,"edgeLabel");Pt(v,U,{labelFetcher:{getFormattedLabel:function(ee,he,Ee,re,J,ue){return t.getFormattedLabel(ee,he,"edge",re,br(J,U.normal&&U.normal.get("formatter"),$),ue)}},labelDataIndex:p.dataIndex,defaultText:$}),v.setTextConfig({position:"inside"});var j=m.getModel("emphasis");Ot(v,m,"lineStyle",function(ee){var he=ee.getItemStyle();return YM(he,d,p),he}),s.add(v),h.setItemGraphicEl(p.dataIndex,v);var Z=j.get("focus");lt(v,Z==="adjacency"?p.getAdjacentDataIndices():Z==="trajectory"?p.getTrajectoryDataIndices():Z,j.get("blurScope"),j.get("disabled"))}),o.eachNode(function(p){var v=p.getLayout(),g=p.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,w=new Ie({shape:{x:m!=null?m*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});Pt(w,Et(g),{labelFetcher:{getFormattedLabel:function(E,T){return t.getFormattedLabel(E,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),w.disableLabelAnimation=!0,w.setStyle("fill",p.getVisual("color")),w.setStyle("decal",p.getVisual("style").decal),Ot(w,g),s.add(w),f.setItemGraphicEl(p.dataIndex,w),ve(w).dataType="node";var S=_.get("focus");lt(w,S==="adjacency"?p.getAdjacentDataIndices():S==="trajectory"?p.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),f.eachItemGraphicEl(function(p,v){var g=f.getItemModel(v);g.get("draggable")&&(p.drift=function(m,y){i._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(j8(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(We);function YM(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");X(n)&&X(a)&&(r.fill=new yl(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function j8(r,e,t){var n=new Ie({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return tt(n,{shape:{width:r.width+20}},e,t),n}var J8={},e9=function(r){V(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 Ge(o[l],this,n);else if(J8.NODE_ENV!=="production")throw new Error("levels[i].depth is mandatory and should be natural number");var u=mM(i,a,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getData().getItemLayout(p);if(g){var m=g.depth,y=v.levelModels[m];y&&(d.parentModel=y)}return d}),h.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,g=v.getGraph().getEdgeByIndex(p),m=g.node1.getLayout();if(m){var y=m.depth,_=v.levelModels[y];_&&(d.parentModel=_)}return d})}},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(d){return isNaN(d)||d==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Tt("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,h=this.getDataParams(t,a).data.name;return Tt("nameValue",{name:h!=null?h+"":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}(Ke);function t9(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=r9(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,c=l.edges;a9(u);var f=ze(u,function(v){return v.getLayout().value===0}),h=f.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),p=t.get("nodeAlign");n9(u,c,n,a,o,s,h,d,p)})}function r9(r,e){return bt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function n9(r,e,t,n,a,i,o,s,l){i9(r,e,t,a,i,s,l),u9(r,e,i,a,n,o,s),y9(r,s)}function a9(r){A(r,function(e){var t=Oa(e.outEdges,Ih),n=Oa(e.inEdges,Ih),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function i9(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<r.length;h++)l[h]=r[h].inEdges.length,l[h]===0&&u.push(r[h]);for(var d=-1;u.length;){for(var p=0;p<u.length;p++){var v=u[p],g=v.hostGraph.data.getRawDataItem(v.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>d&&(d=g.depth),v.setLayout({depth:m?g.depth:f},!0),i==="vertical"?v.setLayout({dy:t},!0):v.setLayout({dx:t},!0);for(var y=0;y<v.outEdges.length;y++){var _=v.outEdges[y],x=e.indexOf(_);s[x]=0;var w=_.node2,S=r.indexOf(w);--l[S]===0&&c.indexOf(w)<0&&c.push(w)}}++f,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var E=d>f-1?d:f-1;o&&o!=="left"&&o9(r,o,i,E);var T=i==="vertical"?(a-t)/E:(n-t)/E;l9(r,T,i)}function ZM(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function o9(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 c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}i=a,a=[],++o}A(r,function(f){ZM(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&s9(r,n)}function s9(r,e){A(r,function(t){!ZM(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function l9(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 u9(r,e,t,n,a,i,o){var s=c9(r,o);f9(s,e,t,n,a,o),By(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,h9(s,l,o),By(s,a,t,n,o),m9(s,l,o),By(s,a,t,n,o)}function c9(r,e){var t=[],n=e==="vertical"?"y":"x",a=Vp(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 f9(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 c=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;c<o&&(o=c)}),A(r,function(s){A(s,function(l,u){var c=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),A(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function By(r,e,t,n,a){var i=a==="vertical"?"x":"y";A(r,function(o){o.sort(function(v,g){return v.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,c=0,f=o.length,h=a==="vertical"?"dx":"dy",d=0;d<f;d++)l=o[d],u=c-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[h]+e;var p=a==="vertical"?n:t;if(u=c-e-p,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[i]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function h9(r,e,t){A(r.slice().reverse(),function(n){A(n,function(a){if(a.outEdges.length){var i=Oa(a.outEdges,d9,t)/Oa(a.outEdges,Ih);if(isNaN(i)){var o=a.outEdges.length;i=o?Oa(a.outEdges,p9,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-Ra(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-Ra(a,t))*e;a.setLayout({y:l},!0)}}})})}function d9(r,e){return Ra(r.node2,e)*r.getValue()}function p9(r,e){return Ra(r.node2,e)}function v9(r,e){return Ra(r.node1,e)*r.getValue()}function g9(r,e){return Ra(r.node1,e)}function Ra(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Ih(r){return r.getValue()}function Oa(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 m9(r,e,t){A(r,function(n){A(n,function(a){if(a.inEdges.length){var i=Oa(a.inEdges,v9,t)/Oa(a.inEdges,Ih);if(isNaN(i)){var o=a.inEdges.length;i=o?Oa(a.inEdges,g9,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-Ra(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-Ra(a,t))*e;a.setLayout({y:l},!0)}}})})}function y9(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 _9(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 At({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(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 b9(r){r.registerChartView(Q8),r.registerSeriesModel(e9),r.registerLayout(t9),r.registerVisual(_9),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 qM=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"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[a,i],p=d[c].get("type"),v=d[1-c].get("type"),g=e.data;if(g&&l){var m=[];A(g,function(x,w){var S;G(x)?(S=x.slice(),x.unshift(w)):G(x.value)?(S=F({},x),S.value=S.value.slice(),x.value.unshift(w)):S=x,m.push(S)}),e.data=m}var y=this.defaultValueDimensions,_=[{name:f,type:Gf(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Gf(v),dimsDef:y.slice()}];return ls(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:me(rS,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),XM=function(r){V(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}(Ke);dt(XM,qM,!0);var x9=function(r){V(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 c=i.getItemLayout(u),f=KM(c,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(f);return}var h=i.getItemLayout(u);f?(Kr(f),QM(h,f,i,u)):f=KM(h,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).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}(We),w9=function(){function r(){}return r}(),S9=function(r){V(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new w9},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}(De);function KM(r,e,t,n,a){var i=r.ends,o=new S9({shape:{points:a?E9(i,n,r):i}});return QM(r,o,e,t,a),o}function QM(r,e,t,n,a){var i=t.hostModel,o=Di[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");Ot(e,s),lt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function E9(r,e,t){return H(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var Tu=A;function T9(r){var e=C9(r);Tu(e,function(t){var n=t.seriesModels;n.length&&(D9(t),Tu(n,function(a,i){A9(a,t.boxOffsetList[i],t.boxWidthList[i])}))})}function C9(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var a=n.getBaseAxis(),i=we(t,a);i<0&&(i=t.length,t[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(n)}),e}function D9(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;Tu(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Tu(t,function(p){var v=p.get("boxWidth");G(v)||(v=[v,v]),o.push([W(v[0],s)||0,W(v[1],s)||0])});var c=s*.8-2,f=c/n*.3,h=(c-f*(n-1))/n,d=h/2-c/2;Tu(t,function(p,v){i.push(d),d+=f+h,a.push(Math.min(Math.max(h,o[v][0]),o[v][1]))})}function A9(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]),c=a.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<a.count();f++){var h=a.get(u,f),d=_(h,c[2],f),p=_(h,c[0],f),v=_(h,c[1],f),g=_(h,c[3],f),m=_(h,c[4],f),y=[];x(y,v,!1),x(y,g,!0),y.push(p,v,m,g),w(y,p),w(y,m),w(y,d),a.setItemLayout(f,{initBaseline:d[s],ends:y})}function _(S,E,T){var C=a.get(E,T),D=[];D[o]=S,D[s]=C;var M;return isNaN(S)||isNaN(C)?M=[NaN,NaN]:(M=n.dataToPoint(D),M[o]+=e),M}function x(S,E,T){var C=E.slice(),D=E.slice();C[o]+=i,D[o]-=i,T?S.push(C,D):S.push(D,C)}function w(S,E){var T=E.slice(),C=E.slice();T[o]-=i,C[o]+=i,S.push(T,C)}}function M9(r,e){e=e||{};for(var t=[],n=[],a=e.boundIQR,i=a==="none"||a===0,o=0;o<r.length;o++){var s=Tr(r[o].slice()),l=Ip(s,.25),u=Ip(s,.5),c=Ip(s,.75),f=s[0],h=s[s.length-1],d=(a??1.5)*(c-l),p=i?f:Math.max(f,l-d),v=i?h:Math.min(h,c+d),g=e.itemNameFormatter,m=ie(g)?g({value:o}):X(g)?g.replace("{value}",o+""):o+"";t.push([m,p,l,u,c,v]);for(var y=0;y<s.length;y++){var _=s[y];if(_<p||_>v){var x=[m,_];n.push(x)}}}return{boxData:t,outliers:n}}var k9={},N9={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ft){var n="";k9.NODE_ENV!=="production"&&(n=Zt("source data is not applicable for this boxplot transform. Expect number[][].")),Fe(n)}var a=M9(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function I9(r){r.registerSeriesModel(XM),r.registerChartView(x9),r.registerLayout(T9),r.registerTransform(N9)}var L9=["itemStyle","borderColor"],R9=["itemStyle","borderColor0"],O9=["itemStyle","borderColorDoji"],P9=["itemStyle","color"],B9=["itemStyle","color0"];function Vy(r,e){return e.get(r>0?P9:B9)}function zy(r,e){return e.get(r===0?O9:r>0?L9:R9)}var V9={seriesType:"candlestick",plan:Xo(),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=Vy(s,o),l.stroke=zy(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");F(u,l)}}}}}},z9=["color","borderColor"],F9=function(r){V(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){_a(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(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&jM(u,f))return;var h=Fy(f,c,!0);tt(h,{shape:{points:f.ends}},t,c),$y(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(h);return}var d=n.getItemLayout(c);if(s&&jM(u,d)){i.remove(h);return}h?(Ve(h,{shape:{points:d.ends}},t,c),Kr(h)):h=Fy(d),$y(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),JM(t,this.group);var n=t.get("clip",!0)?nu(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=Fy(s);$y(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){JM(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}(We),$9=function(){function r(){}return r}(),G9=function(r){V(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new $9},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}(De);function Fy(r,e,t){var n=r.ends;return new G9({shape:{points:t?H9(n,r):n},z2:100})}function jM(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 $y(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,Ot(r,a);var i=e.getItemLayout(t).sign;A(r.states,function(s,l){var u=a.getModel(l),c=Vy(i,u),f=zy(i,u)||c,h=s.style||(s.style={});c&&(h.fill=c),f&&(h.stroke=f)});var o=a.getModel("emphasis");lt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function H9(r,e){return H(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var U9=function(){function r(){}return r}(),Gy=function(r){V(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new U9},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}(De);function JM(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new Gy({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new Gy({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new Gy({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),Hy(1,o,r),Hy(-1,s,r),Hy(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Hy(r,e,t,n){var a=zy(r,t)||Vy(r,t),i=t.getModel("itemStyle").getItemStyle(z9);e.useStyle(i),e.style.fill=null,e.style.stroke=a}var ek=function(r){V(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}(Ke);dt(ek,qM,!0);function W9(r){!r||!G(r.series)||A(r.series,function(e){oe(e)&&e.type==="k"&&(e.type="candlestick")})}var Y9={seriesType:"candlestick",plan:Xo(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=Z9(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=H(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],h=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:d};function d(v,g){for(var m,y=g.getStore();(m=v.next())!=null;){var _=y.get(s,m),x=y.get(u,m),w=y.get(c,m),S=y.get(f,m),E=y.get(h,m),T=Math.min(x,w),C=Math.max(x,w),D=O(T,_),M=O(C,_),k=O(S,_),N=O(E,_),L=[];P(L,M,0),P(L,D,1),L.push(z(N),z(M),z(k),z(D));var R=g.getItemModel(m),I=!!R.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:tk(y,m,x,w,c,I),initBaseline:x>w?M[i]:D[i],ends:L,brushRect:B(S,E,_)})}function O($,U){var j=[];return j[a]=U,j[i]=$,isNaN(U)||isNaN($)?[NaN,NaN]:e.dataToPoint(j)}function P($,U,j){var Z=U.slice(),ee=U.slice();Z[a]=rf(Z[a]+n/2,1,!1),ee[a]=rf(ee[a]-n/2,1,!0),j?$.push(Z,ee):$.push(ee,Z)}function B($,U,j){var Z=O($,j),ee=O(U,j);return Z[a]-=n/2,ee[a]-=n/2,{x:Z[0],y:Z[1],width:n,height:ee[1]-Z[1]}}function z($){return $[a]=rf($[a],1),$}}function p(v,g){for(var m=En(v.count*4),y=0,_,x=[],w=[],S,E=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=v.next())!=null;){var C=E.get(s,S),D=E.get(u,S),M=E.get(c,S),k=E.get(f,S),N=E.get(h,S);if(isNaN(C)||isNaN(k)||isNaN(N)){m[y++]=NaN,y+=3;continue}m[y++]=tk(E,S,D,M,c,T),x[a]=C,x[i]=k,_=e.dataToPoint(x,null,w),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,x[i]=N,_=e.dataToPoint(x,null,w),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function tk(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 Z9(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(pe(r.get("barMaxWidth"),a),a),o=W(pe(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?W(s,a):Math.max(Math.min(a/2,i),o)}function q9(r){r.registerChartView(F9),r.registerSeriesModel(ek),r.registerPreprocessor(W9),r.registerVisual(V9),r.registerLayout(Y9)}function rk(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 X9=function(r){V(e,r);function e(t,n){var a=r.call(this)||this,i=new tu(t,n),o=new fe;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=yt(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)}rk(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}}rk(a,t)},e.prototype.highlight=function(){$n(this)},e.prototype.downplay=function(){Gn(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=jo(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),f=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",f)});var d=Oi(t.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var p=t.getItemVisual(n,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var v={};v.showEffectOn=i.get("showEffectOn"),v.rippleScale=s.get(["rippleEffect","scale"]),v.brushType=s.get(["rippleEffect","brushType"]),v.period=s.get(["rippleEffect","period"])*1e3,v.effectOffset=n/t.count(),v.z=i.getShallow("z")||0,v.zlevel=i.getShallow("zlevel")||0,v.symbolType=l,v.color=f,v.rippleEffectColor=s.get(["rippleEffect","color"]),v.rippleNumber=s.get(["rippleEffect","number"]),v.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?v.showEffectOn!=="render"&&a.startEffectAnimation(v):g==="normal"&&v.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=v,lt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(fe),K9=function(r){V(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 ru(X9)},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=au("").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=VP(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(We),Q9=function(r){V(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 Zn(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}(Ke);function j9(r){r.registerChartView(K9),r.registerSeriesModel(Q9),r.registerLayout(au("effectScatter"))}var nk=function(r){V(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 hy(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");G(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=i.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=yt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(i.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.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"),c=n.get("constantSpeed"),f=pt(n.get("delay"),function(d){return d/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),c>0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;ie(f)?h=f(a):h=f,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,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 ia(t.__p1,t.__cp1)+ia(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=Nt,c=Jd;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?c(n[0],i[0],a[0],o):c(a[0],i[0],n[0],1-o),h=t.__t<1?c(n[1],i[1],a[1],o):c(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=ia(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*ia(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}(fe),ak=function(r){V(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 jt({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)}};Ve(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,c=a&&a.emphasisDisabled;if(!a||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=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 h=i.ensureState("emphasis");h.style=s,lt(this,l,u,c)},e.prototype.updateLayout=function(t,n){var a=this.childAt(0);a.setShape("points",t.getItemLayout(n))},e}(fe),J9=function(r){V(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 ak(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+=ia(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 c=(n-i[l])/(i[l+1]-i[l]),f=a[l],h=a[l+1];t.x=f[0]*(1-c)+c*h[0],t.y=f[1]*(1-c)+c*h[1];var d=t.__t<1?h[0]-f[0]:f[0]-h[0],p=t.__t<1?h[1]-f[1]:f[1]-h[1];t.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(nk),e7=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),t7=function(r){V(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 e7},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++],c=a[o++],f=a[o++],h=a[o++];if(t.moveTo(u,c),i>0){var d=(u+f)/2-(c-h)*i,p=(c+h)/2-(f-u)*i;t.quadraticCurveTo(d,p,f,h)}else t.lineTo(f,h)}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 c=i[u++];if(c>0)for(var f=i[u++],h=i[u++],d=1;d<c;d++){var p=i[u++],v=i[u++];if(va(f,h,p,v,s,t,n))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],h=i[u++],p=i[u++],v=i[u++];if(o>0){var g=(f+p)/2-(h-v)*o,m=(h+v)/2-(p-f)*o;if(w1(f,h,g,m,p,v,s,t,n))return l}else if(va(f,h,p,v,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 c=a[u++],f=a[u++];i=Math.min(c,i),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new xe(i,o,s,l)}return t},e}(De),r7=function(){function r(){this.group=new fe}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 t7({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=ve(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}(),n7={},ik={seriesType:"lines",plan:Xo(),reset:function(r){var e=r.coordinateSystem;if(!e){n7.NODE_ENV!=="production"&&Rt("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,c=a.start;c<a.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,h=[],c=a.start;c<a.end;c++){var d=r.getLineCoords(c,o);t&&(s[f++]=d);for(var p=0;p<d;p++)h=e.dataToPoint(o[p],!1,h),s[f++]=h[0],s[f++]=h[1]}i.setLayout("linesPoints",s)}else for(var c=a.start;c<a.end;c++){var v=i.getItemModel(c),d=r.getLineCoords(c,o),g=[];if(t)for(var m=0;m<d;m++)g.push(e.dataToPoint(o[m]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var y=v.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}i.setItemLayout(c,g)}}}}},ok={},a7=function(r){V(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(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c?ok.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)&&nu(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=ik.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 ok.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 r7:new dy(o?i?J9:ak:i?nk:hy),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}(We),Lh={},i7=typeof Uint32Array>"u"?Array:Uint32Array,o7=typeof Float64Array>"u"?Array:Float64Array;function sk(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(Lh.NODE_ENV!=="production"&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),r.data=H(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),Id([a,t[0],t[1]])}))}var s7=function(r){V(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||[],sk(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(sk(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=zs(this._flatCoords,n.flatCoords),this._flatCoordsOffset=zs(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(Lh.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),Oe(t[0])){for(var a=t.length,i=new i7(a),o=new o7(a),s=0,l=0,u=0,c=0;c<a;){u++;var f=t[c++];i[l++]=s+n,i[l++]=f;for(var h=0;h<f;h++){var d=t[c++],p=t[c++];if(o[s++]=d,o[s++]=p,c>a&&Lh.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(Lh.NODE_ENV!=="production"){var a=Wo.get(t.coordinateSystem);if(!a)throw new Error("Unknown coordinate system "+t.coordinateSystem)}var i=new Jt(["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 c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),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"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Tt("nameValue",{name:c.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}(Ke);function Rh(r){return r instanceof Array||(r=[r,r]),r}var l7={seriesType:"lines",reset:function(r){var e=Rh(r.get("symbol")),t=Rh(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=Rh(s.getShallow("symbol",!0)),u=Rh(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 u7(r){r.registerChartView(a7),r.registerSeriesModel(s7),r.registerLayout(ik),r.registerVisual(l7)}var c7=256,f7=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=aa.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"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=e.length;f.width=t,f.height=n;for(var p=0;p<d;++p){var v=e[p],g=v[0],m=v[1],y=v[2],_=a(y);h.globalAlpha=_,h.drawImage(s,g-c,m-c)}if(!f.width||!f.height)return f;for(var x=h.getImageData(0,0,f.width,f.height),w=x.data,S=0,E=w.length,T=this.minOpacity,C=this.maxOpacity,D=C-T;S<E;){var _=w[S+3]/256,M=Math.floor(_*(c7-1))*4;if(_>0){var k=o(_)?l:u;_>0&&(_=_*D+T),w[S++]=k[M],w[S++]=k[M+1],w[S++]=k[M+2],w[S++]=k[M+3]*_*256}else S+=4}return h.putImageData(x,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=aa.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}(),lk={};function h7(r,e,t){var n=r[1]-r[0];e=H(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 d7(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 uk(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var p7=function(r){V(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)})}),lk.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()):uk(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&&(uk(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){_a(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,a,i,o){var s=t.coordinateSystem,l=Zi(s,"cartesian2d"),u,c,f,h;if(l){var d=s.getAxis("x"),p=s.getAxis("y");if(lk.NODE_ENV!=="production"){if(!(d.type==="category"&&p.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(d.onBand&&p.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}u=d.getBandWidth()+.5,c=p.getBandWidth()+.5,f=d.scale.getExtent(),h=p.scale.getExtent()}for(var v=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),w=Et(t),S=t.getModel("emphasis"),E=S.get("focus"),T=S.get("blurScope"),C=S.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 k=void 0,N=g.getItemVisual(M,"style");if(l){var L=g.get(D[0],M),R=g.get(D[1],M);if(isNaN(g.get(D[2],M))||isNaN(L)||isNaN(R)||L<f[0]||L>f[1]||R<h[0]||R>h[1])continue;var I=s.dataToPoint([L,R]);k=new Ie({shape:{x:I[0]-u/2,y:I[1]-c/2,width:u,height:c},style:N})}else{if(isNaN(g.get(D[1],M)))continue;k=new Ie({z2:1,shape:s.dataToRect([g.get(D[0],M)]).contentShape,style:N})}if(g.hasItemOption){var O=g.getItemModel(M),P=O.getModel("emphasis");m=P.getModel("itemStyle").getItemStyle(),y=O.getModel(["blur","itemStyle"]).getItemStyle(),_=O.getModel(["select","itemStyle"]).getItemStyle(),x=O.get(["itemStyle","borderRadius"]),E=P.get("focus"),T=P.get("blurScope"),C=P.get("disabled"),w=Et(O)}k.shape.r=x;var B=t.getRawValue(M),z="-";B&&B[2]!=null&&(z=B[2]+""),Pt(k,w,{labelFetcher:t,labelDataIndex:M,defaultOpacity:N.opacity,defaultText:z}),k.ensureState("emphasis").style=m,k.ensureState("blur").style=y,k.ensureState("select").style=_,lt(k,E,T,C),k.incremental=o,o&&(k.states.emphasis.hoverLayer=!0),v.add(k),g.setItemGraphicEl(M,k),this._progressiveEls&&this._progressiveEls.push(k)}},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 f7;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,i.getWidth()),v=Math.min(c.height+c.y,i.getHeight()),g=p-h,m=v-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(E,T,C){var D=t.dataToPoint([E,T]);return D[0]-=h,D[1]-=d,D.push(C),D}),x=a.getExtent(),w=a.type==="visualMap.continuous"?d7(x,a.option.range):h7(x,a.getPieceList(),a.option.selected);u.update(_,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var S=new It({style:{width:g,height:m,x:h,y:d,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(We),v7=function(r){V(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 Zn(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Wo.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}(Ke);function g7(r){r.registerChartView(p7),r.registerSeriesModel(v7)}var m7=["itemStyle","borderWidth"],ck=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Uy=new Hn,y7=function(r){V(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(),c=u.isHorizontal(),f=l.master.getRect(),h={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:c,valueDim:ck[+c],categoryDim:ck[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var v=mk(o,p),g=fk(o,p,v,h),m=yk(o,h,g);o.setItemGraphicEl(p,m),i.add(m),xk(m,h,g)}}).update(function(p,v){var g=s.getItemGraphicEl(v);if(!o.hasValue(p)){i.remove(g);return}var m=mk(o,p),y=fk(o,p,m,h),_=bk(o,y);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?T7(g,h,y):g=yk(o,h,y,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=y,i.add(g),xk(g,h,y)}).remove(function(p){var v=s.getItemGraphicEl(p);v&&_k(s,p,v.__pictorialSymbolMeta.animationModel,v)}).execute();var d=t.get("clip",!0)?nu(t.coordinateSystem,!1,t):null;return d?i.setClipPath(d):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){_k(i,ve(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(We);function fk(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,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={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:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};_7(t,i,a,n,h),b7(r,e,a,i,o,h.boundingLength,h.pxSign,c,n,h),x7(t,h.symbolScale,u,n,h);var d=h.symbolSize,p=Oi(t.get("symbolOffset"),d);return w7(t,d,a,i,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function _7(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),c;if(G(o)){var f=[Wy(s,o[0])-l,Wy(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=Wy(s,o)-l:e?c=n.coordSysExtent[i.index][u]-l:c=t[i.wh];a.boundingLength=c,e&&(a.repeatCutLength=t[i.wh]);var h=i.xy==="x",d=s.inverse;a.pxSign=h&&!d||!h&&d?c>=0?1:-1:c>0?1:-1}function Wy(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function b7(r,e,t,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),d=r.getItemVisual(e,"symbolSize"),p;G(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[f.index]=W(p[f.index],h),p[c.index]=W(p[c.index],n?h:Math.abs(i)),u.symbolSize=p;var v=u.symbolScale=[p[0]/s,p[1]/s];v[c.index]*=(l.isHorizontal?-1:1)*o}function x7(r,e,t,n,a){var i=r.get(m7)||0;i&&(Uy.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Uy.updateTransform(),i/=Uy.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function w7(r,e,t,n,a,i,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,p=f.pxSign,v=Math.max(e[d.index]+s,0),g=v;if(n){var m=Math.abs(l),y=pt(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var x=W(y,e[d.index]),w=Math.max(v+x*2,0),S=_?0:x*2,E=Lp(n),T=E?n:wk((m+S)/w),C=m-T*v;x=C/2/(_?T:Math.max(T-1,1)),w=v+x*2,S=_?0:x*2,!E&&n!=="fixed"&&(T=u?wk((Math.abs(u)+S)/w):0),g=T*w-S,f.repeatTimes=T,f.symbolMargin=x}var D=p*(g/2),M=f.pathPosition=[];M[h.index]=t[h.wh]/2,M[d.index]=o==="start"?D:o==="end"?l-D:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var k=f.bundlePosition=[];k[h.index]=t[h.xy],k[d.index]=t[d.xy];var N=f.barRectShape=F({},t);N[d.wh]=p*Math.max(Math.abs(t[d.wh]),Math.abs(M[d.index]+D)),N[h.wh]=t[h.wh];var L=f.clipShape={};L[h.xy]=-t[h.xy],L[h.wh]=c.ecSize[h.wh],L[d.xy]=0,L[d.wh]=t[d.wh]}function hk(r){var e=r.symbolPatternSize,t=yt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function dk(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(Yy(r,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?gs(v,null,p(c),t,n):gs(v,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(v)}),c++});c<u;c++){var h=hk(t);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,a.add(h);var d=p(c);gs(h,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},t,n)}function p(v){var g=s.slice(),m=t.pxSign,y=v;return(t.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-v),g[l.index]=f*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function pk(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?gs(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=hk(t),a.add(i),gs(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 vk(r,e,t){var n=F({},e.barRectShape),a=r.__pictorialBarRect;a?gs(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new Ie({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function gk(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=F({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)Ve(a,{shape:i},s,l);else{i[o.wh]=0,a=new Ie({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],Di[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function mk(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=S7,t.isAnimationEnabled=E7,t}function S7(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function E7(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function yk(r,e,t,n){var a=new fe,i=new fe;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?dk(a,e,t):pk(a,e,t),vk(a,t,n),gk(a,e,t,n),a.__pictorialShapeStr=bk(r,t),a.__pictorialSymbolMeta=t,a}function T7(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;Ve(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?dk(r,e,t,!0):pk(r,e,t,!0),vk(r,t,!0),gk(r,e,t,!0)}function _k(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];Yy(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),A(i,function(o){ya(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function bk(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Yy(r,e,t){A(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function gs(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&Di[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function xk(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"),c=i.get("focus"),f=i.get("blurScope"),h=i.get("scale");Yy(r,function(v){if(v instanceof It){var g=v.style;v.useStyle(F({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else v.useStyle(t.style);var m=v.ensureState("emphasis");m.style=o,h&&(m.scaleX=v.scaleX*1.1,m.scaleY=v.scaleY*1.1),v.ensureState("blur").style=s,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=t.z2});var d=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,Pt(p,Et(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:ss(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:d}),lt(r,c,f,i.get("disabled"))}function wk(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var C7=function(r){V(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=ba(iu.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}(iu);function D7(r){r.registerChartView(y7),r.registerSeriesModel(C7),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,me(IT,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,LT("pictorialBar"))}var A7=function(r){V(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"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(g){return g.name}var d=new Yn(this._layersSeries||[],l,h,h),p=[];d.add(K(v,this,"add")).update(K(v,this,"update")).remove(K(v,this,"remove")).execute();function v(g,m,y){var _=o._layers;if(g==="remove"){s.remove(_[m]);return}for(var x=[],w=[],S,E=l[m].indices,T=0;T<E.length;T++){var C=i.getItemLayout(E[T]),D=C.x,M=C.y0,k=C.y;x.push(D,M),w.push(D,M+k),S=i.getItemVisual(E[T],"style")}var N,L=i.getItemLayout(E[0]),R=t.getModel("label"),I=R.get("margin"),O=t.getModel("emphasis");if(g==="add"){var P=p[m]=new fe;N=new KC({shape:{points:x,stackedOnPoints:w,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),P.add(N),s.add(P),t.isAnimationEnabled()&&N.setClipPath(M7(N.getBoundingRect(),t,function(){N.removeClipPath()}))}else{var P=_[y];N=P.childAt(0),s.add(P),p[m]=P,Ve(N,{shape:{points:x,stackedOnPoints:w}},t),Kr(N)}Pt(N,Et(t),{labelDataIndex:E[T-1],defaultText:i.getName(E[T-1]),inheritColor:S.fill},{normal:{verticalAlign:"middle"}}),N.setTextConfig({position:null,local:!0});var B=N.getTextContent();B&&(B.x=L.x-I,B.y=L.y0+L.y/2),N.useStyle(S),i.setItemGraphicEl(m,N),Ot(N,t),lt(N,O.get("focus"),O.get("blurScope"),O.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(We);function M7(r,e,t){var n=new Ie({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return tt(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var Zy=2,k7=function(r){V(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 su(K(this.getData,this),K(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=Vp(t,function(h){return a.hasOwnProperty(h[0]+"")||(a[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,d){o.push({name:d,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][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",gt).models[0],i=a.get("type"),o=ze(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=te(),c=0,f=0;f<s.length;++f)l.push(s[f][Zy]),u.get(s[f][Zy])||(u.set(s[f][Zy],c),c++);var h=Zl(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Gf(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new Jt(h,this);return d.initData(s),d},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=Vp(a,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,h){return t.get(o,f)-t.get(o,h)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,a){G(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,h=-1,d=o[c].indices.length,p=0;p<d;++p){var v=i.get(t[0],o[c].indices[p]),g=Math.abs(v-n);g<=f&&(u=v,f=g,h=o[c].indices[p])}s.push(h)}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 Tt("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}(Ke);function N7(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];Sk(n,t,u)}else{s[0]=W(s[0],o.width),s[1]=W(s[1],o.width);var c=o.width-s[0]-s[1];Sk(n,t,c)}n.setLayout("layoutInfo",i)})}function Sk(r,e,t){if(r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=H(a,function(g){return H(g.indices,function(m){var y=n.dataToPoint(r.get(i,m));return y[1]=r.get(o,m),y})}),l=I7(s),u=l.y0,c=t/l.max,f=a.length,h=a[0].indices.length,d,p=0;p<h;++p){d=u[p]*c,r.setItemLayout(a[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:d,y:s[0][p][1]*c});for(var v=1;v<f;++v)d+=s[v-1][p][1]*c,r.setItemLayout(a[v].indices[p],{layerIndex:v,x:s[v][p][0],y0:d,y:s[v][p][1]*c})}}function I7(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 c=0;c<t;++c){var f=n[c]+a[c];f>i&&(i=f)}return{y0:a,max:i}}function L7(r){r.registerChartView(A7),r.registerSeriesModel(k7),r.registerLayout(N7),r.registerProcessor(ou("themeRiver"))}var R7=2,O7=4,Ek=function(r){V(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=R7,o.textConfig={inside:!0},ve(o).seriesIndex=n.seriesIndex;var s=new Le({z2:O7,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;ve(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=F({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=es(d,o));var p=qi(l.getModel("itemStyle"),f,!0);F(f,p),A(Xt,function(y){var _=s.ensureState(y),x=l.getModel([y,"itemStyle"]);_.style=x.getItemStyle();var w=qi(x,f);w&&(_.shape=w)}),t?(s.setShape(f),s.shape.r=c.r0,tt(s,{shape:{r:c.r}},a,n.dataIndex)):(Ve(s,{shape:f},a),Kr(s)),s.useStyle(h),this._updateLabel(a);var v=l.getShallow("cursor");v&&s.attr("cursor",v),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),m=g==="relative"?zs(n.getAncestorsIndices(),n.getDescendantIndices()):g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;lt(this,m,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),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,v=i.get("show")&&!(p!=null&&Math.abs(s)<p);h.ignore=!v,A(cl,function(m){var y=m==="normal"?a.getModel("label"):a.getModel([m,"label"]),_=m==="normal",x=_?h:h.ensureState(m),w=t.getFormattedLabel(d,m);_&&(w=w||n.node.name),x.style=Xe(y,{},null,m!=="normal",!0),w&&(x.style.text=w);var S=y.get("show");S!=null&&!_&&(x.ignore=!S);var E=g(y,"position"),T=_?f:f.states[m],C=T.style.fill;T.textConfig={outsideFill:y.get("color")==="inherit"?C:null,inside:E!=="outside"};var D,M=g(y,"distance")||0,k=g(y,"align"),N=g(y,"rotate"),L=Math.PI*.5,R=Math.PI*1.5,I=pr(N==="tangential"?Math.PI/2-l:l),O=I>L&&!nl(I-L)&&I<R;E==="outside"?(D=o.r+M,k=O?"right":"left"):!k||k==="center"?(s===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,k="center"):k==="left"?(D=o.r0+M,k=O?"right":"left"):k==="right"&&(D=o.r-M,k=O?"left":"right"),x.style.align=k,x.style.verticalAlign=g(y,"verticalAlign")||"middle",x.x=D*u+o.cx,x.y=D*c+o.cy;var P=0;N==="radial"?P=pr(-l)+(O?Math.PI:0):N==="tangential"?P=pr(Math.PI/2-l)+(O?Math.PI:0):Oe(N)&&(P=N*Math.PI/180),x.rotation=pr(P)});function g(m,y){var _=m.get(y);return _??i.get(y)}h.dirtyStyle()},e}(Kt),Tk={},qy="sunburstRootToNode",Ck="sunburstHighlight",P7="sunburstUnhighlight";function B7(r){r.registerAction({type:qy,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=pu(e,[qy],a);if(o){var s=a.getViewRoot();s&&(e.direction=Zm(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:Ck,update:"none"},function(e,t,n){e=F({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=pu(e,[Ck],i);o&&(e.dataIndex=o.node.dataIndex)}Tk.NODE_ENV!=="production"&&vt("sunburstHighlight","highlight"),n.dispatchAction(F(e,{type:"highlight"}))}),r.registerAction({type:P7,update:"updateView"},function(e,t,n){e=F({},e),Tk.NODE_ENV!=="production"&&vt("sunburstUnhighlight","downplay"),n.dispatchAction(F(e,{type:"downplay"}))})}var V7=function(r){V(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(),c=this.group,f=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(y){h.push(y)});var d=this._oldChildren||[];p(h,d),m(l,u),this._initEvents(),this._oldChildren=h;function p(y,_){if(y.length===0&&_.length===0)return;new Yn(_,y,x,x).add(w).update(w).remove(me(w,null)).execute();function x(S){return S.getId()}function w(S,E){var T=S==null?null:y[S],C=E==null?null:_[E];v(T,C)}}function v(y,_){if(!f&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,t,n,a),s.setItemGraphicEl(y.dataIndex,_.piece)):g(_);else if(y){var x=new Ek(y,t,n,a);c.add(x),s.setItemGraphicEl(y.dataIndex,x)}}}function g(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,n,a):(o.virtualPiece=new Ek(y,t,n,a),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.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 c=l.get("target",!0)||"_blank";gf(u,c)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:qy,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}(We),z7=function(r){V(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};Dk(a);var i=this._levelModels=H(t.levels||[],function(l){return new Ge(l,this,n)},this),o=Ym.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=i[f.depth];return h&&(u.parentModel=h),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=xh(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(){OA(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}(Ke);function Dk(r){var e=0;A(r.children,function(n){Dk(n);var a=n.value;G(a)&&(a=a[0]),e+=a});var t=r.value;G(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),G(r.value)?r.value[0]=t:r.value=t}var Ak=Math.PI/180;function F7(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");G(i)||(i=[0,i]),G(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=W(a[0],o),c=W(a[1],s),f=W(i[0],l/2),h=W(i[1],l/2),d=-n.get("startAngle")*Ak,p=n.get("minAngle")*Ak,v=n.getData().tree.root,g=n.getViewRoot(),m=g.depth,y=n.get("sort");y!=null&&Mk(g,y);var _=0;A(g.children,function(I){!isNaN(I.getValue())&&_++});var x=g.getValue(),w=Math.PI/(x||_)*2,S=g.depth>0,E=g.height-(S?-1:1),T=(h-f)/(E||1),C=n.get("clockwise"),D=n.get("stillShowZeroSum"),M=C?1:-1,k=function(I,O){if(I){var P=O;if(I!==v){var B=I.getValue(),z=x===0&&D?w:B*w;z<p&&(z=p),P=O+M*z;var $=I.depth-m-(S?-1:1),U=f+T*$,j=f+T*($+1),Z=n.getLevelModel(I);if(Z){var ee=Z.get("r0",!0),he=Z.get("r",!0),Ee=Z.get("radius",!0);Ee!=null&&(ee=Ee[0],he=Ee[1]),ee!=null&&(U=W(ee,l/2)),he!=null&&(j=W(he,l/2))}I.setLayout({angle:z,startAngle:O,endAngle:P,clockwise:C,cx:u,cy:c,r0:U,r:j})}if(I.children&&I.children.length){var re=0;A(I.children,function(J){re+=k(J,O+re)})}return P-O}};if(S){var N=f,L=f+T,R=Math.PI*2;v.setLayout({angle:R,startAngle:d,endAngle:d+R,clockwise:C,cx:u,cy:c,r0:N,r:L})}k(g,d)})}function Mk(r,e){var t=r.children||[];r.children=$7(t,e),t.length&&A(r.children,function(n){Mk(n,e)})}function $7(r,e){if(ie(e)){var t=H(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)}),H(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 G7(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&&X(s)&&(s=ip(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");F(u,l)})})}function H7(r){r.registerChartView(V7),r.registerSeriesModel(z7),r.registerLayout(me(F7,"sunburst")),r.registerProcessor(me(ou,"sunburst")),r.registerVisual(G7),B7(r)}var kk={color:"fill",borderColor:"stroke"},U7={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Qn=Ne(),W7=function(r){V(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 Zn(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=Qn(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}(Ke);function Y7(r,e){return e=e||[0,0],H(["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 Z7(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:K(Y7,r)}}}function q7(r,e){return e=e||[0,0],H([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 X7(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:K(q7,r)}}}function K7(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 Q7(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:K(K7,r)}}}function j7(r,e){return e=e||[0,0],H(["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 J7(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:K(j7,r)}}}function eY(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 tY={},Nk={};function Ik(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||Q(r,"text")))}function Lk(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},Q(n,"text")&&(o.text=n.text),Q(n,"rich")&&(o.rich=n.rich),Q(n,"textFill")&&(o.fill=n.textFill),Q(n,"textStroke")&&(o.stroke=n.textStroke),Q(n,"fontFamily")&&(o.fontFamily=n.fontFamily),Q(n,"fontSize")&&(o.fontSize=n.fontSize),Q(n,"fontStyle")&&(o.fontStyle=n.fontStyle),Q(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=Q(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),Q(n,"textPosition")&&(a.position=n.textPosition),Q(n,"textOffset")&&(a.offset=n.textOffset),Q(n,"textRotation")&&(a.rotation=n.textRotation),Q(n,"textDistance")&&(a.distance=n.textDistance)}return Rk(o,r),A(o.rich,function(l){Rk(l,l)}),{textConfig:a,textContent:i}}function Rk(r,e){e&&(e.font=e.textFont||e.font,Q(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Q(e,"textAlign")&&(r.align=e.textAlign),Q(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Q(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Q(e,"textWidth")&&(r.width=e.textWidth),Q(e,"textHeight")&&(r.height=e.textHeight),Q(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Q(e,"textPadding")&&(r.padding=e.textPadding),Q(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Q(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Q(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Q(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Q(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Q(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Q(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function Ok(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";Pk(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){Pk(s,s)}),n}function Pk(r,e){e&&(Q(e,"fill")&&(r.textFill=e.fill),Q(e,"stroke")&&(r.textStroke=e.fill),Q(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Q(e,"font")&&(r.font=e.font),Q(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Q(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Q(e,"fontSize")&&(r.fontSize=e.fontSize),Q(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Q(e,"align")&&(r.textAlign=e.align),Q(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Q(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Q(e,"width")&&(r.textWidth=e.width),Q(e,"height")&&(r.textHeight=e.height),Q(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Q(e,"padding")&&(r.textPadding=e.padding),Q(e,"borderColor")&&(r.textBorderColor=e.borderColor),Q(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Q(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Q(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Q(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Q(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Q(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Q(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Q(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Q(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Q(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}function Bk(r,e){if(tY.NODE_ENV!=="production"){var t=r+"^_^"+e;Nk[t]||(console.warn('[ECharts] DEPRECATED: "'+r+'" has been deprecated. '+e),Nk[t]=!0)}}var Vr={},Vk={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},zk=Me(Vk),Oh=sn(fn,function(r,e){return r[e]=1,r},{}),Fk=fn.join(", "),Ph=["","style","shape","extra"],ms=Ne();function Xy(r,e,t,n,a){var i=r+"Animation",o=Io(r,n,a)||{},s=ms(e).userDuring;return o.duration>0&&(o.during=s?K(oY,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),F(o,t[i]),o}function Bh(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=ms(r),u=e.style;l.userDuring=e.during;var c={},f={};if(lY(r,e,f),Hk("shape",e,f),Hk("extra",e,f),!i&&s&&(sY(r,e,c),Gk("shape",r,e,c),Gk("extra",r,e,c),uY(r,e,u,c)),f.style=u,rY(r,f,o),aY(r,e),s)if(i){var h={};A(Ph,function(p){var v=p?e[p]:e;v&&v.enterFrom&&(p&&(h[p]=h[p]||{}),F(p?h[p]:h,v.enterFrom))});var d=Xy("enter",r,e,t,a);d.duration>0&&r.animateFrom(h,d)}else nY(r,e,a||0,t,c);$k(r,e),u?r.dirty():r.markRedraw()}function $k(r,e){for(var t=ms(r).leaveToProps,n=0;n<Ph.length;n++){var a=Ph[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=ms(r).leaveToProps={}),a&&(t[a]=t[a]||{}),F(a?t[a]:t,i.leaveTo))}}function Vh(r,e,t,n){if(r){var a=r.parent,i=ms(r).leaveToProps;if(i){var o=Xy("update",r,e,t,0);o.done=function(){a.remove(r)},r.animateTo(i,o)}else a.remove(r)}}function io(r){return r==="all"}function rY(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 nY(r,e,t,n,a){if(a){var i=Xy("update",r,e,n,t);i.duration>0&&r.animateFrom(a,i)}}function aY(r,e){Q(e,"silent")&&(r.silent=e.silent),Q(e,"ignore")&&(r.ignore=e.ignore),r instanceof Cr&&Q(e,"invisible")&&(r.invisible=e.invisible),r instanceof De&&Q(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var An={},iY={setTransform:function(r,e){return Vr.NODE_ENV!=="production"&&se(Q(Oh,r),"Only "+Fk+" available in `setTransform`."),An.el[r]=e,this},getTransform:function(r){return Vr.NODE_ENV!=="production"&&se(Q(Oh,r),"Only "+Fk+" available in `getTransform`."),An.el[r]},setShape:function(r,e){Vr.NODE_ENV!=="production"&&ys(r);var t=An.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){Vr.NODE_ENV!=="production"&&ys(r);var e=An.el.shape;if(e)return e[r]},setStyle:function(r,e){Vr.NODE_ENV!=="production"&&ys(r);var t=An.el,n=t.style;return n&&(Vr.NODE_ENV!=="production"&&qa(e)&&st("style."+r+" must not be assigned with NaN."),n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){Vr.NODE_ENV!=="production"&&ys(r);var e=An.el.style;if(e)return e[r]},setExtra:function(r,e){Vr.NODE_ENV!=="production"&&ys(r);var t=An.el.extra||(An.el.extra={});return t[r]=e,this},getExtra:function(r){Vr.NODE_ENV!=="production"&&ys(r);var e=An.el.extra;if(e)return e[r]}};function ys(r){if(Vr.NODE_ENV!=="production"&&(r==="transition"||r==="enterFrom"||r==="leaveTo"))throw new Error('key must not be "'+r+'"')}function oY(){var r=this,e=r.el;if(e){var t=ms(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}An.el=e,n(iY)}}function Gk(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]={}),io(l))F(o,i);else for(var u=He(l),c=0;c<u.length;c++){var f=u[c],h=i[f];o[f]=h}else if(io(s)||we(s,r)>=0){!o&&(o=n[r]={});for(var d=Me(i),c=0;c<d.length;c++){var f=d[c],h=i[f];cY(a[f],h)&&(o[f]=h)}}}}}function Hk(r,e,t){var n=e[r];if(n)for(var a=t[r]={},i=Me(n),o=0;o<i.length;o++){var s=i[o];a[s]=Qs(n[s])}}function sY(r,e,t){for(var n=e.transition,a=io(n)?fn:He(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];Vr.NODE_ENV!=="production"&&Uk(o,"el.transition"),t[o]=s}}}function lY(r,e,t){for(var n=0;n<zk.length;n++){var a=zk[n],i=Vk[a],o=e[a];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<fn.length;n++){var s=fn[n];e[s]!=null&&(t[s]=e[s])}}function uY(r,e,t,n){if(t){var a=r.style,i;if(a){var o=t.transition,s=e.transition;if(o&&!io(o)){var l=He(o);!i&&(i=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=a[c];i[c]=f}}else if(r.getAnimationStyleProps&&(io(s)||io(o)||we(s,"style")>=0)){var h=r.getAnimationStyleProps(),d=h?h.style:null;if(d){!i&&(i=n.style={});for(var p=Me(t),u=0;u<p.length;u++){var c=p[u];if(d[c]){var f=a[c];i[c]=f}}}}}}}function cY(r,e){return Vt(r)?r!==e:r!=null&&isFinite(r)}var Uk;Vr.NODE_ENV!=="production"&&(Uk=function(r,e){Q(Oh,r)||st("Prop `"+r+"` is not a permitted in `"+e+"`. Only `"+Me(Oh).join("`, `")+"` are permitted.")});var Wk={},Yk=Ne(),fY=["percent","easing","shape","style","extra"];function Zk(r){r.stopAnimation("keyframe"),r.attr(Yk(r))}function zh(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(G(e)){A(e,function(s){zh(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=Io("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=Yk(r);A(Ph,function(s){if(!(s&&!r[s])){var l,u=!1;n.sort(function(c,f){return c.percent-f.percent}),A(n,function(c){var f=r.animators,h=s?c[s]:c;if(Wk.NODE_ENV!=="production"&&c.percent>=1&&(u=!0),!!h){var d=Me(h);if(s||(d=ze(d,function(g){return we(fY,g)<0})),!!d.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(d);s&&(o[s]=o[s]||{});var v=s?o[s]:o;A(d,function(g){v[g]=((s?r[s]:r)||{})[g]}),l.whenWithKeys(a*c.percent,h,d,c.easing)}}}),l&&(Wk.NODE_ENV!=="production"&&(u||st("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),l.delay(e.delay||0).duration(a).start(e.easing))}})}}}var Pa={},jn="emphasis",Ba="normal",Ky="blur",Qy="select",Va=[Ba,jn,Ky,Qy],jy={normal:["itemStyle"],emphasis:[jn,"itemStyle"],blur:[Ky,"itemStyle"],select:[Qy,"itemStyle"]},Jy={normal:["label"],emphasis:[jn,"label"],blur:[Ky,"label"],select:[Qy,"label"]},hY=["x","y"],dY="e\0\0",zr={normal:{},emphasis:{},blur:{},select:{}},qk={cartesian2d:Z7,geo:X7,single:Q7,polar:J7,calendar:eY};function Fh(r){return r instanceof De}function e0(r){return r instanceof Cr}function pY(r,e){e.copyTransform(r),e0(e)&&e0(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,Fh(e)&&Fh(r)&&e.setShape(r.shape))}var vY=function(r){V(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=Kk(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){n0(a,null,f,u(f,i),t,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&Vh(h,Qn(h).option,t)}).update(function(f,h){var d=o.getItemGraphicEl(h);n0(a,d,f,u(f,i),t,l,s)}).execute();var c=t.get("clip",!0)?nu(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):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=Kk(n,s,a,i),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var h=n0(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(t){_a(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}(We);function t0(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=tN(n);t=tf(i,null,a,n.layout||"center"),Qn(t).customPathData=i}else if(e==="image")t=new It({}),Qn(t).customImagePath=r.style.image;else if(e==="text")t=new Le({});else if(e==="group")t=new fe;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=wv(e);if(!o){var s="";Pa.NODE_ENV!=="production"&&(s='graphic type "'+e+'" can not be found.'),Fe(s)}t=new o}return Qn(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function r0(r,e,t,n,a,i,o){Zk(e);var s=a&&a.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=hY);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;Q(u,"textFill")&&(u.fill=u.textFill),Q(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=Fh(e)?l.decal:null;r&&f&&(f.dirty=!0,c=es(f,r)),l.__decalPattern=c}if(e0(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Bh(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),zh(e,n.keyframeAnimation,i)}function Xk(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),_i(i)}}function gY(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<Va.length;s++)mY(n,e,Va[s])}}function mY(r,e,t){var n=t===Ba,a=n?e:$h(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function Kk(r,e,t,n){var a=r.get("renderItem"),i=r.coordinateSystem,o={};i&&(Pa.NODE_ENV!=="production"&&(se(a,"series.render is required."),se(i.prepareCustoms||qk[i.type],"This coordSys does not support custom series.")),o=i.prepareCustoms?i.prepareCustoms(i):qk[i.type](i));for(var s=le({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:x,style:S,ordinalRawValue:w,styleEmphasis:E,visual:D,barLayout:M,currentSeriesIndices:k,font:N},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:yY(r.getData())},u,c,f={},h={},d={},p={},v=0;v<Va.length;v++){var g=Va[v];d[g]=r.getModel(jy[g]),p[g]=r.getModel(Jy[g])}function m(L){return L===u?c||(c=e.getItemModel(L)):e.getItemModel(L)}function y(L,R){return e.hasItemOption?L===u?f[R]||(f[R]=m(L).getModel(jy[R])):m(L).getModel(jy[R]):d[R]}function _(L,R){return e.hasItemOption?L===u?h[R]||(h[R]=m(L).getModel(Jy[R])):m(L).getModel(Jy[R]):p[R]}return function(L,R){return u=L,c=null,f={},h={},a&&a(le({dataIndexInside:L,dataIndex:e.getRawIndex(L),actionType:R?R.type:null},l),s)};function x(L,R){return R==null&&(R=u),e.getStore().get(e.getDimensionIndex(L||0),R)}function w(L,R){R==null&&(R=u),L=L||0;var I=e.getDimensionInfo(L);if(!I){var O=e.getDimensionIndex(L);return O>=0?e.getStore().get(O,R):void 0}var P=e.get(I.name,R),B=I&&I.ordinalMeta;return B?B.categories[P]:P}function S(L,R){Pa.NODE_ENV!=="production"&&Bk("api.style","Please write literal style directly instead."),R==null&&(R=u);var I=e.getItemVisual(R,"style"),O=I&&I.fill,P=I&&I.opacity,B=y(R,Ba).getItemStyle();O!=null&&(B.fill=O),P!=null&&(B.opacity=P);var z={inheritColor:X(O)?O:"#000"},$=_(R,Ba),U=Xe($,null,z,!1,!0);U.text=$.getShallow("show")?pe(r.getFormattedLabel(R,Ba),ss(e,R)):null;var j=sf($,z,!1);return C(L,B),B=Ok(B,U,j),L&&T(B,L),B.legacy=!0,B}function E(L,R){Pa.NODE_ENV!=="production"&&Bk("api.styleEmphasis","Please write literal style directly instead."),R==null&&(R=u);var I=y(R,jn).getItemStyle(),O=_(R,jn),P=Xe(O,null,null,!0,!0);P.text=O.getShallow("show")?br(r.getFormattedLabel(R,jn),r.getFormattedLabel(R,Ba),ss(e,R)):null;var B=sf(O,null,!0);return C(L,I),I=Ok(I,P,B),L&&T(I,L),I.legacy=!0,I}function T(L,R){for(var I in R)Q(R,I)&&(L[I]=R[I])}function C(L,R){L&&(L.textFill&&(R.textFill=L.textFill),L.textPosition&&(R.textPosition=L.textPosition))}function D(L,R){if(R==null&&(R=u),Q(kk,L)){var I=e.getItemVisual(R,"style");return I?I[kk[L]]:null}if(Q(U7,L))return e.getItemVisual(R,L)}function M(L){if(i.type==="cartesian2d"){var R=i.getBaseAxis();return G$(le({axis:R},L))}}function k(){return t.getCurrentSeriesIndices()}function N(L){return Tv(L,t)}}function yY(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 n0(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=a0(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&<(s,n.focus,n.blurScope,n.emphasisDisabled),s}function a0(r,e,t,n,a,i){Pa.NODE_ENV!=="production"&&se(n,"should not have an null/undefined element setting");var o=-1,s=e;e&&Qk(e,n,a)&&(o=we(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=t0(n),s&&pY(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),zr.normal.cfg=zr.normal.conOpt=zr.emphasis.cfg=zr.emphasis.conOpt=zr.blur.cfg=zr.blur.conOpt=zr.select.cfg=zr.select.conOpt=null,zr.isLegacy=!1,bY(u,t,n,a,l,zr),_Y(u,t,n,a,l),r0(r,u,t,n,zr,a,l),Q(n,"info")&&(Qn(u).info=n.info);for(var c=0;c<Va.length;c++){var f=Va[c];if(f!==Ba){var h=$h(n,f),d=i0(n,h,f);Xk(f,u,h,d,zr)}}return gY(u,n,a),n.type==="group"&&xY(r,u,t,n,a),o>=0?i.replaceAt(u,o):i.add(u),u}function Qk(r,e,t){var n=Qn(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&TY(i)&&tN(i)!==n.customPathData||a==="image"&&Q(o,"image")&&o.image!==n.customImagePath}function _Y(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&&Qk(o,i,n)&&(o=null),o||(o=t0(i),Pa.NODE_ENV!=="production"&&se(Fh(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),r.setClipPath(o)),r0(null,o,e,i,null,n,a)}}function bY(r,e,t,n,a,i){if(!r.isGroup){jk(t,null,i),jk(t,jn,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 c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=t0(o),r.setTextContent(c)),r0(null,c,e,o,null,n,a);for(var f=o&&o.style,h=0;h<Va.length;h++){var d=Va[h];if(d!==Ba){var p=i[d].conOpt;Xk(d,c,p,i0(o,p,d),null)}}f?c.dirty():c.markRedraw()}}}}function jk(r,e,t){var n=e?$h(r,e):r,a=e?i0(r,n,jn):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?$h(s,e):s:null;if(a&&(t.isLegacy||Ik(a,i,!!o,!!l))){t.isLegacy=!0;var u=Lk(a,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text"),Pa.NODE_ENV!=="production"&&se(c.type==="text",'textContent.type must be "text"')}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function $h(r,e){return e?r?r[e]:null:r}function i0(r,e,t){var n=e&&e.style;return n==null&&t===jn&&r&&(n=r.styleEmphasis),n}function xY(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){SY({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:a,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=i[c],h=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),a0(r,h,t,f,a,e)):(Pa.NODE_ENV!=="production"&&se(h,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),h.ignore=!0)}for(var d=e.childCount()-1;d>=c;d--){var p=e.childAt(d);wY(e,p,a)}}}function wY(r,e,t){e&&Vh(e,Qn(r).option,t)}function SY(r){new Yn(r.oldChildren,r.newChildren,Jk,Jk,r).add(eN).update(eN).remove(EY).execute()}function Jk(r,e){var t=r&&r.name;return t??dY+e}function eN(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;a0(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function EY(r){var e=this.context,t=e.oldChildren[r];t&&Vh(t,Qn(t).option,e.seriesModel)}function tN(r){return r&&(r.pathData||r.d)}function TY(r){return r&&(Q(r,"pathData")||Q(r,"d"))}function CY(r){r.registerChartView(vY),r.registerSeriesModel(W7)}var oo=Ne(),rN=ce,o0=K,s0=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 c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new fe,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var h=me(nN,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}oN(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=Dm(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=oo(e).pointerEl=new Di[i.type](rN(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=oo(e).labelEl=new Le(rN(t.label));e.add(i),iN(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=oo(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=oo(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),iN(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=xl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){In(u.event)},onmousedown:o0(this._onHandleDragMove,this,0,0),drift:o0(this._onHandleDragMove,this),ondragend:o0(this._onHandleDragEnd,this)}),n.add(a)),oN(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");G(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Ko(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){nN(this._axisPointerModel,!t&&this._moveAnimation,this._handle,l0(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(l0(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(l0(a)),oo(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),Rl(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 nN(r,e,t,n){aN(oo(t).lastProp,n)||(oo(t).lastProp=n,e?Ve(t,n,r):(t.stopAnimation(),t.attr(n)))}function aN(r,e){if(oe(r)&&oe(e)){var t=!0;return A(e,function(n,a){t=t&&aN(r[a],n)}),!!t}else return r===e}function iN(r,e){r[e.get(["label","show"])?"show":"hide"]()}function l0(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function oN(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 u0(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 sN(r,e,t,n,a){var i=t.get("value"),o=lN(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Fo(s.get("padding")||0),u=s.getFont(),c=el(o,u),f=a.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=a.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var v=a.verticalAlign;v==="bottom"&&(f[1]-=d),v==="middle"&&(f[1]-=d/2),DY(f,h,d,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Xe(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function DY(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 lN(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:Wg(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};A(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),X(o)?i=o.replace("{value}",i):ie(o)&&(i=o(s))}return i}function c0(r,e,t){var n=fr();return ja(n,n,t.rotation),ln(n,n,t.position),jr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function uN(r,e,t,n,a,i){var o=rr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),sN(e,n,a,i,{position:c0(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function f0(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function cN(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function fN(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var AY=function(r){V(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"),c=hN(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=u0(i),d=MY[u](s,f,c);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=Sm(l.model,a);uN(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=Sm(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=c0(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=hN(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(s0);function hN(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var MY={line:function(r,e,t){var n=f0([e,t[0]],[e,t[1]],dN(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:cN([e-n/2,t[0]],[n,a],dN(r))}}};function dN(r){return r.dim==="x"?0:1}var kY=function(r){V(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}(Ae),Jn=Ne(),NY=A;function pN(r,e,t){if(!Ce.node){var n=e.getZr();Jn(n).records||(Jn(n).records={}),IY(n,e);var a=Jn(n).records[r]||(Jn(n).records[r]={});a.handler=t}}function IY(r,e){if(Jn(r).initialized)return;Jn(r).initialized=!0,t("click",me(vN,"click")),t("mousemove",me(vN,"mousemove")),t("globalout",RY);function t(n,a){r.on(n,function(i){var o=OY(e);NY(Jn(r).records,function(s){s&&a(s,i,o.dispatchAction)}),LY(o.pendings,e)})}}function LY(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 RY(r,e,t){r.handler("leave",null,t)}function vN(r,e,t,n){e.handler(r,t,n)}function OY(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 h0(r,e){if(!Ce.node){var t=e.getZr(),n=(Jn(t).records||{})[r];n&&(Jn(t).records[r]=null)}}var PY=function(r){V(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";pN("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){h0("axisPointer",n)},e.prototype.dispose=function(t,n){h0("axisPointer",n)},e.type="axisPointer",e}(at);function gN(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=si(i,r);if(o==null||o<0||G(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(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,p=i.mapDimension(h),v=[];v[d]=i.get(p,o),v[1-d]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(v)||[]}else t=l.dataToPoint(i.getValues(H(l.dimensions,function(m){return i.mapDimension(m)}),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 mN=Ne();function BY(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||K(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Gh(a)&&(a=gN({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Gh(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||Gh(a),h={},d={},p={list:[],map:{}},v={showPointer:me(zY,d),showTooltip:me(FY,p)};A(s.coordSysMap,function(m,y){var _=l||m.containPoint(a);A(s.coordSysAxesInfo[y],function(x,w){var S=x.axis,E=UY(u,x);if(!f&&_&&(!u||E)){var T=E&&E.value;T==null&&!l&&(T=S.pointToData(a)),T!=null&&yN(x,T,v,!1,h)}})});var g={};return A(c,function(m,y){var _=m.linkGroup;_&&!d[y]&&A(_.axesInfo,function(x,w){var S=d[w];if(x!==m&&S){var E=S.value;_.mapper&&(E=m.axis.scale.parse(_.mapper(E,_N(x),_N(m)))),g[m.key]=E}})}),A(g,function(m,y){yN(c[y],m,v,!0,h)}),$Y(d,c,h),GY(p,a,r,o),HY(c,o,t),h}}function yN(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=VY(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&F(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function VY(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 c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,r,t);h=d.dataIndices,f=d.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=r-f,v=Math.abs(p);v<=o&&((v<o||p>=0&&s<0)&&(o=v,s=p,a=f,i.length=0),A(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function zY(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function FY(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=lu(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.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 $Y(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 GY(r,e,t,n){if(Gh(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 HY(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=mN(n)[a]||{},o=mN(n)[a]={};A(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&A(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];A(i,function(u,c){!o[c]&&l.push(u)}),A(o,function(u,c){!i[c]&&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 UY(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 _N(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 Gh(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Cu(r){Xi.registerAxisPointerClass("CartesianAxisPointer",AY),r.registerComponentModel(kY),r.registerComponentView(PY),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=HH(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},BY)}function WY(r){Te(HD),Te(Cu)}var YY=function(r){V(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),c=u.getExtent(),f=s.dataToCoord(n),h=i.get("type");if(h&&h!=="none"){var d=u0(i),p=qY[h](s,l,f,c);p.style=d,t.graphicKey=p.type,t.pointer=p}var v=i.get(["label","margin"]),g=ZY(n,a,i,l,v);sN(t,a,i,o,g)},e}(s0);function ZY(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,c,f;if(i.dim==="radius"){var h=fr();ja(h,h,s),ln(h,h,[n.cx,n.cy]),u=jr([o,-a],h);var d=e.getModel("axisLabel").get("rotate")||0,p=rr.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var v=l[1];u=n.coordToPoint([v+a,o]);var g=n.cx,m=n.cy;c=Math.abs(u[0]-g)/v<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-m)/v<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var qY={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:f0(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:fN(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:fN(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},XY=function(r){V(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}(Ae),d0=function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",gt).models[0]},e.type="polarAxis",e}(Ae);dt(d0,Xl);var KY=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(d0),QY=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(d0),p0=function(r){V(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}(rn);p0.prototype.dataToRadius=rn.prototype.dataToCoord,p0.prototype.radiusToData=rn.prototype.coordToData;var jY=Ne(),v0=function(r){V(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),c=el(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),p=jY(t.model),v=p.lastAutoInterval,g=p.lastTickCount;return v!=null&&g!=null&&Math.abs(v-d)<=1&&Math.abs(g-o)<=1&&v>d?d=v:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(rn);v0.prototype.dataToAngle=rn.prototype.dataToCoord,v0.prototype.angleToData=rn.prototype.coordToData;var bN=["radius","angle"],JY=function(){function r(e){this.dimensions=bN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new p0,this._angleAxis=new v0,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,c=u<o?1:-1;u<o||u>s;)u+=c*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,c=l-this.cy,f=u*u+c*c,h=this.r,d=this.r0;return h!==d&&f-o<=h*h&&f+o>=d*d}}},r.prototype.convertToPixel=function(e,t,n){var a=xN(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=xN(t);return a===this?this.pointToData(n):null},r}();function xN(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var eZ={};function tZ(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%"]:G(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 rZ(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(th(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),A(th(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),as(n.scale,n.model),as(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 nZ(r){return r.mainType==="angleAxis"}function wN(r,e){var t;if(r.type=e.get("type"),r.scale=eh(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),nZ(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 aZ={dimensions:bN,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new JY(a+"");i.update=rZ;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");wN(o,l),wN(s,u),tZ(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",gt).models[0];if(eZ.NODE_ENV!=="production"&&!a)throw new Error('Polar "'+pt(n.get("polarIndex"),n.get("polarId"),0)+'" not found');n.coordinateSystem=a.coordinateSystem}}),t}},iZ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Hh(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 Uh(r){var e=r.getRadiusAxis();return e.inverse?0:1}function SN(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 oZ=function(r){V(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=H(a.getViewLabels(),function(c){c=ce(c);var f=a.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=a.dataToCoord(h),c});SN(u),SN(s),A(iZ,function(c){t.get([c,"show"])&&(!a.scale.isBlank()||c==="axisLine")&&sZ[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Xi),sZ={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Uh(t),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[f]===0?h=new Di[d]({shape:{cx:t.cx,cy:t.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new gl({shape:{cx:t.cx,cy:t.cy,r:i[c],r0:i[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Uh(t)],u=H(n,function(c){return new St({shape:Hh(t,[l,l+s],c.coord)})});r.add(Ar(u,{style:le(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[Uh(t)],c=[],f=0;f<a.length;f++)for(var h=0;h<a[f].length;h++)c.push(new St({shape:Hh(t,[u,u+l],a[f][h].coord)}));r.add(Ar(c,{style:le(s.getModel("lineStyle").getLineStyle(),le(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"),c=e.get("triggerEvent");A(o,function(f,h){var d=l,p=f.tickValue,v=i[Uh(t)],g=t.coordToPoint([v+u,f.coord]),m=t.cx,y=t.cy,_=Math.abs(g[0]-m)/v<.3?"center":g[0]>m?"left":"right",x=Math.abs(g[1]-y)/v<.3?"middle":g[1]>y?"top":"bottom";if(s&&s[p]){var w=s[p];oe(w)&&w.textStyle&&(d=new Ge(w.textStyle,l,l.ecModel))}var S=new Le({silent:rr.isLabelSilent(e),style:Xe(d,{x:g[0],y:g[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:x})});if(r.add(S),c){var E=rr.makeAxisEventDataBase(e);E.targetType="axisLabel",E.value=f.rawLabel,ve(S).eventData=E}},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 c=[],f=0;f<n.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new St({shape:Hh(t,i,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(Ar(c[f],{style:le({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 c=0;c<a[u].length;c++)l.push(new St({shape:Hh(t,i,a[u][c].coord)}));r.add(Ar(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 c=[],f=Math.PI/180,h=-n[0].coord*f,d=Math.min(i[0],i[1]),p=Math.max(i[0],i[1]),v=e.get("clockwise"),g=1,m=n.length;g<=m;g++){var y=g===m?n[0].coord:n[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Kt({shape:{cx:t.cx,cy:t.cy,r0:d,r:p,startAngle:h,endAngle:-y*f,clockwise:v},silent:!0})),h=-y*f}for(var g=0;g<c.length;g++)r.add(Ar(c[g],{style:le({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},lZ=["axisLine","axisTickLabel","axisName"],uZ=["splitLine","splitArea","minorSplitLine"],cZ=function(r){V(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 fe;this.group.add(i);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),f=l.getExtent()[0],h=o.getExtent(),d=hZ(s,t,f),p=new rr(t,d);A(lZ,p.add,p),i.add(p.getGroup()),bl(a,i,t),A(uZ,function(v){t.get([v,"show"])&&!o.scale.isBlank()&&fZ[v](this.group,t,s,f,h,u,c)},this)}},e.type="radiusAxis",e}(Xi),fZ={splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),f=Math.PI/180,h=c.getExtent(),d=Math.abs(h[1]-h[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],v=0;v<i.length;v++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new Di[d]({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[v].coord,0),startAngle:-h[0]*f,endAngle:-h[1]*f,clockwise:c.inverse}}))}for(var v=0;v<p.length;v++)r.add(Ar(p[v],{style:le({stroke:l[v%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=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new Hn({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(Ar(u,{style:le({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 c=[],f=i[0].coord,h=1;h<i.length;h++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Kt({shape:{cx:t.cx,cy:t.cy,r0:f,r:i[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=i[h].coord}for(var h=0;h<c.length;h++)r.add(Ar(c[h],{style:le({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function hZ(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 EN(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function TN(r,e){return e.dim+r.model.componentIndex}function dZ(r,e,t){var n={},a=pZ(ze(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=TN(s,l),c=EN(i),f=a[u][c],h=f.offset,d=f.width,p=s.getOtherAxis(l),v=i.coordinateSystem.cx,g=i.coordinateSystem.cy,m=i.get("barMinHeight")||0,y=i.get("barMinAngle")||0;n[c]=n[c]||[];for(var _=o.mapDimension(p.dim),x=o.mapDimension(l.dim),w=Ma(o,_),S=l.dim!=="radius"||!i.get("roundCap",!0),E=p.model,T=E.get("startValue"),C=p.dataToCoord(T||0),D=0,M=o.count();D<M;D++){var k=o.get(_,D),N=o.get(x,D),L=k>=0?"p":"n",R=C;w&&(n[c][N]||(n[c][N]={p:C,n:C}),R=n[c][N][L]);var I=void 0,O=void 0,P=void 0,B=void 0;if(p.dim==="radius"){var z=p.dataToCoord(k)-C,$=l.dataToCoord(N);Math.abs(z)<m&&(z=(z<0?-1:1)*m),I=R,O=R+z,P=$-h,B=P-d,w&&(n[c][N][L]=O)}else{var U=p.dataToCoord(k,S)-C,j=l.dataToCoord(N);Math.abs(U)<y&&(U=(U<0?-1:1)*y),I=j+h,O=I+d,P=R,B=R+U,w&&(n[c][N][L]=B)}o.setItemLayout(D,{cx:v,cy:g,r0:I,r:O,startAngle:-P*Math.PI/180,endAngle:-B*Math.PI/180,clockwise:P>=B})}}})}function pZ(r){var e={};A(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=TN(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var d=EN(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var p=W(n.get("barWidth"),c),v=W(n.get("barMaxWidth"),c),g=n.get("barGap"),m=n.get("barCategoryGap");p&&!h[d].width&&(p=Math.min(f.remainedWidth,p),h[d].width=p,f.remainedWidth-=p),v&&(h[d].maxWidth=v),g!=null&&(f.gap=g),m!=null&&(f.categoryGap=m)});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,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),A(i,function(v,g){var m=v.maxWidth;m&&m<f&&(m=Math.min(m,u),v.width&&(m=Math.min(m,v.width)),u-=m,v.width=m,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var h=0,d;A(i,function(v,g){v.width||(v.width=f),d=v,h+=v.width*(1+l)}),d&&(h-=d.width*l);var p=-h/2;A(i,function(v,g){t[a][g]=t[a][g]||{offset:p,width:v.width},p+=v.width*(1+l)})}),t}var vZ={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},gZ={splitNumber:5},mZ=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(at);function yZ(r){Te(Cu),Xi.registerAxisPointerClass("PolarAxisPointer",YY),r.registerCoordinateSystem("polar",aZ),r.registerComponentModel(XY),r.registerComponentView(mZ),us(r,"angle",KY,vZ),us(r,"radius",QY,gZ),r.registerComponentView(oZ),r.registerComponentView(cZ),r.registerLayout(me(dZ,"bar"))}function g0(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 c={horizontal:0,vertical:1};a.rotation=Math.PI/2*c[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),pt(e.labelInside,r.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var h=e.rotate;return h==null&&(h=r.get(["axisLabel","rotate"])),a.labelRotation=i==="top"?-h:h,a.z2=1,a}var _Z=["axisLine","axisTickLabel","axisName"],bZ=["splitArea","splitLine"],xZ=function(r){V(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 fe;var l=g0(t),u=new rr(t,l);A(_Z,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),A(bZ,function(c){t.get([c,"show"])&&wZ[c](this,this.group,this._axisGroup,t)},this),bl(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){zD(this)},e.type="singleAxis",e}(Xi),wZ={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(),c=a.isHorizontal(),f=[],h=0,d=a.getTicksCoords({tickModel:i}),p=[],v=[],g=0;g<d.length;++g){var m=a.toGlobalCoord(d[g].coord);c?(p[0]=m,p[1]=u.y,v[0]=m,v[1]=u.y+u.height):(p[0]=u.x,p[1]=m,v[0]=u.x+u.width,v[1]=m);var y=new St({shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},silent:!0});Ro(y.shape,l);var _=h++%s.length;f[_]=f[_]||[],f[_].push(y)}for(var x=o.getLineStyle(["color"]),g=0;g<f.length;++g)e.add(Ar(f[g],{style:le({stroke:s[g%s.length]},x),silent:!0}))}},splitArea:function(r,e,t,n){VD(r,t,n,n)}},Wh=function(r){V(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}(Ae);dt(Wh,Xl.prototype);var SZ=function(r){V(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}(rn),CN=["single"],EZ=function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=CN,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 SZ(a,eh(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),as(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=bt({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=DN(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=DN(t);return a===this?this.pointToData(n):null},r}();function DN(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function TZ(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new EZ(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",gt).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var CZ={create:TZ,dimensions:CN},AN=["x","y"],DZ=["width","height"],AZ=function(r){V(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=m0(l,1-Yh(s)),c=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var h=u0(i),d=MZ[f](s,c,u);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=g0(a);uN(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=g0(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=c0(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=Yh(o),u=m0(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=m0(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(s0),MZ={line:function(r,e,t){var n=f0([e,t[0]],[e,t[1]],Yh(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:cN([e-n/2,t[0]],[n,a],Yh(r))}}};function Yh(r){return r.isHorizontal()?0:1}function m0(r,e){var t=r.getRect();return[t[AN[e]],t[AN[e]]+t[DZ[e]]]}var kZ=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(at);function NZ(r){Te(Cu),Xi.registerAxisPointerClass("SingleAxisPointer",AZ),r.registerComponentView(kZ),r.registerComponentView(xZ),r.registerComponentModel(Wh),us(r,"single",Wh,Wh.defaultOption),r.registerCoordinateSystem("single",CZ)}var IZ=function(r){V(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=$o(t);r.prototype.init.apply(this,arguments),MN(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),MN(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}(Ae);function MN(r,e){var t=r.cellSize,n;G(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=H([0,1],function(i){return EF(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});wa(r,e,{type:"box",ignoreSize:a})}var LZ=function(r){V(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 c=i.dataToRect([u],!1).tl,f=new Ie({shape:{x:c[0],y:c[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"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(v){o._firstDayOfMonth.push(s.getDateInfo(v)),o._firstDayPoints.push(s.dataToRect([v],!1).tl);var g=o._getLinePointsOfOneWeek(t,v,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,c,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,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 jt({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),c=i.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return X(t)&&t?xF(t,n):ie(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 c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,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]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=a==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var v=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:p},m=this._formatterLabel(v,g),y=new Le({z2:30,style:Xe(o,{text:m}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,d[l],a,l,s)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],c=t[1];return a==="horizontal"?(c=c+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,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"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||X(s))&&(s&&(n=kv(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",v=o.get("silent"),g=0;g<f[h].length-1;g++){var m=f[h][g].slice(),y=this._firstDayOfMonth[g];if(p){var _=this._firstDayPoints[g];m[d]=(_[d]+f[0][g+1][d])/2}var x=o.get("formatter"),w=s[+y.m-1],S={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:w},E=this._formatterLabel(x,S),T=new Le({z2:30,style:F(Xe(o,{text:E}),this._monthTextPositionControl(m,p,a,u,l)),silent:v});i.add(T)}}},e.prototype._weekTextPositionControl=function(t,n,a,i,o){var s="center",l="middle",u=t[0],c=t[1],f=a==="start";return n==="horizontal"?(u=u+i+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+i+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,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"),c=s.get("nameMap"),f=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||X(c)){c&&(n=kv(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||H(n.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var p=l.getNextNDay(a.end.time,7-a.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];f=W(f,Math.min(v[1],v[0])),u==="start"&&(p=l.getNextNDay(a.start.time,-(7+a.fweek)).time,f=-f);for(var g=s.get("silent"),m=0;m<7;m++){var y=l.getNextNDay(p,m),_=l.dataToRect([y.time],!1).center,x=m;x=Math.abs((m+h)%7);var w=new Le({z2:30,style:F(Xe(s,{text:c[x]}),this._weekTextPositionControl(_,i,u,f,v)),silent:g});o.add(w)}}},e.type="calendar",e}(at),RZ={},y0=864e5,OZ=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=dn(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){c(i,f)&&(o[a[f]]=i[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=bt(o,l);A([0,1],function(f){c(i,f)||(i[f]=u[a[f]]/s[f])});function c(f,h){return f[h]!=null&&f[h]!=="auto"}this._sw=i[0],this._sh=i[1]},r.prototype.dataToPoint=function(e,t){G(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+y0))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=kN(t);return a===this?a.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=kN(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(G(e)&&e.length===1&&(e=e[0]),G(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 RZ.NODE_ENV!=="production"&&Hr("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/y0)-Math.floor(t[0].time/y0)+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 c=Math.floor((a+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:c,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 kN(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function PZ(r){r.registerComponentModel(IZ),r.registerComponentView(LZ),r.registerCoordinateSystem("calendar",OZ)}var NN={};function BZ(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 IN(r,e){var t;return A(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function VZ(r,e,t){var n=F({},t),a=r[e],i=t.$action||"merge";if(i==="merge")if(a){if(NN.NODE_ENV!=="production"){var o=t.type;se(!o||a.type===o,'Please set $action: "replace" to change `type`')}_e(a,n,!0),wa(a,n,{ignoreSize:!0}),jw(t,a),Zh(t,a),Zh(t,a,"shape"),Zh(t,a,"style"),Zh(t,a,"extra"),t.clipPath=a.clipPath}else r[e]=n;else i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var LN=["transition","enterFrom","leaveTo"],zZ=LN.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Zh(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?LN:zZ,a=0;a<n.length;a++){var i=n[a];r[i]==null&&e[i]!=null&&(r[i]=e[i])}}function FZ(r,e){if(r&&(r.hv=e.hv=[IN(e,["left","right"]),IN(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 $Z=function(r){V(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=i1(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];A(l,function(c,f){var h=c.newOption;NN.NODE_ENV!=="production"&&se(oe(h)||c.existing,"Empty graphic option definition"),h&&(u.push(h),BZ(c,h),VZ(o,f,h),FZ(o[f],h))},this),a.elements=ze(o,function(c){return c&&delete c.$action,c!=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}(Ae),_0={},RN={path:null,compoundPath:null,group:fe,image:It,text:Le},Fr=Ne(),GZ=function(r){V(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=te()},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=_t(l.id,null),c=u!=null?a.get(u):null,f=_t(l.parentId,null),h=f!=null?a.get(f):i,d=l.type,p=l.style;d==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var v=l.textContent,g=l.textConfig;if(p&&Ik(p,d,!!g,!!v)){var m=Lk(p,d,!0);!g&&m.textConfig&&(g=l.textConfig=m.textConfig),!v&&m.textContent&&(v=m.textContent)}var y=HZ(l);_0.NODE_ENV!=="production"&&c&&se(h===c.parent,"Changing parent is not supported.");var _=l.$action||"merge",x=_==="merge",w=_==="replace";if(x){var S=!c,E=c;S?E=ON(u,h,l.type,a):(E&&(Fr(E).isNew=!1),Zk(E)),E&&(Bh(E,y,t,{isInit:S}),PN(E,l,o,s))}else if(w){qh(c,l,a,t);var T=ON(u,h,l.type,a);T&&(Bh(T,y,t,{isInit:!0}),PN(T,l,o,s))}else _==="remove"&&($k(c,l),qh(c,l,a,t));var C=a.get(u);if(C&&v)if(x){var D=C.getTextContent();D?D.attr(v):C.setTextContent(new Le(v))}else w&&C.setTextContent(new Le(v));if(C){var M=l.clipPath;if(M){var k=M.type,N=void 0,S=!1;if(x){var L=C.getClipPath();S=!L||Fr(L).type!==k,N=S?b0(k):L}else w&&(S=!0,N=b0(k));C.setClipPath(N),Bh(N,M,t,{isInit:S}),zh(N,M.keyframeAnimation,t)}var R=Fr(C);C.setTextConfig(g),R.option=l,UZ(C,t,l),Ci({el:C,componentModel:t,itemName:C.name,itemTooltipOption:l.tooltip}),zh(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"],c=0;c<a.length;c++){var f=a[c],h=_t(f.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var p=d.parent,v=p===i,g=Fr(d),m=Fr(p);g.width=W(g.option.width,v?s:m.width)||0,g.height=W(g.option.height,v?l:m.height)||0}}for(var c=a.length-1;c>=0;c--){var f=a[c],h=_t(f.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,m=Fr(p),y=p===i?{width:s,height:l}:{width:m.width,height:m.height},_={},x=yf(d,f,y,null,{hv:f.hv,boundingMode:f.bounding},_);if(!Fr(d).isNew&&x){for(var w=f.transition,S={},E=0;E<u.length;E++){var T=u[E],C=_[T];w&&(io(w)||we(w,T)>=0)?S[T]=C:d[T]=C}Ve(d,S,t,0)}else d.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){qh(a,Fr(a).option,n,t._lastGraphicModel)}),this._elMap=te()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(at);function b0(r){_0.NODE_ENV!=="production"&&se(r,"graphic type MUST be set");var e=Q(RN,r)?RN[r]:wv(r);_0.NODE_ENV!=="production"&&se(e,"graphic type "+r+" can not be found");var t=new e({});return Fr(t).type=r,t}function ON(r,e,t,n){var a=b0(t);return e.add(a),n.set(r,a),Fr(a).id=r,Fr(a).isNew=!0,a}function qh(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){qh(i,e,t,n)}),Vh(r,e,n),t.removeKey(Fr(r).id))}function PN(r,e,t,n){r.isGroup||A([["cursor",Cr.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];Q(e,i)?r[i]=pe(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),A(Me(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=ie(i)?i:null}}),Q(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function HZ(r){return r=F({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Qw),function(e){delete r[e]}),r}function UZ(r,e,t){var n=ve(r).eventData;!r.silent&&!r.ignore&&!n&&(n=ve(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function WZ(r){r.registerComponentModel($Z),r.registerComponentView(GZ),r.registerPreprocessor(function(e){var t=e.graphic;G(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var YZ={},BN=["x","y","radius","angle","single"],ZZ=["cartesian2d","polar","singleAxis"];function qZ(r){var e=r.get("coordinateSystem");return we(ZZ,e)>=0}function za(r){return YZ.NODE_ENV!=="production"&&se(r),r+"Axis"}function XZ(r,e){var t=te(),n=[],a=te();r.eachComponent({mainType:"dataZoom",query:e},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var p=t.get(h);p&&p[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return n}function VN(r){var e=r.ecModel,t={infoList:[],infoMap:te()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(za(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 zN={},x0=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}(),Du=function(r){V(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=FN(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=FN(t);_e(this.option,t,!0),_e(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=te(),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(BN,function(a){var i=this.getReferringComponents(za(a),lV);if(i.specified){n=!0;var o=new x0;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(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new x0;if(h.add(f.componentIndex),t.set(c,h),i=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",gt).models[0];d&&A(u,function(p){f.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",gt).models[0]&&h.add(p.componentIndex)})}}}i&&A(BN,function(u){if(i){var c=a.findComponents({mainType:za(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new x0;f.add(c[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(za(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){zN.NODE_ENV!=="production"&&se(t&&n!=null);var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(za(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 zN.NODE_ENV!=="production"&&se(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}(Ae);function FN(r){var e={};return A(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var KZ=function(r){V(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}(Du),w0=function(r){V(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}(at),QZ=function(r){V(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}(w0),_s=A,$N=Tr,jZ=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(qZ(t)){var n=za(this._dimName),a=t.getReferringComponents(n,gt).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 ce(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;_s(["start","end"],function(h,d){var p=e[h],v=e[h+"Value"];i[d]==="percent"?(p==null&&(p=o[d]),v=a.parse($e(p,o,t))):(u=!0,v=v==null?t[d]:a.parse(v),p=$e(v,t,o)),l[d]=v==null||isNaN(v)?t[d]:v,s[d]=p==null||isNaN(p)?o[d]:p}),$N(l),$N(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(h,d,p,v,g){var m=g?"Span":"ValueSpan";to(0,h,p,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)d[y]=$e(h[y],p,v,!0),g&&(d[y]=a.parse(d[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=JZ(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;_s(a,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(i==="weakFilter"){var f=u.getStore(),h=H(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,v,g,m=0;m<c.length;m++){var y=f.get(h[m],d),_=!isNaN(y),x=y<o[0],w=y>o[1];if(_&&!x&&!w)return!0;_&&(g=!0),x&&(p=!0),w&&(v=!0)}return g&&p&&v})}else _s(c,function(d){if(i==="empty")l.setData(u=u.map(d,function(v){return s(v)?v:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});_s(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;_s(["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=$e(n[0]+o,n,[0,100],!0):i!=null&&(o=$e(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=Yx(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 JZ(r,e,t){var n=[1/0,-1/0];_s(t,function(o){fG(n,o.getData(),e)});var a=r.getAxisModel(),i=zT(a.axis.scale,a,n).calculate();return[i.min,i.max]}var eq={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(za(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 jZ(a,i,s,r),t.push(o.__dzAxisProxy))});var n=te();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 tq(r){r.registerAction("dataZoom",function(e,t){var n=XZ(t,e);A(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var GN=!1;function S0(r){GN||(GN=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,eq),tq(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function rq(r){r.registerComponentModel(KZ),r.registerComponentView(QZ),S0(r)}var $r=function(){function r(){}return r}(),HN={};function bs(r,e){HN[r]=e}function UN(r){return HN[r]}var nq=function(r){V(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=UN(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),_e(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}(Ae);function aq(r,e,t){var n=e.getBoxLayoutParams(),a=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=bt(n,i,a);ki(e.get("orient"),r,e.get("itemGap"),o.width,o.height),yf(r,n,i,a)}function WN(r,e){var t=Fo(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new Ie({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 iq=function(r){V(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")||{},c=this._features||(this._features={}),f=[];A(u,function(p,v){f.push(v)}),new Yn(this._featureNames||[],f).add(h).update(h).remove(me(h,null)).execute(),this._featureNames=f;function h(p,v){var g=f[p],m=f[v],y=u[g],_=new Ge(y,t,t.ecModel),x;if(i&&i.newTitle!=null&&i.featureName===g&&(y.title=i.newTitle),g&&!m){if(oq(g))x={onclick:_.option.onclick,featureName:g};else{var w=UN(g);if(!w)return;x=new w}c[g]=x}else if(x=c[m],!x)return;x.uid=Po("toolbox-feature"),x.model=_,x.ecModel=n,x.api=a;var S=x instanceof $r;if(!g&&m){S&&x.dispose&&x.dispose(n,a);return}if(!_.get("show")||S&&x.unusable){S&&x.remove&&x.remove(n,a);return}d(_,x,g),_.setIconStatus=function(E,T){var C=this.option,D=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[E]=T,D[E]&&(T==="emphasis"?$n:Gn)(D[E])},x instanceof $r&&x.render&&x.render(_,n,a,i)}function d(p,v,g){var m=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),_=v instanceof $r&&v.getIcons?v.getIcons():p.get("icon"),x=p.get("title")||{},w,S;X(_)?(w={},w[g]=_):w=_,X(x)?(S={},S[g]=x):S=x;var E=p.iconPaths={};A(w,function(T,C){var D=xl(T,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(m.getItemStyle());var M=D.ensureState("emphasis");M.style=y.getItemStyle();var k=new Le({style:{text:S[C],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:Tv({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},n)},ignore:!0});D.setTextContent(k),Ci({el:D,componentModel:t,itemName:C,formatterParamsExtra:{title:S[C]}}),D.__title=S[C],D.on("mouseover",function(){var N=y.getItemStyle(),L=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";k.setStyle({fill:y.get("textFill")||N.fill||N.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),D.setTextConfig({position:y.get("textPosition")||L}),k.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&a.leaveEmphasis(this),k.hide()}),(p.get(["iconStatus",C])==="emphasis"?$n:Gn)(D),o.add(D),D.on("click",K(v.onclick,v,n,a,C)),E[C]=D})}aq(o,t,a),o.add(WN(o.getBoundingRect(),t)),l||o.eachChild(function(p){var v=p.__title,g=p.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=p.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!ie(_)&&v){var x=_.style||(_.style={}),w=el(v,Le.makeFont(x)),S=p.x+o.x,E=p.y+o.y+s,T=!1;E+w.height>a.getHeight()&&(m.position="top",T=!0);var C=T?-5-w.height:s+10;S+w.width/2>a.getWidth()?(m.position=["100%",C],x.align="right"):S-w.width/2<0&&(m.position=[0,C],x.align="left")}})},e.prototype.updateView=function(t,n,a,i){A(this._features,function(o){o instanceof $r&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){A(this._features,function(a){a instanceof $r&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){A(this._features,function(a){a instanceof $r&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e}(at);function oq(r){return r.indexOf("my")===0}var sq=function(r){V(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=Ce.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];d&&(p=window.atob(p));var v=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,v)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,w=x.document;w.open("image/svg+xml","replace"),w.write(p),w.close(),x.focus(),w.execCommand("SaveAs",!0,v),document.body.removeChild(_)}}else{var S=a.get("lang"),E='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',T=window.open();T.document.write(E),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}($r),YN="__ec_magicType_stack__",lq=[["line","bar"],["stack"]],uq=function(r){V(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(ZN[a]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,p=ZN[a](h,d,f,i);p&&(le(p,f.option),s.series.push(p));var v=f.coordinateSystem;if(v&&v.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=v.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=f.getReferringComponents(y,gt).models[0],x=_.componentIndex;s[y]=s[y]||[];for(var w=0;w<=x;w++)s[y][x]=s[y][x]||{};s[y][x].boundaryGap=a==="bar"}}};A(lq,function(f){we(f,a)>=0&&A(f,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=_e({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}($r),ZN={line:function(r,e,t,n){if(r==="bar")return _e({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 _e({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")===YN;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),_e({id:e,stack:a?"":YN},n.get(["option","stack"])||{},!0)}};wn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var cq={},Xh=new Array(60).join("-"),xs=" ";function fq(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 hq(r){var e=[];return A(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(H(t.series,function(d){return d.name})),l=[a.model.getCategories()];A(t.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(v){return v}))});for(var u=[s.join(xs)],c=0;c<l[0].length;c++){for(var f=[],h=0;h<l.length;h++)f.push(l[h][c]);u.push(f.join(xs))}e.push(u.join(`
|
|
216
|
+
`))}),e.join(`
|
|
217
|
+
|
|
218
|
+
`+Xh+`
|
|
219
|
+
|
|
220
|
+
`)}function dq(r){return H(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+xs:"")+a.join(xs))}),n.join(`
|
|
221
|
+
`)}).join(`
|
|
222
|
+
|
|
223
|
+
`+Xh+`
|
|
224
|
+
|
|
225
|
+
`)}function pq(r){var e=fq(r);return{value:ze([hq(e.seriesGroupByCategoryAxis),dq(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
|
|
226
|
+
|
|
227
|
+
`+Xh+`
|
|
228
|
+
|
|
229
|
+
`),meta:e.meta}}function Kh(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function vq(r){var e=r.slice(0,r.indexOf(`
|
|
230
|
+
`));if(e.indexOf(xs)>=0)return!0}var E0=new RegExp("["+xs+"]+","g");function gq(r){for(var e=r.split(/\n+/g),t=Kh(e.shift()).split(E0),n=[],a=H(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=Kh(e[i]).split(E0);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 mq(r){for(var e=r.split(/\n+/g),t=Kh(e.shift()),n=[],a=0;a<e.length;a++){var i=Kh(e[a]);if(i){var o=i.split(E0),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 c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[a].value=l[0]:n[a]=l[0])}}return{name:t,data:n}}function yq(r,e){var t=r.split(new RegExp(`
|
|
231
|
+
*`+Xh+`
|
|
232
|
+
*`,"g")),n={series:[]};return A(t,function(a,i){if(vq(a)){var o=gq(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=mq(a);n.series.push(o)}}),n}var _q=function(r){V(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"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=i.get("optionToContent"),h=i.get("contentToOption"),d=pq(t);if(ie(f)){var p=f(n.getOption());X(p)?u.innerHTML=p:Za(p)&&u.appendChild(p)}else{c.readOnly=i.get("readOnly");var v=c.style;v.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",v.color=i.get("textColor"),v.borderColor=i.get("textareaBorderColor"),v.backgroundColor=i.get("textareaColor"),c.value=d.value,u.appendChild(c)}var g=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),x=document.createElement("div");y+=";background-color:"+i.get("buttonColor"),y+=";color:"+i.get("buttonTextColor");var w=this;function S(){a.removeChild(o),w._dom=null}Wd(_,"click",S),Wd(x,"click",function(){if(h==null&&f!=null||h!=null&&f==null){cq.NODE_ENV!=="production"&&st("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),S();return}var E;try{ie(h)?E=h(u,n.getOption()):E=yq(c.value,g)}catch(T){throw S(),new Error("Data view format error "+T)}E&&n.dispatchAction({type:"changeDataView",newOption:E}),S()}),_.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=_.style.cssText=y,!i.get("readOnly")&&m.appendChild(x),m.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(m),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}($r);function bq(r,e){return H(r,function(t,n){var a=e&&e[n];if(oe(a)&&!G(a)){var i=oe(t)&&!G(t);i||(t={value:t});var o=a.name!=null&&t.name==null;return t=le(t,a),o&&delete t.name,t}else return t})}wn({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(F({type:"scatter"},n));else{var i=a.get("data");t.push({name:n.name,data:bq(n.data,i)})}}),e.mergeOption(le({series:t},r.newOption))});var qN=A,XN=Ne();function xq(r,e){var t=T0(r);qN(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 wq(r){var e=T0(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return qN(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 Sq(r){XN(r).snapshots=null}function Eq(r){return T0(r).length}function T0(r){var e=XN(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Tq=function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){Sq(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}($r);wn({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var KN={},Cq=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],C0=function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=QN(t,e);A(Dq,function(o,s){(!n||!n.include||we(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=A0[n.brushType](0,i,a);n.__rangeOffset={offset:tI[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=A0[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(KN.NODE_ENV!=="production"&&(se(!a||a===!0||n.coordRange,"coordRange must be specified when coord index specified."),se(!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=A0[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?tI[n.brushType](i.values,o.offset,Aq(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return H(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:GM(a),isTargetByCursor:UM(a,e,n.coordSysModel),getLinearBrushOtherExtent:HM(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&we(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=QN(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<jN.length;l++)if(jN[l](a,o))return o}return!0},r}();function D0(r){return r[0]>r[1]&&r.reverse(),r}function QN(r,e){return il(r,e,{includeMainTypes:Cq})}var Dq={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=te(),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,c=[];A(u.getCartesians(),function(f,h){(we(t,f.getAxis("x").model)>=0||we(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:JN.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:JN.geo})})}},jN=[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}],JN={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Ti(r)),e}},A0={lineX:me(eI,0),lineY:me(eI,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=[D0([a[0],i[0]]),D0([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=H(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 eI(r,e,t,n){KN.NODE_ENV!=="production"&&se(t.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var a=t.getAxis(["x","y"][r]),i=D0(H([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 tI={lineX:me(rI,0),lineY:me(rI,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 H(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function rI(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function Aq(r,e){var t=nI(r),n=nI(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 nI(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var M0=A,Mq=nV("toolbox-dataZoom_"),kq=function(r){V(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 Ty(a.getZr()),this._brushController.on("brush",K(this._onBrush,this)).mount()),Lq(t,n,this,i,a),Iq(t,n)},e.prototype.onclick=function(t,n,a){Nq[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 C0(k0(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),xq(i,a),this._dispatchZoomAction(a);function s(u,c,f){var h=c.getAxis(u),d=h.model,p=l(u,d,i),v=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(f=to(0,f.slice(),h.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(a[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(h=d)}),h}},e.prototype._dispatchZoomAction=function(t){var n=[];M0(t,function(a,i){n.push(ce(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}($r),Nq={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(wq(this.ecModel))}};function k0(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 Iq(r,e){r.setIconStatus("back",Eq(e)>1?"emphasis":"normal")}function Lq(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 C0(k0(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)}NF("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=k0(n),o=il(r,i);M0(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),M0(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Mq+u+f};h[c]=f,a.push(h)}return a});function Rq(r){r.registerComponentModel(nq),r.registerComponentView(iq),bs("saveAsImage",sq),bs("magicType",uq),bs("dataView",_q),bs("dataZoom",kq),bs("restore",Tq),Te(rq)}var Oq=function(r){V(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}(Ae);function aI(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function iI(r){if(Ce.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var oI=iI(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Pq=iI(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function sI(r,e){if(!r)return e;e=qw(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function Bq(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var Vq=sI(Pq,"transition"),N0=sI(oI,"transform"),zq="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Ce.transform3dSupported?"will-change:transform;":"");function Fq(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function $q(r,e,t){if(!X(t)||t==="inside")return"";var n=r.get("backgroundColor"),a=r.get("borderWidth");e=Ai(e);var i=Fq(t),o=Math.max(Math.round(a)*1.5,6),s="",l=N0+":",u;we(["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 c=u*Math.PI/180,f=o+a,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-f)/2)*100)/100;s+=";"+i+":-"+d+"px";var p=e+" solid "+a+"px;",v=["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="'+v.join("")+'"></div>'}function Gq(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+=Ce.transformSupported?","+N0+n:",left"+n+",top"+n),Vq+":"+a}function lI(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!Ce.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=Ce.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+N0+":"+o+";":[["top",0],["left",0],[oI,o]]}function Hq(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var a=pe(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 c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Uq(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"),c=r.getModel("textStyle"),f=eE(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&a&&n.push(Gq(a,t)),i&&n.push("background-color:"+i),A(["width","color","radius"],function(d){var p="border-"+d,v=qw(p),g=r.get(v);g!=null&&n.push(p+":"+g+(d==="color"?"":"px"))}),n.push(Hq(c)),f!=null&&n.push("padding:"+Fo(f).join("px ")+"px"),n.join(";")+";"}function uI(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&DP(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 Wq=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,Ce.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&&(X(i)?document.querySelector(i):Za(i)?i:ie(i)&&i(e.getDom()));uI(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,c=a.painter.getViewportRoot();wr(c,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=Bq(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=zq+Uq(e,!this._firstShow,this._longHide)+lI(i[0],i[1],!0)+("border-color:"+Ai(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(X(i)&&n.get("trigger")==="item"&&!aI(n)&&(s=$q(n,a,i)),X(e))o.innerHTML=e+s;else if(e){o.innerHTML="",G(e)||(e=[e]);for(var l=0;l<e.length;l++)Za(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(uI(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var a=this.el.style,i=lI(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",Ce.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(K(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}(),Yq={},Zq=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),fI(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;oe(e)&&Fe(Yq.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 Le({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:eE(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=cI(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;fI(a,this._zr,e,t),e=a[0],t=a[1];var i=n.style,o=Fa(i.borderWidth||0),s=cI(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(K(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function Fa(r){return Math.max(0,r)}function cI(r){var e=Fa(r.shadowBlur||0),t=Fa(r.shadowOffsetX||0),n=Fa(r.shadowOffsetY||0);return{left:Fa(e-t),right:Fa(e+t),top:Fa(e-n),bottom:Fa(e+n)}}function fI(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var qq=new Ie({shape:{x:-1,y:-1,width:2,height:2}}),Xq=function(r){V(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(!(Ce.node||!n.getDom())){var a=t.getComponent("tooltip"),i=this._renderMode=cV(a.get("renderMode"));this._tooltipContent=i==="richText"?new Zq(n):new Wq(n,{appendTo:a.get("appendToBody",!0)?"body":a.get("appendTo",!0)})}},e.prototype.render=function(t,n,a){if(!(Ce.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")?Ko(this,"_updatePosition",50,"fixRate"):Rl(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");pN("itemTooltip",this._api,K(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||Ce.node||!a.getDom())){var o=hI(i,a);this._ticket="";var s=i.dataByCoordSys,l=Jq(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 c=qq;c.x=i.x,c.y=i.y,c.update(),ve(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},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=gN(i,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,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(hI(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 c=u.getData(),f=Au([c.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=ve(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ri(a,function(c){if(ve(c).dataIndex!=null)return l=c,!0;if(ve(c).tooltipConfig!=null)return u=c,!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=K(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=Au([n.tooltipOption],i),l=this._renderMode,u=[],c=Tt("section",{blocks:[],noHeader:!0}),f=[],h=new og;A(t,function(y){A(y.dataByAxis,function(_){var x=a.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!x||w==null)){var S=lN(w,x.axis,a,_.seriesDataIndices,_.valueLabelOpt),E=Tt("section",{header:S,noHeader:!Ur(S),sortBlocks:!0,blocks:[]});c.blocks.push(E),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=Wg(x.axis,{value:w}),M.axisValueLabel=S,M.marker=h.makeTooltipMarker("item",Ai(M.color),l);var k=RS(C.formatTooltip(D,!0,null)),N=k.frag;if(N){var L=Au([C],i).get("valueFormatter");E.blocks.push(L?F({valueFormatter:L},N):N)}k.text&&f.push(k.text),u.push(M)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,p=s.get("order"),v=QS(c,h,l,p,a.get("useUTC"),s.get("textStyle"));v&&f.unshift(v);var g=l==="richText"?`
|
|
233
|
+
|
|
234
|
+
`:"<br/>",m=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=ve(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,p=t.positionDefault,v=Au([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,f),y=new og;m.marker=y.makeTooltipMarker("item",Ai(m.color),d);var _=RS(u.formatTooltip(c,!1,f)),x=v.get("order"),w=v.get("valueFormatter"),S=_.frag,E=S?QS(w?F({valueFormatter:w},S):S,y,d,x,i.get("useUTC"),v.get("textStyle")):_.text,T="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,E,m,T,t.offsetX,t.offsetY,t.position,t.target,y)}),a({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=this._renderMode==="html",o=ve(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(X(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=ce(l),l.content=Yt(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=t.positionDefault,p=Au(f,this._tooltipModel,d?{position:d}:null),v=p.get("content"),g=Math.random()+"",m=new og;this._showOrMove(p,function(){var y=ce(p.get("formatterParams")||{});this._showTooltipContent(p,v,y,g,t.offsetX,t.offsetY,t.position,n,m)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var d=n,p=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor")),v=p.color;if(h)if(X(h)){var g=t.ecModel.get("useUTC"),m=G(a)?a[0]:a,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=ff(m.axisValue,d,g)),d=Kw(d,a,!0)}else if(ie(h)){var _=K(function(x,w){x===this._ticket&&(f.setContent(w,c,t,v,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,d=h(a,i,_)}else d=h;f.setContent(d,c,t,v,l),f.show(t,v),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i){if(a==="axis"||G(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!G(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),h=t.get("align"),d=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),ie(n)&&(n=n([a,i],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),G(n))a=W(n[0],u),i=W(n[1],c);else if(oe(n)){var v=n;v.width=f[0],v.height=f[1];var g=bt(v,{width:u,height:c});a=g.x,i=g.y,h=null,d=null}else if(X(n)&&l){var m=jq(n,p,f,t.get("borderWidth"));a=m[0],i=m[1]}else{var m=Kq(a,i,o,u,c,h?null:20,d?null:20);a=m[0],i=m[1]}if(h&&(a-=dI(h)?f[0]/2:h==="right"?f[0]:0),d&&(i-=dI(d)?f[1]/2:d==="bottom"?f[1]:0),aI(t)){var m=Qq(a,i,o,u,c);a=m[0],i=m[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||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&A(u,function(h,d){var p=f[d]||{},v=h.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&v.length===g.length,o&&A(v,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),i&&A(h.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],x=i[y];_&&x&&x.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){Ce.node||!n.getDom()||(Rl(this,"_updatePosition"),this._tooltipContent.dispose(),h0("itemTooltip",n))},e.type="tooltip",e}(at);function Au(r,e,t){var n=e.ecModel,a;t?(a=new Ge(t,n,n),a=new Ge(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Ge&&(o=o.get("tooltip",!0)),X(o)&&(o={formatter:o}),o&&(a=new Ge(o,a,n)))}return a}function hI(r,e){return r.dispatchAction||K(e.dispatchAction,e)}function Kq(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 Qq(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 jq(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,c=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+c/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+c+o;break;case"left":s=e.x-a-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function dI(r){return r==="center"||r==="middle"}function Jq(r,e,t){var n=Bp(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=ol(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 c=ve(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function eX(r){Te(Cu),r.registerComponentModel(Oq),r.registerComponentView(Xq),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ft),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ft)}var tX=["rect","polygon","keep","clear"];function rX(r,e){var t=He(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;G(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),nX(s),e&&!s.length&&s.push.apply(s,tX)}}function nX(r){var e={};A(r,function(t){e[t]=1}),r.length=0,A(e,function(t,n){r.push(n)})}var pI=A;function vI(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function I0(r,e,t){var n={};return pI(e,function(i){var o=n[i]=a();pI(r[i],function(s,l){if(At.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new At(u),l==="opacity"&&(u=ce(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new At(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function gI(r,e,t){var n;A(t,function(a){e.hasOwnProperty(a)&&vI(e[a])&&(n=!0)}),n&&A(t,function(a){e.hasOwnProperty(a)&&vI(e[a])?r[a]=ce(e[a]):delete r[a]})}function aX(r,e,t,n,a,i){var o={};A(r,function(f){var h=At.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return hg(t,s,f)}function u(f,h){SE(t,s,f,h)}t.each(c);function c(f,h){s=f;var d=t.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(a,f),v=e[p],g=o[p],m=0,y=g.length;m<y;m++){var _=g[m];v[_]&&v[_].applyVisual(f,l,u)}}}function iX(r,e,t,n){var a={};return A(r,function(i){var o=At.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(w){return hg(s,f,w)}function c(w,S){SE(s,f,w,S)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var p=n!=null?h.get(l,f):f,v=t(p),g=e[v],m=a[v],y=0,_=m.length;y<_;y++){var x=m[y];g[x]&&g[x].applyVisual(p,u,c)}}}}}function oX(r){var e=r.brushType,t={point:function(n){return mI[e].point(n,t,r)},rect:function(n){return mI[e].rect(n,t,r)}};return t}var mI={lineX:yI(0),lineY:yI(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])&&Fi(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(Fi(n,a,i)||Fi(n,a+o,i)||Fi(n,a,i+s)||Fi(n,a+o,i+s)||xe.create(r).contain(l[0],l[1])||wl(a,i,a+o,i,n)||wl(a,i,a,i+s,n)||wl(a+o,i,a+o,i+s,n)||wl(a,i+s,a+o,i+s,n))return!0}}};function yI(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return Mu(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(),Mu(s[0],o)||Mu(s[1],o)||Mu(o[0],s)||Mu(o[1],s)}}}}function Mu(r,e){return e[0]<=r&&r<=e[1]}var _I=["inBrush","outOfBrush"],L0="__ecBrushSelect",R0="__ecInBrushSelectEvent";function bI(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new C0(e.option,r);t.setInputRanges(e.areas,r)})}function sX(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})}),bI(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:ce(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],d=[],p=!1;s||(a=u.throttleType,i=u.throttleDelay);var v=H(o.areas,function(w){var S=fX[w.brushType],E=le({boundingRect:S?S(w):void 0},w);return E.selectors=oX(E),E}),g=I0(o.option,_I,function(w){w.mappingMethod="fixed"});G(c)&&A(c,function(w){f[w]=1});function m(w){return c==="all"||!!f[w]}function y(w){return!!w.length}r.eachSeries(function(w,S){var E=d[S]=[];w.subType==="parallel"?_(w,S):x(w,S,E)});function _(w,S){var E=w.coordinateSystem;p=p||E.hasAxisBrushed(),m(S)&&E.eachActiveState(w.getData(),function(T,C){T==="active"&&(h[C]=1)})}function x(w,S,E){if(!(!w.brushSelector||cX(o,S))&&(A(v,function(C){o.brushTargetManager.controlSeries(C,w,r)&&E.push(C),p=p||y(E)}),m(S)&&y(E))){var T=w.getData();T.each(function(C){xI(w,E,T,C)&&(h[C]=1)})}}r.eachSeries(function(w,S){var E={seriesId:w.id,seriesIndex:S,seriesName:w.name,dataIndex:[]};l.selected.push(E);var T=d[S],C=w.getData(),D=m(S)?function(M){return h[M]?(E.dataIndex.push(C.getRawIndex(M)),"inBrush"):"outOfBrush"}:function(M){return xI(w,T,C,M)?(E.dataIndex.push(C.getRawIndex(M)),"inBrush"):"outOfBrush"};(m(S)?p:y(T))&&aX(_I,g,C,D)})}),lX(e,a,i,n,t)}function lX(r,e,t,n,a){if(a){var i=r.getZr();if(!i[R0]){i[L0]||(i[L0]=uX);var o=Ko(i,L0,t,e);o(r,n)}}}function uX(r,e){if(!r.isDisposed()){var t=r.getZr();t[R0]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[R0]=!1}}function xI(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 cX(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(G(t)?we(t,e)<0:e!==t)}var fX={rect:function(r){return wI(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&&wI(e)}};function wI(r){return new xe(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var hX=function(r){V(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 Ty(n.getZr())).on("brush",K(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){bI(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:ce(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ce(a),$from:n})},e.type="brush",e}(at),dX={},pX="#ddd",vX=function(r){V(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&&gI(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:pX},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){dX.NODE_ENV!=="production"&&(se(G(t)),A(t,function(n){se(n.brushType,"Illegal areas")})),t&&(this.areas=H(t,function(n){return SI(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=SI(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}(Ae);function SI(r,e){return _e({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Ge(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var gX=["rect","polygon","lineX","lineY","keep","clear"],mX=function(r){V(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:gX.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}($r);function yX(r){r.registerComponentView(hX),r.registerComponentModel(vX),r.registerPreprocessor(rX),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,sX),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"},ft),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ft),bs("brush",mX)}var _X=function(r){V(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}(Ae),bX=function(r){V(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=pe(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Le({style:Xe(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),d=new Le({style:Xe(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),v=t.get("sublink"),g=t.get("triggerEvent",!0);c.silent=!p&&!g,d.silent=!v&&!g,p&&c.on("click",function(){gf(p,"_"+t.get("target"))}),v&&d.on("click",function(){gf(v,"_"+t.get("subtarget"))}),ve(c).eventData=ve(d).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),h&&i.add(d);var m=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=bt(y,{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 x={align:l,verticalAlign:u};c.setStyle(x),d.setStyle(x),m=i.getBoundingRect();var w=_.margin,S=t.getItemStyle(["color","opacity"]);S.fill=t.get("backgroundColor");var E=new Ie({shape:{x:m.x-w[3],y:m.y-w[0],width:m.width+w[1]+w[3],height:m.height+w[0]+w[2],r:t.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});i.add(E)}},e.type="title",e}(at);function xX(r){r.registerComponentModel(_X),r.registerComponentView(bX)}var EI=function(r){V(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,c){var f=_t(Eo(u),""),h;oe(u)?(h=ce(u),h.value=c):h=c,o.push(h),i.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new Jt([{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}(Ae),TI=function(r){V(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=ba(EI.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}(EI);dt(TI,wf.prototype);var wX=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(at),SX=function(r){V(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}(rn),O0=Math.PI,CI=Ne(),EX=function(r){V(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 c=l.scale.getLabel({value:u});return Tt("nameValue",{noName:!0,value:c})},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=CX(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?"+":"-":X(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"},c={horizontal:0,vertical:O0/2},f=i==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),d=h.get("show",!0),p=d?h.get("itemSize"):0,v=d?h.get("itemGap"):0,g=p+v,m=t.get(["label","rotate"])||0;m=m*O0/180;var y,_,x,w=h.get("position",!0),S=d&&h.get("showPlayBtn",!0),E=d&&h.get("showPrevBtn",!0),T=d&&h.get("showNextBtn",!0),C=0,D=f;w==="left"||w==="bottom"?(S&&(y=[0,0],C+=g),E&&(_=[C,0],C+=g),T&&(x=[D-p,0],D-=g)):(S&&(y=[D-p,0],D-=g),E&&(_=[0,0],C+=g),T&&(x=[D-p,0],D-=g));var M=[C,D];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:m,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:y,prevBtnPosition:_,nextBtnPosition:x,axisExtent:M,controlSize:p,controlGap:v}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;ln(s,s,[-l,-u]),ja(s,s,-O0/2),ln(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(a.getBoundingRect()),h=y(i.getBoundingRect()),d=[a.x,a.y],p=[i.x,i.y];p[0]=d[0]=c[0][0];var v=t.labelPosOpt;if(v==null||X(v)){var g=v==="+"?0:1;_(d,f,c,1,g),_(p,h,c,1,1-g)}else{var g=v>=0?0:1;_(d,f,c,1,g),p[1]=d[1]+v}a.setPosition(d),i.setPosition(p),a.rotation=i.rotation=t.rotation,m(a),m(i);function m(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function y(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,w,S,E,T){x[E]+=S[E][T]-w[E][T]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=TX(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 SX("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new fe;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 St({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:F({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new St({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:le({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 c=a.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:K(o._changeTimeline,o,u.value)},g=DI(f,h,n,v);g.ensureState("emphasis").style=d.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),bi(g);var m=ve(g);f.get("tooltip")?(m.dataIndex=u.value,m.dataModel=i):m.dataIndex=m.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(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),p=h.getModel(["emphasis","label"]),v=h.getModel(["progress","label"]),g=a.dataToCoord(c.tickValue),m=new Le({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:K(o._changeTimeline,o,f),silent:!1,style:Xe(d,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=Xe(p),m.ensureState("progress").style=Xe(v),n.add(m),bi(m),CI(m).dataIndex=f,o._tickLabels.push(m)})}},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(),c=i.getPlayState(),f=i.get("inverse",!0);h(t.nextBtnPosition,"next",K(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",K(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",K(this._handlePlayClick,this,!c),!0);function h(d,p,v,g){if(d){var m=Zr(pe(i.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-m/2,m,m],_=DX(i,p+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:v});_.ensureState("emphasis").style=u,n.add(_),bi(_)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=K(u._handlePointerDrag,u),f.ondragend=K(u._handlePointerDragend,u),AI(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){AI(f,u._progressLine,s,a,i)}};this._currentPointer=DI(l,l,this._mainGroup,{},this._currentPointer,c)},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=Tr(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 jr(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),c=Math.abs(u-t);c<a&&(a=c,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",CI(a[i]).dataIndex<=t)},e.type="timeline.slider",e}(wX);function TX(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Xf({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new Gg({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new qn}}function CX(r,e){return bt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function DX(r,e,t,n){var a=n.style,i=xl(r.get(["controlStyle",e]),n||{},new xe(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function DI(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=yt(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=_e({rectHover:!0,z2:100},n,!0);var u=jo(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Oi(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function AI(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 AX(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)}),le({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 MX(r){var e=r&&r.timeline;G(e)||(e=e?[e]:[]),A(e,function(t){t&&kX(t)})}function kX(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),MI(r),so(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});so(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!so(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}A(r.data||[],function(a){oe(a)&&!G(a)&&(!so(a,"value")&&so(a,"name")&&(a.value=a.name),MI(a))})}function MI(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]&&!so(a,s)&&(a[s]=o)}),t.label&&!so(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function so(r,e){return r.hasOwnProperty(e)}function NX(r){r.registerComponentModel(TI),r.registerComponentView(EX),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),AX(r),r.registerPreprocessor(MX)}function P0(r,e){if(!r)return!1;for(var t=G(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}var IX={};function Qh(r){oi(r,"label",["show"])}var jh=Ne(),ea=function(r){V(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(IX.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(Ce.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=jh(s)[o];if(!l||!l.data){jh(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&Qh(l),A(l.data,function(c){c instanceof Array?(Qh(c[0]),Qh(c[1])):Qh(c)}),u=this.createMarkerModelFromSeries(l,this,n),F(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),jh(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return Tt("section",{header:this.name,blocks:[Tt("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=wf.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 jh(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Ae);dt(ea,wf.prototype);var LX=function(r){V(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}(ea);function B0(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function RX(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Jh(r,e,t,n,a,i){var o=[],s=Ma(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=z0(e,l,r),c=e.indicesOfNearest(l,u)[0];o[a]=e.get(t,c),o[i]=e.get(l,c);var f=e.get(n,c),h=hn(e.get(n,c));return h=Math.min(h,20),h>=0&&(o[i]=+o[i].toFixed(h)),[o,f]}var V0={min:me(Jh,"min"),max:me(Jh,"max"),average:me(Jh,"average"),median:me(Jh,"median")};function ku(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!RX(e)&&!G(e.coord)&&G(a)){var i=kI(e,t,n,r);if(e=ce(e),e.type&&V0[e.type]&&i.baseAxis&&i.valueAxis){var o=we(a,i.baseAxis.dim),s=we(a,i.valueAxis.dim),l=V0[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||!G(a))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)V0[u[c]]&&(u[c]=z0(t,t.mapDimension(a[c]),u[c]));return e}}function kI(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(OX(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 OX(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Nu(r,e){return r&&r.containData&&e.coord&&!B0(e)?r.containData(e.coord):!0}function PX(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!B0(e)&&!B0(t)?r.containZone(e.coord,t.coord):!0}function NI(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Ta(o,e[i])}:function(t,n,a,i){return Ta(t.value,e[i])}}function z0(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 F0=Ne(),$0=function(r){V(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=te()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){F0(s).keep=!1}),n.eachSeries(function(s){var l=ea.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!F0(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){F0(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;A(t,function(i){var o=ea.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?Z1(l):uv(l))})}})},e.type="marker",e}(at);function II(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),c=r.get(n.dimensions[1],a);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(a,o)})}var BX=function(r){V(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=ea.getMarkerModelFromSeries(i,"markPoint");o&&(II(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,c=u.get(s)||u.set(s,new ru),f=VX(o,t,n);n.setData(f),II(n.getData(),t,i),f.each(function(h){var d=f.getItemModel(h),p=d.getShallow("symbol"),v=d.getShallow("symbolSize"),g=d.getShallow("symbolRotate"),m=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(ie(p)||ie(v)||ie(g)||ie(m)){var _=n.getRawValue(h),x=n.getDataParams(h);ie(p)&&(p=p(_,x)),ie(v)&&(v=v(_,x)),ie(g)&&(g=g(_,x)),ie(m)&&(m=m(_,x))}var w=d.getModel("itemStyle").getItemStyle(),S=Bl(l,"color");w.fill||(w.fill=S),f.setItemVisual(h,{symbol:p,symbolSize:v,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:w})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){ve(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}($0);function VX(r,e,t){var n;r?n=H(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return F(F({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Jt(n,t),i=H(t.get("data"),me(ku,e));r&&(i=ze(i,me(Nu,r)));var o=NI(!!r,n);return a.initData(i,null,o),a}function zX(r){r.registerComponentModel(LX),r.registerComponentView(BX),r.registerPreprocessor(function(e){P0(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var FX=function(r){V(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}(ea),$X={},ed=Ne(),GX=function(r,e,t,n){var a=r.getData(),i;if(G(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=pt(n.yAxis,n.xAxis);else{var u=kI(n,a,e,r);s=u.valueAxis;var c=ET(a,u.valueDataDim);l=z0(a,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=ce(n),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var v=t.get("precision");v>=0&&Oe(l)&&(l=+l.toFixed(Math.min(v,20))),d.coord[f]=p.coord[f]=l,i=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else $X.NODE_ENV!=="production"&&Hr("Invalid markLine data."),i=[]}var g=[ku(r,i[0]),ku(r,i[1]),F({},i[2])];return g[2].type=g[2].type||null,_e(g[2],g[0]),_e(g[2],g[1]),g};function td(r){return!isNaN(r)&&!isFinite(r)}function LI(r,e,t,n){var a=1-r,i=n.dimensions[r];return td(e[a])&&td(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function HX(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(LI(1,t,n,r)||LI(0,t,n,r)))return!0}return Nu(r,e[0])&&Nu(r,e[1])}function G0(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 c=i.dimensions,f=r.get(c[0],e),h=r.get(c[1],e);s=i.dataToPoint([f,h])}if(Zi(i,"cartesian2d")){var d=i.getAxis("x"),p=i.getAxis("y"),c=i.dimensions;td(r.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[t?0:1]):td(r.get(c[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 UX=function(r){V(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=ea.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=ed(o).from,u=ed(o).to;l.each(function(c){G0(l,c,!0,i,a),G0(u,c,!1,i,a)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),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,c=u.get(s)||u.set(s,new dy);this.group.add(c.group);var f=WX(o,t,n),h=f.from,d=f.to,p=f.line;ed(n).from=h,ed(n).to=d,n.setData(p);var v=n.get("symbol"),g=n.get("symbolSize"),m=n.get("symbolRotate"),y=n.get("symbolOffset");G(v)||(v=[v,v]),G(g)||(g=[g,g]),G(m)||(m=[m,m]),G(y)||(y=[y,y]),f.from.each(function(x){_(h,x,!0),_(d,x,!1)}),p.each(function(x){var w=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[h.getItemLayout(x),d.getItemLayout(x)]),w.stroke==null&&(w.stroke=h.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:d.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(x,"symbolOffset"),toSymbolRotate:d.getItemVisual(x,"symbolRotate"),toSymbolSize:d.getItemVisual(x,"symbolSize"),toSymbol:d.getItemVisual(x,"symbol"),style:w})}),c.updateData(p),f.line.eachItemGraphicEl(function(x){ve(x).dataModel=n,x.traverse(function(w){ve(w).dataModel=n})});function _(x,w,S){var E=x.getItemModel(w);G0(x,w,S,t,i);var T=E.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Bl(l,"color")),x.setItemVisual(w,{symbolKeepAspect:E.get("symbolKeepAspect"),symbolOffset:pe(E.get("symbolOffset",!0),y[S?0:1]),symbolRotate:pe(E.get("symbolRotate",!0),m[S?0:1]),symbolSize:pe(E.get("symbolSize"),g[S?0:1]),symbol:pe(E.get("symbol",!0),v[S?0:1]),style:T})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}($0);function WX(r,e,t){var n;r?n=H(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return F(F({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Jt(n,t),i=new Jt(n,t),o=new Jt([],t),s=H(t.get("data"),me(GX,e,r,t));r&&(s=ze(s,me(HX,r)));var l=NI(!!r,n);return a.initData(H(s,function(u){return u[0]}),null,l),i.initData(H(s,function(u){return u[1]}),null,l),o.initData(H(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function YX(r){r.registerComponentModel(FX),r.registerComponentView(UX),r.registerPreprocessor(function(e){P0(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var ZX=function(r){V(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}(ea),rd=Ne(),qX=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=ku(r,a),s=ku(r,i),l=o.coord,u=s.coord;l[0]=pt(l[0],-1/0),l[1]=pt(l[1],-1/0),u[0]=pt(u[0],1/0),u[1]=pt(u[1],1/0);var c=Id([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function nd(r){return!isNaN(r)&&!isFinite(r)}function RI(r,e,t,n){var a=1-r;return nd(e[a])&&nd(t[a])}function XX(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 Zi(r,"cartesian2d")?t&&n&&(RI(1,t,n)||RI(0,t,n))?!0:PX(r,a,i):Nu(r,a)||Nu(r,i)}function OI(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 c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),h=i.clampData(c),d=i.clampData(f),p=[];t[0]==="x0"?p[0]=h[0]>d[0]?f[0]:c[0]:p[0]=h[0]>d[0]?c[0]:f[0],t[1]==="y0"?p[1]=h[1]>d[1]?f[1]:c[1]:p[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(p,t,!0)}else{var v=r.get(t[0],e),g=r.get(t[1],e),m=[v,g];i.clampData&&i.clampData(m,m),s=i.dataToPoint(m,!0)}if(Zi(i,"cartesian2d")){var y=i.getAxis("x"),_=i.getAxis("y"),v=r.get(t[0],e),g=r.get(t[1],e);nd(v)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):nd(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var PI=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],KX=function(r){V(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=ea.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=H(PI,function(f){return OI(s,l,f,i,a)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.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,c=u.get(s)||u.set(s,{group:new fe});this.group.add(c.group),this.markKeep(c);var f=QX(o,t,n);n.setData(f),f.each(function(h){var d=H(PI,function(T){return OI(f,h,T,t,i)}),p=o.getAxis("x").scale,v=o.getAxis("y").scale,g=p.getExtent(),m=v.getExtent(),y=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],_=[v.parse(f.get("y0",h)),v.parse(f.get("y1",h))];Tr(y),Tr(_);var x=!(g[0]>y[1]||g[1]<y[0]||m[0]>_[1]||m[1]<_[0]),w=!x;f.setItemLayout(h,{points:d,allClipped:w});var S=f.getItemModel(h).getModel("itemStyle").getItemStyle(),E=Bl(l,"color");S.fill||(S.fill=E,X(S.fill)&&(S.fill=pc(S.fill,.4))),S.stroke||(S.stroke=E),f.setItemVisual(h,"style",S)}),f.diff(rd(c).data).add(function(h){var d=f.getItemLayout(h);if(!d.allClipped){var p=new Qt({shape:{points:d.points}});f.setItemGraphicEl(h,p),c.group.add(p)}}).update(function(h,d){var p=rd(c).data.getItemGraphicEl(d),v=f.getItemLayout(h);v.allClipped?p&&c.group.remove(p):(p?Ve(p,{shape:{points:v.points}},n,h):p=new Qt({shape:{points:v.points}}),f.setItemGraphicEl(h,p),c.group.add(p))}).remove(function(h){var d=rd(c).data.getItemGraphicEl(h);c.group.remove(d)}).execute(),f.eachItemGraphicEl(function(h,d){var p=f.getItemModel(d),v=f.getItemVisual(d,"style");h.useStyle(f.getItemVisual(d,"style")),Pt(h,Et(p),{labelFetcher:n,labelDataIndex:d,defaultText:f.getName(d)||"",inheritColor:X(v.fill)?pc(v.fill,1):"#000"}),Ot(h,p),lt(h,null,null,p.get(["emphasis","disabled"])),ve(h).dataModel=n}),rd(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}($0);function QX(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=H(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return F(F({},f),{name:u,ordinalMeta:null})});a=H(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new Jt(a,t)}else a=[{name:"value",type:"float"}],n=new Jt(a,t);var s=H(t.get("data"),me(qX,e,r,t));r&&(s=ze(s,me(XX,r)));var l=r?function(u,c,f,h){var d=u.coord[Math.floor(h/2)][h%2];return Ta(d,a[h])}:function(u,c,f,h){return Ta(u.value,a[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}function jX(r){r.registerComponentModel(ZX),r.registerComponentView(KX),r.registerPreprocessor(function(e){P0(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var JX=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"])}},H0=function(r){V(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"]),G(n)&&A(n,function(i,o){X(i)&&(i={type:i}),n[o]=_e(i,JX(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 c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();t.isSeriesFiltered(l)||(a=a.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&Pp(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=te(),s=H(i,function(l){return(X(l)||Oe(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Ge(l,this,this.ecModel))},this);this._data=ze(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])&&we(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}(Ae),eK={},ws=me,U0=A,ad=fe,BI=function(r){V(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 ad),this.group.add(this._selectorGroup=new ad),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 c=t.getBoxLayoutParams(),f={width:a.getWidth(),height:a.getHeight()},h=t.get("padding"),d=bt(c,f,h),p=this.layoutInner(t,o,d,i,l,u),v=bt(le({width:p.width,height:p.height},c),f,h);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=WN(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(),c=te(),f=n.get("selectedMode"),h=[];a.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),U0(n.getData(),function(d,p){var v=d.get("name");if(!this.newlineDisabled&&(v===""||v===`
|
|
235
|
+
`)){var g=new ad;g.newline=!0,u.add(g);return}var m=a.getSeriesByName(v)[0];if(!c.get(v)){if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},x=y.getVisual("legendIcon"),w=y.getVisual("style"),S=this._createItem(m,v,p,d,n,t,_,w,x,f,i);S.on("click",ws(VI,v,null,i,h)).on("mouseover",ws(W0,m.name,null,i,h)).on("mouseout",ws(Y0,m.name,null,i,h)),a.ssr&&S.eachChild(function(E){var T=ve(E);T.seriesIndex=m.seriesIndex,T.dataIndex=p,T.ssrType="legend"}),c.set(v,!0)}else a.eachRawSeries(function(E){if(!c.get(v)&&E.legendVisualProvider){var T=E.legendVisualProvider;if(!T.containName(v))return;var C=T.indexOfName(v),D=T.getItemVisual(C,"style"),M=T.getItemVisual(C,"legendIcon"),k=hr(D.fill);k&&k[3]===0&&(k[3]=.2,D=F(F({},D),{fill:Rn(k,"rgba")}));var N=this._createItem(E,v,p,d,n,t,{},D,M,f,i);N.on("click",ws(VI,null,v,i,h)).on("mouseover",ws(W0,null,v,i,h)).on("mouseout",ws(Y0,null,v,i,h)),a.ssr&&N.eachChild(function(L){var R=ve(L);R.seriesIndex=E.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),c.set(v,!0)}},this);eK.NODE_ENV!=="production"&&(c.get(v)||console.warn(v+" 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();U0(t,function(u){var c=u.type,f=new Le({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Pt(f,{normal:h,emphasis:d},{defaultText:u.title}),bi(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,c,f,h){var d=t.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),g=o.isSelected(n),m=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");c=_||c||"roundRect";var x=tK(c,i,l,u,d,g,h),w=new ad,S=i.getModel("textStyle");if(ie(t.getLegendIcon)&&(!_||_==="inherit"))w.add(t.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}));else{var E=_==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;w.add(rK({itemWidth:p,itemHeight:v,icon:c,iconRotate:E,itemStyle:x.itemStyle,symbolKeepAspect:y}))}var T=s==="left"?p+5:-5,C=s,D=o.get("formatter"),M=n;X(D)&&D?M=D.replace("{name}",n??""):ie(D)&&(M=D(n));var k=g?S.getTextColor():i.get("inactiveColor");w.add(new Le({style:Xe(S,{text:M,x:T,y:v/2,fill:k,align:C,verticalAlign:"middle"},{inheritColor:k})}));var N=new Ie({shape:w.getBoundingRect(),style:{fill:"transparent"}}),L=i.getModel("tooltip");return L.get("show")&&Ci({el:N,componentModel:o,itemName:n,itemTooltipOption:L.option}),w.add(N),w.eachChild(function(R){R.silent=!0}),N.silent=!f,this.getContentGroup().add(w),bi(w),w.__legendDataIndex=a,w},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ki(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){ki("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),v=t.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",y=v===0?"y":"x";s==="end"?d[v]+=c[g]+p:f[v]+=h[g]+p,d[1-v]+=c[m]/2-h[m]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+p+h[g],_[m]=Math.max(c[m],h[m]),_[y]=Math.min(0,h[y]+d[1-v]),_}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}(at);function tK(r,e,t,n,a,i,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),U0(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:es(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!i){var p=e.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function rK(r){var e=r.icon||"roundRect",t=yt(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 VI(r,e,t,n){Y0(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),W0(r,e,t,n)}function zI(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 W0(r,e,t,n){zI(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function Y0(r,e,t,n){zI(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}function nK(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 Iu(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),FI(s,a),i.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){A(a,function(l,u){s[l?"select":"unSelect"](u)}),FI(s,o)}),n?{selected:o,legendIndex:i}:{name:e.name,selected:o}}function FI(r,e){var t=e||{};return A(r.getData(),function(n){var a=n.get("name");if(!(a===`
|
|
236
|
+
`||a==="")){var i=r.isSelected(a);Q(t,a)?t[a]=t[a]&&i:t[a]=i}}),t}function aK(r){r.registerAction("legendToggleSelect","legendselectchanged",me(Iu,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",me(Iu,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",me(Iu,"inverseSelect")),r.registerAction("legendSelect","legendselected",me(Iu,"select")),r.registerAction("legendUnSelect","legendunselected",me(Iu,"unSelect"))}function $I(r){r.registerComponentModel(H0),r.registerComponentView(BI),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,nK),r.registerSubTypeDefaulter("legend",function(){return"plain"}),aK(r)}var iK=function(r){V(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=$o(t);r.prototype.init.call(this,t,n,a),GI(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),GI(this,this.option,t)},e.type="legend.scroll",e.defaultOption=ba(H0.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}(H0);function GI(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,wa(e,t,{type:"box",ignoreSize:!!a})}var HI=fe,Z0=["width","height"],q0=["x","y"],oK=function(r){V(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 HI),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new HI)},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 c=this._controllerGroup,f=n.get("pageIconSize",!0),h=G(f)?f:[f,f];p("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new Le({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var m=v+"DataIndex",y=xl(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:K(u._pageGo,u,m,n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=v,c.add(y)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Z0[u],f=q0[u],h=Z0[1-u],d=q0[1-u];o&&ki("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],m=ce(a);o&&(m[c]=a[c]-v[c]-p);var y=this._layoutContentAndController(t,i,m,u,c,h,d,f);if(o){if(s==="end")g[u]+=y[c]+p;else{var _=v[c]+p;g[u]-=_,y[f]-=_}y[c]+=v[c]+p,g[1-u]+=y[d]+y[h]/2-v[h]/2,y[h]=Math.max(y[h],v[h]),y[d]=Math.min(y[d],v[d]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;ki(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),ki("horizontal",h,t.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),p=h.getBoundingRect(),v=this._showController=d[o]>a[o],g=[-d.x,-d.y];n||(g[i]=c[u]);var m=[0,0],y=[-p.x,-p.y],_=pe(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(v){var x=t.get("pageButtonPosition",!0);x==="end"?y[i]+=a[o]-p[o]:m[i]+=p[o]+_}y[1-i]+=d[s]/2-p[s]/2,c.setPosition(g),f.setPosition(m),h.setPosition(y);var w={x:0,y:0};if(w[o]=v?a[o]:d[o],w[s]=Math.max(d[s],p[s]),w[l]=Math.min(0,p[l]+y[1-i]),f.__rectSize=a[o],v){var S={x:0,y:0};S[o]=Math.max(a[o]-p[o]-_,0),S[s]=w[s],f.setClipPath(new Ie({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var E=this._getPageInfo(t);return E.pageIndex!=null&&Ve(c,{x:E.contentPosition[0],y:E.contentPosition[1]},v?t:null),this._updatePageInfoView(t,E),w},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(c){var f=c+"DataIndex",h=n[f]!=null,d=a.childOfName(c);d&&(d.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),d.cursor=h?"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",X(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=Z0[o],l=q0[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],h=c.length,d=h?1:0,p={contentPosition:[a.x,a.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=x(f);p.contentPosition[o]=-v.s;for(var g=u+1,m=v,y=v,_=null;g<=h;++g)_=x(c[g]),(!_&&y.e>m.s+i||_&&!w(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var g=u-1,m=v,y=v,_=null;g>=-1;--g)_=x(c[g]),(!_||!w(y,_.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p;function x(S){if(S){var E=S.getBoundingRect(),T=E[l]+S[l];return{s:T,e:T+E[s],i:S.__legendDataIndex}}}function w(S,E){return S.e>=E&&S.s<=E+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}(BI);function sK(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 lK(r){Te($I),r.registerComponentModel(iK),r.registerComponentView(oK),sK(r)}function uK(r){Te($I),Te(lK)}var cK=function(r){V(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=ba(Du.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Du),X0=Ne();function fK(r,e,t){X0(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function hK(r,e){for(var t=X0(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||UI(t,o))}}}function UI(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function dK(r,e){var t={model:e,containsPoint:me(vK,e),dispatchAction:me(pK,r),dataZoomInfoMap:null,controller:null},n=t.controller=new cu(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 pK(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function vK(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function gK(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 mK(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=X0(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=te());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=VN(i);A(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,dK(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=te());c.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){UI(a,i);return}var c=gK(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),Ko(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var yK=function(r){V(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(),fK(a,t,{pan:K(K0.pan,this),zoom:K(K0.zoom,this),scrollMove:K(K0.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){hK(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(w0),K0={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=Q0[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 c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(to(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:WI(function(r,e,t,n,a,i){var o=Q0[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:WI(function(r,e,t,n,a,i){var o=Q0[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function WI(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(to(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Q0={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 YI(r){S0(r),r.registerComponentModel(cK),r.registerComponentView(yK),mK(r)}var _K=function(r){V(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=ba(Du.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}(Du),bK={},Lu=Ie,ZI=7,xK=1,j0=30,wK=7,Ru="horizontal",qI="vertical",SK=5,EK=["line","bar","candlestick","scatter"],TK={easing:"cubicOut",duration:100,delay:0},CK=function(r){V(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=K(this._onBrush,this),this._onBrushEnd=K(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),Ko(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(){Rl(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 fe;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?wK:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Ru?{right:s.width-o.x-o.width,top:s.height-j0-ZI-i,width:o.width,height:j0}:{right:ZI,top:o.y,width:j0,height:o.height},u=$o(t.option);A(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=bt(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===qI&&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===Ru&&!o?{scaleY:l?1:-1,scaleX:1}:a===Ru&&o?{scaleY:l?1:-1,scaleX:-1}:a===qI&&!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 Lu({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Lu({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:K(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,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var d=[0,n[1]],p=[0,n[0]],v=[[n[0],0],[0,0]],g=[],m=p[1]/(o.count()-1),y=0,_=Math.round(o.count()/n[0]),x;o.each([l],function(C,D){if(_>0&&D%_){y+=m;return}var M=C==null||isNaN(C)||C==="",k=M?0:$e(C,f,d,!0);M&&!x&&D?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&x&&(v.push([y,0]),g.push([y,0])),v.push([y,k]),g.push([y,k]),y+=m,x=M}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function S(C){var D=w.getModel(C?"selectedDataBackground":"dataBackground"),M=new fe,k=new Qt({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),N=new jt({shape:{points:c},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(k),M.add(N),M}for(var E=0;E<3;E++){var T=S(E===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&&we(EK,u.get("type"))<0)){var c=i.getComponent(za(o),s).axis,f=DK(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),a={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},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,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Lu({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Lu({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:xK,fill:"rgba(0,0,0,0)"}})),A([0,1],function(_){var x=l.get("handleIcon");!Nf[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x,bK.NODE_ENV!=="production"&&qr("handleIcon now needs 'path://' prefix when using a path string"));var w=yt(x,-1,0,2,2,null,!0);w.attr({cursor:XI(this._orient),draggable:!0,drift:K(this._onDragMove,this,_),ondragend:K(this._onDragEnd,this),onmouseover:K(this._showDataInfo,this,!0),onmouseout:K(this._showDataInfo,this,!1),z2:5});var S=w.getBoundingRect(),E=l.get("handleSize");this._handleHeight=W(E,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),bi(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(a[_]=w);var C=l.getModel("textStyle"),D=l.get("handleLabel")||{},M=D.show||!1;t.add(i[_]=new Le({silent:!0,invisible:!M,style:Xe(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var d=h;if(f){var p=W(l.get("moveHandleSize"),s[1]),v=n.moveHandle=new Ie({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,m=n.moveHandleIcon=yt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new Ie({invisible:!0,shape:{y:s[1]-y,height:p+y}}),d.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:XI(this._orient),drift:K(this._onDragMove,this,"all"),ondragstart:K(this._showDataInfo,this,!0),ondragend:K(this._onDragEnd,this),onmouseover:K(this._showDataInfo,this,!0),onmouseout:K(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[$e(t[0],[0,100],n,!0),$e(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];to(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?$e(s.minSpan,l,o,!0):null,s.maxSpan!=null?$e(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Tr([$e(i[0],o,l,!0),$e(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=Tr(a.slice()),o=this._size;A([0,1],function(d){var p=n.handles[d],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:a[d]+(d?-1:1),y:o[1]/2-v/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]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Ie,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],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,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=Tr(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(p){var v=Ti(a.handles[p].parent,this.group),g=nf(p===0?"right":"left",v),m=this._handleWidth/2+SK,y=jr([h[p]+(p===0?-m:m),this._size[1]/2],v);i[p].setStyle({x:y[0],y:y[1],verticalAlign:o===Ru?"middle":g,align:o===Ru?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 ie(i)?i(t,s):X(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,In(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=jr([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 be(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=Tr([$e(a.x,o,s,!0),$e(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&&(In(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 Lu({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),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[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?TK:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=VN(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}(w0);function DK(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function XI(r){return r==="vertical"?"ns-resize":"ew-resize"}function KI(r){r.registerComponentModel(_K),r.registerComponentView(CK),S0(r)}function AK(r){Te(YI),Te(KI)}var QI={get:function(r,e,t){var n=ce((MK[r]||{})[e]);return t&&G(n)?n[n.length-1]:n}},MK={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]}},jI=At.mapVisual,kK=At.eachVisual,NK=G,JI=A,IK=Tr,LK=$e,id=function(r){V(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&&gI(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=K(t,this),this.controllerVisuals=I0(this.option.controller,n,t),this.targetVisuals=I0(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=He(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||["<",">"],G(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(X(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(ie(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=IK([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={});_e(i,a),_e(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){NK(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,d){var p=f[h],v=f[d];p&&!v&&(v=f[d]={},JI(p,function(g,m){if(At.isValidType(m)){var y=QI.get(m,"inactive",s);y!=null&&(v[m]=y,m==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";JI(this.stateList,function(m){var y=this.itemSize,_=f[m];_||(_=f[m]={color:s?p:[p]}),_.symbol==null&&(_.symbol=h&&ce(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=d&&ce(d)||(s?y[0]:[y[0],y[0]])),_.symbol=jI(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var w=-1/0;kK(x,function(S){S>w&&(w=S)}),_.symbolSize=jI(x,function(S){return LK(S,[0,w],[0,y[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}(Ae),eL=[20,140],RK=function(r){V(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]=eL[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=eL[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):G(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=Tr((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=tL(this,"outOfRange",this.getExtent()),a=tL(this,"inRange",this.option.range.slice()),i=[];function o(d,p){i.push({value:d,color:t(d,p)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!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<c;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 h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ba(id.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}(id);function tL(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 rL=function(r){V(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=Fo(n.get("padding")||0),i=t.getBoundingRect();t.add(new Ie({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(d){return s[d]}function c(d,p){s[d]=p}var f=o.controllerVisuals[i||o.getValueState(t)],h=At.prepareVisualTypes(f);return A(h,function(d){var p=f[d];a.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",p=f.__alphaForOpacity),At.dependsOn(d,n)&&p&&p.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;yf(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(at),nL=[["left","right","width"],["top","bottom","height"]];function aL(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=nL[o],l=[0,null,10],u={},c=0;c<3;c++)u[nL[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=bt(u,i,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<i[f[1]]*.5?0:1]}function od(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 Mn=$e,OK=A,iL=Math.min,J0=Math.max,PK=12,BK=6,VK=function(r){V(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=K(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=K(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,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Le({style:Xe(d,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="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=aL(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new fe;u.add(c),c.add(a.outOfRange=oL()),c.add(a.inRange=oL(null,s?lL(this._orient):null,K(this._dragHandle,this,"all",!1),K(this._dragHandle,this,"all",!0))),c.setClipPath(new Ie({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),h=J0(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,h,o),this._createHandle(n,u,1,i,h,o)),this._createIndicator(n,u,i,h,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=K(this._dragHandle,this,a,!1),u=K(this._dragHandle,this,a,!0),c=Zr(t.get("handleSize"),i[0]),f=yt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=lL(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){In(m.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(),xi(f,!0),n.add(f);var d=this.visualMapModel.textStyleModel,p=new Le({cursor:h,draggable:!0,drift:l,onmousemove:function(m){In(m.event)},ondragend:u,style:Xe(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[a]=f,g.handleLabelPoints[a]=v,g.handleLabels[a]=p},e.prototype._createIndicator=function(t,n,a,i,o){var s=Zr(t.get("indicatorSize"),a[0]),l=yt(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 It){var c=l.style;l.useStyle(F({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new Le({silent:!0,invisible:!0,style:Xe(f,{x:0,y:0,text:""})});this.group.add(h);var d=[(o==="horizontal"?i/2:BK)+a[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=d,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():sL(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=[Mn(n[0],a,i,!0),Mn(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]];to(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[Mn(i[0],o,s,!0),Mn(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 yl(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 fe(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(),c=this._applyTransform("left",a.mainGroup);OK([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=t[f];var d=Mn(t[f],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var v=jr(a.handleLabelPoints[f],Ti(h,this.group));if(this._orient==="horizontal"){var g=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;v[1]+=g}s[f].setStyle({x:v[0],y:v[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]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),v=Mn(t,s,u,!0),g=l[0]-p/2,m={x:f.x,y:f.y};f.y=v,f.x=g;var y=jr(c.indicatorLabelPoint,Ti(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),w=this._orient,S=w==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:S?x:"middle",align:S?"center":x});var E={x:g,y:v,style:{fill:d}},T={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=m.x,f.y=m.y,f.animateTo(E,C),_.animateTo(T,C)}else f.attr(E),_.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]=iL(J0(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=iL(J0(o[0],t),o[1]);var l=zK(a,s,o),u=[t-l,t+l],c=Mn(t,o,s,!0),f=[Mn(u[0],o,s,!0),Mn(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(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||sL(a))&&(d=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var p=oV(h,d);this._dispatchHighDown("downplay",od(p[0],a)),this._dispatchHighDown("highlight",od(p[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Ri(t.target,function(l){var u=ve(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",od(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 G(t)?jr(t,o,a):nf(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}(rL);function oL(r,e,t,n){return new Qt({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){In(a.event)},ondragend:n})}function zK(r,e,t){var n=PK/2,a=r.get("hoverLinkDataSize");return a&&(n=Mn(a,e,t,!0)/2),n}function sL(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function lL(r){return r==="vertical"?"ns-resize":"ew-resize"}var FK={type:"selectDataRange",event:"dataRangeSelected",update:"update"},$K=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},GK=[{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(iX(n.stateList,n.targetVisuals,K(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(K(HK,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function HK(r,e,t,n){for(var a=e.targetVisuals[n],i=At.prepareVisualTypes(a),o={color:Bl(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,h)}return o.color;function f(d){return o[d]}function h(d,p){o[d]=p}}var uL=A;function UK(r){var e=r&&r.visualMap;G(e)||(e=e?[e]:[]),uL(e,function(t){if(t){Ss(t,"splitList")&&!Ss(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&G(n)&&uL(n,function(a){oe(a)&&(Ss(a,"start")&&!Ss(a,"min")&&(a.min=a.start),Ss(a,"end")&&!Ss(a,"max")&&(a.max=a.end))})}})}function Ss(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var cL=!1;function fL(r){cL||(cL=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(FK,$K),A(GK,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(UK))}function hL(r){r.registerComponentModel(RK),r.registerComponentView(VK),fL(r)}var WK={},YK=function(r){V(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=[],ZK[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=ce(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=H(this._pieceList,function(l){return l=ce(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=At.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(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&A(this.stateList,function(c){(t[c]||(t[c]={}))[l]=QI.get(l,c==="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 c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;A(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!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=ce(t)},e.prototype.getValueState=function(t){var n=At.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 c=At.findPieceIndex(l,a);c===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(c,f){var h=i.getRepresentValue({interval:c});f||(f=i.getValueState(h));var d=t(h,f);c[0]===-1/0?a[0]=d:c[1]===1/0?a[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}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(c){var f=c.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=ba(id.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}(id),ZK={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]}),Kx(r),A(r,function(u,c){u.index=c,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),dL(e,r)},pieces:function(r){var e=this.option;A(e.pieces,function(t,n){oe(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],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],d=0;d<3&&o[f]==null;d++)o[f]=t[h[d]],s[f]=l[d],c[f]=d===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),WK.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=At.retrieveVisuals(t),r.push(a)},this),dL(e,r),Kx(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 dL(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var qK=function(r){V(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,c=this._getViewData(),f=c.endsText,h=pt(n.get("showLabel",!0),!f),d=!n.get("selectedMode");f&&this._renderEndsText(t,f[0],u,h,l),A(c.viewPieceList,function(p){var v=p.piece,g=new fe;g.onclick=K(this._onItemClick,this,v),this._enableHoverLink(g,p.indexInModelPieceList);var m=n.getRepresentValue(v);if(this._createItemSymbol(g,m,[0,0,u[0],u[1]],d),h){var y=this.visualMapModel.getValueState(m);g.add(new Le({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1},silent:d}))}t.add(g)},this),f&&this._renderEndsText(t,f[1],u,h,l),ki(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:od(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return aL(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 fe,l=this.visualMapModel.textStyleModel;s.add(new Le({style:Xe(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=H(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=yt(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=ce(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}(rL);function pL(r){r.registerComponentModel(YK),r.registerComponentView(qK),fL(r)}function XK(r){Te(hL),Te(pL)}var KK={label:{enabled:!0},decal:{show:!1}},vL=Ne(),QK={};function jK(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=ce(KK);_e(n.label,r.getLocaleModel().get("aria"),!1),_e(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=te();r.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),vL(h).scope=d}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(ie(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var y=Hv(h.ecModel,h.name,QK,r.getSeriesCount()),_=d.getVisual("decal");d.setVisual("decal",x(_,y))}else{var p=h.getRawData(),v={},g=vL(h).scope;d.each(function(w){var S=d.getRawIndex(w);v[S]=w});var m=p.count();p.each(function(w){var S=v[w],E=p.getName(w)||w+"",T=Hv(h.ecModel,E,g,m),C=d.getItemVisual(S,"decal");d.setItemVisual(S,"decal",x(C,T))})}function x(w,S){var E=w?F(F({},S),w):S;return E.dirty=!0,E}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=le(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=r.getSeriesCount(),d=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,v=Math.min(h,p),g;if(!(h<1)){var m=s();if(m){var y=f.get(["general","withTitle"]);g=o(y,{title:m})}else g=f.get(["general","withoutTitle"]);var _=[],x=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(x,{seriesCount:h}),r.eachSeries(function(T,C){if(C<v){var D=void 0,M=T.get("name"),k=M?"withName":"withoutName";D=h>1?f.get(["series","multiple",k]):f.get(["series","single",k]),D=o(D,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var N=T.getData();if(N.count()>d){var L=f.get(["data","partialData"]);D+=o(L,{displayCnt:d})}else D+=f.get(["data","allData"]);for(var R=f.get(["data","separator","middle"]),I=f.get(["data","separator","end"]),O=f.get(["data","excludeDimensionId"]),P=[],B=0;B<N.count();B++)if(B<d){var z=N.getName(B),$=O?ze(N.getValues(B),function(j,Z){return we(O,Z)===-1}):N.getValues(B),U=f.get(["data",z?"withName":"withoutName"]);P.push(o(U,{name:z,value:$.join(R)}))}D+=P.join(R)+I,_.push(D)}});var w=f.getModel(["series","multiple","separator"]),S=w.get("middle"),E=w.get("end");g+=_.join(S)+E,u.setAttribute("aria-label",g)}}}}function o(u,c){if(!X(u))return u;var f=u;return A(c,function(h,d){f=f.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),h)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function JK(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 eQ(r){r.registerPreprocessor(JK),r.registerVisual(r.PRIORITY.VISUAL.ARIA,jK)}var Es={},gL={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},tQ=function(){function r(e){var t=this._condVal=X(e)?new RegExp(e):Hb(e)?e:null;if(t==null){var n="";Es.NODE_ENV!=="production"&&(n=Zt("Illegal regexp",e,"in")),Fe(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return X(t)?this._condVal.test(e):Oe(t)?this._condVal.test(e+""):!1},r}(),rQ=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),nQ=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}(),aQ=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}(),iQ=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),oQ=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 e_(r,e){if(r===!0||r===!1){var t=new rQ;return t.value=r,t}var n="";return yL(r)||(Es.NODE_ENV!=="production"&&(n=Zt("Illegal config. Expect a plain object but actually",r)),Fe(n)),r.and?mL("and",r,e):r.or?mL("or",r,e):r.not?sQ(r,e):lQ(r,e)}function mL(r,e,t){var n=e[r],a="";Es.NODE_ENV!=="production"&&(a=Zt('"and"/"or" condition should only be `'+r+": [...]` and must not be empty array.","Illegal condition:",e)),G(n)||Fe(a),n.length||Fe(a);var i=r==="and"?new nQ:new aQ;return i.children=H(n,function(o){return e_(o,t)}),i.children.length||Fe(a),i}function sQ(r,e){var t=r.not,n="";Es.NODE_ENV!=="production"&&(n=Zt('"not" condition should only be `not: {}`.',"Illegal condition:",r)),yL(t)||Fe(n);var a=new iQ;return a.child=e_(t,e),a.child||Fe(n),a}function lQ(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Me(r),o=r.parser,s=o?PS(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=Q(gL,u)?gL[u]:u,f=r[u],h=s?s(f):f,d=g5(c,h)||c==="reg"&&new tQ(h);d||(Es.NODE_ENV!=="production"&&(t=Zt('Illegal relational operation: "'+u+'" in condition:',r)),Fe(t)),a.push(d)}}a.length||(Es.NODE_ENV!=="production"&&(t=Zt("Relational condition must have at least one operator.","Illegal condition:",r)),Fe(t));var p=new oQ;return p.valueGetterParam=n,p.valueParser=s,p.getValue=e.getValue,p.subCondList=a,p}function yL(r){return oe(r)&&!Vt(r)}var uQ=function(){function r(e,t){this._cond=e_(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function cQ(r,e){return new uQ(r,e)}var _L={},fQ={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=cQ(r.config,{valueGetterAttrMap:te({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Q(s,"dimension")||(_L.NODE_ENV!=="production"&&(l=Zt('Relation condition must has prop "dimension" specified.',"Illegal condition:",s)),Fe(l));var c=e.getDimensionInfo(u);return c||(_L.NODE_ENV!=="production"&&(l=Zt("Can not find dimension info via: "+u+`.
|
|
237
|
+
`,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
|
|
238
|
+
`,"Illegal condition:",s,`.
|
|
239
|
+
`)),Fe(l)),{dimIdx:c.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}}},ta={},t_="";ta.NODE_ENV!=="production"&&(t_=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var hQ={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=He(t);a.length||(ta.NODE_ENV!=="production"&&(n="Empty `config` in sort transform."),Fe(n));var i=[];A(a,function(c){var f=c.dimension,h=c.order,d=c.parser,p=c.incomparable;if(f==null&&(ta.NODE_ENV!=="production"&&(n='Sort transform config must has "dimension" specified.'+t_),Fe(n)),h!=="asc"&&h!=="desc"&&(ta.NODE_ENV!=="production"&&(n='Sort transform config must has "order" specified.'+t_),Fe(n)),p&&p!=="min"&&p!=="max"){var v="";ta.NODE_ENV!=="production"&&(v='incomparable must be "min" or "max" rather than "'+p+'".'),Fe(v)}if(h!=="asc"&&h!=="desc"){var g="";ta.NODE_ENV!=="production"&&(g='order must be "asc" or "desc" rather than "'+h+'".'),Fe(g)}var m=e.getDimensionInfo(f);m||(ta.NODE_ENV!=="production"&&(n=Zt("Can not find dimension info via: "+f+`.
|
|
240
|
+
`,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
|
|
241
|
+
`,"Illegal config:",c,`.
|
|
242
|
+
`)),Fe(n));var y=d?PS(d):null;d&&!y&&(ta.NODE_ENV!=="production"&&(n=Zt("Invalid parser name "+d+`.
|
|
243
|
+
`,"Illegal config:",c,`.
|
|
244
|
+
`)),Fe(n)),i.push({dimIdx:m.index,parser:y,comparator:new VS(h,p)})});var o=e.sourceFormat;o!==Ft&&o!==Nr&&(ta.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),Fe(n));for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<i.length;h++){var d=i[h],p=e.retrieveValueFromItem(c,d.dimIdx),v=e.retrieveValueFromItem(f,d.dimIdx);d.parser&&(p=d.parser(p),v=d.parser(v));var g=d.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function dQ(r){r.registerTransform(fQ),r.registerTransform(hQ)}var pQ=function(r){V(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 US(this),WS(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),WS(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:xn},e}(Ae),vQ=function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(at);function gQ(r){r.registerComponentModel(pQ),r.registerComponentView(vQ)}var kn=yn.CMD;function Ts(r,e){return Math.abs(r-e)<1e-5}function r_(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(N,L){a&&a.length>2&&n.push(a),a=[N,L]}function c(N,L,R,I){Ts(N,R)&&Ts(L,I)||a.push(N,L,R,I,R,I)}function f(N,L,R,I,O,P){var B=Math.abs(L-N),z=Math.tan(B/4)*4/3,$=L<N?-1:1,U=Math.cos(N),j=Math.sin(N),Z=Math.cos(L),ee=Math.sin(L),he=U*O+R,Ee=j*P+I,re=Z*O+R,J=ee*P+I,ue=O*z*$,q=P*z*$;a.push(he-ue*j,Ee+q*U,re+ue*ee,J-q*Z,re,J)}for(var h,d,p,v,g=0;g<t;){var m=e[g++],y=g===1;switch(y&&(i=e[g],o=e[g+1],s=i,l=o,(m===kn.L||m===kn.C||m===kn.Q)&&(a=[s,l])),m){case kn.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case kn.L:h=e[g++],d=e[g++],c(i,o,h,d),i=h,o=d;break;case kn.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case kn.Q:h=e[g++],d=e[g++],p=e[g++],v=e[g++],a.push(i+2/3*(h-i),o+2/3*(d-o),p+2/3*(h-p),v+2/3*(d-v),p,v),i=p,o=v;break;case kn.A:var _=e[g++],x=e[g++],w=e[g++],S=e[g++],E=e[g++],T=e[g++]+E;g+=1;var C=!e[g++];h=Math.cos(E)*w+_,d=Math.sin(E)*S+x,y?(s=h,l=d,u(s,l)):c(i,o,h,d),i=Math.cos(T)*w+_,o=Math.sin(T)*S+x;for(var D=(C?-1:1)*Math.PI/2,M=E;C?M>T:M<T;M+=D){var k=C?Math.max(M+D,T):Math.min(M+D,T);f(M,k,_,x,w,S)}break;case kn.R:s=i=e[g++],l=o=e[g++],h=s+e[g++],d=l+e[g++],u(h,l),c(h,l,h,d),c(h,d,s,d),c(s,d,s,l),c(s,l,h,l);break;case kn.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function n_(r,e,t,n,a,i,o,s,l,u){if(Ts(r,t)&&Ts(e,n)&&Ts(a,o)&&Ts(i,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var v=t-r,g=n-e,m=a-o,y=i-s,_=v*v+g*g,x=m*m+y*y;if(_<f&&x<f){l.push(o,s);return}var w=h*v+d*g,S=-h*m-d*y,E=_-w*w,T=x-S*S;if(E<f&&w>=0&&T<f&&S>=0){l.push(o,s);return}var C=[],D=[];ca(r,t,a,o,.5,C),ca(e,n,i,s,.5,D),n_(C[0],D[0],C[1],D[1],C[2],D[2],C[3],D[3],l,u),n_(C[4],D[4],C[5],D[5],C[6],D[6],C[7],D[7],l,u)}function mQ(r,e){var t=r_(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 c=i[u++],f=i[u++],h=i[u++],d=i[u++],p=i[u++],v=i[u++];n_(s,l,c,f,h,d,p,v,o,e),s=p,l=v}n.push(o)}return n}function bL(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 c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function xL(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,c=l>Math.abs(u),f=bL([l,u],c?0:1,e),h=(c?s:u)/f.length,d=0;d<f.length;d++)for(var p=(c?u:s)/f[d],v=0;v<f[d];v++){var g={};c?(g.startAngle=i+h*d,g.endAngle=i+h*(d+1),g.r0=n+p*v,g.r=n+p*(v+1)):(g.startAngle=i+p*v,g.endAngle=i+p*(v+1),g.r0=n+h*d,g.r=n+h*(d+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function yQ(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=bL([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,h=0;h<o.length;h++)for(var d=r[l]/o[h],p=0;p<o[h];p++){var v={};v[u]=h*f,v[c]=p*d,v[s]=f,v[l]=d,v.x+=r.x,v.y+=r.y,t.push(v)}}function wL(r,e,t,n){return r*n-t*e}function _Q(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=wL(c,f,l,u);if(Math.abs(h)<1e-6)return null;var d=r-a,p=e-i,v=wL(d,p,c,f)/h;return v<0||v>1?null:new be(v*l+r,v*u+e)}function bQ(r,e,t){var n=new be;be.sub(n,t,e),n.normalize();var a=new be;be.sub(a,r,e);var i=a.dot(n);return i}function Cs(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function xQ(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=_Q(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:bQ(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(g,m){return g.projPt-m.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[h],v=[d],i=u.idx+1;i<=c.idx;i++)Cs(p,r[i].slice());Cs(p,d),Cs(p,h);for(var i=c.idx+1;i<=u.idx+n;i++)Cs(v,r[i%n].slice());return Cs(v,h),Cs(v,d),[{points:p},{points:v}]}function SL(r){var e=r.points,t=[],n=[];Bc(e,t,n);var a=new xe(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 be,c=new be;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),xQ(e,u,c)}function sd(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);sd(r,i[0],a,n),sd(r,i[1],t-a,n)}return n}function wQ(r,e){for(var t=[],n=0;n<e;n++)t.push(mv(r));return t}function SQ(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function EQ(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function TQ(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":yQ(n,e,t),a=Ie;break;case"sector":xL(n,e,t),a=Kt;break;case"circle":xL({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Kt;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=H(mQ(r.getUpdatedPathProxy(),o),function(m){return EQ(m)}),l=s.length;if(l===0)sd(SL,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=H(s,function(m){var y=[],_=[];Bc(m,y,_);var x=(_[1]-y[1])*(_[0]-y[0]);return c+=x,{poly:m,area:x}});f.sort(function(m,y){return y.area-m.area});for(var h=e,u=0;u<l;u++){var d=f[u];if(h<=0)break;var p=u===l-1?h:Math.ceil(d.area/c*e);p<0||(sd(SL,{points:d.poly},p,t),h-=p)}}a=Qt;break}if(!a)return wQ(r,e);for(var v=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),SQ(r,g),v.push(g)}return v}function CQ(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,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,d=2;d<s;){var p=o[d-2],v=o[d-1],g=o[d++],m=o[d++],y=o[d++],_=o[d++],x=o[d++],w=o[d++];if(h<=0){f.push(g,m,y,_,x,w);continue}for(var S=Math.min(h,c-1)+1,E=1;E<=S;E++){var T=E/S;ca(p,g,y,x,T,a),ca(v,m,_,w,T,i),p=a[3],v=i[3],f.push(a[1],i[1],a[2],i[2],p,v),g=a[5],m=i[5],y=a[6],_=i[6]}h-=S-1}return o===r?[f,e]:[r,f]}function EL(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 DQ(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],c=void 0,f=void 0;l?u?(t=CQ(l,u),c=t[0],f=t[1],n=c,a=f):(f=EL(a||l,l),c=l):(c=EL(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function TL(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],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function AQ(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 c=u*6,f=0,h=0;h<s;h+=2){var d=h===0?c:(c+h-2)%l+2,p=r[d]-t[0],v=r[d+1]-t[1],g=e[h]-n[0],m=e[h+1]-n[1],y=g-p,_=m-v;f+=y*y+_*_}f<i&&(i=f,o=u)}return o}function MQ(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 kQ(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=TL(s),c=TL(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],h=[],d=0,p=1/0,v=[],g=s.length;i&&(s=MQ(s));for(var m=AQ(s,l,u,c)*6,y=g-2,_=0;_<y;_+=2){var x=(m+_)%y+2;f[_+2]=s[x]-u[0],f[_+3]=s[x+1]-u[1]}f[0]=s[m]-u[0],f[1]=s[m+1]-u[1];for(var w=n/t,S=-n/2;S<=n/2;S+=w){for(var E=Math.sin(S),T=Math.cos(S),C=0,_=0;_<s.length;_+=2){var D=f[_],M=f[_+1],k=l[_]-c[0],N=l[_+1]-c[1],L=k*T-N*E,R=k*E+N*T;v[_]=L,v[_+1]=R;var I=L-D,O=R-M;C+=I*I+O*O}if(C<p){p=C,d=S;for(var P=0;P<v.length;P++)h[P]=v[P]}}a.push({from:f,to:h,fromCp:u,toCp:c,rotation:-d})}return a}function ld(r){return r.__isCombineMorphing}var CL="__mOriginal_";function ud(r,e,t){var n=CL+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 Ou(r,e){var t=CL+e;r[t]&&(r[e]=r[t],r[t]=null)}function DL(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 AL(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=DQ(r_(t),r_(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&DL(i,s),l&&DL(o,l),ud(e,"updateTransform",{replace:u}),e.transform=null;var c=kQ(i,o,10,Math.PI),f=[];ud(e,"buildPath",{replace:function(h){for(var d=e.__morphT,p=1-d,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,_=m.to,x=m.rotation*d,w=m.fromCp,S=m.toCp,E=Math.sin(x),T=Math.cos(x);nc(v,w,S,d);for(var C=0;C<y.length;C+=2){var D=y[C],M=y[C+1],k=_[C],N=_[C+1],L=D*p+k*d,R=M*p+N*d;f[C]=L*T-R*E+v[0],f[C+1]=L*E+R*T+v[1]}var I=f[0],O=f[1];h.moveTo(I,O);for(var C=2;C<y.length;){var k=f[C++],N=f[C++],P=f[C++],B=f[C++],z=f[C++],$=f[C++];I===k&&O===N&&P===z&&B===$?h.lineTo(z,$):h.bezierCurveTo(k,N,P,B,z,$),I=z,O=$}}}})}function a_(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;AL(r,e),e.__morphT=0;function i(){Ou(e,"buildPath"),Ou(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},le({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function NQ(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 c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function cd(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=H(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=H(i,function(s,l){return{cp:s,z:NQ(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 ML(r){return TQ(r.path,r.count)}function i_(){return{fromIndividuals:[],toIndividuals:[],count:0}}function IQ(r,e,t){var n=[];function a(w){for(var S=0;S<w.length;S++){var E=w[S];ld(E)?a(E.childrenRef()):E instanceof De&&n.push(E)}}a(r);var i=n.length;if(!i)return i_();var o=t.dividePath||ML,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),i_();n=cd(n),s=cd(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new Pn,h=0;h<i;h++){var d=n[h],p=s[h];p.parent=e,p.copyTransform(f),c||AL(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function v(w){for(var S=0;S<s.length;S++)s[S].addSelfToZr(w)}ud(e,"addSelfToZr",{after:function(w){v(w)}}),ud(e,"removeSelfFromZr",{after:function(w){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Ou(e,"addSelfToZr"),Ou(e,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,_=function(){y--,y===0&&(g(),l&&l())},h=0;h<m;h++){var x=c?le({delay:(t.delay||0)+c(h,m,n[h],s[h]),done:_},t):t;a_(n[h],s[h],x)}else e.__morphT=0,e.animateTo({__morphT:1},le({during:function(w){for(var S=0;S<m;S++){var E=s[S];E.__morphT=e.__morphT,E.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<r.length;w++)Ou(r[w],"updateTransform");l&&l()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function LQ(r,e,t){var n=e.length,a=[],i=t.dividePath||ML;function o(d){for(var p=0;p<d.length;p++){var v=d[p];ld(v)?o(v.childrenRef()):v instanceof De&&a.push(v)}}if(ld(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(mv(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),i_()}a=cd(a),e=cd(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?le({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;a_(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function kL(r){return G(r[0])}function NL(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 RQ={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=mv(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function o_(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Io("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;kL(r)&&(u=r,c=e),kL(e)&&(u=e,c=r);function f(m,y,_,x,w){var S=m.many,E=m.one;if(S.length===1&&!w){var T=y?S[0]:E,C=y?E:S[0];if(ld(T))f({many:[T],one:C},!0,_,x,!0);else{var D=s?le({delay:s(_,x)},l):l;a_(T,C,D),i(T,C,T,C,D)}}else for(var M=le({dividePath:RQ[t],individualDelay:s&&function(O,P,B,z){return s(O+_,x)}},l),k=y?IQ(S,E,M):LQ(E,S,M),N=k.fromIndividuals,L=k.toIndividuals,R=N.length,I=0;I<R;I++){var D=s?le({delay:s(I,R)},l):l;i(N[I],L[I],y?S[I]:m.one,y?m.one:S[I],D)}}for(var h=u?u===r:r.length>e.length,d=u?NL(c,u):NL(h?e:r,[h?r:e]),p=0,v=0;v<d.length;v++)p+=d[v].many.length;for(var g=0,v=0;v<d.length;v++)f(d[v],h,g,p),g+=d[v].many.length}function lo(r){if(!r)return[];if(G(r)){for(var e=[],t=0;t<r.length;t++)e.push(lo(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof De&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var s_={},IL=1e4,OQ=0,LL=1,RL=2,PQ=Ne();function BQ(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 VQ(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 OL(r,e,t,n){var a=n?"itemChildGroupId":"itemGroupId",i=BQ(r,a);if(i){var o=VQ(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 PL(r){var e=[];return A(r,function(t){var n=t.data,a=t.dataGroupId;if(n.count()>IL){s_.NODE_ENV!=="production"&&st("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:OL(n,o,a,!1),childGroupId:OL(n,o,a,!0),divide:t.divide,dataIndex:o})}),e}function l_(r,e,t){r.traverse(function(n){n instanceof De&&tt(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function u_(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Ds(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function zQ(r,e,t){var n=Io("update",t,e);n&&r.traverse(function(a){if(a instanceof Cr){var i=Zz(a);i&&a.animateFrom({style:i},n)}})}function FQ(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 BL(r,e,t){var n=PL(r),a=PL(e);function i(_,x,w,S,E){(w||_)&&x.animateFrom({style:w&&w!==_?F(F({},w.style),_.style):_.style},E)}var o=!1,s=OQ,l=te(),u=te();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<a.length;c++){var f=a[c].groupId;if(u.get(f)){s=LL;break}var h=a[c].childGroupId;if(h&&l.get(h)){s=RL;break}}function d(_,x){return function(w){var S=w.data,E=w.dataIndex;return x?S.getId(E):_?s===LL?w.childGroupId:w.groupId:s===RL?w.childGroupId:w.groupId}}var p=FQ(n,a),v={};if(!p)for(var c=0;c<a.length;c++){var g=a[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(_,x){var w=n[x],S=a[_],E=S.data.hostModel,T=w.data.getItemGraphicEl(w.dataIndex),C=S.data.getItemGraphicEl(S.dataIndex);if(T===C){C&&zQ(C,S.dataIndex,E);return}T&&v[T.id]||C&&(Ds(C),T?(Ds(T),u_(T),o=!0,o_(lo(T),lo(C),S.divide,E,_,i)):l_(C,E,_))}new Yn(n,a,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(_,x){var w=a[_],S=w.data,E=S.hostModel,T=S.getItemGraphicEl(w.dataIndex),C=ze(H(x,function(D){return n[D].data.getItemGraphicEl(n[D].dataIndex)}),function(D){return D&&D!==T&&!v[D.id]});T&&(Ds(T),C.length?(A(C,function(D){Ds(D),u_(D)}),o=!0,o_(lo(C),lo(T),w.divide,E,_,i)):l_(T,E,w.dataIndex))}).updateOneToMany(function(_,x){var w=n[x],S=w.data.getItemGraphicEl(w.dataIndex);if(!(S&&v[S.id])){var E=ze(H(_,function(C){return a[C].data.getItemGraphicEl(a[C].dataIndex)}),function(C){return C&&C!==S}),T=a[_[0]].data.hostModel;E.length&&(A(E,function(C){return Ds(C)}),S?(Ds(S),u_(S),o=!0,o_(lo(S),lo(E),w.divide,T,_[0],i)):A(E,function(C){return l_(C,T,_[0])}))}}).updateManyToMany(function(_,x){new Yn(x,_,function(w){return n[w].data.getId(n[w].dataIndex)},function(w){return a[w].data.getId(a[w].dataIndex)}).update(function(w,S){y(_[w],x[S])}).execute()}).execute(),o&&A(e,function(_){var x=_.data,w=x.hostModel,S=w&&t.getViewOfSeriesModel(w),E=Io("update",w,0);S&&w.isAnimationEnabled()&&E&&E.duration>0&&S.group.traverse(function(T){T instanceof De&&!T.animators.length&&T.animateFrom({style:{opacity:0}},E)})})}function VL(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function zL(r){return G(r)?r.sort().join(","):r}function $a(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function $Q(r,e){var t=te(),n=te(),a=te();A(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],c=VL(o),f=zL(c);n.set(f,{dataGroupId:l,data:u}),G(c)&&A(c,function(h){a.set(h,{key:f,dataGroupId:l,data:u})})});function i(o){t.get(o)&&st("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=VL(o),c=zL(u),f=n.get(c);if(f)s_.NODE_ENV!=="production"&&i(c),t.set(c,{oldSeries:[{dataGroupId:f.dataGroupId,divide:$a(f.data),data:f.data}],newSeries:[{dataGroupId:s,divide:$a(l),data:l}]});else if(G(u)){s_.NODE_ENV!=="production"&&i(c);var h=[];A(u,function(v){var g=n.get(v);g.data&&h.push({dataGroupId:g.dataGroupId,divide:$a(g.data),data:g.data})}),h.length&&t.set(c,{oldSeries:h,newSeries:[{dataGroupId:s,data:l,divide:$a(l)}]})}else{var d=a.get(u);if(d){var p=t.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:$a(d.data)}],newSeries:[]},t.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:l,divide:$a(l)})}}}}),t}function FL(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 GQ(r,e,t,n){var a=[],i=[];A(He(r.from),function(o){var s=FL(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:$a(e.oldData[s]),groupIdDim:o.dimension})}),A(He(r.to),function(o){var s=FL(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:$a(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&BL(a,i,n)}function HQ(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){A(He(n.seriesTransition),function(a){A(He(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][Cf]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=PQ(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)A(He(i),function(d){GQ(d,a,n,t)});else{var o=$Q(a,n);A(o.keys(),function(d){var p=o.get(d);BL(p.oldSeries,p.newSeries,t)})}A(n.updatedSeries,function(d){d[Cf]&&(d[Cf]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<IL&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}Te([D4]),Te([w4]),Te([q4,uH,_H,rU,pU,rW,NW,v6,V6,U6,e8,q8,b9,I9,q9,j9,u7,g7,D7,L7,H7,CY]),Te(WY),Te(yZ),Te(EA),Te(NZ),Te(WM),Te(PZ),Te(WZ),Te(Rq),Te(eX),Te(Cu),Te(yX),Te(xX),Te(NX),Te(zX),Te(YX),Te(jX),Te(uK),Te(AK),Te(YI),Te(KI),Te(XK),Te(hL),Te(pL),Te(eQ),Te(dQ),Te(gQ),Te(HQ),Te(zG);const UQ={class:"pt-[10px]"},WQ={__name:"vs-editor-form-yaml",props:{yamlValue:{type:null,default:()=>""},widgetName:{type:String},data:{type:Object}},setup(r){const e=b.ref(null),{$notify:t}=b.getCurrentInstance().proxy,n=r,a=(l,{dimensions:u,source:c})=>{const f=l.getOption(),{data:h,...d}=(f==null?void 0:f.series)[0],[,...p]=u||[],v=p.map((g,m)=>({...(f==null?void 0:f.series[m])||{},data:c.map(y=>y[m+1]),name:g}));l==null||l.setOption({...f||{},dataset:{dimensions:u,source:c},series:v,xAxis:{type:"category"},yAxis:{}},!0)},i=l=>{const u=document.getElementById(l);if(!u)return null;const c=kg(u);return c||null},o=b.ref(n.yamlValue),s=async()=>{try{await kt.put(`/bi-dashboard/${e.value}/${n.widgetName}`,{yml:o.value});const l=i(n.widgetName);if(l){const u=await kt.get(`/bi-data?dashboard=${e.value}&widget=${n.widgetName}`);a(l,u)}await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return b.onMounted(()=>{const l=new URLSearchParams(window.top.location.search);e.value=l.get("dashboard")}),(l,u)=>{const c=b.resolveComponent("VsButton"),f=b.resolveComponent("VsFormAce");return b.openBlock(),b.createElementBlock("div",UQ,[b.createVNode(c,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:s},{default:b.withCtx(()=>u[1]||(u[1]=[b.createTextVNode(" Зберегти ")])),_:1}),b.createVNode(f,{modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=h=>o.value=h),value:o.value,fontSize:"12px"},null,8,["modelValue","value"])])}}},YQ={class:"pt-[10px]"},$L={"vs-editor-form-style":wO,"vs-editor-form-data":rP,"vs-editor-form-yaml":WQ,"vs-editor-form-controls":{__name:"vs-editor-form-controls",props:{widgetName:{type:String},controls:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(r,{emit:e}){var u;const{$notify:t}=b.getCurrentInstance().proxy,n=e,a=r,i=b.ref(null),o={granularity:{ua:"Granularity",type:"checkbox",options:["week","month","quarter","year"]},export:{ua:"Export",type:"Switcher"},groupby:{ua:"Groupby",type:"checkbox",options:(u=a.columns)==null?void 0:u.map(({name:c})=>c)}},s=b.ref(a.controls||{}),l=async()=>{try{await kt.put(`/bi-dashboard/${i.value}/${a.widgetName}`,{controls:s.value}),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),staticTypes!=null&&staticTypes.includes(s.value.type)&&n("update-dashboard")}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return b.onMounted(()=>{const c=new URLSearchParams(window.top.location.search);i.value=c.get("dashboard")}),(c,f)=>{const h=b.resolveComponent("VsButton"),d=b.resolveComponent("VsForm");return b.openBlock(),b.createElementBlock("div",YQ,[b.createVNode(h,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:l},{default:b.withCtx(()=>f[1]||(f[1]=[b.createTextVNode(" Зберегти ")])),_:1}),b.createVNode(d,{scheme:o,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=p=>s.value=p)},null,8,["modelValue"])])}}}},c_={__name:"icon-table",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(SR),b.mergeProps(e.$attrs,{size:24}),null,16))}};function ZQ(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function GL(r){return r instanceof Map?r.clear=r.delete=r.set=function(){throw new Error("map is read-only")}:r instanceof Set&&(r.add=r.clear=r.delete=function(){throw new Error("set is read-only")}),Object.freeze(r),Object.getOwnPropertyNames(r).forEach(e=>{const t=r[e],n=typeof t;(n==="object"||n==="function")&&!Object.isFrozen(t)&&GL(t)}),r}class HL{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function UL(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ga(r,...e){const t=Object.create(null);for(const n in r)t[n]=r[n];return e.forEach(function(n){for(const a in n)t[a]=n[a]}),t}const qQ="</span>",WL=r=>!!r.scope,XQ=(r,{prefix:e})=>{if(r.startsWith("language:"))return r.replace("language:","language-");if(r.includes(".")){const t=r.split(".");return[`${e}${t.shift()}`,...t.map((n,a)=>`${n}${"_".repeat(a+1)}`)].join(" ")}return`${e}${r}`};class KQ{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=UL(e)}openNode(e){if(!WL(e))return;const t=XQ(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){WL(e)&&(this.buffer+=qQ)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const YL=(r={})=>{const e={children:[]};return Object.assign(e,r),e};class f_{constructor(){this.rootNode=YL(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=YL({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(n=>this._walk(e,n)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{f_._collapse(t)}))}}class QQ extends f_{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new KQ(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Pu(r){return r?typeof r=="string"?r:r.source:null}function ZL(r){return uo("(?=",r,")")}function jQ(r){return uo("(?:",r,")*")}function JQ(r){return uo("(?:",r,")?")}function uo(...r){return r.map(t=>Pu(t)).join("")}function ej(r){const e=r[r.length-1];return typeof e=="object"&&e.constructor===Object?(r.splice(r.length-1,1),e):{}}function h_(...r){return"("+(ej(r).capture?"":"?:")+r.map(n=>Pu(n)).join("|")+")"}function qL(r){return new RegExp(r.toString()+"|").exec("").length-1}function tj(r,e){const t=r&&r.exec(e);return t&&t.index===0}const rj=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function d_(r,{joinWith:e}){let t=0;return r.map(n=>{t+=1;const a=t;let i=Pu(n),o="";for(;i.length>0;){const s=rj.exec(i);if(!s){o+=i;break}o+=i.substring(0,s.index),i=i.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?o+="\\"+String(Number(s[1])+a):(o+=s[0],s[0]==="("&&t++)}return o}).map(n=>`(${n})`).join(e)}const nj=/\b\B/,XL="[a-zA-Z]\\w*",p_="[a-zA-Z_]\\w*",KL="\\b\\d+(\\.\\d+)?",QL="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",jL="\\b(0b[01]+)",aj="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ij=(r={})=>{const e=/^#![ ]*\//;return r.binary&&(r.begin=uo(e,/.*\b/,r.binary,/\b.*/)),Ga({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,n)=>{t.index!==0&&n.ignoreMatch()}},r)},Bu={begin:"\\\\[\\s\\S]",relevance:0},oj={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Bu]},sj={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Bu]},lj={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},fd=function(r,e,t={}){const n=Ga({scope:"comment",begin:r,end:e,contains:[]},t);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=h_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:uo(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},uj=fd("//","$"),cj=fd("/\\*","\\*/"),fj=fd("#","$"),hj={scope:"number",begin:KL,relevance:0},dj={scope:"number",begin:QL,relevance:0},pj={scope:"number",begin:jL,relevance:0},vj={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Bu,{begin:/\[/,end:/\]/,relevance:0,contains:[Bu]}]},gj={scope:"title",begin:XL,relevance:0},mj={scope:"title",begin:p_,relevance:0},yj={begin:"\\.\\s*"+p_,relevance:0};var hd=Object.freeze({__proto__:null,APOS_STRING_MODE:oj,BACKSLASH_ESCAPE:Bu,BINARY_NUMBER_MODE:pj,BINARY_NUMBER_RE:jL,COMMENT:fd,C_BLOCK_COMMENT_MODE:cj,C_LINE_COMMENT_MODE:uj,C_NUMBER_MODE:dj,C_NUMBER_RE:QL,END_SAME_AS_BEGIN:function(r){return Object.assign(r,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:fj,IDENT_RE:XL,MATCH_NOTHING_RE:nj,METHOD_GUARD:yj,NUMBER_MODE:hj,NUMBER_RE:KL,PHRASAL_WORDS_MODE:lj,QUOTE_STRING_MODE:sj,REGEXP_MODE:vj,RE_STARTERS_RE:aj,SHEBANG:ij,TITLE_MODE:gj,UNDERSCORE_IDENT_RE:p_,UNDERSCORE_TITLE_MODE:mj});function _j(r,e){r.input[r.index-1]==="."&&e.ignoreMatch()}function bj(r,e){r.className!==void 0&&(r.scope=r.className,delete r.className)}function xj(r,e){e&&r.beginKeywords&&(r.begin="\\b("+r.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",r.__beforeBegin=_j,r.keywords=r.keywords||r.beginKeywords,delete r.beginKeywords,r.relevance===void 0&&(r.relevance=0))}function wj(r,e){Array.isArray(r.illegal)&&(r.illegal=h_(...r.illegal))}function Sj(r,e){if(r.match){if(r.begin||r.end)throw new Error("begin & end are not supported with match");r.begin=r.match,delete r.match}}function Ej(r,e){r.relevance===void 0&&(r.relevance=1)}const Tj=(r,e)=>{if(!r.beforeMatch)return;if(r.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},r);Object.keys(r).forEach(n=>{delete r[n]}),r.keywords=t.keywords,r.begin=uo(t.beforeMatch,ZL(t.begin)),r.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},r.relevance=0,delete t.beforeMatch},Cj=["of","and","for","in","not","or","if","then","parent","list","value"],Dj="keyword";function JL(r,e,t=Dj){const n=Object.create(null);return typeof r=="string"?a(t,r.split(" ")):Array.isArray(r)?a(t,r):Object.keys(r).forEach(function(i){Object.assign(n,JL(r[i],e,i))}),n;function a(i,o){e&&(o=o.map(s=>s.toLowerCase())),o.forEach(function(s){const l=s.split("|");n[l[0]]=[i,Aj(l[0],l[1])]})}}function Aj(r,e){return e?Number(e):Mj(r)?0:1}function Mj(r){return Cj.includes(r.toLowerCase())}const e2={},co=r=>{console.error(r)},t2=(r,...e)=>{console.log(`WARN: ${r}`,...e)},As=(r,e)=>{e2[`${r}/${e}`]||(console.log(`Deprecated as of ${r}. ${e}`),e2[`${r}/${e}`]=!0)},dd=new Error;function r2(r,e,{key:t}){let n=0;const a=r[t],i={},o={};for(let s=1;s<=e.length;s++)o[s+n]=a[s],i[s+n]=!0,n+=qL(e[s-1]);r[t]=o,r[t]._emit=i,r[t]._multi=!0}function kj(r){if(Array.isArray(r.begin)){if(r.skip||r.excludeBegin||r.returnBegin)throw co("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dd;if(typeof r.beginScope!="object"||r.beginScope===null)throw co("beginScope must be object"),dd;r2(r,r.begin,{key:"beginScope"}),r.begin=d_(r.begin,{joinWith:""})}}function Nj(r){if(Array.isArray(r.end)){if(r.skip||r.excludeEnd||r.returnEnd)throw co("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dd;if(typeof r.endScope!="object"||r.endScope===null)throw co("endScope must be object"),dd;r2(r,r.end,{key:"endScope"}),r.end=d_(r.end,{joinWith:""})}}function Ij(r){r.scope&&typeof r.scope=="object"&&r.scope!==null&&(r.beginScope=r.scope,delete r.scope)}function Lj(r){Ij(r),typeof r.beginScope=="string"&&(r.beginScope={_wrap:r.beginScope}),typeof r.endScope=="string"&&(r.endScope={_wrap:r.endScope}),kj(r),Nj(r)}function Rj(r){function e(o,s){return new RegExp(Pu(o),"m"+(r.case_insensitive?"i":"")+(r.unicodeRegex?"u":"")+(s?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=qL(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const s=this.regexes.map(l=>l[1]);this.matcherRe=e(d_(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(s);if(!l)return null;const u=l.findIndex((f,h)=>h>0&&f!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const l=new t;return this.rules.slice(s).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(s);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function a(o){const s=new n;return o.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&s.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&s.addRule(o.illegal,{type:"illegal"}),s}function i(o,s){const l=o;if(o.isCompiled)return l;[bj,Sj,Lj,Tj].forEach(c=>c(o,s)),r.compilerExtensions.forEach(c=>c(o,s)),o.__beforeBegin=null,[xj,wj,Ej].forEach(c=>c(o,s)),o.isCompiled=!0;let u=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=JL(o.keywords,r.case_insensitive)),l.keywordPatternRe=e(u,!0),s&&(o.begin||(o.begin=/\B|\b/),l.beginRe=e(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=e(l.end)),l.terminatorEnd=Pu(l.end)||"",o.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(l.illegalRe=e(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(c){return Oj(c==="self"?o:c)})),o.contains.forEach(function(c){i(c,l)}),o.starts&&i(o.starts,s),l.matcher=a(l),l}if(r.compilerExtensions||(r.compilerExtensions=[]),r.contains&&r.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return r.classNameAliases=Ga(r.classNameAliases||{}),i(r)}function n2(r){return r?r.endsWithParent||n2(r.starts):!1}function Oj(r){return r.variants&&!r.cachedVariants&&(r.cachedVariants=r.variants.map(function(e){return Ga(r,{variants:null},e)})),r.cachedVariants?r.cachedVariants:n2(r)?Ga(r,{starts:r.starts?Ga(r.starts):null}):Object.isFrozen(r)?Ga(r):r}var Pj="11.11.1";class Bj extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const v_=UL,a2=Ga,i2=Symbol("nomatch"),Vj=7,o2=function(r){const e=Object.create(null),t=Object.create(null),n=[];let a=!0;const i="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:QQ};function l(I){return s.noHighlightRe.test(I)}function u(I){let O=I.className+" ";O+=I.parentNode?I.parentNode.className:"";const P=s.languageDetectRe.exec(O);if(P){const B=T(P[1]);return B||(t2(i.replace("{}",P[1])),t2("Falling back to no-highlight mode for this block.",I)),B?P[1]:"no-highlight"}return O.split(/\s+/).find(B=>l(B)||T(B))}function c(I,O,P){let B="",z="";typeof O=="object"?(B=I,P=O.ignoreIllegals,z=O.language):(As("10.7.0","highlight(lang, code, ...args) has been deprecated."),As("10.7.0",`Please use highlight(code, options) instead.
|
|
245
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),z=I,B=O),P===void 0&&(P=!0);const $={code:B,language:z};L("before:highlight",$);const U=$.result?$.result:f($.language,$.code,P);return U.code=$.code,L("after:highlight",U),U}function f(I,O,P,B){const z=Object.create(null);function $(ne,ge){return ne.keywords[ge]}function U(){if(!de.keywords){je.addText(ke);return}let ne=0;de.keywordPatternRe.lastIndex=0;let ge=de.keywordPatternRe.exec(ke),Re="";for(;ge;){Re+=ke.substring(ne,ge.index);const Ue=Se.case_insensitive?ge[0].toLowerCase():ge[0],xt=$(de,Ue);if(xt){const[on,gd]=xt;if(je.addText(Re),Re="",z[Ue]=(z[Ue]||0)+1,z[Ue]<=Vj&&(ra+=gd),on.startsWith("_"))Re+=ge[0];else{const nb=Se.classNameAliases[on]||on;ee(ge[0],nb)}}else Re+=ge[0];ne=de.keywordPatternRe.lastIndex,ge=de.keywordPatternRe.exec(ke)}Re+=ke.substring(ne),je.addText(Re)}function j(){if(ke==="")return;let ne=null;if(typeof de.subLanguage=="string"){if(!e[de.subLanguage]){je.addText(ke);return}ne=f(de.subLanguage,ke,!0,ut[de.subLanguage]),ut[de.subLanguage]=ne._top}else ne=d(ke,de.subLanguage.length?de.subLanguage:null);de.relevance>0&&(ra+=ne.relevance),je.__addSublanguage(ne._emitter,ne.language)}function Z(){de.subLanguage!=null?j():U(),ke=""}function ee(ne,ge){ne!==""&&(je.startScope(ge),je.addText(ne),je.endScope())}function he(ne,ge){let Re=1;const Ue=ge.length-1;for(;Re<=Ue;){if(!ne._emit[Re]){Re++;continue}const xt=Se.classNameAliases[ne[Re]]||ne[Re],on=ge[Re];xt?ee(on,xt):(ke=on,U(),ke=""),Re++}}function Ee(ne,ge){return ne.scope&&typeof ne.scope=="string"&&je.openNode(Se.classNameAliases[ne.scope]||ne.scope),ne.beginScope&&(ne.beginScope._wrap?(ee(ke,Se.classNameAliases[ne.beginScope._wrap]||ne.beginScope._wrap),ke=""):ne.beginScope._multi&&(he(ne.beginScope,ge),ke="")),de=Object.create(ne,{parent:{value:de}}),de}function re(ne,ge,Re){let Ue=tj(ne.endRe,Re);if(Ue){if(ne["on:end"]){const xt=new HL(ne);ne["on:end"](ge,xt),xt.isMatchIgnored&&(Ue=!1)}if(Ue){for(;ne.endsParent&&ne.parent;)ne=ne.parent;return ne}}if(ne.endsWithParent)return re(ne.parent,ge,Re)}function J(ne){return de.matcher.regexIndex===0?(ke+=ne[0],1):(Ha=!0,0)}function ue(ne){const ge=ne[0],Re=ne.rule,Ue=new HL(Re),xt=[Re.__beforeBegin,Re["on:begin"]];for(const on of xt)if(on&&(on(ne,Ue),Ue.isMatchIgnored))return J(ge);return Re.skip?ke+=ge:(Re.excludeBegin&&(ke+=ge),Z(),!Re.returnBegin&&!Re.excludeBegin&&(ke=ge)),Ee(Re,ne),Re.returnBegin?0:ge.length}function q(ne){const ge=ne[0],Re=O.substring(ne.index),Ue=re(de,ne,Re);if(!Ue)return i2;const xt=de;de.endScope&&de.endScope._wrap?(Z(),ee(ge,de.endScope._wrap)):de.endScope&&de.endScope._multi?(Z(),he(de.endScope,ne)):xt.skip?ke+=ge:(xt.returnEnd||xt.excludeEnd||(ke+=ge),Z(),xt.excludeEnd&&(ke=ge));do de.scope&&je.closeNode(),!de.skip&&!de.subLanguage&&(ra+=de.relevance),de=de.parent;while(de!==Ue.parent);return Ue.starts&&Ee(Ue.starts,ne),xt.returnEnd?0:ge.length}function ae(){const ne=[];for(let ge=de;ge!==Se;ge=ge.parent)ge.scope&&ne.unshift(ge.scope);ne.forEach(ge=>je.openNode(ge))}let Y={};function ye(ne,ge){const Re=ge&&ge[0];if(ke+=ne,Re==null)return Z(),0;if(Y.type==="begin"&&ge.type==="end"&&Y.index===ge.index&&Re===""){if(ke+=O.slice(ge.index,ge.index+1),!a){const Ue=new Error(`0 width match regex (${I})`);throw Ue.languageName=I,Ue.badRule=Y.rule,Ue}return 1}if(Y=ge,ge.type==="begin")return ue(ge);if(ge.type==="illegal"&&!P){const Ue=new Error('Illegal lexeme "'+Re+'" for mode "'+(de.scope||"<unnamed>")+'"');throw Ue.mode=de,Ue}else if(ge.type==="end"){const Ue=q(ge);if(Ue!==i2)return Ue}if(ge.type==="illegal"&&Re==="")return ke+=`
|
|
246
|
+
`,1;if(zu>1e5&&zu>ge.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ke+=Re,Re.length}const Se=T(I);if(!Se)throw co(i.replace("{}",I)),new Error('Unknown language: "'+I+'"');const Be=Rj(Se);let Ye="",de=B||Be;const ut={},je=new s.__emitter(s);ae();let ke="",ra=0,mr=0,zu=0,Ha=!1;try{if(Se.__emitTokens)Se.__emitTokens(O,je);else{for(de.matcher.considerAll();;){zu++,Ha?Ha=!1:de.matcher.considerAll(),de.matcher.lastIndex=mr;const ne=de.matcher.exec(O);if(!ne)break;const ge=O.substring(mr,ne.index),Re=ye(ge,ne);mr=ne.index+Re}ye(O.substring(mr))}return je.finalize(),Ye=je.toHTML(),{language:I,value:Ye,relevance:ra,illegal:!1,_emitter:je,_top:de}}catch(ne){if(ne.message&&ne.message.includes("Illegal"))return{language:I,value:v_(O),illegal:!0,relevance:0,_illegalBy:{message:ne.message,index:mr,context:O.slice(mr-100,mr+100),mode:ne.mode,resultSoFar:Ye},_emitter:je};if(a)return{language:I,value:v_(O),illegal:!1,relevance:0,errorRaised:ne,_emitter:je,_top:de};throw ne}}function h(I){const O={value:v_(I),illegal:!1,relevance:0,_top:o,_emitter:new s.__emitter(s)};return O._emitter.addText(I),O}function d(I,O){O=O||s.languages||Object.keys(e);const P=h(I),B=O.filter(T).filter(D).map(Z=>f(Z,I,!1));B.unshift(P);const z=B.sort((Z,ee)=>{if(Z.relevance!==ee.relevance)return ee.relevance-Z.relevance;if(Z.language&&ee.language){if(T(Z.language).supersetOf===ee.language)return 1;if(T(ee.language).supersetOf===Z.language)return-1}return 0}),[$,U]=z,j=$;return j.secondBest=U,j}function p(I,O,P){const B=O&&t[O]||P;I.classList.add("hljs"),I.classList.add(`language-${B}`)}function v(I){let O=null;const P=u(I);if(l(P))return;if(L("before:highlightElement",{el:I,language:P}),I.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",I);return}if(I.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(I)),s.throwUnescapedHTML))throw new Bj("One of your code blocks includes unescaped HTML.",I.innerHTML);O=I;const B=O.textContent,z=P?c(B,{language:P,ignoreIllegals:!0}):d(B);I.innerHTML=z.value,I.dataset.highlighted="yes",p(I,P,z.language),I.result={language:z.language,re:z.relevance,relevance:z.relevance},z.secondBest&&(I.secondBest={language:z.secondBest.language,relevance:z.secondBest.relevance}),L("after:highlightElement",{el:I,result:z,text:B})}function g(I){s=a2(s,I)}const m=()=>{x(),As("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){x(),As("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function x(){function I(){x()}if(document.readyState==="loading"){_||window.addEventListener("DOMContentLoaded",I,!1),_=!0;return}document.querySelectorAll(s.cssSelector).forEach(v)}function w(I,O){let P=null;try{P=O(r)}catch(B){if(co("Language definition for '{}' could not be registered.".replace("{}",I)),a)co(B);else throw B;P=o}P.name||(P.name=I),e[I]=P,P.rawDefinition=O.bind(null,r),P.aliases&&C(P.aliases,{languageName:I})}function S(I){delete e[I];for(const O of Object.keys(t))t[O]===I&&delete t[O]}function E(){return Object.keys(e)}function T(I){return I=(I||"").toLowerCase(),e[I]||e[t[I]]}function C(I,{languageName:O}){typeof I=="string"&&(I=[I]),I.forEach(P=>{t[P.toLowerCase()]=O})}function D(I){const O=T(I);return O&&!O.disableAutodetect}function M(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=O=>{I["before:highlightBlock"](Object.assign({block:O.el},O))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=O=>{I["after:highlightBlock"](Object.assign({block:O.el},O))})}function k(I){M(I),n.push(I)}function N(I){const O=n.indexOf(I);O!==-1&&n.splice(O,1)}function L(I,O){const P=I;n.forEach(function(B){B[P]&&B[P](O)})}function R(I){return As("10.7.0","highlightBlock will be removed entirely in v12.0"),As("10.7.0","Please use highlightElement now."),v(I)}Object.assign(r,{highlight:c,highlightAuto:d,highlightAll:x,highlightElement:v,highlightBlock:R,configure:g,initHighlighting:m,initHighlightingOnLoad:y,registerLanguage:w,unregisterLanguage:S,listLanguages:E,getLanguage:T,registerAliases:C,autoDetection:D,inherit:a2,addPlugin:k,removePlugin:N}),r.debugMode=function(){a=!1},r.safeMode=function(){a=!0},r.versionString=Pj,r.regex={concat:uo,lookahead:ZL,either:h_,optional:JQ,anyNumberOfTimes:jQ};for(const I in hd)typeof hd[I]=="object"&&GL(hd[I]);return Object.assign(r,hd),r},Ms=o2({});Ms.newInstance=()=>o2({});var s2=Ms;Ms.HighlightJS=Ms,Ms.default=Ms;const g_=ZQ(s2);var m_,l2;function zj(){if(l2)return m_;l2=1;function r(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(o,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),u=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,u,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,u,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return m_=r,m_}var y_,u2;function Fj(){if(u2)return y_;u2=1;function r(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(l);const u={match:/\\"/},c={className:"string",begin:/'/,end:/'/},f={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},d=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${d.join("|")})`,relevance:10}),v={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},g=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],m=["true","false"],y={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],x=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],w=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:g,literal:m,built_in:[..._,...x,"set","shopt",...w,...S]},contains:[p,e.SHEBANG(),v,h,o,s,y,l,u,c,f,n]}}return y_=r,y_}var __,c2;function $j(){if(c2)return __;c2=1;function r(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="("+a+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",m={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[h,l,n,e.C_BLOCK_COMMENT_MODE,f,c],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:y.concat([{begin:/\(/,end:/\)/,keywords:m,contains:y.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:m,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,f,l,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,f,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"</",contains:[].concat(_,x,y,[h,{begin:e.IDENT_RE+"::",keywords:m},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:c,keywords:m}}}return __=r,__}var b_,f2;function Gj(){if(f2)return b_;f2=1;function r(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="(?!struct)("+a+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",v=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],w={type:g,keyword:v,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},S={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[S,h,l,n,e.C_BLOCK_COMMENT_MODE,f,c],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:E.concat([{begin:/\(/,end:/\)/,keywords:w,contains:E.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:w,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,f]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,f,l,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,f,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:w,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(T,C,S,E,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:w,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:w},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return b_=r,b_}var x_,h2;function Hj(){if(h2)return x_;h2=1;function r(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:i.concat(o),built_in:t,literal:a},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},f={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(f,{illegal:/\n/}),d={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(d,{illegal:/\n/}),v={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},g={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},d]},m=e.inherit(g,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});d.contains=[g,v,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.C_BLOCK_COMMENT_MODE],p.contains=[m,v,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,g,v,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},x=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",w={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,u,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+x+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,_],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[y,u,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},w]}}return x_=r,x_}var w_,d2;function Uj(){if(d2)return w_;d2=1;const r=u=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:u.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:u.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...t],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function l(u){const c=u.regex,f=r(u),h={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},d="and or not only",p=/@-?\w[\w]*(-\w+)*/,v="[a-zA-Z-][a-zA-Z0-9_-]*",g=[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[f.BLOCK_COMMENT,h,f.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+v,relevance:0},f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+o.join("|")+")"}]},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[f.BLOCK_COMMENT,f.HEXCOLOR,f.IMPORTANT,f.CSS_NUMBER_MODE,...g,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...g,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},f.FUNCTION_DISPATCH]},{begin:c.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:d,attribute:a.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...g,f.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b"}]}}return w_=l,w_}var S_,p2;function Wj(){if(p2)return S_;p2=1;function r(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},f={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(c,{contains:[]}),d=e.inherit(f,{contains:[]});c.contains.push(d),f.contains.push(h);let p=[n,u];return[c,f,h,d].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(c,f),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,o,c,f,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,a,u,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return S_=r,S_}var E_,v2;function Yj(){if(v2)return E_;v2=1;function r(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return E_=r,E_}var T_,g2;function Zj(){if(g2)return T_;g2=1;function r(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(a,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},u={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],f={className:"subst",begin:/#\{/,end:/\}/,keywords:s},h={className:"string",contains:[e.BACKSLASH_ESCAPE,f],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,f]})]}]},d="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",v={className:"number",relevance:0,variants:[{begin:`\\b(${d})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[h,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:s},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:n}],relevance:0},v,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,f],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(u,c),relevance:0}].concat(u,c);f.contains=E,g.contains=E;const M=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return c.unshift(u),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(M).concat(c).concat(E)}}return T_=r,T_}var C_,m2;function qj(){if(m2)return C_;m2=1;function r(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}return C_=r,C_}var D_,y2;function Xj(){if(y2)return D_;y2=1;function r(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return D_=r,D_}var A_,_2;function Kj(){if(_2)return A_;_2=1;function r(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},l={begin:/\[/,end:/\]/,contains:[a,o,i,s,n,"self"],relevance:0},u=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,f=/'[^']*'/,h=t.either(u,c,f),d=t.concat(h,"(\\s*\\.\\s*",h,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:d,className:"attr",starts:{end:/$/,contains:[a,l,o,i,s,n]}}]}}return A_=r,A_}var M_,b2;function Qj(){if(b2)return M_;b2=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,t="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${t})\\.?|(${t})?\\.(${t}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${t})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(o,s,l){return l===-1?"":o.replace(s,u=>a(o,s,l-1))}function i(o){const s=o.regex,l="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",u=l+a("(?:<"+l+"~~~(?:\\s*,\\s*"+l+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},v={className:"meta",begin:"@"+l,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[o.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[o.BACKSLASH_ESCAPE]},o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,l],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[s.concat(/(?!else)/,l),/\s+/,l,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,l],className:{1:"keyword",3:"title.class"},contains:[g,o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+u+"\\s+)",o.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[v,o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,n,o.C_BLOCK_COMMENT_MODE]},o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE]},n,v]}}return M_=i,M_}var k_,x2;function jj(){if(x2)return k_;x2=1;const r="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],t=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],o=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],s=[].concat(i,n,a);function l(u){const c=u.regex,f=(Ee,{after:re})=>{const J="</"+Ee[0].slice(1);return Ee.input.indexOf(J,re)!==-1},h=r,d={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,v={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Ee,re)=>{const J=Ee[0].length+Ee.index,ue=Ee.input[J];if(ue==="<"||ue===","){re.ignoreMatch();return}ue===">"&&(f(Ee,{after:J})||re.ignoreMatch());let q;const ae=Ee.input.substring(J);if(q=ae.match(/^\s*=/)){re.ignoreMatch();return}if((q=ae.match(/^\s+extends\s+/))&&q.index===0){re.ignoreMatch();return}}},g={$pattern:r,keyword:e,literal:t,built_in:s,"variable.language":o},m="[0-9](_?[0-9])*",y=`\\.(${m})`,_="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${_})((${y})|\\.)?|(${y}))[eE][+-]?(${m})\\b`},{begin:`\\b(${_})\\b((${y})\\b|\\.)?|(${y})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},w={className:"subst",begin:"\\$\\{",end:"\\}",keywords:g,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[u.BACKSLASH_ESCAPE,w],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[u.BACKSLASH_ESCAPE,w],subLanguage:"css"}},T={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[u.BACKSLASH_ESCAPE,w],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[u.BACKSLASH_ESCAPE,w]},M={className:"comment",variants:[u.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:h+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),u.C_BLOCK_COMMENT_MODE,u.C_LINE_COMMENT_MODE]},k=[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE,S,E,T,C,{match:/\$\d+/},x];w.contains=k.concat({begin:/\{/,end:/\}/,keywords:g,contains:["self"].concat(k)});const N=[].concat(M,w.contains),L=N.concat([{begin:/(\s*)\(/,end:/\)/,keywords:g,contains:["self"].concat(N)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:L},I={variants:[{match:[/class/,/\s+/,h,/\s+/,/extends/,/\s+/,c.concat(h,"(",c.concat(/\./,h),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,h],scope:{1:"keyword",3:"title.class"}}]},O={relevance:0,match:c.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},B={variants:[{match:[/function/,/\s+/,h,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(Ee){return c.concat("(?!",Ee.join("|"),")")}const U={match:c.concat(/\b/,$([...i,"super","import"].map(Ee=>`${Ee}\\s*\\(`)),h,c.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:c.concat(/\./,c.lookahead(c.concat(h,/(?![0-9A-Za-z$_(])/))),end:h,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,h,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},ee="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+u.UNDERSCORE_IDENT_RE+")\\s*=>",he={match:[/const|var|let/,/\s+/,h,/\s*/,/=\s*/,/(async\s*)?/,c.lookahead(ee)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:O},illegal:/#(?![$_A-z])/,contains:[u.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,u.APOS_STRING_MODE,u.QUOTE_STRING_MODE,S,E,T,C,M,{match:/\$\d+/},x,O,{scope:"attr",match:h+c.lookahead(":"),relevance:0},he,{begin:"("+u.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,u.REGEXP_MODE,{className:"function",begin:ee,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:u.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:d.begin,end:d.end},{match:p},{begin:v.begin,"on:begin":v.isTrulyOpeningTag,end:v.end}],subLanguage:"xml",contains:[{begin:v.begin,end:v.end,skip:!0,contains:["self"]}]}]},B,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+u.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,u.inherit(u.TITLE_MODE,{begin:h,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+h,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},U,z,I,Z,{match:/\$[(.]/}]}}return k_=l,k_}var N_,w2;function Jj(){if(w2)return N_;w2=1;function r(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],i={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return N_=r,N_}var I_,S2;function eJ(){if(S2)return I_;S2=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,t="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${t})\\.?|(${t})?\\.(${t}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${t})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(i){const o={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},s={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},l={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},u={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},c={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},f={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[c,u]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,c,u]}]};u.contains.push(f);const h={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(f,{className:"string"}),"self"]}]},p=n,v=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=g;return m.variants[1].contains=[g],g.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:o,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,v,s,l,h,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:o,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,i.C_LINE_COMMENT_MODE,v],relevance:0},i.C_LINE_COMMENT_MODE,v,h,d,f,i.C_NUMBER_MODE]},v]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},h,d]},f,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
247
|
+
`},p]}}return I_=a,I_}var L_,E2;function tJ(){if(E2)return L_;E2=1;const r=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...t],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),l=i.concat(o).sort().reverse();function u(c){const f=r(c),h=l,d="and or not only",p="[\\w-]+",v="("+p+"|@\\{"+p+"\\})",g=[],m=[],y=function(N){return{className:"string",begin:"~?"+N+".*?"+N}},_=function(N,L,R){return{className:N,begin:L,relevance:R}},x={$pattern:/[a-z-]+/,keyword:d,attribute:a.join(" ")},w={begin:"\\(",end:"\\)",contains:m,keywords:x,relevance:0};m.push(c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,y("'"),y('"'),f.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},f.HEXCOLOR,w,_("variable","@@?"+p,10),_("variable","@\\{"+p+"\\}"),_("built_in","~?`[^`]*?`"),{className:"attribute",begin:p+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},f.IMPORTANT,{beginKeywords:"and not"},f.FUNCTION_DISPATCH);const S=m.concat({begin:/\{/,end:/\}/,contains:g}),E={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(m)},T={begin:v+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:m}}]},C={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:x,returnEnd:!0,contains:m,relevance:0}},D={className:"variable",variants:[{begin:"@"+p+"\\s*:",relevance:15},{begin:"@"+p}],starts:{end:"[;}]",returnEnd:!0,contains:S}},M={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:v,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,E,_("keyword","all\\b"),_("variable","@\\{"+p+"\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},f.CSS_NUMBER_MODE,_("selector-tag",v,0),_("selector-id","#"+v),_("selector-class","\\."+v,0),_("selector-tag","&",0),f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+o.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:S},{begin:"!important"},f.FUNCTION_DISPATCH]},k={begin:p+`:(:)?(${h.join("|")})`,returnBegin:!0,contains:[M]};return g.push(c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,C,D,k,T,M,E,f.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:g}}return L_=u,L_}var R_,T2;function rJ(){if(T2)return R_;T2=1;function r(e){const t="\\[=*\\[",n="\\]=*\\]",a={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[a],relevance:5}])}}return R_=r,R_}var O_,C2;function nJ(){if(C2)return O_;C2=1;function r(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},s={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,a,i,o,s]}}return O_=r,O_}var P_,D2;function aJ(){if(D2)return P_;D2=1;function r(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},s={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},u={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},f=[e.BACKSLASH_ESCAPE,o,u],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],d=(g,m,y="\\1")=>{const _=y==="\\1"?y:t.concat(y,m);return t.concat(t.concat("(?:",g,")"),m,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,y,a)},p=(g,m,y)=>t.concat(t.concat("(?:",g,")"),m,/(?:\\.|[^\\\/])*?/,y,a),v=[u,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:f,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:d("s|tr|y",t.either(...h,{capture:!0}))},{begin:d("s|tr|y","\\(","\\)")},{begin:d("s|tr|y","\\[","\\]")},{begin:d("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=v,s.contains=v,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:v}}return P_=r,P_}var B_,A2;function iJ(){if(A2)return B_;A2=1;function r(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},u={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+u.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:u,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}return B_=r,B_}var V_,M2;function oJ(){if(M2)return V_;M2=1;function r(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+a},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},u={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),f=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(u)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(u),"on:begin":(R,I)=>{I.data._beginMatch=R[1]||R[2]},"on:end":(R,I)=>{I.data._beginMatch!==R[1]&&I.ignoreMatch()}},d=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
248
|
+
]`,v={scope:"string",variants:[f,c,h,d]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},m=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],_=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],w={keyword:y,literal:(R=>{const I=[];return R.forEach(O=>{I.push(O),O.toLowerCase()===O?I.push(O.toUpperCase()):I.push(O.toLowerCase())}),I})(m),built_in:_},S=R=>R.map(I=>I.replace(/\|\d+$/,"")),E={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",S(_).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},T=t.concat(a,"\\b(?!\\()"),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),T],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),T],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},D={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},M={relevance:0,begin:/\(/,end:/\)/,keywords:w,contains:[D,s,C,e.C_BLOCK_COMMENT_MODE,v,g,E]},k={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",S(y).join("\\b|"),"|",S(_).join("\\b|"),"\\b)"),a,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[M]};M.contains.push(k);const N=[D,C,e.C_BLOCK_COMMENT_MODE,v,g,E],L={begin:t.concat(/#\[\s*\\?/,t.either(i,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:m,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:m,keyword:["new","array"]},contains:["self",...N]},...N,{scope:"meta",variants:[{match:i},{match:o}]}]};return{case_insensitive:!1,keywords:w,contains:[L,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},s,k,C,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},E,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:w,contains:["self",L,s,C,e.C_BLOCK_COMMENT_MODE,v,g]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},v,g]}}return V_=r,V_}var z_,k2;function sJ(){if(k2)return z_;k2=1;function r(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return z_=r,z_}var F_,N2;function lJ(){if(N2)return F_;N2=1;function r(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return F_=r,F_}var $_,I2;function uJ(){if(I2)return $_;I2=1;function r(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},f={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u,f,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u,f,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,f,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,f,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",p=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,v=`\\b|${a.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${p}))[eE][+-]?(${d})[jJ]?(?=${v})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${v})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${v})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${v})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${v})`},{begin:`\\b(${d})[jJ](?=${v})`}]},m={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",u,g,h,e.HASH_COMMENT_MODE]}]};return c.contains=[h,g,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[u,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,y,h]}]}}return $_=r,$_}var G_,L2;function cJ(){if(L2)return G_;L2=1;function r(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return G_=r,G_}var H_,R2;function fJ(){if(R2)return H_;R2=1;function r(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return H_=r,H_}var U_,O2;function hJ(){if(O2)return U_;O2=1;function r(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],u=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],f=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:f,keyword:l,literal:u,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:f}},{className:"punctuation",begin:"->"},o]}}return U_=r,U_}var W_,P2;function dJ(){if(P2)return W_;P2=1;const r=u=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:u.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[u.APOS_STRING_MODE,u.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:u.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...t],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),s=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function l(u){const c=r(u),f=o,h=i,d="@[a-z-]+",p="and or not only",g={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[u.C_LINE_COMMENT_MODE,u.C_BLOCK_COMMENT_MODE,c.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},c.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+h.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+f.join("|")+")"},g,{begin:/\(/,end:/\)/,contains:[c.CSS_NUMBER_MODE]},c.CSS_VARIABLE,{className:"attribute",begin:"\\b("+s.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[c.BLOCK_COMMENT,g,c.HEXCOLOR,c.CSS_NUMBER_MODE,u.QUOTE_STRING_MODE,u.APOS_STRING_MODE,c.IMPORTANT,c.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:d,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:a.join(" ")},contains:[{begin:d,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},g,u.QUOTE_STRING_MODE,u.APOS_STRING_MODE,c.HEXCOLOR,c.CSS_NUMBER_MODE]},c.FUNCTION_DISPATCH]}}return W_=l,W_}var Y_,B2;function pJ(){if(B2)return Y_;B2=1;function r(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Y_=r,Y_}var Z_,V2;function vJ(){if(V2)return Z_;V2=1;function r(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],u=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],d=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=f,v=[...c,...u].filter(S=>!f.includes(S)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},m={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function _(S){return t.concat(/\b/,t.either(...S.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}const x={scope:"keyword",match:_(d),relevance:0};function w(S,{exceptions:E,when:T}={}){const C=T;return E=E||[],S.map(D=>D.match(/\|\d+$/)||E.includes(D)?D:C(D)?`${D}|0`:D)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:w(v,{when:S=>S.length<3}),literal:o,type:l,built_in:h},contains:[{scope:"type",match:_(s)},x,y,g,a,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,m]}}return Z_=r,Z_}var q_,z2;function gJ(){if(z2)return q_;z2=1;function r(T){return T?typeof T=="string"?T:T.source:null}function e(T){return t("(?=",T,")")}function t(...T){return T.map(D=>r(D)).join("")}function n(T){const C=T[T.length-1];return typeof C=="object"&&C.constructor===Object?(T.splice(T.length-1,1),C):{}}function a(...T){return"("+(n(T).capture?"":"?:")+T.map(M=>r(M)).join("|")+")"}const i=T=>t(/\b/,T,/\w$/.test(T)?/\b/:/\B/),o=["Protocol","Type"].map(i),s=["init","self"].map(i),l=["Any","Self"],u=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],c=["false","nil","true"],f=["assignment","associativity","higherThan","left","lowerThan","none","right"],h=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],d=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=a(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),v=a(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),g=t(p,v,"*"),m=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),y=a(m,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),_=t(m,y,"*"),x=t(/[A-Z]/,y,"*"),w=["attached","autoclosure",t(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",t(/objc\(/,_,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],S=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function E(T){const C={match:/\s+/,relevance:0},D=T.COMMENT("/\\*","\\*/",{contains:["self"]}),M=[T.C_LINE_COMMENT_MODE,D],k={match:[/\./,a(...o,...s)],className:{2:"keyword"}},N={match:t(/\./,a(...u)),relevance:0},L=u.filter(it=>typeof it=="string").concat(["_|0"]),R=u.filter(it=>typeof it!="string").concat(l).map(i),I={variants:[{className:"keyword",match:a(...R,...s)}]},O={$pattern:a(/\b\w+/,/#\w+/),keyword:L.concat(h),literal:c},P=[k,N,I],B={match:t(/\./,a(...d)),relevance:0},z={className:"built_in",match:t(/\b/,a(...d),/(?=\()/)},$=[B,z],U={match:/->/,relevance:0},j={className:"operator",relevance:0,variants:[{match:g},{match:`\\.(\\.|${v})+`}]},Z=[U,j],ee="([0-9]_*)+",he="([0-9a-fA-F]_*)+",Ee={className:"number",relevance:0,variants:[{match:`\\b(${ee})(\\.(${ee}))?([eE][+-]?(${ee}))?\\b`},{match:`\\b0x(${he})(\\.(${he}))?([pP][+-]?(${ee}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},re=(it="")=>({className:"subst",variants:[{match:t(/\\/,it,/[0\\tnr"']/)},{match:t(/\\/,it,/u\{[0-9a-fA-F]{1,8}\}/)}]}),J=(it="")=>({className:"subst",match:t(/\\/,it,/[\t ]*(?:[\r\n]|\r\n)/)}),ue=(it="")=>({className:"subst",label:"interpol",begin:t(/\\/,it,/\(/),end:/\)/}),q=(it="")=>({begin:t(it,/"""/),end:t(/"""/,it),contains:[re(it),J(it),ue(it)]}),ae=(it="")=>({begin:t(it,/"/),end:t(/"/,it),contains:[re(it),ue(it)]}),Y={className:"string",variants:[q(),q("#"),q("##"),q("###"),ae(),ae("#"),ae("##"),ae("###")]},ye=[T.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[T.BACKSLASH_ESCAPE]}],Se={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ye},Be=it=>{const md=t(it,/\//),Fu=t(/\//,it);return{begin:md,end:Fu,contains:[...ye,{scope:"comment",begin:`#(?!.*${Fu})`,end:/$/}]}},Ye={scope:"regexp",variants:[Be("###"),Be("##"),Be("#"),Se]},de={match:t(/`/,_,/`/)},ut={className:"variable",match:/\$\d+/},je={className:"variable",match:`\\$${y}+`},ke=[de,ut,je],ra={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:S,contains:[...Z,Ee,Y]}]}},mr={scope:"keyword",match:t(/@/,a(...w),e(a(/\(/,/\s+/)))},zu={scope:"meta",match:t(/@/,_)},Ha=[ra,mr,zu],ne={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:t(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,y,"+")},{className:"type",match:x,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:t(/\s+&\s+/,e(x)),relevance:0}]},ge={begin:/</,end:/>/,keywords:O,contains:[...M,...P,...Ha,U,ne]};ne.contains.push(ge);const Re={match:t(_,/\s*:/),keywords:"_|0",relevance:0},Ue={begin:/\(/,end:/\)/,relevance:0,keywords:O,contains:["self",Re,...M,Ye,...P,...$,...Z,Ee,Y,...ke,...Ha,ne]},xt={begin:/</,end:/>/,keywords:"repeat each",contains:[...M,ne]},on={begin:a(e(t(_,/\s*:/)),e(t(_,/\s+/,_,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:_}]},gd={begin:/\(/,end:/\)/,keywords:O,contains:[on,...M,...P,...Z,Ee,Y,...Ha,ne,Ue],endsParent:!0,illegal:/["']/},nb={match:[/(func|macro)/,/\s+/,a(de.match,_,g)],className:{1:"keyword",3:"title.function"},contains:[xt,gd,C],illegal:[/\[/,/%/]},One={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[xt,gd,C],illegal:/\[|%/},Pne={match:[/operator/,/\s+/,g],className:{1:"keyword",3:"title"}},Bne={begin:[/precedencegroup/,/\s+/,x],className:{1:"keyword",3:"title"},contains:[ne],keywords:[...f,...c],end:/}/},Vne={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},zne={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Fne={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,_,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:O,contains:[xt,...P,{begin:/:/,end:/\{/,keywords:O,contains:[{scope:"title.class.inherited",match:x},...P],relevance:0}]};for(const it of Y.variants){const md=it.contains.find($ne=>$ne.label==="interpol");md.keywords=O;const Fu=[...P,...$,...Z,Ee,Y,...ke];md.contains=[...Fu,{begin:/\(/,end:/\)/,contains:["self",...Fu]}]}return{name:"Swift",keywords:O,contains:[...M,nb,One,Vne,zne,Fne,Pne,Bne,{beginKeywords:"import",end:/$/,contains:[...M],relevance:0},Ye,...P,...$,...Z,Ee,Y,...ke,...Ha,ne,Ue]}}return q_=E,q_}var X_,F2;function mJ(){if(F2)return X_;F2=1;function r(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},l=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),d={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},v={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},m=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},d,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},v,g,o,s],y=[...m];return y.pop(),y.push(l),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:m}}return X_=r,X_}var K_,$2;function yJ(){if($2)return K_;$2=1;const r="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],t=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],o=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],s=[].concat(i,n,a);function l(c){const f=c.regex,h=(re,{after:J})=>{const ue="</"+re[0].slice(1);return re.input.indexOf(ue,J)!==-1},d=r,p={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,g={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(re,J)=>{const ue=re[0].length+re.index,q=re.input[ue];if(q==="<"||q===","){J.ignoreMatch();return}q===">"&&(h(re,{after:ue})||J.ignoreMatch());let ae;const Y=re.input.substring(ue);if(ae=Y.match(/^\s*=/)){J.ignoreMatch();return}if((ae=Y.match(/^\s+extends\s+/))&&ae.index===0){J.ignoreMatch();return}}},m={$pattern:r,keyword:e,literal:t,built_in:s,"variable.language":o},y="[0-9](_?[0-9])*",_=`\\.(${y})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",w={className:"number",variants:[{begin:`(\\b(${x})((${_})|\\.)?|(${_}))[eE][+-]?(${y})\\b`},{begin:`\\b(${x})\\b((${_})\\b|\\.)?|(${_})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},S={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},E={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"css"}},C={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,S]},k={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},N=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,E,T,C,D,{match:/\$\d+/},w];S.contains=N.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(N)});const L=[].concat(k,S.contains),R=L.concat([{begin:/(\s*)\(/,end:/\)/,keywords:m,contains:["self"].concat(L)}]),I={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:R},O={variants:[{match:[/class/,/\s+/,d,/\s+/,/extends/,/\s+/,f.concat(d,"(",f.concat(/\./,d),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}}]},P={relevance:0,match:f.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},z={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/},$={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(re){return f.concat("(?!",re.join("|"),")")}const j={match:f.concat(/\b/,U([...i,"super","import"].map(re=>`${re}\\s*\\(`)),d,f.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:f.concat(/\./,f.lookahead(f.concat(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]},he="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",Ee={match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(he)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,E,T,C,D,k,{match:/\$\d+/},w,P,{scope:"attr",match:d+f.lookahead(":"),relevance:0},Ee,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,c.REGEXP_MODE,{className:"function",begin:he,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:v},{begin:g.begin,"on:begin":g.isTrulyOpeningTag,end:g.end}],subLanguage:"xml",contains:[{begin:g.begin,end:g.end,skip:!0,contains:["self"]}]}]},z,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[I,c.inherit(c.TITLE_MODE,{begin:d,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+d,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},j,$,O,ee,{match:/\$[(.]/}]}}function u(c){const f=c.regex,h=l(c),d=r,p=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],v={begin:[/namespace/,/\s+/,c.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},g={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:p},contains:[h.exports.CLASS_REFERENCE]},m={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},y=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],_={$pattern:r,keyword:e.concat(y),literal:t,built_in:s.concat(p),"variable.language":o},x={className:"meta",begin:"@"+d},w=(C,D,M)=>{const k=C.contains.findIndex(N=>N.label===D);if(k===-1)throw new Error("can not find mode to replace");C.contains.splice(k,1,M)};Object.assign(h.keywords,_),h.exports.PARAMS_CONTAINS.push(x);const S=h.contains.find(C=>C.scope==="attr"),E=Object.assign({},S,{match:f.concat(d,f.lookahead(/\s*\?:/))});h.exports.PARAMS_CONTAINS.push([h.exports.CLASS_REFERENCE,S,E]),h.contains=h.contains.concat([x,v,g,E]),w(h,"shebang",c.SHEBANG()),w(h,"use_strict",m);const T=h.contains.find(C=>C.label==="func.def");return T.relevance=0,Object.assign(h,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),h}return K_=u,K_}var Q_,G2;function _J(){if(G2)return Q_;G2=1;function r(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,i),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(o,i),/ +/,t.either(s,l),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},f={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),d=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,u,c,f,h,d,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[d]}]}}return Q_=r,Q_}var j_,H2;function bJ(){if(H2)return j_;H2=1;function r(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,s,i,e.QUOTE_STRING_MODE,u,c,l]}}return j_=r,j_}var Pe=s2;Pe.registerLanguage("xml",zj()),Pe.registerLanguage("bash",Fj()),Pe.registerLanguage("c",$j()),Pe.registerLanguage("cpp",Gj()),Pe.registerLanguage("csharp",Hj()),Pe.registerLanguage("css",Uj()),Pe.registerLanguage("markdown",Wj()),Pe.registerLanguage("diff",Yj()),Pe.registerLanguage("ruby",Zj()),Pe.registerLanguage("go",qj()),Pe.registerLanguage("graphql",Xj()),Pe.registerLanguage("ini",Kj()),Pe.registerLanguage("java",Qj()),Pe.registerLanguage("javascript",jj()),Pe.registerLanguage("json",Jj()),Pe.registerLanguage("kotlin",eJ()),Pe.registerLanguage("less",tJ()),Pe.registerLanguage("lua",rJ()),Pe.registerLanguage("makefile",nJ()),Pe.registerLanguage("perl",aJ()),Pe.registerLanguage("objectivec",iJ()),Pe.registerLanguage("php",oJ()),Pe.registerLanguage("php-template",sJ()),Pe.registerLanguage("plaintext",lJ()),Pe.registerLanguage("python",uJ()),Pe.registerLanguage("python-repl",cJ()),Pe.registerLanguage("r",fJ()),Pe.registerLanguage("rust",hJ()),Pe.registerLanguage("scss",dJ()),Pe.registerLanguage("shell",pJ()),Pe.registerLanguage("sql",vJ()),Pe.registerLanguage("swift",gJ()),Pe.registerLanguage("yaml",mJ()),Pe.registerLanguage("typescript",yJ()),Pe.registerLanguage("vbnet",_J()),Pe.registerLanguage("wasm",bJ()),Pe.HighlightJS=Pe,Pe.default=Pe;var xJ=b.defineComponent({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(r){var e=b.ref(r.language);b.watch(function(){return r.language},function(a){e.value=a});var t=b.computed(function(){return r.autodetect||!e.value}),n=b.computed(function(){return!t.value&&!g_.getLanguage(e.value)});return{className:b.computed(function(){return n.value?"":"hljs "+e.value}),highlightedCode:b.computed(function(){var a;if(n.value)return console.warn('The language "'+e.value+'" you specified could not be found.'),r.code.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");if(t.value){var i=g_.highlightAuto(r.code);return e.value=(a=i.language)!==null&&a!==void 0?a:"",i.value}return(i=g_.highlight(r.code,{language:e.value,ignoreIllegals:r.ignoreIllegals})).value})}},render:function(){return b.h("pre",{},[b.h("code",{class:this.className,innerHTML:this.highlightedCode})])}}),wJ={component:xJ};const SJ={class:"h-full flex flex-col bg-white shrink-0 !w-[400px] border-l"},EJ={key:0},TJ={class:"border-b flex items-center px-[10px] h-[49px] border-transparent border-solid border-b-gray-200"},CJ={class:"flex gap-2 ml-auto"},DJ={key:1,class:"flex-1 min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},AJ={key:0},MJ={key:1},kJ={class:"p-4"},NJ={class:"flex justify-end mt-4 gap-x-3"},IJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},LJ={__name:"vs-editor-forms",props:b.mergeModels({selectedWidgetData:{type:Object,required:!1,default:null},selectedDashboard:{type:String,default:()=>""},currentWidgetData:{type:String,default:()=>""}},{selectedWidget:{},selectedWidgetModifiers:{}}),emits:b.mergeModels(["update-data"],["update:selectedWidget"]),setup(r,{emit:e}){var w,S;const t=(S=(w=b.getCurrentInstance())==null?void 0:w.proxy)==null?void 0:S.$notify,n=e;b.getCurrentInstance().appContext.app.component("highlightjs",wJ.component);const i=r,o=b.ref(!1),s=b.ref(!0),l=b.ref(!1),u=b.ref(!1),c=b.ref(""),f=b.ref({}),h=b.useModel(r,"selectedWidget"),d=["table","text","number","stat","progress","listbar","map","pivot"],p=b.ref("data"),v=async()=>{try{await kt.delete(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`);const E=new URL(window.top.location.href);E.searchParams.set("dashboard",i.selectedDashboard),E.searchParams.delete("widget"),window.top.history.pushState({},"",E),n("update-data"),o.value=!1,t({type:"success",title:"Успішно!",message:"Віджет успішно видалено"})}catch(E){console.error(E),t({type:"error",title:"Помилка!",message:"При спробі видалити віджет виникла помилка"})}},g=()=>{var E;c.value="",(E=i.currentWidgetData)==null||E.columns.forEach(T=>{c.value+=`${T.name} ${T.type.split(" ")[0]}; -- ${T.title||""}
|
|
249
|
+
`})},m=b.computed(()=>{const E=[{id:"data",label:"Дані"},{id:"style",label:"Стилі"},{id:"yaml",label:"{ }"}];return E==null?void 0:E.filter(T=>{var C,D,M;return T.id==="style"?!(d!=null&&d.includes(((C=i.selectedWidgetData)==null?void 0:C.type)||((M=(D=i.selectedWidgetData)==null?void 0:D.data)==null?void 0:M.type))):!0})}),y=()=>{var E,T,C,D,M,k,N,L,R;f.value={title:(E=i.selectedWidgetData)==null?void 0:E.title,type:(T=i.selectedWidgetData)==null?void 0:T.type,table:(C=i.selectedWidgetData)==null?void 0:C.table_name,query:(M=(D=i.selectedWidgetData)==null?void 0:D.data)==null?void 0:M.query,x:(N=(k=i.selectedWidgetData)==null?void 0:k.data)==null?void 0:N.x,cls:(R=(L=i.selectedWidgetData)==null?void 0:L.data)==null?void 0:R.cls},u.value=!0},_=async()=>{try{await kt.put(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`,f.value),t({type:"success",title:"Успішно!",message:"Дані успішно змінено"}),await n("update-data"),u.value=!1}catch{t({type:"error",title:"Помилка!",message:"При спробі внести зміни виникла помилка"})}};b.watch(h,E=>{s.value=!1;const T=new URL(window.top.location.href);E?(T.searchParams.set("widget",E),window.top.history.pushState({},"",T)):(T.searchParams.delete("widget"),window.top.history.pushState({},"",T)),setTimeout(()=>s.value=!0)}),b.watch(()=>i.currentWidgetData,()=>{g()},{deep:!0}),b.onMounted(g);const x={title:{type:"text",ua:"Заголовок",placeholder:"Заголовок",validators:["required"]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"text",ua:"Таблиця",placeholder:"Таблиця"},query:{type:"Text",ua:"Query",placeholder:"Query"},x:{type:"Text",ua:"X Axis",placeholder:"X Axis"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}};return(E,T)=>{var R,I,O,P,B,z,$,U,j,Z,ee;const C=b.resolveComponent("VsFormRadio"),D=b.resolveComponent("VsPopover"),M=b.resolveComponent("VsConfirm"),k=b.resolveComponent("VsForm"),N=b.resolveComponent("VsDialog"),L=b.resolveComponent("highlightjs");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",SJ,[r.selectedWidgetData?(b.openBlock(),b.createElementBlock("div",EJ,[b.createElementVNode("div",TJ,[s.value?(b.openBlock(),b.createBlock(C,{key:0,options:m.value,modelValue:p.value,"onUpdate:modelValue":T[0]||(T[0]=he=>p.value=he),view:"buttons"},null,8,["options","modelValue"])):(b.openBlock(),b.createBlock(C,{key:1,options:m.value,modelValue:p.value,"onUpdate:modelValue":T[1]||(T[1]=he=>p.value=he),view:"buttons"},null,8,["options","modelValue"])),b.createElementVNode("div",CJ,[b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:T[2]||(T[2]=he=>l.value=!0)},[b.createVNode(c_,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[T[12]||(T[12]=b.createTextVNode(" Переглянути колонки таблиці "))]),_:1}),b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{onClick:y,class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200"},[b.createVNode(xb,{class:"h-[16px]"})])]),default:b.withCtx(()=>[T[13]||(T[13]=b.createTextVNode(" Редагувати віджет "))]),_:1}),b.createVNode(D,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:T[3]||(T[3]=he=>o.value=!0)},[b.createVNode(b.unref(bb),{class:"h-[16px]"})])]),default:b.withCtx(()=>[T[14]||(T[14]=b.createTextVNode(" Видалити віджет "))]),_:1})])]),(R=r.currentWidgetData)!=null&&R.status?(b.openBlock(),b.createBlock(Hu,{key:0,title:(I=r.currentWidgetData)==null?void 0:I.title,text:(O=r.currentWidgetData)==null?void 0:O.message},null,8,["title","text"])):(b.openBlock(),b.createElementBlock("div",DJ,[s.value&&r.currentWidgetData?(b.openBlock(),b.createElementBlock("div",AJ,[(b.openBlock(),b.createBlock(b.resolveDynamicComponent(b.unref($L)["vs-editor-form-"+p.value]),{widgetName:(P=r.selectedWidgetData)==null?void 0:P.name,yamlValue:((B=r.selectedWidgetData)==null?void 0:B.yml)||"",data:r.selectedWidgetData,controls:(z=r.selectedWidgetData)==null?void 0:z.controls,columns:($=r.currentWidgetData)==null?void 0:$.columns,onUpdateDashboard:T[4]||(T[4]=he=>E.$emit("update-data"))},null,40,["widgetName","yamlValue","data","controls","columns"]))])):(b.openBlock(),b.createElementBlock("div",MJ,[(b.openBlock(),b.createBlock(b.resolveDynamicComponent(b.unref($L)["vs-editor-form-"+p.value]),{widgetName:(U=r.selectedWidgetData)==null?void 0:U.name,yamlValue:((j=r.selectedWidgetData)==null?void 0:j.yml)||"",data:r.selectedWidgetData,controls:(Z=r.selectedWidgetData)==null?void 0:Z.controls,columns:(ee=r.currentWidgetData)==null?void 0:ee.columns,onUpdateDashboard:T[5]||(T[5]=he=>E.$emit("update-data"))},null,40,["widgetName","yamlValue","data","controls","columns"]))])),b.createVNode(M,{visible:o.value,"onUpdate:visible":T[7]||(T[7]=he=>o.value=he),title:"Ви впевнені?"},{default:b.withCtx(()=>[b.createElementVNode("div",kJ,[T[15]||(T[15]=b.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей віджет? ",-1)),b.createElementVNode("div",NJ,[b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:T[6]||(T[6]=he=>o.value=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:v}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])]))])):(b.openBlock(),b.createBlock(Hu,{key:1,title:"Оберіть один з віджетів",text:""}))]),b.createVNode(N,{visible:u.value,"onUpdate:visible":T[10]||(T[10]=he=>u.value=he),title:"Редагувати віджет"},{footer:b.withCtx(()=>[b.createElementVNode("div",IJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:T[9]||(T[9]=he=>u.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:_,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(k,{scheme:x,modelValue:f.value,"onUpdate:modelValue":T[8]||(T[8]=he=>f.value=he)},null,8,["modelValue"])]),_:1},8,["visible"]),b.createVNode(N,{visible:l.value,"onUpdate:visible":T[11]||(T[11]=he=>l.value=he),title:"Переглянути структуру таблиці"},{default:b.withCtx(()=>[b.createVNode(L,{language:"sql",code:c.value,disabled:!0,theme:"dark-theme",id:"sqlData",class:"w-full overflow-hidden text-white !bg-black rounded",contenteditable:"true"},null,8,["code"])]),_:1},8,["visible"])],64)}}},RJ={class:"bg-white rounded-xl mx-2 mt-4 border border-gray-200 shadow-sm overflow-hidden flex flex-col min-h-[480px]"},OJ={class:"flex items-center justify-between px-4 py-3 border-b border-gray-200 shrink-0"},PJ={class:"text-sm font-semibold text-gray-800 truncate"},BJ={class:"flex-1 flex min-h-0"},VJ={class:"flex-1 min-w-0 p-4 border-r border-gray-200 overflow-auto bg-gray-50/50"},zJ={class:"w-[400px] shrink-0 flex flex-col bg-white"},FJ={__name:"vs-widget-editor-panel",props:{selectedWidget:{type:String,default:""},selectedWidgetData:{type:Object,default:null},currentWidgetData:{type:Object,default:null},selectedDashboard:{type:String,default:""},dashboardWidgets:{type:Array,default:()=>[]}},emits:["update:selectedWidget","update-data"],setup(r,{emit:e}){const t=r,n=e,a=b.computed({get:()=>t.selectedWidget,set:o=>n("update:selectedWidget",o)});function i(){n("update:selectedWidget","")}return(o,s)=>{var l,u,c;return b.openBlock(),b.createElementBlock("div",RJ,[b.createElementVNode("div",OJ,[b.createElementVNode("h3",PJ,b.toDisplayString(((l=r.selectedWidgetData)==null?void 0:l.title)||((c=(u=r.selectedWidgetData)==null?void 0:u.data)==null?void 0:c.title)||r.selectedWidget),1),b.createElementVNode("button",{type:"button",class:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",onClick:i},[b.createVNode(b.unref(fb),{class:"w-4 h-4"}),s[2]||(s[2]=b.createTextVNode(" Закрити "))])]),b.createElementVNode("div",BJ,[b.createElementVNode("div",VJ,[b.createVNode(Ns,{dashboard:r.selectedDashboard,widget:r.selectedWidget,"selected-widget":r.selectedWidget,"dashboard-widgets":r.dashboardWidgets,"filter-u-rl":void 0,class:"max-h-full"},null,8,["dashboard","widget","selected-widget","dashboard-widgets"])]),b.createElementVNode("div",zJ,[b.createVNode(LJ,{selectedWidget:a.value,"onUpdate:selectedWidget":s[0]||(s[0]=f=>a.value=f),selectedWidgetData:r.selectedWidgetData,currentWidgetData:r.currentWidgetData,selectedDashboard:r.selectedDashboard,onUpdateData:s[1]||(s[1]=f=>o.$emit("update-data"))},null,8,["selectedWidget","selectedWidgetData","currentWidgetData","selectedDashboard"])])])])}}},U2={__name:"icon-grid",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(lb),b.mergeProps(e.$attrs,{size:24}),null,16))}},$J={components:{deleteIcon:bb,editIcon:xb,IconGrid:U2,IconMore:{__name:"icon-more",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(ob),b.mergeProps(e.$attrs,{size:24}),null,16))}},IconFilter:{__name:"icon-filter",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(sb),b.mergeProps(e.$attrs,{size:24}),null,16))}},IconTable:c_},watch:{dashboardData(r){var t,n;if(this.formEditValue={title:r==null?void 0:r.title,description:r==null?void 0:r.description,table_name:r==null?void 0:r.table_name,db:r==null?void 0:r.db,public:r==null?void 0:r.public,words:r==null?void 0:r.words},!((t=r==null?void 0:r.panels)!=null&&t.length))return[];const e=(n=r==null?void 0:r.panels)==null?void 0:n.map(a=>{var s,l;const{title:i="",type:o=""}=((l=(s=r==null?void 0:r.widgets)==null?void 0:s.find(u=>(u==null?void 0:u.name)===(a==null?void 0:a.widget)))==null?void 0:l.data)||{};return{title:i,type:o,...a}});this.formGridValue={panels:e},this.formFilterValue={filters:(r==null?void 0:r.filters)||null}}},data(){return{isDeleteConfirm:!1,isFormEdit:!1,isFormGrid:!1,isFormFilter:!1,isVisibleTableColumns:!1,formEditValue:{},formGridValue:{},formFilterValue:{},editDashboardScheme:[{type:"Text",key:"title",label:"Заголовок",validators:["required"]},{type:"Text",key:"description",label:"Опис"},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці"},{type:"Text",key:"words",label:"Ключові слова"},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],editGridScheme:[{type:"DataTable",ua:"Панелі",key:"panels",editable:!1,addition:!1,colModel:[{name:"title",ua:"Назва",type:"Text",key:"col"},{name:"type",ua:"Тип",type:"Text",key:"col",disabled:!0},{name:"widget",type:"Text",ua:"Назва",key:"widget",hiddenCol:!0},{name:"col",ua:"Кількість стовпчиків",type:"Text",key:"col"}]}],editFilterScheme:[{name:"filters",type:"DataTable",colModel:[{ua:"Підпис",type:"Text",key:"label"},{ua:"Тип",type:"Text",key:"type"}]}]}},props:{selected:{type:String,default:()=>""},dashboardData:{type:Object,default:()=>{}},selectedWidgetData:{type:Object,default:()=>{}},columns:{type:Array}},methods:{async editDashboard(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formEdit)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,this.formEditValue),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormEdit=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"при спробі оновити дані виникла помилка"})}},async editDashboardGrid(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formGrid)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormGrid=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async editDashboardFilters(){var r,e;try{(e=(r=this.$refs)==null?void 0:r.formFilter)==null||e.doValidation(),await kt.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue,...this.formFilterValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormFilter=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async deleteDashboard(){try{await kt.delete(`/bi-dashboard/${this.selected}`);const r=new URL(window.top.location.href);r.searchParams.delete("dashboard"),r.searchParams.delete("widget"),window.history.pushState({},"",r),await this.$notify({title:"Успішно!",type:"success",message:"Дашборд видалено успішно"}),this.isDeleteConfirm=!1,await this.$emit("update:selected",null),await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі видалити дашборд виникла помилка"})}},closePopover(){document.body.click()}}},GJ={key:0,class:"flex items-center gap-2"},HJ={class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200"},UJ={class:"flex flex-col items-start -ml-2 -mr-2"},WJ={class:"p-4"},YJ={class:"flex justify-end mt-4 gap-x-3"},ZJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},qJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},XJ={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function KJ(r,e,t,n,a,i){const o=b.resolveComponent("IconFilter"),s=b.resolveComponent("VsPopover"),l=b.resolveComponent("IconGrid"),u=b.resolveComponent("IconMore"),c=b.resolveComponent("VsConfirm"),f=b.resolveComponent("VsForm"),h=b.resolveComponent("VsDialog");return b.openBlock(),b.createElementBlock("div",null,[t.selected?(b.openBlock(),b.createElementBlock("div",GJ,[b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:e[0]||(e[0]=d=>a.isFormFilter=!0)},[b.createVNode(o,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[e[19]||(e[19]=b.createTextVNode(" Редагувати фільтри "))]),_:1}),b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createElementVNode("button",{class:"h-[30px] w-[30px] rounded-full bg-gray-100 flex items-center justify-center duration-300 hover:bg-gray-200",onClick:e[1]||(e[1]=d=>a.isFormGrid=!0)},[b.createVNode(l,{class:"h-[16px] text-gray-500"})])]),default:b.withCtx(()=>[e[20]||(e[20]=b.createTextVNode(" Редагувати структуру дашборду "))]),_:1}),b.createVNode(s,{placement:"left",trigger:"hover"},{reference:b.withCtx(()=>[b.createVNode(s,{placement:"bottom-left"},{reference:b.withCtx(()=>[b.createElementVNode("button",HJ,[b.createVNode(u,{class:"h-[16px]"})])]),default:b.withCtx(()=>[b.createElementVNode("div",UJ,[b.createElementVNode("button",{onClick:e[2]||(e[2]=d=>{i.closePopover(),a.isFormEdit=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Редагувати дашборд "),b.createElementVNode("button",{onClick:e[3]||(e[3]=d=>{i.closePopover(),a.isDeleteConfirm=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Видалити дашборд ")])]),_:1})]),default:b.withCtx(()=>[e[21]||(e[21]=b.createTextVNode(" Керування дашбордом "))]),_:1})])):b.createCommentVNode("",!0),b.createVNode(c,{visible:a.isDeleteConfirm,"onUpdate:visible":e[6]||(e[6]=d=>a.isDeleteConfirm=d),size:"small",title:"Ви впевнені?"},{default:b.withCtx(()=>[b.createElementVNode("div",WJ,[e[22]||(e[22]=b.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей дашборд? ",-1)),b.createElementVNode("div",YJ,[b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=d=>a.isDeleteConfirm=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[5]||(e[5]=(...d)=>i.deleteDashboard&&i.deleteDashboard(...d))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormEdit,"onUpdate:visible":e[10]||(e[10]=d=>a.isFormEdit=d),title:"Редагувати дашборд"},{footer:b.withCtx(()=>[b.createElementVNode("div",ZJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[8]||(e[8]=d=>a.isFormEdit=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[9]||(e[9]=(...d)=>i.editDashboard&&i.editDashboard(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formEdit",scheme:a.editDashboardScheme,modelValue:a.formEditValue,"onUpdate:modelValue":e[7]||(e[7]=d=>a.formEditValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormGrid,"onUpdate:visible":e[14]||(e[14]=d=>a.isFormGrid=d),title:"Редагувати структуру дашборду"},{footer:b.withCtx(()=>[b.createElementVNode("div",qJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[12]||(e[12]=d=>a.isFormGrid=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[13]||(e[13]=(...d)=>i.editDashboardGrid&&i.editDashboardGrid(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formgrid",scheme:a.editGridScheme,modelValue:a.formGridValue,"onUpdate:modelValue":e[11]||(e[11]=d=>a.formGridValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createVNode(h,{visible:a.isFormFilter,"onUpdate:visible":e[18]||(e[18]=d=>a.isFormFilter=d),title:"Редагувати фільтри"},{footer:b.withCtx(()=>[b.createElementVNode("div",XJ,[b.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[16]||(e[16]=d=>a.isFormFilter=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),b.createElementVNode("button",{onClick:e[17]||(e[17]=(...d)=>i.editDashboardFilters&&i.editDashboardFilters(...d)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(f,{ref:"formFilter",scheme:a.editFilterScheme,modelValue:a.formFilterValue,"onUpdate:modelValue":e[15]||(e[15]=d=>a.formFilterValue=d)},null,8,["scheme","modelValue"])]),_:1},8,["visible"])])}const QJ=nt($J,[["render",KJ]]),jJ={class:"flex-1 min-w-0 flex flex-col overflow-auto"},JJ={class:"max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1"},eee={class:"flex items-center justify-between gap-4 px-4 mx-2 mt-4 shrink-0 nowrap bg-white rounded-xl border border-gray-200"},tee={class:"grid flex-grow w-full grid-cols-12 gap-4 p-[10px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},ree=nt({__name:"vs-editor",props:{prefix:String,customClass:{type:String,default:()=>"w-screen h-screen"}},setup(r){$u(r.prefix||"/api");const t=b.ref(""),n=b.ref(""),a=b.ref(null),i=b.ref(null),o=async()=>{if(!t.value){a.value=null;return}try{const u=await kt.get(`/bi-dashboard/${t.value}`);a.value=u}catch(u){console.error(u)}},s=b.computed(()=>{var u,c,f;return(f=Array.isArray((u=a.value)==null?void 0:u.widgets)?(c=a.value)==null?void 0:c.widgets:[])==null?void 0:f.find(h=>(h==null?void 0:h.name)===n.value)}),l=b.computed(()=>{var c,f,h,d,p;const u=[{label:"Дашборди",to:"/editor"}];if((c=a.value)!=null&&c.title||t.value?u.push({label:((f=a.value)==null?void 0:f.title)||t.value||"Редактор"}):u.push({label:"Редактор"}),n.value&&s.value){const v=((d=(h=s.value)==null?void 0:h.data)==null?void 0:d.title)||((p=s.value)==null?void 0:p.title)||n.value;u.push({label:v})}return u});return b.watch(t,(u,c)=>{var h,d,p;c&&(n.value="");const f=new URL(window.top.location.href);u?((h=f==null?void 0:f.searchParams)==null||h.set("dashboard",u),(p=(d=window.top)==null?void 0:d.history)==null||p.pushState({},"",f),o()):(f==null||f.searchParams.delete("dashboard"),f==null||f.searchParams.delete("widget"))}),b.onMounted(()=>{const u=new URLSearchParams(window.top.location.search);t.value=u.get("dashboard"),n.value=u.get("widget"),o()}),(u,c)=>{var f,h;return b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["flex w-full h-full",[r.customClass]])},[b.createElementVNode("div",jJ,[b.createElementVNode("div",JJ,[b.createElementVNode("div",eee,[b.createVNode(pb,{items:l.value},null,8,["items"]),b.createVNode(QJ,{selected:t.value,"onUpdate:selected":c[0]||(c[0]=d=>t.value=d),dashboardData:a.value,columns:(f=a.value)==null?void 0:f.columns,selectedWidgetData:s.value,prefix:r.prefix,onUpdateEditor:o},null,8,["selected","dashboardData","columns","selectedWidgetData","prefix"])]),n.value&&a.value?(b.openBlock(),b.createBlock(FJ,{key:0,"selected-widget":n.value,"onUpdate:selectedWidget":c[1]||(c[1]=d=>n.value=d),"selected-widget-data":s.value,"current-widget-data":i.value,"selected-dashboard":t.value,"dashboard-widgets":a.value.widgets||[],onUpdateData:o},null,8,["selected-widget","selected-widget-data","current-widget-data","selected-dashboard","dashboard-widgets"])):(b.openBlock(),b.createElementBlock(b.Fragment,{key:1},[b.createElementVNode("div",tee,[a.value?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:1},b.renderList(a.value.panels,(d,p)=>{var v;return b.openBlock(),b.createElementBlock("div",{key:p,class:b.normalizeClass([`col-span-${d.col||12}`,"flex flex-col gap-[10px]"])},[(v=d.widgets)!=null&&v.length?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(d.widgets,g=>(b.openBlock(),b.createBlock(Ns,{onClick:m=>n.value=g,"onUpdate:currentWidgetData":c[2]||(c[2]=m=>i.value=m),key:g,dashboard:t.value,widget:g,selectedWidget:n.value,"dashboard-widgets":a.value.widgets,class:b.normalizeClass({"border border-blue-500":n.value===g})},null,8,["onClick","dashboard","widget","selectedWidget","dashboard-widgets","class"]))),128)):(b.openBlock(),b.createBlock(Ns,{key:1,onClick:g=>n.value=d.widget,"onUpdate:currentWidgetData":c[3]||(c[3]=g=>i.value=g),class:b.normalizeClass(["flex flex-col",{"border border-blue-500":n.value===d.widget}]),dashboard:t.value,widget:d.widget,selectedWidget:n.value,"dashboard-widgets":a.value.widgets},null,8,["onClick","class","dashboard","widget","selectedWidget","dashboard-widgets"]))],2)}),128)):(b.openBlock(),b.createBlock(Hu,{key:0,class:"col-span-12"}))]),t.value?(b.openBlock(),b.createBlock(bO,{key:0,class:"bottom-[10px] left-[10px] absolute",columns:(h=a.value)==null?void 0:h.columns,selectedDashboard:t.value,onUpdateData:o},null,8,["columns","selectedDashboard"])):b.createCommentVNode("",!0)],64))])])],2)}}},[["__scopeId","data-v-2387f284"]]),nee={class:"pt-16 w-full h-screen"},aee={__name:"vs-editor-page",setup(r){return(e,t)=>(b.openBlock(),b.createElementBlock("div",nee,[b.createVNode(ree,{customClass:"h-full w-full"})]))}},iee={class:"p-4 h-full flex flex-col"},oee={class:"flex items-start justify-between mb-3"},see={class:"flex items-center space-x-2"},lee={class:"w-8 h-8 bg-blue-50 rounded-lg flex items-center justify-center"},uee={class:"flex-1"},cee={class:"font-semibold text-gray-900 group-hover:text-blue-600 transition-colors"},fee={key:0,class:"absolute right-0 top-full mt-1 py-1 w-40 bg-white border border-gray-200 rounded-lg shadow-lg z-10"},hee={class:"bg-gray-50 rounded-md h-32 mb-4 flex items-center justify-center"},dee={class:"flex items-center justify-between text-xs text-gray-500 mt-auto"},pee={class:"flex items-center space-x-1"},vee={__name:"dashboard-card",props:{title:String,description:String,modified:String,name:String,reserveLines:Number,dashboardRouteName:String},setup(r){const e=r,t=_b(),n=b.ref(!1);function a(){e.dashboardRouteName&&t.push(`/dashboards/${encodeURIComponent(e.dashboardRouteName)}`)}function i(){e.dashboardRouteName&&t.push({path:"/editor",query:{dashboard:e.dashboardRouteName}})}function o(s){s.target.closest(".relative")||(n.value=!1)}return b.onMounted(()=>document.addEventListener("click",o)),b.onUnmounted(()=>document.removeEventListener("click",o)),(s,l)=>(b.openBlock(),b.createElementBlock("div",{class:"bg-white rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer group relative h-full",onClick:i},[b.createElementVNode("div",iee,[b.createElementVNode("div",oee,[b.createElementVNode("div",see,[b.createElementVNode("div",lee,[b.createVNode(b.unref(ib),{size:24,class:"w-4 h-4 text-blue-600"})]),b.createElementVNode("div",uee,[b.createElementVNode("h3",cee,b.toDisplayString(r.title),1)])]),b.createElementVNode("div",{class:"relative",onClick:l[3]||(l[3]=b.withModifiers(()=>{},["stop"]))},[b.createElementVNode("button",{type:"button",class:b.normalizeClass(["p-1 hover:bg-gray-100 rounded opacity-0 group-hover:opacity-100 transition-opacity",{"opacity-100":n.value}]),onClick:l[0]||(l[0]=u=>n.value=!n.value)},[b.createVNode(b.unref(ob),{size:24,class:"w-4 h-4 text-gray-500"})],2),n.value?(b.openBlock(),b.createElementBlock("div",fee,[b.createElementVNode("button",{type:"button",class:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",onClick:l[1]||(l[1]=u=>{a(),n.value=!1})},[b.createVNode(b.unref(lb),{class:"w-4 h-4"}),l[4]||(l[4]=b.createTextVNode(" Переглянути "))]),b.createElementVNode("button",{type:"button",class:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",onClick:l[2]||(l[2]=u=>{i(),n.value=!1})},[b.createVNode(b.unref(ub),{class:"w-4 h-4"}),l[5]||(l[5]=b.createTextVNode(" Редагувати "))])])):b.createCommentVNode("",!0)])]),r.description?(b.openBlock(),b.createElementBlock("p",{key:0,class:b.normalizeClass(["text-sm text-gray-600 mb-4 line-clamp-2",r.reserveLines===2?"h-10":r.reserveLines===1?"h-5":"h-0"])},b.toDisplayString(r.description),3)):(b.openBlock(),b.createElementBlock("div",{key:1,class:b.normalizeClass(["mb-4",r.reserveLines===2?"h-10":r.reserveLines===1?"h-5":"h-0"])},null,2)),b.createElementVNode("div",hee,[b.createVNode(b.unref(ib),{size:24,class:"w-12 h-12 text-gray-300"})]),b.createElementVNode("div",dee,[b.createElementVNode("div",pee,[b.createVNode(b.unref(pR),{size:24,class:"w-3 h-3"}),b.createElementVNode("span",null,b.toDisplayString(r.modified),1)]),b.createElementVNode("span",null,b.toDisplayString(r.name),1)])])]))}},gee=[{type:"Text",key:"name",label:"Назва",validators:["required"],original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"title",label:"Заголовок",validators:["required"],original:{type:"Text",ua:"Титул",col:8}},{type:"Text",key:"description",label:"Опис",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"words",label:"Ключові слова",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],mee={class:"pt-16"},yee={class:"flex-1 bg-gray-50"},_ee={class:"max-w-7xl mx-auto px-6 py-8"},bee={class:"mb-6"},xee={class:"flex items-center justify-between mb-6"},wee={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},See={class:"flex items-center space-x-4"},Eee={class:"flex-1 relative"},Tee={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Cee=b.defineComponent({__name:"all-dashboards-page",setup(r){const e=b.ref([]),t=b.ref([]);_b();const n=b.ref(null),a=b.ref(!1),i=b.ref({});$u("/api");async function o(){try{const h=await kt.get("/bi-dashboard?type=db"),d=Array.isArray(h==null?void 0:h.rows)?h.rows:[];t.value=d,e.value=d.map(p=>({routeName:String(p.name??""),title:p.title??p.name??"Untitled",description:p.description??null,modified:"-",name:"-"}))}catch(h){console.error("Failed to load dashboards",h),t.value=[],e.value=[]}}async function s(){var d,p,v;const h=(p=(d=b.getCurrentInstance())==null?void 0:d.proxy)==null?void 0:p.$notify;try{await((v=n.value)==null?void 0:v.doValidation()),await kt.post("/bi-dashboard",i.value),a.value=!1,i.value={},h==null||h({type:"success",title:"Успішно!",message:"Дашборд створено успішно"}),await o()}catch{h==null||h({type:"error",title:"Помилка!",message:"При спробі створити дашборд виникла помилка"})}}b.onMounted(o);const l=b.ref(1),u=()=>{const h=window.innerWidth;l.value=h>=1024?3:h>=768?2:1};b.onMounted(()=>{u(),window.addEventListener("resize",u)}),b.onUnmounted(()=>{window.removeEventListener("resize",u)});const c=h=>h?h.trim().length>70?2:1:0,f=h=>{const d=l.value||1,v=Math.floor(h/d)*d,g=v+d,m=e.value.slice(v,g);let y=0;for(const _ of m){const x=c(_.description??null);if(x>y&&(y=x),y===2)break}return y};return b.ref("grid"),(h,d)=>{const p=b.resolveComponent("VsForm"),v=b.resolveComponent("VsDialog");return b.openBlock(),b.createElementBlock("div",mee,[b.createElementVNode("div",yee,[b.createElementVNode("div",_ee,[b.createElementVNode("div",bee,[b.createElementVNode("div",xee,[d[5]||(d[5]=b.createElementVNode("div",null,[b.createElementVNode("h1",{class:"text-2xl font-bold text-gray-900"},"Dashboards"),b.createElementVNode("p",{class:"text-sm text-gray-600 mt-1"}," Manage and view your analytics dashboards ")],-1)),b.createElementVNode("button",{type:"button",class:"flex items-center space-x-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",onClick:d[0]||(d[0]=g=>a.value=!0)},[b.createVNode(b.unref(cb),{size:24,class:"w-4 h-4"}),d[4]||(d[4]=b.createElementVNode("span",null,"New Dashboard",-1))])]),b.createVNode(v,{visible:a.value,"onUpdate:visible":d[3]||(d[3]=g=>a.value=g),title:"Створити дашборд"},{footer:b.withCtx(()=>[b.createElementVNode("div",wee,[b.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",onClick:d[2]||(d[2]=g=>a.value=!1)}," Скасувати "),b.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",onClick:s}," Зберегти ")])]),default:b.withCtx(()=>[b.createVNode(p,{ref_key:"createFormRef",ref:n,scheme:b.unref(gee),modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=g=>i.value=g)},null,8,["scheme","modelValue"])]),_:1},8,["visible"]),b.createElementVNode("div",See,[b.createElementVNode("div",Eee,[b.createVNode(b.unref(wR),{size:24,class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),d[6]||(d[6]=b.createElementVNode("input",{type:"text",placeholder:"Search dashboards...",class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",value:""},null,-1))])])]),b.createElementVNode("div",Tee,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(e.value,(g,m)=>(b.openBlock(),b.createElementBlock("div",{key:m,class:"cursor-pointer"},[b.createVNode(vee,{title:g.title,description:g.description,modified:g.modified,name:g.name,reserveLines:f(m),"dashboard-route-name":g.routeName},null,8,["title","description","modified","name","reserveLines","dashboard-route-name"])]))),128))])])])])}}}),Dee={__name:"editor-root-page",setup(r){const e=gO(),t=b.computed(()=>{const a=e.query.dashboard;return a==null?"":typeof a=="string"?a.trim():""}),n=b.computed(()=>t.value.length>0);return(a,i)=>n.value?(b.openBlock(),b.createBlock(aee,{key:`editor-${t.value}`})):(b.openBlock(),b.createBlock(Cee,{key:0}))}};function Gr(r,e){const t=r&&typeof r=="object"&&"value"in r?r.value:r;if(t==null)return"";const n=Number(t);return Number.isNaN(n)?String(t):new Intl.NumberFormat("en",e??{notation:"compact"}).format(n)}function Vu(r){if(!(r!=null&&r.includes("T")))return r??"";const[e,t,n]=r.split("T")[0].split("-");return`${n}.${t}.${e}`}function Aee(r){return Intl.NumberFormat("en").format(r??0)}class Mee{static getTooltipOptions(e=!0){return{show:e,axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}}}}const kee={show_label:!1,show_legend:!1,label:null,legend:{position:null},colors:null,color:null,title:null};function Nee(){const r="0123456789ABCDEF";let e="#";for(let t=0;t<6;t+=1)e+=r[Math.floor(Math.random()*16)];return e}function fo(r=kee){var t;const e={label:{show:r==null?void 0:r.show_label,formatter:(r==null?void 0:r.formatter)??(n=>Gr(n)),...(r==null?void 0:r.label)||{}},legend:{...(r==null?void 0:r.legend)||{},[((t=r==null?void 0:r.legend)==null?void 0:t.position)||"bottom"]:"0",show:(r==null?void 0:r.show_legend)||!1},barWidth:"70%",grid:{borderColor:"#e5e7eb"},title:{...(r==null?void 0:r.title)||{}}};return(r!=null&&r.colors||r!=null&&r.color)&&(e.color=(r==null?void 0:r.colors)||(r==null?void 0:r.color)||null),e}function W2(r){return{color:"#9ca3af",fontSize:10,fontFamily:"Inter, ui-sans-serif, system-ui",fontWeight:400,label:r==null?void 0:r.label,show:!0,formatter:(r==null?void 0:r.formatter)??(e=>Gr(e)),margin:(r==null?void 0:r.margin)??7,interval:(r==null?void 0:r.interval)??"auto",rotate:(r==null?void 0:r.rotate)??0}}const Y2=["#d3c7e6","#bedae3","#f8e9cb","#ff8c8c","#c5d8be","#ffc6c6","#ffc39a","#fff7c5","#d8ffc0","#d4f7ff"];class pd{static getLabelOptions(e={}){return{show:(e==null?void 0:e.show_label)||(e==null?void 0:e.show)||!1,fontSize:"10",position:(e==null?void 0:e.position)||"inside",formatter:(e==null?void 0:e.formatter)||"{d}%",...e}}static getLegendOpions(e={}){return{...e,position:(e==null?void 0:e.position)||"bottom"}}}const ur={props:["source","style","widget","dashboard","title","currentWidget","widgetData","prefix"],data(){return{sourceData:null,styleData:null,widgetName:"",dimensions:[],dashboardName:"",titleCharts:"",widgetInstance:null}},mounted(){window.addEventListener("resize",this.handleResize),window.addEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.addEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},unmounted(){window.removeEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.removeEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},watch:{sourceData:{async handler(){setTimeout(()=>{this==null||this.onChangedData()},0)}}},methods:{checkCustomStyleEvent(r){this.changeOptionsByName(r.chartId,r.options)},checkCustomEvent({filterUrl:r}){this.getDataFromURL(r)},handleResize(){this.widgetInstance&&this.widgetInstance.resize()},async getDataFromURL(r){var e;try{const t=await kt.get(r);this.sourceData=(t==null?void 0:t.source)||[],this.$emit("update:widgetData",t),this.dimensions=Object.keys(((e=this.sourceData)==null?void 0:e[0])||{}),this.titleCharts=this.style?this.style:(t==null?void 0:t.title)||"",this.styleData=(t==null?void 0:t.style)||{}}catch(t){const n={message:"Дані не знайдено",title:"Помилка!",type:"error",status:400,id:this.widgetName};(t==null?void 0:t.status)=="404"&&(n.status=404,n.message="Дані не знайдено"),(t==null?void 0:t.status)=="400"&&(n.message="Перевірте налаштування або зверніться до адміністратора"),(t==null?void 0:t.status)=="500"&&(n.message="Сталася помилка сервера"),this.$emit("update:widgetData",n)}},getValues(){return this.sourceData.map(r=>{var e;return parseFloat(r[(e=this.columns)==null?void 0:e[1]])})},formatDate(r){const e=new Date(r);if(isNaN(e))return r;const t=String(e.getDate()).padStart(2,"0"),a=["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"][e.getMonth()],i=e.getFullYear();return`${t} ${a} ${i}`},async getData(){var r;try{if(this.source)this.sourceData=[...this.source],this.styleData=this.style,this.titleCharts=this.title,this.dimensions=Object.keys(((r=this.sourceData)==null?void 0:r[0])||{});else{this.widgetName=this.widget,this.dashboardName=this.dashboard;const e=this.dashboardName?`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}`:`${this.prefix||""}/bi-data?&widget=${this.widgetName}`;await this.getDataFromURL(e)}}catch(e){console.error(e)}},async initChart(r,e,t){var n,a,i,o,s,l,u;this.widgetInstance&&this.widgetInstance.clear();try{const c=this.$refs.chart,f=$f(c),h={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"transparent",shadowColor:"transparent",padding:[0,0,0,0],borderWidth:0,formatter:d=>{var m;const p=(m=d[0])==null?void 0:m.axisValue;let g=`
|
|
250
|
+
<div style="background-color: rgba(255, 255, 255, 0.7)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
|
|
251
|
+
<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 px-2 py-1">
|
|
252
|
+
${p?this.formatDate(p):"N/A"}
|
|
253
|
+
</div>
|
|
254
|
+
`;return d.forEach(y=>{g+=`
|
|
255
|
+
<div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 dark:text-neutral-400">
|
|
256
|
+
<span class="flex items-center">
|
|
257
|
+
<span class="w-2.5 h-2.5 me-1.5 rounded-sm" style="background-color: ${y.color};"></span>
|
|
258
|
+
<span class="font-medium mr-[6px]">${(y==null?void 0:y.seriesName)==="metric"?"Значення":y==null?void 0:y.seriesName}</span>
|
|
259
|
+
</span>
|
|
260
|
+
<span>${this.getMetricValue(y==null?void 0:y.data)}</span>
|
|
261
|
+
</div>
|
|
262
|
+
`}),g+="</div>",g}},xAxis:{data:e!=null&&e.length?e:null,type:e?"category":"value",name:((a=(n=this.styleData)==null?void 0:n.x_axis)==null?void 0:a.name)||"",axisLabel:{...W2((i=this.styleData)==null?void 0:i.x_axis),formatter:d=>{var v,g;const p=this.formatDate(d);return((g=(v=this.styleData)==null?void 0:v.x_axis)==null?void 0:g.overflow)==="ellipsis"&&p.length>10?`${p.slice(0,10)}...`:p}}},yAxis:{data:t!=null&&t.length?t:null,type:t?"category":"value",name:((s=(o=this.styleData)==null?void 0:o.y_axis)==null?void 0:s.name)||"",axisLabel:W2((l=this.styleData)==null?void 0:l.y_axis)},series:r!=null&&r.length?r:null,...fo(this.styleData),grid:{bottom:"0%",right:"0%",left:"0%",top:"20px",containLabel:!0,...((u=this.styleData)==null?void 0:u.grid)||{}}};await f.setOption(h),f.resize(),this.widgetInstance=f,this.$emit("update:currentWidget",f)}catch(c){console.error(c)}},async setSeriesOption(r,e){const t=r.getOption(),{series:n=[]}=t,a=n.map(i=>({...i,...e}));r.setOption({...t,series:a})},async changeOptionsByName(r,e){const t=document.getElementById(r);if(!t)return null;const n=kg(t);if(!n)return null;const a=n.getOption();e.seriesOptions&&this.setSeriesOption(n,e.seriesOptions),n.setOption({...a,...e.options,tooltip:{...Mee.getTooltipOptions(e.options.tooltip.show)}})},async changeData(r){var e;try{let t=this.dashboard?`${this.prefix||""}/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`:`${this.prefix||""}/bi-data?&widget=${this.widget}`;(e=r==null?void 0:r.granularity)!=null&&e.length&&(t+=`&granularity=${r.granularity}`),r!=null&&r.metrics&&(t+=`&metrics=${r.metrics}`),this.getDataFromURL(t)}catch(t){console.error(t)}},async setFilter(r){const e=`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}${r||""}`;await this.getDataFromURL(e)},async changeStyle(r,e){this.styleData[r]=e,this.onChangedData()},getMetricValue(r){var n;const e=(r==null?void 0:r.metric)||r;return parseFloat(e)?(n=Gr(e,{notation:"standard"}))==null?void 0:n.replaceAll(","," "):e}}},Iee={name:"VsBar",mixins:[ur],data(){return{resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var e;this.getData(),this.onChangedData();const r=(e=this.$refs)==null?void 0:e.chart;r&&(this.resizeObserver=new ResizeObserver(()=>{var t;this.widgetInstance&&((t=this.widgetInstance)==null||t.resize())}),this.resizeObserver.observe(r))},unmounted(){this.resizeObserver.disconnect()},methods:{async onChangedData(){try{if(this.sourceData){await this.$nextTick();const{series:r,xs:e,ys:t}=this.prepareData();r&&(this==null||this.initChart(r,e,t))}}catch(r){console.error(r)}},prepareData(){var r,e,t,n,a,i;try{if(!((r=this.sourceData)!=null&&r.length))return{series:[],xs:[],ys:void 0};const o=Array.from(new Set(this.sourceData.filter(h=>h[this.dimensions[0]]).map(h=>h[this.dimensions[0]])));let s;this.dimensions[0].includes("date")?s=o.map(h=>Vu(h)):s=[...o];let l,u;((e=this.styleData)==null?void 0:e.horizontal)===!0?u=[...s]:l=[...s];const c=this.sourceData.filter(h=>parseFloat(h[this.dimensions[1]])&&h[this.dimensions[0]]).map(h=>parseFloat(h[this.dimensions[1]]));let f;return((t=this.styleData)==null?void 0:t.stack)!==!1?f=this.prepareStackData():((n=this.styleData)==null?void 0:n.negative_waterfall)===!0?f=this.prepareNegativeWaterfall():((a=this.styleData)==null?void 0:a.waterfall)===!0?f=this.prepareWaterfallData(c):((i=this.styleData)==null?void 0:i.accumulative)===!0?f=this.prepareAccumulative(c):f=this.dimensions.slice(1).map((d,p)=>({name:d,type:"bar",stack:`a${p}`,data:this.sourceData.filter(v=>parseFloat(v[d])&&d).map(v=>parseFloat(v[d]))})),{series:f,xs:l,ys:u}}catch(o){return console.error(o),{series:[],xs:[],ys:[]}}},prepareWaterfallData(r){let e=r.reduce((i,o)=>i+o,0);const t=[e,...r],n=t.map((i,o)=>{if(o===0)return 0;const s=e-i;return e-=i,s>=0?s:0});return[{type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},data:n,tooltip:{show:!1}},{name:this.title?this.title:this.dimensions[0],type:"bar",stack:"Total",data:t}]},prepareStackData(){return this.dimensions.slice(1).map(t=>({name:t,type:"bar",stack:"a",data:this.sourceData.filter(n=>parseFloat(n[t])&&t).map(n=>parseFloat(n[t]))}))},prepareNegativeWaterfall(){const r=this.sourceData.map(i=>Number.isNaN(i[this.dimensions[1]])?0:Number(i[this.dimensions[1]])),e=this.sourceData.map(i=>Number.isNaN(i[this.dimensions[2]])?0:Number(i[this.dimensions[2]]));let t=0;const n=r.map((i,o)=>{const s=t;return t+=Number.isNaN(i)?0:i,o===0&&(t-=Number.isNaN(e[o])?0:e[o]),t-=Number.isNaN(e[o+1])?0:e[o+1],s>=0?s:0});return[{type:"bar",stack:"a",itemStyle:{borderColor:"transparent",color:"transparent"},data:n,tooltip:{show:!1}},{name:this.dimensions[1],type:"bar",stack:"a",data:r},{name:this.dimensions[2],type:"bar",stack:"a",data:e}]},prepareAccumulative(r){let e=0;const t=r.map(a=>(e+=a,e));return[{name:this.titleCharts,type:"bar",stack:"Total",data:t}]}}},Lee=["id"];function Ree(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",{id:i.uniqueID,ref:"chart",class:"h-full w-full min-h-[200px]"},null,8,Lee)}const J_=nt(Iee,[["render",Ree]]),Oee=Object.freeze(Object.defineProperty({__proto__:null,default:J_},Symbol.toStringTag,{value:"Module"}));var Z2=(r=>(r.Dashboard="/dashboard",r.BiPlatform="/bi-platform",r.EditorBase="/editor",r.AllDashboards="/dashboards",r.DashboardByName="/dashboards/:name",r))(Z2||{}),q2;(r=>{(e=>{e.Bar="bar",e.ListBar="listbar",e.Number="number",e.Text="text",e.Pie="pie",e.Heatmap="heatmap",e.Calendar="calendar",e.Line="line",e.Stat="stat",e.Pivot="pivot",e.Funnel="funnel",e.Progress="progress"})(r.Types||(r.Types={}))})(q2||(q2={}));var X2=(r=>(r.AllDashboards="all-dashboards",r.BiPlatform="bi-platform",r.Dashboard="dashboard",r.Erobota="erobota",r.Datatest="datatest",r.Sourcedate="sourcedate",r.Widgetwidget="widgetwidget",r.Test="test",r.Demo="demo",r.Crm="crm",r.Editor="editor",r.Editordetails="editordetails",r.Dbtables="dbtables",r.Biviewer="biviewer",r.Biviewerinner="biviewerinner",r.Bieditor="bieditor",r.Bieditorinner="bieditorinner",r.Datasets="datasets",r))(X2||{});const Pee={name:"VsPie",props:["currentWidget"],mixins:[ur],data(){return{chartInstance:null,resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var t;await this.$nextTick(),await this.getData();const{series:r}=this.prepareData()||{};r&&this.initChart(r);const e=(t=this.$refs)==null?void 0:t.chart;e&&(this.resizeObserver=new ResizeObserver(()=>{this.chartInstance&&this.chartInstance.resize()}),this.resizeObserver.observe(e))},beforeUnmount(){var r;(r=this.resizeObserver)==null||r.disconnect()},methods:{onChangedData(){try{if(this.sourceData){const{series:r,xs:e,ys:t}=this.prepareData();r&&this.initChart(r,e,t)}}catch(r){console.error(r)}},buildTooltipForDonut(r,e){const{name:t,value:n,percent:a}=r;return`
|
|
263
|
+
<div style="background-color:${e[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
|
|
264
|
+
${t==null?void 0:t.replace("null","Не визначено")}: ${Gr(n)} (${a}%)
|
|
265
|
+
</div>`},prepareData(){var r,e,t,n,a,i;try{if(this.styleData=this.styleData||{},!((r=this.sourceData)!=null&&r.length))return console.warn("No source data available"),null;const o=Array.from(new Set((this.sourceData||[]).map(p=>p[this.dimensions[0]]))),s=Array.from(new Set((this.sourceData||[]).map(p=>p[this.dimensions[1]]))),l=parseInt((this.sourceData||[]).reduce((p,v)=>p+parseFloat((v==null?void 0:v.metric)||0),0),10),u=o.map((p,v)=>{const g=(s[v]/l*100).toFixed(2);return{name:`${p} (${g}%)`,value:s[v]}}),c=((e=this.styleData)==null?void 0:e.innerRadius)||"80%",f=((t=this.styleData)==null?void 0:t.outerRadius)||"100%",h=[c,f];return this.styleData.legend=pd.getLegendOpions({borderRadius:10,height:"100%",padding:10,bottom:"0",type:"scroll",itemWidth:14,itemHeight:14,formatter:p=>{var v;return(v=p==null?void 0:p.replace("null","Не визначено"))==null?void 0:v.replace("NaN","0.00")},...((n=this.styleData)==null?void 0:n.legend)||{}}),this.styleData.label=pd.getLabelOptions((a=this.styleData)==null?void 0:a.label),this.styleData.show_legend=((i=this.styleData)==null?void 0:i.show_legend)??!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:h,center:["50%","60%"],height:"75%",...fo(this.styleData),data:u}]}}catch(o){return console.error("Error in prepareData:",o),null}},async initChart(r){try{if(!r){console.warn("No series data available for chart initialization");return}const e=this.$refs.chart;if(!e){console.warn("Chart DOM element not found");return}this.chartInstance=$f(e);const t=parseInt((this.sourceData||[]).reduce((a,i)=>a+parseFloat((i==null?void 0:i.metric)||0),0),10),n={tooltip:{trigger:"item",formatter:a=>this.buildTooltipForDonut(a,[a.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:r,...fo(this.styleData||{}),title:{text:Gr(t),left:"center",top:"41%",textStyle:{color:"black",fontWeight:400,fontSize:"22px"}}};this.chartInstance.setOption(n),this.$emit("update:currentWidget",this.chartInstance),this.chartInstance.resize(),window.addEventListener("resize",()=>{var a;(a=this.chartInstance)==null||a.resize()})}catch(e){console.error("Error in initChart:",e)}}}},Bee=["id"];function Vee(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",{id:i.uniqueID,ref:"chart",class:"h-full min-h-[200px] flex items-center"},null,8,Bee)}const K2=nt(Pee,[["render",Vee]]),zee=Object.freeze(Object.defineProperty({__proto__:null,default:K2},Symbol.toStringTag,{value:"Module"})),Fee={name:"VsPie",props:["currentWidget"],mixins:[ur],data(){return{chartInstance:null,resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var t;await this.$nextTick(),await this.getData();const{series:r}=this.prepareData()||{};r&&this.initChart(r);const e=(t=this.$refs)==null?void 0:t.chart;e&&(this.resizeObserver=new ResizeObserver(()=>{this.chartInstance&&this.chartInstance.resize()}),this.resizeObserver.observe(e))},unmounted(){var r;(r=this.resizeObserver)==null||r.disconnect()},methods:{onChangedData(){try{if(this.sourceData){const{series:r,xs:e,ys:t}=this.prepareData();r&&this.initChart(r,e,t)}}catch(r){console.error(r)}},buildTooltipForDonut(r,e){const{name:t,value:n,percent:a}=r;return`
|
|
266
|
+
<div style="background-color:${e[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
|
|
267
|
+
${t==null?void 0:t.replace("null","Не визначено")}: ${Gr(n)} (${a}%)
|
|
268
|
+
</div>`},prepareData(){var r,e,t,n,a;try{this.styleData=this.styleData||{};const i=Array.from(new Set((this.sourceData||[]).map(d=>d[this.dimensions[0]]))),o=Array.from(new Set((this.sourceData||[]).map(d=>d[this.dimensions[1]]))),s=parseInt((this.sourceData||[]).reduce((d,p)=>d+parseFloat(p==null?void 0:p.metric),0),10),l=i.map((d,p)=>{const v=(o[p]/s*100).toFixed(2);return{name:`${d} (${v}%)`,value:o[p]}}),u=((r=this.styleData)==null?void 0:r.innerRadius)||"0%",c=((e=this.styleData)==null?void 0:e.outerRadius)||"100%",f=[u,c];return this.styleData.legend=pd.getLegendOpions({borderRadius:10,height:"100%",padding:10,type:"scroll",itemWidth:14,itemHeight:14,formatter:d=>d==null?void 0:d.replace("null","Не визначено"),textStyle:{fontSize:"14px"},...((t=this.styleData)==null?void 0:t.legend)||{}}),this.styleData.label=pd.getLabelOptions((n=this.styleData)==null?void 0:n.label),this.styleData.show_legend=((a=this.styleData)==null?void 0:a.show_legend)??!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:f,center:["50%","60%"],height:"75%",...fo(this.styleData),data:l}]}}catch(i){return console.error("Error in prepareData:",i),null}},async initChart(r){try{if(!r){console.warn("No series data available for chart initialization");return}const e=this.$refs.chart;if(!e){console.warn("Chart DOM element not found");return}this.chartInstance=$f(e);const t={tooltip:{trigger:"item",formatter:n=>this.buildTooltipForDonut(n,[n.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:r,...fo(this.styleData||{})};this.chartInstance.setOption(t),this.$emit("update:currentWidget",this.chartInstance),this.chartInstance.resize(),window.addEventListener("resize",()=>{var n;(n=this.chartInstance)==null||n.resize()})}catch(e){console.error("Error in initChart:",e)}}}},$ee=["id"];function Gee(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",{id:i.uniqueID,ref:"chart",class:"h-full min-h-[200px] flex items-center"},null,8,$ee)}const Q2=nt(Fee,[["render",Gee]]),Hee=Object.freeze(Object.defineProperty({__proto__:null,default:Q2},Symbol.toStringTag,{value:"Module"})),Uee={name:"VsLine",mixins:[ur],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:r,xs:e}=this.prepareData();r&&this.initChart(r,e)},methods:{onChangedData(){try{if(this.sourceData){const{series:r,xs:e,ys:t}=this.prepareData();r&&(this==null||this.initChart(r,e,t))}}catch(r){console.error(r)}},prepareData(){var r,e;try{const t=Array.from(new Set(this.sourceData.map(o=>o[this.dimensions[0]])));let n;this.dimensions[0].includes("date")?n=t.map(o=>Vu(o)):n=[...t];const a=this.sourceData.map(o=>parseFloat(o[this.dimensions[1]]));let i;return(r=this.styleData)!=null&&r.stack?i=this.dimensions.slice(1).map(s=>({name:s,type:"line",stack:"a",areaStyle:this.styleData.area?{}:null,data:this.sourceData.filter(l=>parseFloat(l[s])).map(l=>parseFloat(l[s]))})):i=[{name:this.title,type:"line",areaStyle:(e=this.styleData)!=null&&e.area?{}:null,data:a,stack:"a"}],{series:i,xs:n}}catch(t){return console.error(t),null}}}},Wee=["id"];function Yee(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",{id:a.uniqueID,ref:"chart",style:{height:"400px"}},null,8,Wee)}const j2=nt(Uee,[["render",Yee]]),Zee=Object.freeze(Object.defineProperty({__proto__:null,default:j2},Symbol.toStringTag,{value:"Module"})),qee={name:"VsStat",mixins:[ur],data(){return{restDimensions:[],sumValue:0,columns:null,showTooltip:-1}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){this.columns=Object.keys(this.sourceData[0]);const r=this.getValues();this.sumValue=r.reduce((e,t)=>e+t,0),this.sourceData.forEach((e,t)=>{e.color=t<Y2.length-1?Y2[t]:Nee()})},formattedValue(r){const e=parseFloat(r);return Gr(e)}}},Xee={class:"flex flex-col w-full h-full pt-[16px] rounded-xl"},Kee={class:"flex flex-col justify-between w-full h-full"},Qee={class:"w-full h-full pb-6 space-y-4"},jee={class:"flex w-full h-3 rounded-full gap-x-1 min-h-3 custom-x-scrollbar"},Jee=["onMouseover"],ete={key:0,class:"absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"},tte={class:"h-[calc(100%-20px)] w-full custom-scrollbar"},rte={class:"grid items-center justify-between grid-cols-2 py-2 gap-x-4"},nte={class:"flex items-center"},ate={class:"text-sm text-gray-800"},ite={class:"text-end"},ote={class:"text-sm text-gray-500"};function ste(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",Xee,[b.createElementVNode("div",Kee,[b.createElementVNode("div",Qee,[b.createElementVNode("div",jee,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.sourceData,(o,s)=>{var l,u,c,f;return b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap",`bg-[${o.color}]`]),style:b.normalizeStyle({width:`${parseFloat(o==null?void 0:o[(l=a.columns)==null?void 0:l[1]])/a.sumValue*100}%`}),role:"progressbar","aria-valuenow":"42","aria-valuemin":"0","aria-valuemax":"100",onMouseover:h=>a.showTooltip=s,onMouseleave:e[0]||(e[0]=h=>a.showTooltip=-1)},[a.showTooltip>-1?(b.openBlock(),b.createElementBlock("div",ete,b.toDisplayString(r.sourceData[a.showTooltip][a.columns[0]])+" "+b.toDisplayString((parseFloat((f=(u=r.sourceData)==null?void 0:u[a.showTooltip])==null?void 0:f[(c=a.columns)==null?void 0:c[1]])/a.sumValue*100).toFixed(2))+"% ",1)):b.createCommentVNode("",!0)],46,Jee)}),256))]),b.createElementVNode("ul",tte,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.sourceData,o=>{var s,l;return b.openBlock(),b.createElementBlock("li",rte,[b.createElementVNode("div",nte,[b.createElementVNode("span",{class:b.normalizeClass(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]",`bg-[${o.color}]`])},null,2),b.createElementVNode("span",ate,b.toDisplayString((o==null?void 0:o[(s=a.columns)==null?void 0:s[0]])||"Не визначено"),1)]),b.createElementVNode("div",ite,[b.createElementVNode("span",ote,b.toDisplayString(i.formattedValue(o==null?void 0:o[(l=a.columns)==null?void 0:l[1]])||"-"),1)])])}),256))])])])])}const J2=nt(qee,[["render",ste]]),lte=Object.freeze(Object.defineProperty({__proto__:null,default:J2},Symbol.toStringTag,{value:"Module"})),ute={name:"VsProgressBar",mixins:[ur],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){var e;this.columns=Object.keys((e=this.sourceData)==null?void 0:e[0])||null;const r=this.getValues();this.maxValue=Math.max(...r)},formattedValue(r){return Gr(r)}}},cte={key:0,class:"flex flex-col h-full pt-[16px] rounded-xl"},fte={class:"h-full pt-0 pb-6 space-y-4"},hte={class:"h-full space-y-4 custom-scrollbar"},dte={class:"flex items-center justify-between mr-2 gap-x-2"},pte={class:"grid items-center w-full grid-cols-2 gap-x-2"},vte={class:"text-sm text-gray-800"},gte={class:"flex justify-end",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100"},mte={class:"min-w-[60px] text-end"},yte={class:"text-sm text-gray-500"};function _te(r,e,t,n,a,i){return a.columns?(b.openBlock(),b.createElementBlock("div",cte,[b.createElementVNode("div",fte,[b.createElementVNode("ul",hte,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.sourceData,(o,s)=>(b.openBlock(),b.createElementBlock("li",dte,[b.createElementVNode("div",pte,[b.createElementVNode("span",vte,b.toDisplayString(o[a.columns[0]]),1),b.createElementVNode("div",gte,[b.createElementVNode("div",{class:"h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",style:b.normalizeStyle({width:`${parseFloat(o[a.columns[1]])/a.maxValue*100}%`})},null,4)])]),b.createElementVNode("div",mte,[b.createElementVNode("span",yte,b.toDisplayString(i.formattedValue(o[a.columns[1]])),1)])]))),256))])])])):b.createCommentVNode("",!0)}const eR=nt(ute,[["render",_te]]),bte=Object.freeze(Object.defineProperty({__proto__:null,default:eR},Symbol.toStringTag,{value:"Module"})),xte={name:"VsListbar",mixins:[ur],props:["source"],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch(r){console.error(r)}},prepareData(){var e,t,n;this.columns=Object.keys(((e=this.sourceData)==null?void 0:e[0])||{});const r=(t=this.sourceData)==null?void 0:t.map(a=>{var i;return a==null?void 0:a[(i=this.columns)==null?void 0:i[1]]});this.maxValue=Math.max(...r||[]),this.restDimensions=(n=this.columns)==null?void 0:n.filter((a,i)=>i!==0)},formattedValue(r){return Gr(r)},getWidth(r){return`${r/this.maxValue*100}%`}}},wte={class:"h-full pt-[20px] list-bar"},Ste={class:"space-y-2 custom-scrollbar h-full h-[calc(100%-20px)]"},Ete={class:"relative w-full truncate"},Tte={class:"relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800"},Cte={class:"text-[14px] text-gray-500"};function Dte(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",wte,[b.createElementVNode("ul",Ste,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.sourceData,(o,s)=>{var l,u,c;return b.openBlock(),b.createElementBlock("li",{key:s,class:"flex items-center justify-between w-full gap-x-2"},[b.createElementVNode("div",Ete,[b.createElementVNode("span",Tte,b.toDisplayString((o==null?void 0:o[(l=a.columns)==null?void 0:l[0]])||"Без категорії"),1),b.createElementVNode("div",{class:b.normalizeClass(["absolute inset-y-0 h-full rounded start-0",o!=null&&o[(u=a.columns)==null?void 0:u[0]]?"bg-indigo-100":"bg-gray-100"]),style:b.normalizeStyle({width:i.getWidth(o==null?void 0:o[(c=a.columns)==null?void 0:c[1]])})},null,6)]),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(a.restDimensions,(f,h)=>(b.openBlock(),b.createElementBlock("div",{key:h,class:"w-20 mr-2 text-end"},[b.createElementVNode("span",Cte,b.toDisplayString(i.formattedValue(o==null?void 0:o[f])),1)]))),128))])}),128))])])}const tR=nt(xte,[["render",Dte]]),Ate=Object.freeze(Object.defineProperty({__proto__:null,default:tR},Symbol.toStringTag,{value:"Module"})),Mte={name:"VsPivotTable",mixins:[ur],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const r=Array.from(new Set(this.sourceData.map(e=>e[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=r.map(e=>Vu(e)):this.xs=[...r],this.products=this.dimensions.filter((e,t)=>t!=0),this.values=this.products.map((e,t)=>({name:e,data:this.sourceData.filter(n=>parseFloat(n[e])).map(n=>Gr(parseFloat(n[e])))}))}catch(r){console.error(r)}}}},kte={class:"flex flex-col h-full p-5 space-y-4 rounded-xl custom-scrollbar"},Nte={class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 custom-scrollbar"},Ite={class:"inline-block min-w-full align-middle"},Lte={class:"min-w-full divide-y divide-gray-200"},Rte={class:"space-x-2"},Ote={scope:"col",class:"xl:min-w-[120px] min-w-48"},Pte={class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"},Bte={class:"divide-y divide-gray-200 text-[12px]"},Vte={class:"py-3 size-px whitespace-nowrap"},zte={class:"flex items-center gap-x-3"},Fte={class:"font-medium text-gray-800"},$te={class:"py-3 size-px whitespace-nowrap"},Gte={class:"text-gray-600"};function Hte(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",kte,[b.createElementVNode("div",Nte,[b.createElementVNode("div",Ite,[b.createElementVNode("table",Lte,[b.createElementVNode("thead",null,[b.createElementVNode("tr",Rte,[e[0]||(e[0]=b.createElementVNode("th",{scope:"col",class:"min-w-[200px]"},[b.createElementVNode("div",{class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"})],-1)),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(a.xs,o=>(b.openBlock(),b.createElementBlock("th",Ote,[b.createElementVNode("div",Pte,b.toDisplayString(o),1)]))),256))])]),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(a.values,o=>(b.openBlock(),b.createElementBlock("tbody",Bte,[b.createElementVNode("tr",null,[b.createElementVNode("td",Vte,[b.createElementVNode("div",zte,[b.createElementVNode("span",Fte,b.toDisplayString(o.name),1)])]),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(a.xs,(s,l)=>(b.openBlock(),b.createElementBlock("td",$te,[b.createElementVNode("span",Gte,b.toDisplayString(o.data[l]),1)]))),256))])]))),256))])])])])}const rR=nt(Mte,[["render",Hte]]),Ute=Object.freeze(Object.defineProperty({__proto__:null,default:rR},Symbol.toStringTag,{value:"Module"})),Wte={name:"VsNumber",mixins:[ur],data(){return{number:""}},computed:{formattedNumber(){return Aee(this.number)},prefix(){var r,e;return(r=this.styleData)!=null&&r.prefix?(e=this.styleData)==null?void 0:e.prefix:""}},watch:{sourceData:{async handler(){this.getNumber()},deep:!0}},async mounted(){await this.getData(),this.getNumber()},methods:{onChangedData(){try{this.sourceData&&this.getNumber()}catch(r){console.error(r)}},async getNumber(){var r,e;try{this.number=((e=this.sourceData[0])==null?void 0:e[Object.keys((r=this.sourceData)==null?void 0:r[0])])||0}catch(t){console.error(t)}}}},Yte={class:"text-lg lg:text-xl xl:text-2xl text-gray-800 h-[32px] flex items-center"};function Zte(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",Yte,b.toDisplayString(i.prefix)+b.toDisplayString(i.formattedNumber),1)}const qte=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Wte,[["render",Zte]])},Symbol.toStringTag,{value:"Module"})),Xte={name:"VsText",mixins:[ur],data(){return{markedText:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget;try{await this.getData(),this.markedText=qe(this.sourceData)}catch(r){console.error(r)}},methods:{onChangedData(){return null}}},Kte=["id"],Qte=["innerHTML"];function jte(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",{id:a.uniqueID,class:"relative select-auto h-full rounded-xl text-[12px] box-border bg-white custom-scrollbar text-widget"},[a.markedText?(b.openBlock(),b.createElementBlock("div",{key:0,innerHTML:a.markedText},null,8,Qte)):b.createCommentVNode("",!0)],8,Kte)}const Jte=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Xte,[["render",jte]])},Symbol.toStringTag,{value:"Module"})),ere={name:"VsFunnelBar",mixins:[ur],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:r}=this.prepareData();r&&this.initChart(r)},methods:{buildTooltipForDonut(r,e){const{name:t,value:n,percent:a}=r;return`
|
|
106
269
|
<div style="background-color:${e[0]};font-size: 12px; font-family: Helvetica, Arial, sans-serif;color:#ffff; padding:5px; border-radius:5px; ![box-shadow:none]">
|
|
107
|
-
${
|
|
108
|
-
</div>`},onChangedData(){try{if(this.sourceData){const{series:t,xs:e,ys:n}=this.prepareData();t&&(this==null||this.initChart(t,e,n))}}catch{}},prepareData(){try{const t=Array.from(new Set(this.sourceData.map(r=>r[this.dimensions[0]]))),e=Array.from(new Set(this.sourceData.map(r=>r[this.dimensions[1]]))),n=t.map((r,i)=>({name:r,value:e[i]}));return{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"funnel",...Z(this.styleData),data:n,height:"80%",emphasis:{label:{show:!1}}}]}}catch(t){console.error(t)}},async initChart(t){try{const e=this.$refs.chart,n=echarts.init(e),s={series:t,...Z(this.styleData),tooltip:{trigger:"item",formatter:r=>this.buildTooltipForDonut(r,[r.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[10,15],shadowColor:"transparent",backgroundColor:"transparent"},itemStyle:{height:"15px"},legend:{borderRadius:10,type:"scroll",itemWidth:14,itemHeight:14,...this.styleData.legend},labelLine:{show:!1},grid:{bottom:"0"}};n.setOption(s),n.resize(),window.addEventListener("resize",()=>{n.resize()})}catch(e){console.error(e)}}}},ha=["id"];function pa(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",{ref:"chart",id:r.uniqueID,class:"h-[90%] custom-scrollbar min-h-[200px]"},null,8,ha)}const ua=Object.freeze(Object.defineProperty({__proto__:null,default:E(da,[["render",pa]])},Symbol.toStringTag,{value:"Module"}));function fa(t){return[{type:"fill",paint:{"fill-color":t.color||"#ccc","fill-outline-color":t.color||"blue","fill-opacity":t.opacity||1}}]}function ma(t){return[{type:"line",paint:{"line-color":t.color||"#ccc","line-opacity":t.opacity||1}}]}function ga(t){return[{type:"circle",paint:{"circle-radius":t.radius||6,"circle-stroke-color":t.stroke||"#ccc","circle-stroke-width":t.width||1,"circle-color":t.color||"blue"}}]}function pn(t){if(!t)return null;const e=t.type||"point";return e==="polygon"?fa(t):e==="line"?ma(t):ga(t)}const Qe={data(){return{layerList:[],activeLayer:""}},computed:{interactiveSources(){return this.layerList.filter(t=>t==null?void 0:t.interactive).map(t=>t.id)}},methods:{moveLayer(t,e=this.map){e.getStyle().layers.forEach(n=>{n.id.match(t)&&e.moveLayer(n.id)})},async setVisible(t,e=!0,n=this.map){if(!t)return;const s=(t==null?void 0:t.id)||t,r=this.layerList.find(a=>a.id===t)||t;if(!(r!=null&&r.id))throw new Error("MixinError: Layer has no id");const i=n.getStyle().layers.filter(a=>a.id.match(s));i.forEach(a=>{n.setLayoutProperty(a.id,"visibility",e?"visible":"none")}),!i.length&&e&&await this.addLayer(r)},async addLayer(t,e=this==null?void 0:this.map){var r,i;const n=this.layerList.find(a=>a.id===t)||t;!this.map.getStyle()||this.map.getStyle().layers.find(a=>a.id===n.id)||(this.layerList.find(a=>a.id===n.id)||this.layerList.push(n),(n.service==="vtile"||n.service==="vector"||(r=n.url)!=null&&r.includes(".vmt"))&&this.addVtileLayer(n,e),n.service==="geojson"&&this.addGeoJsonLayer(n,e),((i=n.url)!=null&&i.includes(".png")||["tms","raster"].includes(n.service))&&await this.addRasterLayer(n,e))},async addRasterLayer(t,e=this==null?void 0:this.map){var n,s;e.getSource(t.id)||(await e.addSource(t.id,{type:"raster",tiles:[t==null?void 0:t.url],tileSize:256,...t!=null&&t.scheme?{scheme:t==null?void 0:t.scheme}:{}}),await e.addLayer({id:t.id,type:"raster",source:t.id,minzoom:0,maxzoom:(t==null?void 0:t.maxzoom)||22},t.basemap?(s=(n=this.map.getStyle().layers)==null?void 0:n[0])==null?void 0:s.id:null))},async addVtileLayer(t,e=this==null?void 0:this.map){var i;const n=["props","pointZoom"].filter(a=>t[a]).map(a=>`&${a}=${t[a]}`),s={type:"vector",tiles:[`${(i=t==null?void 0:t.url)!=null&&i.startsWith("http")?"":window.location.origin}${t==null?void 0:t.url}${n}`],minzoom:t.minzoom||3,maxzoom:t.maxzoom||24};e.addSource(t.id,s),(pn(t.style)||t.layers||[]).forEach((a,l)=>{const c={...a,id:`${t.id}-${l}`,source:t.id,"source-layer":a["source-layer"]||t.source||t.id,maxzoom:+a.maxzoom||24,minzoom:+a.minzoom||0};e.addLayer(c)})},async addGeoJsonLayer(t,e=this.map){var r;const n=t.data||((r=t==null?void 0:t.url)!=null&&r.startsWith("http")?"":window.location.origin)+t.url;e.addSource(t.id,{type:"geojson",data:n}),(pn(t.style)||t.layers||[]).forEach(i=>{const a={...i,source:t.id,id:i.id||t.id,maxzoom:+i.maxzoom||24,minzoom:+i.minzoom||0,type:i.type||"circle"};e.addLayer(a)})},setLayerData(t,e){this.layerList=this.layerList.map(n=>n.id===t?{...n,...e}:n)},async removeLayer(t,e=this.map){e.getSource(t)&&(await e.getStyle().layers.forEach(async n=>{n.source===t&&await e.removeLayer(n.id)}),await e.removeSource(t))},async setFilter(t,e){var r;const n=this.layerList.find(i=>i.id===t),s=await((r=this.map)==null?void 0:r.getSource(t));if(s&&n.service==="vtile"){await s.setTiles([`${window.location.origin}${n.url}${n.url.includes("?")?"&":"?"}filter=${e}${n.props?`&props=${n.props}`:""}`]);return}s&&n.service},async changeBaseLayer(t){const e=t!=null&&t.id?t:this.layerList.find(s=>s.id===t),{id:n}=e;if(n&&n!==this.activeLayer){if(this.activeLayer&&this.map.setLayoutProperty(this.activeLayer,"visibility","none"),this.activeLayer=n,this.map.getLayer(n)){this.map.setLayoutProperty(n,"visibility","visible");return}await this.addRasterLayer(e)}},async refreshLayer(t,e=this.map){await e.getStyle().layers.forEach(n=>{n.source===t&&e.removeLayer(n.id)}),await e.removeSource(t),this.setVisible(t)}}},ba={},ya={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-list-details"};function wa(t,e){return o.openBlock(),o.createElementBlock("svg",ya,e[0]||(e[0]=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M13 5h8"></path><path d="M13 9h5"></path><path d="M13 15h8"></path><path d="M13 19h5"></path><path d="M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"></path><path d="M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"></path>',7)]))}const Xe=E(ba,[["render",wa]]),xa={},ka={class:"shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _a(t,e){return o.openBlock(),o.createElementBlock("svg",ka,e[0]||(e[0]=[o.createElementVNode("path",{d:"M18 6 6 18"},null,-1),o.createElementVNode("path",{d:"m6 6 12 12"},null,-1)]))}const Ye=E(xa,[["render",_a]]),ve={pink:["#fde7e2","#feafbe","#fd58a4","#d7038e","#86007b"],blue:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],green:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],pink2:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],red:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],teal:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"]},Ea={components:{legendIcon:Xe,closeIcon:Ye},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:ve}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((t,e)=>t-e)},maxWidht(){var n;const t=((n=this.sizes)==null?void 0:n.length)-1;return this.calcSize(t)}},methods:{sizeClass(t){return this.resizeItem?`h-[${this.calcSize(t)}] w-[${this.calcSize(t)}] ${this.borderRadius}`:`h-[18px] w-[18px] ${this.borderRadius}`},calcSize(t){return`${10+t*2}px`},getOpacity(t){return(t+1)/this.sortedSizes.length}}},Sa={class:"w-full absolute max-w-[200px] bg-white border rounded-lg bottom-[10px] right-[50px]"},$a={class:"flex items-center justify-between border-b border-[#0000001A] px-2"},Ca={class:"w-full flex flex-col gap-[8px] px-2 py-2 max-h-[200px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},Ba={key:0,class:"flex flex-col w-full"},Da={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},Na={class:"flex flex-col gap-[6px]"},Va={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"},Ta={key:1,class:"flex flex-col w-full"},Ra={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},za={class:"flex flex-col gap-[6px]"},La={class:"flex flex-row items-center justify-start"},Oa={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"};function Aa(t,e,n,s,r,i){var c,h;const a=o.resolveComponent("legendIcon"),l=o.resolveComponent("closeIcon");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:"flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]",onClick:e[0]||(e[0]=d=>r.isOpenLegend=!r.isOpenLegend)},[o.createVNode(a)]),r.isOpenLegend?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:`#wrapper-${n.mapId}`},[o.createElementVNode("div",Sa,[o.createElementVNode("div",$a,[e[2]||(e[2]=o.createElementVNode("h3",{class:"text-[16px] font-normal text-black"},"Легенда",-1)),o.createElementVNode("button",{type:"button",class:"inline-flex items-center text-sm font-medium text-gray-500 rounded-lg gap-x-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500 dark:focus:text-blue-500",onClick:e[1]||(e[1]=d=>r.isOpenLegend=!1)},[o.createVNode(l,{class:"w-[20px]"})])]),o.createElementVNode("div",Ca,[(c=n.colors)!=null&&c.length?(o.openBlock(),o.createElementBlock("div",Ba,[n.colorTitle?(o.openBlock(),o.createElementBlock("h4",Da,o.toDisplayString(n.colorTitle),1)):o.createCommentVNode("",!0),o.createElementVNode("div",Na,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.colors,(d,p)=>(o.openBlock(),o.createElementBlock("div",{key:p,class:"flex items-center gap-[10px]"},[d.color?(o.openBlock(),o.createElementBlock("div",{key:0,class:"w-[12px] h-[12px] rounded-full",style:o.normalizeStyle({backgroundColor:d.color})},null,4)):o.createCommentVNode("",!0),o.createElementVNode("p",Va,o.toDisplayString(d.text||d.val),1)]))),128))])])):o.createCommentVNode("",!0),(h=n.sizes)!=null&&h.length?(o.openBlock(),o.createElementBlock("div",Ta,[t.sizeTitle?(o.openBlock(),o.createElementBlock("h4",Ra,o.toDisplayString(t.sizeTitle),1)):o.createCommentVNode("",!0),o.createElementVNode("div",za,[i.sortedSizes.length?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(i.sortedSizes,(d,p)=>{var m,g,u,b,y;return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",La,[o.createElementVNode("div",{class:o.normalizeClass([i.maxWidht?`w-[${i.maxWidht}]`:"","mr-[10px]"])},[o.createElementVNode("div",{class:o.normalizeClass(i.sizeClass(p)),style:o.normalizeStyle({backgroundColor:((g=(m=r.palette)==null?void 0:m[n.color])==null?void 0:g[p])||n.color})},null,6)],2),o.createElementVNode("p",Oa,o.toDisplayString(p===((u=i.sortedSizes)==null?void 0:u.length)-1?">"+d:p==((b=i.sortedSizes)==null?void 0:b.length)-1?">"+i.sortedSizes[((y=i.sortedSizes)==null?void 0:y.length)-1]:d+"-"+i.sortedSizes[p+1]),1)])])}),256)):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)])])],8,["to"])):o.createCommentVNode("",!0)],64)}const Fa=E(Ea,[["render",Aa]]),Ia={props:["map","coordinates"],data(){return{isMenuVisible:!1}},computed:{getCoordinates(){var e;return!(this!=null&&this.coordinates)||((e=this.coordinates)==null?void 0:e.length)!==2?"":(this==null?void 0:this.coordinates).slice().reverse().map(n=>Number(n).toFixed(5)).join(", ")}}},Ma={class:"map__settings"},Pa={ref:"attribution",class:"map__settings-attribution map__settings-item mt-[3px]"};function ja(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",Ma,[o.createElementVNode("div",Pa,[o.withDirectives(o.createElementVNode("div",{ref:"mouse",class:"map__settings-item",style:{"min-width":"115px"}},o.toDisplayString(i.getCoordinates),513),[[o.vShow,i.getCoordinates]])],512)])}const un=E(Ia,[["render",ja]]),Ua={mixins:[Qe],props:{map:{type:Object,default:()=>null}},data(){return{baseLayers:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png"},{id:"graymap",name:"Сіра карта",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/positron/ua/10/601/348.png"}]}},watch:{map(t){t&&t.on("load",this.handleMapLoad)}},created(){this.baseLayers.forEach(t=>{const e={...t,basemap:!0};this.layerList.push(e)})},methods:{handleMapLoad(){this.changeBaseLayer("graymap")},isLayerInFocus(t){return t.id===this.activeLayer}}},qa={class:"vs-map-slot-layers"},Ha=["onClick"],Wa=["src"];function Za(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",qa,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.baseLayers,a=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass(["vs-map-slot-layers__layer",{focused:i.isLayerInFocus(a)}]),onClick:l=>t.changeBaseLayer(a.id)},[o.createElementVNode("img",{src:a.image,class:"vs-map-slot-layers__image"},null,8,Wa)],10,Ha))),128))])}const fn=E(Ua,[["render",Za]]);function mn(t,e,n){if(t!==null)for(var s,r,i,a,l,c,h,d=0,p=0,m,g=t.type,u=g==="FeatureCollection",b=g==="Feature",y=u?t.features.length:1,_=0;_<y;_++){h=u?t.features[_].geometry:b?t.geometry:t,m=h?h.type==="GeometryCollection":!1,l=m?h.geometries.length:1;for(var x=0;x<l;x++){var w=0,N=0;if(a=m?h.geometries[x]:h,a!==null){c=a.coordinates;var $=a.type;switch(d=0,$){case null:break;case"Point":if(e(c,p,_,w,N)===!1)return!1;p++,w++;break;case"LineString":case"MultiPoint":for(s=0;s<c.length;s++){if(e(c[s],p,_,w,N)===!1)return!1;p++,$==="MultiPoint"&&w++}$==="LineString"&&w++;break;case"Polygon":case"MultiLineString":for(s=0;s<c.length;s++){for(r=0;r<c[s].length-d;r++){if(e(c[s][r],p,_,w,N)===!1)return!1;p++}$==="MultiLineString"&&w++,$==="Polygon"&&N++}$==="Polygon"&&w++;break;case"MultiPolygon":for(s=0;s<c.length;s++){for(N=0,r=0;r<c[s].length;r++){for(i=0;i<c[s][r].length-d;i++){if(e(c[s][r][i],p,_,w,N)===!1)return!1;p++}N++}w++}break;case"GeometryCollection":for(s=0;s<a.geometries.length;s++)if(mn(a.geometries[s],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ja(t,e={}){if(t.bbox!=null&&e.recompute!==!0)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return mn(t,s=>{n[0]>s[0]&&(n[0]=s[0]),n[1]>s[1]&&(n[1]=s[1]),n[2]<s[0]&&(n[2]=s[0]),n[3]<s[1]&&(n[3]=s[1])}),n}const Ga={},Ka={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-home"};function Qa(t,e){return o.openBlock(),o.createElementBlock("svg",Ka,e[0]||(e[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M5 12l-2 0l9 -9l9 9l-2 0"},null,-1),o.createElementVNode("path",{d:"M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"},null,-1),o.createElementVNode("path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"},null,-1)]))}const Xa={props:["bbox","map"],components:{homeIcon:E(Ga,[["render",Qa]])},methods:{setBounds(){const t={type:"Feature",geometry:this==null?void 0:this.bbox},e=Ja(t);this.map.fitBounds(e)}}},Ya={class:"z-100 flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]"};function va(t,e,n,s,r,i){const a=o.resolveComponent("homeIcon");return o.openBlock(),o.createElementBlock("div",Ya,[o.createVNode(a,{onClick:i.setBounds},null,8,["onClick"])])}const gn=E(Xa,[["render",va]]),el={},tl={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"#9E9E9E",stroke:"#9E9E9E","stroke-width":"2","stroke-linecap":"#9E9E9E","stroke-linejoin":"#9E9E9E"};function nl(t,e){return o.openBlock(),o.createElementBlock("svg",tl,e[0]||(e[0]=[o.createElementVNode("circle",{cx:"12",cy:"12",r:"1"},null,-1),o.createElementVNode("circle",{cx:"12",cy:"5",r:"1"},null,-1),o.createElementVNode("circle",{cx:"12",cy:"19",r:"1"},null,-1)]))}const sl={components:{legendIcon:Xe,menuIcon:E(el,[["render",nl]]),closeIcon:Ye},props:["source","count","total","mapId"],data(){return{isOpenLegend:!1,palette:["#69D2E7","yellow","#FE4365"]}},methods:{calcSize(t){return t/this.maxValue*100*50/100}},computed:{maxValue(){var t,e,n,s,r,i;return((t=this.sizes)==null?void 0:t[0])>((n=this.sizes)==null?void 0:n[((e=this.sizes)==null?void 0:e.length)-1])?(s=this.sizes)==null?void 0:s[0]:(i=this.sizes)==null?void 0:i[((r=this.sizes)==null?void 0:r.length)-1]}}},rl={class:"w-full h-[calc(100%-40px)] bg-white"},ol={class:"w-full flex flex-col gap-[8px] h-[250px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent text-xs"},il={class:"relative min-w-full bg-white text-[12px]"},al={class:"divide-gray-200 dark:divide-neutral-700"},ll={class:"px-2 py-1"},cl={class:"px-2 py-1"};function dl(t,e,n,s,r,i){return o.openBlock(),o.createElementBlock("div",rl,[o.createElementVNode("div",ol,[o.createElementVNode("table",il,[e[0]||(e[0]=o.createElementVNode("thead",{class:"sticky top-[-1px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},[o.createElementVNode("tr",null,[o.createElementVNode("th",{class:"px-2 py-1 text-start"},"Назва"),o.createElementVNode("th",{class:"px-2 py-1 text-start"},"Метрика")])],-1)),o.createElementVNode("tbody",al,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.source,a=>(o.openBlock(),o.createElementBlock("tr",{key:a.id,class:"border-b cursor-pointer hover:bg-gray-100 odd:bg-gray-50"},[o.createElementVNode("td",ll,o.toDisplayString(a.title||"—"),1),o.createElementVNode("td",cl,o.toDisplayString(a.metric),1)]))),128))])])])])}const bn=E(sl,[["render",dl]]),hl={mixins:[O,Qe,{components:{VsMapSetting:un,VsMapSlotLayers:fn,VsMapLegend:Fa,VsMapGoHome:gn,VsList:bn},data(){return{mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7"}},methods:{async createMap(){var e,n;const t={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new maplibregl.Map({container:this.mapId,style:t,center:[31,48.5],zoom:((n=(e=this.data)==null?void 0:e.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new maplibregl.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",s=>{this.moveMouseHadler(s)}),this.map.on("mouseout",()=>{var s;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(s=this.popup)==null||s.remove()})},getPopoverTitle(t){var e,n,s,r,i;return(n=(e=this.data)==null?void 0:e.colors)!=null&&n.find(a=>a.val===t)?(i=(r=(s=this.data)==null?void 0:s.colors)==null?void 0:r.find(a=>a.val===t))==null?void 0:i.text:t},moveMouseHadler(t){var e;try{const n=this.map.queryRenderedFeatures(t.point),s=((e=n[0])==null?void 0:e.properties)||{};if(!n.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg px-2 py-1">
|
|
109
|
-
${this.getPopoverTitle((
|
|
270
|
+
${Vu(t)}: ${Gr(n)} (${a}%)
|
|
271
|
+
</div>`},onChangedData(){try{if(this.sourceData){const{series:r,xs:e,ys:t}=this.prepareData();r&&(this==null||this.initChart(r,e,t))}}catch{}},prepareData(){try{const r=Array.from(new Set(this.sourceData.map(a=>a[this.dimensions[0]]))),e=Array.from(new Set(this.sourceData.map(a=>a[this.dimensions[1]]))),t=r.map((a,i)=>({name:a,value:e[i]}));return{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"funnel",...fo(this.styleData),data:t,height:"80%",emphasis:{label:{show:!1}}}]}}catch(r){console.error(r)}},async initChart(r){try{const e=this.$refs.chart,t=$f(e),n={series:r,...fo(this.styleData),tooltip:{trigger:"item",formatter:a=>this.buildTooltipForDonut(a,[a.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[10,15],shadowColor:"transparent",backgroundColor:"transparent"},itemStyle:{height:"15px"},legend:{borderRadius:10,type:"scroll",itemWidth:14,itemHeight:14,...this.styleData.legend},labelLine:{show:!1},grid:{bottom:"0"}};t.setOption(n),t.resize(),window.addEventListener("resize",()=>{t.resize()})}catch(e){console.error(e)}}}},tre=["id"];function rre(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",{ref:"chart",id:a.uniqueID,class:"h-[90%] custom-scrollbar min-h-[200px]"},null,8,tre)}const nre=Object.freeze(Object.defineProperty({__proto__:null,default:nt(ere,[["render",rre]])},Symbol.toStringTag,{value:"Module"}));function are(r){return[{type:"fill",paint:{"fill-color":r.color||"#ccc","fill-outline-color":r.color||"blue","fill-opacity":r.opacity||1}}]}function ire(r){return[{type:"line",paint:{"line-color":r.color||"#ccc","line-opacity":r.opacity||1}}]}function ore(r){return[{type:"circle",paint:{"circle-radius":r.radius||6,"circle-stroke-color":r.stroke||"#ccc","circle-stroke-width":r.width||1,"circle-color":r.color||"blue"}}]}function nR(r){if(!r)return null;const e=r.type||"point";return e==="polygon"?are(r):e==="line"?ire(r):ore(r)}const eb={data(){return{layerList:[],activeLayer:""}},computed:{interactiveSources(){return this.layerList.filter(r=>r==null?void 0:r.interactive).map(r=>r.id)}},methods:{moveLayer(r,e=this.map){e.getStyle().layers.forEach(t=>{t.id.match(r)&&e.moveLayer(t.id)})},async setVisible(r,e=!0,t=this.map){if(!r)return;const n=(r==null?void 0:r.id)||r,a=this.layerList.find(o=>o.id===r)||r;if(!(a!=null&&a.id))throw new Error("MixinError: Layer has no id");const i=t.getStyle().layers.filter(o=>o.id.match(n));i.forEach(o=>{t.setLayoutProperty(o.id,"visibility",e?"visible":"none")}),!i.length&&e&&await this.addLayer(a)},async addLayer(r,e=this==null?void 0:this.map){var a,i;const t=this.layerList.find(o=>o.id===r)||r;!this.map.getStyle()||this.map.getStyle().layers.find(o=>o.id===t.id)||(this.layerList.find(o=>o.id===t.id)||this.layerList.push(t),(t.service==="vtile"||t.service==="vector"||(a=t.url)!=null&&a.includes(".vmt"))&&this.addVtileLayer(t,e),t.service==="geojson"&&this.addGeoJsonLayer(t,e),((i=t.url)!=null&&i.includes(".png")||["tms","raster"].includes(t.service))&&await this.addRasterLayer(t,e))},async addRasterLayer(r,e=this==null?void 0:this.map){var t,n;e.getSource(r.id)||(await e.addSource(r.id,{type:"raster",tiles:[r==null?void 0:r.url],tileSize:256,...r!=null&&r.scheme?{scheme:r==null?void 0:r.scheme}:{}}),await e.addLayer({id:r.id,type:"raster",source:r.id,minzoom:0,maxzoom:(r==null?void 0:r.maxzoom)||22},r.basemap?(n=(t=this.map.getStyle().layers)==null?void 0:t[0])==null?void 0:n.id:null))},async addVtileLayer(r,e=this==null?void 0:this.map){var i;const t=["props","pointZoom"].filter(o=>r[o]).map(o=>`&${o}=${r[o]}`),n={type:"vector",tiles:[`${(i=r==null?void 0:r.url)!=null&&i.startsWith("http")?"":window.location.origin}${r==null?void 0:r.url}${t}`],minzoom:r.minzoom||3,maxzoom:r.maxzoom||24};e.addSource(r.id,n),(nR(r.style)||r.layers||[]).forEach((o,s)=>{const l={...o,id:`${r.id}-${s}`,source:r.id,"source-layer":o["source-layer"]||r.source||r.id,maxzoom:+o.maxzoom||24,minzoom:+o.minzoom||0};e.addLayer(l)})},async addGeoJsonLayer(r,e=this.map){var a;const t=r.data||((a=r==null?void 0:r.url)!=null&&a.startsWith("http")?"":window.location.origin)+r.url;e.addSource(r.id,{type:"geojson",data:t}),(nR(r.style)||r.layers||[]).forEach(i=>{const o={...i,source:r.id,id:i.id||r.id,maxzoom:+i.maxzoom||24,minzoom:+i.minzoom||0,type:i.type||"circle"};e.addLayer(o)})},setLayerData(r,e){this.layerList=this.layerList.map(t=>t.id===r?{...t,...e}:t)},async removeLayer(r,e=this.map){e.getSource(r)&&(await e.getStyle().layers.forEach(async t=>{t.source===r&&await e.removeLayer(t.id)}),await e.removeSource(r))},async setFilter(r,e){var a;const t=this.layerList.find(i=>i.id===r),n=await((a=this.map)==null?void 0:a.getSource(r));if(n&&t.service==="vtile"){await n.setTiles([`${window.location.origin}${t.url}${t.url.includes("?")?"&":"?"}filter=${e}${t.props?`&props=${t.props}`:""}`]);return}n&&t.service},async changeBaseLayer(r){const e=r!=null&&r.id?r:this.layerList.find(n=>n.id===r),{id:t}=e;if(t&&t!==this.activeLayer){if(this.activeLayer&&this.map.setLayoutProperty(this.activeLayer,"visibility","none"),this.activeLayer=t,this.map.getLayer(t)){this.map.setLayoutProperty(t,"visibility","visible");return}await this.addRasterLayer(e)}},async refreshLayer(r,e=this.map){await e.getStyle().layers.forEach(t=>{t.source===r&&e.removeLayer(t.id)}),await e.removeSource(r),this.setVisible(r)}}},sre="https://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.js",lre="https://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.css";let vd=null;function ure(r){return new Promise((e,t)=>{if(document.querySelector(`script[src="${r}"]`)){e();return}const n=document.createElement("script");n.src=r,n.onload=()=>e(),n.onerror=()=>t(new Error(`Failed to load ${r}`)),document.head.appendChild(n)})}function cre(r){return new Promise((e,t)=>{if(document.querySelector(`link[href="${r}"]`)){e();return}const n=document.createElement("link");n.rel="stylesheet",n.href=r,n.onload=()=>e(),n.onerror=()=>t(new Error(`Failed to load ${r}`)),document.head.appendChild(n)})}function aR(){return typeof window>"u"?Promise.resolve(null):window.maplibregl?Promise.resolve(window.maplibregl):vd||(vd=cre(lre).then(()=>ure(sre)).then(()=>window.maplibregl),vd)}const tb={__name:"legend",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(_R),b.mergeProps(e.$attrs,{size:24}),null,16))}},rb={pink:["#fde7e2","#feafbe","#fd58a4","#d7038e","#86007b"],blue:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],green:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],pink2:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],red:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],teal:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"]},fre={components:{legendIcon:tb,closeIcon:_d},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:rb}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((r,e)=>r-e)},maxWidht(){var t;const r=((t=this.sizes)==null?void 0:t.length)-1;return this.calcSize(r)}},methods:{sizeClass(r){return this.resizeItem?`h-[${this.calcSize(r)}] w-[${this.calcSize(r)}] ${this.borderRadius}`:`h-[18px] w-[18px] ${this.borderRadius}`},calcSize(r){return`${10+r*2}px`},getOpacity(r){return(r+1)/this.sortedSizes.length}}},hre={class:"w-full absolute max-w-[200px] bg-white border rounded-lg bottom-[10px] right-[50px]"},dre={class:"flex items-center justify-between border-b border-[#0000001A] px-2"},pre={class:"w-full flex flex-col gap-[8px] px-2 py-2 max-h-[200px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},vre={key:0,class:"flex flex-col w-full"},gre={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},mre={class:"flex flex-col gap-[6px]"},yre={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"},_re={key:1,class:"flex flex-col w-full"},bre={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},xre={class:"flex flex-col gap-[6px]"},wre={class:"flex flex-row items-center justify-start"},Sre={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"};function Ere(r,e,t,n,a,i){var l,u;const o=b.resolveComponent("legendIcon"),s=b.resolveComponent("closeIcon");return b.openBlock(),b.createElementBlock(b.Fragment,null,[b.createElementVNode("div",{class:"flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]",onClick:e[0]||(e[0]=c=>a.isOpenLegend=!a.isOpenLegend)},[b.createVNode(o)]),a.isOpenLegend?(b.openBlock(),b.createBlock(b.Teleport,{key:0,to:`#wrapper-${t.mapId}`},[b.createElementVNode("div",hre,[b.createElementVNode("div",dre,[e[2]||(e[2]=b.createElementVNode("h3",{class:"text-[16px] font-normal text-black"},"Легенда",-1)),b.createElementVNode("button",{type:"button",class:"inline-flex items-center text-sm font-medium text-gray-500 rounded-lg gap-x-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500 dark:focus:text-blue-500",onClick:e[1]||(e[1]=c=>a.isOpenLegend=!1)},[b.createVNode(s,{class:"w-[20px]"})])]),b.createElementVNode("div",pre,[(l=t.colors)!=null&&l.length?(b.openBlock(),b.createElementBlock("div",vre,[t.colorTitle?(b.openBlock(),b.createElementBlock("h4",gre,b.toDisplayString(t.colorTitle),1)):b.createCommentVNode("",!0),b.createElementVNode("div",mre,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(t.colors,(c,f)=>(b.openBlock(),b.createElementBlock("div",{key:f,class:"flex items-center gap-[10px]"},[c.color?(b.openBlock(),b.createElementBlock("div",{key:0,class:"w-[12px] h-[12px] rounded-full",style:b.normalizeStyle({backgroundColor:c.color})},null,4)):b.createCommentVNode("",!0),b.createElementVNode("p",yre,b.toDisplayString(c.text||c.val),1)]))),128))])])):b.createCommentVNode("",!0),(u=t.sizes)!=null&&u.length?(b.openBlock(),b.createElementBlock("div",_re,[r.sizeTitle?(b.openBlock(),b.createElementBlock("h4",bre,b.toDisplayString(r.sizeTitle),1)):b.createCommentVNode("",!0),b.createElementVNode("div",xre,[i.sortedSizes.length?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(i.sortedSizes,(c,f)=>{var h,d,p,v,g;return b.openBlock(),b.createElementBlock("div",null,[b.createElementVNode("div",wre,[b.createElementVNode("div",{class:b.normalizeClass([i.maxWidht?`w-[${i.maxWidht}]`:"","mr-[10px]"])},[b.createElementVNode("div",{class:b.normalizeClass(i.sizeClass(f)),style:b.normalizeStyle({backgroundColor:((d=(h=a.palette)==null?void 0:h[t.color])==null?void 0:d[f])||t.color})},null,6)],2),b.createElementVNode("p",Sre,b.toDisplayString(f===((p=i.sortedSizes)==null?void 0:p.length)-1?">"+c:f==((v=i.sortedSizes)==null?void 0:v.length)-1?">"+i.sortedSizes[((g=i.sortedSizes)==null?void 0:g.length)-1]:c+"-"+i.sortedSizes[f+1]),1)])])}),256)):b.createCommentVNode("",!0)])])):b.createCommentVNode("",!0)])])],8,["to"])):b.createCommentVNode("",!0)],64)}const Tre=nt(fre,[["render",Ere]]),Cre={props:["map","coordinates"],data(){return{isMenuVisible:!1}},computed:{getCoordinates(){var e;return!(this!=null&&this.coordinates)||((e=this.coordinates)==null?void 0:e.length)!==2?"":(this==null?void 0:this.coordinates).slice().reverse().map(t=>Number(t).toFixed(5)).join(", ")}}},Dre={class:"map__settings"},Are={ref:"attribution",class:"map__settings-attribution map__settings-item mt-[3px]"};function Mre(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",Dre,[b.createElementVNode("div",Are,[b.withDirectives(b.createElementVNode("div",{ref:"mouse",class:"map__settings-item",style:{"min-width":"115px"}},b.toDisplayString(i.getCoordinates),513),[[b.vShow,i.getCoordinates]])],512)])}const iR=nt(Cre,[["render",Mre]]),kre={mixins:[eb],props:{map:{type:Object,default:()=>null}},data(){return{baseLayers:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png"},{id:"graymap",name:"Сіра карта",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/positron/ua/10/601/348.png"}]}},watch:{map(r){r&&r.on("load",this.handleMapLoad)}},created(){this.baseLayers.forEach(r=>{const e={...r,basemap:!0};this.layerList.push(e)})},methods:{handleMapLoad(){this.changeBaseLayer("graymap")},isLayerInFocus(r){return r.id===this.activeLayer}}},Nre={class:"vs-map-slot-layers"},Ire=["onClick"],Lre=["src"];function Rre(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",Nre,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(a.baseLayers,o=>(b.openBlock(),b.createElementBlock("div",{key:o.id,class:b.normalizeClass(["vs-map-slot-layers__layer",{focused:i.isLayerInFocus(o)}]),onClick:s=>r.changeBaseLayer(o.id)},[b.createElementVNode("img",{src:o.image,class:"vs-map-slot-layers__image"},null,8,Lre)],10,Ire))),128))])}const oR=nt(kre,[["render",Rre]]);function sR(r,e,t){if(r!==null)for(var n,a,i,o,s,l,u,c=0,f=0,h,d=r.type,p=d==="FeatureCollection",v=d==="Feature",g=p?r.features.length:1,m=0;m<g;m++){u=p?r.features[m].geometry:v?r.geometry:r,h=u?u.type==="GeometryCollection":!1,s=h?u.geometries.length:1;for(var y=0;y<s;y++){var _=0,x=0;if(o=h?u.geometries[y]:u,o!==null){l=o.coordinates;var w=o.type;switch(c=0,w){case null:break;case"Point":if(e(l,f,m,_,x)===!1)return!1;f++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(e(l[n],f,m,_,x)===!1)return!1;f++,w==="MultiPoint"&&_++}w==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(a=0;a<l[n].length-c;a++){if(e(l[n][a],f,m,_,x)===!1)return!1;f++}w==="MultiLineString"&&_++,w==="Polygon"&&x++}w==="Polygon"&&_++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(x=0,a=0;a<l[n].length;a++){for(i=0;i<l[n][a].length-c;i++){if(e(l[n][a][i],f,m,_,x)===!1)return!1;f++}x++}_++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(sR(o.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ore(r,e={}){if(r.bbox!=null&&e.recompute!==!0)return r.bbox;const t=[1/0,1/0,-1/0,-1/0];return sR(r,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}const Pre={props:["bbox","map"],components:{homeIcon:{__name:"home",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(yR),b.mergeProps(e.$attrs,{size:24}),null,16))}}},methods:{setBounds(){const r={type:"Feature",geometry:this==null?void 0:this.bbox},e=Ore(r);this.map.fitBounds(e)}}},Bre={class:"z-100 flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]"};function Vre(r,e,t,n,a,i){const o=b.resolveComponent("homeIcon");return b.openBlock(),b.createElementBlock("div",Bre,[b.createVNode(o,{onClick:i.setBounds},null,8,["onClick"])])}const lR=nt(Pre,[["render",Vre]]),zre={components:{legendIcon:tb,menuIcon:{__name:"menu",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(mR),b.mergeProps(e.$attrs,{size:24}),null,16))}},closeIcon:_d},props:["source","count","total","mapId"],data(){return{isOpenLegend:!1,palette:["#69D2E7","yellow","#FE4365"]}},methods:{calcSize(r){return r/this.maxValue*100*50/100}},computed:{maxValue(){var r,e,t,n,a,i;return((r=this.sizes)==null?void 0:r[0])>((t=this.sizes)==null?void 0:t[((e=this.sizes)==null?void 0:e.length)-1])?(n=this.sizes)==null?void 0:n[0]:(i=this.sizes)==null?void 0:i[((a=this.sizes)==null?void 0:a.length)-1]}}},Fre={class:"w-full h-[calc(100%-40px)] bg-white"},$re={class:"w-full flex flex-col gap-[8px] h-[250px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent text-xs"},Gre={class:"relative min-w-full bg-white text-[12px]"},Hre={class:"divide-gray-200 dark:divide-neutral-700"},Ure={class:"px-2 py-1"},Wre={class:"px-2 py-1"};function Yre(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",Fre,[b.createElementVNode("div",$re,[b.createElementVNode("table",Gre,[e[0]||(e[0]=b.createElementVNode("thead",{class:"sticky top-[-1px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},[b.createElementVNode("tr",null,[b.createElementVNode("th",{class:"px-2 py-1 text-start"},"Назва"),b.createElementVNode("th",{class:"px-2 py-1 text-start"},"Метрика")])],-1)),b.createElementVNode("tbody",Hre,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(t.source,o=>(b.openBlock(),b.createElementBlock("tr",{key:o.id,class:"border-b cursor-pointer hover:bg-gray-100 odd:bg-gray-50"},[b.createElementVNode("td",Ure,b.toDisplayString(o.title||"—"),1),b.createElementVNode("td",Wre,b.toDisplayString(o.metric),1)]))),128))])])])])}const uR=nt(zre,[["render",Yre]]),Zre={mixins:[ur,eb,{components:{VsMapSetting:iR,VsMapSlotLayers:oR,VsMapLegend:Tre,VsMapGoHome:lR,VsList:uR},data(){return{mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7"}},methods:{async createMap(){var t,n;const r=await aR();if(!r)return;const e={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new r.Map({container:this.mapId,style:e,center:[31,48.5],zoom:((n=(t=this.data)==null?void 0:t.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new r.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",a=>{this.moveMouseHadler(a)}),this.map.on("mouseout",()=>{var a;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(a=this.popup)==null||a.remove()})},getPopoverTitle(r){var e,t,n,a,i;return(t=(e=this.data)==null?void 0:e.colors)!=null&&t.find(o=>o.val===r)?(i=(a=(n=this.data)==null?void 0:n.colors)==null?void 0:a.find(o=>o.val===r))==null?void 0:i.text:r},moveMouseHadler(r){var e;try{const t=this.map.queryRenderedFeatures(r.point),n=((e=t[0])==null?void 0:e.properties)||{};if(!t.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg px-2 py-1">
|
|
272
|
+
${this.getPopoverTitle((n==null?void 0:n.x)||(n==null?void 0:n.title)||(n==null?void 0:n.name))||""}
|
|
110
273
|
</div>
|
|
111
274
|
|
|
112
275
|
<div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 ">
|
|
113
276
|
<span class="flex items-center">
|
|
114
277
|
<span class="font-medium mr-[6px]">Значення</span>
|
|
115
278
|
</span>
|
|
116
|
-
<span>${(
|
|
117
|
-
</div>`;const r=this.map.project(t.lngLat);this.popupElement.style.left=`${r.x}px`,this.popupElement.style.top=`${r.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(n){console.error(n)}}}}],name:"VsMap",async mounted(){await this.getMapData(),await this.createMap()},methods:{async getMapData(){const e=await(await fetch(`/api/bi-map?widget=${this.widget}&dashboard=${this.dashboard}`)).json();this.data=e,this.$emit("update:widgetData",e),setTimeout(()=>{var n;return(n=this.map)==null?void 0:n.resize()})},async loadHandler(){const t=["#69D2E7","yellow","#FE4365"],e=this.data.colors?["match",["get","x"]].concat(this.data.colors.reduce((i,a,l)=>i.concat(a.val,(a==null?void 0:a.color)||t[l]),[])).concat(["gray"]):"blue",n=[5,7,9,11,13],s=this.data.sizes?["case"]:5;this.data.sizes&&(this.data.sizes.reverse().forEach((i,a)=>{s.push([">",["get","metric"],i]),s.push(n[a])}),s.push(5));const r={type:"circle",color:e,width:2,radius:s,stroke:"#eee"};Object.assign(r,this.data.style||{}),this.addVtileLayer({id:"bi",url:`${window.top.location.origin}/api/bi-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:r})}}},pl={class:"w-full h-full"},ul={class:"flex items-start justify-between mb-[6px] w-full"},fl={class:"text-gray-800 font-[600]"},ml=["id"],gl=["id"],bl={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"};function yl(t,e,n,s,r,i){var d,p,m;const a=o.resolveComponent("VsMapSetting"),l=o.resolveComponent("VsMapSlotLayers"),c=o.resolveComponent("VsMapLegend"),h=o.resolveComponent("VsMapGoHome");return o.openBlock(),o.createElementBlock("div",pl,[o.createElementVNode("div",ul,[o.createElementVNode("h5",fl,o.toDisplayString(t.title),1)]),o.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${t.mapId}`},[o.createElementVNode("div",{id:t.mapId,class:"w-full flex items-end relative h-full min-h-[250px]"},null,8,gl),t.showSetting?(o.openBlock(),o.createBlock(a,{key:0,map:t.map,coordinates:t.coordinatesByMouse},null,8,["map","coordinates"])):o.createCommentVNode("",!0),o.createVNode(l,{map:t.map},null,8,["map"]),o.createElementVNode("div",bl,[o.createVNode(c,{mapId:t.mapId,colors:(d=t.data)==null?void 0:d.colors,sizes:(p=t.data)==null?void 0:p.sizes,color:t.color,resizeItem:"true"},null,8,["mapId","colors","sizes","color"]),o.createVNode(h,{map:t.map,bbox:(m=t.data)==null?void 0:m.bounds},null,8,["map","bbox"])])],8,ml)])}const wl=Object.freeze(Object.defineProperty({__proto__:null,default:E(hl,[["render",yl]])},Symbol.toStringTag,{value:"Module"})),xl={components:{legendIcon:Xe,closeIcon:Ye},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:ve}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((t,e)=>t-e)},maxWidht(){var n;const t=((n=this.sizes)==null?void 0:n.length)-1;return this.calcSize(t)}},methods:{sizeClass(t){return this.resizeItem?`h-[${this.calcSize(t)}] w-[${this.calcSize(t)}] ${this.borderRadius}`:`h-[10px] ${this.borderRadius}`},calcSize(t){return`${10+t*2}px`},getOpacity(t){return(t+1)/this.sortedSizes.length}}},kl={key:0,class:"absolute flex items-end w-fit bottom-[10px] max-w-[80%] left-[50%] translate-x-[-50%] bg-[rgba(255,255,255,0.7)] p-[10px] rounded"},_l={class:"w-[80px] mr-[10px]"},El=["title"],Sl={class:"text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]"};function $l(t,e,n,s,r,i){var a;return(a=n.sizes)!=null&&a.length?(o.openBlock(),o.createElementBlock("div",kl,[o.createElementVNode("div",_l,[e[0]||(e[0]=o.createElementVNode("p",{class:"text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]"}," Дані відсутні ",-1)),o.createElementVNode("div",{class:o.normalizeClass([i.sizeClass(t.index),"w-full border border-gray-500"])},null,2)]),i.sortedSizes.length?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(i.sortedSizes,(l,c)=>{var h,d,p,m,g,u,b,y;return o.openBlock(),o.createElementBlock("div",{class:"w-[80px]",title:c===((h=i.sortedSizes)==null?void 0:h.length)-1?">"+l:c==((d=i.sortedSizes)==null?void 0:d.length)-1?">"+i.sortedSizes[((p=i.sortedSizes)==null?void 0:p.length)-1]:l+"-"+i.sortedSizes[c+1]},[o.createElementVNode("p",Sl,o.toDisplayString(c===((m=i.sortedSizes)==null?void 0:m.length)-1?">"+parseInt(l):c==((g=i.sortedSizes)==null?void 0:g.length)-1?">"+parseInt(i.sortedSizes[((u=i.sortedSizes)==null?void 0:u.length)-1]):parseInt(l)+"-"+parseInt(i.sortedSizes[c+1])),1),o.createElementVNode("div",{class:o.normalizeClass([i.sizeClass(c),"w-full border border-r-0 border-gray-500"]),style:o.normalizeStyle({backgroundColor:((y=(b=r.palette)==null?void 0:b[n.color])==null?void 0:y[c])||n.color})},null,6)],8,El)}),256)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}const Cl=E(xl,[["render",$l]]),Bl={},Dl={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map"};function Nl(t,e){return o.openBlock(),o.createElementBlock("svg",Dl,e[0]||(e[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13"},null,-1),o.createElementVNode("path",{d:"M9 4v13"},null,-1),o.createElementVNode("path",{d:"M15 7v13"},null,-1)]))}const Vl=E(Bl,[["render",Nl]]),Tl={},Rl={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-table"};function zl(t,e){return o.openBlock(),o.createElementBlock("svg",Rl,e[0]||(e[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null,-1),o.createElementVNode("path",{d:"M3 10h18"},null,-1),o.createElementVNode("path",{d:"M10 3v18"},null,-1)]))}const Ll=E(Tl,[["render",zl]]),Ol={},Al={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-align-box-left-stretch"};function Fl(t,e){return o.openBlock(),o.createElementBlock("svg",Al,e[0]||(e[0]=[o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"></path><path d="M9 17h-2"></path><path d="M13 12h-6"></path><path d="M11 7h-4"></path>',5)]))}const Il=E(Ol,[["render",Fl]]),Ml={mixins:[O,Qe],components:{VsMapSetting:un,VsClusterLegend:Cl,VsMapGoHome:gn,VsList:bn,VsMapSlotLayers:fn,VsBar:Pe},data(){return{baseColor:"pink",kattotg:"",options:[{id:"map",text:"Карта",component:Vl},{id:"table",text:"Таблиця",component:Ll},{id:"chart",text:"Віджет",component:Il}],activeTab:"map",mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7",label:"<div><icon-map/></div>"}},async mounted(){await this.getMapData(),await this.createMap()},watch:{kattotg(){this.loadHandler()}},methods:{async getMapData(){const t=await V.get(`/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`);this.data=t.data,this.$emit("update:widgetData",this.data),setTimeout(()=>{var e;return(e=this.map)==null?void 0:e.resize()})},async loadHandler(){var s,r,i,a;this.baseColor=((s=this.data.style)==null?void 0:s.color)||"blue";const t=["case"];(a=(i=(r=this.data)==null?void 0:r.sizes)==null?void 0:i.toReversed())==null||a.forEach((l,c)=>{var h,d;t.push([">",["get","metric"],l]),t.push((d=(h=ve[this.baseColor])==null?void 0:h.toReversed())==null?void 0:d[c]),c++}),t.push("gray");const e={type:"polygon",color:t,opacity:.4};Object.assign(e,this.data.style||{}),this.map.getSource("bi")||this.addVtileLayer({id:"bi",url:`${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:e}),this.map.getLayer("highlighted")&&this.map.removeLayer("highlighted"),this.map.getSource("highlighted")&&this.map.removeSource("highlighted");const n=["case"];this.kattotg&&n.push(["==",["to-string",["get","name"]],String(this.kattotg)],"red"),n.push("transparent"),this.map.addLayer({id:"highlighted",type:"fill",source:"bi","source-layer":"bi",paint:{"fill-color":n,"fill-opacity":.6}})},async createMap(){var e,n;const t={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new maplibregl.Map({container:this.mapId,style:t,center:[31,48.5],zoom:((n=(e=this.data)==null?void 0:e.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new maplibregl.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",s=>{this.moveMouseHadler(s)}),this.map.on("mouseout",()=>{var s;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(s=this.popup)==null||s.remove()})},moveMouseHadler(t){var e;try{const n=this.map.queryRenderedFeatures(t.point),s=((e=n[0])==null?void 0:e.properties)||{};if(!n.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="px-2 py-1 text-sm font-semibold text-gray-800 border-b border-gray-200 border-solid rounded-t-lg">
|
|
118
|
-
${(
|
|
279
|
+
<span>${(n==null?void 0:n.metric)||0}</span>
|
|
280
|
+
</div>`;const a=this.map.project(r.lngLat);this.popupElement.style.left=`${a.x}px`,this.popupElement.style.top=`${a.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(t){console.error(t)}}}}],name:"VsMap",async mounted(){await this.getMapData(),await this.createMap()},methods:{async getMapData(){const e=await(await fetch(`/api/bi-map?widget=${this.widget}&dashboard=${this.dashboard}`)).json();this.data=e,this.$emit("update:widgetData",e),setTimeout(()=>{var t;return(t=this.map)==null?void 0:t.resize()})},async loadHandler(){const r=["#69D2E7","yellow","#FE4365"],e=this.data.colors?["match",["get","x"]].concat(this.data.colors.reduce((i,o,s)=>i.concat(o.val,(o==null?void 0:o.color)||r[s]),[])).concat(["gray"]):"blue",t=[5,7,9,11,13],n=this.data.sizes?["case"]:5;this.data.sizes&&(this.data.sizes.reverse().forEach((i,o)=>{n.push([">",["get","metric"],i]),n.push(t[o])}),n.push(5));const a={type:"circle",color:e,width:2,radius:n,stroke:"#eee"};Object.assign(a,this.data.style||{}),this.addVtileLayer({id:"bi",url:`${window.top.location.origin}/api/bi-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:a})}}},qre={class:"w-full h-full"},Xre={class:"flex items-start justify-between mb-[6px] w-full"},Kre={class:"text-gray-800 font-[600]"},Qre=["id"],jre=["id"],Jre={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"};function ene(r,e,t,n,a,i){var c,f,h;const o=b.resolveComponent("VsMapSetting"),s=b.resolveComponent("VsMapSlotLayers"),l=b.resolveComponent("VsMapLegend"),u=b.resolveComponent("VsMapGoHome");return b.openBlock(),b.createElementBlock("div",qre,[b.createElementVNode("div",Xre,[b.createElementVNode("h5",Kre,b.toDisplayString(r.title),1)]),b.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${r.mapId}`},[b.createElementVNode("div",{id:r.mapId,class:"w-full flex items-end relative h-full min-h-[250px]"},null,8,jre),r.showSetting?(b.openBlock(),b.createBlock(o,{key:0,map:r.map,coordinates:r.coordinatesByMouse},null,8,["map","coordinates"])):b.createCommentVNode("",!0),b.createVNode(s,{map:r.map},null,8,["map"]),b.createElementVNode("div",Jre,[b.createVNode(l,{mapId:r.mapId,colors:(c=r.data)==null?void 0:c.colors,sizes:(f=r.data)==null?void 0:f.sizes,color:r.color,resizeItem:"true"},null,8,["mapId","colors","sizes","color"]),b.createVNode(u,{map:r.map,bbox:(h=r.data)==null?void 0:h.bounds},null,8,["map","bbox"])])],8,Qre)])}const tne=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Zre,[["render",ene]])},Symbol.toStringTag,{value:"Module"})),rne={components:{legendIcon:tb,closeIcon:_d},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:rb}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((r,e)=>r-e)},maxWidht(){var t;const r=((t=this.sizes)==null?void 0:t.length)-1;return this.calcSize(r)}},methods:{sizeClass(r){return this.resizeItem?`h-[${this.calcSize(r)}] w-[${this.calcSize(r)}] ${this.borderRadius}`:`h-[10px] ${this.borderRadius}`},calcSize(r){return`${10+r*2}px`},getOpacity(r){return(r+1)/this.sortedSizes.length}}},nne={key:0,class:"absolute flex items-end w-fit bottom-[10px] max-w-[80%] left-[50%] translate-x-[-50%] bg-[rgba(255,255,255,0.7)] p-[10px] rounded"},ane={class:"w-[80px] mr-[10px]"},ine=["title"],one={class:"text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]"};function sne(r,e,t,n,a,i){var o;return(o=t.sizes)!=null&&o.length?(b.openBlock(),b.createElementBlock("div",nne,[b.createElementVNode("div",ane,[e[0]||(e[0]=b.createElementVNode("p",{class:"text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]"}," Дані відсутні ",-1)),b.createElementVNode("div",{class:b.normalizeClass([i.sizeClass(r.index),"w-full border border-gray-500"])},null,2)]),i.sortedSizes.length?(b.openBlock(!0),b.createElementBlock(b.Fragment,{key:0},b.renderList(i.sortedSizes,(s,l)=>{var u,c,f,h,d,p,v,g;return b.openBlock(),b.createElementBlock("div",{class:"w-[80px]",title:l===((u=i.sortedSizes)==null?void 0:u.length)-1?">"+s:l==((c=i.sortedSizes)==null?void 0:c.length)-1?">"+i.sortedSizes[((f=i.sortedSizes)==null?void 0:f.length)-1]:s+"-"+i.sortedSizes[l+1]},[b.createElementVNode("p",one,b.toDisplayString(l===((h=i.sortedSizes)==null?void 0:h.length)-1?">"+parseInt(s):l==((d=i.sortedSizes)==null?void 0:d.length)-1?">"+parseInt(i.sortedSizes[((p=i.sortedSizes)==null?void 0:p.length)-1]):parseInt(s)+"-"+parseInt(i.sortedSizes[l+1])),1),b.createElementVNode("div",{class:b.normalizeClass([i.sizeClass(l),"w-full border border-r-0 border-gray-500"]),style:b.normalizeStyle({backgroundColor:((g=(v=a.palette)==null?void 0:v[t.color])==null?void 0:g[l])||t.color})},null,6)],8,ine)}),256)):b.createCommentVNode("",!0)])):b.createCommentVNode("",!0)}const lne=nt(rne,[["render",sne]]),une={__name:"icon-map",setup(r){return(e,t)=>(b.openBlock(),b.createBlock(b.unref(bR),b.mergeProps(e.$attrs,{size:24}),null,16))}},cne={mixins:[ur,eb],components:{VsMapSetting:iR,VsClusterLegend:lne,VsMapGoHome:lR,VsList:uR,VsMapSlotLayers:oR,VsBar:J_},data(){return{baseColor:"pink",kattotg:"",options:[{id:"map",text:"Карта",component:une},{id:"table",text:"Таблиця",component:c_},{id:"chart",text:"Віджет",component:U2}],activeTab:"map",mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7",label:"<div><icon-map/></div>"}},async mounted(){await this.getMapData(),await this.createMap()},watch:{kattotg(){this.loadHandler()}},methods:{async getMapData(){const r=await kt.get(`/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`);this.data=r,this.$emit("update:widgetData",this.data),setTimeout(()=>{var e;return(e=this.map)==null?void 0:e.resize()})},async loadHandler(){var n,a,i,o;this.baseColor=((n=this.data.style)==null?void 0:n.color)||"blue";const r=["case"];(o=(i=(a=this.data)==null?void 0:a.sizes)==null?void 0:i.toReversed())==null||o.forEach((s,l)=>{var u,c;r.push([">",["get","metric"],s]),r.push((c=(u=rb[this.baseColor])==null?void 0:u.toReversed())==null?void 0:c[l]),l++}),r.push("gray");const e={type:"polygon",color:r,opacity:.4};Object.assign(e,this.data.style||{}),this.map.getSource("bi")||this.addVtileLayer({id:"bi",url:`${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:e}),this.map.getLayer("highlighted")&&this.map.removeLayer("highlighted"),this.map.getSource("highlighted")&&this.map.removeSource("highlighted");const t=["case"];this.kattotg&&t.push(["==",["to-string",["get","name"]],String(this.kattotg)],"red"),t.push("transparent"),this.map.addLayer({id:"highlighted",type:"fill",source:"bi","source-layer":"bi",paint:{"fill-color":t,"fill-opacity":.6}})},async createMap(){var t,n;const r=await aR();if(!r)return;const e={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new r.Map({container:this.mapId,style:e,center:[31,48.5],zoom:((n=(t=this.data)==null?void 0:t.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new r.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",a=>{this.moveMouseHadler(a)}),this.map.on("mouseout",()=>{var a;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(a=this.popup)==null||a.remove()})},moveMouseHadler(r){var e;try{const t=this.map.queryRenderedFeatures(r.point),n=((e=t[0])==null?void 0:e.properties)||{};if(!t.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="px-2 py-1 text-sm font-semibold text-gray-800 border-b border-gray-200 border-solid rounded-t-lg">
|
|
281
|
+
${(n==null?void 0:n.x)||(n==null?void 0:n.title)||(n==null?void 0:n.name)||""}
|
|
119
282
|
</div>
|
|
120
283
|
|
|
121
284
|
<div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 ">
|
|
122
285
|
<span class="flex items-center">
|
|
123
286
|
<span class="font-medium mr-[6px]">Значення</span>
|
|
124
287
|
</span>
|
|
125
|
-
<span>${(
|
|
126
|
-
</div>`;const
|
|
288
|
+
<span>${(n==null?void 0:n.metric)||0}</span>
|
|
289
|
+
</div>`;const a=this.map.project(r.lngLat);this.popupElement.style.left=`${a.x}px`,this.popupElement.style.top=`${a.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(t){console.error(t)}}}},fne={class:"h-full"},hne={class:"flex items-start justify-between mb-[6px] w-full"},dne={class:"text-gray-800 font-[600]"},pne={class:"flex gap-2"},vne=["onClick"],gne=["id"],mne=["id"],yne={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"},_ne={class:"h-[calc(250px)]"};function bne(r,e,t,n,a,i){var h,d,p,v,g,m,y,_,x,w;const o=b.resolveComponent("VsMapSetting"),s=b.resolveComponent("VsMapSlotLayers"),l=b.resolveComponent("VsMapGoHome"),u=b.resolveComponent("VsClusterLegend"),c=b.resolveComponent("VsList"),f=b.resolveComponent("VsBar");return b.openBlock(),b.createElementBlock("div",fne,[b.createElementVNode("div",hne,[b.createElementVNode("h3",dne,b.toDisplayString(r.title),1),b.createElementVNode("div",pne,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(a.options,S=>(b.openBlock(),b.createElementBlock("button",{class:b.normalizeClass(["p-1 text-gray-700 border rounded",[a.activeTab===(S==null?void 0:S.id)?"ring-2 ring-blue-500":""]]),onClick:E=>a.activeTab=S==null?void 0:S.id},[(b.openBlock(),b.createBlock(b.resolveDynamicComponent(S==null?void 0:S.component),{height:"16",width:"16"}))],10,vne))),256))])]),b.withDirectives(b.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${a.mapId}`},[b.createElementVNode("div",{id:a.mapId,class:"h-full w-full flex items-end min-h-[250px]"},null,8,mne),a.showSetting?(b.openBlock(),b.createBlock(o,{key:0,map:a.map,coordinates:a.coordinatesByMouse},null,8,["map","coordinates"])):b.createCommentVNode("",!0),b.createVNode(s,{map:a.map},null,8,["map"]),b.createElementVNode("div",yne,[b.createVNode(l,{map:a.map,bbox:(h=a.data)==null?void 0:h.bounds},null,8,["map","bbox"])]),b.createVNode(u,{mapId:a.mapId,colors:(d=a.data)==null?void 0:d.colors,sizes:(p=a.data)==null?void 0:p.sizes,color:a.baseColor,changeOpacityItem:"true",cluster:"true"},null,8,["mapId","colors","sizes","color"])],8,gne),[[b.vShow,a.activeTab=="map"]]),b.withDirectives(b.createVNode(c,{mapId:a.mapId,source:(v=a.data)==null?void 0:v.rows,total:((g=a.data)==null?void 0:g.total)||0,count:((m=a.data)==null?void 0:m.count)||0,onKattotg:e[0]||(e[0]=S=>a.kattotg=S)},null,8,["mapId","source","total","count"]),[[b.vShow,a.activeTab=="table"]]),b.withDirectives(b.createElementVNode("div",_ne,[(_=(y=a.data)==null?void 0:y.rows)!=null&&_.length?(b.openBlock(),b.createBlock(f,{key:0,source:(w=(x=a.data)==null?void 0:x.rows)==null?void 0:w.map(S=>({title:S==null?void 0:S.title,metric:S==null?void 0:S.metric}))},null,8,["source"])):b.createCommentVNode("",!0)],512),[[b.vShow,a.activeTab=="chart"]])])}const xne=Object.freeze(Object.defineProperty({__proto__:null,default:nt(cne,[["render",bne]])},Symbol.toStringTag,{value:"Module"})),wne={name:"VsTable",mixins:[ur],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const r=Array.from(new Set(this.sourceData.map(e=>e[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=r.map(e=>Vu(e)):this.xs=[...r],this.products=this.dimensions.filter((e,t)=>t!=0),this.values=this.products.map((e,t)=>({name:e,data:this.sourceData.filter(n=>parseFloat(n[e])).map(n=>Gr(parseFloat(n[e])))}))}catch(r){console.error(r)}}}},Sne={class:"flex flex-col h-full pt-[16px] pb-[16px] space-y-4 rounded-xl"},Ene={class:"overflow-auto h-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300"},Tne={class:"inline-block min-w-full align-middle"},Cne={class:"relative min-w-full divide-y divide-gray-200 text-[12px]"},Dne={class:"sticky top-0 bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},Ane={class:"space-x-2"},Mne={scope:"col",class:"xl:min-w-[120px] min-w-48"},kne={class:"flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1"},Nne={class:"divide-y divide-gray-200"},Ine={class:"text-gray-600"};function Lne(r,e,t,n,a,i){return b.openBlock(),b.createElementBlock("div",Sne,[b.createElementVNode("div",Ene,[b.createElementVNode("div",Tne,[b.createElementVNode("table",Cne,[b.createElementVNode("thead",Dne,[b.createElementVNode("tr",Ane,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.dimensions,o=>(b.openBlock(),b.createElementBlock("th",Mne,[b.createElementVNode("div",kne,b.toDisplayString(o),1)]))),256))])]),b.createElementVNode("tbody",Nne,[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.sourceData,(o,s)=>(b.openBlock(),b.createElementBlock("tr",{key:s},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(r.dimensions,(l,u)=>(b.openBlock(),b.createElementBlock("td",{key:u,class:"py-3 whitespace-nowrap"},[b.createElementVNode("span",Ine,b.toDisplayString(o==null?void 0:o[l]),1)]))),128))]))),128))])])])])])}const Rne=Object.freeze(Object.defineProperty({__proto__:null,default:nt(wne,[["render",Lne]])},Symbol.toStringTag,{value:"Module"}));ot.EditorRootPage=Dee,ot.ROUTES_NAMES=X2,ot.Urls=Z2,ot.VsBar=J_,ot.VsDashboard=dO,ot.VsDonut=K2,ot.VsLine=j2,ot.VsListBar=tR,ot.VsPie=Q2,ot.VsPivotTable=rR,ot.VsProgressBar=eR,ot.VsStat=J2,ot.VsWidget=Ns,Object.defineProperty(ot,Symbol.toStringTag,{value:"Module"})});
|