157 lines
1.2 MiB
157 lines
1.2 MiB
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
var b5=Object.create;var mh=Object.defineProperty;var S5=Object.getOwnPropertyDescriptor;var w5=Object.getOwnPropertyNames;var T5=Object.getPrototypeOf,D5=Object.prototype.hasOwnProperty;var C5=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),WC=(r,e)=>{for(var t in e)mh(r,t,{get:e[t],enumerable:!0})},YC=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w5(e))!D5.call(r,i)&&i!==t&&mh(r,i,{get:()=>e[i],enumerable:!(a=S5(e,i))||a.enumerable});return r};var r0=(r,e,t)=>(t=r!=null?b5(T5(r)):{},YC(e||!r||!r.__esModule?mh(t,"default",{value:r,enumerable:!0}):t,r)),M5=r=>YC(mh({},"__esModule",{value:!0}),r);var c0=C5(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});var Ie=require("obsidian"),a0="YYYY-MM-DD",i0="gggg-[W]ww",XC="YYYY-MM",qC="YYYY-[Q]Q",jC="YYYY";function kc(r){var t,a;let e=window.app.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t[r])==null?void 0:a.enabled)}function Rc(){var r,e,t,a;try{let{internalPlugins:i,plugins:n}=window.app;if(kc("daily")){let{format:u,folder:c,template:f}=((e=(r=n.getPlugin("periodic-notes"))==null?void 0:r.settings)==null?void 0:e.daily)||{};return{format:u||a0,folder:(c==null?void 0:c.trim())||"",template:(f==null?void 0:f.trim())||""}}let{folder:o,format:s,template:l}=((a=(t=i.getPluginById("daily-notes"))==null?void 0:t.instance)==null?void 0:a.options)||{};return{format:s||a0,folder:(o==null?void 0:o.trim())||"",template:(l==null?void 0:l.trim())||""}}catch(i){console.info("No custom daily note settings found!",i)}}function Nc(){var r,e,t,a,i,n,o;try{let s=window.app.plugins,l=(r=s.getPlugin("calendar"))==null?void 0:r.options,u=(t=(e=s.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.weekly;if(kc("weekly"))return{format:u.format||i0,folder:((a=u.folder)==null?void 0:a.trim())||"",template:((i=u.template)==null?void 0:i.trim())||""};let c=l||{};return{format:c.weeklyNoteFormat||i0,folder:((n=c.weeklyNoteFolder)==null?void 0:n.trim())||"",template:((o=c.weeklyNoteTemplate)==null?void 0:o.trim())||""}}catch(s){console.info("No custom weekly note settings found!",s)}}function Oc(){var e,t,a,i;let r=window.app.plugins;try{let n=kc("monthly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.monthly)||{};return{format:n.format||XC,folder:((a=n.folder)==null?void 0:a.trim())||"",template:((i=n.template)==null?void 0:i.trim())||""}}catch(n){console.info("No custom monthly note settings found!",n)}}function zc(){var e,t,a,i;let r=window.app.plugins;try{let n=kc("quarterly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.quarterly)||{};return{format:n.format||qC,folder:((a=n.folder)==null?void 0:a.trim())||"",template:((i=n.template)==null?void 0:i.trim())||""}}catch(n){console.info("No custom quarterly note settings found!",n)}}function Vc(){var e,t,a,i;let r=window.app.plugins;try{let n=kc("yearly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.yearly)||{};return{format:n.format||jC,folder:((a=n.folder)==null?void 0:a.trim())||"",template:((i=n.template)==null?void 0:i.trim())||""}}catch(n){console.info("No custom yearly note settings found!",n)}}function $C(...r){let e=[];for(let a=0,i=r.length;a<i;a++)e=e.concat(r[a].split("/"));let t=[];for(let a=0,i=e.length;a<i;a++){let n=e[a];!n||n==="."||t.push(n)}return e[0]===""&&t.unshift(""),t.join("/")}function L5(r){let e=r.substring(r.lastIndexOf("/")+1);return e.lastIndexOf(".")!=-1&&(e=e.substring(0,e.lastIndexOf("."))),e}async function I5(r){let e=r.replace(/\\/g,"/").split("/");if(e.pop(),e.length){let t=$C(...e);window.app.vault.getAbstractFileByPath(t)||await window.app.vault.createFolder(t)}}async function Bc(r,e){e.endsWith(".md")||(e+=".md");let t=Ie.normalizePath($C(r,e));return await I5(t),t}async function Fl(r){let{metadataCache:e,vault:t}=window.app,a=Ie.normalizePath(r);if(a==="/")return Promise.resolve(["",null]);try{let i=e.getFirstLinkpathDest(a,""),n=await t.cachedRead(i),o=window.app.foldManager.load(i);return[n,o]}catch(i){return console.error(`Failed to read the daily note template '${a}'`,i),new Ie.Notice("Failed to read the daily note template"),["",null]}}function ci(r,e="day"){let t=r.clone().startOf(e).format();return`${e}-${t}`}function KC(r){return r.replace(/\[[^\]]*\]/g,"")}function P5(r,e){if(e==="week"){let t=KC(r);return/w{1,2}/i.test(t)&&(/M{1,4}/.test(t)||/D{1,4}/.test(t))}return!1}function Hl(r,e){return JC(r.basename,e)}function k5(r,e){return JC(L5(r),e)}function JC(r,e){let a={day:Rc,week:Nc,month:Oc,quarter:zc,year:Vc}[e]().format.split("/").pop(),i=window.moment(r,a,!0);if(!i.isValid())return null;if(P5(a,e)&&e==="week"){let n=KC(a);if(/w{1,2}/i.test(n))return window.moment(r,a.replace(/M{1,4}/g,"").replace(/D{1,4}/g,""),!1)}return i}var n0=class extends Error{};async function QC(r){let e=window.app,{vault:t}=e,a=window.moment,{template:i,format:n,folder:o}=Rc(),[s,l]=await Fl(i),u=r.format(n),c=await Bc(o,u);try{let f=await t.create(c,s.replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,a().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(p,h,d,v,m,g)=>{let y=a(),x=r.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return d&&x.add(parseInt(v,10),m),g?x.format(g.substring(1).trim()):x.format(n)}).replace(/{{\s*yesterday\s*}}/gi,r.clone().subtract(1,"day").format(n)).replace(/{{\s*tomorrow\s*}}/gi,r.clone().add(1,"d").format(n)));return e.foldManager.save(f,l),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Ie.Notice("Unable to create new file.")}}function R5(r,e){var t;return(t=e[ci(r,"day")])!=null?t:null}function N5(){let{vault:r}=window.app,{folder:e}=Rc(),t=r.getAbstractFileByPath(Ie.normalizePath(e));if(!t)throw new n0("Failed to find daily notes folder");let a={};return Ie.Vault.recurseChildren(t,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"day");if(n){let o=ci(n,"day");a[o]=i}}}),a}var o0=class extends Error{};function O5(){let{moment:r}=window,e=r.localeData()._week.dow,t=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;e;)t.push(t.shift()),e--;return t}function z5(r){return O5().indexOf(r.toLowerCase())}async function tM(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=Nc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*title\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(c,f,p)=>{let h=z5(f);return r.weekday(h).format(p.trim())}));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function V5(r,e){var t;return(t=e[ci(r,"week")])!=null?t:null}function B5(){let r={};if(!rM())return r;let{vault:e}=window.app,{folder:t}=Nc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new o0("Failed to find weekly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"week");if(n){let o=ci(n,"week");r[o]=i}}}),r}var s0=class extends Error{};async function eM(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=Oc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function U5(r,e){var t;return(t=e[ci(r,"month")])!=null?t:null}function F5(){let r={};if(!aM())return r;let{vault:e}=window.app,{folder:t}=Oc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new s0("Failed to find monthly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"month");if(n){let o=ci(n,"month");r[o]=i}}}),r}var l0=class extends Error{};async function H5(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=zc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function G5(r,e){var t;return(t=e[ci(r,"quarter")])!=null?t:null}function W5(){let r={};if(!iM())return r;let{vault:e}=window.app,{folder:t}=zc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new l0("Failed to find quarterly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"quarter");if(n){let o=ci(n,"quarter");r[o]=i}}}),r}var u0=class extends Error{};async function Y5(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=Vc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function Z5(r,e){var t;return(t=e[ci(r,"year")])!=null?t:null}function X5(){let r={};if(!nM())return r;let{vault:e}=window.app,{folder:t}=Vc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new u0("Failed to find yearly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"year");if(n){let o=ci(n,"year");r[o]=i}}}),r}function q5(){var a,i;let{app:r}=window,e=r.internalPlugins.plugins["daily-notes"];if(e&&e.enabled)return!0;let t=r.plugins.getPlugin("periodic-notes");return t&&((i=(a=t.settings)==null?void 0:a.daily)==null?void 0:i.enabled)}function rM(){var t,a;let{app:r}=window;if(r.plugins.getPlugin("calendar"))return!0;let e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.weekly)==null?void 0:a.enabled)}function aM(){var t,a;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.monthly)==null?void 0:a.enabled)}function iM(){var t,a;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.quarterly)==null?void 0:a.enabled)}function nM(){var t,a;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.yearly)==null?void 0:a.enabled)}function j5(r){let e={day:Rc,week:Nc,month:Oc,quarter:zc,year:Vc}[r];return e()}function $5(r,e){return{day:QC,month:eM,week:tM}[r](e)}Xt.DEFAULT_DAILY_NOTE_FORMAT=a0;Xt.DEFAULT_MONTHLY_NOTE_FORMAT=XC;Xt.DEFAULT_QUARTERLY_NOTE_FORMAT=qC;Xt.DEFAULT_WEEKLY_NOTE_FORMAT=i0;Xt.DEFAULT_YEARLY_NOTE_FORMAT=jC;Xt.appHasDailyNotesPluginLoaded=q5;Xt.appHasMonthlyNotesPluginLoaded=aM;Xt.appHasQuarterlyNotesPluginLoaded=iM;Xt.appHasWeeklyNotesPluginLoaded=rM;Xt.appHasYearlyNotesPluginLoaded=nM;Xt.createDailyNote=QC;Xt.createMonthlyNote=eM;Xt.createPeriodicNote=$5;Xt.createQuarterlyNote=H5;Xt.createWeeklyNote=tM;Xt.createYearlyNote=Y5;Xt.getAllDailyNotes=N5;Xt.getAllMonthlyNotes=F5;Xt.getAllQuarterlyNotes=W5;Xt.getAllWeeklyNotes=B5;Xt.getAllYearlyNotes=X5;Xt.getDailyNote=R5;Xt.getDailyNoteSettings=Rc;Xt.getDateFromFile=Hl;Xt.getDateFromPath=k5;Xt.getDateUID=ci;Xt.getMonthlyNote=U5;Xt.getMonthlyNoteSettings=Oc;Xt.getPeriodicNoteSettings=j5;Xt.getQuarterlyNote=G5;Xt.getQuarterlyNoteSettings=zc;Xt.getTemplateInfo=Fl;Xt.getWeeklyNote=V5;Xt.getWeeklyNoteSettings=Nc;Xt.getYearlyNote=Z5;Xt.getYearlyNoteSettings=Vc});var Tat={};WC(Tat,{default:()=>t0});module.exports=M5(Tat);var _5=require("obsidian");var E5=[],A5=[],ZC={license:{key:""},scheduleTitle:"# \u65E5\u7A0B",habitTitle:"# \u6253\u5361",journalTitle:"# \u65E5\u5FD7",dayStartHour:8,grayOutCompleted:!0,customTags:E5,habitItems:A5,dragSnapMode:"precise",showOnlyLeafTag:!1,cardStyle:"colorful",statsEnabled:!0,habitsEnabled:!0,eventsEnabled:!0,journalEnabled:!0,floatingTimerEnabled:!0,floatingTimerAudioEnabled:!0,floatingTimerExpandRadius:140,settingsTab:"basic"};var br=require("obsidian"),pi=r0(c0());function ne(r){let e=r.getFullYear(),t=(r.getMonth()+1).toString().padStart(2,"0"),a=r.getDate().toString().padStart(2,"0");return`${e}-${t}-${a}`}function fi(r){let e=r.getDay(),t=e===0?-6:1-e,a=new Date(r);return a.setDate(r.getDate()+t),a.setHours(0,0,0,0),a}function xe(r){let[e,t]=r.split(":").map(Number);return e*60+t}function _r(r){if(r>=1440)return"23:59";r<0&&(r=0);let e=Math.floor(r/60),t=Math.round(r%60);return`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`}function Gl(r){let e=r.getFullYear(),t=r.getMonth(),a=new Date(e,t,1),i=new Date(e,t+1,0),n=(a.getDay()+6)%7,o=i.getDate(),s=[],l=new Date(e,t,0).getDate();for(let c=0;c<n;c++)s.push(new Date(e,t-1,l-c));s.reverse();for(let c=1;c<=o;c++)s.push(new Date(e,t,c));let u=42-s.length;for(let c=1;c<=u;c++)s.push(new Date(e,t+1,c));return s}function gh(r,e){return r.getFullYear()===e.getFullYear()&&r.getMonth()===e.getMonth()}function yh(r){let e=new Date(r);e.setHours(0,0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7));let t=new Date(e.getFullYear(),0,1);return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}function xh(r){let e=new Date(r);return e.setDate(e.getDate()+4-(e.getDay()||7)),e.getFullYear()}function cs(r,e,t){let a=[],i=r.split(`
|
|
`),n=!1,o=/- \[(x| )\] (\d{1,2}:\d{2}) - (\d{1,2}:\d{2}) (#[^\s]+)? ?(.+?)$/u;for(let s of i){if(s.trim()===e){n=!0;continue}if(n&&s.startsWith("#")&&s!==e){n=!1;continue}if(n){let l=s.match(o);if(l){let[,u,c,f,p,h]=l,d=p0(c,f,h);a.push({id:d,date:t,startTime:c.trim(),endTime:f.trim(),tag:p?p.replace("#",""):void 0,description:h.trim(),completed:u==="x"})}}}return a}function oM(r){let e=r.split(":");if(e.length===2){let t=e[0].padStart(2,"0"),a=e[1].padStart(2,"0");return`${t}:${a}`}return r}function p0(r,e,t){let a=oM(r),i=oM(e);return`${a}-${i}-${t}`.replace(/[^\w\-]/g,"-")}function f0(r){let e=r.completed?"x":" ",t=r.tag?`#${r.tag} `:"";return`- [${e}] ${r.startTime} - ${r.endTime} ${t}${r.description}`}function Uc(r,e,t){let a=r.split(`
|
|
`),i=!1,n="",o=!1,s=ao(r,e,"");for(let l of a){if(l.trim()===e){i=!0,o=!0,n+=l+`
|
|
|
|
`;for(let u of s)n+=_h(u)+`
|
|
`;for(let u of t)n+=f0(u)+`
|
|
`;continue}if(i&&l.startsWith("#")&&l!==e){i=!1,n+=l+`
|
|
`;continue}i&&l.match(/^- \[(x| )\]/)||i||(n+=l+`
|
|
`)}if(!o){n+=`
|
|
|
|
${e}
|
|
|
|
`;for(let l of t)n+=f0(l)+`
|
|
`}return n}function ao(r,e,t){let a=[],i=r.split(`
|
|
`),n=!1,o=0,s=/^- \[(x| )\] (#[^\s]+)? ?(.+?)(?:\s*@\{([0-9]{4}-[0-9]{2}-[0-9]{2})\})?$/u,l=/\d{1,2}:\d{2}\s*-\s*\d{1,2}:\d{2}/;for(let u=0;u<i.length;u++){let c=i[u];if(c.trim()===e){n=!0;continue}if(n&&c.startsWith("#")&&c!==e){n=!1;continue}if(n){if(l.test(c))continue;let f=c.match(s);if(f){let[,p,h,d,v]=f,m=h0(t,d,v,o);o++,a.push({id:m,date:t,endDate:v||void 0,tag:h?h.replace("#",""):void 0,description:d.trim(),completed:p==="x"})}}}return a}function h0(r,e,t,a){let i=`${r}-${e}${t?"-"+t:""}${a!==void 0?`-${a}`:""}`,n=0;for(let o=0;o<i.length;o++){let s=i.charCodeAt(o);n=(n<<5)-n+s,n=n&n}return`event-${Math.abs(n)}-${i.replace(/[^\w\-]/g,"-")}`}function _h(r){let e=r.completed?"x":" ",t=r.tag?`#${r.tag} `:"",a=r.endDate?` @{${r.endDate}}`:"";return`- [${e}] ${t}${r.description}${a}`}function Fc(r,e,t){let a=r.split(`
|
|
`),i=!1,n="",o=!1,s=/\d{1,2}:\d{2}\s*-\s*\d{1,2}:\d{2}/;for(let l of a){if(l.trim()===e){i=!0,o=!0,n+=l+`
|
|
|
|
`;for(let u of t)n+=_h(u)+`
|
|
`;continue}if(i&&l.startsWith("#")&&l!==e){i=!1,n+=l+`
|
|
`;continue}if(i){if(s.test(l)){n+=l+`
|
|
`;continue}else if(l.match(/^- \[(x| )\]/))continue}i||(n+=l+`
|
|
`)}if(!o){n+=`
|
|
|
|
${e}
|
|
|
|
`;for(let l of t)n+=_h(l)+`
|
|
`}return n}function bh(r,e,t){let a=cs(r,e,t),i=ao(r,e,t);a.sort((u,c)=>u.startTime.localeCompare(c.startTime));let n=r.split(`
|
|
`),o=!1,s="",l=!1;for(let u of n){if(u.trim()===e){o=!0,l=!0,s+=u+`
|
|
|
|
`;for(let c of i)s+=_h(c)+`
|
|
`;for(let c of a)s+=f0(c)+`
|
|
`;continue}if(o&&u.startsWith("#")&&u!==e){o=!1,s+=u+`
|
|
`;continue}o&&u.match(/^- \[(x| )\]/)||o||(s+=u+`
|
|
`)}return s}function Sh(r,e,t){let a=[],i=r.split(`
|
|
`),n=!1,o=/^- \[(x| )\] (.+)$/u;for(let s of i){if(s.trim()===e){n=!0;continue}if(n&&s.startsWith("#")&&s!==e){n=!1;continue}if(n){let l=s.match(o);if(l){let[,u,c]=l;a.push({id:`habit-${t}-${c.trim()}`,date:t,habitName:c.trim(),completed:u==="x"})}}}return a}function sM(r){return`- [${r.completed?"x":" "}] ${r.habitName}`}function lM(r,e,t){let a=r.split(`
|
|
`),i=!1,n="",o=!1;for(let s of a){if(s.trim()===e){i=!0,o=!0,n+=s+`
|
|
|
|
`;for(let l of t)n+=sM(l)+`
|
|
`;continue}if(i&&s.startsWith("#")&&s!==e){i=!1,n+=s+`
|
|
`;continue}i||(n+=s+`
|
|
`)}if(!o){n=n.trimEnd()+`
|
|
|
|
`+e+`
|
|
|
|
`;for(let s of t)n+=sM(s)+`
|
|
`;n+=`
|
|
`}return n}function d0(r,e,t){let a=r.split(`
|
|
`),i=!1,n=[],o=(e.match(/^#+/)||["#"])[0].length;for(let p of a){if(p.trim()===e){i=!0;continue}if(i){let h=p.match(/^(#+)\s/);if(h&&h[1].length<=o)break;n.push(p)}}let s=n.join(`
|
|
`).trim(),l=[],u=/!\[\[([^\]|]+?)(?:\|[^\]]*?)?\]\]/g,c=/!\[(?:[^\]]*?)\]\(([^)]+?)\)/g,f;for(;(f=u.exec(s))!==null;)l.push(f[1]);for(;(f=c.exec(s))!==null;)l.push(f[1]);return{date:t,content:s,images:l,hasContent:s.length>0}}function uM(r,e,t){let a=r.split(`
|
|
`),i=(e.match(/^#+/)||["#"])[0].length,n=!1,o=!1,s="";for(let l of a){if(l.trim()===e){n=!0,o=!0,s+=l+`
|
|
`,t.trim().length>0&&(s+=`
|
|
`+t.trim()+`
|
|
`);continue}if(n){let u=l.match(/^(#+)\s/);if(u&&u[1].length<=i){n=!1,s+=`
|
|
`+l+`
|
|
`;continue}continue}s+=l+`
|
|
`}return o||(s=s.trimEnd()+`
|
|
|
|
`+e+`
|
|
`,t.trim().length>0&&(s+=`
|
|
`+t.trim()+`
|
|
`)),s}var Hc=class{constructor(e,t,a){this.app=e;this.settings=t;this.saveSettings=a;this.dailyTasksCache=new Map;this.fileContentCache=new Map;this.cacheTimestamp=0;this.CACHE_TTL=3e5;this.FILE_CACHE_TTL=6e4}getDailyNotePath(e){let{format:t,folder:a}=(0,pi.getDailyNoteSettings)(),i=window.moment(e).format(t||"YYYY-MM-DD"),n=(a==null?void 0:a.trim())||"";return n?`${n}/${i}.md`:`${i}.md`}getDailyNoteFile(e){let t=window.moment(e);try{let a=(0,pi.getAllDailyNotes)(),i=(0,pi.getDailyNote)(t,a);return i!=null?i:null}catch(a){let i=this.getDailyNotePath(e),n=this.app.vault.getAbstractFileByPath(i);return n instanceof br.TFile?n:null}}async getOrCreateDailyNoteFile(e){let t=this.getDailyNoteFile(e);if(t)return t;try{let a=window.moment(e);return await(0,pi.createDailyNote)(a)}catch(a){return console.error("Failed to create daily note:",a),null}}async loadDayTasks(e){let t=ne(e);if(this.isCacheValid()&&this.dailyTasksCache.has(t))return this.dailyTasksCache.get(t);let a=await this.loadActualTasksFromFile(e);return this.dailyTasksCache.set(t,a),a}async loadActualTasksFromFile(e){let t=this.getDailyNoteFile(e);if(!t)return[];let a=ne(e),i=this.fileContentCache.get(t.path),n;return i&&Date.now()-i.timestamp<this.FILE_CACHE_TTL?n=i.content:(n=await this.app.vault.cachedRead(t),this.fileContentCache.set(t.path,{content:n,timestamp:Date.now()})),cs(n,this.settings.scheduleTitle,a)}isCacheValid(){return Date.now()-this.cacheTimestamp<this.CACHE_TTL}async loadWeekTasks(e){let t=[];for(let n=0;n<7;n++){let o=new Date(e);o.setDate(e.getDate()+n),t.push(this.loadDayTasks(o))}let a=new Promise((n,o)=>setTimeout(()=>o(new Error("Week tasks load timeout")),5e3)),i;try{i=await Promise.race([Promise.all(t),a])}catch(n){i=[]}return i.flat()}async loadMonthTasks(e){let t=e.getFullYear(),a=e.getMonth(),i=new Date(t,a+1,0).getDate(),n=[];for(let s=1;s<=i;s++){let l=new Date(t,a,s);n.push(this.loadDayTasks(l))}return(await Promise.all(n)).flat()}async loadYearTasks(e){let t=[];for(let i=0;i<12;i++){let n=new Date(e,i,1);t.push(this.loadMonthTasks(n))}return(await Promise.all(t)).flat()}async createTask(e,t=!1){let a=await this.saveSingleTaskSilent(e);return t||new br.Notice("\u65E5\u7A0B\u5DF2\u521B\u5EFA"),a}async updateTask(e,t,a=!1){let i=await this.saveSingleTaskSilent(e,t);return a||new br.Notice("\u65E5\u7A0B\u5DF2\u66F4\u65B0"),i}async saveSingleTask(e,t){let a=new Date(e.date),i=await this.getOrCreateDailyNoteFile(a);if(!i)throw new br.Notice("\u65E0\u6CD5\u521B\u5EFA\u6216\u627E\u5230\u65E5\u8BB0\u6587\u4EF6"),new Error("\u65E0\u6CD5\u521B\u5EFA\u6216\u627E\u5230\u65E5\u8BB0\u6587\u4EF6");if(t&&t.date!==e.date){let c=new Date(t.date),f=this.getDailyNoteFile(c);if(f){let p=await this.app.vault.read(f),d=cs(p,this.settings.scheduleTitle,t.date).filter(m=>!(m.id===t.id||m.startTime===t.startTime&&m.endTime===t.endTime&&m.description===t.description)),v=Uc(p,this.settings.scheduleTitle,d);await this.app.vault.modify(f,v)}}let n=await this.app.vault.read(i),o=cs(n,this.settings.scheduleTitle,e.date),s=p0(e.startTime,e.endTime,e.description);e.id=s;let l=o;t?l=o.filter(c=>!(c.id===t.id||c.startTime===t.startTime&&c.endTime===t.endTime&&c.description===t.description)):l=o.filter(c=>c.id!==e.id),l.push(e);let u=Uc(n,this.settings.scheduleTitle,l);return u=bh(u,this.settings.scheduleTitle,e.date),await this.app.vault.modify(i,u),t&&t.date!==e.date?(this.clearDateCache(t.date),this.clearDateCache(e.date)):this.clearDateCache(e.date),e}async saveSingleTaskSilent(e,t){return this.saveSingleTask(e,t)}clearAllCaches(){this.dailyTasksCache.clear(),this.fileContentCache.clear(),this.cacheTimestamp=0}clearDateCache(e){this.dailyTasksCache.delete(e);let t=new Date(e),a=this.getDailyNotePath(t);this.fileContentCache.delete(a)}async deleteTask(e){let t=new Date(e.date),a=this.getDailyNoteFile(t);if(!a){new br.Notice("\u627E\u4E0D\u5230\u65E5\u8BB0\u6587\u4EF6");return}let i=await this.app.vault.read(a),o=cs(i,this.settings.scheduleTitle,e.date).filter(l=>l.id!==e.id),s=Uc(i,this.settings.scheduleTitle,o);await this.app.vault.modify(a,s),this.clearDateCache(e.date),new br.Notice("\u65E5\u7A0B\u5DF2\u5220\u9664")}async toggleTaskStatus(e){let t={...e},a=new Date(t.date),i=await this.getOrCreateDailyNoteFile(a);if(!i)throw new Error("\u65E0\u6CD5\u627E\u5230\u65E5\u8BB0\u6587\u4EF6");let n=await this.app.vault.read(i),o=cs(n,this.settings.scheduleTitle,t.date),s=o.findIndex(u=>u.id===e.id||u.startTime===e.startTime&&u.endTime===e.endTime&&u.description===e.description);s>=0&&(o[s]=t);let l=Uc(n,this.settings.scheduleTitle,o);return await this.app.vault.modify(i,l),this.clearDateCache(t.date),t}async loadDayEvents(e){let t=ne(e),a=this.getDailyNoteFile(e);if(!a)return[];let i=this.fileContentCache.get(a.path),n;return i&&Date.now()-i.timestamp<this.FILE_CACHE_TTL?n=i.content:(n=await this.app.vault.cachedRead(a),this.fileContentCache.set(a.path,{content:n,timestamp:Date.now()})),ao(n,this.settings.scheduleTitle,t)}async loadMonthEvents(e){let t=e.getFullYear(),a=e.getMonth(),i=new Date(t,a+1,0).getDate(),n=ne(new Date(t,a,1)),o=[];for(let f=1;f<=i;f++){let p=new Date(t,a,f);o.push(this.loadDayEvents(p))}let s=new Date(t,a-1,1),l=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();for(let f=1;f<=l;f++){let p=new Date(s.getFullYear(),s.getMonth(),f);o.push(this.loadDayEvents(p))}return(await Promise.all(o)).flat().filter(f=>{let p=new Date(f.date);return p.getFullYear()===t&&p.getMonth()===a?!0:!!f.endDate&&f.endDate>=n})}async createEvent(e){let t=new Date(e.date),a=await this.getOrCreateDailyNoteFile(t);if(!a)throw new br.Notice("\u65E0\u6CD5\u521B\u5EFA\u4E8B\u9879\u6587\u4EF6"),new Error("Failed to create event file");let i=await this.app.vault.read(a),n=ao(i,this.settings.scheduleTitle,e.date);n.push(e);let o=Fc(i,this.settings.scheduleTitle,n);return o=bh(o,this.settings.scheduleTitle,e.date),await this.app.vault.modify(a,o),this.clearDateCache(e.date),new br.Notice("\u4E8B\u9879\u5DF2\u521B\u5EFA"),e}async updateEvent(e,t){if(e.date!==t.date)return await this.deleteEvent(t),await this.createEvent(e);let a=new Date(e.date),i=this.getDailyNoteFile(a);if(!i)throw new br.Notice("\u4E8B\u9879\u6587\u4EF6\u4E0D\u5B58\u5728"),new Error("Event file not found");let n=await this.app.vault.read(i),o=ao(n,this.settings.scheduleTitle,e.date),s=o.findIndex(u=>u.id===t.id);s>=0&&(o[s]=e);let l=Fc(n,this.settings.scheduleTitle,o);return l=bh(l,this.settings.scheduleTitle,e.date),await this.app.vault.modify(i,l),this.clearDateCache(e.date),new br.Notice("\u4E8B\u9879\u5DF2\u66F4\u65B0"),e}async deleteEvent(e){let t=new Date(e.date),a=this.getDailyNoteFile(t);if(!a){new br.Notice("\u4E8B\u9879\u6587\u4EF6\u4E0D\u5B58\u5728");return}let i=await this.app.vault.read(a),o=ao(i,this.settings.scheduleTitle,e.date).filter(l=>l.id!==e.id),s=Fc(i,this.settings.scheduleTitle,o);await this.app.vault.modify(a,s),this.clearDateCache(e.date),new br.Notice("\u4E8B\u9879\u5DF2\u5220\u9664")}async toggleEventStatus(e){let t={...e},a=new Date(t.date),i=this.getDailyNoteFile(a);if(!i)throw new Error("\u4E8B\u9879\u6587\u4EF6\u4E0D\u5B58\u5728");let n=await this.app.vault.read(i),o=ao(n,this.settings.scheduleTitle,t.date),s=o.findIndex(u=>u.id===e.id);s>=0&&(o[s]=t);let l=Fc(n,this.settings.scheduleTitle,o);return await this.app.vault.modify(i,l),this.clearDateCache(t.date),t}async loadDayHabits(e){let t=ne(e),a=this.getDailyNoteFile(e);if(!a)return[];let i=this.fileContentCache.get(a.path),n;return i&&Date.now()-i.timestamp<this.FILE_CACHE_TTL?n=i.content:(n=await this.app.vault.cachedRead(a),this.fileContentCache.set(a.path,{content:n,timestamp:Date.now()})),Sh(n,this.settings.habitTitle,t)}async loadWeekHabits(e){let t=[];for(let i=0;i<7;i++){let n=new Date(e);n.setDate(e.getDate()+i),t.push(this.loadDayHabits(n))}return(await Promise.all(t)).flat()}async loadMonthHabits(e){let t=e.getFullYear(),a=e.getMonth(),i=new Date(t,a+1,0).getDate(),n=[];for(let s=1;s<=i;s++){let l=new Date(t,a,s);n.push(this.loadDayHabits(l))}return(await Promise.all(n)).flat()}async loadYearHabits(e){let t;try{t=(0,pi.getAllDailyNotes)()}catch(o){return[]}let a=[],i=new Set;for(let o=0;o<12;o++){let s=new Date(e,o+1,0).getDate();for(let l=1;l<=s;l++){let u=window.moment(new Date(e,o,l)),c=(0,pi.getDailyNote)(u,t);if(c&&!i.has(c.path)){i.add(c.path);let f=`${e}-${String(o+1).padStart(2,"0")}-${String(l).padStart(2,"0")}`;a.push({file:c,dateStr:f})}}}return a.length===0?[]:(await Promise.all(a.map(async({file:o,dateStr:s})=>{let l=this.fileContentCache.get(o.path),u;return l&&Date.now()-l.timestamp<this.FILE_CACHE_TTL?u=l.content:(u=await this.app.vault.cachedRead(o),this.fileContentCache.set(o.path,{content:u,timestamp:Date.now()})),Sh(u,this.settings.habitTitle,s)}))).flat()}async toggleHabit(e,t){let a=await this.getOrCreateDailyNoteFile(e);if(!a){new br.Notice("\u65E0\u6CD5\u521B\u5EFA\u65E5\u8BB0\u6587\u4EF6");return}let i=ne(e),n=await this.app.vault.read(a),o=Sh(n,this.settings.habitTitle,i),s=o.find(u=>u.habitName===t);s?s.completed=!s.completed:o.push({id:`habit-${i}-${t}`,date:i,habitName:t,completed:!0});let l=lM(n,this.settings.habitTitle,o);await this.app.vault.modify(a,l),this.clearDateCache(i)}async loadDayJournal(e){let t=ne(e),a=this.getDailyNoteFile(e);if(!a)return{date:t,content:"",images:[],hasContent:!1};let i=this.fileContentCache.get(a.path),n;return i&&Date.now()-i.timestamp<this.FILE_CACHE_TTL?n=i.content:(n=await this.app.vault.cachedRead(a),this.fileContentCache.set(a.path,{content:n,timestamp:Date.now()})),d0(n,this.settings.journalTitle,t)}async loadMonthJournals(e){let t=e.getFullYear(),a=e.getMonth(),i=new Date(t,a+1,0).getDate(),n=[];for(let s=1;s<=i;s++)n.push(this.loadDayJournal(new Date(t,a,s)));return(await Promise.all(n)).filter(s=>s.hasContent)}async loadOnThisDayJournals(e){let t=e.getMonth(),a=e.getDate(),i;try{i=(0,pi.getAllDailyNotes)()}catch(l){return[]}let n=[],o=new Set;for(let l of Object.keys(i)){let u=i[l],c=window.moment(l,"YYYY-MM-DD");c.isValid()&&c.month()===t&&c.date()===a&&(o.has(u.path)||(o.add(u.path),n.push({file:u,dateStr:c.format("YYYY-MM-DD")})))}return n.length===0?[]:(await Promise.all(n.map(async({file:l,dateStr:u})=>{let c=this.fileContentCache.get(l.path),f;return c&&Date.now()-c.timestamp<this.FILE_CACHE_TTL?f=c.content:(f=await this.app.vault.cachedRead(l),this.fileContentCache.set(l.path,{content:f,timestamp:Date.now()})),d0(f,this.settings.journalTitle,u)}))).filter(l=>l.hasContent).sort((l,u)=>u.date.localeCompare(l.date))}async saveJournal(e,t){let a=await this.getOrCreateDailyNoteFile(e);if(!a){new br.Notice("\u65E0\u6CD5\u521B\u5EFA\u65E5\u8BB0\u6587\u4EF6");return}let i=await this.app.vault.read(a),n=uM(i,this.settings.journalTitle,t);await this.app.vault.modify(a,n);let o=ne(e);this.clearDateCache(o)}};var Vl=require("obsidian"),u5=r0(c0());var hi=require("obsidian");var wn=require("obsidian");var cM=require("obsidian"),wh=require("@codemirror/view"),m0=require("@codemirror/state");function K5(r){let e=r.embedRegistry.embedByExtension.md({app:r,containerEl:document.createElement("div")},null,"");e.editable=!0,e.showEditor();let t=Object.getPrototypeOf(Object.getPrototypeOf(e.editMode));return e.unload(),t.constructor}var v0=null,Pa=class{constructor(e,t,a){this.app=e;this.options=a;this._destroyed=!1;this._observer=null;this.contentDom=null;var f,p;this.containerEl=t,v0||(v0=K5(e));let i={app:e,file:(f=a.file)!=null?f:null,editMode:null,editor:null,getFile:()=>{var h;return(h=a.file)!=null?h:null},onMarkdownScroll:()=>{},syncScroll:()=>{},getMode:()=>"source",requestSave:()=>{},save:()=>{}};this.editMode=new v0(e,t,i),this.scope=new cM.Scope(e.scope),this.scope.register(["Mod"],"Enter",()=>!0),i.editMode=this.editMode,i.editor=this.editMode.editor,this.editMode.set(String(a.value||""),!1);let n=this.editMode.unload.bind(this.editMode);this.editMode.unload=()=>{this._destroyed&&n()},typeof this.editMode.hide=="function"&&(this.editMode.hide=()=>{});let o=this.editMode,s=e.workspace.setActiveLeaf,l=function(h){var d;if(!((d=o.activeCM)!=null&&d.hasFocus))return s.apply(this,arguments)};e.workspace.setActiveLeaf=l,o.register(()=>{e.workspace.setActiveLeaf===l&&(e.workspace.setActiveLeaf=s)});let u=this.editMode.onUpdate.bind(this.editMode);this.editMode.onUpdate=(h,d)=>{var v;if(!this._destroyed){try{u(h,d)}catch(m){}if(a.singleLineAutoGrow&&d){let m=this.value.replace(/[\r\n]+/g," ");if(m!==this.value){let g=(v=this.editMode.editor)==null?void 0:v.cm;g==null||g.dispatch({changes:{from:0,to:g.state.doc.length,insert:m}});return}}d&&a.onChange&&a.onChange(this.value)}};let c=(p=this.editMode.editor)==null?void 0:p.cm;if(c){this.contentDom=c.contentDOM;let h=()=>{let d=c.state.doc.length;c.dispatch({selection:{anchor:d,head:d}})};if(c.contentDOM.addEventListener("focusin",()=>{e.keymap.pushScope(this.scope),e.workspace.activeEditor=i,a.singleLineAutoGrow&&requestAnimationFrame(h)}),c.contentDOM.addEventListener("blur",()=>{e.keymap.popScope(this.scope)}),this._observer=new MutationObserver(()=>{!this._destroyed&&c.contentDOM.contentEditable!=="true"&&(c.contentDOM.contentEditable="true")}),this._observer.observe(c.contentDOM,{attributes:!0,attributeFilter:["contenteditable"]}),this.containerEl.addEventListener("mousedown",d=>{this._destroyed||(c.contentDOM.contentEditable!=="true"&&(c.contentDOM.contentEditable="true"),c.contentDOM.contains(d.target)||(d.preventDefault(),c.focus()))}),a.placeholder&&c.dispatch({effects:m0.StateEffect.appendConfig.of([(0,wh.placeholder)(a.placeholder)])}),a.singleLineAutoGrow){this.containerEl.addClass("albus-super-daily-notes-inline-editor-field-single-line");let d=wh.EditorView.theme({"&":{minHeight:"42px"},".cm-scroller":{minHeight:"42px",overflowX:"hidden",overflowY:"hidden",padding:"11px 12px"},".cm-content":{minHeight:"0",padding:"0",lineHeight:"20px",backgroundColor:"transparent"},".cm-line":{padding:"0",lineHeight:"20px",backgroundColor:"transparent"},".cm-activeLine":{backgroundColor:"transparent"},".cm-focused .cm-activeLine":{backgroundColor:"transparent"},".cm-selectionLayer":{display:"none"},".cm-selectionBackground":{backgroundColor:"transparent"},".cm-placeholder":{lineHeight:"20px",color:"var(--text-muted)",whiteSpace:"nowrap",pointerEvents:"none"}});c.dispatch({effects:m0.StateEffect.appendConfig.of([d])}),c.contentDOM.addEventListener("keydown",v=>{v.key==="Enter"&&v.preventDefault()})}}}get value(){var e,t,a,i,n,o;return(o=(n=(i=(a=(t=(e=this.editMode)==null?void 0:e.editor)==null?void 0:t.cm)==null?void 0:a.state)==null?void 0:i.doc)==null?void 0:n.toString())!=null?o:""}focus(){var e,t,a;(a=(t=(e=this.editMode)==null?void 0:e.editor)==null?void 0:t.cm)==null||a.focus()}destroy(){var e,t;if(!this._destroyed){this._destroyed=!0,this.editMode&&(this.editMode.onUpdate=()=>{}),(e=this._observer)==null||e.disconnect(),this._observer=null,this.app.keymap.popScope(this.scope),this.app.workspace.activeEditor=null;try{(t=this.editMode)!=null&&t._loaded&&this.editMode.unload()}catch(a){}this.containerEl.empty()}}};var Th=class extends wn.Modal{constructor(t,a){var i,n,o;super(t);this.editor=null;this.saveButton=null;this.descriptionSetting=null;this.endDateSetting=null;this.task=(i=a.task)!=null?i:null,this.initialData=(n=a.initialData)!=null?n:null,this.customTags=a.customTags,this.onSubmit=a.onSubmit,this.onDelete=a.onDelete,this.showOnlyLeafTag=(o=a.showOnlyLeafTag)!=null?o:!1,this.formData=this.createInitialFormData()}createInitialFormData(){var t,a,i,n,o,s,l;return this.task?{...this.task}:{id:"",date:((t=this.initialData)==null?void 0:t.date)||ne(new Date),startTime:((a=this.initialData)==null?void 0:a.startTime)||"09:00",endTime:((i=this.initialData)==null?void 0:i.endTime)||"09:30",tag:((n=this.initialData)==null?void 0:n.tag)||"",description:((o=this.initialData)==null?void 0:o.description)||"",completed:(l=(s=this.initialData)==null?void 0:s.completed)!=null?l:!1}}getTagDisplayName(t){return this.showOnlyLeafTag&&t.split("/").pop()||t}renderDescriptionEditor(t){this.descriptionSetting=new wn.Setting(t).setName("\u63CF\u8FF0"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting-single-line");let a=this.descriptionSetting.controlEl.createDiv({cls:"albus-super-daily-notes-inline-editor-field"});this.editor=new Pa(this.app,a,{value:this.formData.description,placeholder:"\u8F93\u5165\u65E5\u7A0B\u63CF\u8FF0...",singleLineAutoGrow:!0,onChange:i=>{this.formData.description=i,this.validateForm()}}),window.setTimeout(()=>{var i;return(i=this.editor)==null?void 0:i.focus()},30)}validateForm(){let a=this.formData.description.trim().length>0,i=this.formData.startTime,n=this.formData.endTime,o=!!i&&!!n&&i<n;this.descriptionSetting&&(a?(this.descriptionSetting.settingEl.removeClass("albus-super-daily-notes-has-error"),this.descriptionSetting.setDesc("")):(this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-has-error"),this.descriptionSetting.setDesc("\u8BF7\u8F93\u5165\u65E5\u7A0B\u63CF\u8FF0"))),this.endDateSetting&&(o?(this.endDateSetting.settingEl.removeClass("albus-super-daily-notes-has-error"),this.endDateSetting.setDesc("")):(this.endDateSetting.settingEl.addClass("albus-super-daily-notes-has-error"),this.endDateSetting.setDesc("\u7ED3\u675F\u65F6\u95F4\u5FC5\u987B\u665A\u4E8E\u5F00\u59CB\u65F6\u95F4")));let s=a&&o;return this.saveButton&&(this.saveButton.disabled=!s,this.saveButton.toggleClass("albus-super-daily-notes-disabled",!s)),s}onOpen(){let{contentEl:t}=this;t.empty(),this.modalEl.addClass("albus-super-daily-notes-item-editor-modal-shell"),t.addClass("albus-super-daily-notes-item-editor-modal"),new wn.Setting(t).setName("\u65E5\u671F").addText(i=>(i.setValue(this.formData.date).onChange(n=>this.formData.date=n),i.inputEl.type="date",i)),new wn.Setting(t).setName("\u5F00\u59CB\u65F6\u95F4").addText(i=>(i.setValue(this.formData.startTime).onChange(n=>{this.formData.startTime=n,this.validateForm()}),i.inputEl.type="time",i)),this.endDateSetting=new wn.Setting(t).setName("\u7ED3\u675F\u65F6\u95F4").addText(i=>(i.setValue(this.formData.endTime).onChange(n=>{this.formData.endTime=n,this.validateForm()}),i.inputEl.type="time",i)),new wn.Setting(t).setName("\u6807\u7B7E").addDropdown(i=>{i.addOption("","\u65E0\u6807\u7B7E"),this.customTags.forEach(n=>{i.addOption(n.name,this.getTagDisplayName(n.name))}),i.setValue(this.formData.tag||""),i.onChange(n=>this.formData.tag=n||void 0)}),this.renderDescriptionEditor(t),new wn.Setting(t).setName("\u72B6\u6001").addToggle(i=>i.setValue(this.formData.completed).onChange(n=>this.formData.completed=n));let a=t.createDiv({cls:"albus-super-daily-notes-modal-button-container"});this.task&&this.onDelete&&a.createEl("button",{text:"\u5220\u9664",cls:"mod-warning"}).addEventListener("click",async()=>{var i;await((i=this.onDelete)==null?void 0:i.call(this)),this.close()}),a.createEl("button",{text:"\u53D6\u6D88"}).addEventListener("click",()=>this.close()),this.saveButton=a.createEl("button",{text:this.task?"\u4FDD\u5B58":"\u521B\u5EFA",cls:"mod-cta"}),this.validateForm(),this.saveButton.addEventListener("click",async()=>{var i,n;this.validateForm()&&(this.formData.description=(n=(i=this.editor)==null?void 0:i.value)!=null?n:this.formData.description,await this.onSubmit({...this.formData}),this.close())})}onClose(){var a;(a=this.editor)==null||a.destroy(),this.editor=null;let{contentEl:t}=this;t.empty()}};var Tn=require("obsidian");var ka=class extends Tn.Modal{constructor(t,a,i){super(t);this.calendarView="month";this.currentDate=new Date(a),this.onSelect=i}onOpen(){this.modalEl.addClass("albus-super-daily-notes-datepicker-modal"),this.render()}render(){let{contentEl:t}=this;t.empty(),this.renderHeader(t),this.calendarView==="month"?this.renderMonthView(t):this.calendarView==="year"&&this.renderYearView(t)}renderHeader(t){let a=t.createDiv({cls:"albus-super-daily-notes-datepicker-header"});if(this.calendarView==="month"){let i=a.createEl("button");(0,Tn.setIcon)(i,"chevrons-left"),i.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()-1),this.render()});let n=a.createEl("button");(0,Tn.setIcon)(n,"chevron-left"),n.addEventListener("click",()=>{this.currentDate.setMonth(this.currentDate.getMonth()-1),this.render()}),a.createEl("span",{text:`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`,cls:"albus-super-daily-notes-datepicker-title"}).addEventListener("click",()=>{this.calendarView="year",this.render()});let s=a.createEl("button");(0,Tn.setIcon)(s,"chevron-right"),s.addEventListener("click",()=>{this.currentDate.setMonth(this.currentDate.getMonth()+1),this.render()});let l=a.createEl("button");(0,Tn.setIcon)(l,"chevrons-right"),l.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()+1),this.render()})}else if(this.calendarView==="year"){let i=a.createEl("button");(0,Tn.setIcon)(i,"chevron-left"),i.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()-1),this.render()});let n=a.createEl("input",{type:"text",value:this.currentDate.getFullYear().toString(),cls:"albus-super-daily-notes-datepicker-year-input"});n.addEventListener("blur",()=>{let s=parseInt(n.value);!isNaN(s)&&s>=1e3&&s<=9999?(this.currentDate.setFullYear(s),this.render()):n.value=this.currentDate.getFullYear().toString()}),n.addEventListener("keydown",s=>{s.key==="Enter"&&n.blur()}),n.addEventListener("focus",()=>{n.select()});let o=a.createEl("button");(0,Tn.setIcon)(o,"chevron-right"),o.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()+1),this.render()})}}renderMonthView(t){let a=t.createDiv({cls:"albus-super-daily-notes-datepicker-unified-grid"});a.createEl("div",{text:"\u5468",cls:"albus-super-daily-notes-week-number-header"}),["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"].forEach(s=>{a.createEl("div",{text:s,cls:"albus-super-daily-notes-weekday"})});let i=Gl(this.currentDate),n=new Date,o=this.currentDate.getMonth();for(let s=0;s<i.length;s+=7){let l=i[s],u=yh(l),c=xh(l);a.createEl("button",{text:u.toString(),cls:"albus-super-daily-notes-week-number",attr:{"aria-label":`${c}\u5E74\u7B2C${u}\u5468`}}).addEventListener("click",()=>{let p=fi(l);this.onSelect(p),this.close()});for(let p=0;p<7;p++){let h=i[s+p],d=h.getMonth()===o,v=h.toDateString()===n.toDateString(),m=a.createEl("button",{text:h.getDate().toString(),cls:"albus-super-daily-notes-datepicker-day"});d&&m.addClass("albus-super-daily-notes-current-month"),v&&m.addClass("albus-super-daily-notes-today"),d||(m.disabled=!0),m.addEventListener("click",()=>{this.onSelect(h),this.close()})}}}renderYearView(t){let a=t.createDiv({cls:"albus-super-daily-notes-datepicker-months"});["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"].forEach((n,o)=>{a.createEl("button",{text:n,cls:"albus-super-daily-notes-datepicker-month"}).addEventListener("click",()=>{this.currentDate.setMonth(o),this.calendarView="month",this.render()})})}onClose(){let{contentEl:t}=this;t.empty()}};function Ra(r,e,t=!1){return e==="precise"?Math.round(r):Math.round(r/5)*5}function fM(r,e,t,a,i="precise"){let n=null,o=null,s=null;function l(f,p,h,d){var m,g;let v=d||f.currentTarget;if(!(!f||!v)){if(f.preventDefault(),f.stopPropagation(),h==="create"){let y=null;if(v.classList.contains("albus-super-daily-notes-week-day-column")||v.classList.contains("albus-super-daily-notes-timeline-content")?y=v:y=v.closest(".albus-super-daily-notes-week-day-column")||v.closest(".albus-super-daily-notes-timeline-content"),y){let x=y.getBoundingClientRect(),b=(f.clientY-x.top)/t+a*60,S=Math.min(Ra(b,i,!0),1439),w=((m=y.dataset)==null?void 0:m.date)||"";n={mode:h,task:null,startY:f.clientY,startTime:_r(S),startDuration:0,pixelPerMinute:t,dayStartHour:a,hasMoved:!1,sourceDate:w,sourceColumn:y},s=y.createDiv({cls:"albus-super-daily-notes-task-drag-preview"});let D=(S-a*60)*t;s.style.top=`${D}px`,s.style.height="0px",s.style.left="0",s.style.right="0",s.style.backgroundColor="var(--interactive-accent)",s.style.opacity="0.3",s.style.border="2px dashed var(--interactive-accent)";let C=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-start"});C.textContent=_r(S);let M=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-end"});M.textContent=_r(S)}}else if(p){let y=v.closest(".albus-super-daily-notes-week-day-column"),x=((g=y==null?void 0:y.dataset)==null?void 0:g.date)||p.date;n={mode:h,task:{...p},startY:f.clientY,startTime:p.startTime,startDuration:J5(p.startTime,p.endTime),pixelPerMinute:t,dayStartHour:a,hasMoved:!1,sourceDate:x,sourceColumn:y||void 0},n.startX=f.clientX,o=v;let _=v.closest(".albus-super-daily-notes-week-day-column")||v.closest(".albus-super-daily-notes-timeline-content");if(_){s=_.createDiv({cls:"albus-super-daily-notes-task-drag-preview"}),s.style.pointerEvents="none",s.style.zIndex="1000";let b=o.getBoundingClientRect(),S=_.getBoundingClientRect();s.style.top=`${b.top-S.top}px`,s.style.height=`${b.height}px`,s.style.left="0",s.style.right="0",s.style.backgroundColor="var(--interactive-accent)",s.style.opacity="0.4",s.style.borderRadius="8px";let w=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-start"});w.textContent=p.startTime;let D=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-end"});D.textContent=p.endTime,h==="resize-top"?(w.style.display="block",D.style.display="none"):h==="resize-bottom"?(w.style.display="none",D.style.display="block"):(w.style.display="block",D.style.display="block")}}document.addEventListener("mousemove",u),document.addEventListener("mouseup",c)}}function u(f){var m;if(!n)return;let p=f.clientY-n.startY,h=f.clientX-n.startX,d=p/n.pixelPerMinute,v=Ra(d,i,!1);if((Math.abs(p)>5||Math.abs(h||0)>5)&&(n.hasMoved=!0),n.mode==="create"){if(s){let g=Math.abs(v*n.pixelPerMinute);s.style.height=`${g}px`;let y=xe(n.startTime),x,_;if(v>=0?(x=y,_=Ra(y+v,i,!1)):(_=y,x=Math.max(n.dayStartHour*60,Ra(y+v,i,!0))),_=Math.min(_,1440),_<=x&&(_=x+Ra(1,i,!1)),p<0){let w=(x-n.dayStartHour*60)*n.pixelPerMinute;s.style.top=`${w}px`}let b=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-start"),S=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-end");b&&(b.textContent=_r(x)),S&&(S.textContent=_r(_))}}else if(n.task){let g=n.task;if(n.mode==="move"){let y=(m=document.elementFromPoint(f.clientX,f.clientY))==null?void 0:m.closest(".albus-super-daily-notes-week-day-column");if(y&&y.dataset.date){let w=y.dataset.date,D=w!==n.sourceDate;if(g.date=w,s&&y!==s.parentElement){s.remove(),s=y.createDiv({cls:"albus-super-daily-notes-task-drag-preview"}),s.style.backgroundColor="var(--interactive-accent)",s.style.opacity="0.4",s.style.borderRadius="8px",s.style.pointerEvents="none",s.style.zIndex="1000";let C=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-start"});C.textContent=g.startTime;let M=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-end"});M.textContent=g.endTime}}let x=xe(n.startTime)+v,_=Ra(x,i,!0),b=1440-n.startDuration,S=Math.max(a*60,Math.min(b,_));if(g.startTime=_r(S),g.endTime=_r(S+n.startDuration),s){let w=(S-a*60)*t,D=n.startDuration*t;s.style.top=`${w}px`,s.style.height=`${D}px`,s.style.left="0",s.style.right="0";let C=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-start"),M=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-end");C&&(C.textContent=g.startTime),M&&(M.textContent=g.endTime)}}else if(n.mode==="resize-top"){let y=xe(n.startTime)+v,x=Ra(y,i,!0),_=xe(g.endTime),b=Math.max(a*60,Math.min(_-5,x));if(g.startTime=_r(b),s){let S=(b-a*60)*t,w=(_-b)*t;s.style.top=`${S}px`,s.style.height=`${w}px`;let D=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-start");D&&(D.textContent=g.startTime)}}else if(n.mode==="resize-bottom"){let y=xe(n.startTime)+n.startDuration+v,x=Ra(y,i,!1),_=xe(g.startTime),b=Math.max(_+5,Math.min(1440,x));if(g.endTime=_r(b),s){let S=(_-a*60)*t,w=(b-_)*t;s.style.top=`${S}px`,s.style.height=`${w}px`;let D=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-end");D&&(D.textContent=g.endTime)}}}}function c(f){if(n){if(document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c),n.hasMoved){if(n.mode==="create"){let h=(f.clientY-n.startY)/n.pixelPerMinute,d=Ra(h,i,!1),v=n.sourceDate||"",m=xe(n.startTime),g,y;if(d>=0)g=m,y=Ra(m+d,i,!1);else{y=m;let x=m+d;g=Math.max(n.dayStartHour*60,Ra(x,i,!0))}y=Math.min(y,1440),y<=g&&(y=g+Ra(1,i,!1)),e({startTime:_r(g),endTime:_r(y),description:"",date:v})}else if(n.task){let p={...n.task};p.startTime=n.startTime,p.endTime=_r(xe(n.startTime)+n.startDuration),p.date=n.sourceDate||p.date;let h={...n.task};r(h,p)}}o&&(o.classList.remove("albus-super-daily-notes-dragging"),o=null),s&&(s.remove(),s=null),n=null}}return{onDragStart:l,onDragMove:u,onDragEnd:c}}function J5(r,e){return xe(e)-xe(r)}function pM(r){let e=[...r].sort((a,i)=>xe(a.startTime)-xe(i.startTime)),t=[];return e.forEach(a=>{let i=xe(a.startTime),n=xe(a.endTime),o=0,s=!1;for(;!s;)t[o]||(t[o]=[]),t[o].some(u=>{let c=xe(u.startTime),f=xe(u.endTime);return i<f&&n>c})?o++:(t[o].push(a),a.columnIndex=o,s=!0)}),e.forEach(a=>{let i=xe(a.startTime),n=xe(a.endTime),o=e.filter(l=>{if(l===a)return!1;let u=xe(l.startTime),c=xe(l.endTime);return i<c&&n>u}),s=new Set([a.columnIndex]);o.forEach(l=>{s.add(l.columnIndex)}),a.totalColumns=Math.max(...s)+1}),e}function hM(r){let e=[];for(let t=r;t<=23;t++)e.push({hour:t,time:`${t}`,isFullHour:!0}),e.push({hour:t+.5,time:"",isFullHour:!1});return e}var Dh="#9ca3af";function g0(r,e){if(!r.tag)return null;let t=r.tag.split("/")[0];for(let a of e)if(t===a.name||r.tag===a.name)return a.name;return null}function Q5(r){let[e,t]=r.startTime.split(":").map(Number),[a,i]=r.endTime.split(":").map(Number),n=e*60+t,s=a*60+i-n;return s<0&&(s+=1440),s}function y0(r,e){let t={},a=0,i={};e.forEach(o=>{i[o.name]=o.color}),r.forEach(o=>{let s=Q5(o),l=g0(o,e)||"\u5176\u4ED6";t[l]||(t[l]={name:l,duration:0,color:i[l]||"#9ca3af",count:0}),t[l].duration+=s,t[l].count+=1,a+=s});let n=Object.keys(t).sort((o,s)=>t[s].duration-t[o].duration);return{tagStats:t,totalDuration:a,filteredTasks:r,sortedTagNames:n}}function fs(r){let e=Math.round(r),t=Math.floor(e/60),a=e%60;return t>0?a>0?`${t}h${a}m`:`${t}h`:`${a}m`}function x0(r,e,t){let a=r.getFullYear(),i=r.getMonth()+1,n=r.getDate();switch(t){case"day":return`${a}\u5E74${i}\u6708${n}\u65E5`;case"week":let o=yh(r);return`${xh(r)}\u5E74\u7B2C${o}\u5468`;case"month":return`${a}\u5E74${i}\u6708`;case"year":return`${a}\u5E74`;default:return""}}var Ch=class{constructor(e,t,a,i){this.container=null;this.contentContainer=null;this.viewMode="week";this.tasks=[];this.dragHandlers=null;this.currentTimeIndicator=null;this.timeIndicatorInterval=null;this.scrollPosition=0;this.needsAutoScroll=!1;this.clipboardTask=null;this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i}setTasks(e){this.tasks=e}getViewMode(){return this.viewMode}setViewMode(e){e==="week"&&this.viewMode!=="week"&&(this.needsAutoScroll=!0),this.viewMode=e}requestAutoScroll(){this.needsAutoScroll=!0}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}renderHeader(e,t){let a=["week","month"],i={week:"\u5468",month:"\u6708"},n={week:"calendar-minus-2",month:"calendar-days"},o=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group"});a.forEach(h=>{let d=o.createEl("button",{cls:`albus-super-daily-notes-view-mode-btn ${this.viewMode===h?"albus-super-daily-notes-active":""}`});(0,hi.setIcon)(d,n[h]),d.createSpan({text:i[h]}),d.addEventListener("click",()=>{this.setViewMode(h),t()})});let s=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),l=s.createEl("button");(0,hi.setIcon)(l,"chevron-left"),l.addEventListener("click",()=>{this.navigatePrevious(),t()}),s.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,h=>{this.currentDate=h,t()}).open()});let c=s.createEl("button");(0,hi.setIcon)(c,"chevron-right"),c.addEventListener("click",()=>{this.navigateNext(),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:this.viewMode==="week"?"\u672C\u5468":"\u672C\u6708"}).addEventListener("click",()=>{this.currentDate=new Date,t(),this.viewMode==="week"&&setTimeout(()=>this.scrollToCurrentTime(),100)})}renderContent(e,t){this.container=e,requestAnimationFrame(()=>{switch(this.viewMode){case"week":this.contentContainer=e,this.renderWeekView(e,t),this.needsAutoScroll&&(this.needsAutoScroll=!1,setTimeout(()=>this.scrollToCurrentTime(),100));break;case"month":this.renderMonthView(e,t);break}})}getViewTitle(){if(this.viewMode==="month")return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`;let e=this.getWeekNumber(this.currentDate);return`${this.currentDate.getFullYear()}\u5E74\u7B2C${e}\u5468`}getWeekNumber(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),a=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-a);let i=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-i.getTime())/864e5+1)/7)}navigatePrevious(){let e=new Date(this.currentDate);this.viewMode==="month"?e.setMonth(e.getMonth()-1):e.setDate(e.getDate()-7),this.currentDate=e}navigateNext(){let e=new Date(this.currentDate);this.viewMode==="month"?e.setMonth(e.getMonth()+1):e.setDate(e.getDate()+7),this.currentDate=e}renderMonthView(e,t){let a=Gl(this.currentDate),i=e.createDiv({cls:"albus-super-daily-notes-schedule-month-view"});this.contentContainer=i;let n=i.createDiv({cls:"albus-super-daily-notes-month-header"});["\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D","\u5468\u65E5"].forEach(s=>{n.createDiv({cls:"albus-super-daily-notes-month-day-header",text:s})});let o=[];for(let s=0;s<a.length;s+=7)o.push(a.slice(s,s+7));o.forEach(s=>{let l=i.createDiv({cls:"albus-super-daily-notes-schedule-month-week"});s.forEach(u=>{let c=gh(u,this.currentDate),f=u.toDateString()===new Date().toDateString(),p=ne(u),h=this.tasks.filter(x=>x.date===p).sort((x,_)=>x.startTime.localeCompare(_.startTime)),d=h.length>0,v=l.createDiv({cls:"albus-super-daily-notes-schedule-month-day"+(c?" is-current-month":" is-other-month")+(f?" is-today":"")+(d?" has-tasks":"")}),g=v.createDiv({cls:"albus-super-daily-notes-schedule-day-header"}).createEl("span",{cls:"albus-super-daily-notes-schedule-day-number"+(f?" is-today-number":""),text:u.getDate().toString()});c&&g.addEventListener("click",x=>{x.stopPropagation(),this.openTaskModal({id:"",date:p,startTime:"09:00",endTime:"09:30",description:"",completed:!1},t)});let y=v.createDiv({cls:"albus-super-daily-notes-schedule-day-tasks"});h.forEach(x=>{let _=this.getTaskDisplayColor(x),b=y.createDiv({cls:"albus-super-daily-notes-schedule-month-task"+(x.completed?" is-completed":"")});b.style.setProperty("--task-color",_),b.setAttribute("data-task-key",`${x.date}-${x.id}`);let S=b.createDiv({cls:"albus-super-daily-notes-schedule-task-dot"});S.style.backgroundColor=_,b.createSpan({cls:"albus-super-daily-notes-schedule-task-time",text:x.startTime}),b.createSpan({cls:"albus-super-daily-notes-schedule-task-desc",text:x.description}),b.addEventListener("click",w=>{w.stopPropagation(),this.openTaskModal(x,t)})}),c&&v.addEventListener("contextmenu",x=>{x.preventDefault(),this.callbacks.openDailyNote(u)})})})}getTaskDisplayColor(e){if(e.completed&&this.plugin.settings.grayOutCompleted)return"#E0E0E0";if(e.tag){let t=this.plugin.settings.customTags.find(a=>a.name===e.tag);if(!t){let a=e.tag.split("/")[0].trim();t=this.plugin.settings.customTags.find(i=>i.name===a)}if(t!=null&&t.color)return t.color}return Dh}renderWeekView(e,t){let a=fi(this.currentDate),i=[];for(let m=0;m<7;m++){let g=new Date(a);g.setDate(a.getDate()+m),i.push(g)}let n=this.plugin.settings.dayStartHour,o=2,s=(24-n)*60,l=s*o+10,u=hM(n);this.dragHandlers=fM((m,g)=>this.handleTaskDragUpdate(m,g,t),m=>this.handleTaskCreate(m,t),o,n,this.plugin.settings.dragSnapMode),this.contentContainer=e;let c=e.createDiv({cls:"albus-super-daily-notes-week-view-container"}),f=c.createDiv({cls:"albus-super-daily-notes-week-header"});f.createDiv({cls:"albus-super-daily-notes-week-time-label"});let p=["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"];i.forEach(m=>{let g=m.toDateString()===new Date().toDateString(),y=f.createDiv({cls:`albus-super-daily-notes-week-day-header ${g?"albus-super-daily-notes-today":""}`}),x=String(m.getMonth()+1).padStart(2,"0"),_=String(m.getDate()).padStart(2,"0");y.createDiv({cls:"albus-super-daily-notes-week-day-date",text:`${x}/${_}`}),y.createDiv({cls:"albus-super-daily-notes-week-day-name",text:p[m.getDay()]}),y.addEventListener("contextmenu",b=>{b.preventDefault(),this.callbacks.openDailyNote(m)})});let h=c.createDiv({cls:"albus-super-daily-notes-week-content-wrapper"}),d=h.createDiv({cls:"albus-super-daily-notes-week-timeline-labels"});d.style.height=`${l}px`,u.forEach(m=>{let g=d.createDiv({cls:`albus-super-daily-notes-week-timeline-label ${m.isFullHour?"albus-super-daily-notes-full-hour":"albus-super-daily-notes-half-hour"}`});if(g.style.top=`${(m.hour-n)*60*o}px`,g.style.height=`${60*o}px`,m.isFullHour){let y=String(m.hour).padStart(2,"0");g.createEl("span",{text:`${y}:00`})}});let v=h.createDiv({cls:"albus-super-daily-notes-week-timeline-content"});v.style.height=`${l}px`,u.forEach(m=>{let g=v.createDiv({cls:`albus-super-daily-notes-week-timeline-gridline ${m.isFullHour?"albus-super-daily-notes-full-hour":"albus-super-daily-notes-half-hour"}`});g.style.top=`${(m.hour-n)*60*o}px`}),i.forEach(m=>{let g=v.createDiv({cls:"albus-super-daily-notes-week-day-column"});g.dataset.date=ne(m);let y=this.tasks.filter(S=>S.date===ne(m)),x=pM(y),_=!1,b=0;g.addEventListener("mousedown",S=>{if(S.button!==0)return;if(S.target.classList.contains("albus-super-daily-notes-week-day-column")){_=!1,b=S.clientY;let D=M=>{Math.abs(M.clientY-b)>10&&(_=!0,document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",C),this.dragHandlers&&this.dragHandlers.onDragStart(S,null,"create",g))},C=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",C)};document.addEventListener("mousemove",D),document.addEventListener("mouseup",C)}}),g.addEventListener("contextmenu",S=>{if(S.target.classList.contains("albus-super-daily-notes-week-day-column")){S.preventDefault(),S.stopPropagation();let D=new hi.Menu;this.clipboardTask?D.addItem(C=>{C.setTitle("\u7C98\u8D34\u65E5\u7A0B"),C.setIcon("clipboard-paste"),C.onClick(async()=>{let M=g.getBoundingClientRect(),L=(S.clientY-M.top)/o+n*60,A=Math.round(L/5)*5,P=xe(this.clipboardTask.endTime)-xe(this.clipboardTask.startTime),R=Math.min(A+P,1440),k={...this.clipboardTask,id:"",date:ne(m),startTime:_r(A),endTime:_r(R)};await this.plugin.taskService.createTask(k),t()})}):D.addItem(C=>{C.setTitle("\u6CA1\u6709\u590D\u5236\u7684\u65E5\u7A0B"),C.setDisabled(!0)}),D.showAtMouseEvent(S)}}),x.forEach(S=>{this.renderWeekTask(g,S,n,o,s,t)})}),this.renderTimeIndicator(v,n,o,s)}renderWeekTask(e,t,a,i,n,o){let s=xe(t.startTime),l=xe(t.endTime),u=s-a*60,c=l-a*60,f=c-u;if(c<0||u>n)return;let p=100/(t.totalColumns||1),h=(t.columnIndex||0)*p,d=this.getTaskDisplayColor(t),v=e.createDiv({cls:`albus-super-daily-notes-timeline-task albus-super-daily-notes-week-timeline-task albus-super-daily-notes-task-block ${t.completed?"albus-super-daily-notes-completed":""} ${this.plugin.settings.cardStyle==="minimal"?"albus-super-daily-notes-minimal-style":""}`});v.setAttribute("data-task-key",`${t.date}-${t.id}`),v.style.top=`${u*i}px`,v.style.height=`${f*i}px`,v.style.backgroundColor=d,v.style.width=`${p}%`,v.style.left=`${h}%`,v.style.setProperty("--task-bg-color",d);let m=v.createDiv({cls:"albus-super-daily-notes-task-resize-handle albus-super-daily-notes-task-resize-top"}),g=v.createDiv({cls:"albus-super-daily-notes-task-resize-handle albus-super-daily-notes-task-resize-bottom"}),x=v.createDiv({cls:"albus-super-daily-notes-task-checkbox"}).createEl("input",{type:"checkbox"});x.checked=t.completed,x.addEventListener("change",async D=>{D.stopPropagation(),this.saveScrollPosition(),t.completed=!t.completed,this.updateTaskElementAppearance(v,t),await this.plugin.taskService.toggleTaskStatus(t),this.restoreScrollPosition()}),t.tag&&v.createDiv({cls:"albus-super-daily-notes-task-tags-container"}).createDiv({cls:"albus-super-daily-notes-task-tag",text:this.getTagDisplayName(t.tag)});let _=v.createDiv({cls:"albus-super-daily-notes-task-content"});_.createDiv({cls:"albus-super-daily-notes-task-description",text:t.description}),_.createDiv({cls:"albus-super-daily-notes-task-time",text:`${t.startTime} - ${t.endTime}`}),m.addEventListener("mousedown",D=>{D.preventDefault(),D.stopPropagation(),this.dragHandlers&&D.currentTarget&&this.dragHandlers.onDragStart(D,t,"resize-top")}),g.addEventListener("mousedown",D=>{D.preventDefault(),D.stopPropagation(),this.dragHandlers&&D.currentTarget&&this.dragHandlers.onDragStart(D,t,"resize-bottom")}),v.addEventListener("contextmenu",D=>{D.preventDefault(),D.stopPropagation();let C=new hi.Menu;C.addItem(M=>{M.setTitle("\u590D\u5236\u65E5\u7A0B"),M.setIcon("copy"),M.onClick(()=>{this.clipboardTask={...t},new hi.Notice("\u65E5\u7A0B\u5DF2\u590D\u5236")})}),C.showAtMouseEvent(D)}),v.style.cursor="grab";let b=!1,S=0,w=0;v.addEventListener("mousedown",D=>{if(D.button!==0)return;let C=D.target;if(C.tagName==="INPUT"||C.classList.contains("albus-super-daily-notes-task-resize-handle"))return;b=!1,S=D.clientX,w=D.clientY,v.style.cursor="grabbing";let M=L=>{let A=Math.abs(L.clientX-S),P=Math.abs(L.clientY-w);(A>5||P>5)&&(b=!0,document.removeEventListener("mousemove",M),this.dragHandlers&&this.dragHandlers.onDragStart(D,t,"move",v))},E=L=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",E),v.style.cursor="grab",!b&&L.target instanceof HTMLElement&&L.target.tagName!=="INPUT"&&this.openTaskModal(t,o)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",E)})}renderTimeIndicator(e,t,a,i){let n=new Date,o=n.getHours(),s=n.getMinutes(),u=o*60+s-t*60;if(u>=0&&u<=i){let c=u*a,f=e.createDiv({cls:"albus-super-daily-notes-timeline-current-time"});f.style.top=`${c}px`,f.setAttribute("data-day-start",t.toString()),f.setAttribute("data-pixel-per-minute",a.toString()),f.setAttribute("data-total-minutes",i.toString()),f.createDiv({cls:"albus-super-daily-notes-timeline-current-time-line"});let p=f.createDiv({cls:"albus-super-daily-notes-timeline-current-time-label"});p.textContent=`${String(o).padStart(2,"0")}:${s.toString().padStart(2,"0")}`,this.currentTimeIndicator=f}}updateTimeIndicator(){if(!this.currentTimeIndicator)return;let e=parseInt(this.currentTimeIndicator.getAttribute("data-day-start")||"8"),t=parseInt(this.currentTimeIndicator.getAttribute("data-pixel-per-minute")||"2"),a=parseInt(this.currentTimeIndicator.getAttribute("data-total-minutes")||"960"),i=new Date,n=i.getHours(),o=i.getMinutes(),l=n*60+o-e*60;if(l>=0&&l<=a){let u=l*t;this.currentTimeIndicator.style.top=`${u}px`;let c=this.currentTimeIndicator.querySelector(".albus-super-daily-notes-timeline-current-time-label");c&&(c.textContent=`${String(n).padStart(2,"0")}:${o.toString().padStart(2,"0")}`)}}async handleTaskDragUpdate(e,t,a){try{if(t.startTime===e.startTime&&t.endTime===e.endTime&&t.date===e.date)return;t.date!==e.date?(await this.plugin.taskService.deleteTask(t),await this.plugin.taskService.createTask(e,!0),new hi.Notice("\u65E5\u7A0B\u5DF2\u79FB\u52A8\u5230\u65B0\u65E5\u671F")):(await this.plugin.taskService.updateTask(e,t,!0),new hi.Notice("\u65E5\u7A0B\u65F6\u95F4\u5DF2\u66F4\u65B0")),a()}catch(i){console.error("Failed to update task:",i),a()}}async handleTaskCreate(e,t){this.openTaskModal({id:"",date:e.date||ne(this.currentDate),startTime:e.startTime||"09:00",endTime:e.endTime||"10:00",description:e.description||"",completed:!1},t)}getTagDisplayName(e){return this.plugin.settings.showOnlyLeafTag&&e.split("/").pop()||e}openTaskModal(e=null,t){new Th(this.app,{task:e&&e.id?e:null,initialData:e&&e.id?null:e,customTags:this.plugin.settings.customTags,onSubmit:async i=>{e&&e.id?await this.plugin.taskService.updateTask(i,e):await this.plugin.taskService.createTask(i),t()},onDelete:e&&e.id?async()=>{await this.plugin.taskService.deleteTask(e),t()}:void 0,showOnlyLeafTag:this.plugin.settings.showOnlyLeafTag}).open()}scrollToCurrentTime(){if(!this.contentContainer||this.viewMode!=="week")return;let e=new Date,t=e.getHours(),a=e.getMinutes(),s=(t*60+a-this.plugin.settings.dayStartHour*60)*2,l=this.contentContainer.clientHeight,u=s-l/2,c=this.contentContainer.scrollHeight-l,f=Math.max(0,Math.min(u,c));this.contentContainer.scrollTo({top:f,behavior:"smooth"})}updateTaskElementAppearance(e,t){t.completed?e.classList.add("albus-super-daily-notes-completed"):e.classList.remove("albus-super-daily-notes-completed");let a=this.getTaskDisplayColor(t);e.style.backgroundColor=a,e.style.setProperty("--task-bg-color",a);let i=e.querySelector('input[type="checkbox"]');i&&(i.checked=t.completed)}saveScrollPosition(){this.contentContainer&&(this.scrollPosition=this.contentContainer.scrollTop)}restoreScrollPosition(){this.contentContainer&&this.scrollPosition!==void 0&&requestAnimationFrame(()=>{this.contentContainer&&(this.contentContainer.scrollTop=this.scrollPosition)})}cleanup(){this.timeIndicatorInterval!==null&&(window.clearInterval(this.timeIndicatorInterval),this.timeIndicatorInterval=null)}};var Wi=require("obsidian");var _0=function(r,e){return _0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])},_0(r,e)};function I(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_0(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var t3=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),e3=(function(){function r(){this.browser=new t3,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!="undefined"}return r})(),io=new e3;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(io.wxa=!0,io.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?io.worker=!0:!io.hasGlobalWindow||"Deno"in window||typeof navigator!="undefined"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(io.node=!0,io.svgSupported=!0):r3(navigator.userAgent,io);function r3(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),i&&(t.ie=!0,t.version=i[1]),n&&(t.edge=!0,t.version=n[1],t.newEdge=+n[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect!="undefined",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document!="undefined";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var Lt=io;var Mh=12,b0="sans-serif",qr=Mh+"px "+b0,a3=20,i3=100,n3="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function o3(r){var e={};if(typeof JSON=="undefined")return e;for(var t=0;t<r.length;t++){var a=String.fromCharCode(t+32),i=(r.charCodeAt(t)-a3)/i3;e[a]=i}return e}var s3=o3(n3),Ke={createCanvas:function(){return typeof document!="undefined"&&document.createElement("canvas")},measureText:(function(){var r,e;return function(t,a){if(!r){var i=Ke.createCanvas();r=i&&i.getContext("2d")}if(r)return e!==a&&(e=r.font=a||qr),r.measureText(t);t=t||"",a=a||qr;var n=/((?:\d+)?\.?\d*)px/.exec(a),o=n&&+n[1]||Mh,s=0;if(a.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=s3[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,e,t){var a=new Image;return a.onload=e,a.onerror=t,a.src=r,a}};var mM=cr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),gM=cr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Wl=Object.prototype.toString,Ah=Array.prototype,l3=Ah.forEach,u3=Ah.filter,S0=Ah.slice,c3=Ah.map,dM=function(){}.constructor,Eh=dM?dM.prototype:null,w0="__proto__",f3=2311;function Lh(){return f3++}function ps(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console!="undefined"&&console.error.apply(console,r)}function tt(r){if(r==null||typeof r!="object")return r;var e=r,t=Wl.call(r);if(t==="[object Array]"){if(!Gc(r)){e=[];for(var a=0,i=r.length;a<i;a++)e[a]=tt(r[a])}}else if(gM[t]){if(!Gc(r)){var n=r.constructor;if(n.from)e=n.from(r);else{e=new n(r.length);for(var a=0,i=r.length;a<i;a++)e[a]=r[a]}}}else if(!mM[t]&&!Gc(r)&&!no(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==w0&&(e[o]=tt(r[o]))}return e}function dt(r,e,t){if(!et(e)||!et(r))return t?tt(e):r;for(var a in e)if(e.hasOwnProperty(a)&&a!==w0){var i=r[a],n=e[a];et(n)&&et(i)&&!z(n)&&!z(i)&&!no(n)&&!no(i)&&!vM(n)&&!vM(i)&&!Gc(n)&&!Gc(i)?dt(i,n,t):(t||!(a in r))&&(r[a]=tt(e[a]))}return r}function Yl(r,e){for(var t=r[0],a=1,i=r.length;a<i;a++)t=dt(t,r[a],e);return t}function O(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==w0&&(r[t]=e[t]);return r}function J(r,e,t){for(var a=gt(e),i=0,n=a.length;i<n;i++){var o=a[i];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}var pit=Ke.createCanvas;function lt(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,a=r.length;t<a;t++)if(r[t]===e)return t}return-1}function yM(r,e){var t=r.prototype;function a(){}a.prototype=e.prototype,r.prototype=new a;for(var i in t)t.hasOwnProperty(i)&&(r.prototype[i]=t[i]);r.prototype.constructor=r,r.superClass=e}function Jt(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var a=Object.getOwnPropertyNames(e),i=0;i<a.length;i++){var n=a[i];n!=="constructor"&&(t?e[n]!=null:r[n]==null)&&(r[n]=e[n])}else J(r,e,t)}function Ce(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function T(r,e,t){if(r&&e)if(r.forEach&&r.forEach===l3)r.forEach(e,t);else if(r.length===+r.length)for(var a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r);else for(var n in r)r.hasOwnProperty(n)&&e.call(t,r[n],n,r)}function V(r,e,t){if(!r)return[];if(!e)return Ih(r);if(r.map&&r.map===c3)return r.map(e,t);for(var a=[],i=0,n=r.length;i<n;i++)a.push(e.call(t,r[i],i,r));return a}function cr(r,e,t,a){if(r&&e){for(var i=0,n=r.length;i<n;i++)t=e.call(a,t,r[i],i,r);return t}}function At(r,e,t){if(!r)return[];if(!e)return Ih(r);if(r.filter&&r.filter===u3)return r.filter(e,t);for(var a=[],i=0,n=r.length;i<n;i++)e.call(t,r[i],i,r)&&a.push(r[i]);return a}function di(r,e,t){if(r&&e){for(var a=0,i=r.length;a<i;a++)if(e.call(t,r[a],a,r))return r[a]}}function gt(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 p3(r,e){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];return function(){return r.apply(e,t.concat(S0.call(arguments)))}}var Z=Eh&&$(Eh.bind)?Eh.call.bind(Eh.bind):p3;function ut(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(S0.call(arguments)))}}function z(r){return Array.isArray?Array.isArray(r):Wl.call(r)==="[object Array]"}function $(r){return typeof r=="function"}function W(r){return typeof r=="string"}function Wc(r){return Wl.call(r)==="[object String]"}function yt(r){return typeof r=="number"}function et(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function vM(r){return!!mM[Wl.call(r)]}function Ne(r){return!!gM[Wl.call(r)]}function no(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function oo(r){return r.colorStops!=null}function xM(r){return r.image!=null}function _M(r){return Wl.call(r)==="[object RegExp]"}function Me(r){return r!==r}function de(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,a=r.length;t<a;t++)if(r[t]!=null)return r[t]}function Q(r,e){return r!=null?r:e}function Te(r,e,t){return r!=null?r:e!=null?e:t}function Ih(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return S0.apply(r,e)}function so(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 ee(r,e){if(!r)throw new Error(e)}function Be(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var bM="__ec_primitive__";function hs(r){r[bM]=!0}function Gc(r){return r[bM]}var h3=(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 gt(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var a in t)t.hasOwnProperty(a)&&e(t[a],a)},r})(),SM=typeof Map=="function";function d3(){return SM?new Map:new h3}var v3=(function(){function r(e){var t=z(e);this.data=d3();var a=this;e instanceof r?e.each(i):e&&T(e,i);function i(n,o){t?a.set(n,o):a.set(o,n)}}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(a,i){e.call(t,a,i)})},r.prototype.keys=function(){var e=this.data.keys();return SM?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r})();function q(r){return new v3(r)}function Dn(r,e){for(var t=new r.constructor(r.length+e.length),a=0;a<r.length;a++)t[a]=r[a];for(var i=r.length,a=0;a<e.length;a++)t[a+i]=e[a];return t}function lo(r,e){var t;if(Object.create)t=Object.create(r);else{var a=function(){};a.prototype=r,t=new a}return e&&O(t,e),t}function Ph(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function it(r,e){return r.hasOwnProperty(e)}function ie(){}var Zl=180/Math.PI,hit=Number.EPSILON||Math.pow(2,-52);var T0=function(r,e){return T0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])},T0(r,e)};function kt(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");T0(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Yi(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Je(r,e){return r[0]=e[0],r[1]=e[1],r}function jr(r){return[r[0],r[1]]}function Yc(r,e,t){return r[0]=e,r[1]=t,r}function D0(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Zc(r,e,t,a){return r[0]=e[0]+t[0]*a,r[1]=e[1]+t[1]*a,r}function vi(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function kh(r){return Math.sqrt(m3(r))}function m3(r){return r[0]*r[0]+r[1]*r[1]}function Xl(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function Na(r,e){var t=kh(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Rh(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var Oa=Rh;function g3(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Cn=g3;function ql(r,e,t,a){return r[0]=e[0]+a*(t[0]-e[0]),r[1]=e[1]+a*(t[1]-e[1]),r}function ce(r,e,t){var a=e[0],i=e[1];return r[0]=t[0]*a+t[2]*i+t[4],r[1]=t[1]*a+t[3]*i+t[5],r}function ga(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function ya(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var jl=(function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r})(),y3=(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 jl(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var a=e.offsetX,i=e.offsetY,n=a-this._x,o=i-this._y;this._x=a,this._y=i,t.drift(n,o,e),this.handler.dispatchToElement(new jl(t,e),"drag",e.event);var s=this.handler.findHover(a,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new jl(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new jl(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new jl(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new jl(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r})(),wM=y3;var x3=(function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,a,i){this._$handlers||(this._$handlers={});var n=this._$handlers;if(typeof t=="function"&&(i=a,a=t,t=null),!a||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),n[e]||(n[e]=[]);for(var s=0;s<n[e].length;s++)if(n[e][s].h===a)return this;var l={h:a,query:t,ctx:i||this,callAtLast:a.zrEventfulCallAtLast},u=n[e].length-1,c=n[e][u];return c&&c.callAtLast?n[e].splice(u,0,l):n[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 a=this._$handlers;if(!a)return this;if(!e)return this._$handlers={},this;if(t){if(a[e]){for(var i=[],n=0,o=a[e].length;n<o;n++)a[e][n].h!==t&&i.push(a[e][n]);a[e]=i}a[e]&&a[e].length===0&&delete a[e]}else delete a[e];return this},r.prototype.trigger=function(e){for(var t=[],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(!this._$handlers)return this;var i=this._$handlers[e],n=this._$eventProcessor;if(i)for(var o=t.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(n&&n.filter&&u.query!=null&&!n.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 n&&n.afterTrigger&&n.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(!this._$handlers)return this;var i=this._$handlers[e],n=this._$eventProcessor;if(i)for(var o=t.length,s=t[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(n&&n.filter&&c.query!=null&&!n.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 n&&n.afterTrigger&&n.afterTrigger(e),this},r})(),Ue=x3;var _3=Math.log(2);function C0(r,e,t,a,i,n){var o=a+"-"+i,s=r.length;if(n.hasOwnProperty(o))return n[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/_3);return r[t][l]}for(var u=a|1<<t,c=t+1;a&1<<c;)c++;for(var f=0,p=0,h=0;p<s;p++){var d=1<<p;d&i||(f+=(h%2?-1:1)*r[t][p]*C0(r,e-1,c,u,i|d,n),h++)}return n[o]=f,f}function M0(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]]],a={},i=C0(t,8,0,0,0,a);if(i!==0){for(var n=[],o=0;o<8;o++)for(var s=0;s<8;s++)n[s]==null&&(n[s]=0),n[s]+=((o+s)%2?-1:1)*C0(t,7,o===0?1:0,1<<o,1<<s,a)/i*e[o];return function(l,u,c){var f=u*n[6]+c*n[7]+1;l[0]=(u*n[0]+c*n[1]+n[2])/f,l[1]=(u*n[3]+c*n[4]+n[5])/f}}}var Nh="___zrEVENTSAVED",E0=[];function TM(r,e,t,a,i){return Oh(E0,e,a,i,!0)&&Oh(r,t,E0[0],E0[1])}function DM(r,e){r&&t(r),e&&t(e);function t(a){var i=a[Nh];i&&(i.clearMarkers&&i.clearMarkers(),delete a[Nh])}}function Oh(r,e,t,a,i){if(e.getBoundingClientRect&&Lt.domSupported&&!A0(e)){var n=e[Nh]||(e[Nh]={}),o=b3(e,n),s=S3(o,n,i);if(s)return s(r,t,a),!0}return!1}function b3(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var a=["left","right"],i=["top","bottom"],n=0;n<4;n++){var o=document.createElement("div"),s=o.style,l=n%2,u=(n>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){T(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function S3(r,e,t){for(var a=t?"invTrans":"trans",i=e[a],n=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,p=c.left,h=c.top;o.push(p,h),l=l&&n&&p===n[f]&&h===n[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[a]=t?M0(s,o):M0(o,s))}function A0(r){return r.nodeName.toUpperCase()==="CANVAS"}var w3=/([&<>"'])/g,T3={"&":"&","<":"<",">":">",'"':""","'":"'"};function We(r){return r==null?"":(r+"").replace(w3,function(e,t){return T3[t]})}var D3=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,L0=[],C3=Lt.browser.firefox&&+Lt.browser.version.split(".")[0]<39;function zh(r,e,t,a){return t=t||{},a?CM(r,e,t):C3&&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):CM(r,e,t),t}function CM(r,e,t){if(Lt.domSupported&&r.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(A0(r)){var n=r.getBoundingClientRect();t.zrX=a-n.left,t.zrY=i-n.top;return}else if(Oh(L0,r,a,i)){t.zrX=L0[0],t.zrY=L0[1];return}}t.zrX=t.zrY=0}function Vh(r){return r||window.event}function $r(r,e,t){if(e=Vh(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(i){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&zh(r,o,e,t)}else{zh(r,e,e,t);var n=M3(e);e.zrDelta=n?n/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&D3.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function M3(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var i=Math.abs(a!==0?a:t),n=a>0?-1:a<0?1:t>0?-1:1;return 3*i*n}function Xc(r,e,t,a){r.addEventListener(e,t,a)}function MM(r,e,t,a){r.removeEventListener(e,t,a)}var Kr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function I0(r){return r.which===2||r.which===3}var AM=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var i=e.touches;if(i){for(var n={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=zh(a,l,{});n.points.push([u.zrX,u.zrY]),n.touches.push(l)}this._track.push(n)}},r.prototype._recognize=function(e){for(var t in P0)if(P0.hasOwnProperty(t)){var a=P0[t](this._track,e);if(a)return a}},r})();function EM(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function E3(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var P0={pinch:function(r,e){var t=r.length;if(t){var a=(r[t-1]||{}).points,i=(r[t-2]||{}).points||a;if(i&&i.length>1&&a&&a.length>1){var n=EM(a)/EM(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=E3(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function fe(){return[1,0,0,1,0,0]}function uo(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function ds(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 fr(r,e,t){var a=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],n=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]=a,r[1]=i,r[2]=n,r[3]=o,r[4]=s,r[5]=l,r}function pr(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 Sr(r,e,t,a){a===void 0&&(a=[0,0]);var i=e[0],n=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]=i*f+s*c,r[1]=-i*c+s*f,r[2]=n*f+l*c,r[3]=-n*c+f*l,r[4]=f*(o-a[0])+c*(u-a[1])+a[0],r[5]=f*(u-a[1])-c*(o-a[0])+a[1],r}function Kl(r,e,t){var a=t[0],i=t[1];return r[0]=e[0]*a,r[1]=e[1]*i,r[2]=e[2]*a,r[3]=e[3]*i,r[4]=e[4]*a,r[5]=e[5]*i,r}function Fe(r,e){var t=e[0],a=e[2],i=e[4],n=e[1],o=e[3],s=e[5],l=t*o-n*a;return l?(l=1/l,r[0]=o*l,r[1]=-n*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*i)*l,r[5]=(n*i-t*s)*l,r):null}function LM(r){var e=fe();return ds(e,r),e}var A3=(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,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},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,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+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,a){e.x=t,e.y=a},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,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,i){e.x=t.x+a.x*i,e.y=t.y+a.y*i},r.lerp=function(e,t,a,i){var n=1-i;e.x=n*t.x+i*a.x,e.y=n*t.y+i*a.y},r})(),pt=A3;var xs=Math.min,Jl=Math.max,k0=Math.abs,IM=["x","y"],L3=["width","height"],vs=new pt,ms=new pt,gs=new pt,ys=new pt,xa=O0(),qc=xa.minTv,R0=xa.maxTv,jc=[0,0],N0=(function(){function r(e,t,a,i){r.set(this,e,t,a,i)}return r.set=function(e,t,a,i,n){return i<0&&(t=t+i,i=-i),n<0&&(a=a+n,n=-n),e.x=t,e.y=a,e.width=i,e.height=n,e},r.prototype.union=function(e){var t=xs(e.x,this.x),a=xs(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Jl(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Jl(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,i=e.height/t.height,n=fe();return pr(n,n,[-t.x,-t.y]),Kl(n,n,[a,i]),pr(n,n,[e.x,e.y]),n},r.prototype.intersect=function(e,t,a){return r.intersect(this,e,t,a)},r.intersect=function(e,t,a,i){a&&pt.set(a,0,0);var n=i&&i.outIntersectRect||null,o=i&&i.clamp;if(n&&(n.x=n.y=n.width=n.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(I3,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(P3,t.x,t.y,t.width,t.height));var s=!!a;xa.reset(i,s);var l=xa.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,p=e.y+e.height-l,h=t.x+l,d=t.x+t.width-l,v=t.y+l,m=t.y+t.height-l;if(u>c||f>p||h>d||v>m)return!1;var g=!(c<h||d<u||p<v||m<f);return(s||n)&&(jc[0]=1/0,jc[1]=0,PM(u,c,h,d,0,s,n,o),PM(f,p,v,m,1,s,n,o),s&&pt.copy(a,g?xa.useDir?xa.dirMinTv:qc:R0)),g},r.contain=function(e,t,a){return t>=e.x&&t<=e.x+e.width&&a>=e.y&&a<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},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){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var i=a[0],n=a[3],o=a[4],s=a[5];e.x=t.x*i+o,e.y=t.y*n+s,e.width=t.width*i,e.height=t.height*n,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}vs.x=gs.x=t.x,vs.y=ys.y=t.y,ms.x=ys.x=t.x+t.width,ms.y=gs.y=t.y+t.height,vs.transform(a),ys.transform(a),ms.transform(a),gs.transform(a),e.x=xs(vs.x,ms.x,gs.x,ys.x),e.y=xs(vs.y,ms.y,gs.y,ys.y);var l=Jl(vs.x,ms.x,gs.x,ys.x),u=Jl(vs.y,ms.y,gs.y,ys.y);e.width=l-e.x,e.height=u-e.y},r})(),I3=new N0(0,0,0,0),P3=new N0(0,0,0,0);function PM(r,e,t,a,i,n,o,s){var l=k0(e-t),u=k0(a-r),c=xs(l,u),f=IM[i],p=IM[1-i],h=L3[i];e<t||a<r?l<u?(n&&(R0[f]=-l),s&&(o[f]=e,o[h]=0)):(n&&(R0[f]=u),s&&(o[f]=r,o[h]=0)):(o&&(o[f]=Jl(r,t),o[h]=xs(e,a)-o[f]),n&&(c<jc[0]||xa.useDir)&&(jc[0]=xs(c,jc[0]),(l<u||!xa.bidirectional)&&(qc[f]=l,qc[p]=0,xa.useDir&&xa.calcDirMTV()),(l>=u||!xa.bidirectional)&&(qc[f]=-u,qc[p]=0,xa.useDir&&xa.calcDirMTV())))}function O0(){var r=0,e=new pt,t=new pt,a={minTv:new pt,maxTv:new pt,useDir:!1,dirMinTv:new pt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(n,o){a.touchThreshold=0,n&&n.touchThreshold!=null&&(a.touchThreshold=Jl(0,n.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,n&&n.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),t.copy(a.minTv),r=n.direction,a.bidirectional=n.bidirectional==null||!!n.bidirectional,a.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var n=a.minTv,o=a.dirMinTv,s=n.y*n.y+n.x*n.x,l=Math.sin(r),u=Math.cos(r),c=l*n.y+u*n.x;if(i(c)){i(n.x)&&i(n.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,i(t.x)&&i(t.y)){o.set(0,0);return}(a.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function i(n){return k0(n)<1e-10}return a}var at=N0;var RM="silent";function k3(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:R3}}function R3(){Kr(this.event)}var N3=(function(r){kt(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})(Ue),$c=(function(){function r(e,t){this.x=e,this.y=t}return r})(),O3=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],z0=new at(0,0,0,0),NM=(function(r){kt(e,r);function e(t,a,i,n,o){var s=r.call(this)||this;return s._hovered=new $c(0,0),s.storage=t,s.painter=a,s.painterRoot=n,s._pointerSize=o,i=i||new N3,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new wM(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(T(O3,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,i=t.zrY,n=OM(this,a,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=n?new $c(a,i):this.findHover(a,i),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 a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new $c(0,0)},e.prototype.dispatch=function(t,a){var i=this[t];i&&i.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,i){t=t||{};var n=t.target;if(!(n&&n.silent)){for(var o="on"+a,s=k3(a,t,i);n&&(n[o]&&(s.cancelBubble=!!n[o].call(n,s)),n.trigger(a,s),n=n.__hostTarget?n.__hostTarget:n.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,i){var n=this.storage.getDisplayList(),o=new $c(t,a);if(kM(n,o,t,a,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new at(t-u,a-u,l,l),f=n.length-1;f>=0;f--){var p=n[f];p!==i&&!p.ignore&&!p.ignoreCoarsePointer&&(!p.parent||!p.parent.ignoreCoarsePointer)&&(z0.copy(p.getBoundingRect()),p.transform&&z0.applyTransform(p.transform),z0.intersect(c)&&s.push(p))}if(s.length)for(var h=4,d=Math.PI/12,v=Math.PI*2,m=0;m<u;m+=h)for(var g=0;g<v;g+=d){var y=t+m*Math.cos(g),x=a+m*Math.sin(g);if(kM(s,o,y,x,i),o.target)return o}}return o},e.prototype.processGesture=function(t,a){this._gestureMgr||(this._gestureMgr=new AM);var i=this._gestureMgr;a==="start"&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(a==="end"&&i.clear(),n){var o=n.type;t.gestureEvent=o;var s=new $c;s.target=n.target,this.dispatchToElement(s,o,n.event)}},e})(Ue);T(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){NM.prototype[r]=function(e){var t=e.zrX,a=e.zrY,i=OM(this,t,a),n,o;if((r!=="mouseup"||!i)&&(n=this.findHover(t,a),o=n.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||Oa(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,r,e)}});function z3(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,i=void 0,n=!1;a;){if(a.ignoreClip&&(n=!0),!n){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1}a.silent&&(i=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return i?RM:!0}return!1}function kM(r,e,t,a,i){for(var n=r.length-1;n>=0;n--){var o=r[n],s=void 0;if(o!==i&&!o.ignore&&(s=z3(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==RM)){e.target=o;break}}}function OM(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}var zM=NM;var UM=32,Kc=7;function V3(r){for(var e=0;r>=UM;)e|=r&1,r>>=1;return r+e}function VM(r,e,t,a){var i=e+1;if(i===t)return 1;if(a(r[i++],r[e])<0){for(;i<t&&a(r[i],r[i-1])<0;)i++;B3(r,e,i)}else for(;i<t&&a(r[i],r[i-1])>=0;)i++;return i-e}function B3(r,e,t){for(t--;e<t;){var a=r[e];r[e++]=r[t],r[t--]=a}}function BM(r,e,t,a,i){for(a===e&&a++;a<t;a++){for(var n=r[a],o=e,s=a,l;o<s;)l=o+s>>>1,i(n,r[l])<0?s=l:o=l+1;var u=a-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]=n}}function V0(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])>0){for(s=a-i;l<s&&n(r,e[t+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&n(r,e[t+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);n(r,e[t+c])>0?o=c+1:l=c}return l}function B0(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])<0){for(s=i+1;l<s&&n(r,e[t+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l<s&&n(r,e[t+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);n(r,e[t+c])<0?l=c:o=c+1}return l}function U3(r,e){var t=Kc,a,i,n=0,o=[];a=[],i=[];function s(h,d){a[n]=h,i[n]=d,n+=1}function l(){for(;n>1;){var h=n-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]<i[h+1]&&h--;else if(i[h]>i[h+1])break;c(h)}}function u(){for(;n>1;){var h=n-2;h>0&&i[h-1]<i[h+1]&&h--,c(h)}}function c(h){var d=a[h],v=i[h],m=a[h+1],g=i[h+1];i[h]=v+g,h===n-3&&(a[h+1]=a[h+2],i[h+1]=i[h+2]),n--;var y=B0(r[m],r,d,v,0,e);d+=y,v-=y,v!==0&&(g=V0(r[d+v-1],r,m,g,g-1,e),g!==0&&(v<=g?f(d,v,m,g):p(d,v,m,g)))}function f(h,d,v,m){var g=0;for(g=0;g<d;g++)o[g]=r[h+g];var y=0,x=v,_=h;if(r[_++]=r[x++],--m===0){for(g=0;g<d;g++)r[_+g]=o[y+g];return}if(d===1){for(g=0;g<m;g++)r[_+g]=r[x+g];r[_+m]=o[y];return}for(var b=t,S,w,D;;){S=0,w=0,D=!1;do if(e(r[x],o[y])<0){if(r[_++]=r[x++],w++,S=0,--m===0){D=!0;break}}else if(r[_++]=o[y++],S++,w=0,--d===1){D=!0;break}while((S|w)<b);if(D)break;do{if(S=B0(r[x],o,y,d,0,e),S!==0){for(g=0;g<S;g++)r[_+g]=o[y+g];if(_+=S,y+=S,d-=S,d<=1){D=!0;break}}if(r[_++]=r[x++],--m===0){D=!0;break}if(w=V0(o[y],r,x,m,0,e),w!==0){for(g=0;g<w;g++)r[_+g]=r[x+g];if(_+=w,x+=w,m-=w,m===0){D=!0;break}}if(r[_++]=o[y++],--d===1){D=!0;break}b--}while(S>=Kc||w>=Kc);if(D)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),d===1){for(g=0;g<m;g++)r[_+g]=r[x+g];r[_+m]=o[y]}else{if(d===0)throw new Error;for(g=0;g<d;g++)r[_+g]=o[y+g]}}function p(h,d,v,m){var g=0;for(g=0;g<m;g++)o[g]=r[v+g];var y=h+d-1,x=m-1,_=v+m-1,b=0,S=0;if(r[_--]=r[y--],--d===0){for(b=_-(m-1),g=0;g<m;g++)r[b+g]=o[g];return}if(m===1){for(_-=d,y-=d,S=_+1,b=y+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[_]=o[x];return}for(var w=t;;){var D=0,C=0,M=!1;do if(e(o[x],r[y])<0){if(r[_--]=r[y--],D++,C=0,--d===0){M=!0;break}}else if(r[_--]=o[x--],C++,D=0,--m===1){M=!0;break}while((D|C)<w);if(M)break;do{if(D=d-B0(o[x],r,h,d,d-1,e),D!==0){for(_-=D,y-=D,d-=D,S=_+1,b=y+1,g=D-1;g>=0;g--)r[S+g]=r[b+g];if(d===0){M=!0;break}}if(r[_--]=o[x--],--m===1){M=!0;break}if(C=m-V0(r[y],o,0,m,m-1,e),C!==0){for(_-=C,x-=C,m-=C,S=_+1,b=x+1,g=0;g<C;g++)r[S+g]=o[b+g];if(m<=1){M=!0;break}}if(r[_--]=r[y--],--d===0){M=!0;break}w--}while(D>=Kc||C>=Kc);if(M)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),m===1){for(_-=d,y-=d,S=_+1,b=y+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[_]=o[x]}else{if(m===0)throw new Error;for(b=_-(m-1),g=0;g<m;g++)r[b+g]=o[g]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function _s(r,e,t,a){t||(t=0),a||(a=r.length);var i=a-t;if(!(i<2)){var n=0;if(i<UM){n=VM(r,t,a,e),BM(r,t,a,t+n,e);return}var o=U3(r,e),s=V3(i);do{if(n=VM(r,t,a,e),n<s){var l=i;l>s&&(l=s),BM(r,t,t+l,t+n,e),n=l}o.pushRun(t,n),o.mergeRuns(),i-=n,t+=n}while(i!==0);o.forceMergeRuns()}}var Ye=1,bs=2,co=4;var FM=!1;function U0(){FM||(FM=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function HM(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var F3=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=HM}return r.prototype.traverse=function(e,t){for(var a=0;a<this._roots.length;a++)this._roots[a].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var a=this._displayList;return(e||!a.length)&&this.updateDisplayList(t),a},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,a=this._displayList,i=0,n=t.length;i<n;i++)this._updateAndAddDisplayable(t[i],null,e);a.length=this._displayListLen,_s(a,HM)},r.prototype._updateAndAddDisplayable=function(e,t,a){if(!(e.ignore&&!a)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),n=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(n||i)){if(s||(s=e.__clipPaths=[]),n)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=i,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var f=e.childrenRef(),p=0;p<f.length;p++){var h=f[p];e.__dirty&&(h.__dirty|=Ye),this._updateAndAddDisplayable(h,s,a)}e.__dirty=0}else{var d=e;isNaN(d.z)&&(U0(),d.z=0),isNaN(d.z2)&&(U0(),d.z2=0),isNaN(d.zlevel)&&(U0(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var v=e.getDecalElement&&e.getDecalElement();v&&this._updateAndAddDisplayable(v,s,a);var m=e.getTextGuideLine();m&&this._updateAndAddDisplayable(m,s,a);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,s,a)}},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,a=e.length;t<a;t++)this.delRoot(e[t]);return}var i=lt(this._roots,e);i>=0&&this._roots.splice(i,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})(),GM=F3;var WM;WM=Lt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Jc=WM;var Bh={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,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*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)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.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-Bh.bounceOut(1-r)},bounceOut:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},bounceInOut:function(r){return r<.5?Bh.bounceIn(r*2)*.5:Bh.bounceOut(r*2-1)*.5+.5}},Uh=Bh;var Fh=Math.pow,po=Math.sqrt,Gh=1e-8,ZM=1e-4,YM=po(3),Hh=1/3,Zi=Yi(),za=Yi(),Ql=Yi();function fo(r){return r>-Gh&&r<Gh}function XM(r){return r>Gh||r<-Gh}function Ee(r,e,t,a,i){var n=1-i;return n*n*(n*r+3*i*e)+i*i*(i*a+3*n*t)}function F0(r,e,t,a,i){var n=1-i;return 3*(((e-r)*n+2*(t-e)*i)*n+(a-t)*i*i)}function Ss(r,e,t,a,i,n){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,c=s*s-3*o*l,f=s*l-9*o*u,p=l*l-3*s*u,h=0;if(fo(c)&&fo(f))if(fo(s))n[0]=0;else{var d=-l/s;d>=0&&d<=1&&(n[h++]=d)}else{var v=f*f-4*c*p;if(fo(v)){var m=f/c,d=-s/o+m,g=-m/2;d>=0&&d<=1&&(n[h++]=d),g>=0&&g<=1&&(n[h++]=g)}else if(v>0){var y=po(v),x=c*s+1.5*o*(-f+y),_=c*s+1.5*o*(-f-y);x<0?x=-Fh(-x,Hh):x=Fh(x,Hh),_<0?_=-Fh(-_,Hh):_=Fh(_,Hh);var d=(-s-(x+_))/(3*o);d>=0&&d<=1&&(n[h++]=d)}else{var b=(2*c*s-3*o*f)/(2*po(c*c*c)),S=Math.acos(b)/3,w=po(c),D=Math.cos(S),d=(-s-2*w*D)/(3*o),g=(-s+w*(D+YM*Math.sin(S)))/(3*o),C=(-s+w*(D-YM*Math.sin(S)))/(3*o);d>=0&&d<=1&&(n[h++]=d),g>=0&&g<=1&&(n[h++]=g),C>=0&&C<=1&&(n[h++]=C)}}return h}function Wh(r,e,t,a,i){var n=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(fo(o)){if(XM(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var c=n*n-4*o*s;if(fo(c))i[0]=-n/(2*o);else if(c>0){var f=po(c),u=(-n+f)/(2*o),p=(-n-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function Va(r,e,t,a,i,n){var o=(e-r)*i+r,s=(t-e)*i+e,l=(a-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;n[0]=r,n[1]=o,n[2]=u,n[3]=f,n[4]=f,n[5]=c,n[6]=l,n[7]=a}function Yh(r,e,t,a,i,n,o,s,l,u,c){var f,p=.005,h=1/0,d,v,m,g;Zi[0]=l,Zi[1]=u;for(var y=0;y<1;y+=.05)za[0]=Ee(r,t,i,o,y),za[1]=Ee(e,a,n,s,y),m=Cn(Zi,za),m<h&&(f=y,h=m);h=1/0;for(var x=0;x<32&&!(p<ZM);x++)d=f-p,v=f+p,za[0]=Ee(r,t,i,o,d),za[1]=Ee(e,a,n,s,d),m=Cn(za,Zi),d>=0&&m<h?(f=d,h=m):(Ql[0]=Ee(r,t,i,o,v),Ql[1]=Ee(e,a,n,s,v),g=Cn(Ql,Zi),v<=1&&g<h?(f=v,h=g):p*=.5);return c&&(c[0]=Ee(r,t,i,o,f),c[1]=Ee(e,a,n,s,f)),po(h)}function qM(r,e,t,a,i,n,o,s,l){for(var u=r,c=e,f=0,p=1/l,h=1;h<=l;h++){var d=h*p,v=Ee(r,t,i,o,d),m=Ee(e,a,n,s,d),g=v-u,y=m-c;f+=Math.sqrt(g*g+y*y),u=v,c=m}return f}function Pe(r,e,t,a){var i=1-a;return i*(i*r+2*a*e)+a*a*t}function Qc(r,e,t,a){return 2*((1-a)*(e-r)+a*(t-e))}function jM(r,e,t,a,i){var n=r-2*e+t,o=2*(e-r),s=r-a,l=0;if(fo(n)){if(XM(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*n*s;if(fo(c)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=po(c),u=(-o+f)/(2*n),p=(-o-f)/(2*n);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function Zh(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function ho(r,e,t,a,i){var n=(e-r)*a+r,o=(t-e)*a+e,s=(o-n)*a+n;i[0]=r,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function Xh(r,e,t,a,i,n,o,s,l){var u,c=.005,f=1/0;Zi[0]=o,Zi[1]=s;for(var p=0;p<1;p+=.05){za[0]=Pe(r,t,i,p),za[1]=Pe(e,a,n,p);var h=Cn(Zi,za);h<f&&(u=p,f=h)}f=1/0;for(var d=0;d<32&&!(c<ZM);d++){var v=u-c,m=u+c;za[0]=Pe(r,t,i,v),za[1]=Pe(e,a,n,v);var h=Cn(za,Zi);if(v>=0&&h<f)u=v,f=h;else{Ql[0]=Pe(r,t,i,m),Ql[1]=Pe(e,a,n,m);var g=Cn(Ql,Zi);m<=1&&g<f?(u=m,f=g):c*=.5}}return l&&(l[0]=Pe(r,t,i,u),l[1]=Pe(e,a,n,u)),po(f)}function $M(r,e,t,a,i,n,o){for(var s=r,l=e,u=0,c=1/o,f=1;f<=o;f++){var p=f*c,h=Pe(r,t,i,p),d=Pe(e,a,n,p),v=h-s,m=d-l;u+=Math.sqrt(v*v+m*m),s=h,l=d}return u}var H3=/cubic-bezier\(([0-9,\.e ]+)\)/;function tu(r){var e=r&&H3.exec(r);if(e){var t=e[1].split(","),a=+Be(t[0]),i=+Be(t[1]),n=+Be(t[2]),o=+Be(t[3]);if(isNaN(a+i+n+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Ss(0,a,n,1,l,s)&&Ee(0,i,o,1,s[0])}}}var G3=(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||ie,this.ondestroy=e.ondestroy||ie,this.onrestart=e.onrestart||ie,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 a=this._life,i=e-this._startTime-this._pausedTime,n=i/a;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,s=o?o(n):n;if(this.onframe(s),n===1)if(this.loop){var l=i%a;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=$(e)?e:Uh[e]||tu(e)},r})(),KM=G3;var JM=(function(){function r(e){this.value=e}return r})();var W3=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new JM(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,a=e.next;t?t.next=a:this.head=a,a?a.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})();var Y3=(function(){function r(e){this._list=new W3,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,i=this._map,n=null;if(i[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete i[l.key],n=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new JM(t),s.key=e,a.insertEntry(s),i[e]=s}return n},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Xi=Y3;var QM={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 mi(r){return r=Math.round(r),r<0?0:r>255?255:r}function Z3(r){return r=Math.round(r),r<0?0:r>360?360:r}function ef(r){return r<0?0:r>1?1:r}function H0(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?mi(parseFloat(e)/100*255):mi(parseInt(e,10))}function Mn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ef(parseFloat(e)/100):ef(parseFloat(e))}function G0(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 vo(r,e,t){return r+(e-r)*t}function Ba(r,e,t,a,i){return r[0]=e,r[1]=t,r[2]=a,r[3]=i,r}function W0(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var eE=new Xi(20),qh=null;function eu(r,e){qh&&W0(qh,e),qh=eE.put(r,qh||e.slice())}function Ze(r,e){if(r){e=e||[];var t=eE.get(r);if(t)return W0(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in QM)return W0(e,QM[a]),eu(r,e),e;var i=a.length;if(a.charAt(0)==="#"){if(i===4||i===5){var n=parseInt(a.slice(1,4),16);if(!(n>=0&&n<=4095)){Ba(e,0,0,0,1);return}return Ba(e,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,i===5?parseInt(a.slice(4),16)/15:1),eu(r,e),e}else if(i===7||i===9){var n=parseInt(a.slice(1,7),16);if(!(n>=0&&n<=16777215)){Ba(e,0,0,0,1);return}return Ba(e,(n&16711680)>>16,(n&65280)>>8,n&255,i===9?parseInt(a.slice(7),16)/255:1),eu(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===i){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ba(e,+u[0],+u[1],+u[2],1):Ba(e,0,0,0,1);c=Mn(u.pop());case"rgb":if(u.length>=3)return Ba(e,H0(u[0]),H0(u[1]),H0(u[2]),u.length===3?c:Mn(u[3])),eu(r,e),e;Ba(e,0,0,0,1);return;case"hsla":if(u.length!==4){Ba(e,0,0,0,1);return}return u[3]=Mn(u[3]),Y0(u,e),eu(r,e),e;case"hsl":if(u.length!==3){Ba(e,0,0,0,1);return}return Y0(u,e),eu(r,e),e;default:return}}Ba(e,0,0,0,1)}}function Y0(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=Mn(r[1]),i=Mn(r[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],Ba(e,mi(G0(o,n,t+1/3)*255),mi(G0(o,n,t)*255),mi(G0(o,n,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function X3(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,i=Math.min(e,t,a),n=Math.max(e,t,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var c=((n-e)/6+o/2)/o,f=((n-t)/6+o/2)/o,p=((n-a)/6+o/2)/o;e===n?l=p-f:t===n?l=1/3+c-p:a===n&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function jh(r,e){var t=Ze(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return Jr(t,t.length===4?"rgba":"rgb")}}function $h(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return t[0]=mi(vo(o[0],s[0],l)),t[1]=mi(vo(o[1],s[1],l)),t[2]=mi(vo(o[2],s[2],l)),t[3]=ef(vo(o[3],s[3],l)),t}}function rE(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=Ze(e[i]),s=Ze(e[n]),l=a-i,u=Jr([mi(vo(o[0],s[0],l)),mi(vo(o[1],s[1],l)),mi(vo(o[2],s[2],l)),ef(vo(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}function Ua(r,e,t,a){var i=Ze(r);if(r)return i=X3(i),e!=null&&(i[0]=Z3($(e)?e(i[0]):e)),t!=null&&(i[1]=Mn($(t)?t(i[1]):t)),a!=null&&(i[2]=Mn($(a)?a(i[2]):a)),Jr(Y0(i),"rgba")}function ws(r,e){var t=Ze(r);if(t&&e!=null)return t[3]=ef(e),Jr(t,"rgba")}function Jr(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 ru(r,e){var t=Ze(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var tE=new Xi(100);function rf(r){if(W(r)){var e=tE.get(r);return e||(e=jh(r,-.1),tE.put(r,e)),e}else if(oo(r)){var t=O({},r);return t.colorStops=V(r.colorStops,function(a){return{offset:a.offset,color:jh(a.color,-.1)}}),t}return r}var Qh=Math.round;function mo(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Ze(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e==null?1:e}}var aE=1e-4;function qi(r){return r<aE&&r>-aE}function Jh(r){return Qh(r*1e3)/1e3}function td(r){return Qh(r*1e4)/1e4}function iE(r){return"matrix("+Jh(r[0])+","+Jh(r[1])+","+Jh(r[2])+","+Jh(r[3])+","+td(r[4])+","+td(r[5])+")"}var nE={left:"start",right:"end",center:"middle",middle:"middle"};function oE(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function sE(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function lE(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 Z0(r){return r&&!!r.image}function q3(r){return r&&!!r.svgElement}function af(r){return Z0(r)||q3(r)}function ed(r){return r.type==="linear"}function rd(r){return r.type==="radial"}function ad(r){return r&&(r.type==="linear"||r.type==="radial")}function nf(r){return"url(#"+r+")"}function id(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 nd(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Zl,i=Q(r.scaleX,1),n=Q(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(i!==1||n!==1)&&l.push("scale("+i+","+n+")"),(o||s)&&l.push("skew("+Qh(o*Zl)+"deg, "+Qh(s*Zl)+"deg)"),l.join(" ")}var uE=(function(){return Lt.hasGlobalWindow&&$(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var q0=Array.prototype.slice;function En(r,e,t){return(e-r)*t+r}function X0(r,e,t,a){for(var i=e.length,n=0;n<i;n++)r[n]=En(e[n],t[n],a);return r}function j3(r,e,t,a){for(var i=e.length,n=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<n;s++)r[o][s]=En(e[o][s],t[o][s],a)}return r}function od(r,e,t,a){for(var i=e.length,n=0;n<i;n++)r[n]=e[n]+t[n]*a;return r}function cE(r,e,t,a){for(var i=e.length,n=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<n;s++)r[o][s]=e[o][s]+t[o][s]*a}return r}function $3(r,e){for(var t=r.length,a=e.length,i=t>a?e:r,n=Math.min(t,a),o=i[n-1]||{color:[0,0,0,0],offset:0},s=n;s<Math.max(t,a);s++)i.push({offset:o.offset,color:o.color.slice()})}function K3(r,e,t){var a=r,i=e;if(!(!a.push||!i.push)){var n=a.length,o=i.length;if(n!==o){var s=n>o;if(s)a.length=o;else for(var l=n;l<o;l++)a.push(t===1?i[l]:q0.call(i[l]))}for(var u=a[0]&&a[0].length,l=0;l<a.length;l++)if(t===1)isNaN(a[l])&&(a[l]=i[l]);else for(var c=0;c<u;c++)isNaN(a[l][c])&&(a[l][c]=i[l][c])}}function Ts(r){if(Ce(r)){var e=r.length;if(Ce(r[0])){for(var t=[],a=0;a<e;a++)t.push(q0.call(r[a]));return t}return q0.call(r)}return r}function ud(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 J3(r){return Ce(r&&r[0])?2:1}var sd=0,cd=1,hE=2,sf=3,j0=4,$0=5,fE=6;function pE(r){return r===j0||r===$0}function ld(r){return r===cd||r===hE}var of=[0,0,0,0],Q3=(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,a){this._needsSort=!0;var i=this.keyframes,n=i.length,o=!1,s=fE,l=t;if(Ce(t)){var u=J3(t);s=u,(u===1&&!yt(t[0])||u===2&&!yt(t[0][0]))&&(o=!0)}else if(yt(t)&&!Me(t))s=sd;else if(W(t))if(!isNaN(+t))s=sd;else{var c=Ze(t);c&&(l=c,s=sf)}else if(oo(t)){var f=O({},l);f.colorStops=V(t.colorStops,function(h){return{offset:h.offset,color:Ze(h.color)}}),ed(t)?s=j0:rd(t)&&(s=$0),l=f}n===0?this.valType=s:(s!==this.valType||s===fE)&&(o=!0),this.discrete=this.discrete||o;var p={time:e,value:l,rawValue:t,percent:0};return a&&(p.easing=a,p.easingFunc=$(a)?a:Uh[a]||tu(a)),i.push(p),p},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(v,m){return v.time-m.time});for(var i=this.valType,n=a.length,o=a[n-1],s=this.discrete,l=ld(i),u=pE(i),c=0;c<n;c++){var f=a[c],p=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==n-1?K3(p,h,i):u&&$3(p.colorStops,h.colorStops))}if(!s&&i!==$0&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var d=a[0].value,c=0;c<n;c++)i===sd?a[c].additiveValue=a[c].value-d:i===sf?a[c].additiveValue=od([],a[c].value,d,-1):ld(i)&&(a[c].additiveValue=i===cd?od([],a[c].value,d,-1):cE([],a[c].value,d,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var a=this._additiveTrack!=null,i=a?"additiveValue":"value",n=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=n===sf,c,f=this._lastFr,p=Math.min,h,d;if(s===1)h=d=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var v=p(f+1,s-1);for(c=v;c>=0&&!(o[c].percent<=t);c--);c=p(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=p(c-1,s-2)}d=o[c+1],h=o[c]}if(h&&d){this._lastFr=c,this._lastFrP=t;var m=d.percent-h.percent,g=m===0?1:p((t-h.percent)/m,1);d.easingFunc&&(g=d.easingFunc(g));var y=a?this._additiveValue:u?of:e[l];if((ld(n)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=g<1?h.rawValue:d.rawValue;else if(ld(n))n===cd?X0(y,h[i],d[i],g):j3(y,h[i],d[i],g);else if(pE(n)){var x=h[i],_=d[i],b=n===j0;e[l]={type:b?"linear":"radial",x:En(x.x,_.x,g),y:En(x.y,_.y,g),colorStops:V(x.colorStops,function(w,D){var C=_.colorStops[D];return{offset:En(w.offset,C.offset,g),color:ud(X0([],w.color,C.color,g))}}),global:_.global},b?(e[l].x2=En(x.x2,_.x2,g),e[l].y2=En(x.y2,_.y2,g)):e[l].r=En(x.r,_.r,g)}else if(u)X0(y,h[i],d[i],g),a||(e[l]=ud(y));else{var S=En(h[i],d[i],g);a?this._additiveValue=S:e[l]=S}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,i=this._additiveValue;t===sd?e[a]=e[a]+i:t===sf?(Ze(e[a],of),od(of,of,i,1),e[a]=ud(of)):t===cd?od(e[a],e[a],i,1):t===hE&&cE(e[a],e[a],i,1)},r})(),tW=(function(){function r(e,t,a,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){ps("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=a}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,a){return this.whenWithKeys(e,t,gt(t),a)},r.prototype.whenWithKeys=function(e,t,a,i){for(var n=this._tracks,o=0;o<a.length;o++){var s=a[o],l=n[s];if(!l){l=n[s]=new Q3(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,p=f[f.length-1];u=p&&p.value,c.valType===sf&&u&&(u=ud(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Ts(u),i),this._trackKeys.push(s)}l.addKeyframe(e,Ts(t[s]),i)}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,a=0;a<t;a++)e[a].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 a=0;a<t.length;a++)t[a].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,a=0;a<t.length;a++)e[t[a]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,a=this._additiveAnimators;if(a)for(var i=0;i<a.length;i++){var n=a[i].getTrack(e);n&&(t=n)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,a=[],i=this._maxTime||0,n=0;n<this._trackKeys.length;n++){var o=this._trackKeys[n],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else a.push(s)}if(a.length||this._force){var p=new KM({life:i,loop:this._loop,delay:this._delay||0,onframe:function(h){t._started=2;var d=t._additiveAnimators;if(d){for(var v=!1,m=0;m<d.length;m++)if(d[m]._clip){v=!0;break}v||(t._additiveAnimators=null)}for(var m=0;m<a.length;m++)a[m].step(t._target,h);var g=t._onframeCbs;if(g)for(var m=0;m<g.length;m++)g[m](t._target,h)},ondestroy:function(){t._doneCallback()}});this._clip=p,this.animation&&this.animation.addClip(p),e&&p.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 V(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var a=this._tracks,i=this._trackKeys,n=0;n<e.length;n++){var o=a[e[n]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,n=0;n<i.length;n++)if(!a[i[n]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,a){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var n=t[i],o=this._tracks[n];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[a?0:s.length-1];l&&(e[n]=Ts(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||gt(e);for(var a=0;a<t.length;a++){var i=t[a],n=this._tracks[i];if(n){var o=n.keyframes;if(o.length>1){var s=o.pop();n.addKeyframe(s.time,e[i]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},r})(),lf=tW;function Ds(){return new Date().getTime()}var eW=(function(r){kt(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}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 a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,i=t.next;a?a.next=i:this._head=i,i?i.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=Ds()-this._pausedTime,i=a-this._time,n=this._head;n;){var o=n.next,s=n.step(a,i);s&&(n.ondestroy(),this.removeClip(n)),n=o}this._time=a,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(Jc(a),!t._paused&&t.update())}Jc(a)},e.prototype.start=function(){this._running||(this._time=Ds(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ds(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ds()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var i=new lf(t,a.loop);return this.addAnimator(i),i},e})(Ue),dE=eW;var rW=300,K0=Lt.domSupported,J0=(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},a=V(r,function(i){var n=i.replace("mouse","pointer");return t.hasOwnProperty(n)?n:i});return{mouse:r,touch:e,pointer:a}})(),vE={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},mE=!1;function ex(r){var e=r.pointerType;return e==="pen"||e==="touch"}function aW(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 Q0(r){r&&(r.zrByTouch=!0)}function iW(r,e){return $r(r.dom,new nW(r,e),!0)}function yE(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var nW=(function(){function r(e,t){this.stopPropagation=ie,this.stopImmediatePropagation=ie,this.preventDefault=ie,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),gi={mousedown:function(r){r=$r(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=$r(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=$r(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=$r(this.dom,r);var e=r.toElement||r.relatedTarget;yE(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){mE=!0,r=$r(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){mE||(r=$r(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=$r(this.dom,r),Q0(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),gi.mousemove.call(this,r),gi.mousedown.call(this,r)},touchmove:function(r){r=$r(this.dom,r),Q0(r),this.handler.processGesture(r,"change"),gi.mousemove.call(this,r)},touchend:function(r){r=$r(this.dom,r),Q0(r),this.handler.processGesture(r,"end"),gi.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<rW&&gi.click.call(this,r)},pointerdown:function(r){gi.mousedown.call(this,r)},pointermove:function(r){ex(r)||gi.mousemove.call(this,r)},pointerup:function(r){gi.mouseup.call(this,r)},pointerout:function(r){ex(r)||gi.mouseout.call(this,r)}};T(["click","dblclick","contextmenu"],function(r){gi[r]=function(e){e=$r(this.dom,e),this.trigger(r,e)}});var rx={pointermove:function(r){ex(r)||rx.mousemove.call(this,r)},pointerup:function(r){rx.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 oW(r,e){var t=e.domHandlers;Lt.pointerEventsSupported?T(J0.pointer,function(a){fd(e,a,function(i){t[a].call(r,i)})}):(Lt.touchEventsSupported&&T(J0.touch,function(a){fd(e,a,function(i){t[a].call(r,i),aW(e)})}),T(J0.mouse,function(a){fd(e,a,function(i){i=Vh(i),e.touching||t[a].call(r,i)})}))}function sW(r,e){Lt.pointerEventsSupported?T(vE.pointer,t):Lt.touchEventsSupported||T(vE.mouse,t);function t(a){function i(n){n=Vh(n),yE(r,n.target)||(n=iW(r,n),e.domHandlers[a].call(r,n))}fd(e,a,i,{capture:!0})}}function fd(r,e,t,a){r.mounted[e]=t,r.listenerOpts[e]=a,Xc(r.domTarget,e,t,a)}function tx(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&MM(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var gE=(function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r})(),lW=(function(r){kt(e,r);function e(t,a){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=a,i._localHandlerScope=new gE(t,gi),K0&&(i._globalHandlerScope=new gE(document,rx)),oW(i,i._localHandlerScope),i}return e.prototype.dispose=function(){tx(this._localHandlerScope),K0&&tx(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,K0&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var a=this._globalHandlerScope;t?sW(this,a):tx(a)}},e})(Ue),xE=lW;var _E=1;Lt.hasGlobalWindow&&(_E=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Cs=_E,uf=.4,cf="#333",ff="#ccc",bE="#eee";var SE=uo,wE=5e-5;function Ms(r){return r>wE||r<-wE}var Es=[],au=[],ax=fe(),ix=Math.abs,uW=(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 Ms(this.rotation)||Ms(this.x)||Ms(this.y)||Ms(this.scaleX-1)||Ms(this.scaleY-1)||Ms(this.skewX)||Ms(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(SE(a),this.invTransform=null);return}a=a||fe(),t?this.getLocalTransform(a):SE(a),e&&(t?fr(a,e,a):ds(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Es);var a=Es[0]<0?-1:1,i=Es[1]<0?-1:1,n=((Es[0]-a)*t+a)/Es[0]||0,o=((Es[1]-i)*t+i)/Es[1]||0;e[0]*=n,e[1]*=n,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fe(),Fe(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],a=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),n=Math.PI/2+i-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(n),t=Math.sqrt(t),this.skewX=n,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,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||fe(),fr(au,e.invTransform,t),t=au);var a=this.originX,i=this.originY;(a||i)&&(ax[4]=a,ax[5]=i,fr(au,t,ax),au[4]-=a,au[5]-=i,t=au),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 a=[e,t],i=this.invTransform;return i&&ce(a,a,i),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],i=this.transform;return i&&ce(a,a,i),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&ix(e[0]-1)>1e-10&&ix(e[3]-1)>1e-10?Math.sqrt(ix(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){iu(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,i=e.originY||0,n=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,p=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(a||i||s||l){var d=a+s,v=i+l;t[4]=-d*n-p*v*o,t[5]=-v*o-h*d*n}else t[4]=t[5]=0;return t[0]=n,t[3]=o,t[1]=h*n,t[2]=p*o,u&&Sr(t,t,u),t[4]+=a+c,t[5]+=i+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})(),_a=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function iu(r,e){for(var t=0;t<_a.length;t++){var a=_a[t];r[a]=e[a]}}var Qr=uW;function yi(r){pd||(pd=new Xi(100)),r=r||qr;var e=pd.get(r);return e||(e={font:r,strWidthCache:new Xi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ke.measureText("\u56FD",r).width,asciiCharWidth:Ke.measureText("a",r).width},pd.put(r,e)),e}var pd;function cW(r){if(!(nx>=TE)){r=r||qr;for(var e=[],t=+new Date,a=0;a<=127;a++)e[a]=Ke.measureText(String.fromCharCode(a),r).width;var i=+new Date-t;return i>16?nx=TE:i>2&&nx++,e}}var nx=0,TE=5;function ox(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=cW(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function xi(r,e){var t=r.strWidthCache,a=t.get(e);return a==null&&(a=Ke.measureText(e,r.font).width,t.put(e,a)),a}function DE(r,e,t,a){var i=xi(yi(e),r),n=As(e),o=yo(0,i,t),s=An(0,n,a),l=new at(o,s,i,n);return l}function go(r,e,t,a){var i=((r||"")+"").split(`
|
|
`),n=i.length;if(n===1)return DE(i[0],e,t,a);for(var o=new at(0,0,0,0),s=0;s<i.length;s++){var l=DE(i[s],e,t,a);s===0?o.copy(l):o.union(l)}return o}function yo(r,e,t,a){return t==="right"?a?r+=e:r-=e:t==="center"&&(a?r+=e/2:r-=e/2),r}function An(r,e,t,a){return t==="middle"?a?r+=e/2:r-=e/2:t==="bottom"&&(a?r+=e:r-=e),r}function As(r){return yi(r).stWideCharWidth}function hr(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function Ls(r,e,t){var a=e.position||"inside",i=e.distance!=null?e.distance:5,n=t.height,o=t.width,s=n/2,l=t.x,u=t.y,c="left",f="top";if(a instanceof Array)l+=hr(a[0],t.width),u+=hr(a[1],t.height),c=null,f=null;else switch(a){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=n+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=n-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=n-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=n-i,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var sx="__zr_normal__",lx=_a.concat(["ignore"]),fW=cr(_a,function(r,e){return r[e]=!0,r},{ignore:!1}),nu={},pW=new at(0,0,0,0),dd=[],fx=(function(){function r(e){this.id=Lh(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[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 a=this.textConfig,i=a.local,n=t.innerTransformable,o=void 0,s=void 0,l=!1;n.parent=i?this:null;var u=!1;n.copyTransform(t);var c=a.position!=null,f=a.autoOverflowArea,p=void 0;if((f||c)&&(p=pW,a.layoutRect?p.copy(a.layoutRect):p.copy(this.getBoundingRect()),i||p.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(nu,a,p):Ls(nu,a,p),n.x=nu.x,n.y=nu.y,o=nu.align,s=nu.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var d=void 0,v=void 0;h==="center"?(d=p.width*.5,v=p.height*.5):(d=hr(h[0],p.width),v=hr(h[1],p.height)),u=!0,n.originX=-n.x+d+(i?0:p.x),n.originY=-n.y+v+(i?0:p.y)}}a.rotation!=null&&(n.rotation=a.rotation);var m=a.offset;m&&(n.x+=m[0],n.y+=m[1],u||(n.originX=-m[0],n.originY=-m[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var y=g.overflowRect=g.overflowRect||new at(0,0,0,0);n.getLocalTransform(dd),Fe(dd,dd),at.copy(y,p),y.applyTransform(dd)}else g.overflowRect=null;var x=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,_=void 0,b=void 0,S=void 0;x&&this.canBeInsideText()?(_=a.insideFill,b=a.insideStroke,(_==null||_==="auto")&&(_=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(_),S=!0)):(_=a.outsideFill,b=a.outsideStroke,(_==null||_==="auto")&&(_=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(_),S=!0)),_=_||"#000",(_!==g.fill||b!==g.stroke||S!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=_,g.stroke=b,g.autoStroke=S,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=Ye,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()?ff:cf},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&Ze(t);a||(a=[255,255,255,1]);for(var i=a[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*i+(n?0:255)*(1-i);return a[3]=1,Jr(a,"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||{},O(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(et(e))for(var a=e,i=gt(a),n=0;n<i.length;n++){var o=i[n];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,a=0;a<this.animators.length;a++){var i=this.animators[a],n=i.__fromStateTransition;if(!(i.getLoop()||n&&n!==sx)){var o=i.targetName,s=o?t[o]:t;i.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,lx)},r.prototype._savePrimaryToNormal=function(e,t,a){for(var i=0;i<a.length;i++){var n=a[i];e[n]!=null&&!(n in t)&&(t[n]=this[n])}},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(sx,!1,e)},r.prototype.useState=function(e,t,a,i){var n=e===sx,o=this.hasState();if(!(!o&&n)){var s=this.currentStates,l=this.stateTransition;if(!(lt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!n&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!n){ps("State "+e+" not exists.");return}n||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,p=this._textGuide;return f&&f.useState(e,t,a,c),p&&p.useState(e,t,a,c),n?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ye),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var i=[],n=this.currentStates,o=e.length,s=o===n.length;if(s){for(var l=0;l<o;l++)if(e[l]!==n[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&&i.push(c)}var f=i[o-1],p=!!(f&&f.hoverLayer||a);p&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&d&&d.duration>0,d);var v=this._textContent,m=this._textGuide;v&&v.useStates(e,t,p),m&&m.useStates(e,t,p),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ye)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},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=lt(this.currentStates,e);if(t>=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var i=this.currentStates.slice(),n=lt(i,e),o=lt(i,t)>=0;n>=0?o?i.splice(n,1):i[n]=t:a&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,i=0;i<e.length;i++){var n=e[i];O(t,n),n.textConfig&&(a=a||{},O(a,n.textConfig))}return a&&(t.textConfig=a),t},r.prototype._applyStateObj=function(e,t,a,i,n,o){var s=!(t&&i);t&&t.textConfig?(this.textConfig=O({},i?this.textConfig:a.textConfig),O(this.textConfig,t.textConfig)):s&&a.textConfig&&(this.textConfig=a.textConfig);for(var l={},u=!1,c=0;c<lx.length;c++){var f=lx[c],p=n&&fW[f];t&&t[f]!=null?p?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&a[f]!=null&&(p?(u=!0,l[f]=a[f]):this[f]=a[f])}if(!n)for(var c=0;c<this.animators.length;c++){var h=this.animators[c],d=h.targetName;h.getLoop()||h.__changeFinalValue(d?(t||a)[d]:t||a)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){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;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Qr,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),O(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|=Ye;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,a=this._textGuide;t&&(t.__inHover=e),a&&(a.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var a=0;a<t.length;a++)e.animation.addAnimator(t[a]);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 a=0;a<t.length;a++)e.animation.removeAnimator(t[a]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,a){var i=e?this[e]:this,n=new lf(i,t,a);return e&&(n.targetName=e),this.addAnimator(n,e),n},r.prototype.addAnimator=function(e,t){var a=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var n=i.animators,o=lt(n,e);o>=0&&n.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,i=a.length,n=[],o=0;o<i;o++){var s=a[o];!e||e===s.scope?s.stop(t):n.push(s)}return this.animators=n,this},r.prototype.animateTo=function(e,t,a){ux(this,e,t,a)},r.prototype.animateFrom=function(e,t,a){ux(this,e,t,a,!0)},r.prototype._transitionState=function(e,t,a,i){for(var n=ux(this,t,a,i),o=0;o<n.length;o++)n[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.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Ye;var t={};function a(n,o,s){t[n+o+s]||(console.warn("DEPRECATED: '"+n+"' has been deprecated. use '"+o+"', '"+s+"' instead"),t[n+o+s]=!0)}function i(n,o,s,l){Object.defineProperty(e,n,{get:function(){if(!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){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(p){c[s]=p}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(p){c[l]=p}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))})(),r})();Jt(fx,Ue);Jt(fx,Qr);function ux(r,e,t,a,i){t=t||{};var n=[];CE(r,"",r,e,t,a,n,i);var o=n.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(),n.length>0&&t.during&&n[0].during(function(d,v){t.during(v)});for(var p=0;p<n.length;p++){var h=n[p];c&&h.done(c),f&&h.aborted(f),t.force&&h.duration(t.duration),h.start(t.easing)}return n}function cx(r,e,t){for(var a=0;a<t;a++)r[a]=e[a]}function hW(r){return Ce(r[0])}function dW(r,e,t){if(Ce(e[t]))if(Ce(r[t])||(r[t]=[]),Ne(e[t])){var a=e[t].length;r[t].length!==a&&(r[t]=new e[t].constructor(a),cx(r[t],e[t],a))}else{var i=e[t],n=r[t],o=i.length;if(hW(i))for(var s=i[0].length,l=0;l<o;l++)n[l]?cx(n[l],i[l],s):n[l]=Array.prototype.slice.call(i[l]);else cx(n,i,o);n.length=i.length}else r[t]=e[t]}function vW(r,e){return r===e||Ce(r)&&Ce(e)&&mW(r,e)}function mW(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++)if(r[a]!==e[a])return!1;return!0}function CE(r,e,t,a,i,n,o,s){for(var l=gt(a),u=i.duration,c=i.delay,f=i.additive,p=i.setToFinal,h=!et(n),d=r.animators,v=[],m=0;m<l.length;m++){var g=l[m],y=a[g];if(y!=null&&t[g]!=null&&(h||n[g]))if(et(y)&&!Ce(y)&&!oo(y)){if(e){s||(t[g]=y,r.updateDuringAnimation(e));continue}CE(r,g,t[g],y,i,n&&n[g],o,s)}else v.push(g);else s||(t[g]=y,r.updateDuringAnimation(e),v.push(g))}var x=v.length;if(!f&&x)for(var _=0;_<d.length;_++){var b=d[_];if(b.targetName===e){var S=b.stopTracks(v);if(S){var w=lt(d,b);d.splice(w,1)}}}if(i.force||(v=At(v,function(E){return!vW(a[E],t[E])}),x=v.length),x>0||i.force&&!o.length){var D=void 0,C=void 0,M=void 0;if(s){C={},p&&(D={});for(var _=0;_<x;_++){var g=v[_];C[g]=t[g],p?D[g]=a[g]:t[g]=a[g]}}else if(p){M={};for(var _=0;_<x;_++){var g=v[_];M[g]=Ts(t[g]),dW(t,a,g)}}var b=new lf(t,!1,!1,f?At(d,function(L){return L.targetName===e}):null);b.targetName=e,i.scope&&(b.scope=i.scope),p&&D&&b.whenWithKeys(0,D,v),M&&b.whenWithKeys(0,M,v),b.whenWithKeys(u==null?500:u,s?C:a,v).delay(c||0),r.addAnimator(b,e),o.push(b)}}var vd=fx;var ME=(function(r){kt(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}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 a=this._children,i=0;i<a.length;i++)if(a[i].name===t)return a[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,a){if(t&&t!==this&&t.parent!==this&&a&&a.parent===this){var i=this._children,n=i.indexOf(a);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var i=lt(this._children,t);return i>=0&&this.replaceAt(a,i),this},e.prototype.replaceAt=function(t,a){var i=this._children,n=i[a];if(t&&t!==this&&t.parent!==this&&t!==n){i[a]=t,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,i=this._children,n=lt(i,t);return n<0?this:(i.splice(n,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,i=0;i<t.length;i++){var n=t[i];a&&n.removeSelfFromZr(a),n.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,a){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(a,o,n)}return this},e.prototype.traverse=function(t,a){for(var i=0;i<this._children.length;i++){var n=this._children[i],o=t.call(a,n);n.isGroup&&!o&&n.traverse(t,a)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var a=0;a<this._children.length;a++){var i=this._children[a];i.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var a=0;a<this._children.length;a++){var i=this._children[a];i.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var a=new at(0,0,0,0),i=t||this._children,n=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(n);c?(at.applyTransform(a,u,c),o=o||a.clone(),o.union(a)):(o=o||u.clone(),o.union(u))}}return o||a},e})(vd);ME.prototype.type="group";var K=ME;var md={},EE={};function gW(r){delete EE[r]}function yW(r){if(!r)return!1;if(typeof r=="string")return ru(r,1)<uf;if(r.colorStops){for(var e=r.colorStops,t=0,a=e.length,i=0;i<a;i++)t+=ru(e[i].color,1);return t/=a,t<uf}return!1}var xW=(function(){function r(e,t,a){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,a=a||{},this.dom=t,this.id=e;var n=new GM,o=a.renderer||"canvas";md[o]||(o=gt(md)[0]),a.useDirtyRect=a.useDirtyRect==null?!1:a.useDirtyRect;var s=new md[o](t,n,a,e),l=a.ssr||s.ssrOnly;this.storage=n,this.painter=s;var u=!Lt.node&&!Lt.worker&&!l?new xE(s.getViewportRoot(),s.root):null,c=a.useCoarsePointer,f=c==null||c==="auto"?Lt.touchEventsSupported:!!c,p=44,h;f&&(h=Q(a.pointerSize,p)),this.handler=new zM(n,s,u,s.root,h),this.animation=new dE({stage:{update:l?null:function(){return i._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=yW(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,a=Ds();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=Ds();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-a})):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,a){return this._disposed||this.handler.on(e,t,a),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 K&&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,gW(this.id))},r})();function hx(r,e){var t=new xW(Lh(),r,e);return EE[t.id]=t,t}function AE(r,e){md[r]=e}var px;function LE(r){if(typeof px=="function")return px(r)}function IE(r){px=r}var PE=1e-4,kE=20;function bW(r){return r.replace(/^\s+|\s+$/g,"")}var wr=Math.min,_e=Math.max,_i=Math.abs;function zt(r,e,t,a){var i=e[0],n=e[1],o=t[0],s=t[1],l=n-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(r<=i)return o;if(r>=n)return s}else{if(r>=i)return o;if(r<=n)return s}else{if(r===i)return o;if(r===n)return s}return(r-i)/l*u+o}var j=SW;function SW(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return ou(r,e,t)}function ou(r,e,t){return W(r)?bW(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function oe(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),kE),r=(+r).toFixed(e),t?r:+r}function Xe(r){return r.sort(function(e,t){return e-t}),r}function kr(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 wW(r)}function wW(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,i=t>0?t:e.length,n=e.indexOf("."),o=n<0?0:i-1-n;return Math.max(0,o-a)}function gd(r,e){var t=Math.log,a=Math.LN10,i=Math.floor(t(r[1]-r[0])/a),n=Math.round(t(_i(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function RE(r,e){var t=cr(r,function(h,d){return h+(isNaN(d)?0:d)},0);if(t===0)return[];for(var a=Math.pow(10,e),i=V(r,function(h){return(isNaN(h)?0:h)/t*a*100}),n=a*100,o=V(i,function(h){return Math.floor(h)}),s=cr(o,function(h,d){return h+d},0),l=V(i,function(h,d){return h-o[d]});s<n;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,p=l.length;f<p;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return V(o,function(h){return h/a})}function NE(r,e){var t=Math.max(kr(r),kr(e)),a=r+e;return t>kE?a:oe(a,t)}var dx=9007199254740991;function vx(r){var e=Math.PI*2;return(r%e+e)%e}function Is(r){return r>-PE&&r<PE}var TW=/^(?:(\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 Fa(r){if(r instanceof Date)return r;if(W(r)){var e=TW.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 OE(r){return Math.pow(10,yd(r))}function yd(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 xd(r,e){var t=yd(r),a=Math.pow(10,t),i=r/a,n;return e?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,r=n*a,t>=-20?+r.toFixed(t<0?-t:0):r}function _d(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),i=+r[a-1],n=t-a;return n?i+n*(r[a]-i):i}function mx(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a<r.length;){for(var i=r[a].interval,n=r[a].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,n[o]=o?1:1-t),e=i[o],t=n[o];i[0]===i[1]&&n[0]*n[1]!==1?r.splice(a,1):a++}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 Ha(r){var e=parseFloat(r);return e==r&&(e!==0||!W(r)||r.indexOf("x")<=0)?e:NaN}function pf(r){return!isNaN(Ha(r))}function bd(){return Math.round(Math.random()*9)}function zE(r,e){return e===0?r:zE(e,r%e)}function gx(r,e){return r==null?e:e==null?r:r*e/zE(r,e)}var DW="[ECharts] ",VE={},CW=typeof console!="undefined"&&console.warn&&console.log;function BE(r,e,t){if(CW){if(t){if(VE[e])return;VE[e]=!0}console[r](DW+e)}}function UE(r,e){BE("warn",r,e)}function yx(r,e){BE("error",r,e)}function Ut(r){throw new Error(r)}function FE(r,e,t){return(e-r)*t+r}var HE="series\0",GE="\0_ec_\0";function Ft(r){return r instanceof Array?r:r==null?[]:[r]}function ba(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var a=0,i=t.length;a<i;a++){var n=t[a];!r.emphasis[e].hasOwnProperty(n)&&r[e].hasOwnProperty(n)&&(r.emphasis[e][n]=r[e][n])}}}var xx=["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 bi(r){return et(r)&&!z(r)&&!(r instanceof Date)?r.value:r}function WE(r){return et(r)&&!(r instanceof Array)}function Sd(r,e,t){var a=t==="normalMerge",i=t==="replaceMerge",n=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=q();T(e,function(l,u){if(!et(l)){e[u]=null;return}});var s=MW(r,o,t);return(a||i)&&EW(s,r,o,e),a&&AW(s,e),a||i?LW(s,e,i):n&&IW(s,e),PW(s),s}function MW(r,e,t){var a=[];if(t==="replaceAll")return a;for(var i=0;i<r.length;i++){var n=r[i];n&&n.id!=null&&e.set(n.id,i),a.push({existing:t==="replaceMerge"||su(n)?null:n,newOption:null,keyInfo:null,brandNew:null})}return a}function EW(r,e,t,a){T(a,function(i,n){if(!(!i||i.id==null)){var o=hf(i.id),s=t.get(o);if(s!=null){var l=r[s];ee(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],a[n]=null}}})}function AW(r,e){T(e,function(t,a){if(!(!t||t.name==null))for(var i=0;i<r.length;i++){var n=r[i].existing;if(!r[i].newOption&&n&&(n.id==null||t.id==null)&&!su(t)&&!su(n)&&YE("name",n,t)){r[i].newOption=t,e[a]=null;return}}})}function LW(r,e,t){T(e,function(a){if(a){for(var i,n=0;(i=r[n])&&(i.newOption||su(i.existing)||i.existing&&a.id!=null&&!YE("id",a,i.existing));)n++;i?(i.newOption=a,i.brandNew=t):r.push({newOption:a,brandNew:t,existing:null,keyInfo:null}),n++}})}function IW(r,e){T(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function PW(r){var e=q();T(r,function(t){var a=t.existing;a&&e.set(a.id,t)}),T(r,function(t){var a=t.newOption;ee(!a||a.id==null||!e.get(a.id)||e.get(a.id)===t,"id duplicates: "+(a&&a.id)),a&&a.id!=null&&e.set(a.id,t),!t.keyInfo&&(t.keyInfo={})}),T(r,function(t,a){var i=t.existing,n=t.newOption,o=t.keyInfo;if(et(n)){if(o.name=n.name!=null?hf(n.name):i?i.name:HE+a,i)o.id=hf(i.id);else if(n.id!=null)o.id=hf(n.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function YE(r,e,t){var a=ve(e[r],null),i=ve(t[r],null);return a!=null&&i!=null&&a===i}function hf(r){return ve(r,"")}function ve(r,e){return r==null?e:W(r)?r:yt(r)||Wc(r)?r+"":e}function lu(r){var e=r.name;return!!(e&&e.indexOf(HE))}function su(r){return r&&r.id!=null&&hf(r.id).indexOf(GE)===0}function ZE(r){return GE+r}function XE(r,e,t){T(r,function(a){var i=a.newOption;et(i)&&(a.keyInfo.mainType=e,a.keyInfo.subType=kW(e,i,a.existing,t))})}function kW(r,e,t,a){var i=e.type?e.type:t?t.subType:a.determineSubType(r,e);return i}function qE(r,e){var t={},a={};return i(r||[],t),i(e||[],a,t),[n(t),n(a)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=ve(o[u].seriesId,null);if(f==null)return;for(var p=Ft(o[u].dataIndex),h=l&&l[f],d=0,v=p.length;d<v;d++){var m=p[d];h&&h[m]?h[m]=null:(s[f]||(s[f]={}))[m]=1}}}function n(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=n(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function Ga(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return z(e.dataIndex)?V(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return z(e.name)?V(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function ot(){var r="__ec_inner_"+RW++;return function(e){return e[r]||(e[r]={})}}var RW=bd();function ji(r,e,t){var a=df(e,t),i=a.mainTypeSpecified,n=a.queryOptionMap,o=a.others,s=o,l=t?t.defaultMainType:null;return!i&&l&&n.set(l,{}),n.each(function(u,c){var f=$i(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 df(r,e){var t;if(W(r)){var a={};a[r+"Index"]=0,t=a}else t=r;var i=q(),n={},o=!1;return T(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){n[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&<(e.includeMainTypes,c)<0)){o=o||!!c;var p=i.get(c)||i.set(c,{});p[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:n}}var Yt={useDefault:!0,enableAll:!1,enableNone:!1},jE={useDefault:!1,enableAll:!0,enableNone:!0};function $i(r,e,t,a){a=a||Yt;var i=t.index,n=t.id,o=t.name,s={models:null,specified:i!=null||n!=null||o!=null};if(!s.specified){var l=void 0;return s.models=a.useDefault&&(l=r.getComponent(e))?[l]:[],s}if(i==="none"||i===!1){if(a.enableNone)return s.models=[],s;i=-1}return i==="all"&&(a.enableAll?i=n=o=null:i=-1),s.models=r.queryComponents({mainType:e,index:i,id:n,name:o}),s}function _x(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function $E(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function KE(r){return r==="auto"?Lt.domSupported?"html":"richText":r||"html"}function vf(r,e){var t=q(),a=[];return T(r,function(i){var n=e(i);(t.get(n)||(a.push(n),t.set(n,[]))).push(i)}),{keys:a,buckets:t}}function wd(r,e,t,a,i){var n=e==null||e==="auto";if(a==null)return a;if(yt(a)){var o=FE(t||0,a,i);return oe(o,n?Math.max(kr(t||0),kr(a)):e)}else{if(W(a))return i<1?t:a;for(var s=[],l=t,u=a,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var p=r.getDimensionInfo(f);if(p&&p.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var h=l&&l[f]?l[f]:0,d=u[f],o=FE(h,d,i);s[f]=oe(o,n?Math.max(kr(h),kr(d)):e)}}return s}}var Si=(function(){function r(){}return r.prototype.reset=function(e,t,a,i){return this._list=e,this._step=i=i||1,this._idx=t,this._end=a!=null?a:i>0?e.length:0,this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function Td(r){r.option=r.parentModel=r.ecModel=null}var NW=".",Ps="___EC__COMPONENT__CONTAINER___",JE="___EC__EXTENDED_CLASS___";function ea(r){var e={main:"",sub:""};if(r){var t=r.split(NW);e.main=t[0]||"",e.sub=t[1]||""}return e}function OW(r){ee(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function QE(r){return!!(r&&r[JE])}function uu(r,e){r.$constructor=r,r.extend=function(t){var a=this,i;return zW(a)?i=(function(n){I(o,n);function o(){return n.apply(this,arguments)||this}return o})(a):(i=function(){(t.$constructor||a).apply(this,arguments)},yM(i,this)),O(i.prototype,t),i[JE]=!0,i.extend=this.extend,i.superCall=BW,i.superApply=UW,i.superClass=a,i}}function zW(r){return $(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Dd(r,e){r.extend=e.extend}var VW=Math.round(Math.random()*10);function tA(r){var e=["__\0is_clz",VW++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function BW(r,e){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];return this.superClass.prototype[e].apply(r,t)}function UW(r,e,t){return this.superClass.prototype[e].apply(r,t)}function xo(r){var e={};r.registerClass=function(a){var i=a.type||a.prototype.type;if(i){OW(i),a.prototype.type=i;var n=ea(i);if(!n.sub)e[n.main]=a;else if(n.sub!==Ps){var o=t(n);o[n.sub]=a}}return a},r.getClass=function(a,i,n){var o=e[a];if(o&&o[Ps]&&(o=i?o[i]:null),n&&!o)throw new Error(i?"Component "+a+"."+(i||"")+" is used but not imported.":a+".type should be specified.");return o},r.getClassesByMainType=function(a){var i=ea(a),n=[],o=e[i.main];return o&&o[Ps]?T(o,function(s,l){l!==Ps&&n.push(s)}):n.push(o),n},r.hasClass=function(a){var i=ea(a);return!!e[i.main]},r.getAllClassMainTypes=function(){var a=[];return T(e,function(i,n){a.push(n)}),a},r.hasSubTypes=function(a){var i=ea(a),n=e[i.main];return n&&n[Ps]};function t(a){var i=e[a.main];return(!i||!i[Ps])&&(i=e[a.main]={},i[Ps]=!0),i}}function ra(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(a,i,n){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&<(i,l)>=0||n&<(n,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var FW=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],HW=ra(FW),eA=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return HW(this,e,t)},r})();var Sx=new Xi(50);function aA(r){if(typeof r=="string"){var e=Sx.get(r);return e&&e.image}else return r}function mf(r,e,t,a,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var n=Sx.get(r),o={hostEl:t,cb:a,cbPayload:i};return n?(e=n.image,!cu(e)&&n.pending.push(o)):(e=Ke.loadImage(r,rA,rA),e.__zrImageSrc=r,Sx.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function rA(){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],a=t.cb;a&&a(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function cu(r){return r&&r.width&&r.height}var Tx=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function WW(r,e,t,a,i,n){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
|
|
`);n=sA(t,a,i,n);for(var s=!1,l={},u=0,c=o.length;u<c;u++)lA(l,o[u],n),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
`),r.isTruncated=s}function sA(r,e,t,a){a=a||{};var i=O({},a);t=Q(t,"..."),i.maxIterations=Q(a.maxIterations,2);var n=i.minChar=Q(a.minChar,0),o=i.fontMeasureInfo=yi(e),s=o.asciiCharWidth;i.placeholder=Q(a.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<n&&l>=s;u++)l-=s;var c=xi(o,t);return c>l&&(t="",c=0),l=r-c,i.ellipsis=t,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=r,i}function lA(r,e,t){var a=t.containerWidth,i=t.contentWidth,n=t.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=xi(n,e);if(o<=a){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?YW(e,i,n):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=xi(n,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function YW(r,e,t){for(var a=0,i=0,n=r.length;i<n&&a<e;i++)a+=ox(t,r.charCodeAt(i));return i}function uA(r,e,t,a){var i=Mx(r),n=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=n==="truncate",f=As(u),p=Q(e.lineHeight,f),h=e.lineOverflow==="truncate",d=!1,v=e.width;v==null&&t!=null&&(v=t-s);var m=e.height;m==null&&a!=null&&(m=a-l);var g;v!=null&&(n==="break"||n==="breakAll")?g=i?fA(i,e.font,v,n==="breakAll",0).lines:[]:g=i?i.split(`
|
|
`):[];var y=g.length*p;if(m==null&&(m=y),y>m&&h){var x=Math.floor(m/p);d=d||g.length>x,g=g.slice(0,x),y=g.length*p}if(i&&c&&v!=null)for(var _=sA(v,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b={},S=0;S<g.length;S++)lA(b,g[S],_),g[S]=b.textLine,d=d||b.isTruncated;for(var w=m,D=0,C=yi(u),S=0;S<g.length;S++)D=Math.max(xi(C,g[S]),D);v==null&&(v=D);var M=v;return w+=l,M+=s,{lines:g,height:m,outerWidth:M,outerHeight:w,lineHeight:p,calculatedLineHeight:f,contentWidth:D,contentHeight:y,width:v,isTruncated:d}}var ZW=(function(){function r(){}return r})(),iA=(function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r})(),XW=(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 cA(r,e,t,a,i){var n=new XW,o=Mx(r);if(!o)return n;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&t!=null&&(c=t-l);var f=e.height;f==null&&a!=null&&(f=a-u);for(var p=e.overflow,h=(p==="break"||p==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:p==="breakAll"}:null,d=Tx.lastIndex=0,v;(v=Tx.exec(o))!=null;){var m=v.index;m>d&&Dx(n,o.substring(d,m),e,h),Dx(n,v[2],e,h,v[1]),d=Tx.lastIndex}d<o.length&&Dx(n,o.substring(d,o.length),e,h);var g=[],y=0,x=0,_=p==="truncate",b=e.lineOverflow==="truncate",S={};function w(Ht,Kt,Et){Ht.width=Kt,Ht.lineHeight=Et,y+=Et,x=Math.max(x,Kt)}t:for(var D=0;D<n.lines.length;D++){for(var C=n.lines[D],M=0,E=0,L=0;L<C.tokens.length;L++){var A=C.tokens[L],P=A.styleName&&e.rich[A.styleName]||{},R=A.textPadding=P.padding,k=R?R[1]+R[3]:0,B=A.font=P.font||e.font;A.contentHeight=As(B);var U=Q(P.height,A.contentHeight);if(A.innerHeight=U,R&&(U+=R[0]+R[2]),A.height=U,A.lineHeight=Te(P.lineHeight,e.lineHeight,U),A.align=P&&P.align||i,A.verticalAlign=P&&P.verticalAlign||"middle",b&&f!=null&&y+A.lineHeight>f){var F=n.lines.length;L>0?(C.tokens=C.tokens.slice(0,L),w(C,E,M),n.lines=n.lines.slice(0,D+1)):n.lines=n.lines.slice(0,D),n.isTruncated=n.isTruncated||n.lines.length<F;break t}var H=P.width,G=H==null||H==="auto";if(typeof H=="string"&&H.charAt(H.length-1)==="%")A.percentWidth=H,g.push(A),A.contentWidth=xi(yi(B),A.text);else{if(G){var Y=P.backgroundColor,rt=Y&&Y.image;rt&&(rt=aA(rt),cu(rt)&&(A.width=Math.max(A.width,rt.width*U/rt.height)))}var st=_&&c!=null?c-E:null;st!=null&&st<A.width?!G||st<k?(A.text="",A.width=A.contentWidth=0):(WW(S,A.text,st-k,B,e.ellipsis,{minChar:e.truncateMinChar}),A.text=S.text,n.isTruncated=n.isTruncated||S.isTruncated,A.width=A.contentWidth=xi(yi(B),A.text)):A.contentWidth=xi(yi(B),A.text)}A.width+=k,E+=A.width,P&&(M=Math.max(M,A.lineHeight))}w(C,E,M)}n.outerWidth=n.width=Q(c,x),n.outerHeight=n.height=Q(f,y),n.contentHeight=y,n.contentWidth=x,n.outerWidth+=l,n.outerHeight+=u;for(var D=0;D<g.length;D++){var A=g[D],mt=A.percentWidth;A.width=parseInt(mt,10)/100*n.width}return n}function Dx(r,e,t,a,i){var n=e==="",o=i&&t.rich[i]||{},s=r.lines,l=o.font||t.font,u=!1,c,f;if(a){var p=o.padding,h=p?p[1]+p[3]:0;if(o.width!=null&&o.width!=="auto"){var d=hr(o.width,a.width)+h;s.length>0&&d+a.accumWidth>a.width&&(c=e.split(`
|
|
`),u=!0),a.accumWidth=d}else{var v=fA(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=v.accumWidth+h,f=v.linesWidths,c=v.lines}}c||(c=e.split(`
|
|
`));for(var m=yi(l),g=0;g<c.length;g++){var y=c[g],x=new ZW;if(x.styleName=i,x.text=y,x.isLineHolder=!y&&!n,typeof o.width=="number"?x.width=o.width:x.width=f?f[g]:xi(m,y),!g&&!u){var _=(s[s.length-1]||(s[0]=new iA)).tokens,b=_.length;b===1&&_[0].isLineHolder?_[0]=x:(y||!b||n)&&_.push(x)}else s.push(new iA([x]))}}function qW(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var jW=cr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function $W(r){return qW(r)?!!jW[r]:!0}function fA(r,e,t,a,i){for(var n=[],o=[],s="",l="",u=0,c=0,f=yi(e),p=0;p<r.length;p++){var h=r.charAt(p);if(h===`
|
|
`){l&&(s+=l,c+=u),n.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=ox(f,h.charCodeAt(0)),v=a?!1:!$W(h);if(n.length?c+d>t:i+c+d>t){c?(s||l)&&(v?(s||(s=l,l="",u=0,c=u),n.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),n.push(s),o.push(c),s=h,c=d)):v?(n.push(l),o.push(u),l=h,u=d):(n.push(h),o.push(d));continue}c+=d,v?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(n.push(s),o.push(c)),n.length===1&&(c+=i),{accumWidth:c,lines:n,linesWidths:o}}function Cx(r,e,t,a,i,n){if(r.baseX=t,r.baseY=a,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;at.set(nA,yo(t,o,i),An(a,s,n),o,s),at.intersect(e,nA,null,oA);var l=oA.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=yo(l.x,l.width,i,!0),r.baseY=An(l.y,l.height,n,!0)}}var nA=new at(0,0,0,0),oA={outIntersectRect:{},clamp:!0};function Mx(r){return r!=null?r+="":r=""}function pA(r){var e=Mx(r.text),t=r.font,a=xi(yi(t),e),i=As(t);return Cd(r,a,i,null)}function Cd(r,e,t,a){var i=new at(yo(r.x||0,e,r.textAlign),An(r.y||0,t,r.textBaseline),e,t),n=a!=null?a:Ex(r)?r.lineWidth:0;return n>0&&(i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n),i}function Ex(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var Ix="__zr_style_"+Math.round(Math.random()*10),Ki={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ks={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ki[Ix]=!0;var hA=["z","z2","invisible"],KW=["invisible"],JW=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=gt(t),i=0;i<a.length;i++){var n=a[i];n==="style"?this.useStyle(t[n]):r.prototype.attrKV.call(this,n,t[n])}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,a,i,n){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&QW(this,t,a)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(n&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,a){return this.rectContain(t,a)},e.prototype.traverse=function(t,a){t.call(a,this)},e.prototype.rectContain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();return n.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var a=this.transform,i=this.getBoundingRect(),n=this.style,o=n.shadowBlur||0,s=n.shadowOffsetX||0,l=n.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new at(0,0,0,0)),a?at.applyTransform(t,i,a):t.copy(i),(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 at(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,a){t!=="style"?r.prototype.attrKV.call(this,t,a):this.style?this.setStyle(a):this.useStyle(a)},e.prototype.setStyle=function(t,a){return typeof t=="string"?this.style[t]=a:O(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=bs,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&bs)},e.prototype.styleUpdated=function(){this.__dirty&=~bs},e.prototype.createStyle=function(t){return lo(Ki,t)},e.prototype.useStyle=function(t){t[Ix]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[Ix]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.style&&!a.style&&(a.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,a,hA)},e.prototype._applyStateObj=function(t,a,i,n,o,s){r.prototype._applyStateObj.call(this,t,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.style?o?n?u=a.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,a.style)):(u=this._mergeStyle(this.createStyle(),n?this.style:i.style),this._mergeStyle(u,a.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=gt(c),p=0;p<f.length;p++){var h=f[p];h in u&&(u[h]=u[h],this.style[h]=c[h])}for(var d=gt(u),p=0;p<d.length;p++){var h=d[p];this.style[h]=this.style[h]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?KW:hA,p=0;p<v.length;p++){var h=v[p];a&&a[h]!=null?this[h]=a[h]:l&&i[h]!=null&&(this[h]=i[h])}},e.prototype._mergeStates=function(t){for(var a=r.prototype._mergeStates.call(this,t),i,n=0;n<t.length;n++){var o=t[n];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(a.style=i),a},e.prototype._mergeStyle=function(t,a){return O(t,a),t},e.prototype.getAnimationStyleProps=function(){return ks},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=Ye|bs})(),e})(vd),Ax=new at(0,0,0,0),Lx=new at(0,0,0,0);function QW(r,e,t){return Ax.copy(r.getBoundingRect()),r.transform&&Ax.applyTransform(r.transform),Lx.width=e,Lx.height=t,!Ax.intersect(Lx)}var ke=JW;var aa=Math.min,ia=Math.max,Px=Math.sin,kx=Math.cos,Rs=Math.PI*2,Md=Yi(),Ed=Yi(),Ad=Yi();function Ns(r,e,t){if(r.length!==0){for(var a=r[0],i=a[0],n=a[0],o=a[1],s=a[1],l=1;l<r.length;l++)a=r[l],i=aa(i,a[0]),n=ia(n,a[0]),o=aa(o,a[1]),s=ia(s,a[1]);e[0]=i,e[1]=o,t[0]=n,t[1]=s}}function Rx(r,e,t,a,i,n){i[0]=aa(r,t),i[1]=aa(e,a),n[0]=ia(r,t),n[1]=ia(e,a)}var dA=[],vA=[];function mA(r,e,t,a,i,n,o,s,l,u){var c=Wh,f=Ee,p=c(r,t,i,o,dA);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<p;h++){var d=f(r,t,i,o,dA[h]);l[0]=aa(d,l[0]),u[0]=ia(d,u[0])}p=c(e,a,n,s,vA);for(var h=0;h<p;h++){var v=f(e,a,n,s,vA[h]);l[1]=aa(v,l[1]),u[1]=ia(v,u[1])}l[0]=aa(r,l[0]),u[0]=ia(r,u[0]),l[0]=aa(o,l[0]),u[0]=ia(o,u[0]),l[1]=aa(e,l[1]),u[1]=ia(e,u[1]),l[1]=aa(s,l[1]),u[1]=ia(s,u[1])}function gA(r,e,t,a,i,n,o,s){var l=Zh,u=Pe,c=ia(aa(l(r,t,i),1),0),f=ia(aa(l(e,a,n),1),0),p=u(r,t,i,c),h=u(e,a,n,f);o[0]=aa(r,i,p),o[1]=aa(e,n,h),s[0]=ia(r,i,p),s[1]=ia(e,n,h)}function yA(r,e,t,a,i,n,o,s,l){var u=ga,c=ya,f=Math.abs(i-n);if(f%Rs<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if(Md[0]=kx(i)*t+r,Md[1]=Px(i)*a+e,Ed[0]=kx(n)*t+r,Ed[1]=Px(n)*a+e,u(s,Md,Ed),c(l,Md,Ed),i=i%Rs,i<0&&(i=i+Rs),n=n%Rs,n<0&&(n=n+Rs),i>n&&!o?n+=Rs:i<n&&o&&(i+=Rs),o){var p=n;n=i,i=p}for(var h=0;h<n;h+=Math.PI/2)h>i&&(Ad[0]=kx(h)*t+r,Ad[1]=Px(h)*a+e,u(s,Ad,s),c(l,Ad,l))}var pe={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Os=[],zs=[],Ji=[],_o=[],Qi=[],tn=[],Nx=Math.min,Ox=Math.max,Vs=Math.cos,Bs=Math.sin,Ln=Math.abs,Bx=Math.PI,bo=Bx*2,zx=typeof Float32Array!="undefined",gf=[];function Vx(r){var e=Math.round(r/Bx*1e8)/1e8;return e%2*Bx}function Us(r,e){var t=Vx(r[0]);t<0&&(t+=bo);var a=t-r[0],i=r[1];i+=a,!e&&i-t>=bo?i=t+bo:e&&t-i>=bo?i=t-bo:!e&&t>i?i=t+(bo-Vx(t-i)):e&&t<i&&(i=t-(bo-Vx(i-t))),r[0]=t,r[1]=i}var t4=(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,a){a=a||0,a>0&&(this._ux=Ln(a/Cs/e)||0,this._uy=Ln(a/Cs/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(pe.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 a=Ln(e-this._xi),i=Ln(t-this._yi),n=a>this._ux||i>this._uy;if(this.addData(pe.L,e,t),this._ctx&&n&&this._ctx.lineTo(e,t),n)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){return this._drawPendingPt(),this.addData(pe.C,e,t,a,i,n,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,i,n,o),this._xi=n,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,i){return this._drawPendingPt(),this.addData(pe.Q,e,t,a,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,i),this._xi=a,this._yi=i,this},r.prototype.arc=function(e,t,a,i,n,o){this._drawPendingPt(),gf[0]=i,gf[1]=n,Us(gf,o),i=gf[0],n=gf[1];var s=n-i;return this.addData(pe.A,e,t,a,a,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,i,n,o),this._xi=Vs(n)*a+e,this._yi=Bs(n)*a+t,this},r.prototype.arcTo=function(e,t,a,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,i,n),this},r.prototype.rect=function(e,t,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,i),this.addData(pe.R,e,t,a,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(pe.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,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){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&zx&&(this.data=new Float32Array(t));for(var a=0;a<t;a++)this.data[a]=e[a];this._len=t}},r.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,a=0,i=this._len,n=0;n<t;n++)a+=e[n].len();var o=this.data;if(zx&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+a),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var n=0;n<t;n++)for(var l=e[n].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},r.prototype.addData=function(e,t,a,i,n,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,zx&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Ji[0]=Ji[1]=Qi[0]=Qi[1]=Number.MAX_VALUE,_o[0]=_o[1]=tn[0]=tn[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,i=0,n=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],a=e[o+1],i=t,n=a),s){case pe.M:t=i=e[o++],a=n=e[o++],Qi[0]=i,Qi[1]=n,tn[0]=i,tn[1]=n;break;case pe.L:Rx(t,a,e[o],e[o+1],Qi,tn),t=e[o++],a=e[o++];break;case pe.C:mA(t,a,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],Qi,tn),t=e[o++],a=e[o++];break;case pe.Q:gA(t,a,e[o++],e[o++],e[o],e[o+1],Qi,tn),t=e[o++],a=e[o++];break;case pe.A:var u=e[o++],c=e[o++],f=e[o++],p=e[o++],h=e[o++],d=e[o++]+h;o+=1;var v=!e[o++];l&&(i=Vs(h)*f+u,n=Bs(h)*p+c),yA(u,c,f,p,h,d,v,Qi,tn),t=Vs(d)*f+u,a=Bs(d)*p+c;break;case pe.R:i=t=e[o++],n=a=e[o++];var m=e[o++],g=e[o++];Rx(i,n,i+m,n+g,Qi,tn);break;case pe.Z:t=i,a=n;break}ga(Ji,Ji,Qi),ya(_o,_o,tn)}return o===0&&(Ji[0]=Ji[1]=_o[0]=_o[1]=0),new at(Ji[0],Ji[1],_o[0]-Ji[0],_o[1]-Ji[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,a=this._ux,i=this._uy,n=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,p=0;p<t;){var h=e[p++],d=p===1;d&&(n=e[p],o=e[p+1],s=n,l=o);var v=-1;switch(h){case pe.M:n=s=e[p++],o=l=e[p++];break;case pe.L:{var m=e[p++],g=e[p++],y=m-n,x=g-o;(Ln(y)>a||Ln(x)>i||p===t-1)&&(v=Math.sqrt(y*y+x*x),n=m,o=g);break}case pe.C:{var _=e[p++],b=e[p++],m=e[p++],g=e[p++],S=e[p++],w=e[p++];v=qM(n,o,_,b,m,g,S,w,10),n=S,o=w;break}case pe.Q:{var _=e[p++],b=e[p++],m=e[p++],g=e[p++];v=$M(n,o,_,b,m,g,10),n=m,o=g;break}case pe.A:var D=e[p++],C=e[p++],M=e[p++],E=e[p++],L=e[p++],A=e[p++],P=A+L;p+=1,d&&(s=Vs(L)*M+D,l=Bs(L)*E+C),v=Ox(M,E)*Nx(bo,Math.abs(A)),n=Vs(P)*M+D,o=Bs(P)*E+C;break;case pe.R:{s=n=e[p++],l=o=e[p++];var R=e[p++],k=e[p++];v=R*2+k*2;break}case pe.Z:{var y=s-n,x=l-o;v=Math.sqrt(y*y+x*x),n=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var a=this.data,i=this._ux,n=this._uy,o=this._len,s,l,u,c,f,p,h=t<1,d,v,m=0,g=0,y,x=0,_,b;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,v=this._pathLen,y=t*v,!y)))t:for(var S=0;S<o;){var w=a[S++],D=S===1;switch(D&&(u=a[S],c=a[S+1],s=u,l=c),w!==pe.L&&x>0&&(e.lineTo(_,b),x=0),w){case pe.M:s=u=a[S++],l=c=a[S++],e.moveTo(u,c);break;case pe.L:{f=a[S++],p=a[S++];var C=Ln(f-u),M=Ln(p-c);if(C>i||M>n){if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;e.lineTo(u*(1-L)+f*L,c*(1-L)+p*L);break t}m+=E}e.lineTo(f,p),u=f,c=p,x=0}else{var A=C*C+M*M;A>x&&(_=f,b=p,x=A)}break}case pe.C:{var P=a[S++],R=a[S++],k=a[S++],B=a[S++],U=a[S++],F=a[S++];if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;Va(u,P,k,U,L,Os),Va(c,R,B,F,L,zs),e.bezierCurveTo(Os[1],zs[1],Os[2],zs[2],Os[3],zs[3]);break t}m+=E}e.bezierCurveTo(P,R,k,B,U,F),u=U,c=F;break}case pe.Q:{var P=a[S++],R=a[S++],k=a[S++],B=a[S++];if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;ho(u,P,k,L,Os),ho(c,R,B,L,zs),e.quadraticCurveTo(Os[1],zs[1],Os[2],zs[2]);break t}m+=E}e.quadraticCurveTo(P,R,k,B),u=k,c=B;break}case pe.A:var H=a[S++],G=a[S++],Y=a[S++],rt=a[S++],st=a[S++],mt=a[S++],Ht=a[S++],Kt=!a[S++],Et=Y>rt?Y:rt,vt=Ln(Y-rt)>.001,It=st+mt,ct=!1;if(h){var E=d[g++];m+E>y&&(It=st+mt*(y-m)/E,ct=!0),m+=E}if(vt&&e.ellipse?e.ellipse(H,G,Y,rt,Ht,st,It,Kt):e.arc(H,G,Et,st,It,Kt),ct)break t;D&&(s=Vs(st)*Y+H,l=Bs(st)*rt+G),u=Vs(It)*Y+H,c=Bs(It)*rt+G;break;case pe.R:s=u=a[S],l=c=a[S+1],f=a[S++],p=a[S++];var Ct=a[S++],ae=a[S++];if(h){var E=d[g++];if(m+E>y){var Wt=y-m;e.moveTo(f,p),e.lineTo(f+Nx(Wt,Ct),p),Wt-=Ct,Wt>0&&e.lineTo(f+Ct,p+Nx(Wt,ae)),Wt-=ae,Wt>0&&e.lineTo(f+Ox(Ct-Wt,0),p+ae),Wt-=Ct,Wt>0&&e.lineTo(f,p+Ox(ae-Wt,0));break t}m+=E}e.rect(f,p,Ct,ae);break;case pe.Z:if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;e.lineTo(u*(1-L)+s*L,c*(1-L)+l*L);break t}m+=E}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.prototype.canSave=function(){return!!this._saveData},r.CMD=pe,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})(),tr=t4;function en(r,e,t,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>a+s||o<e-s&&o<a-s||n>r+s&&n>t+s||n<r-s&&n<t-s)return!1;if(r!==t)l=(e-a)/(r-t),u=(r*a-t*e)/(r-t);else return Math.abs(n-r)<=s/2;var c=l*n-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function bA(r,e,t,a,i,n,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>a+f&&c>n+f&&c>s+f||c<e-f&&c<a-f&&c<n-f&&c<s-f||u>r+f&&u>t+f&&u>i+f&&u>o+f||u<r-f&&u<t-f&&u<i-f&&u<o-f)return!1;var p=Yh(r,e,t,a,i,n,o,s,u,c,null);return p<=f/2}function Ld(r,e,t,a,i,n,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>a+u&&l>n+u||l<e-u&&l<a-u&&l<n-u||s>r+u&&s>t+u&&s>i+u||s<r-u&&s<t-u&&s<i-u)return!1;var c=Xh(r,e,t,a,i,n,s,l,null);return c<=u/2}var wA=Math.PI*2;function dr(r){return r%=wA,r<0&&(r+=wA),r}var yf=Math.PI*2;function TA(r,e,t,a,i,n,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(a-i)%yf<1e-4)return!0;if(n){var f=a;a=dr(i),i=dr(f)}else a=dr(a),i=dr(i);a>i&&(i+=yf);var p=Math.atan2(l,s);return p<0&&(p+=yf),p>=a&&p<=i||p+yf>=a&&p+yf<=i}function Wa(r,e,t,a,i,n){if(n>e&&n>a||n<e&&n<a||a===e)return 0;var o=(n-e)/(a-e),s=a<e?1:-1;(o===1||o===0)&&(s=a<e?.5:-.5);var l=o*(t-r)+r;return l===i?1/0:l>i?s:0}var So=tr.CMD,Fs=Math.PI*2,a4=1e-4;function i4(r,e){return Math.abs(r-e)<a4}var Rr=[-1,-1,-1],Ya=[-1,-1];function n4(){var r=Ya[0];Ya[0]=Ya[1],Ya[1]=r}function o4(r,e,t,a,i,n,o,s,l,u){if(u>e&&u>a&&u>n&&u>s||u<e&&u<a&&u<n&&u<s)return 0;var c=Ss(e,a,n,s,u,Rr);if(c===0)return 0;for(var f=0,p=-1,h=void 0,d=void 0,v=0;v<c;v++){var m=Rr[v],g=m===0||m===1?.5:1,y=Ee(r,t,i,o,m);y<l||(p<0&&(p=Wh(e,a,n,s,Ya),Ya[1]<Ya[0]&&p>1&&n4(),h=Ee(e,a,n,s,Ya[0]),p>1&&(d=Ee(e,a,n,s,Ya[1]))),p===2?m<Ya[0]?f+=h<e?g:-g:m<Ya[1]?f+=d<h?g:-g:f+=s<d?g:-g:m<Ya[0]?f+=h<e?g:-g:f+=s<h?g:-g)}return f}function s4(r,e,t,a,i,n,o,s){if(s>e&&s>a&&s>n||s<e&&s<a&&s<n)return 0;var l=jM(e,a,n,s,Rr);if(l===0)return 0;var u=Zh(e,a,n);if(u>=0&&u<=1){for(var c=0,f=Pe(e,a,n,u),p=0;p<l;p++){var h=Rr[p]===0||Rr[p]===1?.5:1,d=Pe(r,t,i,Rr[p]);d<o||(Rr[p]<u?c+=f<e?h:-h:c+=n<f?h:-h)}return c}else{var h=Rr[0]===0||Rr[0]===1?.5:1,d=Pe(r,t,i,Rr[0]);return d<o?0:n<e?h:-h}}function l4(r,e,t,a,i,n,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Rr[0]=-l,Rr[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u>=Fs-1e-4){a=0,i=Fs;var c=n?1:-1;return o>=Rr[0]+r&&o<=Rr[1]+r?c:0}if(a>i){var f=a;a=i,i=f}a<0&&(a+=Fs,i+=Fs);for(var p=0,h=0;h<2;h++){var d=Rr[h];if(d+r>o){var v=Math.atan2(s,d),c=n?1:-1;v<0&&(v=Fs+v),(v>=a&&v<=i||v+Fs>=a&&v+Fs<=i)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),p+=c)}}return p}function DA(r,e,t,a,i){for(var n=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,p,h,d=0;d<o;){var v=n[d++],m=d===1;switch(v===So.M&&d>1&&(t||(s+=Wa(l,u,c,f,a,i))),m&&(l=n[d],u=n[d+1],c=l,f=u),v){case So.M:c=n[d++],f=n[d++],l=c,u=f;break;case So.L:if(t){if(en(l,u,n[d],n[d+1],e,a,i))return!0}else s+=Wa(l,u,n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case So.C:if(t){if(bA(l,u,n[d++],n[d++],n[d++],n[d++],n[d],n[d+1],e,a,i))return!0}else s+=o4(l,u,n[d++],n[d++],n[d++],n[d++],n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case So.Q:if(t){if(Ld(l,u,n[d++],n[d++],n[d],n[d+1],e,a,i))return!0}else s+=s4(l,u,n[d++],n[d++],n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case So.A:var g=n[d++],y=n[d++],x=n[d++],_=n[d++],b=n[d++],S=n[d++];d+=1;var w=!!(1-n[d++]);p=Math.cos(b)*x+g,h=Math.sin(b)*_+y,m?(c=p,f=h):s+=Wa(l,u,p,h,a,i);var D=(a-g)*_/x+g;if(t){if(TA(g,y,_,b,b+S,w,e,D,i))return!0}else s+=l4(g,y,_,b,b+S,w,D,i);l=Math.cos(b+S)*x+g,u=Math.sin(b+S)*_+y;break;case So.R:c=l=n[d++],f=u=n[d++];var C=n[d++],M=n[d++];if(p=c+C,h=f+M,t){if(en(c,f,p,f,e,a,i)||en(p,f,p,h,e,a,i)||en(p,h,c,h,e,a,i)||en(c,h,c,f,e,a,i))return!0}else s+=Wa(p,f,p,h,a,i),s+=Wa(c,h,c,f,a,i);break;case So.Z:if(t){if(en(l,u,c,f,e,a,i))return!0}else s+=Wa(l,u,c,f,a,i);l=c,u=f;break}}return!t&&!i4(u,f)&&(s+=Wa(l,u,c,f,a,i)||0),s!==0}function CA(r,e,t){return DA(r,0,!1,e,t)}function MA(r,e,t,a){return DA(r,e,!0,t,a)}var fu=J({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ki),c4={style:J({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ks.style)},Ux=_a.concat(["invisible","culling","z","z2","zlevel","parent"]),f4=(function(r){kt(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 a=this.style;if(a.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var n=i.style;for(var o in a)n[o]!==a[o]&&(n[o]=a[o]);n.fill=a.fill?a.decal:null,n.decal=null,n.shadowColor=null,a.strokeFirst&&(n.stroke=null);for(var s=0;s<Ux.length;++s)i[Ux[s]]=this[Ux[s]];i.__dirty|=Ye}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var a=gt(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var n=0;n<a.length;n++){var o=a[n],s=t[o];o==="style"?this.style?O(this.style,s):this.useStyle(s):o==="shape"?O(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(W(t)){var a=ru(t,0);return a>.5?cf:a>.2?bE:ff}else if(t)return ff}return cf},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if(W(a)){var i=this.__zr,n=!!(i&&i.isDarkMode()),o=ru(t,0)<uf;if(n===o)return a}},e.prototype.buildPath=function(t,a,i){},e.prototype.pathUpdated=function(){this.__dirty&=~co},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 tr(!1)},e.prototype.hasStroke=function(){var t=this.style,a=t.stroke;return!(a==null||a==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&co)&&(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||i){s.copy(t);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c==null?4:c)}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,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect(),o=this.style;if(t=i[0],a=i[1],n.contain(t,a)){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)),MA(s,l/u,t,a)))return!0}if(this.hasFill())return CA(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=co,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,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=a:O(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&co)},e.prototype.createStyle=function(t){return lo(fu,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=O({},this.shape))},e.prototype._applyStateObj=function(t,a,i,n,o,s){r.prototype._applyStateObj.call(this,t,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.shape?o?n?u=a.shape:(u=O({},i.shape),O(u,a.shape)):(u=O({},n?this.shape:i.shape),O(u,a.shape)):l&&(u=i.shape),u)if(o){this.shape=O({},this.shape);for(var c={},f=gt(u),p=0;p<f.length;p++){var h=f[p];typeof u[h]=="object"?this.shape[h]=u[h]:c[h]=u[h]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var a=r.prototype._mergeStates.call(this,t),i,n=0;n<t.length;n++){var o=t[n];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(a.shape=i),a},e.prototype.getAnimationStyleProps=function(){return c4},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var a=(function(n){kt(o,n);function o(s){var l=n.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return tt(t.style)},o.prototype.getDefaultShape=function(){return tt(t.shape)},o})(e);for(var i in t)typeof t[i]=="function"&&(a.prototype[i]=t[i]);return a},e.initDefaultProps=(function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=Ye|bs|co})(),e})(ke),ft=f4;var p4=J({strokeFirst:!0,font:qr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},fu),EA=(function(r){kt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return Ex(this.style)},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.createStyle=function(t){return lo(p4,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=pA(this.style)),this._rect},e.initDefaultProps=(function(){var t=e.prototype;t.dirtyRectTolerance=10})(),e})(ke);EA.prototype.type="tspan";var In=EA;var h4=J({x:0,y:0},Ki),d4={style:J({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ks.style)};function v4(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var AA=(function(r){kt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return lo(h4,t)},e.prototype._getSize=function(t){var a=this.style,i=a[t];if(i!=null)return i;var n=v4(a.image)?a.image:this.__image;if(!n)return 0;var o=t==="width"?"height":"width",s=a[o];return s==null?n[t]:n[t]/n[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return d4},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new at(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e})(ke);AA.prototype.type="image";var se=AA;function LA(r,e){var t=e.x,a=e.y,i=e.width,n=e.height,o=e.r,s,l,u,c;i<0&&(t=t+i,i=-i),n<0&&(a=a+n,n=-n),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>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>n&&(f=l+u,l*=n/f,u*=n/f),s+c>n&&(f=s+c,s*=n/f,c*=n/f),r.moveTo(t+s,a),r.lineTo(t+i-l,a),l!==0&&r.arc(t+i-l,a+l,l,-Math.PI/2,0),r.lineTo(t+i,a+n-u),u!==0&&r.arc(t+i-u,a+n-u,u,0,Math.PI/2),r.lineTo(t+c,a+n),c!==0&&r.arc(t+c,a+n-c,c,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var pu=Math.round;function Hs(r,e,t){if(e){var a=e.x1,i=e.x2,n=e.y1,o=e.y2;r.x1=a,r.x2=i,r.y1=n,r.y2=o;var s=t&&t.lineWidth;return s&&(pu(a*2)===pu(i*2)&&(r.x1=r.x2=Nr(a,s,!0)),pu(n*2)===pu(o*2)&&(r.y1=r.y2=Nr(n,s,!0))),r}}function Id(r,e,t){if(e){var a=e.x,i=e.y,n=e.width,o=e.height;r.x=a,r.y=i,r.width=n,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Nr(a,s,!0),r.y=Nr(i,s,!0),r.width=Math.max(Nr(a+n,s,!1)-r.x,n===0?0:1),r.height=Math.max(Nr(i+o,s,!1)-r.y,o===0?0:1)),r}}function Nr(r,e,t){if(!e)return r;var a=pu(r*2);return(a+pu(e))%2===0?a/2:(a+(t?1:-1))/2}var y4=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})();var x4={},IA=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new y4},e.prototype.buildPath=function(t,a){var i,n,o,s;if(this.subPixelOptimize){var l=Id(x4,a,this.style);i=l.x,n=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else i=a.x,n=a.y,o=a.width,s=a.height;a.r?LA(t,a):t.rect(i,n,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(ft);IA.prototype.type="rect";var ht=IA;var PA={fill:"#000"},kA=2,rn={},_4={style:J({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},ks.style)},FA=(function(r){kt(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=PA,a.attr(t),a}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 a=this._children[t];a.zlevel=this.zlevel,a.z=this.z,a.z2=this.z2,a.culling=this.culling,a.cursor=this.cursor,a.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 a=this.innerTransformable;return a?a.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,w4(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 a=0;a<this._children.length;a++)this._children[a].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var a=0;a<this._children.length;a++)this._children[a].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new at(0,0,0,0),a=this._children,i=[],n=null,o=0;o<a.length;o++){var s=a[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(t.copy(l),t.applyTransform(u),n=n||t.clone(),n.union(t)):(n=n||l.clone(),n.union(l))}this._rect=n||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||PA},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,a){if(!a)return t;var i=a.rich,n=t.rich||i&&{};return O(t,a),i&&n?(this._mergeRich(n,i),t.rich=n):n&&(t.rich=n),t},e.prototype._mergeRich=function(t,a){for(var i=gt(a),n=0;n<i.length;n++){var o=i[n];t[o]=t[o]||{},O(t[o],a[o])}},e.prototype.getAnimationStyleProps=function(){return _4},e.prototype._getOrCreateChild=function(t){var a=this._children[this._childCursor];return(!a||!(a instanceof t))&&(a=new t),this._children[this._childCursor++]=a,a.__zr=this.__zr,a.parent=this,a},e.prototype._updatePlainTexts=function(){var t=this.style,a=t.font||qr,i=t.padding,n=this._defaultStyle,o=t.x||0,s=t.y||0,l=t.align||n.align||"left",u=t.verticalAlign||n.verticalAlign||"top";Cx(rn,n.overflowRect,o,s,l,u),o=rn.baseX,s=rn.baseY;var c=UA(t),f=uA(c,t,rn.outerWidth,rn.outerHeight),p=Fx(t),h=!!t.backgroundColor,d=f.outerHeight,v=f.outerWidth,m=f.lines,g=f.lineHeight;this.isTruncated=!!f.isTruncated;var y=o,x=An(s,f.contentHeight,u);if(p||i){var _=yo(o,v,l),b=An(s,d,u);p&&this._renderBackground(t,t,_,b,v,d)}x+=g/2,i&&(y=BA(o,l,i),u==="top"?x+=i[0]:u==="bottom"&&(x-=i[2]));for(var S=0,w=!1,D=!1,C=VA("fill"in t?t.fill:(D=!0,n.fill)),M=zA("stroke"in t?t.stroke:!h&&(!n.autoStroke||D)?(S=kA,w=!0,n.stroke):null),E=t.textShadowBlur>0,L=0;L<m.length;L++){var A=this._getOrCreateChild(In),P=A.createStyle();A.useStyle(P),P.text=m[L],P.x=y,P.y=x,l&&(P.textAlign=l),P.textBaseline="middle",P.opacity=t.opacity,P.strokeFirst=!0,E&&(P.shadowBlur=t.textShadowBlur||0,P.shadowColor=t.textShadowColor||"transparent",P.shadowOffsetX=t.textShadowOffsetX||0,P.shadowOffsetY=t.textShadowOffsetY||0),P.stroke=M,P.fill=C,M&&(P.lineWidth=t.lineWidth||S,P.lineDash=t.lineDash,P.lineDashOffset=t.lineDashOffset||0),P.font=a,NA(P,t),x+=g,A.setBoundingRect(Cd(P,f.contentWidth,f.calculatedLineHeight,w?0:null))}},e.prototype._updateRichTexts=function(){var t=this.style,a=this._defaultStyle,i=t.align||a.align,n=t.verticalAlign||a.verticalAlign,o=t.x||0,s=t.y||0;Cx(rn,a.overflowRect,o,s,i,n),o=rn.baseX,s=rn.baseY;var l=UA(t),u=cA(l,t,rn.outerWidth,rn.outerHeight,i),c=u.width,f=u.outerWidth,p=u.outerHeight,h=t.padding;this.isTruncated=!!u.isTruncated;var d=yo(o,f,i),v=An(s,p,n),m=d,g=v;h&&(m+=h[3],g+=h[0]);var y=m+c;Fx(t)&&this._renderBackground(t,t,d,v,f,p);for(var x=!!t.backgroundColor,_=0;_<u.lines.length;_++){for(var b=u.lines[_],S=b.tokens,w=S.length,D=b.lineHeight,C=b.width,M=0,E=m,L=y,A=w-1,P=void 0;M<w&&(P=S[M],!P.align||P.align==="left");)this._placeToken(P,t,D,g,E,"left",x),C-=P.width,E+=P.width,M++;for(;A>=0&&(P=S[A],P.align==="right");)this._placeToken(P,t,D,g,L,"right",x),C-=P.width,L-=P.width,A--;for(E+=(c-(E-m)-(y-L)-C)/2;M<=A;)P=S[M],this._placeToken(P,t,D,g,E+P.width/2,"center",x),E+=P.width,M++;g+=D}},e.prototype._placeToken=function(t,a,i,n,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=n+i/2;c==="top"?f=n+t.height/2:c==="bottom"&&(f=n+i-t.height/2);var p=!t.isLineHolder&&Fx(u);p&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var h=!!u.backgroundColor,d=t.textPadding;d&&(o=BA(o,s,d),f-=t.height/2-d[0]-t.innerHeight/2);var v=this._getOrCreateChild(In),m=v.createStyle();v.useStyle(m);var g=this._defaultStyle,y=!1,x=0,_=!1,b=VA("fill"in u?u.fill:"fill"in a?a.fill:(y=!0,g.fill)),S=zA("stroke"in u?u.stroke:"stroke"in a?a.stroke:!h&&!l&&(!g.autoStroke||y)?(x=kA,_=!0,g.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;m.text=t.text,m.x=o,m.y=f,w&&(m.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,m.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=t.font||qr,m.opacity=Te(u.opacity,a.opacity,1),NA(m,u),S&&(m.lineWidth=Te(u.lineWidth,a.lineWidth,x),m.lineDash=Q(u.lineDash,a.lineDash),m.lineDashOffset=a.lineDashOffset||0,m.stroke=S),b&&(m.fill=b),v.setBoundingRect(Cd(m,t.contentWidth,t.contentHeight,_?0:null))},e.prototype._renderBackground=function(t,a,i,n,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,p=l&&!f,h=t.borderRadius,d=this,v,m;if(p||t.lineHeight||u&&c){v=this._getOrCreateChild(ht),v.useStyle(v.createStyle()),v.style.fill=null;var g=v.shape;g.x=i,g.y=n,g.width=o,g.height=s,g.r=h,v.dirtyShape()}if(p){var y=v.style;y.fill=l||null,y.fillOpacity=Q(t.fillOpacity,1)}else if(f){m=this._getOrCreateChild(se),m.onload=function(){d.dirtyStyle()};var x=m.style;x.image=l.image,x.x=i,x.y=n,x.width=o,x.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Q(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 _=(v||m).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=Te(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return Gx(t)&&(a=[t.fontStyle,t.fontWeight,Hx(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&Be(a)||t.textFont||t.font},e})(ke),b4={left:!0,right:1,center:1},S4={top:1,bottom:1,middle:1},RA=["fontStyle","fontWeight","fontSize","fontFamily"];function Hx(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Mh+"px":r+"px"}function NA(r,e){for(var t=0;t<RA.length;t++){var a=RA[t],i=e[a];i!=null&&(r[a]=i)}}function Gx(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function w4(r){return OA(r),T(r.rich,OA),r}function OA(r){if(r){r.font=FA.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||b4[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||S4[t]?t:"top";var a=r.padding;a&&(r.padding=so(r.padding))}}function zA(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function VA(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function BA(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function UA(r){var e=r.text;return e!=null&&(e+=""),e}function Fx(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var Dt=FA;var nt=ot(),xf=function(r,e,t,a){if(a){var i=nt(a);i.dataIndex=t,i.dataType=e,i.seriesIndex=r,i.ssrType="chart",a.type==="group"&&a.traverse(function(n){var o=nt(n);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}};var HA=1,GA={},qA=ot(),Zx=ot(),Xx=0,Gs=1,_f=2,qe=["emphasis","blur","select"],wo=["normal","emphasis","blur","select"],Pn=10,T4=9,To="highlight",bf="downplay",Sf="select",kd="unselect",wf="toggleSelect",Rd="selectchanged";function hu(r){return r!=null&&r!=="none"}function Nd(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function jA(r){Nd(r,"emphasis",_f)}function $A(r){r.hoverState===_f&&Nd(r,"normal",Xx)}function qx(r){Nd(r,"blur",Gs)}function KA(r){r.hoverState===Gs&&Nd(r,"normal",Xx)}function D4(r){r.selected=!0}function C4(r){r.selected=!1}function WA(r,e,t){e(r,t)}function kn(r,e,t){WA(r,e,t),r.isGroup&&r.traverse(function(a){WA(a,e,t)})}function Ws(r,e){switch(e){case"emphasis":r.hoverState=_f;break;case"normal":r.hoverState=Xx;break;case"blur":r.hoverState=Gs;break;case"select":r.selected=!0}}function M4(r,e,t,a){for(var i=r.style,n={},o=0;o<e.length;o++){var s=e[o],l=i[s];n[s]=l==null?a&&a[s]:l}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(n,e)}return n}function E4(r,e,t,a){var i=t&<(t,"select")>=0,n=!1;if(r instanceof ft){var o=qA(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(hu(s)||hu(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(n=!0,a=O({},a),u=O({},u),u.fill=s):!hu(u.fill)&&hu(s)?(n=!0,a=O({},a),u=O({},u),u.fill=rf(s)):!hu(u.stroke)&&hu(l)&&(n||(a=O({},a),u=O({},u)),u.stroke=rf(l)),a.style=u}}if(a&&a.z2==null){n||(a=O({},a));var c=r.z2EmphasisLift;a.z2=r.z2+(c!=null?c:Pn)}return a}function A4(r,e,t){if(t&&t.z2==null){t=O({},t);var a=r.z2SelectLift;t.z2=r.z2+(a!=null?a:T4)}return t}function L4(r,e,t){var a=lt(r.currentStates,e)>=0,i=r.style.opacity,n=a?null:M4(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=O({},t),o=O({opacity:a?i:n.opacity*.1},o),t.style=o),t}function Wx(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return E4(this,r,e,t);if(r==="blur")return L4(this,r,t);if(r==="select")return A4(this,r,t)}return t}function wi(r){r.stateProxy=Wx;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Wx),t&&(t.stateProxy=Wx)}function YA(r,e){!JA(r,e)&&!r.__highByOuter&&kn(r,jA)}function ZA(r,e){!JA(r,e)&&!r.__highByOuter&&kn(r,$A)}function Tr(r,e){r.__highByOuter|=1<<(e||0),kn(r,jA)}function Dr(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&kn(r,$A)}function Od(r){kn(r,qx)}function Tf(r){kn(r,KA)}function jx(r){kn(r,D4)}function $x(r){kn(r,C4)}function JA(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function Kx(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(i,n){var o=Zx(n),s=i==="series",l=s?r.getViewOfSeriesModel(n):r.getViewOfComponentModel(n);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){KA(u)}),s&&t.push(n)),o.isBlured=!1}),T(a,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function Yx(r,e,t,a){var i=a.getModel();t=t||"coordinateSystem";function n(u,c){for(var f=0;f<c.length;f++){var p=u.getItemGraphicEl(c[f]);p&&Tf(p)}}if(r!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var p=f&&s?f===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!p||e==="series"&&c)){var h=a.getViewOfSeriesModel(u);if(h.group.traverse(function(m){m.__highByOuter&&c&&e==="self"||qx(m)}),Ce(e))n(u.getData(),e);else if(et(e))for(var d=gt(e),v=0;v<d.length;v++)n(u.getData(d[v]),e[d[v]]);l.push(u),Zx(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var f=a.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function Pd(r,e,t){if(!(r==null||e==null)){var a=t.getModel().getComponent(r,e);if(a){Zx(a).isBlured=!0;var i=t.getViewOfComponentModel(a);!i||!i.focusBlurEnabled||i.group.traverse(function(n){qx(n)})}}}function QA(r,e,t){var a=r.seriesIndex,i=r.getData(e.dataType);if(i){var n=Ga(i,e);n=(z(n)?n[0]:n)||0;var o=i.getItemGraphicEl(n);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=nt(o);Yx(a,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&Yx(a,c,f,t)}}}function zd(r,e,t,a){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return i;var n=a.getModel().getComponent(r,e);if(!n)return i;var o=a.getViewOfComponentModel(n);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(nt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function tL(r,e,t){var a=nt(r),i=zd(a.componentMainType,a.componentIndex,a.componentHighDownName,t),n=i.dispatchers,o=i.focusSelf;n?(o&&Pd(a.componentMainType,a.componentIndex,t),T(n,function(s){return YA(s,e)})):(Yx(a.seriesIndex,a.focus,a.blurScope,t),a.focus==="self"&&Pd(a.componentMainType,a.componentIndex,t),YA(r,e))}function eL(r,e,t){Kx(t);var a=nt(r),i=zd(a.componentMainType,a.componentIndex,a.componentHighDownName,t).dispatchers;i?T(i,function(n){return ZA(n,e)}):ZA(r,e)}function rL(r,e,t){if(Bd(e)){var a=e.dataType,i=r.getData(a),n=Ga(i,e);z(n)||(n=[n]),r[e.type===wf?"toggleSelect":e.type===Sf?"select":"unselect"](n,a)}}function Jx(r){var e=r.getAllData();T(e,function(t){var a=t.data,i=t.type;a.eachItemGraphicEl(function(n,o){r.isSelected(o,i)?jx(n):$x(n)})})}function aL(r){var e=[];return r.eachSeries(function(t){var a=t.getAllData();T(a,function(i){var n=i.data,o=i.type,s=t.getSelectedDataIndices();if(s.length>0){var l={dataIndex:s,seriesIndex:t.seriesIndex};o!=null&&(l.dataType=o),e.push(l)}})}),e}function an(r,e,t){Rn(r,!0),kn(r,wi),Vd(r,e,t)}function I4(r){Rn(r,!1)}function Rt(r,e,t,a){a?I4(r):an(r,e,t)}function Vd(r,e,t){var a=nt(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var XA=["emphasis","blur","select"],P4={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function te(r,e,t,a){t=t||"itemStyle";for(var i=0;i<XA.length;i++){var n=XA[i],o=e.getModel([n,t]),s=r.ensureState(n);s.style=a?a(o):o[P4[t]]()}}function Rn(r,e){var t=e===!1,a=r;r.highDownSilentOnTouch&&(a.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||a.__highDownDispatcher)&&(a.__highByOuter=a.__highByOuter||0,a.__highDownDispatcher=!t)}function Do(r){return!!(r&&r.__highDownDispatcher)}function iL(r,e,t){var a=nt(r);a.componentMainType=e.mainType,a.componentIndex=e.componentIndex,a.componentHighDownName=t}function nL(r){var e=GA[r];return e==null&&HA<=32&&(e=GA[r]=HA++),e}function Bd(r){var e=r.type;return e===Sf||e===kd||e===wf}function Qx(r){var e=r.type;return e===To||e===bf}function oL(r){var e=qA(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 _t={};WC(_t,{Arc:()=>Af,BezierCurve:()=>Xs,BoundingRect:()=>at,Circle:()=>Or,CompoundPath:()=>Co,Ellipse:()=>Cf,Group:()=>K,Image:()=>se,IncrementalDisplayable:()=>LL,Line:()=>le,LinearGradient:()=>Za,OrientedBoundingRect:()=>Kd,Path:()=>ft,Point:()=>pt,Polygon:()=>ye,Polyline:()=>he,RadialGradient:()=>Xd,Rect:()=>ht,Ring:()=>Zs,Sector:()=>De,Text:()=>Dt,WH:()=>be,XY:()=>bt,applyTransform:()=>vr,calcZ2Range:()=>f_,clipPointsByRect:()=>c_,clipRectByRect:()=>pY,createIcon:()=>Vn,ensureCopyRect:()=>xu,ensureCopyTransform:()=>tv,expandOrShrinkRect:()=>qa,extendPath:()=>uY,extendShape:()=>sY,getShapeClass:()=>gu,getTransform:()=>Ci,groupTransition:()=>zn,initProps:()=>Vt,isBoundingRectAxisAligned:()=>Qd,isElementRemoved:()=>Nn,lineLineIntersect:()=>VL,linePolygonIntersect:()=>yu,makeImage:()=>u_,makePath:()=>$s,mergePath:()=>Mr,registerShape:()=>Di,removeElement:()=>Xa,removeElementWithFadeOut:()=>oa,resizePath:()=>zL,retrieveZInfo:()=>ja,setTooltipConfig:()=>Er,subPixelOptimize:()=>Lf,subPixelOptimizeLine:()=>On,subPixelOptimizeRect:()=>cY,transformDirection:()=>Ks,traverseElements:()=>zr,traverseUpdateZ:()=>Js,updateProps:()=>wt});var du=tr.CMD,k4=[[],[],[]],sL=Math.sqrt,R4=Math.atan2;function Ud(r,e){if(e){var t=r.data,a=r.len(),i,n,o,s,l,u,c=du.M,f=du.C,p=du.L,h=du.R,d=du.A,v=du.Q;for(o=0,s=0;o<a;){switch(i=t[o++],s=o,n=0,i){case c:n=1;break;case p:n=1;break;case f:n=3;break;case v:n=2;break;case d:var m=e[4],g=e[5],y=sL(e[0]*e[0]+e[1]*e[1]),x=sL(e[2]*e[2]+e[3]*e[3]),_=R4(-e[1]/x,e[0]/y);t[o]*=y,t[o++]+=m,t[o]*=x,t[o++]+=g,t[o++]*=y,t[o++]*=x,t[o++]+=_,t[o++]+=_,o+=2,s=o;break;case h:u[0]=t[o++],u[1]=t[o++],ce(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],ce(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<n;l++){var b=k4[l];b[0]=t[o++],b[1]=t[o++],ce(b,b,e),t[s++]=b[0],t[s++]=b[1]}}r.increaseVersion()}}var t_=Math.sqrt,Fd=Math.sin,Hd=Math.cos,Df=Math.PI;function lL(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function e_(r,e){return(r[0]*e[0]+r[1]*e[1])/(lL(r)*lL(e))}function uL(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(e_(r,e))}function cL(r,e,t,a,i,n,o,s,l,u,c){var f=l*(Df/180),p=Hd(f)*(r-t)/2+Fd(f)*(e-a)/2,h=-1*Fd(f)*(r-t)/2+Hd(f)*(e-a)/2,d=p*p/(o*o)+h*h/(s*s);d>1&&(o*=t_(d),s*=t_(d));var v=(i===n?-1:1)*t_((o*o*(s*s)-o*o*(h*h)-s*s*(p*p))/(o*o*(h*h)+s*s*(p*p)))||0,m=v*o*h/s,g=v*-s*p/o,y=(r+t)/2+Hd(f)*m-Fd(f)*g,x=(e+a)/2+Fd(f)*m+Hd(f)*g,_=uL([1,0],[(p-m)/o,(h-g)/s]),b=[(p-m)/o,(h-g)/s],S=[(-1*p-m)/o,(-1*h-g)/s],w=uL(b,S);if(e_(b,S)<=-1&&(w=Df),e_(b,S)>=1&&(w=0),w<0){var D=Math.round(w/Df*1e6)/1e6;w=Df*2+D%2*Df}c.addData(u,y,x,o,s,_,w,f,n)}var N4=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,O4=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function z4(r){var e=new tr;if(!r)return e;var t=0,a=0,i=t,n=a,o,s=tr.CMD,l=r.match(N4);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),p=void 0,h=c.match(O4)||[],d=h.length,v=0;v<d;v++)h[v]=parseFloat(h[v]);for(var m=0;m<d;){var g=void 0,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0,w=void 0,D=t,C=a,M=void 0,E=void 0;switch(f){case"l":t+=h[m++],a+=h[m++],p=s.L,e.addData(p,t,a);break;case"L":t=h[m++],a=h[m++],p=s.L,e.addData(p,t,a);break;case"m":t+=h[m++],a+=h[m++],p=s.M,e.addData(p,t,a),i=t,n=a,f="l";break;case"M":t=h[m++],a=h[m++],p=s.M,e.addData(p,t,a),i=t,n=a,f="L";break;case"h":t+=h[m++],p=s.L,e.addData(p,t,a);break;case"H":t=h[m++],p=s.L,e.addData(p,t,a);break;case"v":a+=h[m++],p=s.L,e.addData(p,t,a);break;case"V":a=h[m++],p=s.L,e.addData(p,t,a);break;case"C":p=s.C,e.addData(p,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),t=h[m-2],a=h[m-1];break;case"c":p=s.C,e.addData(p,h[m++]+t,h[m++]+a,h[m++]+t,h[m++]+a,h[m++]+t,h[m++]+a),t+=h[m-2],a+=h[m-1];break;case"S":g=t,y=a,M=e.len(),E=e.data,o===s.C&&(g+=t-E[M-4],y+=a-E[M-3]),p=s.C,D=h[m++],C=h[m++],t=h[m++],a=h[m++],e.addData(p,g,y,D,C,t,a);break;case"s":g=t,y=a,M=e.len(),E=e.data,o===s.C&&(g+=t-E[M-4],y+=a-E[M-3]),p=s.C,D=t+h[m++],C=a+h[m++],t+=h[m++],a+=h[m++],e.addData(p,g,y,D,C,t,a);break;case"Q":D=h[m++],C=h[m++],t=h[m++],a=h[m++],p=s.Q,e.addData(p,D,C,t,a);break;case"q":D=h[m++]+t,C=h[m++]+a,t+=h[m++],a+=h[m++],p=s.Q,e.addData(p,D,C,t,a);break;case"T":g=t,y=a,M=e.len(),E=e.data,o===s.Q&&(g+=t-E[M-4],y+=a-E[M-3]),t=h[m++],a=h[m++],p=s.Q,e.addData(p,g,y,t,a);break;case"t":g=t,y=a,M=e.len(),E=e.data,o===s.Q&&(g+=t-E[M-4],y+=a-E[M-3]),t+=h[m++],a+=h[m++],p=s.Q,e.addData(p,g,y,t,a);break;case"A":x=h[m++],_=h[m++],b=h[m++],S=h[m++],w=h[m++],D=t,C=a,t=h[m++],a=h[m++],p=s.A,cL(D,C,t,a,S,w,x,_,b,p,e);break;case"a":x=h[m++],_=h[m++],b=h[m++],S=h[m++],w=h[m++],D=t,C=a,t+=h[m++],a+=h[m++],p=s.A,cL(D,C,t,a,S,w,x,_,b,p,e);break}}(f==="z"||f==="Z")&&(p=s.Z,e.addData(p),t=i,a=n),o=p}return e.toStatic(),e}var fL=(function(r){kt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e})(ft);function pL(r){return r.setData!=null}function hL(r,e){var t=z4(r),a=O({},e);return a.buildPath=function(i){var n=pL(i);if(n&&i.canSave()){i.appendPath(t);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=n?i.getContext():i;o&&t.rebuildPath(o,1)}},a.applyTransform=function(i){Ud(t,i),this.dirtyShape()},a}function Gd(r,e){return new fL(hL(r,e))}function dL(r,e){var t=hL(r,e),a=(function(i){kt(n,i);function n(o){var s=i.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return n})(fL);return a}function vL(r,e){for(var t=[],a=r.length,i=0;i<a;i++){var n=r[i];t.push(n.getUpdatedPathProxy(!0))}var o=new ft(e);return o.createPathProxy(),o.buildPath=function(s){if(pL(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function vu(r,e){e=e||{};var t=new ft;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?Ud(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 B4=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})();var mL=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new B4},e.prototype.buildPath=function(t,a){t.moveTo(a.cx+a.r,a.cy),t.arc(a.cx,a.cy,a.r,0,Math.PI*2)},e})(ft);mL.prototype.type="circle";var Or=mL;var U4=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})();var gL=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new U4},e.prototype.buildPath=function(t,a){var i=.5522848,n=a.cx,o=a.cy,s=a.rx,l=a.ry,u=s*i,c=l*i;t.moveTo(n-s,o),t.bezierCurveTo(n-s,o-c,n-u,o-l,n,o-l),t.bezierCurveTo(n+u,o-l,n+s,o-c,n+s,o),t.bezierCurveTo(n+s,o+c,n+u,o+l,n,o+l),t.bezierCurveTo(n-u,o+l,n-s,o+c,n-s,o),t.closePath()},e})(ft);gL.prototype.type="ellipse";var Cf=gL;var xL=Math.PI,r_=xL*2,Ys=Math.sin,mu=Math.cos,F4=Math.acos,Cr=Math.atan2,yL=Math.abs,Ef=Math.sqrt,Mf=Math.max,nn=Math.min,Ti=1e-4;function H4(r,e,t,a,i,n,o,s){var l=t-r,u=a-e,c=o-i,f=s-n,p=f*l-c*u;if(!(p*p<Ti))return p=(c*(e-n)-f*(r-i))/p,[r+p*l,e+p*u]}function Wd(r,e,t,a,i,n,o){var s=r-t,l=e-a,u=(o?n:-n)/Ef(s*s+l*l),c=u*l,f=-u*s,p=r+c,h=e+f,d=t+c,v=a+f,m=(p+d)/2,g=(h+v)/2,y=d-p,x=v-h,_=y*y+x*x,b=i-n,S=p*v-d*h,w=(x<0?-1:1)*Ef(Mf(0,b*b*_-S*S)),D=(S*x-y*w)/_,C=(-S*y-x*w)/_,M=(S*x+y*w)/_,E=(-S*y+x*w)/_,L=D-m,A=C-g,P=M-m,R=E-g;return L*L+A*A>P*P+R*R&&(D=M,C=E),{cx:D,cy:C,x0:-c,y0:-f,x1:D*(i/b-1),y1:C*(i/b-1)}}function G4(r){var e;if(z(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function _L(r,e){var t,a=Mf(e.r,0),i=Mf(e.r0||0,0),n=a>0,o=i>0;if(!(!n&&!o)){if(n||(a=i,i=0),i>a){var s=a;a=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,p=!!e.clockwise,h=yL(u-l),d=h>r_&&h%r_;if(d>Ti&&(h=d),!(a>Ti))r.moveTo(c,f);else if(h>r_-Ti)r.moveTo(c+a*mu(l),f+a*Ys(l)),r.arc(c,f,a,l,u,!p),i>Ti&&(r.moveTo(c+i*mu(u),f+i*Ys(u)),r.arc(c,f,i,u,l,p));else{var v=void 0,m=void 0,g=void 0,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0,w=void 0,D=void 0,C=void 0,M=void 0,E=void 0,L=void 0,A=void 0,P=void 0,R=a*mu(l),k=a*Ys(l),B=i*mu(u),U=i*Ys(u),F=h>Ti;if(F){var H=e.cornerRadius;H&&(t=G4(H),v=t[0],m=t[1],g=t[2],y=t[3]);var G=yL(a-i)/2;if(x=nn(G,g),_=nn(G,y),b=nn(G,v),S=nn(G,m),C=w=Mf(x,_),M=D=Mf(b,S),(w>Ti||D>Ti)&&(E=a*mu(u),L=a*Ys(u),A=i*mu(l),P=i*Ys(l),h<xL)){var Y=H4(R,k,A,P,E,L,B,U);if(Y){var rt=R-Y[0],st=k-Y[1],mt=E-Y[0],Ht=L-Y[1],Kt=1/Ys(F4((rt*mt+st*Ht)/(Ef(rt*rt+st*st)*Ef(mt*mt+Ht*Ht)))/2),Et=Ef(Y[0]*Y[0]+Y[1]*Y[1]);C=nn(w,(a-Et)/(Kt+1)),M=nn(D,(i-Et)/(Kt-1))}}}if(!F)r.moveTo(c+R,f+k);else if(C>Ti){var vt=nn(g,C),It=nn(y,C),ct=Wd(A,P,R,k,a,vt,p),Ct=Wd(E,L,B,U,a,It,p);r.moveTo(c+ct.cx+ct.x0,f+ct.cy+ct.y0),C<w&&vt===It?r.arc(c+ct.cx,f+ct.cy,C,Cr(ct.y0,ct.x0),Cr(Ct.y0,Ct.x0),!p):(vt>0&&r.arc(c+ct.cx,f+ct.cy,vt,Cr(ct.y0,ct.x0),Cr(ct.y1,ct.x1),!p),r.arc(c,f,a,Cr(ct.cy+ct.y1,ct.cx+ct.x1),Cr(Ct.cy+Ct.y1,Ct.cx+Ct.x1),!p),It>0&&r.arc(c+Ct.cx,f+Ct.cy,It,Cr(Ct.y1,Ct.x1),Cr(Ct.y0,Ct.x0),!p))}else r.moveTo(c+R,f+k),r.arc(c,f,a,l,u,!p);if(!(i>Ti)||!F)r.lineTo(c+B,f+U);else if(M>Ti){var vt=nn(v,M),It=nn(m,M),ct=Wd(B,U,E,L,i,-It,p),Ct=Wd(R,k,A,P,i,-vt,p);r.lineTo(c+ct.cx+ct.x0,f+ct.cy+ct.y0),M<D&&vt===It?r.arc(c+ct.cx,f+ct.cy,M,Cr(ct.y0,ct.x0),Cr(Ct.y0,Ct.x0),!p):(It>0&&r.arc(c+ct.cx,f+ct.cy,It,Cr(ct.y0,ct.x0),Cr(ct.y1,ct.x1),!p),r.arc(c,f,i,Cr(ct.cy+ct.y1,ct.cx+ct.x1),Cr(Ct.cy+Ct.y1,Ct.cx+Ct.x1),p),vt>0&&r.arc(c+Ct.cx,f+Ct.cy,vt,Cr(Ct.y1,Ct.x1),Cr(Ct.y0,Ct.x0),!p))}else r.lineTo(c+B,f+U),r.arc(c,f,i,u,l,p)}r.closePath()}}}var Y4=(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})();var bL=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Y4},e.prototype.buildPath=function(t,a){_L(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(ft);bL.prototype.type="sector";var De=bL;var Z4=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})();var SL=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Z4},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.PI*2;t.moveTo(i+a.r,n),t.arc(i,n,a.r,0,o,!1),t.moveTo(i+a.r0,n),t.arc(i,n,a.r0,0,o,!0)},e})(ft);SL.prototype.type="ring";var Zs=SL;function a_(r,e,t,a){var i=[],n=[],o=[],s=[],l,u,c,f;if(a){c=[1/0,1/0],f=[-1/0,-1/0];for(var p=0,h=r.length;p<h;p++)ga(c,c,r[p]),ya(f,f,r[p]);ga(c,c,a[0]),ya(f,f,a[1])}for(var p=0,h=r.length;p<h;p++){var d=r[p];if(t)l=r[p?p-1:h-1],u=r[(p+1)%h];else if(p===0||p===h-1){i.push(jr(r[p]));continue}else l=r[p-1],u=r[p+1];vi(n,u,l),Xl(n,n,e);var v=Rh(d,l),m=Rh(d,u),g=v+m;g!==0&&(v/=g,m/=g),Xl(o,n,-v),Xl(s,n,m);var y=D0([],d,o),x=D0([],d,s);a&&(ya(y,y,c),ga(y,y,f),ya(x,x,c),ga(x,x,f)),i.push(y),i.push(x)}return t&&i.push(i.shift()),i}function Yd(r,e,t){var a=e.smooth,i=e.points;if(i&&i.length>=2){if(a){var n=a_(i,a,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=n[s*2],u=n[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)r.lineTo(i[s][0],i[s][1])}t&&r.closePath()}}var X4=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})();var TL=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new X4},e.prototype.buildPath=function(t,a){Yd(t,a,!0)},e})(ft);TL.prototype.type="polygon";var ye=TL;var q4=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})();var DL=(function(r){kt(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 q4},e.prototype.buildPath=function(t,a){Yd(t,a,!1)},e})(ft);DL.prototype.type="polyline";var he=DL;var j4={},$4=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();var CL=(function(r){kt(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 $4},e.prototype.buildPath=function(t,a){var i,n,o,s;if(this.subPixelOptimize){var l=Hs(j4,a,this.style);i=l.x1,n=l.y1,o=l.x2,s=l.y2}else i=a.x1,n=a.y1,o=a.x2,s=a.y2;var u=a.percent;u!==0&&(t.moveTo(i,n),u<1&&(o=i*(1-u)+o*u,s=n*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var a=this.shape;return[a.x1*(1-t)+a.x2*t,a.y1*(1-t)+a.y2*t]},e})(ft);CL.prototype.type="line";var le=CL;var na=[],K4=(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 ML(r,e,t){var a=r.cpx2,i=r.cpy2;return a!=null||i!=null?[(t?F0:Ee)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?F0:Ee)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Qc:Pe)(r.x1,r.cpx1,r.x2,e),(t?Qc:Pe)(r.y1,r.cpy1,r.y2,e)]}var EL=(function(r){kt(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 K4},e.prototype.buildPath=function(t,a){var i=a.x1,n=a.y1,o=a.x2,s=a.y2,l=a.cpx1,u=a.cpy1,c=a.cpx2,f=a.cpy2,p=a.percent;p!==0&&(t.moveTo(i,n),c==null||f==null?(p<1&&(ho(i,l,o,p,na),l=na[1],o=na[2],ho(n,u,s,p,na),u=na[1],s=na[2]),t.quadraticCurveTo(l,u,o,s)):(p<1&&(Va(i,l,c,o,p,na),l=na[1],c=na[2],o=na[3],Va(n,u,f,s,p,na),u=na[1],f=na[2],s=na[3]),t.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(t){return ML(this.shape,t,!1)},e.prototype.tangentAt=function(t){var a=ML(this.shape,t,!0);return Na(a,a)},e})(ft);EL.prototype.type="bezier-curve";var Xs=EL;var J4=(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})();var AL=(function(r){kt(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 J4},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.max(a.r,0),s=a.startAngle,l=a.endAngle,u=a.clockwise,c=Math.cos(s),f=Math.sin(s);t.moveTo(c*o+i,f*o+n),t.arc(i,n,o,s,l,!u)},e})(ft);AL.prototype.type="arc";var Af=AL;var Q4=(function(r){kt(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,a=this.shapeChanged(),i=0;i<t.length;i++)a=a||t[i].shapeChanged();a&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],a=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(a[0],a[1],t[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,a){for(var i=a.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],a=0;a<t.length;a++)t[a].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ft.prototype.getBoundingRect.call(this)},e})(ft),Co=Q4;var tY=(function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r})(),Zd=tY;var eY=(function(r){kt(e,r);function e(t,a,i,n,o,s){var l=r.call(this,o)||this;return l.x=t==null?0:t,l.y=a==null?0:a,l.x2=i==null?1:i,l.y2=n==null?0:n,l.type="linear",l.global=s||!1,l}return e})(Zd),Za=eY;var rY=(function(r){kt(e,r);function e(t,a,i,n,o){var s=r.call(this,n)||this;return s.x=t==null?.5:t,s.y=a==null?.5:a,s.r=i==null?.5:i,s.type="radial",s.global=o||!1,s}return e})(Zd),Xd=rY;var i_=Math.min,aY=Math.max,qd=Math.abs,qs=[0,0],js=[0,0],nr=O0(),jd=nr.minTv,$d=nr.maxTv,iY=(function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var a=0;a<4;a++)this._corners[a]=new pt;for(var a=0;a<2;a++)this._axes[a]=new pt;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var a=this._corners,i=this._axes,n=e.x,o=e.y,s=n+e.width,l=o+e.height;if(a[0].set(n,o),a[1].set(s,o),a[2].set(s,l),a[3].set(n,l),t)for(var u=0;u<4;u++)a[u].transform(t);pt.sub(i[0],a[1],a[0]),pt.sub(i[1],a[3],a[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(a[0])},r.prototype.intersect=function(e,t,a){var i=!0,n=!t;return t&&pt.set(t,0,0),nr.reset(a,!n),!this._intersectCheckOneSide(this,e,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(e,this,n,-1)&&(i=!1,n)||!n&&!nr.negativeSize&&pt.copy(t,i?nr.useDir?nr.dirMinTv:jd:$d),i},r.prototype._intersectCheckOneSide=function(e,t,a,i){for(var n=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,qs),e._getProjMinMaxOnAxis(o,t._corners,js),nr.negativeSize||qs[1]<js[0]||qs[0]>js[1]){if(n=!1,nr.negativeSize||a)return n;var l=qd(js[0]-qs[1]),u=qd(qs[0]-js[1]);i_(l,u)>$d.len()&&(l<u?pt.scale($d,s,-l*i):pt.scale($d,s,u*i))}else if(!a){var l=qd(js[0]-qs[1]),u=qd(qs[0]-js[1]);(nr.useDir||i_(l,u)<jd.len())&&((l<u||!nr.bidirectional)&&(pt.scale(jd,s,l*i),nr.useDir&&nr.calcDirMTV()),(l>=u||!nr.bidirectional)&&(pt.scale(jd,s,-u*i),nr.useDir&&nr.calcDirMTV()))}}return n},r.prototype._getProjMinMaxOnAxis=function(e,t,a){for(var i=this._axes[e],n=this._origin,o=t[0].dot(i)+n[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(i)+n[e];s=i_(c,s),l=aY(c,l)}a[0]=s+nr.touchThreshold,a[1]=l-nr.touchThreshold,nr.negativeSize=a[1]<a[0]},r})(),Kd=iY;var nY=[],oY=(function(r){kt(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,a){t.call(a,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,a){a?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,a){a=a||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],a)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var a=this._cursor;a<this._displayables.length;a++)t&&t(this._displayables[a]);for(var a=0;a<this._temporaryDisplayables.length;a++)t&&t(this._temporaryDisplayables[a])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var a=this._displayables[t];a.parent=this,a.update(),a.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var a=this._temporaryDisplayables[t];a.parent=this,a.update(),a.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new at(1/0,1/0,-1/0,-1/0),a=0;a<this._displayables.length;a++){var i=this._displayables[a],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(nY)),t.union(n)}this._rect=t}return this._rect},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(n.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,a))return!0}return!1},e})(ke),LL=oY;var PL=ot();function on(r,e,t,a,i){var n;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();n=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;a?(u=Q(a.duration,200),c=Q(a.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),n&&(n.duration!=null&&(u=n.duration),n.easing!=null&&(c=n.easing),n.delay!=null&&(f=n.delay)),$(f)&&(f=f(t,i)),$(u)&&(u=u(t));var p={duration:u||0,delay:f,easing:c};return p}else return null}function n_(r,e,t,a,i,n,o){var s=!1,l;$(i)?(o=n,n=i,i=null):et(i)&&(n=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=on(r,a,i,u?l||{}:null,a&&a.getAnimationDelayParams?a.getAnimationDelayParams(e,i):null);if(c&&c.duration>0){var f=c.duration,p=c.delay,h=c.easing,d={duration:f,delay:p||0,easing:h,done:n,force:!!n||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),n&&n()}function wt(r,e,t,a,i,n){n_("update",r,e,t,a,i,n)}function Vt(r,e,t,a,i,n){n_("enter",r,e,t,a,i,n)}function Nn(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 Xa(r,e,t,a,i,n){Nn(r)||n_("leave",r,e,t,a,i,n)}function IL(r,e,t,a){r.removeTextContent(),r.removeTextGuideLine(),Xa(r,{style:{opacity:0}},e,t,a)}function oa(r,e,t){function a(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||IL(i,e,t,a)}):IL(r,e,t,a)}function Re(r){PL(r).oldStyle=r.style}function kL(r){return PL(r).oldStyle}var s_={},bt=["x","y"],be=["width","height"];function sY(r){return ft.extend(r)}var lY=dL;function uY(r,e){return lY(r,e)}function Di(r,e){s_[r]=e}function gu(r){if(s_.hasOwnProperty(r))return s_[r]}function $s(r,e,t,a){var i=Gd(r,e);return t&&(a==="center"&&(t=OL(t,i.getBoundingRect())),zL(i,t)),i}function u_(r,e,t){var a=new se({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(t==="center"){var n={width:i.width,height:i.height};a.setStyle(OL(e,n))}}});return a}function OL(r,e){var t=e.width/e.height,a=r.height*t,i;a<=r.width?i=r.height:(a=r.width,i=a/t);var n=r.x+r.width/2,o=r.y+r.height/2;return{x:n-a/2,y:o-i/2,width:a,height:i}}var Mr=vL;function zL(r,e){if(r.applyTransform){var t=r.getBoundingRect(),a=t.calculateTransform(e);r.applyTransform(a)}}function On(r,e){return Hs(r,r,{lineWidth:e}),r}function cY(r,e){return Id(r,r,e),r}var Lf=Nr;function Ci(r,e){for(var t=uo([]);r&&r!==e;)fr(t,r.getLocalTransform(),t),r=r.parent;return t}function vr(r,e,t){return e&&!Ce(e)&&(e=Qr.getLocalTransform(e)),t&&(e=Fe([],e)),ce([],r,e)}function Ks(r,e,t){var a=e[4]===0||e[5]===0||e[0]===0?1:_i(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:_i(2*e[4]/e[2]),n=[r==="left"?-a:r==="right"?a:0,r==="top"?-i:r==="bottom"?i:0];return n=vr(n,e,t),_i(n[0])>_i(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function RL(r){return!r.isGroup}function fY(r){return r.shape!=null}function zn(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){RL(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return fY(o)&&(s.shape=tt(o.shape)),s}var n=a(r);e.traverse(function(o){if(RL(o)&&o.anid){var s=n[o.anid];if(s){var l=i(o);o.attr(i(s)),wt(o,l,t,nt(o).dataIndex)}}})}function c_(r,e){return V(r,function(t){var a=t[0];a=_e(a,e.x),a=wr(a,e.x+e.width);var i=t[1];return i=_e(i,e.y),i=wr(i,e.y+e.height),[a,i]})}function pY(r,e){var t=_e(r.x,e.x),a=wr(r.x+r.width,e.x+e.width),i=_e(r.y,e.y),n=wr(r.y+r.height,e.y+e.height);if(a>=t&&n>=i)return{x:t,y:i,width:a-t,height:n-i}}function Vn(r,e,t){var a=O({rectHover:!0},e),i=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),J(i,t),new se(a)):$s(r.replace("path://",""),a,t,"center")}function yu(r,e,t,a,i){for(var n=0,o=i[i.length-1];n<i.length;n++){var s=i[n];if(VL(r,e,t,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function VL(r,e,t,a,i,n,o,s){var l=t-r,u=a-e,c=o-i,f=s-n,p=o_(c,f,l,u);if(hY(p))return!1;var h=r-i,d=e-n,v=o_(h,d,l,u)/p;if(v<0||v>1)return!1;var m=o_(h,d,c,f)/p;return!(m<0||m>1)}function o_(r,e,t,a){return r*a-t*e}function hY(r){return r<=1e-6&&r>=-1e-6}function qa(r,e,t,a,i){return e==null||(yt(e)?Se[0]=Se[1]=Se[2]=Se[3]=e:(Se[0]=e[0],Se[1]=e[1],Se[2]=e[2],Se[3]=e[3]),a&&(Se[0]=_e(0,Se[0]),Se[1]=_e(0,Se[1]),Se[2]=_e(0,Se[2]),Se[3]=_e(0,Se[3])),t&&(Se[0]=-Se[0],Se[1]=-Se[1],Se[2]=-Se[2],Se[3]=-Se[3]),NL(r,Se,"x","width",3,1,i&&i[0]||0),NL(r,Se,"y","height",0,2,i&&i[1]||0)),r}var Se=[0,0,0,0];function NL(r,e,t,a,i,n,o){var s=e[n]+e[i],l=r[a];r[a]+=s,o=_e(0,wr(o,l)),r[a]<o?(r[a]=o,r[t]+=e[i]>=0?-e[i]:e[n]>=0?l+e[n]:_i(s)>1e-8?(l-o)*e[i]/s:0):r[t]-=e[i]}function Er(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,i=W(e)?{formatter:e}:e,n=t.mainType,o=t.componentIndex,s={componentType:n,name:a,$vars:["name"]};s[n+"Index"]=o;var l=r.formatterParamsExtra;l&&T(gt(l),function(c){it(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=nt(r.el);u.componentMainType=n,u.componentIndex=o,u.tooltipConfig={name:a,option:J({content:a,encodeHTMLContent:!0,formatterParams:s},i)}}function l_(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function zr(r,e){if(r)if(z(r))for(var t=0;t<r.length;t++)l_(r[t],e);else l_(r,e)}function Qd(r){return!r||_i(r[1])<Jd&&_i(r[2])<Jd||_i(r[0])<Jd&&_i(r[3])<Jd}var Jd=1e-5;function xu(r,e){return r?at.copy(r,e):e.clone()}function tv(r,e){return e?ds(r||fe(),e):void 0}function ja(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function f_(r){var e=-1/0,t=1/0;l_(r,function(n){a(n),a(n.getTextContent()),a(n.getTextGuideLine())});function a(n){if(!(!n||n.isGroup)){var o=n.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(n.states[o[s]]);i(n)}}function i(n){if(n){var o=n.z2;o>e&&(e=o),o<t&&(t=o)}}return t>e&&(t=e=0),{min:t,max:e}}function Js(r,e,t){BL(r,e,t,-1/0)}function BL(r,e,t,a){if(r.ignoreModelZ)return a;var i=r.getTextContent(),n=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)a=_e(BL(s[l],e,t,a),a);else r.z=e,r.zlevel=t,a=_e(r.z2||0,a);if(i&&(i.z=e,i.zlevel=t,isFinite(a)&&(i.z2=a+2)),n){var u=r.textGuideLineConfig;n.z=e,n.zlevel=t,isFinite(a)&&(n.z2=a+(u&&u.showAbove?1:-1))}return a}Di("circle",Or);Di("ellipse",Cf);Di("sector",De);Di("ring",Zs);Di("polygon",ye);Di("polyline",he);Di("rect",ht);Di("line",le);Di("bezierCurve",Xs);Di("arc",Af);var ev={};function WL(r,e){for(var t=0;t<qe.length;t++){var a=qe[t],i=e[a],n=r.ensureState(a);n.style=n.style||{},n.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function p_(r,e,t){var a=r.labelFetcher,i=r.labelDataIndex,n=r.labelDimIndex,o=e.normal,s;a&&(s=a.getFormattedLabel(i,"normal",null,n,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=$(r.defaultText)?r.defaultText(i,r,t):r.defaultText);for(var l={normal:s},u=0;u<qe.length;u++){var c=qe[u],f=e[c];l[c]=Q(a?a.getFormattedLabel(i,c,null,n,f&&f.get("formatter")):null,s)}return l}function $t(r,e,t,a){t=t||ev;for(var i=r instanceof Dt,n=!1,o=0;o<wo.length;o++){var s=e[wo[o]];if(s&&s.getShallow("show")){n=!0;break}}var l=i?r:r.getTextContent();if(n){i||(l||(l=new Dt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=p_(t,e),c=e.normal,f=!!c.getShallow("show"),p=Gt(c,a&&a.normal,t,!1,!i);p.text=u.normal,i||r.setTextConfig(If(c,t,!1));for(var o=0;o<qe.length;o++){var h=qe[o],s=e[h];if(s){var d=l.ensureState(h),v=!!Q(s.getShallow("show"),f);if(v!==f&&(d.ignore=!v),d.style=Gt(s,a&&a[h],t,!0,!i),d.style.text=u[h],!i){var m=r.ensureState(h);m.textConfig=If(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(p.x=l.style.x),l.style.y!=null&&(p.y=l.style.y),l.ignore=!f,l.useStyle(p),l.dirty(),t.enableTextSetter&&(Bn(l).setLabelText=function(g){var y=p_(t,e,g);WL(l,y)})}else l&&(l.ignore=!0);r.dirty()}function qt(r,e){e=e||"label";for(var t={normal:r.getModel(e)},a=0;a<qe.length;a++){var i=qe[a];t[i]=r.getModel([i,e])}return t}function Gt(r,e,t,a,i){var n={};return dY(n,r,t,a,i),e&&O(n,e),n}function If(r,e,t){e=e||{};var a={},i,n=r.getShallow("rotate"),o=Q(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(t?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(a.position=i),s!=null&&(a.offset=s),n!=null&&(n*=Math.PI/180,a.rotation=n),o!=null&&(a.distance=o),a.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(a.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(a.layoutRect=e.layoutRect),a}function dY(r,e,t,a,i){t=t||ev;var n=e.ecModel,o=n&&n.option.textStyle,s=vY(e),l;if(s){l={};var u="richInheritPlainLabel",c=Q(e.get(u),n?n.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var p=e.getModel(["rich",f]);GL(l[f]={},p,o,e,c,t,a,i,!1,!0)}}l&&(r.rich=l);var h=e.get("overflow");h&&(r.overflow=h);var d=e.get("lineOverflow");d&&(r.lineOverflow=d);var v=r,m=e.get("minMargin");if(m!=null)m=yt(m)?m/2:0,v.margin=[m,m,m,m],v.__marginType=Qs.minMargin;else{var g=e.get("textMargin");g!=null&&(v.margin=so(g),v.__marginType=Qs.textMargin)}GL(r,e,o,null,null,t,a,i,!0,!1)}function vY(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||ev).rich;if(t){e=e||{};for(var a=gt(t),i=0;i<a.length;i++){var n=a[i];e[n]=1}}r=r.parentModel}return e}var UL=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],FL=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],HL=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function GL(r,e,t,a,i,n,o,s,l,u){t=!o&&t||ev;var c=n&&n.inheritColor,f=e.getShallow("color"),p=e.getShallow("textBorderColor"),h=Q(e.getShallow("opacity"),t.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(p==="inherit"||p==="auto")&&(c?p=c:p=null),s||(f=f||t.color,p=p||t.textBorderColor),f!=null&&(r.fill=f),p!=null&&(r.stroke=p);var d=Q(e.getShallow("textBorderWidth"),t.textBorderWidth);d!=null&&(r.lineWidth=d);var v=Q(e.getShallow("textBorderType"),t.textBorderType);v!=null&&(r.lineDash=v);var m=Q(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);m!=null&&(r.lineDashOffset=m),!o&&h==null&&!u&&(h=n&&n.defaultOpacity),h!=null&&(r.opacity=h),!o&&!s&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var g=0;g<UL.length;g++){var y=UL[g],x=i!==!1&&a?Te(e.getShallow(y),a.getShallow(y),t[y]):Q(e.getShallow(y),t[y]);x!=null&&(r[y]=x)}for(var g=0;g<FL.length;g++){var y=FL[g],x=e.getShallow(y);x!=null&&(r[y]=x)}if(r.verticalAlign==null){var _=e.getShallow("baseline");_!=null&&(r.verticalAlign=_)}if(!l||!n.disableBox){for(var g=0;g<HL.length;g++){var y=HL[g],x=e.getShallow(y);x!=null&&(r[y]=x)}var b=e.getShallow("borderType");b!=null&&(r.borderDash=b),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&c&&(r.backgroundColor=c),(r.borderColor==="auto"||r.borderColor==="inherit")&&c&&(r.borderColor=c)}}function _u(r,e){var t=e&&e.getModel("textStyle");return Be([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 Bn=ot();function rv(r,e,t,a){if(r){var i=Bn(r);i.prevValue=i.value,i.value=t;var n=e.normal;i.valueAnimation=n.get("valueAnimation"),i.valueAnimation&&(i.precision=n.get("precision"),i.defaultInterpolatedText=a,i.statesModels=e)}}function av(r,e,t,a,i){var n=Bn(r);if(!n.valueAnimation||n.prevValue===n.value)return;var o=n.defaultInterpolatedText,s=Q(n.interpolatedValue,n.prevValue),l=n.value;function u(c){var f=wd(t,n.precision,s,l,c);n.interpolatedValue=c===1?null:f;var p=p_({labelDataIndex:e,labelFetcher:i,defaultText:o?o(f):f+""},n.statesModels,f);WL(r,p)}r.percent=0,(n.prevValue==null?Vt:wt)(r,{percent:1},a,e,null,u)}var Qs={minMargin:1,textMargin:2};var gY=["textStyle","color"],h_=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],d_=new Dt,yY=(function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(gY):null)},r.prototype.getFont=function(){return _u({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")},a=0;a<h_.length;a++)t[h_[a]]=this.getShallow(h_[a]);return d_.useStyle(t),d_.update(),d_.getBoundingRect()},r})(),YL=yY;var v_=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],xY=ra(v_),ZL=(function(){function r(){}return r.prototype.getLineStyle=function(e){return xY(this,e)},r})();var m_=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],_Y=ra(m_),XL=(function(){function r(){}return r.prototype.getItemStyle=function(e,t){return _Y(this,e,t)},r})();var tl=(function(){function r(e,t,a){this.parentModel=t,this.ecModel=a,this.option=e}return r.prototype.init=function(e,t,a){for(var i=[],n=3;n<arguments.length;n++)i[n-3]=arguments[n]},r.prototype.mergeOption=function(e,t){dt(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 a=this.option,i=a==null?a:a[e];if(i==null&&!t){var n=this.parentModel;n&&(i=n.getShallow(e))}return i},r.prototype.getModel=function(e,t){var a=e!=null,i=a?this.parsePath(e):null,n=a?this._doGet(i):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(n,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(tt(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(!Lt.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 a=this.option;if(!e)return a;for(var i=0;i<e.length&&!(e[i]&&(a=a&&typeof a=="object"?a[e[i]]:null,a==null));i++);return a==null&&t&&(a=t._doGet(this.resolveParentPath(e),t.parentModel)),a},r})();uu(tl);tA(tl);Jt(tl,ZL);Jt(tl,XL);Jt(tl,eA);Jt(tl,YL);var Mt=tl;var bY=Math.round(Math.random()*10);function $a(r){return[r||"",bY++].join("_")}function qL(r){var e={};r.registerSubTypeDefaulter=function(t,a){var i=ea(t);e[i.main]=a},r.determineSubType=function(t,a){var i=a.type;if(!i){var n=ea(t).main;r.hasSubTypes(t)&&e[n]&&(i=e[n](a))}return i}}function jL(r,e){r.topologicalTravel=function(n,o,s,l){if(!n.length)return;var u=t(o),c=u.graph,f=u.noEntryList,p={};for(T(n,function(y){p[y]=!0});f.length;){var h=f.pop(),d=c[h],v=!!p[h];v&&(s.call(l,h,d.originalDeps.slice()),delete p[h]),T(d.successor,v?g:m)}T(p,function(){var y="";throw new Error(y)});function m(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function g(y){p[y]=!0,m(y)}};function t(n){var o={},s=[];return T(n,function(l){var u=a(o,l),c=u.originalDeps=e(l),f=i(c,n);u.entryCount=f.length,u.entryCount===0&&s.push(l),T(f,function(p){lt(u.predecessor,p)<0&&u.predecessor.push(p);var h=a(o,p);lt(h.successor,p)<0&&h.successor.push(l)})}),{graph:o,noEntryList:s}}function a(n,o){return n[o]||(n[o]={predecessor:[],successor:[]}),n[o]}function i(n,o){var s=[];return T(n,function(l){lt(o,l)>=0&&s.push(l)}),s}}function Ar(r,e){return dt(dt({},r,!0),e,!0)}var $L={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:". "}}}};var KL={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var nv="ZH",y_="EN",bu=y_,iv={},x_={},ov=Lt.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||bu).toUpperCase();return r.indexOf(nv)>-1?nv:bu})():bu;function JL(r,e){r=r.toUpperCase(),x_[r]=new Mt(e),iv[r]=e}function QL(r){if(W(r)){var e=iv[r.toUpperCase()]||{};return r===nv||r===y_?tt(e):dt(tt(e),tt(iv[bu]),!1)}else return dt(tt(r),tt(iv[bu]),!1)}function Pf(r){return x_[r]}function tI(){return x_[bu]}JL(y_,$L);JL(nv,KL);var __=null;function eI(r){__||(__=r)}function me(){return __}var uv=1e3,cv=uv*60,Su=cv*60,Sa=Su*24,b_=Sa*365,SY={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},lv={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},wY="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",sv="{yyyy}-{MM}-{dd}",S_={year:"{yyyy}",month:"{yyyy}-{MM}",day:sv,hour:sv+" "+lv.hour,minute:sv+" "+lv.minute,second:sv+" "+lv.second,millisecond:wY},sa=["year","month","day","hour","minute","second","millisecond"],rI=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function aI(r){return!W(r)&&!$(r)?TY(r):r}function TY(r){r=r||{};var e={},t=!0;return T(sa,function(a){t&&(t=r[a]==null)}),T(sa,function(a,i){var n=r[a];e[a]={};for(var o=null,s=i;s>=0;s--){var l=sa[s],u=et(n)&&!z(n)?n[l]:n,c=void 0;z(u)?(c=u.slice(),o=c[0]||""):W(u)?(o=u,c=[o]):(o==null?o=lv[a]:SY[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],t&&(c[1]="{primary|"+o+"}")),e[a][l]=c}}),e}function Un(r,e){return r+="","0000".substr(0,e-r.length)+r}function wu(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 iI(r){return r===wu(r)}function nI(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function el(r,e,t,a){var i=Fa(r),n=i[w_(t)](),o=i[pv(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[hv(t)](),u=i["get"+(t?"UTC":"")+"Day"](),c=i[dv(t)](),f=(c-1)%12+1,p=i[vv(t)](),h=i[mv(t)](),d=i[gv(t)](),v=c>=12?"pm":"am",m=v.toUpperCase(),g=a instanceof Mt?a:Pf(a||ov)||tI(),y=g.getModel("time"),x=y.get("month"),_=y.get("monthAbbr"),b=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,v+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,n+"").replace(/{yy}/g,Un(n%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,x[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,Un(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Un(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Un(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Un(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Un(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Un(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Un(d,3)).replace(/{S}/g,d+"")}function oI(r,e,t,a,i){var n=null;if(W(t))n=t;else if($(t)){var o={time:r.time,level:r.time.level},s=me();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),n=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];n=u[Math.min(l.level,u.length-1)]||""}else{var c=rl(r.value,i);n=t[c][c][0]}}return el(new Date(r.value),n,i,a)}function rl(r,e){var t=Fa(r),a=t[pv(e)]()+1,i=t[hv(e)](),n=t[dv(e)](),o=t[vv(e)](),s=t[mv(e)](),l=t[gv(e)](),u=l===0,c=u&&s===0,f=c&&o===0,p=f&&n===0,h=p&&i===1,d=h&&a===1;return d?"year":h?"month":p?"day":f?"hour":c?"minute":u?"second":"millisecond"}function fv(r,e,t){switch(e){case"year":r[T_(t)](0);case"month":r[D_(t)](1);case"day":r[C_(t)](0);case"hour":r[M_(t)](0);case"minute":r[E_(t)](0);case"second":r[A_(t)](0)}return r}function w_(r){return r?"getUTCFullYear":"getFullYear"}function pv(r){return r?"getUTCMonth":"getMonth"}function hv(r){return r?"getUTCDate":"getDate"}function dv(r){return r?"getUTCHours":"getHours"}function vv(r){return r?"getUTCMinutes":"getMinutes"}function mv(r){return r?"getUTCSeconds":"getSeconds"}function gv(r){return r?"getUTCMilliseconds":"getMilliseconds"}function sI(r){return r?"setUTCFullYear":"setFullYear"}function T_(r){return r?"setUTCMonth":"setMonth"}function D_(r){return r?"setUTCDate":"setDate"}function C_(r){return r?"setUTCHours":"setHours"}function M_(r){return r?"setUTCMinutes":"setMinutes"}function E_(r){return r?"setUTCSeconds":"setSeconds"}function A_(r){return r?"setUTCMilliseconds":"setMilliseconds"}function I_(r){if(!pf(r))return W(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function yv(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var sn=so;function xv(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Be(c)?c:"-"}function n(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Fa(r):r;if(isNaN(+l)){if(s)return"-"}else return el(l,a,t)}if(e==="ordinal")return Wc(r)?i(r):yt(r)&&n(r)?r+"":"-";var u=Ha(r);return n(u)?I_(u):Wc(r)?i(r):typeof r=="boolean"?r+"":"-"}var lI=["a","b","c","d","e","f","g"],L_=function(r,e){return"{"+r+(e==null?"":e)+"}"};function _v(r,e,t){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n<i.length;n++){var o=lI[n];r=r.replace(L_(o),L_(o,0))}for(var s=0;s<a;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];r=r.replace(L_(lI[l],s),t?We(u):u)}return r}function uI(r,e,t){return T(e,function(a,i){r=r.replace("{"+i+"}",t?We(a):a)}),r}function cI(r,e){var t=W(r)?{color:r,extraCssText:e}:r||{},a=t.color,i=t.type;e=t.extraCssText;var n=t.renderMode||"html";if(!a)return"";if(n==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+We(a)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+We(a)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:n,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Mi(r,e){return e=e||"transparent",W(r)?r:et(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function al(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var bv={},P_={},DY=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=a(bv,!0),this._normalMasterList=a(P_,!1);function a(i,n){var o=[];return T(i,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){T(this._normalMasterList,function(a){a.update&&a.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){bv[e]=t;return}P_[e]=t},r.get=function(e){return P_[e]||bv[e]},r})();function CY(r){return!!bv[r]}var Sv={coord:1,coord2:2};function fI(r){pI.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var pI=q();function hI(r){var e=r.getShallow("coord",!0),t=Sv.coord;if(e==null){var a=pI.get(r.type);a&&a.getCoord2&&(t=Sv.coord2,e=a.getCoord2(r))}return{coord:e,from:t}}var Ei={none:0,dataCoordSys:1,boxCoordSys:2};function k_(r,e){var t=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),i=a!=null,n=Ei.none;if(t){var o=r.mainType==="series";a==null&&(a=o?"data":"box"),a==="data"?(n=Ei.dataCoordSys,o||(n=Ei.none)):a==="box"&&(n=Ei.boxCoordSys,!o&&!CY(t)&&(n=Ei.none))}return{coordSysType:t,kind:n}}function ln(r){var e=r.targetModel,t=r.coordSysType,a=r.coordSysProvider,i=r.isDefaultDataCoordSys,n=r.allowNotFound,o=k_(e,!0),s=o.kind,l=o.coordSysType;if(i&&s!==Ei.dataCoordSys&&(s=Ei.dataCoordSys,l=t),s===Ei.none||l!==t)return!1;var u=a(t,e);return u?(s===Ei.dataCoordSys?e.coordinateSystem=u:e.boxCoordinateSystem=u,!0):!1}var wv=function(r,e){var t=e.getReferringComponents(r,Yt).models[0];return t&&t.coordinateSystem},Fn=DY;var Tv=T,R_=["left","right","top","bottom","width","height"],il=[["width","left","right"],["height","top","bottom"]];function N_(r,e,t,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),p=f&&f.getBoundingRect(),h,d;if(r==="horizontal"){var v=c.width+(p?-p.x+c.x:0);h=n+v,h>a||l.newline?(n=0,h=v,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(p?-p.y+c.y:0);d=o+m,d>i||l.newline?(n+=s+t,o=0,d=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=n,l.y=o,l.markRedraw(),r==="horizontal"?n=h+t:o=d+t)})}var Ai=N_,Vut=ut(N_,"vertical"),But=ut(N_,"horizontal");function Dv(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function MY(r,e){var t=Zt(r,e,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),i,n;if(t.type===Rf.point)n=t.refPoint,i=Bt(a,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=z(o)?o:[o,o];i=Bt(a,t.refContainer),n=t.boxCoordFrom===Sv.coord2?t.refPoint:[j(s[0],i.width)+i.x,j(s[1],i.height)+i.y]}return{viewRect:i,center:n}}function Cv(r,e){var t=MY(r,e),a=t.viewRect,i=t.center,n=r.get("radius");z(n)||(n=[0,n]);var o=j(a.width,e.getWidth()),s=j(a.height,e.getHeight()),l=Math.min(o,s),u=j(n[0],l/2),c=j(n[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:a}}function Bt(r,e,t){t=sn(t||0);var a=e.width,i=e.height,n=j(r.left,a),o=j(r.top,i),s=j(r.right,a),l=j(r.bottom,i),u=j(r.width,a),c=j(r.height,i),f=t[2]+t[0],p=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=a-s-p-n),isNaN(c)&&(c=i-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>a/i?u=a*.8:c=i*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(n)&&(n=a-s-u-p),isNaN(o)&&(o=i-l-c-f),r.left||r.right){case"center":n=a/2-u/2-t[3];break;case"right":n=a-u-p;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-t[0];break;case"bottom":o=i-c-f;break}n=n||0,o=o||0,isNaN(u)&&(u=a-p-n-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var d=new at((e.x||0)+n+t[3],(e.y||0)+o+t[0],u,c);return d.margin=t,d}function Mv(r,e,t){var a=r.getShallow("preserveAspect",!0);if(!a)return e;var i=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(i))<1e-9)return e;var n=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=a==="cover";return i>t&&!l||i<t&&l?(s.width=e.height*t,n==="left"?s.left=0:n==="right"?s.right=0:s.left="center"):(s.height=e.width/t,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),Bt(s,e)}var Rf={rect:1,point:2};function Zt(r,e,t){var a,i,n,o=r.boxCoordinateSystem,s;if(o){var l=hI(r),u=l.coord,c=l.from;if(o.dataToLayout){n=Rf.rect,s=c;var f=o.dataToLayout(u);a=f.contentRect||f.rect}else t&&t.enableLayoutOnlyByCenter&&o.dataToPoint&&(n=Rf.point,s=c,i=o.dataToPoint(u))}return n==null&&(n=Rf.rect),n===Rf.rect&&(a||(a={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),i=[a.x+a.width/2,a.y+a.height/2]),{type:n,refContainer:a,refPoint:i,boxCoordFrom:s}}function Mo(r,e,t,a,i,n){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(n=n||r,n.x=r.x,n.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new at(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(J({width:u.width,height:u.height},e),t,a),p=o?f.x-u.x:0,h=s?f.y-u.y:0;return l==="raw"?(n.x=p,n.y=h):(n.x+=p,n.y+=h),n===r&&r.markRedraw(),!0}function dI(r,e){return r[il[e][0]]!=null||r[il[e][1]]!=null&&r[il[e][2]]!=null}function Eo(r){var e=r.layoutMode||r.constructor.layoutMode;return et(e)?e:e?{type:e}:null}function mr(r,e,t){var a=t&&t.ignoreSize;!z(a)&&(a=[a,a]);var i=o(il[0],0),n=o(il[1],1);l(il[0],r,i),l(il[1],r,n);function o(u,c){var f={},p=0,h={},d=0,v=2;if(Tv(u,function(y){h[y]=r[y]}),Tv(u,function(y){it(e,y)&&(f[y]=h[y]=e[y]),s(f,y)&&p++,s(h,y)&&d++}),a[c])return s(e,u[1])?h[u[2]]=null:s(e,u[2])&&(h[u[1]]=null),h;if(d===v||!p)return h;if(p>=v)return f;for(var m=0;m<u.length;m++){var g=u[m];if(!it(f,g)&&it(r,g)){f[g]=r[g];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){Tv(u,function(p){c[p]=f[p]})}}function la(r){return O_({},r)}function O_(r,e){return e&&r&&Tv(R_,function(t){it(e,t)&&(r[t]=e[t])}),r}var EY=ot(),Tu=(function(r){I(e,r);function e(t,a,i){var n=r.call(this,t,a,i)||this;return n.uid=$a("ec_cpt_model"),n}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i)},e.prototype.mergeDefaultAndTheme=function(t,a){var i=Eo(this),n=i?la(t):{},o=a.getTheme();dt(t,o.get(this.mainType)),dt(t,this.getDefaultOption()),i&&mr(t,n,i)},e.prototype.mergeOption=function(t,a){dt(this.option,t,!0);var i=Eo(this);i&&mr(this.option,t,i)},e.prototype.optionUpdated=function(t,a){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!QE(t))return t.defaultOption;var a=EY(this);if(!a.defaultOption){for(var i=[],n=t;n;){var o=n.prototype.defaultOption;o&&i.push(o),n=n.superClass}for(var s={},l=i.length-1;l>=0;l--)s=dt(s,i[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var i=t+"Index",n=t+"Id";return $i(this.ecModel,t,{index:this.get(i,!0),id:this.get(n,!0)},a)},e.prototype.getBoxLayoutParams=function(){return Dv(this,!1)},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})(Mt);Dd(Tu,Mt);xo(Tu);qL(Tu);jL(Tu,AY);function AY(r){var e=[];return T(Tu.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=V(e,function(t){return ea(t).main}),r!=="dataset"&<(e,"dataset")<=0&&e.unshift("dataset"),e}var St=Tu;var nl={color:{},darkColor:{},size:{}},Oe=nl.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};O(Oe,{primary:Oe.neutral80,secondary:Oe.neutral70,tertiary:Oe.neutral60,quaternary:Oe.neutral50,disabled:Oe.neutral20,border:Oe.neutral30,borderTint:Oe.neutral20,borderShade:Oe.neutral40,background:Oe.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Oe.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Oe.neutral70,axisLineTint:Oe.neutral40,axisTick:Oe.neutral70,axisTickMinor:Oe.neutral60,axisLabel:Oe.neutral70,axisSplitLine:Oe.neutral15,axisMinorSplitLine:Oe.neutral05});for(Ao in Oe)Oe.hasOwnProperty(Ao)&&(z_=Oe[Ao],Ao==="theme"?nl.darkColor.theme=Oe.theme.slice():Ao==="highlight"?nl.darkColor.highlight="rgba(255,231,130,0.4)":Ao.indexOf("accent")===0?nl.darkColor[Ao]=Ua(z_,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):nl.darkColor[Ao]=Ua(z_,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)}));var z_,Ao;nl.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var N=nl;var vI="";typeof navigator!="undefined"&&(vI=navigator.platform||"");var Du="rgba(0, 0, 0, 0.2)",mI=N.color.theme[0],LY=Ua(mI,null,null,.9),gI={darkMode:"auto",colorBy:"series",color:N.color.theme,gradientColor:[LY,mI],aria:{decal:{decals:[{color:Du,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Du,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Du,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Du,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Du,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Du,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:vI.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 Ev=q(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),er="original",Ae="arrayRows",or="objectRows",ca="keyedColumns",wa="typedArray",V_="unknown",Vr="column",un="row";var rr={Must:1,Might:2,Not:3},yI=ot();function xI(r){yI(r).datasetMap=q()}function Av(r,e,t){var a={},i=Lv(e);if(!i||!r)return a;var n=[],o=[],s=e.ecModel,l=yI(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),T(r,function(v,m){var g=et(v)?v:r[m]={name:v};g.type==="ordinal"&&c==null&&(c=m,f=d(g)),a[g.name]=[]});var p=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});T(r,function(v,m){var g=v.name,y=d(v);if(c==null){var x=p.valueWayDim;h(a[g],x,y),h(o,x,y),p.valueWayDim+=y}else if(c===m)h(a[g],0,y),h(n,0,y);else{var x=p.categoryWayDim;h(a[g],x,y),h(o,x,y),p.categoryWayDim+=y}});function h(v,m,g){for(var y=0;y<g;y++)v.push(m+y)}function d(v){var m=v.dimsDef;return m?m.length:1}return n.length&&(a.itemName=n),o.length&&(a.seriesName=o),a}function Cu(r,e,t){var a={},i=Lv(r);if(!i)return a;var n=e.sourceFormat,o=e.dimensionsDefine,s;(n===or||n===ca)&&T(o,function(c,f){(et(c)?c.name:c)==="name"&&(s=f)});var l=(function(){for(var c={},f={},p=[],h=0,d=Math.min(5,t);h<d;h++){var v=bI(e.data,n,e.seriesLayoutBy,o,e.startIndex,h);p.push(v);var m=v===rr.Not;if(m&&c.v==null&&h!==s&&(c.v=h),(c.n==null||c.n===c.v||!m&&p[c.n]===rr.Not)&&(c.n=h),g(c)&&p[c.n]!==rr.Not)return c;m||(v===rr.Might&&f.v==null&&h!==s&&(f.v=h),(f.n==null||f.n===f.v)&&(f.n=h))}function g(y){return y.v!=null&&y.n!=null}return g(c)?c:g(f)?f:null})();if(l){a.value=[l.v];var u=s!=null?s:l.n;a.itemName=[u],a.seriesName=[u]}return a}function Lv(r){var e=r.get("data",!0);if(!e)return $i(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Yt).models[0]}function _I(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:$i(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Yt).models}function Iv(r,e){return bI(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function bI(r,e,t,a,i,n){var o,s=5;if(Ne(r))return rr.Not;var l,u;if(a){var c=a[n];et(c)?(l=c.name,u=c.type):W(c)&&(l=c)}if(u!=null)return u==="ordinal"?rr.Must:rr.Not;if(e===Ae){var f=r;if(t===un){for(var p=f[n],h=0;h<(p||[]).length&&h<s;h++)if((o=_(p[i+h]))!=null)return o}else for(var h=0;h<f.length&&h<s;h++){var d=f[i+h];if(d&&(o=_(d[n]))!=null)return o}}else if(e===or){var v=r;if(!l)return rr.Not;for(var h=0;h<v.length&&h<s;h++){var m=v[h];if(m&&(o=_(m[l]))!=null)return o}}else if(e===ca){var g=r;if(!l)return rr.Not;var p=g[l];if(!p||Ne(p))return rr.Not;for(var h=0;h<p.length&&h<s;h++)if((o=_(p[h]))!=null)return o}else if(e===er)for(var y=r,h=0;h<y.length&&h<s;h++){var m=y[h],x=bi(m);if(!z(x))return rr.Not;if((o=_(x[n]))!=null)return o}function _(b){var S=W(b);if(b!=null&&Number.isFinite(Number(b))&&b!=="")return S?rr.Might:rr.Not;if(S&&b!=="-")return rr.Must}return rr.Not}var B_=q();function SI(r,e){ee(B_.get(r)==null&&e),B_.set(r,e)}function wI(r,e,t){var a=B_.get(e);if(!a)return t;var i=a(r);if(!i)return t;if(0)for(var n;n<i.length;n++);return t.concat(i)}var TI=ot(),IY=ot(),Nf=(function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,a){var i=Ft(this.get("color",!0)),n=this.get("colorLayer",!0);return DI(this,TI,i,n,e,t,a)},r.prototype.clearColorPalette=function(){kY(this,TI)},r})();function Of(r,e,t,a){var i=Ft(r.get(["aria","decal","decals"]));return DI(r,IY,i,null,e,t,a)}function PY(r,e){for(var t=r.length,a=0;a<t;a++)if(r[a].length>e)return r[a];return r[t-1]}function DI(r,e,t,a,i,n,o){n=n||r;var s=e(n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!a?t:PY(a,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function kY(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Pv,zf,CI,MI="\0_ec_inner",RY=1;var II=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,i,n,o,s){n=n||{},this.option=null,this._theme=new Mt(n),this._locale=new Mt(o),this._optionManager=s},e.prototype.setOption=function(t,a,i){var n=LI(a);this._optionManager.setOption(t,i,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,a){return this._resetOption(t,LI(a))},e.prototype._resetOption=function(t,a){var i=!1,n=this._optionManager;if(!t||t==="recreate"){var o=n.mountOption(t==="recreate");!this.option||t==="recreate"?CI(this,o):(this.restoreData(),this._mergeOption(o,a)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=n.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=n.getMediaOption(this);l.length&&T(l,function(u){i=!0,this._mergeOption(u,a)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var i=this.option,n=this._componentsMap,o=this._componentsCount,s=[],l=q(),u=a&&a.replaceMergeMainTypeMap;xI(this),T(t,function(f,p){f!=null&&(St.hasClass(p)?p&&(s.push(p),l.set(p,!0)):i[p]=i[p]==null?tt(f):dt(i[p],f,!0))}),u&&u.each(function(f,p){St.hasClass(p)&&!l.get(p)&&(s.push(p),l.set(p,!0))}),St.topologicalTravel(s,St.getAllClassMainTypes(),c,this);function c(f){var p=wI(this,f,Ft(t[f])),h=n.get(f),d=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=Sd(h,p,d);XE(v,f,St),i[f]=null,n.set(f,null),o.set(f,0);var m=[],g=[],y=0,x,_;T(v,function(b,S){var w=b.existing,D=b.newOption;if(!D)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=f==="series",M=St.getClass(f,b.keyInfo.subType,!C);if(!M){if(0)var E,L;return}if(f==="tooltip"){if(x)return;x=!0}if(w&&w.constructor===M)w.name=b.keyInfo.name,w.mergeOption(D,this),w.optionUpdated(D,!1);else{var A=O({componentIndex:S},b.keyInfo);w=new M(D,this,this,A),O(w,A),b.brandNew&&(w.__requireNewView=!0),w.init(D,this,this),w.optionUpdated(null,!0)}}w?(m.push(w.option),g.push(w),y++):(m.push(void 0),g.push(void 0))},this),i[f]=m,n.set(f,g),o.set(f,y),f==="series"&&Pv(this)}this._seriesIndices||Pv(this)},e.prototype.getOption=function(){var t=tt(this.option);return T(t,function(a,i){if(St.hasClass(i)){for(var n=Ft(a),o=n.length,s=!1,l=o-1;l>=0;l--)n[l]&&!su(n[l])?s=!0:(n[l]=null,!s&&o--);n.length=o,t[i]=n}}),delete t[MI],t},e.prototype.setTheme=function(t){this._theme=new Mt(t),this._resetOption("recreate",null)},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,a){var i=this._componentsMap.get(t);if(i){var n=i[a||0];if(n)return n;if(a==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(t){var a=t.mainType;if(!a)return[];var i=t.index,n=t.id,o=t.name,s=this._componentsMap.get(a);if(!s||!s.length)return[];var l;return i!=null?(l=[],T(Ft(i),function(u){s[u]&&l.push(s[u])})):n!=null?l=EI("id",n,s):o!=null?l=EI("name",o,s):l=At(s,function(u){return!!u}),AI(l,t)},e.prototype.findComponents=function(t){var a=t.query,i=t.mainType,n=s(a),o=n?this.queryComponents(n):At(this._componentsMap.get(i),function(u){return!!u});return l(AI(o,t));function s(u){var c=i+"Index",f=i+"Id",p=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[p]!=null)?{mainType:i,index:u[c],id:u[f],name:u[p]}:null}function l(u){return t.filter?At(u,t.filter):u}},e.prototype.eachComponent=function(t,a,i){var n=this._componentsMap;if($(t)){var o=a,s=t;n.each(function(f,p){for(var h=0;f&&h<f.length;h++){var d=f[h];d&&s.call(o,p,d,d.componentIndex)}})}else for(var l=W(t)?n.get(t):et(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&a.call(i,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var a=ve(t,null);return At(this._componentsMap.get("series"),function(i){return!!i&&a!=null&&i.name===a})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return At(this._componentsMap.get("series"),function(a){return!!a&&a.subType===t})},e.prototype.getSeries=function(){return At(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,a){zf(this),T(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(a,n,i)},this)},e.prototype.eachRawSeries=function(t,a){T(this._componentsMap.get("series"),function(i){i&&t.call(a,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(t,a,i){zf(this),T(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&a.call(i,o,n)},this)},e.prototype.eachRawSeriesByType=function(t,a,i){return T(this.getSeriesByType(t),a,i)},e.prototype.isSeriesFiltered=function(t){return zf(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,a){zf(this);var i=[];T(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];t.call(a,o,n)&&i.push(n)},this),this._seriesIndices=i,this._seriesIndicesMap=q(i)},e.prototype.restoreData=function(t){Pv(this);var a=this._componentsMap,i=[];a.each(function(n,o){St.hasClass(o)&&i.push(o)}),St.topologicalTravel(i,St.getAllClassMainTypes(),function(n){T(a.get(n),function(o){o&&(n!=="series"||!NY(o,t))&&o.restoreData()})})},e.internalField=(function(){Pv=function(t){var a=t._seriesIndices=[];T(t._componentsMap.get("series"),function(i){i&&a.push(i.componentIndex)}),t._seriesIndicesMap=q(a)},zf=function(t){},CI=function(t,a){t.option={},t.option[MI]=RY,t._componentsMap=q({series:[]}),t._componentsCount=q();var i=a.aria;et(i)&&i.enabled==null&&(i.enabled=!0),OY(a,t._theme.option),dt(a,gI,!1),t._mergeOption(a,null)}})(),e})(Mt);function NY(r,e){if(e){var t=e.seriesIndex,a=e.seriesId,i=e.seriesName;return t!=null&&r.componentIndex!==t||a!=null&&r.id!==a||i!=null&&r.name!==i}}function OY(r,e){var t=r.color&&!r.colorLayer;T(e,function(a,i){i==="colorLayer"&&t||i==="color"&&r.color||St.hasClass(i)||(typeof a=="object"?r[i]=r[i]?dt(r[i],a,!1):tt(a):r[i]==null&&(r[i]=a))})}function EI(r,e,t){if(z(e)){var a=q();return T(e,function(n){if(n!=null){var o=ve(n,null);o!=null&&a.set(n,!0)}}),At(t,function(n){return n&&a.get(n[r])})}else{var i=ve(e,null);return At(t,function(n){return n&&i!=null&&n[r]===i})}}function AI(r,e){return e.hasOwnProperty("subType")?At(r,function(t){return t&&t.subType===e.subType}):r}function LI(r){var e=q();return r&&T(Ft(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}Jt(II,Nf);var kv=II;var zY=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],VY=(function(){function r(e){T(zY,function(t){this[t]=Z(e[t],e)},this)}return r})(),Rv=VY;var BY=/^(min|max)?(.+)$/,UY=(function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,a){e&&(T(Ft(e.series),function(o){o&&o.data&&Ne(o.data)&&hs(o.data)}),T(Ft(e.dataset),function(o){o&&o.source&&Ne(o.source)&&hs(o.source)})),e=tt(e);var i=this._optionBackup,n=FY(e,t,!i);this._newBaseOption=n.baseOption,i?(n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],tt(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,a=this._timelineOptions;if(a.length){var i=e.getComponent("timeline");i&&(t=tt(a[i.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),a=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,o=[],s=[];if(!i.length&&!n)return s;for(var l=0,u=i.length;l<u;l++)HY(i[l].query,t,a)&&o.push(l);return!o.length&&n&&(o=[-1]),o.length&&!WY(o,this._currentMediaIndices)&&(s=V(o,function(c){return tt(c===-1?n.option:i[c].option)})),this._currentMediaIndices=o,s},r})();function FY(r,e,t){var a=[],i,n,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(n=o,n.timeline||(n.timeline=s)):((f||c)&&(r.options=r.media=null),n=r),c&&z(u)&&T(u,function(h){h&&h.option&&(h.query?a.push(h):i||(i=h))}),p(n),T(l,function(h){return p(h)}),T(a,function(h){return p(h.option)});function p(h){T(e,function(d){d(h,t)})}return{baseOption:n,timelineOptions:l||[],mediaDefault:i,mediaList:a}}function HY(r,e,t){var a={width:e,height:t,aspectratio:e/t},i=!0;return T(r,function(n,o){var s=o.match(BY);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();GY(a[u],n,l)||(i=!1)}}),i}function GY(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function WY(r,e){return r.join(",")===e.join(",")}var PI=UY;var Li=T,Bf=et,kI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function U_(r){var e=r&&r.itemStyle;if(e)for(var t=0,a=kI.length;t<a;t++){var i=kI[t],n=e.normal,o=e.emphasis;n&&n[i]&&(r[i]=r[i]||{},r[i].normal?dt(r[i].normal,n[i]):r[i].normal=n[i],n[i]=null),o&&o[i]&&(r[i]=r[i]||{},r[i].emphasis?dt(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function Lr(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var a=r[e].normal,i=r[e].emphasis;a&&(t?(r[e].normal=r[e].emphasis=null,J(r[e],a)):r[e]=a),i&&(r.emphasis=r.emphasis||{},r.emphasis[e]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function Vf(r){Lr(r,"itemStyle"),Lr(r,"lineStyle"),Lr(r,"areaStyle"),Lr(r,"label"),Lr(r,"labelLine"),Lr(r,"upperLabel"),Lr(r,"edgeLabel")}function He(r,e){var t=Bf(r)&&r[e],a=Bf(t)&&t.textStyle;if(a)for(var i=0,n=xx.length;i<n;i++){var o=xx[i];a.hasOwnProperty(o)&&(t[o]=a[o])}}function Ka(r){r&&(Vf(r),He(r,"label"),r.emphasis&&He(r.emphasis,"label"))}function YY(r){if(Bf(r)){U_(r),Vf(r),He(r,"label"),He(r,"upperLabel"),He(r,"edgeLabel"),r.emphasis&&(He(r.emphasis,"label"),He(r.emphasis,"upperLabel"),He(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(U_(e),Ka(e));var t=r.markLine;t&&(U_(t),Ka(t));var a=r.markArea;a&&Ka(a);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var n=r.links||r.edges;if(n&&!Ne(n))for(var o=0;o<n.length;o++)Ka(n[o]);T(r.categories,function(u){Vf(u)})}if(i&&!Ne(i))for(var o=0;o<i.length;o++)Ka(i[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Ka(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)z(l[o])?(Ka(l[o][0]),Ka(l[o][1])):Ka(l[o]);r.type==="gauge"?(He(r,"axisLabel"),He(r,"title"),He(r,"detail")):r.type==="treemap"?(Lr(r.breadcrumb,"itemStyle"),T(r.levels,function(u){Vf(u)})):r.type==="tree"&&Vf(r.leaves)}}function Hn(r){return z(r)?r:r?[r]:[]}function RI(r){return(z(r)?r[0]:r)||{}}function F_(r,e){Li(Hn(r.series),function(a){Bf(a)&&YY(a)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),Li(t,function(a){Li(Hn(r[a]),function(i){i&&(He(i,"axisLabel"),He(i.axisPointer,"label"))})}),Li(Hn(r.parallel),function(a){var i=a&&a.parallelAxisDefault;He(i,"axisLabel"),He(i&&i.axisPointer,"label")}),Li(Hn(r.calendar),function(a){Lr(a,"itemStyle"),He(a,"dayLabel"),He(a,"monthLabel"),He(a,"yearLabel")}),Li(Hn(r.radar),function(a){He(a,"name"),a.name&&a.axisName==null&&(a.axisName=a.name,delete a.name),a.nameGap!=null&&a.axisNameGap==null&&(a.axisNameGap=a.nameGap,delete a.nameGap)}),Li(Hn(r.geo),function(a){Bf(a)&&(Ka(a),Li(Hn(a.regions),function(i){Ka(i)}))}),Li(Hn(r.timeline),function(a){Ka(a),Lr(a,"label"),Lr(a,"itemStyle"),Lr(a,"controlStyle",!0);var i=a.data;z(i)&&T(i,function(n){et(n)&&(Lr(n,"label"),Lr(n,"itemStyle"))})}),Li(Hn(r.toolbox),function(a){Lr(a,"iconStyle"),Li(a.feature,function(i){Lr(i,"iconStyle")})}),He(RI(r.axisPointer),"label"),He(RI(r.tooltip).axisPointer,"label")}function ZY(r,e){for(var t=e.split(","),a=r,i=0;i<t.length&&(a=a&&a[t[i]],a!=null);i++);return a}function XY(r,e,t,a){for(var i=e.split(","),n=r,o,s=0;s<i.length-1;s++)o=i[s],n[o]==null&&(n[o]={}),n=n[o];(a||n[i[s]]==null)&&(n[i[s]]=t)}function NI(r){r&&T(qY,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var qY=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],jY=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],H_=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Uf(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<H_.length;t++){var a=H_[t][1],i=H_[t][0];e[a]!=null&&(e[i]=e[a])}}function OI(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function zI(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function $Y(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function VI(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&VI(r[t].children,e)}function Nv(r,e){F_(r,e),r.series=Ft(r.series),T(r.series,function(t){if(et(t)){var a=t.type;if(a==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(a==="pie"||a==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),OI(t.label);var i=t.data;if(i&&!Ne(i))for(var n=0;n<i.length;n++)OI(i[n]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(a==="gauge"){var o=ZY(t,"pointer.color");o!=null&&XY(t,"itemStyle.color",o)}else if(a==="bar"){Uf(t),Uf(t.backgroundStyle),Uf(t.emphasis);var i=t.data;if(i&&!Ne(i))for(var n=0;n<i.length;n++)typeof i[n]=="object"&&(Uf(i[n]),Uf(i[n]&&i[n].emphasis))}else if(a==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),zI(t),VI(t.data,zI)}else a==="graph"||a==="sankey"?$Y(t):a==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&J(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),NI(t)}}),r.dataRange&&(r.visualMap=r.dataRange),T(jY,function(t){var a=r[t];a&&(z(a)||(a=[a]),T(a,function(i){NI(i)}))})}function G_(r){var e=q();r.eachSeries(function(t){var a=t.get("stack");if(a){var i=e.get(a)||e.set(a,[]),n=t.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),e.each(function(t){if(t.length!==0){var a=t[0].seriesModel,i=a.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&t.reverse(),T(t,function(n,o){n.data.setCalculationInfo("stackedOnSeries",o>0?t[o-1].seriesModel:null)}),KY(t)}})}function KY(r){T(r,function(e,t){var a=[],i=[NaN,NaN],n=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(n,function(u,c,f){var p=o.get(e.stackedDimension,f);if(isNaN(p))return i;var h,d;s?d=o.getRawIndex(f):h=o.get(e.stackedByDimension,f);for(var v=NaN,m=t-1;m>=0;m--){var g=r[m];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,h)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&p>=0&&y>0||l==="samesign"&&p<=0&&y<0){p=NE(p,y),v=y;break}}}return a[0]=p,a[1]=v,a})})}var Ov=(function(){function r(e){this.data=e.data||(e.sourceFormat===ca?{}:[]),this.sourceFormat=e.sourceFormat||V_,this.seriesLayoutBy=e.seriesLayoutBy||Vr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;a<t.length;a++){var i=t[a];i.type==null&&Iv(this,a)===rr.Must&&(i.type="ordinal")}}return r})();function Mu(r){return r instanceof Ov}function Ff(r,e,t){t=t||W_(r);var a=e.seriesLayoutBy,i=JY(r,t,a,e.sourceHeader,e.dimensions),n=new Ov({data:r,sourceFormat:t,seriesLayoutBy:a,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:tt(e)});return n}function Eu(r){return new Ov({data:r,sourceFormat:Ne(r)?wa:er})}function FI(r){return new Ov({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:tt(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function W_(r){var e=V_;if(Ne(r))e=wa;else if(z(r)){r.length===0&&(e=Ae);for(var t=0,a=r.length;t<a;t++){var i=r[t];if(i!=null){if(z(i)||Ne(i)){e=Ae;break}else if(et(i)){e=or;break}}}}else if(et(r)){for(var n in r)if(it(r,n)&&Ce(r[n])){e=ca;break}}return e}function JY(r,e,t,a,i){var n,o;if(!r)return{dimensionsDefine:BI(i),startIndex:o,dimensionsDetectedCount:n};if(e===Ae){var s=r;a==="auto"||a==null?UI(function(u){u!=null&&u!=="-"&&(W(u)?o==null&&(o=1):o=0)},t,s,10):o=yt(a)?a:a?1:0,!i&&o===1&&(i=[],UI(function(u,c){i[c]=u!=null?u+"":""},t,s,1/0)),n=i?i.length:t===un?s.length:s[0]?s[0].length:null}else if(e===or)i||(i=QY(r));else if(e===ca)i||(i=[],T(r,function(u,c){i.push(c)}));else if(e===er){var l=bi(r[0]);n=z(l)&&l.length||1}return{startIndex:o,dimensionsDefine:BI(i),dimensionsDetectedCount:n}}function QY(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return gt(t)}function BI(r){if(r){var e=q();return V(r,function(t,a){t=et(t)?t:{name:t};var i={name:t.name,displayName:t.displayName,type:t.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var n=e.get(i.name);return n?i.name+="-"+n.count++:e.set(i.name,{count:1}),i})}}function UI(r,e,t,a){if(e===un)for(var i=0;i<t.length&&i<a;i++)r(t[i]?t[i][0]:null,i);else for(var n=t[0]||[],i=0;i<n.length&&i<a;i++)r(n[i],i)}function zv(r){var e=r.sourceFormat;return e===or||e===ca}var ol,sl,ll,ul,HI,GI,Bv=(function(){function r(e,t){var a=Mu(e)?e:Eu(e);this._source=a;var i=this._data=a.data,n=a.sourceFormat,o=a.seriesLayoutBy;if(n===wa&&(this._offset=0,this._dimSize=t,this._data=i),0)var s;GI(this,i,a)}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;GI=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,p=l.dimensionsDefine,h=HI[j_(u,c)];if(O(o,h),u===wa)o.getItem=t,o.count=i,o.fillStorage=a;else{var d=Z_(u,c);o.getItem=Z(d,null,s,f,p);var v=X_(u,c);o.count=Z(v,null,s,f,p)}};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},a=function(o,s,l,u){for(var c=this._data,f=this._dimSize,p=0;p<f;p++){for(var h=u[p],d=h[0]==null?1/0:h[0],v=h[1]==null?-1/0:h[1],m=s-o,g=l[p],y=0;y<m;y++){var x=c[y*f+p];g[o+y]=x,x<d&&(d=x),x>v&&(v=x)}h[0]=d,h[1]=v}},i=function(){return this._data?this._data.length/this._dimSize:0};HI=(e={},e[Ae+"_"+Vr]={pure:!0,appendData:n},e[Ae+"_"+un]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[or]={pure:!0,appendData:n},e[ca]={pure:!0,appendData:function(o){var s=this._data;T(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[er]={appendData:n},e[wa]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function n(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})();var Vv=function(r){z(r)||yx("series.data or dataset.source must be an array.")},Gct=(ol={},ol[Ae+"_"+Vr]=Vv,ol[Ae+"_"+un]=Vv,ol[or]=Vv,ol[ca]=function(r,e){for(var t=0;t<e.length;t++){var a=e[t].name;a==null&&yx("dimension name must not be null/undefined.")}},ol[er]=Vv,ol),WI=function(r,e,t,a){return r[a]},t6=(sl={},sl[Ae+"_"+Vr]=function(r,e,t,a){return r[a+e]},sl[Ae+"_"+un]=function(r,e,t,a,i){a+=e;for(var n=i||[],o=r,s=0;s<o.length;s++){var l=o[s];n[s]=l?l[a]:null}return n},sl[or]=WI,sl[ca]=function(r,e,t,a,i){for(var n=i||[],o=0;o<t.length;o++){var s=t[o].name,l=s!=null?r[s]:null;n[o]=l?l[a]:null}return n},sl[er]=WI,sl);function Z_(r,e){var t=t6[j_(r,e)];return t}var YI=function(r,e,t){return r.length},e6=(ll={},ll[Ae+"_"+Vr]=function(r,e,t){return Math.max(0,r.length-e)},ll[Ae+"_"+un]=function(r,e,t){var a=r[0];return a?Math.max(0,a.length-e):0},ll[or]=YI,ll[ca]=function(r,e,t){var a=t[0].name,i=a!=null?r[a]:null;return i?i.length:0},ll[er]=YI,ll);function X_(r,e){var t=e6[j_(r,e)];return t}var Y_=function(r,e,t){return r[e]},r6=(ul={},ul[Ae]=Y_,ul[or]=function(r,e,t){return r[t]},ul[ca]=Y_,ul[er]=function(r,e,t){var a=bi(r);return a instanceof Array?a[e]:a},ul[wa]=Y_,ul);function q_(r){var e=r6[r];return e}function j_(r,e){return r===Ae?r+"_"+e:r}function Gn(r,e,t){if(r){var a=r.getRawDataItem(e);if(a!=null){var i=r.getStore(),n=i.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=i.getDimensionProperty(o);return q_(n)(a,o,s)}else{var l=a;return n===er&&(l=bi(a)),l}}}}var a6=/\{@(.+?)\}/g,cl=(function(){function r(){}return r.prototype.getDataParams=function(e,t){var a=this.getData(t),i=this.getRawValue(e,t),n=a.getRawIndex(e),o=a.getName(e),s=a.getRawDataItem(e),l=a.getItemVisual(e,"style"),u=l&&l[a.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,p=f==="series",h=a.userOutput&&a.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:o,dataIndex:n,data:s,dataType:t,value:i,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,a,i,n,o){t=t||"normal";var s=this.getData(a),l=this.getDataParams(e,a);if(o&&(l.value=o.interpolatedValue),i!=null&&z(l.value)&&(l.value=l.value[i]),!n){var u=s.getItemModel(e);n=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if($(n))return l.status=t,l.dimensionIndex=i,n(l);if(W(n)){var c=_v(n,l);return c.replace(a6,function(f,p){var h=p.length,d=p;d.charAt(0)==="["&&d.charAt(h-1)==="]"&&(d=+d.slice(1,h-1));var v=Gn(s,e,d);if(o&&z(o.interpolatedValue)){var m=s.getDimensionIndex(d);m>=0&&(v=o.interpolatedValue[m])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(e,t){return Gn(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r})();function $_(r){var e,t;return et(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Lo(r){return new i6(r)}var i6=(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,a=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var n;this._plan&&!a&&(n=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)&&(n="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||n==="reset")&&(this._dirty=!1,f=this._doReset(a)),this._modBy=l,this._modDataCount=u;var p=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!a&&(f||h<d)){var v=this._progress;if(z(v))for(var m=0;m<v.length;m++)this._doProgress(v[m],h,d,l,u);else this._doProgress(v,h,d,l,u)}this._dueIndex=d;var g=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=g}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,a,i,n){ZI.reset(t,a,i,n),this._callingProgress=e,this._callingProgress({start:t,end:a,count:a-t,next:ZI.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,a;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(a=t.forceFirstProgress,t=t.progress),z(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),a},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(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})();var ZI=(function(){var r,e,t,a,i,n={reset:function(l,u,c,f){e=l,r=u,t=c,a=f,i=Math.ceil(a/t),n.next=t>1&&a>0?s:o}};return n;function o(){return e<r?e++:null}function s(){var l=e%i*t+Math.ceil(e/i),u=e>=r?null:l<a?l:e;return e++,u}})();function Ja(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!yt(r)&&r!=null&&r!=="-"&&(r=+Fa(r)),r==null||r===""?NaN:Number(r))}var n6=q({number:function(r){return parseFloat(r)},time:function(r){return+Fa(r)},trim:function(r){return W(r)?Be(r):r}});function Uv(r){return n6.get(r)}var XI={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}},o6=(function(){function r(e,t){if(!yt(t)){var a="";Ut(a)}this._opFn=XI[e],this._rvalFloat=Ha(t)}return r.prototype.evaluate=function(e){return yt(e)?this._opFn(e,this._rvalFloat):this._opFn(Ha(e),this._rvalFloat)},r})(),Fv=(function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=yt(e)?e:Ha(e),i=yt(t)?t:Ha(t),n=isNaN(a),o=isNaN(i);if(n&&(a=this._incomparable),o&&(i=this._incomparable),n&&o){var s=W(e),l=W(t);s&&(a=l?e:0),l&&(i=s?t:0)}return a<i?this._resultLT:a>i?-this._resultLT:0},r})();var s6=(function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ha(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=Ha(e)===this._rvalFloat)}return this._isEQ?t:!t},r})();function qI(r,e){return r==="eq"||r==="ne"?new s6(r==="eq",e):it(XI,r)?new o6(r,e):null}var l6=(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 Ja(e,t)},r})();function u6(r,e){var t=new l6,a=r.data,i=t.sourceFormat=r.sourceFormat,n=r.startIndex,o="";r.seriesLayoutBy!==Vr&&Ut(o);var s=[],l={},u=r.dimensionsDefine;if(u)T(u,function(v,m){var g=v.name,y={index:m,name:g,displayName:v.displayName};if(s.push(y),g!=null){var x="";it(l,g)&&Ut(x),l[g]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=Z_(i,Vr);e.__isBuiltIn&&(t.getRawDataItem=function(v){return f(a,n,s,v)},t.getRawData=Z(c6,null,r)),t.cloneRawData=Z(f6,null,r);var p=X_(i,Vr);t.count=Z(p,null,a,n,s);var h=q_(i);t.retrieveValue=function(v,m){var g=f(a,n,s,v);return d(g,m)};var d=t.retrieveValueFromItem=function(v,m){if(v!=null){var g=s[m];if(g)return h(v,m,g.name)}};return t.getDimensionInfo=Z(p6,null,s,l),t.cloneAllDimensionInfo=Z(h6,null,s),t}function c6(r){var e=r.sourceFormat;if(!K_(e)){var t="";Ut(t)}return r.data}function f6(r){var e=r.sourceFormat,t=r.data;if(!K_(e)){var a="";Ut(a)}if(e===Ae){for(var i=[],n=0,o=t.length;n<o;n++)i.push(t[n].slice());return i}else if(e===or){for(var i=[],n=0,o=t.length;n<o;n++)i.push(O({},t[n]));return i}}function p6(r,e,t){if(t!=null){if(yt(t)||!isNaN(t)&&!it(e,t))return r[t];if(it(e,t))return e[t]}}function h6(r){return tt(r)}var jI=q();function $I(r){r=tt(r);var e=r.type,t="";e||Ut(t);var a=e.split(":");a.length!==2&&Ut(t);var i=!1;a[0]==="echarts"&&(e=a[1],i=!0),r.__isBuiltIn=i,jI.set(e,r)}function KI(r,e,t){var a=Ft(r),i=a.length,n="";i||Ut(n);for(var o=0,s=i;o<s;o++){var l=a[o];e=d6(l,e,t,i===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function d6(r,e,t,a){var i="";e.length||Ut(i),et(r)||Ut(i);var n=r.type,o=jI.get(n);o||Ut(i);var s=V(e,function(c){return u6(c,o)}),l=Ft(o.transform({upstream:s[0],upstreamList:s,config:tt(r.config)}));if(0&&r.print)var u;return V(l,function(c,f){var p="";et(c)||Ut(p),c.data||Ut(p);var h=W_(c.data);K_(h)||Ut(p);var d,v=e[0];if(v&&f===0&&!c.dimensions){var m=v.startIndex;m&&(c.data=v.data.slice(0,m).concat(c.data)),d={seriesLayoutBy:Vr,sourceHeader:m,dimensions:v.metaRawOption.dimensions}}else d={seriesLayoutBy:Vr,sourceHeader:0,dimensions:c.dimensions};return Ff(c.data,d,null)})}function K_(r){return r===Ae||r===or}var Hv="undefined",v6=typeof Uint32Array===Hv?Array:Uint32Array,m6=typeof Uint16Array===Hv?Array:Uint16Array,Q_=typeof Int32Array===Hv?Array:Int32Array,JI=typeof Float64Array===Hv?Array:Float64Array,tP={float:JI,int:Q_,ordinal:Array,number:Array,time:JI},J_;function Au(r){return r>65535?v6:m6}function Lu(){return[1/0,-1/0]}function g6(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function QI(r,e,t,a,i){var n=tP[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new n(a),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new n(a)}var y6=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=q()}return r.prototype.initData=function(e,t,a){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),n=this.defaultDimValueGetter=J_[i.sourceFormat];this._dimValueGetter=a||n,this._rawExtent=[];var o=zv(i);this._dimensions=V(t,function(s){return{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 a=this._calcDimNameToIdx,i=this._dimensions,n=a.get(e);if(n!=null){if(i[n].type===t)return n}else n=i.length;return i[n]={type:t},a.set(e,n),this._chunks[n]=new tP[t||"float"](this._rawCount),this._rawExtent[n]=Lu(),n},r.prototype.collectOrdinalMeta=function(e,t){var a=this._chunks[e],i=this._dimensions[e],n=this._rawExtent,o=i.ordinalOffset||0,s=a.length;o===0&&(n[e]=Lu());for(var l=n[e],u=o;u<s;u++){var c=a[u]=t.parseAndCollect(a[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=t,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],a=t.ordinalMeta;return a},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,a=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=a),a<i&&this._initDataFromProvider(a,i,!0),[a,i]},r.prototype.appendValues=function(e,t){for(var a=this._chunks,i=this._dimensions,n=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<n;u++){var c=i[u];QI(a,u,c.type,l,!0)}for(var f=[],p=s;p<l;p++)for(var h=p-s,d=0;d<n;d++){var c=i[d],v=J_.arrayRows.call(this,e[h]||f,c.property,h,d);a[d][p]=v;var m=o[d];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var i=this._provider,n=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=V(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=Lu()),QI(n,c,f.type,t,a)}if(i.fillStorage)i.fillStorage(e,t,n,l);else for(var p=[],h=e;h<t;h++){p=i.getItem(h,p);for(var d=0;d<s;d++){var v=n[d],m=this._dimValueGetter(p,u[d],h,d);v[h]=m;var g=l[d];m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}!i.persistent&&i.clean&&i.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 a=this._chunks[e];return a?a[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var a=[],i=[];if(t==null){t=e,e=[];for(var n=0;n<this._dimensions.length;n++)i.push(n)}else i=e;for(var n=0,o=i.length;n<o;n++)a.push(this.get(i[n],t));return a},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var a=this._chunks[e];return a?a[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],a=0;if(t)for(var i=0,n=this.count();i<n;i++){var o=this.get(e,i);isNaN(o)||(a+=o)}return a},r.prototype.getMedian=function(e){var t=[];this.each([e],function(n){isNaN(n)||t.push(n)});var a=t.sort(function(n,o){return n-o}),i=this.count();return i===0?0:i%2===1?a[(i-1)/2]:(a[i/2]+a[i/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,a=t[e];if(a!=null&&a<this._count&&a===e)return e;for(var i=0,n=this._count-1;i<=n;){var o=(i+n)/2|0;if(t[o]<e)i=o+1;else if(t[o]>e)n=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,i=this._count;if(a===Array){e=new a(i);for(var n=0;n<i;n++)e[n]=t[n]}else e=new a(t.buffer,0,i)}else{var a=Au(this._rawCount);e=new a(this.count());for(var n=0;n<e.length;n++)e[n]=n}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var a=this.clone(),i=a.count(),n=Au(a._rawCount),o=new n(i),s=[],l=e.length,u=0,c=e[0],f=a._chunks,p=0;p<i;p++){var h=void 0,d=a.getRawIndex(p);if(l===0)h=t(p);else if(l===1){var v=f[c][d];h=t(v,p)}else{for(var m=0;m<l;m++)s[m]=f[e[m]][d];s[m]=p,h=t.apply(null,s)}h&&(o[u++]=d)}return u<i&&(a._indices=o),a._count=u,a._extent=[],a._updateGetRawIdx(),a},r.prototype.selectRange=function(e){var t=this.clone(),a=t._count;if(!a)return this;var i=gt(e),n=i.length;if(!n)return this;var o=t.count(),s=Au(t._rawCount),l=new s(o),u=0,c=i[0],f=e[c][0],p=e[c][1],h=t._chunks,d=!1;if(!t._indices){var v=0;if(n===1){for(var m=h[i[0]],g=0;g<a;g++){var y=m[g];(y>=f&&y<=p||isNaN(y))&&(l[u++]=v),v++}d=!0}else if(n===2){for(var m=h[i[0]],x=h[i[1]],_=e[i[1]][0],b=e[i[1]][1],g=0;g<a;g++){var y=m[g],S=x[g];(y>=f&&y<=p||isNaN(y))&&(S>=_&&S<=b||isNaN(S))&&(l[u++]=v),v++}d=!0}}if(!d)if(n===1)for(var g=0;g<o;g++){var w=t.getRawIndex(g),y=h[i[0]][w];(y>=f&&y<=p||isNaN(y))&&(l[u++]=w)}else for(var g=0;g<o;g++){for(var D=!0,w=t.getRawIndex(g),C=0;C<n;C++){var M=i[C],y=h[M][w];(y<e[M][0]||y>e[M][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(g))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var a=this.clone(e);return this._updateDims(a,e,t),a},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,a){for(var i=e._chunks,n=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=Lu();for(var f=0;f<s;f++){for(var p=e.getRawIndex(f),h=0;h<o;h++)l[h]=i[t[h]][p];l[o]=f;var d=a&&a.apply(null,l);if(d!=null){typeof d!="object"&&(n[0]=d,d=n);for(var c=0;c<d.length;c++){var v=t[c],m=d[c],g=u[v],y=i[v];y&&(y[p]=m),m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),i=a._chunks,n=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,p,h=new(Au(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;d<o-1;d+=l){for(var v=Math.min(d+l,o-1),m=Math.min(d+l*2,o),g=(m+v)/2,y=0,x=v;x<m;x++){var _=this.getRawIndex(x),b=n[_];isNaN(b)||(y+=b)}y/=m-v;var S=d,w=Math.min(d+l,o),D=d-1,C=n[u];c=-1,p=S;for(var M=-1,E=0,x=S;x<w;x++){var _=this.getRawIndex(x),b=n[_];if(isNaN(b)){E++,M<0&&(M=_);continue}f=Math.abs((D-g)*(b-C)-(D-x)*(y-C)),f>c&&(c=f,p=_)}E>0&&E<w-S&&(h[s++]=Math.min(M,p),p=Math.max(M,p)),h[s++]=p,u=p}return h[s++]=this.getRawIndex(o-1),a._count=s,a._indices=h,a.getRawIndex=this._getRawIdx,a},r.prototype.minmaxDownSample=function(e,t){for(var a=this.clone([e],!0),i=a._chunks,n=Math.floor(1/t),o=i[e],s=this.count(),l=new(Au(this._rawCount))(Math.ceil(s/n)*2),u=0,c=0;c<s;c+=n){var f=c,p=o[this.getRawIndex(f)],h=c,d=o[this.getRawIndex(h)],v=n;c+n>s&&(v=s-c);for(var m=0;m<v;m++){var g=this.getRawIndex(c+m),y=o[g];y<p&&(p=y,f=c+m),y>d&&(d=y,h=c+m)}var x=this.getRawIndex(f),_=this.getRawIndex(h);f<h?(l[u++]=x,l[u++]=_):(l[u++]=_,l[u++]=x)}return a._count=u,a._indices=l,a._updateGetRawIdx(),a},r.prototype.downSample=function(e,t,a,i){for(var n=this.clone([e],!0),o=n._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),f=n._rawExtent[e]=Lu(),p=new(Au(this._rawCount))(Math.ceil(c/l)),h=0,d=0;d<c;d+=l){l>c-d&&(l=c-d,s.length=l);for(var v=0;v<l;v++){var m=this.getRawIndex(d+v);s[v]=u[m]}var g=a(s),y=this.getRawIndex(Math.min(d+i(s,g)||0,c-1));u[y]=g,g<f[0]&&(f[0]=g),g>f[1]&&(f[1]=g),p[h++]=y}return n._count=h,n._indices=p,n._updateGetRawIdx(),n},r.prototype.each=function(e,t){if(this._count)for(var a=e.length,i=this._chunks,n=0,o=this.count();n<o;n++){var s=this.getRawIndex(n);switch(a){case 0:t(n);break;case 1:t(i[e[0]][s],n);break;case 2:t(i[e[0]][s],i[e[1]][s],n);break;default:for(var l=0,u=[];l<a;l++)u[l]=i[e[l]][s];u[l]=n,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],a=Lu();if(!t)return a;var i=this.count(),n=!this._indices,o;if(n)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=a;for(var s=o[0],l=o[1],u=0;u<i;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 a=[],i=this._chunks,n=0;n<i.length;n++)a.push(i[n][t]);return a},r.prototype.clone=function(e,t){var a=new r,i=this._chunks,n=e&&cr(e,function(s,l){return s[l]=!0,s},{});if(n)for(var o=0;o<i.length;o++)a._chunks[o]=n[o]?g6(i[o]):i[o];else a._chunks=i;return this._copyCommonProps(a),t||(a._indices=this._cloneIndices()),a._updateGetRawIdx(),a},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=tt(this._extent),e._rawExtent=tt(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var a=this._indices.length;t=new e(a);for(var i=0;i<a;i++)t[i]=this._indices[i]}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,a,i,n){return Ja(t[n],this._dimensions[n])}J_={arrayRows:e,objectRows:function(t,a,i,n){return Ja(t[a],this._dimensions[n])},keyedColumns:e,original:function(t,a,i,n){var o=t&&(t.value==null?t:t.value);return Ja(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(t,a,i,n){return t[n]}}})(),r})(),Hf=y6;var Wv=(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(),a=!!t.length,i,n;if(Gv(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,n=[c._getVersionSign()]}else s=o.get("data",!0),l=Ne(s)?wa:er,n=[];var f=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},h=Q(f.seriesLayoutBy,p.seriesLayoutBy)||null,d=Q(f.sourceHeader,p.sourceHeader),v=Q(f.dimensions,p.dimensions),m=h!==p.seriesLayoutBy||!!d!=!!p.sourceHeader||v;i=m?[Ff(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:v},l)]:[]}else{var g=e;if(a){var y=this._applyTransform(t);i=y.sourceList,n=y.upstreamSignList}else{var x=g.get("source",!0);i=[Ff(x,this._getSourceMetaRawOption(),null)],n=[]}}this._setLocalSource(i,n)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var n="";e.length!==1&&eP(n)}var o,s=[],l=[];return T(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&eP(f),s.push(c),l.push(u._getVersionSign())}),a?o=KI(a,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[FI(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 a=e[t];if(a._isDirty()||this._upstreamSignList[t]!==a._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var a=this._getUpstreamSourceManagers();return a[0]&&a[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,a){var i=0,n=this._storeList,o=n[i];o||(o=n[i]={});var s=o[a];if(!s){var l=this._getUpstreamSourceManagers()[0];Gv(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,a):(s=new Hf,s.initData(new Bv(t,e.length),e)),o[a]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Gv(e)){var t=Lv(e);return t?[t.getSourceManager()]:[]}else return V(_I(e),function(a){return a.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,a,i;if(Gv(e))t=e.get("seriesLayoutBy",!0),a=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var n=e;t=n.get("seriesLayoutBy",!0),a=n.get("sourceHeader",!0),i=n.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:a,dimensions:i}},r})();function tb(r){var e=r.option.transform;e&&hs(r.option.transform)}function Gv(r){return r.mainType==="series"}function eP(r){throw new Error(r)}var x6="line-height:1";function rP(r){var e=r.lineHeight;return e==null?x6:"line-height:"+We(e+"")+"px"}function aP(r,e){var t=r.color||N.color.tertiary,a=r.fontSize||12,i=r.fontWeight||"400",n=r.color||N.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+We(a+"")+"px;color:"+We(t)+";font-weight:"+We(i+""),valueStyle:"font-size:"+We(o+"")+"px;color:"+We(n)+";font-weight:"+We(s+"")}:{nameStyle:{fontSize:a,fill:t,fontWeight:i},valueStyle:{fontSize:o,fill:n,fontWeight:s}}}var _6=[0,10,20,30],b6=["",`
|
|
`,`
|
|
|
|
`,`
|
|
|
|
|
|
`];function re(r,e){return e.type=r,e}function eb(r){return r.type==="section"}function iP(r){return eb(r)?S6:w6}function nP(r){if(eb(r)){var e=0,t=r.blocks.length,a=t>1||t>0&&!r.noHeader;return T(r.blocks,function(i){var n=nP(i);n>=e&&(e=n+ +(a&&(!n||eb(i)&&!i.noHeader)))}),e}return 0}function S6(r,e,t,a){var i=e.noHeader,n=T6(nP(e)),o=[],s=e.blocks||[];ee(!s||z(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(it(u,l)){var c=new Fv(u[l],null);s.sort(function(v,m){return c.evaluate(v.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}T(s,function(v,m){var g=e.valueFormatter,y=iP(v)(g?O(O({},r),{valueFormatter:g}):r,v,m>0?n.html:0,a);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(n.richText):rb(a,o.join(""),i?t:n.html);if(i)return f;var p=xv(e.header,"ordinal",r.useUTC),h=aP(a,r.renderMode).nameStyle,d=rP(a);return r.renderMode==="richText"?oP(r,p,h)+n.richText+f:rb(a,'<div style="'+h+";"+d+';">'+We(p)+"</div>"+f,t)}function w6(r,e,t,a){var i=r.renderMode,n=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(_){return _=z(_)?_:[_],V(_,function(b,S){return xv(b,z(h)?h[S]:h,u)})};if(!(n&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||N.color.secondary,i),p=n?"":xv(l,"ordinal",u),h=e.valueType,d=o?[]:c(e.value,e.dataIndex),v=!s||!n,m=!s&&n,g=aP(a,i),y=g.nameStyle,x=g.valueStyle;return i==="richText"?(s?"":f)+(n?"":oP(r,p,y))+(o?"":M6(r,d,v,m,x)):rb(a,(s?"":f)+(n?"":D6(p,!s,y))+(o?"":C6(d,v,m,x)),t)}}function ab(r,e,t,a,i,n){if(r){var o=iP(r),s={useUTC:i,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,n)}}function T6(r){return{html:_6[r],richText:b6[r]}}function rb(r,e,t){var a='<div style="clear:both"></div>',i="margin: "+t+"px 0 0",n=rP(r);return'<div style="'+i+";"+n+';">'+e+a+"</div>"}function D6(r,e,t){var a=e?"margin-left:2px":"";return'<span style="'+t+";"+a+'">'+We(r)+"</span>"}function C6(r,e,t,a){var i=t?"10px":"20px",n=e?"float:right;margin-left:"+i:"";return r=z(r)?r:[r],'<span style="'+n+";"+a+'">'+V(r,function(o){return We(o)}).join(" ")+"</span>"}function oP(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function M6(r,e,t,a,i){var n=[i],o=a?10:20;return t&&n.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(z(e)?e.join(" "):e,n)}function Yv(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return Mi(a)}function Zv(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Xv=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=bd()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var i=a==="richText"?this._generateStyleName():null,n=cI({color:t,type:e,renderMode:a,markerId:i});return W(n)?n:(this.richTextStyles[i]=n.style,n.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};z(t)?T(t,function(n){return O(a,n)}):O(a,t);var i=this._generateStyleName();return this.richTextStyles[i]=a,"{"+i+"|"+e+"}"},r})();function qv(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,i=e.getData(),n=i.mapDimensionsAll("defaultedTooltip"),o=n.length,s=e.getRawValue(t),l=z(s),u=Yv(e,t),c,f,p,h;if(o>1||l&&!o){var d=E6(s,e,t,n,u);c=d.inlineValues,f=d.inlineValueTypes,p=d.blocks,h=d.inlineValues[0]}else if(o){var v=i.getDimensionInfo(n[0]);h=c=Gn(i,t,n[0]),f=v.type}else h=c=l?s[0]:s;var m=lu(e),g=m&&e.name||"",y=i.getName(t),x=a?g:y;return re("section",{header:g,noHeader:a||!m,sortParam:h,blocks:[re("nameValue",{markerType:"item",markerColor:u,name:x,noName:!Be(x),value:c,valueType:f,dataIndex:t})].concat(p||[])})}function E6(r,e,t,a,i){var n=e.getData(),o=cr(r,function(f,p,h){var d=n.getDimensionInfo(h);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?T(a,function(f){c(Gn(n,t,f),f)}):T(r,c);function c(f,p){var h=n.getDimensionInfo(p);!h||h.otherDims.tooltip===!1||(o?u.push(re("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Io=ot();function jv(r,e){return r.getName(e)||r.getId(e)}var Gf="__universalTransitionEnabled",$v=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,i){this.seriesIndex=this.componentIndex,this.dataTask=Lo({count:L6,reset:I6}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var n=Io(this).sourceManager=new Wv(this);n.prepareSource();var o=this.getInitialData(t,i);lP(o,this),this.dataTask.context.data=o,Io(this).dataBeforeProcessed=o,sP(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var i=Eo(this),n=i?la(t):{},o=this.subType;St.hasClass(o)&&(o+="Series"),dt(t,a.getTheme().get(this.subType)),dt(t,this.getDefaultOption()),ba(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&mr(t,n,i)},e.prototype.mergeOption=function(t,a){t=dt(this.option,t,!0),this.fillDataTextStyle(t.data);var i=Eo(this);i&&mr(this.option,t,i);var n=Io(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(t,a);lP(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Io(this).dataBeforeProcessed=o,sP(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ne(t))for(var a=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&ba(t[i],"label",a)},e.prototype.getInitialData=function(t,a){},e.prototype.appendData=function(t){var a=this.getRawData();a.appendData(t.data)},e.prototype.getData=function(t){var a=ib(this);if(a){var i=a.context.data;return t==null||!i.getLinkedData?i:i.getLinkedData(t)}else return Io(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var a=ib(this);if(a){var i=a.context;i.outputData=t,a!==this.dataTask&&(i.data=t)}Io(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return q(t)},e.prototype.getSourceManager=function(){return Io(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Io(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.indicesOfNearest=function(t,a,i,n){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(t);if(!s||!l)return[];var u=l.dataToCoord(i);n==null&&(n=1/0);var c=[],f=1/0,p=-1,h=0;return o.each(a,function(d,v){var m=l.dataToCoord(d),g=u-m,y=Math.abs(g);y<=n&&((y<f||y===f&&g>=0&&p<0)&&(f=y,p=g,h=0),g===p&&(c[h++]=v))}),c.length=h,c},e.prototype.formatTooltip=function(t,a,i){return qv({series:this,dataIndex:t,multipleSeries:a})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Lt.node&&!(t&&t.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,i){var n=this.ecModel,o=Nf.prototype.getColorFromPalette.call(this,t,a,i);return o||(o=n.getColorFromPalette(t,a,i)),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,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var i=this.option.selectedMap;if(i){var n=this.option.selectedMode,o=this.getData(a);if(n==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=jv(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,a){for(var i=[],n=0;n<t.length;n++)i[0]=t[n],this.isSelected(t[n],a)?this.unselect(i,a):this.select(i,a)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,a=gt(t),i=[],n=0;n<a.length;n++){var o=t[a[n]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(t,a){var i=this.option.selectedMap;if(!i)return!1;var n=this.getData(a);return(i==="all"||i[jv(n,t)])&&!n.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Gf])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var i,n,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){et(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=a[c],p=jv(t,f);u[p]=!0,this._selectedDataIndicesMap[p]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var h=a[l-1],p=jv(t,h);o.selectedMap=(i={},i[p]=!0,i),this._selectedDataIndicesMap=(n={},n[p]=t.getRawIndex(h),n)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var a=[];t.hasItemOption&&t.each(function(i){var n=t.getRawDataItem(i);n&&n.selected&&a.push(i)}),a.length>0&&this._innerSelect(t,a)}},e.registerClass=function(t){return St.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(St);Jt($v,cl);Jt($v,Nf);Dd($v,St);function sP(r){var e=r.name;lu(r)||(r.name=A6(r)||e)}function A6(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return T(t,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function L6(r){return r.model.getRawData().count()}function I6(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),P6}function P6(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function lP(r,e){T(Dn(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ut(k6,e))})}function k6(r,e){var t=ib(r);return t&&t.setOutputEnd((e||this).count()),e}function ib(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(r.uid))}return a}}var Nt=$v;var nb=(function(){function r(){this.group=new K,this.uid=$a("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){},r.prototype.updateLayout=function(e,t,a,i){},r.prototype.updateVisual=function(e,t,a,i){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();uu(nb);xo(nb);var Ot=nb;function Ta(){var r=ot();return function(e){var t=r(e),a=e.pipelineContext,i=!!t.large,n=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(i!==o||n!==s)&&"reset"}}var fP=ot(),R6=Ta(),ob=(function(){function r(){this.group=new K,this.uid=$a("viewChart"),this.renderTask=Lo({plan:N6,reset:O6}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.highlight=function(e,t,a,i){var n=e.getData(i&&i.dataType);n&&cP(n,i,"emphasis")},r.prototype.downplay=function(e,t,a,i){var n=e.getData(i&&i.dataType);n&&cP(n,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateLayout=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateVisual=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.eachRendered=function(e){zr(this.group,e)},r.markUpdateMethod=function(e,t){fP(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function uP(r,e,t){r&&Do(r)&&(e==="emphasis"?Tr:Dr)(r,t)}function cP(r,e,t){var a=Ga(r,e),i=e&&e.highlightKey!=null?nL(e.highlightKey):null;a!=null?T(Ft(a),function(n){uP(r.getItemGraphicEl(n),t,i)}):r.eachItemGraphicEl(function(n){uP(n,t,i)})}uu(ob,["dispose"]);xo(ob);function N6(r){return R6(r.model)}function O6(r){var e=r.model,t=r.ecModel,a=r.api,i=r.payload,n=e.pipelineContext.progressiveRender,o=r.view,s=i&&fP(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,i),z6[l]}var z6={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)}}},Pt=ob;var Kv="\0__throttleOriginMethod",pP="\0__throttleRate",hP="\0__throttleType";function Wf(r,e,t){var a,i=0,n=0,o=null,s,l,u,c;e=e||0;function f(){n=new Date().getTime(),o=null,r.apply(l,u||[])}var p=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];a=new Date().getTime(),l=this,u=h;var v=c||e,m=c||t;c=null,s=a-(m?i:n)-v,clearTimeout(o),m?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),i=a};return p.clear=function(){o&&(clearTimeout(o),o=null)},p.debounceNextCall=function(h){c=h},p}function Qa(r,e,t,a){var i=r[e];if(i){var n=i[Kv]||i,o=i[hP],s=i[pP];if(s!==t||o!==a){if(t==null||!a)return r[e]=n;i=r[e]=Wf(n,t,a==="debounce"),i[Kv]=n,i[hP]=a,i[pP]=t}return i}}function Wn(r,e){var t=r[e];t&&t[Kv]&&(t.clear&&t.clear(),r[e]=t[Kv])}var dP=ot(),vP={itemStyle:ra(m_,!0),lineStyle:ra(v_,!0)},V6={lineStyle:"stroke",itemStyle:"fill"};function mP(r,e){var t=r.visualStyleMapper||vP[e];return t||(console.warn("Unknown style type '"+e+"'."),vP.itemStyle)}function gP(r,e){var t=r.visualDrawType||V6[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var yP={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=r.getModel(a),n=mP(r,a),o=n(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=gP(r,a),u=o[l],c=$(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var p=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=p,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$(o.fill)?p:o.fill,o.stroke=o.stroke==="auto"||$(o.stroke)?p:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var v=r.getDataParams(d),m=O({},o);m[l]=c(v),h.setItemVisual(d,"style",m)}}}},Yf=new Mt,xP={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=mP(r,a),n=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Yf.option=l[a];var u=i(Yf),c=o.ensureUniqueItemVisual(s,"style");O(c,u),Yf.option.decal&&(o.setItemVisual(s,"decal",Yf.option.decal),Yf.option.decal.dirty=!0),n in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},_P={performRawSeries:!0,overallReset:function(r){var e=q();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+a,n=e.get(i);n||(n={},e.set(i,n)),dP(t).scope=n}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),i={},n=t.getData(),o=dP(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=gP(t,s);n.each(function(u){var c=n.getRawIndex(u);i[c]=u}),a.each(function(u){var c=i[u],f=n.getItemVisual(c,"colorFromPalette");if(f){var p=n.ensureUniqueItemVisual(c,"style"),h=a.getName(u)||u+"",d=a.count();p[l]=t.getColorFromPalette(h,o,d)}})}})}};var Qv=Math.PI;function sb(r,e){e=e||{},J(e,{text:"loading",textColor:N.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:N.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new K,a=new ht({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var i=new Dt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),n=new ht({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(n);var o;return e.showSpinner&&(o=new Af({shape:{startAngle:-Qv/2,endAngle:-Qv/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:Qv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qv*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.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}),n.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var B6=(function(){function r(e,t,a,i){this._stageTaskMap=q(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=a.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var i=a.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),i=a.context,n=!t&&a.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=n?a.step:null,s=i&&i.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 a=this._pipelineMap.get(e.uid),i=e.getData(),n=i.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&n>=a.threshold,s=e.get("large")&&n>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?n:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=q();e.eachSeries(function(i){var n=i.getProgressive(),o=i.uid;a.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:n&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;T(this._allHandlers,function(i){var n=e.get(i.uid)||e.set(i.uid,{}),o="";ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,n,t,a),i.overallReset&&this._createOverallStageTask(i,n,t,a)},this)},r.prototype.prepareView=function(e,t,a,i){var n=e.renderTask,o=n.context;o.model=t,o.ecModel=a,o.api=i,n.__block=!e.incrementalPrepareRender,this._pipe(t,n)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,i){i=i||{};var n=!1,o=this;T(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,p=c.overallTask;if(p){var h,d=p.agentStubMap;d.each(function(m){s(i,m)&&(m.dirty(),h=!0)}),h&&p.dirty(),o.updatePayload(p,a);var v=o.getPerformArgs(p,i.block);d.each(function(m){m.perform(v)}),p.perform(v)&&(n=!0)}else f&&f.each(function(m,g){s(i,m)&&m.dirty();var y=o.getPerformArgs(m,i.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,a),m.perform(y)&&(n=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=n||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.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,a,i){var n=this,o=t.seriesTaskMap,s=t.seriesTaskMap=q(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,i).each(c);function c(f){var p=f.uid,h=s.set(p,o&&o.get(p)||Lo({plan:W6,reset:Y6,count:X6}));h.context={model:f,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:n},n._pipe(f,h)}},r.prototype._createOverallStageTask=function(e,t,a,i){var n=this,o=t.overallTask=t.overallTask||Lo({reset:U6});o.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:n};var s=o.agentStubMap,l=o.agentStubMap=q(),u=e.seriesType,c=e.getTargetSeries,f=!0,p=!1,h="";ee(!e.createOnAllSeries,h),u?a.eachRawSeriesByType(u,d):c?c(a,i).each(d):(f=!1,T(a.getSeries(),d));function d(v){var m=v.uid,g=l.set(m,s&&s.get(m)||(p=!0,Lo({reset:F6,onDirty:G6})));g.context={model:v,overallProgress:f},g.agent=o,g.__block=f,n._pipe(v,g)}p&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,i=this._pipelineMap.get(a);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return $(e)&&(e={overallReset:e,seriesType:q6(e)}),e.uid=$a("stageHandler"),t&&(e.visualType=t),e},r})();function U6(r){r.overallReset(r.ecModel,r.api,r.payload)}function F6(r){return r.overallProgress&&H6}function H6(){this.agent.dirty(),this.getDownstream().dirty()}function G6(){this.agent&&this.agent.dirty()}function W6(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Y6(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Ft(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?V(e,function(t,a){return bP(a)}):Z6}var Z6=bP(0);function bP(r){return function(e,t){var a=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var n=e.start;n<e.end;n++)i.dataEach(a,n);else i&&i.progress&&i.progress(e,a)}}function X6(r){return r.data.count()}function q6(r){tm=null;try{r(Zf,SP)}catch(e){}return tm}var Zf={},SP={},tm;wP(Zf,kv);wP(SP,Rv);Zf.eachSeriesByType=Zf.eachRawSeriesByType=function(r){tm=r};Zf.eachComponent=function(r){r.mainType==="series"&&r.subType&&(tm=r.subType)};function wP(r,e){for(var t in e.prototype)r[t]=ie}var lb=B6;var xt=N.darkColor,j6=xt.background,Xf=function(){return{axisLine:{lineStyle:{color:xt.axisLine}},splitLine:{lineStyle:{color:xt.axisSplitLine}},splitArea:{areaStyle:{color:[xt.backgroundTint,xt.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:xt.axisMinorSplitLine}},axisLabel:{color:xt.axisLabel},axisName:{}}},TP={label:{color:xt.secondary},itemStyle:{borderColor:xt.borderTint},dividerLineStyle:{color:xt.border}},DP={darkMode:!0,color:xt.theme,backgroundColor:j6,axisPointer:{lineStyle:{color:xt.border},crossStyle:{color:xt.borderShade},label:{color:xt.tertiary}},legend:{textStyle:{color:xt.secondary},pageTextStyle:{color:xt.tertiary}},textStyle:{color:xt.secondary},title:{textStyle:{color:xt.primary},subtextStyle:{color:xt.quaternary}},toolbox:{iconStyle:{borderColor:xt.accent50}},tooltip:{backgroundColor:xt.neutral20,defaultBorderColor:xt.border,textStyle:{color:xt.tertiary}},dataZoom:{borderColor:xt.accent10,textStyle:{color:xt.tertiary},brushStyle:{color:xt.backgroundTint},handleStyle:{color:xt.neutral00,borderColor:xt.accent20},moveHandleStyle:{color:xt.accent40},emphasis:{handleStyle:{borderColor:xt.accent50}},dataBackground:{lineStyle:{color:xt.accent30},areaStyle:{color:xt.accent20}},selectedDataBackground:{lineStyle:{color:xt.accent50},areaStyle:{color:xt.accent30}}},visualMap:{textStyle:{color:xt.secondary},handleStyle:{borderColor:xt.neutral30}},timeline:{lineStyle:{color:xt.accent10},label:{color:xt.tertiary},controlStyle:{color:xt.accent30,borderColor:xt.accent30}},calendar:{itemStyle:{color:xt.neutral00,borderColor:xt.neutral20},dayLabel:{color:xt.tertiary},monthLabel:{color:xt.secondary},yearLabel:{color:xt.secondary}},matrix:{x:TP,y:TP,backgroundColor:{borderColor:xt.axisLine},body:{itemStyle:{borderColor:xt.borderTint}}},timeAxis:Xf(),logAxis:Xf(),valueAxis:Xf(),categoryAxis:Xf(),line:{symbol:"circle"},graph:{color:xt.theme},gauge:{title:{color:xt.secondary},axisLine:{lineStyle:{color:[[1,xt.neutral05]]}},axisLabel:{color:xt.axisLabel},detail:{color:xt.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:xt.background}},radar:(function(){var r=Xf();return r.axisName={color:xt.axisLabel},r.axisLine.lineStyle.color=xt.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:xt.neutral20,textStyle:{color:xt.secondary}},emphasis:{itemStyle:{color:xt.neutral30}}}},sunburst:{itemStyle:{borderColor:xt.background}},map:{itemStyle:{borderColor:xt.border,areaColor:xt.neutral10},label:{color:xt.tertiary},emphasis:{label:{color:xt.primary},itemStyle:{areaColor:xt.highlight}},select:{label:{color:xt.primary},itemStyle:{areaColor:xt.highlight}}},geo:{itemStyle:{borderColor:xt.border,areaColor:xt.neutral10},emphasis:{label:{color:xt.primary},itemStyle:{areaColor:xt.highlight}},select:{label:{color:xt.primary},itemStyle:{color:xt.highlight}}}};DP.categoryAxis.splitLine.show=!1;var CP=DP;var MP=(function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},a={},i={};if(W(e)){var n=ea(e);t.mainType=n.main||null,t.subType=n.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};T(e,function(l,u){for(var c=!1,f=0;f<o.length;f++){var p=o[f],h=u.lastIndexOf(p);if(h>0&&h===u.length-p.length){var d=u.slice(0,h);d!=="data"&&(t.mainType=d,t[p.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:i}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.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,n,"name")&&c(u,n,"dataIndex")&&c(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,n));function c(f,p,h,d){return f[h]==null||p[d||h]===f[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})();var ub=["symbol","symbolSize","symbolRotate","symbolOffset"],EP=ub.concat(["symbolKeepAspect"]),AP={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 a={},i={},n=!1,o=0;o<ub.length;o++){var s=ub[o],l=r.get(s);$(l)?(n=!0,i[s]=l):a[s]=l}if(a.symbol=a.symbol||r.defaultSymbol,t.setVisual(O({legendIcon:r.legendIcon||a.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},a)),e.isSeriesFiltered(r))return;var u=gt(i);function c(f,p){for(var h=r.getRawValue(p),d=r.getDataParams(p),v=0;v<u.length;v++){var m=u[v];f.setItemVisual(p,m,i[m](h,d))}}return{dataEach:n?c:null}}},LP={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function a(i,n){for(var o=i.getItemModel(n),s=0;s<EP.length;s++){var l=EP[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(n,l,u)}}return{dataEach:t.hasItemOption?a:null}}};function qf(r,e,t){switch(t){case"color":var a=r.getItemVisual(e,"style");return a[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t);default:}}function cn(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:}}function cb(r,e,t,a){switch(t){case"color":var i=r.ensureUniqueItemVisual(e,"style");i[r.getVisual("drawType")]=a,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=a;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,a);break;default:}}function em(r,e){function t(a,i){var n=[];return a.eachComponent({mainType:"series",subType:r,query:i},function(o){n.push(o.seriesIndex)}),n}T([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(a){e(a[0],function(i,n,o){i=O({},i),o.dispatchAction(O(i,{type:a[1],seriesIndex:t(n,i)}))})})}function Iu(r,e,t,a,i){var n=r+e;t.isSilent(n)||a.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),p=Ga(f,i.fromActionPayload);t.trigger(n,{type:n,seriesId:o.id,name:z(p)?f.getName(p[0]):f.getName(p),selected:W(l)?l:O({},l)})}})}function IP(r,e,t){r.on("selectchanged",function(a){var i=t.getModel();a.isFromClick?(Iu("map","selectchanged",e,i,a),Iu("pie","selectchanged",e,i,a)):a.fromAction==="select"?(Iu("map","selected",e,i,a),Iu("pie","selected",e,i,a)):a.fromAction==="unselect"&&(Iu("map","unselected",e,i,a),Iu("pie","unselected",e,i,a))})}function Ii(r,e,t){for(var a;r&&!(e(r)&&(a=r,t));)r=r.__hostTarget||r.parent;return a}var $6=Math.round(Math.random()*9),K6=typeof Object.defineProperty=="function",J6=(function(){function r(){this._id="__ec_inner_"+$6++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var a=this._guard(e);return K6?Object.defineProperty(a,this._id,{value:t,enumerable:!1,configurable:!0}):a[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})(),PP=J6;var Q6=ft.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,a=e.cy,i=e.width/2,n=e.height/2;r.moveTo(t,a-n),r.lineTo(t+i,a+n),r.lineTo(t-i,a+n),r.closePath()}}),t8=ft.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,a=e.cy,i=e.width/2,n=e.height/2;r.moveTo(t,a-n),r.lineTo(t+i,a),r.lineTo(t,a+n),r.lineTo(t-i,a),r.closePath()}}),e8=ft.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,a=e.y,i=e.width/5*3,n=Math.max(i,e.height),o=i/2,s=o*o/(n-o),l=a-n+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),p=Math.cos(u),h=o*.6,d=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*h,l+s+p*h,t,a-d,t,a),r.bezierCurveTo(t,a-d,t-c+f*h,l+s+p*h,t-c,l+s),r.closePath()}}),r8=ft.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,a=e.width,i=e.x,n=e.y,o=a/3*2;r.moveTo(i,n),r.lineTo(i+o,n+t),r.lineTo(i,n+t/4*3),r.lineTo(i-o,n+t),r.lineTo(i,n),r.closePath()}}),a8={line:le,rect:ht,roundRect:ht,square:ht,circle:Or,diamond:t8,pin:e8,arrow:r8,triangle:Q6},i8={line:function(r,e,t,a,i){i.x1=r,i.y1=e+a/2,i.x2=r+t,i.y2=e+a/2},rect:function(r,e,t,a,i){i.x=r,i.y=e,i.width=t,i.height=a},roundRect:function(r,e,t,a,i){i.x=r,i.y=e,i.width=t,i.height=a,i.r=Math.min(t,a)/4},square:function(r,e,t,a,i){var n=Math.min(t,a);i.x=r,i.y=e,i.width=n,i.height=n},circle:function(r,e,t,a,i){i.cx=r+t/2,i.cy=e+a/2,i.r=Math.min(t,a)/2},diamond:function(r,e,t,a,i){i.cx=r+t/2,i.cy=e+a/2,i.width=t,i.height=a},pin:function(r,e,t,a,i){i.x=r+t/2,i.y=e+a/2,i.width=t,i.height=a},arrow:function(r,e,t,a,i){i.x=r+t/2,i.y=e+a/2,i.width=t,i.height=a},triangle:function(r,e,t,a,i){i.cx=r+t/2,i.cy=e+a/2,i.width=t,i.height=a}},jf={};T(a8,function(r,e){jf[e]=new r});var n8=ft.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var a=Ls(r,e,t),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(a.y=t.y+t.height*.4),a},buildPath:function(r,e,t){var a=e.symbolType;if(a!=="none"){var i=jf[a];i||(a="rect",i=jf[a]),i8[a](e.x,e.y,e.width,e.height,i.shape),i.buildPath(r,i.shape,t)}}});function o8(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||N.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function jt(r,e,t,a,i,n,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=u_(r.slice(8),new at(e,t,a,i),o?"center":"cover"):r.indexOf("path://")===0?l=$s(r.slice(7),{},new at(e,t,a,i),o?"center":"cover"):l=new n8({shape:{symbolType:r,x:e,y:t,width:a,height:i}}),l.__isEmptyBrush=s,l.setColor=o8,n&&l.setColor(n),l}function Pi(r){return z(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Da(r,e){if(r!=null)return z(r)||(r=[r,r]),[j(r[0],e[0])||0,j(Q(r[1],r[0]),e[1])||0]}function fl(r){return isFinite(r)}function s8(r,e,t){var a=e.x==null?0:e.x,i=e.x2==null?1:e.x2,n=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(a=a*t.width+t.x,i=i*t.width+t.x,n=n*t.height+t.y,o=o*t.height+t.y),a=fl(a)?a:0,i=fl(i)?i:1,n=fl(n)?n:0,o=fl(o)?o:0;var s=r.createLinearGradient(a,n,i,o);return s}function l8(r,e,t){var a=t.width,i=t.height,n=Math.min(a,i),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*a+t.x,s=s*i+t.y,l=l*n),o=fl(o)?o:.5,s=fl(s)?s:.5,l=l>=0&&fl(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function $f(r,e,t){for(var a=e.type==="radial"?l8(r,e,t):s8(r,e,t),i=e.colorStops,n=0;n<i.length;n++)a.addColorStop(i[n].offset,i[n].color);return a}function RP(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 rm(r){return parseInt(r,10)}function Po(r,e,t){var a=["width","height"][e],i=["clientWidth","clientHeight"][e],n=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[a]!=null&&t[a]!=="auto")return parseFloat(t[a]);var s=document.defaultView.getComputedStyle(r);return(r[i]||rm(s[a])||rm(r.style[a]))-(rm(s[n])||0)-(rm(s[o])||0)|0}function u8(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:yt(r)?[r]:z(r)?r:null}function Kf(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&u8(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=V(t,function(n){return n/i}),a/=i)}return[t,a]}var c8=new tr(!0);function am(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function NP(r){return typeof r=="string"&&r!=="none"}function im(r){var e=r.fill;return e!=null&&e!=="none"}function OP(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 zP(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 nm(r,e,t){var a=mf(e.image,e.__image,t);if(cu(a)){var i=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var n=new DOMMatrix;n.translateSelf(e.x||0,e.y||0),n.rotateSelf(0,0,(e.rotation||0)*Zl),n.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(n)}return i}}function f8(r,e,t,a){var i,n=am(t),o=im(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||c8,f=e.__dirty;if(!a){var p=t.fill,h=t.stroke,d=o&&!!p.colorStops,v=n&&!!h.colorStops,m=o&&!!p.image,g=n&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0;(d||v)&&(S=e.getBoundingRect()),d&&(y=f?$f(r,p,S):e.__canvasFillGradient,e.__canvasFillGradient=y),v&&(x=f?$f(r,h,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=x),m&&(_=f||!e.__canvasFillPattern?nm(r,p,e):e.__canvasFillPattern,e.__canvasFillPattern=_),g&&(b=f||!e.__canvasStrokePattern?nm(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),d?r.fillStyle=y:m&&(_?r.fillStyle=_:o=!1),v?r.strokeStyle=x:g&&(b?r.strokeStyle=b:n=!1)}var w=e.getGlobalScale();c.setScale(w[0],w[1],e.segmentIgnoreThreshold);var D,C;r.setLineDash&&t.lineDash&&(i=Kf(e),D=i[0],C=i[1]);var M=!0;(u||f&co)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),M=!1),c.reset(),e.buildPath(c,e.shape,a),c.toStatic(),e.pathUpdated()),M&&c.rebuildPath(r,l?s:1),D&&(r.setLineDash(D),r.lineDashOffset=C),a||(t.strokeFirst?(n&&zP(r,t),o&&OP(r,t)):(o&&OP(r,t),n&&zP(r,t))),D&&r.setLineDash([])}function p8(r,e,t){var a=e.__image=mf(t.image,e.__image,e,e.onload);if(!(!a||!cu(a))){var i=t.x||0,n=t.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(a,u,c,t.sWidth,t.sHeight,i,n,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,p=s-c;r.drawImage(a,u,c,f,p,i,n,o,s)}else r.drawImage(a,i,n,o,s)}}function h8(r,e,t){var a,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||qr,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var n=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=Kf(e),n=a[0],o=a[1]),n&&(r.setLineDash(n),r.lineDashOffset=o),t.strokeFirst?(am(t)&&r.strokeText(i,t.x,t.y),im(t)&&r.fillText(i,t.x,t.y)):(im(t)&&r.fillText(i,t.x,t.y),am(t)&&r.strokeText(i,t.x,t.y)),n&&r.setLineDash([])}}var VP=["shadowBlur","shadowOffsetX","shadowOffsetY"],BP=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function YP(r,e,t,a,i){var n=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){fa(r,i),n=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Ki.opacity:o}(a||e.blend!==t.blend)&&(n||(fa(r,i),n=!0),r.globalCompositeOperation=e.blend||Ki.blend);for(var s=0;s<VP.length;s++){var l=VP[s];(a||e[l]!==t[l])&&(n||(fa(r,i),n=!0),r[l]=r.dpr*(e[l]||0))}return(a||e.shadowColor!==t.shadowColor)&&(n||(fa(r,i),n=!0),r.shadowColor=e.shadowColor||Ki.shadowColor),n}function UP(r,e,t,a,i){var n=Jf(e,i.inHover),o=a?null:t&&Jf(t,i.inHover)||{};if(n===o)return!1;var s=YP(r,n,o,a,i);if((a||n.fill!==o.fill)&&(s||(fa(r,i),s=!0),NP(n.fill)&&(r.fillStyle=n.fill)),(a||n.stroke!==o.stroke)&&(s||(fa(r,i),s=!0),NP(n.stroke)&&(r.strokeStyle=n.stroke)),(a||n.opacity!==o.opacity)&&(s||(fa(r,i),s=!0),r.globalAlpha=n.opacity==null?1:n.opacity),e.hasStroke()){var l=n.lineWidth,u=l/(n.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(fa(r,i),s=!0),r.lineWidth=u)}for(var c=0;c<BP.length;c++){var f=BP[c],p=f[0];(a||n[p]!==o[p])&&(s||(fa(r,i),s=!0),r[p]=n[p]||f[1])}return s}function d8(r,e,t,a,i){return YP(r,Jf(e,i.inHover),t&&Jf(t,i.inHover),a,i)}function ZP(r,e){var t=e.transform,a=r.dpr||1;t?r.setTransform(a*t[0],a*t[1],a*t[2],a*t[3],a*t[4],a*t[5]):r.setTransform(a,0,0,a,0,0)}function v8(r,e,t){for(var a=!1,i=0;i<r.length;i++){var n=r[i];a=a||n.isZeroArea(),ZP(e,n),e.beginPath(),n.buildPath(e,n.shape),e.clip()}t.allClipped=a}function m8(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 FP=1,HP=2,GP=3,WP=4;function g8(r){var e=im(r),t=am(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 fa(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Jf(r,e){return e&&r.__hoverStyle||r.style}function om(r,e){ko(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function ko(r,e,t,a){var i=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~Ye,e.__isRendered=!1;return}var n=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||RP(n,o))&&(o&&o.length&&(fa(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),n&&n.length&&(fa(r,t),r.save(),v8(n,r,t),s=!0),t.prevElClipPaths=n),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof ft&&e.autoBatch&&g8(e.style);s||m8(i,u.transform)?(fa(r,t),ZP(r,e)):c||fa(r,t);var f=Jf(e,t.inHover);e instanceof ft?(t.lastDrawType!==FP&&(l=!0,t.lastDrawType=FP),UP(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),f8(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof In?(t.lastDrawType!==GP&&(l=!0,t.lastDrawType=GP),UP(r,e,u,l,t),h8(r,e,f)):e instanceof se?(t.lastDrawType!==HP&&(l=!0,t.lastDrawType=HP),d8(r,e,u,l,t),p8(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==WP&&(l=!0,t.lastDrawType=WP),y8(r,e,t)),c&&a&&fa(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function y8(r,e,t){var a=e.getDisplayables(),i=e.getTemporalDisplayables();r.save();var n={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=a.length;o<s;o++){var l=a[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),ko(r,l,n,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),n.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),ko(r,l,n,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),n.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var fb=new PP,XP=new Xi(100),qP=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function ki(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),a=e.getZr(),i=a.painter.type==="svg";r.dirty&&fb.delete(r);var n=fb.get(r);if(n)return n;var o=J(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=i?1:1/t,fb.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,p=0;p<qP.length;++p){var h=o[qP[p]];if(h!=null&&!z(h)&&!W(h)&&!yt(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var d;if(f){d=c.join(",")+(i?"-svg":"");var v=XP.get(d);v&&(i?u.svgElement=v:u.image=v)}var m=$P(o.dashArrayX),g=x8(o.dashArrayY),y=jP(o.symbol),x=_8(m),_=KP(g),b=!i&&Ke.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=C(),D;b&&(b.width=w.width*t,b.height=w.height*t,D=b.getContext("2d")),M(),f&&XP.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=w.width,u.svgHeight=w.height;function C(){for(var E=1,L=0,A=x.length;L<A;++L)E=gx(E,x[L]);for(var P=1,L=0,A=y.length;L<A;++L)P=gx(P,y[L].length);E*=P;var R=_*x.length*y.length;if(0)var k;return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(R,o.maxTileHeight))}}function M(){D&&(D.clearRect(0,0,b.width,b.height),o.backgroundColor&&(D.fillStyle=o.backgroundColor,D.fillRect(0,0,b.width,b.height)));for(var E=0,L=0;L<g.length;++L)E+=g[L];if(E<=0)return;for(var A=-_,P=0,R=0,k=0;A<w.height;){if(P%2===0){for(var B=R/2%y.length,U=0,F=0,H=0;U<w.width*2;){for(var G=0,L=0;L<m[k].length;++L)G+=m[k][L];if(G<=0)break;if(F%2===0){var Y=(1-o.symbolSize)*.5,rt=U+m[k][F]*Y,st=A+g[P]*Y,mt=m[k][F]*o.symbolSize,Ht=g[P]*o.symbolSize,Kt=H/2%y[B].length;Et(rt,st,mt,Ht,y[B][Kt])}U+=m[k][F],++H,++F,F===m[k].length&&(F=0)}++k,k===m.length&&(k=0)}A+=g[P],++R,++P,P===g.length&&(P=0)}function Et(vt,It,ct,Ct,ae){var Wt=i?1:t,Qt=jt(ae,vt*Wt,It*Wt,ct*Wt,Ct*Wt,o.color,o.symbolKeepAspect);if(i){var ue=a.painter.renderOneToVNode(Qt);ue&&S.children.push(ue)}else om(D,Qt)}}}}function jP(r){if(!r||r.length===0)return[["rect"]];if(W(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!W(r[t])){e=!1;break}if(e)return jP([r]);for(var a=[],t=0;t<r.length;++t)W(r[t])?a.push([r[t]]):a.push(r[t]);return a}function $P(r){if(!r||r.length===0)return[[0,0]];if(yt(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,a=0;a<r.length;++a)if(!yt(r[a])){t=!1;break}if(t)return $P([r]);for(var i=[],a=0;a<r.length;++a)if(yt(r[a])){var e=Math.ceil(r[a]);i.push([e,e])}else{var e=V(r[a],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function x8(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(yt(r)){var e=Math.ceil(r);return[e,e]}var t=V(r,function(a){return Math.ceil(a)});return r.length%2?t.concat(t):t}function _8(r){return V(r,function(e){return KP(e)})}function KP(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function pb(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var a=t.getData();a.hasItemVisual()&&a.each(function(o){var s=a.getItemVisual(o,"decal");if(s){var l=a.ensureUniqueItemVisual(o,"style");l.decal=ki(s,e)}});var i=a.getVisual("decal");if(i){var n=a.getVisual("style");n.decal=ki(i,e)}}})}var b8=new Ue,ti=b8;var JP={};function QP(r,e){JP[r]=e}function tk(r){return JP[r]}var ek={};function rk(r,e){ek[r]=e}function ak(r){return ek[r]}var S8=1,w8=800,T8=900,D8=1e3,C8=2e3,M8=5e3,hk=1e3,E8=1100,Tb=2e3,dk=3e3,A8=4e3,hm=4500,L8=4600,I8=5e3,P8=6e3,vk=7e3,mk={PROCESSOR:{FILTER:D8,SERIES_FILTER:w8,STATISTIC:M8},VISUAL:{LAYOUT:hk,PROGRESSIVE_LAYOUT:E8,GLOBAL:Tb,CHART:dk,POST_CHART_LAYOUT:L8,COMPONENT:A8,BRUSH:I8,CHART_ITEM:hm,ARIA:P8,DECAL:vk}},je="__flagInMainProcess",sm="__mainProcessVersion",sr="__pendingUpdate",hb="__needsUpdateStatus",ik=/^[a-zA-Z0-9_]+$/,db="__connectUpdateStatus",nk=0,k8=1,R8=2;function gk(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return xk(this,r,e)}}function yk(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return xk(this,r,e)}}function xk(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),Ue.prototype[e].apply(r,t)}var _k=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(Ue),bk=_k.prototype;bk.on=yk("on");bk.off=yk("off");var pl,vb,lm,Yn,um,mb,gb,Pu,ku,ok,sk,yb,lk,cm,uk,Sk,ei,ck,Ru,wk=(function(r){I(e,r);function e(t,a,i){var n=r.call(this,new MP)||this;n._chartsViews=[],n._chartsMap={},n._componentsViews=[],n._componentsMap={},n._pendingActions=[],i=i||{},n._dom=t;var o="canvas",s="auto",l=!1;if(n[sm]=1,0)var u;i.ssr&&IE(function(h){var d=nt(h),v=d.dataIndex;if(v!=null){var m=q();return m.set("series_index",d.seriesIndex),m.set("data_index",v),d.ssrType&&m.set("ssr_type",d.ssrType),m}});var c=n._zr=hx(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Q(i.useDirtyRect,l),useCoarsePointer:Q(i.useCoarsePointer,s),pointerSize:i.pointerSize});n._ssr=i.ssr,n._throttledZrFlush=Wf(Z(c.flush,c),17),n._updateTheme(a),n._locale=QL(i.locale||ov),n._coordSysMgr=new Fn;var f=n._api=uk(n);function p(h,d){return h.__prio-d.__prio}return _s(pm,p),_s(bb,p),n._scheduler=new lb(n,f,bb,pm),n._messageCenter=new _k,n._initEvents(),n.resize=Z(n.resize,n),c.animation.on("frame",n._onframe,n),ok(c,n),sk(c,n),hs(n),n}return e.prototype._onframe=function(){if(!this._disposed){ck(this);var t=this._scheduler;if(this[sr]){var a=this[sr].silent;this[je]=!0,Ru(this);try{pl(this),Yn.update.call(this,null,this[sr].updateParams)}catch(l){throw this[je]=!1,this[sr]=null,l}this._zr.flush(),this[je]=!1,this[sr]=null,Pu.call(this,a),ku.call(this,a)}else if(t.unfinished){var i=S8,n=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),mb(this,n),t.performVisualTasks(n),cm(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>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,a,i){if(!this[je]){if(this._disposed){this.id;return}var n,o,s;if(et(a)&&(i=a.lazyUpdate,n=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[je]=!0,Ru(this),!this._model||a){var l=new PI(this._api),u=this._theme,c=this._model=new kv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Sb);var f={seriesTransition:s,optionChanged:!0};if(i)this[sr]={silent:n,updateParams:f},this[je]=!1,this.getZr().wakeUp();else{try{pl(this),Yn.update.call(this,null,f)}catch(p){throw this[sr]=null,this[je]=!1,p}this._ssr||this._zr.flush(),this[sr]=null,this[je]=!1,Pu.call(this,n),ku.call(this,n)}}},e.prototype.setTheme=function(t,a){if(!this[je]){if(this._disposed){this.id;return}var i=this._model;if(i){var n=a&&a.silent,o=null;this[sr]&&(n==null&&(n=this[sr].silent),o=this[sr].updateParams,this[sr]=null),this[je]=!0,Ru(this);try{this._updateTheme(t),i.setTheme(this._theme),pl(this),Yn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[je]=!1,s}this[je]=!1,Pu.call(this,n),ku.call(this,n)}}},e.prototype._updateTheme=function(t){W(t)&&(t=Tk[t]),t&&(t=tt(t),t&&Nv(t,!0),this._theme=t)},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||Lt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,a=t.storage.getDisplayList();return T(a,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,i=this._model,n=[],o=this;T(a,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(n.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 T(n,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",i=this.group,n=Math.min,o=Math.max,s=1/0;if(fk[i]){var l=s,u=s,c=-s,f=-s,p=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();T(Qf,function(x,_){if(x.group===i){var b=a?x.getZr().painter.getSvgDom().innerHTML:x.renderToCanvas(tt(t)),S=x.getDom().getBoundingClientRect();l=n(S.left,l),u=n(S.top,u),c=o(S.right,c),f=o(S.bottom,f),p.push({dom:b,left:S.left,top:S.top})}}),l*=h,u*=h,c*=h,f*=h;var d=c-l,v=f-u,m=Ke.createCanvas(),g=hx(m,{renderer:a?"svg":"canvas"});if(g.resize({width:d,height:v}),a){var y="";return T(p,function(x){var _=x.left-l,b=x.top-u;y+='<g transform="translate('+_+","+b+')">'+x.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new ht({shape:{x:0,y:0,width:d,height:v},style:{fill:t.connectedBackgroundColor}})),T(p,function(x){var _=new se({style:{x:x.left*h-l,y:x.top*h-u,image:x.dom}});g.add(_)}),g.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a,i){return um(this,"convertToPixel",t,a,i)},e.prototype.convertToLayout=function(t,a,i){return um(this,"convertToLayout",t,a,i)},e.prototype.convertFromPixel=function(t,a,i){return um(this,"convertFromPixel",t,a,i)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var i=this._model,n,o=ji(i,t);return T(o,function(s,l){l.indexOf("Models")>=0&&T(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)n=n||!!c.containPoint(a);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(n=n||f.containPoint(a,u))}},this)},this),!!n},e.prototype.getVisual=function(t,a){var i=this._model,n=ji(i,t,{defaultMainType:"series"}),o=n.seriesModel,s=o.getData(),l=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?s.indexOfRawIndex(n.dataIndex):null;return l!=null?qf(s,l,a):cn(s,a)},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;T(N8,function(i){var n=function(o){var s=t.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Ii(l,function(v){var m=nt(v);if(m&&m.dataIndex!=null){var g=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=g&&g.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=O({},m.eventData),!0},!0),u){var f=u.componentType,p=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",p=u.seriesIndex);var h=f&&p!=null&&s.getComponent(f,p),d=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=i,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:d},t.trigger(i,u)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)});var a=this._messageCenter;T(_b,function(i,n){a.on(n,function(o){t.trigger(n,o)})}),IP(a,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&_x(this.getDom(),Cb,"");var a=this,i=a._api,n=a._model;T(a._componentsViews,function(o){o.dispose(n,i)}),T(a._chartsViews,function(o){o.dispose(n,i)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete Qf[a.id]},e.prototype.resize=function(t){if(!this[je]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var i=a.resetOption("media"),n=t&&t.silent;this[sr]&&(n==null&&(n=this[sr].silent),i=!0,this[sr]=null),this[je]=!0,Ru(this);try{i&&pl(this),Yn.update.call(this,{type:"resize",animation:O({duration:0},t&&t.animation)})}catch(o){throw this[je]=!1,o}this[je]=!1,Pu.call(this,n),ku.call(this,n)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(et(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!wb[t]){var i=wb[t](this._api,a),n=this._zr;this._loadingFX=i,n.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=O({},t);return a.type=xb[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(et(a)||(a={silent:!!a}),!!fm[t.type]&&this._model){if(this[je]){this._pendingActions.push(t);return}var i=a.silent;gb.call(this,t,i);var n=a.flush;n?this._zr.flush():n!==!1&&Lt.browser.weChat&&this._throttledZrFlush(),Pu.call(this,i),ku.call(this,i)}},e.prototype.updateLabelLayout=function(){ti.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(a);n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){pl=function(f){var p=f._scheduler;p.restorePipelines(f._model),p.prepareStageTasks(),vb(f,!0),vb(f,!1),p.plan()},vb=function(f,p){for(var h=f._model,d=f._scheduler,v=p?f._componentsViews:f._chartsViews,m=p?f._componentsMap:f._chartsMap,g=f._zr,y=f._api,x=0;x<v.length;x++)v[x].__alive=!1;p?h.eachComponent(function(S,w){S!=="series"&&_(w)}):h.eachSeries(_);function _(S){var w=S.__requireNewView;S.__requireNewView=!1;var D="_ec_"+S.id+"_"+S.type,C=!w&&m[D];if(!C){var M=ea(S.type),E=p?Ot.getClass(M.main,M.sub):Pt.getClass(M.sub);C=new E,C.init(h,y),m[D]=C,v.push(C),g.add(C.group)}S.__viewId=C.__id=D,C.__alive=!0,C.__model=S,C.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!p&&d.prepareView(C,S,h,y)}for(var x=0;x<v.length;){var b=v[x];b.__alive?x++:(!p&&b.renderTask.dispose(),g.remove(b.group),b.dispose(h,y),v.splice(x,1),m[b.__id]===b&&delete m[b.__id],b.__id=b.group.__ecComponentInfo=null)}},lm=function(f,p,h,d,v){var m=f._model;if(m.setUpdatePayload(h),!d){T([].concat(f._componentsViews).concat(f._chartsViews),b);return}var g={};g[d+"Id"]=h[d+"Id"],g[d+"Index"]=h[d+"Index"],g[d+"Name"]=h[d+"Name"];var y={mainType:d,query:g};v&&(y.subType=v);var x=h.excludeSeriesId,_;x!=null&&(_=q(),T(Ft(x),function(S){var w=ve(S,null);w!=null&&_.set(w,!0)})),m&&m.eachComponent(y,function(S){var w=_&&_.get(S.id)!=null;if(!w)if(Qx(h))if(S instanceof Nt)h.type===To&&!h.notBlur&&!S.get(["emphasis","disabled"])&&QA(S,h,f._api);else{var D=zd(S.mainType,S.componentIndex,h.name,f._api),C=D.focusSelf,M=D.dispatchers;h.type===To&&C&&!h.notBlur&&Pd(S.mainType,S.componentIndex,f._api),M&&T(M,function(E){h.type===To?Tr(E):Dr(E)})}else Bd(h)&&S instanceof Nt&&(rL(S,h,f._api),Jx(S),ei(f))},f),m&&m.eachComponent(y,function(S){var w=_&&_.get(S.id)!=null;w||b(f[d==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},f);function b(S){S&&S.__alive&&S[p]&&S[p](S.__model,m,f._api,h)}},Yn={prepareAndUpdate:function(f){pl(this),Yn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,p){var h=this._model,d=this._api,v=this._zr,m=this._coordSysMgr,g=this._scheduler;if(h){h.setUpdatePayload(f),g.restoreData(h,f),g.performSeriesTasks(h),m.create(h,d),g.performDataProcessorTasks(h,f),mb(this,h),m.update(h,d),a(h),g.performVisualTasks(h,f);var y=h.get("backgroundColor")||"transparent";v.setBackgroundColor(y);var x=h.get("darkMode");x!=null&&x!=="auto"&&v.setDarkMode(x),yb(this,h,d,f,p),ti.trigger("afterupdate",h,d)}},updateTransform:function(f){var p=this,h=this._model,d=this._api;if(h){h.setUpdatePayload(f);var v=[];h.eachComponent(function(g,y){if(g!=="series"){var x=p.getViewOfComponentModel(y);if(x&&x.__alive)if(x.updateTransform){var _=x.updateTransform(y,h,d,f);_&&_.update&&v.push(x)}else v.push(x)}});var m=q();h.eachSeries(function(g){var y=p._chartsMap[g.__viewId];if(y.updateTransform){var x=y.updateTransform(g,h,d,f);x&&x.update&&m.set(g.uid,1)}else m.set(g.uid,1)}),a(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:m}),cm(this,h,d,f,{},m),ti.trigger("afterupdate",h,d)}},updateView:function(f){var p=this._model;p&&(p.setUpdatePayload(f),Pt.markUpdateMethod(f,"updateView"),a(p),this._scheduler.performVisualTasks(p,f,{setDirty:!0}),yb(this,p,this._api,f,{}),ti.trigger("afterupdate",p,this._api))},updateVisual:function(f){var p=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(d){d.getData().clearAllVisual()}),Pt.markUpdateMethod(f,"updateVisual"),a(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(d,v){if(d!=="series"){var m=p.getViewOfComponentModel(v);m&&m.__alive&&m.updateVisual(v,h,p._api,f)}}),h.eachSeries(function(d){var v=p._chartsMap[d.__viewId];v.updateVisual(d,h,p._api,f)}),ti.trigger("afterupdate",h,this._api))},updateLayout:function(f){Yn.update.call(this,f)}};function t(f,p,h,d,v){if(f._disposed){f.id;return}for(var m=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,x=ji(m,h),_=0;_<g.length;_++){var b=g[_];if(b[p]&&(y=b[p](m,x,d,v))!=null)return y}}um=t,mb=function(f,p){var h=f._chartsMap,d=f._scheduler;p.eachSeries(function(v){d.updateStreamModes(v,h[v.__viewId])})},gb=function(f,p){var h=this,d=this.getModel(),v=f.type,m=f.escapeConnect,g=fm[v],y=(g.update||"update").split(":"),x=y.pop(),_=y[0]!=null&&ea(y[0]);this[je]=!0,Ru(this);var b=[f],S=!1;f.batch&&(S=!0,b=V(f.batch,function(k){return k=J(O({},k),f),k.batch=null,k}));var w=[],D,C=[],M=g.nonRefinedEventType,E=Bd(f),L=Qx(f);if(L&&Kx(this._api),T(b,function(k){var B=g.action(k,d,h._api);if(g.refineEvent?C.push(B):D=B,D=D||O({},k),D.type=M,w.push(D),L){var U=df(f),F=U.queryOptionMap,H=U.mainTypeSpecified,G=H?F.keys()[0]:"series";lm(h,x,k,G),ei(h)}else E?(lm(h,x,k,"series"),ei(h)):_&&lm(h,x,k,_.main,_.sub)}),x!=="none"&&!L&&!E&&!_)try{this[sr]?(pl(this),Yn.update.call(this,f),this[sr]=null):Yn[x].call(this,f)}catch(k){throw this[je]=!1,k}if(S?D={type:M,escapeConnect:m,batch:w}:D=w[0],this[je]=!1,!p){var A=void 0;if(g.refineEvent){var P=g.refineEvent(C,f,d,this._api).eventContent;ee(et(P)),A=J({type:g.refinedEventType},P),A.fromAction=f.type,A.fromActionPayload=f,A.escapeConnect=!0}var R=this._messageCenter;R.trigger(D.type,D),A&&R.trigger(A.type,A)}},Pu=function(f){for(var p=this._pendingActions;p.length;){var h=p.shift();gb.call(this,h,f)}},ku=function(f){!f&&this.trigger("updated")},ok=function(f,p){f.on("rendered",function(h){p.trigger("rendered",h),f.animation.isFinished()&&!p[sr]&&!p._scheduler.unfinished&&!p._pendingActions.length&&p.trigger("finished")})},sk=function(f,p){f.on("mouseover",function(h){var d=h.target,v=Ii(d,Do);v&&(tL(v,h,p._api),ei(p))}).on("mouseout",function(h){var d=h.target,v=Ii(d,Do);v&&(eL(v,h,p._api),ei(p))}).on("click",function(h){var d=h.target,v=Ii(d,function(y){return nt(y).dataIndex!=null},!0);if(v){var m=v.selected?"unselect":"select",g=nt(v);p._api.dispatchAction({type:m,dataType:g.dataType,dataIndexInside:g.dataIndex,seriesIndex:g.seriesIndex,isFromClick:!0})}})};function a(f){f.clearColorPalette(),f.eachSeries(function(p){p.clearColorPalette()})}function i(f){var p=[],h=[],d=!1;if(f.eachComponent(function(y,x){var _=x.get("zlevel")||0,b=x.get("z")||0,S=x.getZLevelKey();d=d||!!S,(y==="series"?h:p).push({zlevel:_,z:b,idx:x.componentIndex,type:y,key:S})}),d){var v=p.concat(h),m,g;_s(v,function(y,x){return y.zlevel===x.zlevel?y.z-x.z:y.zlevel-x.zlevel}),T(v,function(y){var x=f.getComponent(y.type,y.idx),_=y.zlevel,b=y.key;m!=null&&(_=Math.max(m,_)),b?(_===m&&b!==g&&_++,g=b):g&&(_===m&&_++,g=""),m=_,x.setZLevel(_)})}}yb=function(f,p,h,d,v){i(p),lk(f,p,h,d,v),T(f._chartsViews,function(m){m.__alive=!1}),cm(f,p,h,d,v),T(f._chartsViews,function(m){m.__alive||m.remove(p,h)})},lk=function(f,p,h,d,v,m){T(m||f._componentsViews,function(g){var y=g.__model;u(y,g),g.render(y,p,h,d),l(y,g),c(y,g)})},cm=function(f,p,h,d,v,m){var g=f._scheduler;v=O(v||{},{updatedSeries:p.getSeries()}),ti.trigger("series:beforeupdate",p,h,v);var y=!1;p.eachSeries(function(x){var _=f._chartsMap[x.__viewId];_.__alive=!0;var b=_.renderTask;g.updatePayload(b,d),u(x,_),m&&m.get(x.uid)&&b.dirty(),b.perform(g.getPerformArgs(b))&&(y=!0),_.group.silent=!!x.get("silent"),s(x,_),Jx(x)}),g.unfinished=y||g.unfinished,ti.trigger("series:layoutlabels",p,h,v),ti.trigger("series:transition",p,h,v),p.eachSeries(function(x){var _=f._chartsMap[x.__viewId];l(x,_),c(x,_)}),o(f,p),ti.trigger("series:afterupdate",p,h,v)},ei=function(f){f[hb]=!0,f.getZr().wakeUp()},Ru=function(f){f[sm]=(f[sm]+1)%1e3},ck=function(f){f[hb]&&(f.getZr().storage.traverse(function(p){Nn(p)||n(p)}),f[hb]=!1)};function n(f){for(var p=[],h=f.currentStates,d=0;d<h.length;d++){var v=h[d];v==="emphasis"||v==="blur"||v==="select"||p.push(v)}f.selected&&f.states.select&&p.push("select"),f.hoverState===_f&&f.states.emphasis?p.push("emphasis"):f.hoverState===Gs&&f.states.blur&&p.push("blur"),f.useStates(p)}function o(f,p){var h=f._zr,d=h.storage,v=0;d.traverse(function(m){m.isGroup||v++}),v>p.get("hoverLayerThreshold")&&!Lt.node&&!Lt.worker&&p.eachSeries(function(m){if(!m.preventUsingHoverLayer){var g=f._chartsMap[m.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(f,p){var h=f.get("blendMode")||null;p.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function l(f,p){if(!f.preventAutoZ){var h=ja(f);p.eachRendered(function(d){return Js(d,h.z,h.zlevel),!0})}}function u(f,p){p.eachRendered(function(h){if(!Nn(h)){var d=h.getTextContent(),v=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,p){var h=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),v=h.get("duration"),m=v>0?{duration:v,delay:h.get("delay"),easing:h.get("easing")}:null;p.eachRendered(function(g){if(g.states&&g.states.emphasis){if(Nn(g))return;if(g instanceof ft&&oL(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=m;var x=g.getTextContent(),_=g.getTextGuideLine();x&&(x.stateTransition=m),_&&(_.stateTransition=m)}g.__dirty&&n(g)}})}uk=function(f){return new((function(p){I(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var v=d.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);d=d.parent}},h.prototype.enterEmphasis=function(d,v){Tr(d,v),ei(f)},h.prototype.leaveEmphasis=function(d,v){Dr(d,v),ei(f)},h.prototype.enterBlur=function(d){Od(d),ei(f)},h.prototype.leaveBlur=function(d){Tf(d),ei(f)},h.prototype.enterSelect=function(d){jx(d),ei(f)},h.prototype.leaveSelect=function(d){$x(d),ei(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},h.prototype.getMainProcessVersion=function(){return f[sm]},h})(Rv))(f)},Sk=function(f){function p(h,d){for(var v=0;v<h.length;v++){var m=h[v];m[db]=d}}T(xb,function(h,d){f._messageCenter.on(d,function(v){if(fk[f.group]&&f[db]!==nk){if(v&&v.escapeConnect)return;var m=f.makeActionFromEvent(v),g=[];T(Qf,function(y){y!==f&&y.group===f.group&&g.push(y)}),p(g,nk),T(g,function(y){y[db]!==k8&&y.dispatchAction(m)}),p(g,R8)}})})}})(),e})(Ue),Db=wk.prototype;Db.on=gk("on");Db.off=gk("off");Db.one=function(r,e,t){var a=this;function i(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];e&&e.apply&&e.apply(this,n),a.off(r,i)}this.on.call(this,r,i,t)};var N8=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var fm={},xb={},_b={},bb=[],Sb=[],pm=[],Tk={},wb={},Qf={},fk={},O8=+new Date-0,qht=+new Date-0,Cb="_echarts_instance_";function Mb(r,e,t){var a=!(t&&t.ssr);if(a){var i=Zn(r);if(i)return i}var n=new wk(r,e,t);return n.id="ec_"+O8++,Qf[n.id]=n,a&&_x(r,Cb,n.id),Sk(n),ti.trigger("afterinit",n),n}function Zn(r){return Qf[$E(r,Cb)]}function Dk(r,e){Tk[r]=e}function Eb(r){lt(Sb,r)<0&&Sb.push(r)}function Ab(r,e){Lb(bb,r,e,C8)}function Ck(r){dm("afterinit",r)}function Mk(r){dm("afterupdate",r)}function dm(r,e){ti.on(r,e)}function Br(r,e,t){var a,i,n,o,s;$(e)&&(t=e,e=""),et(r)?(a=r.type,i=r.event,o=r.update,s=r.publishNonRefinedEvent,t||(t=r.action),n=r.refineEvent):(a=r,i=e);function l(c){return c.toLowerCase()}i=l(i||a);var u=n?l(a):i;fm[a]||(ee(ik.test(a)&&ik.test(i)),n&&ee(i!==a),fm[a]={actionType:a,refinedEventType:i,nonRefinedEventType:u,update:o,action:t,refineEvent:n},_b[i]=1,n&&s&&(_b[u]=1),xb[u]=a)}function Ek(r,e){Fn.register(r,e)}function Ak(r,e){Lb(pm,r,e,hk,"layout")}function Ro(r,e){Lb(pm,r,e,dk,"visual")}var pk=[];function Lb(r,e,t,a,i){if(($(e)||et(e))&&(t=e,e=a),!(lt(pk,t)>=0)){pk.push(t);var n=lb.wrapStageHandler(t,i);n.__prio=e,n.__raw=t,r.push(n)}}function Ib(r,e){wb[r]=e}function Lk(r,e,t){var a=tk("registerMap");a&&a(r,e,t)}var Ik=$I;Ro(Tb,yP);Ro(hm,xP);Ro(hm,_P);Ro(Tb,AP);Ro(hm,LP);Ro(vk,pb);Eb(Nv);Ab(T8,G_);Ib("default",sb);Br({type:To,event:To,update:To},ie);Br({type:bf,event:bf,update:bf},ie);Br({type:Sf,event:Rd,update:Sf,action:ie,refineEvent:Pb,publishNonRefinedEvent:!0});Br({type:kd,event:Rd,update:kd,action:ie,refineEvent:Pb,publishNonRefinedEvent:!0});Br({type:wf,event:Rd,update:wf,action:ie,refineEvent:Pb,publishNonRefinedEvent:!0});function Pb(r,e,t,a){return{eventContent:{selected:aL(t),isFromClick:e.isFromClick||!1}}}Dk("default",{});Dk("dark",CP);var Pk=[],z8={registerPreprocessor:Eb,registerProcessor:Ab,registerPostInit:Ck,registerPostUpdate:Mk,registerUpdateLifecycle:dm,registerAction:Br,registerCoordinateSystem:Ek,registerLayout:Ak,registerVisual:Ro,registerTransform:Ik,registerLoading:Ib,registerMap:Lk,registerImpl:QP,PRIORITY:mk,ComponentModel:St,ComponentView:Ot,SeriesModel:Nt,ChartView:Pt,registerComponentModel:function(r){St.registerClass(r)},registerComponentView:function(r){Ot.registerClass(r)},registerSeriesModel:function(r){Nt.registerClass(r)},registerChartView:function(r){Pt.registerClass(r)},registerCustomSeries:function(r,e){rk(r,e)},registerSubTypeDefaulter:function(r,e){St.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){AE(r,e)}};function Tt(r){if(z(r)){T(r,function(e){Tt(e)});return}lt(Pk,r)>=0||(Pk.push(r),$(r)&&(r={install:r}),r.install(z8))}function tp(r){return r==null?0:r.length||1}function kk(r){return r}var V8=(function(){function r(e,t,a,i,n,o){this._old=e,this._new=t,this._oldKeyGetter=a||kk,this._newKeyGetter=i||kk,this.context=n,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,a={},i=new Array(e.length),n=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,a,n,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=a[s],u=tp(l);if(u>1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(n,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},i={},n=[],o=[];this._initIndexMap(e,a,n,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s<n.length;s++){var l=n[s],u=a[l],c=i[l],f=tp(u),p=tp(c);if(f>1&&p===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&p>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&p===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&p>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var h=0;h<f;h++)this._remove&&this._remove(u[h]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(e,t){for(var a=0;a<e.length;a++){var i=e[a],n=t[i],o=tp(n);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(n[s]);else o===1&&this._add&&this._add(n);t[i]=null}},r.prototype._initIndexMap=function(e,t,a,i){for(var n=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(n||(a[o]=s),!!t){var l=t[s],u=tp(l);u===0?(t[s]=o,n&&a.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r})(),gr=V8;var B8=(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 Rk(r,e){var t={},a=t.encode={},i=q(),n=[],o=[],s={};T(r.dimensions,function(p){var h=r.getDimensionInfo(p),d=h.coordDim;if(d){var v=h.coordDimIndex;kb(a,d)[v]=p,h.isExtraCoord||(i.set(d,1),U8(h.type)&&(n[0]=p),kb(s,d)[v]=r.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(p)}Ev.each(function(m,g){var y=kb(a,g),x=h.otherDims[g];x!=null&&x!==!1&&(y[x]=h.name)})});var l=[],u={};i.each(function(p,h){var d=a[h];u[h]=d[0],l=l.concat(d)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=V(l,function(p){return r.getDimensionInfo(p).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=a.label;c&&c.length&&(n=c.slice());var f=a.tooltip;return f&&f.length?o=f.slice():o.length||(o=n.slice()),a.defaultedLabel=n,a.defaultedTooltip=o,t.userOutput=new B8(s,e),t}function kb(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function hl(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function U8(r){return!(r==="ordinal"||r==="time")}var F8=(function(){function r(e){this.otherDims={},e!=null&&O(this,e)}return r})(),Nu=F8;var H8=ot(),G8={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Rb=(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=Ob(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Q(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=zv(this.source),a=!zb(e),i="",n=[],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 p=this.getSourceDimension(o);p&&(l=t?p.name:null,u=p.type)}n.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=a?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=G8[u]||"f",c&&(i+=c.uid),i+="$"}var h=this.source,d=[h.seriesLayoutBy,h.startIndex,i].join("$$");return{dimensions:n,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,a=0;t<this._fullDimCount;t++){var i=void 0,n=this.dimensions[a];if(n&&n.storeDimIndex===t)n.isCalculationCoord||(i=n.name),a++;else{var o=this.getSourceDimension(t);o&&(i=o.name)}e.push(i)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function mm(r){return r instanceof Rb}function Nb(r){for(var e=q(),t=0;t<(r||[]).length;t++){var a=r[t],i=et(a)?a.name:a;i!=null&&e.get(i)==null&&e.set(i,t)}return e}function Ob(r){var e=H8(r);return e.dimNameMap||(e.dimNameMap=Nb(r.dimensionsDefine))}function zb(r){return r>30}var ep=et,No=V,W8=typeof Int32Array=="undefined"?Array:Int32Array,Y8="e\0\0",Nk=-1,Z8=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],X8=["_approximateExtent"],Ok,gm,rp,ap,Vb,ip,Bb,q8=(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 a,i=!1;mm(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,a=e),a=a||["x","y"];for(var n={},o=[],s={},l=!1,u={},c=0;c<a.length;c++){var f=a[c],p=W(f)?new Nu({name:f}):f instanceof Nu?f:new Nu(f),h=p.name;p.type=p.type||"float",p.coordDim||(p.coordDim=h,p.coordDimIndex=0);var d=p.otherDims=p.otherDims||{};o.push(h),n[h]=p,u[h]!=null&&(l=!0),p.createInvertedIndices&&(s[h]=[]);var v=c;yt(p.storeDimIndex)&&(v=p.storeDimIndex),d.itemName===0&&(this._nameDimIdx=v),d.itemId===0&&(this._idDimIdx=v),i&&(p.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=n,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var m=this._dimIdxToName=q();T(o,function(g){m.set(n[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 a=this._dimIdxToName.get(t);if(a!=null)return a;var i=this._schema.getSourceDimension(t);if(i)return i.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var a=this._getDimInfo(e);return a?a.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(yt(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);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(a){return t.hasOwnProperty(a)?t[a]:void 0}:function(a){return t[a]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var a=this._dimSummary;if(t==null)return a.encodeFirstDimNotExtra[e];var i=a.encode[e];return i?i[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,a=t.encode[e];return(a||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,a){var i=this,n;if(e instanceof Hf&&(n=e),!n){var o=this.dimensions,s=Mu(e)||Ce(e)?new Bv(e,o.length):e;n=new Hf;var l=No(o,function(u){return{type:i._dimInfos[u].type,property:u}});n.initData(s,l,a)}this._store=n,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,n.count()),this._dimSummary=Rk(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 a=this._store.appendValues(e,t&&t.length),i=a.start,n=a.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=i;s<n;s++){var l=s-i;this._nameList[s]=t[l],o&&Bb(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,a=0;a<t.length;a++){var i=this._dimInfos[t[a]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==wa&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var a=this._store,i=a.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===er;if(l&&!i.pure)for(var u=[],c=e;c<t;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&WE(f)&&(this.hasItemOption=!0),f){var p=f.name;n[c]==null&&p!=null&&(n[c]=ve(p,null));var h=f.id;o[c]==null&&h!=null&&(o[c]=ve(h,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)Bb(this,c);Ok(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){ep(e)?O(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),a=this._nameList[t];return a==null&&this._nameDimIdx!=null&&(a=rp(this,this._nameDimIdx,t)),a==null&&(a=""),a},r.prototype._getCategory=function(e,t){var a=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[a]:a},r.prototype.getId=function(e){return gm(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var a=this._store,i=this._dimInfos[e];if(i)return a.get(i.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var a=this._store,i=this._dimInfos[e];if(i)return a.getByRawIndex(i.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 a=this,i=this._store;return z(e)?i.getValues(No(e,function(n){return a._getStoreDimIndex(n)}),t):i.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,a=0,i=t.length;a<i;a++)if(isNaN(this._store.get(t[a],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,a=this._store.count();t<a;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 a=e&&this._invertedIndicesMap[e],i=a&&a[t];return i==null||isNaN(i)?Nk:i},r.prototype.each=function(e,t,a){"use strict";$(e)&&(a=t,t=e,e=[]);var i=a||this,n=No(ap(e),this._getStoreDimIndex,this);this._store.each(n,i?Z(t,i):t)},r.prototype.filterSelf=function(e,t,a){"use strict";$(e)&&(a=t,t=e,e=[]);var i=a||this,n=No(ap(e),this._getStoreDimIndex,this);return this._store=this._store.filter(n,i?Z(t,i):t),this},r.prototype.selectRange=function(e){"use strict";var t=this,a={},i=gt(e),n=[];return T(i,function(o){var s=t._getStoreDimIndex(o);a[s]=e[o],n.push(s)}),this._store=this._store.selectRange(a),this},r.prototype.mapArray=function(e,t,a){"use strict";$(e)&&(a=t,t=e,e=[]),a=a||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},a),i},r.prototype.map=function(e,t,a,i){"use strict";var n=a||i||this,o=No(ap(e),this._getStoreDimIndex,this),s=ip(this);return s._store=this._store.map(o,n?Z(t,n):t),s},r.prototype.modify=function(e,t,a,i){var n=this,o=a||i||this,s=No(ap(e),this._getStoreDimIndex,this);this._store.modify(s,o?Z(t,o):t)},r.prototype.downSample=function(e,t,a,i){var n=ip(this);return n._store=this._store.downSample(this._getStoreDimIndex(e),t,a,i),n},r.prototype.minmaxDownSample=function(e,t){var a=ip(this);return a._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),a},r.prototype.lttbDownSample=function(e,t){var a=ip(this);return a._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),a},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,a=this.getRawDataItem(e);return new Mt(a,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new gr(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(a){return gm(e,a)},function(a){return gm(t,a)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},ep(e)?O(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var a=this._itemVisuals[e],i=a&&a[t];return i==null?this.getVisual(t):i},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,i=a[e];i||(i=a[e]={});var n=i[t];return n==null&&(n=this.getVisual(t),z(n)?n=n.slice():ep(n)&&(n=O({},n)),i[t]=n),n},r.prototype.setItemVisual=function(e,t,a){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,ep(t)?O(i,t):i[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){ep(e)?O(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,a){this._itemLayouts[e]=a?O(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;xf(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){T(this._graphicEls,function(a,i){a&&e&&e.call(t,a,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:No(this.dimensions,this._getDimInfo,this),this.hostModel)),Vb(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];$(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=a.apply(this,arguments);return t.apply(this,[i].concat(Ih(arguments)))})},r.internalField=(function(){Ok=function(e){var t=e._invertedIndicesMap;T(t,function(a,i){var n=e._dimInfos[i],o=n.ordinalMeta,s=e._store;if(o){a=t[i]=new W8(o.categories.length);for(var l=0;l<a.length;l++)a[l]=Nk;for(var l=0;l<s.count();l++)a[s.get(n.storeDimIndex,l)]=l}})},rp=function(e,t,a){return ve(e._getCategory(t,a),null)},gm=function(e,t){var a=e._idList[t];return a==null&&e._idDimIdx!=null&&(a=rp(e,e._idDimIdx,t)),a==null&&(a=Y8+t),a},ap=function(e){return z(e)||(e=e!=null?[e]:[]),e},ip=function(e){var t=new r(e._schema?e._schema:No(e.dimensions,e._getDimInfo,e),e.hostModel);return Vb(t,e),t},Vb=function(e,t){T(Z8.concat(t.__wrappedMethods||[]),function(a){t.hasOwnProperty(a)&&(e[a]=t[a])}),e.__wrappedMethods=t.__wrappedMethods,T(X8,function(a){e[a]=tt(t[a])}),e._calculationInfo=O({},t._calculationInfo)},Bb=function(e,t){var a=e._nameList,i=e._idList,n=e._nameDimIdx,o=e._idDimIdx,s=a[t],l=i[t];if(s==null&&n!=null&&(a[t]=s=rp(e,n,t)),l==null&&o!=null&&(i[t]=l=rp(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),i[t]=l}}})(),r})(),we=q8;function Ri(r,e){Mu(r)||(r=Eu(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],i=q(),n=[],o=$8(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&zb(o),l=a===r.dimensionsDefine,u=l?Ob(r):Nb(a),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=q(c),p=new Q_(o),h=0;h<p.length;h++)p[h]=-1;function d(C){var M=p[C];if(M<0){var E=a[C],L=et(E)?E:{name:E},A=new Nu,P=L.name;P!=null&&u.get(P)!=null&&(A.name=A.displayName=P),L.type!=null&&(A.type=L.type),L.displayName!=null&&(A.displayName=L.displayName);var R=n.length;return p[C]=R,A.storeDimIndex=C,n.push(A),A}return n[M]}if(!s)for(var h=0;h<o;h++)d(h);f.each(function(C,M){var E=Ft(C).slice();if(E.length===1&&!W(E[0])&&E[0]<0){f.set(M,!1);return}var L=f.set(M,[]);T(E,function(A,P){var R=W(A)?u.get(A):A;R!=null&&R<o&&(L[P]=R,m(d(R),M,P))})});var v=0;T(t,function(C){var M,E,L,A;if(W(C))M=C,A={};else{A=C,M=A.name;var P=A.ordinalMeta;A.ordinalMeta=null,A=O({},A),A.ordinalMeta=P,E=A.dimsDef,L=A.otherDims,A.name=A.coordDim=A.coordDimIndex=A.dimsDef=A.otherDims=null}var R=f.get(M);if(R!==!1){if(R=Ft(R),!R.length)for(var k=0;k<(E&&E.length||1);k++){for(;v<o&&d(v).coordDim!=null;)v++;v<o&&R.push(v++)}T(R,function(B,U){var F=d(B);if(l&&A.type!=null&&(F.type=A.type),m(J(F,A),M,U),F.name==null&&E){var H=E[U];!et(H)&&(H={name:H}),F.name=F.displayName=H.name,F.defaultTooltip=H.defaultTooltip}L&&J(F.otherDims,L)})}});function m(C,M,E){Ev.get(M)!=null?C.otherDims[M]=E:(C.coordDim=M,C.coordDimIndex=E,i.set(M,!0))}var g=e.generateCoord,y=e.generateCoordCount,x=y!=null;y=g?y||1:0;var _=g||"value";function b(C){C.name==null&&(C.name=C.coordDim)}if(s)T(n,function(C){b(C)}),n.sort(function(C,M){return C.storeDimIndex-M.storeDimIndex});else for(var S=0;S<o;S++){var w=d(S),D=w.coordDim;D==null&&(w.coordDim=K8(_,i,x),w.coordDimIndex=0,(!g||y<=0)&&(w.isExtraCoord=!0),y--),b(w),w.type==null&&(Iv(r,S)===rr.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return j8(n),new Rb({source:r,dimensions:n,fullDimensionCount:o,dimensionOmitted:s})}function j8(r){for(var e=q(),t=0;t<r.length;t++){var a=r[t],i=a.name,n=e.get(i)||0;n>0&&(a.name=i+(n-1)),n++,e.set(i,n)}}function $8(r,e,t,a){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return T(e,function(n){var o;et(n)&&(o=n.dimsDef)&&(i=Math.max(i,o.length))}),i}function K8(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var J8=(function(){function r(e){this.coordSysDims=[],this.axisMap=q(),this.categoryAxisMap=q(),this.coordSysName=e}return r})();function zk(r){var e=r.get("coordinateSystem"),t=new J8(e),a=Q8[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var Q8={cartesian2d:function(r,e,t,a){var i=r.getReferringComponents("xAxis",Yt).models[0],n=r.getReferringComponents("yAxis",Yt).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",n),Ou(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),Ou(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var i=r.getReferringComponents("singleAxis",Yt).models[0];e.coordSysDims=["single"],t.set("single",i),Ou(i)&&(a.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var i=r.getReferringComponents("polar",Yt).models[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",n),t.set("angle",o),Ou(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),Ou(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var i=r.ecModel,n=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();T(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Ou(u)&&(a.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,a){var i=r.getReferringComponents("matrix",Yt).models[0];e.coordSysDims=["x","y"];var n=i.getDimensionModel("x"),o=i.getDimensionModel("y");t.set("x",n),t.set("y",o),a.set("x",n),a.set("y",o)}};function Ou(r){return r.get("type")==="category"}function Vk(r,e,t){t=t||{};var a=t.byIndex,i=t.stackedCoordDimension,n,o,s;tZ(e)?n=e:(o=e.schema,n=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,p;if(T(n,function(y,x){W(y)&&(n[x]=y={name:y}),l&&!y.isExtraCoord&&(!a&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!a&&!u&&(a=!0),c){f="__\0ecstackresult_"+r.id,p="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,d=c.type,v=0;T(n,function(y){y.coordDim===h&&v++});var m={name:f,coordDim:h,coordDimIndex:v,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},g={name:p,coordDim:p,coordDimIndex:v+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(p,d),g.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(m),o.appendCalculationDimension(g)):(n.push(m),n.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:p,stackResultDimension:f}}function tZ(r){return!mm(r.schema)}function Ca(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function ym(r,e){return Ca(r,e)?r.getCalculationInfo("stackResultDimension"):e}function eZ(r,e){var t=r.get("coordinateSystem"),a=Fn.get(t),i;return e&&e.coordSysDims&&(i=V(e.coordSysDims,function(n){var o={name:n},s=e.axisMap.get(n);if(s){var l=s.get("type");o.type=hl(l)}return o})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),i}function rZ(r,e,t){var a,i;return t&&T(r,function(n,o){var s=n.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),n.ordinalMeta=l.getOrdinalMeta(),e&&(n.createInvertedIndices=!0)),n.otherDims.itemName!=null&&(i=!0)}),!i&&a!=null&&(r[a].otherDims.itemName=0),a}function aZ(r,e,t){t=t||{};var a=e.getSourceManager(),i,n=!1;r?(n=!0,i=Eu(r)):(i=a.getSource(),n=i.sourceFormat===er);var o=zk(e),s=eZ(e,o),l=t.useEncodeDefaulter,u=$(l)?l:l?ut(Av,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!n},f=Ri(i,c),p=rZ(f.dimensions,t.createInvertedIndices,o),h=n?null:a.getSharedDataStore(f),d=Vk(e,{schema:f,store:h}),v=new we(f,e);v.setCalculationInfo(d);var m=p!=null&&iZ(i)?function(g,y,x,_){return _===p?x:this.defaultDimValueGetter(g,y,x,_)}:null;return v.hasItemOption=!1,v.initData(n?i:h,null,m),v}function iZ(r){if(r.sourceFormat===er){var e=nZ(r.data||[]);return!z(bi(e))}}function nZ(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var lr=aZ;function np(r){return r.type==="interval"||r.type==="log"}function Hk(r,e,t,a,i){var n={},o=n.interval=xd(e/t,!0);a!=null&&o<a&&(o=n.interval=a),i!=null&&o>i&&(o=n.interval=i);var s=n.intervalPrecision=Oo(o),l=n.niceTickExtent=[oe(Math.ceil(r[0]/o)*o,s),oe(Math.floor(r[1]/o)*o,s)];return oZ(l,r),n}function xm(r){var e=Math.pow(10,yd(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,oe(t*e)}function Oo(r){return kr(r)+2}function Bk(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function oZ(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Bk(r,0,e),Bk(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function zu(r,e){return r>=e[0]&&r<=e[1]}var Gk=(function(){function r(){this.normalize=Uk,this.scale=Fk}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=Z(e.normalize,e),this.scale=Z(e.scale,e)):(this.normalize=Uk,this.scale=Fk)},r})();function Uk(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Fk(r,e){return r*(e[1]-e[0])+e[0]}function op(r,e,t){var a=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/a,Math.log(t?e[1]:Math.max(0,e[1]))/a]}var Wk=(function(){function r(e){this._calculator=new Gk,this._setting=e||{},this._extent=[1/0,-1/0];var t=me();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(e){var t=me();t&&this._innerSetBreak(t.parseAxisBreakOption(e,Z(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},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})();xo(Wk);var ri=Wk;var sZ=0,lZ=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++sZ,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,a=t.data,i=a&&V(a,uZ);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!W(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,i.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=q(this.categories))},r})();function uZ(r){return et(r)&&r.value!=null?r.value:r+""}var zo=lZ;var Yk=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var i=a.getSetting("ordinalMeta");return i||(i=new zo({})),z(i)&&(i=new zo({categories:V(i,function(n){return et(n)?n.value:n})})),a._ordinalMeta=i,a._extent=a.getSetting("extent")||[0,i.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:W(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return zu(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,i=a[0];i<=a[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o<l;++o){var u=a[o];i[o]=u,n[u]=o}for(var c=0;o<s;++o){for(;n[c]!=null;)c++;i.push(c),n[c]=o}},e.prototype._getTickNumber=function(t){var a=this._ticksByOrdinalNumber;return a&&t>=0&&t<a.length?a[t]:t},e.prototype.getRawOrdinalNumber=function(t){var a=this._ordinalNumbersByTick;return a&&t>=0&&t<a.length?a[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var a=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[a];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},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})(ri);ri.registerClass(Yk);var Xn=Yk;var Vo=oe,Zk=(function(r){I(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==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return zu(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Oo(t)},e.prototype.getTicks=function(t){t=t||{};var a=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,s=me(),l=[];if(!a)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<n[0]&&(t.expandToNicedExtent?l.push({value:Vo(n[0]-a,o)}):l.push({value:i[0]}));for(var c=function(d,v){return Math.round((v-d)/a)},f=n[0];f<=n[1];){if(l.push({value:f}),f=Vo(f+a,o),this._brkCtx){var p=this._brkCtx.calcNiceTickMultiple(f,c);p>=0&&(f=Vo(f+p*a,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:n[1];return i[1]>h&&(t.expandToNicedExtent?l.push({value:Vo(h+a,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(d){return d.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks({expandToNicedExtent:!0}),i=[],n=this.getExtent(),o=1;o<a.length;o++){var s=a[o],l=a[o-1];if(!(l.break||s.break)){for(var u=0,c=[],f=s.value-l.value,p=f/t,h=Oo(p);u<t-1;){var d=Vo(l.value+(u+1)*p,h);d>n[0]&&d<n[1]&&c.push(d),u++}var v=me();v&&v.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(m){return m},this._interval,n),i.push(c)}}return i},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,a){if(t==null)return"";var i=a&&a.precision;i==null?i=kr(t.value)||0:i==="auto"&&(i=this._intervalPrecision);var n=Vo(t.value,i,!0);return I_(n)},e.prototype.calcNiceTicks=function(t,a,i){t=t||5;var n=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,n.reverse(),this._innerSetExtent(n[0],n[1]),n=this._extent.slice());var s=Hk(n,o,t,a,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var a=this._extent.slice();if(a[0]===a[1])if(a[0]!==0){var i=Math.abs(a[0]);t.fixMax||(a[1]+=i/2),a[0]-=i/2}else a[1]=1;var n=a[1]-a[0];isFinite(n)||(a[0]=0,a[1]=1),this._innerSetExtent(a[0],a[1]),a=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval,s=this._intervalPrecision;t.fixMin||(a[0]=Vo(Math.floor(a[0]/o)*o,s)),t.fixMax||(a[1]=Vo(Math.ceil(a[1]/o)*o,s)),this._innerSetExtent(a[0],a[1])},e.prototype.setNiceExtent=function(t,a){this._niceExtent=[t,a]},e.type="interval",e})(ri);ri.registerClass(Zk);var pa=Zk;var Xk=typeof Float32Array!="undefined",cZ=Xk?Float32Array:Array;function Ur(r){return z(r)?Xk?new Float32Array(r):r:new cZ(r)}var Fb="__ec_stack_";function Hb(r){return r.get("stack")||Fb+r.seriesIndex}function Gb(r){return r.dim+r.index}function qk(r){var e=[],t=r.axis,a="axis0";if(t.type==="category"){for(var i=t.getBandWidth(),n=0;n<r.count;n++)e.push(J({bandWidth:i,axisKey:a,stackId:Fb+n},r));for(var o=jk(e),s=[],n=0;n<r.count;n++){var l=o[a][Fb+n];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function Wb(r,e){var t=[];return e.eachSeriesByType(r,function(a){Kk(a)&&t.push(a)}),t}function fZ(r){var e={};T(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),p=c.dim+"_"+c.index,h=f.getDimensionIndex(f.mapDimension(c.dim)),d=f.getStore(),v=0,m=d.count();v<m;++v){var g=d.get(h,v);e[p]?e[p].push(g):e[p]=[g]}});var t={};for(var a in e)if(e.hasOwnProperty(a)){var i=e[a];if(i){i.sort(function(l,u){return l-u});for(var n=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(n=n===null?s:Math.min(n,s))}t[a]=n}}return t}function Yb(r){var e=fZ(r),t=[];return T(r,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],c=Math.abs(o[1]-o[0]),f=n.scale.getExtent(),p=Math.abs(f[1]-f[0]);s=u?c/p*u:c}else{var h=a.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=j(a.get("barWidth"),s),v=j(a.get("barMaxWidth"),s),m=j(a.get("barMinWidth")||(Jk(a)?.5:1),s),g=a.get("barGap"),y=a.get("barCategoryGap"),x=a.get("defaultBarGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:v,barMinWidth:m,barGap:g,barCategoryGap:y,defaultBarGap:x,axisKey:Gb(n),stackId:Hb(a)})}),jk(t)}function jk(r){var e={};T(r,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;e[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var p=a.barMinWidth;p&&(l[u].minWidth=p);var h=a.barGap;h!=null&&(s.gap=h);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return T(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=gt(n).length;s=Math.max(35-l*4,15)+"%"}var u=j(s,o),c=j(a.gap,1),f=a.remainedWidth,p=a.autoWidthCount,h=(f-u)/(p+(p-1)*c);h=Math.max(h,0),T(n,function(g){var y=g.maxWidth,x=g.minWidth;if(g.width){var _=g.width;y&&(_=Math.min(_,y)),x&&(_=Math.max(_,x)),g.width=_,f-=_+c*_,p--}else{var _=h;y&&y<_&&(_=Math.min(y,f)),x&&x>_&&(_=x),_!==h&&(g.width=_,f-=_+c*_,p--)}}),h=(f-u)/(p+(p-1)*c),h=Math.max(h,0);var d=0,v;T(n,function(g,y){g.width||(g.width=h),v=g,d+=g.width*(1+c)}),v&&(d-=v.width*c);var m=-d/2;T(n,function(g,y){t[i][y]=t[i][y]||{bandWidth:o,offset:m,width:g.width},m+=g.width*(1+c)})}),t}function $k(r,e,t){if(r&&e){var a=r[Gb(e)];return a!=null&&t!=null?a[Hb(t)]:a}}function _m(r,e){var t=Wb(r,e),a=Yb(t);T(t,function(i){var n=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Hb(i),u=a[Gb(s)][l],c=u.offset,f=u.width;n.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function bm(r){return{seriesType:r,plan:Ta(),reset:function(e){if(Kk(e)){var t=e.getData(),a=e.coordinateSystem,i=a.getBaseAxis(),n=a.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(n.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(n.dim),c=t.getCalculationInfo("stackResultDimension"),f=Ca(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),p=n.isHorizontal(),h=pZ(i,n),d=Jk(e),v=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),g=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(x,_){for(var b=x.count,S=d&&Ur(b*3),w=d&&l&&Ur(b*3),D=d&&Ur(b),C=a.master.getRect(),M=p?C.width:C.height,E,L=_.getStore(),A=0;(E=x.next())!=null;){var P=L.get(f?m:o,E),R=L.get(s,E),k=h,B=void 0;f&&(B=+P-L.get(o,E));var U=void 0,F=void 0,H=void 0,G=void 0;if(p){var Y=a.dataToPoint([P,R]);if(f){var rt=a.dataToPoint([B,R]);k=rt[0]}U=k,F=Y[1]+y,H=Y[0]-k,G=g,Math.abs(H)<v&&(H=(H<0?-1:1)*v)}else{var Y=a.dataToPoint([R,P]);if(f){var rt=a.dataToPoint([R,B]);k=rt[1]}U=Y[0]+y,F=k,H=g,G=Y[1]-k,Math.abs(G)<v&&(G=(G<=0?-1:1)*v)}d?(S[A]=U,S[A+1]=F,S[A+2]=p?H:G,w&&(w[A]=p?C.x:U,w[A+1]=p?F:C.y,w[A+2]=M),D[E]=E):_.setItemLayout(E,{x:U,y:F,width:H,height:G}),A+=3}d&&_.setLayout({largePoints:S,largeDataIndices:D,largeBackgroundPoints:w,valueAxisHorizontal:p})}}}}}}function Kk(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function Jk(r){return r.pipelineContext&&r.pipelineContext.large}function pZ(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 hZ=function(r,e,t,a){for(;t<a;){var i=t+a>>>1;r[i][1]<e?t=i+1:a=i}return t},t2=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="time",a}return e.prototype.getLabel=function(t){var a=this.getSetting("useUTC");return el(t.value,S_[nI(wu(this._minLevelUnit))]||S_.second,a,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,a,i){var n=this.getSetting("useUTC"),o=this.getSetting("locale");return oI(t,a,i,o,n)},e.prototype.getTicks=function(t){t=t||{};var a=this._interval,i=this._extent,n=me(),o=[];if(!a)return o;var s=this.getSetting("useUTC");if(n&&t.breakTicks==="only_break")return me().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=rl(i[1],s);o.push({value:i[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=_Z(this._minLevelUnit,this._approxInterval,s,i,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=rl(i[1],s);o.push({value:i[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var f=this.getSetting("useUTC"),p=sa.length-1,h=0;return T(o,function(d){p=Math.min(p,lt(sa,d.time.upperTimeUnit)),h=Math.max(h,d.time.level)}),n&&me().pruneTicksByBreak(t.pruneByBreak,o,this._brkCtx.breaks,function(d){return d.value},this._approxInterval,this._extent),n&&t.breakTicks!=="none"&&me().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(d){for(var v=Math.max(lt(sa,rl(d.vmin,f)),lt(sa,rl(d.vmax,f))),m=0,g=0;g<sa.length;g++)if(!e2(sa[g],d.vmin,d.vmax,f)){m=g;break}var y=Math.min(m,p),x=Math.max(y,v);return{level:h,lowerTimeUnit:sa[x],upperTimeUnit:sa[y]}}),o},e.prototype.calcNiceExtent=function(t){var a=this.getExtent();if(a[0]===a[1]&&(a[0]-=Sa,a[1]+=Sa),a[1]===-1/0&&a[0]===1/0){var i=new Date;a[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),a[0]=a[1]-Sa}this._innerSetExtent(a[0],a[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,a,i){t=t||10;var n=this._getExtentSpanWithBreaks();this._approxInterval=n/t,a!=null&&this._approxInterval<a&&(this._approxInterval=a),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=Sm.length,s=Math.min(hZ(Sm,this._approxInterval,0,o),o-1);this._interval=Sm[s][1],this._intervalPrecision=Oo(this._interval),this._minLevelUnit=Sm[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return yt(t)?t:+Fa(t)},e.prototype.contain=function(t){return zu(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(pa),Sm=[["second",uv],["minute",cv],["hour",Su],["quarter-day",Su*6],["half-day",Su*12],["day",Sa*1.2],["half-week",Sa*3.5],["week",Sa*7],["month",Sa*31],["quarter",Sa*95],["half-year",b_/2],["year",b_]];function e2(r,e,t,a){return fv(new Date(e),r,a).getTime()===fv(new Date(t),r,a).getTime()}function dZ(r,e){return r/=Sa,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function vZ(r){var e=30*Sa;return r/=e,r>6?6:r>3?3:r>2?2:1}function mZ(r){return r/=Su,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Qk(r,e){return r/=e?cv:uv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function gZ(r){return xd(r,!0)}function yZ(r,e,t){var a=Math.max(0,lt(sa,e)-1);return fv(new Date(r),sa[a],t).getTime()}function xZ(r,e){var t=new Date(0);t[r](1);var a=t.getTime();t[r](1+e);var i=t.getTime()-a;return function(n,o){return Math.max(0,Math.round((o-n)/i))}}function _Z(r,e,t,a,i,n){var o=1e4,s=rI,l=0;function u(A,P,R,k,B,U,F){for(var H=xZ(B,A),G=P,Y=new Date(G);G<R&&G<=a[1]&&(F.push({value:G}),!(l++>o));)if(Y[B](Y[k]()+A),G=Y.getTime(),n){var rt=n.calcNiceTickMultiple(G,H);rt>0&&(Y[B](Y[k]()+rt*A),G=Y.getTime())}F.push({value:G,notAdd:!0})}function c(A,P,R){var k=[],B=!P.length;if(!e2(wu(A),a[0],a[1],t)){B&&(P=[{value:yZ(a[0],A,t)},{value:a[1]}]);for(var U=0;U<P.length-1;U++){var F=P[U].value,H=P[U+1].value;if(F!==H){var G=void 0,Y=void 0,rt=void 0,st=!1;switch(A){case"year":G=Math.max(1,Math.round(e/Sa/365)),Y=w_(t),rt=sI(t);break;case"half-year":case"quarter":case"month":G=vZ(e),Y=pv(t),rt=T_(t);break;case"week":case"half-week":case"day":G=dZ(e,31),Y=hv(t),rt=D_(t),st=!0;break;case"half-day":case"quarter-day":case"hour":G=mZ(e),Y=dv(t),rt=C_(t);break;case"minute":G=Qk(e,!0),Y=vv(t),rt=M_(t);break;case"second":G=Qk(e,!1),Y=mv(t),rt=E_(t);break;case"millisecond":G=gZ(e),Y=gv(t),rt=A_(t);break}H>=a[0]&&F<=a[1]&&u(G,F,H,Y,rt,st,k),A==="year"&&R.length>1&&U===0&&R.unshift({value:R[0].value-G})}}for(var U=0;U<k.length;U++)R.push(k[U])}}for(var f=[],p=[],h=0,d=0,v=0;v<s.length;++v){var m=wu(s[v]);if(iI(s[v])){c(s[v],f[f.length-1]||[],p);var g=s[v+1]?wu(s[v+1]):null;if(m!==g){if(p.length){d=h,p.sort(function(A,P){return A.value-P.value});for(var y=[],x=0;x<p.length;++x){var _=p[x].value;(x===0||p[x-1].value!==_)&&(y.push(p[x]),_>=a[0]&&_<=a[1]&&h++)}var b=i/e;if(h>b*1.5&&d>b/1.5||(f.push(y),h>b||r===s[v]))break}p=[]}}}for(var S=At(V(f,function(A){return At(A,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(A){return A.length>0}),w=[],D=S.length-1,v=0;v<S.length;++v)for(var C=S[v],M=0;M<C.length;++M){var E=rl(C[M].value,t);w.push({value:C[M].value,time:{level:D-v,upperTimeUnit:E,lowerTimeUnit:E}})}w.sort(function(A,P){return A.value-P.value});for(var L=[],v=0;v<w.length;++v)(v===0||w[v].value!==w[v-1].value)&&L.push(w[v]);return L}ri.registerClass(t2);var wm=t2;var Zb=oe,bZ=Math.floor,SZ=Math.ceil,Tm=Math.pow,Dm=Math.log,r2=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new pa,t}return e.prototype.getTicks=function(t){t=t||{};var a=this._extent.slice(),i=this._originalScale.getExtent(),n=r.prototype.getTicks.call(this,t),o=this.base,s=this._originalScale._innerGetBreaks(),l=me();return V(n,function(u){var c=u.value,f=null,p=Tm(o,c);c===a[0]&&this._fixMin?f=i[0]:c===a[1]&&this._fixMax&&(f=i[1]);var h;if(l){var d=l.getTicksLogTransformBreak(u,o,s,Cm);h=d.vBreak,f==null&&(f=d.brkRoundingCriterion)}return f!=null&&(p=Cm(p,f)),{value:p,break:h}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,a){this._originalScale.setExtent(t,a);var i=op(this.base,[t,a]);r.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var t=this.base,a=r.prototype.getExtent.call(this);a[0]=Tm(t,a[0]),a[1]=Tm(t,a[1]);var i=this._originalScale.getExtent();return this._fixMin&&(a[0]=Cm(a[0],i[0])),this._fixMax&&(a[1]=Cm(a[1],i[1])),a},e.prototype.unionExtentFromData=function(t,a){this._originalScale.unionExtentFromData(t,a);var i=op(this.base,t.getApproximateExtent(a),!0);this._innerUnionExtent(i)},e.prototype.calcNiceTicks=function(t){t=t||10;var a=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var n=OE(i),o=t/i*n;for(o<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var s=[Zb(SZ(a[0]/n)*n),Zb(bZ(a[1]/n)*n)];this._interval=n,this._intervalPrecision=Oo(n),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Dm(t)/Dm(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Dm(t)/Dm(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),Tm(this.base,t)},e.prototype.setBreaksFromOption=function(t){var a=me();if(a){var i=a.logarithmicParseBreaksFromOption(t,this.base,Z(this.parse,this)),n=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(n),this._innerSetBreak(o)}},e.type="log",e})(pa);function Cm(r,e){return Zb(r,kr(e))}ri.registerClass(r2);var a2=r2;var wZ=(function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]<a[0]&&(a=[NaN,NaN]),this._dataMin=a[0],this._dataMax=a[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var n=t.get("min",!0);n==null&&(n=t.get("startValue",!0));var o=this._modelMinRaw=n;$(o)?this._modelMinNum=Mm(e,o({min:a[0],max:a[1]})):o!=="dataMin"&&(this._modelMinNum=Mm(e,o));var s=this._modelMaxRaw=t.get("max",!0);if($(s)?this._modelMaxNum=Mm(e,s({min:a[0],max:a[1]})):s!=="dataMax"&&(this._modelMaxNum=Mm(e,s)),i)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=z(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[hr(u[0],1),hr(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,a=this._dataMax,i=this._axisDataLen,n=this._boundaryGapInner,o=e?null:a-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?a:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?i?0:NaN:t-n[0]*o),l==null&&(l=e?i?i-1:NaN:a+n[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Me(s)||Me(l)||e&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var p=this._determinedMin,h=this._determinedMax;return p!=null&&(s=p,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[DZ[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=TZ[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r})();var TZ={min:"_determinedMin",max:"_determinedMax"},DZ={min:"_dataMin",max:"_dataMax"};function Em(r,e,t){var a=r.rawExtentInfo;return a||(a=new wZ(r,e,t),r.rawExtentInfo=a,a)}function Mm(r,e){return e==null?null:Me(e)?NaN:r.parse(e)}function Xb(r,e){var t=r.type,a=Em(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var i=a.min,n=a.max,o=e.ecModel;if(o&&t==="time"){var s=Wb("bar",o),l=!1;if(T(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=Yb(s),c=CZ(i,n,e,u);i=c.min,n=c.max}}return{extent:[i,n],fixMin:a.minFixed,fixMax:a.maxFixed}}function CZ(r,e,t,a){var i=t.axis.getExtent(),n=Math.abs(i[1]-i[0]),o=$k(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;T(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;T(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/n,p=c/f-c;return e+=p*(l/u),r-=p*(s/u),{min:r,max:e}}function fn(r,e){var t=e,a=Xb(r,t),i=a.extent,n=t.get("splitNumber");r instanceof a2&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(qb(t)),r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:n,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Bo(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Xn({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new wm({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ri.getClass(e)||pa)}}function i2(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function Uo(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=aI(e);return function(i,n){return r.scale.getFormattedLabel(i,n,t)}}else{if(W(e))return function(i){var n=r.scale.getLabel(i),o=e.replace("{value}",n!=null?n:"");return o};if($(e)){if(r.type==="category")return function(i,n){return e(Vu(r,i),i.value-r.scale.getExtent()[0],null)};var a=me();return function(i,n){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,i.break)),e(Vu(r,i),n,o)}}else return function(i){return r.scale.getLabel(i)}}}function Vu(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function Am(r){var e=r.get("interval");return e==null?"auto":e}function Lm(r){return r.type==="category"&&Am(r.getLabelModel())===0}function Bu(r,e){var t={};return T(r.mapDimensionsAll(e),function(a){t[ym(r,a)]=!0}),gt(t)}function n2(r,e,t){e&&T(Bu(e,t),function(a){var i=e.getApproximateExtent(a);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}function Fo(r){return r==="middle"||r==="center"}function dl(r){return r.getShallow("show")}function qb(r){var e=r.get("breaks",!0);if(e!=null)return!me()||!MZ(r.axis)?void 0:e}function MZ(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var pn=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})();var EZ=1e-8;function o2(r,e){return Math.abs(r-e)<EZ}function qn(r,e,t){var a=0,i=r[0];if(!i)return!1;for(var n=1;n<r.length;n++){var o=r[n];a+=Wa(i[0],i[1],o[0],o[1],e,t),i=o}var s=r[0];return(!o2(i[0],s[0])||!o2(i[1],s[1]))&&(a+=Wa(i[0],i[1],s[0],s[1],e,t)),a!==0}var AZ=[];function jb(r,e){for(var t=0;t<r.length;t++)ce(r[t],r[t],e)}function l2(r,e,t,a){for(var i=0;i<r.length;i++){var n=r[i];a&&(n=a.project(n)),n&&isFinite(n[0])&&isFinite(n[1])&&(ga(e,e,n),ya(t,t,n))}}function LZ(r){for(var e=0,t=0,a=0,i=r.length,n=r[i-1][0],o=r[i-1][1],s=0;s<i;s++){var l=r[s][0],u=r[s][1],c=n*u-l*o;e+=c,t+=(n+l)*c,a+=(o+u)*c,n=l,o=u}return e?[t/e/3,a/e/3,e]:[r[0][0]||0,r[0][1]||0]}var u2=(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})();var $b=(function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r})();var Kb=(function(){function r(e){this.type="linestring",this.points=e}return r})();var Pm=(function(r){I(e,r);function e(t,a,i){var n=r.call(this,t)||this;return n.type="geoJSON",n.geometries=a,n._center=i&&[i[0],i[1]],n}return e.prototype.calcCenter=function(){for(var t=this.geometries,a,i=0,n=0;n<t.length;n++){var o=t[n],s=o.exterior,l=s&&s.length;l>i&&(a=o,i=l)}if(a)return LZ(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var i=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return T(o,function(s){s.type==="polygon"?l2(s.exterior,i,n,t):T(s.points,function(l){l2(l,i,n,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),a=new at(i[0],i[1],n[0]-i[0],n[1]-i[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),i=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++){var s=i[n];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(qn(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(qn(u[c],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,a,i,n){var o=this.getBoundingRect(),s=o.width/o.height;i?n||(n=i/s):i=s*n;for(var l=new at(t,a,i,n),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var p=c[f];p.type==="polygon"?(jb(p.exterior,u),T(p.interiors,function(h){jb(h,u)})):T(p.points,function(h){jb(h,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 a=new e(t,this.geometries,this._center);return a._rect=this._rect,a.transformTo=null,a},e})(u2);var c2=(function(r){I(e,r);function e(t,a){var i=r.call(this,t)||this;return i.type="geoSVG",i._elOnlyForCalculate=a,i}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,a=t.getBoundingRect(),i=[a.x+a.width/2,a.y+a.height/2],n=uo(AZ),o=t;o&&!o.isGeoSVGGraphicRoot;)fr(n,o.getLocalTransform(),n),o=o.parent;return Fe(n,n),ce(i,i,n),i},e})(u2);function IZ(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var a=e.features;return T(a,function(i){var n=i.geometry,o=n.encodeOffsets,s=n.coordinates;if(o)switch(n.type){case"LineString":n.coordinates=f2(s,o,t);break;case"Polygon":Jb(s,o,t);break;case"MultiLineString":Jb(s,o,t);break;case"MultiPolygon":T(s,function(l,u){return Jb(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Jb(r,e,t){for(var a=0;a<r.length;a++)r[a]=f2(r[a],e[a],t)}function f2(r,e,t){for(var a=[],i=e[0],n=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+=i,l+=n,i=s,n=l,a.push([s/t,l/t])}return a}function Qb(r,e){return r=IZ(r),V(At(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,i=t.geometry,n=[];switch(i.type){case"Polygon":var o=i.coordinates;n.push(new $b(o[0],o.slice(1)));break;case"MultiPolygon":T(i.coordinates,function(l){l[0]&&n.push(new $b(l[0],l.slice(1)))});break;case"LineString":n.push(new Kb([i.coordinates]));break;case"MultiLineString":n.push(new Kb(i.coordinates))}var s=new Pm(a[e||"name"],n,a.cp);return s.properties=a,s})}var PZ=ot(),sp=ot(),ha={estimate:1,determine:2};function Uu(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function p2(r,e){var t=V(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function h2(r,e){var t=r.getLabelModel().get("customValues");if(t){var a=Uo(r),i=r.scale.getExtent(),n=p2(r,t),o=At(n,function(s){return s>=i[0]&&s<=i[1]});return{labels:V(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?kZ(r,e):NZ(r)}function d2(r,e,t){var a=r.getTickModel().get("customValues");if(a){var i=r.scale.getExtent(),n=p2(r,a);return{ticks:At(n,function(o){return o>=i[0]&&o<=i[1]})}}return r.type==="category"?RZ(r,e):{ticks:V(r.scale.getTicks(t),function(o){return o.value})}}function kZ(r,e){var t=r.getLabelModel(),a=v2(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:a}function v2(r,e,t){var a=zZ(r),i=Am(e),n=t.kind===ha.estimate;if(!n){var o=g2(a,i);if(o)return o}var s,l;$(i)?s=b2(r,i):(l=i==="auto"?VZ(r,t):i,s=_2(r,l));var u={labels:s,labelCategoryInterval:l};return n?t.out.noPxChangeTryDetermine.push(function(){return tS(a,i,u),!0}):tS(a,i,u),u}function RZ(r,e){var t=OZ(r),a=Am(e),i=g2(t,a);if(i)return i;var n,o;if((!e.get("show")||r.scale.isBlank())&&(n=[]),$(a))n=b2(r,a,!0);else if(a==="auto"){var s=v2(r,r.getLabelModel(),Uu(ha.determine));o=s.labelCategoryInterval,n=V(s.labels,function(l){return l.tickValue})}else o=a,n=_2(r,o,!0);return tS(t,a,{ticks:n,tickCategoryInterval:o})}function NZ(r){var e=r.scale.getTicks(),t=Uo(r);return{labels:V(e,function(a,i){return{formattedLabel:t(a,i),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var OZ=m2("axisTick"),zZ=m2("axisLabel");function m2(r){return function(t){return sp(t)[r]||(sp(t)[r]={list:[]})}}function g2(r,e){for(var t=0;t<r.list.length;t++)if(r.list[t].key===e)return r.list[t].value}function tS(r,e,t){return r.list.push({key:e,value:t}),t}function VZ(r,e){if(e.kind===ha.estimate){var t=r.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return sp(r).autoInterval=t,!0}),t}var a=sp(r).autoInterval;return a!=null?a:sp(r).autoInterval=r.calculateCategoryInterval(e)}function y2(r,e){var t=e.kind,a=UZ(r),i=Uo(r),n=(a.axisRotate-a.labelRotate)/180*Math.PI,o=r.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],p=r.dataToCoord(f+1)-r.dataToCoord(f),h=Math.abs(p*Math.cos(n)),d=Math.abs(p*Math.sin(n)),v=0,m=0;f<=s[1];f+=u){var g=0,y=0,x=go(i({value:f}),a.font,"center","top");g=x.width*1.3,y=x.height*1.3,v=Math.max(v,g,7),m=Math.max(m,y,7)}var _=v/h,b=m/d;isNaN(_)&&(_=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(_,b)));if(t===ha.estimate)return e.out.noPxChangeTryDetermine.push(Z(BZ,null,r,S,l)),S;var w=x2(r,S,l);return w!=null?w:S}function BZ(r,e,t){return x2(r,e,t)==null}function x2(r,e,t){var a=PZ(r.model),i=r.getExtent(),n=a.lastAutoInterval,o=a.lastTickCount;if(n!=null&&o!=null&&Math.abs(n-e)<=1&&Math.abs(o-t)<=1&&n>e&&a.axisExtent0===i[0]&&a.axisExtent1===i[1])return n;a.lastTickCount=t,a.lastAutoInterval=e,a.axisExtent0=i[0],a.axisExtent1=i[1]}function UZ(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 _2(r,e,t){var a=Uo(r),i=r.scale,n=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Lm(r),p=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;p&&u!==n[0]&&v(n[0]);for(var d=u;d<=n[1];d+=l)v(d);h&&d-l!==n[1]&&v(n[1]);function v(m){var g={value:m};s.push(t?m:{formattedLabel:a(g),rawLabel:i.getLabel(g),tickValue:m,time:void 0,break:void 0})}return s}function b2(r,e,t){var a=r.scale,i=Uo(r),n=[];return T(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&n.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),n}var S2=[0,1],FZ=(function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=a&&e<=i},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return gd(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(a=a.slice(),w2(a,i.count())),zt(e,S2,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(a=a.slice(),w2(a,i.count()));var n=zt(e,a,S2,t);return this.scale.scale(n)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=d2(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=a.ticks,n=V(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return HZ(this,n,o,e.clamp),n},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 a=this.scale.getMinorTicks(t),i=V(a,function(n){return V(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(e){return e=e||Uu(ha.determine),h2(this,e).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(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/a},r.prototype.calculateCategoryInterval=function(e){return e=e||Uu(ha.determine),y2(this,e)},r})();function w2(r,e){var t=r[1]-r[0],a=e,i=t/a/2;r[0]+=i,r[1]-=i}function HZ(r,e,t,a){var i=e.length;if(!r.onBand||t||!i)return;var n=r.getExtent(),o,s;if(i===1)e[0].coord=n[0],e[0].onBand=!0,o=e[1]={coord:n[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;T(e,function(h){h.coord-=u/2,h.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=n[0]>n[1];p(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&p(n[0],e[0].coord)&&e.unshift({coord:n[0],onBand:!0}),p(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&p(o.coord,n[1])&&e.push({coord:n[1],onBand:!0});function p(h,d){return h=oe(h),d=oe(d),f?h>d:h<d}}var ur=FZ;var lp=Math.PI*2,vl=tr.CMD,GZ=["top","right","bottom","left"];function WZ(r,e,t,a,i){var n=t.width,o=t.height;switch(r){case"top":a.set(t.x+n/2,t.y-e),i.set(0,-1);break;case"bottom":a.set(t.x+n/2,t.y+o+e),i.set(0,1);break;case"left":a.set(t.x-e,t.y+o/2),i.set(-1,0);break;case"right":a.set(t.x+n+e,t.y+o/2),i.set(1,0);break}}function YZ(r,e,t,a,i,n,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(a-i)%lp<1e-4)return l[0]=c,l[1]=f,u-t;if(n){var p=a;a=dr(i),i=dr(p)}else a=dr(a),i=dr(i);a>i&&(i+=lp);var h=Math.atan2(s,o);if(h<0&&(h+=lp),h>=a&&h<=i||h+lp>=a&&h+lp<=i)return l[0]=c,l[1]=f,u-t;var d=t*Math.cos(a)+r,v=t*Math.sin(a)+e,m=t*Math.cos(i)+r,g=t*Math.sin(i)+e,y=(d-o)*(d-o)+(v-s)*(v-s),x=(m-o)*(m-o)+(g-s)*(g-s);return y<x?(l[0]=d,l[1]=v,Math.sqrt(y)):(l[0]=m,l[1]=g,Math.sqrt(x))}function km(r,e,t,a,i,n,o,s){var l=i-r,u=n-e,c=t-r,f=a-e,p=Math.sqrt(c*c+f*f);c/=p,f/=p;var h=l*c+u*f,d=h/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var v=o[0]=r+d*c,m=o[1]=e+d*f;return Math.sqrt((v-i)*(v-i)+(m-n)*(m-n))}function T2(r,e,t,a,i,n,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(i,r),s),c=o[1]=Math.min(Math.max(n,e),l);return Math.sqrt((u-i)*(u-i)+(c-n)*(c-n))}var Ni=[];function ZZ(r,e,t){var a=T2(e.x,e.y,e.width,e.height,r.x,r.y,Ni);return t.set(Ni[0],Ni[1]),a}function XZ(r,e,t){for(var a=0,i=0,n=0,o=0,s,l,u=1/0,c=e.data,f=r.x,p=r.y,h=0;h<c.length;){var d=c[h++];h===1&&(a=c[h],i=c[h+1],n=a,o=i);var v=u;switch(d){case vl.M:n=c[h++],o=c[h++],a=n,i=o;break;case vl.L:v=km(a,i,c[h],c[h+1],f,p,Ni,!0),a=c[h++],i=c[h++];break;case vl.C:v=Yh(a,i,c[h++],c[h++],c[h++],c[h++],c[h],c[h+1],f,p,Ni),a=c[h++],i=c[h++];break;case vl.Q:v=Xh(a,i,c[h++],c[h++],c[h],c[h+1],f,p,Ni),a=c[h++],i=c[h++];break;case vl.A:var m=c[h++],g=c[h++],y=c[h++],x=c[h++],_=c[h++],b=c[h++];h+=1;var S=!!(1-c[h++]);s=Math.cos(_)*y+m,l=Math.sin(_)*x+g,h<=1&&(n=s,o=l);var w=(f-m)*x/y+m;v=YZ(m,g,x,_,_+b,S,w,p,Ni),a=Math.cos(_+b)*y+m,i=Math.sin(_+b)*x+g;break;case vl.R:n=a=c[h++],o=i=c[h++];var D=c[h++],C=c[h++];v=T2(n,o,D,C,f,p,Ni);break;case vl.Z:v=km(a,i,n,o,f,p,Ni,!0),a=n,i=o;break}v<u&&(u=v,t.set(Ni[0],Ni[1]))}return u}var Oi=new pt,ge=new pt,ze=new pt,dn=new pt,hn=new pt;function rS(r,e){if(r){var t=r.getTextGuideLine(),a=r.getTextContent();if(a&&t){var i=r.textGuideLineConfig||{},n=[[0,0],[0,0],[0,0]],o=i.candidates||GZ,s=a.getBoundingRect().clone();s.applyTransform(a.getComputedTransform());var l=1/0,u=i.anchor,c=r.getComputedTransform(),f=c&&Fe([],c),p=e.get("length2")||0;u&&ze.copy(u);for(var h=0;h<o.length;h++){var d=o[h];WZ(d,0,s,Oi,dn),pt.scaleAndAdd(ge,Oi,dn,p),ge.transform(f);var v=r.getBoundingRect(),m=u?u.distance(ge):r instanceof ft?XZ(ge,r.path,ze):ZZ(ge,v,ze);m<l&&(l=m,ge.transform(c),ze.transform(c),ze.toArray(n[0]),ge.toArray(n[1]),Oi.toArray(n[2]))}aS(n,e.get("minTurnAngle")),t.setShape({points:n})}}}var Rm=[],Fr=new pt;function aS(r,e){if(e<=180&&e>0){e=e/180*Math.PI,Oi.fromArray(r[0]),ge.fromArray(r[1]),ze.fromArray(r[2]),pt.sub(dn,Oi,ge),pt.sub(hn,ze,ge);var t=dn.len(),a=hn.len();if(!(t<.001||a<.001)){dn.scale(1/t),hn.scale(1/a);var i=dn.dot(hn),n=Math.cos(e);if(n<i){var o=km(ge.x,ge.y,ze.x,ze.y,Oi.x,Oi.y,Rm,!1);Fr.fromArray(Rm),Fr.scaleAndAdd(hn,o/Math.tan(Math.PI-e));var s=ze.x!==ge.x?(Fr.x-ge.x)/(ze.x-ge.x):(Fr.y-ge.y)/(ze.y-ge.y);if(isNaN(s))return;s<0?pt.copy(Fr,ge):s>1&&pt.copy(Fr,ze),Fr.toArray(r[1])}}}}function D2(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Oi.fromArray(r[0]),ge.fromArray(r[1]),ze.fromArray(r[2]),pt.sub(dn,ge,Oi),pt.sub(hn,ze,ge);var a=dn.len(),i=hn.len();if(!(a<.001||i<.001)){dn.scale(1/a),hn.scale(1/i);var n=dn.dot(e),o=Math.cos(t);if(n<o){var s=km(ge.x,ge.y,ze.x,ze.y,Oi.x,Oi.y,Rm,!1);Fr.fromArray(Rm);var l=Math.PI/2,u=Math.acos(hn.dot(e)),c=l+u-t;if(c>=l)pt.copy(Fr,ze);else{Fr.scaleAndAdd(hn,s/Math.tan(Math.PI/2-c));var f=ze.x!==ge.x?(Fr.x-ge.x)/(ze.x-ge.x):(Fr.y-ge.y)/(ze.y-ge.y);if(isNaN(f))return;f<0?pt.copy(Fr,ge):f>1&&pt.copy(Fr,ze)}Fr.toArray(r[1])}}}}function eS(r,e,t,a){var i=t==="normal",n=i?r:r.ensureState(t);n.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();i?r.useStyle(s):n.style=s}function qZ(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var i=Oa(a[0],a[1]),n=Oa(a[1],a[2]);if(!i||!n){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(i,n)*t,s=ql([],a[1],a[0],o/i),l=ql([],a[1],a[2],o/n),u=ql([],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],a[2][0],a[2][1])}else for(var c=1;c<a.length;c++)r.lineTo(a[c][0],a[c][1])}function Fu(r,e,t){var a=r.getTextGuideLine(),i=r.getTextContent();if(!i){a&&r.removeTextGuideLine();return}for(var n=e.normal,o=n.get("show"),s=i.ignore,l=0;l<wo.length;l++){var u=wo[l],c=e[u],f=u==="normal";if(c){var p=c.get("show"),h=f?s:Q(i.states[u]&&i.states[u].ignore,s);if(h||!Q(p,o)){var d=f?a:a&&a.states[u];d&&(d.ignore=!0),a&&eS(a,!0,u,c);continue}a||(a=new he,r.setTextGuideLine(a),!f&&(s||!o)&&eS(a,!0,"normal",e.normal),r.stateProxy&&(a.stateProxy=r.stateProxy)),eS(a,!1,u,c)}}if(a){J(a.style,t),a.style.fill=null;var v=n.get("showAbove"),m=r.textGuideLineConfig=r.textGuideLineConfig||{};m.showAbove=v||!1,a.buildPath=qZ}}function Hu(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},a=0;a<qe.length;a++){var i=qe[a];t[i]=r.getModel([i,e])}return t}var C2=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],jZ=1,Nm=2,E2=jZ|Nm;function up(r,e,t){t=t||E2,e?r.dirty|=t:r.dirty&=~t}function A2(r,e){return e=e||E2,r.dirty==null||!!(r.dirty&e)}function zi(r){if(r)return A2(r)&&nS(r,r.label,r),r}function nS(r,e,t){var a=e.getComputedTransform();r.transform=tv(r.transform,a);var i=r.localRect=xu(r.localRect,e.getBoundingRect()),n=e.style,o=n.margin,s=t&&t.marginForce,l=t&&t.minMarginForce,u=t&&t.marginDefault,c=n.__marginType;c==null&&u&&(o=u,c=Qs.textMargin);for(var f=0;f<4;f++)iS[f]=c===Qs.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Qs.textMargin&&qa(i,iS,!1,!1);var p=r.rect=xu(r.rect,i);return a&&p.applyTransform(a),c===Qs.minMargin&&qa(p,iS,!1,!1),r.axisAligned=Qd(a),(r.label=r.label||{}).ignore=e.ignore,up(r,!1),up(r,!0,Nm),r}var iS=[0,0,0,0];function L2(r,e,t){return r.transform=tv(r.transform,t),r.localRect=xu(r.localRect,e),r.rect=xu(r.rect,e),t&&r.rect.applyTransform(t),r.axisAligned=Qd(t),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function cp(r,e){if(r){r.label.x+=e.x,r.label.y+=e.y,r.label.markRedraw();var t=r.transform;t&&(t[4]+=e.x,t[5]+=e.y);var a=r.rect;a&&(a.x+=e.x,a.y+=e.y);var i=r.obb;i&&i.fromBoundingRect(r.localRect,t)}}function fp(r,e){for(var t=0;t<C2.length;t++){var a=C2[t];r[a]==null&&(r[a]=e[a])}return zi(r)}function M2(r){var e=r.obb;return(!e||A2(r,Nm))&&(r.obb=e=e||new Kd,e.fromBoundingRect(r.localRect,r.transform),up(r,!1,Nm)),e}function pp(r,e,t,a,i){var n=r.length,o=bt[e],s=be[e];if(n<2)return!1;r.sort(function(C,M){return C.rect[o]-M.rect[o]});for(var l=0,u,c=!1,f=0,p=0;p<n;p++){var h=r[p],d=h.rect;u=d[o]-l,u<0&&(d[o]-=u,h.label[o]-=u,c=!0);var v=Math.max(-u,0);f+=v,l=d[o]+d[s]}f>0&&i&&S(-f/n,0,n);var m=r[0],g=r[n-1],y,x;_(),y<0&&w(-y,.8),x<0&&w(x,.8),_(),b(y,x,1),b(x,y,-1),_(),y<0&&D(-y),x<0&&D(x);function _(){y=m.rect[o]-t,x=a-g.rect[o]-g.rect[s]}function b(C,M,E){if(C<0){var L=Math.min(M,-C);if(L>0){S(L*E,0,n);var A=L+C;A<0&&w(-A*E,1)}else w(-C*E,1)}}function S(C,M,E){C!==0&&(c=!0);for(var L=M;L<E;L++){var A=r[L],P=A.rect;P[o]+=C,A.label[o]+=C}}function w(C,M){for(var E=[],L=0,A=1;A<n;A++){var P=r[A-1].rect,R=Math.max(r[A].rect[o]-P[o]-P[s],0);E.push(R),L+=R}if(L){var k=Math.min(Math.abs(C)/L,M);if(C>0)for(var A=0;A<n-1;A++){var B=E[A]*k;S(B,0,A+1)}else for(var A=n-1;A>0;A--){var B=E[A-1]*k;S(-B,A,n)}}}function D(C){var M=C<0?-1:1;C=Math.abs(C);for(var E=Math.ceil(C/(n-1)),L=0;L<n-1;L++)if(M>0?S(E,0,L+1):S(-E,n-L-1,n),C-=E,C<=0)return}return c}function I2(r){for(var e=0;e<r.length;e++){var t=r[e],a=t.defaultAttr,i=t.labelLine;t.label.attr("ignore",a.ignore),i&&i.attr("ignore",a.labelGuideIgnore)}}function Om(r){var e=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function t(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var a=0;a<r.length;a++){var i=zi(r[a]);if(!i.label.ignore){for(var n=i.label,o=i.labelLine,s=!1,l=0;l<e.length;l++)if(Gu(i,e[l],null,{touchThreshold:.05})){s=!0;break}s?(t(n),o&&t(o)):e.push(i)}}}function Gu(r,e,t,a){return!r||!e||r.label&&r.label.ignore||e.label&&e.label.ignore||!r.rect.intersect(e.rect,t,a)?!1:r.axisAligned&&e.axisAligned?!0:M2(r).intersect(M2(e),t,a)}function $Z(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function KZ(r,e){var t=r.label,a=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:$Z(a&&a.shape.points)}}var P2=["align","verticalAlign","width","height","fontSize"],Hr=new Qr,oS=ot(),JZ=ot();function zm(r,e,t){for(var a=0;a<t.length;a++){var i=t[a];e[i]!=null&&(r[i]=e[i])}}var Vm=["x","y","rotation"],QZ=(function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,a,i,n){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();at.applyTransform(c,c,u),u?Hr.setLocalTransform(u):(Hr.x=Hr.y=Hr.rotation=Hr.originX=Hr.originY=0,Hr.scaleX=Hr.scaleY=1),Hr.rotation=dr(Hr.rotation);var f=i.__hostTarget,p;if(f){p=f.getBoundingRect().plain();var h=f.getComputedTransform();at.applyTransform(p,p,h)}var d=p&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:d,seriesModel:a,dataIndex:e,dataType:t,layoutOptionOrCb:n,layoutOption:null,rect:c,hostRect:p,priority:p?p.width*p.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:d&&d.ignore,x:Hr.x,y:Hr.y,scaleX:Hr.scaleX,scaleY:Hr.scaleY,rotation:Hr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var a=e.__model,i=a.get("labelLayout");($(i)||gt(i).length)&&e.group.traverse(function(n){if(n.ignore)return!0;var o=n.getTextContent(),s=nt(n);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,a,o,i)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),a=e.getHeight();function i(x,_){return function(){rS(x,_)}}for(var n=0;n<this._labelList.length;n++){var o=this._labelList[n],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;$(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(KZ(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=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 p=!1;if(c.x!=null?(s.x=j(c.x,t),s.setStyle("x",0),p=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=j(c.y,a),s.setStyle("y",0),p=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:c.labelLinePoints}),p=!1)}var d=oS(s);d.needsUpdateLabelLine=p,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var v=0;v<P2.length;v++){var m=P2[v];s.setStyle(m,c[m]!=null?c[m]:u.style[m])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var g=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);g=y.getItemModel(o.dataIndex)}s.on("drag",i(l,g.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),a=e.getHeight(),i=[];T(this._labelList,function(l){l.defaultAttr.ignore||i.push(fp({},l))});var n=At(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=At(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});pp(n,0,0,t),pp(o,1,0,a);var s=At(i,function(l){return l.layoutOption.hideOverlap});I2(s),Om(s)},r.prototype.processLabelsOverall=function(){var e=this;T(this._chartViewList,function(t){var a=t.__model,i=t.ignoreLabelLineUpdate,n=a.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=oS(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,a),n&&e._animateLabels(o,a)})})},r.prototype._updateLabelLine=function(e,t){var a=e.getTextContent(),i=nt(e),n=i.dataIndex;if(a&&n!=null){var o=t.getData(i.dataType),s=o.getItemModel(n),l={},u=o.getItemVisual(n,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");Fu(e,Hu(s),l),rS(e,f)}},r.prototype._animateLabels=function(e,t){var a=e.getTextContent(),i=e.getTextGuideLine();if(a&&(e.forceLabelAnimation||!a.ignore&&!a.invisible&&!e.disableLabelAnimation&&!Nn(e))){var n=oS(a),o=n.oldLayout,s=nt(e),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},c=t.getData(s.dataType);if(o){a.attr(o);var p=e.prevStates;p&&(lt(p,"select")>=0&&a.attr(n.oldLayoutSelect),lt(p,"emphasis")>=0&&a.attr(n.oldLayoutEmphasis)),wt(a,u,t,l)}else if(a.attr(u),!Bn(a).valueAnimation){var f=Q(a.style.opacity,1);a.style.opacity=0,Vt(a,{style:{opacity:f}},t,l)}if(n.oldLayout=u,a.states.select){var h=n.oldLayoutSelect={};zm(h,u,Vm),zm(h,a.states.select,Vm)}if(a.states.emphasis){var d=n.oldLayoutEmphasis={};zm(d,u,Vm),zm(d,a.states.emphasis,Vm)}av(a,l,c,t,t)}if(i&&!i.ignore&&!i.invisible){var n=JZ(i),o=n.oldLayout,v={points:i.shape.points};o?(i.attr({shape:o}),wt(i,{shape:v},t)):(i.setShape(v),i.style.strokePercent=0,Vt(i,{style:{strokePercent:1}},t)),n.oldLayout=v}},r})(),k2=QZ;var sS=ot();function lS(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var i=sS(t).labelManager;i||(i=sS(t).labelManager=new k2),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var i=sS(t).labelManager;a.updatedSeries.forEach(function(n){i.addLabelsOfSeries(t.getViewOfSeriesModel(n))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var uS=Math.sin,cS=Math.cos,R2=Math.PI,ml=Math.PI*2,t7=180/R2,e7=(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,a,i,n,o){this._add("C",e,t,a,i,n,o)},r.prototype.quadraticCurveTo=function(e,t,a,i){this._add("Q",e,t,a,i)},r.prototype.arc=function(e,t,a,i,n,o){this.ellipse(e,t,a,a,0,i,n,o)},r.prototype.ellipse=function(e,t,a,i,n,o,s,l){var u=s-o,c=!l,f=Math.abs(u),p=qi(f-ml)||(c?u>=ml:-u>=ml),h=u>0?u%ml:u%ml+ml,d=!1;p?d=!0:qi(f)?d=!1:d=h>=R2==!!c;var v=e+a*cS(o),m=t+i*uS(o);this._start&&this._add("M",v,m);var g=Math.round(n*t7);if(p){var y=1/this._p,x=(c?1:-1)*(ml-y);this._add("A",a,i,g,1,+c,e+a*cS(o+x),t+i*uS(o+x)),y>.01&&this._add("A",a,i,g,0,+c,v,m)}else{var _=e+a*cS(s),b=t+i*uS(s);this._add("A",a,i,g,+d,+c,_,b)}},r.prototype.rect=function(e,t,a,i){this._add("M",e,t),this._add("l",a,0),this._add("l",0,i),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,i,n,o,s,l,u){for(var c=[],f=this._p,p=1;p<arguments.length;p++){var h=arguments[p];if(isNaN(h)){this._invalid=!0;return}c.push(Math.round(h*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})(),Bm=e7;var hp="none",r7=Math.round;function a7(r){var e=r.fill;return e!=null&&e!==hp}function i7(r){var e=r.stroke;return e!=null&&e!==hp}var fS=["lineCap","miterLimit","lineJoin"],n7=V(fS,function(r){return"stroke-"+r.toLowerCase()});function pS(r,e,t,a){var i=e.opacity==null?1:e.opacity;if(t instanceof se){r("opacity",i);return}if(a7(e)){var n=mo(e.fill);r("fill",n.color);var o=e.fillOpacity!=null?e.fillOpacity*n.opacity*i:n.opacity*i;(a||o<1)&&r("fill-opacity",o)}else r("fill",hp);if(i7(e)){var s=mo(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*i:s.opacity*i,f=e.strokeFirst;if((a||u!==1)&&r("stroke-width",u),(a||f)&&r("paint-order",f?"stroke":"fill"),(a||c<1)&&r("stroke-opacity",c),e.lineDash){var p=Kf(t),h=p[0],d=p[1];h&&(d=r7(d||0),r("stroke-dasharray",h.join(",")),(d||a)&&r("stroke-dashoffset",d))}else a&&r("stroke-dasharray",hp);for(var v=0;v<fS.length;v++){var m=fS[v];if(a||e[m]!==fu[m]){var g=e[m]||fu[m];g&&r(n7[v],g)}}}else a&&r("stroke",hp)}var N2="http://www.w3.org/2000/svg",hS="http://www.w3.org/1999/xlink",O2="http://www.w3.org/2000/xmlns/",z2="http://www.w3.org/XML/1998/namespace",dS="ecmeta_";function Um(r){return document.createElementNS(N2,r)}function Ve(r,e,t,a,i){return{tag:r,attrs:t||{},children:a,text:i,key:e}}function o7(r,e){var t=[];if(e)for(var a in e){var i=e[a],n=a;i!==!1&&(i!==!0&&i!=null&&(n+='="'+i+'"'),t.push(n))}return"<"+r+" "+t.join(" ")+">"}function s7(r){return"</"+r+">"}function dp(r,e){e=e||{};var t=e.newline?`
|
|
`:"";function a(i){var n=i.children,o=i.tag,s=i.attrs,l=i.text;return o7(o,s)+(o!=="style"?We(l):l||"")+(n?""+t+V(n,function(u){return a(u)}).join(t)+t:"")+s7(o)}return a(r)}function V2(r,e,t){t=t||{};var a=t.newline?`
|
|
`:"",i=" {"+a,n=a+"}",o=V(gt(r),function(l){return l+i+V(gt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+n}).join(a),s=V(gt(e),function(l){return"@keyframes "+l+i+V(gt(e[l]),function(u){return u+i+V(gt(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(a)+n}).join(a)+n}).join(a);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(a)}function vp(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function vS(r,e,t,a){return Ve("svg","root",{width:r,height:e,xmlns:N2,"xmlns:xlink":hS,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var l7=0;function Fm(){return l7++}var B2={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"},gl="transform-origin";function u7(r,e,t){var a=O({},r.shape);O(a,e),r.buildPath(t,a);var i=new Bm;return i.reset(id(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function c7(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[gl]=t+"px "+a+"px")}var f7={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function F2(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function p7(r,e,t){var a=r.shape.paths,i={},n,o;if(T(a,function(l){var u=vp(t.zrId);u.animation=!0,mp(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,p=gt(c),h=p.length;if(h){o=p[h-1];var d=c[o];for(var v in d){var m=d[v];i[v]=i[v]||{d:""},i[v].d+=m.d||""}for(var g in f){var y=f[g].animation;y.indexOf(o)>=0&&(n=y)}}}),!!n){e.d=!1;var s=F2(i,t);return n.replace(o,s)}}function U2(r){return W(r)?B2[r]?"cubic-bezier("+B2[r]+")":tu(r)?r:"":""}function mp(r,e,t,a){var i=r.animators,n=i.length,o=[];if(r instanceof Co){var s=p7(r,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u<n;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],p=U2(c.getClip().easing),h=c.getDelay();p?f.push(p):f.push("linear"),h&&f.push(h/1e3+"s"),c.getLoop()&&f.push("infinite");var d=f.join(" ");l[d]=l[d]||[d,[]],l[d][1].push(c)}function v(y){var x=y[1],_=x.length,b={},S={},w={},D="animation-timing-function";function C(Et,vt,It){for(var ct=Et.getTracks(),Ct=Et.getMaxTime(),ae=0;ae<ct.length;ae++){var Wt=ct[ae];if(Wt.needsAnimate()){var Qt=Wt.keyframes,ue=Wt.propName;if(It&&(ue=It(ue)),ue)for(var $e=0;$e<Qt.length;$e++){var ma=Qt[$e],Xr=Math.round(ma.time/Ct*100)+"%",us=U2(ma.easing),Ul=ma.rawValue;(W(Ul)||yt(Ul))&&(vt[Xr]=vt[Xr]||{},vt[Xr][ue]=ma.rawValue,us&&(vt[Xr][D]=us))}}}}for(var M=0;M<_;M++){var E=x[M],L=E.targetName;L?L==="shape"&&C(E,S):!a&&C(E,b)}for(var A in b){var P={};iu(P,r),O(P,b[A]);var R=nd(P),k=b[A][D];w[A]=R?{transform:R}:{},c7(w[A],P),k&&(w[A][D]=k)}var B,U=!0;for(var A in S){w[A]=w[A]||{};var F=!B,k=S[A][D];F&&(B=new tr);var H=B.len();B.reset(),w[A].d=u7(r,S[A],B);var G=B.len();if(!F&&H!==G){U=!1;break}k&&(w[A][D]=k)}if(!U)for(var A in w)delete w[A].d;if(!a)for(var M=0;M<_;M++){var E=x[M],L=E.targetName;L==="style"&&C(E,w,function(ct){return f7[ct]})}for(var Y=gt(w),rt=!0,st,M=1;M<Y.length;M++){var mt=Y[M-1],Ht=Y[M];if(w[mt][gl]!==w[Ht][gl]){rt=!1;break}st=w[mt][gl]}if(rt&&st){for(var A in w)w[A][gl]&&delete w[A][gl];e[gl]=st}if(At(Y,function(Et){return gt(w[Et]).length>0}).length){var Kt=F2(w,t);return Kt+" "+y[0]+" both"}}for(var m in l){var s=v(l[m]);s&&o.push(s)}if(o.length){var g=t.zrId+"-cls-"+Fm();t.cssNodes["."+g]={animation:o.join(",")},e.class=g}}function G2(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};H2(a,e,t,!0)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},n=i.fill;if(!n){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&&(n=rf(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var a={cursor:"pointer"};n&&(a.fill=n),i.stroke&&(a.stroke=i.stroke),u&&(a["stroke-width"]=u),H2(a,e,t,!0)}}function H2(r,e,t,a){var i=JSON.stringify(r),n=t.cssStyleCache[i];n||(n=t.zrId+"-cls-"+Fm(),t.cssStyleCache[i]=n,t.cssNodes["."+n+(a?":hover":"")]=r),e.class=e.class?e.class+" "+n:n}var gp=Math.round;function X2(r){return r&&W(r.src)}function q2(r){return r&&$(r.toDataURL)}function mS(r,e,t,a){pS(function(i,n){var o=i==="fill"||i==="stroke";o&&ad(n)?_S(e,r,i,a):o&&af(n)?bS(t,r,i,a):r[i]=n,o&&a.ssr&&n==="none"&&(r["pointer-events"]="visible")},e,t,!1),x7(t,r,a)}function gS(r,e){var t=LE(e);t&&(t.each(function(a,i){a!=null&&(r[(dS+i).toLowerCase()]=a+"")}),e.isSilent()&&(r[dS+"silent"]="true"))}function W2(r){return qi(r[0]-1)&&qi(r[1])&&qi(r[2])&&qi(r[3]-1)}function h7(r){return qi(r[4])&&qi(r[5])}function yS(r,e,t){if(e&&!(h7(e)&&W2(e))){var a=t?10:1e4;r.transform=W2(e)?"translate("+gp(e[4]*a)/a+" "+gp(e[5]*a)/a+")":iE(e)}}function Y2(r,e,t){for(var a=r.points,i=[],n=0;n<a.length;n++)i.push(gp(a[n][0]*t)/t),i.push(gp(a[n][1]*t)/t);e.points=i.join(" ")}function Z2(r){return!r.smooth}function d7(r){var e=V(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,a,i){for(var n=0;n<e.length;n++){var o=e[n],s=t[o[0]];s!=null&&(a[o[1]]=gp(s*i)/i)}}}var v7={circle:[d7(["cx","cy","r"])],polyline:[Y2,Z2],polygon:[Y2,Z2]};function m7(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function j2(r,e){var t=r.style,a=r.shape,i=v7[r.type],n={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&id(r)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](a))&&!(o&&m7(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);i[0](a,n,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var p=r.path;f&&(p.beginPath(),r.buildPath(p,r.shape),r.pathUpdated());var h=p.getVersion(),d=r,v=d.__svgPathBuilder;(d.__svgPathVersion!==h||!v||l!==d.__svgPathStrokePercent)&&(v||(v=d.__svgPathBuilder=new Bm),v.reset(u),p.rebuildPath(v,l),v.generateStr(),d.__svgPathVersion=h,d.__svgPathStrokePercent=l),n.d=v.getStr()}return yS(n,r.transform),mS(n,t,r,e),gS(n,r),e.animation&&mp(r,n,e),e.emphasis&&G2(r,n,e),Ve(s,r.id+"",n)}function g7(r,e){var t=r.style,a=t.image;if(a&&!W(a)&&(X2(a)?a=a.src:q2(a)&&(a=a.toDataURL())),!!a){var i=t.x||0,n=t.y||0,o=t.width,s=t.height,l={href:a,width:o,height:s};return i&&(l.x=i),n&&(l.y=n),yS(l,r.transform),mS(l,t,r,e),gS(l,r),e.animation&&mp(r,l,e),Ve("image",r.id+"",l)}}function y7(r,e){var t=r.style,a=t.text;if(a!=null&&(a+=""),!(!a||isNaN(t.x)||isNaN(t.y))){var i=t.font||qr,n=t.x||0,o=oE(t.y||0,As(i),t.textBaseline),s=nE[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Gx(t)){var u="",c=t.fontStyle,f=Hx(t.fontSize);if(!parseFloat(f))return;var p=t.fontFamily||b0,h=t.fontWeight;u+="font-size:"+f+";font-family:"+p+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),h&&h!=="normal"&&(u+="font-weight:"+h+";"),l.style=u}else l.style="font: "+i;return a.match(/\s/)&&(l["xml:space"]="preserve"),n&&(l.x=n),o&&(l.y=o),yS(l,r.transform),mS(l,t,r,e),gS(l,r),e.animation&&mp(r,l,e),Ve("text",r.id+"",l,void 0,a)}}function xS(r,e){if(r instanceof ft)return j2(r,e);if(r instanceof se)return g7(r,e);if(r instanceof In)return y7(r,e)}function x7(r,e,t){var a=r.style;if(sE(a)){var i=lE(r),n=t.shadowCache,o=n[i];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=a.shadowOffsetX||0,f=a.shadowOffsetY||0,p=a.shadowBlur,h=mo(a.shadowColor),d=h.opacity,v=h.color,m=p/2/l,g=p/2/u,y=m+" "+g;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=Ve("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Ve("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:y,"flood-color":v,"flood-opacity":d})]),n[i]=o}e.filter=nf(o)}}function _S(r,e,t,a){var i=r[t],n,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(ed(i))n="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(rd(i))n="radialGradient",o.cx=Q(i.x,.5),o.cy=Q(i.y,.5),o.r=Q(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=td(s[u].offset)*100+"%",p=s[u].color,h=mo(p),d=h.color,v=h.opacity,m={offset:f};m["stop-color"]=d,v<1&&(m["stop-opacity"]=v),l.push(Ve("stop",u+"",m))}var g=Ve(n,"",o,l),y=dp(g),x=a.gradientCache,_=x[y];_||(_=a.zrId+"-g"+a.gradientIdx++,x[y]=_,o.id=_,a.defs[_]=Ve(n,_,o,l)),e[t]=nf(_)}function bS(r,e,t,a){var i=r.style[t],n=r.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(Z0(i)){var p=i.imageWidth,h=i.imageHeight,d=void 0,v=i.image;if(W(v)?d=v:X2(v)?d=v.src:q2(v)&&(d=v.toDataURL()),typeof Image=="undefined"){var m="Image width/height must been given explictly in svg-ssr renderer.";ee(p,m),ee(h,m)}else if(p==null||h==null){var g=function(M,E){if(M){var L=M.elm,A=p||E.width,P=h||E.height;M.tag==="pattern"&&(u?(P=1,A/=n.width):c&&(A=1,P/=n.height)),M.attrs.width=A,M.attrs.height=P,L&&(L.setAttribute("width",A),L.setAttribute("height",P))}},y=mf(d,null,r,function(M){l||g(S,M),g(f,M)});y&&y.width&&y.height&&(p=p||y.width,h=h||y.height)}f=Ve("image","img",{href:d,width:p,height:h}),o.width=p,o.height=h}else i.svgElement&&(f=tt(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var x,_;l?x=_=1:u?(_=1,x=o.width/n.width):c?(x=1,_=o.height/n.height):o.patternUnits="userSpaceOnUse",x!=null&&!isNaN(x)&&(o.width=x),_!=null&&!isNaN(_)&&(o.height=_);var b=nd(i);b&&(o.patternTransform=b);var S=Ve("pattern","",o,[f]),w=dp(S),D=a.patternCache,C=D[w];C||(C=a.zrId+"-p"+a.patternIdx++,D[w]=C,o.id=C,S=a.defs[C]=Ve("pattern",C,o,[f])),e[t]=nf(C)}}function $2(r,e,t){var a=t.clipPathCache,i=t.defs,n=a[r.id];if(!n){n=t.zrId+"-c"+t.clipPathIdx++;var o={id:n};a[r.id]=n,i[n]=Ve("clipPath",n,o,[j2(r,t)])}e["clip-path"]=nf(n)}function SS(r){return document.createTextNode(r)}function Ho(r,e,t){r.insertBefore(e,t)}function wS(r,e){r.removeChild(e)}function TS(r,e){r.appendChild(e)}function DS(r){return r.parentNode}function CS(r){return r.nextSibling}function Hm(r,e){r.textContent=e}var K2=58,b7=120,S7=Ve("","");function MS(r){return r===void 0}function vn(r){return r!==void 0}function w7(r,e,t){for(var a={},i=e;i<=t;++i){var n=r[i].key;n!==void 0&&(a[n]=i)}return a}function yp(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function xp(r){var e,t=r.children,a=r.tag;if(vn(a)){var i=r.elm=Um(a);if(Wm(S7,r),z(t))for(e=0;e<t.length;++e){var n=t[e];n!=null&&TS(i,xp(n))}else vn(r.text)&&!et(r.text)&&TS(i,SS(r.text))}else r.elm=SS(r.text);return r.elm}function J2(r,e,t,a,i){for(;a<=i;++a){var n=t[a];n!=null&&Ho(r,xp(n),e)}}function Gm(r,e,t,a){for(;t<=a;++t){var i=e[t];if(i!=null)if(vn(i.tag)){var n=DS(i.elm);wS(n,i.elm)}else wS(r,i.elm)}}function Wm(r,e){var t,a=e.elm,i=r&&r.attrs||{},n=e.attrs||{};if(i!==n){for(t in n){var o=n[t],s=i[t];s!==o&&(o===!0?a.setAttribute(t,""):o===!1?a.removeAttribute(t):t==="style"?a.style.cssText=o:t.charCodeAt(0)!==b7?a.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?a.setAttributeNS(O2,t,o):t.charCodeAt(3)===K2?a.setAttributeNS(z2,t,o):t.charCodeAt(5)===K2?a.setAttributeNS(hS,t,o):a.setAttribute(t,o))}for(t in i)t in n||a.removeAttribute(t)}}function T7(r,e,t){for(var a=0,i=0,n=e.length-1,o=e[0],s=e[n],l=t.length-1,u=t[0],c=t[l],f,p,h,d;a<=n&&i<=l;)o==null?o=e[++a]:s==null?s=e[--n]:u==null?u=t[++i]:c==null?c=t[--l]:yp(o,u)?(Wu(o,u),o=e[++a],u=t[++i]):yp(s,c)?(Wu(s,c),s=e[--n],c=t[--l]):yp(o,c)?(Wu(o,c),Ho(r,o.elm,CS(s.elm)),o=e[++a],c=t[--l]):yp(s,u)?(Wu(s,u),Ho(r,s.elm,o.elm),s=e[--n],u=t[++i]):(MS(f)&&(f=w7(e,a,n)),p=f[u.key],MS(p)?Ho(r,xp(u),o.elm):(h=e[p],h.tag!==u.tag?Ho(r,xp(u),o.elm):(Wu(h,u),e[p]=void 0,Ho(r,h.elm,o.elm))),u=t[++i]);(a<=n||i<=l)&&(a>n?(d=t[l+1]==null?null:t[l+1].elm,J2(r,d,t,i,l)):Gm(r,e,a,n))}function Wu(r,e){var t=e.elm=r.elm,a=r.children,i=e.children;r!==e&&(Wm(r,e),MS(e.text)?vn(a)&&vn(i)?a!==i&&T7(t,a,i):vn(i)?(vn(r.text)&&Hm(t,""),J2(t,null,i,0,i.length-1)):vn(a)?Gm(t,a,0,a.length-1):vn(r.text)&&Hm(t,""):r.text!==e.text&&(vn(a)&&Gm(t,a,0,a.length-1),Hm(t,e.text)))}function ES(r,e){if(yp(r,e))Wu(r,e);else{var t=r.elm,a=DS(t);xp(e),a!==null&&(Ho(a,e.elm,CS(t)),Gm(a,[r],0,0))}return e}var D7=0,C7=(function(){function r(e,t,a){if(this.type="svg",this.refreshHover=Q2("refreshHover"),this.configLayer=Q2("configLayer"),this.storage=t,this._opts=a=O({},a),this.root=e,this._id="zr"+D7++,this._oldVNode=vS(a.width,a.height),e&&!a.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=Um("svg");Wm(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(a.width,a.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",ES(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return xS(e,vp(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,i=this._height,n=vp(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress,n.emphasis=e.emphasis,n.ssr=this._opts.ssr;var o=[],s=this._bgVNode=M7(a,i,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=Ve("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=V(gt(n.defs),function(p){return n.defs[p]});if(u.length&&o.push(Ve("defs","defs",{},u)),e.animation){var c=V2(n.cssNodes,n.cssAnims,{newline:!0});if(c){var f=Ve("style","stl",{},[],c);o.push(f)}}return vS(a,i,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},dp(this.renderToVNode({animation:Q(e.cssAnimation,!0),emphasis:Q(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Q(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,a){for(var i=e.length,n=[],o=0,s,l,u=0,c=0;c<i;c++){var f=e[c];if(!f.invisible){var p=f.__clipPaths,h=p&&p.length||0,d=l&&l.length||0,v=void 0;for(v=Math.max(h-1,d-1);v>=0&&!(p&&l&&p[v]===l[v]);v--);for(var m=d-1;m>v;m--)o--,s=n[o-1];for(var g=v+1;g<h;g++){var y={};$2(p[g],y,t);var x=Ve("g","clip-g-"+u++,y,[]);(s?s.children:a).push(x),n[o++]=x,s=x}l=p;var _=xS(f,t);_&&(s?s.children:a).push(_)}}},r.prototype.resize=function(e,t){var a=this._opts,i=this.root,n=this._viewport;if(e!=null&&(a.width=e),t!=null&&(a.height=t),i&&n&&(n.style.display="none",e=Po(i,0,a),t=Po(i,1,a),n.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,n){var o=n.style;o.width=e+"px",o.height=t+"px"}if(af(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(),a="data:image/svg+xml;";return e?(t=uE(t),t&&a+"base64,"+t):a+"charset=UTF-8,"+encodeURIComponent(t)},r})();function Q2(r){return function(){}}function M7(r,e,t,a){var i;if(t&&t!=="none")if(i=Ve("rect","bg",{width:r,height:e,x:"0",y:"0"}),ad(t))_S({fill:t},i.attrs,"fill",a);else if(af(t))bS({style:{fill:t},dirty:ie,getBoundingRect:function(){return{width:r,height:e}}},i.attrs,"fill",a);else{var n=mo(t),o=n.color,s=n.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}var tR=C7;function AS(r){r.registerPainter("svg",tR)}function eR(r,e,t){var a=Ke.createCanvas(),i=e.getWidth(),n=e.getHeight(),o=a.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=n+"px",a.setAttribute("data-zr-dom-id",r)),a.width=i*t,a.height=n*t,a}var E7=(function(r){kt(e,r);function e(t,a,i){var n=r.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.incremental=!1,n.zlevel=0,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__used=!1,n.__drawIndex=0,n.__startIndex=0,n.__endIndex=0,n.__prevStartIndex=null,n.__prevEndIndex=null;var o;i=i||Cs,typeof t=="string"?o=eR(t,a,i):et(t)&&(o=t,t=o.id),n.id=t,n.dom=o;var s=o.style;return s&&(Ph(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),n.painter=a,n.dpr=i,n}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=eR("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,a,i,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new at(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var x=new at(0,0,0,0);x.copy(y),o.push(x)}else{for(var _=!1,b=1/0,S=0,w=0;w<o.length;++w){var D=o[w];if(D.intersect(y)){var C=new at(0,0,0,0);C.copy(D),C.union(y),o[w]=C,_=!0;break}else if(l){u.copy(y),u.union(D);var M=y.width*y.height,E=D.width*D.height,L=u.width*u.height,A=L-M-E;A<b&&(b=A,S=w)}}if(l&&(o[S].union(y),_=!0),!_){var x=new at(0,0,0,0);x.copy(y),o.push(x)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var p=t[f];if(p){var h=p.shouldBePainted(i,n,!0,!0),d=p.__isRendered&&(p.__dirty&Ye||!h)?p.getPrevPaintRect():null;d&&c(d);var v=h&&(p.__dirty&Ye||!p.__isRendered)?p.getPaintRect():null;v&&c(v)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var p=a[f],h=p&&p.shouldBePainted(i,n,!0,!0);if(p&&(!h||!p.__zr)&&p.__isRendered){var d=p.getPrevPaintRect();d&&c(d)}}var m;do{m=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var g=f+1;g<o.length;)o[f].intersect(o[g])?(m=!0,o[f].union(o[g]),o.splice(g,1)):g++;f++}}while(m);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,a){var i=this.dpr,n=this.dom,o=n.style,s=this.domBack;o&&(o.width=t+"px",o.height=a+"px"),n.width=t*i,n.height=a*i,s&&(s.width=t*i,s.height=a*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(t,a,i){var n=this.dom,o=this.ctx,s=n.width,l=n.height;a=a||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,f=this.dpr,p=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,s/f,l/f));var h=this.domBack;function d(v,m,g,y){if(o.clearRect(v,m,g,y),a&&a!=="transparent"){var x=void 0;if(oo(a)){var _=a.global||a.__width===g&&a.__height===y;x=_&&a.__canvasGradient||$f(o,a,{x:0,y:0,width:g,height:y}),a.__canvasGradient=x,a.__width=g,a.__height=y}else xM(a)&&(a.scaleX=a.scaleX||f,a.scaleY=a.scaleY||f,x=nm(o,a,{dirty:function(){p.setUnpainted(),p.painter.refresh()}}));o.save(),o.fillStyle=x||a,o.fillRect(v,m,g,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(h,v,m,g,y),o.restore())}!i||u?d(0,0,s,l):i.length&&T(i,function(v){d(v.x*f,v.y*f,v.width*f,v.height*f)})},e})(Ue),Ym=E7;var rR=1e5,yl=314159,Zm=.01,A7=.001;function L7(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function I7(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 P7=(function(){function r(e,t,a,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var n=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=a=O({},a||{}),this.dpr=a.devicePixelRatio||Cs,this._singleCanvas=n,this.root=e;var o=e.style;o&&(Ph(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(n){var c=e,f=c.width,p=c.height;a.width!=null&&(f=a.width),a.height!=null&&(p=a.height),this.dpr=a.devicePixelRatio||1,c.width=f*this.dpr,c.height=p*this.dpr,this._width=f,this._height=p;var h=new Ym(c,this,this.dpr);h.__builtin__=!0,h.initContext(),l[yl]=h,h.zlevel=yl,s.push(yl),this._domRoot=e}else{this._width=Po(e,0,a),this._height=Po(e,1,a);var u=this._domRoot=I7(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),a=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,a,e,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=n===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,a=this._hoverlayer;if(a&&a.clear(),!!t){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},n,o=0;o<t;o++){var s=e[o];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(rR)),n||(n=a.ctx,n.save()),ko(n,s,i,o===t-1))}n&&n.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(rR)},r.prototype.paintOne=function(e,t){om(e,t)},r.prototype._paintList=function(e,t,a,i){if(this._redrawId===i){a=a||!1,this._updateLayerStatus(e);var n=this._doPaintList(e,t,a),o=n.finished,s=n.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Jc(function(){l._paintList(e,t,a,i)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(yl).ctx,t=this._domRoot.width,a=this._domRoot.height;e.clearRect(0,0,t,a),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,a)})},r.prototype._doPaintList=function(e,t,a){for(var i=this,n=[],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||a)&&n.push(u)}for(var c=!0,f=!1,p=function(v){var m=n[v],g=m.ctx,y=o&&m.createRepaintRects(e,t,h._width,h._height),x=a?m.__startIndex:m.__drawIndex,_=!a&&m.incremental&&Date.now,b=_&&Date.now(),S=m.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,S,y);else if(x===m.__startIndex){var w=e[x];(!w.incremental||!w.notClear||a)&&m.clear(!1,S,y)}x===-1&&(console.error("For some unknown reason. drawIndex is -1"),x=m.__startIndex);var D,C=function(A){var P={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(D=x;D<m.__endIndex;D++){var R=e[D];if(R.__inHover&&(f=!0),i._doPaintEl(R,m,o,A,P,D===m.__endIndex-1),_){var k=Date.now()-b;if(k>15)break}}P.prevElClipPaths&&g.restore()};if(y)if(y.length===0)D=m.__endIndex;else for(var M=h.dpr,E=0;E<y.length;++E){var L=y[E];g.save(),g.beginPath(),g.rect(L.x*M,L.y*M,L.width*M,L.height*M),g.clip(),C(L),g.restore()}else g.save(),C(),g.restore();m.__drawIndex=D,m.__drawIndex<m.__endIndex&&(c=!1)},h=this,d=0;d<n.length;d++)p(d);return Lt.wxa&&T(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,a,i,n,o){var s=t.ctx;if(a){var l=e.getPaintRect();(!i||l&&l.intersect(i))&&(ko(s,e,n,o),e.setPrevPaintRect(l))}else ko(s,e,n,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=yl);var a=this._layers[e];return a||(a=new Ym("zr_"+e,this,this.dpr),a.zlevel=e,a.__builtin__=!0,this._layerConfig[e]?dt(a,this._layerConfig[e],!0):this._layerConfig[e-Zm]&&dt(a,this._layerConfig[e-Zm],!0),t&&(a.virtual=t),this.insertLayer(e,a),a.initContext()),a},r.prototype.insertLayer=function(e,t){var a=this._layers,i=this._zlevelList,n=i.length,o=this._domRoot,s=null,l=-1;if(!a[e]&&L7(t)){if(n>0&&e>i[0]){for(l=0;l<n-1&&!(i[l]<e&&i[l+1]>e);l++);s=a[i[l]]}if(i.splice(l+1,0,e),a[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 a=this._zlevelList,i=0;i<a.length;i++){var n=a[i];e.call(t,this._layers[n],n)}},r.prototype.eachBuiltinLayer=function(e,t){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i],o=this._layers[n];o.__builtin__&&e.call(t,o,n)}},r.prototype.eachOtherLayer=function(e,t){for(var a=this._zlevelList,i=0;i<a.length;i++){var n=a[i],o=this._layers[n];o.__builtin__||e.call(t,o,n)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,p){f.__dirty=f.__used=!1});function t(f){n&&(n.__endIndex!==f&&(n.__dirty=!0),n.__endIndex=f)}if(this._singleCanvas)for(var a=1;a<e.length;a++){var i=e[a];if(i.zlevel!==e[a-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var n=null,o=0,s,l;for(l=0;l<e.length;l++){var i=e[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+A7,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?Zm:0),this._needsManuallyCompositing),c.__builtin__||ps("ZLevel "+u+" has been used by unkown layer "+c.id),c!==n&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),n=c),i.__dirty&Ye&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,p){!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,T(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?dt(a[e],t,!0):a[e]=t;for(var i=0;i<this._zlevelList.length;i++){var n=this._zlevelList[i];if(n===e||n===e+Zm){var o=this._layers[n];dt(o,a[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,a=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],a.splice(lt(a,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var i=this._opts,n=this.root;if(e!=null&&(i.width=e),t!=null&&(i.height=t),e=Po(n,0,i),t=Po(n,1,i),a.style.display="",this._width!==e||t!==this._height){a.style.width=e+"px",a.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(yl).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[yl].dom;var t=new Ym("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var a=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,n=t.dom.height;this.eachLayer(function(f){f.__builtin__?a.drawImage(f.dom,0,0,i,n):f.renderToCanvas&&(a.save(),f.renderToCanvas(a),a.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];ko(a,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})(),aR=P7;function LS(r){r.registerPainter("canvas",aR)}var k7=(function(r){I(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(0)var a;return lr(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var a=new K,i=jt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);a.add(i),i.setStyle(t.lineStyle);var n=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=n==="none"?"circle":n,l=t.itemHeight*.8,u=jt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);a.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=N.color.neutral00,u.style.lineWidth=2),a},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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(Nt),iR=k7;function Vi(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var i=Gn(r,e,t[0]);return i!=null?i+"":null}else if(a){for(var n=[],o=0;o<t.length;o++)n.push(Gn(r,e,t[o]));return n.join(" ")}}function Xm(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!z(e))return e+"";for(var a=[],i=0;i<t.length;i++){var n=r.getDimensionIndex(t[i]);n>=0&&a.push(e[n])}return a.join(" ")}var R7=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this)||this;return o.updateData(t,a,i,n),o}return e.prototype._createSymbol=function(t,a,i,n,o,s){this.removeAll();var l=jt(t,-1,-1,2,2,null,s);l.attr({z2:Q(o,100),culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),l.drift=N7,this._symbolType=t,this.add(l)},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(){Tr(this.childAt(0))},e.prototype.downplay=function(){Dr(this.childAt(0))},e.prototype.setZ=function(t,a){var i=this.childAt(0);i.zlevel=t,i.z=a},e.prototype.setDraggable=function(t,a){var i=this.childAt(0);i.draggable=t,i.cursor=!a&&t?"move":i.cursor},e.prototype.updateData=function(t,a,i,n){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=e.getSymbolZ2(t,a),c=o!==this._symbolType,f=n&&n.disableAnimation;if(c){var p=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,u,p)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(d):wt(h,d,s,a),Re(h)}if(this._updateCommon(t,a,l,i,n),c){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Vt(h,d,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,i,n,o){var s=this.childAt(0),l=t.hostModel,u,c,f,p,h,d,v,m,g;if(n&&(u=n.emphasisItemStyle,c=n.blurItemStyle,f=n.selectItemStyle,p=n.focus,h=n.blurScope,v=n.labelStatesModels,m=n.hoverScale,g=n.cursorStyle,d=n.emphasisDisabled),!n||t.hasItemOption){var y=n&&n.itemModel?n.itemModel:t.getItemModel(a),x=y.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),p=x.get("focus"),h=x.get("blurScope"),d=x.get("disabled"),v=qt(y),m=x.getShallow("scale"),g=y.getShallow("cursor")}var _=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var b=Da(t.getItemVisual(a,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var S=t.getItemVisual(a,"style"),w=S.fill;if(s instanceof se){var D=s.style;s.useStyle(O({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},S))}else s.__isEmptyBrush?s.useStyle(O({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var E=o&&o.useNameLabel;$t(s,v,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:w,defaultOpacity:S.opacity});function L(R){return E?t.getName(R):Vi(t,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var A=s.ensureState("emphasis");A.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var P=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;A.scaleX=this._sizeX*P,A.scaleY=this._sizeY*P,this.setSymbolScale(1),Rt(this,p,h,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,i){var n=this.childAt(0),o=nt(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&Xa(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Xa(n,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Pi(t.getItemVisual(a,"symbolSize"))},e.getSymbolZ2=function(t,a){return t.getItemVisual(a,"z2")},e})(K);function N7(r,e){this.parent.drift(r,e)}var jn=R7;function IS(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function nR(r){return r!=null&&!et(r)&&(r={isIgnore:r}),r||{}}function oR(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:qt(e),cursorStyle:e.get("cursor")}}var O7=(function(){function r(e){this.group=new K,this._SymbolCtor=e||jn}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=nR(t);var a=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=oR(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};n||a.removeAll(),e.diff(n).add(function(f){var p=c(f);if(IS(e,p,f,t)){var h=new o(e,f,l,u);h.setPosition(p),e.setItemGraphicEl(f,h),a.add(h)}}).update(function(f,p){var h=n.getItemGraphicEl(p),d=c(f);if(!IS(e,d,f,t)){a.remove(h);return}var v=e.getItemVisual(f,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==v)a.remove(h),h=new o(e,f,l,u),h.setPosition(d);else{h.updateData(e,f,l,u);var g={x:d[0],y:d[1]};s?h.attr(g):wt(h,g,i)}a.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var p=n.getItemGraphicEl(f);p&&p.fadeOut(function(){a.remove(p)},i)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,i){var n=e._getSymbolPoint(i);a.setPosition(n),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=oR(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=nR(a);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var o=t.getItemLayout(n);if(IS(t,o,n,a)){var s=new this._SymbolCtor(t,n,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(n,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){zr(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,a=this._data;a&&e?a.eachItemGraphicEl(function(i){i.fadeOut(function(){t.remove(i)},a.hostModel)}):t.removeAll()},r})(),mn=O7;function qm(r,e,t){var a=r.getBaseAxis(),i=r.getOtherAxis(a),n=z7(i,t),o=a.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=V(r.dimensions,function(d){return e.mapDimension(d)}),p=!1,h=e.getCalculationInfo("stackResultDimension");return Ca(e,f[0])&&(p=!0,f[0]=h),Ca(e,f[1])&&(p=!0,f[1]=h),{dataDimsForPoint:f,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function z7(r,e){var t=0,a=r.scale.getExtent();return e==="start"?t=a[0]:e==="end"?t=a[1]:yt(e)&&!isNaN(e)?t=e:a[0]>0?t=a[0]:a[1]<0&&(t=a[1]),t}function jm(r,e,t,a){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=t.get(r.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function V7(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,i){t.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function PS(r,e,t,a,i,n,o,s){for(var l=V7(r,e),u=[],c=[],f=[],p=[],h=[],d=[],v=[],m=qm(i,e,o),g=r.getLayout("points")||[],y=e.getLayout("points")||[],x=0;x<l.length;x++){var _=l[x],b=!0,S=void 0,w=void 0;switch(_.cmd){case"=":S=_.idx*2,w=_.idx1*2;var D=g[S],C=g[S+1],M=y[w],E=y[w+1];(isNaN(D)||isNaN(C))&&(D=M,C=E),u.push(D,C),c.push(M,E),f.push(t[S],t[S+1]),p.push(a[w],a[w+1]),v.push(e.getRawIndex(_.idx1));break;case"+":var L=_.idx,A=m.dataDimsForPoint,P=i.dataToPoint([e.get(A[0],L),e.get(A[1],L)]);w=L*2,u.push(P[0],P[1]),c.push(y[w],y[w+1]);var R=jm(m,i,e,L);f.push(R[0],R[1]),p.push(a[w],a[w+1]),v.push(e.getRawIndex(L));break;case"-":b=!1}b&&(h.push(_),d.push(d.length))}d.sort(function(mt,Ht){return v[mt]-v[Ht]});for(var k=u.length,B=Ur(k),U=Ur(k),F=Ur(k),H=Ur(k),G=[],x=0;x<d.length;x++){var Y=d[x],rt=x*2,st=Y*2;B[rt]=u[st],B[rt+1]=u[st+1],U[rt]=c[st],U[rt+1]=c[st+1],F[rt]=f[st],F[rt+1]=f[st+1],H[rt]=p[st],H[rt+1]=p[st+1],G[x]=h[Y]}return{current:B,next:U,stackedOnCurrent:F,stackedOnNext:H,status:G}}var Go=Math.min,Wo=Math.max;function xl(r,e){return isNaN(r)||isNaN(e)}function kS(r,e,t,a,i,n,o,s,l){for(var u,c,f,p,h,d,v=t,m=0;m<a;m++){var g=e[v*2],y=e[v*2+1];if(v>=i||v<0)break;if(xl(g,y)){if(l){v+=n;continue}break}if(v===t)r[n>0?"moveTo":"lineTo"](g,y),f=g,p=y;else{var x=g-u,_=y-c;if(x*x+_*_<.5){v+=n;continue}if(o>0){for(var b=v+n,S=e[b*2],w=e[b*2+1];S===g&&w===y&&m<a;)m++,b+=n,v+=n,S=e[b*2],w=e[b*2+1],g=e[v*2],y=e[v*2+1],x=g-u,_=y-c;var D=m+1;if(l)for(;xl(S,w)&&D<a;)D++,b+=n,S=e[b*2],w=e[b*2+1];var C=.5,M=0,E=0,L=void 0,A=void 0;if(D>=a||xl(S,w))h=g,d=y;else{M=S-u,E=w-c;var P=g-u,R=S-g,k=y-c,B=w-y,U=void 0,F=void 0;if(s==="x"){U=Math.abs(P),F=Math.abs(R);var H=M>0?1:-1;h=g-H*U*o,d=y,L=g+H*F*o,A=y}else if(s==="y"){U=Math.abs(k),F=Math.abs(B);var G=E>0?1:-1;h=g,d=y-G*U*o,L=g,A=y+G*F*o}else U=Math.sqrt(P*P+k*k),F=Math.sqrt(R*R+B*B),C=F/(F+U),h=g-M*o*(1-C),d=y-E*o*(1-C),L=g+M*o*C,A=y+E*o*C,L=Go(L,Wo(S,g)),A=Go(A,Wo(w,y)),L=Wo(L,Go(S,g)),A=Wo(A,Go(w,y)),M=L-g,E=A-y,h=g-M*U/F,d=y-E*U/F,h=Go(h,Wo(u,g)),d=Go(d,Wo(c,y)),h=Wo(h,Go(u,g)),d=Wo(d,Go(c,y)),M=g-h,E=y-d,L=g+M*F/U,A=y+E*F/U}r.bezierCurveTo(f,p,h,d,g,y),f=L,p=A}else r.lineTo(g,y)}u=g,c=y,v+=n}return m}var sR=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),lR=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new sR},e.prototype.buildPath=function(t,a){var i=a.points,n=0,o=i.length/2;if(a.connectNulls){for(;o>0&&xl(i[o*2-2],i[o*2-1]);o--);for(;n<o&&xl(i[n*2],i[n*2+1]);n++);}for(;n<o;)n+=kS(t,i,n,o,o,1,a.smooth,a.smoothMonotone,a.connectNulls)+1},e.prototype.getPointOn=function(t,a){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,n=i.data,o=tr.CMD,s,l,u=a==="x",c=[],f=0;f<n.length;){var p=n[f++],h=void 0,d=void 0,v=void 0,m=void 0,g=void 0,y=void 0,x=void 0;switch(p){case o.M:s=n[f++],l=n[f++];break;case o.L:if(h=n[f++],d=n[f++],x=u?(t-s)/(h-s):(t-l)/(d-l),x<=1&&x>=0){var _=u?(d-l)*x+l:(h-s)*x+s;return u?[t,_]:[_,t]}s=h,l=d;break;case o.C:h=n[f++],d=n[f++],v=n[f++],m=n[f++],g=n[f++],y=n[f++];var b=u?Ss(s,h,v,g,t,c):Ss(l,d,m,y,t,c);if(b>0)for(var S=0;S<b;S++){var w=c[S];if(w<=1&&w>=0){var _=u?Ee(l,d,m,y,w):Ee(s,h,v,g,w);return u?[t,_]:[_,t]}}s=g,l=y;break}}},e})(ft);var B7=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(sR),$m=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new B7},e.prototype.buildPath=function(t,a){var i=a.points,n=a.stackedOnPoints,o=0,s=i.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&xl(i[s*2-2],i[s*2-1]);s--);for(;o<s&&xl(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=kS(t,i,o,s,s,1,a.smooth,l,a.connectNulls);kS(t,n,o+u-1,u,s,-1,a.stackedOnSmooth,l,a.connectNulls),o+=u+1,t.closePath()}},e})(ft);function RS(r,e,t,a,i){var n=r.getArea(),o=n.x,s=n.y,l=n.width,u=n.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 ht({shape:{x:o,y:s,width:l,height:u}});if(e){var p=r.getBaseAxis(),h=p.isHorizontal(),d=p.inverse;h?(d&&(f.shape.x+=l),f.shape.width=0):(d||(f.shape.y+=u),f.shape.height=0);var v=$(i)?function(m){i(m,f)}:null;Vt(f,{shape:{width:l,height:u,x:o,y:s}},t,null,a,v)}return f}function NS(r,e,t){var a=r.getArea(),i=oe(a.r0,1),n=oe(a.r,1),o=new De({shape:{cx:oe(r.cx,1),cy:oe(r.cy,1),r0:i,r:n,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=a.startAngle:o.shape.r=i,Vt(o,{shape:{endAngle:a.endAngle,r:n}},t)}return o}function gn(r,e,t,a,i){if(r){if(r.type==="polar")return NS(r,e,t);if(r.type==="cartesian2d")return RS(r,e,t,a,i)}else return null;return null}function Ma(r,e){return r.type===e}function uR(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function cR(r){for(var e=1/0,t=1/0,a=-1/0,i=-1/0,n=0;n<r.length;){var o=r[n++],s=r[n++];isNaN(o)||(e=Math.min(o,e),a=Math.max(o,a)),isNaN(s)||(t=Math.min(s,t),i=Math.max(s,i))}return[[e,t],[a,i]]}function fR(r,e){var t=cR(r),a=t[0],i=t[1],n=cR(e),o=n[0],s=n[1];return Math.max(Math.abs(a[0]-o[0]),Math.abs(a[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function pR(r){return yt(r)?r:r?.5:0}function U7(r,e,t){if(!t.valueDim)return[];for(var a=e.count(),i=Ur(a*2),n=0;n<a;n++){var o=jm(t,r,e,n);i[n*2]=o[0],i[n*2+1]=o[1]}return i}function Yo(r,e,t,a,i){var n=t.getBaseAxis(),o=n.dim==="x"||n.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],p=[];if(i){for(l=0;l<r.length;l+=2){var h=e||r;!isNaN(h[l])&&!isNaN(h[l+1])&&p.push(r[l],r[l+1])}r=p}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]),a){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var d=(c[o]+f[o])/2,v=[];u[o]=v[o]=d,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 F7(r,e){var t=[],a=r.length,i,n;function o(c,f,p){var h=c.coord,d=(p-h)/(f.coord-h),v=rE(d,[c.color,f.color]);return{coord:p,color:v}}for(var s=0;s<a;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>e){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function H7(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var i,n,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=a[o];break}}if(n){var l=e.getAxis(i),u=V(n.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),c=u.length,f=n.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var p=F7(u,i==="x"?t.getWidth():t.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,v=p[0].coord-d,m=p[h-1].coord+d,g=m-v;if(g<.001)return"transparent";T(p,function(x){x.offset=(x.coord-v)/g}),p.push({offset:h?p[h-1].offset:.5,color:f[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:f[0]||"transparent"});var y=new Za(0,0,0,0,p,!0);return y[i]=v,y[i+"2"]=m,y}}}function G7(r,e,t){var a=r.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=t.getAxesByScale("ordinal")[0];if(n&&!(i&&W7(n,e))){var o=e.mapDimension(n.dim),s={};return T(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function W7(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;o<i;o+=n)if(jn.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>a)return!1;return!0}function Y7(r,e){return isNaN(r)||isNaN(e)}function Z7(r){for(var e=r.length/2;e>0&&Y7(r[e*2-2],r[e*2-1]);e--);return e-1}function hR(r,e){return[r[e*2],r[e*2+1]]}function X7(r,e,t){for(var a=r.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u<a;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){n=o;continue}if(n<=e&&o>=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function dR(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<qe.length;e++)if(r.get([qe[e],"endLabel","show"]))return!0;return!1}function OS(r,e,t,a){if(Ma(e,"cartesian2d")){var i=a.getModel("endLabel"),n=i.get("valueAnimation"),o=a.getData(),s={lastFrameIndex:0},l=dR(a)?function(h,d){r._endLabelOnDuring(h,d,o,s,n,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=RS(e,t,a,function(){var h=r._endLabel;h&&t&&s.originalX!=null&&h.attr({x:s.originalX,y:s.originalY})},l);if(!a.get("clip",!0)){var f=c.shape,p=Math.max(f.width,f.height);u?(f.y-=p,f.height+=p*2):(f.x-=p,f.width+=p*2)}return l&&l(1,c),c}else return NS(e,t,a)}function q7(r,e){var t=e.getBaseAxis(),a=t.isHorizontal(),i=t.inverse,n=a?i?"right":"left":"center",o=a?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||n,verticalAlign:r.get("verticalAlign")||o}}}var j7=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new K,a=new mn;this.group.add(a.group),this._symbolDraw=a,this._lineGroup=t,this._changePolyState=Z(this._changePolyState,this)},e.prototype.render=function(t,a,i){var n=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],f=n.type==="polar",p=this._coordSys,h=this._symbolDraw,d=this._polyline,v=this._polygon,m=this._lineGroup,g=!a.ssr&&t.get("animation"),y=!u.isEmpty(),x=u.get("origin"),_=qm(n,s,x),b=y&&U7(n,s,_),S=t.get("showSymbol"),w=t.get("connectNulls"),D=S&&!f&&G7(t,s,n),C=this._data;C&&C.eachItemGraphicEl(function(mt,Ht){mt.__temp&&(o.remove(mt),C.setItemGraphicEl(Ht,null))}),S||h.remove(),o.add(m);var M=f?!1:t.get("step"),E;n&&n.getArea&&t.get("clip",!0)&&(E=n.getArea(),E.width!=null?(E.x-=.1,E.y-=.1,E.width+=.2,E.height+=.2):E.r0&&(E.r0-=.5,E.r+=.5)),this._clipShapeForSymbol=E;var L=H7(s,n,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&p.type===n.type&&M===this._step))S&&h.updateData(s,{isIgnore:D,clipShape:E,disableAnimation:!0,getSymbolPoint:function(mt){return[c[mt*2],c[mt*2+1]]}}),g&&this._initSymbolLabelAnimation(s,n,E),M&&(b&&(b=Yo(b,c,n,M,w)),c=Yo(c,null,n,M,w)),d=this._newPolyline(c),y?v=this._newPolygon(c,b):v&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,n,Mi(L)),m.setClipPath(OS(this,n,!0,t));else{y&&!v?v=this._newPolygon(c,b):v&&!y&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,n,Mi(L));var A=m.getClipPath();if(A){var P=OS(this,n,!1,t);Vt(A,{shape:P.shape},t)}else m.setClipPath(OS(this,n,!0,t));S&&h.updateData(s,{isIgnore:D,clipShape:E,disableAnimation:!0,getSymbolPoint:function(mt){return[c[mt*2],c[mt*2+1]]}}),(!uR(this._stackedOnPoints,b)||!uR(this._points,c))&&(g?this._doUpdateAnimation(s,b,n,i,M,x,w):(M&&(b&&(b=Yo(b,c,n,M,w)),c=Yo(c,null,n,M,w)),d.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:b})))}var R=t.getModel("emphasis"),k=R.get("focus"),B=R.get("blurScope"),U=R.get("disabled");if(d.useStyle(J(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),te(d,t,"lineStyle"),d.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var F=d.getState("emphasis").style;F.lineWidth=+d.style.lineWidth+1}nt(d).seriesIndex=t.seriesIndex,Rt(d,k,B,U);var H=pR(t.get("smooth")),G=t.get("smoothMonotone");if(d.setShape({smooth:H,smoothMonotone:G,connectNulls:w}),v){var Y=s.getCalculationInfo("stackedOnSeries"),rt=0;v.useStyle(J(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Y&&(rt=pR(Y.get("smooth"))),v.setShape({smooth:H,stackedOnSmooth:rt,smoothMonotone:G,connectNulls:w}),te(v,t,"areaStyle"),nt(v).seriesIndex=t.seriesIndex,Rt(v,k,B,U)}var st=this._changePolyState;s.eachItemGraphicEl(function(mt){mt&&(mt.onHoverStateChange=st)}),this._polyline.onHoverStateChange=st,this._data=s,this._coordSys=n,this._stackedOnPoints=b,this._points=c,this._step=M,this._valueOrigin=x,t.get("triggerLineEvent")&&(this.packEventData(t,d),v&&this.packEventData(t,v))},e.prototype.packEventData=function(t,a){nt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,i,n){var o=t.getData(),s=Ga(o,n);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 p=t.get("zlevel")||0,h=t.get("z")||0;u=new jn(o,s),u.x=c,u.y=f,u.setZ(p,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=p,d.z=h,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Pt.prototype.highlight.call(this,t,a,i,n)},e.prototype.downplay=function(t,a,i,n){var o=t.getData(),s=Ga(o,n);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 Pt.prototype.downplay.call(this,t,a,i,n)},e.prototype._changePolyState=function(t){var a=this._polygon;Ws(this._polyline,t),a&&Ws(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new lR({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new $m({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,a,i){var n,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):a.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");$(c)&&(c=c(null));var f=u.get("animationDelay")||0,p=$(f)?f(null):f;t.eachItemGraphicEl(function(h,d){var v=h;if(v){var m=[h.x,h.y],g=void 0,y=void 0,x=void 0;if(i)if(o){var _=i,b=a.pointToCoord(m);n?(g=_.startAngle,y=_.endAngle,x=-b[1]/180*Math.PI):(g=_.r0,y=_.r,x=b[0])}else{var S=i;n?(g=S.x,y=S.x+S.width,x=h.x):(g=S.y+S.height,y=S.y,x=h.y)}var w=y===g?0:(x-g)/(y-g);l&&(w=1-w);var D=$(f)?f(d):c*w+p,C=v.getSymbolPath(),M=C.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:D}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,i){var n=t.getModel("endLabel");if(dR(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 Dt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Z7(l);c>=0&&($t(s,qt(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:c,defaultText:function(f,p,h){return h!=null?Xm(o,h):Vi(o,f)},enableTextSetter:!0},q7(n,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,i,n,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var f=i.getLayout("points"),p=i.hostModel,h=p.get("connectNulls"),d=s.get("precision"),v=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,x=a.shape,_=y?g?x.x:x.y+x.height:g?x.x+x.width:x.y,b=(g?v:0)*(y?-1:1),S=(g?0:-v)*(y?-1:1),w=g?"x":"y",D=X7(f,_,w),C=D.range,M=C[1]-C[0],E=void 0;if(M>=1){if(M>1&&!h){var L=hR(f,C[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(E=p.getRawValue(C[0]))}else{var L=c.getPointOn(_,w);L&&u.attr({x:L[0]+b,y:L[1]+S});var A=p.getRawValue(C[0]),P=p.getRawValue(C[1]);o&&(E=wd(i,d,A,P,D.t))}n.lastFrameIndex=C[0]}else{var R=t===1||n.lastFrameIndex>0?C[0]:0,L=hR(f,R);o&&(E=p.getRawValue(R)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var k=Bn(u);typeof k.setLabelText=="function"&&k.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(t,a,i,n,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,p=PS(this._data,t,this._stackedOnPoints,a,this._coordSys,i,this._valueOrigin,s),h=p.current,d=p.stackedOnCurrent,v=p.next,m=p.stackedOnNext;if(o&&(d=Yo(p.stackedOnCurrent,p.current,i,o,l),h=Yo(p.current,null,i,o,l),m=Yo(p.stackedOnNext,p.next,i,o,l),v=Yo(p.next,null,i,o,l)),fR(h,v)>3e3||c&&fR(d,m)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:m}));return}u.shape.__points=p.current,u.shape.points=h;var g={shape:{points:v}};p.current!==h&&(g.shape.__points=p.next),u.stopAnimation(),wt(u,g,f),c&&(c.setShape({points:h,stackedOnPoints:d}),c.stopAnimation(),wt(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],x=p.status,_=0;_<x.length;_++){var b=x[_].cmd;if(b==="="){var S=t.getItemGraphicEl(x[_].idx1);S&&y.push({el:S,ptIdx:_})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,D=0;D<y.length;D++){var C=y[D].el,M=y[D].ptIdx*2;C.x=w[M],C.y=w[M+1],C.markRedraw()}})},e.prototype.remove=function(t){var a=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(n,o){n.__temp&&(a.remove(n),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(Pt),vR=j7;function Bi(r,e){return{seriesType:r,plan:Ta(),reset:function(t){var a=t.getData(),i=t.coordinateSystem,n=t.pipelineContext,o=e||n.large;if(i){var s=V(i.dimensions,function(h){return a.mapDimension(h)}).slice(0,2),l=s.length,u=a.getCalculationInfo("stackResultDimension");Ca(a,s[0])&&(s[0]=u),Ca(a,s[1])&&(s[1]=u);var c=a.getStore(),f=a.getDimensionIndex(s[0]),p=a.getDimensionIndex(s[1]);return l&&{progress:function(h,d){for(var v=h.end-h.start,m=o&&Ur(v*l),g=[],y=[],x=h.start,_=0;x<h.end;x++){var b=void 0;if(l===1){var S=c.get(f,x);b=i.dataToPoint(S,null,y)}else g[0]=c.get(f,x),g[1]=c.get(p,x),b=i.dataToPoint(g,null,y);o?(m[_++]=b[0],m[_++]=b[1]):d.setItemLayout(x,b.slice())}o&&d.setLayout("points",m)}}}}}}var $7={average:function(r){for(var e=0,t=0,a=0;a<r.length;a++)isNaN(r[a])||(e+=r[a],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]}},K7=function(r){return Math.round(r.length/2)};function _p(r){return{seriesType:r,reset:function(e,t,a){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=a.getDevicePixelRatio(),p=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/p);if(isFinite(h)&&h>1){n==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h)):n==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/h));var d=void 0;W(n)?d=$7[n]:$(n)&&(d=n),d&&e.setData(i.downSample(i.mapDimension(u.dim),1/h,d,K7))}}}}}function zS(r){r.registerChartView(vR),r.registerSeriesModel(iR),r.registerLayout(Bi("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_p("line"))}var mR=(function(r){I(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,a){return lr(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,i){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(t),s=n.dataToPoint(o);if(i)T(n.getAxes(),function(p,h){if(p.type==="category"&&a!=null){var d=p.getTicksCoords(),v=p.getTickModel().get("alignWithLabel"),m=o[h],g=a[h]==="x1"||a[h]==="y1";if(g&&!v&&(m+=1),d.length<2)return;if(d.length===2){s[h]=p.toGlobalCoord(p.getExtent()[g?1:0]);return}for(var y=void 0,x=void 0,_=1,b=0;b<d.length;b++){var S=d[b].coord,w=b===d.length-1?d[b-1].tickValue+_:d[b].tickValue;if(w===m){x=S;break}else if(w<m)y=S;else if(y!=null&&w>m){x=(S+y)/2;break}b===1&&(_=w-d[0].tickValue)}x==null&&(y?y&&(x=d[d.length-1].coord):x=d[0].coord),s[h]=p.toGlobalCoord(x)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=n.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",defaultBarGap:"10%"},e})(Nt);Nt.registerClass(mR);var Yu=mR;var J7=(function(r){I(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 lr(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"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,i){return i.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ar(Yu.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:N.color.primary,borderWidth:2}},realtimeSort:!1}),e})(Yu),gR=J7;var Q7=(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})(),tX=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new Q7},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,c=a.startAngle,f=a.endAngle,p=a.clockwise,h=Math.PI*2,d=p?f-c<h:c-f<h;d||(c=f-(p?h:-h));var v=Math.cos(c),m=Math.sin(c),g=Math.cos(f),y=Math.sin(f);d?(t.moveTo(v*o+i,m*o+n),t.arc(v*u+i,m*u+n,l,-Math.PI+c,c,!p)):t.moveTo(v*s+i,m*s+n),t.arc(i,n,s,c,f,!p),t.arc(g*u+i,y*u+n,l,f-Math.PI*2,f-Math.PI,!p),o!==0&&t.arc(i,n,o,f,c,p)},e})(ft),Zu=tX;function yR(r,e){e=e||{};var t=e.isRoundCap;return function(a,i,n){var o=i.position;if(!o||o instanceof Array)return Ls(a,i,n);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,p=u.r,h=u.r0,d=(p+h)/2,v=u.startAngle,m=u.endAngle,g=(v+m)/2,y=t?Math.abs(p-h)/2:0,x=Math.cos,_=Math.sin,b=c+p*x(v),S=f+p*_(v),w="left",D="top";switch(s){case"startArc":b=c+(h-l)*x(g),S=f+(h-l)*_(g),w="center",D="top";break;case"insideStartArc":b=c+(h+l)*x(g),S=f+(h+l)*_(g),w="center",D="bottom";break;case"startAngle":b=c+d*x(v)+Km(v,l+y,!1),S=f+d*_(v)+Jm(v,l+y,!1),w="right",D="middle";break;case"insideStartAngle":b=c+d*x(v)+Km(v,-l+y,!1),S=f+d*_(v)+Jm(v,-l+y,!1),w="left",D="middle";break;case"middle":b=c+d*x(g),S=f+d*_(g),w="center",D="middle";break;case"endArc":b=c+(p+l)*x(g),S=f+(p+l)*_(g),w="center",D="bottom";break;case"insideEndArc":b=c+(p-l)*x(g),S=f+(p-l)*_(g),w="center",D="top";break;case"endAngle":b=c+d*x(m)+Km(m,l+y,!0),S=f+d*_(m)+Jm(m,l+y,!0),w="left",D="middle";break;case"insideEndAngle":b=c+d*x(m)+Km(m,-l+y,!0),S=f+d*_(m)+Jm(m,-l+y,!0),w="right",D="middle";break;default:return Ls(a,i,n)}return a=a||{},a.x=b,a.y=S,a.align=w,a.verticalAlign=D,a}}function xR(r,e,t,a){if(yt(a)){r.setTextConfig({rotation:a});return}else if(z(e)){r.setTextConfig({rotation:0});return}var i=r.shape,n=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(n+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=n;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 Km(r,e,t){return e*Math.sin(r)*(t?-1:1)}function Jm(r,e,t){return e*Math.cos(r)*(t?1:-1)}function Gr(r,e,t){var a=r.get("borderRadius");if(a==null)return t?{cornerRadius:0}:null;z(a)||(a=[a,a,a,a]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:V(a,function(n){return hr(n,i)})}}var VS=Math.max,BS=Math.min;function eX(r,e){var t=r.getArea&&r.getArea();if(Ma(r,"cartesian2d")){var a=r.getBaseAxis();if(a.type!=="category"||!a.onBand){var i=e.getLayout("bandWidth");a.isHorizontal()?(t.x-=i,t.width+=i*2):(t.y-=i,t.height+=i*2)}}return t}var rX=(function(r){I(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,a,i,n){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,a,i):this._renderNormal(t,a,i,n))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,a){this._progressiveEls=[],this._incrementalRenderLarge(t,a)},e.prototype.eachRendered=function(t){zr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t,a,i,n){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 p=t.isAnimationEnabled()?t:null,h=aX(t,u);h&&this._enableRealtimeSort(h,s,i);var d=t.get("clip",!0)||h,v=eX(u,s);o.removeClipPath();var m=t.get("roundCap",!0),g=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),x=y.get("borderRadius")||0,_=[],b=this._backgroundEls,S=n&&n.isInitSort,w=n&&n.type==="changeAxisOrder";function D(E){var L=Qm[u.type](s,E);if(!L)return null;var A=cX(u,f,L);return A.useStyle(y.getItemStyle()),u.type==="cartesian2d"?A.setShape("r",x):A.setShape("cornerRadius",x),_[E]=A,A}s.diff(l).add(function(E){var L=s.getItemModel(E),A=Qm[u.type](s,E,L);if(A&&(g&&D(E),!(!s.hasValue(E)||!TR[u.type](A)))){var P=!1;d&&(P=_R[u.type](v,A));var R=bR[u.type](t,s,E,A,f,p,c.model,!1,m);h&&(R.forceLabelAnimation=!0),DR(R,s,E,L,A,t,f,u.type==="polar"),S?R.attr({shape:A}):h?SR(h,p,R,A,E,f,!1,!1):Vt(R,{shape:A},t,E),s.setItemGraphicEl(E,R),o.add(R),R.ignore=P}}).update(function(E,L){var A=s.getItemModel(E),P=Qm[u.type](s,E,A);if(P){if(g){var R=void 0;b.length===0?R=D(L):(R=b[L],R.useStyle(y.getItemStyle()),u.type==="cartesian2d"?R.setShape("r",x):R.setShape("cornerRadius",x),_[E]=R);var k=Qm[u.type](s,E),B=LR(f,k,u);wt(R,{shape:B},p,E)}var U=l.getItemGraphicEl(L);if(!s.hasValue(E)||!TR[u.type](P)){o.remove(U);return}var F=!1;d&&(F=_R[u.type](v,P),F&&o.remove(U));var H=U&&(U.type==="sector"&&m||U.type==="sausage"&&!m);if(H&&(U&&oa(U,t,L),U=null),U?Re(U):U=bR[u.type](t,s,E,P,f,p,c.model,!0,m),h&&(U.forceLabelAnimation=!0),w){var G=U.getTextContent();if(G){var Y=Bn(G);Y.prevValue!=null&&(Y.prevValue=Y.value)}}else DR(U,s,E,A,P,t,f,u.type==="polar");S?U.attr({shape:P}):h?SR(h,p,U,P,E,f,!0,w):wt(U,{shape:P},t,E,null),s.setItemGraphicEl(E,U),U.ignore=F,o.add(U)}}).remove(function(E){var L=l.getItemGraphicEl(E);L&&oa(L,t,E)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new K);C.removeAll();for(var M=0;M<_.length;++M)C.add(_[M]);o.add(C),this._backgroundEls=_,this._data=s},e.prototype._renderLarge=function(t,a,i){this._clear(),MR(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,a){this._removeBackground(),MR(a,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var a=t.get("clip",!0)&&gn(t.coordinateSystem,!1,t),i=this.group;a?i.setClipPath(a):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,a,i){var n=this;if(a.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(a,t,i),this._isFirstFrame=!1;else{var s=function(l){var u=a.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){n._updateSortWithinSameData(a,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,a,i){var n=[];return t.each(t.mapDimension(a.dim),function(o,s){var l=i(s);l=l==null?NaN:l,n.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),n.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:V(n,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,a,i){for(var n=i.scale,o=t.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=n.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,n.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:a(t.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var i=a.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,i,n){if(this._isOrderChangedWithinSameData(t,a,i)){var o=this._dataSort(t,i,a);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,i){var n=a.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){oa(n,t,nt(n).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(Pt),_R={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,n=r.y+r.height,o=VS(e.x,r.x),s=BS(e.x+e.width,i),l=VS(e.y,r.y),u=BS(e.y+e.height,n),c=s<o,f=u<l;return e.x=c&&o>i?s:o,e.y=f&&l>n?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<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 a=e.r;e.r=e.r0,e.r0=a}var i=BS(e.r,r.r),n=VS(e.r0,r.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},bR={cartesian2d:function(r,e,t,a,i,n,o,s,l){var u=new ht({shape:O({},a),z2:1});if(u.__dataIndex=t,u.name="item",n){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(r,e,t,a,i,n,o,s,l){var u=!i&&l?Zu:De,c=new u({shape:a,z2:1});c.name="item";var f=AR(i);if(c.calculateTextPosition=yR(f,{isRoundCap:u===Zu}),n){var p=c.shape,h=i?"r":"endAngle",d={};p[h]=i?a.r0:a.startAngle,d[h]=a[h],(s?wt:Vt)(c,{shape:d},n)}return c}};function aX(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function SR(r,e,t,a,i,n,o,s){var l,u;n?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?wt:Vt)(t,{shape:l},e,i,null);var c=e?r.baseAxis.model:null;(o?wt:Vt)(t,{shape:u},c,i)}function wR(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var iX=["x","y","width","height"],nX=["cx","cy","r","startAngle","endAngle"],TR={cartesian2d:function(r){return!wR(r,iX)},polar:function(r){return!wR(r,nX)}},Qm={cartesian2d:function(r,e,t){var a=r.getItemLayout(e);if(!a)return null;var i=t?sX(t,a):0,n=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function oX(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function AR(r){return(function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}})(r)}function DR(r,e,t,a,i,n,o,s){var l=e.getItemVisual(t,"style");if(s){if(!n.get("roundCap")){var c=r.shape,f=Gr(a.getModel("itemStyle"),c,!0);O(c,f),r.setShape(c)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var p=a.getShallow("cursor");p&&r.attr("cursor",p);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=qt(a);$t(r,d,{labelFetcher:n,labelDataIndex:t,defaultText:Vi(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var v=r.getTextContent();if(s&&v){var m=a.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,xR(r,m==="outside"?h:m,AR(o),a.get(["label","rotate"]))}rv(v,d,n.getRawValue(t),function(y){return Xm(e,y)});var g=a.getModel(["emphasis"]);Rt(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),te(r,a),oX(i)&&(r.style.fill="none",r.style.stroke="none",T(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function sX(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,i,n)}var lX=(function(){function r(){}return r})(),CR=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new lX},e.prototype.buildPath=function(t,a){for(var i=a.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[n]=u,l[o]=i[c+2],s[n]=i[c+n],s[o]=i[c+o],t.rect(s[0],s[1],l[0],l[1])},e})(ft);function MR(r,e,t,a){var i=r.getData(),n=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new CR({shape:{points:u},incremental:!!a,silent:!0,z2:0});c.baseDimIdx=n,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var f=new CR({shape:{points:i.getLayout("largePoints")},incremental:!!a,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=n,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,nt(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",ER),f.on("mousemove",ER)),t&&t.push(f)}var ER=Wf(function(r){var e=this,t=uX(e,r.offsetX,r.offsetY);nt(e).dataIndex=t>=0?t:null},30,!1);function uX(r,e,t){for(var a=r.baseDimIdx,i=1-a,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=n.length/3;c<f;c++){var p=c*3;if(l[a]=u,l[i]=n[p+2],s[a]=n[p+a],s[i]=n[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function LR(r,e,t){if(Ma(t,"cartesian2d")){var a=e,i=t.getArea();return{x:r?a.x:i.x,y:r?i.y:a.y,width:r?a.width:i.width,height:r?i.height:a.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:n.r0,r:r?i.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function cX(r,e,t){var a=r.type==="polar"?De:ht;return new a({shape:LR(e,t,r),silent:!0,z2:0})}var IR=rX;function US(r){r.registerChartView(IR),r.registerSeriesModel(gR),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(_m,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bm("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_p("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var PR=Math.PI*2,tg=Math.PI/180;function FS(r,e,t){e.eachSeriesByType(r,function(a){var i=a.getData(),n=i.mapDimension("value"),o=Cv(a,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,p=-a.get("startAngle")*tg,h=a.get("endAngle"),d=a.get("padAngle")*tg;h=h==="auto"?p-PR:-h*tg;var v=a.get("minAngle")*tg,m=v+d,g=0;i.each(n,function(B){!isNaN(B)&&g++});var y=i.getSum(n),x=Math.PI/(y||g)*2,_=a.get("clockwise"),b=a.get("roseType"),S=a.get("stillShowZeroSum"),w=i.getDataExtent(n);w[0]=0;var D=_?1:-1,C=[p,h],M=D*d/2;Us(C,!_),p=C[0],h=C[1];var E=HS(a);E.startAngle=p,E.endAngle=h,E.clockwise=_,E.cx=s,E.cy=l,E.r=u,E.r0=c;var L=Math.abs(h-p),A=L,P=0,R=p;if(i.setLayout({viewRect:f,r:u}),i.each(n,function(B,U){var F;if(isNaN(B)){i.setItemLayout(U,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:s,cy:l,r0:c,r:b?NaN:u});return}b!=="area"?F=y===0&&S?x:B*x:F=L/g,F<m?(F=m,A-=m):P+=B;var H=R+D*F,G=0,Y=0;d>F?(G=R+D*F/2,Y=G):(G=R+M,Y=H-M),i.setItemLayout(U,{angle:F,startAngle:G,endAngle:Y,clockwise:_,cx:s,cy:l,r0:c,r:b?zt(B,w,[c,u]):u}),R=H}),A<PR&&g)if(A<=.001){var k=L/g;i.each(n,function(B,U){if(!isNaN(B)){var F=i.getItemLayout(U);F.angle=k;var H=0,G=0;k<d?(H=p+D*(U+1/2)*k,G=H):(H=p+D*U*k+M,G=p+D*(U+1)*k-M),F.startAngle=H,F.endAngle=G}})}else x=A/P,R=p,i.each(n,function(B,U){if(!isNaN(B)){var F=i.getItemLayout(U),H=F.angle===m?m:B*x,G=0,Y=0;H<d?(G=R+D*H/2,Y=G):(G=R+M,Y=R+D*H-M),F.startAngle=G,F.endAngle=Y,R+=D*H}})})}var HS=ot();function Ea(r){return{seriesType:r,reset:function(e,t){var a=t.findComponents({mainType:"legend"});if(!(!a||!a.length)){var i=e.getData();i.filterSelf(function(n){for(var o=i.getName(n),s=0;s<a.length;s++)if(!a[s].isSelected(o))return!1;return!0})}}}}var fX=Math.PI/180;function kR(r,e,t,a,i,n,o,s,l,u){if(r.length<2)return;function c(v){for(var m=v.rB,g=m*m,y=0;y<v.list.length;y++){var x=v.list[y],_=Math.abs(x.label.y-t),b=a+x.len,S=b*b,w=Math.sqrt(Math.abs((1-_*_/g)*S)),D=e+(w+x.len2)*i,C=D-x.label.x,M=x.targetTextWidth-C*i;NR(x,M,!0),x.label.x=D}}function f(v){for(var m={list:[],maxY:0},g={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var x=v[y],_=x.label.y>t?g:m,b=Math.abs(x.label.y-t);if(b>=_.maxY){var S=x.label.x-e-x.len2*i,w=a+x.len,D=Math.abs(S)<w?Math.sqrt(b*b/(1-S*S/w/w)):w;_.rB=D,_.maxY=b}_.list.push(x)}c(m),c(g)}for(var p=r.length,h=0;h<p;h++)if(r[h].position==="outer"&&r[h].labelAlignTo==="labelLine"){var d=r[h].label.x-u;r[h].linePoints[1][0]+=d,r[h].label.x=u}pp(r,1,l,l+o)&&f(r)}function pX(r,e,t,a,i,n,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=0;p<r.length;p++){var h=r[p].label;GS(r[p])||(h.x<e?(c=Math.min(c,h.x),l.push(r[p])):(f=Math.max(f,h.x),u.push(r[p])))}for(var p=0;p<r.length;p++){var d=r[p];if(!GS(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var h=d.label,v=d.linePoints,m=void 0;d.labelAlignTo==="edge"?h.x<e?m=v[2][0]-d.labelDistance-o-d.edgeDistance:m=o+i-d.edgeDistance-v[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?h.x<e?m=c-o-d.bleedMargin:m=o+i-f-d.bleedMargin:h.x<e?m=h.x-o-d.bleedMargin:m=o+i-h.x-d.bleedMargin,d.targetTextWidth=m,NR(d,m,!1)}}kR(u,e,t,a,1,i,n,o,s,f),kR(l,e,t,a,-1,i,n,o,s,c);for(var p=0;p<r.length;p++){var d=r[p];if(!GS(d)&&d.linePoints){var h=d.label,v=d.linePoints,g=d.labelAlignTo==="edge",y=h.style.padding,x=y?y[1]+y[3]:0,_=h.style.backgroundColor?0:x,b=d.rect.width+_,S=v[1][0]-v[2][0];g?h.x<e?v[2][0]=o+d.edgeDistance+b+d.labelDistance:v[2][0]=o+i-d.edgeDistance-b-d.labelDistance:(h.x<e?v[2][0]=h.x+d.labelDistance:v[2][0]=h.x-d.labelDistance,v[1][0]=v[2][0]+S),v[1][1]=v[2][1]=h.y}}}function NR(r,e,t){if(r.labelStyleWidth==null){var a=r.label,i=a.style,n=r.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=n.width+(o?0:l);if(e<c||t){if(u&&u.match("break")){a.setStyle("backgroundColor",null),a.setStyle("width",e-l);var f=a.getBoundingRect();a.setStyle("width",Math.ceil(f.width)),a.setStyle("backgroundColor",o)}else{var p=e-l,h=e<c?p:t?p>r.unconstrainedWidth?null:p:null;a.setStyle("width",h)}OR(n,a)}}}function OR(r,e){RR.rect=r,nS(RR,e,hX)}var hX={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},RR={};function GS(r){return r.position==="center"}function WS(r){var e=r.getData(),t=[],a,i,n=!1,o=(r.get("minShowLabelAngle")||0)*fX,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,p=s.height;function h(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}e.each(function(S){var w=e.getItemGraphicEl(S),D=w.shape,C=w.getTextContent(),M=w.getTextGuideLine(),E=e.getItemModel(S),L=E.getModel("label"),A=L.get("position")||E.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),k=j(L.get("edgeDistance"),u),B=L.get("bleedMargin");B==null&&(B=Math.min(u,p)>200?10:2);var U=E.getModel("labelLine"),F=U.get("length");F=j(F,u);var H=U.get("length2");if(H=j(H,u),Math.abs(D.endAngle-D.startAngle)<o){T(C.states,h),C.ignore=!0,M&&(T(M.states,h),M.ignore=!0);return}if(d(C)){var G=(D.startAngle+D.endAngle)/2,Y=Math.cos(G),rt=Math.sin(G),st,mt,Ht,Kt;a=D.cx,i=D.cy;var Et=A==="inside"||A==="inner";if(A==="center")st=D.cx,mt=D.cy,Kt="center";else{var vt=(Et?(D.r+D.r0)/2*Y:D.r*Y)+a,It=(Et?(D.r+D.r0)/2*rt:D.r*rt)+i;if(st=vt+Y*3,mt=It+rt*3,!Et){var ct=vt+Y*(F+l-D.r),Ct=It+rt*(F+l-D.r),ae=ct+(Y<0?-1:1)*H,Wt=Ct;R==="edge"?st=Y<0?c+k:c+u-k:st=ae+(Y<0?-P:P),mt=Wt,Ht=[[vt,It],[ct,Ct],[ae,Wt]]}Kt=Et?"center":R==="edge"?Y>0?"right":"left":Y>0?"left":"right"}var Qt=Math.PI,ue=0,$e=L.get("rotate");if(yt($e))ue=$e*(Qt/180);else if(A==="center")ue=0;else if($e==="radial"||$e===!0){var ma=Y<0?-G+Qt:-G;ue=ma}else if($e==="tangential"&&A!=="outside"&&A!=="outer"){var Xr=Math.atan2(Y,rt);Xr<0&&(Xr=Qt*2+Xr);var us=rt>0;us&&(Xr=Qt+Xr),ue=Xr-Qt}if(n=!!ue,C.x=st,C.y=mt,C.rotation=ue,C.setStyle({verticalAlign:"middle"}),Et){C.setStyle({align:Kt});var e0=C.states.select;e0&&(e0.x+=C.x,e0.y+=C.y)}else{var Ul=new at(0,0,0,0);OR(Ul,C),t.push({label:C,labelLine:M,position:A,len:F,len2:H,minTurnAngle:U.get("minTurnAngle"),maxSurfaceAngle:U.get("maxSurfaceAngle"),surfaceNormal:new pt(Y,rt),linePoints:Ht,textAlign:Kt,labelDistance:P,labelAlignTo:R,edgeDistance:k,bleedMargin:B,rect:Ul,unconstrainedWidth:Ul.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:Et})}}),!n&&r.get("avoidLabelOverlap")&&pX(t,a,i,l,u,p,c,f);for(var v=0;v<t.length;v++){var m=t[v],g=m.label,y=m.labelLine,x=isNaN(g.x)||isNaN(g.y);if(g){g.setStyle({align:m.textAlign}),x&&(T(g.states,h),g.ignore=!0);var _=g.states.select;_&&(_.x+=g.x,_.y+=g.y)}if(y){var b=m.linePoints;x||!b?(T(y.states,h),y.ignore=!0):(aS(b,m.minTurnAngle),D2(b,m.surfaceNormal,m.maxSurfaceAngle),y.setShape({points:b}),g.__hostTarget.textGuideLineConfig={anchor:new pt(b[0][0],b[0][1])})}}}var dX=(function(r){I(e,r);function e(t,a,i){var n=r.call(this)||this;n.z2=2;var o=new Dt;return n.setTextContent(o),n.updateData(t,a,i,!0),n}return e.prototype.updateData=function(t,a,i,n){var o=this,s=t.hostModel,l=t.getItemModel(a),u=l.getModel("emphasis"),c=t.getItemLayout(a),f=O(Gr(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(n){o.setShape(f);var p=s.getShallow("animationType");s.ecModel.ssr?(Vt(o,{scaleX:0,scaleY:0},s,{dataIndex:a,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):p==="scale"?(o.shape.r=c.r0,Vt(o,{shape:{r:c.r}},s,a)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Vt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,a)):(o.shape.endAngle=c.startAngle,wt(o,{shape:{endAngle:c.endAngle}},s,a))}else Re(o),wt(o,{shape:f},s,a);o.useStyle(t.getItemVisual(a,"style")),te(o,l);var h=(c.startAngle+c.endAngle)/2,d=s.get("selectedOffset"),v=Math.cos(h)*d,m=Math.sin(h)*d,g=l.getShallow("cursor");g&&o.attr("cursor",g),this._updateLabel(s,t,a),o.ensureState("emphasis").shape=O({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Gr(u.getModel("itemStyle"),c)),O(o.ensureState("select"),{x:v,y:m,shape:Gr(l.getModel(["select","itemStyle"]),c)}),O(o.ensureState("blur"),{shape:Gr(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),x=o.getTextContent();y&&O(y.ensureState("select"),{x:v,y:m}),O(x.ensureState("select"),{x:v,y:m}),Rt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a,i){var n=this,o=a.getItemModel(i),s=o.getModel("labelLine"),l=a.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;$t(n,qt(o),{labelFetcher:a.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(i,"normal")||a.getName(i)});var f=n.getTextContent();n.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var p=o.get(["label","position"]);if(p!=="outside"&&p!=="outer")n.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new he,this.setTextGuideLine(h)),Fu(this,Hu(o),{stroke:u,opacity:Te(s.get(["lineStyle","opacity"]),c,1)})}},e})(De),vX=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,i,n){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 p=HS(t),h=new De({shape:tt(p)});h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(d){var v=new dX(o,d,u);o.setItemGraphicEl(d,v),l.add(v)}).update(function(d,v){var m=s.getItemGraphicEl(v);m.updateData(o,d,u),m.off("click"),l.add(m),o.setItemGraphicEl(d,m)}).remove(function(d){var v=s.getItemGraphicEl(d);oa(v,t,d)}).execute(),WS(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="pie",e})(Pt),zR=vX;function Aa(r,e,t){e=z(e)&&{coordDimensions:e}||O({encodeDefine:r.getEncode()},e);var a=r.getSource(),i=Ri(a,e).dimensions,n=new we(i,r);return n.initData(a,t),n}var mX=(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 a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r})(),ai=mX;var gX=ot(),VR=(function(r){I(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 ai(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Aa(this,{coordDimensions:["value"],encodeDefaulter:ut(Cu,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),i=gX(a),n=i.seats;if(!n){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),n=i.seats=RE(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=n[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){ba(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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})(Nt);fI({fullType:VR.type,getCoord2:function(r){return r.getShallow("center")}});var BR=VR;function YS(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(i){var n=a.mapDimension("value"),o=a.get(n,i);return!(yt(o)&&!isNaN(o)&&o<0)})}}}function ZS(r){r.registerChartView(zR),r.registerSeriesModel(BR),em("pie",r.registerAction),r.registerLayout(ut(FS,"pie")),r.registerProcessor(Ea("pie")),r.registerProcessor(YS("pie"))}var yX=(function(r){I(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,a){return lr(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,a,i){return i.point(a.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","matrix"],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:N.color.primary}},universalTransition:{divideShape:"clone"}},e})(Nt),UR=yX;var FR=4,xX=(function(){function r(){}return r})(),_X=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new xX},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var i=a.points,n=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]<FR,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var p=i[f++],h=i[f++];isNaN(p)||isNaN(h)||c&&!c.contain(p,h)||(s.x=p-n[0]/2,s.y=h-n[1]/2,s.width=n[0],s.height=n[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,a=t.points,i=t.size,n=this._ctx,o=this.softClipShape,s;if(n){for(s=this._off;s<a.length;){var l=a[s++],u=a[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||n.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,a){for(var i=this.shape,n=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=n.length/2-1;u>=0;u--){var c=u*2,f=n[c]-s/2,p=n[c+1]-l/2;if(t>=f&&a>=p&&t<=f+s&&a<=p+l)return u}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.points,n=a.size,o=n[0],s=n[1],l=1/0,u=1/0,c=-1/0,f=-1/0,p=0;p<i.length;){var h=i[p++],d=i[p++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(d,u),f=Math.max(d,f)}t=this._rect=new at(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e})(ft),bX=(function(){function r(){this.group=new K}return r.prototype.updateData=function(e,t){this._clear();var a=this._create();a.setShape({points:e.getLayout("points")}),this._setCommon(a,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var i=(a.endIndex-a.startIndex)*2,n=a.startIndex*4*2;t=new Float32Array(t.buffer,n,i)}a.setShape("points",t),a.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,a){var i=this._newAdded[0],n=t.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+n.length);l.set(o),l.set(n,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:n}),this._setCommon(u,t,a)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new _X({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,a){var i=t.hostModel;a=a||{};var n=t.getVisual("symbolSize");e.setShape("size",n instanceof Array?n:[n,n]),e.softClipShape=a.clipShape||null,e.symbolProxy=jt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<FR;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=nt(e);u.seriesIndex=i.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})(),HR=bX;var SX=(function(r){I(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,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=Bi("").reset(t,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var i=this._symbolDraw,n=a.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new HR:new mn,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(Pt),GR=SX;var XS={left:0,right:0,top:0,bottom:0},bp=["25%","25%"],wX=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,a){var i=la(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&t.outerBounds&&mr(t.outerBounds,i)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&mr(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:XS,outerBoundsContain:"all",outerBoundsClampWidth:bp[0],outerBoundsClampHeight:bp[1],backgroundColor:N.color.transparent,borderWidth:1,borderColor:N.color.neutral30},e})(St),WR=wX;var eg=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Yt).models[0]},e.type="cartesian2dAxis",e})(St);Jt(eg,pn);var YR={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:N.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:N.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:N.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[N.color.backgroundTint,N.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:N.color.neutral00,borderColor:N.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},TX=dt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},YR),qS=dt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:N.color.axisMinorSplitLine,width:1}}},YR),DX=dt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},qS),CX=J({logBase:10},qS),rg={category:TX,value:qS,time:DX,log:CX};var ZR={value:1,category:1,time:1,log:1};var jS=null;function XR(r){jS||(jS=r)}function $n(){return jS}function Ui(r,e,t,a){T(ZR,function(i,n){var o=dt(dt({},rg[n],!0),a,!0),s=(function(l){I(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+n,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var p=Eo(this),h=p?la(c):{},d=f.getTheme();dt(c,d.get(n+"Axis")),dt(c,this.getDefaultOption()),c.type=qR(c),p&&mr(c,h,p)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=zo.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.prototype.updateAxisBreaks=function(c){var f=$n();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+n,u.defaultOption=o,u})(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",qR)}function qR(r){return r.type||(r.data?"category":"value")}var MX=(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 V(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),At(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r})(),jR=MX;var ag=["x","y"];function $R(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var EX=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=ag,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!$R(t)||!$R(a))){var i=t.getExtent(),n=a.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,p=o[0]-i[0]*c,h=o[1]-n[0]*f,d=this._transform=[c,0,0,f,p,h];this._invTransform=Fe([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),i=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&i.contain(i.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,a){var i=this.dataToPoint(t),n=this.dataToPoint(a),o=this.getArea(),s=new at(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return ce(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,a)),i[1]=l.toGlobalCoord(l.dataToCoord(o,a)),i},e.prototype.clampData=function(t,a){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a,i){if(i=i||[],this._invTransform)return ce(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),a),i[1]=o.coordToData(o.toLocalCoord(t[1]),a),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),n=Math.min(a[0],a[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(a[0],a[1])-n+t,l=Math.max(i[0],i[1])-o+t;return new at(n,o,s,l)},e})(jR),KR=EX;var AX=(function(r){I(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.index=0,s.type=n||"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 a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(ur),ig=AX;var Xu="expandAxisBreak",$S="collapseAxisBreak",KS="toggleAxisBreak",JS="axisbreakchanged",LX={type:Xu,event:JS,update:"update",refineEvent:QS},IX={type:$S,event:JS,update:"update",refineEvent:QS},PX={type:KS,event:JS,update:"update",refineEvent:QS};function QS(r,e,t,a){var i=[];return T(r,function(n){i=i.concat(n.eventBreaks)}),{eventContent:{breaks:i}}}function JR(r){r.registerAction(LX,e),r.registerAction(IX,e),r.registerAction(PX,e);function e(t,a){var i=[],n=ji(a,t);function o(s,l){T(n[s],function(u){var c=u.updateAxisBreaks(t);T(c.breaks,function(f){var p;i.push(J((p={},p[l]=u.componentIndex,p),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Zo=Math.PI,kX=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],RX=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],bl=ot(),eN=ot(),ew=(function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,a=e.componentIndex,i=this.recordMap,n=i[t]||(i[t]=[]);return n[a]||(n[a]={ready:{}})},r})();function NX(r,e,t,a){var i=t.axis,n=e.ensureRecord(t),o=[],s,l=iw(r.axisName)&&Fo(r.nameLocation);T(a,function(d){var v=zi(d);if(!(!v||v.label.ignore)){o.push(v);var m=n.transGroup;l&&(m.transform?Fe(Sp,m.transform):uo(Sp),v.transform&&fr(Sp,Sp,v.transform),at.copy(ng,v.localRect),ng.applyTransform(Sp),s?s.union(ng):at.copy(s=new at(0,0,0,0),ng))}});var u=Math.abs(n.dirVec.x)>.1?"x":"y",c=n.transGroup[u];if(o.sort(function(d,v){return Math.abs(d.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var f=i.getExtent(),p=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-p;s.union(new at(p,0,h,1))}n.stOccupiedRect=s,n.labelInfoList=o}var Sp=fe(),ng=new at(0,0,0,0),rw=function(r,e,t,a,i,n){if(Fo(r.nameLocation)){var o=n.stOccupiedRect;o&&rN(L2({},o,n.transGroup.transform),a,i)}else aw(n.labelInfoList,n.dirVec,a,i)};function rN(r,e,t){var a=new pt;Gu(r,e,a,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&cp(e,a)}function aw(r,e,t,a){for(var i=pt.dot(a,e)>=0,n=0,o=r.length;n<o;n++){var s=r[i?n:o-1-n];s.label.ignore||rN(s,t,a)}}var _l=(function(){function r(e,t,a,i){this.group=new K,this._axisModel=e,this._api=t,this._local={},this._shared=i||new ew(rw),this._resetCfgDetermined(a)}return r.prototype.updateCfg=function(e){if(0)var t;var a=this._cfg.raw;a.position=e.position,a.labelOffset=e.labelOffset,this._resetCfgDetermined(a)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(e){var t=this._axisModel,a=t.getDefaultOption?t.getDefaultOption():{},i=Q(e.axisName,t.get("name")),n=t.get("nameMoveOverlap");(n==null||n==="auto")&&(n=Q(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:Q(e.nameDirection,1),tickDirection:Q(e.tickDirection,1),labelDirection:Q(e.labelDirection,1),labelOffset:Q(e.labelOffset,0),silent:Q(e.silent,!0),axisName:i,nameLocation:Te(t.get("nameLocation"),a.nameLocation,"end"),shouldNameMoveOverlap:iw(i)&&n,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=o;var s=new K({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(t);l.transGroup=this._transformGroup,l.dirVec=new pt(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(e,t){var a=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),T(OX,function(i){e[i]&&zX[i](a._cfg,a._local,a._shared,a._axisModel,a.group,a._transformGroup,a._api,t||{})}),this},r.innerTextLayout=function(e,t,a){var i=vx(t-e),n,o;return Is(i)?(o=a>0?"top":"bottom",n="center"):Is(i-Zo)?(o=a>0?"bottom":"top",n="center"):(o="middle",i>0&&i<Zo?n=a>0?"right":"left":n=a>0?"left":"right"),{rotation:i,textAlign:n,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})(),OX=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],zX={axisLine:function(r,e,t,a,i,n,o){if(0)var s;var l=a.get(["axisLine","show"]);if(l==="auto"&&(l=!0,r.raw.axisLineAutoShow!=null&&(l=!!r.raw.axisLineAutoShow)),!!l){var u=a.axis.getExtent(),c=n.transform,f=[u[0],0],p=[u[1],0],h=f[0]>p[0];c&&(ce(f,f,c),ce(p,p,c));var d=O({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())$n().buildAxisBreakLine(a,i,n,v);else{var m=new le(O({shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]}},v));On(m.shape,m.style.lineWidth),m.anid="line",i.add(m)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);W(g)&&(g=[g,g]),(W(y)||yt(y))&&(y=[y,y]);var x=Da(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],b=y[1];T([{rotate:r.rotation+Math.PI/2,offset:x[0],r:0},{rotate:r.rotation-Math.PI/2,offset:x[1],r:Math.sqrt((f[0]-p[0])*(f[0]-p[0])+(f[1]-p[1])*(f[1]-p[1]))}],function(S,w){if(g[w]!=="none"&&g[w]!=null){var D=jt(g[w],-_/2,-b/2,_,b,d.stroke,!0),C=S.r+S.offset,M=h?p:f;D.attr({rotation:S.rotate,x:M[0]+C*Math.cos(r.rotation),y:M[1]-C*Math.sin(r.rotation),silent:!0,z2:11}),i.add(D)}})}}},axisTickLabelEstimate:function(r,e,t,a,i,n,o,s){if(0)var l;var u=tN(e,i,s);u&&QR(r,e,t,a,i,n,o,ha.estimate)},axisTickLabelDetermine:function(r,e,t,a,i,n,o,s){if(0)var l;var u=tN(e,i,s);u&&QR(r,e,t,a,i,n,o,ha.determine);var c=FX(r,i,n,a);UX(r,e.labelLayoutList,c),HX(r,i,n,a,r.tickDirection)},axisName:function(r,e,t,a,i,n,o,s){var l=t.ensureRecord(a);if(0)var u;e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var c=r.axisName;if(iw(c)){var f=r.nameLocation,p=r.nameDirection,h=a.getModel("nameTextStyle"),d=a.get("nameGap")||0,v=a.axis.getExtent(),m=a.axis.inverse?-1:1,g=new pt(0,0),y=new pt(0,0);f==="start"?(g.x=v[0]-m*d,y.x=-m):f==="end"?(g.x=v[1]+m*d,y.x=m):(g.x=(v[0]+v[1])/2,g.y=r.labelOffset+p*d,y.y=p);var x=fe();y.transform(Sr(x,x,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*Zo/180);var b,S;Fo(f)?b=_l.innerTextLayout(r.rotation,_!=null?_:r.rotation,p):(b=VX(r.rotation,f,_||0,v),S=r.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(b.rotation)),!isFinite(S)&&(S=null)));var w=h.getFont(),D=a.get("nameTruncate",!0)||{},C=D.ellipsis,M=de(r.raw.nameTruncateMaxWidth,D.maxWidth,S),E=s.nameMarginLevel||0,L=new Dt({x:g.x,y:g.y,rotation:b.rotation,silent:_l.isLabelSilent(a),style:Gt(h,{text:c,font:w,overflow:"truncate",width:M,ellipsis:C,fill:h.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(Er({el:L,componentModel:a,itemName:c}),L.__fullText=c,L.anid="name",a.get("triggerEvent")){var A=_l.makeAxisEventDataBase(a);A.targetType="axisName",A.name=c,nt(L).eventData=A}n.add(L),L.updateTransform(),e.nameEl=L;var P=l.nameLayout=zi({label:L,priority:L.z2,defaultAttr:{ignore:L.ignore},marginDefault:Fo(f)?kX[E]:RX[E]});if(l.nameLocation=f,i.add(L),L.decomposeTransform(),r.shouldNameMoveOverlap&&P){var R=t.ensureRecord(a);t.resolveAxisNameOverlap(r,t,a,P,y,R)}}}};function QR(r,e,t,a,i,n,o,s){iN(e)||GX(r,e,i,s,a,o);var l=e.labelLayoutList;WX(r,a,l,n),XX(a,r.rotation,l);var u=r.optionHideOverlap;BX(a,l,u),u&&Om(At(l,function(c){return c&&!c.label.ignore})),NX(r,t,a,l)}function VX(r,e,t,a){var i=vx(t-r),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Is(i-Zo/2)?(o=l?"bottom":"top",n="center"):Is(i-Zo*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<Zo*1.5&&i>Zo/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function BX(r,e,t){if(Lm(r.axis))return;function a(s,l,u){var c=zi(e[l]),f=zi(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){wp(c.label);return}if(f.suggestIgnore){wp(f.label);return}var p=.1;if(!t){var h=[0,0,0,0];c=fp({marginForce:h},c),f=fp({marginForce:h},f)}Gu(c,f,null,{touchThreshold:p})&&wp(s?f.label:c.label)}}var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]),o=e.length;a(i,0,1),a(n,o-1,o-2)}function UX(r,e,t){r.showMinorTicks||T(e,function(a){if(a&&a.label.ignore)for(var i=0;i<t.length;i++){var n=t[i],o=eN(n),s=bl(a.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){wp(n);return}}})}function wp(r){r&&(r.ignore=!0)}function aN(r,e,t,a,i){for(var n=[],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&&(ce(o,o,e),ce(s,s,e));var c=new le({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,autoBatch:!0,silent:!0});On(c.shape,c.style.lineWidth),c.anid=i+"_"+r[l].tickValue,n.push(c);var f=eN(c);f.onBand=!!r[l].onBand,f.tickValue=r[l].tickValue}return n}function FX(r,e,t,a){var i=a.axis,n=a.getModel("axisTick"),o=n.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=n.getModel("lineStyle"),l=r.tickDirection*n.get("length"),u=i.getTicksCoords(),c=aN(u,t.transform,l,J(s.getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)e.add(c[f]);return c}function HX(r,e,t,a,i){var n=a.axis,o=a.getModel("minorTick");if(!(!r.showMinorTicks||n.scale.isBlank())){var s=n.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=J(l.getLineStyle(),J(a.getModel("axisTick").getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var p=aN(s[f],t.transform,u,c,"minorticks_"+f),h=0;h<p.length;h++)e.add(p[h])}}function tN(r,e,t){if(iN(r)){var a=r.axisLabelsCreationContext,i=a.out.noPxChangeTryDetermine;if(t.noPxChange){for(var n=!0,o=0;o<i.length;o++)n=n&&i[o]();if(n)return!1}i.length&&(e.remove(r.labelGroup),tw(r,null,null,null))}return!0}function GX(r,e,t,a,i,n){var o=i.axis,s=de(r.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new K;t.add(l);var u=Uu(a);if(!s||o.scale.isBlank()){tw(e,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),p=(de(r.raw.labelRotate,c.get("rotate"))||0)*Zo/180,h=_l.innerTextLayout(r.rotation,p,r.labelDirection),d=i.getCategories&&i.getCategories(!0),v=[],m=i.get("triggerEvent"),g=1/0,y=-1/0;T(f,function(_,b){var S,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(_.tickValue):_.tickValue,D=_.formattedLabel,C=_.rawLabel,M=c;if(d&&d[w]){var E=d[w];et(E)&&E.textStyle&&(M=new Mt(E.textStyle,c,i.ecModel))}var L=M.getTextColor()||i.get(["axisLine","lineStyle","color"]),A=M.getShallow("align",!0)||h.textAlign,P=Q(M.getShallow("alignMinLabel",!0),A),R=Q(M.getShallow("alignMaxLabel",!0),A),k=M.getShallow("verticalAlign",!0)||M.getShallow("baseline",!0)||h.textVerticalAlign,B=Q(M.getShallow("verticalAlignMinLabel",!0),k),U=Q(M.getShallow("verticalAlignMaxLabel",!0),k),F=10+(((S=_.time)===null||S===void 0?void 0:S.level)||0);g=Math.min(g,F),y=Math.max(y,F);var H=new Dt({x:0,y:0,rotation:0,silent:_l.isLabelSilent(i),z2:F,style:Gt(M,{text:D,align:b===0?P:b===f.length-1?R:A,verticalAlign:b===0?B:b===f.length-1?U:k,fill:$(L)?L(o.type==="category"?C:o.type==="value"?w+"":w,b):L})});H.anid="label_"+w;var G=bl(H);if(G.break=_.break,G.tickValue=w,G.layoutRotation=h.rotation,Er({el:H,componentModel:i,itemName:D,formatterParamsExtra:{isTruncated:function(){return H.isTruncated},value:C,tickIndex:b}}),m){var Y=_l.makeAxisEventDataBase(i);Y.targetType="axisLabel",Y.value=C,Y.tickIndex=b,_.break&&(Y.break={start:_.break.parsedBreak.vmin,end:_.break.parsedBreak.vmax}),o.type==="category"&&(Y.dataIndex=w),nt(H).eventData=Y,_.break&&ZX(i,n,H,_.break)}v.push(H),l.add(H)});var x=V(v,function(_){return{label:_,priority:bl(_).break?_.z2+(y-g+1):_.z2,defaultAttr:{ignore:_.ignore}}});tw(e,x,l,u)}function iN(r){return!!r.labelLayoutList}function tw(r,e,t,a){r.labelLayoutList=e,r.labelGroup=t,r.axisLabelsCreationContext=a}function WX(r,e,t,a){var i=e.get(["axisLabel","margin"]);T(t,function(n,o){var s=zi(n);if(s){var l=s.label,u=bl(l);s.suggestIgnore=l.ignore,l.ignore=!1,iu(Kn,YX),Kn.x=e.axis.dataToCoord(u.tickValue),Kn.y=r.labelOffset+r.labelDirection*i,Kn.rotation=u.layoutRotation,a.add(Kn),Kn.updateTransform(),a.remove(Kn),Kn.decomposeTransform(),iu(l,Kn),l.markRedraw(),up(s,!0),zi(s)}})}var Kn=new ht,YX=new ht;function iw(r){return!!r}function ZX(r,e,t,a){t.on("click",function(i){var n={type:Xu,breaks:[{start:a.parsedBreak.breakOption.start,end:a.parsedBreak.breakOption.end}]};n[r.axis.dim+"AxisIndex"]=r.componentIndex,e.dispatchAction(n)})}function XX(r,e,t){var a=me();if(a){var i=a.retrieveAxisBreakPairs(t,function(o){return o&&bl(o.label).break},!0),n=r.get(["breakLabelLayout","moveOverlap"],!0);(n===!0||n==="auto")&&T(i,function(o){$n().adjustBreakLabelPair(r.axis.inverse,e,[zi(t[o[0]]),zi(t[o[1]])])})}}var yr=_l;function Tp(r,e,t){t=t||{};var a=e.axis,i={},n=a.getAxesOnZeroOf()[0],o=a.position,s=n?"onZero":o,l=a.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(n){var h=n.toGlobalCoord(n.dataToCoord(0));p[c.onZero]=Math.max(Math.min(h,p[1]),p[0])}i.position=[l==="y"?p[c[s]]:u[0],l==="x"?p[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=d[o],i.labelOffset=n?p[c[o]]-p[c.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),de(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=e.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-v:v,i.z2=1,i}function nN(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function nw(r){var e={xAxisModel:null,yAxisModel:null};return T(e,function(t,a){var i=a.replace(/Model$/,""),n=r.getReferringComponents(i,Yt).models[0];e[a]=n}),e}function oN(r,e,t,a,i,n){for(var o=Tp(r,t),s=!1,l=!1,u=0;u<e.length;u++)np(e[u].getOtherAxis(t.axis).scale)&&(s=l=!0,t.axis.type==="category"&&t.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=n,new yr(t,a,o,i)}function sN(r,e,t){var a=Tp(e,t);if(0)var i;r.updateCfg(a)}function og(r,e,t){var a,i=pa.prototype,n=i.getTicks.call(t),o=i.getTicks.call(t,{expandToNicedExtent:!0}),s=n.length-1,l=i.getInterval.call(t),u=Xb(r,e),c=u.extent,f=u.fixMin,p=u.fixMax;r.type==="log"&&(c=op(r.base,c,!0)),r.setBreaksFromOption(qb(e)),r.setExtent(c[0],c[1]),r.calcNiceExtent({splitNumber:s,fixMin:f,fixMax:p});var h=i.getExtent.call(r);f&&(c[0]=h[0]),p&&(c[1]=h[1]);var d=i.getInterval.call(r),v=c[0],m=c[1];if(f&&p)d=(m-v)/s;else if(f)for(m=c[0]+d*s;m<c[1]&&isFinite(m)&&isFinite(c[1]);)d=xm(d),m=c[0]+d*s;else if(p)for(v=c[1]-d*s;v>c[0]&&isFinite(v)&&isFinite(c[0]);)d=xm(d),v=c[1]-d*s;else{var g=r.getTicks().length-1;g>s&&(d=xm(d));var y=d*s;m=Math.ceil(c[1]/d)*d,v=oe(m-y),v<0&&c[0]>=0?(v=0,m=oe(y)):m>0&&c[1]<=0&&(m=0,v=-oe(y))}var x=(n[0].value-o[0].value)/l,_=(n[s].value-o[s].value)/l;if(i.setExtent.call(r,v+d*x,m+d*_),i.setInterval.call(r,d),(x||_)&&i.setNiceExtent.call(r,v+d,m-d),0)var b}var lN=[[3,1],[0,2]],jX=(function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ag,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=gt(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var p=+l[f],h=o[p],d=h.model,v=h.scale;np(v)&&d.get("alignTicks")&&d.get("interval")==null?c.push(h):(fn(v,d),np(v)&&(s=h))}c.length&&(s||(s=c.pop(),fn(s.scale,s.model)),T(c,function(m){og(m.scale,m.model,s.scale)}))}}i(a.x),i(a.y);var n={};T(a.x,function(o){uN(a,"y",o,n)}),T(a.y,function(o){uN(a,"x",o,n)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var i=Zt(e,t),n=this._rect=Bt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(sw(o,n),!a){var u=KX(n,s,o,l,t),c=void 0;if(l)lw?(lw(this._axesList,n),sw(o,n)):c=pN(n.clone(),"axisLabel",null,n,o,u,i);else{var f=JX(e,n,i),p=f.outerBoundsRect,h=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;p&&(c=pN(p,h,d,n,o,u,i))}dN(n,o,ha.determine,null,c,i)}T(this._coordsList,function(v){v.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}et(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i<n.length;i++)if(n[i].getAxis("x").index===e||n[i].getAxis("y").index===t)return n[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,a){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(a):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(a)):null},r.prototype.convertFromPixel=function(e,t,a){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(a):i.axis?i.axis.coordToData(i.axis.toLocalCoord(a)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,a=e.xAxisModel||t&&t.getReferringComponents("xAxis",Yt).models[0],i=e.yAxisModel||t&&t.getReferringComponents("yAxis",Yt).models[0],n=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,lt(o,s)<0&&(s=null);else if(a&&i)s=this.getCartesian(a.componentIndex,i.componentIndex);else if(a)l=this.getAxis("x",a.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(n){var u=n.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,a){var i=this,n=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,T(s.x,function(c,f){T(s.y,function(p,h){var d="x"+f+"y"+h,v=new KR(d);v.master=i,v.model=e,i._coordsMap[d]=v,i._coordsList.push(v),v.addAxis(c),v.addAxis(p)})});function u(c){return function(f,p){if(ow(f,e)){var h=f.get("position");c==="x"?h!=="top"&&h!=="bottom"&&(h=o.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=o.left?"right":"left"),o[h]=!0;var d=new ig(c,Bo(f),[0,0],f.get("type"),h),v=d.type==="category";d.onBand=v&&f.get("boundaryGap"),d.inverse=f.get("inverse"),f.axis=d,d.model=f,d.grid=n,d.index=p,n._axesList.push(d),s[c][p]=d,l[c]++}}}},r.prototype._updateScale=function(e,t){T(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var n=i.model.get("categorySortInfo");i.scale.setSortInfo(n)}}),e.eachSeries(function(i){if(nN(i)){var n=nw(i),o=n.xAxisModel,s=n.yAxisModel;if(!ow(o,t)||!ow(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");a(u,c),a(u,f)}},this);function a(i,n){T(Bu(i,n.dim),function(o){n.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],a=[];return T(this.getCartesians(),function(i){var n=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(n);lt(t,n)<0&&t.push(n),lt(a,o)<0&&a.push(o)}),{baseAxes:t,otherAxes:a}},r.create=function(e,t){var a=[];return e.eachComponent("grid",function(i,n){var o=new r(i,e,t);o.name="grid_"+n,o.resize(i,t,!0),i.coordinateSystem=o,a.push(o)}),e.eachSeries(function(i){ln({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:n});function n(){var o=nw(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),a},r.dimensions=ag,r})();function ow(r,e){return r.getCoordSysModel()===e}function uN(r,e,t,a){t.getAxesOnZeroOf=function(){return n?[n]:[]};var i=r[e],n,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)cN(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&cN(i[u])&&!a[c(i[u])]){n=i[u];break}n&&(a[c(n)]=!0);function c(f){return f.dim+"_"+f.index}}function cN(r){return r&&r.type!=="category"&&r.type!=="time"&&i2(r)}function $X(r,e){var t=r.getExtent(),a=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+e}:function(i){return a-i+e},r.toLocalCoord=r.dim==="x"?function(i){return i-e}:function(i){return a-i+e}}function sw(r,e){T(r.x,function(t){return fN(t,e.x,e.width)}),T(r.y,function(t){return fN(t,e.y,e.height)})}function fN(r,e,t){var a=[0,t],i=r.inverse?1:0;r.setExtent(a[i],a[1-i]),$X(r,e)}var lw;function hN(r){lw=r}function pN(r,e,t,a,i,n,o){dN(a,i,ha.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(a,0,NaN),c(a,1,NaN);var l=di(s,function(p){return p>0})==null;return qa(a,s,!0,!0,t),sw(i,a),l;function u(p){T(i[bt[p]],function(h){if(dl(h.model)){var d=n.ensureRecord(h.model),v=d.labelInfoList;if(v)for(var m=0;m<v.length;m++){var g=v[m],y=h.scale.normalize(bl(g.label).tickValue);y=p===1?1-y:y,c(g.rect,p,y),c(g.rect,1-p,NaN)}var x=d.nameLayout;if(x){var y=Fo(d.nameLocation)?.5:NaN;c(x.rect,p,y),c(x.rect,1-p,NaN)}}})}function c(p,h,d){var v=r[bt[h]]-p[bt[h]],m=p[be[h]]+p[bt[h]]-(r[be[h]]+r[bt[h]]);v=f(v,1-d),m=f(m,d);var g=lN[h][0],y=lN[h][1];s[g]=_e(s[g],v),s[y]=_e(s[y],m)}function f(p,h){return p>0&&!Me(h)&&h>1e-4&&(p/=h),p}}function KX(r,e,t,a,i){var n=new ew(QX);return T(t,function(o){return T(o,function(s){if(dl(s.model)){var l=!a;s.axisBuilder=oN(r,e,s.model,i,n,l)}})}),n}function dN(r,e,t,a,i,n){var o=t===ha.determine;T(e,function(u){return T(u,function(c){dl(c.model)&&(sN(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[bt[1-u]]=r[be[u]]<=n.refContainer[be[u]]*.5?0:1-u===1?2:1}T(e,function(u,c){return T(u,function(f){dl(f.model)&&((a==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function JX(r,e,t){var a,i=r.get("outerBoundsMode",!0);i==="same"?a=e.clone():(i==null||i==="auto")&&(a=Bt(r.get("outerBounds",!0)||XS,t.refContainer));var n=r.get("outerBoundsContain",!0),o;n==null||n==="auto"||lt(["all","axisLabel"],n)<0?o="all":o=n;var s=[ou(Q(r.get("outerBoundsClampWidth",!0),bp[0]),e.width),ou(Q(r.get("outerBoundsClampHeight",!0),bp[1]),e.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var QX=function(r,e,t,a,i,n){var o=t.axis.dim==="x"?"y":"x";rw(r,e,t,a,i,n),Fo(r.nameLocation)||T(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&aw(s.labelInfoList,s.dirVec,a,i)})},vN=jX;function mN(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return t9(t,r,e),t.seriesInvolved&&r9(t,r),t}function t9(r,e,t){var a=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];T(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=qu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",a);if(T(s.getAxes(),ut(v,!1,null)),s.getTooltipAxes&&a&&f.get("show")){var p=f.get("trigger")==="axis",h=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(p||h)&&T(d.baseAxes,ut(v,h?"cross":!0,p)),h&&T(d.otherAxes,ut(v,"cross",!1))}function v(m,g,y){var x=y.model.getModel("axisPointer",i),_=x.get("show");if(!(!_||_==="auto"&&!m&&!cw(x))){g==null&&(g=x.get("triggerTooltip")),x=m?e9(y,f,i,e,m,g):x;var b=x.get("snap"),S=x.get("triggerEmphasis"),w=qu(y.model),D=g||b||y.type==="category",C=r.axesInfo[w]={key:w,axis:y,coordSys:s,axisPointerModel:x,triggerTooltip:g,triggerEmphasis:S,involveSeries:D,snap:b,useHandle:cw(x),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||D;var M=a9(n,y);if(M!=null){var E=o[M]||(o[M]={axesInfo:{}});E.axesInfo[w]=C,E.mapper=n[M].mapper,C.linkGroup=E}}}})}function e9(r,e,t,a,i,n){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};T(s,function(p){l[p]=tt(o.get(p))}),l.snap=r.type!=="category"&&!!n,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c!=null?c:!0,!n){var f=l.lineStyle=o.get("crossStyle");f&&J(u,f.textStyle)}}return r.model.getModel("axisPointer",new Mt(l,t,a))}function r9(r,e){e.eachSeries(function(t){var a=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),n=t.get(["tooltip","show"],!0);!a||!a.model||i==="none"||i===!1||i==="item"||n===!1||t.get(["axisPointer","show"],!0)===!1||T(r.coordSysAxesInfo[qu(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function a9(r,e){for(var t=e.model,a=e.dim,i=0;i<r.length;i++){var n=r[i]||{};if(uw(n[a+"AxisId"],t.id)||uw(n[a+"AxisIndex"],t.componentIndex)||uw(n[a+"AxisName"],t.name))return i}}function uw(r,e){return r==="all"||z(r)&<(r,e)>=0||r===e}function gN(r){var e=sg(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=cw(t);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function sg(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[qu(r)]}function yN(r){var e=sg(r);return e&&e.axisPointerModel}function cw(r){return!!r.get(["handle","show"])}function qu(r){return r.type+"||"+r.id}var xN={},i9=(function(r){I(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,a,i,n){this.axisPointerClass&&gN(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},e.prototype.updateAxisPointer=function(t,a,i,n){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,a){var i=this._axisPointer;i&&i.remove(a)},e.prototype.dispose=function(t,a){this._disposeAxisPointer(a),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,a,i){var n=e.getAxisPointerClass(this.axisPointerClass);if(n){var o=yN(t);o?(this._axisPointer||(this._axisPointer=new n)).render(t,o,a,i):this._disposeAxisPointer(a)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,a){xN[t]=a},e.getAxisPointerClass=function(t){return t&&xN[t]},e.type="axis",e})(Ot),da=i9;var pw=ot();function lg(r,e,t,a){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:n,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=pw(r).splitAreaColors,p=q(),h=0;if(f)for(var d=0;d<u.length;d++){var v=f.get(u[d].tickValue);if(v!=null){h=(v+(c-1)*d)%c;break}}var m=i.toGlobalCoord(u[0].coord),g=o.getAreaStyle();s=z(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),x=void 0,_=void 0,b=void 0,S=void 0;i.isHorizontal()?(x=m,_=l.y,b=y-x,S=l.height,m=x+b):(x=l.x,_=m,b=l.width,S=y-_,m=_+S);var w=u[d-1].tickValue;w!=null&&p.set(w,h),e.add(new ht({anid:w!=null?"area_"+w:null,shape:{x,y:_,width:b,height:S},style:J({fill:s[h]},g),autoBatch:!0,silent:!0})),h=(h+1)%c}pw(r).splitAreaColors=p}}}function ug(r){pw(r).splitAreaColors=null}var n9=["splitArea","splitLine","minorSplitLine","breakArea"],_N=(function(r){I(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,a,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new K,this.group.add(this._axisGroup),!!dl(t)){this._axisGroup.add(t.axis.axisBuilder.group),T(n9,function(l){t.get([l,"show"])&&o9[l](this,this._axisGroup,t,t.getCoordSysModel(),i)},this);var s=n&&n.type==="changeAxisOrder"&&n.isInitSort;s||zn(o,this._axisGroup,t),r.prototype.render.call(this,t,a,i,n)}},e.prototype.remove=function(){ug(this)},e.type="cartesianAxis",e})(da),o9={splitLine:function(r,e,t,a,i){var n=t.axis;if(!n.scale.isBlank()){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=z(l)?l:[l];for(var f=a.coordinateSystem.getRect(),p=n.isHorizontal(),h=0,d=n.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],m=[],g=s.getLineStyle(),y=0;y<d.length;y++){var x=n.toGlobalCoord(d[y].coord);if(!(y===0&&!u||y===d.length-1&&!c)){var _=d[y].tickValue;p?(v[0]=x,v[1]=f.y,m[0]=x,m[1]=f.y+f.height):(v[0]=f.x,v[1]=x,m[0]=f.x+f.width,m[1]=x);var b=h++%l.length,S=new le({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:m[0],y2:m[1]},style:J({stroke:l[b]},g),silent:!0});On(S.shape,g.lineWidth),e.add(S)}}}},minorSplitLine:function(r,e,t,a,i){var n=t.axis,o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=a.coordinateSystem.getRect(),u=n.isHorizontal(),c=n.getMinorTicksCoords();if(c.length)for(var f=[],p=[],h=s.getLineStyle(),d=0;d<c.length;d++)for(var v=0;v<c[d].length;v++){var m=n.toGlobalCoord(c[d][v].coord);u?(f[0]=m,f[1]=l.y,p[0]=m,p[1]=l.y+l.height):(f[0]=l.x,f[1]=m,p[0]=l.x+l.width,p[1]=m);var g=new le({anid:"minor_line_"+c[d][v].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},style:h,silent:!0});On(g.shape,h.lineWidth),e.add(g)}},splitArea:function(r,e,t,a,i){lg(r,e,t,a)},breakArea:function(r,e,t,a,i){var n=$n(),o=t.axis.scale;n&&o.type!=="ordinal"&&n.rectCoordBuildBreakAxis(e,r,t,a.coordinateSystem.getRect(),i)}},hw=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e})(_N);var bN=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=hw.type,t}return e.type="yAxis",e})(_N);var s9=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,a){this.group.removeAll(),t.get("show")&&this.group.add(new ht({shape:t.coordinateSystem.getRect(),style:J({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(Ot),SN={offset:0};function cg(r){r.registerComponentView(s9),r.registerComponentModel(WR),r.registerCoordinateSystem("cartesian2d",vN),Ui(r,"x",eg,SN),Ui(r,"y",eg,SN),r.registerComponentView(hw),r.registerComponentView(bN),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function TN(r,e){var t=r.coordinateSystem,a=t&&t.type,i=t&&t.getBaseAxis&&t.getBaseAxis(),n=i&&i.scale&&i.scale.type,o=a==="cartesian2d"&&n==="ordinal"||a==="single",s=e.model.get("jitter")>0;return o&&s}var l9=ot();function dw(r,e,t,a){if(r instanceof ig){var i=r.scale.type;if(i!=="category"&&i!=="ordinal")return t}var n=r.model,o=n.get("jitter"),s=n.get("jitterOverlap"),l=n.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?DN(t,o,u,a):u9(r,e,t,a,o,l):t}function DN(r,e,t,a){if(t===null)return r+(Math.random()-.5)*e;var i=t-a*2,n=Math.min(Math.max(0,e),i);return r+(Math.random()-.5)*n}function u9(r,e,t,a,i,n){var o=l9(r);o.items||(o.items=[]);var s=o.items,l=wN(s,e,t,a,i,n,1),u=wN(s,e,t,a,i,n,-1),c=Math.abs(l-t)<Math.abs(u-t)?l:u,f=r.scale.type==="ordinal"?r.getBandWidth():null,p=Math.abs(c-t);return p>i/2||f&&p>f/2-a?DN(t,i,f,a):(s.push({fixedCoord:e,floatCoord:c,r:a}),c)}function wN(r,e,t,a,i,n,o){for(var s=t,l=0;l<r.length;l++){var u=r[l],c=e-u.fixedCoord,f=s-u.floatCoord,p=c*c+f*f,h=a+u.r+n;if(p<h*h){var d=u.floatCoord+Math.sqrt(h*h-c*c)*o;if(Math.abs(d-t)>i/2)return Number.MAX_VALUE;if(o===1&&d>s||o===-1&&d<s){s=d,l=-1;continue}}}return s}function vw(r){r.eachSeriesByType("scatter",function(e){var t=e.coordinateSystem;if(t&&(t.type==="cartesian2d"||t.type==="single")){var a=t.getBaseAxis?t.getBaseAxis():null,i=a&&TN(e,a);if(i){var n=e.getData();n.each(function(o){var s=a.dim,l=a.orient,u=l==="horizontal"&&a.type!=="category"||l==="vertical"&&a.type==="category",c=n.getItemLayout(o),f=n.getItemVisual(o,"symbolSize"),p=f instanceof Array?(f[1]+f[0])/2:f;if(s==="y"||s==="single"&&u){var h=dw(a,c[0],c[1],p/2);n.setItemLayout(o,[c[0],h])}else if(s==="x"||s==="single"&&!u){var h=dw(a,c[1],c[0],p/2);n.setItemLayout(o,[h,c[1]])}})}}})}function mw(r){Tt(cg),r.registerSeriesModel(UR),r.registerChartView(GR),r.registerLayout(Bi("scatter"))}function gw(r){r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,vw)}function yw(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),a=[],i=e.coordinateSystem;if(i){var n=i.getIndicatorAxes();T(n,function(o,s){t.each(t.mapDimension(n[s].dim),function(l,u){a[u]=a[u]||[];var c=i.dataToPoint(l,s);a[u][s]=CN(c)?c:MN(i)})}),t.each(function(o){var s=di(a[o],function(l){return CN(l)})||MN(i);a[o].push(s.slice()),t.setItemLayout(o,a[o])})}})}function CN(r){return!isNaN(r[0])&&!isNaN(r[1])}function MN(r){return[r.cx,r.cy]}function xw(r){var e=r.polar;if(e){z(e)||(e=[e]);var t=[];T(e,function(a,i){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),r.radar=r.radar||[],z(r.radar)||(r.radar=[r.radar]),r.radar.push(a)):t.push(a)}),r.polar=t}T(r.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})}var c9=(function(r){I(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,a,i){var n=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(p,h){var d=p.getItemVisual(h,"symbol")||"circle";if(d!=="none"){var v=Pi(p.getItemVisual(h,"symbolSize")),m=jt(d,-1,-1,2,2),g=p.getItemVisual(h,"symbolRotate")||0;return m.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:g*Math.PI/180||0}),m}}function c(p,h,d,v,m,g){d.removeAll();for(var y=0;y<h.length-1;y++){var x=u(v,m);x&&(x.__dimIdx=y,p[y]?(x.setPosition(p[y]),_t[g?"initProps":"updateProps"](x,{x:h[y][0],y:h[y][1]},t,m)):x.setPosition(h[y]),d.add(x))}}function f(p){return V(p,function(h){return[n.cx,n.cy]})}s.diff(l).add(function(p){var h=s.getItemLayout(p);if(h){var d=new ye,v=new he,m={shape:{points:h}};d.shape.points=f(h),v.shape.points=f(h),Vt(d,m,t,p),Vt(v,m,t,p);var g=new K,y=new K;g.add(v),g.add(d),g.add(y),c(v.shape.points,h,y,s,p,!0),s.setItemGraphicEl(p,g)}}).update(function(p,h){var d=l.getItemGraphicEl(h),v=d.childAt(0),m=d.childAt(1),g=d.childAt(2),y={shape:{points:s.getItemLayout(p)}};y.shape.points&&(c(v.shape.points,y.shape.points,g,s,p,!1),Re(m),Re(v),wt(v,y,t),wt(m,y,t),s.setItemGraphicEl(p,d))}).remove(function(p){o.remove(l.getItemGraphicEl(p))}).execute(),s.eachItemGraphicEl(function(p,h){var d=s.getItemModel(h),v=p.childAt(0),m=p.childAt(1),g=p.childAt(2),y=s.getItemVisual(h,"style"),x=y.fill;o.add(p),v.useStyle(J(d.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:x})),te(v,d,"lineStyle"),te(m,d,"areaStyle");var _=d.getModel("areaStyle"),b=_.isEmpty()&&_.parentModel.isEmpty();m.ignore=b,T(["emphasis","select","blur"],function(w){var D=d.getModel([w,"areaStyle"]),C=D.isEmpty()&&D.parentModel.isEmpty();m.ensureState(w).ignore=C&&b;var M=d.getModel([w,"lineStyle"]).getLineStyle();v.ensureState(w).style=M;var E=D.getAreaStyle();m.ensureState(w).style=E;var L=d.getModel([w,"itemStyle"]).getItemStyle();g.eachChild(function(A){A.ensureState(w).style=tt(L)})}),m.useStyle(J(d.getModel("areaStyle").getAreaStyle(),{fill:x,opacity:.7,decal:y.decal}));var S=d.getModel("emphasis");g.eachChild(function(w){if(w instanceof se){var D=w.style;w.useStyle(O({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},y))}else w.useStyle(y),w.setColor(x),w.style.strokeNoScale=!0;var C=s.getStore().get(s.getDimensionIndex(w.__dimIdx),h);(C==null||isNaN(C))&&(C=""),$t(w,qt(d),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:w.__dimIdx,defaultText:C,inheritColor:x,defaultOpacity:y.opacity})}),Rt(p,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})(Pt),EN=c9;var f9=(function(r){I(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 ai(Z(this.getData,this),Z(this.getRawData,this))},e.prototype.getInitialData=function(t,a){return Aa(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=Yv(this,t);return re("section",{header:u,sortBlocks:!0,blocks:V(s,function(f){var p=n.get(n.mapDimension(f.dim),t);return re("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:p,sortParam:p})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var a=this.getData(),i=this.coordinateSystem,n=a.getValues(V(i.dimensions,function(u){return a.mapDimension(u)}),t),o=0,s=n.length;o<s;o++)if(!isNaN(n[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(n[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})(Nt),AN=f9;var Dp=rg.value;function fg(r,e){return J({show:e},r)}var p9=(function(r){I(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"),a=this.get("splitNumber"),i=this.get("scale"),n=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"),p=this.get("triggerEvent"),h=V(this.get("indicator")||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var v=l;d.color!=null&&(v=J({color:d.color},l));var m=dt(tt(d),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:v,triggerEvent:p},!1);if(W(c)){var g=m.name;m.name=c.replace("{value}",g!=null?g:"")}else $(c)&&(m.name=c(m.name,m));var y=new Mt(m,null,this.ecModel);return Jt(y,pn.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:N.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:dt({lineStyle:{color:N.color.neutral20}},Dp.axisLine),axisLabel:fg(Dp.axisLabel,!1),axisTick:fg(Dp.axisTick,!1),splitLine:fg(Dp.splitLine,!0),splitArea:fg(Dp.splitArea,!0),indicator:[]},e})(St),LN=p9;var h9=(function(r){I(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,a,i){var n=this.group;n.removeAll(),this._buildAxes(t,i),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,a){var i=t.coordinateSystem,n=i.getIndicatorAxes(),o=V(n,function(s){var l=s.model.get("showName")?s.name:"",u=new yr(s.model,a,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});T(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=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"),p=l.get("color"),h=u.get("color"),d=z(p)?p:[p],v=z(h)?h:[h],m=[],g=[];function y(R,k,B){var U=B%k.length;return R[U]=R[U]||[],U}if(n==="circle")for(var x=i[0].getTicksCoords(),_=a.cx,b=a.cy,S=0;S<x.length;S++){if(c){var w=y(m,d,S);m[w].push(new Or({shape:{cx:_,cy:b,r:x[S].coord}}))}if(f&&S<x.length-1){var w=y(g,v,S);g[w].push(new Zs({shape:{cx:_,cy:b,r0:x[S].coord,r:x[S+1].coord}}))}}else for(var D,C=V(i,function(R,k){var B=R.getTicksCoords();return D=D==null?B.length-1:Math.min(B.length-1,D),V(B,function(U){return a.coordToPoint(U.coord,k)})}),M=[],S=0;S<=D;S++){for(var E=[],L=0;L<i.length;L++)E.push(C[L][S]);if(E[0]&&E.push(E[0].slice()),c){var w=y(m,d,S);m[w].push(new he({shape:{points:E}}))}if(f&&M){var w=y(g,v,S-1);g[w].push(new ye({shape:{points:E.concat(M)}}))}M=E.slice().reverse()}var A=l.getLineStyle(),P=u.getAreaStyle();T(g,function(R,k){this.group.add(Mr(R,{style:J({stroke:"none",fill:v[k%v.length]},P),silent:!0}))},this),T(m,function(R,k){this.group.add(Mr(R,{style:J({fill:"none",stroke:d[k%d.length]},A),silent:!0}))},this)},e.type="radar",e})(Ot),IN=h9;var d9=(function(r){I(e,r);function e(t,a,i){var n=r.call(this,t,a,i)||this;return n.type="value",n.angle=0,n.name="",n}return e})(ur),PN=d9;var v9=(function(){function r(e,t,a){this.dimensions=[],this._model=e,this._indicatorAxes=V(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new PN(o,new pa);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,a)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var a=this._indicatorAxes[t];return this.coordToPoint(a.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var a=this._indicatorAxes[t],i=a.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=Math.sqrt(t*t+a*a);t/=i,a/=i;for(var n=Math.atan2(-a,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(n-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,t){var a=Zt(e,t).refContainer,i=e.get("center"),n=Math.min(a.width,a.height)/2;this.cx=j(i[0],a.width)+a.x,this.cy=j(i[1],a.height)+a.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(W(o)||yt(o))&&(o=[0,o]),this.r0=j(o[0],n),this.r=j(o[1],n),T(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},r.prototype.update=function(e,t){var a=this._indicatorAxes,i=this._model;T(a,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"))!==i)){var u=s.getData();T(a,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var n=i.get("splitNumber"),o=new pa;o.setExtent(0,n),o.setInterval(1),T(a,function(s,l){og(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var a=[];return e.eachComponent("radar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=a[i.get("radarIndex")||0])}),a},r.dimensions=[],r})(),kN=v9;function RN(r){r.registerCoordinateSystem("radar",kN),r.registerComponentModel(LN),r.registerComponentView(IN),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(a){t.setItemVisual(a,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function _w(r){Tt(RN),r.registerChartView(EN),r.registerSeriesModel(AN),r.registerLayout(yw),r.registerProcessor(Ea("radar")),r.registerPreprocessor(xw)}var bw=ot();function NN(r,e,t){bw(r)[e]=t}function ON(r,e,t){var a=bw(r),i=a[e];i===t&&(a[e]=null)}function Sw(r,e){return!!bw(r)[e]}Br({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ie);var m9={axisPointer:1,tooltip:1,brush:1};function pg(r,e,t){var a=e.getComponentByElement(r.topTarget);if(!a||a===t||m9.hasOwnProperty(a.mainType))return!1;var i=a.coordinateSystem;if(!i||i.model===t)return!1;var n=ja(a),o=ja(t);return!((n.zlevel-o.zlevel||n.z-o.z)<=0)}var g9=(function(r){I(e,r);function e(t){var a=r.call(this)||this;a._zr=t;var i=Z(a._mousedownHandler,a),n=Z(a._mousemoveHandler,a),o=Z(a._mouseupHandler,a),s=Z(a._mousewheelHandler,a),l=Z(a._pinchHandler,a);return a.enable=function(u,c){var f=c.zInfo,p=ja(f.component),h=p.z,d=p.zlevel,v={component:f.component,z:h,zlevel:d,z2:Q(f.z2,-1/0)},m=O({},c.triggerInfo);this._opt=J(O({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:v,triggerInfo:m}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(Mp(t,"mousedown",i,v),Mp(t,"mousemove",n,v),Mp(t,"mouseup",o,v)),(u===!0||u==="scale"||u==="zoom")&&(Mp(t,"mousewheel",s,v),Mp(t,"pinch",l,v)))},a.disable=function(){this._enabled=!1,Ep(t,"mousedown",i),Ep(t,"mousemove",n),Ep(t,"mouseup",o),Ep(t,"mousewheel",s),Ep(t,"pinch",l)},a}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,a,i){var n=this._opt,o=n.zInfoParsed;if(pg(t,n.api,o.component))return!1;var s=n.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(t,a,i)),u&&s.isInClip&&!s.isInClip(t,a,i)&&(u=!1),u},e.prototype._decideCursorStyle=function(t,a,i,n){var o=t.target;if(!o&&this._checkPointer(t,a,i))return"grab";if(n)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(I0(t)||Cp(t))){for(var a=t.target;a;){if(a.draggable)return;a=a.__hostTarget||a.parent}var i=t.offsetX,n=t.offsetY;this._checkPointer(t,i,n)&&(this._x=i,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var a=this._zr;if(!(t.gestureEvent==="pinch"||Sw(a,"globalPan")||Cp(t))){var i=t.offsetX,n=t.offsetY;if(!this._dragging||!hg("moveOnMouseMove",t,this._opt)){var o=this._decideCursorStyle(t,i,n,!1);o&&a.setCursorStyle(o);return}a.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,c=n-l;this._x=i,this._y=n,this._opt.preventDefaultMouseMove&&Kr(t.event),t.__ecRoamConsumed=!0,VN(this,"pan","moveOnMouseMove",t,{dx:u,dy:c,oldX:s,oldY:l,newX:i,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!Cp(t)){var a=this._zr;if(!I0(t)){this._dragging=!1;var i=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);i&&a.setCursorStyle(i)}}},e.prototype._mousewheelHandler=function(t){if(!Cp(t)){var a=hg("zoomOnMouseWheel",t,this._opt),i=hg("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),s=t.offsetX,l=t.offsetY;if(!(n===0||!a&&!i)){if(a){var u=o>3?1.4:o>1?1.2:1.1,c=n>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(n),p=(n>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:p,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(Sw(this._zr,"globalPan")||Cp(t))){var a=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,a,i,n,o){t._checkPointer(n,o.originX,o.originY)&&(Kr(n.event),n.__ecRoamConsumed=!0,VN(t,a,i,n,o))},e})(Ue);function Cp(r){return r.__ecRoamConsumed}var y9=ot();function dg(r){var e=y9(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function Mp(r,e,t,a){for(var i=dg(r),n=i.roam,o=n[e]=n[e]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-a.zlevel||l.z-a.z||l.z2-a.z2)<=0)break}o.splice(s,0,{listener:t,zInfoParsed:a}),x9(r,e)}function Ep(r,e,t){for(var a=dg(r),i=a.roam[e]||[],n=0;n<i.length;n++)if(i[n].listener===t){i.splice(n,1),i.length||_9(r,e);return}}function x9(r,e){var t=dg(r);t.uniform[e]||r.on(e,t.uniform[e]=function(a){var i=t.roam[e];if(i)for(var n=0;n<i.length;n++)i[n].listener(a)})}function _9(r,e){var t=dg(r),a=t.uniform;a[e]&&(r.off(e,a[e]),a[e]=null)}function VN(r,e,t,a,i){i.isAvailableBehavior=Z(hg,null,t,a),r.trigger(e,i)}function hg(r,e,t){var a=t[r];return!r||a&&(!W(a)||e.event[a+"Key"])}var va=g9;function Ap(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function Lp(r,e,t,a){var i=r.target,n=r.zoomLimit,o=r.zoom=r.zoom||1;o*=e,o=mg(o,n);var s=o/r.zoom;r.zoom=o,UN(i,t,a,s),i.dirty()}function vg(r,e,t,a,i,n){var o=new at(0,0,0,0);a.enable(r.get("roam"),{api:e,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(u,c,f){return o.copy(t.getBoundingRect()),o.applyTransform(t.getComputedTransform()),o.contain(c,f)},isInClip:function(u,c,f){return!n||n.contain(c,f)}}}),i.zoomLimit=r.get("scaleLimit");var s=r.coordinateSystem;i.zoom=s?s.getZoom():1;var l=r.subType+"Roam";a.off("pan").off("zoom").on("pan",function(u){Ap(i,u.dx,u.dy),e.dispatchAction({seriesId:r.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){Lp(i,u.scale,u.originX,u.originY),e.dispatchAction({seriesId:r.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),e.updateLabelLayout()})}function BN(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function Xo(r,e,t){var a=r.getZoom(),i=r.getCenter(),n=e.zoom,o=r.projectedToPoint?r.projectedToPoint(i):r.dataToPoint(i);return e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,r.setCenter(BN(r,o))),n!=null&&(n=mg(a*n,t)/a,UN(r,e.originX,e.originY,n),r.updateTransform(),r.setCenter(BN(r,o)),r.setZoom(n*a)),{center:r.getCenter(),zoom:r.getZoom()}}function UN(r,e,t,a){r.x-=(e-r.x)*(a-1),r.y-=(t-r.y)*(a-1),r.scaleX*=a,r.scaleY*=a}function mg(r,e){if(e){var t=e.min||0,a=e.max||1/0;r=Math.max(Math.min(a,r),t)}return r}function gg(r){if(W(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 Tw,yg={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"},FN=gt(yg),xg={"alignment-baseline":"textBaseline","stop-color":"stopColor"},HN=gt(xg),b9=(function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=gg(e);this._defsUsePending=[];var i=new K;this._root=i;var n=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),La(a,i,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;T9(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var p=_g(o);p.length>=4&&(c={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(c&&s!=null&&l!=null&&(f=Cw(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=i;i=new K,i.add(h),h.scaleX=h.scaleY=f.scale,h.x=f.x,h.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new ht({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:n}},r.prototype._parseNode=function(e,t,a,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var c=Tw[s];if(c&&it(Tw,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var p={name:f,namedFrom:null,svgNodeTagLower:s,el:l};a.push(p),s==="g"&&(u=p)}else i&&a.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var h=GN[s];if(h&&it(GN,s)){var d=h.call(this,e),v=e.getAttribute("id");v&&(this._defs[v]=d)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,a,u,n,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},r.prototype._parseText=function(e,t){var a=new In({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ii(t,a),La(e,a,this._defsUsePending,!1,!1),S9(a,t);var i=a.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,a.scaleX*=n/9,a.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=(function(){Tw={g:function(e,t){var a=new K;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new ht;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.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")}),a.silent=!0,a},circle:function(e,t){var a=new Or;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new le;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.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")}),a.silent=!0,a},ellipse:function(e,t){var a=new Cf;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.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")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),i;a&&(i=ZN(a));var n=new ye({shape:{points:i||[]},silent:!0});return ii(t,n),La(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var a=e.getAttribute("points"),i;a&&(i=ZN(a));var n=new he({shape:{points:i||[]},silent:!0});return ii(t,n),La(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var a=new se;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.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")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new K;return ii(t,s),La(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),i=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new K;return ii(t,s),La(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",i=Gd(a);return ii(t,i),La(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}})(),r})(),GN={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),n=new Za(e,t,a,i);return WN(r,n),YN(r,n),n},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),i=new Xd(e,t,a);return WN(r,i),YN(r,i),i}};function WN(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function YN(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),i=void 0;a&&a.indexOf("%")>0?i=parseInt(a,10)/100:a?i=parseFloat(a):i=0;var n={};jN(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000",s=n.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=Ze(o),u=l&&l[3];u&&(l[3]*=Mn(s),o=Jr(l,"rgba"))}e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function ii(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),J(e.__inheritedStyle,r.__inheritedStyle))}function ZN(r){for(var e=_g(r),t=[],a=0;a<e.length;a+=2){var i=parseFloat(e[a]),n=parseFloat(e[a+1]);t.push([i,n])}return t}function La(r,e,t,a,i){var n=e,o=n.__inheritedStyle=n.__inheritedStyle||{},s={};r.nodeType===1&&(M9(r,e),jN(r,o,s),a||E9(r,o,s)),n.style=n.style||{},o.fill!=null&&(n.style.fill=XN(n,"fill",o.fill,t)),o.stroke!=null&&(n.style.stroke=XN(n,"stroke",o.stroke,t)),T(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(n.style[l]=parseFloat(o[l]))}),T(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(n.style[l]=o[l])}),i&&(n.__selfStyle=s),o.lineDash&&(n.style.lineDash=V(_g(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(n.invisible=!0),o.display==="none"&&(n.ignore=!0)}function S9(r,e){var t=e.__selfStyle;if(t){var a=t.textBaseline,i=a;!a||a==="auto"||a==="baseline"?i="alphabetic":a==="before-edge"||a==="text-before-edge"?i="top":a==="after-edge"||a==="text-after-edge"?i="bottom":(a==="central"||a==="mathematical")&&(i="middle"),r.style.textBaseline=i}var n=e.__inheritedStyle;if(n){var o=n.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var w9=/^url\(\s*#(.*?)\)/;function XN(r,e,t,a){var i=t&&t.match(w9);if(i){var n=Be(i[1]);a.push([r,e,n]);return}return t==="none"&&(t=null),t}function T9(r,e){for(var t=0;t<e.length;t++){var a=e[t];a[0].style[a[1]]=r[a[2]]}}var D9=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function _g(r){return r.match(D9)||[]}var C9=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Dw=Math.PI/180;function M9(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var a=[],i=null;t.replace(C9,function(f,p,h){return a.push(p,h),""});for(var n=a.length-1;n>0;n-=2){var o=a[n],s=a[n-1],l=_g(o);switch(i=i||fe(),s){case"translate":pr(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Kl(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Sr(i,i,-parseFloat(l[0])*Dw,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Dw);fr(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Dw);fr(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var qN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function jN(r,e,t){var a=r.getAttribute("style");if(a){qN.lastIndex=0;for(var i;(i=qN.exec(a))!=null;){var n=i[1],o=it(yg,n)?yg[n]:null;o&&(e[o]=i[2]);var s=it(xg,n)?xg[n]:null;s&&(t[s]=i[2])}}}function E9(r,e,t){for(var a=0;a<FN.length;a++){var i=FN[a],n=r.getAttribute(i);n!=null&&(e[yg[i]]=n)}for(var a=0;a<HN.length;a++){var i=HN[a],n=r.getAttribute(i);n!=null&&(t[xg[i]]=n)}}function Cw(r,e){var t=e.width/r.width,a=e.height/r.height,i=Math.min(t,a);return{scale:i,x:-(r.x+r.width/2)*i+(e.x+e.width/2),y:-(r.y+r.height/2)*i+(e.y+e.height/2)}}function $N(r,e){var t=new b9;return t.parse(r,e)}var A9=q(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),KN=(function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=q(),this._freedGraphics=[],this._mapName=e,this._parsedXML=gg(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=I9(e.named),a=t.regions,i=t.regionsMap;this._regions=a,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,a;try{t=e&&$N(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=t.root,ee(a!=null)}catch(m){throw new Error(`Invalid svg format
|
|
`+m.message)}var i=new K;i.add(a),i.isGeoSVGGraphicRoot=!0;var n=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,p=void 0;if(n!=null?(u=0,f=n):s&&(u=s.x,f=s.width),o!=null?(c=0,p=o):s&&(c=s.y,p=s.height),u==null||c==null){var h=a.getBoundingRect();u==null&&(u=h.x,f=h.width),c==null&&(c=h.y,p=h.height)}l=this._boundingRect=new at(u,c,f,p)}if(s){var d=Cw(s,l);a.scaleX=a.scaleY=d.scale,a.x=d.x,a.y=d.y}i.setClipPath(new ht({shape:l.plain()}));var v=[];return T(t.named,function(m){A9.get(m.svgNodeTagLower)!=null&&(v.push(m),L9(m.el))}),{root:i,boundingRect:l,named:v}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,a),a)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);a&&(t.removeKey(e),this._freedGraphics.push(a))},r})();function L9(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function I9(r){var e=[],t=q();return T(r,function(a){if(a.namedFrom==null){var i=new c2(a.name,a.el);e.push(i),t.set(a.name,i)}}),{regions:e,regionsMap:t}}var Mw=[126,25],JN="\u5357\u6D77\u8BF8\u5C9B",wl=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(qo=0;qo<wl.length;qo++)for(Sl=0;Sl<wl[qo].length;Sl++)wl[qo][Sl][0]/=10.5,wl[qo][Sl][1]/=-10.5/.75,wl[qo][Sl][0]+=Mw[0],wl[qo][Sl][1]+=Mw[1];var Sl,qo;function Ew(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===JN)return;e.push(new Pm(JN,V(wl,function(a){return{type:"polygon",exterior:a}}),Mw))}}var P9={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]};function Aw(r,e){if(r==="china"){var t=P9[e.name];if(t){var a=e.getCenter();a[0]+=t[0]/10.5,a[1]+=-t[1]/(10.5/.75),e.setCenter(a)}}}var k9=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function Lw(r,e){r==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:k9[0]})}var R9="name",QN=(function(){function r(e,t,a){this.type="geoJSON",this._parsedMap=q(),this._mapName=e,this._specialAreas=a,this._geoJSON=O9(t)}return r.prototype.load=function(e,t){t=t||R9;var a=this._parsedMap.get(t);if(!a){var i=this._parseToRegions(t);a=this._parsedMap.set(t,{regions:i,boundingRect:N9(i)})}var n=q(),o=[];return T(a.regions,function(s){var l=s.name;e&&it(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),n.set(l,s)}),{regions:o,boundingRect:a.boundingRect||new at(0,0,0,0),regionsMap:n}},r.prototype._parseToRegions=function(e){var t=this._mapName,a=this._geoJSON,i;try{i=a?Qb(a,e):[]}catch(n){throw new Error(`Invalid geoJson format
|
|
`+n.message)}return Ew(t,i),T(i,function(n){var o=n.name;Aw(t,n),Lw(t,n);var s=this._specialAreas&&this._specialAreas[o];s&&n.transformTo(s.left,s.top,s.width,s.height)},this),i},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r})();function N9(r){for(var e,t=0;t<r.length;t++){var a=r[t].getBoundingRect();e=e||a.clone(),e.union(a)}return e}function O9(r){return W(r)?typeof JSON!="undefined"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var Ip=q(),Wr={registerMap:function(r,e,t){if(e.svg){var a=new KN(r,e.svg);Ip.set(r,a)}else{var i=e.geoJson||e.geoJSON;i&&!e.features?t=e.specialAreas:i=e;var a=new QN(r,i,t);Ip.set(r,a)}},getGeoResource:function(r){return Ip.get(r)},getMapForUser:function(r){var e=Ip.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var a=Ip.get(r);if(a)return a.load(e,t)}};var Iw=["rect","circle","line","ellipse","polygon","polyline","path"],z9=q(Iw),V9=q(Iw.concat(["g"])),B9=q(Iw.concat(["g"])),sO=ot();function bg(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function tO(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var U9=(function(){function r(e){var t=this.group=new K,a=this._transformGroup=new K;t.add(a),this.uid=$a("ec_map_draw"),this._controller=new va(e.getZr()),this._controllerHost={target:a},a.add(this._regionsGroup=new K),a.add(this._svgGroup=new K)}return r.prototype.draw=function(e,t,a,i,n){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(x){!s&&x.getHostGeoModel()===e&&(s=x.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,f=l.getTransformInfo(),p=f.raw,h=f.roam,d=!u.childAt(0)||n,v=e.getShallow("clip",!0),m;v?(m=l.getViewRect().clone(),this.group.setClipPath(new ht({shape:m.clone()}))):this.group.removeClipPath(),d?(c.x=h.x,c.y=h.y,c.scaleX=h.scaleX,c.scaleY=h.scaleY,c.dirty()):wt(c,h,e);var g=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,y={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:p};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(e,m,t,a),this._updateMapSelectHandler(e,u,a,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=q(),a=q(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(h,d){return d&&(h=d(h)),h&&[h[0]*n.scaleX+n.x,h[1]*n.scaleY+n.y]}function f(h){for(var d=[],v=!u&&l&&l.project,m=0;m<h.length;++m){var g=c(h[m],v);g&&d.push(g)}return d}function p(h){return{shape:{points:f(h)}}}i.removeAll(),T(e.geo.regions,function(h){var d=h.name,v=t.get(d),m=a.get(d)||{},g=m.dataIdx,y=m.regionModel;if(!v){v=t.set(d,new K),i.add(v),g=s?s.indexOfName(d):null,y=e.isGeo?o.getRegionModel(d):s?s.getItemModel(g):null;var x=y.get("silent",!0);x!=null&&(v.silent=x),a.set(d,{dataIdx:g,regionModel:y})}var _=[],b=[];T(h.geometries,function(D){if(D.type==="polygon"){var C=[D.exterior].concat(D.interiors||[]);u&&(C=oO(C,u)),T(C,function(E){_.push(new ye(p(E)))})}else{var M=D.points;u&&(M=oO(M,u,!0)),T(M,function(E){b.push(new he(p(E)))})}});var S=c(h.getCenter(),l&&l.project);function w(D,C){if(D.length){var M=new Co({culling:!0,segmentIgnoreThreshold:1,shape:{paths:D}});v.add(M),eO(e,M,g,y),rO(e,M,d,y,o,g,S),C&&(tO(M),T(M.states,tO))}}w(_),w(b,!0)}),t.each(function(h,d){var v=a.get(d),m=v.dataIdx,g=v.regionModel;aO(e,h,d,g,o,m),iO(e,h,d,g,o),nO(e,h,d,g,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,a=e.transformInfoRaw;this._svgGroup.x=a.x,this._svgGroup.y=a.y,this._svgGroup.scaleX=a.scaleX,this._svgGroup.scaleY=a.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var i=this._svgDispatcherMap=q(),n=!1;T(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,p=u?u.indexOfName(s):null,h=l.getRegionModel(s);z9.get(c)!=null&&f instanceof ke&&eO(e,f,p,h),f instanceof ke&&(f.culling=!0);var d=h.get("silent",!0);if(d!=null&&(f.silent=d),f.z2EmphasisLift=0,!o.namedFrom&&(B9.get(c)!=null&&rO(e,f,s,h,l,p,null),aO(e,f,s,h,l,p),iO(e,f,s,h,l),V9.get(c)!=null)){var v=nO(e,f,s,h,l);v==="self"&&(n=!0);var m=i.get(s)||i.set(s,[]);m.push(f)}},this),this._enableBlurEntireSVG(n,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var a=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=a.opacity;this._svgGraphicRecord.root.traverse(function(n){if(!n.isGroup){wi(n);var o=n.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),n.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 a=t.coordinateSystem;if(a.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var n=i.get(e);return n?[n]:[]}}else if(a.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=Wr.getGeoResource(e);if(t&&t.type==="geoSVG"){var a=t.useGraphic(this.uid);this._svgGroup.add(a.root),this._svgGraphicRecord=a,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Wr.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,a,i){var n=e.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=n.getZoom(),o.enable(e.get("roam")||!1,{api:i,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(c,f,p){return n.containPoint([f,p])},isInClip:function(c,f,p){return!t||t.contain(f,p)}}});var l=e.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=e.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,Ap(s,c.dx,c.dy),i.dispatchAction(O(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,Lp(s,c.scale,c.originX,c.originY),i.dispatchAction(O(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=sO(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,a,i){var n=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){n._mouseDownFlag=!0}),t.on("click",function(o){n._mouseDownFlag&&(n._mouseDownFlag=!1)}))},r})();function eO(r,e,t,a){var i=a.getModel("itemStyle"),n=a.getModel(["emphasis","itemStyle"]),o=a.getModel(["blur","itemStyle"]),s=a.getModel(["select","itemStyle"]),l=bg(i),u=bg(n),c=bg(s),f=bg(o),p=r.data;if(p){var h=p.getItemVisual(t,"style"),d=p.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),d&&(l.decal=ki(d,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,wi(e)}function rO(r,e,t,a,i,n,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),n)),c=s&&s.getItemLayout(n);if(l||u||c&&c.showLabel){var f=l?t:n,p=void 0;(!s||n>=0)&&(p=i);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;$t(e,qt(a),{labelFetcher:p,labelDataIndex:f,defaultText:t},h);var d=e.getTextContent();if(d&&(sO(d).ignore=d.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 aO(r,e,t,a,i,n){r.data?r.data.setItemGraphicEl(n,e):nt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:a&&a.option||{}}}function iO(r,e,t,a,i){r.data||Er({el:e,componentModel:i,itemName:t,itemTooltipOption:a.get("tooltip")})}function nO(r,e,t,a,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=a.getModel("emphasis"),o=n.get("focus");return Rt(e,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&iL(e,i,t),o}function oO(r,e,t){var a=[],i;function n(){i=[]}function o(){i.length&&(a.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),T(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(),a}var Sg=U9;var F9=(function(r){I(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,a,i,n){if(!(n&&n.type==="mapToggleSelect"&&n.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&n&&n.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),n&&n.type==="geoRoam"&&n.componentType==="series"&&n.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new Sg(i);o.add(s.group),s.draw(t,a,i,this,n),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&a.getComponent("legend")&&this._renderSymbols(t,a,i)}}},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,a,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=n.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,p=new Or({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:Pn+1)});if(!f){var h=t.mainSeries.getData(),d=n.getName(l),v=h.indexOfName(d),m=n.getItemModel(l),g=m.getModel("label"),y=h.getItemGraphicEl(v);$t(p,qt(m),{labelFetcher:{getFormattedLabel:function(x,_){return t.getFormattedLabel(v,_)}},defaultText:d}),p.disableLabelAnimation=!0,g.get("position")||p.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(x){Ws(p,x)}}o.add(p)}}})},e.type="map",e})(Pt),lO=F9;var H9=(function(r){I(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(a){if(a!=null){var i=this.getData().getName(a),n=this.coordinateSystem,o=n.getRegion(i);return o&&n.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var a=Aa(this,{coordDimensions:["value"],encodeDefaulter:ut(Cu,this)}),i=q(),n=[],o=0,s=a.count();o<s;o++){var l=a.getName(o);i.set(l,o)}var u=Wr.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return T(u.regions,function(c){var f=c.name,p=i.get(f),h=c.properties&&c.properties.echartsStyle,d;p==null?(d={name:f},n.push(d)):d=a.getRawDataItem(p),h&&dt(d,h)}),a.appendData(n),a},e.prototype.getHostGeoModel=function(){if(k_(this).kind!==Ei.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var a=this.getData();return a.get(a.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var a=this.getData();return a.getItemModel(a.indexOfName(t))},e.prototype.formatTooltip=function(t,a,i){for(var n=this.getData(),o=this.getRawValue(t),s=n.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),p=n.mapDimension("value");isNaN(l[c].originalData.get(p,f))||u.push(l[c].name)}return re("section",{header:u.join(", "),noHeader:!u.length,blocks:[re("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 a=t.icon||"roundRect",i=jt(a,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",a.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill=N.color.neutral00,i.style.lineWidth=2),i},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:N.color.tertiary},itemStyle:{borderWidth:.5,borderColor:N.color.border,areaColor:N.color.background},emphasis:{label:{show:!0,color:N.color.primary},itemStyle:{areaColor:N.color.highlight}},select:{label:{show:!0,color:N.color.primary},itemStyle:{color:N.color.highlight}},nameProperty:"name"},e})(Nt),uO=H9;function G9(r,e){var t={};return T(r,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(a,i){for(var n="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,c=0;c<u;c++)s=Math.min(s,t[n][c]),l=Math.max(l,t[n][c]),o+=t[n][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function Pw(r){var e={};r.eachSeriesByType("map",function(t){var a=t.getHostGeoModel(),i=a?"o"+a.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),T(e,function(t,a){for(var i=G9(V(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(var n=0;n<t.length;n++)t[n].seriesGroup=t,t[n].needsDrawMap=n===0&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}function kw(r){var e={};r.eachSeriesByType("map",function(t){var a=t.getMapType();if(!(t.getHostGeoModel()||e[a])){var i={};T(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),p=s.getRegion(f);if(!(!p||isNaN(u))){var h=i[f]||0,d=s.dataToPoint(p.getCenter());i[f]=h+1,l.setItemLayout(c,{point:d,offset:h})}})});var n=t.getData();n.each(function(o){var s=n.getName(o),l=n.getItemLayout(o)||{};l.showLabel=!i[s],n.setItemLayout(o,l)}),e[a]=!0}})}var cO=ce,W9=(function(r){I(e,r);function e(t,a){var i=r.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Qr,i._rawTransformable=new Qr,i.name=t,i._opt=a,i}return e.prototype.setBoundingRect=function(t,a,i,n){return this._rect=new at(t,a,i,n),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,a,i,n){this._transformTo(t,a,i,n),this._viewRect=new at(t,a,i,n)},e.prototype._transformTo=function(t,a,i,n){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new at(t,a,i,n));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t){var a=this._opt;a&&a.api&&a.ecModel&&a.ecModel.getShallow("legacyViewCoordSysCenterBase")&&t&&(t=[j(t[0],a.api.getWidth()),j(t[1],a.api.getWidth())]),this._centerOption=tt(t),this._updateCenterAndZoom()},e.prototype.setZoom=function(t){this._zoom=mg(t||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),a=t.x+t.width/2,i=t.y+t.height/2;return[a,i]},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._centerOption,a=this._rect;t&&a&&(this._center=[j(t[0],a.width,a.x),j(t[1],a.height,a.y)]);var i=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=ce([],s,i),o=ce([],o,i),n.originX=s[0],n.originY=s[1],n.x=o[0]-s[0],n.y=o[1]-s[1],n.scaleX=n.scaleY=l,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,a=this._rawTransformable;a.parent=t,t.updateTransform(),a.updateTransform(),ds(this.transform||(this.transform=[]),a.transform||fe()),this._rawTransform=a.getLocalTransform(),this.invTransform=this.invTransform||[],Fe(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,a=this._roamTransformable,i=new Qr;return i.transform=a.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.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,a,i){var n=a?this._rawTransform:this.transform;return i=i||[],n?cO(i,t,n):Je(i,t)},e.prototype.pointToData=function(t,a,i){i=i||[];var n=this.invTransform;return n?cO(i,t,n):(i[0]=t[0],i[1]=t[1],i)},e.prototype.convertToPixel=function(t,a,i){var n=fO(a);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,a,i){var n=fO(a);return n===this?n.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e})(Qr);function fO(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var Ia=W9;var Y9={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Rw=["lng","lat"],hO=(function(r){I(e,r);function e(t,a,i){var n=r.call(this,t,{api:i.api,ecModel:i.ecModel})||this;n.dimensions=Rw,n.type="geo",n._nameCoordMap=q(),n.map=a;var o=i.projection,s=Wr.load(a,i.nameMap,i.nameProperty),l=Wr.getGeoResource(a),u=n.resourceType=l?l.type:null,c=n.regions=s.regions,f=Y9[l.type];n._regionsMap=s.regionsMap,n.regions=s.regions,n.projection=o;var p;if(o)for(var h=0;h<c.length;h++){var d=c[h].getBoundingRect(o);p=p||d.clone(),p.union(d)}else p=s.boundingRect;return n.setBoundingRect(p.x,p.y,p.width,p.height),n.aspectScale=o?1:Q(i.aspectScale,f.aspectScale),n._invertLongitute=o?!1:f.invertLongitute,n}return e.prototype._transformTo=function(t,a,i,n){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 at(t,a,i,n));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 a=this.regions,i=0;i<a.length;i++){var n=a[i];if(n.type==="geoJSON"&&n.contain(t))return a[i]}},e.prototype.addGeoCoord=function(t,a){this._nameCoordMap.set(t,a)},e.prototype.getGeoCoord=function(t){var a=this._regionsMap.get(t);return this._nameCoordMap.get(t)||a&&a.getCenter()},e.prototype.dataToPoint=function(t,a,i){if(W(t)&&(t=this.getGeoCoord(t)),t){var n=this.projection;return n&&(t=n.project(t)),t&&this.projectedToPoint(t,a,i)}},e.prototype.pointToData=function(t,a,i){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t,i)},e.prototype.pointToProjected=function(t,a){return r.prototype.pointToData.call(this,t,0,a)},e.prototype.projectedToPoint=function(t,a,i){return r.prototype.dataToPoint.call(this,t,a,i)},e.prototype.convertToPixel=function(t,a,i){var n=pO(a);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,a,i){var n=pO(a);return n===this?n.pointToData(i):null},e})(Ia);Jt(hO,Ia);function pO(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Yt).models[0]||{}).coordinateSystem:null}var Nw=hO;function dO(r,e){var t=r.get("boundingCoords");if(t!=null){var a=t[0],i=t[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])){var n=this.projection;if(n){var o=a[0],s=a[1],l=i[0],u=i[1];a=[1/0,1/0],i=[-1/0,-1/0];var c=function(b,S,w,D){for(var C=w-b,M=D-S,E=0;E<=100;E++){var L=E/100,A=n.project([b+C*L,S+M*L]);ga(a,a,A),ya(i,i,A)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1])}}var f=this.getBoundingRect(),p=r.get("layoutCenter"),h=r.get("layoutSize"),d=Zt(r,e).refContainer,v=f.width/f.height*this.aspectScale,m=!1,g,y;p&&h&&(g=[j(p[0],d.width)+d.x,j(p[1],d.height)+d.y],y=j(h,Math.min(d.width,d.height)),!isNaN(g[0])&&!isNaN(g[1])&&!isNaN(y)&&(m=!0));var x;if(m)x={},v>1?(x.width=y,x.height=y/v):(x.height=y,x.width=y*v),x.y=g[1]-x.height/2,x.x=g[0]-x.width/2;else{var _=r.getBoxLayoutParams();_.aspect=v,x=Bt(_,d),x=Mv(r,x,v)}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function Z9(r,e){T(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var X9=(function(){function r(){this.dimensions=Rw}return r.prototype.create=function(e,t){var a=[];function i(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 Nw(l+s,l,O({nameMap:o.get("nameMap"),api:t,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=dO,u.resize(o,t)}),e.eachSeries(function(o){ln({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Yt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),T(n,function(o,s){var l=V(o,function(c){return c.get("nameMap")}),u=new Nw(s,s,O({nameMap:Yl(l),api:t,ecModel:e},i(o[0])));u.zoomLimit=de.apply(null,V(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=dO,u.resize(o[0],t),T(o,function(c){c.coordinateSystem=u,Z9(u,c)})}),a},r.prototype.getFilledRegions=function(e,t,a,i){for(var n=(e||[]).slice(),o=q(),s=0;s<n.length;s++)o.set(n[s].name,n[s]);var l=Wr.load(t,a,i);return T(l.regions,function(u){var c=u.name,f=o.get(c),p=u.properties&&u.properties.echartsStyle;f||(f={name:c},n.push(f)),p&&dt(f,p)}),n},r})(),q9=new X9,wg=q9;var j9=(function(r){I(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,a,i){this.mergeDefaultAndTheme(t,i);var n=Wr.getGeoResource(t.map);if(n&&n.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color=t.defaultItemStyleColor||N.color.backgroundTint)}ba(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,a=this.option;a.regions=wg.getFilledRegions(a.regions,a.map,a.nameMap,a.nameProperty);var i={};this._optionModelMap=cr(a.regions||[],function(n,o){var s=o.name;return s&&(n.set(s,new Mt(o,t,t.ecModel)),o.selected&&(i[s]=!0)),n},q()),a.selectedMap||(a.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Mt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,a){var i=this.getRegionModel(t),n=a==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};if($(n))return o.status=a,n(o);if(W(n))return n.replace("{a}",t!=null?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 a=this.option,i=a.selectedMode;if(i){i!=="multiple"&&(a.selectedMap=null);var n=a.selectedMap||(a.selectedMap={});n[t]=!0}},e.prototype.unSelect=function(t){var a=this.option.selectedMap;a&&(a[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var a=this.option.selectedMap;return!!(a&&a[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:N.color.tertiary},itemStyle:{borderWidth:.5,borderColor:N.color.border},emphasis:{label:{show:!0,color:N.color.primary},itemStyle:{color:N.color.highlight}},select:{label:{show:!0,color:N.color.primary},itemStyle:{color:N.color.highlight}},regions:[]},e})(St),vO=j9;var $9=(function(r){I(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,a){this._api=a},e.prototype.render=function(t,a,i,n){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new Sg(i));var o=this._mapDraw;o.draw(t,a,i,this,n),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,a,i)},e.prototype._handleRegionClick=function(t){var a;Ii(t.target,function(i){return(a=nt(i).eventData)!=null},!0),a&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:a.name})},e.prototype.updateSelectStatus=function(t,a,i){var n=this;this._mapDraw.group.traverse(function(o){var s=nt(o).eventData;if(s)return n._model.isSelected(s.name)?i.enterSelect(o):i.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})(Ot),mO=$9;function K9(r,e,t){Wr.registerMap(r,e,t)}function Pp(r){r.registerCoordinateSystem("geo",wg),r.registerComponentModel(vO),r.registerComponentView(mO),r.registerImpl("registerMap",K9),r.registerImpl("getMap",function(t){return Wr.getMapForUser(t)});function e(t,a){a.update="geo:updateSelectStatus",r.registerAction(a,function(i,n){var o={},s=[];return n.eachComponent({mainType:"geo",query:i},function(l){l[t](i.name);var u=l.coordinateSystem;T(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];T(o,function(f,p){o[p]&&c.push(p)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.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,a,i){var n=t.componentType;n||(t.geoId!=null?n="geo":t.seriesId!=null&&(n="series")),n||(n="series"),a.eachComponent({mainType:n,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=Xo(s,t,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),n==="series"&&T(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Ow(r){Tt(Pp),r.registerChartView(lO),r.registerSeriesModel(uO),r.registerLayout(kw),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Pw),em("map",r.registerAction)}function gO(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],a,i;a=t.pop();)if(i=a.children,a.isExpand&&i.length)for(var n=i.length,o=n-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function yO(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,i=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){J9(r);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-n):r.hierNode.prelim=n}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=Q9(r,i,r.parentNode.hierNode.defaultAncestor||a[0],e)}function xO(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Bw(r){return arguments.length?r:rq}function Tl(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function J9(r){for(var e=r.children,t=e.length,a=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function Q9(r,e,t,a){if(e){for(var i=r,n=r,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=zw(s),n=Vw(n),s&&n;){i=zw(i),o=Vw(o),i.hierNode.ancestor=r;var p=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);p>0&&(eq(tq(s,r,t),r,p),u+=p,l+=p),f+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!zw(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!Vw(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-c,t=r)}return t}function zw(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Vw(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function tq(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function eq(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function rq(r,e){return r.parentNode===e.parentNode?1:2}var aq=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),iq=(function(r){I(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new aq},e.prototype.buildPath=function(t,a){var i=a.childPoints,n=i.length,o=a.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,p=j(a.forkPosition,1),h=[];h[c]=o[c],h[f]=o[f]+(l[f]-o[f])*p,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[c]=s[c],t.lineTo(h[0],h[1]),h[c]=l[c],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var d=1;d<n-1;d++){var v=i[d];t.moveTo(v[0],v[1]),h[c]=v[c],t.lineTo(h[0],h[1])}},e})(ft),nq=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new K,t}return e.prototype.init=function(t,a){this._controller=new va(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,i){var n=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,i),this._updateController(t,null,a,i);var u=this._data;n.diff(u).add(function(c){_O(n,c)&&bO(n,c,null,s,t)}).update(function(c,f){var p=u.getItemGraphicEl(f);if(!_O(n,c)){p&&wO(u,f,p,s,t);return}bO(n,c,p,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&wO(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&n.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=n},e.prototype._updateViewCoordSys=function(t,a){var i=t.getData(),n=[];i.each(function(f){var p=i.getItemLayout(f);p&&!isNaN(p.x)&&!isNaN(p.y)&&n.push([+p.x,+p.y])});var o=[],s=[];Ns(n,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 Ia(null,{api:a,ecModel:t.ecModel});c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center")),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,a,i,n){var o=this;vg(t,n,this.group,this._controller,this._controllerHost,a),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(t)})},e.prototype._updateNodeAndLinkScale=function(t){var a=t.getData(),i=this._getNodeGlobalScale(t);a.eachItemGraphicEl(function(n,o){n.setSymbolScale(i)})},e.prototype._getNodeGlobalScale=function(t){var a=t.coordinateSystem;if(a.type!=="view")return 1;var i=this._nodeScaleRatio,n=a.scaleX||1,o=a.getZoom(),s=(o-1)*i+1;return s/n},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})(Pt);function _O(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function bO(r,e,t,a,i){var n=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:N.color.neutral00,c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,p=r.getItemGraphicEl(f.dataIndex),h=f.getLayout(),d=p?{x:p.__oldX,y:p.__oldY,rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:h,v=o.getLayout();n?(t=new jn(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.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,a.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,wt(t,{x:v.x,y:v.y},i);var m=t.getSymbolPath();if(i.get("layout")==="radial"){var g=c.children[0],y=g.getLayout(),x=g.children.length,_=void 0,b=void 0;if(v.x===y.x&&o.isExpand===!0&&g.children.length){var S={x:(g.children[0].getLayout().x+g.children[x-1].getLayout().x)/2,y:(g.children[0].getLayout().y+g.children[x-1].getLayout().y)/2};_=Math.atan2(S.y-y.y,S.x-y.x),_<0&&(_=Math.PI*2+_),b=S.x<y.x,b&&(_=_-Math.PI)}else _=Math.atan2(v.y-y.y,v.x-y.x),_<0&&(_=Math.PI*2+_),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=v.x<y.x,b&&(_=_-Math.PI)):(b=v.x>y.x,b||(_=_-Math.PI));var w=b?"left":"right",D=s.getModel("label"),C=D.get("rotate"),M=C*(Math.PI/180),E=m.getTextContent();E&&(m.setTextConfig({position:D.get("position")||w,rotation:C==null?-_:M,origin:"center"}),E.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),A=L==="relative"?Dn(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;A&&(nt(t).focus=A),oq(i,o,c,t,d,h,v,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===Gs||Ws(t.__edge,P)}})}function oq(r,e,t,a,i,n,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),p=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),v=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(v||(v=a.__edge=new Xs({shape:Uw(c,f,p,i,i)})),wt(v,{shape:Uw(c,f,p,n,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,g=[],y=0;y<m.length;y++){var x=m[y].getLayout();g.push([x.x,x.y])}v||(v=a.__edge=new iq({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:h}})),wt(v,{shape:{parentPoint:[o.x,o.y],childPoints:g}},r)}v&&!(u==="polyline"&&!e.isExpand)&&(v.useStyle(J({strokeNoScale:!0,fill:null},d)),te(v,l,"lineStyle"),wi(v),s.add(v))}function SO(r,e,t,a,i){var n=e.tree.root,o=TO(n,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,p=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),h=a.get("edgeShape"),d=a.get("layout"),v=a.get("orient"),m=a.get(["lineStyle","curveness"]);p&&(h==="curve"?Xa(p,{shape:Uw(d,v,m,l,l),style:{opacity:0}},a,{cb:function(){t.remove(p)},removeOpt:i}):h==="polyline"&&a.get("layout")==="orthogonal"&&Xa(p,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){t.remove(p)},removeOpt:i}))}}function TO(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,a;a=t.getLayout(),a==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:a}}function wO(r,e,t,a,i){var n=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=TO(o,n).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Xa(t,{x:s.x+1,y:s.y+1},i,{cb:function(){a.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),n.children.forEach(function(u){SO(u,r,a,i,l)}),SO(n,r,a,i,l)}function Uw(r,e,t,a,i){var n,o,s,l,u,c,f,p;if(r==="radial"){u=a.rawX,f=a.rawY,c=i.rawX,p=i.rawY;var h=Tl(u,f),d=Tl(u,f+(p-f)*t),v=Tl(c,p+(f-p)*t),m=Tl(c,p);return{x1:h.x||0,y1:h.y||0,x2:m.x||0,y2:m.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=a.x,f=a.y,c=i.x,p=i.y,(e==="LR"||e==="RL")&&(n=u+(c-u)*t,o=f,s=c+(u-c)*t,l=p),(e==="TB"||e==="BT")&&(n=u,o=f+(p-f)*t,s=c,l=p+(f-p)*t);return{x1:u,y1:f,x2:c,y2:p,cpx1:n,cpy1:o,cpx2:s,cpy2:l}}var DO=nq;var ni=ot();function sq(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,CO(e,t,r),T(t,function(a){T(e.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,ut(lq,r))})}),e.wrapMethod("cloneShallow",ut(cq,r)),T(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,ut(uq,r))}),ee(t[e.dataType]===e)}function lq(r,e){if(hq(this)){var t=O({},ni(this).datas);t[this.dataType]=e,CO(e,t,r)}else Fw(e,this.dataType,ni(this).mainData,r);return e}function uq(r,e){return r.struct&&r.struct.update(),e}function cq(r,e){return T(ni(e).datas,function(t,a){t!==e&&Fw(t.cloneShallow(),a,e,r)}),e}function fq(r){var e=ni(this).mainData;return r==null||e==null?e:ni(e).datas[r]}function pq(){var r=ni(this).mainData;return r==null?[{data:r}]:V(gt(ni(r).datas),function(e){return{type:e,data:ni(r).datas[e]}})}function hq(r){return ni(r).mainData===r}function CO(r,e,t){ni(r).datas={},T(e,function(a,i){Fw(a,i,r,t)})}function Fw(r,e,t,a){ni(t).datas[e]=r,ni(r).mainData=t,r.dataType=e,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=r),r.getLinkedData=fq,r.getLinkedDataAll=pq}var Tg=sq;var dq=(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,a){$(e)&&(a=t,t=e,e=null),e=e||{},W(e)&&(e={order:e});var i=e.order||"preorder",n=this[e.attr||"children"],o;i==="preorder"&&(o=t.call(a,this));for(var s=0;!o&&s<n.length;s++)n[s].eachNode(e,t,a);i==="postorder"&&t.call(a,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var a=0;a<this.children.length;a++){var i=this.children[a];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,i=a.length;t<i;t++){var n=a[t].getNodeById(e);if(n)return n}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,a=this.children,i=a.length;t<i;t++){var n=a[t].contains(e);if(n)return n}},r.prototype.getAncestors=function(e){for(var t=[],a=e?this:this.parentNode;a;)t.push(a),a=a.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,a=t.data.getItemModel(this.dataIndex);return a.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})();var vq=(function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,a){this.root.eachNode(e,t,a)},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,a=0,i=t.length;a<i;a++)t[a].dataIndex=-1;for(var a=0,i=e.count();a<i;a++)t[e.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,a){var i=new r(t),n=[],o=1;s(e);function s(c,f){var p=c.value;o=Math.max(o,z(p)?p.length:1),n.push(c);var h=new dq(ve(c.name,""),i);f?mq(h,f):i.root=h,i._nodes.push(h);var d=c.children;if(d)for(var v=0;v<d.length;v++)s(d[v],h)}i.root.updateDepthAndHeight(0);var l=Ri(n,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new we(l,t);return u.initData(n),a&&a(u),Tg({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},r})();function mq(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}var ju=vq;function Jn(r,e,t){if(r&<(e,r.type)>=0){var a=t.getData().tree.root,i=r.targetNode;if(W(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=r.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function Hw(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function $u(r,e){var t=Hw(r);return lt(t,e)>=0}function jo(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var gq=(function(r){I(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 a={name:t.name,children:t.data},i=t.leaves||{},n=new Mt(i,this,this.ecModel),o=ju.createTree(a,this,s);function s(f){f.wrapMethod("getItemModel",function(p,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(p.parentModel=n),p})}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 p=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=p&&p.collapsed!=null?!p.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,a,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return re("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=jo(i,this),a.collapsed=!i.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:N.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(Nt),MO=gq;function EO(r,e,t){for(var a=[r],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;n=i.pop();)e(n,t)}function Ku(r,e){for(var t=[r],a;a=t.pop();)if(e(a),a.isExpand){var i=a.children;if(i.length)for(var n=i.length-1;n>=0;n--)t.push(i[n])}}function Ww(r,e){r.eachSeriesByType("tree",function(t){yq(t,e)})}function yq(r,e){var t=Zt(r,e).refContainer,a=Bt(r.getBoxLayoutParams(),t);r.layoutInfo=a;var i=r.get("layout"),n=0,o=0,s=null;i==="radial"?(n=2*Math.PI,o=Math.min(a.height,a.width)/2,s=Bw(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(n=a.width,o=a.height,s=Bw());var l=r.getData().tree.root,u=l.children[0];if(u){gO(l),EO(u,yO,s),l.hierNode.modifier=-u.hierNode.prelim,Ku(u,xO);var c=u,f=u,p=u;Ku(u,function(_){var b=_.getLayout().x;b<c.getLayout().x&&(c=_),b>f.getLayout().x&&(f=_),_.depth>p.depth&&(p=_)});var h=c===f?1:s(c,f)/2,d=h-c.getLayout().x,v=0,m=0,g=0,y=0;if(i==="radial")v=n/(f.getLayout().x+h+d),m=o/(p.depth-1||1),Ku(u,function(_){g=(_.getLayout().x+d)*v,y=(_.depth-1)*m;var b=Tl(g,y);_.setLayout({x:b.x,y:b.y,rawX:g,rawY:y},!0)});else{var x=r.getOrient();x==="RL"||x==="LR"?(m=o/(f.getLayout().x+h+d),v=n/(p.depth-1||1),Ku(u,function(_){y=(_.getLayout().x+d)*m,g=x==="LR"?(_.depth-1)*v:n-(_.depth-1)*v,_.setLayout({x:g,y},!0)})):(x==="TB"||x==="BT")&&(v=n/(f.getLayout().x+h+d),m=o/(p.depth-1||1),Ku(u,function(_){g=(_.getLayout().x+d)*v,y=x==="TB"?(_.depth-1)*m:o-(_.depth-1)*m,_.setLayout({x:g,y},!0)}))}}}function Yw(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");O(s,o)})})}function AO(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=e.dataIndex,n=a.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=Xo(n,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Zw(r){r.registerChartView(DO),r.registerSeriesModel(MO),r.registerLayout(Ww),r.registerVisual(Yw),AO(r)}var LO=["treemapZoomToNode","treemapRender","treemapMove"];function IO(r){for(var e=0;e<LO.length;e++)r.registerAction({type:LO[e],update:"updateView"},ie);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,a){a.eachComponent({mainType:"series",subType:"treemap",query:t},i);function i(n,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Jn(t,s,n);if(l){var u=n.getViewRoot();u&&(t.direction=$u(u,l.node)?"rollUp":"drillDown"),n.resetViewRoot(l.node)}}})}function kp(r){var e=r.getData(),t=e.tree,a={};t.eachNode(function(i){for(var n=i;n&&n.depth>1;)n=n.parentNode;var o=Of(r.ecModel,n.name||n.dataIndex+"",a);i.setVisual("decal",o)})}var xq=(function(r){I(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,a){var i={name:t.name,children:t.data};PO(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Mt({itemStyle:o},this,a);n=t.levels=_q(n,a);var l=V(n||[],function(f){return new Mt(f,s,a)},this),u=ju.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(p,h){var d=u.getNodeByDataIndex(h),v=d?l[d.depth]:null;return p.parentModel=v||s,p})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return re("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=jo(i,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},O(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=q(),this._idIndexMapCount=0);var i=a.get(t);return i==null&&a.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){kp(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:N.size.l,top:N.size.xxxl,right:N.size.l,bottom:N.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:N.size.m,emptyItemWidth:25,itemStyle:{color:N.color.backgroundShade,textStyle:{color:N.color.secondary}},emphasis:{itemStyle:{color:N.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:N.color.neutral00,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:N.color.neutral00,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})(Nt);function PO(r){var e=0;T(r.children,function(a){PO(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function _q(r,e){var t=Ft(e.get("color")),a=Ft(e.get(["aria","decal","decals"]));if(t){r=r||[];var i,n;T(r,function(s){var l=new Mt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(n=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!n&&a&&(o.decal=a.slice()),r}}var kO=xq;var bq=8,RO=8,Xw=5,Sq=(function(){function r(e){this.group=new K,e.add(this.group)}return r.prototype.render=function(e,t,a,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!a)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=Zt(e,t).refContainer,p={left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},h={emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=Bt(p,f);this._prepare(a,h,u),this._renderContent(e,h,d,s,l,u,c,i),Mo(o,p,f)}},r.prototype._prepare=function(e,t,a){for(var i=e;i;i=i.parentNode){var n=ve(i.getModel().get("name"),""),o=a.getTextRect(n),s=Math.max(o.width+bq*2,t.emptyItemWidth);t.totalWidth+=s+RO,t.renderList.push({node:i,text:n,width:s})}},r.prototype._renderContent=function(e,t,a,i,n,o,s,l){for(var u=0,c=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),p=t.totalWidth,h=t.renderList,d=n.getModel("itemStyle").getItemStyle(),v=h.length-1;v>=0;v--){var m=h[v],g=m.node,y=m.width,x=m.text;p>a.width&&(p-=y-c,y=c,x=null);var _=new ye({shape:{points:wq(u,0,y,f,v===h.length-1,v===0)},style:J(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Dt({style:Gt(o,{text:x})}),textConfig:{position:"inside"},z2:Pn*1e4,onclick:ut(l,g)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Gt(s,{text:x}),_.ensureState("emphasis").style=d,Rt(_,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(_),Tq(_,e,g),u+=y+RO}},r.prototype.remove=function(){this.group.removeAll()},r})();function wq(r,e,t,a,i,n){var o=[[i?r:r-Xw,e],[r+t,e],[r+t,e+a],[i?r:r-Xw,e+a]];return!n&&o.splice(2,0,[r+t+Xw,e+a/2]),!i&&o.push([r,e+a/2]),o}function Tq(r,e,t){nt(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&&jo(t,e)}}var NO=Sq;var Dq=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:i,easing:n}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;i<n;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},r})();function OO(){return new Dq}var qw=K,zO=ht,VO=3,BO="label",UO="upperLabel",Mq=Pn*10,Eq=Pn*2,Aq=Pn*3,Dl=ra([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),FO=function(r){var e=Dl(r);return e.stroke=e.fill=e.lineWidth=null,e},Dg=ot(),Lq=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Rp(),t}return e.prototype.render=function(t,a,i,n){var o=a.findComponents({mainType:"series",subType:"treemap",query:n});if(!(lt(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=Jn(n,s,t),u=n&&n.type,c=t.layoutInfo,f=!this._oldTree,p=this._storage,h=u==="treemapRootToNode"&&l&&p?{rootNodeGroup:p.nodeGroup[l.node.getRawIndex()],direction:n.direction}:null,d=this._giveContainerGroup(c),v=t.get("animation"),m=this._doRender(d,t,h);v&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,m,t,h):m.renderFinally(),this._resetController(i),this._renderBreadcrumb(t,i,l)}},e.prototype._giveContainerGroup=function(t){var a=this._containerGroup;return a||(a=this._containerGroup=new qw,this._initEvents(a),this.group.add(a)),a.x=t.x,a.y=t.y,a},e.prototype._doRender=function(t,a,i){var n=a.getData().tree,o=this._oldTree,s=Rp(),l=Rp(),u=this._storage,c=[];function f(y,x,_,b){return Iq(a,l,u,i,s,c,y,x,_,b)}v(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var p=m(u);if(this._oldTree=n,this._storage=l,this._controllerHost){var h=this.seriesModel.layoutInfo,d=n.root.getLayout();d.width===h.width&&d.height===h.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:p,renderFinally:g};function v(y,x,_,b,S){b?(x=y,T(y,function(C,M){!C.isRemoved()&&D(M,M)})):new gr(x,y,w,w).add(D).update(D).remove(ut(D,null)).execute();function w(C){return C.getId()}function D(C,M){var E=C!=null?y[C]:null,L=M!=null?x[M]:null,A=f(E,L,_,S);A&&v(E&&E.viewChildren||[],L&&L.viewChildren||[],A,b,S+1)}}function m(y){var x=Rp();return y&&T(y,function(_,b){var S=x[b];T(_,function(w){w&&(S.push(w),Dg(w).willDelete=!0)})}),x}function g(){T(p,function(y){T(y,function(x){x.parent&&x.parent.remove(x)})}),T(c,function(y){y.invisible=!0,y.dirty()})}},e.prototype._doAnimation=function(t,a,i,n){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=($(o)?0:o)||0,u=($(s)?null:s)||"cubicOut",c=OO();T(a.willDeleteEls,function(f,p){T(f,function(h,d){if(!h.invisible){var v=h.parent,m,g=Dg(v);if(n&&n.direction==="drillDown")m=v===n.rootNodeGroup?{shape:{x:0,y:0,width:g.nodeWidth,height:g.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,x=0;g.willDelete||(y=g.nodeWidth/2,x=g.nodeHeight/2),m=p==="nodeGroup"?{x:y,y:x,style:{opacity:0}}:{shape:{x:y,y:x,width:0,height:0},style:{opacity:0}}}m&&c.add(h,m,l,0,u)}})}),T(this._storage,function(f,p){T(f,function(h,d){var v=a.lastsForAnimation[p][d],m={};v&&(h instanceof K?v.oldX!=null&&(m.x=h.x,m.y=h.y,h.x=v.oldX,h.y=v.oldY):(v.oldShape&&(m.shape=O({},h.shape),h.setShape(v.oldShape)),v.fadein?(h.setStyle("opacity",0),m.style={opacity:1}):h.style.opacity!==1&&(m.style={opacity:1})),c.add(h,m,l,0,u))})},this),this._state="animating",c.finished(Z(function(){this._state="ready",a.renderFinally()},this)).start()},e.prototype._resetController=function(t){var a=this,i=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost);var o=this.seriesModel;i||(i=this._controller=new va(t.getZr()),i.on("pan",Z(this._onPan,this)),i.on("zoom",Z(this._onZoom,this))),i.enable(o.get("roam"),{api:t,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=a._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.get("zoom")},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)>VO||Math.abs(t.dy)>VO)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var a=t.originX,i=t.originY,n=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 at(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*=n,u){var p=u.min||0,h=u.max||1/0;f=Math.max(Math.min(h,f),p)}var d=f/c.zoom;c.zoom=f;var v=this.seriesModel.layoutInfo;a-=v.x,i-=v.y;var m=fe();pr(m,m,[-a,-i]),Kl(m,m,[d,d]),pr(m,m,[a,i]),l.applyTransform(m),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 a=this;t.on("click",function(i){if(a._state==="ready"){var n=a.seriesModel.get("nodeClick",!0);if(n){var o=a.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(n==="zoomToNode")a._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&al(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new NO(this.group))).render(t,a,i.node,function(o){n._state!=="animating"&&($u(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Rp(),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,a){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e})(Pt);function Rp(){return{nodeGroup:[],background:[],content:[]}}function Iq(r,e,t,a,i,n,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),p=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var h=c.width,d=c.height,v=c.borderWidth,m=c.invisible,g=o.getRawIndex(),y=s&&s.getRawIndex(),x=o.viewChildren,_=c.upperHeight,b=x&&x.length,S=p.getModel("itemStyle"),w=p.getModel(["emphasis","itemStyle"]),D=p.getModel(["blur","itemStyle"]),C=p.getModel(["select","itemStyle"]),M=S.get("borderRadius")||0,E=mt("nodeGroup",qw);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),Dg(E).nodeWidth=h,Dg(E).nodeHeight=d,c.isAboveViewRoot)return E;var L=mt("background",zO,u,Eq);L&&H(E,L,b&&c.upperLabelHeight);var A=p.getModel("emphasis"),P=A.get("focus"),R=A.get("blurScope"),k=A.get("disabled"),B=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Do(E)&&Rn(E,!1),L&&(Rn(L,!k),f.setItemGraphicEl(o.dataIndex,L),Vd(L,B,R));else{var U=mt("content",zO,u,Aq);U&&G(E,U),L.disableMorphing=!0,L&&Do(L)&&Rn(L,!1),Rn(E,!k),f.setItemGraphicEl(o.dataIndex,E);var F=p.getShallow("cursor");F&&U.attr("cursor",F),Vd(E,B,R)}return E;function H(Et,vt,It){var ct=nt(vt);if(ct.dataIndex=o.dataIndex,ct.seriesIndex=r.seriesIndex,vt.setShape({x:0,y:0,width:h,height:d,r:M}),m)Y(vt);else{vt.invisible=!1;var Ct=o.getVisual("style"),ae=Ct.stroke,Wt=FO(S);Wt.fill=ae;var Qt=Dl(w);Qt.fill=w.get("borderColor");var ue=Dl(D);ue.fill=D.get("borderColor");var $e=Dl(C);if($e.fill=C.get("borderColor"),It){var ma=h-2*v;rt(vt,ae,Ct.opacity,{x:v,y:0,width:ma,height:_})}else vt.removeTextContent();vt.setStyle(Wt),vt.ensureState("emphasis").style=Qt,vt.ensureState("blur").style=ue,vt.ensureState("select").style=$e,wi(vt)}Et.add(vt)}function G(Et,vt){var It=nt(vt);It.dataIndex=o.dataIndex,It.seriesIndex=r.seriesIndex;var ct=Math.max(h-2*v,0),Ct=Math.max(d-2*v,0);if(vt.culling=!0,vt.setShape({x:v,y:v,width:ct,height:Ct,r:M}),m)Y(vt);else{vt.invisible=!1;var ae=o.getVisual("style"),Wt=ae.fill,Qt=FO(S);Qt.fill=Wt,Qt.decal=ae.decal;var ue=Dl(w),$e=Dl(D),ma=Dl(C);rt(vt,Wt,ae.opacity,null),vt.setStyle(Qt),vt.ensureState("emphasis").style=ue,vt.ensureState("blur").style=$e,vt.ensureState("select").style=ma,wi(vt)}Et.add(vt)}function Y(Et){!Et.invisible&&n.push(Et)}function rt(Et,vt,It,ct){var Ct=p.getModel(ct?UO:BO),ae=ve(p.get("name"),null),Wt=Ct.getShallow("show");$t(Et,qt(p,ct?UO:BO),{defaultText:Wt?ae:null,inheritColor:vt,defaultOpacity:It,labelFetcher:r,labelDataIndex:o.dataIndex});var Qt=Et.getTextContent();if(Qt){var ue=Qt.style,$e=so(ue.padding||0);ct&&(Et.setTextConfig({layoutRect:ct}),Qt.disableLabelLayout=!0),Qt.beforeUpdate=function(){var Xr=Math.max((ct?ct.width:Et.shape.width)-$e[1]-$e[3],0),us=Math.max((ct?ct.height:Et.shape.height)-$e[0]-$e[2],0);(ue.width!==Xr||ue.height!==us)&&Qt.setStyle({width:Xr,height:us})},ue.truncateMinChar=2,ue.lineOverflow="truncate",st(ue,ct,c);var ma=Qt.getState("emphasis");st(ma?ma.style:null,ct,c)}}function st(Et,vt,It){var ct=Et?Et.text:null;if(!vt&&It.isLeafRoot&&ct!=null){var Ct=r.get("drillDownIcon",!0);Et.text=Ct?Ct+" "+ct:ct}}function mt(Et,vt,It,ct){var Ct=y!=null&&t[Et][y],ae=i[Et];return Ct?(t[Et][y]=null,Ht(ae,Ct)):m||(Ct=new vt,Ct instanceof ke&&(Ct.z2=Pq(It,ct)),Kt(ae,Ct)),e[Et][g]=Ct}function Ht(Et,vt){var It=Et[g]={};vt instanceof qw?(It.oldX=vt.x,It.oldY=vt.y):It.oldShape=O({},vt.shape)}function Kt(Et,vt){var It=Et[g]={},ct=o.parentNode,Ct=vt instanceof K;if(ct&&(!a||a.direction==="drillDown")){var ae=0,Wt=0,Qt=i.background[ct.getRawIndex()];!a&&Qt&&Qt.oldShape&&(ae=Qt.oldShape.width,Wt=Qt.oldShape.height),Ct?(It.oldX=0,It.oldY=Wt):It.oldShape={x:ae,y:Wt,width:0,height:0}}It.fadein=!Ct}}function Pq(r,e){return r*Mq+e}var HO=Lq;var zp=T,kq=et,Eg=-1,Jw=(function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=tt(e);this.type=a,this.mappingMethod=t,this._normalizeData=Oq[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(jw(i),Rq(i)):t==="category"?i.categories?Nq(i):jw(i,!0):(ee(t!=="linear"||i.dataExtent),jw(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Z(this._normalizeData,this)},r.listVisualTypes=function(){return gt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){et(e)?T(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=z(e)?[]:et(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);i?n=l:n[s]=l}),n},r.retrieveVisuals=function(e){var t={},a;return e&&zp(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(kq(e)){var t=[];zp(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.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,a){for(var i,n=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||W(l)&&l===e+"")return o;a&&p(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(Mg(f[1],e,c[1]))return o}else if(c[1]===1/0){if(Mg(f[0],c[0],e))return o}else if(Mg(f[0],c[0],e)&&Mg(f[1],e,c[1]))return o;a&&p(c[0],o),a&&p(c[1],o)}}if(a)return e===1/0?t.length-1:e===-1/0?0:i;function p(h,d){var v=Math.abs(h-e);v<n&&(n=v,i=d)}},r.visualHandlers={color:{applyVisual:Np("color"),getColorMapper:function(){var e=this.option;return Z(e.mappingMethod==="category"?function(t,a){return!a&&(t=this._normalizeData(t)),Op.call(this,t)}:function(t,a,i){var n=!!i;return!a&&(t=this._normalizeData(t)),i=$h(t,e.parsedVisual,i),n?i:Jr(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Jr($h(e,this.option.parsedVisual),"rgba")},category:Op,piecewise:function(e,t){var a=Kw.call(this,t);return a==null&&(a=Jr($h(e,this.option.parsedVisual),"rgba")),a},fixed:Cl}},colorHue:Cg(function(e,t){return Ua(e,t)}),colorSaturation:Cg(function(e,t){return Ua(e,null,t)}),colorLightness:Cg(function(e,t){return Ua(e,null,null,t)}),colorAlpha:Cg(function(e,t){return ws(e,t)}),decal:{applyVisual:Np("decal"),_normalizedToVisual:{linear:null,category:Op,piecewise:null,fixed:null}},opacity:{applyVisual:Np("opacity"),_normalizedToVisual:$w([0,1])},liftZ:{applyVisual:Np("liftZ"),_normalizedToVisual:{linear:Cl,category:Cl,piecewise:Cl,fixed:Cl}},symbol:{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("symbol",i)},_normalizedToVisual:{linear:GO,category:Op,piecewise:function(e,t){var a=Kw.call(this,t);return a==null&&(a=GO.call(this,e)),a},fixed:Cl}},symbolSize:{applyVisual:Np("symbolSize"),_normalizedToVisual:$w([0,1])}},r})();function Rq(r){var e=r.pieceList;r.hasSpecialVisual=!1,T(e,function(t,a){t.originIndex=a,t.visual!=null&&(r.hasSpecialVisual=!0)})}function Nq(r){var e=r.categories,t=r.categoryMap={},a=r.visual;if(zp(e,function(o,s){t[o]=s}),!z(a)){var i=[];et(a)?zp(a,function(o,s){var l=t[s];i[l!=null?l:Eg]=o}):i[Eg]=a,a=WO(r,i)}for(var n=e.length-1;n>=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function jw(r,e){var t=r.visual,a=[];et(t)?zp(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),WO(r,a)}function Cg(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:$w([0,1])}}function GO(r){var e=this.option.visual;return e[Math.round(zt(r,[0,1],[0,e.length-1],!0))]||{}}function Np(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function Op(r){var e=this.option.visual;return e[this.option.loop&&r!==Eg?r%e.length:r]}function Cl(){return this.option.visual[0]}function $w(r){return{linear:function(e){return zt(e,r,this.option.visual,!0)},category:Op,piecewise:function(e,t){var a=Kw.call(this,t);return a==null&&(a=zt(e,r,this.option.visual,!0)),a},fixed:Cl}}function Kw(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=Jw.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function WO(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=V(e,function(t){var a=Ze(t);return a||[0,0,0,1]})),e}var Oq={linear:function(r){return zt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Jw.findPieceIndex(r,e,!0);if(t!=null)return zt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?Eg:e},fixed:ie};function Mg(r,e,t){return r?e<=t:e<t}var Le=Jw;var zq="itemStyle",ZO=ot(),XO={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||qO(t,{},r.getViewRoot().getAncestors(),r)}};function qO(r,e,t,a){var i=r.getModel(),n=r.getLayout(),o=r.hostTree.data;if(!(!n||n.invisible||!n.isInView)){var s=i.getModel(zq),l=Vq(s,e,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),p;f!=null&&(p=YO(l),c=Bq(f,p)),u.stroke=c;var h=r.viewChildren;if(!h||!h.length)p=YO(l),u.fill=p;else{var d=Uq(r,i,n,s,l,h);T(h,function(v,m){if(v.depth>=t.length||v===t[v.depth]){var g=Fq(i,l,v,m,d,a);qO(v,g,t,a)}})}}}function Vq(r,e,t){var a=O({},e),i=t.designatedVisualItemStyle;return T(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=r.get(n);i[n]=null,o!=null&&(a[n]=o)}),a}function YO(r){var e=Qw(r,"color");if(e){var t=Qw(r,"colorAlpha"),a=Qw(r,"colorSaturation");return a&&(e=Ua(e,null,null,a)),t&&(e=ws(e,t)),e}}function Bq(r,e){return e!=null?Ua(e,null,null,r):null}function Qw(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function Uq(r,e,t,a,i,n){if(!(!n||!n.length)){var o=tT(e,"color")||i.color!=null&&i.color!=="none"&&(tT(e,"colorAlpha")||tT(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 p=new Le(f);return ZO(p).drColorMappingBy=c,p}}}function tT(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function Fq(r,e,t,a,i,n){var o=O({},e);if(i){var s=i.type,l=s==="color"&&ZO(i).drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Vp=Math.max,Ag=Math.min,jO=de,eT=T,KO=["itemStyle","borderWidth"],Hq=["itemStyle","gapWidth"],Gq=["upperLabel","show"],Wq=["upperLabel","height"],JO={seriesType:"treemap",reset:function(r,e,t,a){var i=r.option,n=Zt(r,t).refContainer,o=Bt(r.getBoxLayoutParams(),n),s=i.size||[],l=j(jO(o.width,s[0]),n.width),u=j(jO(o.height,s[1]),n.height),c=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],p=Jn(a,f,r),h=c==="treemapRender"||c==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),v=Hw(d);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?$q(r,p,d,l,u):h?[h.width,h.height]:[l,u],g=i.sort;g&&g!=="asc"&&g!=="desc"&&(g="desc");var y={squareRatio:i.squareRatio,sort:g,leafDepth:i.leafDepth};d.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};d.setLayout(x),QO(d,y,!1,0),x=d.getLayout(),eT(v,function(b,S){var w=(v[S+1]||d).getValue();b.setLayout(O({dataExtent:[w,w],borderWidth:0,upperHeight:0},x))})}var _=r.getData().tree.root;_.setLayout(Kq(o,h,p),!0),r.setLayoutInfo(o),tz(_,new at(-o.x,-o.y,t.getWidth(),t.getHeight()),v,d,0)}};function QO(r,e,t,a){var i,n;if(!r.isRemoved()){var o=r.getLayout();i=o.width,n=o.height;var s=r.getModel(),l=s.get(KO),u=s.get(Hq)/2,c=ez(s),f=Math.max(l,c),p=l-u,h=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=Vp(i-2*p,0),n=Vp(n-p-h,0);var d=i*n,v=Yq(r,s,d,e,t,a);if(v.length){var m={x:p,y:h,width:i,height:n},g=Ag(i,n),y=1/0,x=[];x.area=0;for(var _=0,b=v.length;_<b;){var S=v[_];x.push(S),x.area+=S.getLayout().area;var w=jq(x,g,e.squareRatio);w<=y?(_++,y=w):(x.area-=x.pop().getLayout().area,$O(x,g,m,u,!1),g=Ag(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&$O(x,g,m,u,!0),!t){var D=s.get("childrenVisibleMin");D!=null&&d<D&&(t=!0)}for(var _=0,b=v.length;_<b;_++)QO(v[_],e,t,a+1)}}}function Yq(r,e,t,a,i,n){var o=r.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=n;if(i&&!l)return r.viewChildren=[];o=At(o,function(h){return!h.isRemoved()}),Xq(o,s);var u=qq(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=Zq(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var p=o[c].getValue()/u.sum*t;o[c].setLayout({area:p})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function Zq(r,e,t,a,i){if(!a)return t;for(var n=r.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/t*e<n&&(s=l,t-=u)}return a==="asc"?i.splice(0,o-s):i.splice(s,o-s),t}function Xq(r,e){return e&&r.sort(function(t,a){var i=e==="asc"?t.getValue()-a.getValue():a.getValue()-t.getValue();return i===0?e==="asc"?t.dataIndex-a.dataIndex:a.dataIndex-t.dataIndex:i}),r}function qq(r,e,t){for(var a=0,i=0,n=e.length;i<n;i++)a+=e[i].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],eT(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function jq(r,e,t){for(var a=0,i=1/0,n=0,o=void 0,s=r.length;n<s;n++)o=r[n].getLayout().area,o&&(o<i&&(i=o),o>a&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Vp(u*a/l,l/(u*i)):1/0}function $O(r,e,t,a,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],c=e?r.area/e:0;(i||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,p=r.length;f<p;f++){var h=r[f],d={},v=c?h.getLayout().area/c:0,m=d[l[o]]=Vp(c-2*a,0),g=t[s[n]]+t[l[n]]-u,y=f===p-1||g<v?g:v,x=d[l[n]]=Vp(y-2*a,0);d[s[o]]=t[s[o]]+Ag(a,m/2),d[s[n]]=u+Ag(a,x/2),u+=y,h.setLayout(d,!0)}t[s[o]]+=c,t[l[o]]-=c}function $q(r,e,t,a,i){var n=(e||{}).node,o=[a,i];if(!n||n===t)return o;for(var s,l=a*i,u=l*r.option.zoomToNodeRatio;s=n.parentNode;){for(var c=0,f=s.children,p=0,h=f.length;p<h;p++)c+=f[p].getValue();var d=n.getValue();if(d===0)return o;u*=c/d;var v=s.getModel(),m=v.get(KO),g=Math.max(m,ez(v));u+=4*m*m+(3*m+g)*Math.pow(u,.5),u>dx&&(u=dx),n=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[a*y,i*y]}function Kq(r,e,t){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!t)return a;var i=t.node,n=i.getLayout();if(!n)return a;for(var o=[n.width/2,n.height/2],s=i;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 tz(r,e,t,a,i){var n=r.getLayout(),o=t[i],s=o&&o===r;if(!(o&&!s||i===t.length&&r!==a)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},!0);var l=new at(e.x-n.x,e.y-n.y,e.width,e.height);eT(r.viewChildren||[],function(u){tz(u,l,t,a,i+1)})}}function ez(r){return r.get(Gq)?r.get(Wq):0}function rT(r){r.registerSeriesModel(kO),r.registerChartView(HO),r.registerVisual(XO),r.registerLayout(JO),IO(r)}function aT(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),i=t.getGraph(),n=i.data,o=a.mapArray(a.getName);n.filterSelf(function(s){var l=n.getItemModel(s),u=l.getShallow("category");if(u!=null){yt(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function iT(r){var e={};r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),i=t.getData(),n={};a.each(function(o){var s=a.getName(o);n["ec-"+s]=o;var l=a.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),a.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var p=l.getShallow(c[f],!0);p!=null&&a.setItemVisual(o,c[f],p)}}),a.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){W(l)&&(l=n["ec-"+l]);var u=a.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");O(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],p=0;p<f.length;p++)i.setItemVisual(o,f[p],a.getItemVisual(l,f[p]))}})})}function Lg(r){return r instanceof Array||(r=[r,r]),r}function nT(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),a=e.getEdgeData(),i=Lg(e.get("edgeSymbol")),n=Lg(e.get("edgeSymbolSize"));a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("style",e.getModel("lineStyle").getLineStyle()),a.each(function(o){var s=a.getItemModel(o),l=t.getEdgeByIndex(o),u=Lg(s.getShallow("symbol",!0)),c=Lg(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),p=a.ensureUniqueItemVisual(o,"style");switch(O(p,f),p.stroke){case"source":{var h=l.node1.getVisual("style");p.stroke=h&&h.fill;break}case"target":{var h=l.node2.getVisual("style");p.stroke=h&&h.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 oT="-->",Ig=function(r){return r.get("autoCurveness")||null},rz=function(r,e){var t=Ig(r),a=20,i=[];if(yt(t))a=t;else if(z(t)){r.__curvenessList=t;return}e>a&&(a=e);var n=a%2?a+2:a+3;i=[];for(var o=0;o<n;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=i},Bp=function(r,e,t){var a=[r.id,r.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[t.uid,a,i].join(oT)},az=function(r){var e=r.split(oT);return[e[0],e[2],e[1]].join(oT)},Jq=function(r,e){var t=Bp(r.node1,r.node2,e);return e.__edgeMap[t]},Qq=function(r,e){var t=sT(Bp(r.node1,r.node2,e),e),a=sT(Bp(r.node2,r.node1,e),e);return t+a},sT=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function iz(r){Ig(r)&&(r.__curvenessList=[],r.__edgeMap={},rz(r))}function nz(r,e,t,a){if(Ig(t)){var i=Bp(r,e,t),n=t.__edgeMap,o=n[az(i)];n[i]&&!o?n[i].isForward=!0:o&&n[i]&&(o.isForward=!0,n[i].isForward=!1),n[i]=n[i]||[],n[i].push(a)}}function Ju(r,e,t,a){var i=Ig(e),n=z(i);if(!i)return null;var o=Jq(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=Qq(r,e);rz(e,u),r.lineStyle=r.lineStyle||{};var c=Bp(r.node1,r.node2,e),f=e.__curvenessList,p=n||u%2?0:1;if(o.isForward)return f[p+s];var h=az(c),d=sT(h,e),v=f[s+d+p];return a?n?i&&i[0]===0?(d+p)%2?v:-v:((d%2?0:1)+p)%2?v:-v:(d+p)%2?v:-v:f[s+d+p]}function Pg(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),Up(t,r)}}function Up(r,e){r.eachEdge(function(t,a){var i=Te(t.getModel().get(["lineStyle","curveness"]),-Ju(t,e,a,!0),0),n=jr(t.node1.getLayout()),o=jr(t.node2.getLayout()),s=[n,o];+i&&s.push([(n[0]+o[0])/2-(n[1]-o[1])*i,(n[1]+o[1])/2-(o[0]-n[0])*i]),t.setLayout(s)})}function lT(r,e){r.eachSeriesByType("graph",function(t){var a=t.get("layout"),i=t.coordinateSystem;if(i&&i.type!=="view"){var n=t.getData(),o=[];T(i.dimensions,function(p){o=o.concat(n.mapDimensionsAll(p))});for(var s=0;s<n.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=n.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?n.setItemLayout(s,i.dataToPoint(l)):n.setItemLayout(s,[NaN,NaN])}Up(n.graph,t)}else(!a||a==="none")&&Pg(t)})}function Ml(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,a=e.scaleX,i=e.getZoom(),n=(i-1)*t+1;return n/a}function El(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var oz=Math.PI,uT=[];function Qu(r,e,t,a){var i=r.coordinateSystem;if(!(i&&i.type!=="view")){var n=i.getBoundingRect(),o=r.getData(),s=o.graph,l=n.width/2+n.x,u=n.height/2+n.y,c=Math.min(n.width,n.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var p=i.pointToData(a),h=p[0],d=p[1],v=[h-l,d-u];Na(v,v),Xl(v,v,c),t.setLayout([l+v[0],u+v[1]],!0);var m=r.get(["circular","rotateLabel"]);cT(t,m,l,u)}tj[e](r,s,o,c,l,u,f),s.eachEdge(function(g,y){var x=Te(g.getModel().get(["lineStyle","curveness"]),Ju(g,r,y),0),_=jr(g.node1.getLayout()),b=jr(g.node2.getLayout()),S,w=(_[0]+b[0])/2,D=(_[1]+b[1])/2;+x&&(x*=3,S=[l*x+w*(1-x),u*x+D*(1-x)]),g.setLayout([_,b,S])})}}}var tj={value:function(r,e,t,a,i,n,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var f=c.getValue("value"),p=u*(l?f:1)/2;s+=p,c.setLayout([a*Math.cos(s)+i,a*Math.sin(s)+n]),s+=p})},symbolSize:function(r,e,t,a,i,n,o){var s=0;uT.length=o;var l=Ml(r);e.eachNode(function(f){var p=El(f);isNaN(p)&&(p=2),p<0&&(p=0),p*=l;var h=Math.asin(p/2/a);isNaN(h)&&(h=oz/2),uT[f.dataIndex]=h,s+=h*2});var u=(2*oz-s)/o/2,c=0;e.eachNode(function(f){var p=u+uT[f.dataIndex];c+=p,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([a*Math.cos(c)+i,a*Math.sin(c)+n]),c+=p})}};function cT(r,e,t,a){var i=r.getGraphicEl();if(i){var n=r.getModel(),o=n.get(["label","rotate"])||0,s=i.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-a,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 p=s.ensureState("emphasis");O(p.textConfig||(p.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function fT(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Qu(e,"symbolSize")})}var tc=Zc;function sz(r,e,t){for(var a=r,i=e,n=t.rect,o=n.width,s=n.height,l=[n.x+o/2,n.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<a.length;c++){var f=a[c];f.p||(f.p=Yi(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=jr(f.p),f.edges=null}var p=t.friction==null?.6:t.friction,h=p,d,v;return{warmUp:function(){h=p*.8},setFixed:function(m){a[m].fixed=!0},setUnfixed:function(m){a[m].fixed=!1},beforeStep:function(m){d=m},afterStep:function(m){v=m},step:function(m){d&&d(a,i);for(var g=[],y=a.length,x=0;x<i.length;x++){var _=i[x];if(!_.ignoreForceLayout){var b=_.n1,S=_.n2;vi(g,S.p,b.p);var w=kh(g)-_.d,D=S.w/(b.w+S.w);isNaN(D)&&(D=0),Na(g,g),!b.fixed&&tc(b.p,b.p,g,D*w*h),!S.fixed&&tc(S.p,S.p,g,-(1-D)*w*h)}}for(var x=0;x<y;x++){var C=a[x];C.fixed||(vi(g,l,C.p),tc(C.p,C.p,g,u*h))}for(var x=0;x<y;x++)for(var b=a[x],M=x+1;M<y;M++){var S=a[M];vi(g,S.p,b.p);var w=kh(g);w===0&&(Yc(g,Math.random()-.5,Math.random()-.5),w=1);var E=(b.rep+S.rep)/w/w;!b.fixed&&tc(b.pp,b.pp,g,E),!S.fixed&&tc(S.pp,S.pp,g,-E)}for(var L=[],x=0;x<y;x++){var C=a[x];C.fixed||(vi(L,C.p,C.pp),tc(C.p,C.p,L,h),Je(C.pp,C.p))}h=h*.992;var A=h<.01;v&&v(a,i,A),m&&m(A)}}}function pT(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},i=e.getGraph(),n=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?n.each(function(x){var _=n.getId(x);n.setItemLayout(x,a[_]||[NaN,NaN])}):!l||l==="none"?Pg(e):l==="circular"&&Qu(e,"value");var u=n.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),p=s.get("edgeLength"),h=z(f)?f:[f,f],d=z(p)?p:[p,p];d=[d[1],d[0]];var v=n.mapArray("value",function(x,_){var b=n.getItemLayout(_),S=zt(x,u,h);return isNaN(S)&&(S=(h[0]+h[1])/2),{w:S,rep:S,fixed:n.getItemModel(_).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),m=o.mapArray("value",function(x,_){var b=i.getEdgeByIndex(_),S=zt(x,c,d);isNaN(S)&&(S=(d[0]+d[1])/2);var w=b.getModel(),D=Te(b.getModel().get(["lineStyle","curveness"]),-Ju(b,e,_,!0),0);return{n1:v[b.node1.dataIndex],n2:v[b.node2.dataIndex],d:S,curveness:D,ignoreForceLayout:w.get("ignoreForceLayout")}}),g=t.getBoundingRect(),y=sz(v,m,{rect:g,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(x,_){for(var b=0,S=x.length;b<S;b++)x[b].fixed&&Je(x[b].p,i.getNodeByIndex(b).getLayout())}),y.afterStep(function(x,_,b){for(var S=0,w=x.length;S<w;S++)x[S].fixed||i.getNodeByIndex(S).setLayout(x[S].p),a[n.getId(S)]=x[S].p;for(var S=0,w=_.length;S<w;S++){var D=_[S],C=i.getEdgeByIndex(S),M=D.n1.p,E=D.n2.p,L=C.getLayout();L=L?L.slice():[],L[0]=L[0]||[],L[1]=L[1]||[],Je(L[0],M),Je(L[1],E),+D.curveness&&(L[2]=[(M[0]+E[0])/2-(M[1]-E[1])*D.curveness,(M[1]+E[1])/2-(E[0]-M[0])*D.curveness]),C.setLayout(L)}}),e.forceLayout=y,e.preservedPoints=a,y.step()}else e.forceLayout=null})}function ej(r,e,t){var a=Zt(r,e),i=O(r.getBoxLayoutParams(),{aspect:t}),n=Bt(i,a.refContainer);return Mv(r,n,t)}function hT(r,e){var t=[];return r.eachSeriesByType("graph",function(a){ln({targetModel:a,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var n=a.getData(),o=n.mapArray(function(d){var v=n.getItemModel(d);return[+v.get("x"),+v.get("y")]}),s=[],l=[];Ns(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=ej(a,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],p=l[1]-s[1],h=new Ia(null,{api:e,ecModel:r});return h.zoomLimit=a.get("scaleLimit"),h.setBoundingRect(s[0],s[1],f,p),h.setViewRect(c.x,c.y,c.width,c.height),h.setCenter(a.get("center")),h.setZoom(a.get("zoom")),t.push(h),h}}),t}var lz=le.prototype,dT=Xs.prototype,uz=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),nMt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(uz);function vT(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var rj=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-line",a}return e.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new uz},e.prototype.buildPath=function(t,a){vT(a)?lz.buildPath.call(this,t,a):dT.buildPath.call(this,t,a)},e.prototype.pointAt=function(t){return vT(this.shape)?lz.pointAt.call(this,t):dT.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var a=this.shape,i=vT(a)?[a.x2-a.x1,a.y2-a.y1]:dT.tangentAt.call(this,t);return Na(i,i)},e})(ft),kg=rj;var mT=["fromSymbol","toSymbol"];function cz(r){return"_"+r+"Type"}function fz(r,e,t){var a=e.getItemVisual(t,r);if(!a||a==="none")return a;var i=e.getItemVisual(t,r+"Size"),n=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Pi(i),u=Da(o||0,l);return a+l+u+(n||"")+(s||"")}function pz(r,e,t){var a=e.getItemVisual(t,r);if(!(!a||a==="none")){var i=e.getItemVisual(t,r+"Size"),n=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Pi(i),u=Da(o||0,l),c=jt(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=n==null||isNaN(n)?void 0:+n*Math.PI/180||0,c.name=r,c}}function aj(r){var e=new kg({name:"line",subPixelOptimize:!0});return gT(e.shape,r),e}function gT(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 ij=(function(r){I(e,r);function e(t,a,i){var n=r.call(this)||this;return n._createLine(t,a,i),n}return e.prototype._createLine=function(t,a,i){var n=t.hostModel,o=t.getItemLayout(a),s=t.getItemVisual(a,"z2"),l=aj(o);l.shape.percent=0,Vt(l,{z2:Q(s,0),shape:{percent:1}},n,a),this.add(l),T(mT,function(u){var c=pz(u,t,a);this.add(c),this[cz(u)]=fz(u,t,a)},this),this._updateCommonStl(t,a,i)},e.prototype.updateData=function(t,a,i){var n=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(a),l={shape:{}};gT(l.shape,s),wt(o,l,n,a),T(mT,function(u){var c=fz(u,t,a),f=cz(u);if(this[f]!==c){this.remove(this.childOfName(u));var p=pz(u,t,a);this.add(p)}this[f]=c},this),this._updateCommonStl(t,a,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,a,i){var n=t.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,f=i&&i.emphasisDisabled,p=i&&i.focus,h=i&&i.blurScope;if(!i||t.hasItemOption){var d=t.getItemModel(a),v=d.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),f=v.get("disabled"),p=v.get("focus"),h=v.get("blurScope"),c=qt(d)}var m=t.getItemVisual(a,"style"),g=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,T(mT,function(S){var w=this.childOfName(S);if(w){w.setColor(g),w.style.opacity=m.opacity;for(var D=0;D<qe.length;D++){var C=qe[D],M=o.getState(C);if(M){var E=M.style||{},L=w.ensureState(C),A=L.style||(L.style={});E.stroke!=null&&(A[w.__isEmptyBrush?"stroke":"fill"]=E.stroke),E.opacity!=null&&(A.opacity=E.opacity)}}w.markRedraw()}},this);var y=n.getRawValue(a);$t(this,c,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(S,w){return n.getFormattedLabel(S,w,t.dataType)}},inheritColor:g||N.color.neutral99,defaultOpacity:m.opacity,defaultText:(y==null?t.getName(a):isFinite(y)?oe(y):y)+""});var x=this.getTextContent();if(x){var _=c.normal;x.__align=x.style.align,x.__verticalAlign=x.style.verticalAlign,x.__position=_.get("position")||"middle";var b=_.get("distance");z(b)||(b=[b,b]),x.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Rt(this,p,h,f)},e.prototype.highlight=function(){Tr(this)},e.prototype.downplay=function(){Dr(this)},e.prototype.updateLayout=function(t,a){this.setLinePoints(t.getItemLayout(a))},e.prototype.setLinePoints=function(t){var a=this.childOfName("line");gT(a.shape,t),a.dirty()},e.prototype.beforeUpdate=function(){var t=this,a=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.getTextContent();if(!a&&!i&&(!n||n.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),p=vi([],f,c);Na(p,p);function h(M,E){var L=M.__specifiedRotation;if(L==null){var A=l.tangentAt(E);M.attr("rotation",(E===1?-1:1)*Math.PI/2-Math.atan2(A[1],A[0]))}else M.attr("rotation",L)}if(a&&(a.setPosition(c),h(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&(i.setPosition(f),h(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var d=void 0,v=void 0,m=n.__labelDistance,g=m[0]*o,y=m[1]*o,x=u/2,_=l.tangentAt(x),b=[_[1],-_[0]],S=l.pointAt(x);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=_[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var D=-Math.atan2(_[1],_[0]);f[0]<c[0]&&(D=Math.PI+D),n.rotation=D}var C=void 0;switch(n.__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(n.__position){case"end":n.x=p[0]*g+f[0],n.y=p[1]*y+f[1],d=p[0]>.8?"left":p[0]<-.8?"right":"center",v=p[1]>.8?"top":p[1]<-.8?"bottom":"middle";break;case"start":n.x=-p[0]*g+c[0],n.y=-p[1]*y+c[1],d=p[0]>.8?"right":p[0]<-.8?"left":"center",v=p[1]>.8?"bottom":p[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=g*w+c[0],n.y=c[1]+C,d=_[0]<0?"right":"left",n.originX=-g*w,n.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=S[0],n.y=S[1]+C,d="center",n.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-g*w+f[0],n.y=f[1]+C,d=_[0]>=0?"right":"left",n.originX=g*w,n.originY=-C;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||v,align:n.__align||d})}},e})(K),ec=ij;var nj=(function(){function r(e){this.group=new K,this._LineCtor=e||ec}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,i=a.group,n=a._lineData;a._lineData=e,n||i.removeAll();var o=hz(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=hz(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!oj(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var n=t.getItemLayout(i);if(yT(n)){var o=new this._LineCtor(t,i,this._seriesScope);o.traverse(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){zr(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,a){var i=e.getItemLayout(t);if(yT(i)){var n=new this._LineCtor(e,t,a);e.setItemGraphicEl(t,n),this.group.add(n)}},r.prototype._doUpdate=function(e,t,a,i,n){var o=e.getItemGraphicEl(a);if(!yT(t.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(t,i,n):o=new this._LineCtor(t,i,n),t.setItemGraphicEl(i,o),this.group.add(o)},r})();function oj(r){return r.animators&&r.animators.length>0}function hz(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:qt(e)}}function dz(r){return isNaN(r[0])||isNaN(r[1])}function yT(r){return r&&!dz(r[0])&&!dz(r[1])}var rc=nj;var xT=[],_T=[],bT=[],ac=Pe,ST=Cn,vz=Math.abs;function mz(r,e,t){for(var a=r[0],i=r[1],n=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){xT[0]=ac(a[0],i[0],n[0],c),xT[1]=ac(a[1],i[1],n[1],c);var f=vz(ST(xT,e)-l);f<o&&(o=f,s=c)}for(var p=0;p<32;p++){var h=s+u;_T[0]=ac(a[0],i[0],n[0],s),_T[1]=ac(a[1],i[1],n[1],s),bT[0]=ac(a[0],i[0],n[0],h),bT[1]=ac(a[1],i[1],n[1],h);var f=ST(_T,e)-l;if(vz(f)<.01)break;var d=ST(bT,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Fp(r,e){var t=[],a=ho,i=[[],[],[]],n=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[jr(u[0]),jr(u[1])],u[2]&&u.__original.push(jr(u[2])));var p=u.__original;if(u[2]!=null){if(Je(i[0],p[0]),Je(i[1],p[2]),Je(i[2],p[1]),c&&c!=="none"){var h=El(s.node1),d=mz(i,p[0],h*e);a(i[0][0],i[1][0],i[2][0],d,t),i[0][0]=t[3],i[1][0]=t[4],a(i[0][1],i[1][1],i[2][1],d,t),i[0][1]=t[3],i[1][1]=t[4]}if(f&&f!=="none"){var h=El(s.node2),d=mz(i,p[1],h*e);a(i[0][0],i[1][0],i[2][0],d,t),i[1][0]=t[1],i[2][0]=t[2],a(i[0][1],i[1][1],i[2][1],d,t),i[1][1]=t[1],i[2][1]=t[2]}Je(u[0],i[0]),Je(u[1],i[2]),Je(u[2],i[1])}else{if(Je(n[0],p[0]),Je(n[1],p[1]),vi(o,n[1],n[0]),Na(o,o),c&&c!=="none"){var h=El(s.node1);Zc(n[0],n[0],o,h*e)}if(f&&f!=="none"){var h=El(s.node2);Zc(n[1],n[1],o,-h*e)}Je(u[0],n[0]),Je(u[1],n[1])}})}var gz=ot();function yz(r){if(r)return gz(r).bridge}function wT(r,e){r&&(gz(r).bridge=e)}function xz(r){return r.type==="view"}var sj=(function(r){I(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,a){var i=new mn,n=new rc,o=this.group,s=new K;this._controller=new va(a.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(n.group),o.add(s),this._symbolDraw=i,this._lineDraw=n,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,a,i){var n=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(xz(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):wt(this._mainGroup,f,t)}Fp(t.getGraph(),Ml(t));var p=t.getData();u.updateData(p);var h=t.getEdgeData();c.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,t,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,v=t.get(["force","layoutAnimation"]);d&&(s=!0,this._startForceLayoutIteration(d,i,v));var m=t.get("layout");p.graph.eachNode(function(_){var b=_.dataIndex,S=_.getGraphicEl(),w=_.getModel();if(S){S.off("drag").off("dragend");var D=w.get("draggable");D&&S.on("drag",function(M){switch(m){case"force":d.warmUp(),!n._layouting&&n._startForceLayoutIteration(d,i,v),d.setFixed(b),p.setItemLayout(b,[S.x,S.y]);break;case"circular":p.setItemLayout(b,[S.x,S.y]),_.setLayout({fixed:!0},!0),Qu(t,"symbolSize",_,[M.offsetX,M.offsetY]),n.updateLayout(t);break;default:p.setItemLayout(b,[S.x,S.y]),Up(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(b)}),S.setDraggable(D,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(nt(S).focus=_.getAdjacentDataIndices())}}),p.graph.eachEdge(function(_){var b=_.getGraphicEl(),S=_.getModel().get(["emphasis","focus"]);b&&S==="adjacency"&&(nt(b).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=p.getLayout("cx"),x=p.getLayout("cy");p.graph.eachNode(function(_){cT(_,g,y,x)}),this._firstRender=!1,s||this._renderThumbnail(t,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a,i){var n=this,o=!1;(function s(){t.step(function(l){n.updateLayout(n._model),(l||!o)&&(o=!0,n._renderThumbnail(n._model,a,n._symbolDraw,n._lineDraw)),(n._layouting=!l)&&(i?n._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,a,i){var n=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!xz(s)){n.disable();return}n.enable(a.get("roam"),{api:i,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!t||t.contain(u,c)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),n.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,a,i){this._active&&(Ap(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,a,i){this._active&&(Lp(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),Fp(t.getGraph(),Ml(t)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),i=Ml(t);a.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){this._active&&(Fp(t.getGraph(),Ml(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,a=t.coordinateSystem;if(a.type==="view"){var i=yz(t);if(i)return{bridge:i,coordSys:a}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,a,i,n){var o=this._getThumbnailInfo();if(o){var s=new K,l=i.group.children(),u=n.group.children(),c=new K,f=new K;s.add(f),s.add(c);for(var p=0;p<l.length;p++){var h=l[p],d=h.children()[0],v=h.x,m=h.y,g=tt(d.shape),y=O(g,{width:d.scaleX,height:d.scaleY,x:v-d.scaleX/2,y:m-d.scaleY/2}),x=tt(d.style),_=new d.constructor({shape:y,style:x,z2:151});f.add(_)}for(var p=0;p<u.length;p++){var h=u[p],b=h.children()[0],x=tt(b.style),y=tt(b.shape),S=new kg({style:x,shape:y,z2:151});c.add(S)}o.bridge.renderContent({api:a,roamType:t.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},e.type="graph",e})(Pt),_z=sj;function ic(r){return"_EC_"+r}var lj=(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 a=this._nodesMap;if(!a[ic(e)]){var i=new Al(e,t);return i.hostGraph=this,this.nodes.push(i),a[ic(e)]=i,i}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[ic(e)]},r.prototype.addEdge=function(e,t,a){var i=this._nodesMap,n=this._edgesMap;if(yt(e)&&(e=this.nodes[e]),yt(t)&&(t=this.nodes[t]),e instanceof Al||(e=i[ic(e)]),t instanceof Al||(t=i[ic(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new bz(e,t,a);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),n[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 Al&&(e=e.id),t instanceof Al&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,i=a.length,n=0;n<i;n++)a[n].dataIndex>=0&&e.call(t,a[n],n)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,i=a.length,n=0;n<i;n++)a[n].dataIndex>=0&&a[n].node1.dataIndex>=0&&a[n].node2.dataIndex>=0&&e.call(t,a[n],n)},r.prototype.breadthFirstTraverse=function(e,t,a,i){if(t instanceof Al||(t=this._nodesMap[ic(t)]),!!t){for(var n=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(i,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[n],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(e.call(i,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,a=this.nodes,i=this.edges,n=0,o=a.length;n<o;n++)a[n].dataIndex=-1;for(var n=0,o=e.count();n<o;n++)a[e.getRawIndex(n)].dataIndex=n;t.filterSelf(function(s){var l=i[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n<o;n++)i[n].dataIndex=-1;for(var n=0,o=t.count();n<o;n++)i[t.getRawIndex(n)].dataIndex=n},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,a=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(var i=0;i<a.length;i++){var n=a[i];e.addEdge(n.node1.id,n.node2.id,n.dataIndex)}return e},r})(),Al=(function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}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,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var a=this.edges[t];a.dataIndex<0||(e.edge.push(a.dataIndex),e.node.push(a.node1.dataIndex,a.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=q(),t=q(),a=0,i=this.edges.length;a<i;a++){var n=this.edges[a];if(!(n.dataIndex<0)){e.set(n.dataIndex,!0);for(var o=[n.node1],s=[n.node2],l=0;l<o.length;){var u=o[l];l++,t.set(u.dataIndex,!0);for(var c=u.inEdges,f=0,p=c.length,h=void 0,d=void 0;f<p;f++)h=c[f],d=h.dataIndex,d>=0&&!e.hasKey(d)&&(e.set(d,!0),o.push(h.node1))}for(l=0;l<s.length;){var v=s[l];l++,t.set(v.dataIndex,!0);for(var m=v.outEdges,f=0,g=m.length,y=void 0,x=void 0;f<g;f++)y=m[f],x=y.dataIndex,x>=0&&!e.hasKey(x)&&(e.set(x,!0),s.push(y.node2))}}}return{edge:e.keys(),node:t.keys()}},r})(),bz=(function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a==null?-1:a}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=q(),t=q();e.set(this.dataIndex,!0);for(var a=[this.node1],i=[this.node2],n=0;n<a.length;){var o=a[n];n++,t.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,f=void 0;l<u;l++)c=o.inEdges[l],f=c.dataIndex,f>=0&&!e.hasKey(f)&&(e.set(f,!0),a.push(c.node1))}for(n=0;n<i.length;){var p=i[n];n++,t.set(p.dataIndex,!0);for(var h=p.outEdges,l=0,u=h.length,d=void 0,v=void 0;l<u;l++)d=p.outEdges[l],v=d.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),i.push(d.node2))}return{edge:e.keys(),node:t.keys()}},r})();function Sz(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},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)}}}Jt(Al,Sz("hostGraph","data"));Jt(bz,Sz("hostGraph","edgeData"));var wz=lj;function Ll(r,e,t,a,i){for(var n=new wz(a),o=0;o<r.length;o++)n.addNode(de(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,p=c.target;n.addEdge(f,p,u)&&(l.push(c),s.push(de(ve(c.id,null),f+" > "+p)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar"||h==="matrix")d=lr(r,t);else{var v=Fn.get(h),m=v?v.dimensions||[]:[];lt(m,"value")<0&&m.concat(["value"]);var g=Ri(r,{coordDimensions:m,encodeDefine:t.getEncode()}).dimensions;d=new we(g,t),d.initData(r)}var y=new we(["value"],t);return y.initData(l,s),i&&i(d,y),Tg({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var uj=(function(r){I(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 a=this;function i(){return a._categoriesData}this.legendVisualProvider=new ai(i,i),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),ba(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){iz(this);var s=Ll(n,i,this,!0,l);return T(s.edges,function(u){nz(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(d){var v=o._categoriesModels,m=d.getShallow("category"),g=v[m];return g&&(g.parentModel=d.parentModel,d.parentModel=g),d});var f=Mt.prototype.getModel;function p(d,v){var m=f.call(this,d,v);return m.resolveParentPath=h,m}c.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=p,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var v=d.slice();return d[0]==="label"?v[0]="edgeLabel":d[1]==="label"&&(v[1]="edgeLabel"),v}return d}}},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,a,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),re("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=qv({series:this,dataIndex:t,multipleSeries:a});return f},e.prototype._updateCategoriesData=function(){var t=V(this.option.categories||[],function(i){return i.value!=null?i:O({value:0},i)}),a=new we(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},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:N.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:N.color.primary}}},e})(Nt),Tz=uj;function TT(r){r.registerChartView(_z),r.registerSeriesModel(Tz),r.registerProcessor(aT),r.registerVisual(iT),r.registerVisual(nT),r.registerLayout(lT),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,fT),r.registerLayout(pT),r.registerCoordinateSystem("graphView",{dimensions:Ia.dimensions,create:hT}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ie),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ie),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",query:e},function(i){var n=a.getViewOfSeriesModel(i);n&&(e.dx!=null&&e.dy!=null&&n.updateViewOnPan(i,a,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&n.updateViewOnZoom(i,a,e));var o=i.coordinateSystem,s=Xo(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var cj=(function(r){I(e,r);function e(t,a,i){var n=r.call(this)||this;nt(n).dataType="node",n.z2=2;var o=new Dt;return n.setTextContent(o),n.updateData(t,a,i,!0),n}return e.prototype.updateData=function(t,a,i,n){var o=this,s=t.graph.getNodeByIndex(a),l=t.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=t.getItemLayout(a),p=O(Gr(u.getModel("itemStyle"),f,!0),f),h=this;if(isNaN(p.startAngle)){h.setShape(p);return}n?h.setShape(p):wt(h,{shape:p},l,a);var d=O(Gr(u.getModel("itemStyle"),f,!0),f);o.setShape(d),o.useStyle(t.getItemVisual(a,"style")),te(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(a,h),te(h,u,"itemStyle");var v=c.get("focus");Rt(this,v==="adjacency"?s.getAdjacentDataIndices():v,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(t,a,i){var n=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=a.getModel("label");n.ignore=!c.get("show");var f=qt(a),p=i.getVisual("style");$t(n,f,{labelFetcher:{getFormattedLabel:function(y,x,_,b,S,w){return t.getFormattedLabel(y,x,"node",b,Te(S,f.normal&&f.normal.get("formatter"),a.get("name")),w)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:p.fill,defaultOpacity:p.opacity,defaultOutsidePosition:"startArc"});var h=c.get("position")||"outside",d=c.get("distance")||0,v;h==="outside"?v=o.r+d:v=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var m=h!=="outside"?c.get("align")||"center":l>0?"left":"right",g=h!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";n.attr({x:l*v+o.cx,y:u*v+o.cy,rotation:0,style:{align:m,verticalAlign:g}})},e})(De),DT=cj;var Cz=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this)||this;return nt(o).dataType="edge",o.updateData(t,a,i,n,!0),o}return e.prototype.buildPath=function(t,a){t.moveTo(a.s1[0],a.s1[1]);var i=.7,n=a.clockwise;t.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!n),t.bezierCurveTo((a.cx-a.s2[0])*i+a.s2[0],(a.cy-a.s2[1])*i+a.s2[1],(a.cx-a.t1[0])*i+a.t1[0],(a.cy-a.t1[1])*i+a.t1[1],a.t1[0],a.t1[1]),t.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!n),t.bezierCurveTo((a.cx-a.t2[0])*i+a.t2[0],(a.cy-a.t2[1])*i+a.t2[1],(a.cx-a.s1[0])*i+a.s1[0],(a.cy-a.s1[1])*i+a.s1[1],a.s1[0],a.s1[1]),t.closePath()},e.prototype.updateData=function(t,a,i,n,o){var s=t.hostModel,l=a.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=a.getItemModel(l.dataIndex),p=f.getModel("lineStyle"),h=f.getModel("emphasis"),d=h.get("focus"),v=O(Gr(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(v.sStartAngle)||isNaN(v.tStartAngle)){m.setShape(v);return}o?(m.setShape(v),Dz(m,l,t,p)):(Re(m),Dz(m,l,t,p),wt(m,{shape:v},s,i)),Rt(this,d==="adjacency"?l.getAdjacentDataIndices():d,h.get("blurScope"),h.get("disabled")),te(m,f,"lineStyle"),a.setItemGraphicEl(l.dataIndex,m)},e})(ft);function Dz(r,e,t,a){var i=e.node1,n=e.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(i.dataIndex,"style").fill,u=t.getItemVisual(n.dataIndex,"style").fill;if(W(l)&&W(u)){var c=r.shape,f=(c.s1[0]+c.s2[0])/2,p=(c.s1[1]+c.s2[1])/2,h=(c.t1[0]+c.t2[0])/2,d=(c.t1[1]+c.t2[1])/2;o.fill=new Za(f,p,h,d,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var fj=Math.PI/180,pj=(function(r){I(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,a){},e.prototype.render=function(t,a,i){var n=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*fj;if(n.diff(o).add(function(c){var f=n.getItemLayout(c);if(f){var p=new DT(n,c,l);nt(p).dataIndex=c,s.add(p)}}).update(function(c,f){var p=o.getItemGraphicEl(f),h=n.getItemLayout(c);if(!h){p&&oa(p,t,f);return}p?p.updateData(n,c,l):p=new DT(n,c,l),s.add(p)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&oa(f,t,c)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=j(u[0],i.getWidth()),this.group.originY=j(u[1],i.getHeight()),Vt(this.group,{scaleX:1,scaleY:1},t)}this._data=n,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,a){var i=t.getData(),n=t.getEdgeData(),o=this._edgeData,s=this.group;n.diff(o).add(function(l){var u=new Cz(i,n,l,a);nt(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,n,l,a),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&oa(u,t,l)}).execute(),this._edgeData=n},e.prototype.dispose=function(){},e.type="chord",e})(Pt),Mz=pj;var hj=(function(r){I(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.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new ai(Z(this.getData,this),Z(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[];if(n&&i){var o=Ll(n,i,this,!0,s);return o.data}function s(l,u){var c=Mt.prototype.getModel;function f(h,d){var v=c.call(this,h,d);return v.resolveParentPath=p,v}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=p,h.getModel=f,h});function p(h){if(h&&(h[0]==="label"||h[1]==="label")){var d=h.slice();return h[0]==="label"?d[0]="edgeLabel":h[1]==="label"&&(d[1]="edgeLabel"),d}return h}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,i){var n=this.getDataParams(t,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),re("nameValue",{name:c.join(" > "),value:n.value,noValue:n.value==null})}return re("nameValue",{name:n.name,value:n.value,noValue:n.value==null})},e.prototype.getDataParams=function(t,a){var i=r.prototype.getDataParams.call(this,t,a);if(a==="node"){var n=this.getData(),o=this.getGraph().getNodeByIndex(t);if(i.name==null&&(i.name=n.getName(t)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e})(Nt),Ez=hj;var CT=Math.PI/180;function MT(r,e){r.eachSeriesByType("chord",function(t){dj(t,e)})}function dj(r,e){var t=r.getData(),a=t.graph,i=r.getEdgeData(),n=i.count();if(n){var o=Cv(r,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((r.get("padAngle")||0)*CT,0),p=Math.max((r.get("minAngle")||0)*CT,0),h=-r.get("startAngle")*CT,d=h+Math.PI*2,v=r.get("clockwise"),m=v?1:-1,g=[h,d];Us(g,!v);var y=g[0],x=g[1],_=x-y,b=t.getSum("value")===0&&i.getSum("value")===0,S=[],w=0;a.eachEdge(function(F){var H=b?1:F.getValue("value");b&&(H>0||p)&&(w+=2);var G=F.node1.dataIndex,Y=F.node2.dataIndex;S[G]=(S[G]||0)+H,S[Y]=(S[Y]||0)+H});var D=0;if(a.eachNode(function(F){var H=F.getValue("value");isNaN(H)||(S[F.dataIndex]=Math.max(H,S[F.dataIndex]||0)),!b&&(S[F.dataIndex]>0||p)&&w++,D+=S[F.dataIndex]||0}),!(w===0||D===0)){f*w>=Math.abs(_)&&(f=Math.max(0,(Math.abs(_)-p*w)/w)),(f+p)*w>=Math.abs(_)&&(p=(Math.abs(_)-f*w)/w);var C=(_-f*w*m)/D,M=0,E=0,L=0,A=1/0;a.eachNode(function(F){var H=S[F.dataIndex]||0,G=C*(D?H:1)*m;Math.abs(G)<p?M+=p-Math.abs(G):(A=Math.min(A,Math.abs(G)-p),E+=Math.abs(G)-p,L+=Math.abs(G)),F.setLayout({angle:G,value:H})});var P=!1;if(M>E){var R=M/E;a.eachNode(function(F){var H=F.getLayout().angle;Math.abs(H)>=p?F.setLayout({angle:H*R,ratio:R},!0):F.setLayout({angle:p,ratio:p===0?1:H/p},!0)})}else a.eachNode(function(F){if(!P){var H=F.getLayout().angle,G=Math.min(H/L,1),Y=G*M;H-Y<p&&(P=!0)}});var k=M;a.eachNode(function(F){if(!(k<=0)){var H=F.getLayout().angle;if(H>p&&p>0){var G=P?1:Math.min(H/L,1),Y=H-p,rt=Math.min(Y,Math.min(k,M*G));k-=rt,F.setLayout({angle:H-rt,ratio:(H-rt)/H},!0)}else p>0&&F.setLayout({angle:p,ratio:H===0?1:p/H},!0)}});var B=y,U=[];a.eachNode(function(F){var H=Math.max(F.getLayout().angle,p);F.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:B,endAngle:B+H*m,clockwise:v},!0),U[F.dataIndex]=B,B+=(H+f)*m}),a.eachEdge(function(F){var H=b?1:F.getValue("value"),G=C*(D?H:1)*m,Y=F.node1.dataIndex,rt=U[Y]||0,st=Math.abs((F.node1.getLayout().ratio||1)*G),mt=rt+st*m,Ht=[s+c*Math.cos(rt),l+c*Math.sin(rt)],Kt=[s+c*Math.cos(mt),l+c*Math.sin(mt)],Et=F.node2.dataIndex,vt=U[Et]||0,It=Math.abs((F.node2.getLayout().ratio||1)*G),ct=vt+It*m,Ct=[s+c*Math.cos(vt),l+c*Math.sin(vt)],ae=[s+c*Math.cos(ct),l+c*Math.sin(ct)];F.setLayout({s1:Ht,s2:Kt,sStartAngle:rt,sEndAngle:mt,t1:Ct,t2:ae,tStartAngle:vt,tEndAngle:ct,cx:s,cy:l,r:c,value:H,clockwise:v}),U[Y]=mt,U[Et]=ct})}}}function ET(r){r.registerChartView(Mz),r.registerSeriesModel(Ez),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,MT),r.registerProcessor(Ea("chord"))}var vj=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),mj=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new vj},e.prototype.buildPath=function(t,a){var i=Math.cos,n=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-i(l)*s*(s>=o/3?1:2),c=a.y-n(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(a.x+i(l)*s,a.y+n(l)*s),t.lineTo(a.x+i(a.angle)*o,a.y+n(a.angle)*o),t.lineTo(a.x-i(l)*s,a.y-n(l)*s),t.lineTo(u,c)},e})(ft),Az=mj;function gj(r,e){var t=r.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=j(t[0],e.getWidth()),s=j(t[1],e.getHeight()),l=j(r.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Rg(r,e){var t=r==null?"":r+"";return e&&(W(e)?t=e.replace("{value}",t):$(e)&&(t=e(r))),t}var yj=(function(r){I(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,a,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=gj(t,i);this._renderMain(t,a,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,i,n,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"),p=f.get("roundCap"),h=p?Zu:De,d=f.get("show"),v=f.getModel("lineStyle"),m=v.get("width"),g=[u,c];Us(g,!l),u=g[0],c=g[1];for(var y=c-u,x=u,_=[],b=0;d&&b<n.length;b++){var S=Math.min(Math.max(n[b][0],0),1);c=u+y*S;var w=new h({shape:{startAngle:x,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-m,r:o.r},silent:!0});w.setStyle({fill:n[b][1]}),w.setStyle(v.getLineStyle(["color","width"])),_.push(w),x=c}_.reverse(),T(_,function(C){return s.add(C)});var D=function(C){if(C<=0)return n[0][1];var M;for(M=0;M<n.length;M++)if(n[M][0]>=C&&(M===0?0:n[M-1][0])<C)return n[M][1];return n[M-1][1]};this._renderTicks(t,a,i,D,o,u,c,l,m),this._renderTitleAndDetail(t,a,i,D,o),this._renderAnchor(t,o),this._renderPointer(t,a,i,D,o,u,c,l,m)},e.prototype._renderTicks=function(t,a,i,n,o,s,l,u,c){for(var f=this.group,p=o.cx,h=o.cy,d=o.r,v=+t.get("min"),m=+t.get("max"),g=t.getModel("splitLine"),y=t.getModel("axisTick"),x=t.getModel("axisLabel"),_=t.get("splitNumber"),b=y.get("splitNumber"),S=j(g.get("length"),d),w=j(y.get("length"),d),D=s,C=(l-s)/_,M=C/b,E=g.getModel("lineStyle").getLineStyle(),L=y.getModel("lineStyle").getLineStyle(),A=g.get("distance"),P,R,k=0;k<=_;k++){if(P=Math.cos(D),R=Math.sin(D),g.get("show")){var B=A?A+c:c,U=new le({shape:{x1:P*(d-B)+p,y1:R*(d-B)+h,x2:P*(d-S-B)+p,y2:R*(d-S-B)+h},style:E,silent:!0});E.stroke==="auto"&&U.setStyle({stroke:n(k/_)}),f.add(U)}if(x.get("show")){var B=x.get("distance")+A,F=Rg(oe(k/_*(m-v)+v),x.get("formatter")),H=n(k/_),G=P*(d-S-B)+p,Y=R*(d-S-B)+h,rt=x.get("rotate"),st=0;rt==="radial"?(st=-D+2*Math.PI,st>Math.PI/2&&(st+=Math.PI)):rt==="tangential"?st=-D-Math.PI/2:yt(rt)&&(st=rt*Math.PI/180),st===0?f.add(new Dt({style:Gt(x,{text:F,x:G,y:Y,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Dt({style:Gt(x,{text:F,x:G,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:G,originY:Y,rotation:st}))}if(y.get("show")&&k!==_){var B=y.get("distance");B=B?B+c:c;for(var mt=0;mt<=b;mt++){P=Math.cos(D),R=Math.sin(D);var Ht=new le({shape:{x1:P*(d-B)+p,y1:R*(d-B)+h,x2:P*(d-w-B)+p,y2:R*(d-w-B)+h},silent:!0,style:L});L.stroke==="auto"&&Ht.setStyle({stroke:n((k+mt/b)/_)}),f.add(Ht),D+=M}D-=M}else D+=C}},e.prototype._renderPointer=function(t,a,i,n,o,s,l,u,c){var f=this.group,p=this._data,h=this._progressEls,d=[],v=t.get(["pointer","show"]),m=t.getModel("progress"),g=m.get("show"),y=t.getData(),x=y.mapDimension("value"),_=+t.get("min"),b=+t.get("max"),S=[_,b],w=[s,l];function D(M,E){var L=y.getItemModel(M),A=L.getModel("pointer"),P=j(A.get("width"),o.r),R=j(A.get("length"),o.r),k=t.get(["pointer","icon"]),B=A.get("offsetCenter"),U=j(B[0],o.r),F=j(B[1],o.r),H=A.get("keepAspect"),G;return k?G=jt(k,U-P/2,F-R,P,R,null,H):G=new Az({shape:{angle:-Math.PI/2,width:P,r:R,x:U,y:F}}),G.rotation=-(E+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function C(M,E){var L=m.get("roundCap"),A=L?Zu:De,P=m.get("overlap"),R=P?m.get("width"):c/y.count(),k=P?o.r-R:o.r-(M+1)*R,B=P?o.r:o.r-M*R,U=new A({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:k,r:B}});return P&&(U.z2=zt(y.get(x,M),[_,b],[100,0],!0)),U}(g||v)&&(y.diff(p).add(function(M){var E=y.get(x,M);if(v){var L=D(M,s);Vt(L,{rotation:-((isNaN(+E)?w[0]:zt(E,S,w,!0))+Math.PI/2)},t),f.add(L),y.setItemGraphicEl(M,L)}if(g){var A=C(M,s),P=m.get("clip");Vt(A,{shape:{endAngle:zt(E,S,w,P)}},t),f.add(A),xf(t.seriesIndex,y.dataType,M,A),d[M]=A}}).update(function(M,E){var L=y.get(x,M);if(v){var A=p.getItemGraphicEl(E),P=A?A.rotation:s,R=D(M,P);R.rotation=P,wt(R,{rotation:-((isNaN(+L)?w[0]:zt(L,S,w,!0))+Math.PI/2)},t),f.add(R),y.setItemGraphicEl(M,R)}if(g){var k=h[E],B=k?k.shape.endAngle:s,U=C(M,B),F=m.get("clip");wt(U,{shape:{endAngle:zt(L,S,w,F)}},t),f.add(U),xf(t.seriesIndex,y.dataType,M,U),d[M]=U}}).execute(),y.each(function(M){var E=y.getItemModel(M),L=E.getModel("emphasis"),A=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(v){var k=y.getItemGraphicEl(M),B=y.getItemVisual(M,"style"),U=B.fill;if(k instanceof se){var F=k.style;k.useStyle(O({image:F.image,x:F.x,y:F.y,width:F.width,height:F.height},B))}else k.useStyle(B),k.type!=="pointer"&&k.setColor(U);k.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",n(zt(y.get(x,M),S,[0,1],!0))),k.z2EmphasisLift=0,te(k,E),Rt(k,A,P,R)}if(g){var H=d[M];H.useStyle(y.getItemVisual(M,"style")),H.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,te(H,E),Rt(H,A,P,R)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,a){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=jt(s,a.cx-o/2+j(l[0],a.r),a.cy-o/2+j(l[1],a.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,a,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),p=new K,h=[],d=[],v=t.isAnimationEnabled(),m=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){h[g]=new Dt({silent:!0}),d[g]=new Dt({silent:!0})}).update(function(g,y){h[g]=s._titleEls[y],d[g]=s._detailEls[y]}).execute(),l.each(function(g){var y=l.getItemModel(g),x=l.get(u,g),_=new K,b=n(zt(x,[c,f],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),D=o.cx+j(w[0],o.r),C=o.cy+j(w[1],o.r),M=h[g];M.attr({z2:m?0:2,style:Gt(S,{x:D,y:C,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:b})}),_.add(M)}var E=y.getModel("detail");if(E.get("show")){var L=E.get("offsetCenter"),A=o.cx+j(L[0],o.r),P=o.cy+j(L[1],o.r),R=j(E.get("width"),o.r),k=j(E.get("height"),o.r),B=t.get(["progress","show"])?l.getItemVisual(g,"style").fill:b,M=d[g],U=E.get("formatter");M.attr({z2:m?0:2,style:Gt(E,{x:A,y:P,text:Rg(x,U),width:isNaN(R)?null:R,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:B})}),rv(M,{normal:E},x,function(H){return Rg(H,U)}),v&&av(M,g,l,t,{getFormattedLabel:function(H,G,Y,rt,st,mt){return Rg(mt?mt.interpolatedValue:x,U)}}),_.add(M)}p.add(_)}),this.group.add(p),this._titleEls=h,this._detailEls=d},e.type="gauge",e})(Pt),Lz=yj;var xj=(function(r){I(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,a){return Aa(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,N.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:N.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:N.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:N.color.axisLabel,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:N.color.neutral00,borderWidth:0,borderColor:N.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:N.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:N.color.transparent,borderWidth:0,borderColor:N.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:N.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(Nt),Iz=xj;function AT(r){r.registerChartView(Lz),r.registerSeriesModel(Iz)}var _j=["itemStyle","opacity"],bj=(function(r){I(e,r);function e(t,a){var i=r.call(this)||this,n=i,o=new he,s=new Dt;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,a,!0),i}return e.prototype.updateData=function(t,a,i){var n=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),c=s.get(_j);c=c==null?1:c,i||Re(n),n.useStyle(t.getItemVisual(a,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,Vt(n,{style:{opacity:c}},o,a)):wt(n,{style:{opacity:c},shape:{points:l.points}},o,a),te(n,s),this._updateLabel(t,a),Rt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),c=u.label,f=t.getItemVisual(a,"style"),p=f.fill;$t(o,qt(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:f.opacity,defaultText:t.getName(a)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var h=l.getModel("label"),d=h.get("color"),v=d==="inherit"?p:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:v,outsideFill:v});var m=c.linePoints;n.setShape({points:m}),i.textGuideLineConfig={anchor:m?new pt(m[0][0],m[0][1]):null},wt(o,{style:{x:c.x,y:c.y}},s,a),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),Fu(i,Hu(l),{stroke:p})},e})(ye),Sj=(function(r){I(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,a,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new bj(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(n,l),s.add(c),n.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);oa(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(Pt),Pz=Sj;var wj=(function(r){I(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 ai(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Aa(this,{coordDimensions:["value"],encodeDefaulter:ut(Cu,this)})},e.prototype._defaultLabelLine=function(t){ba(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),i=r.prototype.getDataParams.call(this,t),n=a.mapDimension("value"),o=a.getSum(n);return i.percent=o?+(a.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:N.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:N.color.primary}}},e})(Nt),kz=wj;function Tj(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=r.count();o<s;o++)i[o]=o;return $(e)?i.sort(e):e!=="none"&&i.sort(function(l,u){return n?a[l]-a[u]:a[u]-a[l]}),i}function Dj(r){var e=r.hostModel,t=e.get("orient");r.each(function(a){var i=r.getItemModel(a),n=i.getModel("label"),o=n.get("position"),s=i.getModel("labelLine"),l=r.getItemLayout(a),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,p,h,d;if(c)o==="insideLeft"?(p=(u[0][0]+u[3][0])/2+5,h=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(p=(u[1][0]+u[2][0])/2-5,h=(u[1][1]+u[2][1])/2,f="right"):(p=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,h=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),d=[[p,h],[p,h]];else{var v=void 0,m=void 0,g=void 0,y=void 0,x=s.get("length");o==="left"?(v=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,g=v-x,p=g-5,f="right"):o==="right"?(v=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,g=v+x,p=g+5,f="left"):o==="top"?(v=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,y=m-x,h=y-5,f="center"):o==="bottom"?(v=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,y=m+x,h=y+5,f="center"):o==="rightTop"?(v=t==="horizontal"?u[3][0]:u[1][0],m=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(y=m-x,h=y-5,f="center"):(g=v+x,p=g+5,f="top")):o==="rightBottom"?(v=u[2][0],m=u[2][1],t==="horizontal"?(y=m+x,h=y+5,f="center"):(g=v+x,p=g+5,f="bottom")):o==="leftTop"?(v=u[0][0],m=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(y=m-x,h=y-5,f="center"):(g=v-x,p=g-5,f="right")):o==="leftBottom"?(v=t==="horizontal"?u[1][0]:u[3][0],m=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(y=m+x,h=y+5,f="center"):(g=v-x,p=g-5,f="right")):(v=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,t==="horizontal"?(y=m+x,h=y+5,f="center"):(g=v+x,p=g+5,f="left")),t==="horizontal"?(g=v,p=g):(y=m,h=y),d=[[v,m],[g,y]]}l.label={linePoints:d,x:p,y:h,verticalAlign:"middle",textAlign:f,inside:c}})}function LT(r,e){r.eachSeriesByType("funnel",function(t){var a=t.getData(),i=a.mapDimension("value"),n=t.get("sort"),o=Zt(t,e),s=Bt(t.getBoxLayoutParams(),o.refContainer),l=t.get("orient"),u=s.width,c=s.height,f=Tj(a,n),p=s.x,h=s.y,d=l==="horizontal"?[j(t.get("minSize"),c),j(t.get("maxSize"),c)]:[j(t.get("minSize"),u),j(t.get("maxSize"),u)],v=a.getDataExtent(i),m=t.get("min"),g=t.get("max");m==null&&(m=Math.min(v[0],0)),g==null&&(g=v[1]);var y=t.get("funnelAlign"),x=t.get("gap"),_=l==="horizontal"?u:c,b=(_-x*(a.count()-1))/a.count(),S=function(R,k){if(l==="horizontal"){var B=a.get(i,R)||0,U=zt(B,[m,g],d,!0),F=void 0;switch(y){case"top":F=h;break;case"center":F=h+(c-U)/2;break;case"bottom":F=h+(c-U);break}return[[k,F],[k,F+U]]}var H=a.get(i,R)||0,G=zt(H,[m,g],d,!0),Y;switch(y){case"left":Y=p;break;case"center":Y=p+(u-G)/2;break;case"right":Y=p+u-G;break}return[[Y,k],[Y+G,k]]};n==="ascending"&&(b=-b,x=-x,l==="horizontal"?p+=u:h+=c,f=f.reverse());for(var w=0;w<f.length;w++){var D=f[w],C=f[w+1],M=a.getItemModel(D);if(l==="horizontal"){var E=M.get(["itemStyle","width"]);E==null?E=b:(E=j(E,u),n==="ascending"&&(E=-E));var L=S(D,p),A=S(C,p+E);p+=E+x,a.setItemLayout(D,{points:L.concat(A.slice().reverse())})}else{var P=M.get(["itemStyle","height"]);P==null?P=b:(P=j(P,c),n==="ascending"&&(P=-P));var L=S(D,h),A=S(C,h+P);h+=P+x,a.setItemLayout(D,{points:L.concat(A.slice().reverse())})}}Dj(a)})}function IT(r){r.registerChartView(Pz),r.registerSeriesModel(kz),r.registerLayout(LT),r.registerProcessor(Ea("funnel"))}var Cj=.3,Mj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new K,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,a,i,n){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,f=Nz(t);s.diff(l).add(p).update(h).remove(d).execute();function p(m){var g=Rz(s,o,m,c,u);PT(g,s,m,f)}function h(m,g){var y=l.getItemGraphicEl(g),x=Oz(s,m,c,u);s.setItemGraphicEl(m,y),wt(y,{shape:{points:x}},t,m),Re(y),PT(y,s,m,f)}function d(m){var g=l.getItemGraphicEl(m);o.remove(g)}if(!this._initialized){this._initialized=!0;var v=Ej(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(v)}this._data=s},e.prototype.incrementalPrepareRender=function(t,a,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,a,i){for(var n=a.getData(),o=a.coordinateSystem,s=o.dimensions,l=Nz(a),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=Rz(n,this._dataGroup,c,s,o);f.incremental=!0,PT(f,n,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e})(Pt);function Ej(r,e,t){var a=r.model,i=r.getRect(),n=new ht({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=a.get("layout")==="horizontal"?"width":"height";return n.setShape(o,0),Vt(n,{shape:{width:i.width,height:i.height}},e,t),n}function Oz(r,e,t,a){for(var i=[],n=0;n<t.length;n++){var o=t[n],s=r.get(r.mapDimension(o),e);Aj(s,a.getAxis(o).type)||i.push(a.dataToPoint(s,o))}return i}function Rz(r,e,t,a,i){var n=Oz(r,t,a,i),o=new he({shape:{points:n},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function Nz(r){var e=r.get("smooth",!0);return e===!0&&(e=Cj),e=Ha(e),Me(e)&&(e=0),{smooth:e}}function PT(r,e,t,a){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var i=e.getItemModel(t),n=i.getModel("emphasis");te(r,i,"lineStyle"),Rt(r,n.get("focus"),n.get("blurScope"),n.get("disabled"))}function Aj(r,e){return e==="category"?r==null:r==null||isNaN(r)}var zz=Mj;var Lj=(function(r){I(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,a){return lr(null,this,{useEncodeDefaulter:Z(Ij,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var a=this.coordinateSystem,i=this.getData(),n=[];return a.eachActiveState(i,function(o,s){t===o&&n.push(i.getRawIndex(s))}),n},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})(Nt);function Ij(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return T(e.dimensions,function(a){var i=Pj(a);t[a]=i}),t}}function Pj(r){return+r.replace("dim","")}var Vz=Lj;var kj=["lineStyle","opacity"],Rj={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(i,n){t.eachActiveState(n,function(o,s){var l=a[o];if(o==="normal"&&n.hasItemOption){var u=n.getItemModel(s).get(kj,!0);u!=null&&(l=u)}var c=n.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}},Bz=Rj;function kT(r){Nj(r),Oj(r)}function Nj(r){if(!r.parallel){var e=!1;T(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function Oj(r){var e=Ft(r.parallelAxis);T(e,function(t){if(et(t)){var a=t.parallelIndex||0,i=Ft(r.parallel)[a];i&&i.parallelAxisDefault&&dt(t,i.parallelAxisDefault,!1)}})}var zj=5,Vj=(function(r){I(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,a,i){this._model=t,this._api=i,this._handlers||(this._handlers={},T(Bj,function(n,o){i.getZr().on(o,this._handlers[o]=Z(n,this))},this)),Qa(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,a){Wn(this,"_throttledDispatchExpand"),T(this._handlers,function(i,n){a.getZr().off(n,i)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(O({type:"parallelAxisExpand"},t))},e.type="parallel",e})(Ot),Bj={mousedown:function(r){RT(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(RT(this,"click")&&e){var t=[r.offsetX,r.offsetY],a=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(a>zj)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!RT(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function RT(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var Uz=Vj;var Uj=(function(r){I(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 a=this.option;t&&dt(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var i=t.get("parallelIndex");return i!=null&&a.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){T(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],i=At(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);T(i,function(n){t.push("dim"+n.get("dim")),a.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e})(St),Fz=Uj;var Fj=(function(r){I(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(ur),Hz=Fj;function Yr(r,e,t,a,i,n){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=nc(i,[0,o])),n!=null&&(n=Math.max(n,i!=null?i:0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=nc(s,[0,o]),i=n=nc(s,[i,n]),a=0}e[0]=nc(e[0],t),e[1]=nc(e[1],t);var l=NT(e,a);e[a]+=r;var u=i||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[a]=nc(e[a],c);var f;return f=NT(e,a),i!=null&&(f.sign!==l.sign||f.span<i)&&(e[1-a]=e[a]+l.sign*i),f=NT(e,a),n!=null&&f.span>n&&(e[1-a]=e[a]+f.sign*n),e}function NT(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 nc(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var OT=T,Yz=Math.min,Zz=Math.max,Gz=Math.floor,Hj=Math.ceil,Wz=oe,Gj=Math.PI,Wj=(function(){function r(e,t,a){this.type="parallel",this._axesMap=q(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var i=e.dimensions,n=e.parallelAxisIndex;OT(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Hz(o,Bo(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(),a=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=a&&o<=a+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var i=a.getData();OT(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),fn(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var a=Zt(e,t).refContainer;this._rect=Bt(e.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,c=Ng(e.get("axisExpandWidth"),l),f=Ng(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,h=e.get("axisExpandWindow"),d;if(h)d=Ng(h[1]-h[0],l),h[1]=h[0]+d;else{d=Ng(c*(f-1),l);var v=e.get("axisExpandCenter")||Gz(u/2);h=[c*v-d/2],h[1]=h[0]+d}var m=(s-d)/(u-f);m<3&&(m=0);var g=[Gz(Wz(h[0]/c,1))+1,Hj(Wz(h[1]/c,1))-1],y=m/c*h[0];return{layout:n,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[i[1-o]],axisExpandable:p,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:h,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),OT(a,function(o,s){var l=(i.axisExpandable?Zj:Yj)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Gj/2,vertical:0},f=[u[n].x+e.x,u[n].y+e.y],p=c[n],h=fe();Sr(h,h,p),pr(h,h,f),this._axesLayout[o]={position:f,rotation:p,transform:h,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,a,i){a==null&&(a=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];T(o,function(m){s.push(e.mapDimension(m)),l.push(n.get(m).model)});for(var u=this.hasAxisBrushed(),c=a;c<i;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var p=e.getValues(s,c),h=0,d=o.length;h<d;h++){var v=l[h].getActiveState(p[h]);if(v==="inactive"){f="inactive";break}}}t(f,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,a=!1,i=0,n=e.length;i<n;i++)t.get(e[i]).model.getActiveState()!=="normal"&&(a=!0);return a},r.prototype.axisCoordToPoint=function(e,t){var a=this._axesLayout[t];return vr([e,0],a.transform)},r.prototype.getAxisLayout=function(e){return tt(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),a=t.pixelDimIndex,i=t.axisExpandWindow.slice(),n=i[1]-i[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var s=e[a]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),p=f[0]!=null;if(c)p&&c&&s<n*f[0]?(u="jump",l=s-n*f[2]):p&&c&&s>n*(1-f[0])?(u="jump",l=s-n*(1-f[2])):(l=s-n*f[1])>=0&&(l=s-n*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Yr(l,i,o,"all"):u="none";else{var h=i[1]-i[0],d=o[1]*s/h;i=[Zz(0,d-h/2)],i[1]=Yz(o[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:u}},r})();function Ng(r,e){return Yz(Zz(r,e[0]),e[1])}function Yj(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function Zj(r,e){var t=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,c;return r<o[0]?(s=r*n,c=n):r<=o[1]?(s=e.axisExpandWindow0Pos+r*a-e.axisExpandWindow[0],l=a,u=!0):(s=t-(i-1-r)*n,c=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}var Xz=Wj;function Xj(r,e){var t=[];return r.eachComponent("parallel",function(a,i){var n=new Xz(a,r,e);n.name="parallel_"+i,n.resize(a,e),a.coordinateSystem=n,n.model=a,t.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var i=a.getReferringComponents("parallel",Yt).models[0];a.coordinateSystem=i.coordinateSystem}}),t}var qj={create:Xj},qz=qj;var jz=(function(r){I(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 ra([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var a=this.activeIntervals=tt(t);if(a)for(var i=a.length-1;i>=0;i--)Xe(a[i])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var i=a[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=a.length;n<o;n++)if(a[n][0]<=t&&t<=a[n][1])return"active";return"inactive"},e})(St);Jt(jz,pn);var zT=jz;var Il=!0,Hp=Math.min,oc=Math.max,jj=Math.pow,$j=1e4,Kj=6,Jj=6,$z="globalPan",Qj={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},t$={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Kz={brushStyle:{lineWidth:2,stroke:N.color.backgroundTint,fill:N.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},e$=0,r$=(function(r){I(e,r);function e(t){var a=r.call(this)||this;return a._track=[],a._covers=[],a._handlers={},a._zr=t,a.group=new K,a._uid="brushController_"+e$++,T(u$,function(i,n){this._handlers[n]=Z(i,this)},a),a}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var a=this._zr;this._enableGlobalPan||NN(a,$z,this._uid),T(this._handlers,function(i,n){a.on(n,i)}),this._brushType=t.brushType,this._brushOption=dt(tt(Kz),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;ON(t,$z,this._uid),T(this._handlers,function(a,i){t.off(i,a)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var a=this._panels={};T(t,function(i){a[i.panelId]=tt(i)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var a=this.group;return this._zr.add(a),a.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=a.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=V(t,function(p){return dt(tt(Kz),p,!0)});var a="\0-brush-index-",i=this._covers,n=this._covers=[],o=this,s=this._creatingCover;return new gr(i,t,u,l).add(c).update(c).remove(f).execute(),this;function l(p,h){return(p.id!=null?p.id:a+h)+"-"+p.brushType}function u(p,h){return l(p.__brushOption,h)}function c(p,h){var d=t[p];if(h!=null&&i[h]===s)n[p]=i[h];else{var v=n[p]=h!=null?(i[h].__brushOption=d,i[h]):aV(o,rV(o,d));GT(o,v)}}function f(p){i[p]!==s&&o.group.remove(i[p])}},e.prototype.unmount=function(){return this.enableBrush(!1),VT(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e})(Ue);function rV(r,e){var t=Og[e.brushType].createCover(r,e);return t.__brushOption=e,nV(t,e),r.group.add(t),t}function aV(r,e){var t=WT(e);return t.endCreating&&(t.endCreating(r,e),nV(e,e.__brushOption)),e}function iV(r,e){var t=e.__brushOption;WT(e).updateCoverShape(r,e,t.range,t)}function nV(r,e){var t=e.z;t==null&&(t=$j),r.traverse(function(a){a.z=t,a.z2=t})}function GT(r,e){WT(e).updateCommon(r,e),iV(r,e)}function WT(r){return Og[r.__brushOption.brushType]}function YT(r,e,t){var a=r._panels;if(!a)return Il;var i,n=r._transform;return T(a,function(o){o.isTargetByCursor(e,t,n)&&(i=o)}),i}function oV(r,e){var t=r._panels;if(!t)return Il;var a=e.__brushOption.panelId;return a!=null?t[a]:Il}function VT(r){var e=r._covers,t=e.length;return T(e,function(a){r.group.remove(a)},r),e.length=0,!!t}function Pl(r,e){var t=V(r._covers,function(a){var i=a.__brushOption,n=tt(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function a$(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],a=e[0],i=t[0]-a[0],n=t[1]-a[1],o=jj(i*i+n*n,.5);return o>Kj}function sV(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function lV(r,e,t,a){var i=new K;return i.add(new ht({name:"main",style:ZT(t),silent:!0,draggable:!0,cursor:"move",drift:ut(Jz,r,e,i,["n","s","w","e"]),ondragend:ut(Pl,e,{isEnd:!0})})),T(a,function(n){i.add(new ht({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ut(Jz,r,e,i,n),ondragend:ut(Pl,e,{isEnd:!0})}))}),i}function uV(r,e,t,a){var i=a.brushStyle.lineWidth||0,n=oc(i,Jj),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,c=t[0][1],f=t[1][1],p=c-n+i/2,h=f-n+i/2,d=c-o,v=f-s,m=d+i,g=v+i;Qn(r,e,"main",o,s,d,v),a.transformable&&(Qn(r,e,"w",l,u,n,g),Qn(r,e,"e",p,u,n,g),Qn(r,e,"n",l,u,m,n),Qn(r,e,"s",l,h,m,n),Qn(r,e,"nw",l,u,n,n),Qn(r,e,"ne",p,u,n,n),Qn(r,e,"sw",l,h,n,n),Qn(r,e,"se",p,h,n,n))}function BT(r,e){var t=e.__brushOption,a=t.transformable,i=e.childAt(0);i.useStyle(ZT(t)),i.attr({silent:!a,cursor:a?"move":"default"}),T([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?UT(r,n[0]):n$(r,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?t$[s]+"-resize":null})})}function Qn(r,e,t,a,i,n,o){var s=e.childOfName(t);s&&s.setShape(s$(XT(r,e,[[a,i],[a+n,i+o]])))}function ZT(r){return J({strokeNoScale:!0},r.brushStyle)}function cV(r,e,t,a){var i=[Hp(r,t),Hp(e,a)],n=[oc(r,t),oc(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function i$(r){return Ci(r.group)}function UT(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=Ks(t[e],i$(r));return a[i]}function n$(r,e){var t=[UT(r,e[0]),UT(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function Jz(r,e,t,a,i,n){var o=t.__brushOption,s=r.toRectRange(o.range),l=fV(e,i,n);T(a,function(u){var c=Qj[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(cV(s[0][0],s[1][0],s[0][1],s[1][1])),GT(e,t),Pl(e,{isEnd:!1})}function o$(r,e,t,a){var i=e.__brushOption.range,n=fV(r,t,a);T(i,function(o){o[0]+=n[0],o[1]+=n[1]}),GT(r,e),Pl(r,{isEnd:!1})}function fV(r,e,t){var a=r.group,i=a.transformCoordToLocal(e,t),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function XT(r,e,t){var a=oV(r,e);return a&&a!==Il?a.clipPath(t,r._transform):tt(t)}function s$(r){var e=Hp(r[0][0],r[1][0]),t=Hp(r[0][1],r[1][1]),a=oc(r[0][0],r[1][0]),i=oc(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:i-t}}function l$(r,e,t){if(!(!r._brushType||c$(r,e.offsetX,e.offsetY))){var a=r._zr,i=r._covers,n=YT(r,e,t);if(!r._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(n&&(n===Il||s.panelId===n.panelId)&&Og[s.brushType].contain(i[o],t[0],t[1]))return}n&&a.setCursorStyle("crosshair")}}function FT(r){var e=r.event;e.preventDefault&&e.preventDefault()}function HT(r,e,t){return r.childOfName("main").contain(e,t)}function pV(r,e,t,a){var i=r._creatingCover,n=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),a$(r)||i){if(n&&!i){o.brushMode==="single"&&VT(r);var l=tt(o);l.brushType=Qz(l.brushType,n),l.panelId=n===Il?null:n.panelId,i=r._creatingCover=rV(r,l),r._covers.push(i)}if(i){var u=Og[Qz(r._brushType,n)],c=i.__brushOption;c.range=u.getCreatingRange(XT(r,i,r._track)),a&&(aV(r,i),u.updateCommon(r,i)),iV(r,i),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&YT(r,e,t)&&VT(r)&&(s={isEnd:a,removeOnClick:!0});return s}function Qz(r,e){return r==="auto"?e.defaultBrushType:r}var u$={mousedown:function(r){if(this._dragging)tV(this,r);else if(!r.target||!r.target.draggable){FT(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=YT(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,a=this.group.transformCoordToLocal(e,t);if(l$(this,r,a),this._dragging){FT(r);var i=pV(this,r,a,!1);i&&Pl(this,i)}},mouseup:function(r){tV(this,r)}};function tV(r,e){if(r._dragging){FT(e);var t=e.offsetX,a=e.offsetY,i=r.group.transformCoordToLocal(t,a),n=pV(r,e,i,!0);r._dragging=!1,r._track=[],r._creatingCover=null,n&&Pl(r,n)}}function c$(r,e,t){var a=r._zr;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}var Og={lineX:eV(0),lineY:eV(1),rect:{createCover:function(r,e){function t(a){return a}return lV({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=sV(r);return cV(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){uV(r,e,t,a)},updateCommon:BT,contain:HT},polygon:{createCover:function(r,e){var t=new K;return t.add(new he({name:"main",style:ZT(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new ye({name:"main",draggable:!0,drift:ut(o$,r,e),ondragend:ut(Pl,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:XT(r,e,t)})},updateCommon:BT,contain:HT}};function eV(r){return{createCover:function(e,t){return lV({toRectRange:function(a){var i=[a,[0,100]];return r&&i.reverse(),i},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=sV(e),a=Hp(t[0][r],t[1][r]),i=oc(t[0][r],t[1][r]);return[a,i]},updateCoverShape:function(e,t,a,i){var n,o=oV(e,t);if(o!==Il&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(r);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,n];r&&l.reverse(),uV(e,t,l,i)},updateCommon:BT,contain:HT}}var sc=r$;function zg(r){return r=qT(r),function(e){return c_(e,r)}}function Vg(r,e){return r=qT(r),function(t){var a=e!=null?e:t,i=a?r.width:r.height,n=a?r.x:r.y;return[n,n+(i||0)]}}function Bg(r,e,t){var a=qT(r);return function(i,n){return a.contain(n[0],n[1])&&!pg(i,e,t)}}function qT(r){return at.create(r)}var f$=(function(r){I(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,a){r.prototype.init.apply(this,arguments),(this._brushController=new sc(a.getZr())).on("brush",Z(this._onBrush,this))},e.prototype.render=function(t,a,i,n){if(!p$(t,a,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new K,this.group.add(this._axisGroup),!!t.get("show")){var s=d$(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,p=l.getAxisLayout(f),h=O({strokeContainThreshold:c},p),d=new yr(t,i,h);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(h,u,t,s,c,i),zn(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=at.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:zg(f),isTargetByCursor:Bg(f,s,n),getLinearBrushOtherExtent:Vg(f,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(h$(i))},e.prototype._onBrush=function(t){var a=t.areas,i=this.axisModel,n=i.axis,o=V(a,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(Ot);function p$(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function h$(r){var e=r.axis;return V(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function d$(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var dV=f$;var v$={type:"axisAreaSelect",event:"axisAreaSelected"};function vV(r){r.registerAction(v$,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var m$={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Gp(r){r.registerComponentView(Uz),r.registerComponentModel(Fz),r.registerCoordinateSystem("parallel",qz),r.registerPreprocessor(kT),r.registerComponentModel(zT),r.registerComponentView(dV),Ui(r,"parallel",zT,m$),vV(r)}function jT(r){Tt(Gp),r.registerChartView(zz),r.registerSeriesModel(Vz),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Bz)}var g$=(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})(),y$=(function(r){I(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new g$},e.prototype.buildPath=function(t,a){var i=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+i,a.y2),t.bezierCurveTo(a.cpx2+i,a.cpy2,a.cpx1+i,a.cpy1,a.x1+i,a.y1)):(t.lineTo(a.x2,a.y2+i),t.bezierCurveTo(a.cpx2,a.cpy2+i,a.cpx1,a.cpy1+i,a.x1,a.y1+i)),t.closePath()},e.prototype.highlight=function(){Tr(this)},e.prototype.downplay=function(){Dr(this)},e})(ft),x$=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new K,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,a){this._controller=new va(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,i){var n=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),p=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,i),vg(t,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(d){var v=new y$,m=nt(v);m.dataIndex=d.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var g=d.getModel(),y=g.getModel("lineStyle"),x=y.get("curveness"),_=d.node1.getLayout(),b=d.node1.getModel(),S=b.get("localX"),w=b.get("localY"),D=d.node2.getLayout(),C=d.node2.getModel(),M=C.get("localX"),E=C.get("localY"),L=d.getLayout(),A,P,R,k,B,U,F,H;v.shape.extent=Math.max(1,L.dy),v.shape.orient=h,h==="vertical"?(A=(S!=null?S*u:_.x)+L.sy,P=(w!=null?w*c:_.y)+_.dy,R=(M!=null?M*u:D.x)+L.ty,k=E!=null?E*c:D.y,B=A,U=P*(1-x)+k*x,F=R,H=P*x+k*(1-x)):(A=(S!=null?S*u:_.x)+_.dx,P=(w!=null?w*c:_.y)+L.sy,R=M!=null?M*u:D.x,k=(E!=null?E*c:D.y)+L.ty,B=A*(1-x)+R*x,U=P,F=A*x+R*(1-x),H=k),v.setShape({x1:A,y1:P,x2:R,y2:k,cpx1:B,cpy1:U,cpx2:F,cpy2:H}),v.useStyle(y.getItemStyle()),mV(v.style,h,d);var G=""+g.get("value"),Y=qt(g,"edgeLabel");$t(v,Y,{labelFetcher:{getFormattedLabel:function(mt,Ht,Kt,Et,vt,It){return t.getFormattedLabel(mt,Ht,"edge",Et,Te(vt,Y.normal&&Y.normal.get("formatter"),G),It)}},labelDataIndex:d.dataIndex,defaultText:G}),v.setTextConfig({position:"inside"});var rt=g.getModel("emphasis");te(v,g,"lineStyle",function(mt){var Ht=mt.getItemStyle();return mV(Ht,h,d),Ht}),s.add(v),p.setItemGraphicEl(d.dataIndex,v);var st=rt.get("focus");Rt(v,st==="adjacency"?d.getAdjacentDataIndices():st==="trajectory"?d.getTrajectoryDataIndices():st,rt.get("blurScope"),rt.get("disabled"))}),o.eachNode(function(d){var v=d.getLayout(),m=d.getModel(),g=m.get("localX"),y=m.get("localY"),x=m.getModel("emphasis"),_=m.get(["itemStyle","borderRadius"])||0,b=new ht({shape:{x:g!=null?g*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:_},style:m.getModel("itemStyle").getItemStyle(),z2:10});$t(b,qt(m),{labelFetcher:{getFormattedLabel:function(w,D){return t.getFormattedLabel(w,D,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),te(b,m),s.add(b),f.setItemGraphicEl(d.dataIndex,b),nt(b).dataType="node";var S=x.get("focus");Rt(b,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,x.get("blurScope"),x.get("disabled"))}),f.eachItemGraphicEl(function(d,v){var m=f.getItemModel(v);m.get("draggable")&&(d.drift=function(g,y){n._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},d.ondragend=function(){n._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(_$(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,a){var i=t.layoutInfo,n=i.width,o=i.height,s=t.coordinateSystem=new Ia(null,{api:a,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,n,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e})(Pt);function mV(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 a=t.node1.getVisual("color"),i=t.node2.getVisual("color");W(a)&&W(i)&&(r.fill=new Za(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:i,offset:1}]))}}function _$(r,e,t){var a=new ht({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Vt(a,{shape:{width:r.width+20}},e,t),a}var gV=x$;var b$=(function(r){I(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,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new Mt(o[l],this,a));var u=Ll(n,i,this,!0,c);return u.data;function c(f,p){f.wrapMethod("getItemModel",function(h,d){var v=h.parentModel,m=v.getData().getItemLayout(d);if(m){var g=m.depth,y=v.levelModels[g];y&&(h.parentModel=y)}return h}),p.wrapMethod("getItemModel",function(h,d){var v=h.parentModel,m=v.getGraph().getEdgeByIndex(d),g=m.node1.getLayout();if(g){var y=g.depth,x=v.levelModels[y];x&&(h.parentModel=x)}return h})}},e.prototype.setNodePosition=function(t,a){var i=this.option.data||this.option.nodes,n=i[t];n.localX=a[0],n.localY=a[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,i){function n(h){return isNaN(h)||h==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return re("nameValue",{name:u,value:l,noValue:n(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,p=this.getDataParams(t,i).data.name;return re("nameValue",{name:p!=null?p+"":null,value:f,noValue:n(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var i=r.prototype.getDataParams.call(this,t,a);if(i.value==null&&a==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:N.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:N.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(Nt),yV=b$;function KT(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),i=t.get("nodeGap"),n=Zt(t,e).refContainer,o=Bt(t.getBoxLayoutParams(),n);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),c=u.nodes,f=u.edges;w$(c);var p=At(c,function(m){return m.getLayout().value===0}),h=p.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),v=t.get("nodeAlign");S$(c,f,a,i,s,l,h,d,v)})}function S$(r,e,t,a,i,n,o,s,l){T$(r,e,t,i,n,s,l),E$(r,e,n,i,a,o,s),z$(r,s)}function w$(r){T(r,function(e){var t=$o(e.outEdges,Ug),a=$o(e.inEdges,Ug),i=e.getValue()||0,n=Math.max(t,a,i);e.setLayout({value:n},!0)})}function T$(r,e,t,a,i,n,o){for(var s=[],l=[],u=[],c=[],f=0,p=0;p<e.length;p++)s[p]=1;for(var p=0;p<r.length;p++)l[p]=r[p].inEdges.length,l[p]===0&&u.push(r[p]);for(var h=-1;u.length;){for(var d=0;d<u.length;d++){var v=u[d],m=v.hostGraph.data.getRawDataItem(v.dataIndex),g=m.depth!=null&&m.depth>=0;g&&m.depth>h&&(h=m.depth),v.setLayout({depth:g?m.depth:f},!0),n==="vertical"?v.setLayout({dy:t},!0):v.setLayout({dx:t},!0);for(var y=0;y<v.outEdges.length;y++){var x=v.outEdges[y],_=e.indexOf(x);s[_]=0;var b=x.node2,S=r.indexOf(b);--l[S]===0&&c.indexOf(b)<0&&c.push(b)}}++f,u=c,c=[]}for(var p=0;p<s.length;p++)if(s[p]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=h>f-1?h:f-1;o&&o!=="left"&&D$(r,o,n,w);var D=n==="vertical"?(i-t)/w:(a-t)/w;M$(r,D,n)}function xV(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function D$(r,e,t,a){if(e==="right"){for(var i=[],n=r,o=0;n.length;){for(var s=0;s<n.length;s++){var l=n[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}n=i,i=[],++o}T(r,function(f){xV(f)||f.setLayout({depth:Math.max(0,a-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&C$(r,a)}function C$(r,e){T(r,function(t){!xV(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function M$(r,e,t){T(r,function(a){var i=a.getLayout().depth*e;t==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function E$(r,e,t,a,i,n,o){var s=A$(r,o);L$(s,e,t,a,i,o),$T(s,i,t,a,o);for(var l=1;n>0;n--)l*=.99,I$(s,l,o),$T(s,i,t,a,o),O$(s,l,o),$T(s,i,t,a,o)}function A$(r,e){var t=[],a=e==="vertical"?"y":"x",i=vf(r,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),T(i.keys,function(n){t.push(i.buckets.get(n))}),t}function L$(r,e,t,a,i,n){var o=1/0;T(r,function(s){var l=s.length,u=0;T(s,function(f){u+=f.getLayout().value});var c=n==="vertical"?(a-(l-1)*i)/u:(t-(l-1)*i)/u;c<o&&(o=c)}),T(r,function(s){T(s,function(l,u){var c=l.getLayout().value*o;n==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),T(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function $T(r,e,t,a,i){var n=i==="vertical"?"x":"y";T(r,function(o){o.sort(function(v,m){return v.getLayout()[n]-m.getLayout()[n]});for(var s,l,u,c=0,f=o.length,p=i==="vertical"?"dx":"dy",h=0;h<f;h++)l=o[h],u=c-l.getLayout()[n],u>0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]+l.getLayout()[p]+e;var d=i==="vertical"?a:t;if(u=c-e-d,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var h=f-2;h>=0;--h)l=o[h],u=l.getLayout()[n]+l.getLayout()[p]+e-c,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]}})}function I$(r,e,t){T(r.slice().reverse(),function(a){T(a,function(i){if(i.outEdges.length){var n=$o(i.outEdges,P$,t)/$o(i.outEdges,Ug);if(isNaN(n)){var o=i.outEdges.length;n=o?$o(i.outEdges,k$,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-Ko(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Ko(i,t))*e;i.setLayout({y:l},!0)}}})})}function P$(r,e){return Ko(r.node2,e)*r.getValue()}function k$(r,e){return Ko(r.node2,e)}function R$(r,e){return Ko(r.node1,e)*r.getValue()}function N$(r,e){return Ko(r.node1,e)}function Ko(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Ug(r){return r.getValue()}function $o(r,e,t){for(var a=0,i=r.length,n=-1;++n<i;){var o=+e(r[n],t);isNaN(o)||(a+=o)}return a}function O$(r,e,t){T(r,function(a){T(a,function(i){if(i.inEdges.length){var n=$o(i.inEdges,R$,t)/$o(i.inEdges,Ug);if(isNaN(n)){var o=i.inEdges.length;n=o?$o(i.inEdges,N$,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-Ko(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Ko(i,t))*e;i.setLayout({y:l},!0)}}})})}function z$(r,e){var t=e==="vertical"?"x":"y";T(r,function(a){a.outEdges.sort(function(i,n){return i.node2.getLayout()[t]-n.node2.getLayout()[t]}),a.inEdges.sort(function(i,n){return i.node1.getLayout()[t]-n.node1.getLayout()[t]})}),T(r,function(a){var i=0,n=0;T(a.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),T(a.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}function JT(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),a=t.nodes,i=t.edges;if(a.length){var n=1/0,o=-1/0;T(a,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),T(a,function(s){var l=new Le({type:"color",mappingMethod:"linear",dataExtent:[n,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}))})}i.length&&T(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function QT(r){r.registerChartView(gV),r.registerSeriesModel(yV),r.registerLayout(KT),r.registerVisual(JT),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var n=i.coordinateSystem,o=Xo(n,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var Fg=(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 a,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=n.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],p=u[1-c],h=[i,n],d=h[c].get("type"),v=h[1-c].get("type"),m=e.data;if(m&&l){var g=[];T(m,function(_,b){var S;z(_)?(S=_.slice(),_.unshift(b)):z(_.value)?(S=O({},_),S.value=S.value.slice(),_.value.unshift(b)):S=_,g.push(S)}),e.data=g}var y=this.defaultValueDimensions,x=[{name:f,type:hl(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:hl(v),dimsDef:y.slice()}];return Aa(this,{coordDimensions:x,dimensionsCount:y.length+1,encodeDefaulter:ut(Av,x,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r})();var _V=(function(r){I(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:N.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:N.color.shadow}},animationDuration:800},e})(Nt);Jt(_V,Fg,!0);var bV=_V;var V$=(function(r){I(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,a,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var c=n.getItemLayout(u),f=SV(c,n,u,l,!0);n.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!n.hasValue(u)){o.remove(f);return}var p=n.getItemLayout(u);f?(Re(f),wV(p,f,n,u)):f=SV(p,n,u,l),o.add(f),n.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=n},e.prototype.remove=function(t){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&a.remove(n)})},e.type="boxplot",e})(Pt),B$=(function(){function r(){}return r})(),U$=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new B$},e.prototype.buildPath=function(t,a){var i=a.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])},e})(ft);function SV(r,e,t,a,i){var n=r.ends,o=new U$({shape:{points:i?F$(n,a,r):n}});return wV(r,o,e,t,i),o}function wV(r,e,t,a,i){var n=t.hostModel,o=_t[i?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},n,a),e.useStyle(t.getItemVisual(a,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(a),l=s.getModel("emphasis");te(e,s),Rt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function F$(r,e,t){return V(r,function(a){return a=a.slice(),a[e]=t.initBaseline,a})}var TV=V$;var Wp=T;function t1(r){var e=H$(r);Wp(e,function(t){var a=t.seriesModels;a.length&&(G$(t),Wp(a,function(i,n){W$(i,t.boxOffsetList[n],t.boxWidthList[n])}))})}function H$(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),n=lt(t,i);n<0&&(n=t.length,t[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(a)}),e}function G$(r){var e=r.axis,t=r.seriesModels,a=t.length,i=r.boxWidthList=[],n=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Wp(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Wp(t,function(d){var v=d.get("boxWidth");z(v)||(v=[v,v]),o.push([j(v[0],s)||0,j(v[1],s)||0])});var c=s*.8-2,f=c/a*.3,p=(c-f*(a-1))/a,h=p/2-c/2;Wp(t,function(d,v){n.push(h),h+=f+p,i.push(Math.min(Math.max(p,o[v][0]),o[v][1]))})}function W$(r,e,t){var a=r.coordinateSystem,i=r.getData(),n=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<i.count();f++){var p=i.get(u,f),h=x(p,c[2],f),d=x(p,c[0],f),v=x(p,c[1],f),m=x(p,c[3],f),g=x(p,c[4],f),y=[];_(y,v,!1),_(y,m,!0),y.push(d,v,g,m),b(y,d),b(y,g),b(y,h),i.setItemLayout(f,{initBaseline:h[s],ends:y})}function x(S,w,D){var C=i.get(w,D),M=[];M[o]=S,M[s]=C;var E;return isNaN(S)||isNaN(C)?E=[NaN,NaN]:(E=a.dataToPoint(M),E[o]+=e),E}function _(S,w,D){var C=w.slice(),M=w.slice();C[o]+=n,M[o]-=n,D?S.push(C,M):S.push(M,C)}function b(S,w){var D=w.slice(),C=w.slice();D[o]-=n,C[o]+=n,S.push(D,C)}}function e1(r,e){e=e||{};for(var t=[],a=[],i=e.boundIQR,n=i==="none"||i===0,o=0;o<r.length;o++){var s=Xe(r[o].slice()),l=_d(s,.25),u=_d(s,.5),c=_d(s,.75),f=s[0],p=s[s.length-1],h=(i==null?1.5:i)*(c-l),d=n?f:Math.max(f,l-h),v=n?p:Math.min(p,c+h),m=e.itemNameFormatter,g=$(m)?m({value:o}):W(m)?m.replace("{value}",o+""):o+"";t.push([g,d,l,u,c,v]);for(var y=0;y<s.length;y++){var x=s[y];if(x<d||x>v){var _=[g,x];a.push(_)}}}return{boxData:t,outliers:a}}var DV={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ae){var a="";Ut(a)}var i=e1(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function r1(r){r.registerSeriesModel(bV),r.registerChartView(TV),r.registerLayout(t1),r.registerTransform(DV)}var Y$=["itemStyle","borderColor"],Z$=["itemStyle","borderColor0"],X$=["itemStyle","borderColorDoji"],q$=["itemStyle","color"],j$=["itemStyle","color0"];function Hg(r,e){return e.get(r>0?q$:j$)}function Gg(r,e){return e.get(r===0?X$:r>0?Y$:Z$)}var $$={seriesType:"candlestick",plan:Ta(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,i){for(var n;(n=a.next())!=null;){var o=i.getItemModel(n),s=i.getItemLayout(n).sign,l=o.getItemStyle();l.fill=Hg(s,o),l.stroke=Gg(s,o)||l.fill;var u=i.ensureUniqueItemVisual(n,"style");O(u,l)}}}}}},CV=$$;var K$=["color","borderColor"],J$=(function(r){I(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,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){zr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),i=this._data,n=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),a.diff(i).add(function(c){if(a.hasValue(c)){var f=a.getItemLayout(c);if(s&&MV(u,f))return;var p=a1(f,c,!0);Vt(p,{shape:{points:f.ends}},t,c),i1(p,a,c,o),n.add(p),a.setItemGraphicEl(c,p)}}).update(function(c,f){var p=i.getItemGraphicEl(f);if(!a.hasValue(c)){n.remove(p);return}var h=a.getItemLayout(c);if(s&&MV(u,h)){n.remove(p);return}p?(wt(p,{shape:{points:h.ends}},t,c),Re(p)):p=a1(h,c),i1(p,a,c,o),n.add(p),a.setItemGraphicEl(c,p)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&n.remove(f)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),EV(t,this.group);var a=t.get("clip",!0)?gn(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var i=a.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=a1(s,o);i1(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){EV(a,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})(Pt),Q$=(function(){function r(){}return r})(),tK=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new Q$},e.prototype.buildPath=function(t,a){var i=a.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e})(ft);function a1(r,e,t){var a=r.ends;return new tK({shape:{points:t?eK(a,r):a},z2:100})}function MV(r,e){for(var t=!0,a=0;a<e.ends.length;a++)if(r.contain(e.ends[a][0],e.ends[a][1])){t=!1;break}return t}function i1(r,e,t,a){var i=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=a,te(r,i);var n=e.getItemLayout(t).sign;T(r.states,function(s,l){var u=i.getModel(l),c=Hg(n,u),f=Gg(n,u)||c,p=s.style||(s.style={});c&&(p.fill=c),f&&(p.stroke=f)});var o=i.getModel("emphasis");Rt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function eK(r,e){return V(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var rK=(function(){function r(){}return r})(),n1=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new rK},e.prototype.buildPath=function(t,a){for(var i=a.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3},e})(ft);function EV(r,e,t,a){var i=r.getData(),n=i.getLayout("largePoints"),o=new n1({shape:{points:n},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new n1({shape:{points:n},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new n1({shape:{points:n},__sign:0,ignoreCoarsePointer:!0});e.add(l),o1(1,o,r,i),o1(-1,s,r,i),o1(0,l,r,i),a&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function o1(r,e,t,a){var i=Gg(r,t)||Hg(r,t),n=t.getModel("itemStyle").getItemStyle(K$);e.useStyle(n),e.style.fill=null,e.style.stroke=i}var AV=J$;var LV=(function(r){I(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,a,i){var n=a.getItemLayout(t);return n&&i.rect(n.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})(Nt);Jt(LV,Fg,!0);var IV=LV;function s1(r){!r||!z(r.series)||T(r.series,function(e){et(e)&&e.type==="k"&&(e.type="candlestick")})}var aK={seriesType:"candlestick",plan:Ta(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=iK(r,t),i=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=V(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],p=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:h};function h(v,m){for(var g,y=m.getStore();(g=v.next())!=null;){var x=y.get(s,g),_=y.get(u,g),b=y.get(c,g),S=y.get(f,g),w=y.get(p,g),D=Math.min(_,b),C=Math.max(_,b),M=B(D,x),E=B(C,x),L=B(S,x),A=B(w,x),P=[];U(P,E,0),U(P,M,1),P.push(H(A),H(E),H(L),H(M));var R=m.getItemModel(g),k=!!R.get(["itemStyle","borderColorDoji"]);m.setItemLayout(g,{sign:PV(y,g,_,b,c,k),initBaseline:_>b?E[n]:M[n],ends:P,brushRect:F(S,w,x)})}function B(G,Y){var rt=[];return rt[i]=Y,rt[n]=G,isNaN(Y)||isNaN(G)?[NaN,NaN]:e.dataToPoint(rt)}function U(G,Y,rt){var st=Y.slice(),mt=Y.slice();st[i]=Lf(st[i]+a/2,1,!1),mt[i]=Lf(mt[i]-a/2,1,!0),rt?G.push(st,mt):G.push(mt,st)}function F(G,Y,rt){var st=B(G,rt),mt=B(Y,rt);return st[i]-=a/2,mt[i]-=a/2,{x:st[0],y:st[1],width:n?a:mt[0]-st[0],height:n?mt[1]-st[1]:a}}function H(G){return G[i]=Lf(G[i],1),G}}function d(v,m){for(var g=Ur(v.count*4),y=0,x,_=[],b=[],S,w=m.getStore(),D=!!r.get(["itemStyle","borderColorDoji"]);(S=v.next())!=null;){var C=w.get(s,S),M=w.get(u,S),E=w.get(c,S),L=w.get(f,S),A=w.get(p,S);if(isNaN(C)||isNaN(L)||isNaN(A)){g[y++]=NaN,y+=3;continue}g[y++]=PV(w,S,M,E,c,D),_[i]=C,_[n]=L,x=e.dataToPoint(_,null,b),g[y++]=x?x[0]:NaN,g[y++]=x?x[1]:NaN,_[n]=A,x=e.dataToPoint(_,null,b),g[y++]=x?x[1]:NaN}m.setLayout("largePoints",g)}}};function PV(r,e,t,a,i,n){var o;return t>a?o=-1:t<a?o=1:o=n?0:e>0?r.get(i,e-1)<=a?1:-1:1,o}function iK(r,e){var t=r.getBaseAxis(),a,i=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=j(Q(r.get("barMaxWidth"),i),i),o=j(Q(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?j(s,i):Math.max(Math.min(i/2,n),o)}var kV=aK;function l1(r){r.registerChartView(AV),r.registerSeriesModel(IV),r.registerPreprocessor(s1),r.registerVisual(CV),r.registerLayout(kV)}function RV(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var nK=(function(r){I(e,r);function e(t,a){var i=r.call(this)||this,n=new jn(t,a),o=new K;return i.add(n),i.add(o),i.updateData(t,a),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s<n;s++){var l=jt(a,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/n*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)}RV(o,t)},e.prototype.updateEffectAnimation=function(t){for(var a=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],o=0;o<n.length;o++){var s=n[o];if(a[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}RV(i,t)},e.prototype.highlight=function(){Tr(this)},e.prototype.downplay=function(){Dr(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,a){var i=this,n=t.hostModel;this.childAt(0).updateData(t,a);var o=this.childAt(1),s=t.getItemModel(a),l=t.getItemVisual(a,"symbol"),u=Pi(t.getItemVisual(a,"symbolSize")),c=t.getItemVisual(a,"style"),f=c&&c.fill,p=s.getModel("emphasis");o.setScale(u),o.traverse(function(m){m.setStyle("fill",f)});var h=Da(t.getItemVisual(a,"symbolOffset"),u);h&&(o.x=h[0],o.y=h[1]);var d=t.getItemVisual(a,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var v={};v.showEffectOn=n.get("showEffectOn"),v.rippleScale=s.get(["rippleEffect","scale"]),v.brushType=s.get(["rippleEffect","brushType"]),v.period=s.get(["rippleEffect","period"])*1e3,v.effectOffset=a/t.count(),v.z=n.getShallow("z")||0,v.zlevel=n.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(m){m==="emphasis"?v.showEffectOn!=="render"&&i.startEffectAnimation(v):m==="normal"&&v.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=v,Rt(this,p.get("focus"),p.get("blurScope"),p.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e})(K),NV=nK;var oK=(function(r){I(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 mn(NV)},e.prototype.render=function(t,a,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,i=a&&a.getArea&&a.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,a,i){var n=t.getData();this.group.dirty();var o=Bi("").reset(t,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var a=t.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=LM(a.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e})(Pt),OV=oK;var sK=(function(r){I(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,a){return lr(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,a,i){return i.point(a.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})(Nt),zV=sK;function u1(r){r.registerChartView(OV),r.registerSeriesModel(zV),r.registerLayout(Bi("effectScatter"))}var lK=(function(r){I(e,r);function e(t,a,i){var n=r.call(this)||this;return n.add(n.createLine(t,a,i)),n._updateEffectSymbol(t,a),n}return e.prototype.createLine=function(t,a,i){return new ec(t,a,i)},e.prototype._updateEffectSymbol=function(t,a){var i=t.getItemModel(a),n=i.getModel("effect"),o=n.get("symbolSize"),s=n.get("symbol");z(o)||(o=[o,o]);var l=t.getItemVisual(a,"style"),u=n.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=jt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(n.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,n,a))},e.prototype._updateEffectAnimation=function(t,a,i){var n=this.childAt(1);if(n){var o=t.getItemLayout(i),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),c=a.get("constantSpeed"),f=de(a.get("delay"),function(h){return h/t.count()*s/3});if(n.ignore=!0,this._updateAnimationPoints(n,o),c>0&&(s=this._getLineLength(n)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var p=void 0;$(f)?p=f(i):p=f,n.__t>0&&(p=-s*n.__t),this._animateSymbol(n,s,p,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,i,n,o){if(a>0){t.__t=0;var s=this,l=t.animate("",n).when(o?a*2:a,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});n||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Oa(t.__p1,t.__cp1)+Oa(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,i){this.childAt(0).updateData(t,a,i),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Pe,c=Qc;s[0]=u(a[0],n[0],i[0],o),s[1]=u(a[1],n[1],i[1],o);var f=t.__t<1?c(a[0],n[0],i[0],o):c(i[0],n[0],a[0],1-o),p=t.__t<1?c(a[1],n[1],i[1],o):c(i[1],n[1],a[1],1-o);t.rotation=-Math.atan2(p,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Oa(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*Oa(a,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,a){this.childAt(0).updateLayout(t,a);var i=t.getItemModel(a).getModel("effect");this._updateEffectAnimation(t,i,a)},e})(K),Wg=lK;var uK=(function(r){I(e,r);function e(t,a,i){var n=r.call(this)||this;return n._createPolyline(t,a,i),n}return e.prototype._createPolyline=function(t,a,i){var n=t.getItemLayout(a),o=new he({shape:{points:n}});this.add(o),this._updateCommonStl(t,a,i)},e.prototype.updateData=function(t,a,i){var n=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(a)}};wt(o,s,n,a),this._updateCommonStl(t,a,i)},e.prototype._updateCommonStl=function(t,a,i){var n=this.childAt(0),o=t.getItemModel(a),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}n.useStyle(t.getItemVisual(a,"style")),n.style.fill=null,n.style.strokeNoScale=!0;var p=n.ensureState("emphasis");p.style=s,Rt(this,l,u,c)},e.prototype.updateLayout=function(t,a){var i=this.childAt(0);i.setShape("points",t.getItemLayout(a))},e})(K),Yg=uK;var cK=(function(r){I(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,a,i){return new Yg(t,a,i)},e.prototype._updateAnimationPoints=function(t,a){this._points=a;for(var i=[0],n=0,o=1;o<a.length;o++){var s=a[o-1],l=a[o];n+=Oa(s,l),i.push(n)}if(n===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var a=t.__t<1?t.__t:2-t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(n[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(n[l]>a);l++);l=Math.min(l-1,o-2)}var c=(a-n[l])/(n[l+1]-n[l]),f=i[l],p=i[l+1];t.x=f[0]*(1-c)+c*p[0],t.y=f[1]*(1-c)+c*p[1];var h=t.__t<1?p[0]-f[0]:f[0]-p[0],d=t.__t<1?p[1]-f[1]:f[1]-p[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e})(Wg),VV=cK;var fK=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),pK=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new fK},e.prototype.buildPath=function(t,a){var i=a.segs,n=a.curveness,o;if(a.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){t.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)t.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],f=i[o++],p=i[o++];if(t.moveTo(u,c),n>0){var h=(u+f)/2-(c-p)*n,d=(c+p)/2-(f-u)*n;t.quadraticCurveTo(h,d,f,p)}else t.lineTo(f,p)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<n.length;){var c=n[u++];if(c>0)for(var f=n[u++],p=n[u++],h=1;h<c;h++){var d=n[u++],v=n[u++];if(en(f,p,d,v,s,t,a))return l}l++}else for(var l=0,u=0;u<n.length;){var f=n[u++],p=n[u++],d=n[u++],v=n[u++];if(o>0){var m=(f+d)/2-(p-v)*o,g=(p+v)/2-(d-f)*o;if(Ld(f,p,m,g,d,v,s,t,a))return l}else if(en(f,p,d,v,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],f=i[u++];n=Math.min(c,n),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new at(n,o,s,l)}return t},e})(ft),hK=(function(){function r(){this.group=new K}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 a=this._newAdded[0],i=t.getLayout("linesPoints"),n=a&&a.shape.segs;if(n&&n.length<2e4){var o=n.length,s=new Float32Array(o+i.length);s.set(n),s.set(i,o),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),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 pK({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,a){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var n=t.getVisual("style");n&&n.stroke&&e.setStyle("stroke",n.stroke),e.setStyle("fill",null);var o=nt(e);o.seriesIndex=i.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})(),BV=hK;var dK={seriesType:"lines",plan:Ta(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(i,n){var o=[];if(a){var s=void 0,l=i.end-i.start;if(t){for(var u=0,c=i.start;c<i.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,p=[],c=i.start;c<i.end;c++){var h=r.getLineCoords(c,o);t&&(s[f++]=h);for(var d=0;d<h;d++)p=e.dataToPoint(o[d],!1,p),s[f++]=p[0],s[f++]=p[1]}n.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var v=n.getItemModel(c),h=r.getLineCoords(c,o),m=[];if(t)for(var g=0;g<h;g++)m.push(e.dataToPoint(o[g]));else{m[0]=e.dataToPoint(o[0]),m[1]=e.dataToPoint(o[1]);var y=v.get(["lineStyle","curveness"]);+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}n.setItemLayout(c,m)}}}}}},Zg=dK;var vK=(function(r){I(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,a,i){var n=t.getData(),o=this._updateLineDraw(n,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=i.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||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var f=t.get("clip",!0)&&gn(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=Zg.reset(t,a,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,a){var i=this._lineDraw,n=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new BV:new rc(o?n?VV:Yg:n?Wg:ec),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e})(Pt),UV=vK;var mK=typeof Uint32Array=="undefined"?Array:Uint32Array,gK=typeof Float64Array=="undefined"?Array:Float64Array;function FV(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=V(e,function(t){var a=[t[0].coord,t[1].coord],i={coords:a};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),Yl([i,t[0],t[1]])}))}var yK=(function(r){I(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||[],FV(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(FV(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Dn(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Dn(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),i=a.option instanceof Array?a.option:a.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;o<n;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[i+o*2],a[o][1]=this._flatCoords[i+o*2+1];return n}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)a[o]=a[o]||[],a[o][0]=s[o][0],a[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),yt(t[0])){for(var i=t.length,n=new mK(i),o=new gK(i),s=0,l=0,u=0,c=0;c<i;){u++;var f=t[c++];n[l++]=s+a,n[l++]=f;for(var p=0;p<f;p++){var h=t[c++],d=t[c++];o[s++]=h,o[s++]=d,c>i}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,a){if(0)var i;var n=new we(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),n},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=n.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),re("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},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})(Nt),HV=yK;function Xg(r){return r instanceof Array||(r=[r,r]),r}var xK={seriesType:"lines",reset:function(r){var e=Xg(r.get("symbol")),t=Xg(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=Xg(s.getShallow("symbol",!0)),u=Xg(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}},GV=xK;function c1(r){r.registerChartView(UV),r.registerSeriesModel(HV),r.registerLayout(Zg),r.registerVisual(GV)}var _K=256,bK=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ke.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,p=f.getContext("2d"),h=e.length;f.width=t,f.height=a;for(var d=0;d<h;++d){var v=e[d],m=v[0],g=v[1],y=v[2],x=i(y);p.globalAlpha=x,p.drawImage(s,m-c,g-c)}if(!f.width||!f.height)return f;for(var _=p.getImageData(0,0,f.width,f.height),b=_.data,S=0,w=b.length,D=this.minOpacity,C=this.maxOpacity,M=C-D;S<w;){var x=b[S+3]/256,E=Math.floor(x*(_K-1))*4;if(x>0){var L=o(x)?l:u;x>0&&(x=x*M+D),b[S++]=L[E],b[S++]=L[E+1],b[S++]=L[E+2],b[S++]=L[E+3]*x*256}else S+=4}return p.putImageData(_,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ke.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var i=e.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor=N.color.neutral99,i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,i=a[t]||(a[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},r})(),WV=bK;function SK(r,e,t){var a=r[1]-r[0];e=V(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var i=e.length,n=0;return function(o){var s;for(s=n;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(s=n-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s<i&&t[s]}}function wK(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(a){return a>=e[0]&&a<=e[1]}}function YV(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var TK=(function(r){I(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,a,i){var n;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,i,0,t.getData().count()):YV(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,a,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,i,n){var o=a.coordinateSystem;o&&(YV(o)?this.render(a,i,n):(this._progressiveEls=[],this._renderOnGridLike(a,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){zr(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,a,i,n,o){var s=t.coordinateSystem,l=Ma(s,"cartesian2d"),u=Ma(s,"matrix"),c,f,p,h;if(l){var d=s.getAxis("x"),v=s.getAxis("y");c=d.getBandWidth()+.5,f=v.getBandWidth()+.5,p=d.scale.getExtent(),h=v.scale.getExtent()}for(var m=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),x=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),S=qt(t),w=t.getModel("emphasis"),D=w.get("focus"),C=w.get("blurScope"),M=w.get("disabled"),E=l||u?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],L=i;L<n;L++){var A=void 0,P=g.getItemVisual(L,"style");if(l){var R=g.get(E[0],L),k=g.get(E[1],L);if(isNaN(g.get(E[2],L))||isNaN(R)||isNaN(k)||R<p[0]||R>p[1]||k<h[0]||k>h[1])continue;var B=s.dataToPoint([R,k]);A=new ht({shape:{x:B[0]-c/2,y:B[1]-f/2,width:c,height:f},style:P})}else if(u){var U=s.dataToLayout([g.get(E[0],L),g.get(E[1],L)]).rect;if(Me(U.x))continue;A=new ht({z2:1,shape:U,style:P})}else{if(isNaN(g.get(E[1],L)))continue;var F=s.dataToLayout([g.get(E[0],L)]),U=F.contentRect||F.rect;if(Me(U.x)||Me(U.y))continue;A=new ht({z2:1,shape:U,style:P})}if(g.hasItemOption){var H=g.getItemModel(L),G=H.getModel("emphasis");y=G.getModel("itemStyle").getItemStyle(),x=H.getModel(["blur","itemStyle"]).getItemStyle(),_=H.getModel(["select","itemStyle"]).getItemStyle(),b=H.get(["itemStyle","borderRadius"]),D=G.get("focus"),C=G.get("blurScope"),M=G.get("disabled"),S=qt(H)}A.shape.r=b;var Y=t.getRawValue(L),rt="-";Y&&Y[2]!=null&&(rt=Y[2]+""),$t(A,S,{labelFetcher:t,labelDataIndex:L,defaultOpacity:P.opacity,defaultText:rt}),A.ensureState("emphasis").style=y,A.ensureState("blur").style=x,A.ensureState("select").style=_,Rt(A,D,C,M),A.incremental=o,o&&(A.states.emphasis.hoverLayer=!0),m.add(A),g.setItemGraphicEl(L,A),this._progressiveEls&&this._progressiveEls.push(A)}},e.prototype._renderOnGeo=function(t,a,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new WV;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var p=Math.max(c.x,0),h=Math.max(c.y,0),d=Math.min(c.width+c.x,n.getWidth()),v=Math.min(c.height+c.y,n.getHeight()),m=d-p,g=v-h,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(y,function(w,D,C){var M=t.dataToPoint([w,D]);return M[0]-=p,M[1]-=h,M.push(C),M}),_=i.getExtent(),b=i.type==="visualMap.continuous"?wK(_,i.option.range):SK(_,i.getPieceList(),i.option.selected);u.update(x,m,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new se({style:{width:m,height:g,x:p,y:h,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e})(Pt),ZV=TK;var DK=(function(r){I(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,a){return lr(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Fn.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","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:N.color.primary}}},e})(Nt),XV=DK;function f1(r){r.registerChartView(ZV),r.registerSeriesModel(XV)}var CK=["itemStyle","borderWidth"],qV=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],p1=new Or,MK=(function(r){I(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,a,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),p={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:qV[+c],categoryDim:qV[1-+c]};o.diff(s).add(function(d){if(o.hasValue(d)){var v=$V(o,d),m=jV(o,d,v,p),g=KV(o,p,m);o.setItemGraphicEl(d,g),n.add(g),QV(g,p,m)}}).update(function(d,v){var m=s.getItemGraphicEl(v);if(!o.hasValue(d)){n.remove(m);return}var g=$V(o,d),y=jV(o,d,g,p),x=oB(o,y);m&&x!==m.__pictorialShapeStr&&(n.remove(m),o.setItemGraphicEl(d,null),m=null),m?RK(m,p,y):m=KV(o,p,y,!0),o.setItemGraphicEl(d,m),m.__pictorialSymbolMeta=y,n.add(m),QV(m,p,y)}).remove(function(d){var v=s.getItemGraphicEl(d);v&&JV(s,d,v.__pictorialSymbolMeta.animationModel,v)}).execute();var h=t.get("clip",!0)?gn(t.coordinateSystem,!1,t):null;return h?n.setClipPath(h):n.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){JV(n,nt(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e})(Pt);function jV(r,e,t,a){var i=r.getItemLayout(e),n=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(),p={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};EK(t,n,i,a,p),AK(r,e,i,n,o,p.boundingLength,p.pxSign,c,a,p),LK(t,p.symbolScale,u,a,p);var h=p.symbolSize,d=Da(t.get("symbolOffset"),h);return IK(t,h,i,n,o,d,s,p.valueLineWidth,p.boundingLength,p.repeatCutLength,a,p),p}function EK(r,e,t,a,i){var n=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),c;if(z(o)){var f=[h1(s,o[0])-l,h1(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=h1(s,o)-l:e?c=a.coordSysExtent[n.index][u]-l:c=t[n.wh];i.boundingLength=c,e&&(i.repeatCutLength=t[n.wh]);var p=n.xy==="x",h=s.inverse;i.pxSign=p&&!h||!p&&h?c>=0?1:-1:c>0?1:-1}function h1(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function AK(r,e,t,a,i,n,o,s,l,u){var c=l.valueDim,f=l.categoryDim,p=Math.abs(t[f.wh]),h=r.getItemVisual(e,"symbolSize"),d;z(h)?d=h.slice():h==null?d=["100%","100%"]:d=[h,h],d[f.index]=j(d[f.index],p),d[c.index]=j(d[c.index],a?p:Math.abs(n)),u.symbolSize=d;var v=u.symbolScale=[d[0]/s,d[1]/s];v[c.index]*=(l.isHorizontal?-1:1)*o}function LK(r,e,t,a,i){var n=r.get(CK)||0;n&&(p1.attr({scaleX:e[0],scaleY:e[1],rotation:t}),p1.updateTransform(),n/=p1.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n||0}function IK(r,e,t,a,i,n,o,s,l,u,c,f){var p=c.categoryDim,h=c.valueDim,d=f.pxSign,v=Math.max(e[h.index]+s,0),m=v;if(a){var g=Math.abs(l),y=de(r.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=j(y,e[h.index]),b=Math.max(v+_*2,0),S=x?0:_*2,w=pf(a),D=w?a:tB((g+S)/b),C=g-D*v;_=C/2/(x?D:Math.max(D-1,1)),b=v+_*2,S=x?0:_*2,!w&&a!=="fixed"&&(D=u?tB((Math.abs(u)+S)/b):0),m=D*b-S,f.repeatTimes=D,f.symbolMargin=_}var M=d*(m/2),E=f.pathPosition=[];E[p.index]=t[p.wh]/2,E[h.index]=o==="start"?M:o==="end"?l-M:l/2,n&&(E[0]+=n[0],E[1]+=n[1]);var L=f.bundlePosition=[];L[p.index]=t[p.xy],L[h.index]=t[h.xy];var A=f.barRectShape=O({},t);A[h.wh]=d*Math.max(Math.abs(t[h.wh]),Math.abs(E[h.index]+M)),A[p.wh]=t[p.wh];var P=f.clipShape={};P[p.xy]=-t[p.xy],P[p.wh]=c.ecSize[p.wh],P[h.xy]=0,P[h.wh]=t[h.wh]}function eB(r){var e=r.symbolPatternSize,t=jt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function rB(r,e,t,a){var i=r.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=n[e.valueDim.index]+o+t.symbolMargin*2;for(d1(r,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?lc(v,null,d(c),t,a):lc(v,null,{scaleX:0,scaleY:0},t,a,function(){i.remove(v)}),c++});c<u;c++){var p=eB(t);p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,i.add(p);var h=d(c);lc(p,{x:h.x,y:h.y,scaleX:0,scaleY:0},{scaleX:h.scaleX,scaleY:h.scaleY,rotation:h.rotation},t,a)}function d(v){var m=s.slice(),g=t.pxSign,y=v;return(t.symbolRepeatDirection==="start"?g>0:g<0)&&(y=u-1-v),m[l.index]=f*(y-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function aB(r,e,t,a){var i=r.__pictorialBundle,n=r.__pictorialMainPath;n?lc(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(n=r.__pictorialMainPath=eB(t),i.add(n),lc(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function iB(r,e,t){var a=O({},e.barRectShape),i=r.__pictorialBarRect;i?lc(i,null,{shape:a},e,t):(i=r.__pictorialBarRect=new ht({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function nB(r,e,t,a){if(t.symbolClip){var i=r.__pictorialClipPath,n=O({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)wt(i,{shape:n},s,l);else{n[o.wh]=0,i=new ht({shape:n}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],_t[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function $V(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=PK,t.isAnimationEnabled=kK,t}function PK(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function kK(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function KV(r,e,t,a){var i=new K,n=new K;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?rB(i,e,t):aB(i,e,t),iB(i,t,a),nB(i,e,t,a),i.__pictorialShapeStr=oB(r,t),i.__pictorialSymbolMeta=t,i}function RK(r,e,t){var a=t.animationModel,i=t.dataIndex,n=r.__pictorialBundle;wt(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,i),t.symbolRepeat?rB(r,e,t,!0):aB(r,e,t,!0),iB(r,t,!0),nB(r,e,t,!0)}function JV(r,e,t,a){var i=a.__pictorialBarRect;i&&i.removeTextContent();var n=[];d1(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),T(n,function(o){Xa(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function oB(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function d1(r,e,t){T(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function lc(r,e,t,a,i,n){e&&r.attr(e),a.symbolClip&&!i?t&&r.attr(t):t&&_t[i?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,n)}function QV(r,e,t){var a=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=n.get("focus"),f=n.get("blurScope"),p=n.get("scale");d1(r,function(v){if(v instanceof se){var m=v.style;v.useStyle(O({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else v.useStyle(t.style);var g=v.ensureState("emphasis");g.style=o,p&&(g.scaleX=v.scaleX*1.1,g.scaleY=v.scaleY*1.1),v.ensureState("blur").style=s,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,$t(d,qt(i),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:Vi(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Rt(r,c,f,n.get("disabled"))}function tB(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var sB=MK;var NK=(function(r){I(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=Ar(Yu.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:N.color.primary}}}),e})(Yu),lB=NK;function v1(r){r.registerChartView(sB),r.registerSeriesModel(lB),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(_m,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bm("pictorialBar"))}var OK=(function(r){I(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,a,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function p(m){return m.name}var h=new gr(this._layersSeries||[],l,p,p),d=[];h.add(Z(v,this,"add")).update(Z(v,this,"update")).remove(Z(v,this,"remove")).execute();function v(m,g,y){var x=o._layers;if(m==="remove"){s.remove(x[g]);return}for(var _=[],b=[],S,w=l[g].indices,D=0;D<w.length;D++){var C=n.getItemLayout(w[D]),M=C.x,E=C.y0,L=C.y;_.push(M,E),b.push(M,E+L),S=n.getItemVisual(w[D],"style")}var A,P=n.getItemLayout(w[0]),R=t.getModel("label"),k=R.get("margin"),B=t.getModel("emphasis");if(m==="add"){var U=d[g]=new K;A=new $m({shape:{points:_,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),U.add(A),s.add(U),t.isAnimationEnabled()&&A.setClipPath(zK(A.getBoundingRect(),t,function(){A.removeClipPath()}))}else{var U=x[y];A=U.childAt(0),s.add(U),d[g]=U,wt(A,{shape:{points:_,stackedOnPoints:b}},t),Re(A)}$t(A,qt(t),{labelDataIndex:w[D-1],defaultText:n.getName(w[D-1]),inheritColor:S.fill},{normal:{verticalAlign:"middle"}}),A.setTextConfig({position:null,local:!0});var F=A.getTextContent();F&&(F.x=P.x-k,F.y=P.y0+P.y/2),A.useStyle(S),n.setItemGraphicEl(g,A),te(A,t),Rt(A,B.get("focus"),B.get("blurScope"),B.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e})(Pt);function zK(r,e,t){var a=new ht({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Vt(a,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),a}var uB=OK;var m1=2,VK=(function(r){I(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 ai(Z(this.getData,this),Z(this.getRawData,this))},e.prototype.fixData=function(t){var a=t.length,i={},n=vf(t,function(p){return i.hasOwnProperty(p[0]+"")||(i[p[0]+""]=-1),p[2]}),o=[];n.buckets.each(function(p,h){o.push({name:h,dataList:p})});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]+"";i[f]=l}for(var f in i)i.hasOwnProperty(f)&&i[f]!==l&&(i[f]=l,t[a]=[f,0,u],a++)}return t},e.prototype.getInitialData=function(t,a){for(var i=this.getReferringComponents("singleAxis",Yt).models[0],n=i.get("type"),o=At(t.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=q(),c=0,f=0;f<s.length;++f)l.push(s[f][m1]),u.get(s[f][m1])||(u.set(s[f][m1],c),c++);var p=Ri(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:hl(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,h=new we(p,this);return h.initData(s),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),a=t.count(),i=[],n=0;n<a;++n)i[n]=n;var o=t.mapDimension("single"),s=vf(i,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,p){return t.get(o,f)-t.get(o,p)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,a,i){z(t)||(t=t?[t]:[]);for(var n=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,p=-1,h=o[c].indices.length,d=0;d<h;++d){var v=n.get(t[0],o[c].indices[d]),m=Math.abs(v-a);m<=f&&(u=v,f=m,p=o[c].indices[d])}s.push(p)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=n.getName(t),s=n.get(n.mapDimension("value"),t);return re("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})(Nt),cB=VK;function g1(r,e){r.eachSeriesByType("themeRiver",function(t){var a=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=t.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=j(s[0],o.height),s[1]=j(s[1],o.height);var u=o.height-s[0]-s[1];fB(a,t,u)}else{s[0]=j(s[0],o.width),s[1]=j(s[1],o.width);var c=o.width-s[0]-s[1];fB(a,t,c)}a.setLayout("layoutInfo",n)})}function fB(r,e,t){if(r.count())for(var a=e.coordinateSystem,i=e.getLayerSeries(),n=r.mapDimension("single"),o=r.mapDimension("value"),s=V(i,function(m){return V(m.indices,function(g){var y=a.dataToPoint(r.get(n,g));return y[1]=r.get(o,g),y})}),l=BK(s),u=l.y0,c=t/l.max,f=i.length,p=i[0].indices.length,h,d=0;d<p;++d){h=u[d]*c,r.setItemLayout(i[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:h,y:s[0][d][1]*c});for(var v=1;v<f;++v)h+=s[v-1][d][1]*c,r.setItemLayout(i[v].indices[d],{layerIndex:v,x:s[v][d][0],y0:h,y:s[v][d][1]*c})}}function BK(r){for(var e=r.length,t=r[0].length,a=[],i=[],n=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>n&&(n=s),a.push(s)}for(var u=0;u<t;++u)i[u]=(n-a[u])/2;n=0;for(var c=0;c<t;++c){var f=a[c]+i[c];f>n&&(n=f)}return{y0:i,max:n}}function y1(r){r.registerChartView(uB),r.registerSeriesModel(cB),r.registerLayout(g1),r.registerProcessor(Ea("themeRiver"))}var UK=2,FK=4,HK=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this)||this;o.z2=UK,o.textConfig={inside:!0},nt(o).seriesIndex=a.seriesIndex;var s=new Dt({z2:FK,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,i,n),o}return e.prototype.updateData=function(t,a,i,n,o){this.node=a,a.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;nt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),c=a.getLayout(),f=O({},c);f.label=null;var p=a.getVisual("style");p.lineJoin="bevel";var h=a.getVisual("decal");h&&(p.decal=ki(h,o));var d=Gr(l.getModel("itemStyle"),f,!0);O(f,d),T(qe,function(y){var x=s.ensureState(y),_=l.getModel([y,"itemStyle"]);x.style=_.getItemStyle();var b=Gr(_,f);b&&(x.shape=b)}),t?(s.setShape(f),s.shape.r=c.r0,Vt(s,{shape:{r:c.r}},i,a.dataIndex)):(wt(s,{shape:f},i),Re(s)),s.useStyle(p),this._updateLabel(i);var v=l.getShallow("cursor");v&&s.attr("cursor",v),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var m=u.get("focus"),g=m==="relative"?Dn(a.getAncestorsIndices(),a.getDescendantIndices()):m==="ancestor"?a.getAncestorsIndices():m==="descendant"?a.getDescendantIndices():m;Rt(this,g,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,i=this.node.getModel(),n=i.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,p=f.getTextContent(),h=this.node.dataIndex,d=n.get("minAngle")/180*Math.PI,v=n.get("show")&&!(d!=null&&Math.abs(s)<d);p.ignore=!v,T(wo,function(g){var y=g==="normal"?i.getModel("label"):i.getModel([g,"label"]),x=g==="normal",_=x?p:p.ensureState(g),b=t.getFormattedLabel(h,g);x&&(b=b||a.node.name),_.style=Gt(y,{},null,g!=="normal",!0),b&&(_.style.text=b);var S=y.get("show");S!=null&&!x&&(_.ignore=!S);var w=m(y,"position"),D=x?f:f.states[g],C=D.style.fill;D.textConfig={outsideFill:y.get("color")==="inherit"?C:null,inside:w!=="outside"};var M,E=m(y,"distance")||0,L=m(y,"align"),A=m(y,"rotate"),P=Math.PI*.5,R=Math.PI*1.5,k=dr(A==="tangential"?Math.PI/2-l:l),B=k>P&&!Is(k-P)&&k<R;w==="outside"?(M=o.r+E,L=B?"right":"left"):!L||L==="center"?(s===2*Math.PI&&o.r0===0?M=0:M=(o.r+o.r0)/2,L="center"):L==="left"?(M=o.r0+E,L=B?"right":"left"):L==="right"&&(M=o.r-E,L=B?"left":"right"),_.style.align=L,_.style.verticalAlign=m(y,"verticalAlign")||"middle",_.x=M*u+o.cx,_.y=M*c+o.cy;var U=0;A==="radial"?U=dr(-l)+(B?Math.PI:0):A==="tangential"?U=dr(Math.PI/2-l)+(B?Math.PI:0):yt(A)&&(U=A*Math.PI/180),_.rotation=dr(U)});function m(g,y){var x=g.get(y);return x==null?n.get(y):x}p.dirtyStyle()},e})(De),x1=HK;var qg="sunburstRootToNode",pB="sunburstHighlight",GK="sunburstUnhighlight";function hB(r){r.registerAction({type:qg,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i,n){var o=Jn(e,[qg],i);if(o){var s=i.getViewRoot();s&&(e.direction=$u(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:pB,update:"none"},function(e,t,a){e=O({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n){var o=Jn(e,[pB],n);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(O(e,{type:"highlight"}))}),r.registerAction({type:GK,update:"updateView"},function(e,t,a){e=O({},e),a.dispatchAction(O(e,{type:"downplay"}))})}var WK=(function(r){I(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,a,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=a;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,f=t.get("renderLabelForZeroData"),p=[];u.eachNode(function(y){p.push(y)});var h=this._oldChildren||[];d(p,h),g(l,u),this._initEvents(),this._oldChildren=p;function d(y,x){if(y.length===0&&x.length===0)return;new gr(x,y,_,_).add(b).update(b).remove(ut(b,null)).execute();function _(S){return S.getId()}function b(S,w){var D=S==null?null:y[S],C=w==null?null:x[w];v(D,C)}}function v(y,x){if(!f&&y&&!y.getValue()&&(y=null),y!==l&&x!==l){if(x&&x.piece)y?(x.piece.updateData(!1,y,t,a,i),s.setItemGraphicEl(y.dataIndex,x.piece)):m(x);else if(y){var _=new x1(y,t,a,i);c.add(_),s.setItemGraphicEl(y.dataIndex,_)}}}function m(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function g(y,x){x.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,a,i):(o.virtualPiece=new x1(y,t,a,i),c.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(x.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(a){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===a.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";al(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:qg,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e})(Pt),dB=WK;var YK=(function(r){I(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,a){var i={name:t.name,children:t.data};vB(i);var n=this._levelModels=V(t.levels||[],function(l){return new Mt(l,this,a)},this),o=ju.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),p=n[f.depth];return p&&(u.parentModel=p),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=jo(i,this),a},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 a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){kp(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})(Nt);function vB(r){var e=0;T(r.children,function(a){vB(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}var mB=YK;var gB=Math.PI/180;function _1(r,e,t){e.eachSeriesByType(r,function(a){var i=a.get("center"),n=a.get("radius");z(n)||(n=[0,n]),z(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=j(i[0],o),c=j(i[1],s),f=j(n[0],l/2),p=j(n[1],l/2),h=-a.get("startAngle")*gB,d=a.get("minAngle")*gB,v=a.getData().tree.root,m=a.getViewRoot(),g=m.depth,y=a.get("sort");y!=null&&yB(m,y);var x=0;T(m.children,function(k){!isNaN(k.getValue())&&x++});var _=m.getValue(),b=Math.PI/(_||x)*2,S=m.depth>0,w=m.height-(S?-1:1),D=(p-f)/(w||1),C=a.get("clockwise"),M=a.get("stillShowZeroSum"),E=C?1:-1,L=function(k,B){if(k){var U=B;if(k!==v){var F=k.getValue(),H=_===0&&M?b:F*b;H<d&&(H=d),U=B+E*H;var G=k.depth-g-(S?-1:1),Y=f+D*G,rt=f+D*(G+1),st=a.getLevelModel(k);if(st){var mt=st.get("r0",!0),Ht=st.get("r",!0),Kt=st.get("radius",!0);Kt!=null&&(mt=Kt[0],Ht=Kt[1]),mt!=null&&(Y=j(mt,l/2)),Ht!=null&&(rt=j(Ht,l/2))}k.setLayout({angle:H,startAngle:B,endAngle:U,clockwise:C,cx:u,cy:c,r0:Y,r:rt})}if(k.children&&k.children.length){var Et=0;T(k.children,function(vt){Et+=L(vt,B+Et)})}return U-B}};if(S){var A=f,P=f+D,R=Math.PI*2;v.setLayout({angle:R,startAngle:h,endAngle:h+R,clockwise:C,cx:u,cy:c,r0:A,r:P})}L(m,h)})}function yB(r,e){var t=r.children||[];r.children=ZK(t,e),t.length&&T(r.children,function(a){yB(a,e)})}function ZK(r,e){if($(e)){var t=V(r,function(i,n){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:n}});return t.sort(function(i,n){return e(i.params,n.params)}),V(t,function(i){return r[i.index]})}else{var a=e==="asc";return r.sort(function(i,n){var o=(i.getValue()-n.getValue())*(a?1:-1);return o===0?(i.dataIndex-n.dataIndex)*(a?-1:1):o})}}function b1(r){var e={};function t(a,i,n){if(a.depth===0)return N.color.neutral50;for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&W(s)&&(s=jh(s,(a.depth-1)/(n-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var i=a.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");O(u,l)})})}function S1(r){r.registerChartView(dB),r.registerSeriesModel(mB),r.registerLayout(ut(_1,"sunburst")),r.registerProcessor(ut(Ea,"sunburst")),r.registerVisual(b1),hB(r)}var w1={color:"fill",borderColor:"stroke"},xB={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},yn=ot(),XK=(function(r){I(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,a){return lr(null,this)},e.prototype.getDataParams=function(t,a,i){var n=r.prototype.getDataParams.call(this,t,a);return i&&(n.info=yn(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(Nt),_B=XK;function qK(r,e){return e=e||[0,0],V(["x","y"],function(t,a){var i=this.getAxis(t),n=e[a],o=r[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function T1(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z(qK,r)}}}function jK(r,e){return e=e||[0,0],V([0,1],function(t){var a=e[t],i=r[t]/2,n=[],o=[];return n[t]=a-i,o[t]=a+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function D1(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Z(jK,r)}}}function $K(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-i)-t.dataToCoord(a+i))}function C1(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z($K,r)}}}function KK(r,e){return e=e||[0,0],V(["Radius","Angle"],function(t,a){var i="get"+t+"Axis",n=this[i](),o=e[a],s=r[a]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function M1(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:Z(KK,r)}}}function E1(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(a,i){return r.dataToPoint(a,i)},layout:function(a,i){return r.dataToLayout(a,i)}}}}function A1(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,a){return r.dataToPoint(t,a)},layout:function(t,a){return r.dataToLayout(t,a)}}}}function jg(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||it(r,"text")))}function $g(r,e,t){var a=r,i,n,o;if(e==="text")o=a;else{o={},it(a,"text")&&(o.text=a.text),it(a,"rich")&&(o.rich=a.rich),it(a,"textFill")&&(o.fill=a.textFill),it(a,"textStroke")&&(o.stroke=a.textStroke),it(a,"fontFamily")&&(o.fontFamily=a.fontFamily),it(a,"fontSize")&&(o.fontSize=a.fontSize),it(a,"fontStyle")&&(o.fontStyle=a.fontStyle),it(a,"fontWeight")&&(o.fontWeight=a.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=it(a,"textPosition");t?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),it(a,"textPosition")&&(i.position=a.textPosition),it(a,"textOffset")&&(i.offset=a.textOffset),it(a,"textRotation")&&(i.rotation=a.textRotation),it(a,"textDistance")&&(i.distance=a.textDistance)}return bB(o,r),T(o.rich,function(l){bB(l,l)}),{textConfig:i,textContent:n}}function bB(r,e){e&&(e.font=e.textFont||e.font,it(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),it(e,"textAlign")&&(r.align=e.textAlign),it(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),it(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),it(e,"textWidth")&&(r.width=e.textWidth),it(e,"textHeight")&&(r.height=e.textHeight),it(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),it(e,"textPadding")&&(r.padding=e.textPadding),it(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),it(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),it(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),it(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),it(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),it(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),it(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function L1(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var i=a.textPosition.indexOf("inside")>=0,n=r.fill||N.color.neutral99;SB(a,e);var o=a.textFill==null;return i?o&&(a.textFill=t.insideFill||N.color.neutral00,!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=n),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||N.color.neutral00),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,T(e.rich,function(s){SB(s,s)}),a}function SB(r,e){e&&(it(e,"fill")&&(r.textFill=e.fill),it(e,"stroke")&&(r.textStroke=e.fill),it(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),it(e,"font")&&(r.font=e.font),it(e,"fontStyle")&&(r.fontStyle=e.fontStyle),it(e,"fontWeight")&&(r.fontWeight=e.fontWeight),it(e,"fontSize")&&(r.fontSize=e.fontSize),it(e,"fontFamily")&&(r.fontFamily=e.fontFamily),it(e,"align")&&(r.textAlign=e.align),it(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),it(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),it(e,"width")&&(r.textWidth=e.width),it(e,"height")&&(r.textHeight=e.height),it(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),it(e,"padding")&&(r.textPadding=e.padding),it(e,"borderColor")&&(r.textBorderColor=e.borderColor),it(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),it(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),it(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),it(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),it(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),it(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),it(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),it(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),it(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),it(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var DB={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},wB=gt(DB),fNt=cr(_a,function(r,e){return r[e]=1,r},{}),pNt=_a.join(", "),Yp=["","style","shape","extra"],uc=ot();function P1(r,e,t,a,i){var n=r+"Animation",o=on(r,a,i)||{},s=uc(e).userDuring;return o.duration>0&&(o.during=s?Z(rJ,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),O(o,t[n]),o}function cc(r,e,t,a){a=a||{};var i=a.dataIndex,n=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=uc(r),u=e.style;l.userDuring=e.during;var c={},f={};if(iJ(r,e,f),r.type==="compound")for(var p=r.shape.paths,h=e.shape.paths,d=0;d<h.length;d++){var v=h[d];I1("shape",v,p[d])}else I1("shape",e,f),I1("extra",e,f);if(!n&&s&&(aJ(r,e,c),TB("shape",r,e,c),TB("extra",r,e,c),nJ(r,e,u,c)),f.style=u,JK(r,f,o),tJ(r,e),s)if(n){var m={};T(Yp,function(y){var x=y?e[y]:e;x&&x.enterFrom&&(y&&(m[y]=m[y]||{}),O(y?m[y]:m,x.enterFrom))});var g=P1("enter",r,e,t,i);g.duration>0&&r.animateFrom(m,g)}else QK(r,e,i||0,t,c);k1(r,e),u?r.dirty():r.markRedraw()}function k1(r,e){for(var t=uc(r).leaveToProps,a=0;a<Yp.length;a++){var i=Yp[a],n=i?e[i]:e;n&&n.leaveTo&&(t||(t=uc(r).leaveToProps={}),i&&(t[i]=t[i]||{}),O(i?t[i]:t,n.leaveTo))}}function fc(r,e,t,a){if(r){var i=r.parent,n=uc(r).leaveToProps;if(n){var o=P1("update",r,e,t,0);o.done=function(){i&&i.remove(r),a&&a()},r.animateTo(n,o)}else i&&i.remove(r),a&&a()}}function Jo(r){return r==="all"}function JK(r,e,t){var a=e.style;if(!r.isGroup&&a){if(t){r.useStyle({});for(var i=r.animators,n=0;n<i.length;n++){var o=i[n];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(a)}e&&(e.style=null,e&&r.attr(e),e.style=a)}function QK(r,e,t,a,i){if(i){var n=P1("update",r,e,a,t);n.duration>0&&r.animateFrom(i,n)}}function tJ(r,e){it(e,"silent")&&(r.silent=e.silent),it(e,"ignore")&&(r.ignore=e.ignore),r instanceof ke&&it(e,"invisible")&&(r.invisible=e.invisible),r instanceof ft&&it(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var xn={},eJ={setTransform:function(r,e){return xn.el[r]=e,this},getTransform:function(r){return xn.el[r]},setShape:function(r,e){var t=xn.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=xn.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=xn.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=xn.el.style;if(e)return e[r]},setExtra:function(r,e){var t=xn.el.extra||(xn.el.extra={});return t[r]=e,this},getExtra:function(r){var e=xn.el.extra;if(e)return e[r]}};function rJ(){var r=this,e=r.el;if(e){var t=uc(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}xn.el=e,a(eJ)}}function TB(r,e,t,a){var i=t[r];if(i){var n=e[r],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=a[r]={}),Jo(l))O(o,n);else for(var u=Ft(l),c=0;c<u.length;c++){var f=u[c],p=n[f];o[f]=p}else if(Jo(s)||lt(s,r)>=0){!o&&(o=a[r]={});for(var h=gt(n),c=0;c<h.length;c++){var f=h[c],p=n[f];oJ(i[f],p)&&(o[f]=p)}}}}}function I1(r,e,t){var a=e[r];if(a)for(var i=t[r]={},n=gt(a),o=0;o<n.length;o++){var s=n[o];i[s]=Ts(a[s])}}function aJ(r,e,t){for(var a=e.transition,i=Jo(a)?_a:Ft(a||[]),n=0;n<i.length;n++){var o=i[n];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function iJ(r,e,t){for(var a=0;a<wB.length;a++){var i=wB[a],n=DB[i],o=e[i];o&&(t[n[0]]=o[0],t[n[1]]=o[1])}for(var a=0;a<_a.length;a++){var s=_a[a];e[s]!=null&&(t[s]=e[s])}}function nJ(r,e,t,a){if(t){var i=r.style,n;if(i){var o=t.transition,s=e.transition;if(o&&!Jo(o)){var l=Ft(o);!n&&(n=a.style={});for(var u=0;u<l.length;u++){var c=l[u],f=i[c];n[c]=f}}else if(r.getAnimationStyleProps&&(Jo(s)||Jo(o)||lt(s,"style")>=0)){var p=r.getAnimationStyleProps(),h=p?p.style:null;if(h){!n&&(n=a.style={});for(var d=gt(t),u=0;u<d.length;u++){var c=d[u];if(h[c]){var f=i[c];n[c]=f}}}}}}}function oJ(r,e){return Ce(r)?r!==e:r!=null&&isFinite(r)}var CB=ot(),sJ=["percent","easing","shape","style","extra"];function Kg(r){r.stopAnimation("keyframe"),r.attr(CB(r))}function pc(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(z(e)){T(e,function(s){pc(r,s,t)});return}var a=e.keyframes,i=e.duration;if(t&&i==null){var n=on("enter",t,0);i=n&&n.duration}if(!(!a||!i)){var o=CB(r);T(Yp,function(s){if(!(s&&!r[s])){var l,u=!1;a.sort(function(c,f){return c.percent-f.percent}),T(a,function(c){var f=r.animators,p=s?c[s]:c;if(p){var h=gt(p);if(s||(h=At(h,function(m){return lt(sJ,m)<0})),!!h.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var d=0;d<f.length;d++)f[d]!==l&&f[d].targetName===l.targetName&&f[d].stopTracks(h);s&&(o[s]=o[s]||{});var v=s?o[s]:o;T(h,function(m){v[m]=((s?r[s]:r)||{})[m]}),l.whenWithKeys(i*c.percent,p,h,c.easing)}}}),l&&l.delay(e.delay||0).duration(i).start(e.easing)}})}}}var to="emphasis",Qo="normal",B1="blur",U1="select",ts=[Qo,to,B1,U1],R1={normal:["itemStyle"],emphasis:[to,"itemStyle"],blur:[B1,"itemStyle"],select:[U1,"itemStyle"]},N1={normal:["label"],emphasis:[to,"label"],blur:[B1,"label"],select:[U1,"label"]},lJ=["x","y"],uJ="e\0\0",oi={normal:{},emphasis:{},blur:{},select:{}},cJ={cartesian2d:T1,geo:D1,single:C1,polar:M1,calendar:E1,matrix:A1};function z1(r){return r instanceof ft}function V1(r){return r instanceof ke}function fJ(r,e){e.copyTransform(r),V1(e)&&V1(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,z1(e)&&z1(r)&&e.setShape(r.shape))}var pJ=(function(r){I(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,a,i,n){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=MB(t,s,a,i);o||l.removeAll(),s.diff(o).add(function(f){O1(i,null,f,u(f,n),t,l,s)}).remove(function(f){var p=o.getItemGraphicEl(f);p&&fc(p,yn(p).option,t)}).update(function(f,p){var h=o.getItemGraphicEl(p);O1(i,h,f,u(f,n),t,l,s)}).execute();var c=t.get("clip",!0)?gn(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,a,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,a,i,n,o){var s=a.getData(),l=MB(a,s,i,n),u=this._progressiveEls=[];function c(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var p=O1(null,null,f,l(f,o),a,this.group,s);p&&(p.traverse(c),u.push(p))}},e.prototype.eachRendered=function(t){zr(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,a,i,n){var o=a.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e})(Pt),IB=pJ;function F1(r){var e=r.type,t;if(e==="path"){var a=r.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,n=RB(a);t=$s(n,null,i,a.layout||"center"),yn(t).customPathData=n}else if(e==="image")t=new se({}),yn(t).customImagePath=r.style.image;else if(e==="text")t=new Dt({});else if(e==="group")t=new K;else if(e==="compoundPath"){var a=r.shape;if(!a||!a.paths){var o="";Ut(o)}var s=V(a.paths,function(c){if(c.type==="path")return $s(c.shape.pathData,c,null);var f=gu(c.type);if(!f){var p="";Ut(p)}return new f});t=new Co({shape:{paths:s}})}else{var l=gu(e);if(!l){var o="";Ut(o)}t=new l}return yn(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function H1(r,e,t,a,i,n,o){Kg(e);var s=i&&i.normal.cfg;s&&e.setTextConfig(s),a&&a.transition==null&&(a.transition=lJ);var l=a&&a.style;if(l){if(e.type==="text"){var u=l;it(u,"textFill")&&(u.fill=u.textFill),it(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=z1(e)?l.decal:null;r&&f&&(f.dirty=!0,c=ki(f,r)),l.__decalPattern=c}if(V1(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}cc(e,a,n,{dataIndex:t,isInit:o,clearStyle:!0}),pc(e,a.keyframeAnimation,n)}function PB(r,e,t,a,i){var n=e.isGroup?null:e,o=i&&i[r].cfg;if(n){var s=n.ensureState(r);if(a===!1){var l=n.getState(r);l&&(l.style=null)}else s.style=a||null;o&&(s.textConfig=o),wi(n)}}function hJ(r,e,t){if(!r.isGroup){var a=r,i=t.currentZ,n=t.currentZLevel;a.z=i,a.zlevel=n;var o=e.z2;o!=null&&(a.z2=o||0);for(var s=0;s<ts.length;s++)dJ(a,e,ts[s])}}function dJ(r,e,t){var a=t===Qo,i=a?e:Jg(e,t),n=i?i.z2:null,o;n!=null&&(o=a?r:r.ensureState(t),o.z2=n||0)}function MB(r,e,t,a){var i=r.get("renderItem");if(typeof i=="string"){var n=ak(i);n&&(i=n)}var o=r.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):cJ[o.type](o));for(var l=J({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:b,style:w,ordinalRawValue:S,styleEmphasis:D,visual:E,barLayout:L,currentSeriesIndices:A,font:P},s.api||{}),u={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:vJ(r.getData()),itemPayload:r.get("itemPayload")||{}},c,f,p={},h={},d={},v={},m=0;m<ts.length;m++){var g=ts[m];d[g]=r.getModel(R1[g]),v[g]=r.getModel(N1[g])}function y(R){return R===c?f||(f=e.getItemModel(R)):e.getItemModel(R)}function x(R,k){return e.hasItemOption?R===c?p[k]||(p[k]=y(R).getModel(R1[k])):y(R).getModel(R1[k]):d[k]}function _(R,k){return e.hasItemOption?R===c?h[k]||(h[k]=y(R).getModel(N1[k])):y(R).getModel(N1[k]):v[k]}return function(R,k){return c=R,f=null,p={},h={},i&&i(J({dataIndexInside:R,dataIndex:e.getRawIndex(R),actionType:k?k.type:null},u),l)};function b(R,k){return k==null&&(k=c),e.getStore().get(e.getDimensionIndex(R||0),k)}function S(R,k){k==null&&(k=c),R=R||0;var B=e.getDimensionInfo(R);if(!B){var U=e.getDimensionIndex(R);return U>=0?e.getStore().get(U,k):void 0}var F=e.get(B.name,k),H=B&&B.ordinalMeta;return H?H.categories[F]:F}function w(R,k){k==null&&(k=c);var B=e.getItemVisual(k,"style"),U=B&&B.fill,F=B&&B.opacity,H=x(k,Qo).getItemStyle();U!=null&&(H.fill=U),F!=null&&(H.opacity=F);var G={inheritColor:W(U)?U:N.color.neutral99},Y=_(k,Qo),rt=Gt(Y,null,G,!1,!0);rt.text=Y.getShallow("show")?Q(r.getFormattedLabel(k,Qo),Vi(e,k)):null;var st=If(Y,G,!1);return M(R,H),H=L1(H,rt,st),R&&C(H,R),H.legacy=!0,H}function D(R,k){k==null&&(k=c);var B=x(k,to).getItemStyle(),U=_(k,to),F=Gt(U,null,null,!0,!0);F.text=U.getShallow("show")?Te(r.getFormattedLabel(k,to),r.getFormattedLabel(k,Qo),Vi(e,k)):null;var H=If(U,null,!0);return M(R,B),B=L1(B,F,H),R&&C(B,R),B.legacy=!0,B}function C(R,k){for(var B in k)it(k,B)&&(R[B]=k[B])}function M(R,k){R&&(R.textFill&&(k.textFill=R.textFill),R.textPosition&&(k.textPosition=R.textPosition))}function E(R,k){if(k==null&&(k=c),it(w1,R)){var B=e.getItemVisual(k,"style");return B?B[w1[R]]:null}if(it(xB,R))return e.getItemVisual(k,R)}function L(R){if(o.type==="cartesian2d"){var k=o.getBaseAxis();return qk(J({axis:k},R))}}function A(){return t.getCurrentSeriesIndices()}function P(R){return _u(R,t)}}function vJ(r){var e={};return T(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var i=a.coordDim,n=e[i]=e[i]||[];n[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function O1(r,e,t,a,i,n,o){if(!a){n.remove(e);return}var s=G1(r,e,t,a,i,n);return s&&o.setItemGraphicEl(t,s),s&&Rt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function G1(r,e,t,a,i,n){var o=-1,s=e;e&&kB(e,a,i)&&(o=lt(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=F1(a),s&&fJ(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),oi.normal.cfg=oi.normal.conOpt=oi.emphasis.cfg=oi.emphasis.conOpt=oi.blur.cfg=oi.blur.conOpt=oi.select.cfg=oi.select.conOpt=null,oi.isLegacy=!1,gJ(u,t,a,i,l,oi),mJ(u,t,a,i,l),H1(r,u,t,a,oi,i,l),it(a,"info")&&(yn(u).info=a.info);for(var c=0;c<ts.length;c++){var f=ts[c];if(f!==Qo){var p=Jg(a,f),h=W1(a,p,f);PB(f,u,p,h,oi)}}return hJ(u,a,i),a.type==="group"&&yJ(r,u,t,a,i),o>=0?n.replaceAt(u,o):n.add(u),u}function kB(r,e,t){var a=yn(r),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&SJ(n)&&RB(n)!==a.customPathData||i==="image"&&it(o,"image")&&o.image!==a.customImagePath}function mJ(r,e,t,a,i){var n=t.clipPath;if(n===!1)r&&r.getClipPath()&&r.removeClipPath();else if(n){var o=r.getClipPath();o&&kB(o,n,a)&&(o=null),o||(o=F1(n),r.setClipPath(o)),H1(null,o,e,n,null,a,i)}}function gJ(r,e,t,a,i,n){if(!(r.isGroup||r.type==="compoundPath")){EB(t,null,n),EB(t,to,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=F1(o),r.setTextContent(c)),H1(null,c,e,o,null,a,i);for(var f=o&&o.style,p=0;p<ts.length;p++){var h=ts[p];if(h!==Qo){var d=n[h].conOpt;PB(h,c,d,W1(o,d,h),null)}}f?c.dirty():c.markRedraw()}}}}function EB(r,e,t){var a=e?Jg(r,e):r,i=e?W1(r,a,to):r.style,n=r.type,o=a?a.textConfig:null,s=r.textContent,l=s?e?Jg(s,e):s:null;if(i&&(t.isLegacy||jg(i,n,!!o,!!l))){t.isLegacy=!0;var u=$g(i,n,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function Jg(r,e){return e?r?r[e]:null:r}function W1(r,e,t){var a=e&&e.style;return a==null&&t===to&&r&&(a=r.styleEmphasis),a}function yJ(r,e,t,a,i){var n=a.children,o=n?n.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){_J({api:r,oldChildren:e.children()||[],newChildren:n||[],dataIndex:t,seriesModel:i,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=n[c],p=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),G1(r,p,t,f,i,e)):p.ignore=!0}for(var h=e.childCount()-1;h>=c;h--){var d=e.childAt(h);xJ(e,d,i)}}}function xJ(r,e,t){e&&fc(e,yn(r).option,t)}function _J(r){new gr(r.oldChildren,r.newChildren,AB,AB,r).add(LB).update(LB).remove(bJ).execute()}function AB(r,e){var t=r&&r.name;return t!=null?t:uJ+e}function LB(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;G1(t.api,i,t.dataIndex,a,t.seriesModel,t.group)}function bJ(r){var e=this.context,t=e.oldChildren[r];t&&fc(t,yn(t).option,e.seriesModel)}function RB(r){return r&&(r.pathData||r.d)}function SJ(r){return r&&(it(r,"pathData")||it(r,"d"))}function Y1(r){r.registerChartView(IB),r.registerSeriesModel(_B)}var kl=ot(),NB=tt,Z1=Z,wJ=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,i){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,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,n,e,t,a);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new K,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var p=ut(OB,t,f);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,t)}VB(s,t,!0),this._renderHandle(n)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),i=e.axis,n=i.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=sg(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,i,n){},r.prototype.createPointerEl=function(e,t,a,i){var n=t.pointer;if(n){var o=kl(e).pointerEl=new _t[n.type](NB(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,i){if(t.label){var n=kl(e).labelEl=new Dt(NB(t.label));e.add(n),zB(n,i)}},r.prototype.updatePointerEl=function(e,t,a){var i=kl(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),a(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,i){var n=kl(e).labelEl;n&&(n.setStyle(t.label.style),a(n,{x:t.label.x,y:t.label.y}),zB(n,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),i=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){i&&a.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Vn(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Kr(u.event)},onmousedown:Z1(this._onHandleDragMove,this,0,0),drift:Z1(this._onHandleDragMove,this),ondragend:Z1(this._onHandleDragEnd,this)}),a.add(i)),VB(i,t,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");z(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Qa(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){OB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,X1(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(a){this._dragging=!0;var i=this.updateHandleTransform(X1(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,a.stopAnimation(),a.attr(X1(i)),kl(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.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(),a=this._group,i=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Wn(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r})();function OB(r,e,t,a){BB(kl(t).lastProp,a)||(kl(t).lastProp=a,e?wt(t,a,r):(t.stopAnimation(),t.attr(a)))}function BB(r,e){if(et(r)&&et(e)){var t=!0;return T(e,function(a,i){t=t&&BB(r[i],a)}),!!t}else return r===e}function zB(r,e){r[e.get(["label","show"])?"show":"hide"]()}function X1(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function VB(r,e,t){var a=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=t)})}var hc=wJ;function dc(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function q1(r,e,t,a,i){var n=t.get("value"),o=j1(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=sn(s.get("padding")||0),u=s.getFont(),c=go(o,u),f=i.position,p=c.width+l[1]+l[3],h=c.height+l[0]+l[2],d=i.align;d==="right"&&(f[0]-=p),d==="center"&&(f[0]-=p/2);var v=i.verticalAlign;v==="bottom"&&(f[1]-=h),v==="middle"&&(f[1]-=h/2),TJ(f,p,h,a);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function TJ(r,e,t,a){var i=a.getWidth(),n=a.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,n)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function j1(r,e,t,a,i){r=e.scale.parse(r);var n=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Vu(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};T(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),W(o)?n=o.replace("{value}",n):$(o)&&(n=o(s))}return n}function Zp(r,e,t){var a=fe();return Sr(a,a,t.rotation),pr(a,a,t.position),vr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function Qg(r,e,t,a,i,n){var o=yr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),q1(e,a,i,n,{position:Zp(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function vc(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function ty(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function $1(r,e,t,a,i,n){return{cx:r,cy:e,r0:t,r:a,startAngle:i,endAngle:n,clockwise:!0}}var DJ=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),c=UB(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var p=dc(n),h=CJ[u](s,f,c);h.style=p,t.graphicKey=h.type,t.pointer=h}var d=Tp(l.getRect(),i);Qg(a,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=Tp(a.axis.grid.getRect(),a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Zp(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=UB(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=a[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var p=(u[1]+u[0])/2,h=[p,p];h[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:d[c]}},e})(hc);function UB(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var CJ={line:function(r,e,t){var a=vc([e,t[0]],[e,t[1]],FB(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:ty([e-a/2,t[0]],[a,i],FB(r))}}};function FB(r){return r.dim==="x"?0:1}var HB=DJ;var MJ=(function(r){I(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:N.color.border,width:1,type:"dashed"},shadowStyle:{color:N.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:N.color.neutral00,padding:[5,7,5,7],backgroundColor:N.color.accent60,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:N.color.accent40,throttle:40}},e})(St),GB=MJ;var eo=ot(),EJ=T;function ry(r,e,t){if(!Lt.node){var a=e.getZr();eo(a).records||(eo(a).records={}),AJ(a,e);var i=eo(a).records[r]||(eo(a).records[r]={});i.handler=t}}function AJ(r,e){if(eo(r).initialized)return;eo(r).initialized=!0,t("click",ut(WB,"click")),t("mousemove",ut(WB,"mousemove")),t("globalout",IJ);function t(a,i){r.on(a,function(n){var o=PJ(e);EJ(eo(r).records,function(s){s&&i(s,n,o.dispatchAction)}),LJ(o.pendings,e)})}}function LJ(r,e){var t=r.showTip.length,a=r.hideTip.length,i;t?i=r.showTip[t-1]:a&&(i=r.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function IJ(r,e,t){r.handler("leave",null,t)}function WB(r,e,t,a){e.handler(r,t,a)}function PJ(r){var e={showTip:[],hideTip:[]},t=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function Xp(r,e){if(!Lt.node){var t=e.getZr(),a=(eo(t).records||{})[r];a&&(eo(t).records[r]=null)}}var kJ=(function(r){I(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,a,i){var n=a.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";ry("axisPointer",i,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,a){Xp("axisPointer",a)},e.prototype.dispose=function(t,a){Xp("axisPointer",a)},e.type="axisPointer",e})(Ot),ZB=kJ;function qp(r,e){var t=[],a=r.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=Ga(n,r);if(o==null||o<0||z(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,p=u.dim,h=f==="x"||f==="radius"?1:0,d=n.mapDimension(p),v=[];v[h]=n.get(d,o),v[1-h]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(v)||[]}else t=l.dataToPoint(n.getValues(V(l.dimensions,function(g){return n.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var XB=ot();function K1(r,e,t){var a=r.currTrigger,i=[r.x,r.y],n=r,o=r.dispatchAction||Z(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){ay(i)&&(i=qp({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=ay(i),u=n.axesInfo,c=s.axesInfo,f=a==="leave"||ay(i),p={},h={},d={list:[],map:{}},v={showPointer:ut(NJ,h),showTooltip:ut(OJ,d)};T(s.coordSysMap,function(g,y){var x=l||g.containPoint(i);T(s.coordSysAxesInfo[y],function(_,b){var S=_.axis,w=UJ(u,_);if(!f&&x&&(!u||w)){var D=w&&w.value;D==null&&!l&&(D=S.pointToData(i)),D!=null&&qB(_,D,v,!1,p)}})});var m={};return T(c,function(g,y){var x=g.linkGroup;x&&!h[y]&&T(x.axesInfo,function(_,b){var S=h[b];if(_!==g&&S){var w=S.value;x.mapper&&(w=g.axis.scale.parse(x.mapper(w,jB(_),jB(g)))),m[g.key]=w}})}),T(m,function(g,y){qB(c[y],g,v,!0,p)}),zJ(h,c,p),VJ(d,i,r,o),BJ(c,o,t),p}}function qB(r,e,t,a,i){var n=r.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=RJ(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&O(i,s[0]),!a&&r.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function RJ(r,e){var t=e.axis,a=t.dim,i=r,n=[],o=Number.MAX_VALUE,s=-1;return T(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),f,p;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,r,t);p=h.dataIndices,f=h.nestestValue}else{if(p=l.indicesOfNearest(a,c[0],r,t.type==="category"?.5:null),!p.length)return;f=l.getData().get(c[0],p[0])}if(!(f==null||!isFinite(f))){var d=r-f,v=Math.abs(d);v<=o&&((v<o||d>=0&&s<0)&&(o=v,s=d,i=f,n.length=0),T(p,function(m){n.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:n,snapToValue:i}}function NJ(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function OJ(r,e,t,a){var i=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=qu(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:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function zJ(r,e,t){var a=t.axesInfo=[];T(e,function(i,n){var o=i.axisPointerModel.option,s=r[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function VJ(r,e,t,a){if(ay(e)||!r.list.length){a({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function BJ(r,e,t){var a=t.getZr(),i="axisPointerLastHighlights",n=XB(a)[i]||{},o=XB(a)[i]={};T(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&T(f.seriesDataIndices,function(p){var h=p.seriesIndex+" | "+p.dataIndex;o[h]=p})});var s=[],l=[];T(n,function(u,c){!o[c]&&l.push(u)}),T(o,function(u,c){!n[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 UJ(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function jB(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function ay(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Fi(r){da.registerAxisPointerClass("CartesianAxisPointer",HB),r.registerComponentModel(GB),r.registerComponentView(ZB),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=mN(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},K1)}function J1(r){Tt(cg),Tt(Fi)}var FJ=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(a),p=n.get("type");if(p&&p!=="none"){var h=dc(n),d=GJ[p](s,l,f,c);d.style=h,t.graphicKey=d.type,t.pointer=d}var v=n.get(["label","margin"]),m=HJ(a,i,n,l,v);q1(t,i,n,o,m)},e})(hc);function HJ(r,e,t,a,i){var n=e.axis,o=n.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,f;if(n.dim==="radius"){var p=fe();Sr(p,p,s),pr(p,p,[a.cx,a.cy]),u=vr([o,-i],p);var h=e.getModel("axisLabel").get("rotate")||0,d=yr.innerTextLayout(s,h*Math.PI/180,-1);c=d.textAlign,f=d.textVerticalAlign}else{var v=l[1];u=a.coordToPoint([v+i,o]);var m=a.cx,g=a.cy;c=Math.abs(u[0]-m)/v<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-g)/v<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var GJ={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:vc(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var i=Math.max(1,r.getBandWidth()),n=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:$1(e.cx,e.cy,a[0],a[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:$1(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},$B=FJ;var WJ=(function(r){I(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 a,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(a=n)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(St),KB=WJ;var Q1=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Yt).models[0]},e.type="polarAxis",e})(St);Jt(Q1,pn);var JB=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(Q1);var QB=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(Q1);var tD=(function(r){I(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e})(ur);tD.prototype.dataToRadius=ur.prototype.dataToCoord;tD.prototype.radiusToData=ur.prototype.coordToData;var tU=tD;var YJ=ot(),eD=(function(r){I(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=go(s==null?"":s+"",a.getFont(),"center","top"),f=Math.max(c.height,7),p=f/u;isNaN(p)&&(p=1/0);var h=Math.max(0,Math.floor(p)),d=YJ(t.model),v=d.lastAutoInterval,m=d.lastTickCount;return v!=null&&m!=null&&Math.abs(v-h)<=1&&Math.abs(m-o)<=1&&v>h?h=v:(d.lastTickCount=o,d.lastAutoInterval=h),h},e})(ur);eD.prototype.dataToAngle=ur.prototype.dataToCoord;eD.prototype.angleToData=ur.prototype.coordToData;var eU=eD;var rD=["radius","angle"],ZJ=(function(){function r(e){this.dimensions=rD,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new tU,this._angleAxis=new eU,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=[],a=this._angleAxis,i=this._radiusAxis;return a.scale.type===e&&t.push(a),i.scale.type===e&&t.push(i),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,a){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],a)},r.prototype.pointToData=function(e,t,a){a=a||[];var i=this.pointToCoord(e);return a[0]=this._radiusAxis.radiusToData(i[0],t),a[1]=this._angleAxis.angleToData(i[1],t),a},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var a=e[0],i=e[1]/180*Math.PI;return t[0]=Math.cos(i)*a+this.cx,t[1]=-Math.sin(i)*a+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var i=e.getExtent(),n=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,p=this.r,h=this.r0;return p!==h&&f-o<=p*p&&f+o>=h*h},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(e,t,a){var i=rU(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=rU(t);return i===this?this.pointToData(a):null},r})();function rU(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var aU=ZJ;function XJ(r,e,t){var a=e.get("center"),i=Zt(e,t).refContainer;r.cx=j(a[0],i.width)+i.x,r.cy=j(a[1],i.height)+i.y;var n=r.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:z(s)||(s=[0,s]);var l=[j(s[0],o),j(s[1],o)];n.inverse?n.setExtent(l[1],l[0]):n.setExtent(l[0],l[1])}function qJ(r,e){var t=this,a=t.getAngleAxis(),i=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();T(Bu(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),T(Bu(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),fn(a.scale,a.model),fn(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function jJ(r){return r.mainType==="angleAxis"}function iU(r,e){var t;if(r.type=e.get("type"),r.scale=Bo(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),jJ(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,i)}e.axis=r,r.model=e}var $J={dimensions:rD,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,i){var n=new aU(i+"");n.update=qJ;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");iU(o,l),iU(s,u),XJ(n,a,e),t.push(n),a.coordinateSystem=n,n.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=a.getReferringComponents("polar",Yt).models[0];a.coordinateSystem=i.coordinateSystem}}),t}},nU=$J;var KJ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function iy(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function ny(r){var e=r.getRadiusAxis();return e.inverse?0:1}function oU(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 JJ=(function(r){I(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,a){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=V(i.getViewLabels(),function(c){c=tt(c);var f=i.scale,p=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(p),c});oU(u),oU(s),T(KJ,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&QJ[c](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e})(da),QJ={axisLine:function(r,e,t,a,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=ny(t),f=c?0:1,p,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[f]===0?p=new _t[h]({shape:{cx:t.cx,cy:t.cy,r:n[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):p=new Zs({shape:{cx:t.cx,cy:t.cy,r:n[c],r0:n[f]},style:o.getLineStyle(),z2:1,silent:!0}),p.style.fill=null,r.add(p)},axisTick:function(r,e,t,a,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[ny(t)],u=V(a,function(c){return new le({shape:iy(t,[l,l+s],c.coord)})});r.add(Mr(u,{style:J(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,i,n){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[ny(t)],c=[],f=0;f<i.length;f++)for(var p=0;p<i[f].length;p++)c.push(new le({shape:iy(t,[u,u+l],i[f][p].coord)}));r.add(Mr(c,{style:J(s.getModel("lineStyle").getLineStyle(),J(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,a,i,n,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");T(o,function(f,p){var h=l,d=f.tickValue,v=n[ny(t)],m=t.coordToPoint([v+u,f.coord]),g=t.cx,y=t.cy,x=Math.abs(m[0]-g)/v<.3?"center":m[0]>g?"left":"right",_=Math.abs(m[1]-y)/v<.3?"middle":m[1]>y?"top":"bottom";if(s&&s[d]){var b=s[d];et(b)&&b.textStyle&&(h=new Mt(b.textStyle,l,l.ecModel))}var S=new Dt({silent:yr.isLabelSilent(e),style:Gt(h,{x:m[0],y:m[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:x,verticalAlign:_})});if(r.add(S),Er({el:S,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return S.isTruncated},value:f.rawLabel,tickIndex:p}}),c){var w=yr.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=f.rawLabel,nt(S).eventData=w}},this)},splitLine:function(r,e,t,a,i,n){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<a.length;f++){var p=u++%l.length;c[p]=c[p]||[],c[p].push(new le({shape:iy(t,n,a[f].coord)}))}for(var f=0;f<c.length;f++)r.add(Mr(c[f],{style:J({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,a,i,n){if(i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new le({shape:iy(t,n,i[u][c].coord)}));r.add(Mr(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,a,i,n){if(a.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,p=-a[0].coord*f,h=Math.min(n[0],n[1]),d=Math.max(n[0],n[1]),v=e.get("clockwise"),m=1,g=a.length;m<=g;m++){var y=m===g?a[0].coord:a[m].coord,x=u++%l.length;c[x]=c[x]||[],c[x].push(new De({shape:{cx:t.cx,cy:t.cy,r0:h,r:d,startAngle:p,endAngle:-y*f,clockwise:v},silent:!0})),p=-y*f}for(var m=0;m<c.length;m++)r.add(Mr(c[m],{style:J({fill:l[m%l.length]},s.getAreaStyle()),silent:!0}))}}},sU=JJ;var tQ=["splitLine","splitArea","minorSplitLine"],eQ=(function(r){I(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,a,i){if(this.group.removeAll(),!!t.get("show")){var n=this._axisGroup,o=this._axisGroup=new K;this.group.add(o);var s=t.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),f=s.getMinorTicksCoords(),p=u.getExtent()[0],h=s.getExtent(),d=aQ(l,t,p),v=new yr(t,i,d);v.build(),o.add(v.group),zn(n,o,t),T(tQ,function(m){t.get([m,"show"])&&!s.scale.isBlank()&&rQ[m](this.group,t,l,p,h,c,f)},this)}},e.type="radiusAxis",e})(da),rQ={splitLine:function(r,e,t,a,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),f=Math.PI/180,p=c.getExtent(),h=Math.abs(p[1]-p[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var d=[],v=0;v<n.length;v++){var m=u++%l.length;d[m]=d[m]||[],d[m].push(new _t[h]({shape:{cx:t.cx,cy:t.cy,r:Math.max(n[v].coord,0),startAngle:-p[0]*f,endAngle:-p[1]*f,clockwise:c.inverse}}))}for(var v=0;v<d.length;v++)r.add(Mr(d[v],{style:J({stroke:l[v%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,a,i,n,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 Or({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(Mr(u,{style:J({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,a,i,n){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=n[0].coord,p=1;p<n.length;p++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new De({shape:{cx:t.cx,cy:t.cy,r0:f,r:n[p].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=n[p].coord}for(var p=0;p<c.length;p++)r.add(Mr(c[p],{style:J({fill:l[p%l.length]},s.getAreaStyle()),silent:!0}))}}};function aQ(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}}var lU=eQ;function uU(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function cU(r,e){return e.dim+r.model.componentIndex}function iQ(r,e,t){var a={},i=nQ(At(e.getSeriesByType(r),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=cU(s,l),c=uU(n),f=i[u][c],p=f.offset,h=f.width,d=s.getOtherAxis(l),v=n.coordinateSystem.cx,m=n.coordinateSystem.cy,g=n.get("barMinHeight")||0,y=n.get("barMinAngle")||0;a[c]=a[c]||[];for(var x=o.mapDimension(d.dim),_=o.mapDimension(l.dim),b=Ca(o,x),S=l.dim!=="radius"||!n.get("roundCap",!0),w=d.model,D=w.get("startValue"),C=d.dataToCoord(D||0),M=0,E=o.count();M<E;M++){var L=o.get(x,M),A=o.get(_,M),P=L>=0?"p":"n",R=C;b&&(a[c][A]||(a[c][A]={p:C,n:C}),R=a[c][A][P]);var k=void 0,B=void 0,U=void 0,F=void 0;if(d.dim==="radius"){var H=d.dataToCoord(L)-C,G=l.dataToCoord(A);Math.abs(H)<g&&(H=(H<0?-1:1)*g),k=R,B=R+H,U=G-p,F=U-h,b&&(a[c][A][P]=B)}else{var Y=d.dataToCoord(L,S)-C,rt=l.dataToCoord(A);Math.abs(Y)<y&&(Y=(Y<0?-1:1)*y),k=rt+p,B=k+h,U=R,F=R+Y,b&&(a[c][A][P]=F)}o.setItemLayout(M,{cx:v,cy:m,r0:k,r:B,startAngle:-U*Math.PI/180,endAngle:-F*Math.PI/180,clockwise:U>=F})}}})}function nQ(r){var e={};T(r,function(a,i){var n=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=cU(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},p=f.stacks;e[l]=f;var h=uU(a);p[h]||f.autoWidthCount++,p[h]=p[h]||{width:0,maxWidth:0};var d=j(a.get("barWidth"),c),v=j(a.get("barMaxWidth"),c),m=a.get("barGap"),g=a.get("barCategoryGap");d&&!p[h].width&&(d=Math.min(f.remainedWidth,d),p[h].width=d,f.remainedWidth-=d),v&&(p[h].maxWidth=v),m!=null&&(f.gap=m),g!=null&&(f.categoryGap=g)});var t={};return T(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=j(a.categoryGap,o),l=j(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),T(n,function(v,m){var g=v.maxWidth;g&&g<f&&(g=Math.min(g,u),v.width&&(g=Math.min(g,v.width)),u-=g,v.width=g,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var p=0,h;T(n,function(v,m){v.width||(v.width=f),h=v,p+=v.width*(1+l)}),h&&(p-=h.width*l);var d=-p/2;T(n,function(v,m){t[i][m]=t[i][m]||{offset:d,width:v.width},d+=v.width*(1+l)})}),t}var fU=iQ;var oQ={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},sQ={splitNumber:5},lQ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e})(Ot);function aD(r){Tt(Fi),da.registerAxisPointerClass("PolarAxisPointer",$B),r.registerCoordinateSystem("polar",nU),r.registerComponentModel(KB),r.registerComponentView(lQ),Ui(r,"angle",JB,oQ),Ui(r,"radius",QB,sQ),r.registerComponentView(sU),r.registerComponentView(lU),r.registerLayout(ut(fU,"bar"))}function jp(r,e){e=e||{};var t=r.coordinateSystem,a=r.axis,i={},n=a.position,o=a.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]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[n],r.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),de(e.labelInside,r.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var p=r.get(["axisLabel","rotate"]);return i.labelRotate=n==="top"?-p:p,i.z2=1,i}var uQ=["splitArea","splitLine","breakArea"],cQ=(function(r){I(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,a,i,n){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new K;var l=jp(t),u=new yr(t,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),T(uQ,function(c){t.get([c,"show"])&&fQ[c](this,this.group,this._axisGroup,t,i)},this),zn(s,this._axisGroup,t),r.prototype.render.call(this,t,a,i,n)},e.prototype.remove=function(){ug(this)},e.type="singleAxis",e})(da),fQ={splitLine:function(r,e,t,a,i){var n=a.axis;if(!n.scale.isBlank()){var o=a.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=a.coordinateSystem.getRect(),f=n.isHorizontal(),p=[],h=0,d=n.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],m=[],g=0;g<d.length;++g){var y=n.toGlobalCoord(d[g].coord);f?(v[0]=y,v[1]=c.y,m[0]=y,m[1]=c.y+c.height):(v[0]=c.x,v[1]=y,m[0]=c.x+c.width,m[1]=y);var x=new le({shape:{x1:v[0],y1:v[1],x2:m[0],y2:m[1]},silent:!0});On(x.shape,u);var _=h++%l.length;p[_]=p[_]||[],p[_].push(x)}for(var b=s.getLineStyle(["color"]),g=0;g<p.length;++g)e.add(Mr(p[g],{style:J({stroke:l[g%l.length]},b),silent:!0}))}},splitArea:function(r,e,t,a,i){lg(r,t,a,a)},breakArea:function(r,e,t,a,i){var n=$n(),o=a.axis.scale;n&&o.type!=="ordinal"&&n.rectCoordBuildBreakAxis(e,r,a,a.coordinateSystem.getRect(),i)}},hU=cQ;var dU=(function(r){I(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}},jitter:0,jitterOverlap:!0,jitterMargin:2},e})(St);Jt(dU,pn.prototype);var oy=dU;var pQ=(function(r){I(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.type=n||"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,a){return this.coordinateSystem.pointToData(t)[0]},e})(ur),vU=pQ;var iD=["single"],hQ=(function(){function r(e,t,a){this.type="single",this.dimension="single",this.dimensions=iD,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var i=this.dimension,n=new vU(i,Bo(e),[0,0],e.get("type"),e.get("position")),o=n.type==="category";n.onBand=o&&e.get("boundaryGap"),n.inverse=e.get("inverse"),n.orient=e.get("orient"),e.axis=n,n.model=e,n.coordinateSystem=this,this._axis=n},r.prototype.update=function(e,t){e.eachSeries(function(a){if(a.coordinateSystem===this){var i=a.getData();T(i.mapDimensionsAll(this.dimension),function(n){this._axis.scale.unionExtentFromData(i,n)},this),fn(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){var a=Zt(e,t).refContainer;this._rect=Bt(e.getBoxLayoutParams(),a),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,a=t.isHorizontal(),i=a?[0,e.width]:[0,e.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),this._updateAxisTransform(t,a?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var a=e.getExtent(),i=a[0]+a[1],n=e.isHorizontal();e.toGlobalCoord=n?function(o){return o+t}:function(o){return i-o+t},e.toLocalCoord=n?function(o){return o-t}:function(o){return i-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(),a=this.getAxis(),i=a.orient;return i==="horizontal"?a.contain(a.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,a){a=a||[];var i=this.getAxis();return a[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(e,t,a){var i=this.getAxis(),n=this.getRect();a=a||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[o]=i.toGlobalCoord(i.dataToCoord(+e)),a[1-o]=o===0?n.y+n.height/2:n.x+n.width/2,a},r.prototype.convertToPixel=function(e,t,a){var i=mU(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=mU(t);return i===this?this.pointToData(a):null},r})();function mU(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var gU=hQ;function dQ(r,e){var t=[];return r.eachComponent("singleAxis",function(a,i){var n=new gU(a,r,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,t.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",Yt).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),t}var vQ={create:dQ,dimensions:iD},yU=vQ;var xU=["x","y"],mQ=["width","height"],gQ=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.coordinateSystem,u=nD(l,1-sy(s)),c=l.dataToPoint(a)[0],f=n.get("type");if(f&&f!=="none"){var p=dc(n),h=yQ[f](s,c,u);h.style=p,t.graphicKey=h.type,t.pointer=h}var d=jp(i);Qg(a,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=jp(a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Zp(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.coordinateSystem,l=sy(o),u=nD(s,l),c=[t.x,t.y];c[l]+=a[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=nD(s,1-l),p=(f[1]+f[0])/2,h=[p,p];return h[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e})(hc),yQ={line:function(r,e,t){var a=vc([e,t[0]],[e,t[1]],sy(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:ty([e-a/2,t[0]],[a,i],sy(r))}}};function sy(r){return r.isHorizontal()?0:1}function nD(r,e){var t=r.getRect();return[t[xU[e]],t[xU[e]]+t[mQ[e]]]}var _U=gQ;var xQ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(Ot);function oD(r){Tt(Fi),da.registerAxisPointerClass("SingleAxisPointer",_U),r.registerComponentView(xQ),r.registerComponentView(hU),r.registerComponentModel(oy),Ui(r,"single",oy,oy.defaultOption),r.registerCoordinateSystem("single",yU)}var _Q=(function(r){I(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,a,i){var n=la(t);r.prototype.init.apply(this,arguments),bU(t,n)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),bU(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:N.color.axisLine,width:1,type:"solid"}},itemStyle:{color:N.color.neutral00,borderWidth:1,borderColor:N.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:N.size.s,color:N.color.secondary},monthLabel:{show:!0,position:"start",margin:N.size.s,align:"center",formatter:null,color:N.color.secondary},yearLabel:{show:!0,position:null,margin:N.size.xl,formatter:null,color:N.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(St);function bU(r,e){var t=r.cellSize,a;z(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var i=V([0,1],function(n){return dI(e,n)&&(a[n]="auto"),a[n]!=null&&a[n]!=="auto"});mr(r,e,{type:"box",ignoreSize:i})}var SU=_Q;var bQ=(function(r){I(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,a,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,a,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=a.start.time;u<=a.end.time;u=n.getNextNDay(u,1).time){var c=n.dataToCalendarLayout([u],!1).tl,f=new ht({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(t,a,i,n){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=a.start,p=0;f.time<=a.end.time;p++){d(f.formatedDate),p===0&&(f=s.getDateInfo(a.start.y+"-"+a.start.m));var h=f.date;h.setMonth(h.getMonth()+1),f=s.getDateInfo(h)}d(s.getNextNDay(a.end.time,1).formatedDate);function d(v){o._firstDayOfMonth.push(s.getDateInfo(v)),o._firstDayPoints.push(s.dataToCalendarLayout([v],!1).tl);var m=o._getLinePointsOfOneWeek(t,v,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,n)},e.prototype._getEdgesPoints=function(t,a,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-a/2,n[1][o]=n[1][o]+a/2,n},e.prototype._drawSplitline=function(t,a,i){var n=new he({z2:20,shape:{points:t},style:a});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,a,i){for(var n=t.coordinateSystem,o=n.getDateInfo(a),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),c=n.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return W(t)&&t?uI(t,a):$(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,i,n,o){var s=a[0],l=a[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(n==="left"||n==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="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,p=i==="horizontal"?0:1,h={top:[c,u[p][1]],bottom:[c,u[1-p][1]],left:[u[1-p][0],f],right:[u[p][0],f]},d=a.start.y;+a.end.y>+a.start.y&&(d=d+"-"+a.end.y);var v=o.get("formatter"),m={start:a.start.y,end:a.end.y,nameMap:d},g=this._formatterLabel(v,m),y=new Dt({z2:30,style:Gt(o,{text:g}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,h[l],i,l,s)),n.add(y)}},e.prototype._monthTextPositionControl=function(t,a,i,n,o){var s="left",l="top",u=t[0],c=t[1];return i==="horizontal"?(c=c+o,a&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),n==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,i,n){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||W(s))&&(s&&(a=Pf(s)||a),s=a.get(["time","monthAbbr"])||[]);var p=u==="start"?0:1,h=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=c==="center",v=o.get("silent"),m=0;m<f[p].length-1;m++){var g=f[p][m].slice(),y=this._firstDayOfMonth[m];if(d){var x=this._firstDayPoints[m];g[h]=(x[h]+f[0][m+1][h])/2}var _=o.get("formatter"),b=s[+y.m-1],S={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:b},w=this._formatterLabel(_,S),D=new Dt({z2:30,style:O(Gt(o,{text:w}),this._monthTextPositionControl(g,d,i,u,l)),silent:v});n.add(D)}}},e.prototype._weekTextPositionControl=function(t,a,i,n,o){var s="center",l="middle",u=t[0],c=t[1],f=i==="start";return a==="horizontal"?(u=u+n+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+n+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,a,i,n,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"),p=l.getFirstDayOfWeek();if(!c||W(c)){c&&(a=Pf(c)||a);var h=a.get(["time","dayOfWeekShort"]);c=h||V(a.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var d=l.getNextNDay(i.end.time,7-i.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];f=j(f,Math.min(v[1],v[0])),u==="start"&&(d=l.getNextNDay(i.start.time,-(7+i.fweek)).time,f=-f);for(var m=s.get("silent"),g=0;g<7;g++){var y=l.getNextNDay(d,g),x=l.dataToCalendarLayout([y.time],!1).center,_=g;_=Math.abs((g+p)%7);var b=new Dt({z2:30,style:O(Gt(s,{text:c[_]}),this._weekTextPositionControl(x,n,u,f,v)),silent:m});o.add(b)}}},e.type="calendar",e})(Ot),wU=bQ;var sD=864e5,SQ=(function(){function r(e,t,a){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e,this._update(t,a)}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=Fa(e);var t=e.getFullYear(),a=e.getMonth()+1,i=a<10?"0"+a:""+a,n=e.getDate(),o=n<10?"0"+n:""+n,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+i+"-"+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 a=this._rangeInfo.weeks||1,i=["width","height"],n=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[a,7]:[7,a];T([0,1],function(f){c(n,f)&&(o[i[f]]=n[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Bt(o,l);T([0,1],function(f){c(n,f)||(n[f]=u[i[f]]/s[f])});function c(f,p){return f[p]!=null&&f[p]!=="auto"}this._sw=n[0],this._sh=n[1]},r.prototype.dataToPoint=function(e,t,a){a=a||[],z(e)&&(e=e[0]),t==null&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,o=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+sD))return a[0]=a[1]=NaN,a;var s=i.day,l=this._getRangeInfo([n.start.time,o]).nthWeek;return this._orient==="vertical"?(a[0]=this._rect.x+s*this._sw+this._sw/2,a[1]=this._rect.y+l*this._sh+this._sh/2):(a[0]=this._rect.x+l*this._sw+this._sw/2,a[1]=this._rect.y+s*this._sh+this._sh/2),a},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToLayout=function(e,t,a){a=a||{};var i=a.rect=a.rect||{},n=a.contentRect=a.contentRect||{},o=this.dataToPoint(e,t);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,at.copy(n,i),qa(n,this._lineWidth/2,!0,!0),a},r.prototype.dataToCalendarLayout=function(e,t){var a=this.dataToPoint(e,t);return{center:a,tl:[a[0]-this._sw/2,a[1]-this._sh/2],tr:[a[0]+this._sw/2,a[1]-this._sh/2],br:[a[0]+this._sw/2,a[1]+this._sh/2],bl:[a[0]-this._sw/2,a[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,a=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(a,t-1,i):this._getDateByWeeksAndDay(t,a-1,i)},r.prototype.convertToPixel=function(e,t,a){var i=lD(t);return i===this?i.dataToPoint(a):null},r.prototype.convertToLayout=function(e,t,a){var i=lD(t);return i===this?i.dataToLayout(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=lD(t);return i===this?i.pointToData(a):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(z(e)&&e.length===1&&(e=e[0]),z(e))t=e;else{var a=e.toString();if(/^\d{4}$/.test(a)&&(t=[a+"-01-01",a+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(a)){var i=this.getDateInfo(a),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(a)&&(t=[a,a])}if(!t)return 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])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var i=Math.floor(t[1].time/sD)-Math.floor(t[0].time/sD)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var c=Math.floor((i+t[0].day+6)/7),f=a?-c+1:c-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var i=this._getRangeInfo(a);if(e>i.weeks||e===0&&t<i.fweek||e===i.weeks&&t>i.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachComponent(function(i,n){ln({targetModel:n,coordSysType:"calendar",coordSysProvider:wv})}),a},r.dimensions=["time","value"],r})();function lD(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var TU=SQ;function uD(r){r.registerComponentModel(SU),r.registerComponentView(wU),r.registerCoordinateSystem("calendar",TU)}var Hi={level:1,leaf:2,nonLeaf:3},Gi={none:0,all:1,body:2,corner:3};function cD(r,e,t){var a=e[bt[t]].getCell(r);return!a&&yt(r)&&r<0&&(a=e[bt[1-t]].getUnitLayoutInfo(t,Math.round(r))),a}function ly(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function uy(r,e,t,a,i){DU(r[0],e,i,t,a,0),DU(r[1],e,i,t,a,1)}function DU(r,e,t,a,i,n){r[0]=1/0,r[1]=-1/0;var o=a[n],s=z(o)?o:[o],l=s.length,u=!!t;if(l>=1?(CU(r,e,s,u,i,n,0),l>1&&CU(r,e,s,u,i,n,l-1)):r[0]=r[1]=NaN,u){var c=-i[bt[1-n]].getLocatorCount(n),f=i[bt[n]].getLocatorCount(n)-1;t===Gi.body?c=_e(0,c):t===Gi.corner&&(f=wr(-1,f)),f<c&&(c=f=NaN),Me(r[0])&&(r[0]=c),Me(r[1])&&(r[1]=f),r[0]=_e(wr(r[0],f),c),r[1]=_e(wr(r[1],f),c)}}function CU(r,e,t,a,i,n,o){var s=cD(t[o],i,n);if(!s){r[0]=r[1]=NaN;return}var l=s.id[bt[n]],u=l,c=DQ(s);c&&(u+=c.span[bt[n]]-1),r[0]=wr(r[0],l,u),r[1]=_e(r[1],l,u)}function $p(r,e){return Me(r[e][0])||Me(r[e][1])}function fD(r,e,t,a){e=e||wQ;for(var i=0;i<a;i++)e[i]=!1;for(;;){for(var n=!1,i=0;i<a;i++){var o=t[i];!e[i]&&o.cellMergeOwner&&TQ(r,o.locatorRange)&&(e[i]=!0,n=!0)}if(!n)break}}var wQ=[];function TQ(r,e){return!MU(r[0],e[0])||!MU(r[1],e[1])?!1:(r[0][0]=wr(r[0][0],e[0][0]),r[0][1]=_e(r[0][1],e[0][1]),r[1][0]=wr(r[1][0],e[1][0]),r[1][1]=_e(r[1][1],e[1][1]),!0)}function MU(r,e){return r[1]>=e[0]&&r[0]<=e[1]}function pD(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function EU(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function hD(r,e,t,a){var i=cD(e[a][0],t,a),n=cD(e[a][1],t,a);r[bt[a]]=r[be[a]]=NaN,i&&n&&(r[bt[a]]=i.xy,r[be[a]]=n.xy+n.wh-i.xy)}function mc(r,e,t,a){return r[bt[e]]=t,r[bt[1-e]]=a,r}function DQ(r){return r&&(r.type===Hi.leaf||r.type===Hi.nonLeaf)?r:null}function Rl(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var dD=(function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=CQ(e);var a=t.get("data",!0);a!=null&&!z(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,a=t._cells,i=t._levels,n=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,c,f){var p=0;return u&&T(u,function(h,d){var v=!1,m;W(h)?m={value:h}:et(h)?(m=h,h.value!=null&&!W(h.value)&&(v=!0,m={value:null})):(m={value:null},h!=null&&(v=!0));var g={type:Hi.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new pt,span:mc(new pt,t.dimIdx,1,1),option:m,xy:NaN,wh:NaN,dim:t,rect:Rl()};o++,(n[c]||(n[c]=[])).push(g),i[f]||(i[f]={type:Hi.level,xy:NaN,wh:NaN,option:null,id:new pt,dim:t});var y=s(m.children,c,f+1),x=Math.max(1,y);g.span[bt[t.dimIdx]]=x,p+=x,c+=x}),p}function l(){for(var u=[];a.length<o;)for(var c=0;c<n.length;c++){var f=n[c].pop();if(f){f.ordinal=u.length;var p=f.option.value;u.push(p),a.push(f),t._uniqueValueGen.calcDupBase(p)}}t._uniqueValueGen.ensureValueUnique(u,a);var h=t._ordinalMeta=new zo({categories:u,needCollect:!1,deduplication:!1});t._scale=new Xn({ordinalMeta:h});for(var d=0;d<t._leavesCount;d++){var v=t._cells[d];v.type=Hi.leaf,v.span[bt[1-t.dimIdx]]=t._levels.length-v.level}t._initCellsId(),t._initLevelIdOptions()}},r.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:Hi.level,xy:NaN,wh:NaN,option:null,id:new pt,dim:e}],e._initLevelIdOptions();var t=e._ordinalMeta=new zo({needCollect:!0,deduplication:!0,onCollect:function(a,i){var n=e._cells[i]={type:Hi.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new pt,span:mc(new pt,e.dimIdx,1,1),option:{value:a+""},xy:NaN,wh:NaN,dim:e,rect:Rl()};e._leavesCount++,e._setCellId(n)}});e._scale=new Xn({ordinalMeta:t})},r.prototype._setCellId=function(e){var t=this._levels.length,a=this.dimIdx;mc(e.id,a,e.firstLeafLocator,e.level-t)},r.prototype._initCellsId=function(){var e=this._levels.length,t=this.dimIdx;T(this._cells,function(a){mc(a.id,t,a.firstLeafLocator,a.level-e)})},r.prototype._initLevelIdOptions=function(){var e=this._levels.length,t=this.dimIdx,a=this._model.get("levels",!0);a=z(a)?a:[],T(this._levels,function(i,n){mc(i.id,t,0,n-e),i.option=a[n]})},r.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},r.prototype.resetLayoutIterator=function(e,t,a,i){if(e=e||new Si,t===this.dimIdx){var n=this._leavesCount,o=a!=null?Math.max(0,a):0;i=i!=null?Math.min(i,n):n,e.reset(this._cells,o,o+i)}else{var n=this._levels.length,o=a!=null?Math.max(0,a+n):0;i=i!=null?Math.min(i,n):n,e.reset(this._levels,o,o+i)}return e},r.prototype.resetCellIterator=function(e){return(e||new Si).reset(this._cells,0)},r.prototype.resetLevelIterator=function(e){return(e||new Si).reset(this._levels,0)},r.prototype.getLayout=function(e,t,a){var i=this.getUnitLayoutInfo(t,a);e[bt[t]]=i?i.xy:NaN,e[be[t]]=i?i.wh:NaN},r.prototype.getUnitLayoutInfo=function(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]},r.prototype.getCell=function(e){var t=this._scale.parse(e);return Me(t)?void 0:this._cells[t]},r.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r})();function CQ(r){var e=r.toUpperCase(),t=new RegExp("^"+e+"([0-9]+)$"),a=0;function i(s){var l;s!=null&&(l=s.match(t))&&(a=_e(a,+l[1]+1))}function n(){return""+e+a++}function o(s,l){for(var u=q(),c=0;c<s.length;c++){var f=s[c];(f==null||u.get(f)!=null)&&(s[c]=f=n(),l[c].option=J({value:f},l[c].option)),u.set(f,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var mD=(function(){function r(e,t,a){this._model=t,this._dims=a,this._kind=e,this._cellMergeOwnerList=[]}return r.prototype._ensureCellMap=function(){var e=this,t=e._cellMap;return t||(t=e._cellMap=q(),a()),t;function a(){var n=[],o=e._model.getShallow("data");o&&!z(o)&&(o=null),T(o,function(d,v){if(!(!et(d)||!z(d.coord))){var m=ly([]),g=null;if(uy(m,g,d.coord,e._dims,d.coordClamp?Gi[e._kind]:Gi.none),!($p(m,0)||$p(m,1))){var y=d&&d.mergeCells,x={id:new pt,span:new pt,locatorRange:m,option:d,cellMergeOwner:y};pD(x,m),n.push(x)}}});for(var s=[],l=0;l<n.length;l++){var u=n[l];if(u.cellMergeOwner){var c=u.locatorRange;fD(c,s,n,l);for(var f=0;f<l;f++)s[f]&&(n[f].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var p=O({},u.option);p.coord=null;var h={id:new pt,span:new pt,locatorRange:c,option:p,cellMergeOwner:!0};pD(h,c),n.push(h)}}}T(n,function(d){var v=i(d.id.x,d.id.y);if(d.cellMergeOwner&&(v.cellMergeOwner=!0,v.span=d.span,v.locatorRange=d.locatorRange,v.spanRect=Rl(),e._cellMergeOwnerList.push(v)),!(!d.cellMergeOwner&&!d.option))for(var m=0;m<d.span.y;m++)for(var g=0;g<d.span.x;g++){var y=i(d.id.x+g,d.id.y+m);y.option=d.option,d.cellMergeOwner&&(y.inSpanOf=v)}})}function i(n,o){var s=AU(n,o),l=t.get(s);return l||(l=t.set(s,{id:new pt(n,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},r.prototype.getCell=function(e){return this._ensureCellMap().get(AU(e[0],e[1]))},r.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},r.prototype.expandRangeByCellMerge=function(e){if(!$p(e,0)&&!$p(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){vD[0]=e[0][0],vD[1]=e[1][0];var t=this.getCell(vD),a=t&&t.inSpanOf;if(a){EU(e,a.locatorRange);return}}var i=this._cellMergeOwnerList;fD(e,null,i,i.length)},r})();var vD=[];function AU(r,e){return r+"|"+e}var gD={show:!0,color:N.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function yD(r){return{color:"none",borderWidth:1,borderColor:r?"none":N.color.borderTint}}var LU={show:!0,label:gD,itemStyle:yD(!1),silent:void 0,dividerLineStyle:{width:1,color:N.color.border}},MQ={label:gD,itemStyle:yD(!1),silent:void 0},EQ={label:gD,itemStyle:yD(!0),silent:void 0},AQ={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:LU,y:LU,body:MQ,corner:EQ,backgroundStyle:{color:"none",borderColor:N.color.axisLine,borderWidth:1}},LQ=(function(r){I(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._dimModels={x:new IU(this.get("x",!0)||{}),y:new IU(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var a=t.x.dim=new dD("x",t.x),i=t.y.dim=new dD("y",t.y),n={x:a,y:i};this._body=new mD("body",new Mt(this.getShallow("body")),n),this._corner=new mD("corner",new Mt(this.getShallow("corner")),n)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=AQ,e})(St),IU=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e})(Mt);var PU=LQ;var cy=Math.round,IQ=0,PQ=99,kQ={normal:25,special:100},RQ={normal:50,special:125},NQ=(function(r){I(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,a){this.group.removeAll();var i=this.group,n=t.coordinateSystem,o=n.getRect(),s=t.getDimensionModel("x"),l=t.getDimensionModel("y"),u=s.dim,c=l.dim;OQ(i,t,a),zQ(i,t,u,c,a);var f=t.getShallow("borderZ2",!0),p=Q(f,PQ),h=p-1,d=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);d.lineWidth=0;var v=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);v.fill="none";var m=xD(o.clone(),d,IQ),g=xD(o.clone(),v,p);m.silent=!0,g.silent=!0,i.add(m),i.add(g);var y=u.getUnitLayoutInfo(0,0),x=c.getUnitLayoutInfo(1,0);y&&x&&(u.shouldShow()&&i.add(kU({x1:o.x,y1:x.xy,x2:o.x+o.width,y2:x.xy},s.getModel("dividerLineStyle").getLineStyle(),h)),c.shouldShow()&&i.add(kU({x1:y.xy,y1:o.y,x2:y.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),h)))},e.type="matrix",e})(Ot);function OQ(r,e,t){a(0),a(1);function a(i){var n=e.getDimensionModel(bt[i]),o=n.dim;if(o.shouldShow())for(var s=n.getModel("itemStyle"),l=n.getModel("label"),u=e.getShallow("tooltip",!0),c=[],f=o.resetCellIterator();f.next();){var p=f.item,h={};at.copy(h,p.rect),Yc(c,p.id.x,p.id.y),RU(c,e,r,t,p.option,s,l,n,h,p.option.value,RQ,u)}}}function zQ(r,e,t,a,i){n("body",e.getBody(),t,a),t.shouldShow()&&a.shouldShow()&&n("corner",e.getCorner(),a,t);function n(o,s,l,u){var c=new Mt(e.getShallow(o,!0)),f=c.getModel("itemStyle"),p=c.getModel("label"),h=new Si,d=new Si,v=[],m=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(d,1);d.next();)for(l.resetLayoutIterator(h,0);h.next();){var g=h.item,y=d.item;Yc(v,g.id.x,y.id.y);var x=s.getCell(v);if(!(x&&x.inSpanOf&&x.inSpanOf!==x)){var _={};x&&x.span?at.copy(_,x.spanRect):(g.dim.getLayout(_,0,v[0]),y.dim.getLayout(_,1,v[1]));var b=x?x.option:null;RU(v,e,r,i,b,f,p,c,_,b?b.value:null,kQ,m)}}}}function RU(r,e,t,a,i,n,o,s,l,u,c,f){var p;fy.option=i?i.itemStyle:null,fy.parentModel=n,gc.option=i,gc.parentModel=s;var h=Q(gc.getShallow("z2"),i&&i.itemStyle?c.special:c.normal),d=f&&f.show,v=xD(l,fy.getItemStyle(),h);t.add(v);var m=gc.get("cursor");m!=null&&v.attr("cursor",m);var g;if(u!=null){var y=u+"";if(yc.option=i?i.label:null,yc.parentModel=o,yc.ecModel=a,$t(v,{normal:yc},{defaultText:y,autoOverflowArea:!0,layoutRect:tt(v.shape)}),g=v.getTextContent(),g){g.z2=h+1;var x=g.style;if(x&&x.overflow&&x.overflow!=="none"&&x.lineOverflow){var _={};at.copy(_,l),qa(_,(((p=v.style)===null||p===void 0?void 0:p.lineWidth)||0)/2,!0,!0),v.updateInnerText(),g.getLocalTransform(py),Fe(py,py),at.applyTransform(_,_,py),g.setClipPath(new ht({shape:_}))}}Er({el:v,componentModel:e,itemName:y,itemTooltipOption:f,formatterParamsExtra:{xyLocator:r.slice()}})}if(g){var b=yc.get("silent");b==null&&(b=!d),g.silent=b,g.ignoreHostSilent=!0}var S=gc.get("silent");S==null&&(S=!v.style||v.style.fill==="none"||!v.style.fill),v.silent=S,Td(gc),Td(fy),Td(yc)}var gc=new Mt,fy=new Mt,yc=new Mt,py=[];function xD(r,e,t){var a=e.lineWidth;if(a){var i=r.x+r.width,n=r.y+r.height;r.x=Nr(r.x,a,!0),r.y=Nr(r.y,a,!0),r.width=Nr(i,a,!0)-r.x,r.height=Nr(n,a,!0)-r.y}return new ht({shape:r,style:e,z2:t})}function kU(r,e,t){var a=e.lineWidth;return a&&(cy(r.x1*2)===cy(r.x2*2)&&(r.x1=r.x2=Nr(r.x1,a,!0)),cy(r.y1*2)===cy(r.y2*2)&&(r.y1=r.y2=Nr(r.y1,a,!0))),new le({shape:r,style:e,silent:!0,z2:t})}var NU=NQ;var VQ=(function(){function r(e,t,a){this.dimensions=r.dimensions,this.type="matrix",this._model=e;var i=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(e,a)}return r.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},r.create=function(e,t){var a=[];return e.eachComponent("matrix",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachComponent(function(i,n){ln({targetModel:n,coordSysType:"matrix",coordSysProvider:wv})}),a},r.prototype.getRect=function(){return this._rect},r.prototype._resize=function(e,t){var a=this._dims,i=this._dimModels,n=this._rect=Bt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});OU(i,a,n,0),OU(i,a,n,1),zU(0,a),zU(1,a),VU(this._model.getBody(),a),VU(this._model.getCorner(),a)},r.prototype.dataToPoint=function(e,t,a){return a=a||[],this.dataToLayout(e,t,Kp),a[0]=Kp.rect.x+Kp.rect.width/2,a[1]=Kp.rect.y+Kp.rect.height/2,a},r.prototype.dataToLayout=function(e,t,a){var i=this._dims;a=a||{};var n=a.rect=a.rect||{};n.x=n.y=n.width=n.height=NaN;var o=a.matrixXYLocatorRange=ly(a.matrixXYLocatorRange);return z(e)&&(uy(o,null,e,i,Q(t&&t.clamp,Gi.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==Gi.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!t||t.clamp!==Gi.body)&&this._model.getCorner().expandRangeByCellMerge(o)),hD(n,o,i,0),hD(n,o,i,1)),a},r.prototype.pointToData=function(e,t,a){var i=this._dims;return BU(_n,0,i,e,t&&t.clamp),BU(_n,1,i,e,t&&t.clamp),a=a||[],a[0]=a[1]=NaN,_n.y===xr.inCorner&&_n.x===xr.inBody?UU(_n,a,0,i):_n.x===xr.inCorner&&_n.y===xr.inBody?UU(_n,a,1,i):(FU(_n,a,0,i),FU(_n,a,1,i)),a},r.prototype.convertToPixel=function(e,t,a,i){var n=bD(t);return n===this?n.dataToPoint(a,i):void 0},r.prototype.convertToLayout=function(e,t,a,i){var n=bD(t);return n===this?n.dataToLayout(a,i):void 0},r.prototype.convertFromPixel=function(e,t,a,i){var n=bD(t);return n===this?n.pointToData(a,i):void 0},r.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},r.dimensions=["x","y","value"],r})(),Kp={rect:Rl()},hy=new Si,_D=new Si;function OU(r,e,t,a){for(var i=1-a,n=e[bt[a]],o=e[bt[i]],s=o.shouldShow(),l=n.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,a);u.next();)u.item.wh=u.item.xy=NaN;for(var c=t[be[a]],f=n.getLocatorCount(a)+o.getLocatorCount(a),p=new Mt,h=o.resetLevelIterator();h.next();)p.option=h.item.option,p.parentModel=r[bt[i]],m(h.item,s?p.get("levelSize"):0);for(var d=new Mt,v=n.resetCellIterator();v.next();)v.item.type===Hi.leaf&&(d.option=v.item.option,d.parentModel=void 0,m(v.item,d.get("size")));function m(w,D){var C=BQ(D,a,t);Me(C)||(w.wh=SD(C,c),c=SD(c-w.wh),f--)}var g=f?c/f:0,y=!f&&c>=1,x=t[bt[a]],_=n.getLocatorCount(a)-1,b=new Si;for(o.resetLayoutIterator(b,a);b.next();)S(b.item);for(n.resetLayoutIterator(b,a);b.next();)S(b.item);function S(w){Me(w.wh)&&(w.wh=g),w.xy=x,w.id[bt[a]]===_&&!y&&(w.wh=t[bt[a]]+t[be[a]]-w.xy),x+=w.wh}}function zU(r,e){for(var t=e[bt[r]].resetCellIterator();t.next();){var a=t.item;dy(a.rect,r,a.id,a.span,e),dy(a.rect,1-r,a.id,a.span,e),a.type===Hi.nonLeaf&&(a.xy=a.rect[bt[r]],a.wh=a.rect[be[r]])}}function VU(r,e){r.travelExistingCells(function(t){var a=t.span;if(a){var i=t.spanRect,n=t.id;dy(i,0,n,a,e),dy(i,1,n,a,e)}})}function dy(r,e,t,a,i){r[be[e]]=0;var n=t[bt[e]],o=n<0?i[bt[1-e]]:i[bt[e]],s=o.getUnitLayoutInfo(e,t[bt[e]]);if(r[bt[e]]=s.xy,r[be[e]]=s.wh,a[bt[e]]>1){var l=o.getUnitLayoutInfo(e,t[bt[e]]+a[bt[e]]-1);r[be[e]]=l.xy+l.wh-s.xy}}function BQ(r,e,t){var a=ou(r,t[be[e]]);return SD(a,t[be[e]])}function SD(r,e){return Math.max(Math.min(r,Q(e,1/0)),0)}function bD(r){var e=r.matrixModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var xr={inBody:1,inCorner:2,outside:3},_n={x:null,y:null,point:[]};function BU(r,e,t,a,i){var n=t[bt[e]],o=t[bt[1-e]],s=n.getUnitLayoutInfo(e,n.getLocatorCount(e)-1),l=n.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=r.point[e]=a[e];if(!l&&!c){r[bt[e]]=xr.outside;return}if(i===Gi.body){l?(r[bt[e]]=xr.inBody,f=wr(s.xy+s.wh,_e(l.xy,f)),r.point[e]=f):r[bt[e]]=xr.outside;return}else if(i===Gi.corner){c?(r[bt[e]]=xr.inCorner,f=wr(c.xy+c.wh,_e(u.xy,f)),r.point[e]=f):r[bt[e]]=xr.outside;return}var p=l?l.xy:c?c.xy+c.wh:NaN,h=u?u.xy:p,d=s?s.xy+s.wh:p;if(f<h){if(!i){r[bt[e]]=xr.outside;return}f=h}else if(f>d){if(!i){r[bt[e]]=xr.outside;return}f=d}r.point[e]=f,r[bt[e]]=p<=f&&f<=d?xr.inBody:h<=f&&f<=p?xr.inCorner:xr.outside}function UU(r,e,t,a){var i=1-t;if(r[bt[t]]!==xr.outside)for(a[bt[t]].resetCellIterator(_D);_D.next();){var n=_D.item;if(HU(r.point[t],n.rect,t)&&HU(r.point[i],n.rect,i)){e[t]=n.ordinal,e[i]=n.id[bt[i]];return}}}function FU(r,e,t,a){if(r[bt[t]]!==xr.outside){var i=r[bt[t]]===xr.inCorner?a[bt[1-t]]:a[bt[t]];for(i.resetLayoutIterator(hy,t);hy.next();)if(UQ(r.point[t],hy.item)){e[t]=hy.item.id[bt[t]];return}}}function UQ(r,e){return e.xy<=r&&r<=e.xy+e.wh}function HU(r,e,t){return e[bt[t]]<=r&&r<=e[bt[t]]+e[be[t]]}var GU=VQ;function wD(r){r.registerComponentModel(PU),r.registerComponentView(NU),r.registerCoordinateSystem("matrix",GU)}function FQ(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function WU(r,e){var t;return T(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function HQ(r,e,t){var a=O({},t),i=r[e],n=t.$action||"merge";if(n==="merge")if(i){if(0)var o;dt(i,a,!0),mr(i,a,{ignoreSize:!0}),O_(t,i),vy(t,i),vy(t,i,"shape"),vy(t,i,"style"),vy(t,i,"extra"),t.clipPath=i.clipPath}else r[e]=a;else n==="replace"?r[e]=a:n==="remove"&&i&&(r[e]=null)}var YU=["transition","enterFrom","leaveTo"],GQ=YU.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function vy(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?YU:GQ,i=0;i<a.length;i++){var n=a[i];r[n]==null&&e[n]!=null&&(r[n]=e[n])}}function WQ(r,e){if(r&&(r.hv=e.hv=[WU(e,["left","right"]),WU(e,["top","bottom"])],r.type==="group")){var t=r,a=e;t.width==null&&(t.width=a.width=0),t.height==null&&(t.height=a.height=0)}}var ZU=(function(r){I(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,a){var i=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,a),this.option.elements=i},e.prototype.optionUpdated=function(t,a){var i=this.option,n=(a?i:t).elements,o=i.elements=a?[]:i.elements,s=[];this._flatten(n,s,null);var l=Sd(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];T(l,function(c,f){var p=c.newOption;p&&(u.push(p),FQ(c,p),HQ(o,f,p),WQ(o[f],p))},this),i.elements=At(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,a,i){T(t,function(n){if(n){i&&(n.parentOption=i),a.push(n);var o=n.children;o&&o.length&&this._flatten(o,a,n),delete n.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e})(St);var XU={path:null,compoundPath:null,group:K,image:se,text:Dt},si=ot(),$U=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=q()},e.prototype.render=function(t,a,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var a=t.useElOptionsToUpdate();if(a){var i=this._elMap,n=this.group,o=t.get("z"),s=t.get("zlevel");T(a,function(l){var u=ve(l.id,null),c=u!=null?i.get(u):null,f=ve(l.parentId,null),p=f!=null?i.get(f):n,h=l.type,d=l.style;h==="text"&&d&&l.hv&&l.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var v=l.textContent,m=l.textConfig;if(d&&jg(d,h,!!m,!!v)){var g=$g(d,h,!0);!m&&g.textConfig&&(m=l.textConfig=g.textConfig),!v&&g.textContent&&(v=g.textContent)}var y=YQ(l),x=l.$action||"merge",_=x==="merge",b=x==="replace";if(_){var S=!c,w=c;S?w=qU(u,p,l.type,i):(w&&(si(w).isNew=!1),Kg(w)),w&&(cc(w,y,t,{isInit:S}),jU(w,l,o,s))}else if(b){my(c,l,i,t);var D=qU(u,p,l.type,i);D&&(cc(D,y,t,{isInit:!0}),jU(D,l,o,s))}else x==="remove"&&(k1(c,l),my(c,l,i,t));var C=i.get(u);if(C&&v)if(_){var M=C.getTextContent();M?M.attr(v):C.setTextContent(new Dt(v))}else b&&C.setTextContent(new Dt(v));if(C){var E=l.clipPath;if(E){var L=E.type,A=void 0,S=!1;if(_){var P=C.getClipPath();S=!P||si(P).type!==L,A=S?TD(L):P}else b&&(S=!0,A=TD(L));C.setClipPath(A),cc(A,E,t,{isInit:S}),pc(A,E.keyframeAnimation,t)}var R=si(C);C.setTextConfig(m),R.option=l,ZQ(C,t,l),Er({el:C,componentModel:t,itemName:C.name,itemTooltipOption:l.tooltip}),pc(C,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,a){for(var i=t.option.elements,n=this.group,o=this._elMap,s=a.getWidth(),l=a.getHeight(),u=["x","y"],c=0;c<i.length;c++){var f=i[c],p=ve(f.id,null),h=p!=null?o.get(p):null;if(!(!h||!h.isGroup)){var d=h.parent,v=d===n,m=si(h),g=si(d);m.width=j(m.option.width,v?s:g.width)||0,m.height=j(m.option.height,v?l:g.height)||0}}for(var c=i.length-1;c>=0;c--){var f=i[c],p=ve(f.id,null),h=p!=null?o.get(p):null;if(h){var d=h.parent,g=si(d),y=d===n?{width:s,height:l}:{width:g.width,height:g.height},x={},_=Mo(h,f,y,null,{hv:f.hv,boundingMode:f.bounding},x);if(!si(h).isNew&&_){for(var b=f.transition,S={},w=0;w<u.length;w++){var D=u[w],C=x[D];b&&(Jo(b)||lt(b,D)>=0)?S[D]=C:h[D]=C}wt(h,S,t,0)}else h.attr(x)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(i){my(i,si(i).option,a,t._lastGraphicModel)}),this._elMap=q()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(Ot);function TD(r){var e=it(XU,r)?XU[r]:gu(r),t=new e({});return si(t).type=r,t}function qU(r,e,t,a){var i=TD(t);return e.add(i),a.set(r,i),si(i).id=r,si(i).isNew=!0,i}function my(r,e,t,a){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(n){my(n,e,t,a)}),fc(r,e,a),t.removeKey(si(r).id))}function jU(r,e,t,a){r.isGroup||T([["cursor",ke.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(i){var n=i[0];it(e,n)?r[n]=Q(e[n],i[1]):r[n]==null&&(r[n]=i[1])}),T(gt(e),function(i){if(i.indexOf("on")===0){var n=e[i];r[i]=$(n)?n:null}}),it(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function YQ(r){return r=O({},r),T(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(R_),function(e){delete r[e]}),r}function ZQ(r,e,t){var a=nt(r).eventData;!r.silent&&!r.ignore&&!a&&(a=nt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function DD(r){r.registerComponentModel(ZU),r.registerComponentView($U),r.registerPreprocessor(function(e){var t=e.graphic;z(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var CD=["x","y","radius","angle","single"],XQ=["cartesian2d","polar","singleAxis"];function KU(r){var e=r.get("coordinateSystem");return lt(XQ,e)>=0}function li(r){return r+"Axis"}function JU(r,e){var t=q(),a=[],i=q();r.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var n;do n=!1,r.eachComponent("dataZoom",o);while(n);function o(c){!i.get(c.uid)&&l(c)&&(s(c),n=!0)}function s(c){i.set(c.uid,!0),a.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(p,h){var d=t.get(p);d&&d[h]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,p){(t.get(f)||t.set(f,[]))[p]=!0})}return a}function gy(r){var e=r.ecModel,t={infoList:[],infoMap:q()};return r.eachTargetAxis(function(a,i){var n=e.getComponent(li(a),i);if(n){var o=n.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(n)}}}),t}var MD=(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})(),qQ=(function(r){I(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,a,i){var n=QU(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var a=QU(t);dt(this.option,t,!0),dt(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;T([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(a[n[0]]=i[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=q(),i=this._fillSpecifiedTargetAxis(a);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return T(CD,function(i){var n=this.getReferringComponents(li(i),jE);if(n.specified){a=!0;var o=new MD;T(n.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var i=this.ecModel,n=!0;if(n){var o=a==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var f=u[0];if(f){var p=new MD;if(p.add(f.componentIndex),t.set(c,p),n=!1,c==="x"||c==="y"){var h=f.getReferringComponents("grid",Yt).models[0];h&&T(u,function(d){f.componentIndex!==d.componentIndex&&h===d.getReferringComponents("grid",Yt).models[0]&&p.add(d.componentIndex)})}}}n&&T(CD,function(u){if(n){var c=i.findComponents({mainType:li(u),filter:function(p){return p.get("type",!0)==="category"}});if(c[0]){var f=new MD;f.add(c[0].componentIndex),t.set(u,f),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,i=this.get("rangeMode");T([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":i?a[o]=i[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,i){t==null&&(t=this.ecModel.getComponent(li(a),i))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(i,n){T(i.indexList,function(o){t.call(a,n,o)})})},e.prototype.getAxisProxy=function(t,a){var i=this.getAxisModel(t,a);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[a])return this.ecModel.getComponent(li(t),a)},e.prototype.setRawRange=function(t){var a=this.option,i=this.settledOption;T([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(a[n[0]]=i[n[0]]=t[n[0]],a[n[1]]=i[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;T(["start","startValue","end","endValue"],function(i){a[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,i=this._targetAxisInfoMap.keys(),n=0;n<i.length;n++)for(var o=i[n],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;a||(a=u)}return a},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(St);function QU(r){var e={};return T(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var es=qQ;var jQ=(function(r){I(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})(es),tF=jQ;var $Q=(function(r){I(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,a,i,n){this.dataZoomModel=t,this.ecModel=a,this.api=i},e.type="dataZoom",e})(Ot),xc=$Q;var KQ=(function(r){I(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})(xc),eF=KQ;var _c=T,rF=Xe,JQ=(function(){function r(e,t,a,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=a}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(KU(t)){var a=li(this._dimName),i=t.getReferringComponents(a,Yt).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return tt(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,a=this.getAxisModel(),i=a.axis.scale,n=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;_c(["start","end"],function(p,h){var d=e[p],v=e[p+"Value"];n[h]==="percent"?(d==null&&(d=o[h]),v=i.parse(zt(d,o,t))):(u=!0,v=v==null?t[h]:i.parse(v),d=zt(v,t,o)),l[h]=v==null||isNaN(v)?t[h]:v,s[h]=d==null||isNaN(d)?o[h]:d}),rF(l),rF(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(p,h,d,v,m){var g=m?"Span":"ValueSpan";Yr(0,p,d,"all",c["min"+g],c["max"+g]);for(var y=0;y<2;y++)h[y]=zt(p[y],d,v,!0),m&&(h[y]=i.parse(h[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=QQ(this,this._dimName,t),this._updateMinMaxSpan();var a=this.calculateDataWindow(e.settledOption);this._valueWindow=a.valueWindow,this._percentWindow=a.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var a=this._dimName,i=this.getTargetSeriesModels(),n=e.get("filterMode"),o=this._valueWindow;if(n==="none")return;_c(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(a);if(c.length){if(n==="weakFilter"){var f=u.getStore(),p=V(c,function(h){return u.getDimensionIndex(h)},u);u.filterSelf(function(h){for(var d,v,m,g=0;g<c.length;g++){var y=f.get(p[g],h),x=!isNaN(y),_=y<o[0],b=y>o[1];if(x&&!_&&!b)return!0;x&&(m=!0),_&&(d=!0),b&&(v=!0)}return m&&d&&v})}else _c(c,function(h){if(n==="empty")l.setData(u=u.map(h,function(v){return s(v)?v:NaN}));else{var d={};d[h]=o,u.selectRange(d)}});_c(c,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;_c(["min","max"],function(i){var n=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=zt(a[0]+o,a,[0,100],!0):n!=null&&(o=zt(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(t){var i=gd(a,[0,500]);i=Math.min(i,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+a[0].toFixed(i)),t[1]!==100&&n.setDeterminedMinMax("max",+a[1].toFixed(i)),n.freeze()}},r})();function QQ(r,e,t){var a=[1/0,-1/0];_c(t,function(o){n2(a,o.getData(),e)});var i=r.getAxisModel(),n=Em(i.axis.scale,i,a).calculate();return[n.min,n.max]}var aF=JQ;var ttt={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=r.getComponent(li(o),s);i(o,s,l,n)})})}e(function(i,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new aF(i,n,s,r),t.push(o.__dzAxisProxy))});var a=q();return T(t,function(i){T(i.getTargetSeriesModels(),function(n){a.set(n.uid,n)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).reset(t)}),t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var i=a.getDataPercentWindow(),n=a.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}},iF=ttt;function ED(r){r.registerAction("dataZoom",function(e,t){var a=JU(t,e);T(a,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var nF=!1;function Nl(r){nF||(nF=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,iF),ED(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function oF(r){r.registerComponentModel(tF),r.registerComponentView(eF),Nl(r)}var ar=(function(){function r(){}return r})();var sF={};function rs(r,e){sF[r]=e}function yy(r){return sF[r]}var rtt=(function(r){I(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;T(this.option.feature,function(a,i){var n=yy(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),dt(a,n.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:N.color.border,borderRadius:0,borderWidth:0,padding:N.size.m,itemSize:15,itemGap:N.size.s,showTitle:!0,iconStyle:{borderColor:N.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:N.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(St),lF=rtt;function xy(r,e){var t=sn(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new ht({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:a,silent:!0,z2:-1});return i}var itt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){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=[];T(u,function(y,x){f.push(x)}),new gr(this._featureNames||[],f).add(p).update(p).remove(ut(p,null)).execute(),this._featureNames=f;function p(y,x){var _=f[y],b=f[x],S=u[_],w=new Mt(S,t,t.ecModel),D;if(n&&n.newTitle!=null&&n.featureName===_&&(S.title=n.newTitle),_&&!b){if(ntt(_))D={onclick:w.option.onclick,featureName:_};else{var C=yy(_);if(!C)return;D=new C}c[_]=D}else if(D=c[b],!D)return;D.uid=$a("toolbox-feature"),D.model=w,D.ecModel=a,D.api=i;var M=D instanceof ar;if(!_&&b){M&&D.dispose&&D.dispose(a,i);return}if(!w.get("show")||M&&D.unusable){M&&D.remove&&D.remove(a,i);return}h(w,D,_),w.setIconStatus=function(E,L){var A=this.option,P=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[E]=L,P[E]&&(L==="emphasis"?Tr:Dr)(P[E])},D instanceof ar&&D.render&&D.render(w,a,i,n)}function h(y,x,_){var b=y.getModel("iconStyle"),S=y.getModel(["emphasis","iconStyle"]),w=x instanceof ar&&x.getIcons?x.getIcons():y.get("icon"),D=y.get("title")||{},C,M;W(w)?(C={},C[_]=w):C=w,W(D)?(M={},M[_]=D):M=D;var E=y.iconPaths={};T(C,function(L,A){var P=Vn(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var R=P.ensureState("emphasis");R.style=S.getItemStyle();var k=new Dt({style:{text:M[A],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:_u({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},a)},ignore:!0});P.setTextContent(k),Er({el:P,componentModel:t,itemName:A,formatterParamsExtra:{title:M[A]}}),P.__title=M[A],P.on("mouseover",function(){var B=S.getItemStyle(),U=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";k.setStyle({fill:S.get("textFill")||B.fill||B.stroke||N.color.neutral99,backgroundColor:S.get("textBackgroundColor")}),P.setTextConfig({position:S.get("textPosition")||U}),k.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){y.get(["iconStatus",A])!=="emphasis"&&i.leaveEmphasis(this),k.hide()}),(y.get(["iconStatus",A])==="emphasis"?Tr:Dr)(P),o.add(P),P.on("click",Z(x.onclick,x,a,i,A)),E[A]=P})}var d=Zt(t,i).refContainer,v=t.getBoxLayoutParams(),m=t.get("padding"),g=Bt(v,d,m);Ai(t.get("orient"),o,t.get("itemGap"),g.width,g.height),Mo(o,v,d,m),o.add(xy(o.getBoundingRect(),t)),l||o.eachChild(function(y){var x=y.__title,_=y.ensureState("emphasis"),b=_.textConfig||(_.textConfig={}),S=y.getTextContent(),w=S&&S.ensureState("emphasis");if(w&&!$(w)&&x){var D=w.style||(w.style={}),C=go(x,Dt.makeFont(D)),M=y.x+o.x,E=y.y+o.y+s,L=!1;E+C.height>i.getHeight()&&(b.position="top",L=!0);var A=L?-5-C.height:s+10;M+C.width/2>i.getWidth()?(b.position=["100%",A],D.align="right"):M-C.width/2<0&&(b.position=[0,A],D.align="left")}})},e.prototype.updateView=function(t,a,i,n){T(this._features,function(o){o instanceof ar&&o.updateView&&o.updateView(o.model,a,i,n)})},e.prototype.remove=function(t,a){T(this._features,function(i){i instanceof ar&&i.remove&&i.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){T(this._features,function(i){i instanceof ar&&i.dispose&&i.dispose(t,a)})},e.type="toolbox",e})(Ot);function ntt(r){return r.indexOf("my")===0}var uF=itt;var ott=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||N.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Lt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=n+"."+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 p=l.split(","),h=p[0].indexOf("base64")>-1,d=o?decodeURIComponent(p[1]):p[1];h&&(d=window.atob(d));var v=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=d.length,g=new Uint8Array(m);m--;)g[m]=d.charCodeAt(m);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,v)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,b=_.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),_.focus(),b.execCommand("SaveAs",!0,v),document.body.removeChild(x)}}else{var S=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',D=window.open();D.document.write(w),D.document.title=n}},e.getDefaultOption=function(t){var a={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:N.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e})(ar),cF=ott;var fF="__ec_magicType_stack__";var stt=[["line","bar"],["stack"]],ltt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),i={};return T(t.get("type"),function(n){a[n]&&(i[n]=a[n])}),i},e.getDefaultOption=function(t){var a={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 a},e.prototype.onclick=function(t,a,i){var n=this.model,o=n.get(["seriesIndex",i]);if(pF[i]){var s={series:[]},l=function(f){var p=f.subType,h=f.id,d=pF[i](p,h,f,n);d&&(J(d,f.option),s.series.push(d));var v=f.coordinateSystem;if(v&&v.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=v.getAxesByScale("ordinal")[0];if(m){var g=m.dim,y=g+"Axis",x=f.getReferringComponents(y,Yt).models[0],_=x.componentIndex;s[y]=s[y]||[];for(var b=0;b<=_;b++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=i==="bar"}}};T(stt,function(f){lt(f,i)>=0&&T(f,function(p){n.setIconStatus(p,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=dt({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e})(ar),pF={line:function(r,e,t,a){if(r==="bar")return dt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return dt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var i=t.get("stack")===fF;if(r==="line"||r==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),dt({id:e,stack:i?"":fF},a.get(["option","stack"])||{},!0)}};Br({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var hF=ltt;var by=new Array(60).join("-"),bc=" ";function utt(r){var e={},t=[],a=[];return r.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function ctt(r){var e=[];return T(r,function(t,a){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(V(t.series,function(h){return h.name})),l=[i.model.getCategories()];T(t.series,function(h){var d=h.getRawData();l.push(h.getRawData().mapArray(d.mapDimension(o),function(v){return v}))});for(var u=[s.join(bc)],c=0;c<l[0].length;c++){for(var f=[],p=0;p<l.length;p++)f.push(l[p][c]);u.push(f.join(bc))}e.push(u.join(`
|
|
`))}),e.join(`
|
|
|
|
`+by+`
|
|
|
|
`)}function ftt(r){return V(r,function(e){var t=e.getRawData(),a=[e.name],i=[];return t.each(t.dimensions,function(){for(var n=arguments.length,o=arguments[n-1],s=t.getName(o),l=0;l<n-1;l++)i[l]=arguments[l];a.push((s?s+bc:"")+i.join(bc))}),a.join(`
|
|
`)}).join(`
|
|
|
|
`+by+`
|
|
|
|
`)}function ptt(r){var e=utt(r);return{value:At([ctt(e.seriesGroupByCategoryAxis),ftt(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
|
|
|
|
`+by+`
|
|
|
|
`),meta:e.meta}}function _y(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function htt(r){var e=r.slice(0,r.indexOf(`
|
|
`));if(e.indexOf(bc)>=0)return!0}var AD=new RegExp("["+bc+"]+","g");function dtt(r){for(var e=r.split(/\n+/g),t=_y(e.shift()).split(AD),a=[],i=V(t,function(l){return{name:l,data:[]}}),n=0;n<e.length;n++){var o=_y(e[n]).split(AD);a.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[n]=o[s])}return{series:i,categories:a}}function vtt(r){for(var e=r.split(/\n+/g),t=_y(e.shift()),a=[],i=0;i<e.length;i++){var n=_y(e[i]);if(n){var o=n.split(AD),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),a[i]={name:s,value:[]},l=a[i].value):l=a[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?a[i].value=l[0]:a[i]=l[0])}}return{name:t,data:a}}function mtt(r,e){var t=r.split(new RegExp(`
|
|
*`+by+`
|
|
*`,"g")),a={series:[]};return T(t,function(i,n){if(htt(i)){var o=dtt(i),s=e[n],l=s.axisDim+"Axis";s&&(a[l]=a[l]||[],a[l][s.axisIndex]={data:o.categories},a.series=a.series.concat(o.series))}else{var o=vtt(i);a.series.push(o)}}),a}var gtt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){setTimeout(function(){a.dispatchAction({type:"hideTip"})});var i=a.getDom(),n=this.model;this._dom&&i.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=n.get("backgroundColor")||N.color.neutral00;var s=document.createElement("h4"),l=n.get("lang")||[];s.innerHTML=l[0]||n.get("title"),s.style.cssText="margin:10px 20px",s.style.color=n.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=n.get("optionToContent"),p=n.get("contentToOption"),h=ptt(t);if($(f)){var d=f(a.getOption());W(d)?u.innerHTML=d:no(d)&&u.appendChild(d)}else{c.readOnly=n.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=n.get("textColor"),v.borderColor=n.get("textareaBorderColor"),v.backgroundColor=n.get("textareaColor"),c.value=h.value,u.appendChild(c)}var m=h.meta,g=document.createElement("div");g.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",x=document.createElement("div"),_=document.createElement("div");y+=";background-color:"+n.get("buttonColor"),y+=";color:"+n.get("buttonTextColor");var b=this;function S(){i.removeChild(o),b._dom=null}Xc(x,"click",S),Xc(_,"click",function(){if(p==null&&f!=null||p!=null&&f==null){S();return}var w;try{$(p)?w=p(u,a.getOption()):w=mtt(c.value,m)}catch(D){throw S(),new Error("Data view format error "+D)}w&&a.dispatchAction({type:"changeDataView",newOption:w}),S()}),x.innerHTML=l[1],_.innerHTML=l[2],_.style.cssText=x.style.cssText=y,!n.get("readOnly")&&g.appendChild(_),g.appendChild(x),o.appendChild(s),o.appendChild(u),o.appendChild(g),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,a){this._dom&&a.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.getDefaultOption=function(t){var a={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:N.color.background,textColor:N.color.primary,textareaColor:N.color.background,textareaBorderColor:N.color.border,buttonColor:N.color.accent50,buttonTextColor:N.color.neutral00};return a},e})(ar);function ytt(r,e){return V(r,function(t,a){var i=e&&e[a];if(et(i)&&!z(i)){var n=et(t)&&!z(t);n||(t={value:t});var o=i.name!=null&&t.name==null;return t=J(t,i),o&&delete t.name,t}else return t})}Br({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];T(r.newOption.series,function(a){var i=e.getSeriesByName(a.name)[0];if(!i)t.push(O({type:"scatter"},a));else{var n=i.get("data");t.push({name:a.name,data:ytt(a.data,n)})}}),e.mergeOption(J({series:t},r.newOption))});var dF=gtt;var vF=T,mF=ot();function gF(r,e){var t=LD(r);vF(e,function(a,i){for(var n=t.length-1;n>=0;n--){var o=t[n];if(o[i])break}if(n<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function yF(r){var e=LD(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return vF(t,function(i,n){for(var o=e.length-1;o>=0;o--)if(i=e[o][n],i){a[n]=i;break}}),a}function xF(r){mF(r).snapshots=null}function _F(r){return LD(r).length}function LD(r){var e=mF(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var xtt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){xF(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={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 a},e})(ar);Br({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var SF=xtt;var _tt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],btt=(function(){function r(e,t,a){var i=this;this._targetInfoList=[];var n=wF(t,e);T(Stt,function(o,s){(!a||!a.include||lt(a.include,s)>=0)&&o(n,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,i,n){if((a.coordRanges||(a.coordRanges=[])).push(i),!a.coordRange){a.coordRange=i;var o=ID[a.brushType](0,n,i);a.__rangeOffset={offset:MF[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){T(e,function(i){var n=this.findTargetInfo(i,t);n&&n!==!0&&T(n.coordSyses,function(o){var s=ID[i.brushType](1,o,i.range,!0);a(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){T(e,function(a){var i=this.findTargetInfo(a,t);if(a.range=a.range||[],i&&i!==!0){a.panelId=i.panelId;var n=ID[a.brushType](0,i.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?MF[a.brushType](n.values,o.offset,wtt(n.xyMinMax,o.xyMinMax)):n.values}},this)},r.prototype.makePanelOpts=function(e,t){return V(this._targetInfoList,function(a){var i=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:zg(i),isTargetByCursor:Bg(i,e,a.coordSysModel),getLinearBrushOtherExtent:Vg(i)}})},r.prototype.controlSeries=function(e,t,a){var i=this.findTargetInfo(e,a);return i===!0||i&<(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,i=wF(t,e),n=0;n<a.length;n++){var o=a[n],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<TF.length;l++)if(TF[l](i,o))return o}return!0},r})();function PD(r){return r[0]>r[1]&&r.reverse(),r}function wF(r,e){return ji(r,e,{includeMainTypes:_tt})}var Stt={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,i=r.gridModels,n=q(),o={},s={};!t&&!a&&!i||(T(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),T(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),T(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,c=[];T(u.getCartesians(),function(f,p){(lt(t,f.getAxis("x").model)>=0||lt(a,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:DF.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){T(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:DF.geo})})}},TF=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],DF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Ci(r)),e}},ID={lineX:ut(CF,0),lineY:ut(CF,1),rect:function(r,e,t,a){var i=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),n=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[PD([i[0],n[0]]),PD([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var i=[[1/0,-1/0],[1/0,-1/0]],n=V(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function CF(r,e,t,a){var i=t.getAxis(["x","y"][r]),n=PD(V([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s]),!0):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[r]=n,o[1-r]=[NaN,NaN],{values:n,xyMinMax:o}}var MF={lineX:ut(EF,0),lineY:ut(EF,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 V(r,function(a,i){return[a[0]-t[0]*e[i][0],a[1]-t[1]*e[i][1]]})}};function EF(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function wtt(r,e){var t=AF(r),a=AF(e),i=[t[0]/a[0],t[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function AF(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Jp=btt;var kD=T,Ttt=ZE("toolbox-dataZoom_");var Dtt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){this._brushController||(this._brushController=new sc(i.getZr()),this._brushController.on("brush",Z(this._onBrush,this)).mount()),Ett(t,a,this,n,i),Mtt(t,a)},e.prototype.onclick=function(t,a,i){Ctt[i].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new Jp(RD(this.model),n,{include:["grid"]});o.matchOutputRanges(a,n,function(u,c,f){if(f.type==="cartesian2d"){var p=u.brushType;p==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[p],f,c)}}),gF(n,i),this._dispatchZoomAction(i);function s(u,c,f){var p=c.getAxis(u),h=p.model,d=l(u,h,n),v=d.findRepresentativeAxisProxy(h).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(f=Yr(0,f.slice(),p.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var p;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var d=h.getAxisModel(u,c.componentIndex);d&&(p=h)}),p}},e.prototype._dispatchZoomAction=function(t){var a=[];kD(t,function(i,n){a.push(tt(i))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={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:N.color.backgroundTint}};return a},e})(ar),Ctt={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(yF(this.ecModel))}};function RD(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 Mtt(r,e){r.setIconStatus("back",_F(e)>1?"emphasis":"normal")}function Ett(r,e,t,a,i){var n=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=n,r.setIconStatus("zoom",n?"emphasis":"normal");var o=new Jp(RD(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}SI("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),i=[],n=RD(a),o=ji(r,n);kD(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),kD(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,p={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:Ttt+u+f};p[c]=f,i.push(p)}return i});var LF=Dtt;function ND(r){r.registerComponentModel(lF),r.registerComponentView(uF),rs("saveAsImage",cF),rs("magicType",hF),rs("dataView",dF),rs("dataZoom",LF),rs("restore",SF),Tt(oF)}var Att=(function(r){I(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,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:N.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:N.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:N.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:N.color.tertiary,fontSize:14}},e})(St),IF=Att;function Sy(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function PF(r){if(Lt.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t<a;t++)if(r[t]in e)return r[t]}}var OD=PF(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kF=PF(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function zD(r,e){if(!r)return e;e=yv(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function RF(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?e?t[e]:t:null}var Ltt=zD(kF,"transition"),VD=zD(OD,"transform"),Itt="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Lt.transform3dSupported?"will-change:transform;":"");function Ptt(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function ktt(r,e,t){if(!W(t)||t==="inside")return"";var a=r.get("backgroundColor"),i=r.get("borderWidth");e=Mi(e);var n=Ptt(t),o=Math.max(Math.round(i)*1.5,6),s="",l=VD+":",u;lt(["left","right"],n)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,p=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-f)/2)*100)/100;s+=";"+n+":-"+h+"px";var d=e+" solid "+i+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+a+";"];return'<div style="'+v.join("")+'"></div>'}function Rtt(r,e,t){var a="cubic-bezier(0.23,1,0.32,1)",i="",n="";return t&&(i=" "+r/2+"s "+a,n="opacity"+i+",visibility"+i),e||(i=" "+r+"s "+a,n+=(n.length?",":"")+(Lt.transformSupported?""+VD+i:",left"+i+",top"+i)),Ltt+":"+n}function NF(r,e,t){var a=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Lt.transformSupported)return t?"top:"+i+";left:"+a+";":[["top",i],["left",a]];var n=Lt.transform3dSupported,o="translate"+(n?"3d":"")+"("+a+","+i+(n?",0":"")+")";return t?"top:0;left:0;"+VD+":"+o+";":[["top",0],["left",0],[OD,o]]}function Ntt(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var i=Q(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+i+"px");var n=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return n&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+n),T(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Ott(r,e,t,a){var i=[],n=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),p=Zv(r,"html"),h=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+h),e&&n>0&&i.push(Rtt(n,t,a)),o&&i.push("background-color:"+o),T(["width","color","radius"],function(d){var v="border-"+d,m=yv(v),g=r.get(m);g!=null&&i.push(v+":"+g+(d==="color"?"":"px"))}),i.push(Ntt(f)),p!=null&&i.push("padding:"+sn(p).join("px ")+"px"),i.join(";")+";"}function OF(r,e,t,a,i){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&TM(r,o,t,a,i)}else{r[0]=a,r[1]=i;var s=n&&n.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var ztt=(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,Lt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),n=t.appendTo,o=n&&(W(n)?document.querySelector(n):no(n)?n:$(n)&&n(e.getDom()));OF(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();$r(c,l,!0),u.dispatch("mousemove",l)}},a.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(),a=RF(t,"position"),i=t.style;i.position!=="absolute"&&a!=="absolute"&&(i.position="relative")}var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,i=a.style,n=this._styleCoord;a.innerHTML?i.cssText=Itt+Ott(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+NF(n[0],n[1],!0)+("border-color:"+Mi(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,i,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(W(n)&&a.get("trigger")==="item"&&!Sy(a)&&(s=ktt(a,i,n)),W(e))o.innerHTML=e+s;else if(e){o.innerHTML="",z(e)||(e=[e]);for(var l=0;l<e.length;l++)no(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 a=this._styleCoord;if(OF(a,this._zr,this._container,e,t),a[0]!=null&&a[1]!=null){var i=this.el.style,n=NF(a[0],a[1]);T(n,function(o){i[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;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",Lt.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Z(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;DM(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var a=t.parentNode;a&&a.removeChild(t)}this.el=this._container=null},r})(),zF=ztt;var Vtt=(function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),BF(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,a,i,n){var o=this;et(e)&&Ut(""),this.el&&this._zr.remove(this.el);var s=a.getModel("textStyle");this.el=new Dt({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:a.get(["textStyle","color"]),padding:Zv(a,"richText"),verticalAlign:"top",align:"left"},z:a.get("z")}),T(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=a.get(u)}),T(["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(),a=VF(e.style);return[t.width+a.left+a.right,t.height+a.top+a.bottom]},r.prototype.moveTo=function(e,t){var a=this.el;if(a){var i=this._styleCoord;BF(i,this._zr,e,t),e=i[0],t=i[1];var n=a.style,o=as(n.borderWidth||0),s=VF(n);a.x=e+o+s.left,a.y=t+o+s.top,a.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Z(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function as(r){return Math.max(0,r)}function VF(r){var e=as(r.shadowBlur||0),t=as(r.shadowOffsetX||0),a=as(r.shadowOffsetY||0);return{left:as(e-t),right:as(e+t),top:as(e-a),bottom:as(e+a)}}function BF(r,e,t,a){r[0]=t,r[1]=a,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var UF=Vtt;var Btt=new ht({shape:{x:-1,y:-1,width:2,height:2}}),Utt=(function(r){I(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,a){if(!(Lt.node||!a.getDom())){var i=t.getComponent("tooltip"),n=this._renderMode=KE(i.get("renderMode"));this._tooltipContent=n==="richText"?new UF(a):new zF(a,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,a,i){if(!(Lt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=a,this._api=i;var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Qa(this,"_updatePosition",50,"fixRate"):Wn(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,a=t.get("triggerOn");ry("itemTooltip",this._api,Z(function(i,n,o){a!=="none"&&(a.indexOf(i)>=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,i=this._api,n=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,a,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,i,n){if(!(n.from===this.uid||Lt.node||!i.getDom())){var o=FF(n,i);this._ticket="";var s=n.dataByCoordSys,l=Wtt(n,a,i);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:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var c=Btt;c.x=n.x,c.y=n.y,c.update(),nt(c).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:c},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,i,n))return;var f=qp(n,a),p=f.point[0],h=f.point[1];p!=null&&h!=null&&this._tryShow({offsetX:p,offsetY:h,target:f.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,i,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(FF(n,i))},e.prototype._manuallyAxisShowTip=function(t,a,i,n){var o=n.seriesIndex,s=n.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var c=u.getData(),f=Qp([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,a){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=nt(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ii(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(nt(c).dataIndex!=null?l=c:nt(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var i=t.get("showDelay");a=Z(a,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(a,i):a()},e.prototype._showAxisTooltip=function(t,a){var i=this._ecModel,n=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Qp([a.tooltipOption],n),l=this._renderMode,u=[],c=re("section",{blocks:[],noHeader:!0}),f=[],p=new Xv;T(t,function(y){T(y.dataByAxis,function(x){var _=i.getComponent(x.axisDim+"Axis",x.axisIndex),b=x.value;if(!(!_||b==null)){var S=j1(b,_.axis,i,x.seriesDataIndices,x.valueLabelOpt),w=re("section",{header:S,noHeader:!Be(S),sortBlocks:!0,blocks:[]});c.blocks.push(w),T(x.seriesDataIndices,function(D){var C=i.getSeriesByIndex(D.seriesIndex),M=D.dataIndexInside,E=C.getDataParams(M);if(!(E.dataIndex<0)){E.axisDim=x.axisDim,E.axisIndex=x.axisIndex,E.axisType=x.axisType,E.axisId=x.axisId,E.axisValue=Vu(_.axis,{value:b}),E.axisValueLabel=S,E.marker=p.makeTooltipMarker("item",Mi(E.color),l);var L=$_(C.formatTooltip(M,!0,null)),A=L.frag;if(A){var P=Qp([C],n).get("valueFormatter");w.blocks.push(P?O({valueFormatter:P},A):A)}L.text&&f.push(L.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var h=a.position,d=s.get("order"),v=ab(c,p,l,d,i.get("useUTC"),s.get("textStyle"));v&&f.unshift(v);var m=l==="richText"?`
|
|
|
|
`:"<br/>",g=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],h,null,p)})},e.prototype._showSeriesItemTooltip=function(t,a,i){var n=this._ecModel,o=nt(a),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,p=u.getData(f),h=this._renderMode,d=t.positionDefault,v=Qp([p.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),m=v.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(c,f),y=new Xv;g.marker=y.makeTooltipMarker("item",Mi(g.color),h);var x=$_(u.formatTooltip(c,!1,f)),_=v.get("order"),b=v.get("valueFormatter"),S=x.frag,w=S?ab(b?O({valueFormatter:b},S):S,y,h,_,n.get("useUTC"),v.get("textStyle")):x.text,D="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,w,g,D,t.offsetX,t.offsetY,t.position,t.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:p.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,i){var n=this._renderMode==="html",o=nt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(W(l)){var c=l;l={content:c,formatter:c},u=!0}u&&n&&l.content&&(l=tt(l),l.content=We(l.content));var f=[l],p=this._ecModel.getComponent(o.componentMainType,o.componentIndex);p&&f.push(p),f.push({formatter:l.content});var h=t.positionDefault,d=Qp(f,this._tooltipModel,h?{position:h}:null),v=d.get("content"),m=Math.random()+"",g=new Xv;this._showOrMove(d,function(){var y=tt(d.get("formatterParams")||{});this._showTooltipContent(d,v,y,m,t.offsetX,t.offsetY,t.position,a,g)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,i,n,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var p=t.get("formatter");l=l||t.get("position");var h=a,d=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),v=d.color;if(p)if(W(p)){var m=t.ecModel.get("useUTC"),g=z(i)?i[0]:i,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;h=p,y&&(h=el(g.axisValue,h,m)),h=_v(h,i,!0)}else if($(p)){var x=Z(function(_,b){_===this._ticket&&(f.setContent(b,c,t,v,l),this._updatePosition(t,l,o,s,f,i,u))},this);this._ticket=n,h=p(i,n,x)}else h=p;f.setContent(h,c,t,v,l),f.show(t,v),this._updatePosition(t,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(t,a,i,n,o){if(i==="axis"||z(a))return{color:n||o};if(!z(a))return{color:n||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,i,n,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||t.get("position");var f=o.getSize(),p=t.get("align"),h=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),$(a)&&(a=a([i,n],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),z(a))i=j(a[0],u),n=j(a[1],c);else if(et(a)){var v=a;v.width=f[0],v.height=f[1];var m=Bt(v,{width:u,height:c});i=m.x,n=m.y,p=null,h=null}else if(W(a)&&l){var g=Gtt(a,d,f,t.get("borderWidth"));i=g[0],n=g[1]}else{var g=Ftt(i,n,o,u,c,p?null:20,h?null:20);i=g[0],n=g[1]}if(p&&(i-=HF(p)?f[0]/2:p==="right"?f[0]:0),h&&(n-=HF(h)?f[1]/2:h==="bottom"?f[1]:0),Sy(t)){var g=Htt(i,n,o,u,c);i=g[0],n=g[1]}o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&T(i,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&T(u,function(p,h){var d=f[h]||{},v=p.seriesDataIndices||[],m=d.seriesDataIndices||[];o=o&&p.value===d.value&&p.axisType===d.axisType&&p.axisId===d.axisId&&v.length===m.length,o&&T(v,function(g,y){var x=m[y];o=o&&g.seriesIndex===x.seriesIndex&&g.dataIndex===x.dataIndex}),n&&T(p.seriesDataIndices,function(g){var y=g.seriesIndex,x=a[y],_=n[y];x&&_&&_.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){Lt.node||!a.getDom()||(Wn(this,"_updatePosition"),this._tooltipContent.dispose(),Xp("itemTooltip",a))},e.type="tooltip",e})(Ot);function Qp(r,e,t){var a=e.ecModel,i;t?(i=new Mt(t,a,a),i=new Mt(e.option,i,a)):i=e;for(var n=r.length-1;n>=0;n--){var o=r[n];o&&(o instanceof Mt&&(o=o.get("tooltip",!0)),W(o)&&(o={formatter:o}),o&&(i=new Mt(o,i,a)))}return i}function FF(r,e){return r.dispatchAction||Z(e.dispatchAction,e)}function Ftt(r,e,t,a,i,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(r+l+n+2>a?r-=l+n:r+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function Htt(r,e,t,a,i){var n=t.getSize(),o=n[0],s=n[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function Gtt(r,e,t,a){var i=t[0],n=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-n/2;break;case"top":s=e.x+u/2-i/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-n/2;break;case"right":s=e.x+u+o,l=e.y+c/2-n/2}return[s,l]}function HF(r){return r==="center"||r==="middle"}function Wtt(r,e,t){var a=df(r).queryOptionMap,i=a.keys()[0];if(!(!i||i==="series")){var n=$i(e,i,a.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=nt(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var GF=Utt;function BD(r){Tt(Fi),r.registerComponentModel(IF),r.registerComponentView(GF),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ie),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ie)}var Ytt=["rect","polygon","keep","clear"];function UD(r,e){var t=Ft(r?r.brush:[]);if(t.length){var a=[];T(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=r&&r.toolbox;z(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Ztt(s),e&&!s.length&&s.push.apply(s,Ytt)}}function Ztt(r){var e={};T(r,function(t){e[t]=1}),r.length=0,T(e,function(t,a){r.push(a)})}var WF=T;function YF(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function th(r,e,t){var a={};return WF(e,function(n){var o=a[n]=i();WF(r[n],function(s,l){if(Le.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new Le(u),l==="opacity"&&(u=tt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Le(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function wy(r,e,t){var a;T(t,function(i){e.hasOwnProperty(i)&&YF(e[i])&&(a=!0)}),a&&T(t,function(i){e.hasOwnProperty(i)&&YF(e[i])?r[i]=tt(e[i]):delete r[i]})}function ZF(r,e,t,a,i,n){var o={};T(r,function(f){var p=Le.prepareVisualTypes(e[f]);o[f]=p});var s;function l(f){return qf(t,s,f)}function u(f,p){cb(t,s,f,p)}n==null?t.each(c):t.each([n],c);function c(f,p){s=n==null?f:p;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var d=a.call(i,f),v=e[d],m=o[d],g=0,y=m.length;g<y;g++){var x=m[g];v[x]&&v[x].applyVisual(f,l,u)}}}function XF(r,e,t,a){var i={};return T(r,function(n){var o=Le.prepareVisualTypes(e[n]);i[n]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(b){return qf(s,f,b)}function c(b,S){cb(s,f,b,S)}for(var f,p=s.getStore();(f=o.next())!=null;){var h=s.getRawDataItem(f);if(!(h&&h.visualMap===!1))for(var d=a!=null?p.get(l,f):f,v=t(d),m=e[v],g=i[v],y=0,x=g.length;y<x;y++){var _=g[y];m[_]&&m[_].applyVisual(d,u,c)}}}}}function $F(r){var e=r.brushType,t={point:function(a){return qF[e].point(a,t,r)},rect:function(a){return qF[e].rect(a,t,r)}};return t}var qF={lineX:jF(0),lineY:jF(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])&&qn(t.range,r[0],r[1])},rect:function(r,e,t){var a=t.range;if(!r||a.length<=1)return!1;var i=r.x,n=r.y,o=r.width,s=r.height,l=a[0];if(qn(a,i,n)||qn(a,i+o,n)||qn(a,i,n+s)||qn(a,i+o,n+s)||at.create(r).contain(l[0],l[1])||yu(i,n,i+o,n,a)||yu(i,n,i,n+s,a)||yu(i+o,n,i+o,n+s,a)||yu(i,n+s,i+o,n+s,a))return!0}}};function jF(r){var e=["x","y"],t=["width","height"];return{point:function(a,i,n){if(a){var o=n.range,s=a[r];return eh(s,o)}},rect:function(a,i,n){if(a){var o=n.range,s=[a[e[r]],a[e[r]]+a[t[r]]];return s[1]<s[0]&&s.reverse(),eh(s[0],o)||eh(s[1],o)||eh(o[0],s)||eh(o[1],s)}}}}function eh(r,e){return e[0]<=r&&r<=e[1]}var KF=["inBrush","outOfBrush"],FD="__ecBrushSelect",HD="__ecInBrushSelectEvent";function GD(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new Jp(e.option,r);t.setInputRanges(e.areas,r)})}function WD(r,e,t){var a=[],i,n;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),GD(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:tt(o.areas),selected:[]};a.push(l);var u=o.option,c=u.brushLink,f=[],p=[],h=[],d=!1;s||(i=u.throttleType,n=u.throttleDelay);var v=V(o.areas,function(b){var S=$tt[b.brushType],w=J({boundingRect:S?S(b):void 0},b);return w.selectors=$F(w),w}),m=th(o.option,KF,function(b){b.mappingMethod="fixed"});z(c)&&T(c,function(b){f[b]=1});function g(b){return c==="all"||!!f[b]}function y(b){return!!b.length}r.eachSeries(function(b,S){var w=h[S]=[];b.subType==="parallel"?x(b,S):_(b,S,w)});function x(b,S){var w=b.coordinateSystem;d=d||w.hasAxisBrushed(),g(S)&&w.eachActiveState(b.getData(),function(D,C){D==="active"&&(p[C]=1)})}function _(b,S,w){if(!(!b.brushSelector||jtt(o,S))&&(T(v,function(C){o.brushTargetManager.controlSeries(C,b,r)&&w.push(C),d=d||y(w)}),g(S)&&y(w))){var D=b.getData();D.each(function(C){JF(b,w,D,C)&&(p[C]=1)})}}r.eachSeries(function(b,S){var w={seriesId:b.id,seriesIndex:S,seriesName:b.name,dataIndex:[]};l.selected.push(w);var D=h[S],C=b.getData(),M=g(S)?function(E){return p[E]?(w.dataIndex.push(C.getRawIndex(E)),"inBrush"):"outOfBrush"}:function(E){return JF(b,D,C,E)?(w.dataIndex.push(C.getRawIndex(E)),"inBrush"):"outOfBrush"};(g(S)?d:y(D))&&ZF(KF,m,C,M)})}),Xtt(e,i,n,a,t)}function Xtt(r,e,t,a,i){if(i){var n=r.getZr();if(!n[HD]){n[FD]||(n[FD]=qtt);var o=Qa(n,FD,t,e);o(r,a)}}}function qtt(r,e){if(!r.isDisposed()){var t=r.getZr();t[HD]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[HD]=!1}}function JF(r,e,t,a){for(var i=0,n=e.length;i<n;i++){var o=e[i];if(r.brushSelector(a,t,o.selectors,o))return!0}}function jtt(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(z(t)?lt(t,e)<0:e!==t)}var $tt={rect:function(r){return QF(r.range)},polygon:function(r){for(var e,t=r.range,a=0,i=t.length;a<i;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=t[a];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&QF(e)}};function QF(r){return new at(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Ktt=(function(r){I(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,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new sc(a.getZr())).on("brush",Z(this._onBrush,this)).mount()},e.prototype.render=function(t,a,i,n){this.model=t,this._updateController(t,a,i,n)},e.prototype.updateTransform=function(t,a,i,n){GD(a),this._updateController(t,a,i,n)},e.prototype.updateVisual=function(t,a,i,n){this.updateTransform(t,a,i,n)},e.prototype.updateView=function(t,a,i,n){this._updateController(t,a,i,n)},e.prototype._updateController=function(t,a,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:tt(i),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:tt(i),$from:a})},e.type="brush",e})(Ot),tH=Ktt;var Jtt=(function(r){I(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,a){var i=this.option;!a&&wy(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=V(t,function(a){return eH(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=eH(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:N.color.backgroundTint,borderColor:N.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:N.color.disabled},e})(St);function eH(r,e){return dt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Mt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var rH=Jtt;var Qtt=["rect","polygon","lineX","lineY","keep","clear"],tet=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i){var n,o,s;a.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,T(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,i){this.render(t,a,i)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),i={};return T(t.get("type",!0),function(n){a[n]&&(i[n]=a[n])}),i},e.prototype.onclick=function(t,a,i){var n=this._brushType,o=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:Qtt.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 a},e})(ar),aH=tet;function YD(r){r.registerComponentView(tH),r.registerComponentModel(rH),r.registerPreprocessor(UD),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,WD),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ie),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ie),rs("brush",aH)}var eet=(function(r){I(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:"center",top:N.size.m,backgroundColor:N.color.transparent,borderColor:N.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:N.color.primary},subtextStyle:{fontSize:12,color:N.color.quaternary}},e})(St),ret=(function(r){I(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,a,i){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Q(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Dt({style:Gt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),p=t.get("subtext"),h=new Dt({style:Gt(s,{text:p,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),v=t.get("sublink"),m=t.get("triggerEvent",!0);c.silent=!d&&!m,h.silent=!v&&!m,d&&c.on("click",function(){al(d,"_"+t.get("target"))}),v&&h.on("click",function(){al(v,"_"+t.get("subtarget"))}),nt(c).eventData=nt(h).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(c),p&&n.add(h);var g=n.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var x=Zt(t,i),_=Bt(y,x.refContainer,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"),n.x=_.x,n.y=_.y,n.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),h.setStyle(b),g=n.getBoundingRect();var S=_.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var D=new ht({shape:{x:g.x-S[3],y:g.y-S[0],width:g.width+S[1]+S[3],height:g.height+S[0]+S[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});n.add(D)}},e.type="title",e})(Ot);function ZD(r){r.registerComponentModel(eet),r.registerComponentView(ret)}var aet=(function(r){I(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,a,i){this.mergeDefaultAndTheme(t,i),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 a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-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,a=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],T(a,function(u,c){var f=ve(bi(u),""),p;et(u)?(p=tt(u),p.value=c):p=c,o.push(p),n.push(f)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new we([{name:"value",type:s}],this);l.initData(o,n)},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:N.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:N.color.secondary},data:[]},e})(St),XD=aet;var iH=(function(r){I(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=Ar(XD.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:N.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:N.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:N.color.tertiary},itemStyle:{color:N.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:N.color.accent50,borderColor:N.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:N.color.accent50,borderColor:N.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:N.color.accent60},itemStyle:{color:N.color.accent60,borderColor:N.color.accent60},controlStyle:{color:N.color.accent70,borderColor:N.color.accent70}},progress:{lineStyle:{color:N.color.accent30},itemStyle:{color:N.color.accent40}},data:[]}),e})(XD);Jt(iH,cl.prototype);var nH=iH;var iet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(Ot),oH=iet;var net=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this,t,a,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(ur),sH=net;var qD=Math.PI,lH=ot(),oet=(function(r){I(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,a){this.api=a},e.prototype.render=function(t,a,i){if(this.model=t,this.api=i,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return re("nameValue",{noName:!0,value:c})},T(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,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,a){var i=t.get(["label","position"]),n=t.get("orient"),o=uet(t,a),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2<a.getHeight()/2?"-":"+":o.x+o.width/2<a.getWidth()/2?"+":"-":W(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:qD/2},f=n==="vertical"?o.height:o.width,p=t.getModel("controlStyle"),h=p.get("show",!0),d=h?p.get("itemSize"):0,v=h?p.get("itemGap"):0,m=d+v,g=t.get(["label","rotate"])||0;g=g*qD/180;var y,x,_,b=p.get("position",!0),S=h&&p.get("showPlayBtn",!0),w=h&&p.get("showPrevBtn",!0),D=h&&p.get("showNextBtn",!0),C=0,M=f;b==="left"||b==="bottom"?(S&&(y=[0,0],C+=m),w&&(x=[C,0],C+=m),D&&(_=[M-d,0],M-=m)):(S&&(y=[M-d,0],M-=m),w&&(x=[0,0],C+=m),D&&(_=[M-d,0],M-=m));var E=[C,M];return t.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:n,rotation:c[n],labelRotation:g,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:y,prevBtnPosition:x,nextBtnPosition:_,axisExtent:E,controlSize:d,controlGap:v}},e.prototype._position=function(t,a){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=fe(),l=o.x,u=o.y+o.height;pr(s,s,[-l,-u]),Sr(s,s,-qD/2),pr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(i.getBoundingRect()),p=y(n.getBoundingRect()),h=[i.x,i.y],d=[n.x,n.y];d[0]=h[0]=c[0][0];var v=t.labelPosOpt;if(v==null||W(v)){var m=v==="+"?0:1;x(h,f,c,1,m),x(d,p,c,1,1-m)}else{var m=v>=0?0:1;x(h,f,c,1,m),d[1]=h[1]+v}i.setPosition(h),n.setPosition(d),i.rotation=n.rotation=t.rotation,g(i),g(n);function g(_){_.originX=c[0][0]-_.x,_.originY=c[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function x(_,b,S,w,D){_[w]+=S[w][D]-b[w][D]}},e.prototype._createAxis=function(t,a){var i=a.getData(),n=a.get("axisType"),o=set(a,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new sH("value",o,t.axisExtent,n);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new K;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var s=new le({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:O({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new le({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:J({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],T(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),p=f.getModel("itemStyle"),h=f.getModel(["emphasis","itemStyle"]),d=f.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:Z(o._changeTimeline,o,u.value)},m=uH(f,p,a,v);m.ensureState("emphasis").style=h.getItemStyle(),m.ensureState("progress").style=d.getItemStyle(),an(m);var g=nt(m);f.get("tooltip")?(g.dataIndex=u.value,g.dataModel=n):g.dataIndex=g.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(t,a,i,n){var o=this,s=i.getLabelModel();if(s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],T(u,function(c){var f=c.tickValue,p=l.getItemModel(f),h=p.getModel("label"),d=p.getModel(["emphasis","label"]),v=p.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),g=new Dt({x:m,y:0,rotation:t.labelRotation-t.rotation,onclick:Z(o._changeTimeline,o,f),silent:!1,style:Gt(h,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});g.ensureState("emphasis").style=Gt(d),g.ensureState("progress").style=Gt(v),a.add(g),an(g),lH(g).dataIndex=f,o._tickLabels.push(g)})}},e.prototype._renderControl=function(t,a,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),c=n.getPlayState(),f=n.get("inverse",!0);p(t.nextBtnPosition,"next",Z(this._changeTimeline,this,f?"-":"+")),p(t.prevBtnPosition,"prev",Z(this._changeTimeline,this,f?"+":"-")),p(t.playPosition,c?"stop":"play",Z(this._handlePlayClick,this,!c),!0);function p(h,d,v,m){if(h){var g=hr(Q(n.get(["controlStyle",d+"BtnSize"]),o),o),y=[0,-g/2,g,g],x=cet(n,d+"Icon",y,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:v});x.ensureState("emphasis").style=u,a.add(x),an(x)}}},e.prototype._renderCurrentPointer=function(t,a,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=Z(u._handlePointerDrag,u),f.ondragend=Z(u._handlePointerDragend,u),cH(f,u._progressLine,s,i,n,!0)},onUpdate:function(f){cH(f,u._progressLine,s,i,n)}};this._currentPointer=uH(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,a,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var i=this._toAxisCoord(t)[0],n=this._axis,o=Xe(n.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(a||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 a=t.model;t._changeTimeline(a.getCurrentIndex()+(a.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var a=this._mainGroup.getLocalTransform();return vr(t,a,!0)},e.prototype._findNearestTick=function(t){var a=this.model.getData(),i=1/0,n,o=this._axis;return a.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<i&&(i=c,n=l)}),n},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var a=this.model.getCurrentIndex();t==="+"?t=a+1:t==="-"&&(t=a-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),a=this._tickSymbols,i=this._tickLabels;if(a)for(var n=0;n<a.length;n++)a&&a[n]&&a[n].toggleState("progress",n<t);if(i)for(var n=0;n<i.length;n++)i&&i[n]&&i[n].toggleState("progress",lH(i[n]).dataIndex<=t)},e.type="timeline.slider",e})(oH);function set(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Xn({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new wm({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new pa}}function uet(r,e){return Bt(r.getBoxLayoutParams(),Zt(r,e).refContainer,r.get("padding"))}function cet(r,e,t,a){var i=a.style,n=Vn(r.get(["controlStyle",e]),a||{},new at(t[0],t[1],t[2],t[3]));return i&&n.setStyle(i),n}function uH(r,e,t,a,i,n){var o=e.get("color");if(i)i.setColor(o),t.add(i),n&&n.onUpdate(i);else{var s=r.get("symbol");i=jt(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),t.add(i),n&&n.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),a=dt({rectHover:!0,z2:100},a,!0);var u=Pi(r.get("symbolSize"));a.scaleX=u[0]/2,a.scaleY=u[1]/2;var c=Da(r.get("symbolOffset"),u);c&&(a.x=(a.x||0)+c[0],a.y=(a.y||0)+c[1]);var f=r.get("symbolRotate");return a.rotation=(f||0)*Math.PI/180||0,i.attr(a),i.updateTransform(),i}function cH(r,e,t,a,i,n){if(!r.dragging){var o=i.getModel("checkpointStyle"),s=a.dataToCoord(i.getData().get("value",t));if(n||!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)}}}var fH=oet;function pH(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,a){var i=t.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),a.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),J({currentIndex:i.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var a=t.getComponent("timeline");a&&e.playState!=null&&a.setPlayState(e.playState)})}function jD(r){var e=r&&r.timeline;z(e)||(e=e?[e]:[]),T(e,function(t){t&&fet(t)})}function fet(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),hH(r),Ol(r,"controlPosition")){var a=r.controlStyle||(r.controlStyle={});Ol(a,"position")||(a.position=r.controlPosition),a.position==="none"&&!Ol(a,"show")&&(a.show=!1,delete a.position),delete r.controlPosition}T(r.data||[],function(i){et(i)&&!z(i)&&(!Ol(i,"value")&&Ol(i,"name")&&(i.value=i.name),hH(i))})}function hH(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),a=r.label||r.label||{},i=a.normal||(a.normal={}),n={normal:1,emphasis:1};T(a,function(o,s){!n[s]&&!Ol(i,s)&&(i[s]=o)}),t.label&&!Ol(a,"emphasis")&&(a.emphasis=t.label,delete t.label)}function Ol(r,e){return r.hasOwnProperty(e)}function $D(r){r.registerComponentModel(nH),r.registerComponentView(fH),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),pH(r),r.registerPreprocessor(jD)}function zl(r,e){if(!r)return!1;for(var t=z(r)?r:[r],a=0;a<t.length;a++)if(t[a]&&t[a][e])return!0;return!1}function Dy(r){ba(r,"label",["show"])}var Cy=ot(),dH=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t.preventAutoZ=!0,t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Lt.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,a){this._mergeOption(t,a,!1,!1)},e.prototype._mergeOption=function(t,a,i,n){var o=this.mainType;i||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Cy(s)[o];if(!l||!l.data){Cy(s)[o]=null;return}u?u._mergeOption(l,a,!0):(n&&Dy(l),T(l.data,function(c){c instanceof Array?(Dy(c[0]),Dy(c[1])):Dy(c)}),u=this.createMarkerModelFromSeries(l,this,a),O(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Cy(s)[o]=u},this)},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return re("section",{header:this.name,blocks:[re("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,a){var i=cl.prototype.getDataParams.call(this,t,a),n=this.__hostSeries;return n&&(i.seriesId=n.id,i.seriesName=n.name,i.seriesType=n.subType),i},e.getMarkerModelFromSeries=function(t,a){return Cy(t)[a]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(St);Jt(dH,cl.prototype);var Ir=dH;var pet=(function(r){I(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,a,i){return new e(t,a,i)},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})(Ir),vH=pet;function KD(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function het(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function My(r,e,t,a,i,n,o){var s=[],l=Ca(e,i),u=l?e.getCalculationInfo("stackResultDimension"):i,c=rh(e,u,r),f=e.hostModel,p=f.indicesOfNearest(t,u,c)[0];s[n]=e.get(a,p),s[o]=e.get(u,p);var h=e.get(i,p),d=kr(e.get(i,p));return d=Math.min(d,20),d>=0&&(s[o]=+s[o].toFixed(d)),[s,h]}var Ey={min:ut(My,"min"),max:ut(My,"max"),average:ut(My,"average"),median:ut(My,"median")};function is(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,i=a&&a.dimensions;if(!het(e)&&!z(e.coord)&&z(i)){var n=JD(e,t,a,r);if(e=tt(e),e.type&&Ey[e.type]&&n.baseAxis&&n.valueAxis){var o=lt(i,n.baseAxis.dim),s=lt(i,n.valueAxis.dim),l=Ey[e.type](t,n.valueAxis.dim,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!z(i)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&Ey[e.type]){var c=a.getOtherAxis(u);c&&(e.value=rh(t,t.mapDimension(c.dim),e.type))}}else for(var f=e.coord,p=0;p<2;p++)Ey[f[p]]&&(f[p]=rh(t,t.mapDimension(i[p]),f[p]));return e}}function JD(r,e,t,a){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis(det(a,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function det(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function ns(r,e){return r&&r.containData&&e.coord&&!KD(e)?r.containData(e.coord):!0}function mH(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!KD(e)&&!KD(t)?r.containZone(e.coord,t.coord):!0}function Ay(r,e){return r?function(t,a,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return Ja(o,e[n])}:function(t,a,i,n){return Ja(t.value,e[n])}}function rh(r,e,t){if(t==="average"){var a=0,i=0;return r.each(e,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var tC=ot(),vet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=q()},e.prototype.render=function(t,a,i){var n=this,o=this.markerGroupMap;o.each(function(s){tC(s).keep=!1}),a.eachSeries(function(s){var l=Ir.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,a,i)}),o.each(function(s){!tC(s).keep&&n.group.remove(s.group)}),met(a,o,this.type)},e.prototype.markKeep=function(t){tC(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var i=this;T(t,function(n){var o=Ir.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?Od(l):Tf(l))})}})},e.type="marker",e})(Ot);function met(r,e,t){r.eachSeries(function(a){var i=Ir.getMarkerModelFromSeries(a,t),n=e.get(a.id);if(i&&n&&n.group){var o=ja(i),s=o.z,l=o.zlevel;Js(n.group,s,l)}})}var Sc=vet;function gH(r,e,t){var a=e.coordinateSystem,i=t.getWidth(),n=t.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:n,p=u&&o?o.x:0,h=u&&o?o.y:0,d,v=j(l.get("x"),c)+p,m=j(l.get("y"),f)+h;if(!isNaN(v)&&!isNaN(m))d=[v,m];else if(e.getMarkerPosition)d=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var g=r.get(a.dimensions[0],s),y=r.get(a.dimensions[1],s);d=a.dataToPoint([g,y])}isNaN(v)||(d[0]=v),isNaN(m)||(d[1]=m),r.setItemLayout(s,d)})}var get=(function(r){I(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,a,i){a.eachSeries(function(n){var o=Ir.getMarkerModelFromSeries(n,"markPoint");o&&(gH(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new mn),f=yet(o,t,a);a.setData(f),gH(a.getData(),t,n),f.each(function(p){var h=f.getItemModel(p),d=h.getShallow("symbol"),v=h.getShallow("symbolSize"),m=h.getShallow("symbolRotate"),g=h.getShallow("symbolOffset"),y=h.getShallow("symbolKeepAspect");if($(d)||$(v)||$(m)||$(g)){var x=a.getRawValue(p),_=a.getDataParams(p);$(d)&&(d=d(x,_)),$(v)&&(v=v(x,_)),$(m)&&(m=m(x,_)),$(g)&&(g=g(x,_))}var b=h.getModel("itemStyle").getItemStyle(),S=h.get("z2"),w=cn(l,"color");b.fill||(b.fill=w),f.setItemVisual(p,{z2:Q(S,0),symbol:d,symbolSize:v,symbolRotate:m,symbolOffset:g,symbolKeepAspect:y,style:b})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(p){p.traverse(function(h){nt(h).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e})(Sc);function yet(r,e,t){var a;r?a=V(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return O(O({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new we(a,t),n=V(t.get("data"),ut(is,e));r&&(n=At(n,ut(ns,r)));var o=Ay(!!r,a);return i.initData(n,null,o),i}var yH=get;function eC(r){r.registerComponentModel(vH),r.registerComponentView(yH),r.registerPreprocessor(function(e){zl(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var xet=(function(r){I(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,a,i){return new e(t,a,i)},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})(Ir),xH=xet;var Ly=ot(),_et=function(r,e,t,a){var i=r.getData(),n;if(z(a))n=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=de(a.yAxis,a.xAxis);else{var u=JD(a,i,e,r);s=u.valueAxis;var c=ym(i,u.valueDataDim);l=rh(i,c,o)}var f=s.dim==="x"?0:1,p=1-f,h=tt(a),d={coord:[]};h.type=null,h.coord=[],h.coord[p]=-1/0,d.coord[p]=1/0;var v=t.get("precision");v>=0&&yt(l)&&(l=+l.toFixed(Math.min(v,20))),h.coord[f]=d.coord[f]=l,n=[h,d,{type:o,valueIndex:a.valueIndex,value:l}]}else n=[]}var m=[is(r,n[0]),is(r,n[1]),O({},n[2])];return m[2].type=m[2].type||null,dt(m[2],m[0]),dt(m[2],m[1]),m};function Iy(r){return!isNaN(r)&&!isFinite(r)}function _H(r,e,t,a){var i=1-r,n=a.dimensions[r];return Iy(e[i])&&Iy(t[i])&&e[r]===t[r]&&a.getAxis(n).containData(e[r])}function bet(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(_H(1,t,a,r)||_H(0,t,a,r)))return!0}return ns(r,e[0])&&ns(r,e[1])}function rC(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=j(o.get("x"),i.getWidth()),u=j(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=n.dimensions,f=r.get(c[0],e),p=r.get(c[1],e);s=n.dataToPoint([f,p])}if(Ma(n,"cartesian2d")){var h=n.getAxis("x"),d=n.getAxis("y"),c=n.dimensions;Iy(r.get(c[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):Iy(r.get(c[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var wet=(function(r){I(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,a,i){a.eachSeries(function(n){var o=Ir.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=Ly(o).from,u=Ly(o).to;l.each(function(c){rC(l,c,!0,n,i),rC(u,c,!1,n,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new rc);this.group.add(c.group);var f=Tet(o,t,a),p=f.from,h=f.to,d=f.line;Ly(a).from=p,Ly(a).to=h,a.setData(d);var v=a.get("symbol"),m=a.get("symbolSize"),g=a.get("symbolRotate"),y=a.get("symbolOffset");z(v)||(v=[v,v]),z(m)||(m=[m,m]),z(g)||(g=[g,g]),z(y)||(y=[y,y]),f.from.each(function(_){x(p,_,!0),x(h,_,!1)}),d.each(function(_){var b=d.getItemModel(_),S=b.getModel("lineStyle").getLineStyle();d.setItemLayout(_,[p.getItemLayout(_),h.getItemLayout(_)]);var w=b.get("z2");S.stroke==null&&(S.stroke=p.getItemVisual(_,"style").fill),d.setItemVisual(_,{z2:Q(w,0),fromSymbolKeepAspect:p.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:p.getItemVisual(_,"symbolOffset"),fromSymbolRotate:p.getItemVisual(_,"symbolRotate"),fromSymbolSize:p.getItemVisual(_,"symbolSize"),fromSymbol:p.getItemVisual(_,"symbol"),toSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(_,"symbolOffset"),toSymbolRotate:h.getItemVisual(_,"symbolRotate"),toSymbolSize:h.getItemVisual(_,"symbolSize"),toSymbol:h.getItemVisual(_,"symbol"),style:S})}),c.updateData(d),f.line.eachItemGraphicEl(function(_){nt(_).dataModel=a,_.traverse(function(b){nt(b).dataModel=a})});function x(_,b,S){var w=_.getItemModel(b);rC(_,b,S,t,n);var D=w.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=cn(l,"color")),_.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Q(w.get("symbolOffset",!0),y[S?0:1]),symbolRotate:Q(w.get("symbolRotate",!0),g[S?0:1]),symbolSize:Q(w.get("symbolSize"),m[S?0:1]),symbol:Q(w.get("symbol",!0),v[S?0:1]),style:D})}this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e})(Sc);function Tet(r,e,t){var a;r?a=V(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return O(O({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new we(a,t),n=new we(a,t),o=new we([],t),s=V(t.get("data"),ut(_et,e,r,t));r&&(s=At(s,ut(bet,r)));var l=Ay(!!r,a);return i.initData(V(s,function(u){return u[0]}),null,l),n.initData(V(s,function(u){return u[1]}),null,l),o.initData(V(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}var bH=wet;function aC(r){r.registerComponentModel(xH),r.registerComponentView(bH),r.registerPreprocessor(function(e){zl(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Det=(function(r){I(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,a,i){return new e(t,a,i)},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})(Ir),SH=Det;var Py=ot(),Cet=function(r,e,t,a){var i=a[0],n=a[1];if(!(!i||!n)){var o=is(r,i),s=is(r,n),l=o.coord,u=s.coord;l[0]=de(l[0],-1/0),l[1]=de(l[1],-1/0),u[0]=de(u[0],1/0),u[1]=de(u[1],1/0);var c=Yl([{},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 ky(r){return!isNaN(r)&&!isFinite(r)}function wH(r,e,t,a){var i=1-r;return ky(e[i])&&ky(t[i])}function Met(r,e){var t=e.coord[0],a=e.coord[1],i={coord:t,x:e.x0,y:e.y0},n={coord:a,x:e.x1,y:e.y1};return Ma(r,"cartesian2d")?t&&a&&(wH(1,t,a,r)||wH(0,t,a,r))?!0:mH(r,i,n):ns(r,i)||ns(r,n)}function TH(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=j(o.get(t[0]),i.getWidth()),u=j(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),p=n.clampData(c),h=n.clampData(f),d=[];t[0]==="x0"?d[0]=p[0]>h[0]?f[0]:c[0]:d[0]=p[0]>h[0]?c[0]:f[0],t[1]==="y0"?d[1]=p[1]>h[1]?f[1]:c[1]:d[1]=p[1]>h[1]?c[1]:f[1],s=a.getMarkerPosition(d,t,!0)}else{var v=r.get(t[0],e),m=r.get(t[1],e),g=[v,m];n.clampData&&n.clampData(g,g),s=n.dataToPoint(g,!0)}if(Ma(n,"cartesian2d")){var y=n.getAxis("x"),x=n.getAxis("y"),v=r.get(t[0],e),m=r.get(t[1],e);ky(v)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):ky(m)&&(s[1]=x.toGlobalCoord(x.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var DH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Eet=(function(r){I(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,a,i){a.eachSeries(function(n){var o=Ir.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=V(DH,function(f){return TH(s,l,f,n,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new K});this.group.add(c.group),this.markKeep(c);var f=Aet(o,t,a);a.setData(f),f.each(function(p){var h=V(DH,function(M){return TH(f,p,M,t,n)}),d=o.getAxis("x").scale,v=o.getAxis("y").scale,m=d.getExtent(),g=v.getExtent(),y=[d.parse(f.get("x0",p)),d.parse(f.get("x1",p))],x=[v.parse(f.get("y0",p)),v.parse(f.get("y1",p))];Xe(y),Xe(x);var _=!(m[0]>y[1]||m[1]<y[0]||g[0]>x[1]||g[1]<x[0]),b=!_;f.setItemLayout(p,{points:h,allClipped:b});var S=f.getItemModel(p),w=S.getModel("itemStyle").getItemStyle(),D=S.get("z2"),C=cn(l,"color");w.fill||(w.fill=C,W(w.fill)&&(w.fill=ws(w.fill,.4))),w.stroke||(w.stroke=C),f.setItemVisual(p,"style",w),f.setItemVisual(p,"z2",Q(D,0))}),f.diff(Py(c).data).add(function(p){var h=f.getItemLayout(p),d=f.getItemVisual(p,"z2");if(!h.allClipped){var v=new ye({z2:Q(d,0),shape:{points:h.points}});f.setItemGraphicEl(p,v),c.group.add(v)}}).update(function(p,h){var d=Py(c).data.getItemGraphicEl(h),v=f.getItemLayout(p),m=f.getItemVisual(p,"z2");v.allClipped?d&&c.group.remove(d):(d?wt(d,{z2:Q(m,0),shape:{points:v.points}},a,p):d=new ye({shape:{points:v.points}}),f.setItemGraphicEl(p,d),c.group.add(d))}).remove(function(p){var h=Py(c).data.getItemGraphicEl(p);c.group.remove(h)}).execute(),f.eachItemGraphicEl(function(p,h){var d=f.getItemModel(h),v=f.getItemVisual(h,"style");p.useStyle(f.getItemVisual(h,"style")),$t(p,qt(d),{labelFetcher:a,labelDataIndex:h,defaultText:f.getName(h)||"",inheritColor:W(v.fill)?ws(v.fill,1):N.color.neutral99}),te(p,d),Rt(p,null,null,d.get(["emphasis","disabled"])),nt(p).dataModel=a}),Py(c).data=f,c.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e})(Sc);function Aet(r,e,t){var a,i,n=["x0","y0","x1","y1"];if(r){var o=V(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return O(O({},f),{name:u,ordinalMeta:null})});i=V(n,function(u,c){return{name:u,type:o[c%2].type}}),a=new we(i,t)}else i=[{name:"value",type:"float"}],a=new we(i,t);var s=V(t.get("data"),ut(Cet,e,r,t));r&&(s=At(s,ut(Met,r)));var l=r?function(u,c,f,p){var h=u.coord[Math.floor(p/2)][p%2];return Ja(h,i[p])}:function(u,c,f,p){return Ja(u.value,i[p])};return a.initData(s,null,l),a.hasItemOption=!0,a}var CH=Eet;function iC(r){r.registerComponentModel(SH),r.registerComponentView(CH),r.registerPreprocessor(function(e){zl(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Let=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"])}},Iet=(function(r){I(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,a,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,i=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),z(a)&&T(a,function(n,o){W(n)&&(n={type:n}),a[o]=dt(n,Let(i,n.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),a=!0;break}}!a&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var a=[],i=[];t.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,p=f.getAllNames();t.isSeriesFiltered(l)||(i=i.concat(p)),p.length?a=a.concat(p):c=!0}else c=!0;c&&lu(l)&&a.push(l.name)}),this._availableNames=i;var n=this.get("data")||a,o=q(),s=V(n,function(l){return(W(l)||yt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Mt(l,this,this.ecModel))},this);this._data=At(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var a=this.option.selected,i=this.get("selectedMode");if(i==="single"){var n=this._data;T(n,function(o){a[o.get("name")]=!1})}a[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var a=this.option.selected;a.hasOwnProperty(t)||(a[t]=!0),this[a[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,a=this.option.selected;T(t,function(i){a[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,a=this.option.selected;T(t,function(i){var n=i.get("name",!0);a.hasOwnProperty(n)||(a[n]=!0),a[n]=!a[n]})},e.prototype.isSelected=function(t){var a=this.option.selected;return!(a.hasOwnProperty(t)&&!a[t])&<(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",bottom:N.size.m,align:"auto",backgroundColor:N.color.transparent,borderColor:N.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:N.color.disabled,inactiveBorderColor:N.color.disabled,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:N.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:N.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:N.color.tertiary,borderWidth:1,borderColor:N.color.border},emphasis:{selectorLabel:{show:!0,color:N.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(St),ah=Iet;var wc=ut,nC=T,Ry=K,Pet=(function(r){I(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 Ry),this.group.add(this._selectorGroup=new Ry),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,i){var n=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,a,i,l,s,u);var c=Zt(t,i).refContainer,f=t.getBoxLayoutParams(),p=t.get("padding"),h=Bt(f,c,p),d=this.layoutInner(t,o,h,n,l,u),v=Bt(J({width:d.width,height:d.height},f),c,p);this.group.x=v.x-d.x,this.group.y=v.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=xy(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,i,n,o,s,l){var u=this.getContentGroup(),c=q(),f=a.get("selectedMode"),p=a.get("triggerEvent"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),nC(a.getData(),function(d,v){var m=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
|
|
`)){var y=new Ry;y.newline=!0,u.add(y);return}var x=i.getSeriesByName(g)[0];if(!c.get(g))if(x){var _=x.getData(),b=_.getVisual("legendLineStyle")||{},S=_.getVisual("legendIcon"),w=_.getVisual("style"),D=this._createItem(x,g,v,d,a,t,b,w,S,f,n);D.on("click",wc(MH,g,null,n,h)).on("mouseover",wc(oC,x.name,null,n,h)).on("mouseout",wc(sC,x.name,null,n,h)),i.ssr&&D.eachChild(function(C){var M=nt(C);M.seriesIndex=x.seriesIndex,M.dataIndex=v,M.ssrType="legend"}),p&&D.eachChild(function(C){m.packEventData(C,a,x,v,g)}),c.set(g,!0)}else i.eachRawSeries(function(C){var M=this;if(!c.get(g)&&C.legendVisualProvider){var E=C.legendVisualProvider;if(!E.containName(g))return;var L=E.indexOfName(g),A=E.getItemVisual(L,"style"),P=E.getItemVisual(L,"legendIcon"),R=Ze(A.fill);R&&R[3]===0&&(R[3]=.2,A=O(O({},A),{fill:Jr(R,"rgba")}));var k=this._createItem(C,g,v,d,a,t,{},A,P,f,n);k.on("click",wc(MH,null,g,n,h)).on("mouseover",wc(oC,null,g,n,h)).on("mouseout",wc(sC,null,g,n,h)),i.ssr&&k.eachChild(function(B){var U=nt(B);U.seriesIndex=C.seriesIndex,U.dataIndex=v,U.ssrType="legend"}),p&&k.eachChild(function(B){M.packEventData(B,a,C,v,g)}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,a,n,s,l)},e.prototype.packEventData=function(t,a,i,n,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:n,value:o,seriesIndex:i.seriesIndex};nt(t).eventData=s},e.prototype._createSelector=function(t,a,i,n,o){var s=this.getSelectorGroup();nC(t,function(u){var c=u.type,f=new Dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(f);var p=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);$t(f,{normal:p,emphasis:h},{defaultText:u.title}),an(f)})},e.prototype._createItem=function(t,a,i,n,o,s,l,u,c,f,p){var h=t.visualDrawType,d=o.get("itemWidth"),v=o.get("itemHeight"),m=o.isSelected(a),g=n.get("symbolRotate"),y=n.get("symbolKeepAspect"),x=n.get("icon");c=x||c||"roundRect";var _=ket(c,n,l,u,h,m,p),b=new Ry,S=n.getModel("textStyle");if($(t.getLegendIcon)&&(!x||x==="inherit"))b.add(t.getLegendIcon({itemWidth:d,itemHeight:v,icon:c,iconRotate:g,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var w=x==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;b.add(Ret({itemWidth:d,itemHeight:v,icon:c,iconRotate:w,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}))}var D=s==="left"?d+5:-5,C=s,M=o.get("formatter"),E=a;W(M)&&M?E=M.replace("{name}",a!=null?a:""):$(M)&&(E=M(a));var L=m?S.getTextColor():n.get("inactiveColor");b.add(new Dt({style:Gt(S,{text:E,x:D,y:v/2,fill:L,align:C,verticalAlign:"middle"},{inheritColor:L})}));var A=new ht({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=n.getModel("tooltip");return P.get("show")&&Er({el:A,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(A),b.eachChild(function(R){R.silent=!0}),A.silent=!f,this.getContentGroup().add(b),an(b),b.__legendDataIndex=i,b},e.prototype.layoutInner=function(t,a,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ai(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ai("horizontal",u,t.get("selectorItemGap",!0));var p=u.getBoundingRect(),h=[-p.x,-p.y],d=t.get("selectorButtonGap",!0),v=t.getOrient().index,m=v===0?"width":"height",g=v===0?"height":"width",y=v===0?"y":"x";s==="end"?h[v]+=c[m]+d:f[v]+=p[m]+d,h[1-v]+=c[g]/2-p[g]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var x={x:0,y:0};return x[m]=c[m]+d+p[m],x[g]=Math.max(c[g],p[g]),x[y]=Math.min(0,p[y]+h[1-v]),x}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})(Ot);function ket(r,e,t,a,i,n,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),nC(m,function(y,x){m[x]==="inherit"&&(m[x]=g[x])})}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"?a.decal:ki(f,o),u.fill==="inherit"&&(u.fill=a[i]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?a:t).opacity),s(u,a);var p=e.getModel("lineStyle"),h=p.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),h.stroke==="auto"&&(h.stroke=a.fill),!n){var d=e.get("inactiveBorderWidth"),v=u[c];u.lineWidth=d==="auto"?a.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function Ret(r){var e=r.icon||"roundRect",t=jt(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=N.color.neutral00,t.style.lineWidth=2),t}function MH(r,e,t,a){sC(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),oC(r,e,t,a)}function EH(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,i=e.length;a<i&&!(t=e[a].states.emphasis);)a++;return t&&t.hoverLayer}function oC(r,e,t,a){EH(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:a})}function sC(r,e,t,a){EH(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:a})}var Ny=Pet;function lC(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var a=0;a<e.length;a++)if(!e[a].isSelected(t.name))return!1;return!0})}function ih(r,e,t){var a=r==="allSelect"||r==="inverseSelect",i={},n=[];t.eachComponent({mainType:"legend",query:e},function(s){a?s[r]():s[r](e.name),AH(s,i),n.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){T(i,function(l,u){s[l?"select":"unSelect"](u)}),AH(s,o)}),a?{selected:o,legendIndex:n}:{name:e.name,selected:o}}function AH(r,e){var t=e||{};return T(r.getData(),function(a){var i=a.get("name");if(!(i===`
|
|
`||i==="")){var n=r.isSelected(i);it(t,i)?t[i]=t[i]&&n:t[i]=n}}),t}function LH(r){r.registerAction("legendToggleSelect","legendselectchanged",ut(ih,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",ut(ih,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",ut(ih,"inverseSelect")),r.registerAction("legendSelect","legendselected",ut(ih,"select")),r.registerAction("legendUnSelect","legendunselected",ut(ih,"unSelect"))}function Oy(r){r.registerComponentModel(ah),r.registerComponentView(Ny),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,lC),r.registerSubTypeDefaulter("legend",function(){return"plain"}),LH(r)}var Net=(function(r){I(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,a,i){var n=la(t);r.prototype.init.call(this,t,a,i),IH(this,t,n)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),IH(this,this.option,t)},e.type="legend.scroll",e.defaultOption=Ar(ah.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:N.color.accent50,pageIconInactiveColor:N.color.accent10,pageIconSize:15,pageTextStyle:{color:N.color.tertiary},animationDurationUpdate:800}),e})(ah);function IH(r,e,t){var a=r.getOrient(),i=[1,1];i[a.index]=0,mr(e,t,{type:"box",ignoreSize:!!i})}var PH=Net;var kH=K,uC=["width","height"],cC=["x","y"],Oet=(function(r){I(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 kH),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new kH)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,a,i,n,o,s,l){var u=this;r.prototype.renderInner.call(this,t,a,i,n,o,s,l);var c=this._controllerGroup,f=a.get("pageIconSize",!0),p=z(f)?f:[f,f];d("pagePrev",0);var h=a.getModel("pageTextStyle");c.add(new Dt({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(v,m){var g=v+"DataIndex",y=Vn(a.get("pageIcons",!0)[a.getOrient().name][m],{onclick:Z(u._pageGo,u,g,a,n)},{x:-p[0]/2,y:-p[1]/2,width:p[0],height:p[1]});y.name=v,c.add(y)}},e.prototype.layoutInner=function(t,a,i,n,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=uC[u],f=cC[u],p=uC[1-u],h=cC[1-u];o&&Ai("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),v=l.getBoundingRect(),m=[-v.x,-v.y],g=tt(i);o&&(g[c]=i[c]-v[c]-d);var y=this._layoutContentAndController(t,n,g,u,c,p,h,f);if(o){if(s==="end")m[u]+=y[c]+d;else{var x=v[c]+d;m[u]-=x,y[f]-=x}y[c]+=v[c]+d,m[1-u]+=y[h]+y[p]/2-v[p]/2,y[p]=Math.max(y[p],v[p]),y[h]=Math.min(y[h],v[h]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return y},e.prototype._layoutContentAndController=function(t,a,i,n,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,p=this._controllerGroup;Ai(t.get("orient"),c,t.get("itemGap"),n?i.width:null,n?null:i.height),Ai("horizontal",p,t.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),d=p.getBoundingRect(),v=this._showController=h[o]>i[o],m=[-h.x,-h.y];a||(m[n]=c[u]);var g=[0,0],y=[-d.x,-d.y],x=Q(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(v){var _=t.get("pageButtonPosition",!0);_==="end"?y[n]+=i[o]-d[o]:g[n]+=d[o]+x}y[1-n]+=h[s]/2-d[s]/2,c.setPosition(m),f.setPosition(g),p.setPosition(y);var b={x:0,y:0};if(b[o]=v?i[o]:h[o],b[s]=Math.max(h[s],d[s]),b[l]=Math.min(0,d[l]+y[1-n]),f.__rectSize=i[o],v){var S={x:0,y:0};S[o]=Math.max(i[o]-d[o]-x,0),S[s]=b[s],f.setClipPath(new ht({shape:S})),f.__rectSize=S[o]}else p.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&wt(c,{x:w.contentPosition[0],y:w.contentPosition[1]},v?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,i){var n=this._getPageInfo(a)[t];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var i=this._controllerGroup;T(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",p=a[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",p?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=p?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;n&&o&&n.setStyle("text",W(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=uC[o],l=cC[o],u=this._findTargetItemIndex(a),c=i.children(),f=c[u],p=c.length,h=p?1:0,d={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var v=_(f);d.contentPosition[o]=-v.s;for(var m=u+1,g=v,y=v,x=null;m<=p;++m)x=_(c[m]),(!x&&y.e>g.s+n||x&&!b(x,g.s))&&(y.i>g.i?g=y:g=x,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=x;for(var m=u-1,g=v,y=v,x=null;m>=-1;--m)x=_(c[m]),(!x||!b(y,x.s))&&g.i<y.i&&(y=g,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=x;return d;function _(S){if(S){var w=S.getBoundingRect(),D=w[l]+S[l];return{s:D,e:D+w[s],i:S.__legendDataIndex}}}function b(S,w){return S.e>=w&&S.s<=w+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(a=s)}),a!=null?a:n},e.type="legend.scroll",e})(Ny),RH=Oet;function fC(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(a)})})}function NH(r){Tt(Oy),r.registerComponentModel(PH),r.registerComponentView(RH),fC(r)}function pC(r){Tt(Oy),Tt(NH)}var zet=(function(r){I(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=Ar(es.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(es),OH=zet;var hC=ot();function zH(r,e,t){hC(r).coordSysRecordMap.each(function(a){var i=a.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function VH(r,e){for(var t=hC(r).coordSysRecordMap,a=t.keys(),i=0;i<a.length;i++){var n=a[i],o=t.get(n),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||BH(t,o))}}}function BH(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Vet(r,e){var t={model:e,containsPoint:ut(Uet,e),dispatchAction:ut(Bet,r),dataZoomInfoMap:null,controller:null},a=t.controller=new va(r.getZr());return T(["pan","zoom","scrollMove"],function(i){a.on(i,function(n){var o=[];t.dataZoomInfoMap.each(function(s){if(n.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,n);!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 Bet(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Uet(r,e,t,a){return r.coordinateSystem.containPoint([t,a])}function Fet(r,e,t){var a,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;n[i+u]>n[i+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function UH(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=hC(t),i=a.coordSysRecordMap||(a.coordSysRecordMap=q());i.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=gy(n);T(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Vet(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());c.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){BH(i,n);return}var c=Fet(l,n,t);o.enable(c.controlType,c.opt),Qa(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Get=(function(r){I(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,a,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),zH(i,t,{pan:Z(dC.pan,this),zoom:Z(dC.zoom,this),scrollMove:Z(dC.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){VH(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(xc),dC={zoom:function(r,e,t,a){var i=this.range,n=i.slice(),o=r.axisModels[0];if(o){var s=vC[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Yr(0,n,[0,100],0,c.minSpan,c.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:FH(function(r,e,t,a,i,n){var o=vC[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:FH(function(r,e,t,a,i,n){var o=vC[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*n.scrollDelta})};function FH(r){return function(e,t,a,i){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,a,i);if(Yr(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var vC={grid:function(r,e,t,a,i){var n=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],n.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(r,e,t,a,i){var n=t.axis,o={},s=i.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=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(r,e,t,a,i){var n=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},HH=Get;function nh(r){Nl(r),r.registerComponentModel(OH),r.registerComponentView(HH),UH(r)}var Wet=(function(r){I(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=Ar(es.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:N.color.accent10,borderRadius:0,backgroundColor:N.color.transparent,dataBackground:{lineStyle:{color:N.color.accent30,width:.5},areaStyle:{color:N.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:N.color.accent40,width:.5},areaStyle:{color:N.color.accent20,opacity:.3}},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:N.color.neutral00,borderColor:N.color.accent20},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:N.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:N.color.tertiary},brushSelect:!0,brushStyle:{color:N.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:N.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(es),GH=Wet;var oh=ht,Yet=1,mC=30,Zet=7,sh="horizontal",WH="vertical",Xet=5,qet=["line","bar","candlestick","scatter"],jet={easing:"cubicOut",duration:100,delay:0},$et=(function(r){I(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,a){this.api=a,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},e.prototype.render=function(t,a,i,n){if(r.prototype.render.apply(this,arguments),Qa(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}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Wn(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 a=this._displayables.sliderGroup=new K;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,i=t.get("brushSelect"),n=i?Zet:0,o=Zt(t,a).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===sh?{right:o.width-s.x-s.width,top:o.height-mC-l-n,width:s.width,height:mC}:{right:l,top:s.y,width:mC,height:s.height},c=la(t.option);T(["right","top","width","height"],function(p){c[p]==="ph"&&(c[p]=u[p])});var f=Bt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===WH&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===sh&&!o?{scaleY:l?1:-1,scaleX:1}:i===sh&&o?{scaleY:l?1:-1,scaleX:-1}:i===WH&&!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=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new oh({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new oh({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();n?(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)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==i[0]||a[1]!==i[1]){var f=o.getDataExtent(t.thisDim),p=o.getDataExtent(l),h=(p[1]-p[0])*.3;p=[p[0]-h,p[1]+h];var d=[0,a[1]],v=[0,a[0]],m=[[a[0],0],[0,0]],g=[],y=v[1]/Math.max(1,o.count()-1),x=a[0]/(f[1]-f[0]),_=t.thisAxis.type==="time",b=-y,S=Math.round(o.count()/a[0]),w;o.each([t.thisDim,l],function(L,A,P){if(S>0&&P%S){_||(b+=y);return}b=_?(+L-f[0])*x:b+y;var R=A==null||isNaN(A)||A==="",k=R?0:zt(A,p,d,!0);R&&!w&&P?(m.push([m[m.length-1][0],0]),g.push([g[g.length-1][0],0])):!R&&w&&(m.push([b,0]),g.push([b,0])),R||(m.push([b,k]),g.push([b,k])),w=R}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var D=this.dataZoomModel;function C(L){var A=D.getModel(L?"selectedDataBackground":"dataBackground"),P=new K,R=new ye({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new he({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(R),P.add(k),P}for(var M=0;M<3;M++){var E=C(M===1);this._displayables.sliderGroup.add(E),this._displayables.dataShadowSegs.push(E)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();T(l,function(u){if(!i&&!(a!==!0&<(qet,u.get("type"))<0)){var c=n.getComponent(li(o),s).axis,f=Ket(o),p,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(p=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var d=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:d,otherDim:f,otherAxisInverse:p}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,i=a.handles=[null,null],n=a.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"),p=a.filler=new oh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(p),o.add(new oh({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:Yet,fill:N.color.transparent}})),T([0,1],function(x){var _=l.get("handleIcon");!jf[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var b=jt(_,-1,0,2,2,null,!0);b.attr({cursor:Jet(this._orient),draggable:!0,drift:Z(this._onDragMove,this,x),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=j(w,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),an(b);var D=l.get("handleColor");D!=null&&(b.style.fill=D),o.add(i[x]=b);var C=l.getModel("textStyle"),M=l.get("handleLabel")||{},E=M.show||!1;t.add(n[x]=new Dt({silent:!0,invisible:!E,style:Gt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var h=p;if(f){var d=j(l.get("moveHandleSize"),s[1]),v=a.moveHandle=new ht({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),m=d*.8,g=a.moveHandleIcon=jt(l.get("moveHandleIcon"),-m/2,-m/2,m,m,N.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));h=a.moveZone=new ht({invisible:!0,shape:{y:s[1]-y,height:d+y}}),h.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(g),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[zt(t[0],[0,100],a,!0),zt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Yr(a,n,o,i.get("zoomLock")?"all":t,s.minSpan!=null?zt(s.minSpan,l,o,!0):null,s.maxSpan!=null?zt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Xe([zt(n[0],o,l,!0),zt(n[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var a=this._displayables,i=this._handleEnds,n=Xe(i.slice()),o=this._size;T([0,1],function(h){var d=a.handles[h],v=this._handleHeight;d.attr({scaleX:v/2,scaleY:v/2,x:i[h]+(h?-1:1),y:o[1]/2-v/2})},this),a.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,n[0],n[1],o[0]],c=0;c<l.length;c++){var f=l[c],p=f.getClipPath();p||(p=new ht,f.setClipPath(p)),p.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var a=this.dataZoomModel,i=this._displayables,n=i.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.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 p=Xe(this._handleEnds.slice());h.call(this,0),h.call(this,1);function h(d){var v=Ci(i.handles[d].parent,this.group),m=Ks(d===0?"right":"left",v),g=this._handleWidth/2+Xet,y=vr([p[d]+(d===0?-g:g),this._size[1]/2],v);n[d].setStyle({x:y[0],y:y[1],verticalAlign:o===sh?"middle":m,align:o===sh?m:"center",text:s[d]})}},e.prototype._formatLabel=function(t,a){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=t==null||isNaN(t)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return $(n)?n(t,s):W(n)?n.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var a=this.dataZoomModel.get("handleLabel")||{},i=a.show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=n.get("show")||!1,s=t||this._dragging?o:i,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,a,i,n){this._dragging=!0,Kr(n.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=vr([a,i],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 a=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>a[0]||i[1]<0||i[1]>a[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,i=t.offsetY;this._brushStart=new pt(a,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var i=a.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Yr(0,l,o,0,u.minSpan!=null?zt(u.minSpan,s,o,!0):null,u.maxSpan!=null?zt(u.maxSpan,s,o,!0):null),this._range=Xe([zt(l[0],o,s,!0),zt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Kr(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new oh({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),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 a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?jet:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=gy(this.dataZoomModel).infoList;if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(xc);function Ket(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Jet(r){return r==="vertical"?"ns-resize":"ew-resize"}var YH=$et;function lh(r){r.registerComponentModel(GH),r.registerComponentView(YH),Nl(r)}function gC(r){Tt(nh),Tt(lh)}var Qet={get:function(r,e,t){var a=tt((trt[r]||{})[e]);return t&&z(a)?a[a.length-1]:a}},trt={color:{active:["#006edd","#e0ffff"],inactive:[N.color.transparent]},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]}},zy=Qet;var ZH=Le.mapVisual,ert=Le.eachVisual,rrt=z,XH=T,art=Xe,irt=zt,nrt=(function(r){I(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,a,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,a){var i=this.option;!a&&wy(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=Z(t,this),this.controllerVisuals=th(this.option.controller,a,t),this.targetVisuals=th(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,a=this.option.seriesIndex;a==null&&t==null&&(a="all");var i=$i(this.ecModel,"series",{index:a,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return V(i,function(n){return n.componentIndex})},e.prototype.eachTargetSeries=function(t,a){T(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(a,n)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(i){i===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],z(t)&&(t=t.slice(),u=!0);var c=a?t:u?[f(t[0]),f(t[1])]:f(t);if(W(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if($(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+c[1]:t[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(p){return p===s[0]?"min":p===s[1]?"max":(+p).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=art([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],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,a=this.option,i={inRange:a.inRange,outOfRange:a.outOfRange},n=a.target||(a.target={}),o=a.controller||(a.controller={});dt(n,i),dt(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),c.call(this,o);function l(f){rrt(a.color)&&!f.inRange&&(f.inRange={color:a.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,p,h){var d=f[p],v=f[h];d&&!v&&(v=f[h]={},XH(d,function(m,g){if(Le.isValidType(g)){var y=zy.get(g,"inactive",s);y!=null&&(v[g]=y,g==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var p=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),v=this.getItemSymbol(),m=v||"roundRect";XH(this.stateList,function(g){var y=this.itemSize,x=f[g];x||(x=f[g]={color:s?d:[d]}),x.symbol==null&&(x.symbol=p&&tt(p)||(s?m:[m])),x.symbolSize==null&&(x.symbolSize=h&&tt(h)||(s?y[0]:[y[0],y[0]])),x.symbol=ZH(x.symbol,function(S){return S==="none"?m:S});var _=x.symbolSize;if(_!=null){var b=-1/0;ert(_,function(S){S>b&&(b=S)}),x.symbolSize=ZH(_,function(S){return irt(S,[0,b],[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,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:N.color.transparent,borderColor:N.color.borderTint,contentColor:N.color.theme[0],inactiveColor:N.color.disabled,borderWidth:0,padding:N.size.m,textGap:10,precision:0,textStyle:{color:N.color.secondary}},e})(St),Tc=nrt;var qH=[20,140],ort=(function(r){I(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,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.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]=qH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=qH[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),T(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=Xe((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]<t[0]&&(a[0]=t[0]),a[1]<t[0]&&(a[1]=t[0]),a},e.prototype.getValueState=function(t){var a=this.option.range,i=this.getExtent(),n=Q(this.option.unboundedRange,!0);return(n&&a[0]<=i[0]||a[0]<=t)&&(n&&a[1]>=i[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),a.push({seriesId:i.id,dataIndex:n})},this),a},e.prototype.getVisualMeta=function(t){var a=jH(this,"outOfRange",this.getExtent()),i=jH(this,"inRange",this.option.range.slice()),n=[];function o(h,d){n.push({value:h,color:t(h,d)})}for(var s=0,l=0,u=i.length,c=a.length;l<c&&(!i.length||a[l]<=i[0]);l++)a[l]<i[s]&&o(a[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&n.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<a[l])&&(f&&(n.length&&o(n[n.length-1].value,"outOfRange"),f=0),o(a[l],"outOfRange"));var p=n.length;return{stops:n,outerColors:[p?n[0].color:"transparent",p?n[p-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Ar(Tc.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:N.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:N.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:N.color.shadow}}),e})(Tc);function jH(r,e,t){if(t[0]===t[1])return t.slice();for(var a=200,i=(t[1]-t[0])/a,n=t[0],o=[],s=0;s<=a&&n<t[1];s++)o.push(n),n+=i;return o.push(t[1]),o}var $H=ort;var srt=(function(r){I(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,a){this.ecModel=t,this.api=a},e.prototype.render=function(t,a,i,n){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,a,i,n)},e.prototype.renderBackground=function(t){var a=this.visualMapModel,i=sn(a.get("padding")||0),n=t.getBoundingRect();t.add(new ht({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,a,i){i=i||{};var n=i.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(h){return s[h]}function c(h,d){s[h]=d}var f=o.controllerVisuals[n||o.getValueState(t)],p=Le.prepareVisualTypes(f);return T(p,function(h){var d=f[h];i.convertOpacityToAlpha&&h==="opacity"&&(h="colorAlpha",d=f.__alphaForOpacity),Le.dependsOn(h,a)&&d&&d.applyVisual(t,u,c)}),s[a]},e.prototype.positionGroup=function(t){var a=this.visualMapModel,i=this.api,n=Zt(a,i).refContainer;Mo(t,a.getBoxLayoutParams(),n)},e.prototype.doRender=function(t,a,i,n){},e.type="visualMap",e})(Ot),Vy=srt;var KH=[["left","right","width"],["top","bottom","height"]];function By(r,e,t){var a=r.option,i=a.align;if(i!=null&&i!=="auto")return i;for(var n={width:e.getWidth(),height:e.getHeight()},o=a.orient==="horizontal"?1:0,s=KH[o],l=[0,null,10],u={},c=0;c<3;c++)u[KH[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:a[s[c]];var f=[["x","width",3],["y","height",0]][o],p=Bt(u,n,a.padding);return s[(p.margin[f[2]]||0)+p[f[0]]+p[f[1]]*.5<n[f[1]]*.5?0:1]}function Dc(r,e){return T(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var bn=zt,lrt=T,QH=Math.min,yC=Math.max,urt=12,crt=6,frt=(function(r){I(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,a){r.prototype.init.call(this,t,a),this._hoverLinkFromSeriesMouseOver=Z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Z(this._hideIndicator,this)},e.prototype.doRender=function(t,a,i,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,a=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(a);var i=t.get("text");this._renderEndsText(a,i,0),this._renderEndsText(a,i,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},e.prototype._renderEndsText=function(t,a,i){if(a){var n=a[1-i];n=n!=null?n+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),p=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new Dt({style:Gt(h,{x:c[0],y:c[1],verticalAlign:h.get("verticalAlign")||(p==="horizontal"?"middle":f),align:h.get("align")||(p==="horizontal"?f:"center"),text:n})}))}},e.prototype._renderBar=function(t){var a=this.visualMapModel,i=this._shapes,n=a.itemSize,o=this._orient,s=this._useHandle,l=By(a,this.api,n),u=i.mainGroup=this._createBarGroup(l),c=new K;u.add(c),c.add(i.outOfRange=tG()),c.add(i.inRange=tG(null,s?rG(this._orient):null,Z(this._dragHandle,this,"all",!1),Z(this._dragHandle,this,"all",!0))),c.setClipPath(new ht({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var f=a.textStyleModel.getTextRect("\u56FD"),p=yC(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(a,u,0,n,p,o),this._createHandle(a,u,1,n,p,o)),this._createIndicator(a,u,n,p,o),t.add(u)},e.prototype._createHandle=function(t,a,i,n,o,s){var l=Z(this._dragHandle,this,i,!1),u=Z(this._dragHandle,this,i,!0),c=hr(t.get("handleSize"),n[0]),f=jt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),p=rG(this._orient);f.attr({cursor:p,draggable:!0,drift:l,ondragend:u,onmousemove:function(g){Kr(g.event)}}),f.x=n[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(),Rn(f,!0),a.add(f);var h=this.visualMapModel.textStyleModel,d=new Dt({cursor:p,draggable:!0,drift:l,onmousemove:function(g){Kr(g.event)},ondragend:u,style:Gt(h,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var v=[c,0],m=this._shapes;m.handleThumbs[i]=f,m.handleLabelPoints[i]=v,m.handleLabels[i]=d},e.prototype._createIndicator=function(t,a,i,n,o){var s=hr(t.get("indicatorSize"),i[0]),l=jt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof se){var c=l.style;l.useStyle(O({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);a.add(l);var f=this.visualMapModel.textStyleModel,p=new Dt({silent:!0,invisible:!0,style:Gt(f,{x:0,y:0,text:""})});this.group.add(p);var h=[(o==="horizontal"?n/2:crt)+i[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=p,d.indicatorLabelPoint=h,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,a,i,n){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([i,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():eG(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,a=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[bn(a[0],i,n,!0),bn(a[1],i,n,!0)]},e.prototype._updateInterval=function(t,a){a=a||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Yr(a,n,o,t,0);var s=i.getExtent();this._dataInterval=[bn(n[0],o,s,!0),bn(n[1],o,s,!0)]},e.prototype._updateView=function(t){var a=this.visualMapModel,i=a.getExtent(),n=this._shapes,o=[0,a.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),n.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,a,i,n){var o={forceState:n,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new Za(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,a){var i=100,n=[],o=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",a),offset:0});for(var s=1;s<i;s++){var l=t[0]+o*s;if(l>t[1])break;n.push({color:this.getControllerVisual(l,"color",a),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),n},e.prototype._createBarPoints=function(t,a){var i=this.visualMapModel.itemSize;return[[i[0]-a[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,i=this.visualMapModel.get("inverse");return new K(a==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent(),c=this._applyTransform("left",i.mainGroup);lrt([0,1],function(f){var p=o[f];p.setStyle("fill",a.handlesColor[f]),p.y=t[f];var h=bn(t[f],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");p.scaleX=p.scaleY=d/l[0],p.x=l[0]-d/2;var v=vr(i.handleLabelPoints[f],Ci(p,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-d)/2:(l[0]-d)/-2;v[1]+=m}s[f].setStyle({x:v[0],y:v[1],text:n.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,i,n){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 p={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",p),d=this.getControllerVisual(t,"symbolSize"),v=bn(t,s,u,!0),m=l[0]-d/2,g={x:f.x,y:f.y};f.y=v,f.x=m;var y=vr(c.indicatorLabelPoint,Ci(f,this.group)),x=c.indicatorLabel;x.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),b=this._orient,S=b==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(a),verticalAlign:S?_:"middle",align:S?"center":_});var w={x:m,y:v,style:{fill:h}},D={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=g.x,f.y=g.y,f.animateTo(w,C),x.animateTo(D,C)}else f.attr(w),x.attr(D);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var E=0;E<M.length;E++)this.api.enterBlur(M[E])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(a){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([a.offsetX,a.offsetY],t._shapes.mainGroup,!0,!0);n[1]=QH(yC(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[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,a){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],s=i.getExtent();t=QH(yC(o[0],t),o[1]);var l=prt(i,s,o),u=[t-l,t+l],c=bn(t,o,s,!0),f=[bn(u[0],o,s,!0),bn(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),a&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var p=this._hoverLinkDataIndices,h=[];(a||eG(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var d=qE(p,h);this._dispatchHighDown("downplay",Dc(d[0],i)),this._dispatchHighDown("highlight",Dc(d[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Ii(t.target,function(l){var u=nt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var i=this.ecModel.getSeriesByIndex(a.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(a.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),a.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 a=this._shapes.handleLabels;if(a)for(var i=0;i<a.length;i++)this.api.leaveBlur(a[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Dc(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,a,i,n){var o=Ci(a,n?null:this.group);return z(t)?vr(t,o,i):Ks(t,o,i)},e.prototype._dispatchHighDown=function(t,a){a&&a.length&&this.api.dispatchAction({type:t,batch:a})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(Vy);function tG(r,e,t,a){return new ye({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(i){Kr(i.event)},ondragend:a})}function prt(r,e,t){var a=urt/2,i=r.get("hoverLinkDataSize");return i&&(a=bn(i,e,t,!0)/2),a}function eG(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function rG(r){return r==="vertical"?"ns-resize":"ew-resize"}var aG=frt;var iG={type:"selectDataRange",event:"dataRangeSelected",update:"update"},nG=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})};var oG=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(a){var i=r.pipelineContext;!a.isTargetSeries(r)||i&&i.large||t.push(XF(a.stateList,a.targetVisuals,Z(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(r)){var n=i.getVisualMeta(Z(hrt,null,r,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(t);o>=0&&(n.dimension=o,a.push(n))}}),r.getData().setVisual("visualMeta",a)}}];function hrt(r,e,t,a){for(var i=e.targetVisuals[a],n=Le.prepareVisualTypes(i),o={color:cn(r.getData(),"color")},s=0,l=n.length;s<l;s++){var u=n[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,p)}return o.color;function f(h){return o[h]}function p(h,d){o[h]=d}}var sG=T;function xC(r){var e=r&&r.visualMap;z(e)||(e=e?[e]:[]),sG(e,function(t){if(t){Cc(t,"splitList")&&!Cc(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var a=t.pieces;a&&z(a)&&sG(a,function(i){et(i)&&(Cc(i,"start")&&!Cc(i,"min")&&(i.min=i.start),Cc(i,"end")&&!Cc(i,"max")&&(i.max=i.end))})}})}function Cc(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var lG=!1;function uh(r){lG||(lG=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(iG,nG),T(oG,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(xC))}function ch(r){r.registerComponentModel($H),r.registerComponentView(aG),uh(r)}var drt=(function(r){I(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,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],vrt[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=tt(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=V(this._pieceList,function(l){return l=tt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},i=Le.listVisualTypes(),n=this.isCategory();T(t.pieces,function(s){T(i,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),T(a,function(s,l){var u=!1;T(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&T(this.stateList,function(c){(t[c]||(t[c]={}))[l]=zy.get(l,c==="inRange"?"active":"inactive",n)})},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,a){var i=this.option,n=this._pieceList,o=(a?i:t).selected||{};if(i.selected=o,T(n,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;T(n,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=tt(t)},e.prototype.getValueState=function(t){var a=Le.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Le.findPieceIndex(l,i);c===t&&o.push(u)},this),a.push({seriesId:n.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var i=t.interval||[];a=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],i=["",""],n=this;function o(c,f){var p=n.getRepresentValue({interval:c});f||(f=n.getValueState(p));var h=t(p,f);c[0]===-1/0?i[0]=h:c[1]===1/0?i[1]=h:a.push({value:c[0],color:h},{value:c[1],color:h})}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 T(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:a,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Ar(Tc.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})(Tc),vrt={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<i;s+=n,o++){var l=o===i-1?a[1]:s+n;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),mx(r),T(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;T(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),uG(e,r)},pieces:function(r){var e=this.option;T(e.pieces,function(t,a){et(t)||(t={value:t});var i={text:"",index:a};if(t.label!=null&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var p=[["gte","gt","min"],["lte","lt","max"]][f],h=0;h<3&&o[f]==null;h++)o[f]=t[p[h]],s[f]=l[h],c[f]=h===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),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Le.retrieveVisuals(t),r.push(i)},this),uG(e,r),mx(r),T(r,function(t){var a=t.close,i=[["<","\u2264"][a[1]],[">","\u2265"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function uG(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var cG=drt;var mrt=(function(r){I(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 a=this.visualMapModel,i=a.get("textGap"),n=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,c=de(a.get("showLabel",!0),!u),f=!a.get("selectedMode");u&&this._renderEndsText(t,u[0],s,c,o),T(l.viewPieceList,function(p){var h=p.piece,d=new K;d.onclick=Z(this._onItemClick,this,h),this._enableHoverLink(d,p.indexInModelPieceList);var v=a.getRepresentValue(h);if(this._createItemSymbol(d,v,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(v),g=n.get("align")||o;d.add(new Dt({style:Gt(n,{x:g==="right"?-i:s[0]+i,y:s[1]/2,text:h.text,verticalAlign:n.get("verticalAlign")||"middle",align:g,opacity:Q(n.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}t.add(d)},this),u&&this._renderEndsText(t,u[1],s,c,o),Ai(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Dc(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return By(t,this.api,t.itemSize);var i=a.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,a,i,n,o){if(a){var s=new K,l=this.visualMapModel.textStyleModel;s.add(new Dt({style:Gt(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=V(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?a.reverse():i&&(i=i.slice().reverse()),{viewPieceList:a,endsText:i}},e.prototype._createItemSymbol=function(t,a,i,n){var o=jt(this.getControllerVisual(a,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(a,"color"));o.silent=n,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,i=a.option,n=i.selectedMode;if(n){var o=tt(i.selected),s=a.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,T(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})(Vy),fG=mrt;function fh(r){r.registerComponentModel(cG),r.registerComponentView(fG),uh(r)}function _C(r){Tt(ch),Tt(fh)}var pG=(function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:f_(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var a=t.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r})();var hG=(function(r){I(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.optionUpdated=function(t,a){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new pG(this);if(this._target=null,this.ecModel.eachSeries(function(i){wT(i,null)}),this.shouldShow()){var a=this.getTarget();wT(a.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:N.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:N.color.neutral30,borderColor:N.color.neutral40,opacity:.3},z:10},e})(St);var mG=(function(r){I(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,a,i){if(this._api=i,this._model=t,this._coordSys||(this._coordSys=new Ia),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var n=this.group;n.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||N.color.neutral00);var l=Zt(t,i).refContainer,u=Bt(Dv(t,!0),l),c=s.lineWidth||0,f=this._contentRect=qa(u.clone(),c/2,!0,!0),p=new K;n.add(p),p.setClipPath(new ht({shape:f.plain()}));var h=this._targetGroup=new K;p.add(h);var d=u.plain();d.r=o.getShallow("borderRadius",!0),n.add(this._bgRect=new ht({style:s,shape:d,silent:!1,cursor:"grab"}));var v=t.getModel("windowStyle"),m=v.getShallow("borderRadius",!0);p.add(this._windowRect=new ht({shape:{x:0,y:0,width:0,height:0,r:m},style:v.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),vG(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),vG(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=this._targetGroup,i=this._coordSys,n=this._contentRect;if(a.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=t.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=Bt({left:"center",top:"center",aspect:s.width/s.height},n);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var a=this._bridgeRendered;a&&a.renderVersion===t.renderVersion&&(a.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=Fe([],t.targetTrans),i=fr([],this._coordSys.transform,a);this._transThisToTarget=Fe([],i);var n=t.viewportRect;n?n=n.clone():n=new at(0,0,this._api.getWidth(),this._api.getHeight()),n.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(J({r:s},n))}},e.prototype._resetRoamController=function(t){var a=this,i=this._api,n=this._roamController;if(n||(n=this._roamController=new va(i.getZr())),!t||!this._isEnabled()){n.disable();return}n.enable(t,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),n.off("pan").off("zoom").on("pan",Z(this._onPan,this)).on("zoom",Z(this._onZoom,this))},e.prototype._onPan=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var i=ce([],[t.oldX,t.oldY],a),n=ce([],[t.oldX-t.dx,t.oldY-t.dy],a);this._api.dispatchAction(dG(this._model.getTarget().baseMapProvider,{dx:n[0]-i[0],dy:n[1]-i[1]}))}},e.prototype._onZoom=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var i=ce([],[t.originX,t.originY],a);this._api.dispatchAction(dG(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var a=t.getTarget().baseMapProvider;return!!a},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e})(Ot);function dG(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:t};return a[r.mainType+"Id"]=r.id,O(a,e),a}function vG(r,e){var t=ja(r);Js(e.group,t.z,t.zlevel)}function bC(r){r.registerComponentModel(hG),r.registerComponentView(mG)}var grt={label:{enabled:!0},decal:{show:!1}},gG=ot(),yrt={};function SC(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=tt(grt);dt(a.label,r.getLocaleModel().get("aria"),!1),dt(t.option,a,!1),i(),n();function i(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=q();r.eachSeries(function(p){if(!p.isColorBySeries()){var h=f.get(p.type);h||(h={},f.set(p.type,h)),gG(p).scope=h}}),r.eachRawSeries(function(p){if(r.isSeriesFiltered(p))return;if($(p.enableAriaDecal)){p.enableAriaDecal();return}var h=p.getData();if(p.isColorBySeries()){var y=Of(p.ecModel,p.name,yrt,r.getSeriesCount()),x=h.getVisual("decal");h.setVisual("decal",_(x,y))}else{var d=p.getRawData(),v={},m=gG(p).scope;h.each(function(b){var S=h.getRawIndex(b);v[S]=b});var g=d.count();d.each(function(b){var S=v[b],w=d.getName(b)||b+"",D=Of(p.ecModel,w,m,g),C=h.getItemVisual(S,"decal");h.setItemVisual(S,"decal",_(C,D))})}function _(b,S){var w=b?O(O({},S),b):S;return w.dirty=!0,w}})}}function n(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=J(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var p=r.getSeriesCount(),h=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,v=Math.min(p,d),m;if(!(p<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);m=o(y,{title:g})}else m=f.get(["general","withoutTitle"]);var x=[],_=p>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(_,{seriesCount:p}),r.eachSeries(function(D,C){if(C<v){var M=void 0,E=D.get("name"),L=E?"withName":"withoutName";M=p>1?f.get(["series","multiple",L]):f.get(["series","single",L]),M=o(M,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var A=D.getData();if(A.count()>h){var P=f.get(["data","partialData"]);M+=o(P,{displayCnt:h})}else M+=f.get(["data","allData"]);for(var R=f.get(["data","separator","middle"]),k=f.get(["data","separator","end"]),B=f.get(["data","excludeDimensionId"]),U=[],F=0;F<A.count();F++)if(F<h){var H=A.getName(F),G=B?At(A.getValues(F),function(rt,st){return lt(B,st)===-1}):A.getValues(F),Y=f.get(["data",H?"withName":"withoutName"]);U.push(o(Y,{name:H,value:G.join(R)}))}M+=U.join(R)+k,x.push(M)}});var b=f.getModel(["series","multiple","separator"]),S=b.get("middle"),w=b.get("end");m+=x.join(S)+w,u.setAttribute("aria-label",m)}}}}function o(u,c){if(!W(u))return u;var f=u;return T(c,function(p,h){f=f.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),p)}),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 wC(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},T(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function TC(r){r.registerPreprocessor(wC),r.registerVisual(r.PRIORITY.VISUAL.ARIA,SC)}var yG={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},xrt=(function(){function r(e){var t=this._condVal=W(e)?new RegExp(e):_M(e)?e:null;if(t==null){var a="";Ut(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return W(t)?this._condVal.test(e):yt(t)?this._condVal.test(e+""):!1},r})(),_rt=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),brt=(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})(),Srt=(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})(),wrt=(function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r})(),Trt=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,a=t(this.valueGetterParam),i=e?this.valueParser(a):null,n=0;n<this.subCondList.length;n++)if(!this.subCondList[n].evaluate(e?i:a))return!1;return!0},r})();function DC(r,e){if(r===!0||r===!1){var t=new _rt;return t.value=r,t}var a="";return _G(r)||Ut(a),r.and?xG("and",r,e):r.or?xG("or",r,e):r.not?Drt(r,e):Crt(r,e)}function xG(r,e,t){var a=e[r],i="";z(a)||Ut(i),a.length||Ut(i);var n=r==="and"?new brt:new Srt;return n.children=V(a,function(o){return DC(o,t)}),n.children.length||Ut(i),n}function Drt(r,e){var t=r.not,a="";_G(t)||Ut(a);var i=new wrt;return i.child=DC(t,e),i.child||Ut(a),i}function Crt(r,e){for(var t="",a=e.prepareGetValue(r),i=[],n=gt(r),o=r.parser,s=o?Uv(o):null,l=0;l<n.length;l++){var u=n[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=it(yG,u)?yG[u]:u,f=r[u],p=s?s(f):f,h=qI(c,p)||c==="reg"&&new xrt(p);h||Ut(t),i.push(h)}}i.length||Ut(t);var d=new Trt;return d.valueGetterParam=a,d.valueParser=s,d.getValue=e.getValue,d.subCondList=i,d}function _G(r){return et(r)&&!Ce(r)}var Mrt=(function(){function r(e,t){this._cond=DC(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r})();function bG(r,e){return new Mrt(r,e)}var SG={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,a=bG(r.config,{valueGetterAttrMap:q({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;it(s,"dimension")||Ut(l);var c=e.getDimensionInfo(u);return c||Ut(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),i=[],n=0,o=e.count();n<o;n++)t=e.getRawDataItem(n),a.evaluate()&&i.push(t);return{data:i}}};var wG={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,a="",i=Ft(t);i.length||Ut(a);var n=[];T(i,function(c){var f=c.dimension,p=c.order,h=c.parser,d=c.incomparable;if(f==null&&Ut(a),p!=="asc"&&p!=="desc"&&Ut(a),d&&d!=="min"&&d!=="max"){var v="";Ut(v)}if(p!=="asc"&&p!=="desc"){var m="";Ut(m)}var g=e.getDimensionInfo(f);g||Ut(a);var y=h?Uv(h):null;h&&!y&&Ut(a),n.push({dimIdx:g.index,parser:y,comparator:new Fv(p,d)})});var o=e.sourceFormat;o!==Ae&&o!==or&&Ut(a);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var p=0;p<n.length;p++){var h=n[p],d=e.retrieveValueFromItem(c,h.dimIdx),v=e.retrieveValueFromItem(f,h.dimIdx);h.parser&&(d=h.parser(d),v=h.parser(v));var m=h.comparator.evaluate(d,v);if(m!==0)return m}return 0}),{data:s}}};function CC(r){r.registerTransform(SG),r.registerTransform(wG)}var Ert=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,a,i){r.prototype.init.call(this,t,a,i),this._sourceManager=new Wv(this),tb(this)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),tb(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Vr},e})(St);var Art=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(Ot);function MC(r){r.registerComponentModel(Ert),r.registerComponentView(Art)}var Sn=tr.CMD;function Mc(r,e){return Math.abs(r-e)<1e-5}function Uy(r){var e=r.data,t=r.len(),a=[],i,n=0,o=0,s=0,l=0;function u(A,P){i&&i.length>2&&a.push(i),i=[A,P]}function c(A,P,R,k){Mc(A,R)&&Mc(P,k)||i.push(A,P,R,k,R,k)}function f(A,P,R,k,B,U){var F=Math.abs(P-A),H=Math.tan(F/4)*4/3,G=P<A?-1:1,Y=Math.cos(A),rt=Math.sin(A),st=Math.cos(P),mt=Math.sin(P),Ht=Y*B+R,Kt=rt*U+k,Et=st*B+R,vt=mt*U+k,It=B*H*G,ct=U*H*G;i.push(Ht-It*rt,Kt+ct*Y,Et+It*mt,vt-ct*st,Et,vt)}for(var p,h,d,v,m=0;m<t;){var g=e[m++],y=m===1;switch(y&&(n=e[m],o=e[m+1],s=n,l=o,(g===Sn.L||g===Sn.C||g===Sn.Q)&&(i=[s,l])),g){case Sn.M:n=s=e[m++],o=l=e[m++],u(s,l);break;case Sn.L:p=e[m++],h=e[m++],c(n,o,p,h),n=p,o=h;break;case Sn.C:i.push(e[m++],e[m++],e[m++],e[m++],n=e[m++],o=e[m++]);break;case Sn.Q:p=e[m++],h=e[m++],d=e[m++],v=e[m++],i.push(n+2/3*(p-n),o+2/3*(h-o),d+2/3*(p-d),v+2/3*(h-v),d,v),n=d,o=v;break;case Sn.A:var x=e[m++],_=e[m++],b=e[m++],S=e[m++],w=e[m++],D=e[m++]+w;m+=1;var C=!e[m++];p=Math.cos(w)*b+x,h=Math.sin(w)*S+_,y?(s=p,l=h,u(s,l)):c(n,o,p,h),n=Math.cos(D)*b+x,o=Math.sin(D)*S+_;for(var M=(C?-1:1)*Math.PI/2,E=w;C?E>D:E<D;E+=M){var L=C?Math.max(E+M,D):Math.min(E+M,D);f(E,L,x,_,b,S)}break;case Sn.R:s=n=e[m++],l=o=e[m++],p=s+e[m++],h=l+e[m++],u(p,l),c(p,l,p,h),c(p,h,s,h),c(s,h,s,l),c(s,l,p,l);break;case Sn.Z:i&&c(n,o,s,l),n=s,o=l;break}}return i&&i.length>2&&a.push(i),a}function EC(r,e,t,a,i,n,o,s,l,u){if(Mc(r,t)&&Mc(e,a)&&Mc(i,o)&&Mc(n,s)){l.push(o,s);return}var c=2/u,f=c*c,p=o-r,h=s-e,d=Math.sqrt(p*p+h*h);p/=d,h/=d;var v=t-r,m=a-e,g=i-o,y=n-s,x=v*v+m*m,_=g*g+y*y;if(x<f&&_<f){l.push(o,s);return}var b=p*v+h*m,S=-p*g-h*y,w=x-b*b,D=_-S*S;if(w<f&&b>=0&&D<f&&S>=0){l.push(o,s);return}var C=[],M=[];Va(r,t,i,o,.5,C),Va(e,a,n,s,.5,M),EC(C[0],M[0],C[1],M[1],C[2],M[2],C[3],M[3],l,u),EC(C[4],M[4],C[5],M[5],C[6],M[6],C[7],M[7],l,u)}function TG(r,e){var t=Uy(r),a=[];e=e||1;for(var i=0;i<t.length;i++){var n=t[i],o=[],s=n[0],l=n[1];o.push(s,l);for(var u=2;u<n.length;){var c=n[u++],f=n[u++],p=n[u++],h=n[u++],d=n[u++],v=n[u++];EC(s,l,c,f,p,h,d,v,o,e),s=d,l=v}a.push(o)}return a}function EG(r,e,t){var a=r[e],i=r[1-e],n=Math.abs(a/i),o=Math.ceil(Math.sqrt(n*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 DG(r,e,t){for(var a=r.r0,i=r.r,n=r.startAngle,o=r.endAngle,s=Math.abs(o-n),l=s*i,u=i-a,c=l>Math.abs(u),f=EG([l,u],c?0:1,e),p=(c?s:u)/f.length,h=0;h<f.length;h++)for(var d=(c?u:s)/f[h],v=0;v<f[h];v++){var m={};c?(m.startAngle=n+p*h,m.endAngle=n+p*(h+1),m.r0=a+d*v,m.r=a+d*(v+1)):(m.startAngle=n+d*v,m.endAngle=n+d*(v+1),m.r0=a+p*h,m.r=a+p*(h+1)),m.clockwise=r.clockwise,m.cx=r.cx,m.cy=r.cy,t.push(m)}}function Lrt(r,e,t){for(var a=r.width,i=r.height,n=a>i,o=EG([a,i],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",c=n?"y":"x",f=r[s]/o.length,p=0;p<o.length;p++)for(var h=r[l]/o[p],d=0;d<o[p];d++){var v={};v[u]=p*f,v[c]=d*h,v[s]=f,v[l]=h,v.x+=r.x,v.y+=r.y,t.push(v)}}function CG(r,e,t,a){return r*a-t*e}function Irt(r,e,t,a,i,n,o,s){var l=t-r,u=a-e,c=o-i,f=s-n,p=CG(c,f,l,u);if(Math.abs(p)<1e-6)return null;var h=r-i,d=e-n,v=CG(h,d,c,f)/p;return v<0||v>1?null:new pt(v*l+r,v*u+e)}function Prt(r,e,t){var a=new pt;pt.sub(a,t,e),a.normalize();var i=new pt;pt.sub(i,r,e);var n=i.dot(a);return n}function Ec(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function krt(r,e,t){for(var a=r.length,i=[],n=0;n<a;n++){var o=r[n],s=r[(n+1)%a],l=Irt(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&i.push({projPt:Prt(l,e,t),pt:l,idx:n})}if(i.length<2)return[{points:r},{points:r}];i.sort(function(m,g){return m.projPt-g.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var p=[u.pt.x,u.pt.y],h=[c.pt.x,c.pt.y],d=[p],v=[h],n=u.idx+1;n<=c.idx;n++)Ec(d,r[n].slice());Ec(d,h),Ec(d,p);for(var n=c.idx+1;n<=u.idx+a;n++)Ec(v,r[n%a].slice());return Ec(v,p),Ec(v,h),[{points:d},{points:v}]}function MG(r){var e=r.points,t=[],a=[];Ns(e,t,a);var i=new at(t[0],t[1],a[0]-t[0],a[1]-t[1]),n=i.width,o=i.height,s=i.x,l=i.y,u=new pt,c=new pt;return n>o?(u.x=c.x=s+n/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+n),krt(e,u,c)}function Fy(r,e,t,a){if(t===1)a.push(e);else{var i=Math.floor(t/2),n=r(e);Fy(r,n[0],i,a),Fy(r,n[1],t-i,a)}return a}function Rrt(r,e){for(var t=[],a=0;a<e;a++)t.push(vu(r));return t}function Nrt(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function Ort(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function AG(r,e){var t=[],a=r.shape,i;switch(r.type){case"rect":Lrt(a,e,t),i=ht;break;case"sector":DG(a,e,t),i=De;break;case"circle":DG({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,t),i=De;break;default:var n=r.getComputedTransform(),o=n?Math.sqrt(Math.max(n[0]*n[0]+n[1]*n[1],n[2]*n[2]+n[3]*n[3])):1,s=V(TG(r.getUpdatedPathProxy(),o),function(g){return Ort(g)}),l=s.length;if(l===0)Fy(MG,{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=V(s,function(g){var y=[],x=[];Ns(g,y,x);var _=(x[1]-y[1])*(x[0]-y[0]);return c+=_,{poly:g,area:_}});f.sort(function(g,y){return y.area-g.area});for(var p=e,u=0;u<l;u++){var h=f[u];if(p<=0)break;var d=u===l-1?p:Math.ceil(h.area/c*e);d<0||(Fy(MG,{points:h.poly},d,t),p-=d)}}i=ye;break}if(!i)return Rrt(r,e);for(var v=[],u=0;u<t.length;u++){var m=new i;m.setShape(t[u]),Nrt(r,m),v.push(m)}return v}function zrt(r,e){var t=r.length,a=e.length;if(t===a)return[r,e];for(var i=[],n=[],o=t<a?r:e,s=Math.min(t,a),l=Math.abs(a-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],p=l,h=2;h<s;){var d=o[h-2],v=o[h-1],m=o[h++],g=o[h++],y=o[h++],x=o[h++],_=o[h++],b=o[h++];if(p<=0){f.push(m,g,y,x,_,b);continue}for(var S=Math.min(p,c-1)+1,w=1;w<=S;w++){var D=w/S;Va(d,m,y,_,D,i),Va(v,g,x,b,D,n),d=i[3],v=n[3],f.push(i[1],n[1],i[2],n[2],d,v),m=i[5],g=n[5],y=i[6],x=n[6]}p-=S-1}return o===r?[f,e]:[r,f]}function LG(r,e){for(var t=r.length,a=r[t-2],i=r[t-1],n=[],o=0;o<e.length;)n[o++]=a,n[o++]=i;return n}function Vrt(r,e){for(var t,a,i,n=[],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=zrt(l,u),c=t[0],f=t[1],a=c,i=f):(f=LG(i||l,l),c=l):(c=LG(a||u,u),f=u),n.push(c),o.push(f)}return[n,o]}function IG(r){for(var e=0,t=0,a=0,i=r.length,n=0,o=i-2;n<i;o=n,n+=2){var s=r[o],l=r[o+1],u=r[n],c=r[n+1],f=s*c-u*l;e+=f,t+=(s+u)*f,a+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,a/e/3,e]}function Brt(r,e,t,a){for(var i=(r.length-2)/6,n=1/0,o=0,s=r.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,p=0;p<s;p+=2){var h=p===0?c:(c+p-2)%l+2,d=r[h]-t[0],v=r[h+1]-t[1],m=e[p]-a[0],g=e[p+1]-a[1],y=m-d,x=g-v;f+=y*y+x*x}f<n&&(n=f,o=u)}return o}function Urt(r){for(var e=[],t=r.length,a=0;a<t;a+=2)e[a]=r[t-a-2],e[a+1]=r[t-a-1];return e}function Frt(r,e,t,a){for(var i=[],n,o=0;o<r.length;o++){var s=r[o],l=e[o],u=IG(s),c=IG(l);n==null&&(n=u[2]<0!=c[2]<0);var f=[],p=[],h=0,d=1/0,v=[],m=s.length;n&&(s=Urt(s));for(var g=Brt(s,l,u,c)*6,y=m-2,x=0;x<y;x+=2){var _=(g+x)%y+2;f[x+2]=s[_]-u[0],f[x+3]=s[_+1]-u[1]}if(f[0]=s[g]-u[0],f[1]=s[g+1]-u[1],t>0)for(var b=a/t,S=-a/2;S<=a/2;S+=b){for(var w=Math.sin(S),D=Math.cos(S),C=0,x=0;x<s.length;x+=2){var M=f[x],E=f[x+1],L=l[x]-c[0],A=l[x+1]-c[1],P=L*D-A*w,R=L*w+A*D;v[x]=P,v[x+1]=R;var k=P-M,B=R-E;C+=k*k+B*B}if(C<d){d=C,h=S;for(var U=0;U<v.length;U++)p[U]=v[U]}}else for(var F=0;F<m;F+=2)p[F]=l[F]-c[0],p[F+1]=l[F+1]-c[1];i.push({from:f,to:p,fromCp:u,toCp:c,rotation:-h})}return i}function hh(r){return r.__isCombineMorphing}var kG="__mOriginal_";function Hy(r,e,t){var a=kG+e,i=r[a]||r[e];r[a]||(r[a]=r[e]);var n=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),n?u=n.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function ph(r,e){var t=kG+e;r[t]&&(r[e]=r[t],r[t]=null)}function PG(r,e){for(var t=0;t<r.length;t++)for(var a=r[t],i=0;i<a.length;){var n=a[i],o=a[i+1];a[i++]=e[0]*n+e[2]*o+e[4],a[i++]=e[1]*n+e[3]*o+e[5]}}function RG(r,e){var t=r.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),i=Vrt(Uy(t),Uy(a)),n=i[0],o=i[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&PG(n,s),l&&PG(o,l),Hy(e,"updateTransform",{replace:u}),e.transform=null;var c=Frt(n,o,10,Math.PI),f=[];Hy(e,"buildPath",{replace:function(p){for(var h=e.__morphT,d=1-h,v=[],m=0;m<c.length;m++){var g=c[m],y=g.from,x=g.to,_=g.rotation*h,b=g.fromCp,S=g.toCp,w=Math.sin(_),D=Math.cos(_);ql(v,b,S,h);for(var C=0;C<y.length;C+=2){var M=y[C],E=y[C+1],L=x[C],A=x[C+1],P=M*d+L*h,R=E*d+A*h;f[C]=P*D-R*w+v[0],f[C+1]=P*w+R*D+v[1]}var k=f[0],B=f[1];p.moveTo(k,B);for(var C=2;C<y.length;){var L=f[C++],A=f[C++],U=f[C++],F=f[C++],H=f[C++],G=f[C++];k===L&&B===A&&U===H&&F===G?p.lineTo(H,G):p.bezierCurveTo(L,A,U,F,H,G),k=H,B=G}}}})}function Wy(r,e,t){if(!r||!e)return e;var a=t.done,i=t.during;RG(r,e),e.__morphT=0;function n(){ph(e,"buildPath"),ph(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},J({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){n(),a&&a()}},t)),e}function Hrt(r,e,t,a,i,n){var o=16;r=i===t?0:Math.round(32767*(r-t)/(i-t)),e=n===a?0:Math.round(32767*(e-a)/(n-a));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 Gy(r){var e=1/0,t=1/0,a=-1/0,i=-1/0,n=V(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),a=Math.max(c,a),i=Math.max(f,i),[c,f]}),o=V(n,function(s,l){return{cp:s,z:Hrt(s[0],s[1],e,t,a,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function NG(r){return AG(r.path,r.count)}function AC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function OG(r,e,t){var a=[];function i(b){for(var S=0;S<b.length;S++){var w=b[S];hh(w)?i(w.childrenRef()):w instanceof ft&&a.push(w)}}i(r);var n=a.length;if(!n)return AC();var o=t.dividePath||NG,s=o({path:e,count:n});if(s.length!==n)return console.error("Invalid morphing: unmatched splitted path"),AC();a=Gy(a),s=Gy(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new Qr,p=0;p<n;p++){var h=a[p],d=s[p];d.parent=e,d.copyTransform(f),c||RG(h,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function v(b){for(var S=0;S<s.length;S++)s[S].addSelfToZr(b)}Hy(e,"addSelfToZr",{after:function(b){v(b)}}),Hy(e,"removeSelfFromZr",{after:function(b){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(b)}});function m(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,ph(e,"addSelfToZr"),ph(e,"removeSelfFromZr")}var g=s.length;if(c)for(var y=g,x=function(){y--,y===0&&(m(),l&&l())},p=0;p<g;p++){var _=c?J({delay:(t.delay||0)+c(p,g,a[p],s[p]),done:x},t):t;Wy(a[p],s[p],_)}else e.__morphT=0,e.animateTo({__morphT:1},J({during:function(b){for(var S=0;S<g;S++){var w=s[S];w.__morphT=e.__morphT,w.dirtyShape()}u&&u(b)},done:function(){m();for(var b=0;b<r.length;b++)ph(r[b],"updateTransform");l&&l()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:a,toIndividuals:s,count:g}}function zG(r,e,t){var a=e.length,i=[],n=t.dividePath||NG;function o(h){for(var d=0;d<h.length;d++){var v=h[d];hh(v)?o(v.childrenRef()):v instanceof ft&&i.push(v)}}if(hh(r)){o(r.childrenRef());var s=i.length;if(s<a)for(var l=0,u=s;u<a;u++)i.push(vu(i[l++%s]));i.length=a}else{i=n({path:r,count:a});for(var c=r.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==a)return console.error("Invalid morphing: unmatched splitted path"),AC()}i=Gy(i),e=Gy(e);for(var f=t.individualDelay,u=0;u<a;u++){var p=f?J({delay:(t.delay||0)+f(u,a,i[u],e[u])},t):t;Wy(i[u],e[u],p)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function VG(r){return z(r[0])}function BG(r,e){for(var t=[],a=r.length,i=0;i<a;i++)t.push({one:r[i],many:[]});for(var i=0;i<e.length;i++){var n=e[i].length,o=void 0;for(o=0;o<n;o++)t[o%a].many.push(e[i][o])}for(var s=0,i=a-1;i>=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[i].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var Grt={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var i=vu(r.path);i.setStyle("opacity",t),e.push(i)}return e},split:null};function Yy(r,e,t,a,i,n){if(!r.length||!e.length)return;var o=on("update",a,i);if(!(o&&o.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;VG(r)&&(u=r,c=e),VG(e)&&(u=e,c=r);function f(g,y,x,_,b){var S=g.many,w=g.one;if(S.length===1&&!b){var D=y?S[0]:w,C=y?w:S[0];if(hh(D))f({many:[D],one:C},!0,x,_,!0);else{var M=s?J({delay:s(x,_)},l):l;Wy(D,C,M),n(D,C,D,C,M)}}else for(var E=J({dividePath:Grt[t],individualDelay:s&&function(B,U,F,H){return s(B+x,_)}},l),L=y?OG(S,w,E):zG(w,S,E),A=L.fromIndividuals,P=L.toIndividuals,R=A.length,k=0;k<R;k++){var M=s?J({delay:s(k,R)},l):l;n(A[k],P[k],y?S[k]:g.one,y?g.one:S[k],M)}}for(var p=u?u===r:r.length>e.length,h=u?BG(c,u):BG(p?e:r,[p?r:e]),d=0,v=0;v<h.length;v++)d+=h[v].many.length;for(var m=0,v=0;v<h.length;v++)f(h[v],p,m,d),m+=h[v].many.length}function os(r){if(!r)return[];if(z(r)){for(var e=[],t=0;t<r.length;t++)e.push(os(r[t]));return e}var a=[];return r.traverse(function(i){i instanceof ft&&!i.disableMorphing&&!i.invisible&&!i.ignore&&a.push(i)}),a}var XG=1e4,Wrt=0,UG=1,FG=2,Yrt=ot();function Zrt(r,e){for(var t=r.dimensions,a=0;a<t.length;a++){var i=r.getDimensionInfo(t[a]);if(i&&i.otherDims[e]===0)return t[a]}}function Xrt(r,e,t){var a=r.getDimensionInfo(t),i=a&&a.ordinalMeta;if(a){var n=r.get(a.name,e);return i&&i.categories[n]||n+""}}function HG(r,e,t,a){var i=a?"itemChildGroupId":"itemGroupId",n=Zrt(r,i);if(n){var o=Xrt(r,e,n);return o}var s=r.getRawDataItem(e),l=a?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!a)return t||r.getId(e)}function GG(r){var e=[];return T(r,function(t){var a=t.data,i=t.dataGroupId;if(!(a.count()>XG))for(var n=a.getIndices(),o=0;o<n.length;o++)e.push({data:a,groupId:HG(a,o,i,!1),childGroupId:HG(a,o,i,!0),divide:t.divide,dataIndex:o})}),e}function LC(r,e,t){r.traverse(function(a){a instanceof ft&&Vt(a,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function IC(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Ac(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function qrt(r,e,t){var a=on("update",t,e);a&&r.traverse(function(i){if(i instanceof ke){var n=kL(i);n&&i.animateFrom({style:n},a)}})}function jrt(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++){var i=r[a],n=e[a];if(i.data.getId(i.dataIndex)!==n.data.getId(n.dataIndex))return!1}return!0}function qG(r,e,t){var a=GG(r),i=GG(e);function n(x,_,b,S,w){(b||x)&&_.animateFrom({style:b&&b!==x?O(O({},b.style),x.style):x.style},w)}var o=!1,s=Wrt,l=q(),u=q();a.forEach(function(x){x.groupId&&l.set(x.groupId,!0),x.childGroupId&&u.set(x.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=UG;break}var p=i[c].childGroupId;if(p&&l.get(p)){s=FG;break}}function h(x,_){return function(b){var S=b.data,w=b.dataIndex;return _?S.getId(w):x?s===UG?b.childGroupId:b.groupId:s===FG?b.childGroupId:b.groupId}}var d=jrt(a,i),v={};if(!d)for(var c=0;c<i.length;c++){var m=i[c],g=m.data.getItemGraphicEl(m.dataIndex);g&&(v[g.id]=!0)}function y(x,_){var b=a[_],S=i[x],w=S.data.hostModel,D=b.data.getItemGraphicEl(b.dataIndex),C=S.data.getItemGraphicEl(S.dataIndex);if(D===C){C&&qrt(C,S.dataIndex,w);return}D&&v[D.id]||C&&(Ac(C),D?(Ac(D),IC(D),o=!0,Yy(os(D),os(C),S.divide,w,x,n)):LC(C,w,x))}new gr(a,i,h(!0,d),h(!1,d),null,"multiple").update(y).updateManyToOne(function(x,_){var b=i[x],S=b.data,w=S.hostModel,D=S.getItemGraphicEl(b.dataIndex),C=At(V(_,function(M){return a[M].data.getItemGraphicEl(a[M].dataIndex)}),function(M){return M&&M!==D&&!v[M.id]});D&&(Ac(D),C.length?(T(C,function(M){Ac(M),IC(M)}),o=!0,Yy(os(C),os(D),b.divide,w,x,n)):LC(D,w,b.dataIndex))}).updateOneToMany(function(x,_){var b=a[_],S=b.data.getItemGraphicEl(b.dataIndex);if(!(S&&v[S.id])){var w=At(V(x,function(C){return i[C].data.getItemGraphicEl(i[C].dataIndex)}),function(C){return C&&C!==S}),D=i[x[0]].data.hostModel;w.length&&(T(w,function(C){return Ac(C)}),S?(Ac(S),IC(S),o=!0,Yy(os(S),os(w),b.divide,D,x[0],n)):T(w,function(C){return LC(C,D,x[0])}))}}).updateManyToMany(function(x,_){new gr(_,x,function(b){return a[b].data.getId(a[b].dataIndex)},function(b){return i[b].data.getId(i[b].dataIndex)}).update(function(b,S){y(x[b],_[S])}).execute()}).execute(),o&&T(e,function(x){var _=x.data,b=_.hostModel,S=b&&t.getViewOfSeriesModel(b),w=on("update",b,0);S&&b.isAnimationEnabled()&&w&&w.duration>0&&S.group.traverse(function(D){D instanceof ft&&!D.animators.length&&D.animateFrom({style:{opacity:0}},w)})})}function WG(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function YG(r){return z(r)?r.sort().join(","):r}function ss(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function $rt(r,e){var t=q(),a=q(),i=q();T(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],c=WG(o),f=YG(c);a.set(f,{dataGroupId:l,data:u}),z(c)&&T(c,function(p){i.set(p,{key:f,dataGroupId:l,data:u})})});function n(o){t.get(o)&&UE("Duplicated seriesKey in universalTransition "+o)}return T(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=WG(o),c=YG(u),f=a.get(c);if(f)t.set(c,{oldSeries:[{dataGroupId:f.dataGroupId,divide:ss(f.data),data:f.data}],newSeries:[{dataGroupId:s,divide:ss(l),data:l}]});else if(z(u)){var p=[];T(u,function(v){var m=a.get(v);m.data&&p.push({dataGroupId:m.dataGroupId,divide:ss(m.data),data:m.data})}),p.length&&t.set(c,{oldSeries:p,newSeries:[{dataGroupId:s,data:l,divide:ss(l)}]})}else{var h=i.get(u);if(h){var d=t.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:ss(h.data)}],newSeries:[]},t.set(h.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:ss(l)})}}}}),t}function ZG(r,e){for(var t=0;t<r.length;t++){var a=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(a)return t}}function Krt(r,e,t,a){var i=[],n=[];T(Ft(r.from),function(o){var s=ZG(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:ss(e.oldData[s]),groupIdDim:o.dimension})}),T(Ft(r.to),function(o){var s=ZG(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:ss(l),groupIdDim:o.dimension})}}),i.length>0&&n.length>0&&qG(i,n,a)}function PC(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){T(Ft(a.seriesTransition),function(i){T(Ft(i.to),function(n){for(var o=a.updatedSeries,s=0;s<o.length;s++)(n.seriesIndex!=null&&n.seriesIndex===o[s].seriesIndex||n.seriesId!=null&&n.seriesId===o[s].id)&&(o[s][Gf]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,a){var i=Yrt(t);if(i.oldSeries&&a.updatedSeries&&a.optionChanged){var n=a.seriesTransition;if(n)T(Ft(n),function(h){Krt(h,i,a,t)});else{var o=$rt(i,a);T(o.keys(),function(h){var d=o.get(h);qG(d.oldSeries,d.newSeries,t)})}T(a.updatedSeries,function(h){h[Gf]&&(h[Gf]=!1)})}for(var s=e.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var p=s[f].getData();p.count()<XG&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(p))}})}var Jrt=(function(){function r(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return r.prototype.setBreaks=function(e){this.breaks=e.breaks},r.prototype.update=function(e){tat(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},r.prototype.hasBreaks=function(){return!!this.breaks.length},r.prototype.calcNiceTickMultiple=function(e,t){for(var a=0;a<this.breaks.length;a++){var i=this.breaks[a];if(i.vmin<e&&e<i.vmax){var n=t(e,i.vmax);return n}}return 0},r.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},r.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},r.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},r.prototype.elapse=function(e){for(var t=jG,a=$G,i=!0,n=0;n<this.breaks.length;n++){var o=this.breaks[n];if(e<=o.vmax){e>o.vmin?t+=o.vmin-a+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-a,a=o.vmax,i=!1;break}t+=o.vmin-a+o.gapReal,a=o.vmax}return i&&(t+=e-a),t},r.prototype.unelapse=function(e){for(var t=jG,a=$G,i=!0,n=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=t+s.vmin-a,u=l+s.gapReal;if(e<=u){e>l?n=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):n=a+e-t,a=s.vmax,i=!1;break}t=u,a=s.vmax}return i&&(n=a+e-t),n},r})();function Qrt(){return new Jrt}var jG=0,$G=0;function tat(r,e){var t=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},n={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};T(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=NC(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,p=u.vmax-u.vmin;if(!(c&&f))if(c||f){var h=c?"S":"E";n[h][l.type].has=!0,n[h][l.type].span=p,n[h][l.type].inExtFrac=p/(s.vmax-s.vmin),n[h][l.type].val=l.val}else a[l.type].span+=p,a[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(a.tpAbs.val-a.tpAbs.span)+(n.S.tpAbs.has?(n.S.tpAbs.val-n.S.tpAbs.span)*n.S.tpAbs.inExtFrac:0)+(n.E.tpAbs.has?(n.E.tpAbs.val-n.E.tpAbs.span)*n.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(n.S.tpPrct.has?n.S.tpPrct.span*n.S.tpPrct.inExtFrac:0)-(n.E.tpPrct.has?n.E.tpPrct.span*n.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(n.S.tpPrct.has?n.S.tpPrct.val*n.S.tpPrct.inExtFrac:0)-(n.E.tpPrct.has?n.E.tpPrct.val*n.E.tpPrct.inExtFrac:0));T(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function eat(r,e,t,a,i,n){r!=="no"&&T(t,function(o){var s=NC(o,n);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=a(u),f=i*3/4;c>s.vmin-f&&c<s.vmax+f&&(r!=="preserve_extent_bound"||c!==n[0]&&c!==n[1])&&e.splice(l,1)}})}function rat(r,e,t,a){T(e,function(i){var n=NC(i,t);n&&(r.push({value:n.vmin,break:{type:"vmin",parsedBreak:n},time:a?a(n):void 0}),r.push({value:n.vmax,break:{type:"vmax",parsedBreak:n},time:a?a(n):void 0}))}),e.length&&r.sort(function(i,n){return i.value-n.value})}function NC(r,e){var t=Math.max(r.vmin,e[0]),a=Math.min(r.vmax,e[1]);return t<a||t===a&&t>e[0]&&t<e[1]?{vmin:t,vmax:a,breakOption:r.breakOption,gapParsed:r.gapParsed,gapReal:r.gapReal}:null}function kC(r,e,t){var a=[];if(!r)return{breaks:a};function i(o,s){return o>=0&&o<1-1e-5}T(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:tt(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(W(o.gap)){var u=Be(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c,"Percent gap")||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),t&&t.noNegative&&T(["vmin","vmax"],function(h){s[h]<0&&(s[h]=0)}),s.vmin>s.vmax){var p=s.vmax;s.vmax=s.vmin,s.vmin=p}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var n=-1/0;return T(a,function(o,s){n>o.vmin&&(a[s]=null),n=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function OC(r,e){return RC(e)===RC(r)}function RC(r){return r.start+"_\0_"+r.end}function aat(r,e,t){var a=[];T(r,function(n,o){var s=e(n);s&&s.type==="vmin"&&a.push([o])}),T(r,function(n,o){var s=e(n);if(s&&s.type==="vmax"){var l=di(a,function(u){return OC(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return T(a,function(n){n.length===2&&i.push(t?n:[r[n[0]],r[n[1]]])}),i}function iat(r,e,t,a){var i,n;if(r.break){var o=r.break.parsedBreak,s=di(t,function(f){return OC(f.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(e,o.vmin),s.vmin),u=a(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?oe(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},n=s[r.break.type]}return{brkRoundingCriterion:n,vBreak:i}}function nat(r,e,t){var a={noNegative:!0},i=kC(r,t,a),n=kC(r,t,a),o=Math.log(e);return n.breaks=V(n.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:n}}var oat={vmin:"start",vmax:"end"};function sat(r,e){return e&&(r=r||{},r.break={type:oat[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function KG(){eI({createScaleBreakContext:Qrt,pruneTicksByBreak:eat,addBreaksToTicks:rat,parseAxisBreakOption:kC,identifyAxisBreak:OC,serializeAxisBreakIdentifier:RC,retrieveAxisBreakPairs:aat,getTicksLogTransformBreak:iat,logarithmicParseBreaksFromOption:nat,makeAxisLabelFormatterParamBreak:sat})}var JG=ot();function lat(r,e){var t=di(r,function(a){return me().identifyAxisBreak(a.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function uat(r){T(r,function(e){return e.shouldRemove=!0})}function cat(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function fat(r,e,t,a,i){var n=t.axis;if(n.scale.isBlank()||!me())return;var o=me().retrieveAxisBreakPairs(n.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=t.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),p=s.get("zigzagZ"),h=s.getModel("itemStyle"),d=h.getItemStyle(),v=d.stroke,m=d.lineWidth,g=d.lineDash,y=d.fill,x=new K({ignoreModelZ:!0}),_=n.isHorizontal(),b=JG(e).visualList||(JG(e).visualList=[]);uat(b);for(var S=function(C){var M=o[C][0].break.parsedBreak,E=[];E[0]=n.toGlobalCoord(n.dataToCoord(M.vmin,!0)),E[1]=n.toGlobalCoord(n.dataToCoord(M.vmax,!0)),E[1]<E[0]&&E.reverse();var L=lat(b,M);L.shouldRemove=!1;var A=new K;D(L.zigzagRandomList,A,E[0],E[1],_,M),f&&A.on("click",function(){var P={type:Xu,breaks:[{start:M.breakOption.start,end:M.breakOption.end}]};P[n.dim+"AxisIndex"]=t.componentIndex,i.dispatchAction(P)}),A.silent=!f,x.add(A)},w=0;w<o.length;w++)S(w);r.add(x),cat(b);function D(C,M,E,L,A,P){var R={stroke:v,lineWidth:m,lineDash:g,fill:"none"},k=A?0:1,B=1-k,U=a[bt[B]]+a[be[B]];function F(ae){var Wt=[],Qt=[];Wt[k]=Qt[k]=ae,Wt[B]=a[bt[B]],Qt[B]=U;var ue={x1:Wt[0],y1:Wt[1],x2:Qt[0],y2:Qt[1]};return Hs(ue,ue,{lineWidth:1}),Wt[0]=ue.x1,Wt[1]=ue.y1,Wt[k]}E=F(E),L=F(L);for(var H=[],G=[],Y=!0,rt=a[bt[B]],st=0;;st++){var mt=rt===a[bt[B]],Ht=rt>=U;Ht&&(rt=U);var Kt=[],Et=[];Kt[k]=E,Et[k]=L,!mt&&!Ht&&(Kt[k]+=Y?-l:l,Et[k]-=Y?l:-l),Kt[B]=rt,Et[B]=rt,H.push(Kt),G.push(Et);var vt=void 0;if(st<C.length?vt=C[st]:(vt=Math.random(),C.push(vt)),rt+=vt*(c-u)+u,Y=!Y,Ht)break}var It=me().serializeAxisBreakIdentifier(P.breakOption);if(M.add(new he({anid:"break_a_"+It,shape:{points:H},style:R,z:p})),P.gapReal!==0){M.add(new he({anid:"break_b_"+It,shape:{points:G},style:R,z:p}));var ct=G.slice();ct.reverse();var Ct=H.concat(ct);M.add(new ye({anid:"break_c_"+It,shape:{points:Ct},style:{fill:y,opacity:d.opacity},z:p}))}}}function pat(r,e,t,a){var i=r.axis,n=t.transform;ee(a.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=me().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(m){return m.break},!1),l=V(s,function(m){var g=m[0].break.parsedBreak,y=[i.dataToCoord(g.vmin,!0),i.dataToCoord(g.vmax,!0)];return y[0]>y[1]&&y.reverse(),{coordPair:y,brkId:me().serializeAxisBreakIdentifier(g.breakOption)}});l.sort(function(m,g){return m.coordPair[0]-g.coordPair[0]});for(var u=o[0],c=null,f=0;f<l.length;f++){var p=l[f],h=Math.max(p.coordPair[0],o[0]),d=Math.min(p.coordPair[1],o[1]);u<=h&&v(u,h,c,p),u=d,c=p}u<=o[1]&&v(u,o[1],c,null);function v(m,g,y,x){function _(E,L){n&&(ce(E,E,n),ce(L,L,n))}function b(E,L){var A={x1:E[0],y1:E[1],x2:L[0],y2:L[1]};Hs(A,A,a.style),E[0]=A.x1,E[1]=A.y1,L[0]=A.x2,L[1]=A.y2}var S=[m,0],w=[g,0],D=[m,5],C=[g,5];_(S,D),b(S,D),_(w,C),b(w,C),b(S,w);var M=new le(O({shape:{x1:S[0],y1:S[1],x2:w[0],y2:w[1]}},a));e.add(M),M.anid="breakLine_"+(y?y.brkId:"\0")+"_\0_"+(x?x.brkId:"\0")}}function hat(r,e,t){if(di(t,function(y){return!y}))return;var a=new pt;if(!Gu(t[0],t[1],a,{direction:-(r?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var i=fe();Sr(i,i,-e);var n=V(t,function(y){return y.transform?fr(fe(),i,y.transform):i});function o(y){var x=t[0].localRect,_=new pt(x[be[y]]*n[0][0],x[be[y]]*n[0][1]);return Math.abs(_.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=V(t,function(y,x){var _=y.localRect.clone();return _.applyTransform(n[x]),_}),u=new pt;u.copy(t[0].label).add(t[1].label).scale(.5),u.transform(i);var c=a.clone().transform(i),f=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),p=(f+c.x)/2-u.x,h=Math.min(p,p-c.x),d=Math.max(p,p-c.x),v=d<0?d:h>0?h:0;s=(p-v)/c.x}var m=new pt,g=new pt;pt.scale(m,a,-s),pt.scale(g,a,1-s),cp(t[0],m),cp(t[1],g)}function dat(r,e){var t={breaks:[]};return T(e.breaks,function(a){if(a){var i=di(r.get("breaks",!0),function(s){return me().identifyAxisBreak(s,a)});if(i){var n=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=n===Xu?!0:n===$S?!1:n===KS?!i.isExpanded:i.isExpanded,t.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),t}function QG(){XR({adjustBreakLabelPair:hat,buildAxisBreakLine:pat,rectCoordBuildBreakAxis:fat,updateModelAxisBreak:dat})}function zC(r){JR(r),KG(),QG()}function VC(){hN(vat)}function vat(r,e){T(r,function(t){if(!t.model.get(["axisLabel","inside"])){var a=mat(t);if(a){var i=t.isHorizontal()?"height":"width",n=t.model.get(["axisLabel","margin"]);e[i]-=a[i]+n,t.position==="top"?e.y+=a.height+n:t.position==="left"&&(e.x+=a.width+n)}}})}function mat(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var a,i,n=t.getExtent();t instanceof Xn?i=t.count():(a=t.getTicks(),i=a.length);var o=r.getLabelModel(),s=Uo(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var f=a?a[c]:{value:n[0]+c},p=s(f,c),h=o.getTextRect(p),d=v(h,o.get("rotate")||0);l?l.union(d):l=d}return l;function v(m,g){var y=g*Math.PI/180,x=m.width,_=m.height,b=x*Math.abs(Math.cos(y))+Math.abs(_*Math.sin(y)),S=x*Math.abs(Math.sin(y))+Math.abs(_*Math.cos(y)),w=new at(m.x,m.y,b,S);return w}}Tt([LS]);Tt([AS]);Tt([zS,US,ZS,mw,_w,Ow,Zw,rT,TT,ET,AT,IT,jT,QT,r1,l1,u1,c1,f1,v1,y1,S1,Y1]);Tt(J1);Tt(aD);Tt(Pp);Tt(oD);Tt(Gp);Tt(uD);Tt(wD);Tt(DD);Tt(ND);Tt(BD);Tt(Fi);Tt(YD);Tt(ZD);Tt($D);Tt(eC);Tt(aC);Tt(iC);Tt(pC);Tt(gC);Tt(nh);Tt(lh);Tt(_C);Tt(ch);Tt(fh);Tt(bC);Tt(TC);Tt(CC);Tt(MC);Tt(PC);Tt(lS);Tt(zC);Tt(VC);Tt(gw);function yat(r){let[e,t]=r.startTime.split(":").map(Number),[a,i]=r.endTime.split(":").map(Number),n=e*60+t,s=a*60+i-n;return s<0&&(s+=1440),s}function xat(r,e){let t=new Date(r);t.setHours(0,0,0,0);let a=new Date(e);a.setHours(0,0,0,0);let i=new Date;i.setHours(0,0,0,0);let o=(a>i?i:a).getTime()-t.getTime(),s=Math.floor(o/(1e3*60*60*24))+1;return Math.max(1,s)}function _at(r,e){let t=[],a=new Date(r);for(;a<=e;){let i=a.getFullYear(),n=String(a.getMonth()+1).padStart(2,"0"),o=String(a.getDate()).padStart(2,"0");t.push(`${i}-${n}-${o}`),a.setDate(a.getDate()+1)}return t}function BC(r,e,t,a,i,n){let o=_at(t,a),s=new Map;o.forEach(d=>{s.set(d,{date:d,duration:0,count:0})}),r.forEach(d=>{if(e==="\u5176\u4ED6"?n?g0(d,n)===null:!d.tag:d.tag&&d.tag===e){let m=d.date;if(s.has(m)){let g=s.get(m);g.duration+=yat(d),g.count+=1}}});let l=Array.from(s.values()),u=l.reduce((d,v)=>d+v.duration,0),c=xat(t,a),f=u/c,p=null,h=0;return l.forEach(d=>{d.duration>h&&(h=d.duration,p=d)}),{dailyData:l,totalDuration:u,avgDuration:f,maxDay:p,actualDays:c}}function e5(r){let e=Math.floor(r/60),t=Math.round(r%60);return e>0?`${e}\u5C0F\u65F6${t>0?`${t}\u5206\u949F`:""}`:`${t}\u5206\u949F`}function t5(r,e){r=r.replace("#","");let t=parseInt(r.substring(0,2),16),a=parseInt(r.substring(2,4),16),i=parseInt(r.substring(4,6),16);return`rgba(${t}, ${a}, ${i}, ${e})`}function r5(){let r=getComputedStyle(document.body);return{textColor:r.getPropertyValue("--text-normal").trim()||"#000",mutedColor:r.getPropertyValue("--text-muted").trim()||"#666",borderColor:r.getPropertyValue("--background-modifier-border").trim()||"#e0e0e0",backgroundColor:r.getPropertyValue("--background-primary").trim()||"#fff",fontFamily:r.getPropertyValue("--font-interface").trim()||r.getPropertyValue("--font-text").trim()||"sans-serif"}}function a5(r){let e=null,t=()=>{e!==null&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{e=null,r()})},a=new MutationObserver(o=>{o.some(s=>s.type==="attributes")&&t()});[document.documentElement,document.body].filter(o=>!!o).forEach(o=>{a.observe(o,{attributes:!0,attributeFilter:["class","style","data-theme","theme"]})});let i=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>t();return typeof i.addEventListener=="function"?i.addEventListener("change",n):i.addListener(n),()=>{e!==null&&cancelAnimationFrame(e),a.disconnect(),typeof i.removeEventListener=="function"?i.removeEventListener("change",n):i.removeListener(n)}}function i5(r){var a;let e=r;(a=e.__albusChartObserverCleanup)==null||a.call(e),e.__albusChartObserverCleanup=void 0;let t=Zn(r);t==null||t.resize(),r.style.visibility="visible",r.style.opacity="1"}function n5(r,e){let t=r;return t.__albusChartObserverCleanup=e,e}function o5(r,e,t,a){i5(r);let i=Zn(r);i||(i=Mb(r));let n=e.map(h=>{let d=new Date(h.date);return`${d.getMonth()+1}/${d.getDate()}`}),o=e.map(h=>(h.duration/60).toFixed(1)),s=(a/60).toFixed(1),l=()=>{let{textColor:h,mutedColor:d,borderColor:v,backgroundColor:m,fontFamily:g}=r5();return{backgroundColor:"transparent",textStyle:{color:h,fontFamily:g},tooltip:{trigger:"axis",formatter:function(y){let _=y[0].dataIndex,b=e[_],S=e5(b.duration);return`
|
|
<div style="text-align: center; padding: 12px; min-width: 140px;">
|
|
<div style="font-size: 14px; font-weight: 700; margin-bottom: 4px; color: ${h};">${n[_]}</div>
|
|
<div style="font-size: 18px; font-weight: 700; margin-bottom: 6px; color: ${t};">${S}</div>
|
|
<div style="font-size: 12px; opacity: 0.8; color: ${d};">\u65E5\u7A0B\u65F6\u957F</div>
|
|
</div>
|
|
`},backgroundColor:m,borderColor:v,textStyle:{color:h,fontFamily:g},extraCssText:`
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
border-radius: 8px;
|
|
border: 1px solid ${v};
|
|
`},grid:{left:"3%",right:"4%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:n,axisLine:{lineStyle:{color:v}},axisLabel:{color:h,fontSize:11,fontFamily:g,interval:Math.ceil(n.length/10)},axisTick:{alignWithLabel:!0,lineStyle:{color:v}}},yAxis:{type:"value",name:"\u5C0F\u65F6",nameTextStyle:{color:h,fontSize:11,fontFamily:g},axisLine:{show:!0,lineStyle:{color:v}},axisLabel:{color:h,fontSize:11,fontFamily:g,formatter:"{value}h"},splitLine:{lineStyle:{color:v,type:"dashed",opacity:.5}},axisTick:{lineStyle:{color:v}}},series:[{id:"stats-line-series",name:"\u65E5\u7A0B\u65F6\u957F",type:"line",data:o,smooth:!0,symbol:"circle",symbolSize:8,lineStyle:{color:t,width:3},itemStyle:{color:t,borderColor:t,borderWidth:2},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:t5(t,.4)},{offset:1,color:t5(t,.1)}]}},emphasis:{focus:"series",itemStyle:{borderWidth:3,shadowBlur:10,shadowColor:t}},animationDuration:500,animationDurationUpdate:320,animationEasing:"cubicOut",animationEasingUpdate:"cubicOut",universalTransition:!0},{id:"stats-avg-series",name:"\u5E73\u5747\u503C",type:"line",data:Array(n.length).fill(s),lineStyle:{color:t,width:1,type:"dashed",opacity:.7},symbol:"none",silent:!0,tooltip:{show:!1},animation:!1}]}},u=()=>{i.setOption(l(),!0),i.resize()};u();let c=new ResizeObserver(()=>{i&&i.resize()});c.observe(r);let f=a5(()=>{Zn(r)===i&&u()}),p=()=>{c.disconnect(),f()};return n5(r,p),()=>{let h=r;h.__albusChartObserverCleanup===p&&(h.__albusChartObserverCleanup=void 0),p(),Zn(r)===i&&i.dispose()}}function s5(r,e,t=""){i5(r);let a=Zn(r);a||(a=Mb(r));let i=e.map(f=>({name:f.name,value:f.value,itemStyle:f.color?{color:f.color}:void 0})),n=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],o=()=>{let{textColor:f,mutedColor:p,borderColor:h,backgroundColor:d,fontFamily:v}=r5();return{title:t?{text:t,left:"center",top:10,textStyle:{fontSize:14,fontWeight:"normal",color:f,fontFamily:v}}:void 0,tooltip:{trigger:"item",confine:!0,backgroundColor:d,borderColor:h,textStyle:{color:f,fontFamily:v},formatter:m=>{let g=e5(m.value);return`
|
|
<div style="text-align: center; padding: 12px; min-width: 140px;">
|
|
<div style="font-size: 14px; font-weight: 700; margin-bottom: 4px; color: ${f};">${m.name}</div>
|
|
<div style="font-size: 18px; font-weight: 700; margin-bottom: 6px; color: ${m.color};">${g}</div>
|
|
<div style="font-size: 12px; opacity: 0.8; color: ${p};">${m.percent.toFixed(1)}%</div>
|
|
</div>
|
|
`},extraCssText:`
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
border-radius: 8px;
|
|
border: 1px solid ${h};
|
|
`},legend:{orient:"horizontal",top:10,left:"center",itemWidth:10,itemHeight:10,itemGap:12,textStyle:{fontSize:11,color:f,fontFamily:v},formatter:m=>m.length>8?m.slice(0,8)+"...":m},series:[{id:"stats-pie-series",type:"pie",radius:["45%","72%"],center:["50%","55%"],avoidLabelOverlap:!0,itemStyle:{borderRadius:6},label:{show:!1},emphasis:{scale:!0,scaleSize:8,label:{show:!1},itemStyle:{shadowBlur:12,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.25)"}},labelLine:{show:!1},data:i,animationDurationUpdate:320,animationEasingUpdate:"cubicOut",universalTransition:!0}],color:n,animation:!0,animationDuration:400,animationDurationUpdate:320,animationEasing:"cubicOut",animationEasingUpdate:"cubicOut"}},s=()=>{a.setOption(o(),!0),a.resize()};s();let l=new ResizeObserver(()=>{a&&a.resize()});l.observe(r);let u=a5(()=>{Zn(r)===a&&s()}),c=()=>{l.disconnect(),u()};return n5(r,c),()=>{let f=r;f.__albusChartObserverCleanup===c&&(f.__albusChartObserverCleanup=void 0),c(),Zn(r)===a&&a.dispose()}}var Zy=class{constructor(e,t,a){this.container=null;this.contentContainer=null;this.statsBodyEl=null;this.leftColumnEl=null;this.rightColumnEl=null;this.chartContainerEl=null;this.chartHeaderEl=null;this.chartCanvasEl=null;this.noChartEl=null;this.viewMode="week";this.tasks=[];this.selectedTag=null;this.chartCleanup=null;this.chartType="line";this.app=e,this.plugin=t,this.currentDate=a}setTasks(e){this.tasks=e}getViewMode(){return this.viewMode}setViewMode(e){this.viewMode=e}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}renderHeader(e,t){let a=["day","week","month","year"],i={day:"\u65E5",week:"\u5468",month:"\u6708",year:"\u5E74"},n={day:"calendar-1",week:"calendar-minus-2",month:"calendar-days",year:"calendar-range"},o=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group"});a.forEach(d=>{let v=o.createEl("button",{cls:`albus-super-daily-notes-view-mode-btn ${this.viewMode===d?"albus-super-daily-notes-active":""}`});(0,Wi.setIcon)(v,n[d]),v.createSpan({text:i[d]}),v.addEventListener("click",()=>{this.viewMode!==d&&(this.viewMode=d,this.selectedTag=null,this.chartType="line",t())})});let s=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),l=s.createEl("button");(0,Wi.setIcon)(l,"chevron-left"),l.addEventListener("click",()=>{this.navigatePrevious(),t()}),s.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,d=>{this.currentDate=d,t()}).open()});let c=s.createEl("button");(0,Wi.setIcon)(c,"chevron-right"),c.addEventListener("click",()=>{this.navigateNext(),t()});let f=e.createDiv({cls:"albus-super-daily-notes-planner-actions"}),p={day:"\u4ECA\u5929",week:"\u672C\u5468",month:"\u672C\u6708",year:"\u4ECA\u5E74"};f.createEl("button",{text:p[this.viewMode]}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e){this.container=e,this.ensureLayout(e),!(!this.leftColumnEl||!this.rightColumnEl)&&(this.viewMode==="day"?this.renderDayStatsView(this.leftColumnEl,this.rightColumnEl):this.renderStatsView(this.leftColumnEl,this.rightColumnEl))}ensureLayout(e){var t;((t=this.contentContainer)==null?void 0:t.parentElement)===e&&this.leftColumnEl&&this.rightColumnEl||(e.empty(),this.contentContainer=e.createDiv({cls:"albus-super-daily-notes-stats-view"}),this.statsBodyEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-stats-modal-content"}),this.leftColumnEl=this.statsBodyEl.createDiv({cls:"albus-super-daily-notes-stats-left-column"}),this.rightColumnEl=this.statsBodyEl.createDiv({cls:"albus-super-daily-notes-stats-right-column"}),this.chartContainerEl=this.rightColumnEl.createDiv({cls:"albus-super-daily-notes-stats-chart-container"}),this.chartHeaderEl=this.chartContainerEl.createDiv({cls:"albus-super-daily-notes-stats-chart-header"}),this.chartCanvasEl=this.chartContainerEl.createDiv({cls:"albus-super-daily-notes-stats-chart-canvas"}),this.noChartEl=this.rightColumnEl.createDiv({cls:"albus-super-daily-notes-stats-no-chart"}))}renderDayStatsView(e,t){e.empty();let a=new Date(this.currentDate);a.setHours(0,0,0,0);let i=new Date(this.currentDate);i.setHours(23,59,59,999);let n=this.tasks.filter(v=>{let m=new Date(v.date);return v.completed&&m>=a&&m<=i}),o=y0(n,this.plugin.settings.customTags),s=x0(a,i,this.viewMode),l=e.createDiv({cls:"albus-super-daily-notes-stats-summary-row"}),u=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),c=u.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(c,"clock");let f=u.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:fs(o.totalDuration)}),f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u603B\u65F6\u957F"});let p=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),h=p.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(h,"clipboard-list");let d=p.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});if(d.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:`${n.length}`}),d.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u5DF2\u5B8C\u6210\u4EFB\u52A1"}),o.sortedTagNames.length>0){let v=e.createDiv({cls:"albus-super-daily-notes-stats-distribution-container"}),m=v.createDiv({cls:"albus-super-daily-notes-stats-distribution-header"});m.createEl("h4",{text:"\u6807\u7B7E\u5206\u5E03"}),m.createEl("span",{cls:"albus-super-daily-notes-stats-distribution-count",text:`${o.sortedTagNames.length} \u4E2A\u6807\u7B7E`});let g=v.createDiv({cls:"albus-super-daily-notes-stats-tag-grid"});o.sortedTagNames.forEach(y=>{let x=o.tagStats[y],_=Math.round(x.duration/o.totalDuration*100),b=g.createDiv({cls:"albus-super-daily-notes-stats-tag-card"});b.style.borderLeftColor=x.color;let S=b.createDiv({cls:"albus-super-daily-notes-stats-tag-watermark"});S.textContent=`${_}%`,S.style.color=x.color;let w=b.createDiv({cls:"albus-super-daily-notes-stats-tag-header"}),D=w.createDiv({cls:"albus-super-daily-notes-stats-tag-color"});D.style.backgroundColor=x.color;let C=w.createEl("span",{cls:"albus-super-daily-notes-stats-tag-name",text:this.plugin.settings.showOnlyLeafTag&&x.name.split("/").pop()||x.name});C.style.color=x.color;let M=b.createDiv({cls:"albus-super-daily-notes-stats-tag-stats"});M.createEl("div",{cls:"albus-super-daily-notes-stats-tag-duration",text:fs(x.duration)}),M.createEl("div",{cls:"albus-super-daily-notes-stats-tag-count",text:`${x.count} \u4E2A\u65E5\u7A0B`})})}else e.createDiv({cls:"albus-super-daily-notes-stats-no-data",text:"\u6682\u65E0\u6570\u636E"});if(o.sortedTagNames.length>0){let v=o.sortedTagNames.map(m=>{let g=o.tagStats[m];return{name:this.plugin.settings.showOnlyLeafTag&&m.split("/").pop()||m,value:g.duration,color:g.color}});this.renderPieChartPanel(t,"\u65F6\u95F4\u5206\u5E03",v,!1)}else this.renderNoChartPanel(t,"\u6682\u65E0\u6570\u636E")}getViewTitle(){switch(this.viewMode){case"day":return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708${this.currentDate.getDate()}\u65E5`;case"week":let e=this.getWeekNumber(this.currentDate);return`${this.currentDate.getFullYear()}\u5E74\u7B2C${e}\u5468`;case"month":return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`;case"year":return`${this.currentDate.getFullYear()}\u5E74`;default:return""}}getWeekNumber(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),a=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-a);let i=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-i.getTime())/864e5+1)/7)}navigatePrevious(){let e=new Date(this.currentDate);switch(this.viewMode){case"day":e.setDate(e.getDate()-1);break;case"week":e.setDate(e.getDate()-7);break;case"month":e.setMonth(e.getMonth()-1);break;case"year":e.setFullYear(e.getFullYear()-1);break}this.currentDate=e}navigateNext(){let e=new Date(this.currentDate);switch(this.viewMode){case"day":e.setDate(e.getDate()+1);break;case"week":e.setDate(e.getDate()+7);break;case"month":e.setMonth(e.getMonth()+1);break;case"year":e.setFullYear(e.getFullYear()+1);break}this.currentDate=e}renderStatsView(e,t){var p;e.empty();let a,i;switch(this.viewMode){case"day":a=new Date(this.currentDate),a.setHours(0,0,0,0),i=new Date(this.currentDate),i.setHours(23,59,59,999);break;case"week":a=fi(this.currentDate),i=new Date(a),i.setDate(a.getDate()+6),i.setHours(23,59,59,999);break;case"month":a=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),1),i=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1,0),i.setHours(23,59,59,999);break;case"year":a=new Date(this.currentDate.getFullYear(),0,1),i=new Date(this.currentDate.getFullYear(),11,31),i.setHours(23,59,59,999);break;default:a=this.currentDate,i=this.currentDate}let n=this.tasks.filter(h=>{let d=new Date(h.date);return h.completed&&d>=a&&d<=i}),o=y0(n,this.plugin.settings.customTags),s=x0(a,i,this.viewMode);o.sortedTagNames.length>0&&!this.selectedTag&&(this.selectedTag=o.sortedTagNames[0]);let l=e.createDiv({cls:"albus-super-daily-notes-stats-summary-row"}),u=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),c=u.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(c,"clock");let f=u.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});if(f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:fs(o.totalDuration)}),f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u603B\u65F6\u957F"}),this.selectedTag){let h=BC(n,this.selectedTag,a,i,this.viewMode,this.plugin.settings.customTags),d=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),v=d.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(v,"bar-chart-3");let m=d.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});if(m.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:fs(h.avgDuration)}),m.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u65E5\u5747\u65F6\u957F"}),h.maxDay&&h.maxDay.duration>0){let g=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),y=g.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(y,"flame");let x=g.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"}),_=new Date(h.maxDay.date);x.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:`${_.getMonth()+1}/${_.getDate()}`}),x.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u6700\u4E13\u6CE8\u65E5"})}}if(o.sortedTagNames.length>0){let h=e.createDiv({cls:"albus-super-daily-notes-stats-distribution-container"}),d=h.createDiv({cls:"albus-super-daily-notes-stats-distribution-header"});d.createEl("h4",{text:"\u6807\u7B7E\u5206\u5E03"}),d.createEl("span",{cls:"albus-super-daily-notes-stats-distribution-count",text:`${o.sortedTagNames.length} \u4E2A\u6807\u7B7E`});let v=h.createDiv({cls:"albus-super-daily-notes-stats-tag-grid"});o.sortedTagNames.forEach(m=>{let g=o.tagStats[m],y=Math.round(g.duration/o.totalDuration*100),x=v.createDiv({cls:"albus-super-daily-notes-stats-tag-card"});x.style.borderLeftColor=g.color,m===this.selectedTag&&(x.addClass("albus-super-daily-notes-active"),x.style.outlineColor=g.color),x.style.cursor="pointer",x.addEventListener("click",()=>{this.selectedTag=m,this.container&&this.renderContent(this.container)});let _=x.createDiv({cls:"albus-super-daily-notes-stats-tag-watermark"});_.textContent=`${y}%`,_.style.color=g.color;let b=x.createDiv({cls:"albus-super-daily-notes-stats-tag-header"}),S=b.createDiv({cls:"albus-super-daily-notes-stats-tag-color"});S.style.backgroundColor=g.color;let w=b.createEl("span",{cls:"albus-super-daily-notes-stats-tag-name",text:this.plugin.settings.showOnlyLeafTag&&g.name.split("/").pop()||g.name});w.style.color=g.color;let D=x.createDiv({cls:"albus-super-daily-notes-stats-tag-stats"});D.createEl("div",{cls:"albus-super-daily-notes-stats-tag-duration",text:fs(g.duration)}),D.createEl("div",{cls:"albus-super-daily-notes-stats-tag-count",text:`${g.count} \u4E2A\u65E5\u7A0B`})})}else e.createDiv({cls:"albus-super-daily-notes-stats-no-data",text:"\u6682\u65E0\u6570\u636E"});if(o.sortedTagNames.length>0){let h=this.selectedTag&&((p=o.tagStats[this.selectedTag])==null?void 0:p.color)||"#5470c6",d="\u65F6\u95F4\u5206\u5E03";if(this.chartType==="line"&&this.selectedTag&&(d=this.plugin.settings.showOnlyLeafTag?this.selectedTag.split("/").pop()||this.selectedTag:this.selectedTag),this.chartType==="pie"){let v=o.sortedTagNames.map(m=>{let g=o.tagStats[m];return{name:this.plugin.settings.showOnlyLeafTag&&m.split("/").pop()||m,value:g.duration,color:g.color}});this.renderPieChartPanel(t,d,v,!0)}else if(this.selectedTag){let v=BC(n,this.selectedTag,a,i,this.viewMode,this.plugin.settings.customTags);this.renderLineChartPanel(t,d,h,v.dailyData,v.avgDuration)}else{this.chartType="pie";let v=o.sortedTagNames.map(m=>{let g=o.tagStats[m];return{name:this.plugin.settings.showOnlyLeafTag&&m.split("/").pop()||m,value:g.duration,color:g.color}});this.renderPieChartPanel(t,"\u65F6\u95F4\u5206\u5E03",v,!0)}}else this.renderNoChartPanel(t,"\u6682\u65E0\u6570\u636E")}renderPieChartPanel(e,t,a,i){if(!(!this.chartContainerEl||!this.chartHeaderEl||!this.chartCanvasEl||!this.noChartEl)){if(e.appendChild(this.chartContainerEl),e.appendChild(this.noChartEl),this.chartContainerEl.style.display="flex",this.noChartEl.style.display="none",this.chartHeaderEl.empty(),this.chartHeaderEl.createEl("h3",{text:t}),i){let n=this.chartHeaderEl.createEl("button",{cls:"albus-super-daily-notes-view-mode-btn"});(0,Wi.setIcon)(n,this.chartType==="line"?"pie-chart":"trending-up"),n.addEventListener("click",()=>{this.chartType=this.chartType==="line"?"pie":"line",this.container&&this.renderContent(this.container)})}this.chartCleanup=s5(this.chartCanvasEl,a)}}renderLineChartPanel(e,t,a,i,n){if(!this.chartContainerEl||!this.chartHeaderEl||!this.chartCanvasEl||!this.noChartEl)return;e.appendChild(this.chartContainerEl),e.appendChild(this.noChartEl),this.chartContainerEl.style.display="flex",this.noChartEl.style.display="none",this.chartHeaderEl.empty(),this.chartHeaderEl.createEl("h3",{text:t});let o=this.chartHeaderEl.createEl("button",{cls:"albus-super-daily-notes-view-mode-btn"});(0,Wi.setIcon)(o,this.chartType==="line"?"pie-chart":"trending-up"),o.addEventListener("click",()=>{this.chartType=this.chartType==="line"?"pie":"line",this.container&&this.renderContent(this.container)}),this.chartCleanup=o5(this.chartCanvasEl,i,a,n)}renderNoChartPanel(e,t){!this.chartContainerEl||!this.noChartEl||(e.appendChild(this.chartContainerEl),e.appendChild(this.noChartEl),this.chartContainerEl.style.display="none",this.noChartEl.style.display="flex",this.noChartEl.empty(),this.noChartEl.createEl("p",{text:t}),this.chartCleanup&&(this.chartCleanup(),this.chartCleanup=null))}cleanup(){this.chartCleanup&&(this.chartCleanup(),this.chartCleanup=null)}};var dh=require("obsidian");var ls=require("obsidian");var Xy=class extends ls.Modal{constructor(t,a,i,n,o=!1,s,l){super(t);this.editor=null;this.descriptionSetting=null;this.endDateSetting=null;this.submitBtn=null;if(this.customTags=i,this.onSubmit=n,this.showOnlyLeafTag=o,a)this.isEditMode=!0,this.event={...a},this.event.endDate||(this.event.endDate=this.event.date);else{this.isEditMode=!1;let u=s||new Date().toISOString().split("T")[0],c=l||u;this.event={id:"",date:u,endDate:c,description:"",completed:!1}}}renderDescriptionEditor(t){this.descriptionSetting=new ls.Setting(t).setName("\u63CF\u8FF0"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting-single-line");let a=this.descriptionSetting.controlEl.createDiv({cls:"albus-super-daily-notes-inline-editor-field"});this.editor=new Pa(this.app,a,{value:this.event.description,placeholder:"\u8F93\u5165\u4E8B\u9879\u63CF\u8FF0...",singleLineAutoGrow:!0,onChange:i=>{this.event.description=i,this.validateForm()}}),window.setTimeout(()=>{var i;return(i=this.editor)==null?void 0:i.focus()},30)}validateForm(){let t=this.event.description.trim().length>0,a=new Date(this.event.date),i=new Date(this.event.endDate||this.event.date),n=!Number.isNaN(a.getTime())&&!Number.isNaN(i.getTime())&&i>=a;this.descriptionSetting&&(t?(this.descriptionSetting.settingEl.removeClass("albus-super-daily-notes-has-error"),this.descriptionSetting.setDesc("")):(this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-has-error"),this.descriptionSetting.setDesc("\u8BF7\u8F93\u5165\u4E8B\u9879\u63CF\u8FF0"))),this.endDateSetting&&(n?(this.endDateSetting.settingEl.removeClass("albus-super-daily-notes-has-error"),this.endDateSetting.setDesc("")):(this.endDateSetting.settingEl.addClass("albus-super-daily-notes-has-error"),this.endDateSetting.setDesc("\u7ED3\u675F\u65E5\u671F\u4E0D\u80FD\u65E9\u4E8E\u5F00\u59CB\u65E5\u671F")));let o=t&&n;return this.submitBtn&&(this.submitBtn.disabled=!o,this.submitBtn.toggleClass("albus-super-daily-notes-disabled",!o)),o}onOpen(){let{contentEl:t}=this;t.empty(),this.modalEl.addClass("albus-super-daily-notes-item-editor-modal-shell"),t.addClass("albus-super-daily-notes-item-editor-modal"),new ls.Setting(t).setName("\u5F00\u59CB\u65E5\u671F").addText(n=>(n.setValue(this.event.date||"").onChange(o=>{this.event.date=o||new Date().toISOString().split("T")[0],this.validateForm()}),n.inputEl.type="date",n)),this.endDateSetting=new ls.Setting(t).setName("\u7ED3\u675F\u65E5\u671F").addText(n=>(n.setValue(this.event.endDate||this.event.date).onChange(o=>{this.event.endDate=o||this.event.date,this.validateForm()}),n.inputEl.type="date",n)),this.customTags.length>0&&new ls.Setting(t).setName("\u6807\u7B7E").addDropdown(n=>(n.addOption("","\u65E0\u6807\u7B7E"),this.customTags.forEach(o=>{let s=this.showOnlyLeafTag&&o.name.includes("/")&&o.name.split("/").pop()||o.name;n.addOption(o.name,s)}),n.setValue(this.event.tag||"").onChange(o=>{this.event.tag=o||void 0}),n)),this.renderDescriptionEditor(t),new ls.Setting(t).setName("\u72B6\u6001").addToggle(n=>(n.setValue(this.event.completed).onChange(o=>{this.event.completed=o}),n));let a=t.createDiv({cls:"albus-super-daily-notes-modal-button-container"});a.createEl("button",{text:"\u53D6\u6D88"}).addEventListener("click",()=>{this.close()}),this.isEditMode&&a.createEl("button",{text:"\u5220\u9664",cls:"mod-warning"}).addEventListener("click",async()=>{await this.onSubmit(null),this.close()}),this.submitBtn=a.createEl("button",{text:this.isEditMode?"\u4FDD\u5B58":"\u521B\u5EFA",cls:"mod-cta"}),this.validateForm(),this.submitBtn.addEventListener("click",async()=>{var n,o;if(this.validateForm()){this.event.description=(o=(n=this.editor)==null?void 0:n.value)!=null?o:this.event.description,this.event.endDate=this.event.endDate||this.event.date;let s=this.event.endDate===this.event.date?void 0:this.event.endDate;this.isEditMode||(this.event.id=h0(this.event.date,this.event.description,s)),await this.onSubmit({...this.event,endDate:s}),this.close()}})}onClose(){var a;(a=this.editor)==null||a.destroy(),this.editor=null;let{contentEl:t}=this;t.empty()}};var qy=class{constructor(e,t,a,i){this.container=null;this.contentContainer=null;this.events=[];this.scrollPosition=0;this.ganttScrollTop=0;this.ganttScrollLeft=0;this.eventsViewMode="gantt";this.highlightEventKey=null;this.ganttDragState={isDragging:!1,startDay:0,currentDay:0,headerCells:[],mouseMoveHandler:null,mouseUpHandler:null,previewEl:null};this.ganttBarDragState={isDragging:!1,event:null,mode:"resize-right",startX:0,dayWidth:0,originalStartDay:1,originalEndDay:1,currentStartDay:1,currentEndDay:1,daysInMonth:31,year:2024,month:0,barEl:null,barArea:null,isStartInMonth:!0,isEndInMonth:!0,mouseMoveHandler:null,mouseUpHandler:null};this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i}sortEventsForGantt(e){return[...e].sort((t,a)=>t.completed!==a.completed?t.completed?1:-1:t.date.localeCompare(a.date))}getEventDisplayColor(e){let t=Dh;if(e.tag){let a=this.plugin.settings.customTags.find(i=>i.name===e.tag);a!=null&&a.color&&(t=a.color)}return e.completed&&this.plugin.settings.grayOutCompleted?"#E0E0E0":t}updateGanttRowAppearance(e,t){let a=e.querySelector(".albus-super-daily-notes-gantt-label-text"),i=e.querySelector(".albus-super-daily-notes-gantt-bar"),n=e.querySelector(".albus-super-daily-notes-event-checkbox-small");n&&(n.checked=t.completed),a==null||a.toggleClass("albus-super-daily-notes-completed",t.completed),i&&(i.toggleClass("albus-super-daily-notes-gantt-bar-completed",t.completed),i.style.backgroundColor=this.getEventDisplayColor(t))}animateGanttRowReorder(e,t){let a=new Map,i=Array.from(e.querySelectorAll(".albus-super-daily-notes-gantt-row[data-event-id]")),n=this.sortEventsForGantt(t),o=new Map(i.map(l=>[l.dataset.eventId||"",l])),s=e.querySelector(".albus-super-daily-notes-gantt-row-placeholder");i.forEach(l=>{a.set(l,l.getBoundingClientRect().top)}),n.forEach(l=>{let u=o.get(l.id);u&&(s?e.insertBefore(u,s):e.appendChild(u))}),i.forEach(l=>{let u=a.get(l);if(u===void 0)return;let c=l.getBoundingClientRect().top,f=u-c;f!==0&&(l.addClass("albus-super-daily-notes-gantt-row-reordering"),l.getAnimations().forEach(p=>p.cancel()),l.animate([{transform:`translateY(${f}px)`},{transform:"translateY(0px)"}],{duration:260,easing:"cubic-bezier(0.22, 1, 0.36, 1)",fill:"none"}).finished.finally(()=>{l.removeClass("albus-super-daily-notes-gantt-row-reordering"),l.style.transform=""}))})}setEvents(e){this.events=e}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}getEventsViewMode(){return this.eventsViewMode}renderHeader(e,t){let a=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),i=a.createEl("button");(0,dh.setIcon)(i,"chevron-left"),i.addEventListener("click",()=>{this.navigatePrevious(),t()}),a.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,u=>{this.currentDate=u,t()}).open()});let o=a.createEl("button");(0,dh.setIcon)(o,"chevron-right"),o.addEventListener("click",()=>{this.navigateNext(),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:"\u672C\u6708"}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e,t){this.container=e,this.renderGanttView(e,t)}getViewTitle(){return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`}navigatePrevious(){let e=new Date(this.currentDate);e.setMonth(e.getMonth()-1),this.currentDate=e}navigateNext(){let e=new Date(this.currentDate);e.setMonth(e.getMonth()+1),this.currentDate=e}renderGanttView(e,t){let a=e.createDiv({cls:"albus-super-daily-notes-gantt-view"});this.contentContainer=a,a.addEventListener("scroll",()=>{this.ganttScrollTop=a.scrollTop,this.ganttScrollLeft=a.scrollLeft}),this.ganttDragState.headerCells=[];let i=this.currentDate.getFullYear(),n=this.currentDate.getMonth(),o=new Date(i,n+1,0).getDate(),s=new Date;s.setHours(0,0,0,0);let l=new Date(i,n,1);l.setHours(0,0,0,0);let u=new Date(i,n,o);u.setHours(0,0,0,0);let c=this.events.filter(_=>{let b=new Date(_.date);b.setHours(0,0,0,0);let S=_.endDate?new Date(_.endDate):b;return S.setHours(0,0,0,0),S>=l&&b<=u}),f=this.sortEventsForGantt(c),p=a.createDiv({cls:"albus-super-daily-notes-gantt-header-row"});p.createDiv({cls:"albus-super-daily-notes-gantt-label-cell albus-super-daily-notes-gantt-header-label"});let h=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],d=[];for(let _=1;_<=o;_++){let b=new Date(i,n,_),S=b.getDay()===0||b.getDay()===6,w=b.getTime()===s.getTime(),D=ne(b),C=p.createDiv({cls:`albus-super-daily-notes-gantt-day-header ${S?"albus-super-daily-notes-gantt-weekend":""} ${w?"albus-super-daily-notes-gantt-today":""}`});C.createDiv({cls:"albus-super-daily-notes-gantt-day-number",text:_.toString()}),C.createDiv({cls:"albus-super-daily-notes-gantt-day-weekday",text:h[b.getDay()]}),C.dataset.day=_.toString(),this.ganttDragState.headerCells.push(C),S&&d.push(_),C.addEventListener("mousedown",M=>{M.button===0&&(M.preventDefault(),this.startGanttHeaderDrag(_,D,t))}),C.addEventListener("contextmenu",M=>{M.preventDefault(),this.callbacks.openDailyNote(b)})}let v=a.createDiv({cls:"albus-super-daily-notes-gantt-body"});for(let _ of d){let b=v.createDiv({cls:"albus-super-daily-notes-gantt-weekend-stripe"}),S=(_-1)/o,w=1/o;b.style.left=`calc(160px + ${S} * (100% - 160px))`,b.style.width=`calc(${w} * (100% - 160px))`}f.length>0&&f.forEach(_=>{let b=v.createDiv({cls:"albus-super-daily-notes-gantt-row"});b.dataset.eventId=_.id,this.highlightEventKey&&this.highlightEventKey===`${_.date}|${_.description}`&&(b.addClass("albus-super-daily-notes-gantt-row-highlight"),this.highlightEventKey=null);let S=b.createDiv({cls:"albus-super-daily-notes-gantt-label-cell"}),w=S.createEl("input",{type:"checkbox",cls:"albus-super-daily-notes-event-checkbox-small"});if(w.checked=_.completed,w.addEventListener("click",async H=>{H.stopPropagation();let G=_.completed;_.completed=!_.completed,this.updateGanttRowAppearance(b,_),this.animateGanttRowReorder(v,c);try{await this.plugin.taskService.toggleEventStatus(_)}catch(Y){_.completed=G,this.updateGanttRowAppearance(b,_),this.animateGanttRowReorder(v,c),new dh.Notice("\u4E8B\u9879\u72B6\u6001\u66F4\u65B0\u5931\u8D25")}}),_.tag){let H=this.plugin.settings.customTags.find(G=>G.name===_.tag);if(H){let G=S.createDiv({cls:"albus-super-daily-notes-gantt-tag-dot"});G.style.backgroundColor=H.color}}let D=S.createSpan({cls:`albus-super-daily-notes-gantt-label-text ${_.completed?"albus-super-daily-notes-completed":""}`,text:_.description});S.addEventListener("click",()=>{this.openEventModal(_,void 0,t)});let C=b.createDiv({cls:"albus-super-daily-notes-gantt-bar-area"}),M=new Date(_.date);M.setHours(0,0,0,0);let E=_.endDate?new Date(_.endDate):M;E.setHours(0,0,0,0);let L=this.getEventDisplayColor(_),A=M.getFullYear()===i&&M.getMonth()===n?M.getDate():1,P=E.getFullYear()===i&&E.getMonth()===n?E.getDate():o,R=(A-1)/o*100,k=(P-A+1)/o*100,B=A>=(M.getMonth()===n?M.getDate():0),U=P<=(E.getMonth()===n?E.getDate():o+1),F=C.createDiv({cls:`albus-super-daily-notes-gantt-bar ${B?"albus-super-daily-notes-gantt-bar-start":""} ${U?"albus-super-daily-notes-gantt-bar-end":""} ${_.completed?"albus-super-daily-notes-gantt-bar-completed":""}`});F.style.backgroundColor=L,F.style.left=`calc(${R}% + ${B?3:0}px)`,F.style.width=`calc(${k}% - ${(B?3:0)+(U?3:0)}px)`,F.addEventListener("mousedown",H=>{if(H.button!==0||H.target.classList.contains("albus-super-daily-notes-gantt-bar-handle"))return;H.preventDefault(),H.stopPropagation();let Y=!1,rt=H.clientX,st=H.clientY,mt=Kt=>{(Math.abs(Kt.clientX-rt)>5||Math.abs(Kt.clientY-st)>5)&&(Y=!0,document.removeEventListener("mousemove",mt),document.removeEventListener("mouseup",Ht))},Ht=()=>{document.removeEventListener("mousemove",mt),document.removeEventListener("mouseup",Ht),Y||this.openEventModal(_,void 0,t)};document.addEventListener("mousemove",mt),document.addEventListener("mouseup",Ht)}),B&&F.createDiv({cls:"albus-super-daily-notes-gantt-bar-handle albus-super-daily-notes-gantt-bar-handle-left"}).addEventListener("mousedown",G=>{G.preventDefault(),G.stopPropagation(),this.startGanttBarDrag(G,_,"resize-left",C,F,A,P,B,U,o,i,n,t)}),U&&F.createDiv({cls:"albus-super-daily-notes-gantt-bar-handle albus-super-daily-notes-gantt-bar-handle-right"}).addEventListener("mousedown",G=>{G.preventDefault(),G.stopPropagation(),this.startGanttBarDrag(G,_,"resize-right",C,F,A,P,B,U,o,i,n,t)})});let m=3,g=36,y=52;requestAnimationFrame(()=>{let _=a.clientHeight,b=y+f.length*g,S=Math.floor((_-b)/g),w=Math.max(m,S);for(let D=0;D<w;D++){let C=v.createDiv({cls:"albus-super-daily-notes-gantt-row albus-super-daily-notes-gantt-row-placeholder"});C.createDiv({cls:"albus-super-daily-notes-gantt-label-cell"}),C.createDiv({cls:"albus-super-daily-notes-gantt-bar-area"})}a.scrollTop=this.ganttScrollTop,a.scrollLeft=this.ganttScrollLeft});for(let _=1;_<=o;_++){let b=v.createDiv({cls:"albus-super-daily-notes-gantt-gridline"}),S=(_-1)/o;b.style.left=`calc(160px + ${S} * (100% - 160px))`}let x=s.getFullYear()===i&&s.getMonth()===n?s.getDate():-1;if(x>0){let _=a.createDiv({cls:"albus-super-daily-notes-gantt-today-line"});requestAnimationFrame(()=>{let b=this.ganttDragState.headerCells[x-1];if(b){let S=a.getBoundingClientRect(),w=b.getBoundingClientRect(),D=w.left-S.left+w.width/2+a.scrollLeft;_.style.left=`${D}px`}})}}openEventModal(e=null,t,a,i){new Xy(this.app,e,this.plugin.settings.customTags,async o=>{o?e?await this.plugin.taskService.updateEvent(o,e):(await this.plugin.taskService.createEvent(o),this.highlightEventKey=`${o.date}|${o.description}`):e&&await this.plugin.taskService.deleteEvent(e),a&&a()},this.plugin.settings.showOnlyLeafTag,t,i).open()}startGanttHeaderDrag(e,t,a){let i=this.ganttDragState;i.isDragging=!0,i.startDay=e,i.currentDay=e,this.createGanttDragPreview(),this.updateGanttHeaderSelection(),i.mouseMoveHandler=n=>{if(!i.isDragging)return;let o=n.target.closest(".albus-super-daily-notes-gantt-day-header");if(o&&o.dataset.day){let s=parseInt(o.dataset.day);s!==i.currentDay&&(i.currentDay=s,this.updateGanttHeaderSelection())}},i.mouseUpHandler=n=>{if(!i.isDragging)return;i.isDragging=!1,this.clearGanttHeaderSelection(),i.mouseMoveHandler&&document.removeEventListener("mousemove",i.mouseMoveHandler),i.mouseUpHandler&&document.removeEventListener("mouseup",i.mouseUpHandler),i.mouseMoveHandler=null,i.mouseUpHandler=null;let o=Math.min(i.startDay,i.currentDay),s=Math.max(i.startDay,i.currentDay),l=this.currentDate.getFullYear(),u=this.currentDate.getMonth(),c=ne(new Date(l,u,o));if(o===s)this.openEventModal(null,c,a);else{let f=ne(new Date(l,u,s));this.openEventModal(null,c,a,f)}},document.addEventListener("mousemove",i.mouseMoveHandler),document.addEventListener("mouseup",i.mouseUpHandler)}createGanttDragPreview(){let e=this.ganttDragState;if(e.previewEl&&(e.previewEl.remove(),e.previewEl=null),e.headerCells.length===0)return;let t=e.headerCells[0].parentElement;if(!t)return;let a=document.createElement("div");a.className="albus-super-daily-notes-gantt-drag-preview",t.appendChild(a),e.previewEl=a}updateGanttHeaderSelection(){let e=this.ganttDragState,t=Math.min(e.startDay,e.currentDay),a=Math.max(e.startDay,e.currentDay);e.headerCells.forEach(i=>{let n=parseInt(i.dataset.day||"0");n>=t&&n<=a?i.classList.add("albus-super-daily-notes-gantt-header-selected"):i.classList.remove("albus-super-daily-notes-gantt-header-selected")}),this.updateGanttDragPreviewPosition(t,a)}updateGanttDragPreviewPosition(e,t){let a=this.ganttDragState;if(!a.previewEl)return;let i=a.headerCells[e-1],n=a.headerCells[t-1];if(!i||!n)return;let o=a.previewEl.parentElement;if(!o)return;let s=o.getBoundingClientRect(),l=i.getBoundingClientRect(),u=n.getBoundingClientRect(),c=l.left-s.left,f=u.right-l.left;a.previewEl.style.left=`${c}px`,a.previewEl.style.width=`${f}px`}clearGanttHeaderSelection(){let e=this.ganttDragState;e.headerCells.forEach(t=>{t.classList.remove("albus-super-daily-notes-gantt-header-selected")}),e.previewEl&&(e.previewEl.remove(),e.previewEl=null)}startGanttBarDrag(e,t,a,i,n,o,s,l,u,c,f,p,h){let d=this.ganttBarDragState;d.isDragging=!0,d.event=t,d.mode=a,d.startX=e.clientX,d.dayWidth=i.getBoundingClientRect().width/c,d.originalStartDay=o,d.originalEndDay=s,d.currentStartDay=o,d.currentEndDay=s,d.daysInMonth=c,d.year=f,d.month=p,d.barEl=n,d.barArea=i,d.isStartInMonth=l,d.isEndInMonth=u;let v=!1;d.mouseMoveHandler=m=>{if(!d.isDragging)return;let g=m.clientX-d.startX;if(!v&&Math.abs(g)>5&&(v=!0,n.classList.add("albus-super-daily-notes-gantt-bar-dragging")),!v)return;let y=Math.round(g/d.dayWidth);if(d.mode==="resize-left"){let x=Math.max(1,Math.min(d.originalStartDay+y,d.currentEndDay));d.currentStartDay=x}else{let x=Math.max(d.currentStartDay,Math.min(d.originalEndDay+y,d.daysInMonth));d.currentEndDay=x}this.updateGanttBarPosition()},d.mouseUpHandler=async m=>{if(!d.isDragging)return;if(d.isDragging=!1,d.barEl&&d.barEl.classList.remove("albus-super-daily-notes-gantt-bar-dragging"),d.mouseMoveHandler&&document.removeEventListener("mousemove",d.mouseMoveHandler),d.mouseUpHandler&&document.removeEventListener("mouseup",d.mouseUpHandler),d.mouseMoveHandler=null,d.mouseUpHandler=null,!v){this.openEventModal(t,void 0,h);return}if(d.currentStartDay===d.originalStartDay&&d.currentEndDay===d.originalEndDay)return;let g={...t},y=ne(new Date(d.year,d.month,d.currentStartDay)),x=ne(new Date(d.year,d.month,d.currentEndDay)),_={...t,date:d.isStartInMonth?y:t.date,endDate:d.isEndInMonth?x:t.endDate};_.date===_.endDate&&(_.endDate=void 0),this.saveScrollPosition(),await this.plugin.taskService.updateEvent(_,g),this.restoreScrollPosition(),h()},document.addEventListener("mousemove",d.mouseMoveHandler),document.addEventListener("mouseup",d.mouseUpHandler)}updateGanttBarPosition(){let e=this.ganttBarDragState;if(!e.barEl)return;let t=(e.currentStartDay-1)/e.daysInMonth*100,a=(e.currentEndDay-e.currentStartDay+1)/e.daysInMonth*100,i=e.isStartInMonth,n=e.isEndInMonth;e.barEl.style.left=`calc(${t}% + ${i?3:0}px)`,e.barEl.style.width=`calc(${a}% - ${(i?3:0)+(n?3:0)}px)`}async toggleEventStatus(e,t){await this.plugin.taskService.toggleEventStatus(e),t()}updateAllEventElementsAppearance(e){this.contentContainer&&this.contentContainer.querySelectorAll(`[data-event-id="${e.id}"]`).forEach(a=>{this.updateEventElementAppearance(a,e)})}updateEventElementAppearance(e,t){t.completed?e.classList.add("albus-super-daily-notes-completed"):e.classList.remove("albus-super-daily-notes-completed");let a="var(--background-secondary)";if(t.tag){let n=this.plugin.settings.customTags.find(o=>o.name===t.tag);n&&n.color&&(a=n.color)}t.completed&&this.plugin.settings.grayOutCompleted&&(a="#E0E0E0"),e.style.backgroundColor=a,e.style.setProperty("--event-tag-color",a);let i=e.querySelector('input[type="checkbox"]');i&&(i.checked=t.completed)}saveScrollPosition(){this.contentContainer&&(this.scrollPosition=this.contentContainer.scrollTop)}restoreScrollPosition(){this.contentContainer&&this.scrollPosition!==void 0&&requestAnimationFrame(()=>{this.contentContainer&&(this.contentContainer.scrollTop=this.scrollPosition)})}cleanup(){let e=this.ganttDragState;e.mouseMoveHandler&&document.removeEventListener("mousemove",e.mouseMoveHandler),e.mouseUpHandler&&document.removeEventListener("mouseup",e.mouseUpHandler),e.previewEl&&e.previewEl.remove(),e.isDragging=!1,e.headerCells=[],e.mouseMoveHandler=null,e.mouseUpHandler=null,e.previewEl=null}};var UC=require("obsidian");var jy=class{constructor(e,t,a,i){this.habits=[];this.selectedHabit=null;this.completedLookup=new Set;this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i,this.plugin.settings.habitItems.length>0&&(this.selectedHabit=this.plugin.settings.habitItems[0].name)}setHabits(e){this.habits=e}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}cleanup(){}rebuildLookup(){if(this.completedLookup.clear(),!!this.selectedHabit)for(let e of this.habits)e.habitName===this.selectedHabit&&e.completed&&this.completedLookup.add(e.date)}renderHeader(e,t){let a=this.plugin.settings.habitItems,i=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group albus-super-daily-notes-planner-mode-group-scrollable"});a.forEach(f=>{i.createEl("button",{text:f.name,cls:`albus-super-daily-notes-view-mode-btn ${this.selectedHabit===f.name?"albus-super-daily-notes-active":""}`}).addEventListener("click",()=>{this.selectedHabit=f.name,t()})});let n=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),o=n.createEl("button");(0,UC.setIcon)(o,"chevron-left"),o.addEventListener("click",()=>{this.currentDate=new Date(this.currentDate.getFullYear()-1,0,1),t()}),n.createEl("button",{text:`${this.currentDate.getFullYear()}\u5E74`}).addEventListener("click",()=>{new ka(this.app,this.currentDate,f=>{this.currentDate=f,t()}).open()});let l=n.createEl("button");(0,UC.setIcon)(l,"chevron-right"),l.addEventListener("click",()=>{this.currentDate=new Date(this.currentDate.getFullYear()+1,0,1),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:"\u4ECA\u5E74"}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e,t){e.empty();let a=this.plugin.settings.habitItems;if(a.length===0){e.createDiv({cls:"albus-super-daily-notes-habit-empty",text:"\u8BF7\u5728\u8BBE\u7F6E\u4E2D\u6DFB\u52A0\u6253\u5361\u9879\u76EE"});return}(!this.selectedHabit||!a.find(n=>n.name===this.selectedHabit))&&(this.selectedHabit=a[0].name),this.rebuildLookup();let i=e.createDiv({cls:"albus-super-daily-notes-habit-view"});this.renderYearSummary(i),this.renderYearCalendar(i,t)}renderYearSummary(e){if(!this.selectedHabit)return;let t=this.currentDate.getFullYear(),a=new Date,n=t===a.getFullYear()?Math.floor((a.getTime()-new Date(t,0,1).getTime())/864e5)+1:this.isLeapYear(t)?366:365,o=this.completedLookup.size,s=this.calculateStreak(),l=n>0?Math.round(o/n*100):0,u=e.createDiv({cls:"albus-super-daily-notes-habit-year-summary"}),c=(f,p)=>{let h=u.createDiv({cls:"albus-super-daily-notes-habit-stat"});h.createDiv({cls:"albus-super-daily-notes-habit-stat-value",text:f}),h.createDiv({cls:"albus-super-daily-notes-habit-stat-label",text:p})};c(`${o}`,"\u5DF2\u6253\u5361\u5929\u6570"),c(`${l}%`,"\u5B8C\u6210\u7387"),c(`${s}`,"\u6700\u957F\u8FDE\u7EED\u6253\u5361\u5929\u6570")}renderYearCalendar(e,t){let a=this.currentDate.getFullYear(),i=new Date,n=ne(i),o=i.getTime(),s=e.createDiv({cls:"albus-super-daily-notes-habit-year-grid"});for(let l=0;l<12;l++)this.renderMonth(s,a,l,n,o,t)}renderMonth(e,t,a,i,n,o){let s=e.createDiv({cls:"albus-super-daily-notes-habit-month"}),l=new Date,u=t===l.getFullYear()&&a===l.getMonth();s.createDiv({cls:`albus-super-daily-notes-habit-month-label${u?" is-current":""}`,text:`${a+1}\u6708`});let c=s.createDiv({cls:"albus-super-daily-notes-habit-wkheader"});for(let v of["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"])c.createDiv({cls:"albus-super-daily-notes-habit-wkday",text:v});let f=s.createDiv({cls:"albus-super-daily-notes-habit-days"}),p=new Date(t,a+1,0).getDate(),h=this.getMondayBasedDay(new Date(t,a,1)),d=String(a+1).padStart(2,"0");for(let v=0;v<h;v++)f.createDiv({cls:"albus-super-daily-notes-habit-day is-empty"});for(let v=1;v<=p;v++){let m=`${t}-${d}-${String(v).padStart(2,"0")}`,g=new Date(t,a,v).getTime()>n,y=m===i,x=this.completedLookup.has(m),_=f.createDiv({cls:"albus-super-daily-notes-habit-day"+(x?" is-done":"")+(y?" is-today":"")+(g?" is-future":"")});_.setText(String(v)),_.dataset.day=String(v)}this.selectedHabit&&(f.addEventListener("click",async v=>{let m=v.target.closest(".albus-super-daily-notes-habit-day:not(.is-empty):not(.is-future)");m!=null&&m.dataset.day&&(await this.plugin.taskService.toggleHabit(new Date(t,a,Number(m.dataset.day)),this.selectedHabit),o())}),f.addEventListener("contextmenu",v=>{let m=v.target.closest(".albus-super-daily-notes-habit-day:not(.is-empty):not(.is-future)");m!=null&&m.dataset.day&&(v.preventDefault(),this.callbacks.openDailyNote(new Date(t,a,Number(m.dataset.day))))}))}getMondayBasedDay(e){let t=e.getDay();return t===0?6:t-1}calculateStreak(){if(this.completedLookup.size===0)return 0;let e=Array.from(this.completedLookup).sort(),t=1,a=1;for(let i=1;i<e.length;i++){let n=new Date(e[i-1]),s=(new Date(e[i]).getTime()-n.getTime())/864e5;Math.round(s)===1?(a++,a>t&&(t=a)):a=1}return t}isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}};var Zr=require("obsidian");var $y=require("obsidian");var vh=class extends $y.Modal{constructor(t,a,i,n,o){super(t);this.inlineEditor=null;this.editedContent="";this.entry=a,this.component=new $y.Component,this.taskService=i,this.onSaved=o!=null?o:null,this.editedContent=a.content}onOpen(){this.component.load(),this.modalEl.addClass("albus-super-daily-notes-journal-modal"),this.openEditor()}async openEditor(){let{contentEl:t}=this;t.empty(),t.createDiv({cls:"albus-super-daily-notes-journal-modal-header"}).createEl("h3",{text:this.getDateLabel(),cls:"albus-super-daily-notes-journal-modal-title"});let i=t.createDiv({cls:"albus-super-daily-notes-journal-modal-editor-container"}),n=new Date(this.entry.date),o=await this.taskService.getOrCreateDailyNoteFile(n);this.inlineEditor=new Pa(this.app,i,{value:this.editedContent,file:o,placeholder:"\u5199\u70B9\u4EC0\u4E48...",onChange:s=>{this.editedContent=s}}),setTimeout(()=>{var s;return(s=this.inlineEditor)==null?void 0:s.focus()},50)}getDateLabel(){let t=new Date(this.entry.date);return`${t.getFullYear()}\u5E74${t.getMonth()+1}\u6708${t.getDate()}\u65E5`}async onClose(){if(this.editedContent!==this.entry.content){let t=new Date(this.entry.date);await this.taskService.saveJournal(t,this.editedContent)}this.inlineEditor&&(this.inlineEditor.destroy(),this.inlineEditor=null),this.component.unload(),this.contentEl.empty(),this.onSaved&&this.onSaved()}};var Ky=class{constructor(e,t,a,i){this.viewMode="day";this.monthJournals=[];this.dayJournal=null;this.onThisDayJournals=[];this.journalDateMap=new Map;this.renderComponent=new Zr.Component;this.todayEditor=null;this.todayEditorContent="";this.todayEditMode=!1;this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}getViewMode(){return this.viewMode}setMonthJournals(e){this.monthJournals=e,this.journalDateMap.clear();for(let t of e)this.journalDateMap.set(t.date,t)}setDayJournal(e){this.dayJournal=e}setOnThisDayJournals(e){this.onThisDayJournals=e}cleanup(){this.destroyTodayEditor(),this.renderComponent.unload()}async destroyTodayEditor(){this.todayEditor&&(this.dayJournal&&this.todayEditorContent!==this.dayJournal.content?await this.plugin.taskService.saveJournal(this.currentDate,this.todayEditorContent):!this.dayJournal&&this.todayEditorContent.trim().length>0&&await this.plugin.taskService.saveJournal(this.currentDate,this.todayEditorContent),this.todayEditor.destroy(),this.todayEditor=null)}renderHeader(e,t){let a=[{id:"day",label:"\u65E5"},{id:"month",label:"\u6708"}],i={day:"calendar-1",month:"calendar-days"},n=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group"});a.forEach(({id:p,label:h})=>{let d=n.createEl("button",{cls:`albus-super-daily-notes-view-mode-btn ${this.viewMode===p?"albus-super-daily-notes-active":""}`});(0,Zr.setIcon)(d,i[p]),d.createSpan({text:h}),d.addEventListener("click",()=>{this.viewMode=p,t()})});let o=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),s=o.createEl("button");(0,Zr.setIcon)(s,"chevron-left"),s.addEventListener("click",()=>{this.navigatePrev(),t()}),o.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,p=>{this.currentDate=p,t()}).open()});let u=o.createEl("button");(0,Zr.setIcon)(u,"chevron-right"),u.addEventListener("click",()=>{this.navigateNext(),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:this.viewMode==="month"?"\u672C\u6708":"\u4ECA\u5929"}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e,t){this.destroyTodayEditor(),this.renderComponent.unload(),this.renderComponent=new Zr.Component,this.renderComponent.load(),requestAnimationFrame(()=>{switch(this.viewMode){case"month":this.renderMonthView(e,t);break;case"day":this.renderDayView(e,t);break}})}getViewTitle(){return this.viewMode==="month"?`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`:`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708${this.currentDate.getDate()}\u65E5`}navigatePrev(){if(this.viewMode==="month"){let e=new Date(this.currentDate);e.setMonth(e.getMonth()-1),this.currentDate=e}else{let e=new Date(this.currentDate);e.setDate(e.getDate()-1),this.currentDate=e}}navigateNext(){if(this.viewMode==="month"){let e=new Date(this.currentDate);e.setMonth(e.getMonth()+1),this.currentDate=e}else{let e=new Date(this.currentDate);e.setDate(e.getDate()+1),this.currentDate=e}}renderMonthView(e,t){let a=Gl(this.currentDate),i=e.createDiv({cls:"albus-super-daily-notes-journal-month-view"}),n=i.createDiv({cls:"albus-super-daily-notes-month-header"});["\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D","\u5468\u65E5"].forEach(s=>{n.createDiv({cls:"albus-super-daily-notes-month-day-header",text:s})});let o=[];for(let s=0;s<a.length;s+=7)o.push(a.slice(s,s+7));o.forEach(s=>{let l=i.createDiv({cls:"albus-super-daily-notes-journal-month-week"});s.forEach(u=>{var y;let c=gh(u,this.currentDate),f=u.toDateString()===new Date().toDateString(),p=ne(u),h=this.journalDateMap.get(p),d=(y=h==null?void 0:h.hasContent)!=null?y:!1,v=h&&h.images.length>0,m=l.createDiv({cls:"albus-super-daily-notes-journal-month-day"+(c?" is-current-month":" is-other-month")+(f?" is-today":"")+(d?" has-journal":"")});if(m.createDiv({cls:"albus-super-daily-notes-journal-day-header"}).createEl("span",{cls:"albus-super-daily-notes-journal-day-number"+(f?" is-today-number":""),text:u.getDate().toString()}),v&&c)this.renderCellBackground(m,h.images[0]),m.addClass("has-bg-image");else if(d&&c){let x=m.createDiv({cls:"albus-super-daily-notes-journal-day-preview"}),_=h.content.replace(/!\[\[.*?\]\]/g,"").replace(/!\[.*?\]\(.*?\)/g,"").trim();Zr.MarkdownRenderer.render(this.app,_.substring(0,300),x,"",this.renderComponent)}else if(c&&!d){let x=m.createDiv({cls:"albus-super-daily-notes-journal-day-placeholder"});(0,Zr.setIcon)(x,"plus")}c&&(m.addEventListener("click",()=>{let x=d&&h?h:{date:p,content:"",images:[],hasContent:!1};new vh(this.app,x,this.plugin.taskService,this.plugin.settings.journalTitle,()=>t()).open()}),m.addEventListener("contextmenu",x=>{x.preventDefault(),this.callbacks.openDailyNote(u)}))})})}renderCellBackground(e,t){let a=this.app.metadataCache.getFirstLinkpathDest(t,"");if(a&&a instanceof Zr.TFile){let i=this.app.vault.getResourcePath(a);e.style.backgroundImage=`url('${i}')`}}renderDayView(e,t){let a=e.createDiv({cls:"albus-super-daily-notes-journal-day-view"}),i=ne(this.currentDate),n=a.createDiv({cls:"albus-super-daily-notes-journal-today-section"});this.renderTodayCard(n,i,t);let o=this.onThisDayJournals.filter(l=>l.date!==i),s=a.createDiv({cls:"albus-super-daily-notes-journal-history-section"});if(s.createDiv({cls:"albus-super-daily-notes-journal-section-title",text:"\u5386\u53F2\u4E0A\u7684\u4ECA\u5929"}),o.length>0){let l=s.createDiv({cls:"albus-super-daily-notes-journal-history-grid"});for(let u of o)this.renderHistoryCard(l,u,t)}else s.createDiv({cls:"albus-super-daily-notes-journal-history-empty-text",text:"\u6682\u65E0\u5185\u5BB9"})}renderTodayCard(e,t,a){var u;let i=e.createDiv({cls:"albus-super-daily-notes-journal-card"}),n=i.createDiv({cls:"albus-super-daily-notes-journal-card-header"});n.createDiv({cls:"albus-super-daily-notes-journal-card-title",text:this.currentDate.getFullYear()+"\u5E74"});let o=n.createEl("button",{cls:"albus-super-daily-notes-view-mode-btn"});(0,Zr.setIcon)(o,this.todayEditMode?"book-open":"pencil");let s=i.createDiv({cls:"albus-super-daily-notes-journal-card-content"}),l=this.dayJournal;this.todayEditorContent=(u=l==null?void 0:l.content)!=null?u:"",this.todayEditMode?this.initTodayEditor(s,t):l!=null&&l.hasContent?Zr.MarkdownRenderer.render(this.app,l.content,s,"",this.renderComponent):s.createDiv({cls:"albus-super-daily-notes-journal-card-empty-area",text:"\u6682\u65E0\u5185\u5BB9"}),o.addEventListener("click",async()=>{this.todayEditMode?(await this.destroyTodayEditor(),this.todayEditMode=!1):this.todayEditMode=!0,a()}),i.addEventListener("contextmenu",c=>{c.preventDefault(),this.callbacks.openDailyNote(new Date(t+"T00:00:00"))})}async initTodayEditor(e,t){let a=new Date(t+"T00:00:00"),i=await this.plugin.taskService.getOrCreateDailyNoteFile(a);this.todayEditor=new Pa(this.app,e,{value:this.todayEditorContent,file:i,placeholder:"\u5199\u70B9\u4EC0\u4E48...",onChange:n=>{this.todayEditorContent=n}}),setTimeout(()=>{var n;return(n=this.todayEditor)==null?void 0:n.focus()},50)}renderHistoryCard(e,t,a){let i=e.createDiv({cls:"albus-super-daily-notes-journal-card"});if(i.createDiv({cls:"albus-super-daily-notes-journal-card-header"}).createDiv({cls:"albus-super-daily-notes-journal-card-title",text:`${t.date.substring(0,4)}\u5E74`}),t.hasContent){let o=i.createDiv({cls:"albus-super-daily-notes-journal-card-content"});Zr.MarkdownRenderer.render(this.app,t.content,o,"",this.renderComponent)}else i.createDiv({cls:"albus-super-daily-notes-journal-card-empty-area",text:"\u6682\u65E0\u5185\u5BB9"});i.addEventListener("click",()=>{new vh(this.app,t,this.plugin.taskService,this.plugin.settings.journalTitle,()=>a()).open()}),i.addEventListener("contextmenu",o=>{o.preventDefault(),this.callbacks.openDailyNote(new Date(t.date+"T00:00:00"))})}};var FC=class{constructor(){this.positions=new Map}save(e,t){t&&this.positions.set(e,t.scrollTop)}restore(e,t){if(t){let a=this.positions.get(e);a!==void 0&&requestAnimationFrame(()=>{t.scrollTop=a})}}get(e){return this.positions.get(e)||0}},HC=class{constructor(){this.pendingUpdates=[];this.isScheduled=!1;this.rafId=null}scheduleUpdate(e){this.pendingUpdates.push(e),this.isScheduled||(this.isScheduled=!0,this.rafId=requestAnimationFrame(()=>this.flush()))}scheduleIdleUpdate(e){"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:100}):setTimeout(e,0)}flush(){let e=this.pendingUpdates;this.pendingUpdates=[],this.isScheduled=!1,this.rafId=null;for(let t of e)t()}cancel(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.pendingUpdates=[],this.isScheduled=!1}},GC=new FC,l5=new HC;var Lc="albus-super-daily-notes-view",Jy=class extends Vl.ItemView{constructor(t,a){super(t);this.currentDate=new Date;this.mainTab="schedule";this.tasks=[];this.events=[];this.habitRecords=[];this.journalEntries=[];this.dayJournal=null;this.onThisDayJournals=[];this.container=null;this.tabBar=null;this.headerContainer=null;this.contentContainer=null;this.scheduleHeaderEl=null;this.statsHeaderEl=null;this.eventsHeaderEl=null;this.habitsHeaderEl=null;this.journalHeaderEl=null;this.scheduleContentEl=null;this.statsContentEl=null;this.eventsContentEl=null;this.habitsContentEl=null;this.journalContentEl=null;this.isRendering=!1;this.currentLoadOperation=null;this.timeIndicatorInterval=null;this.viewsInitialized={schedule:!1,stats:!1,events:!1,habits:!1,journal:!1};this.scheduleView=null;this.statsView=null;this.eventsView=null;this.habitView=null;this.journalView=null;this.plugin=a}getViewType(){return Lc}getDisplayText(){return"Super Daily Notes"}getIcon(){return"calendar-clock"}async onOpen(){let t=this.containerEl.children[1];t.empty(),this.container=t.createDiv({cls:"albus-super-daily-notes-container"}),this.createLayoutStructure(),this.initializeSubViews(),await this.loadAndRender(!1),this.startTimeIndicatorUpdate()}async onClose(){var t,a,i,n,o;this.stopTimeIndicatorUpdate(),this.currentLoadOperation&&(this.currentLoadOperation.cancelled=!0),l5.cancel(),(t=this.scheduleView)==null||t.cleanup(),(a=this.statsView)==null||a.cleanup(),(i=this.eventsView)==null||i.cleanup(),(n=this.habitView)==null||n.cleanup(),(o=this.journalView)==null||o.cleanup()}createLayoutStructure(){if(!this.container)return;let t=this.container.createDiv({cls:"albus-super-daily-notes-planner-shell"});this.tabBar=t.createDiv({cls:"albus-super-daily-notes-planner-main-tabs"}),this.renderMainTabs();let a=t.createDiv({cls:"albus-super-daily-notes-planner-workspace"});this.headerContainer=a.createDiv({cls:"albus-super-daily-notes-planner-header"}),this.scheduleHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-schedule-header"}),this.statsHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-stats-header"}),this.eventsHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-events-header"}),this.habitsHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-habits-header"}),this.journalHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-journal-header"}),this.contentContainer=a.createDiv({cls:"albus-super-daily-notes-planner-content"}),this.scheduleContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-schedule-content"}),this.statsContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-stats-content"}),this.eventsContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-events-content"}),this.habitsContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-habits-content"}),this.journalContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-journal-content"}),this.updateSubViewVisibility()}updateSubViewVisibility(){this.scheduleHeaderEl&&(this.scheduleHeaderEl.style.display=this.mainTab==="schedule"?"flex":"none"),this.statsHeaderEl&&(this.statsHeaderEl.style.display=this.mainTab==="stats"?"flex":"none"),this.eventsHeaderEl&&(this.eventsHeaderEl.style.display=this.mainTab==="events"?"flex":"none"),this.habitsHeaderEl&&(this.habitsHeaderEl.style.display=this.mainTab==="habits"?"flex":"none"),this.journalHeaderEl&&(this.journalHeaderEl.style.display=this.mainTab==="journal"?"flex":"none"),this.scheduleContentEl&&(this.scheduleContentEl.style.display=this.mainTab==="schedule"?"block":"none"),this.statsContentEl&&(this.statsContentEl.style.display=this.mainTab==="stats"?"block":"none"),this.eventsContentEl&&(this.eventsContentEl.style.display=this.mainTab==="events"?"block":"none"),this.habitsContentEl&&(this.habitsContentEl.style.display=this.mainTab==="habits"?"block":"none"),this.journalContentEl&&(this.journalContentEl.style.display=this.mainTab==="journal"?"block":"none")}initializeSubViews(){let t={openDailyNote:a=>this.openDailyNote(a)};this.scheduleView=new Ch(this.app,this.plugin,this.currentDate,t),this.scheduleView.requestAutoScroll(),this.statsView=new Zy(this.app,this.plugin,this.currentDate),this.eventsView=new qy(this.app,this.plugin,this.currentDate,t),this.habitView=new jy(this.app,this.plugin,this.currentDate,t),this.journalView=new Ky(this.app,this.plugin,this.currentDate,t)}validateMainTab(){let t=this.plugin.settings;(this.mainTab==="stats"&&!t.statsEnabled||this.mainTab==="events"&&!t.eventsEnabled||this.mainTab==="habits"&&!t.habitsEnabled||this.mainTab==="journal"&&!t.journalEnabled)&&(this.mainTab="schedule")}async loadAndRender(t=!0){if(this.currentLoadOperation&&(this.currentLoadOperation.cancelled=!0),this.isRendering)return;this.isRendering=!0;let a={cancelled:!1};this.currentLoadOperation=a;try{if(!this.container||(this.validateMainTab(),this.tabBar&&(this.tabBar.empty(),this.renderMainTabs()),t&&this.saveCurrentViewScrollPosition(),this.updateSubViewVisibility(),this.updateCurrentHeader(),await Promise.race([this.loadData(a),new Promise((i,n)=>setTimeout(()=>n(new Error("\u52A0\u8F7D\u8D85\u65F6")),1e4))]),a.cancelled))return;await this.renderCurrentContent(),t&&this.restoreCurrentViewScrollPosition(),this.scheduleBackgroundPreload()}catch(i){a.cancelled||(console.error("Failed to load data:",i),this.showErrorState(i instanceof Error?i.message:"\u52A0\u8F7D\u5931\u8D25"))}finally{this.isRendering=!1,this.currentLoadOperation===a&&(this.currentLoadOperation=null)}}saveCurrentViewScrollPosition(){let t=this.getCurrentContentContainer();t&&GC.save(`content-${this.mainTab}`,t)}restoreCurrentViewScrollPosition(){let t=this.getCurrentContentContainer();t&&GC.restore(`content-${this.mainTab}`,t)}getCurrentContentContainer(){switch(this.mainTab){case"schedule":return this.scheduleContentEl;case"stats":return this.statsContentEl;case"events":return this.eventsContentEl;case"habits":return this.habitsContentEl;case"journal":return this.journalContentEl}}scheduleBackgroundPreload(){if("requestIdleCallback"in window){let t=this.plugin.settings;window.requestIdleCallback(()=>{!this.viewsInitialized.schedule&&this.mainTab!=="schedule"&&this.preloadScheduleView(),t.statsEnabled&&!this.viewsInitialized.stats&&this.mainTab!=="stats"&&this.preloadStatsView(),t.eventsEnabled&&!this.viewsInitialized.events&&this.mainTab!=="events"&&this.preloadEventsView(),t.habitsEnabled&&!this.viewsInitialized.habits&&this.mainTab!=="habits"&&this.preloadHabitView(),t.journalEnabled&&!this.viewsInitialized.journal&&this.mainTab!=="journal"&&this.preloadJournalView()},{timeout:2e3})}}async preloadScheduleView(){if(!(this.viewsInitialized.schedule||!this.scheduleView||!this.scheduleContentEl))try{let t=this.plugin.taskService,a=this.scheduleView.getViewMode(),i=this.scheduleView.getCurrentDate(),n=[];switch(a){case"week":n=await t.loadWeekTasks(fi(i));break;case"month":n=await t.loadMonthTasks(i);break}this.scheduleView.setTasks(n),this.scheduleView.renderContent(this.scheduleContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.schedule=!0}catch(t){}}async preloadStatsView(){if(!(this.viewsInitialized.stats||!this.statsView||!this.statsContentEl))try{let t=this.plugin.taskService,a=this.statsView.getViewMode(),i=this.statsView.getCurrentDate(),n=[];switch(a){case"day":let o=await t.loadMonthTasks(i),s=ne(i);n=o.filter(l=>l.date===s);break;case"week":n=await t.loadWeekTasks(fi(i));break;case"month":n=await t.loadMonthTasks(i);break;case"year":n=await t.loadYearTasks(i.getFullYear());break}this.statsView.setTasks(n),this.statsView.renderContent(this.statsContentEl),this.viewsInitialized.stats=!0}catch(t){}}async preloadEventsView(){if(!(this.viewsInitialized.events||!this.eventsView||!this.eventsContentEl))try{let t=this.plugin.taskService,a=this.eventsView.getCurrentDate(),i=await t.loadMonthEvents(a);this.eventsView.setEvents(i),this.eventsView.renderContent(this.eventsContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.events=!0}catch(t){}}async preloadHabitView(){if(!(this.viewsInitialized.habits||!this.habitView||!this.habitsContentEl))try{let t=this.plugin.taskService,a=this.habitView.getCurrentDate(),i=await t.loadYearHabits(a.getFullYear());this.habitView.setHabits(i),this.habitView.renderContent(this.habitsContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.habits=!0}catch(t){}}async preloadJournalView(){if(!(this.viewsInitialized.journal||!this.journalView||!this.journalContentEl))try{let t=this.plugin.taskService,a=this.journalView.getCurrentDate();if(this.journalView.getViewMode()==="month"){let n=await t.loadMonthJournals(a);this.journalView.setMonthJournals(n)}else{let[n,o]=await Promise.all([t.loadDayJournal(a),t.loadOnThisDayJournals(a)]);this.journalView.setDayJournal(n),this.journalView.setOnThisDayJournals(o)}this.journalView.renderContent(this.journalContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.journal=!0}catch(t){}}renderMainTabs(){if(!this.tabBar)return;let t=[{id:"schedule",label:"\u65E5\u7A0B\u7BA1\u7406",icon:"calendar-fold"},{id:"stats",label:"\u65E5\u7A0B\u7EDF\u8BA1",icon:"chart-column"},{id:"events",label:"\u4E8B\u9879\u7BA1\u7406",icon:"chart-no-axes-gantt"},{id:"habits",label:"\u4E60\u60EF\u6253\u5361",icon:"calendar-check"},{id:"journal",label:"\u65E5\u5FD7\u7BA1\u7406",icon:"notebook-pen"}],a=this.plugin.settings;t.filter(({id:n})=>n==="stats"?a.statsEnabled:n==="events"?a.eventsEnabled:n==="habits"?a.habitsEnabled:n==="journal"?a.journalEnabled:!0).forEach(({id:n,label:o,icon:s})=>{let l=this.tabBar.createEl("button",{cls:`albus-super-daily-notes-planner-main-tab ${this.mainTab===n?"albus-super-daily-notes-active":""}`,attr:{"aria-label":o}});l.dataset.tab=n,(0,Vl.setIcon)(l,s),l.addEventListener("click",()=>{var u;if(this.mainTab!==n){this.saveCurrentViewScrollPosition();let c=this.mainTab;this.mainTab=n,n==="schedule"&&((u=this.scheduleView)==null?void 0:u.getViewMode())==="week"&&this.scheduleView.requestAutoScroll(),this.updateSubViewVisibility(),this.updateTabBarState(),this.viewsInitialized[n]&&this.restoreCurrentViewScrollPosition(),this.loadAndRender(!0)}})})}updateTabBarState(){if(!this.tabBar)return;this.tabBar.querySelectorAll(".albus-super-daily-notes-planner-main-tab").forEach(a=>{let i=a;i.dataset.tab===this.mainTab?i.classList.add("albus-super-daily-notes-active"):i.classList.remove("albus-super-daily-notes-active")})}updateCurrentHeader(){var a,i,n,o,s;let t=this.getCurrentHeaderContainer();if(t)switch(t.empty(),this.mainTab){case"schedule":(a=this.scheduleView)==null||a.renderHeader(t,()=>{this.viewsInitialized.schedule=!1,this.loadAndRender(!0)});break;case"stats":(i=this.statsView)==null||i.renderHeader(t,()=>{this.viewsInitialized.stats=!1,this.loadAndRender(!0)});break;case"events":(n=this.eventsView)==null||n.renderHeader(t,()=>{this.viewsInitialized.events=!1,this.loadAndRender(!0)});break;case"habits":(o=this.habitView)==null||o.renderHeader(t,()=>{this.viewsInitialized.habits=!1,this.loadAndRender(!0)});break;case"journal":(s=this.journalView)==null||s.renderHeader(t,()=>{this.viewsInitialized.journal=!1,this.loadAndRender(!0)});break}}getCurrentHeaderContainer(){switch(this.mainTab){case"schedule":return this.scheduleHeaderEl;case"stats":return this.statsHeaderEl;case"events":return this.eventsHeaderEl;case"habits":return this.habitsHeaderEl;case"journal":return this.journalHeaderEl}}async loadData(t){let a=this.plugin.taskService;if(!(t&&t.cancelled))switch(this.syncDatesFromSubViews(),this.mainTab){case"schedule":await this.loadScheduleData(a);break;case"stats":await this.loadStatsData(a);break;case"events":await this.loadEventsData(a);break;case"habits":await this.loadHabitsData(a);break;case"journal":await this.loadJournalData(a);break}}syncDatesFromSubViews(){switch(this.mainTab){case"schedule":this.scheduleView&&(this.currentDate=this.scheduleView.getCurrentDate());break;case"stats":this.statsView&&(this.currentDate=this.statsView.getCurrentDate());break;case"events":this.eventsView&&(this.currentDate=this.eventsView.getCurrentDate());break;case"habits":this.habitView&&(this.currentDate=this.habitView.getCurrentDate());break;case"journal":this.journalView&&(this.currentDate=this.journalView.getCurrentDate());break}}async loadScheduleData(t){if(!this.scheduleView)return;switch(this.scheduleView.getViewMode()){case"week":this.tasks=await t.loadWeekTasks(fi(this.currentDate));break;case"month":this.tasks=await t.loadMonthTasks(this.currentDate);break}this.scheduleView.setTasks(this.tasks)}async loadStatsData(t){if(!this.statsView)return;switch(this.statsView.getViewMode()){case"day":let i=await t.loadMonthTasks(this.currentDate),n=ne(this.currentDate);this.tasks=i.filter(s=>s.date===n);break;case"week":let o=fi(this.currentDate);this.tasks=await t.loadWeekTasks(o);break;case"month":this.tasks=await t.loadMonthTasks(this.currentDate);break;case"year":this.tasks=await t.loadYearTasks(this.currentDate.getFullYear());break}this.statsView.setTasks(this.tasks)}async loadEventsData(t){this.eventsView&&(this.events=await t.loadMonthEvents(this.currentDate),this.eventsView.setEvents(this.events))}async loadHabitsData(t){this.habitView&&(this.habitRecords=await t.loadYearHabits(this.currentDate.getFullYear()),this.habitView.setHabits(this.habitRecords))}async loadJournalData(t){if(!this.journalView)return;if(this.journalView.getViewMode()==="month")this.journalEntries=await t.loadMonthJournals(this.currentDate),this.journalView.setMonthJournals(this.journalEntries);else{let[i,n]=await Promise.all([t.loadDayJournal(this.currentDate),t.loadOnThisDayJournals(this.currentDate)]);this.dayJournal=i,this.onThisDayJournals=n,this.journalView.setDayJournal(this.dayJournal),this.journalView.setOnThisDayJournals(this.onThisDayJournals)}}async renderCurrentContent(){var a,i,n;let t=this.getCurrentContentContainer();if(t)switch(this.mainTab!=="stats"&&t.empty(),this.mainTab){case"schedule":(a=this.scheduleView)==null||a.renderContent(t,()=>{this.viewsInitialized.schedule=!1,this.loadAndRender(!0)}),this.viewsInitialized.schedule=!0;break;case"stats":await new Promise(o=>{requestAnimationFrame(()=>{var s;(s=this.statsView)==null||s.renderContent(t),this.viewsInitialized.stats=!0,o()})});break;case"events":(i=this.eventsView)==null||i.renderContent(t,()=>{this.viewsInitialized.events=!1,this.loadAndRender(!0)}),this.viewsInitialized.events=!0;break;case"habits":await new Promise(o=>{requestAnimationFrame(()=>{var s;(s=this.habitView)==null||s.renderContent(t,()=>{this.viewsInitialized.habits=!1,this.loadAndRender(!0)}),this.viewsInitialized.habits=!0,o()})});break;case"journal":(n=this.journalView)==null||n.renderContent(t,()=>{this.viewsInitialized.journal=!1,this.loadAndRender(!0)}),this.viewsInitialized.journal=!0;break}}showErrorState(t){if(!this.contentContainer)return;this.contentContainer.empty();let a=this.contentContainer.createDiv({cls:"albus-super-daily-notes-planner-error"}),i=a.createDiv({cls:"albus-super-daily-notes-planner-error-icon"});(0,Vl.setIcon)(i,"alert-triangle"),a.createDiv({cls:"albus-super-daily-notes-planner-error-text",text:t}),a.createEl("button",{text:"\u91CD\u8BD5",cls:"mod-cta"}).addEventListener("click",()=>{this.isRendering=!1,this.loadAndRender(!1)})}startTimeIndicatorUpdate(){this.timeIndicatorInterval=window.setInterval(()=>{var t;(t=this.scheduleView)==null||t.updateTimeIndicator()},1e3)}stopTimeIndicatorUpdate(){this.timeIndicatorInterval!==null&&(window.clearInterval(this.timeIndicatorInterval),this.timeIndicatorInterval=null)}async openDailyNote(t){let a=this.plugin.taskService.getDailyNoteFile(t);if(a)await this.app.workspace.getLeaf(!1).openFile(a);else{let i=ne(t);if(await this.confirmCreateDailyNote(i)){let o=window.moment(t),s=await(0,u5.createDailyNote)(o);s&&await this.app.workspace.getLeaf(!1).openFile(s)}}}async confirmCreateDailyNote(t){return new Promise(a=>{let i=new Vl.Modal(this.app);i.titleEl.setText("\u521B\u5EFA\u65E5\u8BB0"),i.contentEl.createEl("p",{text:`\u65E5\u671F ${t} \u7684\u65E5\u8BB0\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u662F\u5426\u521B\u5EFA\uFF1F`});let n=i.contentEl.createDiv({cls:"albus-super-daily-notes-modal-button-container"});n.createEl("button",{text:"\u53D6\u6D88"}).addEventListener("click",()=>{i.close(),a(!1)}),n.createEl("button",{text:"\u521B\u5EFA",cls:"mod-cta"}).addEventListener("click",()=>{i.close(),a(!0)}),i.open()})}};var x5=require("obsidian");var ro=require("obsidian"),c5=r=>{let{contentEl:e,plugin:t}=r,a=new ro.SettingGroup(e);a.addSetting(o=>{o.setName("\u65E5\u7A0B\u7EDF\u8BA1").setDesc("\u542F\u7528\u65E5\u7A0B\u7EDF\u8BA1\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.statsEnabled).onChange(async l=>{t.settings.statsEnabled=l,await t.saveSettings()}))}),a.addSetting(o=>{o.setName("\u4E8B\u9879\u7BA1\u7406").setDesc("\u542F\u7528\u4E8B\u9879\u7BA1\u7406\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.eventsEnabled).onChange(async l=>{t.settings.eventsEnabled=l,await t.saveSettings()}))}),a.addSetting(o=>{o.setName("\u4E60\u60EF\u6253\u5361").setDesc("\u542F\u7528\u4E60\u60EF\u6253\u5361\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.habitsEnabled).onChange(async l=>{t.settings.habitsEnabled=l,await t.saveSettings(),r.display()}))}),a.addSetting(o=>{o.setName("\u65E5\u5FD7\u7BA1\u7406").setDesc("\u542F\u7528\u65E5\u5FD7\u7BA1\u7406\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.journalEnabled).onChange(async l=>{t.settings.journalEnabled=l,await t.saveSettings(),r.display()}))}),new ro.Setting(e).setName("\u7BA1\u7406\u5668").setHeading();let i=new ro.SettingGroup(e);i.addSetting(o=>{o.setName("\u65E5\u7A0B\u6807\u9898").setDesc('\u65F6\u95F4\u8F74\u5C06\u4ECE\u65E5\u8BB0\u6587\u4EF6\u4E2D\u7684\u6B64\u6807\u9898\u4E0B\u8BFB\u53D6\u65E5\u7A0B\u8BB0\u5F55. \u5982\u679C\u4E3A\u7A7A, \u5219\u4F7F\u7528\u9ED8\u8BA4\u503C "# \u65E5\u7A0B".').addText(s=>s.setPlaceholder("# \u65E5\u7A0B").setValue(t.settings.scheduleTitle).onChange(async l=>{t.settings.scheduleTitle=l||"# \u65E5\u7A0B",await t.saveSettings()}))}),t.settings.habitsEnabled&&i.addSetting(o=>{o.setName("\u6253\u5361\u6807\u9898").setDesc('\u6253\u5361\u6570\u636E\u5C06\u4ECE\u65E5\u8BB0\u6587\u4EF6\u4E2D\u7684\u6B64\u6807\u9898\u4E0B\u8BFB\u53D6. \u5982\u679C\u4E3A\u7A7A, \u5219\u4F7F\u7528\u9ED8\u8BA4\u503C "# \u6253\u5361".').addText(s=>s.setPlaceholder("# \u6253\u5361").setValue(t.settings.habitTitle).onChange(async l=>{t.settings.habitTitle=l||"# \u6253\u5361",await t.saveSettings()}))}),t.settings.journalEnabled&&i.addSetting(o=>{o.setName("\u65E5\u5FD7\u6807\u9898").setDesc('\u65E5\u5FD7\u5185\u5BB9\u5C06\u4ECE\u65E5\u8BB0\u6587\u4EF6\u4E2D\u7684\u6B64\u6807\u9898\u4E0B\u8BFB\u53D6. \u5982\u679C\u4E3A\u7A7A, \u5219\u4F7F\u7528\u9ED8\u8BA4\u503C "# \u65E5\u5FD7".').addText(s=>s.setPlaceholder("# \u65E5\u5FD7").setValue(t.settings.journalTitle).onChange(async l=>{t.settings.journalTitle=l||"# \u65E5\u5FD7",await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u6BCF\u65E5\u8D77\u59CB\u65F6\u95F4(\u5C0F\u65F6)").setDesc("\u65F6\u95F4\u8F74\u5C06\u4ECE\u8BE5\u5C0F\u65F6\u5F00\u59CB\u663E\u793A\u4E00\u5929\u7684\u65E5\u7A0B, \u9ED8\u8BA4\u4E3A 8:00. \u8BF7\u8F93\u5165 0-23 \u4E4B\u95F4\u7684\u6574\u6570.").addText(s=>s.setPlaceholder("8").setValue(String(t.settings.dayStartHour)).onChange(async l=>{let u=parseInt(l);!isNaN(u)&&u>=0&&u<=23&&(t.settings.dayStartHour=u,await t.saveSettings())}))}),i.addSetting(o=>{o.setName("\u7070\u8272\u5316\u5DF2\u5B8C\u6210\u65E5\u7A0B").setDesc("\u5F00\u542F\u540E, \u5DF2\u5B8C\u6210\u7684\u65E5\u7A0B\u5C06\u663E\u793A\u4E3A\u7070\u8272; \u5173\u95ED\u540E, \u5DF2\u5B8C\u6210\u65E5\u7A0B\u5C06\u4FDD\u6301\u539F\u6709\u7684\u5F69\u8272\u6837\u5F0F.").addToggle(s=>s.setValue(t.settings.grayOutCompleted).onChange(async l=>{t.settings.grayOutCompleted=l,await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u62D6\u62FD\u5BF9\u9F50\u6A21\u5F0F").setDesc("\u7CBE\u786E\u6A21\u5F0F: \u53EF\u4EE5\u7CBE\u786E\u62D6\u62FD\u5230\u6BCF 1 \u5206\u949F. \u6574\u70B9\u6A21\u5F0F: \u4EE5 5 \u5206\u949F\u4E3A\u6700\u5C0F\u5355\u4F4D, \u8D77\u70B9\u5BF9\u9F50\u5230\u6574\u70B9\u6216\u534A\u70B9.").addDropdown(s=>s.addOption("precise","\u7CBE\u786E\u6A21\u5F0F").addOption("round","\u6574\u70B9\u6A21\u5F0F").setValue(t.settings.dragSnapMode).onChange(async l=>{t.settings.dragSnapMode=l,await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u53EA\u663E\u793A\u6700\u5E95\u5C42\u6807\u7B7E").setDesc("\u5F00\u542F\u540E, \u5C42\u7EA7\u6807\u7B7E(\u5982#\u65E5\u7A0B/\u5DE5\u4F5C)\u5C06\u53EA\u663E\u793A\u6700\u5E95\u5C42\u7684\u6807\u7B7E\u540D\u79F0(\u5DE5\u4F5C); \u5173\u95ED\u540E\u663E\u793A\u5B8C\u6574\u6807\u7B7E.").addToggle(s=>s.setValue(t.settings.showOnlyLeafTag).onChange(async l=>{t.settings.showOnlyLeafTag=l,await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u5361\u7247\u6837\u5F0F").setDesc("\u5168\u5F69\u6837\u5F0F: \u5361\u7247\u80CC\u666F\u4F7F\u7528\u6807\u7B7E\u989C\u8272. \u7B80\u7EA6\u6837\u5F0F: \u5361\u7247\u80CC\u666F\u7EDF\u4E00, \u6807\u7B7E\u989C\u8272\u663E\u793A\u5728\u5DE6\u4FA7\u8FB9\u6846.").addDropdown(s=>s.addOption("colorful","\u5168\u5F69\u6837\u5F0F").addOption("minimal","\u7B80\u7EA6\u6837\u5F0F").setValue(t.settings.cardStyle).onChange(async l=>{t.settings.cardStyle=l,await t.saveSettings()}))}),new ro.Setting(e).setName("\u6807\u7B7E").setHeading();let n=new ro.SettingGroup(e);if(t.settings.customTags.length===0&&n.addSetting(o=>{o.setName("\u8FD8\u6CA1\u6709\u6DFB\u52A0\u4EFB\u4F55\u6807\u7B7E").setDesc("\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u5F00\u59CB\u521B\u5EFA")}),t.settings.customTags.forEach((o,s)=>{n.addSetting(l=>{l.settingEl.addClass("albus-super-daily-notes-setting-list-row"),l.setName(`\u6807\u7B7E ${s+1}`).addText(u=>u.setPlaceholder("\u6807\u7B7E\u540D\u79F0").setValue(o.name).onChange(async c=>{t.settings.customTags[s].name=c,await t.saveSettings()})).addColorPicker(u=>u.setValue(o.color).onChange(async c=>{t.settings.customTags[s].color=c,await t.saveSettings()})),l.addExtraButton(u=>u.setIcon("trash").setTooltip("\u5220\u9664\u6807\u7B7E").onClick(async()=>{t.settings.customTags.splice(s,1),await t.saveSettings(),r.display()}))})}),n.addSetting(o=>{o.settingEl.addClass("albus-super-daily-notes-item-add-setting"),o.controlEl.addClass("albus-super-daily-notes-item-add-container"),o.addButton(s=>s.setButtonText("\u6DFB\u52A0\u65B0\u6807\u7B7E").setClass("albus-super-daily-notes-item-add-btn").onClick(async()=>{t.settings.customTags.push({name:"\u65B0\u6807\u7B7E",color:"#CCCCCC"}),await t.saveSettings(),r.display()}))}),t.settings.habitsEnabled){new ro.Setting(e).setName("\u6253\u5361").setHeading();let o=new ro.SettingGroup(e);t.settings.habitItems.length===0&&o.addSetting(s=>{s.setName("\u8FD8\u6CA1\u6709\u6DFB\u52A0\u4EFB\u4F55\u6253\u5361\u9879\u76EE").setDesc("\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u5F00\u59CB\u521B\u5EFA")}),t.settings.habitItems.forEach((s,l)=>{o.addSetting(u=>{u.settingEl.addClass("albus-super-daily-notes-setting-list-row"),u.setName(`\u6253\u5361\u9879 ${l+1}`).addText(c=>c.setPlaceholder("\u540D\u79F0").setValue(s.name).onChange(async f=>{t.settings.habitItems[l].name=f,await t.saveSettings()})),u.addExtraButton(c=>c.setIcon("trash").setTooltip("\u5220\u9664\u6253\u5361\u9879").onClick(async()=>{t.settings.habitItems.splice(l,1),await t.saveSettings(),r.display()}))})}),o.addSetting(s=>{s.settingEl.addClass("albus-super-daily-notes-item-add-setting"),s.controlEl.addClass("albus-super-daily-notes-item-add-container"),s.addButton(l=>l.setButtonText("\u6DFB\u52A0\u65B0\u6253\u5361\u9879").setClass("albus-super-daily-notes-item-add-btn").onClick(async()=>{t.settings.habitItems.push({name:"\u65B0\u4E60\u60EF"}),await t.saveSettings(),r.display()}))})}};var f5=require("obsidian");var ir=require("obsidian");var Ic=class Ic extends ir.Component{constructor(t,a){super();this.timerInterval=null;this.isDragging=!1;this.hasDragged=!1;this.dragStartPos={x:0,y:0};this.dragOffset={x:0,y:0};this.isMenuOpen=!1;this.audioContext=null;this.mouseMoveHandler=null;this.mouseUpHandler=null;this.clickOutsideHandler=null;this.resizeHandler=null;this.activeMenuMode=null;this.radialEditorWrapper=null;this.radialEditor=null;this.contextInputEl=null;this.contextMenu=null;this.shouldPlayContextCloseSound=!1;this.suppressNextBallClick=!1;if(!a.isLicensed())throw new Error("FloatingTimer requires a valid license");this.app=t,this.plugin=a,this.state={isActive:!1,isPaused:!1,currentTag:"",segments:[],description:""},this.initAudioContext(),this.createFloatingBall()}initAudioContext(){(typeof AudioContext!="undefined"||typeof window.webkitAudioContext!="undefined")&&(this.audioContext=new(window.AudioContext||window.webkitAudioContext))}playSound(t){if(!(!this.plugin.settings.floatingTimerAudioEnabled||!this.audioContext))try{this.audioContext.state==="suspended"&&this.audioContext.resume();let a=this.audioContext.createOscillator(),i=this.audioContext.createGain(),n=.3;switch(a.connect(i),i.connect(this.audioContext.destination),t){case"start":a.type="sine",a.frequency.setValueAtTime(523.25,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),a.frequency.setValueAtTime(783.99,this.audioContext.currentTime+.2),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.2),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.5),a.start(),a.stop(this.audioContext.currentTime+.5);break;case"pause":a.type="sine",a.frequency.setValueAtTime(783.99,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),a.frequency.setValueAtTime(523.25,this.audioContext.currentTime+.2),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.2),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.5),a.start(),a.stop(this.audioContext.currentTime+.5);break;case"reset":a.type="triangle",a.frequency.setValueAtTime(292,this.audioContext.currentTime),a.frequency.setValueAtTime(323.25,this.audioContext.currentTime+.15),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime+.15),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.4),a.start(),a.stop(this.audioContext.currentTime+.4);break;case"complete":a.type="sine",a.frequency.setValueAtTime(523.25,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),a.frequency.setValueAtTime(783.99,this.audioContext.currentTime+.2),a.frequency.setValueAtTime(1046.5,this.audioContext.currentTime+.3),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.2),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.3),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.8),a.start(),a.stop(this.audioContext.currentTime+.8);break;case"click":a.type="sine",a.frequency.setValueAtTime(659.25,this.audioContext.currentTime),a.frequency.setValueAtTime(783.99,this.audioContext.currentTime+.08),i.gain.setValueAtTime(.35*n,this.audioContext.currentTime),i.gain.setValueAtTime(.35*n,this.audioContext.currentTime+.08),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.25),a.start(),a.stop(this.audioContext.currentTime+.25);break;case"open":a.type="sine",a.frequency.setValueAtTime(523.25,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime+.1),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.3),a.start(),a.stop(this.audioContext.currentTime+.3);break;case"close":a.type="sine",a.frequency.setValueAtTime(659.25,this.audioContext.currentTime),a.frequency.setValueAtTime(523.25,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime+.1),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.3),a.start(),a.stop(this.audioContext.currentTime+.3);break}}catch(a){console.error("\u64AD\u653E\u97F3\u6548\u5931\u8D25:",a)}}onload(){}onunload(){this.stopTimer(),this.destroyRadialEditor(),this.mouseMoveHandler&&document.removeEventListener("mousemove",this.mouseMoveHandler),this.mouseUpHandler&&document.removeEventListener("mouseup",this.mouseUpHandler),this.clickOutsideHandler&&document.removeEventListener("click",this.clickOutsideHandler),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.contextMenu&&(this.shouldPlayContextCloseSound=!1,this.contextMenu.hide(),this.contextMenu=null),this.containerEl&&this.containerEl.parentNode&&this.containerEl.remove(),this.audioContext&&this.audioContext.state!=="closed"&&this.audioContext.close()}createFloatingBall(){this.containerEl=document.body.createDiv({cls:"albus-super-daily-notes-floating-timer-container"});let t=this.containerEl.createDiv({cls:"albus-super-daily-notes-floating-timer-main-area"});this.ballEl=t.createDiv({cls:"albus-super-daily-notes-floating-timer-display"});let a=this.ballEl.createDiv({cls:"albus-super-daily-notes-floating-timer-text"});a.textContent="00:00";let i=this.ballEl.createDiv({cls:"albus-super-daily-notes-floating-timer-tag"});i.textContent="\u672A\u5F00\u59CB",this.ballEl.createDiv({cls:"albus-super-daily-notes-floating-timer-start-time"}),t.addEventListener("mousedown",this.onBallMouseDown.bind(this)),this.mouseMoveHandler=this.onDocumentMouseMove.bind(this),this.mouseUpHandler=this.onDocumentMouseUp.bind(this),this.ballEl.addEventListener("click",this.onBallClick.bind(this)),this.ballEl.addEventListener("contextmenu",this.onBallRightClick.bind(this)),this.createPermanentControls(t),this.createMenu(),this.setInitialPosition(),this.resizeHandler=this.onWindowResize.bind(this),this.resizeHandler&&window.addEventListener("resize",this.resizeHandler)}onWindowResize(){if(!this.containerEl)return;let t=this.containerEl.getBoundingClientRect(),a=this.containerEl.classList.contains("albus-super-daily-notes-snapped-right"),i=this.containerEl.classList.contains("albus-super-daily-notes-snapped-bottom");if(a||i)return;let n=!1,o=t.left,s=t.top;t.right>window.innerWidth&&(o=Math.max(0,window.innerWidth-t.width),n=!0),t.bottom>window.innerHeight&&(s=Math.max(0,window.innerHeight-t.height),n=!0),n&&(this.containerEl.style.left=`${o}px`,this.containerEl.style.top=`${s}px`,this.savePosition())}setInitialPosition(){let t=this.plugin.settings.floatingTimerPosition;if(t){let a=window.innerWidth-80,i=window.innerHeight-80,n=Math.max(0,Math.min(t.x,a)),o=Math.max(0,Math.min(t.y,i));this.containerEl.style.left=`${n}px`,this.containerEl.style.top=`${o}px`,this.containerEl.style.right="auto",this.containerEl.style.bottom="auto",requestAnimationFrame(()=>this.snapToEdgeIfNeeded())}else this.containerEl.style.right="20px",this.containerEl.style.bottom="20px",requestAnimationFrame(()=>this.snapToEdgeIfNeeded())}onBallMouseDown(t){if(t.button===0&&this.isMenuOpen&&this.activeMenuMode==="context"){t.preventDefault(),t.stopPropagation(),this.suppressNextBallClick=!0,this.closeMenu({playSound:!0});return}if(t.target.closest(".albus-super-daily-notes-floating-timer-control-btn"))return;t.preventDefault(),this.isDragging=!0,this.hasDragged=!1,this.dragStartPos.x=t.clientX,this.dragStartPos.y=t.clientY;let i=this.containerEl.getBoundingClientRect();this.dragOffset.x=t.clientX-i.left,this.dragOffset.y=t.clientY-i.top,this.ballEl.style.cursor="grabbing",this.mouseMoveHandler&&document.addEventListener("mousemove",this.mouseMoveHandler),this.mouseUpHandler&&document.addEventListener("mouseup",this.mouseUpHandler)}onDocumentMouseMove(t){if(!this.isDragging)return;let a=Math.abs(t.clientX-this.dragStartPos.x),i=Math.abs(t.clientY-this.dragStartPos.y);if((a>5||i>5)&&(this.hasDragged||this.expandFromEdge(),this.hasDragged=!0),!this.hasDragged)return;let n=t.clientX-this.dragOffset.x,o=t.clientY-this.dragOffset.y,s=window.innerWidth-80,l=window.innerHeight-80,u=Math.max(0,Math.min(n,s)),c=Math.max(0,Math.min(o,l));this.containerEl.style.left=`${u}px`,this.containerEl.style.top=`${c}px`,this.containerEl.style.right="auto",this.containerEl.style.bottom="auto",this.checkEdgeProximity(u,c)}checkEdgeProximity(t,a){let i=this.containerEl.getBoundingClientRect(),n=Ic.SNAP_THRESHOLD;this.containerEl.classList.remove("albus-super-daily-notes-near-edge");let o=t<n,s=window.innerWidth-(t+i.width)<n,l=a<n,u=window.innerHeight-(a+i.height)<n;(o||s||l||u)&&this.containerEl.classList.add("albus-super-daily-notes-near-edge")}onDocumentMouseUp(){this.isDragging&&(this.isDragging=!1,this.ballEl.style.cursor="grab",this.containerEl.classList.remove("albus-super-daily-notes-near-edge"),this.hasDragged&&(this.snapToEdgeIfNeeded(),this.savePosition()),this.mouseMoveHandler&&document.removeEventListener("mousemove",this.mouseMoveHandler),this.mouseUpHandler&&document.removeEventListener("mouseup",this.mouseUpHandler))}snapToEdgeIfNeeded(){let t=this.containerEl.getBoundingClientRect(),a=Ic.SNAP_THRESHOLD,i=null;t.left<a?i="left":window.innerWidth-t.right<a?i="right":t.top<a?i="top":window.innerHeight-t.bottom<a&&(i="bottom"),this.expandFromEdge(),i&&this.applySnap(i)}applySnap(t){this.containerEl.classList.remove("albus-super-daily-notes-snapped","albus-super-daily-notes-snapped-left","albus-super-daily-notes-snapped-right","albus-super-daily-notes-snapped-top","albus-super-daily-notes-snapped-bottom","albus-super-daily-notes-near-edge"),t==="left"?(this.containerEl.style.left="0",this.containerEl.style.right="auto"):t==="right"?(this.containerEl.style.left="auto",this.containerEl.style.right="0"):t==="top"?(this.containerEl.style.top="0",this.containerEl.style.bottom="auto"):t==="bottom"&&(this.containerEl.style.top="auto",this.containerEl.style.bottom="0"),this.containerEl.classList.add("albus-super-daily-notes-snapped",`albus-super-daily-notes-snapped-${t}`)}expandFromEdge(){this.containerEl.classList.remove("albus-super-daily-notes-snapped","albus-super-daily-notes-snapped-left","albus-super-daily-notes-snapped-right","albus-super-daily-notes-snapped-top","albus-super-daily-notes-snapped-bottom")}async savePosition(){let t=this.containerEl.getBoundingClientRect();this.plugin.settings.floatingTimerPosition={x:t.left,y:t.top},await this.plugin.saveSettings(!1)}onBallClick(t){if(this.suppressNextBallClick){this.suppressNextBallClick=!1;return}if(this.hasDragged){this.hasDragged=!1;return}t.stopPropagation(),this.isMenuOpen?this.closeMenu({playSound:!0}):(this.playSound("open"),this.openMenu())}onBallRightClick(t){if(t.preventDefault(),t.stopPropagation(),this.hasDragged){this.hasDragged=!1;return}this.playSound("click"),this.plugin.activateView()}createPermanentControls(t){let a=t.createDiv({cls:"albus-super-daily-notes-floating-timer-permanent-controls"}),i=a.createDiv({cls:"albus-super-daily-notes-floating-timer-control-btn albus-super-daily-notes-floating-timer-control-start"});i.addEventListener("click",s=>{s.stopPropagation(),this.toggleTimer()}),(0,ir.setIcon)(i,"play");let n=a.createDiv({cls:"albus-super-daily-notes-floating-timer-control-btn albus-super-daily-notes-floating-timer-control-reset"});n.addEventListener("click",s=>{s.stopPropagation(),this.resetTimer()}),(0,ir.setIcon)(n,"rotate-ccw");let o=a.createDiv({cls:"albus-super-daily-notes-floating-timer-control-btn albus-super-daily-notes-floating-timer-control-complete"});o.addEventListener("click",s=>{s.stopPropagation(),this.completeTimer()}),(0,ir.setIcon)(o,"check")}createMenu(){this.menuEl=this.containerEl.createDiv({cls:"albus-super-daily-notes-floating-timer-menu"}),this.menuEl.style.display="none";let t=this.menuEl.createDiv({cls:"albus-super-daily-notes-floating-timer-input-container"});this.radialEditorWrapper=t.createDiv({cls:"albus-super-daily-notes-floating-timer-input"}),this.radialEditorWrapper.addEventListener("mousedown",n=>n.stopPropagation()),this.radialEditorWrapper.addEventListener("click",n=>n.stopPropagation()),this.menuEl.createDiv({cls:"albus-super-daily-notes-floating-timer-confirm-container"}).createEl("button",{cls:"albus-super-daily-notes-floating-timer-confirm-btn",text:"\u786E\u8BA4"}).addEventListener("click",n=>{n.stopPropagation(),this.closeMenu({playSound:!0})}),this.clickOutsideHandler||(this.clickOutsideHandler=n=>{this.isMenuOpen&&this.activeMenuMode==="radial"&&!this.containerEl.contains(n.target)&&this.closeMenu({playSound:!0})},document.addEventListener("click",this.clickOutsideHandler))}openMenu(){var u;if(!this.menuEl)return;this.isMenuOpen=!0;let t=this.containerEl.getBoundingClientRect(),a=(u=this.plugin.settings.floatingTimerExpandRadius)!=null?u:140,i=t.left,n=window.innerWidth-t.right,o=t.top,s=window.innerHeight-t.bottom;Math.min(i,n,o,s)<a?(this.activeMenuMode="context",this.setRadialMenuOpenState(!1),this.openContextMenu()):(this.activeMenuMode="radial",this.openRadialMenu())}openRadialMenu(){var a;if(!this.menuEl)return;this.contextMenu&&(this.shouldPlayContextCloseSound=!1,this.contextMenu.hide(),this.contextMenu=null),this.menuEl.classList.remove("albus-super-daily-notes-closing"),this.menuEl.classList.add("albus-super-daily-notes-radial-menu"),this.menuEl.querySelectorAll(".albus-super-daily-notes-floating-timer-btn").forEach(i=>i.remove()),this.menuEl.style.left="",this.menuEl.style.right="",this.menuEl.style.top="",this.menuEl.style.bottom="",this.menuEl.style.transform="",this.menuEl.style.marginLeft="",this.menuEl.style.marginRight="",this.menuEl.style.marginTop="",this.menuEl.style.marginBottom="",this.setRadialMenuOpenState(!0),this.createTagButtons(),this.destroyRadialEditor(),this.radialEditorWrapper&&(this.radialEditor=new Pa(this.app,this.radialEditorWrapper,{value:this.state.description||"",singleLineAutoGrow:!0,onChange:i=>{this.state.description=i}})),(a=this.radialEditor)==null||a.focus()}openContextMenu(){let t=new ir.Menu;this.contextMenu&&(this.shouldPlayContextCloseSound=!1,this.contextMenu.hide()),this.contextMenu=t,this.shouldPlayContextCloseSound=!0;let a=t.dom;a&&a.addClass("albus-super-daily-notes-timer-menu");let i=this.plugin.settings.customTags||[];t.addItem(u=>{let c=u.dom,f=document.createElement("div");f.className="albus-super-daily-notes-menu-input-container";let p=document.createElement("input");p.type="text",p.value=this.state.description||"",p.placeholder="\u8F93\u5165\u65E5\u7A0B\u63CF\u8FF0...",p.className="albus-super-daily-notes-menu-input",this.contextInputEl=p,p.addEventListener("mousedown",h=>h.stopPropagation()),p.addEventListener("click",h=>h.stopPropagation()),p.addEventListener("keydown",h=>{if(h.key==="Enter"||h.key==="Escape"){h.preventDefault(),h.stopPropagation(),this.closeMenu({playSound:!0});return}h.stopPropagation()}),p.addEventListener("input",h=>{this.state.description=h.target.value,this.syncDescriptionInputs()}),f.appendChild(p),c&&(c.addClass("albus-super-daily-notes-menu-input-item"),c.empty(),c.appendChild(f)),u.setTitle("")}),t.addSeparator(),i.forEach(u=>{t.addItem(c=>{c.setTitle(this.getTagDisplayName(u.name)).setIcon("tag").onClick(()=>{this.selectTag(u.name,!1),this.closeMenu({playSound:!0})}),u.name===this.state.currentTag&&c.setChecked(!0)})});let n=this.containerEl.getBoundingClientRect(),o=n.left+n.width/2,s=n.top+n.height/2,l=new MouseEvent("contextmenu",{clientX:o,clientY:s,bubbles:!0,cancelable:!0,view:window});t.showAtMouseEvent(l),t.onHide(()=>{if(this.contextMenu!==t)return;let u=this.shouldPlayContextCloseSound;this.contextMenu=null,this.contextInputEl=null,this.shouldPlayContextCloseSound=!1,this.isMenuOpen=!1,this.activeMenuMode=null,this.setRadialMenuOpenState(!1),u&&this.playSound("close")})}closeMenu(t){var a,i;if(this.isMenuOpen){if(this.activeMenuMode==="context"){this.shouldPlayContextCloseSound=(a=t==null?void 0:t.playSound)!=null?a:!0,(i=this.contextMenu)==null||i.hide();return}this.menuEl&&(t!=null&&t.playSound&&this.playSound("close"),this.isMenuOpen=!1,this.activeMenuMode=null,this.destroyRadialEditor(),this.menuEl.classList.add("albus-super-daily-notes-closing"),setTimeout(()=>{this.isMenuOpen||(this.setRadialMenuOpenState(!1),this.containerEl.classList.remove("albus-super-daily-notes-menu-open"),this.menuEl.classList.remove("albus-super-daily-notes-closing"))},300))}}destroyRadialEditor(){this.radialEditor&&(this.radialEditor.destroy(),this.radialEditor=null)}createTagButtons(){let t=this.plugin.settings.customTags||[],a=t.length;t.forEach((i,n)=>{let o=this.menuEl.createDiv({cls:"albus-super-daily-notes-floating-timer-btn albus-super-daily-notes-floating-timer-btn-tag",attr:{"aria-label":this.getTagDisplayName(i.name)}});o.style.setProperty("--task-color",i.color),o.style.backgroundColor=i.color;let s=o.createDiv({cls:"albus-super-daily-notes-floating-timer-btn-icon"}),l=this.getTagDisplayName(i.name);s.textContent=l.charAt(0);let u=this.calculateButtonPosition(n,a);o.style.setProperty("--x",`${u.x}px`),o.style.setProperty("--y",`${u.y}px`),o.style.setProperty("--delay",`${n*.05}s`),i.name===this.state.currentTag&&o.classList.add("albus-super-daily-notes-selected"),o.addEventListener("click",c=>{c.stopPropagation(),this.selectTag(i.name),this.menuEl.querySelectorAll(".albus-super-daily-notes-floating-timer-btn-tag").forEach(p=>p.classList.remove("albus-super-daily-notes-selected")),o.classList.add("albus-super-daily-notes-selected")})})}setRadialMenuOpenState(t){this.menuEl&&(this.containerEl.classList.toggle("albus-super-daily-notes-menu-open",t),this.menuEl.style.display=t?"block":"none")}syncDescriptionInputs(){this.contextInputEl&&this.contextInputEl.value!==this.state.description&&(this.contextInputEl.value=this.state.description)}clearDescriptionInputs(){this.destroyRadialEditor(),this.contextInputEl&&(this.contextInputEl.value="")}calculateButtonPosition(t,a){var o;let i=(o=this.plugin.settings.floatingTimerExpandRadius)!=null?o:140,n=t/a*Math.PI*2-Math.PI/2;return{x:Math.cos(n)*i,y:Math.sin(n)*i}}updateExpandRadius(t){this.isMenuOpen&&(this.closeMenu(),setTimeout(()=>{this.openMenu()},350))}toggleTimer(){if(!this.state.currentTag){new ir.Notice("\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u65E5\u7A0B\u6807\u7B7E"),this.playSound("click");return}if(!this.state.isActive)this.state.isActive=!0,this.state.isPaused=!1,this.state.segments.push({startTime:new Date,endTime:null}),this.ballEl.classList.add("albus-super-daily-notes-timing"),this.startTimer(),this.playSound("start"),new ir.Notice(this.state.segments.length===1?"\u5F00\u59CB\u8BA1\u65F6":"\u7EE7\u7EED\u8BA1\u65F6");else{let t=this.state.segments[this.state.segments.length-1];t&&!t.endTime&&(t.endTime=new Date),this.state.isActive=!1,this.state.isPaused=!0,this.ballEl.classList.remove("albus-super-daily-notes-timing"),this.stopTimer(),this.playSound("pause"),new ir.Notice("\u5DF2\u6682\u505C")}this.updateBallDisplay(),this.updateControlButtons()}resetTimer(){this.stopTimer(),this.state.isActive=!1,this.state.isPaused=!1,this.state.segments=[],this.state.description="",this.ballEl.classList.remove("albus-super-daily-notes-timing"),this.clearDescriptionInputs(),this.playSound("reset"),this.updateBallDisplay(),this.updateControlButtons(),new ir.Notice("\u8BA1\u65F6\u5668\u5DF2\u91CD\u7F6E")}updateControlButtons(){let t=this.containerEl.querySelector(".albus-super-daily-notes-floating-timer-control-start");t&&(this.state.isActive?((0,ir.setIcon)(t,"pause"),t.setAttribute("aria-label","\u6682\u505C")):((0,ir.setIcon)(t,"play"),t.setAttribute("aria-label","\u5F00\u59CB")))}async completeTimer(){if(this.state.segments.length===0||!this.state.currentTag){new ir.Notice("\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u8BA1\u65F6"),this.playSound("click");return}this.stopTimer(),this.playSound("complete");let t=this.state.segments[this.state.segments.length-1];t&&!t.endTime&&(t.endTime=new Date),await this.logTimerSegments(this.state.segments),this.state.isActive=!1,this.state.isPaused=!1,this.state.segments=[],this.state.description="",this.ballEl.classList.remove("albus-super-daily-notes-timing"),this.clearDescriptionInputs(),this.updateBallDisplay(),this.updateControlButtons()}startTimer(){this.stopTimer(),this.timerInterval=window.setInterval(()=>{this.updateBallDisplay()},1e3)}stopTimer(){this.timerInterval&&(window.clearInterval(this.timerInterval),this.timerInterval=null)}selectTag(t,a=!0){this.state.currentTag=t,a&&this.playSound("click"),this.syncDescriptionInputs(),this.updateBallDisplay()}updateBallDisplay(){var n;let t=this.ballEl.querySelector(".albus-super-daily-notes-floating-timer-text"),a=this.ballEl.querySelector(".albus-super-daily-notes-floating-timer-tag"),i=this.ballEl.querySelector(".albus-super-daily-notes-floating-timer-start-time");if(t&&(t.textContent=this.formatTime(this.getTotalElapsedSeconds())),a&&(this.state.currentTag?a.textContent=this.getTagDisplayName(this.state.currentTag):a.textContent="\u672A\u5F00\u59CB"),i)if(this.state.segments.length>0){let o=this.state.segments[0].startTime;i.textContent=this.formatTimeToHHMM(o)+" \u5F00\u59CB"}else i.textContent="";if(this.state.currentTag){let o=(n=this.plugin.settings.customTags)==null?void 0:n.find(s=>s.name===this.state.currentTag);o&&(this.ballEl.style.backgroundColor=o.color)}else this.ballEl.style.backgroundColor="";this.state.isActive?this.ballEl.classList.add("albus-super-daily-notes-active"):this.ballEl.classList.remove("albus-super-daily-notes-active")}getTotalElapsedSeconds(){var i;let t=new Date,a=0;for(let n of this.state.segments){let o=(i=n.endTime)!=null?i:t;a+=Math.floor((o.getTime()-n.startTime.getTime())/1e3)}return Math.max(0,a)}formatTime(t){let a=Math.floor(t/60),i=t%60;return`${a.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}formatTimeToHHMM(t){let a=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0");return`${a}:${i}`}getTagDisplayName(t){return t?t.includes("/")&&t.split("/").pop()||t:""}async logTimerSegments(t){var a;try{let i=this.state.description.trim()||"(\u81EA\u52A8\u8BA1\u65F6)",n=this.plugin.taskService;for(let l of t){let u=l.startTime,c=(a=l.endTime)!=null?a:new Date;await this.logSingleSegment(n,u,c,i)}let o=t.length,s=this.getTagDisplayName(this.state.currentTag);o===1?new ir.Notice(`"${s}" \u8BA1\u65F6\u5DF2\u8BB0\u5F55`):new ir.Notice(`"${s}" \u8BA1\u65F6\u5DF2\u8BB0\u5F55 (${o} \u4E2A\u65F6\u95F4\u6BB5)`)}catch(i){console.error("\u8BB0\u5F55\u8BA1\u65F6\u5931\u8D25:",i),new ir.Notice("\u8BB0\u5F55\u8BA1\u65F6\u5931\u8D25")}}async logSingleSegment(t,a,i,n){let o=this.formatTimeToHHMM(a),s=this.formatTimeToHHMM(i),l=a.toDateString(),u=i.toDateString();if(l!==u){let p={id:"",date:this.formatDateStr(a),startTime:o,endTime:"23:59",tag:this.state.currentTag,description:n,completed:!0};await t.createTask(p,!0);let d={id:"",date:this.formatDateStr(i),startTime:"00:00",endTime:s,tag:this.state.currentTag,description:n,completed:!0};await t.createTask(d,!0)}else{let p={id:"",date:this.formatDateStr(i),startTime:o,endTime:s,tag:this.state.currentTag,description:n,completed:!0};await t.createTask(p,!0)}}formatDateStr(t){let a=t.getFullYear(),i=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0");return`${a}-${i}-${n}`}};Ic.SNAP_THRESHOLD=50,Ic.SNAP_OFFSET=8;var Pc=Ic;var p5=r=>{let{contentEl:e,plugin:t,app:a}=r,i=new f5.SettingGroup(e);i.addSetting(n=>{n.setName("\u542F\u7528\u60AC\u6D6E\u8BA1\u65F6\u5668").setDesc("\u5F00\u542F\u540E, \u5728 Obsidian \u9875\u9762\u4E0A\u663E\u793A\u4E00\u4E2A\u53EF\u62D6\u52A8\u7684\u60AC\u6D6E\u8BA1\u65F6\u5668.").addToggle(o=>{var s;return o.setValue((s=t.settings.floatingTimerEnabled)!=null?s:!0).onChange(async l=>{t.settings.floatingTimerEnabled=l,await t.saveSettings(),l&&!t.floatingTimer&&t.isLicensed()?(t.floatingTimer=new Pc(a,t),t.floatingTimer&&t.floatingTimer.load()):!l&&t.floatingTimer&&(t.floatingTimer.unload(),t.floatingTimer=null)})})}),i.addSetting(n=>{n.setName("\u542F\u7528\u97F3\u6548").setDesc("\u5F00\u542F\u540E, \u8BA1\u65F6\u5668\u64CD\u4F5C\u65F6\u4F1A\u64AD\u653E\u97F3\u6548\u53CD\u9988.").addToggle(o=>{var s;return o.setValue((s=t.settings.floatingTimerAudioEnabled)!=null?s:!0).onChange(async l=>{t.settings.floatingTimerAudioEnabled=l,await t.saveSettings()})})}),i.addSetting(n=>{n.setName("\u83DC\u5355\u5C55\u5F00\u534A\u5F84").setDesc("\u8BBE\u7F6E\u65E5\u7A0B\u7C7B\u578B\u6807\u7B7E\u5728\u83DC\u5355\u5C55\u5F00\u65F6\u7684\u73AF\u7ED5\u534A\u5F84(px).").addSlider(o=>{var s;return o.setLimits(100,200,10).setValue((s=t.settings.floatingTimerExpandRadius)!=null?s:140).setDynamicTooltip().onChange(async l=>{t.settings.floatingTimerExpandRadius=l,await t.saveSettings(),t.floatingTimer&&t.floatingTimer.updateExpandRadius(l)})})})};var ui=require("obsidian");var m5=r0(require("crypto")),bat=`-----BEGIN PUBLIC KEY-----
|
|
MCowBQYDK2VwAyEAbWHAulS5oJLUSzerNJru7xBj1RdYozSvpJWAZ02RyUA=
|
|
-----END PUBLIC KEY-----`,h5="SDN-";function d5(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4;)e+="=";return Buffer.from(e,"base64")}function v5(r){let e=r.match(/^(\d+)\./);return e?parseInt(e[1],10):0}function Bl(r,e){try{if(!r)return{payload:null,error:"invalid"};if(!r.startsWith(h5))return{payload:null,error:"invalid"};let t=r.slice(h5.length),a=t.indexOf(".");if(a===-1)return{payload:null,error:"invalid"};let i=t.slice(0,a),n=t.slice(a+1),o=d5(i),s=d5(n);if(!m5.verify(null,o,bat,s))return{payload:null,error:"invalid"};let u=JSON.parse(o.toString("utf-8"));if(!u.id||!u.plan||!u.iat)return{payload:null,error:"invalid"};if(u.plan==="version"&&e&&u.ver){let c=v5(u.ver);if(v5(e)>c)return{payload:null,error:"version-mismatch",detail:u.ver}}return{payload:u}}catch(t){return{payload:null,error:"invalid"}}}function Sat(r,e){return r==="version-mismatch"?`\u6FC0\u6D3B\u5931\u8D25: \u6FC0\u6D3B\u7801\u5DF2\u8FC7\u671F, \u5F53\u524D\u6FC0\u6D3B\u7801\u4EC5\u9650 ${e!=null?e:""} \u7248\u672C\u4F7F\u7528`:"\u6FC0\u6D3B\u5931\u8D25: \u6FC0\u6D3B\u7801\u65E0\u6548"}function g5(r){let{plugin:e,contentEl:t}=r,a=e.settings.license,i=Bl(a.key,"1.0.1"),n=!!i.payload,o=new ui.SettingGroup(t);if(n){let s=i.payload,l=s.plan==="version"?`\u7248\u672C\u6388\u6743 (v${s.ver})`:"\u6C38\u4E45\u6388\u6743";o.addSetting(c=>{c.setName("\u6388\u6743\u72B6\u6001").setDesc("\u751F\u6548\u4E2D")}),o.addSetting(c=>{c.setName("\u6388\u6743\u7C7B\u578B").setDesc(l)}),o.addSetting(c=>{c.setName("\u6388\u6743\u65F6\u95F4").setDesc(s.iat)}),o.addSetting(c=>{c.addButton(f=>f.setButtonText("\u53D6\u6D88\u6FC0\u6D3B").setWarning().onClick(async()=>{e.settings.license.key="",await e.saveSettings(!1),new ui.Notice("\u5DF2\u53D6\u6D88\u6FC0\u6D3B, \u8BF7\u91CD\u542F Obsidian \u4F7F\u66F4\u6539\u751F\u6548"),r.display()}))}),new ui.Setting(t).setName("\u66F4\u591A").setHeading();let u=new ui.SettingGroup(t);s.plan==="lifetime"&&u.addSetting(c=>{c.setName("\u4F1A\u5458\u7FA4").setDesc("QQ \u7FA4\u53F7: 1098270852")}),u.addSetting(c=>{c.setName("\u5B98\u7F51").addButton(f=>f.setButtonText("\u524D\u5F80").onClick(()=>window.open("https://albusguo.github.io/super-daily-notes")))})}else{let s=a.key;o.addSetting(u=>{u.setName("\u6FC0\u6D3B\u7801").addText(c=>{c.setPlaceholder("SDN-...").setValue(s).onChange(f=>{s=f}),c.inputEl.style.width="100%",c.inputEl.style.fontFamily="var(--font-monospace)",c.inputEl.style.fontSize="12px"})}),o.addSetting(u=>{u.addButton(c=>c.setButtonText("\u6FC0\u6D3B").setCta().onClick(async()=>{let f=s.trim();if(!f){new ui.Notice("\u8BF7\u8F93\u5165\u6FC0\u6D3B\u7801");return}let p=Bl(f,"1.0.1");p.payload?(e.settings.license.key=f,await e.saveSettings(!1),e.enablePluginStyles(),await e.initializeFeatures(),new ui.Notice("\u6FC0\u6D3B\u6210\u529F!"),r.display()):new ui.Notice(Sat(p.error,p.detail))}))}),new ui.Setting(t).setName("\u66F4\u591A").setHeading();let l=new ui.SettingGroup(t);l.addSetting(u=>{u.setName("\u6C38\u4E45\u4E70\u65AD").setDesc("\u4E00\u6B65\u5230\u4F4D, \u5168\u529F\u80FD\u7EC8\u8EAB\u5347\u7EA7").addButton(c=>c.setButtonText("\u524D\u5F80\u8D2D\u4E70").onClick(()=>window.open("https://pay.ldxp.cn/item/u0ngqc")))}),l.addSetting(u=>{u.setName("\u5927\u7248\u672C\u4E70\u65AD").setDesc("\u5F53\u524D\u7248\u672C\u5168\u529F\u80FD, \u8F7B\u91CF\u8D77\u6B65\u65E0\u8D1F\u62C5").addButton(c=>c.setButtonText("\u524D\u5F80\u8D2D\u4E70").onClick(()=>window.open("https://pay.ldxp.cn/item/8ryfk3")))}),l.addSetting(u=>{u.setName("\u5B98\u7F51").addButton(c=>c.setButtonText("\u524D\u5F80").onClick(()=>window.open("https://albusguo.github.io/super-daily-notes")))})}}var y5={key:"license",name:"\u6388\u6743",render:g5},wat=[{key:"basic",name:"\u901A\u7528",render:c5},{key:"timer",name:"\u60AC\u6D6E\u8BA1\u65F6\u5668",render:p5}],Qy=class extends x5.PluginSettingTab{constructor(e,t){super(e,t),this.plugin=t,this.app=e}display(){let{containerEl:e}=this;e.empty(),e.addClass("albus-super-daily-notes-settings");let t=!!Bl(this.plugin.settings.license.key,"1.0.1").payload,a=t?[y5,...wat]:[y5];t||(this.plugin.settings.settingsTab="license");let i=e.createDiv({cls:"albus-super-daily-notes-planner-settings-tabs"});for(let o of a){let s=i.createDiv({cls:"albus-super-daily-notes-planner-settings-tab"+(this.plugin.settings.settingsTab===o.key?" is-active":"")});s.setText(o.name),s.addEventListener("click",()=>{this.plugin.settings.settingsTab=o.key,this.plugin.saveSettings(!1),this.display()})}this.contentEl=e.createDiv({cls:"albus-super-daily-notes-planner-settings-content"});let n=a.find(o=>o.key===this.plugin.settings.settingsTab);n&&n.render(this)}};var t0=class extends _5.Plugin{constructor(){super(...arguments);this.floatingTimer=null;this.featuresInitialized=!1}async onload(){await this.loadSettings(),this.addSettingTab(new Qy(this.app,this)),this.isLicensed()&&await this.initializeFeatures()}isLicensed(){return!!Bl(this.settings.license.key,"1.0.1").payload}async initializeFeatures(){var t;this.featuresInitialized||this.isLicensed()&&(this.featuresInitialized=!0,this.enablePluginStyles(),this.taskService=new Hc(this.app,this.settings,()=>this.saveSettings()),this.registerView(Lc,a=>new Jy(a,this)),this.addRibbonIcon("calendar-clock","Super Daily Notes",()=>{this.activateView()}),this.addCommand({id:"open-super-daily-notes",name:"\u6253\u5F00 Super Daily Notes",callback:()=>{this.activateView()}}),((t=this.settings.floatingTimerEnabled)==null||t)&&this.app.workspace.onLayoutReady(()=>{this.floatingTimer=new Pc(this.app,this),this.floatingTimer.load()}))}enablePluginStyles(){document.body.addClass("super-daily-notes-active")}onunload(){this.floatingTimer&&(this.floatingTimer.unload(),this.floatingTimer=null),document.body.removeClass("super-daily-notes-active")}async loadSettings(){this.settings=Object.assign({},ZC,await this.loadData())}async saveSettings(t=!0){if(await this.saveData(this.settings),!t||!this.isLicensed())return;this.taskService=new Hc(this.app,this.settings,()=>this.saveSettings()),this.app.workspace.getLeavesOfType(Lc).forEach(i=>{let n=i.view;n&&"loadAndRender"in n&&n.loadAndRender()})}async activateView(){let{workspace:t}=this.app,a=null,i=t.getLeavesOfType(Lc);i.length>0?a=i[0]:(a=t.getLeaf("tab"),a&&await a.setViewState({type:Lc,active:!0})),a&&t.revealLeaf(a)}};
|
|
/*! Bundled license information:
|
|
|
|
tslib/tslib.es6.js:
|
|
tslib/tslib.es6.js:
|
|
(*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** *)
|
|
|
|
zrender/lib/zrender.js:
|
|
(*!
|
|
* ZRender, a high performance 2d drawing library.
|
|
*
|
|
* Copyright (c) 2013, Baidu Inc.
|
|
* All rights reserved.
|
|
*
|
|
* LICENSE
|
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
*)
|
|
*/
|