@vue-skuilder/platform-ui 0.2.33 → 0.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{About-CY4NnmeV.js → About-BWM7KlDK.js} +2 -2
- package/dist/assets/{About-CY4NnmeV.js.map → About-BWM7KlDK.js.map} +1 -1
- package/dist/assets/{AdminDashboard-edtEM5Dr.js → AdminDashboard-CO2rxkF5.js} +2 -2
- package/dist/assets/{AdminDashboard-edtEM5Dr.js.map → AdminDashboard-CO2rxkF5.js.map} +1 -1
- package/dist/assets/{AdminLearner-C6hRjA7u.js → AdminLearner-CZO2Hlk1.js} +2 -2
- package/dist/assets/{AdminLearner-C6hRjA7u.js.map → AdminLearner-CZO2Hlk1.js.map} +1 -1
- package/dist/assets/{ClassroomCtrlPanel-f00317Ni.js → ClassroomCtrlPanel-cj6bokz5.js} +2 -2
- package/dist/assets/{ClassroomCtrlPanel-f00317Ni.js.map → ClassroomCtrlPanel-cj6bokz5.js.map} +1 -1
- package/dist/assets/{Classrooms-BP_TJvHC.js → Classrooms-BIC1PGz0.js} +3 -3
- package/dist/assets/{Classrooms-BP_TJvHC.js.map → Classrooms-BIC1PGz0.js.map} +1 -1
- package/dist/assets/{CourseRouter-5CJuVkbz.js → CourseRouter-CMMxD9us.js} +3 -3
- package/dist/assets/{CourseRouter-5CJuVkbz.js.map → CourseRouter-CMMxD9us.js.map} +1 -1
- package/dist/assets/{CourseWare-BTFRjgBR-txRZaFyG.js → CourseWare-BTFRjgBR-C3wi5YHa.js} +3 -3
- package/dist/assets/{CourseWare-BTFRjgBR-txRZaFyG.js.map → CourseWare-BTFRjgBR-C3wi5YHa.js.map} +1 -1
- package/dist/assets/{Courses-wSvIO8Rg.js → Courses-Dw7mgMnI.js} +3 -3
- package/dist/assets/{Courses-wSvIO8Rg.js.map → Courses-Dw7mgMnI.js.map} +1 -1
- package/dist/assets/{EloModeration-yATO4B6I.js → EloModeration-COgCrvb8.js} +2 -2
- package/dist/assets/{EloModeration-yATO4B6I.js.map → EloModeration-COgCrvb8.js.map} +1 -1
- package/dist/assets/{JoinCode-DFcgKzlI.js → JoinCode-Fu9Tks7r.js} +3 -3
- package/dist/assets/{JoinCode-DFcgKzlI.js.map → JoinCode-Fu9Tks7r.js.map} +1 -1
- package/dist/assets/MarkdownRenderer-U_iPiA2x-DDruDu7E.js +53 -0
- package/dist/assets/MarkdownRenderer-U_iPiA2x-DDruDu7E.js.map +1 -0
- package/dist/assets/MarkdownRenderer-U_iPiA2x-VCa5mXh1.js +1 -0
- package/dist/assets/{NewCourseDialog-cILRsF-N.js → NewCourseDialog-C11dSwWM.js} +2 -2
- package/dist/assets/{NewCourseDialog-cILRsF-N.js.map → NewCourseDialog-C11dSwWM.js.map} +1 -1
- package/dist/assets/{ReleaseNotes-Df_Z_Xd5.js → ReleaseNotes-CeTkuF5d.js} +2 -2
- package/dist/assets/{ReleaseNotes-Df_Z_Xd5.js.map → ReleaseNotes-CeTkuF5d.js.map} +1 -1
- package/dist/assets/{RequestPasswordReset-CWqaKKWa.js → RequestPasswordReset-vTzfGItp.js} +2 -2
- package/dist/assets/{RequestPasswordReset-CWqaKKWa.js.map → RequestPasswordReset-vTzfGItp.js.map} +1 -1
- package/dist/assets/{ResetPassword-BABsccxZ.js → ResetPassword-CmGaVYsI.js} +2 -2
- package/dist/assets/{ResetPassword-BABsccxZ.js.map → ResetPassword-CmGaVYsI.js.map} +1 -1
- package/dist/assets/{Study-C6l9pTN8.js → Study-CkJvraIv.js} +2 -2
- package/dist/assets/{Study-C6l9pTN8.js.map → Study-CkJvraIv.js.map} +1 -1
- package/dist/assets/TagInformation-xZcQ1C1t.js +2 -0
- package/dist/assets/{TagInformation-CL152sE4.js.map → TagInformation-xZcQ1C1t.js.map} +1 -1
- package/dist/assets/{User-B5voU-tp.js → User-MzKFSneO.js} +3 -3
- package/dist/assets/{User-B5voU-tp.js.map → User-MzKFSneO.js.map} +1 -1
- package/dist/assets/UserStats-CioNBbmL.js +2 -0
- package/dist/assets/{UserStats-BWq1QP_t.js.map → UserStats-CioNBbmL.js.map} +1 -1
- package/dist/assets/{VerifyEmail-rdrqVTaX.js → VerifyEmail-Bh-T9191.js} +2 -2
- package/dist/assets/{VerifyEmail-rdrqVTaX.js.map → VerifyEmail-Bh-T9191.js.map} +1 -1
- package/dist/assets/{admin-Cfzt4Vei.css → admin-CMwKoROX.css} +1 -1
- package/dist/assets/admin-Dt07rW2C.js +21 -0
- package/dist/assets/admin-Dt07rW2C.js.map +1 -0
- package/dist/assets/{chess-E2uOAyQS-BQUHPZw0.js → chess-E2uOAyQS-C8213VIQ.js} +3 -3
- package/dist/assets/{chess-E2uOAyQS-BQUHPZw0.js.map → chess-E2uOAyQS-C8213VIQ.js.map} +1 -1
- package/dist/assets/chess-Lfm7Fsvs-6ElY3d5h.js +1 -0
- package/dist/assets/{common-ui.es-BYENpnRV.js → common-ui.es-B9r6QiWN.js} +18 -18
- package/dist/assets/common-ui.es-B9r6QiWN.js.map +1 -0
- package/dist/assets/common-ui.es-j6sezLNk.js +1 -0
- package/dist/assets/{dist-Cyq221IF.js → dist-BeppzTWu.js} +6 -6
- package/dist/assets/dist-BeppzTWu.js.map +1 -0
- package/dist/assets/dist-C1hpwy00.js +1 -0
- package/dist/assets/dist-CKO_fXB-.js +18 -0
- package/dist/assets/{dist-DJXXY69e.js.map → dist-CKO_fXB-.js.map} +1 -1
- package/dist/assets/dist-CkRURFlm.js +1 -0
- package/dist/assets/{dist-otyR79at.js → dist-V9Xbab2f.js} +2 -2
- package/dist/assets/dist-V9Xbab2f.js.map +1 -0
- package/dist/assets/edit-ui.es-B00e6OcT.js +36 -0
- package/dist/assets/edit-ui.es-B00e6OcT.js.map +1 -0
- package/dist/assets/edit-ui.es-BGTYLTZO.js +1 -0
- package/dist/assets/{french-Dk7YG8Td-C40XF0ei.js → french-Dk7YG8Td-D9eV2DXL.js} +2 -2
- package/dist/assets/{french-Dk7YG8Td-C40XF0ei.js.map → french-Dk7YG8Td-D9eV2DXL.js.map} +1 -1
- package/dist/assets/french-evUMlbbq-DOmp0PEx.js +1 -0
- package/dist/assets/index-CDxzcoT1.js +4 -0
- package/dist/assets/index-CDxzcoT1.js.map +1 -0
- package/dist/assets/math-DR3fXDcX-Clr1rrj8.js +1 -0
- package/dist/assets/math-D_8HiEQR-DdtcYQLB.js +34 -0
- package/dist/assets/math-D_8HiEQR-DdtcYQLB.js.map +1 -0
- package/dist/assets/piano-BN5Btq91-BO9b38qV.js +1 -0
- package/dist/assets/piano-DF1g6yaX-B7f_kt1X.js +2 -0
- package/dist/assets/{piano-DF1g6yaX-Cm7rgAiB.js.map → piano-DF1g6yaX-B7f_kt1X.js.map} +1 -1
- package/dist/assets/{pitch-CgGJFkZ1-raMdOfKL.js → pitch-CgGJFkZ1-CuezrVTg.js} +2 -2
- package/dist/assets/{pitch-CgGJFkZ1-raMdOfKL.js.map → pitch-CgGJFkZ1-CuezrVTg.js.map} +1 -1
- package/dist/assets/pitch-Dn0iNqiS-L0LRhcjZ.js +1 -0
- package/dist/assets/server-BP-NvFg7.js +2 -0
- package/dist/assets/{server-Cp2grk3h.js.map → server-BP-NvFg7.js.map} +1 -1
- package/dist/assets/{sightsing-BFQ7HRig-a5hh4s6b.js → sightsing-BFQ7HRig-CLh3Xcy7.js} +3 -3
- package/dist/assets/{sightsing-BFQ7HRig-a5hh4s6b.js.map → sightsing-BFQ7HRig-CLh3Xcy7.js.map} +1 -1
- package/dist/assets/sightsing-CJX3k0Fd-DiVzeNly.js +1 -0
- package/dist/assets/{typing-BevtfWlp-DPWCOdqa.js → typing-BevtfWlp-B__x_Ia1.js} +2 -2
- package/dist/assets/{typing-BevtfWlp-DPWCOdqa.js.map → typing-BevtfWlp-B__x_Ia1.js.map} +1 -1
- package/dist/assets/typing-k-ojjO7G-Dn4uH4pS.js +1 -0
- package/dist/assets/{vue-router-CDq4a4rc.js → vue-router-HoUBO3s7.js} +2 -2
- package/dist/assets/{vue-router-CDq4a4rc.js.map → vue-router-HoUBO3s7.js.map} +1 -1
- package/dist/assets/{vue.runtime.esm-bundler-C3q8JS9f.js → vue.runtime.esm-bundler--Fxmd6l9.js} +2 -2
- package/dist/assets/{vue.runtime.esm-bundler-C3q8JS9f.js.map → vue.runtime.esm-bundler--Fxmd6l9.js.map} +1 -1
- package/dist/assets/word-work-BOnRlZgd-CxcTzMPz.js +2 -0
- package/dist/assets/{word-work-BOnRlZgd-CUfVid6n.js.map → word-work-BOnRlZgd-CxcTzMPz.js.map} +1 -1
- package/dist/assets/word-work-Dd6tIKrt-BOmhWlr6.js +1 -0
- package/dist/index.html +7 -7
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/package.json +7 -7
- package/dist/assets/MarkdownRenderer-kStoDRNE-B0wYWYhQ.js +0 -1
- package/dist/assets/MarkdownRenderer-kStoDRNE-D6ShHXDF.js +0 -53
- package/dist/assets/MarkdownRenderer-kStoDRNE-D6ShHXDF.js.map +0 -1
- package/dist/assets/TagInformation-CL152sE4.js +0 -2
- package/dist/assets/UserStats-BWq1QP_t.js +0 -2
- package/dist/assets/admin-CpMRYlmB.js +0 -4
- package/dist/assets/admin-CpMRYlmB.js.map +0 -1
- package/dist/assets/chess-Lfm7Fsvs-CkwKAarN.js +0 -1
- package/dist/assets/common-ui.es-BYENpnRV.js.map +0 -1
- package/dist/assets/common-ui.es-BxteqHlD.js +0 -1
- package/dist/assets/dist-Cyq221IF.js.map +0 -1
- package/dist/assets/dist-DJXXY69e.js +0 -18
- package/dist/assets/dist-DSfQApVT.js +0 -1
- package/dist/assets/dist-HeqUKzar.js +0 -1
- package/dist/assets/dist-otyR79at.js.map +0 -1
- package/dist/assets/edit-ui.es-66x2BkHZ.js +0 -36
- package/dist/assets/edit-ui.es-66x2BkHZ.js.map +0 -1
- package/dist/assets/edit-ui.es-Crq2fLxh.js +0 -1
- package/dist/assets/french-evUMlbbq-BoXkYpPj.js +0 -1
- package/dist/assets/index-Ct8brwnw.js +0 -4
- package/dist/assets/index-Ct8brwnw.js.map +0 -1
- package/dist/assets/math-B4HbgYf6-BiH88C2B.js +0 -34
- package/dist/assets/math-B4HbgYf6-BiH88C2B.js.map +0 -1
- package/dist/assets/math-DYni7rRl-BacgHd33.js +0 -1
- package/dist/assets/piano-BN5Btq91-DawaTkt6.js +0 -1
- package/dist/assets/piano-DF1g6yaX-Cm7rgAiB.js +0 -2
- package/dist/assets/pitch-Dn0iNqiS-ChxLq3C2.js +0 -1
- package/dist/assets/server-Cp2grk3h.js +0 -2
- package/dist/assets/sightsing-CJX3k0Fd-BumMPKrl.js +0 -1
- package/dist/assets/typing-k-ojjO7G-CNZkfRKK.js +0 -1
- package/dist/assets/word-work-BOnRlZgd-CUfVid6n.js +0 -2
- package/dist/assets/word-work-Dd6tIKrt-BEWb3uQV.js +0 -1
- /package/dist/assets/{math-B4HbgYf6-CZyvKZtp.css → math-D_8HiEQR-CZyvKZtp.css} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import"./chunk-D6hFPZc3.js";import{$ as e,C as t,H as n,Ht as r,I as i,K as a,Lt as o,N as s,S as c,T as l,W as u,Z as d,_ as f,b as p,f as m,ft as h,g,gt as _,l as v,ut as y,v as b,y as x,z as S,zt as C}from"./vue.runtime.esm-bundler--Fxmd6l9.js";import{S as w,x as T}from"./dist-V9Xbab2f.js";import{kt as E,y as D}from"./dist-BeppzTWu.js";import{n as O}from"./index-CDxzcoT1.js";var k={cardHistory:`cardH`,scheduled:`card_review_`,session:`SESSION::`,strategyState:`STRATEGY_STATE::`,registrations:`CourseRegistrations`};function toIsoTimestamp(e){if(typeof e==`number`)return new Date(e).toISOString();let t=String(e??``),n=Date.parse(t);return Number.isNaN(n)?t:new Date(n).toISOString()}function dumpFileName(e){return`userdb-${e.username}-${e.fetchedAt.slice(0,16).replace(`:`,``)}Z.json`}function parseLearnerDump(e){let t=JSON.parse(e);if(!t||typeof t.username!=`string`||!Array.isArray(t.docs))throw Error("[diagnostics] Not a learner dump: expected `username` and a `docs` array");return t}function questionTypeOf(e){if(typeof e!=`string`)return;let t=e.split(`.`);return t.length>=2?t[t.length-2]:e}function summarizeCards(e){let t=new Map(e.displayableData.map(e=>[e._id,e])),n=new Map;for(let r of e.cards){let e={};for(let n of t.get(r.id_displayable_data?.[0]??``)?.data??[])e[n.name]=n.data;n.set(r._id,{cardId:r._id,questionType:questionTypeOf(r.id_view),elo:r.elo,tags:[],data:e})}for(let t of e.tags)for(let e of t.taggedCards??[])n.get(e)?.tags.push(t.name);return n}function inferCourseId(e){if(e.courseId)return e.courseId;if(e.course)return e.course.courseId;let t=new Map;for(let n of e.docs)n._id.startsWith(k.session)&&typeof n.courseId==`string`&&t.set(n.courseId,(t.get(n.courseId)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1])[0]?.[0]}function fromDump(e,t){let n=t??inferCourseId(e);if(!n)throw Error(`[diagnostics] No course id given, and none found in the dump`);let r=[],i=[],a=[],o={},s;for(let t of e.docs){let e=t._id;if(e.startsWith(k.session))t.courseId===n&&r.push(t);else if(e.startsWith(k.cardHistory)){if(t.courseID!==n)continue;let e=t;i.push({...e,records:(e.records??[]).map(e=>({...e,timeStamp:toIsoTimestamp(e.timeStamp)})).sort((e,t)=>e.timeStamp.localeCompare(t.timeStamp))})}else if(e.startsWith(k.scheduled))t.courseId===n&&a.push(t);else if(e.startsWith(k.strategyState)){let[,r,i]=e.split(`::`);r===n&&i&&(o[i]=t.data)}else e===k.registrations&&(s=t)}return r.sort((e,t)=>e.startTime.localeCompare(t.startTime)),a.sort((e,t)=>String(e.reviewTime).localeCompare(String(t.reviewTime))),{username:e.username,courseId:n,asOf:e.fetchedAt,sessions:r,cardHistories:i,scheduled:a,registration:s,strategyState:o,tombstones:(e.tombstones??[]).map(({id:e,seq:t})=>({id:e,seq:t})),...e.course&&e.course.courseId===n?{cards:summarizeCards(e.course),...e.course.strategies?{strategies:e.course.strategies}:{}}:{}}}function userDbName(e){let t=``;for(let n of new TextEncoder().encode(e))t+=n.toString(16).padStart(2,`0`);return`userdb-`+t}function base64(e){let t=``;for(let n of new TextEncoder().encode(e))t+=String.fromCharCode(n);return btoa(t)}function trimTrailingSlashes(e){let t=e.length;for(;t>0&&e[t-1]===`/`;)t--;return e.slice(0,t)}function couchReader(e){let t=e.fetchImpl??fetch,n=trimTrailingSlashes(e.couchUrl),r={Accept:`application/json`};e.auth.kind===`basic`&&(r.Authorization=`Basic `+base64(`${e.auth.username}:${e.auth.password}`));let i=e.auth.kind===`cookie`?`include`:void 0;async function get(e,a={}){let o=await t(`${n}/${e}`,{method:a.method??`GET`,headers:a.body?{...r,"Content-Type":`application/json`}:r,...a.body?{body:JSON.stringify(a.body)}:{},...i?{credentials:i}:{}});if(!o.ok){let t=await o.text().catch(()=>``);throw Error(`[diagnostics] ${a.method??`GET`} ${e} -> ${o.status} ${t}`)}return await o.json()}async function byKeys(e,t){let n=[];for(let r=0;r<t.length;r+=500){let i=await get(`${e}/_all_docs?include_docs=true`,{method:`POST`,body:{keys:t.slice(r,r+500)}});for(let e of i.rows)e.doc&&n.push(e.doc)}return n}async function byPrefix(e,t){return(await get(`${e}/_all_docs?${new URLSearchParams({include_docs:`true`,startkey:JSON.stringify(t),endkey:JSON.stringify(t+``)})}`)).rows.map(e=>e.doc).filter(e=>!!e)}return{base:n,get,byKeys,byPrefix}}function touchedCardIds(e){let t=new Set;for(let n of e)if(n._id.startsWith(`cardH`)&&typeof n.cardID==`string`)t.add(n.cardID);else if(n._id.startsWith(`card_review_`)&&typeof n.cardId==`string`)t.add(n.cardId);else if(n._id.startsWith(`SESSION::`)&&Array.isArray(n.eloEvents))for(let e of n.eloEvents)e.cardId&&t.add(e.cardId);return[...t]}async function fetchLearnerDump(e){let t=couchReader(e),n=userDbName(e.username),r=new Date().toISOString(),i=await t.get(n),a=new URLSearchParams({include_docs:`true`});e.attachments&&a.set(`attachments`,`true`);let o=(await t.get(`${n}/_all_docs?${a}`)).rows.map(e=>e.doc).filter(e=>!!e),s=(await t.get(`${n}/_changes?style=main_only`)).results.filter(e=>e.deleted).map(e=>({id:e.id,rev:e.changes[0]?.rev,seq:Number(String(e.seq).split(`-`)[0])})),c=e.cards??`touched`,l;if(c!==`none`){let n=`coursedb-${e.courseId}`,r;r=c===`all`?(await t.get(`${n}/_find`,{method:`POST`,body:{selector:{docType:`CARD`},limit:1e6}})).docs:await t.byKeys(n,touchedCardIds(o));let i=new Set(r.map(e=>e._id)),a=new Set;for(let e of r)for(let t of e.id_displayable_data??[])a.add(t);let s=await t.byKeys(n,[...a]),u=(await t.byPrefix(n,`TAG`)).map(e=>{let t=Array.isArray(e.taggedCards)?e.taggedCards:[];return{...e,taggedCount:t.length,taggedCards:c===`all`?t:t.filter(e=>i.has(e))}}).filter(e=>c===`all`||e.taggedCards.length>0),d=await t.byPrefix(n,`NAVIGATION_STRATEGY`);l={courseId:e.courseId,source:`${t.base}/${n}`,scope:c,cards:r,displayableData:s,tags:u,strategies:d}}return{formatVersion:1,username:e.username,dbName:n,source:t.base,fetchedAt:r,courseId:e.courseId,info:i,docs:o,tombstones:s,...l?{course:l}:{}}}var isSkillTag=(e,t)=>e?.isSkillTag?.(t)??!1,shortTag=(e,t)=>e?.shortTag?.(t)??t;function bySkillThenName(e){return(t,n)=>{let r=Number(isSkillTag(e,n))-Number(isSkillTag(e,t));return r===0?t.localeCompare(n):r}}function defaultSnapshotMetrics(e){let t={};for(let[n,r]of Object.entries(e))if(typeof r==`number`)t[n]=r;else if(r&&typeof r==`object`&&!Array.isArray(r))for(let[e,i]of Object.entries(r))typeof i==`number`&&(t[`${n}.${e}`]=i);return t}var A={churned:{label:`Churned`,help:`Many pipeline runs relative to cards served: the plan kept being rebuilt rather than consumed.`},"out-of-content":{label:`Out of content`,help:`Ended with time left on the clock: content ran out before the session did.`},walked:{label:`Walked`,help:`Abandoned or never closed, after real time invested. Not a mis-click.`},stalled:{label:`Stalled`,help:`No progress metric moved and ELO was essentially flat. The sitting produced nothing measurable.`},grinding:{label:`Grinding`,help:`Majority-incorrect, or ended with unfinished cards still in the failed queue.`}},j={churnRunsPerCard:1/3,churnMinCards:4,outOfContentSeconds:20,walkMinCards:2,stallEloEpsilon:5,grindAccuracy:.5};function stateRows(e,t){let n=t?.snapshotMetrics??defaultSnapshotMetrics,r=e.stateAtStart?n(e.stateAtStart):{},i=e.stateAtEnd?n(e.stateAtEnd):{};return[...new Set([...Object.keys(r),...Object.keys(i)])].map(e=>{let t=r[e]??null,n=i[e]??null;return{label:e,from:t,to:n,delta:t!==null&&n!==null?n-t:null}})}function flagSession(e,t){let n=j,{doc:r,accuracy:i,eloNet:a}=e,o=[],s=r.tally?.cardsPresented??0,c=r.runs?.length??0;s>=n.churnMinCards&&c/s>n.churnRunsPerCard&&o.push(`churned`),r.status===`closed`&&(r.tally?.secondsRemaining??0)>n.outOfContentSeconds&&o.push(`out-of-content`),(r.status===`open`||r.status===`abandoned`&&s>=n.walkMinCards)&&o.push(`walked`);let l=e.state.filter(e=>t?.progressMetrics?.includes(e.label)),u=a!==null||l.some(e=>e.delta!==null);return s>0&&u&&l.every(e=>(e.delta??0)===0)&&Math.abs(a??0)<n.stallEloEpsilon&&o.push(`stalled`),(i!==null&&i<n.grindAccuracy&&s>0||(r.tally?.failedQRemaining??0)>0)&&o.push(`grinding`),o}function summarizeSession(e,t){let n=Date.parse(e.startTime),r=e.endTime?Date.parse(e.endTime):NaN,i=Number.isNaN(n)||Number.isNaN(r)?null:Math.round((r-n)/1e3),a=e.tally?.responses??0,o=a>0?(e.tally?.correct??0)/a:null,s=e.eloEvents??[],c={doc:e,durationSeconds:i,accuracy:o,eloNet:s.length?s.reduce((e,t)=>e+(t.global.after-t.global.before),0):null,state:stateRows(e,t)};return{...c,flags:flagSession(c,t)}}function summarizeSessions(e,t){return e.sessions.map(e=>summarizeSession(e,t)).reverse()}function toResponseEloDelta(e,t){let n=bySkillThenName(t),r=Object.entries(e.tags??{}).map(([e,t])=>({tag:e,before:t.before,after:t.after,delta:t.after-t.before,score:t.score})).sort((e,t)=>n(e.tag,t.tag));return{userScore:e.userScore,global:{before:e.global.before,after:e.global.after,delta:e.global.after-e.global.before},...e.card?{card:{before:e.card.before,after:e.card.after,delta:e.card.after-e.card.before}}:{},tags:r}}function attachEloEvents(e,t,n){let r=new Set;for(let i of t){let t=Date.parse(i.at),a=-1,o=1/0;e.forEach((e,n)=>{if(r.has(n)||e.cardId!==i.cardId)return;let s=Math.abs(Date.parse(e.at)+e.timeSpentMs-t);s<o&&(o=s,a=n)}),a>=0&&(r.add(a),e[a].elo=toResponseEloDelta(i,n))}}function byTime(e,t){let n=Date.parse(e.at),r=Date.parse(t.at);return Number.isNaN(n)||Number.isNaN(r)?e.at.localeCompare(t.at):n-r}function sessionDetail(e,t,n){let r=e.sessions.find(e=>e.sessionId===t);if(!r)return null;let i=[];for(let r of e.cardHistories){let a=e.cards?.get(r.cardID);for(let e of r.records)e.sessionId===t&&i.push({kind:`response`,at:e.timeStamp,cardId:r.cardID,...a?{card:a,questionType:a.questionType}:{},tags:a?[...a.tags].sort(bySkillThenName(n)):[],isCorrect:typeof e.isCorrect==`boolean`?e.isCorrect:null,timeSpentMs:e.timeSpent??0,priorAttempts:typeof e.priorAttemps==`number`?e.priorAttemps:null,userAnswer:e.userAnswer})}r.eloEvents?.length&&attachEloEvents(i,r.eloEvents,n);let a=[...(r.runs??[]).map(e=>({kind:`run`,at:e.at,run:e})),...i].sort(byTime);return{summary:summarizeSession(r,n),timeline:a,responsesMissing:(r.tally?.responses??0)>i.length}}function servedTags(e,t){let n=new Map;for(let t of e)if(t.kind===`response`)for(let e of t.tags){let r=n.get(e);r||(r={responses:0,correct:0,incorrect:0,totalTimeMs:0,cards:new Set},n.set(e,r)),r.responses+=1,r.totalTimeMs+=t.timeSpentMs,r.cards.add(t.cardId),t.isCorrect===!0?r.correct+=1:t.isCorrect===!1&&(r.incorrect+=1)}return[...n.entries()].map(([e,t])=>{let n=t.correct+t.incorrect;return{tag:e,responses:t.responses,correct:t.correct,incorrect:t.incorrect,accuracy:n>0?t.correct/n:null,totalTimeMs:t.totalTimeMs,cards:t.cards.size}}).sort((e,n)=>{let r=Number(isSkillTag(t,n.tag))-Number(isSkillTag(t,e.tag));return r===0?n.responses===e.responses?e.tag.localeCompare(n.tag):n.responses-e.responses:r})}function eloLedger(e){let t={count:0,net:0,gained:0,lost:0,wins:0,losses:0};for(let n of e){if(n.kind!==`response`||!n.elo)continue;let e=n.elo.global.delta;t.count+=1,t.net+=e,e>0?(t.gained+=e,t.wins+=1):e<0&&(t.lost+=e,t.losses+=1)}return t.count?t:null}var M=3;function cardDossiers(e){let t=Date.parse(e.asOf),n=new Map;for(let t of e.scheduled){let e=String(t.reviewTime),r=n.get(t.cardId);(!r||e<r)&&n.set(t.cardId,e)}return e.cardHistories.map(r=>{let i=e.cards?.get(r.cardID),a=r.records.filter(e=>e.isCorrect===!1).length,o=r.records.reduce((e,t)=>e+(t.timeSpent??0),0),s=n.get(r.cardID),c=s?{reviewTime:s,overdue:Date.parse(s)<=t}:null,l=i?.elo?.global?.score??null,u=i?.elo?.global?.count??null;return{cardId:r.cardID,...i?{card:i}:{},records:r.records,lapses:r.lapses??0,streak:r.streak??0,bestIntervalSeconds:r.bestInterval??0,attempts:r.records.length,fails:a,firstSeen:r.records[0]?.timeStamp??null,lastSeen:r.records[r.records.length-1]?.timeStamp??null,totalTimeMs:o,pendingReview:c,cardElo:l,cardEloCount:u,stuck:a>0&&!!c?.overdue,frozenElo:a>=M&&u!==null&&u<a,painScore:o*(a+1)}}).sort((e,t)=>t.painScore-e.painScore)}function recordPerformance(e){let t=e.performance;return typeof t==`number`?t:t&&typeof t==`object`&&typeof t._global==`number`?t._global:null}function runCardSource(e){return e.required?`required: ${e.required}`:e.generator??`unknown`}function selectedBySource(e){let t=new Map;for(let n of e.cards??[]){if(!n.selected)continue;let e=runCardSource(n);t.set(e,(t.get(e)??0)+1)}return[...t].map(([e,t])=>({source:e,count:t})).sort((e,t)=>t.count-e.count)}function pipelineRunStats(e,t={}){let n=e.sessions.filter(e=>!t.since||e.startTime>=t.since),r=new Map;for(let t of e.cardHistories)for(let e of t.records){if(!e.sessionId)continue;let n=r.get(e.sessionId)??[];n.push({cardId:t.cardID,record:e}),r.set(e.sessionId,n)}let i=new Map,gen=e=>{let t=i.get(e);return t||(t={name:e,runs:0,cards:0,newCards:0,reviewCards:0,topScoreMax:0,topScoreLast:0,selected:0,firstAttempts:0,firstAttemptsCorrect:0},i.set(e,t)),t},a=new Map,o=new Map,s=0,c=0,l=0,u,d;for(let e of n){let t=new Map;for(let n of e.runs??[]){s++,(!u||n.at<u)&&(u=n.at),(!d||n.at>d)&&(d=n.at);for(let e of n.generators??[]){let t=gen(e.name);t.runs++,t.cards+=e.cardCount,t.newCards+=e.newCount,t.reviewCards+=e.reviewCount,t.topScoreMax=Math.max(t.topScoreMax,e.topScore),t.topScoreLast=e.topScore}for(let e of n.filters??[]){let t=a.get(e.name)??{name:e.name,runs:0,boosted:0,penalized:0,passed:0,removed:0};t.runs++,e.kind&&(t.kind=e.kind),t.boosted+=e.boosted,t.penalized+=e.penalized,t.passed+=e.passed,t.removed+=e.removed,a.set(e.name,t)}for(let e of n.regulators??[]){let t=o.get(e.name)??{name:e.name,class:e.class,runs:0,meanMultiplier:0,maxMultiplier:0,runsActive:0,last:e,sumMultiplier:0};t.runs++,t.sumMultiplier+=e.multiplier,t.maxMultiplier=Math.max(t.maxMultiplier,e.multiplier),e.multiplier>1&&t.runsActive++,t.last=e,o.set(e.name,t)}if(n.cards){c++;for(let e of n.cards)if(e.selected){if(!e.generator){l++;continue}gen(e.generator).selected++,t.has(e.cardId)||t.set(e.cardId,e.generator)}}}for(let{cardId:n,record:i}of r.get(e.sessionId)??[]){let e=t.get(n);if(!e||i.priorAttemps!==0)continue;let r=gen(e);r.firstAttempts++,i.isCorrect===!0&&r.firstAttemptsCorrect++}}return{sessions:n.length,runs:s,runsWithSelection:c,firstRunAt:u,lastRunAt:d,generators:[...i.values()].map(({cards:e,newCards:t,reviewCards:n,...r})=>({...r,meanCards:r.runs?e/r.runs:0,meanNew:r.runs?t/r.runs:0,meanReview:r.runs?n/r.runs:0})).sort((e,t)=>t.runs-e.runs||e.name.localeCompare(t.name)),filters:[...a.values()].sort((e,t)=>e.name.localeCompare(t.name)),regulators:[...o.values()].map(({sumMultiplier:e,...t})=>({...t,meanMultiplier:t.runs?e/t.runs:0})),selectedUnattributed:l}}function fmtDelta(e){if(e===null)return`—`;if(e===0)return`0`;let t=Number.isInteger(e)?e:Number(e.toFixed(1));return t>0?`+${t}`:String(t)}function fmtDuration(e){let t=Math.max(0,Math.round(e));if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?t%60?`${n}m${t%60}s`:`${n}m`:`${(n/60).toFixed(1)}h`}function fmtAnswer(e,t=40){if(e==null)return``;if(typeof e==`string`||typeof e==`number`)return String(e);try{let n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}\u2026`:n}catch{return String(e)}}function fmtScore(e){return e===null||!Number.isFinite(e)?`∞`:Math.abs(e)>=.01||e===0?e.toFixed(2):e.toExponential(1)}function trailText(e,t){let n=[` ${e}: ${t.cardId} (${t.origin}, ${runCardSource(t)}) final ${fmtScore(t.score)}`];for(let e of t.trail)n.push(` ${e.action} ${e.strategyName} \u2192 ${fmtScore(e.score)}: ${e.reason}`);return n}function regulatorText(e){let t=e.inputs;if(e.name===`review-mass`)return`review mass ${e.urgency.toFixed(1)} over ${t.due??e.applied} due (healthy ${t.healthyMass}) \u2192 \xD7${e.multiplier.toFixed(2)}`;let n=t.frozenHours?`, ${t.frozenHours.toFixed(1)}h frozen`:``;return`intake ${e.urgency.toFixed(1)}h since a new card${n}; ${t.eligibleNew??e.applied}/${t.newCandidates??`?`} new eligible \u2192 \xD7${e.multiplier.toFixed(2)}`}function runText(e){let t=[];if(t.push(`RUN ${e.label}${e.mode?` [${e.mode}]`:``} @ ${e.at} \u2014 generated ${e.generatedCount} \u2192 selected ${e.finalCount} (${e.newSelected} new, ${e.reviewsSelected} review)`+(e.generatedCount>0&&e.finalCount===0?` ⚠ nothing survived`:``)),typeof e.userElo==`number`&&t.push(` userElo: ${Math.round(e.userElo)}`),e.versions&&t.push(` versions: strategies ${e.versions.strategies??`—`} \xB7 content ${e.versions.content??`—`}`),e.generators?.length){t.push(` generators:`);for(let n of e.generators)t.push(` - ${n.name}: ${n.cardCount} cards (${n.newCount} new, ${n.reviewCount} review), topScore ${n.topScore.toFixed(2)}`)}if(e.filters?.length){t.push(` filters:`);for(let n of e.filters)t.push(` - ${n.name}${n.kind?` (${n.kind})`:``}: +${n.boosted} boosted, -${n.penalized} penalized, ${n.passed} passed, ${n.removed} removed`)}if(e.regulators?.length){t.push(` regulators:`);for(let n of e.regulators)t.push(` - ${regulatorText(n)}`)}if(e.hints&&t.push(` hints: ${JSON.stringify(e.hints)}`),e.cards?.length){let n=selectedBySource(e).map(e=>`${e.source} ${e.count}`);n.length&&t.push(` selected by source: ${n.join(` · `)}`),t.push(` selection (✓ selected, · runner-up):`);for(let n of e.cards)t.push(` ${n.selected?`✓`:`·`} ${n.cardId} (${n.origin}, ${runCardSource(n)}) ${fmtScore(n.score)}`)}if(e.unselectedNew?.nextInLine&&t.push(...trailText(`next new in line`,e.unselectedNew.nextInLine)),e.unselectedNew?.topGenerated&&t.push(...trailText(`top-generated new (sunk)`,e.unselectedNew.topGenerated)),e.discardedTail){let n=e.discardedTail;t.push(` discardedTail: ${n.count} cards`+(n.scoreRange?` \xB7 score [${n.scoreRange[0].toFixed(2)}, ${n.scoreRange[1].toFixed(2)}]`:``)+(n.eloRange?` \xB7 elo [${Math.round(n.eloRange[0])}, ${Math.round(n.eloRange[1])}]`:``)),n.note&&t.push(` ${n.note}`)}return t.join(`
|
|
2
|
+
`)}function scoredTagDeltas(e){return e.tags.filter(e=>e.score!==null&&e.delta!==0).slice(0,4)}function eloSuffix(e,t){if(!e)return``;let n=`ELO g:${e.global.before}\u2192${e.global.after} (${fmtDelta(e.global.delta)})`,r=scoredTagDeltas(e).map(e=>`${shortTag(t,e.tag)}:${fmtDelta(e.delta)}`);return` ${n}${r.length?` | ${r.join(` `)}`:``}`}function clock(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(11,19)}function sessionText(e,t,n={},r){let i=t.summary,a=i.doc,o=t.timeline.filter(e=>e.kind===`response`).length,s=[];if(s.push(`# Study session ${a.sessionId} \u2014 user ${e}`),s.push(``),s.push(`## Legend`),s.push(`- The TIMELINE is one time-ordered stream: RUN lines are pipeline (re)plans;`),s.push(` the lines between them are card responses in the order presented.`),s.push(`- RUN "generated N → selected M (a new, b review)": the pipeline produced N`),s.push(` candidates and chose M. "nothing survived" = generated > 0 but 0 selected.`),s.push(` Bootstrap runs fire before card #1; replans are interleaved by time.`),s.push(`- generators: each source's contribution. filters: how each reshaped scores`),s.push(` (gate: not ready yet; signal: preference). regulators: the pressure on each class,`),s.push(` review mass (due reviews by value) and intake (hours since a new card).`),s.push(` hints: the ReplanHints the navigator was told (_label = replan reason).`),s.push(` versions: the strategy docs' hash and the content version the run ran on; the`),s.push(` headline's are the framework and app versions. A change between runs marks a deploy.`),s.push(` selection: the chosen cards and top runners-up. "next new in line" / "top-generated`),s.push(` new (sunk)": the unselected new cards worth explaining, with each score change.`),s.push(` Each card reads (origin, source). origin: review = a scheduled review, new = anything`),s.push(` else. source: the generator that produced it, or "required: <hint>" when a hint forced`),s.push(` it. Older runs show origin "unknown" for prescribed and hint-required cards.`),s.push(`- RESP "✓/✗ type <cardId> [tags] Ts (attempt k) 'answer'": one presentation and`),s.push(` its outcome. A trailing "ELO g:before→after (Δ) | tag:Δ …" is the exchange it`),s.push(` produced. Only first attempts move ELO.`),s.push(``),s.push(`## Headline`),s.push(`- status: ${a.status}`),s.push(`- start: ${a.startTime}${a.endTime?` \xB7 end: ${a.endTime}`:``}`),a.versions&&s.push(`- versions: framework ${a.versions.framework}`+(a.versions.app?` \xB7 app ${a.versions.app}`:``)),s.push(`- clock: ${i.durationSeconds??`—`}s of ${a.plannedSeconds}s planned`+(a.tally?` \xB7 ${a.tally.secondsRemaining}s remaining`:``)),a.tally&&s.push(`- tally: ${a.tally.cardsPresented} cards, ${a.tally.responses} responses (${a.tally.correct} correct / ${a.tally.incorrect} incorrect) \xB7 failedQ remaining ${a.tally.failedQRemaining}`),s.push(`- flags: ${i.flags.length?i.flags.join(`, `):`none`}`),s.push(`- config: batchLimit ${a.config?.defaultBatchLimit??`?`}, ${a.config?.sourceCount??`?`} source(s), opening queues supply ${a.initialQueues?.supplyQ??`?`} / failed ${a.initialQueues?.failedQ??`?`}`),t.responsesMissing&&s.push(`- \u26A0 responsesMissing: tally claims ${a.tally?.responses} responses but only ${o} stamped records were found.`),s.push(``),i.state.length){s.push(`## Learner state (start → end, Δ)`);for(let e of i.state)s.push(`- ${e.label}: ${e.from??`—`} \u2192 ${e.to??`—`} (${fmtDelta(e.delta)})`);s.push(``)}if(s.push(`## Session hints`),s.push(`- at open: ${a.config?.initHints?JSON.stringify(a.config.initHints):`none`}`),s.push(`- at close: ${a.finalHints?JSON.stringify(a.finalHints):`none`}`),s.push(``),n.servedTags?.length){s.push(`## Served tags`);for(let e of n.servedTags)s.push(`- ${e.tag}: ${e.responses} resp / ${e.cards} card(s), acc ${e.accuracy===null?`n/a`:`${Math.round(e.accuracy*100)}%`} (${e.correct}\u2713/${e.incorrect}\u2717), ${(e.totalTimeMs/1e3).toFixed(1)}s`);s.push(``)}let c=n.eloLedger;c&&(s.push(`## ELO ledger (learner global)`),s.push(`- net ${fmtDelta(c.net)} across ${c.count} exchange(s) \xB7 gained ${fmtDelta(c.gained)} over ${c.wins} win(s) \xB7 lost ${fmtDelta(c.lost)} over ${c.losses} loss(es)`),s.push(``)),s.push(`## Timeline (${t.timeline.length} entries)`);for(let e of t.timeline){if(e.kind===`run`){s.push(runText(e.run));continue}let t=e.isCorrect===!0?`✓`:e.isCorrect===!1?`✗`:`·`,n=e.tags.length?` [${e.tags.join(`, `)}]`:``,i=e.priorAttempts?` (attempt ${e.priorAttempts+1})`:``,a=e.userAnswer==null?``:` '${fmtAnswer(e.userAnswer)}'`;s.push(`RESP ${clock(e.at)} ${t} ${e.questionType??`card`} ${e.cardId}${n} \u2014 ${(e.timeSpentMs/1e3).toFixed(1)}s${i}${a}${eloSuffix(e.elo,r)}`)}return s.join(`
|
|
3
|
+
`)}function beforeRole(e,t){let n=RegExp(`(^|:)${t}:(?=.)`).exec(e);return n?e.slice(0,n.index):``}function tagNamespace(e){let t=w(e);if(t)return beforeRole(e,t);let n=e.indexOf(`:`);return n>0?e.slice(0,n):``}function matchesTagBatch(e,t,n=w(e)){return!(t.namespaces&&!t.namespaces.includes(tagNamespace(e))||t.roles&&!t.roles.includes(n??`none`)||t.prefixes&&!t.prefixes.some(t=>e.startsWith(t))||t.excludePrefixes?.some(t=>e.startsWith(t)))}function tagGroupBatch(e){let t=w(e),n=tagNamespace(e),r=[n,t].filter(Boolean).join(`:`)||`(no namespace)`;return{id:r,label:r,namespaces:[n],roles:[t??`none`]}}function learnerCourseElo(e){let t=e.registration?.courses?.find(t=>t.courseID===e.courseId)?.elo;return typeof t==`number`?{global:{score:t,count:0},tags:{},misc:{}}:!t||typeof t!=`object`||!t.global?null:{...t,tags:t.tags??{},misc:t.misc??{}}}function minIso(e,t){return e===null||t<e?t:e}function maxIso(e,t){return e===null||t>e?t:e}function step(e,t,n,r){n!==-1&&e[e.length-1]?.score!==n&&e.push({at:t,score:n}),e.push({at:t,score:r})}function tagEloView(e){let t=learnerCourseElo(e);if(!t)return null;let n=new Map;for(let t of e.cardHistories)for(let e of t.records){let t=e.performance;if(!(!t||typeof t!=`object`))for(let r of Object.keys(t)){if(r===`_global`)continue;let t=n.get(r)??{first:null,last:null};t.first=minIso(t.first,e.timeStamp),t.last=maxIso(t.last,e.timeStamp),n.set(r,t)}}let r=e.sessions.flatMap(e=>e.eloEvents??[]).sort((e,t)=>e.at.localeCompare(t.at)),i=[],a={},o=new Map;for(let e of r){step(i,e.at,e.global.before,e.global.after);for(let[t,n]of Object.entries(e.tags??{}))o.set(t,(o.get(t)??0)+1),!(n.score===null||T(t)||n.after===-1)&&step(a[t]??(a[t]=[]),e.at,n.before,n.after)}let s=Object.entries(t.tags).map(([e,r])=>{let i=w(e),a=T(e)||r.score===-1,s=a?null:r.score,c=r.recent??[],{first:l,last:u}=n.get(e)??{first:null,last:null};for(let e of c)l=minIso(l,e.at),u=maxIso(u,e.at);return{tag:e,role:i,namespace:tagNamespace(e),group:tagGroupBatch(e).id,score:s,...a&&r.score!==-1?{staleScore:r.score}:{},count:r.count,vsGlobal:s===null?null:s-t.global.score,recent:c,recentOk:c.filter(e=>e.ok).length,firstSeen:l,lastSeen:u,events:o.get(e)??0}});s.sort((e,t)=>e.score===null||t.score===null?Number(e.score===null)-Number(t.score===null)||e.tag.localeCompare(t.tag):t.score-e.score||e.tag.localeCompare(t.tag)),i.length>0&&i.push({at:e.asOf,score:t.global.score});for(let t of s){let n=a[t.tag];n&&t.score!==null&&n.push({at:e.asOf,score:t.score})}let c=new Map;for(let e of s)c.has(e.group)||c.set(e.group,tagGroupBatch(e.tag));let countOnlyGroup=e=>e.roles?.some(e=>e===`intro`||e===`expose`)??!1;return{global:t.global,rows:s,groups:[...c.values()].sort((e,t)=>Number(countOnlyGroup(e))-Number(countOnlyGroup(t))||e.id.localeCompare(t.id)),series:{global:i,tags:a},seriesFrom:r[0]?.at??null}}var N=Object.defineProperty,__name=(e,t)=>N(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let n={};for(var r in e)N(n,r,{get:e[r],enumerable:!0});return t||N(n,Symbol.toStringTag,{value:`Module`}),n};function useLearnerDataset(){let e=h(null),t=h(null),n=y(!1),r=y(null);async function load(i,a){n.value=!0,r.value=null;try{let n=await i();t.value=fromDump(n,a),e.value=n}catch(e){r.value=e instanceof Error?e.message:String(e)}finally{n.value=!1}}function loadFromCouch(e){return load(()=>fetchLearnerDump({...e,auth:{kind:`cookie`}}),e.courseId)}function loadFromFile(e,t){return load(async()=>parseLearnerDump(await e.text()),t)}return{dump:e,dataset:t,loading:n,error:r,loadFromCouch,loadFromFile}}function downloadLearnerDump(e){let t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=dumpFileName(e),r.click(),URL.revokeObjectURL(n)}var P={class:`d-flex flex-wrap align-center ga-2`},I={key:1,class:`d-flex flex-wrap align-center ga-2 mt-3`},L=l({__name:`LearnerDatasetSource`,props:{couchUrl:{},courseId:{},initialUsername:{},autoload:{type:Boolean}},emits:[`loaded`],setup(i,{emit:o}){let s=i,l=o,{dump:u,dataset:h,loading:C,error:w,loadFromCouch:T,loadFromFile:E}=useLearnerDataset(),D=y(s.initialUsername??``),O=y(null),k=g(()=>{let e=h.value?.sessions??[];return e.length?`${e[0].startTime.slice(0,10)} .. ${e[e.length-1].startTime.slice(0,10)}`:``});function loadLive(){!s.couchUrl||!s.courseId||!D.value||T({couchUrl:s.couchUrl,courseId:s.courseId,username:D.value})}function onFile(e){let t=e.target,n=t.files?.[0];n&&E(n,s.courseId),t.value=``}return d(h,e=>{e&&u.value&&l(`loaded`,e,u.value)}),S(()=>{s.autoload&&loadLive()}),(i,o)=>{let s=a(`v-text-field`),l=a(`v-btn`),d=a(`v-alert`),g=a(`v-spacer`),y=a(`v-card-text`),S=a(`v-card`);return n(),b(S,{variant:`outlined`},{default:e(()=>[t(y,null,{default:e(()=>[f(`div`,P,[t(s,{modelValue:D.value,"onUpdate:modelValue":o[0]||(o[0]=e=>D.value=e),label:`Learner`,density:`compact`,"hide-details":``,style:{"max-width":`16rem`},disabled:!i.couchUrl||!i.courseId,onKeydown:v(loadLive,[`enter`])},null,8,[`modelValue`,`disabled`]),t(l,{color:`primary`,loading:_(C),disabled:!i.couchUrl||!i.courseId||!D.value,onClick:loadLive},{default:e(()=>o[3]||(o[3]=[c(` Load `)])),_:1},8,[`loading`,`disabled`]),o[5]||(o[5]=f(`span`,{class:`text-medium-emphasis mx-2`},`or`,-1)),t(l,{variant:`tonal`,"prepend-icon":`mdi-file-upload-outline`,onClick:o[1]||(o[1]=e=>O.value?.click())},{default:e(()=>o[4]||(o[4]=[c(` Open dump file `)])),_:1}),f(`input`,{ref_key:`fileInput`,ref:O,type:`file`,accept:`.json,application/json`,hidden:``,onChange:onFile},null,544)]),_(w)?(n(),b(d,{key:0,type:`error`,variant:`tonal`,density:`compact`,class:`mt-3`},{default:e(()=>[c(r(_(w)),1)]),_:1})):x(``,!0),_(h)&&_(u)?(n(),p(`div`,I,[f(`span`,null,[f(`strong`,null,r(_(h).username),1),c(` · `+r(_(h).sessions.length)+` sessions `,1),k.value?(n(),p(m,{key:0},[c(`(`+r(k.value)+`)`,1)],64)):x(``,!0),c(` · `+r(_(h).cardHistories.length)+` cards seen · as of `+r(_(h).asOf.slice(0,16))+`Z `,1),_(h).cards?x(``,!0):(n(),p(m,{key:1},[c(`· no course slice`)],64))]),t(g),t(l,{variant:`text`,size:`small`,"prepend-icon":`mdi-download`,onClick:o[2]||(o[2]=e=>_(downloadLearnerDump)(_(u)))},{default:e(()=>o[6]||(o[6]=[c(` Save dump `)])),_:1})])):x(``,!0)]),_:1})]),_:1})}}}),R={churned:{icon:`mdi-autorenew`,color:`warning`},"out-of-content":{icon:`mdi-cup-off-outline`,color:`error`},walked:{icon:`mdi-exit-run`,color:`error`},stalled:{icon:`mdi-arrow-collapse-horizontal`,color:`grey`},grinding:{icon:`mdi-alert-octagon-outline`,color:`warning`}};function statusColor(e){return e===`closed`?`success`:e===`abandoned`?`warning`:`error`}function accuracyClass(e){return e===null?`text-disabled`:e>=.8?`text-success`:e<.5?`text-error`:``}function deltaClass(e){return e===null||e===0?`text-disabled`:e>0?`text-success`:`text-error`}function deltaColor(e){return e>0?`success`:e<0?`error`:`grey`}function fmtTime(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function fmtClock(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString(void 0,{hour12:!1})}function shortId(e,t=28){return e.length>t?`…${e.slice(-(t-2))}`:e}function useCopy(){let e=y(null),t=null;async function copy(n,r){try{await navigator.clipboard.writeText(n),e.value=r,t&&clearTimeout(t),t=setTimeout(()=>e.value=null,1400)}catch(e){console.warn(`[admin] clipboard write failed`,e)}}return{copied:e,copy}}var ee={key:0,class:`text-caption mb-2`},z={class:`text-medium-emphasis`},te={class:`d-flex flex-wrap mb-2 ga-1`},ne={key:0,class:`text-caption text-disabled`},re={class:`text-caption text-medium-emphasis mb-2`},ie={key:0,class:`text-error`},ae={class:`text-no-wrap`},oe={key:2,class:`text-disabled`},B={class:`text-truncate`,style:{"max-width":`200px`}},V=l({__name:`CardDossierDetail`,props:{dossier:{},interpreters:{}},setup(i){function perf(e){let t=recordPerformance(e);return t===null?`—`:t.toFixed(2)}function fmtInterval(e){return e?e<3600?`${Math.round(e/60)}m`:e<86400?`${Math.round(e/3600)}h`:`${Math.round(e/86400)}d`:`none`}return(i,s)=>{let l=a(`v-chip`),d=a(`v-icon`),h=a(`v-table`);return n(),p(`div`,null,[i.dossier.card&&Object.keys(i.dossier.card.data).length?(n(),p(`div`,ee,[(n(!0),p(m,null,u(i.dossier.card.data,(e,t)=>(n(),p(`span`,{key:t,class:`mr-3`},[f(`span`,z,r(t)+`:`,1),c(` `+r(_(fmtAnswer)(e,60)),1)]))),128))])):x(``,!0),f(`div`,te,[(n(!0),p(m,null,u(i.dossier.card?.tags??[],t=>(n(),b(l,{key:t,size:`x-small`,variant:`outlined`,color:_(isSkillTag)(i.interpreters,t)?`primary`:void 0},{default:e(()=>[c(r(t),1)]),_:2},1032,[`color`]))),128)),i.dossier.card?x(``,!0):(n(),p(`span`,ne,`no course data in this dataset`))]),f(`div`,re,[c(` lapses `+r(i.dossier.lapses)+` · streak `+r(i.dossier.streak)+` · best interval `+r(fmtInterval(i.dossier.bestIntervalSeconds))+` · `,1),i.dossier.pendingReview?(n(),p(m,{key:0},[c(` next review `+r(_(fmtTime)(i.dossier.pendingReview.reviewTime))+` `,1),i.dossier.pendingReview.overdue?(n(),p(`span`,ie,`(overdue)`)):x(``,!0)],64)):(n(),p(m,{key:1},[c(`no review scheduled`)],64))]),t(h,{density:`compact`,class:`sk-record-table`},{default:e(()=>[s[2]||(s[2]=f(`thead`,null,[f(`tr`,null,[f(`th`,null,`#`),f(`th`,null,`When`),f(`th`,null,`Result`),f(`th`,null,`Perf`),f(`th`,null,`Prior att.`),f(`th`,null,`Time`),f(`th`,null,`Answer`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(i.dossier.records,(t,i)=>(n(),p(`tr`,{key:i,class:o(t.isCorrect===!1?`sk-fail-row`:``)},[f(`td`,null,r(i+1),1),f(`td`,ae,r(_(fmtTime)(t.timeStamp)),1),f(`td`,null,[t.isCorrect===!0?(n(),b(d,{key:0,size:`small`,color:`success`},{default:e(()=>s[0]||(s[0]=[c(`mdi-check`)])),_:1})):t.isCorrect===!1?(n(),b(d,{key:1,size:`small`,color:`error`},{default:e(()=>s[1]||(s[1]=[c(`mdi-close`)])),_:1})):(n(),p(`span`,oe,`—`))]),f(`td`,null,r(perf(t)),1),f(`td`,null,r(t.priorAttemps??`—`),1),f(`td`,null,r(((t.timeSpent??0)/1e3).toFixed(1))+`s`,1),f(`td`,B,r(_(fmtAnswer)(t.userAnswer)),1)],2))),128))])]),_:1})])}}}),se=__name((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},`default`),ce=se(V,[[`__scopeId`,`data-v-76b0a622`]]),le={class:`text-caption text-medium-emphasis mb-4`},ue={class:`text-h6`},de={class:`text-caption`},fe={class:`d-flex align-center flex-wrap mb-3 ga-3`},pe={class:`d-flex align-center flex-wrap ga-2`,style:{width:`100%`}},me={class:`text-body-2 font-weight-medium`},he={class:`text-caption text-medium-emphasis`},ge={key:2,class:`text-caption`},_e={key:0,class:`ml-1 text-disabled`},ve=se(l({__name:`LearnerCardHistory`,props:{dataset:{},interpreters:{},focus:{}},setup(i){let l=i,h=g(()=>cardDossiers(l.dataset)),v=y(`all`),S=y(``),C=y([]),w=y(null),T=g(()=>({stuck:h.value.filter(e=>e.stuck).length,failed:h.value.filter(e=>e.fails>0).length,frozen:h.value.filter(e=>e.frozenElo).length})),E=g(()=>[{label:`cards seen`,value:h.value.length,color:`primary`},{label:`total attempts`,value:h.value.reduce((e,t)=>e+t.attempts,0),color:`primary`},{label:`total fails`,value:h.value.reduce((e,t)=>e+t.fails,0),color:`error`},{label:`time on cards`,value:fmtDuration(h.value.reduce((e,t)=>e+t.totalTimeMs,0)/1e3),color:`grey`},{label:`stuck reviews`,value:T.value.stuck,color:`error`},{label:`frozen ELO`,value:T.value.frozen,color:`warning`}]),D=g(()=>{let e=h.value;v.value===`stuck`?e=e.filter(e=>e.stuck):v.value===`failed`?e=e.filter(e=>e.fails>0):v.value===`frozen`&&(e=e.filter(e=>e.frozenElo));let t=S.value?.trim().toLowerCase();return t&&(e=e.filter(e=>e.cardId.toLowerCase().includes(t)||(e.card?.questionType??``).toLowerCase().includes(t)||(e.card?.tags??[]).some(e=>e.toLowerCase().includes(t))||Object.values(e.card?.data??{}).some(e=>typeof e==`string`&&e.toLowerCase().includes(t)))),e});function headline(e){let t=Object.values(e.card?.data??{}).find(e=>typeof e==`string`&&e.length<=40);return typeof t==`string`?t:``}async function applyFocus(e){!e||!h.value.some(t=>t.cardId===e)||(v.value=`all`,S.value=e,C.value=[e],await s(),document.querySelector(`[data-card="${CSS.escape(e)}"]`)?.scrollIntoView({behavior:`smooth`,block:`center`}),w.value=e,setTimeout(()=>{w.value===e&&(w.value=null)},2200))}return d(()=>l.focus,e=>void applyFocus(e),{immediate:!0}),(i,s)=>{let l=a(`v-icon`),d=a(`v-card`),g=a(`v-col`),y=a(`v-row`),O=a(`v-btn`),k=a(`v-btn-toggle`),A=a(`v-text-field`),j=a(`v-alert`),M=a(`v-spacer`),N=a(`v-chip`),P=a(`v-expansion-panel-title`),I=a(`v-expansion-panel-text`),L=a(`v-expansion-panel`),R=a(`v-expansion-panels`);return n(),p(`div`,null,[f(`p`,le,[s[5]||(s[5]=c(` Every card the learner has met, most painful first (time sunk × failures), with its pending review and current card ELO. `)),t(l,{size:`x-small`,color:`error`},{default:e(()=>s[3]||(s[3]=[c(`mdi-sync-alert`)])),_:1}),s[6]||(s[6]=c(` is a failed card holding an overdue review; `)),t(l,{size:`x-small`,color:`warning`},{default:e(()=>s[4]||(s[4]=[c(`mdi-snowflake`)])),_:1}),s[7]||(s[7]=c(` is a repeatedly failed card whose ELO has fewer updates than failures. `))]),t(y,{dense:``,class:`mb-2`},{default:e(()=>[(n(!0),p(m,null,u(E.value,i=>(n(),b(g,{key:i.label,cols:`6`,sm:`4`,md:`2`},{default:e(()=>[t(d,{variant:`tonal`,color:i.color,class:`pa-2 text-center`},{default:e(()=>[f(`div`,ue,r(i.value),1),f(`div`,de,r(i.label),1)]),_:2},1032,[`color`])]),_:2},1024))),128))]),_:1}),f(`div`,fe,[t(k,{modelValue:v.value,"onUpdate:modelValue":s[0]||(s[0]=e=>v.value=e),density:`compact`,color:`primary`,variant:`outlined`},{default:e(()=>[t(O,{value:`all`,size:`small`},{default:e(()=>[c(`All (`+r(h.value.length)+`)`,1)]),_:1}),t(O,{value:`stuck`,size:`small`},{default:e(()=>[t(l,{start:``,size:`small`,color:`error`},{default:e(()=>s[8]||(s[8]=[c(`mdi-sync-alert`)])),_:1}),c(` Stuck (`+r(T.value.stuck)+`) `,1)]),_:1}),t(O,{value:`failed`,size:`small`},{default:e(()=>[c(`Ever failed (`+r(T.value.failed)+`)`,1)]),_:1}),t(O,{value:`frozen`,size:`small`},{default:e(()=>[t(l,{start:``,size:`small`,color:`warning`},{default:e(()=>s[9]||(s[9]=[c(`mdi-snowflake`)])),_:1}),c(` Frozen ELO (`+r(T.value.frozen)+`) `,1)]),_:1})]),_:1},8,[`modelValue`]),t(A,{modelValue:S.value,"onUpdate:modelValue":s[1]||(s[1]=e=>S.value=e),density:`compact`,variant:`outlined`,"hide-details":``,clearable:``,placeholder:`filter by card / tag / type / content`,"prepend-inner-icon":`mdi-magnify`,style:{"max-width":`320px`}},null,8,[`modelValue`])]),h.value.length===0?(n(),b(j,{key:0,type:`info`,variant:`tonal`},{default:e(()=>s[10]||(s[10]=[c(`No card history for this learner.`)])),_:1})):(n(),b(R,{key:1,modelValue:C.value,"onUpdate:modelValue":s[2]||(s[2]=e=>C.value=e),multiple:``,variant:`accordion`},{default:e(()=>[(n(!0),p(m,null,u(D.value,a=>(n(),b(L,{key:a.cardId,value:a.cardId,"data-card":a.cardId,class:o(a.cardId===w.value?`sk-card-flash`:``)},{default:e(()=>[t(P,null,{default:e(()=>[f(`div`,pe,[a.stuck?(n(),b(l,{key:0,color:`error`,size:`small`,title:`failed + overdue review`},{default:e(()=>s[11]||(s[11]=[c(`mdi-sync-alert`)])),_:1})):x(``,!0),a.frozenElo?(n(),b(l,{key:1,color:`warning`,size:`small`,title:`repeatedly failed, ELO barely updated`},{default:e(()=>s[12]||(s[12]=[c(` mdi-snowflake `)])),_:1})):x(``,!0),f(`span`,me,r(a.card?.questionType??`card`),1),f(`code`,he,r(_(shortId)(a.cardId,24)),1),headline(a)?(n(),p(`span`,ge,r(headline(a)),1)):x(``,!0),t(M),a.fails>0?(n(),b(N,{key:3,size:`x-small`,color:`error`,variant:`tonal`},{default:e(()=>[c(r(a.fails)+` fail`+r(a.fails===1?``:`s`),1)]),_:2},1024)):x(``,!0),t(N,{size:`x-small`,variant:`tonal`},{default:e(()=>[c(r(a.attempts)+` view`+r(a.attempts===1?``:`s`),1)]),_:2},1024),t(N,{size:`x-small`,variant:`tonal`,color:`grey`},{default:e(()=>[c(r(_(fmtDuration)(a.totalTimeMs/1e3)),1)]),_:2},1024),a.pendingReview?(n(),b(N,{key:4,size:`x-small`,color:a.pendingReview.overdue?`error`:`success`,variant:`flat`},{default:e(()=>[c(` review `+r(a.pendingReview.overdue?`overdue`:`scheduled`),1)]),_:2},1032,[`color`])):x(``,!0),t(N,{size:`x-small`,variant:`tonal`,color:a.frozenElo?`warning`:void 0},{default:e(()=>[c(` ELO `+r(a.cardElo===null?`?`:Math.round(a.cardElo))+` `,1),a.cardEloCount===null?x(``,!0):(n(),p(`span`,_e,`/`+r(a.cardEloCount),1))]),_:2},1032,[`color`])])]),_:2},1024),t(I,null,{default:e(()=>[t(ce,{dossier:a,interpreters:i.interpreters},null,8,[`dossier`,`interpreters`])]),_:2},1024)]),_:2},1032,[`value`,`data-card`,`class`]))),128))]),_:1},8,[`modelValue`]))])}}}),[[`__scopeId`,`data-v-bb6b302b`]]),ye={class:`sk-run-detail`},be={key:0,class:`mb-2`},xe={class:`text-right`},Se={class:`text-right`},Ce={class:`text-right`},we={class:`text-right`},Te={key:1,class:`mb-2`},Ee={class:`text-right`},De={class:`text-right`},Oe={class:`text-right`},ke={key:2,class:`mb-2 sk-mini-line text-medium-emphasis`},Ae={key:3,class:`mb-2`},je={key:4,class:`mb-2`},Me={class:`text-caption font-weight-medium`},Ne={key:0,class:`text-medium-emphasis font-weight-regular`},Pe={key:1,title:`runner-up`},Fe=[`onClick`],Ie={class:`text-right`},Le={class:`text-caption font-weight-medium`},Re=[`onClick`],ze={class:`text-medium-emphasis`},Be={class:`text-no-wrap`},Ve={class:`text-no-wrap`},He={class:`text-right text-no-wrap`},Ue={class:`text-caption`},We={key:5,class:`mb-2`},Ge={class:`sk-hint-block`},Ke={key:6,class:`text-caption text-medium-emphasis`},qe={key:2},Je=se(l({__name:`RunDetail`,props:{run:{}},emits:[`open-card`],setup(i,{emit:s}){let l=i,d=s,h=g(()=>{let e=l.run.unselectedNew,t=[];return e?.nextInLine&&t.push({label:`next new card in line`,card:e.nextInLine}),e?.topGenerated&&t.push({label:`top-generated new card (sunk)`,card:e.topGenerated}),t}),v=g(()=>selectedBySource(l.run).map(e=>`${e.source} ${e.count}`).join(` · `));return(i,s)=>{let l=a(`v-table`),g=a(`v-icon`);return n(),p(`div`,ye,[i.run.generators?.length?(n(),p(`div`,be,[s[1]||(s[1]=f(`div`,{class:`text-caption font-weight-medium`},`generators`,-1)),t(l,{density:`compact`,class:`sk-mini-table`},{default:e(()=>[s[0]||(s[0]=f(`thead`,null,[f(`tr`,null,[f(`th`),f(`th`,{class:`text-right`},`cards`),f(`th`,{class:`text-right`},`new`),f(`th`,{class:`text-right`},`review`),f(`th`,{class:`text-right`},`top`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(i.run.generators,e=>(n(),p(`tr`,{key:e.name},[f(`td`,null,r(e.name),1),f(`td`,xe,r(e.cardCount),1),f(`td`,Se,r(e.newCount),1),f(`td`,Ce,r(e.reviewCount),1),f(`td`,we,r(e.topScore.toFixed(2)),1)]))),128))])]),_:1})])):x(``,!0),i.run.filters?.length?(n(),p(`div`,Te,[s[3]||(s[3]=f(`div`,{class:`text-caption font-weight-medium`},`filters`,-1)),t(l,{density:`compact`,class:`sk-mini-table`},{default:e(()=>[s[2]||(s[2]=f(`thead`,null,[f(`tr`,null,[f(`th`),f(`th`,null,`kind`),f(`th`,{class:`text-right`},`boosted`),f(`th`,{class:`text-right`},`penalized`),f(`th`,{class:`text-right`},`passed`),f(`th`,{class:`text-right`},`removed`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(i.run.filters,e=>(n(),p(`tr`,{key:e.name},[f(`td`,null,r(e.name),1),f(`td`,null,r(e.kind??`—`),1),f(`td`,Ee,r(e.boosted),1),f(`td`,De,r(e.penalized),1),f(`td`,Oe,r(e.passed),1),f(`td`,{class:o([`text-right`,e.removed>0?`text-error`:``])},r(e.removed),3)]))),128))])]),_:1})])):x(``,!0),i.run.versions?(n(),p(`div`,ke,` strategies `+r(i.run.versions.strategies??`—`)+` · content `+r(i.run.versions.content??`—`),1)):x(``,!0),i.run.regulators?.length?(n(),p(`div`,Ae,[s[4]||(s[4]=f(`div`,{class:`text-caption font-weight-medium`},`regulators`,-1)),(n(!0),p(m,null,u(i.run.regulators,e=>(n(),p(`div`,{key:e.name,class:`sk-mini-line`},[f(`span`,{class:o(e.multiplier>1?`text-warning`:`text-medium-emphasis`)},` ×`+r(e.multiplier.toFixed(2)),3),c(` `+r(_(regulatorText)(e)),1)]))),128))])):x(``,!0),i.run.cards?.length?(n(),p(`div`,je,[f(`div`,Me,[s[5]||(s[5]=c(` selection `)),v.value?(n(),p(`span`,Ne,` · by source: `+r(v.value),1)):x(``,!0)]),t(l,{density:`compact`,class:`sk-mini-table`},{default:e(()=>[s[7]||(s[7]=f(`thead`,null,[f(`tr`,null,[f(`th`),f(`th`,null,`card`),f(`th`,null,`origin`),f(`th`,null,`source`),f(`th`,{class:`text-right`},`score`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(i.run.cards,t=>(n(),p(`tr`,{key:t.cardId,class:o(t.selected?``:`text-medium-emphasis`)},[f(`td`,null,[t.selected?(n(),b(g,{key:0,size:`x-small`,color:`success`},{default:e(()=>s[6]||(s[6]=[c(`mdi-check`)])),_:1})):(n(),p(`span`,Pe,`·`))]),f(`td`,null,[f(`a`,{class:`sk-card-link`,onClick:e=>d(`open-card`,t.cardId)},r(t.cardId),9,Fe)]),f(`td`,null,r(t.origin),1),f(`td`,null,r(_(runCardSource)(t)),1),f(`td`,Ie,r(_(fmtScore)(t.score)),1)],2))),128))])]),_:1})])):x(``,!0),(n(!0),p(m,null,u(h.value,i=>(n(),p(`div`,{key:i.label,class:`mb-2`},[f(`div`,Le,[c(r(i.label)+`: `,1),f(`a`,{class:`sk-card-link`,onClick:e=>d(`open-card`,i.card.cardId)},r(i.card.cardId),9,Re),f(`span`,ze,` (`+r(i.card.origin)+`, `+r(_(runCardSource)(i.card))+`) final `+r(_(fmtScore)(i.card.score)),1)]),t(l,{density:`compact`,class:`sk-mini-table`},{default:e(()=>[f(`tbody`,null,[(n(!0),p(m,null,u(i.card.trail,(e,t)=>(n(),p(`tr`,{key:t},[f(`td`,Be,r(e.action),1),f(`td`,Ve,r(e.strategyName),1),f(`td`,He,r(_(fmtScore)(e.score)),1),f(`td`,Ue,r(e.reason),1)]))),128))])]),_:2},1024)]))),128)),i.run.hints?(n(),p(`div`,We,[s[8]||(s[8]=f(`div`,{class:`text-caption font-weight-medium`},`hints`,-1)),f(`pre`,Ge,r(JSON.stringify(i.run.hints,null,2)),1)])):x(``,!0),i.run.discardedTail?(n(),p(`div`,Ke,[c(` discarded tail: `+r(i.run.discardedTail.count)+` cards `,1),i.run.discardedTail.scoreRange?(n(),p(m,{key:0},[c(` · score [`+r(i.run.discardedTail.scoreRange[0].toFixed(2))+`, `+r(i.run.discardedTail.scoreRange[1].toFixed(2))+`] `,1)],64)):x(``,!0),i.run.discardedTail.eloRange?(n(),p(m,{key:1},[c(` · ELO [`+r(Math.round(i.run.discardedTail.eloRange[0]))+`, `+r(Math.round(i.run.discardedTail.eloRange[1]))+`] `,1)],64)):x(``,!0),i.run.discardedTail.note?(n(),p(`div`,qe,r(i.run.discardedTail.note),1)):x(``,!0)])):x(``,!0)])}}}),[[`__scopeId`,`data-v-90c88783`]]),Ye={class:`d-flex align-center flex-wrap mb-4 ga-2`},Xe={class:`text-caption text-medium-emphasis`},Ze={class:`text-right`},Qe={class:`text-right`},$e={key:1,class:`text-caption text-disabled`},et={class:`sk-hint-block`},tt={class:`sk-hint-block`},nt={class:`text-caption text-medium-emphasis mb-4`},rt={class:`text-right`},it={class:`text-right`},at={class:`text-disabled`},ot={class:`text-right`},st={class:`d-flex flex-wrap ga-5`},ct={class:`text-caption text-medium-emphasis`},lt={class:`text-h6 text-success`},ut={class:`text-caption text-medium-emphasis`},dt={class:`text-h6 text-error`},ft={class:`text-h6`},pt={class:`text-caption text-disabled`},mt={class:`d-flex align-center flex-wrap mb-2 ga-3`},ht={key:4,class:`sk-timeline`},gt={class:`sk-tl-time text-caption text-disabled`},_t={class:`sk-tl-gutter`},vt={key:0,class:`sk-tl-body`},yt={class:`d-flex align-center flex-wrap ga-1`},bt={class:`font-weight-medium`},xt={class:`text-caption text-medium-emphasis ml-2`},St={key:1,class:`text-caption text-error ml-2`},Ct={key:1,class:`sk-tl-body`},wt=[`title`,`onClick`],Tt={class:`text-caption`},Et={class:`text-caption text-medium-emphasis ml-2`},Dt={key:0,class:`text-caption text-disabled ml-2`},Ot=se(l({__name:`LearnerSessionDetail`,props:{dataset:{},sessionId:{},interpreters:{}},emits:[`open-card`],setup(i,{emit:s}){let l=i,d=s,h=g(()=>sessionDetail(l.dataset,l.sessionId,l.interpreters)),v=g(()=>h.value.summary.doc),S=g(()=>servedTags(h.value?.timeline??[],l.interpreters)),C=g(()=>eloLedger(h.value?.timeline??[])),w=g(()=>h.value?.timeline.filter(e=>e.kind===`response`).length??0),T=y(`all`),E=g(()=>{let e=h.value?.timeline??[];return!T.value||T.value===`all`?e:e.filter(e=>e.kind===T.value)}),D=y(new Set);function toggle(e){let t=new Set(D.value);t.has(e)?t.delete(e):t.add(e),D.value=t}let{copied:O,copy:k}=useCopy();function asText(){return h.value?sessionText(l.dataset.username,h.value,{servedTags:S.value,eloLedger:C.value},l.interpreters):``}let j=g(()=>{let e=h.value?.summary;if(!e)return``;let t=fmtDuration(e.doc.plannedSeconds);return e.durationSeconds===null?`— of ${t}`:`${fmtDuration(e.durationSeconds)} of ${t}`});function skillTags(e){return e.filter(e=>isSkillTag(l.interpreters,e)).slice(0,3)}function fmtNum(e){return e===null?`—`:Number.isInteger(e)?String(e):e.toFixed(1)}function fmtHints(e){return e==null?`none`:JSON.stringify(e,null,2)}function entryIcon(e){return e.kind===`run`?`mdi-cog-refresh-outline`:e.isCorrect===!0?`mdi-check-circle-outline`:e.isCorrect===!1?`mdi-close-circle-outline`:`mdi-circle-small`}function entryColor(e){return e.kind===`run`?`primary`:e.isCorrect===!0?`success`:e.isCorrect===!1?`error`:`grey`}function rowClass(e){return e.kind===`run`?`sk-tl-run`:e.isCorrect===!1?`sk-tl-fail`:``}return(i,s)=>{let l=a(`v-alert`),g=a(`v-chip`),y=a(`v-icon`),M=a(`v-spacer`),N=a(`v-btn`),P=a(`v-table`),I=a(`v-card`),L=a(`v-col`),ee=a(`v-row`),z=a(`v-btn-toggle`);return n(),p(`div`,null,[h.value?(n(),p(m,{key:1},[f(`div`,Ye,[t(g,{size:`small`,variant:`flat`,color:_(statusColor)(v.value.status)},{default:e(()=>[c(r(v.value.status),1)]),_:1},8,[`color`]),t(g,{size:`small`,variant:`tonal`},{default:e(()=>[c(r(_(fmtTime)(v.value.startTime)),1)]),_:1}),t(g,{size:`small`,variant:`tonal`,color:`grey`},{default:e(()=>[c(r(j.value),1)]),_:1}),(n(!0),p(m,null,u(h.value.summary.flags,i=>(n(),b(g,{key:i,size:`small`,variant:`tonal`,color:_(R)[i].color,title:_(A)[i].help},{default:e(()=>[t(y,{start:``,size:`small`},{default:e(()=>[c(r(_(R)[i].icon),1)]),_:2},1024),c(` `+r(_(A)[i].label),1)]),_:2},1032,[`color`,`title`]))),128)),t(M),f(`code`,Xe,r(i.sessionId),1),t(N,{variant:`text`,size:`small`,"prepend-icon":_(O)===`session`?`mdi-check`:`mdi-clipboard-text-outline`,color:_(O)===`session`?`success`:void 0,onClick:s[0]||(s[0]=e=>_(k)(asText(),`session`))},{default:e(()=>[c(r(_(O)===`session`?`Copied`:`Copy as text`),1)]),_:1},8,[`prepend-icon`,`color`])]),h.value.responsesMissing?(n(),b(l,{key:0,type:`warning`,variant:`tonal`,density:`compact`,class:`mb-4`},{default:e(()=>[c(` The session records `+r(v.value.tally?.responses)+` responses but only `+r(w.value)+` card records carry its id. The timeline is incomplete. `,1)]),_:1})):x(``,!0),t(ee,{class:`mb-2`},{default:e(()=>[t(L,{cols:`12`,md:`6`},{default:e(()=>[t(I,{variant:`outlined`,class:`pa-3 h-100`},{default:e(()=>[s[4]||(s[4]=f(`div`,{class:`text-subtitle-2 mb-1`},`Learner state`,-1)),s[5]||(s[5]=f(`div`,{class:`text-caption text-medium-emphasis mb-3`},` What the navigator was choosing against, and what moved. `,-1)),h.value.summary.state.length?(n(),b(P,{key:0,density:`compact`,class:`sk-mini-table`},{default:e(()=>[s[3]||(s[3]=f(`thead`,null,[f(`tr`,null,[f(`th`),f(`th`,{class:`text-right`},`Start`),f(`th`,{class:`text-right`},`End`),f(`th`,{class:`text-right`},`Δ`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(h.value.summary.state,e=>(n(),p(`tr`,{key:e.label},[f(`td`,null,r(e.label),1),f(`td`,Ze,r(fmtNum(e.from)),1),f(`td`,Qe,r(fmtNum(e.to)),1),f(`td`,{class:o([`text-right`,_(deltaClass)(e.delta)])},r(_(fmtDelta)(e.delta)),3)]))),128))])]),_:1})):(n(),p(`div`,$e,`No state snapshot recorded.`))]),_:1})]),_:1}),t(L,{cols:`12`,md:`6`},{default:e(()=>[t(I,{variant:`outlined`,class:`pa-3 h-100`},{default:e(()=>[s[6]||(s[6]=f(`div`,{class:`text-subtitle-2 mb-1`},`Session hints`,-1)),s[7]||(s[7]=f(`div`,{class:`text-caption text-medium-emphasis mb-3`},` What outcome observers told the navigator. They act only through these. `,-1)),s[8]||(s[8]=f(`span`,{class:`text-caption font-weight-medium`},`at open`,-1)),f(`pre`,et,r(fmtHints(v.value.config?.initHints)),1),s[9]||(s[9]=f(`span`,{class:`text-caption font-weight-medium`},`at close`,-1)),f(`pre`,tt,r(fmtHints(v.value.finalHints)),1)]),_:1})]),_:1})]),_:1}),f(`div`,nt,[c(` batch limit `+r(v.value.config?.defaultBatchLimit??`?`)+` · `+r(v.value.config?.sourceCount??`?`)+` source(s) · opening queues supply `+r(v.value.initialQueues?.supplyQ??`?`)+` / failed `+r(v.value.initialQueues?.failedQ??`?`)+` `,1),v.value.tally?(n(),p(m,{key:0},[c(` · ended with `+r(v.value.tally.failedQRemaining)+` still in the failed queue`,1)],64)):x(``,!0),v.value.versions?(n(),p(m,{key:1},[c(` · framework `+r(v.value.versions.framework),1),v.value.versions.app?(n(),p(m,{key:0},[c(` · app `+r(v.value.versions.app),1)],64)):x(``,!0)],64)):x(``,!0)]),S.value.length?(n(),b(I,{key:1,variant:`outlined`,class:`pa-3 mb-4`},{default:e(()=>[s[11]||(s[11]=f(`div`,{class:`text-subtitle-2 mb-1`},`Served tags`,-1)),s[12]||(s[12]=f(`div`,{class:`text-caption text-medium-emphasis mb-2`},` What this sitting put in front of the learner, by content tag. A response with several tags counts toward each. `,-1)),t(P,{density:`compact`,class:`sk-mini-table`},{default:e(()=>[s[10]||(s[10]=f(`thead`,null,[f(`tr`,null,[f(`th`,null,`Tag`),f(`th`,{class:`text-right`},`Resp.`),f(`th`,{class:`text-right`},`Cards`),f(`th`,{class:`text-right`},`Accuracy`),f(`th`,{class:`text-right`},`Time`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(S.value,e=>(n(),p(`tr`,{key:e.tag},[f(`td`,null,[f(`code`,{class:o(_(isSkillTag)(i.interpreters,e.tag)?`text-primary`:``)},r(e.tag),3)]),f(`td`,rt,r(e.responses),1),f(`td`,it,r(e.cards),1),f(`td`,{class:o([`text-right`,_(accuracyClass)(e.accuracy)])},[e.accuracy===null?(n(),p(m,{key:0},[c(`—`)],64)):(n(),p(m,{key:1},[c(r(Math.round(e.accuracy*100))+`% `,1),f(`span`,at,`(`+r(e.correct)+`/`+r(e.correct+e.incorrect)+`)`,1)],64))],2),f(`td`,ot,r((e.totalTimeMs/1e3).toFixed(1))+`s`,1)]))),128))])]),_:1})]),_:1})):x(``,!0),C.value?(n(),b(I,{key:2,variant:`outlined`,class:`pa-3 mb-4`},{default:e(()=>[s[15]||(s[15]=f(`div`,{class:`text-subtitle-2 mb-1`},`ELO ledger`,-1)),s[16]||(s[16]=f(`div`,{class:`text-caption text-medium-emphasis mb-3`},` The per-response learner global-ELO exchanges that net to the session's ELO move. Wins above the learner's level pay little; losses below it cost a lot, so a high hit rate can still net negative. `,-1)),f(`div`,st,[f(`div`,null,[s[13]||(s[13]=f(`div`,{class:`text-caption text-medium-emphasis`},`net`,-1)),f(`div`,{class:o([`text-h6`,_(deltaClass)(C.value.net)])},r(_(fmtDelta)(C.value.net)),3)]),f(`div`,null,[f(`div`,ct,`gained · `+r(C.value.wins)+` win(s)`,1),f(`div`,lt,r(_(fmtDelta)(C.value.gained)),1)]),f(`div`,null,[f(`div`,ut,`lost · `+r(C.value.losses)+` loss(es)`,1),f(`div`,dt,r(_(fmtDelta)(C.value.lost)),1)]),f(`div`,null,[s[14]||(s[14]=f(`div`,{class:`text-caption text-medium-emphasis`},`exchanges`,-1)),f(`div`,ft,r(C.value.count),1),f(`div`,pt,`of `+r(w.value)+` response(s)`,1)])])]),_:1})):x(``,!0),f(`div`,mt,[s[17]||(s[17]=f(`h2`,{class:`text-h6`},`Timeline`,-1)),t(z,{modelValue:T.value,"onUpdate:modelValue":s[1]||(s[1]=e=>T.value=e),density:`compact`,color:`primary`,variant:`outlined`},{default:e(()=>[t(N,{value:`all`,size:`small`},{default:e(()=>[c(`All (`+r(h.value.timeline.length)+`)`,1)]),_:1}),t(N,{value:`response`,size:`small`},{default:e(()=>[c(`Responses (`+r(w.value)+`)`,1)]),_:1}),t(N,{value:`run`,size:`small`},{default:e(()=>[c(`Runs (`+r(h.value.timeline.length-w.value)+`)`,1)]),_:1})]),_:1},8,[`modelValue`])]),h.value.timeline.length===0?(n(),b(l,{key:3,type:`info`,variant:`tonal`},{default:e(()=>s[18]||(s[18]=[c(`Nothing recorded for this session.`)])),_:1})):(n(),p(`div`,ht,[(n(!0),p(m,null,u(E.value,(a,l)=>(n(),p(`div`,{key:l,class:o([`sk-tl-row`,rowClass(a)])},[f(`div`,gt,r(_(fmtClock)(a.at)),1),f(`div`,_t,[t(y,{size:`small`,color:entryColor(a)},{default:e(()=>[c(r(entryIcon(a)),1)]),_:2},1032,[`color`])]),a.kind===`run`?(n(),p(`div`,vt,[f(`div`,yt,[f(`span`,bt,r(a.run.label),1),a.run.mode?(n(),b(g,{key:0,size:`x-small`,variant:`tonal`},{default:e(()=>[c(r(a.run.mode),1)]),_:2},1024)):x(``,!0),f(`span`,xt,` generated `+r(a.run.generatedCount)+` → selected `+r(a.run.finalCount)+` (`+r(a.run.newSelected)+` new, `+r(a.run.reviewsSelected)+` review) `,1),a.run.generatedCount>0&&a.run.finalCount===0?(n(),p(`span`,St,` nothing survived `)):x(``,!0),typeof a.run.userElo==`number`?(n(),b(g,{key:2,size:`x-small`,variant:`tonal`,color:`grey`,class:`ml-2`},{default:e(()=>[c(` ELO `+r(Math.round(a.run.userElo)),1)]),_:2},1024)):x(``,!0),t(M),t(N,{icon:D.value.has(a.run.runId)?`mdi-chevron-up`:`mdi-chevron-down`,size:`x-small`,variant:`text`,onClick:e=>toggle(a.run.runId)},null,8,[`icon`,`onClick`]),t(N,{icon:_(O)===a.run.runId?`mdi-check`:`mdi-content-copy`,size:`x-small`,variant:`text`,color:_(O)===a.run.runId?`success`:void 0,title:`Copy run as text`,onClick:e=>_(k)(_(runText)(a.run),a.run.runId)},null,8,[`icon`,`color`,`onClick`])]),D.value.has(a.run.runId)?(n(),b(Je,{key:0,run:a.run,class:`mt-1`,onOpenCard:s[2]||(s[2]=e=>d(`open-card`,e))},null,8,[`run`])):x(``,!0)])):(n(),p(`div`,Ct,[f(`a`,{class:`sk-card-link`,title:`Open ${a.cardId} in card history`,onClick:e=>d(`open-card`,a.cardId)},[c(r(a.questionType??`card`)+` `,1),f(`code`,Tt,r(_(shortId)(a.cardId)),1)],8,wt),(n(!0),p(m,null,u(skillTags(a.tags),t=>(n(),b(g,{key:t,size:`x-small`,variant:`outlined`,color:`primary`,class:`ml-1`},{default:e(()=>[c(r(_(shortTag)(i.interpreters,t)),1)]),_:2},1024))),128)),f(`span`,Et,[c(r((a.timeSpentMs/1e3).toFixed(1))+`s `,1),a.priorAttempts?(n(),p(m,{key:0},[c(` · attempt `+r(a.priorAttempts+1),1)],64)):x(``,!0)]),a.userAnswer==null?x(``,!0):(n(),p(`span`,Dt,`“`+r(_(fmtAnswer)(a.userAnswer))+`”`,1)),a.elo?(n(),p(m,{key:1},[t(g,{size:`x-small`,variant:`tonal`,color:_(deltaColor)(a.elo.global.delta),class:`ml-2`,title:`learner global ELO ${a.elo.global.before} → ${a.elo.global.after} · userScore ${a.elo.userScore.toFixed(2)}`},{default:e(()=>[c(` ELO `+r(_(fmtDelta)(a.elo.global.delta)),1)]),_:2},1032,[`color`,`title`]),(n(!0),p(m,null,u(_(scoredTagDeltas)(a.elo),t=>(n(),b(g,{key:t.tag,size:`x-small`,variant:`text`,color:_(deltaColor)(t.delta),class:`sk-elo-tag`,title:`${t.tag}: ${t.before} → ${t.after} (score ${t.score?.toFixed(2)})`},{default:e(()=>[c(r(_(shortTag)(i.interpreters,t.tag))+` `+r(_(fmtDelta)(t.delta)),1)]),_:2},1032,[`color`,`title`]))),128))],64)):x(``,!0)]))],2))),128))]))],64)):(n(),b(l,{key:0,type:`info`,variant:`tonal`},{default:e(()=>[c(`No session with id `+r(i.sessionId)+`.`,1)]),_:1}))])}}}),[[`__scopeId`,`data-v-3cc6eb88`]]),kt={class:`text-h6`},At={class:`text-caption`},jt={class:`d-flex align-center flex-wrap mb-3 ga-3`},Mt=[`onClick`],Nt={class:`text-no-wrap`},Pt={class:`text-right`},Ft={class:`text-right`},It={key:1,class:`text-disabled`},Lt={class:`text-right`},Rt={class:`text-no-wrap text-caption`},zt={class:`text-no-wrap text-caption`},Bt={key:0},Vt={key:0,class:`text-disabled`},Ht={class:`text-right`},Ut=se(l({__name:`LearnerSessionList`,props:{dataset:{},interpreters:{}},emits:[`open`],setup(i,{emit:s}){let l=i,d=s,h=g(()=>summarizeSessions(l.dataset,l.interpreters)),v=y(`all`),S=g(()=>{let e=new Map;for(let t of h.value)for(let n of t.flags)e.set(n,(e.get(n)??0)+1);return[...e.entries()].map(([e,t])=>({flag:e,count:t})).sort((e,t)=>t.count-e.count)}),C=g(()=>!v.value||v.value===`all`?h.value:h.value.filter(e=>e.flags.includes(v.value))),w=g(()=>{let e=h.value,t=e.filter(e=>e.doc.status===`closed`).length,n=e.reduce((e,t)=>e+(t.doc.tally?.responses??0),0),r=e.reduce((e,t)=>e+(t.doc.tally?.correct??0),0),i=e.reduce((e,t)=>e+(t.durationSeconds??0),0);return[{label:`sessions`,value:e.length,color:`primary`},{label:`completed`,value:t,color:`success`},{label:`not completed`,value:e.length-t,color:`error`},{label:`responses`,value:n,color:`primary`},{label:`overall acc.`,value:n>0?`${Math.round(r/n*100)}%`:`—`,color:`primary`},{label:`time studied`,value:fmtDuration(i),color:`grey`}]});function deltas(e){let t=[];e.eloNet!==null&&t.push({label:`elo`,delta:Math.round(e.eloNet)});for(let n of l.interpreters?.progressMetrics??[]){let r=e.state.find(e=>e.label===n);r&&t.push({label:n,delta:r.delta})}return t}function clockText(e){let t=fmtDuration(e.doc.plannedSeconds);return e.durationSeconds===null?`— of ${t}`:`${fmtDuration(e.durationSeconds)} of ${t}`}return(i,s)=>{let l=a(`v-card`),g=a(`v-col`),y=a(`v-row`),T=a(`v-btn`),E=a(`v-icon`),D=a(`v-btn-toggle`),O=a(`v-alert`),k=a(`v-chip`),j=a(`v-table`);return n(),p(`div`,null,[s[4]||(s[4]=f(`p`,{class:`text-caption text-medium-emphasis mb-4`},[c(` One row per sitting. Flags name a specific way the session failed to do its job; open one to read its interleaved timeline of responses and pipeline runs. `),f(`strong`,null,`Δ`),c(` is movement across the session: ELO, then any progress metrics the course declares. `)],-1)),t(y,{dense:``,class:`mb-2`},{default:e(()=>[(n(!0),p(m,null,u(w.value,i=>(n(),b(g,{key:i.label,cols:`6`,sm:`4`,md:`2`},{default:e(()=>[t(l,{variant:`tonal`,color:i.color,class:`pa-2 text-center`},{default:e(()=>[f(`div`,kt,r(i.value),1),f(`div`,At,r(i.label),1)]),_:2},1032,[`color`])]),_:2},1024))),128))]),_:1}),f(`div`,jt,[t(D,{modelValue:v.value,"onUpdate:modelValue":s[0]||(s[0]=e=>v.value=e),density:`compact`,color:`primary`,variant:`outlined`},{default:e(()=>[t(T,{value:`all`,size:`small`},{default:e(()=>[c(`All (`+r(h.value.length)+`)`,1)]),_:1}),(n(!0),p(m,null,u(S.value,i=>(n(),b(T,{key:i.flag,value:i.flag,size:`small`,title:_(A)[i.flag].help},{default:e(()=>[t(E,{start:``,size:`small`,color:_(R)[i.flag].color},{default:e(()=>[c(r(_(R)[i.flag].icon),1)]),_:2},1032,[`color`]),c(` `+r(_(A)[i.flag].label)+` (`+r(i.count)+`) `,1)]),_:2},1032,[`value`,`title`]))),128))]),_:1},8,[`modelValue`])]),h.value.length===0?(n(),b(O,{key:0,type:`info`,variant:`tonal`},{default:e(()=>s[1]||(s[1]=[c(` No study sessions recorded. Session records began with a framework release; there is no backfill, so earlier activity shows only in card history. `)])),_:1})):(n(),b(j,{key:1,density:`compact`,class:`sk-admin-table`},{default:e(()=>[s[3]||(s[3]=f(`thead`,null,[f(`tr`,null,[f(`th`,null,`Started`),f(`th`,null,`Status`),f(`th`,{class:`text-right`},`Cards`),f(`th`,{class:`text-right`},`Acc.`),f(`th`,{class:`text-right`},`Runs`),f(`th`,null,`Clock`),f(`th`,null,`Δ`),f(`th`,null,`Flags`),f(`th`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(C.value,i=>(n(),p(`tr`,{key:i.doc.sessionId,class:`sk-admin-row`,onClick:e=>d(`open`,i.doc.sessionId)},[f(`td`,Nt,r(_(fmtTime)(i.doc.startTime)),1),f(`td`,null,[t(k,{size:`x-small`,variant:`flat`,color:_(statusColor)(i.doc.status)},{default:e(()=>[c(r(i.doc.status),1)]),_:2},1032,[`color`])]),f(`td`,Pt,r(i.doc.tally?.cardsPresented??`—`),1),f(`td`,Ft,[i.accuracy===null?(n(),p(`span`,It,`—`)):(n(),p(`span`,{key:0,class:o(_(accuracyClass)(i.accuracy))},r(Math.round(i.accuracy*100))+`% `,3))]),f(`td`,Lt,r(i.doc.runs?.length??0),1),f(`td`,Rt,r(clockText(i)),1),f(`td`,zt,[(n(!0),p(m,null,u(deltas(i),(e,t)=>(n(),p(m,{key:e.label},[t>0?(n(),p(`span`,Bt,` · `)):x(``,!0),f(`span`,{class:o(_(deltaClass)(e.delta))},r(_(fmtDelta)(e.delta))+`\xA0`+r(e.label),3)],64))),128)),deltas(i).length===0?(n(),p(`span`,Vt,`—`)):x(``,!0)]),f(`td`,null,[(n(!0),p(m,null,u(i.flags,t=>(n(),b(E,{key:t,size:`small`,class:`mr-1`,color:_(R)[t].color,title:`${_(A)[t].label}: ${_(A)[t].help}`},{default:e(()=>[c(r(_(R)[t].icon),1)]),_:2},1032,[`color`,`title`]))),128))]),f(`td`,Ht,[t(E,{size:`small`,class:`text-disabled`},{default:e(()=>s[2]||(s[2]=[c(`mdi-chevron-right`)])),_:1})])],8,Mt))),128))])]),_:1}))])}}}),[[`__scopeId`,`data-v-5c46cc58`]]),Wt=__name(function(e,t){return Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Wt(e,t)},`extendStatics`);function __extends$1(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Wt(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}__name(__extends$1,`__extends`);var Gt=function(){function Browser(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return Browser}(),H=new(function(){function Env(){this.browser=new Gt,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return Env}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(H.wxa=!0,H.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?H.worker=!0:!H.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(H.node=!0,H.svgSupported=!0):detect(navigator.userAgent,H);function detect(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Kt=`12px sans-serif`,qt=20,Jt=100,Yt=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function getTextWidthMap(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-qt)/Jt}return t}var Xt=getTextWidthMap(Yt),Zt={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Zt.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n=n||``,r=r||`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Xt[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},Qt=reduce([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),$t=reduce([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),en=Object.prototype.toString,tn=Array.prototype,nn=tn.forEach,rn=tn.filter,an=tn.slice,on=tn.map,sn=function(){}.constructor,cn=sn?sn.prototype:null,ln=`__proto__`,un=2311,dn=2**53-1;function guid(){return un>=dn&&(un=0),un++}function logError(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function clone$2(e){if(typeof e!=`object`||!e)return e;var t=e,n=en.call(e);if(n===`[object Array]`){if(!isPrimitive(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=clone$2(e[r])}}else if($t[n]){if(!isPrimitive(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Qt[n]&&!isPrimitive(e)&&!isDom(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==ln&&(t[o]=clone$2(e[o]));return t}__name(clone$2,`clone`);function merge(e,t,n){if(!isObject$2(t)||!isObject$2(e))return n?clone$2(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==ln){var i=e[r],a=t[r];isObject$2(a)&&isObject$2(i)&&!isArray(a)&&!isArray(i)&&!isDom(a)&&!isDom(i)&&!isBuiltInObject(a)&&!isBuiltInObject(i)&&!isPrimitive(a)&&!isPrimitive(i)?merge(i,a,n):(n||!(r in e))&&(e[r]=clone$2(t[r]))}return e}function extend(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==ln&&(e[n]=t[n]);return e}function assignProps(e,t,n){e=e||{};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function defaults(e,t,n){for(var r=keys(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Zt.createCanvas;function indexOf(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function inherits(e,t){var n=e.prototype;function F(){}for(var r in F.prototype=t.prototype,e.prototype=new F,n)n.hasOwnProperty(r)&&(e.prototype[r]=n[r]);e.prototype.constructor=e,e.superClass=t}function mixin(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else defaults(e,t,n)}function isArrayLike(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function each$4(e,t,n){if(e&&t)if(e.forEach&&e.forEach===nn)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}__name(each$4,`each`);function map$1(e,t,n){if(!e)return[];if(!t)return slice(e);if(e.map&&e.map===on)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}__name(map$1,`map`);function reduce(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function filter(e,t,n){if(!e)return[];if(!t)return slice(e);if(e.filter&&e.filter===rn)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function find(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function keys(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function bindPolyfill(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(an.call(arguments)))}}var U=cn&&isFunction(cn.bind)?cn.call.bind(cn.bind):bindPolyfill;function curry$1(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(an.call(arguments)))}}__name(curry$1,`curry`);function isArray(e){return Array.isArray?Array.isArray(e):en.call(e)===`[object Array]`}function isFunction(e){return typeof e==`function`}function isString(e){return typeof e==`string`}function isStringSafe(e){return en.call(e)===`[object String]`}function isNumber(e){return typeof e==`number`}function isObject$2(e){var t=typeof e;return t===`function`||!!e&&t===`object`}__name(isObject$2,`isObject`);function isBuiltInObject(e){return!!Qt[en.call(e)]}function isTypedArray(e){return!!$t[en.call(e)]}function isDom(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function isGradientObject(e){return e.colorStops!=null}function isImagePatternObject(e){return e.image!=null}function eqNaN(e){return e!==e}function retrieve(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function retrieve2(e,t){return e??t}function retrieve3(e,t,n){return e??t??n}function slice(e){var t=[...arguments].slice(1);return an.apply(e,t)}function normalizeCssArray$1(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}__name(normalizeCssArray$1,`normalizeCssArray`);function assert(e,t){if(!e)throw Error(t)}function trim(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var fn=`__ec_primitive__`;function setAsPrimitive(e){e[fn]=!0}function isPrimitive(e){return e[fn]}var pn=function(){function MapPolyfill(){this.data={}}return MapPolyfill.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},MapPolyfill.prototype.has=function(e){return this.data.hasOwnProperty(e)},MapPolyfill.prototype.get=function(e){return this.data[e]},MapPolyfill.prototype.set=function(e,t){return this.data[e]=t,this},MapPolyfill.prototype.keys=function(){return keys(this.data)},MapPolyfill.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},MapPolyfill}(),mn=typeof Map==`function`;function maybeNativeMap(){return mn?new Map:new pn}var hn=function(){function HashMap(e){var t=isArray(e);this.data=maybeNativeMap();var n=this;e instanceof HashMap?e.each(visit):e&&each$4(e,visit);function visit(e,r){t?n.set(e,r):n.set(r,e)}}return HashMap.prototype.hasKey=function(e){return this.data.has(e)},HashMap.prototype.get=function(e){return this.data.get(e)},HashMap.prototype.set=function(e,t){return this.data.set(e,t),t},HashMap.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},HashMap.prototype.keys=function(){var e=this.data.keys();return mn?Array.from(e):e},HashMap.prototype.removeKey=function(e){this.data.delete(e)},HashMap}();function createHashMap(e){return new hn(e)}function concatArray(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function createObject(e,t){var n;if(Object.create)n=Object.create(e);else{var StyleCtor=function(){};StyleCtor.prototype=e,n=new StyleCtor}return t&&extend(n,t),n}function disableUserSelect(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function hasOwn(e,t){return e.hasOwnProperty(t)}function noop(){}var gn=180/Math.PI,extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)};function __extends(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}function create$1(e,t){return e??(e=0),t??(t=0),[e,t]}__name(create$1,`create`);function clone$1(e){return[e[0],e[1]]}__name(clone$1,`clone`);function set$1(e,t,n){return e[0]=t,e[1]=n,e}__name(set$1,`set`);function add(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function sub(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function len(e){return Math.sqrt(lenSquare(e))}function lenSquare(e){return e[0]*e[0]+e[1]*e[1]}function scale$1(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}__name(scale$1,`scale`);function normalize(e,t){var n=len(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function distance(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var _n=distance;function distanceSquare(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var vn=distanceSquare;function applyTransform$1(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}__name(applyTransform$1,`applyTransform`);function min$1(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}__name(min$1,`min`);function max$1(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}__name(max$1,`max`);var yn=function(){function Param(e,t){this.target=e,this.topTarget=t&&t.topTarget}return Param}(),bn=function(){function Draggable(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return Draggable.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 yn(t,e),`dragstart`,e.event))},Draggable.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new yn(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new yn(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new yn(o,e),`dragenter`,e.event))}},Draggable.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new yn(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new yn(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},Draggable}(),xn=function(){function Eventful(e){e&&(this._$eventProcessor=e)}return Eventful.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},Eventful.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},Eventful.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},Eventful.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t);break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},Eventful.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1));break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},Eventful}(),Sn=Math.log(2);function determinant(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Sn);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*determinant(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function buildTransformer(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=determinant(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*determinant(n,7,o===0?1:0,1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var Cn=`___zrEVENTSAVED`,wn=[];function transformLocalCoord(e,t,n,r,i){return transformCoordWithViewport(wn,t,r,i,!0)&&transformCoordWithViewport(e,n,wn[0],wn[1])}function transformLocalCoordClear(e,t){e&&dealClear(e),t&&dealClear(t);function dealClear(e){var t=e[Cn];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Cn])}}function transformCoordWithViewport(e,t,n,r,i){if(t.getBoundingClientRect&&H.domSupported&&!isCanvasEl(t)){var a=t[Cn]||(t[Cn]={}),o=preparePointerTransformer(prepareCoordMarkers(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function prepareCoordMarkers(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){each$4(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function preparePointerTransformer(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?buildTransformer(s,o):buildTransformer(o,s))}function isCanvasEl(e){return e.nodeName.toUpperCase()===`CANVAS`}var Tn=/([&<>"'])/g,En={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function encodeHTML(e){return e==null?``:(e+``).replace(Tn,function(e,t){return En[t]})}var Dn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,On=[],kn=H.browser.firefox&&+H.browser.version.split(`.`)[0]<39;function clientToLocal(e,t,n,r){return n=n||{},r?calculateZrXY(e,t,n):kn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?calculateZrXY(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function calculateZrXY(e,t,n){if(H.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(isCanvasEl(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(transformCoordWithViewport(On,e,r,i)){n.zrX=On[0],n.zrY=On[1];return}}n.zrX=n.zrY=0}function getNativeEvent(e){return e||window.event}function normalizeEvent(e,t,n){if(t=getNativeEvent(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&clientToLocal(e,i,t,n)}else{clientToLocal(e,t,t,n);var a=getWheelDeltaMayPolyfill(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Dn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function getWheelDeltaMayPolyfill(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=r===0?Math.abs(n):Math.abs(r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function addEventListener(e,t,n,r){e.addEventListener(t,n,r)}function removeEventListener(e,t,n,r){e.removeEventListener(t,n,r)}var stop=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function isMiddleOrRightButtonOnMouseUpDown(e){return e.which===2||e.which===3}var An=function(){function GestureMgr(){this._track=[]}return GestureMgr.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},GestureMgr.prototype.clear=function(){return this._track.length=0,this},GestureMgr.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=clientToLocal(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},GestureMgr.prototype._recognize=function(e){for(var t in jn)if(jn.hasOwnProperty(t)){var n=jn[t](this._track,e);if(n)return n}},GestureMgr}();function dist(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function center(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var jn={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=dist(r)/dist(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=center(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function create(){return[1,0,0,1,0,0]}function identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function mul(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function translate(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function rotate(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function scale(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function invert(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var W=function(){function Point(e,t){this.x=e||0,this.y=t||0}return Point.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},Point.prototype.clone=function(){return new Point(this.x,this.y)},Point.prototype.set=function(e,t){return this.x=e,this.y=t,this},Point.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},Point.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Point.prototype.scale=function(e){this.x*=e,this.y*=e},Point.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},Point.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Point.prototype.dot=function(e){return this.x*e.x+this.y*e.y},Point.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Point.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Point.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},Point.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},Point.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},Point.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Point.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},Point.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},Point.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},Point.set=function(e,t,n){e.x=t,e.y=n},Point.copy=function(e,t){e.x=t.x,e.y=t.y},Point.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},Point.lenSquare=function(e){return e.x*e.x+e.y*e.y},Point.dot=function(e,t){return e.x*t.x+e.y*t.y},Point.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},Point.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},Point.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},Point.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},Point.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},Point}(),Mn=Math.min,Nn=Math.max,Pn=Math.abs,Fn=[`x`,`y`],In=[`width`,`height`],Ln=new W,Rn=new W,zn=new W,Bn=new W,Vn=createIntersectContext(),Hn=Vn.minTv,Un=Vn.maxTv,Wn=[0,0],G=function(){function BoundingRect(e,t,n,r){Gn(this,e,t,n,r)}return BoundingRect.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},BoundingRect.prototype.union=function(e){var t=Mn(e.x,this.x),n=Mn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Nn(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Nn(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},BoundingRect.prototype.applyTransform=function(e){BoundingRect.applyTransform(this,this,e)},BoundingRect.prototype.calculateTransform=function(e){return qn(create(),this,e)},BoundingRect.prototype.intersect=function(e,t,n){return BoundingRect.intersect(this,e,t,n)},BoundingRect.intersect=function(e,t,n,r){n&&W.set(n,0,0);var i=r&&r.outIntersectRect||null,a=r&&r.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!t)return!1;e instanceof BoundingRect||(e=Gn(Jn,e.x,e.y,e.width,e.height)),t instanceof BoundingRect||(t=Gn(Yn,t.x,t.y,t.width,t.height));var o=!!n;Vn.reset(r,o);var s=Vn.touchThreshold,c=e.x+s,l=e.x+e.width-s,u=e.y+s,d=e.y+e.height-s,f=t.x+s,p=t.x+t.width-s,m=t.y+s,h=t.y+t.height-s;if(c>l||u>d||f>p||m>h)return!1;var g=!(l<f||p<c||d<m||h<u);return(o||i)&&(Wn[0]=1/0,Wn[1]=0,intersectOneDim(c,l,f,p,0,o,i,a),intersectOneDim(u,d,m,h,1,o,i,a),o&&W.copy(n,g?Vn.useDir?Vn.dirMinTv:Hn:Un)),g},BoundingRect.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},BoundingRect.prototype.contain=function(e,t){return BoundingRect.contain(this,e,t)},BoundingRect.prototype.clone=function(){return new BoundingRect(this.x,this.y,this.width,this.height)},BoundingRect.prototype.copy=function(e){Kn(this,e)},BoundingRect.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},BoundingRect.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},BoundingRect.prototype.isZero=function(){return this.width===0||this.height===0},BoundingRect.create=function(e){return new BoundingRect(e?e.x:0,e?e.y:0,e?e.width:0,e?e.height:0)},BoundingRect.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},BoundingRect.applyTransform=function(e,t,n){if(!n){e!==t&&Kn(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Ln.x=zn.x=t.x,Ln.y=Bn.y=t.y,Rn.x=Bn.x=t.x+t.width,Rn.y=zn.y=t.y+t.height,Ln.transform(n),Bn.transform(n),Rn.transform(n),zn.transform(n),e.x=Mn(Ln.x,Rn.x,zn.x,Bn.x),e.y=Mn(Ln.y,Rn.y,zn.y,Bn.y);var s=Nn(Ln.x,Rn.x,zn.x,Bn.x),c=Nn(Ln.y,Rn.y,zn.y,Bn.y);e.width=s-e.x,e.height=c-e.y},BoundingRect.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=identity(e||[]),translate(e,e,set$1(Xn,-t.x,-t.y)),scale(e,e,set$1(Xn,r,i)),translate(e,e,set$1(Xn,n.x,n.y)),e},BoundingRect}();G.create;var Gn=G.set,Kn=G.copy,qn=G.calculateTransform;G.applyTransform,G.contain;var Jn=new G(0,0,0,0),Yn=new G(0,0,0,0),Xn=[];function intersectOneDim(e,t,n,r,i,a,o,s){var c=Pn(t-n),l=Pn(r-e),u=Mn(c,l),d=Fn[i],f=Fn[1-i],p=In[i];t<n||r<e?c<l?(a&&(Un[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Un[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=Nn(e,n),o[p]=Mn(t,r)-o[d]),a&&(u<Wn[0]||Vn.useDir)&&(Wn[0]=Mn(u,Wn[0]),(c<l||!Vn.bidirectional)&&(Hn[d]=c,Hn[f]=0,Vn.useDir&&Vn.calcDirMTV()),(c>=l||!Vn.bidirectional)&&(Hn[d]=-l,Hn[f]=0,Vn.useDir&&Vn.calcDirMTV())))}function createIntersectContext(){var e=0,t=new W,n=new W,r={minTv:new W,maxTv:new W,useDir:!1,dirMinTv:new W,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Nn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var i=r.minTv,a=r.dirMinTv,o=i.y*i.y+i.x*i.x,s=Math.sin(e),c=Math.cos(e),l=s*i.y+c*i.x;if(nearZero(l)){nearZero(i.x)&&nearZero(i.y)&&a.set(0,0);return}if(n.x=o*c/l,n.y=o*s/l,nearZero(n.x)&&nearZero(n.y)){a.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<a.len()&&a.copy(n)}};function nearZero(e){return Pn(e)<1e-10}return r}var Zn=`silent`;function makeEventPacket(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:stopEvent}}function stopEvent(){stop(this.event)}var Qn=function(e){__extends(EmptyProxy,e);function EmptyProxy(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return EmptyProxy.prototype.dispose=function(){},EmptyProxy.prototype.setCursor=function(){},EmptyProxy}(xn),$n=function(){function HoveredResult(e,t){this.x=e,this.y=t}return HoveredResult}(),er=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],tr=new G(0,0,0,0),nr=function(e){__extends(Handler,e);function Handler(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new $n(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r=r||new Qn,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new bn(o),o}return Handler.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(each$4(er,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},Handler.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=isOutsideBoundary(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new $n(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},Handler.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},Handler.prototype.resize=function(){this._hovered=new $n(0,0)},Handler.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},Handler.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},Handler.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},Handler.prototype.dispatchToElement=function(e,t,n){e=e||{};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=makeEventPacket(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},Handler.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new $n(e,t);if(setHoverTarget(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new G(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(tr.copy(u.getBoundingRect()),u.transform&&tr.applyTransform(u.transform),tr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(setHoverTarget(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},Handler.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new An);var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new $n;a.target=r.target,this.dispatchToElement(a,i,r.event)}},Handler}(xn);each$4([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){nr.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=isOutsideBoundary(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||_n(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function isHover(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?Zn:!0}return!1}function setHoverTarget(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=isHover(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Zn)){t.target=o;break}}}function isOutsideBoundary(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var rr=32,ir=7;function minRunLength(e){for(var t=0;e>=rr;)t|=e&1,e>>=1;return e+t}function makeAscendingRun(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;reverseRun(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function reverseRun(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function binaryInsertionSort(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function gallopLeft(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function gallopRight(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function TimSort(e,t){var n=ir,r,i,a=0,o=[];r=[],i=[];function pushRun(e,t){r[a]=e,i[a]=t,a+=1}function mergeRuns(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;mergeAt(e)}}function forceMergeRuns(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,mergeAt(e)}}function mergeAt(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=gallopRight(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=gallopLeft(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?mergeLow(o,s,c,l):mergeHigh(o,s,c,l)))}function mergeLow(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=gallopRight(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=gallopLeft(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=ir||m>=ir);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function mergeHigh(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-gallopRight(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-gallopLeft(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=ir||g>=ir);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns,forceMergeRuns,pushRun}}function sort(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var a=0;if(i<rr){a=makeAscendingRun(e,n,r,t),binaryInsertionSort(e,n,r,n+a,t);return}var o=TimSort(e,t),s=minRunLength(i);do{if(a=makeAscendingRun(e,n,r,t),a<s){var c=i;c>s&&(c=s),binaryInsertionSort(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var ar=!1;function logInvalidZError(){ar||(ar=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function shapeCompareFunc(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var or=function(){function Storage(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=shapeCompareFunc}return Storage.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},Storage.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},Storage.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,sort(n,shapeCompareFunc)},Storage.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||(o=e.__clipPaths=[]),i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(logInvalidZError(),p.z=0),isNaN(p.z2)&&(logInvalidZError(),p.z2=0),isNaN(p.zlevel)&&(logInvalidZError(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},Storage.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},Storage.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=indexOf(this._roots,e);r>=0&&this._roots.splice(r,1)},Storage.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},Storage.prototype.getRoots=function(){return this._roots},Storage.prototype.dispose=function(){this._displayList=null,this._roots=null},Storage}(),sr=H.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},cr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-cr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?cr.bounceIn(e*2)*.5:cr.bounceOut(e*2-1)*.5+.5}},lr=Math.pow,ur=Math.sqrt,dr=1e-8,fr=1e-4,pr=ur(3),mr=1/3,hr=create$1(),gr=create$1(),_r=create$1();function isAroundZero(e){return e>-dr&&e<dr}function isNotAroundZero$1(e){return e>dr||e<-dr}__name(isNotAroundZero$1,`isNotAroundZero`);function cubicAt(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function cubicDerivativeAt(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function cubicRootAt(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(isAroundZero(u)&&isAroundZero(d))if(isAroundZero(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(isAroundZero(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=ur(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-lr(-y,mr):lr(y,mr),b=b<0?-lr(-b,mr):lr(b,mr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*ur(u*u*u)),S=Math.acos(x)/3,C=ur(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+pr*Math.sin(S)))/(3*o),T=(-s+C*(w-pr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function cubicExtrema(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(isAroundZero(o)){if(isNotAroundZero$1(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(isAroundZero(u))i[0]=-a/(2*o);else if(u>0){var d=ur(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function cubicSubdivide(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function cubicProjectPoint(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;hr[0]=c,hr[1]=l;for(var v=0;v<1;v+=.05)gr[0]=cubicAt(e,n,i,o,v),gr[1]=cubicAt(t,r,a,s,v),g=vn(hr,gr),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<fr);y++)m=d-f,h=d+f,gr[0]=cubicAt(e,n,i,o,m),gr[1]=cubicAt(t,r,a,s,m),g=vn(gr,hr),m>=0&&g<p?(d=m,p=g):(_r[0]=cubicAt(e,n,i,o,h),_r[1]=cubicAt(t,r,a,s,h),_=vn(_r,hr),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=cubicAt(e,n,i,o,d),u[1]=cubicAt(t,r,a,s,d)),ur(p)}function cubicLength(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=cubicAt(e,n,i,o,m),g=cubicAt(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function quadraticAt(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function quadraticDerivativeAt(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function quadraticRootAt(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(isAroundZero(a)){if(isNotAroundZero$1(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(isAroundZero(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=ur(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function quadraticExtremum(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function quadraticSubdivide(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function quadraticProjectPoint(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;hr[0]=o,hr[1]=s;for(var f=0;f<1;f+=.05){gr[0]=quadraticAt(e,n,i,f),gr[1]=quadraticAt(t,r,a,f);var p=vn(hr,gr);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<fr);m++){var h=l-u,g=l+u;gr[0]=quadraticAt(e,n,i,h),gr[1]=quadraticAt(t,r,a,h);var p=vn(gr,hr);if(h>=0&&p<d)l=h,d=p;else{_r[0]=quadraticAt(e,n,i,g),_r[1]=quadraticAt(t,r,a,g);var _=vn(_r,hr);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=quadraticAt(e,n,i,l),c[1]=quadraticAt(t,r,a,l)),ur(d)}function quadraticLength(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=quadraticAt(e,n,i,f),m=quadraticAt(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var vr=/cubic-bezier\(([0-9,\.e ]+)\)/;function createCubicEasingFunc(e){var t=e&&vr.exec(e);if(t){var n=t[1].split(`,`),r=+trim(n[0]),i=+trim(n[1]),a=+trim(n[2]),o=+trim(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:cubicRootAt(0,r,a,1,e,s)&&cubicAt(0,i,o,1,s[0])}}}var yr=function(){function Clip(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||noop,this.ondestroy=e.ondestroy||noop,this.onrestart=e.onrestart||noop,e.easing&&this.setEasing(e.easing)}return Clip.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop)this._startTime=e-r%n,this._pausedTime=0,this.onrestart();else return!0;return!1},Clip.prototype.pause=function(){this._paused=!0},Clip.prototype.resume=function(){this._paused=!1},Clip.prototype.setEasing=function(e){this.easing=e,this.easingFunc=isFunction(e)?e:cr[e]||createCubicEasingFunc(e)},Clip}(),br=function(){function Entry(e){this.value=e}return Entry}(),xr=function(){function LinkedList(){this._len=0}return LinkedList.prototype.insert=function(e){var t=new br(e);return this.insertEntry(t),t},LinkedList.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++},LinkedList.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},LinkedList.prototype.len=function(){return this._len},LinkedList.prototype.clear=function(){this.head=this.tail=null,this._len=0},LinkedList}(),Sr=function(){function LRU(e){this._list=new xr,this._maxSize=10,this._map={},this._maxSize=e}return LRU.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new br(t),o.key=e,n.insertEntry(o),r[e]=o}return i},LRU.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},LRU.prototype.clear=function(){this._list.clear(),this._map={}},LRU.prototype.len=function(){return this._list.len()},LRU}(),Cr={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 clampCssByte(e){return e=Math.round(e),e<0?0:e>255?255:e}function clampCssAngle(e){return e=Math.round(e),e<0?0:e>360?360:e}function clampCssFloat(e){return e<0?0:e>1?1:e}function parseCssInt(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?clampCssByte(parseFloat(t)/100*255):clampCssByte(parseInt(t,10))}function parseCssFloat(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?clampCssFloat(parseFloat(t)/100):clampCssFloat(parseFloat(t))}function cssHueToRgb(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function lerpNumber(e,t,n){return e+(t-e)*n}function setRgba(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function copyRgba(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var wr=new Sr(20),Tr=null;function putToCache(e,t){Tr&©Rgba(Tr,t),Tr=wr.put(e,Tr||t.slice())}function parse(e,t){if(e){t=t||[];var n=wr.get(e);if(n)return copyRgba(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Cr)return copyRgba(t,Cr[r]),putToCache(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){setRgba(t,0,0,0,1);return}return setRgba(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),putToCache(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){setRgba(t,0,0,0,1);return}return setRgba(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),putToCache(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?setRgba(t,+l[0],+l[1],+l[2],1):setRgba(t,0,0,0,1);u=parseCssFloat(l.pop());case`rgb`:if(l.length>=3)return setRgba(t,parseCssInt(l[0]),parseCssInt(l[1]),parseCssInt(l[2]),l.length===3?u:parseCssFloat(l[3])),putToCache(e,t),t;setRgba(t,0,0,0,1);return;case`hsla`:if(l.length!==4){setRgba(t,0,0,0,1);return}return l[3]=parseCssFloat(l[3]),hsla2rgba(l,t),putToCache(e,t),t;case`hsl`:if(l.length!==3){setRgba(t,0,0,0,1);return}return hsla2rgba(l,t),putToCache(e,t),t;default:return}}setRgba(t,0,0,0,1)}}function hsla2rgba(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=parseCssFloat(e[1]),i=parseCssFloat(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t=t||[],setRgba(t,clampCssByte(cssHueToRgb(o,a,n+1/3)*255),clampCssByte(cssHueToRgb(o,a,n)*255),clampCssByte(cssHueToRgb(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function rgba2hsla(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function lift(e,t){var n=parse(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return stringify(n,n.length===4?`rgba`:`rgb`)}}function lerp(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=parse(t[i]),s=parse(t[a]),c=r-i,l=stringify([clampCssByte(lerpNumber(o[0],s[0],c)),clampCssByte(lerpNumber(o[1],s[1],c)),clampCssByte(lerpNumber(o[2],s[2],c)),clampCssFloat(lerpNumber(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function modifyHSL(e,t,n,r){var i=parse(e);if(e)return i=rgba2hsla(i),t!=null&&(i[0]=clampCssAngle(isFunction(t)?t(i[0]):t)),n!=null&&(i[1]=parseCssFloat(isFunction(n)?n(i[1]):n)),r!=null&&(i[2]=parseCssFloat(isFunction(r)?r(i[2]):r)),stringify(hsla2rgba(i),`rgba`)}function stringify(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function lum(e,t){var n=parse(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Er=new Sr(100);function liftColor(e){if(isString(e)){var t=Er.get(e);return t||(t=lift(e,-.1),Er.put(e,t)),t}else if(isGradientObject(e)){var n=extend({},e);return n.colorStops=map$1(e.colorStops,function(e){return{offset:e.offset,color:lift(e.color,-.1)}}),n}return e}function isLinearGradient(e){return e.type===`linear`}function isRadialGradient(e){return e.type===`radial`}(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var Dr=Array.prototype.slice;function interpolateNumber$1(e,t,n){return(t-e)*n+e}__name(interpolateNumber$1,`interpolateNumber`);function interpolate1DArray(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=interpolateNumber$1(t[a],n[a],r);return e}function interpolate2DArray(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=interpolateNumber$1(t[o][s],n[o][s],r)}return e}function add1DArray(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function add2DArray(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function fillColorStops(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function fillArray(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:Dr.call(i[s]));for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function cloneValue(e){if(isArrayLike(e)){var t=e.length;if(isArrayLike(e[0])){for(var n=[],r=0;r<t;r++)n.push(Dr.call(e[r]));return n}return Dr.call(e)}return e}function rgba2String(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function guessArrayDim(e){return isArrayLike(e&&e[0])?2:1}var Or=0,kr=1,Ar=2,jr=3,Mr=4,Nr=5,Pr=6;function isGradientValueType(e){return e===Mr||e===Nr}function isArrayValueType(e){return e===kr||e===Ar}var Fr=[0,0,0,0],Ir=function(){function Track(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return Track.prototype.isFinished=function(){return this._finished},Track.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},Track.prototype.needsAnimate=function(){return this.keyframes.length>=1},Track.prototype.getAdditiveTrack=function(){return this._additiveTrack},Track.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Pr,s=t;if(isArrayLike(t)){var c=guessArrayDim(t);o=c,(c===1&&!isNumber(t[0])||c===2&&!isNumber(t[0][0]))&&(a=!0)}else if(isNumber(t)&&!eqNaN(t))o=Or;else if(isString(t))if(!isNaN(+t))o=Or;else{var l=parse(t);l&&(s=l,o=jr)}else if(isGradientObject(t)){var u=extend({},s);u.colorStops=map$1(t.colorStops,function(e){return{offset:e.offset,color:parse(e.color)}}),isLinearGradient(t)?o=Mr:isRadialGradient(t)&&(o=Nr),s=u}i===0?this.valType=o:(o!==this.valType||o===Pr)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=isFunction(n)?n:cr[n]||createCubicEasingFunc(n)),r.push(d),d},Track.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=isArrayValueType(r),c=isGradientValueType(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?fillArray(d,f,r):c&&fillColorStops(d.colorStops,f.colorStops))}if(!o&&r!==Nr&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Or?n[l].additiveValue=n[l].value-p:r===jr?n[l].additiveValue=add1DArray([],n[l].value,p,-1):isArrayValueType(r)&&(n[l].additiveValue=r===kr?add1DArray([],n[l].value,p,-1):add2DArray([],n[l].value,p,-1))}},Track.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===jr,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Fr:e[s];if((isArrayValueType(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(isArrayValueType(i))i===kr?interpolate1DArray(g,f[r],p[r],h):interpolate2DArray(g,f[r],p[r],h);else if(isGradientValueType(i)){var _=f[r],v=p[r],y=i===Mr;e[s]={type:y?`linear`:`radial`,x:interpolateNumber$1(_.x,v.x,h),y:interpolateNumber$1(_.y,v.y,h),colorStops:map$1(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:interpolateNumber$1(e.offset,n.offset,h),color:rgba2String(interpolate1DArray([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=interpolateNumber$1(_.x2,v.x2,h),e[s].y2=interpolateNumber$1(_.y2,v.y2,h)):e[s].r=interpolateNumber$1(_.r,v.r,h)}else if(c)interpolate1DArray(g,f[r],p[r],h),n||(e[s]=rgba2String(g));else{var b=interpolateNumber$1(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},Track.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Or?e[n]=e[n]+r:t===jr?(parse(e[n],Fr),add1DArray(Fr,Fr,r,1),e[n]=rgba2String(Fr)):t===kr?add1DArray(e[n],e[n],r,1):t===Ar&&add2DArray(e[n],e[n],r,1)},Track}(),Lr=function(){function Animator(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){logError(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return Animator.prototype.getMaxTime=function(){return this._maxTime},Animator.prototype.getDelay=function(){return this._delay},Animator.prototype.getLoop=function(){return this._loop},Animator.prototype.getTarget=function(){return this._target},Animator.prototype.changeTarget=function(e){this._target=e},Animator.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,keys(t),n)},Animator.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Ir(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===jr&&c&&(c=rgba2String(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,cloneValue(c),r),this._trackKeys.push(o)}s.addKeyframe(e,cloneValue(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},Animator.prototype.pause=function(){this._clip.pause(),this._paused=!0},Animator.prototype.resume=function(){this._clip.resume(),this._paused=!1},Animator.prototype.isPaused=function(){return!!this._paused},Animator.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},Animator.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},Animator.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},Animator.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},Animator.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},Animator.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new yr({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},Animator.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},Animator.prototype.delay=function(e){return this._delay=e,this},Animator.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},Animator.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},Animator.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},Animator.prototype.getClip=function(){return this._clip},Animator.prototype.getTrack=function(e){return this._tracks[e]},Animator.prototype.getTracks=function(){var e=this;return map$1(this._trackKeys,function(t){return e._tracks[t]})},Animator.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},Animator.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=cloneValue(s.rawValue))}}}},Animator.prototype.__changeFinalValue=function(e,t){t=t||keys(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},Animator}();function getTime(){return new Date().getTime()}var Rr=function(e){__extends(Animation,e);function Animation(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return Animation.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},Animation.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},Animation.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},Animation.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},Animation.prototype.update=function(e){for(var t=getTime()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},Animation.prototype._startLoop=function(){var e=this;this._running=!0;function step(){e._running&&(sr(step),!e._paused&&e.update())}sr(step)},Animation.prototype.start=function(){this._running||(this._time=getTime(),this._pausedTime=0,this._startLoop())},Animation.prototype.stop=function(){this._running=!1},Animation.prototype.pause=function(){this._paused||(this._pauseStart=getTime(),this._paused=!0)},Animation.prototype.resume=function(){this._paused&&(this._pausedTime+=getTime()-this._pauseStart,this._paused=!1)},Animation.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},Animation.prototype.isFinished=function(){return this._head==null},Animation.prototype.animate=function(e,t){t=t||{},this.start();var n=new Lr(e,t.loop);return this.addAnimator(n),n},Animation}(xn),zr=300,Br=H.domSupported,Vr=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:map$1(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Hr={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ur=!1;function isPointerFromTouch(e){var t=e.pointerType;return t===`pen`||t===`touch`}function setTouchTimer(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function markTouch(e){e&&(e.zrByTouch=!0)}function normalizeGlobalEvent(e,t){return normalizeEvent(e.dom,new Wr(e,t),!0)}function isLocalEl(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Wr=function(){function FakeGlobalEvent(e,t){this.stopPropagation=noop,this.stopImmediatePropagation=noop,this.preventDefault=noop,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return FakeGlobalEvent}(),Gr={mousedown:function(e){e=normalizeEvent(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=normalizeEvent(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=normalizeEvent(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=normalizeEvent(this.dom,e);var t=e.toElement||e.relatedTarget;isLocalEl(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ur=!0,e=normalizeEvent(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ur||(e=normalizeEvent(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=normalizeEvent(this.dom,e),markTouch(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Gr.mousemove.call(this,e),Gr.mousedown.call(this,e)},touchmove:function(e){e=normalizeEvent(this.dom,e),markTouch(e),this.handler.processGesture(e,`change`),Gr.mousemove.call(this,e)},touchend:function(e){e=normalizeEvent(this.dom,e),markTouch(e),this.handler.processGesture(e,`end`),Gr.mouseup.call(this,e),new Date-+this.__lastTouchMoment<zr&&Gr.click.call(this,e)},pointerdown:function(e){Gr.mousedown.call(this,e)},pointermove:function(e){isPointerFromTouch(e)||Gr.mousemove.call(this,e)},pointerup:function(e){Gr.mouseup.call(this,e)},pointerout:function(e){isPointerFromTouch(e)||Gr.mouseout.call(this,e)}};each$4([`click`,`dblclick`,`contextmenu`],function(e){Gr[e]=function(t){t=normalizeEvent(this.dom,t),this.trigger(e,t)}});var Kr={pointermove:function(e){isPointerFromTouch(e)||Kr.mousemove.call(this,e)},pointerup:function(e){Kr.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function mountLocalDOMEventListeners(e,t){var n=t.domHandlers;H.pointerEventsSupported?each$4(Vr.pointer,function(r){mountSingleDOMEventListener(t,r,function(t){n[r].call(e,t)})}):(H.touchEventsSupported&&each$4(Vr.touch,function(r){mountSingleDOMEventListener(t,r,function(i){n[r].call(e,i),setTouchTimer(t)})}),each$4(Vr.mouse,function(r){mountSingleDOMEventListener(t,r,function(i){i=getNativeEvent(i),t.touching||n[r].call(e,i)})}))}function mountGlobalDOMEventListeners(e,t){H.pointerEventsSupported?each$4(Hr.pointer,mount):H.touchEventsSupported||each$4(Hr.mouse,mount);function mount(n){function nativeEventListener(r){r=getNativeEvent(r),isLocalEl(e,r.target)||(r=normalizeGlobalEvent(e,r),t.domHandlers[n].call(e,r))}mountSingleDOMEventListener(t,n,nativeEventListener,{capture:!0})}}function mountSingleDOMEventListener(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,addEventListener(e.domTarget,t,n,r)}function unmountDOMEventListeners(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&removeEventListener(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var qr=function(){function DOMHandlerScope(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return DOMHandlerScope}(),Jr=function(e){__extends(HandlerDomProxy,e);function HandlerDomProxy(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new qr(t,Gr),Br&&(r._globalHandlerScope=new qr(document,Kr)),mountLocalDOMEventListeners(r,r._localHandlerScope),r}return HandlerDomProxy.prototype.dispose=function(){unmountDOMEventListeners(this._localHandlerScope),Br&&unmountDOMEventListeners(this._globalHandlerScope)},HandlerDomProxy.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},HandlerDomProxy.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Br&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?mountGlobalDOMEventListeners(this,t):unmountDOMEventListeners(t)}},HandlerDomProxy}(xn),Yr=1;H.hasGlobalWindow&&(Yr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Xr=Yr,Zr=.4,Qr=`#333`,$r=`#ccc`,ei=`#eee`,ti=identity,ni=5e-5;function isNotAroundZero(e){return e>ni||e<-ni}var ri=[],ii=[],ai=create(),oi=Math.abs,si=function(){function Transformable(){}return Transformable.prototype.getLocalTransform=function(e){return ci(this,e)},Transformable.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},Transformable.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},Transformable.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},Transformable.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},Transformable.prototype.needLocalTransform=function(){return isNotAroundZero(this.rotation)||isNotAroundZero(this.x)||isNotAroundZero(this.y)||isNotAroundZero(this.scaleX-1)||isNotAroundZero(this.scaleY-1)||isNotAroundZero(this.skewX)||isNotAroundZero(this.skewY)},Transformable.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(ti(n),this.invTransform=null);return}n=n||create(),t?this.getLocalTransform(n):ti(n),e&&(t?mul(n,e,n):copy(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||create(),invert(this.invTransform,n)},Transformable.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ri);var n=ri[0]<0?-1:1,r=ri[1]<0?-1:1,i=((ri[0]-n)*t+n)/ri[0]||0,a=((ri[1]-r)*t+r)/ri[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},Transformable.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},Transformable.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},Transformable.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||create(),mul(ii,e.invTransform,t),t=ii);var n=this.originX,r=this.originY;(n||r)&&(ai[4]=n,ai[5]=r,mul(ii,t,ai),ii[4]-=n,ii[5]-=r,t=ii),this.setLocalTransform(t)}},Transformable.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)},Transformable.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&applyTransform$1(n,n,r),n},Transformable.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&applyTransform$1(n,n,r),n},Transformable.prototype.getLineScale=function(){var e=this.transform;return e&&oi(e[0]-1)>1e-10&&oi(e[3]-1)>1e-10?Math.sqrt(oi(e[0]*e[3]-e[2]*e[1])):1},Transformable.prototype.copyTransform=function(e){copyTransform(this,e)},Transformable.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&rotate(t,t,c),t[4]+=n+l,t[5]+=r+u,t},Transformable.initDefaultProps=(function(){var e=Transformable.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})(),Transformable}(),ci=si.getLocalTransform,li=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function copyTransform(e,t){return assignProps(e,t,li)}function ensureFontMeasureInfo(e){ui||(ui=new Sr(100)),e=e||`12px sans-serif`;var t=ui.get(e);return t||(t={font:e,strWidthCache:new Sr(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Zt.measureText(`国`,e).width,asciiCharWidth:Zt.measureText(`a`,e).width},ui.put(e,t)),t}var ui;function tryCreateASCIIWidthMap(e){if(!(di>=fi)){e=e||`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Zt.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?di=fi:i>2&&di++,t}}var di=0,fi=5;function measureCharWidth(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=tryCreateASCIIWidthMap(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function measureWidth(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Zt.measureText(t,e.font).width,n.put(t,r)),r}function innerGetBoundingRect(e,t,n,r){var i=measureWidth(ensureFontMeasureInfo(t),e),a=getLineHeight(t);return new G(adjustTextX(0,i,n),adjustTextY(0,a,r),i,a)}function getBoundingRect(e,t,n,r){var i=((e||``)+``).split(`
|
|
4
|
+
`);if(i.length===1)return innerGetBoundingRect(i[0],t,n,r);for(var a=new G(0,0,0,0),o=0;o<i.length;o++){var s=innerGetBoundingRect(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function adjustTextX(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function adjustTextY(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function getLineHeight(e){return ensureFontMeasureInfo(e).stWideCharWidth}function parsePercent$1(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}__name(parsePercent$1,`parsePercent`);function calculateTextPosition(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=parsePercent$1(r[0],n.width),l+=parsePercent$1(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e=e||{},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var pi=`__zr_normal__`,mi=li.concat([`ignore`]),hi=reduce(li,function(e,t){return e[t]=!0,e},{ignore:!1}),gi={},_i=new G(0,0,0,0),vi=[],yi=function(){function Element(e){this.id=guid(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return Element.prototype._init=function(e){this.attr(e)},Element.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},Element.prototype.beforeUpdate=function(){},Element.prototype.afterUpdate=function(){},Element.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},Element.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=_i,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(gi,n,d):calculateTextPosition(gi,n,d),i.x=gi.x,i.y=gi.y,a=gi.align,o=gi.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=parsePercent$1(f[0],d.width),m=parsePercent$1(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(u){var _=g.overflowRect=g.overflowRect||new G(0,0,0,0);i.getLocalTransform(vi),invert(vi,vi),G.copy(_,d),_.applyTransform(vi)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y=y||`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},Element.prototype.canBeInsideText=function(){return!0},Element.prototype.getInsideTextFill=function(){return`#fff`},Element.prototype.getInsideTextStroke=function(e){return`#000`},Element.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?$r:Qr},Element.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&parse(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,stringify(n,`rgba`)},Element.prototype.traverse=function(e,t){},Element.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||{},extend(this.extra,t)):this[e]=t},Element.prototype.hide=function(){this.ignore=!0,this.markRedraw()},Element.prototype.show=function(){this.ignore=!1,this.markRedraw()},Element.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(isObject$2(e))for(var n=keys(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},Element.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},Element.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,mi)},Element.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},Element.prototype.hasState=function(){return this.currentStates.length>0},Element.prototype.getState=function(e){return this.states[e]},Element.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},Element.prototype.clearStates=function(e){this.useState(pi,!1,e)},Element.prototype.useState=function(e,t,n,r){var i=e===pi;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(indexOf(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),!s&&!i){logError(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=shouldUseHoverLayer(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,canTransition(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},Element.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||(l=this.states[c]),l&&r.push(l)}var u=r[a-1],d=this._textContent,f=shouldUseHoverLayer(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,canTransition(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},Element.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},Element.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},Element.prototype.removeState=function(e){var t=indexOf(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},Element.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=indexOf(r,e),a=indexOf(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},Element.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},Element.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];extend(t,i),i.textConfig&&(n=n||{},extend(n,i.textConfig))}return n&&(t.textConfig=n),t},Element.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=extend({},r?this.textConfig:n.textConfig),extend(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<mi.length;l++){var u=mi[l],d=i&&hi[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},Element.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}},Element.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},Element.prototype.getClipPath=function(){return this._clipPath},Element.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},Element.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},Element.prototype.getTextContent=function(){return this._textContent},Element.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new si,this._attachComponent(e),this._textContent=e,this.markRedraw())},Element.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),extend(this.textConfig,e),this.markRedraw()},Element.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},Element.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},Element.prototype.getTextGuideLine=function(){return this._textGuide},Element.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},Element.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},Element.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},Element.prototype.dirty=function(){this.markRedraw()},Element.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},Element.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},Element.prototype.animate=function(e,t,n){var r=new Lr(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},Element.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=indexOf(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},Element.prototype.updateDuringAnimation=function(e){this.markRedraw()},Element.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},Element.prototype.animateTo=function(e,t,n){animateTo(this,e,t,n)},Element.prototype.animateFrom=function(e,t,n){animateTo(this,e,t,n,!0)},Element.prototype._transitionState=function(e,t,n,r){for(var i=animateTo(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},Element.prototype.getBoundingRect=function(){return null},Element.prototype.getPaintRect=function(){return null},Element.initDefaultProps=(function(){var e=Element.prototype;e.type=`element`,e.name=``,e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=!1,e.__inHover=0,e.__dirty=1;function createLegacyProperty(t,n,r,i){Object.defineProperty(e,t,{get:function(){if(!this[n]){var e=this[n]=[];enhanceArray(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,enhanceArray(this,e)}});function enhanceArray(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(createLegacyProperty(`position`,`_legacyPos`,`x`,`y`),createLegacyProperty(`scale`,`_legacyScale`,`scaleX`,`scaleY`),createLegacyProperty(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),Element}();mixin(yi,xn),mixin(yi,si);function animateTo(e,t,n,r,i){n=n||{};var a=[];animateToShallow(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,doneCb=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},abortedCb=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var u=0;u<a.length;u++){var d=a[u];doneCb&&d.done(doneCb),abortedCb&&d.aborted(abortedCb),n.force&&d.duration(n.duration),d.start(n.easing)}return a}function copyArrShallow(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function is2DArray(e){return isArrayLike(e[0])}function copyValue(e,t,n){if(isArrayLike(t[n]))if(isArrayLike(e[n])||(e[n]=[]),isTypedArray(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),copyArrShallow(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(is2DArray(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?copyArrShallow(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else copyArrShallow(a,i,o);a.length=i.length}else e[n]=t[n]}function isValueSame(e,t){return e===t||isArrayLike(e)&&isArrayLike(t)&&is1DArraySame(e,t)}function is1DArraySame(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function animateToShallow(e,t,n,r,i,a,o,s){for(var c=keys(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!isObject$2(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_]))if(isObject$2(v)&&!isArrayLike(v)&&!isGradientObject(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}animateToShallow(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_);else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=indexOf(m,x);m.splice(S,1)}}if(i.force||(h=filter(h,function(e){return!isValueSame(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=cloneValue(n[_]),copyValue(n,r,_)}}var x=new Lr(n,!1,!1,d?filter(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function shouldUseHoverLayer(e,t,n,r){return!(n&&n.hoverLayer||r)||isTextRelatedEl(e)||t&&isTextRelatedEl(t)?0:1}function isTextRelatedEl(e){return e.type===`text`||e.type===`tspan`}function canTransition(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var bi=function(e){__extends(Group,e);function Group(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return Group.prototype.childrenRef=function(){return this._children},Group.prototype.children=function(){return this._children.slice()},Group.prototype.childAt=function(e){return this._children[e]},Group.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},Group.prototype.childCount=function(){return this._children.length},Group.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},Group.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},Group.prototype.replace=function(e,t){var n=indexOf(this._children,e);return n>=0&&this.replaceAt(t,n),this},Group.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},Group.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},Group.prototype.remove=function(e){var t=this.__zr,n=this._children,r=indexOf(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},Group.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},Group.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},Group.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},Group.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},Group.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},Group.prototype.getBoundingRect=function(e){for(var t=new G(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(G.applyTransform(t,s,c),i=i||t.clone(),i.union(t)):(i=i||s.clone(),i.union(s))}}return i||t},Group}(yi);bi.prototype.type=`group`;var xi={},Si={};function delInstance(e){delete Si[e]}function isDarkMode(e){if(!e)return!1;if(typeof e==`string`)return lum(e,1)<Zr;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=lum(t[i].color,1);return n/=r,n<Zr}return!1}var Ci=function(){function ZRender(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new or,a=n.renderer||`canvas`;xi[a]||(a=keys(xi)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var o=new xi[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!H.node&&!H.worker&&!s?new Jr(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?H.touchEventsSupported:!!l,d=44,f;u&&(f=retrieve2(n.pointerSize,d)),this.handler=new nr(i,o,c,o.root,f),this.animation=new Rr({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return ZRender.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},ZRender.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},ZRender.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},ZRender.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=isDarkMode(e))},ZRender.prototype.getBackgroundColor=function(){return this._backgroundColor},ZRender.prototype.setDarkMode=function(e){this._darkMode=e},ZRender.prototype.isDarkMode=function(){return this._darkMode},ZRender.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},ZRender.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},ZRender.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},ZRender.prototype.flush=function(){this._disposed||this._flush(!0)},ZRender.prototype._flush=function(e){var t,n=getTime(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=getTime();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},ZRender.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},ZRender.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},ZRender.prototype.refreshHover=function(){this._needsRefreshHover=!0},ZRender.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},ZRender.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},ZRender.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},ZRender.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},ZRender.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},ZRender.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},ZRender.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},ZRender.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},ZRender.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},ZRender.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},ZRender.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof bi&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},ZRender.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,delInstance(this.id))},ZRender}();function init$1(e,t){var n=new Ci(guid(),e,t);return Si[n.id]=n,n}__name(init$1,`init`);function registerPainter(e,t){xi[e]=t}var wi=1e-4,Ti=20;function _trim(e){return e.replace(/^\s+|\s+$/g,``)}var Ei=Math.min,K=Math.max,Di=Math.abs,Oi=Math.round,ki=Math.floor,Ai=Math.ceil,ji=Math.pow,Mi=Math.log,Ni=Math.LN10,Pi=Math.PI,Fi=Math.random;function linearMap(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Ii=parsePositionOption;function parsePositionOption(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return parsePositionSizeOption(e,t,n)}function parsePositionSizeOption(e,t,n){return isString(e)?isOptionStringPercent(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function isOptionStringPercent(e){return!!_trim(e).match(/%$/)}function round$1(e,t,n){return isNaN(t)?n?``+e:+e:(t=Ei(K(0,t),Ti),e=(+e).toFixed(t),n?e:+e)}__name(round$1,`round`);function asc(e){return e.sort(function(e,t){return e-t}),e}function getPrecision(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Oi(e*t)/t===e)return n}return getPrecisionSafe(e)}function getPrecisionSafe(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return K(0,(a<0?0:i-1-a)-r)}function getAcceptableTickPrecision(e,t,n){var r=Di(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=Mi(2*Di(n||1)*Di(r))/Ni,a=Mi(Di(t))/Ni,o=K(0,Ai(-i+a));return isFinite(o)||(o=NaN),o}function addSafe(e,t){var n=K(getPrecision(e),getPrecision(t)),r=e+t;return n>Ti?r:round$1(r,n)}var Li=ji(2,53)-1;function remRadian(e){var t=Pi*2;return(e%t+t)%t}function isRadianAroundZero(e){return e>-wi&&e<wi}var Ri=/^(?:(\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 parseDate(e){if(e instanceof Date)return e;if(isString(e)){var t=Ri.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Oi(e))}function quantity(e){return ji(10,quantityExponent(e))}function quantityExponent(e){if(e===0)return 0;var t=ki(Mi(e)/Ni);return e/ji(10,t)>=10&&t++,t}function nice(e,t){var n=quantityExponent(e),r=ji(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,round$1(e,-n)}function numericToNumber(e){var t=parseFloat(e);return t==e&&(t!==0||!isString(e)||e.indexOf(`x`)<=0)?t:NaN}function isNumeric(e){return!isNaN(numericToNumber(e))}function getRandomIdBase(){return Oi(Fi()*9)}function getGreatestCommonDividor(e,t){return t===0?e:getGreatestCommonDividor(t,e%t)}function getLeastCommonMultiple(e,t){return e==null?t:t==null?e:e*t/getGreatestCommonDividor(e,t)}function isNullableNumberFinite(e){return e!=null&&isFinite(e)}var zi=`[ECharts] `,Bi={},Vi=typeof console<`u`&&console.warn&&console.log;function outputLog(e,t,n){if(Vi){if(n){if(Bi[t])return;Bi[t]=!0}console[e](zi+t)}}function error(e,t){outputLog(`error`,e,t)}function throwError(e){throw Error(e)}function interpolateNumber(e,t,n){return(t-e)*n+e}var Hi=`series\0`,Ui=`\0_ec_\0`;function normalizeToArray(e){return e instanceof Array?e:e==null?[]:[e]}function defaultEmphasis(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var Wi=`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`.split(`.`);function getDataItemValue(e){return isObject$2(e)&&!isArray(e)&&!(e instanceof Date)?e.value:e}function isDataItemOption(e){return isObject$2(e)&&!(e instanceof Array)}function mappingToExists(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e=e||[],t=(t||[]).slice();var o=createHashMap();each$4(t,function(e,n){if(!isObject$2(e)){t[n]=null;return}});var s=prepareResult(e,o,n);return(r||i)&&mappingById(s,e,o,t),r&&mappingByName(s,t),r||i?mappingByIndex(s,t,i):a&&mappingInReplaceAllMode(s,t),makeIdAndName(s),s}function prepareResult(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||isComponentIdInternal(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function mappingById(e,t,n,r){each$4(r,function(i,a){if(!(!i||i.id==null)){var o=makeComparableKey(i.id),s=n.get(o);if(s!=null){var c=e[s];assert(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function mappingByName(e,t){each$4(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!isComponentIdInternal(n)&&!isComponentIdInternal(a)&&keyExistAndEqual(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function mappingByIndex(e,t,n){each$4(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||isComponentIdInternal(r.existing)||r.existing&&t.id!=null&&!keyExistAndEqual(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function mappingInReplaceAllMode(e,t){each$4(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function makeIdAndName(e){var t=createHashMap();each$4(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),each$4(e,function(e){var n=e.newOption;assert(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),each$4(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(isObject$2(i)){if(a.name=i.name==null?r?r.name:Hi+n:makeComparableKey(i.name),r)a.id=makeComparableKey(r.id);else if(i.id!=null)a.id=makeComparableKey(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+ o++;while(t.get(a.id))}t.set(a.id,e)}})}function keyExistAndEqual(e,t,n){var r=convertOptionIdName(t[e],null),i=convertOptionIdName(n[e],null);return r!=null&&i!=null&&r===i}function makeComparableKey(e){return convertOptionIdName(e,``)}function convertOptionIdName(e,t){return e==null?t:isString(e)?e:isNumber(e)||isStringSafe(e)?e+``:t}function isNameSpecified(e){var t=e.name;return!!(t&&t.indexOf(Hi))}function isComponentIdInternal(e){return e&&e.id!=null&&makeComparableKey(e.id).indexOf(Ui)===0}function setComponentTypeToKeyInfo(e,t,n){each$4(e,function(e){var r=e.newOption;isObject$2(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=determineSubType(t,r,e.existing,n))})}function determineSubType(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function queryDataIndex(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return isArray(t.dataIndex)?map$1(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return isArray(t.name)?map$1(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function makeInner(){var e=`__ec_inner_`+ Gi++;return function(t){return t[e]||(t[e]={})}}var Gi=getRandomIdBase();function parseFinder(e,t,n){var r=preParseFinder(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=queryReferringComponents(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function preParseFinder(e,t){var n;if(isString(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=createHashMap(),a={},o=!1;return each$4(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&indexOf(t.includeMainTypes,s)<0)){o=o||!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Ki={useDefault:!0,enableAll:!1,enableNone:!1},qi={useDefault:!1,enableAll:!0,enableNone:!0};function queryReferringComponents(e,t,n,r){r=r||Ki;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function makeQueryConditionKindA(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function setAttribute(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function getAttribute(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function getTooltipRenderMode(e){return e===`auto`?H.domSupported?`html`:`richText`:e||`html`}function interpolateRawValues(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(isNumber(r)){var o=interpolateNumber(n||0,r,i);return round$1(o,a?Math.max(getPrecision(n||0),getPrecision(r)):t)}else if(isString(r))return i<1?n:r;else{for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=interpolateNumber(p,m,i);s[d]=round$1(o,a?Math.max(getPrecision(p),getPrecision(m)):t)}}return s}}(function(){function ListIterator(){}return ListIterator.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r=r||1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},ListIterator.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._step,!0):!1},ListIterator})();function initExtentForUnion(){return[1/0,-1/0]}function unionExtentFromNumber(e,t){isValidNumberForExtent(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function unionExtentStartFromNumber(e,t){isValidNumberForExtent(t)&&t<e[0]&&(e[0]=t)}function unionExtentEndFromNumber(e,t){isValidNumberForExtent(t)&&t>e[1]&&(e[1]=t)}function unionExtentFromExtent(e,t){isValidBoundsForExtent(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function isValidNumberForExtent(e){return e!=null&&isFinite(e)}function isValidBoundsForExtent(e,t){return isValidNumberForExtent(e)&&isValidNumberForExtent(t)&&e<=t}function extentHasValue(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function ensureExtentAscSimply(e){isValidBoundsForExtent(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function makeCallOnlyOnce(){var e=`__ec_once_`+ Ji++;return function(t,n){hasOwn(t,e)||(t[e]=1,n())}}var Ji=getRandomIdBase();function removeDuplicates(e,t,n){var r=createHashMap(),i=0;each$4(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function removeDuplicatesGetKeyFromValueProp(e){return e.value+``}function removeDuplicatesGetKeyFromItemItself(e){return e+``}function getIncrementalId(e,t){return retrieve2(t,!0)?e.seriesIndex+2:0}function preparePipelineContext(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function createSimpleOverallStageHandler2(e){return{overallReset:e}}var Yi=`.`,Xi=`___EC__COMPONENT__CONTAINER___`,Zi=`___EC__EXTENDED_CLASS___`;function parseClassType(e){var t={main:``,sub:``};if(e){var n=e.split(Yi);t.main=n[0]||``,t.sub=n[1]||``}return t}function checkClassType(e){assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function isExtendedClass(e){return!!(e&&e[Zi])}function enableClassExtend(e,t){e.$constructor=e,e.extend=function(e){var t=this,ExtendedClass;return isESClass(t)?ExtendedClass=function(e){__extends$1(class_1,e);function class_1(){return e.apply(this,arguments)||this}return class_1}(t):(ExtendedClass=function(){(e.$constructor||t).apply(this,arguments)},inherits(ExtendedClass,this)),extend(ExtendedClass.prototype,e),ExtendedClass[Zi]=!0,ExtendedClass.extend=this.extend,ExtendedClass.superCall=superCall,ExtendedClass.superApply=superApply,ExtendedClass.superClass=t,ExtendedClass}}function isESClass(e){return isFunction(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function mountExtend(e,t){e.extend=t.extend}var Qi=Math.round(Math.random()*10);function enableClassCheck(e){var t=[`__\0is_clz`,Qi++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function superCall(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function superApply(e,t,n){return this.superClass.prototype[t].apply(e,n)}function enableClassManagement(e){var t={};e.registerClass=function(e){var n=e.type||e.prototype.type;if(n){checkClassType(n),e.prototype.type=n;var r=parseClassType(n);if(!r.sub)t[r.main]=e;else if(r.sub!==Xi){var i=makeContainer(r);i[r.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Xi]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=parseClassType(e),r=[],i=t[n.main];return i&&i[Xi]?each$4(i,function(e,t){t!==Xi&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[parseClassType(e).main]},e.getAllClassMainTypes=function(){var e=[];return each$4(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[parseClassType(e).main];return n&&n[Xi]};function makeContainer(e){var n=t[e.main];return(!n||!n[Xi])&&(n=t[e.main]={},n[Xi]=!0),n}}function makeStyleMapper(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&indexOf(r,s)>=0||i&&indexOf(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var $i=makeStyleMapper([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),ea=function(){function AreaStyleMixin(){}return AreaStyleMixin.prototype.getAreaStyle=function(e,t){return $i(this,e,t)},AreaStyleMixin}(),ta=new Sr(50);function findExistImage(e){if(typeof e==`string`){var t=ta.get(e);return t&&t.image}else return e}function createOrUpdateImage(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=ta.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!isImageReady(t)&&a.pending.push(o)):(t=Zt.loadImage(e,imageOnLoad,imageOnLoad),t.__zrImageSrc=e,ta.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function imageOnLoad(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function isImageReady(e){return e&&e.width&&e.height}var na=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function truncateText2(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
5
|
+
`);a=prepareTruncateOptions(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)truncateSingleLine(c,o[l],a),o[l]=c.textLine,s=s||c.isTruncated;e.text=o.join(`
|
|
6
|
+
`),e.isTruncated=s}function prepareTruncateOptions(e,t,n,r){r=r||{};var i=extend({},r);n=retrieve2(n,`...`),i.maxIterations=retrieve2(r.maxIterations,2);var a=i.minChar=retrieve2(r.minChar,0),o=i.fontMeasureInfo=ensureFontMeasureInfo(t),s=o.asciiCharWidth;i.placeholder=retrieve2(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=measureWidth(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function truncateSingleLine(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=measureWidth(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?estimateLength(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=measureWidth(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function estimateLength(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=measureCharWidth(n,e.charCodeAt(i));return i}function parsePlainText(e,t,n,r){var i=formatText(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=getLineHeight(l),f=retrieve2(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?wrapText(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
7
|
+
`):[],v=_.length*f;if(g??(g=v),v>g&&p){var y=Math.floor(g/f);m=m||_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=prepareTruncateOptions(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)truncateSingleLine(x,_[S],b),_[S]=x.textLine,m=m||x.isTruncated;for(var C=g,w=0,T=ensureFontMeasureInfo(l),S=0;S<_.length;S++)w=Math.max(measureWidth(T,_[S]),w);h??(h=w);var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var ra=function(){function RichTextToken(){}return RichTextToken}(),ia=function(){function RichTextLine(e){this.tokens=[],e&&(this.tokens=e)}return RichTextLine}(),aa=function(){function RichTextContentBlock(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return RichTextContentBlock}();function parseRichText(e,t,n,r,i){var a=new aa,o=formatText(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=na.lastIndex=0,h;(h=na.exec(o))!=null;){var g=h.index;g>m&&pushTokens(a,o.substring(m,g),t,p),pushTokens(a,h[2],t,p,h[1]),m=na.lastIndex}m<o.length&&pushTokens(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function finishLine(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var C=0;C<a.lines.length;C++){for(var w=a.lines[C],T=0,E=0,D=0;D<w.tokens.length;D++){var O=w.tokens[D],k=O.styleName&&t.rich[O.styleName]||{},A=O.textPadding=k.padding,j=A?A[1]+A[3]:0,M=O.font=k.font||t.font;O.contentHeight=getLineHeight(M);var N=retrieve2(k.height,O.contentHeight);if(O.innerHeight=N,A&&(N+=A[0]+A[2]),O.height=N,O.lineHeight=retrieve3(k.lineHeight,t.lineHeight,N),O.align=k&&k.align||i,O.verticalAlign=k&&k.verticalAlign||`middle`,x&&d!=null&&v+O.lineHeight>d){var P=a.lines.length;D>0?(w.tokens=w.tokens.slice(0,D),finishLine(w,E,T),a.lines=a.lines.slice(0,C+1)):a.lines=a.lines.slice(0,C),a.isTruncated=a.isTruncated||a.lines.length<P;break outer}var I=k.width,L=I==null||I===`auto`;if(typeof I==`string`&&I.charAt(I.length-1)===`%`)O.percentWidth=I,_.push(O),O.contentWidth=measureWidth(ensureFontMeasureInfo(M),O.text);else{if(L){var R=k.backgroundColor,ee=R&&R.image;ee&&(ee=findExistImage(ee),isImageReady(ee)&&(O.width=Math.max(O.width,ee.width*N/ee.height)))}var z=b&&u!=null?u-E:null;z!=null&&z<O.width?!L||z<j?(O.text=``,O.width=O.contentWidth=0):(truncateText2(S,O.text,z-j,M,t.ellipsis,{minChar:t.truncateMinChar}),O.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,O.width=O.contentWidth=measureWidth(ensureFontMeasureInfo(M),O.text)):O.contentWidth=measureWidth(ensureFontMeasureInfo(M),O.text)}O.width+=j,E+=O.width,k&&(T=Math.max(T,O.lineHeight))}finishLine(w,E,T)}a.outerWidth=a.width=retrieve2(u,y),a.outerHeight=a.height=retrieve2(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var C=0;C<_.length;C++){var O=_[C],te=O.percentWidth;O.width=parseInt(te,10)/100*a.width}return a}function pushTokens(e,t,n,r,i){var a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){var f=o.padding,p=f?f[1]+f[3]:0;if(o.width!=null&&o.width!==`auto`){var m=parsePercent$1(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
8
|
+
`),l=!0),r.accumWidth=m}else{var h=wrapText(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||(u=t.split(`
|
|
9
|
+
`));for(var g=ensureFontMeasureInfo(c),_=0;_<u.length;_++){var v=u[_],y=new ra;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,typeof o.width==`number`?y.width=o.width:y.width=d?d[_]:measureWidth(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new ia)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new ia([y]))}}function isAlphabeticLetter(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var oa=reduce(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function isWordBreakChar(e){return isAlphabeticLetter(e)?!!oa[e]:!0}function wrapText(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=ensureFontMeasureInfo(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
|
|
10
|
+
`){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}var m=measureCharWidth(d,p.charCodeAt(0)),h=r?!1:!isWordBreakChar(p);if(a.length?u+m>n:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function calcInnerTextOverflowArea(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;G.set(sa,adjustTextX(n,o,i),adjustTextY(r,s,a),o,s),G.intersect(t,sa,null,ca);var c=ca.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=adjustTextX(c.x,c.width,i,!0),e.baseY=adjustTextY(c.y,c.height,a,!0)}}var sa=new G(0,0,0,0),ca={outIntersectRect:{},clamp:!0};function formatText(e){return e==null?e=``:e+=``}function tSpanCreateBoundingRect(e){var t=formatText(e.text),n=e.font;return tSpanCreateBoundingRect2(e,measureWidth(ensureFontMeasureInfo(n),t),getLineHeight(n),null)}function tSpanCreateBoundingRect2(e,t,n,r){var i=new G(adjustTextX(e.x||0,t,e.textAlign),adjustTextY(e.y||0,n,e.textBaseline),t,n),a=r??(tSpanHasStroke(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function tSpanHasStroke(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var la=`__zr_style_`+Math.round(Math.random()*10),ua={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},da={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ua[la]=!0;var fa=[`z`,`z2`,`invisible`],pa=[`invisible`],ma=function(e){__extends(Displayable,e);function Displayable(t){return e.call(this,t)||this}return Displayable.prototype._init=function(t){for(var n=keys(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},Displayable.prototype.beforeBrush=function(e){},Displayable.prototype.afterBrush=function(){},Displayable.prototype.innerBeforeBrush=function(){},Displayable.prototype.innerAfterBrush=function(){},Displayable.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&isDisplayableCulled(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},Displayable.prototype.contain=function(e,t){return this.rectContain(e,t)},Displayable.prototype.traverse=function(e,t){e.call(t,this)},Displayable.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},Displayable.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new G(0,0,0,0)),t?G.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=i*2+Math.abs(a),e.height+=i*2+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+s*2),e.height=Math.ceil(e.height+1+s*2))}return e},Displayable.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new G(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},Displayable.prototype.getPrevPaintRect=function(){return this._prevPaintRect},Displayable.prototype.animateStyle=function(e){return this.animate(`style`,e)},Displayable.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},Displayable.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},Displayable.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:extend(this.style,e),this.dirtyStyle(),this},Displayable.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},Displayable.prototype.dirty=function(){this.dirtyStyle()},Displayable.prototype.styleChanged=function(){return!!(this.__dirty&2)},Displayable.prototype.styleUpdated=function(){this.__dirty&=-3},Displayable.prototype.createStyle=function(e){return createObject(ua,e)},Displayable.prototype.useStyle=function(e){e[la]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},Displayable.prototype._useHoverStyle=function(e){this.__hoverStyle=e},Displayable.prototype.isStyleObject=function(e){return e[la]},Displayable.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,fa)},Displayable.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l)if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=keys(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=keys(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l);if(!c)for(var h=this.__inHover?pa:fa,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},Displayable.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r=r||{},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},Displayable.prototype._mergeStyle=function(e,t){return extend(e,t),e},Displayable.prototype.getAnimationStyleProps=function(){return da},Displayable.initDefaultProps=(function(){var e=Displayable.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),Displayable}(yi),ha=new G(0,0,0,0),ga=new G(0,0,0,0);function isDisplayableCulled(e,t,n){return ha.copy(e.getBoundingRect()),e.transform&&ha.applyTransform(e.transform),ga.width=t,ga.height=n,!ha.intersect(ga)}var _a=Math.min,va=Math.max,ya=Math.sin,ba=Math.cos,xa=Math.PI*2,Sa=create$1(),Ca=create$1(),wa=create$1();function fromLine(e,t,n,r,i,a){i[0]=_a(e,n),i[1]=_a(t,r),a[0]=va(e,n),a[1]=va(t,r)}var Ta=[],Ea=[];function fromCubic(e,t,n,r,i,a,o,s,c,l){var u=cubicExtrema,d=cubicAt,f=u(e,n,i,o,Ta);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var p=0;p<f;p++){var m=d(e,n,i,o,Ta[p]);c[0]=_a(m,c[0]),l[0]=va(m,l[0])}f=u(t,r,a,s,Ea);for(var p=0;p<f;p++){var h=d(t,r,a,s,Ea[p]);c[1]=_a(h,c[1]),l[1]=va(h,l[1])}c[0]=_a(e,c[0]),l[0]=va(e,l[0]),c[0]=_a(o,c[0]),l[0]=va(o,l[0]),c[1]=_a(t,c[1]),l[1]=va(t,l[1]),c[1]=_a(s,c[1]),l[1]=va(s,l[1])}function fromQuadratic(e,t,n,r,i,a,o,s){var c=quadraticExtremum,l=quadraticAt,u=va(_a(c(e,n,i),1),0),d=va(_a(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=_a(e,i,f),o[1]=_a(t,a,p),s[0]=va(e,i,f),s[1]=va(t,a,p)}function fromArc(e,t,n,r,i,a,o,s,c){var l=min$1,u=max$1,d=Math.abs(i-a);if(d%xa<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Sa[0]=ba(i)*n+e,Sa[1]=ya(i)*r+t,Ca[0]=ba(a)*n+e,Ca[1]=ya(a)*r+t,l(s,Sa,Ca),u(c,Sa,Ca),i%=xa,i<0&&(i+=xa),a%=xa,a<0&&(a+=xa),i>a&&!o?a+=xa:i<a&&o&&(i+=xa),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(wa[0]=ba(p)*n+e,wa[1]=ya(p)*r+t,l(s,wa,s),u(c,wa,c))}var q={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Da=[],Oa=[],ka=[],Aa=[],ja=[],Ma=[],Na=Math.min,Pa=Math.max,Fa=Math.cos,Ia=Math.sin,La=Math.abs,Ra=Math.PI,za=Ra*2,Ba=typeof Float32Array<`u`,Va=[];function modPI2(e){return Math.round(e/Ra*1e8)/1e8%2*Ra}function normalizeArcAngles(e,t){var n=modPI2(e[0]);n<0&&(n+=za);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=za?i=n+za:t&&n-i>=za?i=n-za:!t&&n>i?i=n+(za-modPI2(n-i)):t&&n<i&&(i=n-(za-modPI2(i-n))),e[0]=n,e[1]=i}var Ha=function(){function PathProxy(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 PathProxy.prototype.increaseVersion=function(){this._version++},PathProxy.prototype.getVersion=function(){return this._version},PathProxy.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=La(n/Xr/e)||0,this._uy=La(n/Xr/t)||0)},PathProxy.prototype.setDPR=function(e){this.dpr=e},PathProxy.prototype.setContext=function(e){this._ctx=e},PathProxy.prototype.getContext=function(){return this._ctx},PathProxy.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},PathProxy.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},PathProxy.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(q.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},PathProxy.prototype.lineTo=function(e,t){var n=La(e-this._xi),r=La(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(q.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},PathProxy.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(q.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},PathProxy.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(q.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},PathProxy.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Va[0]=r,Va[1]=i,normalizeArcAngles(Va,a),r=Va[0],i=Va[1];var o=i-r;return this.addData(q.A,e,t,n,n,r,o,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Fa(i)*n+e,this._yi=Ia(i)*n+t,this},PathProxy.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},PathProxy.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(q.R,e,t,n,r),this},PathProxy.prototype.closePath=function(){this._drawPendingPt(),this.addData(q.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},PathProxy.prototype.fill=function(e){e&&e.fill(),this.toStatic()},PathProxy.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},PathProxy.prototype.len=function(){return this._len},PathProxy.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Ba&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},PathProxy.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(Ba&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},PathProxy.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},PathProxy.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},PathProxy.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}},PathProxy.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Ba&&this._len>11&&(this.data=new Float32Array(e)))}},PathProxy.prototype.getBoundingRect=function(){ka[0]=ka[1]=ja[0]=ja[1]=Number.MAX_VALUE,Aa[0]=Aa[1]=Ma[0]=Ma[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;a<this._len;){var o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case q.M:t=r=e[a++],n=i=e[a++],ja[0]=r,ja[1]=i,Ma[0]=r,Ma[1]=i;break;case q.L:fromLine(t,n,e[a],e[a+1],ja,Ma),t=e[a++],n=e[a++];break;case q.C:fromCubic(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],ja,Ma),t=e[a++],n=e[a++];break;case q.Q:fromQuadratic(t,n,e[a++],e[a++],e[a],e[a+1],ja,Ma),t=e[a++],n=e[a++];break;case q.A:var c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++],p=e[a++]+f;a+=1;var m=!e[a++];s&&(r=Fa(f)*u+c,i=Ia(f)*d+l),fromArc(c,l,u,d,f,p,m,ja,Ma),t=Fa(p)*u+c,n=Ia(p)*d+l;break;case q.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];fromLine(r,i,r+h,i+g,ja,Ma);break;case q.Z:t=r,n=i;break}min$1(ka,ka,ja),max$1(Aa,Aa,Ma)}return a===0&&(ka[0]=ka[1]=Aa[0]=Aa[1]=0),new G(ka[0],ka[1],Aa[0]-ka[0],Aa[1]-ka[1])},PathProxy.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case q.M:i=o=e[d++],a=s=e[d++];break;case q.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(La(_)>n||La(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case q.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=cubicLength(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case q.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=quadraticLength(i,a,y,b,h,g,10),i=h,a=g;break;case q.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Fa(D)*T+C,s=Ia(D)*E+w),m=Pa(T,E)*Na(za,Math.abs(O)),i=Fa(k)*T+C,a=Ia(k)*E+w;break;case q.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case q.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},PathProxy.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==q.L&&v>0&&(e.lineTo(y,b),v=0),S){case q.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case q.L:u=n[x++],d=n[x++];var w=La(u-c),T=La(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case q.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;cubicSubdivide(c,k,j,N,D,Da),cubicSubdivide(l,A,M,P,D,Oa),e.bezierCurveTo(Da[1],Oa[1],Da[2],Oa[2],Da[3],Oa[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case q.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;quadraticSubdivide(c,k,j,D,Da),quadraticSubdivide(l,A,M,D,Oa),e.quadraticCurveTo(Da[1],Oa[1],Da[2],Oa[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case q.A:var I=n[x++],L=n[x++],R=n[x++],ee=n[x++],z=n[x++],te=n[x++],ne=n[x++],re=!n[x++],ie=R>ee?R:ee,ae=La(R-ee)>.001,oe=z+te,B=!1;if(f){var E=p[g++];h+E>_&&(oe=z+te*(_-h)/E,B=!0),h+=E}if(ae&&e.ellipse?e.ellipse(I,L,R,ee,ne,z,oe,re):e.arc(I,L,ie,z,oe,re),B)break lo;C&&(o=Fa(z)*R+I,s=Ia(z)*ee+L),c=Fa(oe)*R+I,l=Ia(oe)*ee+L;break;case q.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var V=n[x++],se=n[x++];if(f){var E=p[g++];if(h+E>_){var ce=_-h;e.moveTo(u,d),e.lineTo(u+Na(ce,V),d),ce-=V,ce>0&&e.lineTo(u+V,d+Na(ce,se)),ce-=se,ce>0&&e.lineTo(u+Pa(V-ce,0),d+se),ce-=V,ce>0&&e.lineTo(u,d+Pa(se-ce,0));break lo}h+=E}e.rect(u,d,V,se);break;case q.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},PathProxy.prototype.clone=function(){var e=new PathProxy,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},PathProxy.prototype.canSave=function(){return!!this._saveData},PathProxy.CMD=q,PathProxy.initDefaultProps=(function(){var e=PathProxy.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),PathProxy}();function containStroke$4(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e!==n)c=(t-r)/(e-n),l=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=s/2;var u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}__name(containStroke$4,`containStroke`);function containStroke$3(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;var d=c;return u>t+d&&u>r+d&&u>a+d&&u>s+d||u<t-d&&u<r-d&&u<a-d&&u<s-d||l>e+d&&l>n+d&&l>i+d&&l>o+d||l<e-d&&l<n-d&&l<i-d&&l<o-d?!1:cubicProjectPoint(e,t,n,r,i,a,o,s,l,u,null)<=d/2}__name(containStroke$3,`containStroke`);function containStroke$2(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;return c>t+l&&c>r+l&&c>a+l||c<t-l&&c<r-l&&c<a-l||s>e+l&&s>n+l&&s>i+l||s<e-l&&s<n-l&&s<i-l?!1:quadraticProjectPoint(e,t,n,r,i,a,s,c,null)<=l/2}__name(containStroke$2,`containStroke`);var Ua=Math.PI*2;function normalizeRadian(e){return e%=Ua,e<0&&(e+=Ua),e}var Wa=Math.PI*2;function containStroke$1(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;s-=e,c-=t;var u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%Wa<1e-4)return!0;if(a){var d=r;r=normalizeRadian(i),i=normalizeRadian(d)}else r=normalizeRadian(r),i=normalizeRadian(i);r>i&&(i+=Wa);var f=Math.atan2(c,s);return f<0&&(f+=Wa),f>=r&&f<=i||f+Wa>=r&&f+Wa<=i}__name(containStroke$1,`containStroke`);function windingLine(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);var c=o*(n-e)+e;return c===i?1/0:c>i?s:0}var Ga=Ha.CMD,Ka=Math.PI*2,qa=1e-4;function isAroundEqual(e,t){return Math.abs(e-t)<qa}var Ja=[-1,-1,-1],Ya=[-1,-1];function swapExtrema(){var e=Ya[0];Ya[0]=Ya[1],Ya[1]=e}function windingCubic(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l<t&&l<r&&l<a&&l<s)return 0;var u=cubicRootAt(t,r,a,s,l,Ja);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=Ja[h],_=g===0||g===1?.5:1;cubicAt(e,n,i,o,g)<c||(f<0&&(f=cubicExtrema(t,r,a,s,Ya),Ya[1]<Ya[0]&&f>1&&swapExtrema(),p=cubicAt(t,r,a,s,Ya[0]),f>1&&(m=cubicAt(t,r,a,s,Ya[1]))),f===2?g<Ya[0]?d+=p<t?_:-_:g<Ya[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<Ya[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function windingQuadratic(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var c=quadraticRootAt(t,r,a,s,Ja);if(c===0)return 0;var l=quadraticExtremum(t,r,a);if(l>=0&&l<=1){for(var u=0,d=quadraticAt(t,r,a,l),f=0;f<c;f++){var p=Ja[f]===0||Ja[f]===1?.5:1,m=quadraticAt(e,n,i,Ja[f]);m<o||(Ja[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}else{var p=Ja[0]===0||Ja[0]===1?.5:1,m=quadraticAt(e,n,i,Ja[0]);return m<o?0:a<t?p:-p}}function windingArc(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);Ja[0]=-c,Ja[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=Ka-1e-4){r=0,i=Ka;var u=a?1:-1;return o>=Ja[0]+e&&o<=Ja[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=Ka,i+=Ka);for(var f=0,p=0;p<2;p++){var m=Ja[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=Ka+h),(h>=r&&h<=i||h+Ka>=r&&h+Ka<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function containPath(e,t,n,r,i){for(var a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p,m=0;m<o;){var h=a[m++],g=m===1;switch(h===Ga.M&&m>1&&(n||(s+=windingLine(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Ga.M:u=a[m++],d=a[m++],c=u,l=d;break;case Ga.L:if(n){if(containStroke$4(c,l,a[m],a[m+1],t,r,i))return!0}else s+=windingLine(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ga.C:if(n){if(containStroke$3(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=windingCubic(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ga.Q:if(n){if(containStroke$2(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=windingQuadratic(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ga.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=windingLine(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(containStroke$1(_,v,b,x,x+S,C,t,w,i))return!0}else s+=windingArc(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Ga.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(containStroke$4(u,d,f,d,t,r,i)||containStroke$4(f,d,f,p,t,r,i)||containStroke$4(f,p,u,p,t,r,i)||containStroke$4(u,p,u,d,t,r,i))return!0}else s+=windingLine(f,d,f,p,r,i),s+=windingLine(u,p,u,d,r,i);break;case Ga.Z:if(n){if(containStroke$4(c,l,u,d,t,r,i))return!0}else s+=windingLine(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!isAroundEqual(l,d)&&(s+=windingLine(c,l,u,d,r,i)||0),s!==0}function contain(e,t,n){return containPath(e,0,!1,t,n)}function containStroke(e,t,n,r){return containPath(e,t,!0,n,r)}var Xa=defaults({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ua),Za={style:defaults({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},da.style)},Qa=li.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),J=function(e){__extends(Path,e);function Path(t){return e.call(this,t)||this}return Path.prototype.update=function(){var t=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var r=this._decalEl=this._decalEl||new Path;r.buildPath===Path.prototype.buildPath&&(r.buildPath=function(e){t.buildPath(e,t.shape)}),r.silent=!0;var i=r.style;for(var a in n)i[a]!==n[a]&&(i[a]=n[a]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var o=0;o<Qa.length;++o)r[Qa[o]]=this[Qa[o]];r.__dirty|=1}else this._decalEl&&(this._decalEl=null)},Path.prototype.getDecalElement=function(){return this._decalEl},Path.prototype._init=function(t){var n=keys(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];a===`style`?this.style?extend(this.style,o):this.useStyle(o):a===`shape`?extend(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},Path.prototype.getDefaultStyle=function(){return null},Path.prototype.getDefaultShape=function(){return{}},Path.prototype.canBeInsideText=function(){return this.hasFill()},Path.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(isString(e)){var t=lum(e,0);return t>.5?Qr:t>.2?ei:$r}else if(e)return $r}return Qr},Path.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(isString(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==lum(e,0)<.4)return t}},Path.prototype.buildPath=function(e,t,n){},Path.prototype.pathUpdated=function(){this.__dirty&=-5},Path.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},Path.prototype.createPathProxy=function(){this.path=new Ha(!1)},Path.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},Path.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},Path.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},Path.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),containStroke(a,o/s,e,t)))return!0}if(this.hasFill())return contain(a,e,t)}return!1},Path.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},Path.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},Path.prototype.animateShape=function(e){return this.animate(`shape`,e)},Path.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},Path.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},Path.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),typeof e==`string`?n[e]=t:extend(n,e),this.dirtyShape(),this},Path.prototype.shapeChanged=function(){return!!(this.__dirty&4)},Path.prototype.createStyle=function(e){return createObject(Xa,e)},Path.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=extend({},this.shape))},Path.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=extend({},r.shape),extend(c,n.shape)):(c=extend({},i?this.shape:r.shape),extend(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=extend({},this.shape);for(var l={},u=keys(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}},Path.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r=r||{},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},Path.prototype.getAnimationStyleProps=function(){return Za},Path.prototype.isZeroArea=function(){return!1},Path.extend=function(e){var t=function(t){__extends(Sub,t);function Sub(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return Sub.prototype.getDefaultStyle=function(){return clone$2(e.style)},Sub.prototype.getDefaultShape=function(){return clone$2(e.shape)},Sub}(Path);for(var n in e)typeof e[n]==`function`&&(t.prototype[n]=e[n]);return t},Path.initDefaultProps=(function(){var e=Path.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),Path}(ma),$a=defaults({strokeFirst:!0,font:Kt,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Xa),eo=function(e){__extends(TSpan,e);function TSpan(){return e!==null&&e.apply(this,arguments)||this}return TSpan.prototype.hasStroke=function(){return tSpanHasStroke(this.style)},TSpan.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},TSpan.prototype.createStyle=function(e){return createObject($a,e)},TSpan.prototype.setBoundingRect=function(e){this._rect=e},TSpan.prototype.getBoundingRect=function(){return this._rect||(this._rect=tSpanCreateBoundingRect(this.style)),this._rect},TSpan.initDefaultProps=(function(){var e=TSpan.prototype;e.dirtyRectTolerance=10})(),TSpan}(ma);eo.prototype.type=`tspan`;var to=defaults({x:0,y:0},ua),no={style:defaults({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},da.style)};function isImageLike(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var ro=function(e){__extends(ZRImage,e);function ZRImage(){return e!==null&&e.apply(this,arguments)||this}return ZRImage.prototype.createStyle=function(e){return createObject(to,e)},ZRImage.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=isImageLike(t.image)?t.image:this.__image;if(!r)return 0;var i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a},ZRImage.prototype.getWidth=function(){return this._getSize(`width`)},ZRImage.prototype.getHeight=function(){return this._getSize(`height`)},ZRImage.prototype.getAnimationStyleProps=function(){return no},ZRImage.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new G(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},ZRImage}(ma);ro.prototype.type=`image`;function buildPath$2(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;var d;s+c>i&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}__name(buildPath$2,`buildPath`);var io=Math.round;function subPixelOptimizeLine$1(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(io(r*2)===io(i*2)&&(e.x1=e.x2=subPixelOptimize$1(r,s,!0)),io(a*2)===io(o*2)&&(e.y1=e.y2=subPixelOptimize$1(a,s,!0)),e):e}}__name(subPixelOptimizeLine$1,`subPixelOptimizeLine`);function subPixelOptimizeRect$1(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=subPixelOptimize$1(r,s,!0),e.y=subPixelOptimize$1(i,s,!0),e.width=Math.max(subPixelOptimize$1(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(subPixelOptimize$1(i+o,s,!1)-e.y,o===0?0:1),e):e}}__name(subPixelOptimizeRect$1,`subPixelOptimizeRect`);function subPixelOptimize$1(e,t,n){if(!t)return e;var r=io(e*2);return(r+io(t))%2==0?r/2:(r+(n?1:-1))/2}__name(subPixelOptimize$1,`subPixelOptimize`);var ao=function(){function RectShape(){this.x=0,this.y=0,this.width=0,this.height=0}return RectShape}(),oo={},so=function(e){__extends(Rect,e);function Rect(t){return e.call(this,t)||this}return Rect.prototype.getDefaultShape=function(){return new ao},Rect.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=subPixelOptimizeRect$1(oo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?buildPath$2(e,t):e.rect(n,r,i,a)},Rect.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},Rect}(J);so.prototype.type=`rect`;var co={fill:`#000`},lo=2,uo={},fo={style:defaults({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},da.style)},po=function(e){__extends(ZRText,e);function ZRText(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=co,n.attr(t),n}return ZRText.prototype.childrenRef=function(){return this._children},ZRText.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},ZRText.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},ZRText.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},ZRText.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},ZRText.prototype._updateSubTexts=function(){this._childCursor=0,normalizeTextStyle(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},ZRText.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},ZRText.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},ZRText.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new G(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r=r||e.clone(),r.union(e)):(r=r||o.clone(),r.union(o))}this._rect=r||e}return this._rect},ZRText.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||co},ZRText.prototype.setTextContent=function(e){},ZRText.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return extend(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},ZRText.prototype._mergeRich=function(e,t){for(var n=keys(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},extend(e[i],t[i])}},ZRText.prototype.getAnimationStyleProps=function(){return fo},ZRText.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return(!t||!(t instanceof e))&&(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},ZRText.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;calcInnerTextOverflowArea(uo,r.overflowRect,i,a,o,s),i=uo.baseX,a=uo.baseY;var c=parsePlainText(getStyleText(e),e,uo.outerWidth,uo.outerHeight),l=needDrawBackground(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=adjustTextY(a,c.contentHeight,s);if(l||n){var _=adjustTextX(i,f,o),v=adjustTextY(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=getTextXForPadding(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=getFill(`fill`in e?e.fill:(x=!0,r.fill)),C=getStroke(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=lo,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(eo),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,setSeparateFont(D,e),g+=m,E.setBoundingRect(tSpanCreateBoundingRect2(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},ZRText.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;calcInnerTextOverflowArea(uo,t.overflowRect,i,a,n,r),i=uo.baseX,a=uo.baseY;var o=parseRichText(getStyleText(e),e,uo.outerWidth,uo.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=adjustTextX(i,c,n),f=adjustTextY(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;needDrawBackground(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},ZRText.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&needDrawBackground(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=getTextXForPadding(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(eo),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=getFill(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=getStroke(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=lo,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=retrieve3(s.opacity,t.opacity,1),setSeparateFont(p,s),y&&(p.lineWidth=retrieve3(s.lineWidth,t.lineWidth,g),p.lineDash=retrieve2(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(tSpanCreateBoundingRect2(p,e.contentWidth,e.contentHeight,_?0:null))},ZRText.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(so),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=retrieve2(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(ro),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=retrieve2(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=retrieve3(e.opacity,t.opacity,1)},ZRText.makeFont=function(e){var t=``;return hasSeparateFont(e)&&(t=[e.fontStyle,e.fontWeight,parseFontSize(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&trim(t)||e.textFont||e.font},ZRText}(ma),mo={left:!0,right:1,center:1},ho={top:1,bottom:1,middle:1},go=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function parseFontSize(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function setSeparateFont(e,t){for(var n=0;n<go.length;n++){var r=go[n],i=t[r];i!=null&&(e[r]=i)}}function hasSeparateFont(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function normalizeTextStyle(e){return normalizeStyle$1(e),each$4(e.rich,normalizeStyle$1),e}function normalizeStyle$1(e){if(e){e.font=po.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||mo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||ho[n]?n:`top`,e.padding&&(e.padding=normalizeCssArray$1(e.padding))}}__name(normalizeStyle$1,`normalizeStyle`);function getStroke(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function getFill(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function getTextXForPadding(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function getStyleText(e){var t=e.text;return t!=null&&(t+=``),t}function needDrawBackground(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Y=makeInner(),setCommonECData=function(e,t,n,r){if(r){var i=Y(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Y(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},_o=createHashMap([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),vo=`original`,yo=`arrayRows`,bo=`objectRows`,xo=`keyedColumns`,So=`typedArray`,Co=`unknown`,wo=`column`,To=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],Eo=function(){function ExtensionAPI(e){each$4(To,function(t){this[t]=U(e[t],e)},this)}return ExtensionAPI}();function getViewOfComponentOrSeries(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var Do=1,Oo={},ko=makeInner(),Ao=makeInner(),jo=[`emphasis`,`blur`,`select`],Mo=[`normal`,`emphasis`,`blur`,`select`],No=`highlight`,Po=`downplay`,Fo=`select`,Io=`unselect`,Lo=`toggleSelect`,Ro=`selectchanged`;function hasFillOrStroke(e){return e!=null&&e!==`none`}function doChangeHoverState(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function singleEnterEmphasis(e){doChangeHoverState(e,`emphasis`,2)}function singleLeaveEmphasis(e){e.hoverState===2&&doChangeHoverState(e,`normal`,0)}function singleEnterBlur(e){doChangeHoverState(e,`blur`,1)}function singleLeaveBlur(e){e.hoverState===1&&doChangeHoverState(e,`normal`,0)}function singleEnterSelect(e){e.selected=!0}function singleLeaveSelect(e){e.selected=!1}function updateElementState(e,t,n){t(e,n)}function traverseUpdateState(e,t,n){updateElementState(e,t,n),e.isGroup&&e.traverse(function(e){updateElementState(e,t,n)})}function setStatesFlag(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function getFromStateStyle(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o];a[s]=i[s]??(r&&r[s])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName===`style`&&c.saveTo(a,t)}return a}function createEmphasisDefaultState(e,t,n,r){var i=n&&indexOf(n,`select`)>=0,a=!1;if(e instanceof J){var o=ko(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(hasFillOrStroke(s)||hasFillOrStroke(c)){r=r||{};var l=r.style||{};l.fill===`inherit`?(a=!0,r=extend({},r),l=extend({},l),l.fill=s):!hasFillOrStroke(l.fill)&&hasFillOrStroke(s)?(a=!0,r=extend({},r),l=extend({},l),l.fill=liftColor(s)):!hasFillOrStroke(l.stroke)&&hasFillOrStroke(c)&&(a||(r=extend({},r),l=extend({},l)),l.stroke=liftColor(c)),r.style=l}}if(r&&r.z2==null){a||(r=extend({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function createSelectDefaultState(e,t,n){if(n&&n.z2==null){n=extend({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function createBlurDefaultState(e,t,n){var r=indexOf(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:getFromStateStyle(e,[`opacity`],t,{opacity:1});n=n||{};var o=n.style||{};return o.opacity??(n=extend({},n),o=extend({opacity:r?i:a.opacity*.1},o),n.style=o),n}function elementStateProxy(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return createEmphasisDefaultState(this,e,t,n);if(e===`blur`)return createBlurDefaultState(this,e,n);if(e===`select`)return createSelectDefaultState(this,e,n)}return n}function setDefaultStateProxy(e){e.stateProxy=elementStateProxy;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=elementStateProxy),n&&(n.stateProxy=elementStateProxy)}function enterEmphasisWhenMouseOver(e,t){!shouldSilent(e,t)&&!e.__highByOuter&&traverseUpdateState(e,singleEnterEmphasis)}function leaveEmphasisWhenMouseOut(e,t){!shouldSilent(e,t)&&!e.__highByOuter&&traverseUpdateState(e,singleLeaveEmphasis)}function enterEmphasis(e,t){e.__highByOuter|=1<<(t||0),traverseUpdateState(e,singleEnterEmphasis)}function leaveEmphasis(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&traverseUpdateState(e,singleLeaveEmphasis)}function enterBlur(e){traverseUpdateState(e,singleEnterBlur)}function leaveBlur(e){traverseUpdateState(e,singleLeaveBlur)}function enterSelect(e){traverseUpdateState(e,singleEnterSelect)}function leaveSelect(e){traverseUpdateState(e,singleLeaveSelect)}function shouldSilent(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function allLeaveBlur(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=Ao(i),o=getViewOfComponentOrSeries(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){singleLeaveBlur(e)}),s&&n.push(i)),a.isBlured=!1}),each$4(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function blurSeries(e,t,n,r){var i=r.getModel();n=n||`coordinateSystem`;function leaveBlurOfIndices(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&leaveBlur(r)}}if(e!=null&&!(!t||t===`none`)){var a=i.getSeriesByIndex(e),o=a.coordinateSystem;o&&o.master&&(o=o.master);var s=[];i.eachSeries(function(e){var i=a===e,c=e.coordinateSystem;if(c&&c.master&&(c=c.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(c&&o?c===o:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||singleEnterBlur(e)}),isArrayLike(t))leaveBlurOfIndices(e.getData(),t);else if(isObject$2(t))for(var l=keys(t),u=0;u<l.length;u++)leaveBlurOfIndices(e.getData(l[u]),t[l[u]]);s.push(e),Ao(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(s,!0,i)}})}}function blurComponent(e,t,n){if(!(e==null||t==null)){var r=n.getModel().getComponent(e,t);if(r){Ao(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){singleEnterBlur(e)})}}}function blurSeriesFromHighlightPayload(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=queryDataIndex(i,t);a=(isArray(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),c=0;!o&&c<s;)o=i.getItemGraphicEl(c++);if(o){var l=Y(o);blurSeries(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&blurSeries(r,u,d,n)}}}function findComponentHighDownDispatchers(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(n),c,l=0;l<s.length;l++)if(Y(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function handleGlobalMouseOverForHighDown(e,t,n){var r=Y(e),i=findComponentHighDownDispatchers(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&blurComponent(r.componentMainType,r.componentIndex,n),each$4(a,function(e){return enterEmphasisWhenMouseOver(e,t)})):(blurSeries(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&blurComponent(r.componentMainType,r.componentIndex,n),enterEmphasisWhenMouseOver(e,t))}function handleGlobalMouseOutForHighDown(e,t,n){allLeaveBlur(n);var r=Y(e),i=findComponentHighDownDispatchers(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?each$4(i,function(e){return leaveEmphasisWhenMouseOut(e,t)}):leaveEmphasisWhenMouseOut(e,t)}function toggleSelectionFromPayload(e,t,n){if(isSelectChangePayload(t)){var r=t.dataType,i=queryDataIndex(e.getData(r),t);isArray(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function updateSeriesElementSelection(e){each$4(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?enterSelect(t):leaveSelect(t)})})}function getAllSelectedIndices(e){var t=[];return e.eachSeries(function(e){each$4(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function enableHoverEmphasis(e,t,n){setAsHighDownDispatcher(e,!0),traverseUpdateState(e,setDefaultStateProxy),enableHoverFocus(e,t,n)}function disableHoverEmphasis(e){setAsHighDownDispatcher(e,!1)}function toggleHoverEmphasis(e,t,n,r){r?disableHoverEmphasis(e):enableHoverEmphasis(e,t,n)}function enableHoverFocus(e,t,n){var r=Y(e);t==null?r.focus&&(r.focus=null):(r.focus=t,r.blurScope=n)}var zo=[`emphasis`,`blur`,`select`],Bo={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function setStatesStylesFromModel(e,t,n,r){n=n||`itemStyle`;for(var i=0;i<zo.length;i++){var a=zo[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[Bo[n]]()}}function setAsHighDownDispatcher(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function isHighDownDispatcher(e){return!!(e&&e.__highDownDispatcher)}function getHighlightDigit(e){var t=Oo[e];return t==null&&Do<=32&&(t=Oo[e]=Do++),t}function isSelectChangePayload(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function isHighDownPayload(e){var t=e.type;return t===`highlight`||t===`downplay`}function savePathStates(e){var t=ko(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var Vo=Ha.CMD,Ho=[[],[],[]],Uo=Math.sqrt,Wo=Math.atan2;function transformPath(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=Vo.M,d=Vo.C,f=Vo.L,p=Vo.R,m=Vo.A,h=Vo.Q;for(o=0,s=0;o<r;){switch(i=n[o++],s=o,a=0,i){case u:a=1;break;case f:a=1;break;case d:a=3;break;case h:a=2;break;case m:var g=t[4],_=t[5],v=Uo(t[0]*t[0]+t[1]*t[1]),y=Uo(t[2]*t[2]+t[3]*t[3]),b=Wo(-t[1]/y,t[0]/v);n[o]*=v,n[o++]+=g,n[o]*=y,n[o++]+=_,n[o++]*=v,n[o++]*=y,n[o++]+=b,n[o++]+=b,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],applyTransform$1(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],applyTransform$1(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=Ho[c];x[0]=n[o++],x[1]=n[o++],applyTransform$1(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Go=Math.sqrt,Ko=Math.sin,qo=Math.cos,Jo=Math.PI;function vMag(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function vRatio(e,t){return(e[0]*t[0]+e[1]*t[1])/(vMag(e)*vMag(t))}function vAngle(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(vRatio(e,t))}function processArc(e,t,n,r,i,a,o,s,c,l,u){var d=Jo/180*c,f=qo(d)*(e-n)/2+Ko(d)*(t-r)/2,p=-1*Ko(d)*(e-n)/2+qo(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Go(m),s*=Go(m));var h=(i===a?-1:1)*Go((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+qo(d)*g-Ko(d)*_,y=(t+r)/2+Ko(d)*g+qo(d)*_,b=vAngle([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=vAngle(x,S);if(vRatio(x,S)<=-1&&(C=Jo),vRatio(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Jo*1e6)/1e6;C=Jo*2+w%2*Jo}u.addData(l,v,y,o,s,b,C,d,a)}var Yo=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Xo=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function createPathProxyFromString(e){var t=new Ha;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Ha.CMD,c=e.match(Yo);if(!c)return t;for(var l=0;l<c.length;l++){for(var u=c[l],d=u.charAt(0),f=void 0,p=u.match(Xo)||[],m=p.length,h=0;h<m;h++)p[h]=parseFloat(p[h]);for(var g=0;g<m;){var _=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=n,T=r,E=void 0,D=void 0;switch(d){case`l`:n+=p[g++],r+=p[g++],f=s.L,t.addData(f,n,r);break;case`L`:n=p[g++],r=p[g++],f=s.L,t.addData(f,n,r);break;case`m`:n+=p[g++],r+=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`l`;break;case`M`:n=p[g++],r=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`L`;break;case`h`:n+=p[g++],f=s.L,t.addData(f,n,r);break;case`H`:n=p[g++],f=s.L,t.addData(f,n,r);break;case`v`:r+=p[g++],f=s.L,t.addData(f,n,r);break;case`V`:r=p[g++],f=s.L,t.addData(f,n,r);break;case`C`:f=s.C,t.addData(f,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case`c`:f=s.C,t.addData(f,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case`S`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=p[g++],T=p[g++],n=p[g++],r=p[g++],t.addData(f,_,v,w,T,n,r);break;case`s`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=n+p[g++],T=r+p[g++],n+=p[g++],r+=p[g++],t.addData(f,_,v,w,T,n,r);break;case`Q`:w=p[g++],T=p[g++],n=p[g++],r=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`q`:w=p[g++]+n,T=p[g++]+r,n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`T`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n=p[g++],r=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`t`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`A`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n=p[g++],r=p[g++],f=s.A,processArc(w,T,n,r,S,C,y,b,x,f,t);break;case`a`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n+=p[g++],r+=p[g++],f=s.A,processArc(w,T,n,r,S,C,y,b,x,f,t);break}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var Zo=function(e){__extends(SVGPath,e);function SVGPath(){return e!==null&&e.apply(this,arguments)||this}return SVGPath.prototype.applyTransform=function(e){},SVGPath}(J);function isPathProxy(e){return e.setData!=null}function createPathOptions(e,t){var n=createPathProxyFromString(e),r=extend({},t);return r.buildPath=function(e){var t=isPathProxy(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){transformPath(n,e),this.dirtyShape()},r}function createFromString(e,t){return new Zo(createPathOptions(e,t))}function extendFromString(e,t){var n=createPathOptions(e,t);return function(e){__extends(Sub,e);function Sub(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return Sub}(Zo)}function mergePath$1(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new J(t);return o.createPathProxy(),o.buildPath=function(e){if(isPathProxy(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}__name(mergePath$1,`mergePath`);var Qo=function(){function CircleShape(){this.cx=0,this.cy=0,this.r=0}return CircleShape}(),$o=function(e){__extends(Circle,e);function Circle(t){return e.call(this,t)||this}return Circle.prototype.getDefaultShape=function(){return new Qo},Circle.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},Circle}(J);$o.prototype.type=`circle`;var es=function(){function EllipseShape(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return EllipseShape}(),ts=function(e){__extends(Ellipse,e);function Ellipse(t){return e.call(this,t)||this}return Ellipse.prototype.getDefaultShape=function(){return new es},Ellipse.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,c=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-c,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-c,r+a,i),e.bezierCurveTo(r+a,i+c,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+c,r-a,i),e.closePath()},Ellipse}(J);ts.prototype.type=`ellipse`;var ns=Math.PI,rs=ns*2,is=Math.sin,as=Math.cos,os=Math.acos,ss=Math.atan2,cs=Math.abs,ls=Math.sqrt,us=Math.max,ds=Math.min,fs=1e-4;function intersect(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<fs))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function computeCornerTangents(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/ls(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*ls(us(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function normalizeCornerRadius(e){var t;if(isArray(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function buildPath$1(e,t){var n,r=us(t.r,0),i=us(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=cs(c-s),p=f>rs&&f%rs;if(p>fs&&(f=p),!(r>fs))e.moveTo(l,u);else if(f>rs-fs)e.moveTo(l+r*as(s),u+r*is(s)),e.arc(l,u,r,s,c,!d),i>fs&&(e.moveTo(l+i*as(c),u+i*is(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*as(s),j=r*is(s),M=i*as(c),N=i*is(c),P=f>fs;if(P){var I=t.cornerRadius;I&&(n=normalizeCornerRadius(I),m=n[0],h=n[1],g=n[2],_=n[3]);var L=cs(r-i)/2;if(v=ds(L,g),y=ds(L,_),b=ds(L,m),x=ds(L,h),w=S=us(v,y),T=C=us(b,x),(S>fs||C>fs)&&(E=r*as(c),D=r*is(c),O=i*as(s),k=i*is(s),f<ns)){var R=intersect(A,j,O,k,E,D,M,N);if(R){var ee=A-R[0],z=j-R[1],te=E-R[0],ne=D-R[1],re=1/is(os((ee*te+z*ne)/(ls(ee*ee+z*z)*ls(te*te+ne*ne)))/2),ie=ls(R[0]*R[0]+R[1]*R[1]);w=ds(S,(r-ie)/(re+1)),T=ds(C,(i-ie)/(re-1))}}}if(!P)e.moveTo(l+A,u+j);else if(w>fs){var ae=ds(g,w),oe=ds(_,w),B=computeCornerTangents(O,k,A,j,r,ae,d),V=computeCornerTangents(E,D,M,N,r,oe,d);e.moveTo(l+B.cx+B.x0,u+B.cy+B.y0),w<S&&ae===oe?e.arc(l+B.cx,u+B.cy,w,ss(B.y0,B.x0),ss(V.y0,V.x0),!d):(ae>0&&e.arc(l+B.cx,u+B.cy,ae,ss(B.y0,B.x0),ss(B.y1,B.x1),!d),e.arc(l,u,r,ss(B.cy+B.y1,B.cx+B.x1),ss(V.cy+V.y1,V.cx+V.x1),!d),oe>0&&e.arc(l+V.cx,u+V.cy,oe,ss(V.y1,V.x1),ss(V.y0,V.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>fs)||!P)e.lineTo(l+M,u+N);else if(T>fs){var ae=ds(m,T),oe=ds(h,T),B=computeCornerTangents(M,N,E,D,i,-oe,d),V=computeCornerTangents(A,j,O,k,i,-ae,d);e.lineTo(l+B.cx+B.x0,u+B.cy+B.y0),T<C&&ae===oe?e.arc(l+B.cx,u+B.cy,T,ss(B.y0,B.x0),ss(V.y0,V.x0),!d):(oe>0&&e.arc(l+B.cx,u+B.cy,oe,ss(B.y0,B.x0),ss(B.y1,B.x1),!d),e.arc(l,u,i,ss(B.cy+B.y1,B.cx+B.x1),ss(V.cy+V.y1,V.cx+V.x1),d),ae>0&&e.arc(l+V.cx,u+V.cy,ae,ss(V.y1,V.x1),ss(V.y0,V.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}__name(buildPath$1,`buildPath`);var ps=function(){function SectorShape(){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 SectorShape}(),ms=function(e){__extends(Sector,e);function Sector(t){return e.call(this,t)||this}return Sector.prototype.getDefaultShape=function(){return new ps},Sector.prototype.buildPath=function(e,t){buildPath$1(e,t)},Sector.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},Sector}(J);ms.prototype.type=`sector`;var hs=function(){function RingShape(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return RingShape}(),gs=function(e){__extends(Ring,e);function Ring(t){return e.call(this,t)||this}return Ring.prototype.getDefaultShape=function(){return new hs},Ring.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},Ring}(J);gs.prototype.type=`ring`;function smoothBezier(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f<p;f++)min$1(u,u,e[f]),max$1(d,d,e[f]);min$1(u,u,r[0]),max$1(d,d,r[1])}for(var f=0,p=e.length;f<p;f++){var m=e[f];if(n)c=e[f?f-1:p-1],l=e[(f+1)%p];else if(f===0||f===p-1){i.push(clone$1(e[f]));continue}else c=e[f-1],l=e[f+1];sub(a,l,c),scale$1(a,a,t);var h=distance(m,c),g=distance(m,l),_=h+g;_!==0&&(h/=_,g/=_),scale$1(o,a,-h),scale$1(s,a,g);var v=add([],m,o),y=add([],m,s);r&&(max$1(v,v,u),min$1(v,v,d),max$1(y,y,u),min$1(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function buildPath(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=smoothBezier(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var _s=function(){function PolygonShape(){this.points=null,this.smooth=0,this.smoothConstraint=null}return PolygonShape}(),vs=function(e){__extends(Polygon,e);function Polygon(t){return e.call(this,t)||this}return Polygon.prototype.getDefaultShape=function(){return new _s},Polygon.prototype.buildPath=function(e,t){buildPath(e,t,!0)},Polygon}(J);vs.prototype.type=`polygon`;var ys=function(){function PolylineShape(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return PolylineShape}(),bs=function(e){__extends(Polyline,e);function Polyline(t){return e.call(this,t)||this}return Polyline.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},Polyline.prototype.getDefaultShape=function(){return new ys},Polyline.prototype.buildPath=function(e,t){buildPath(e,t,!1)},Polyline}(J);bs.prototype.type=`polyline`;var xs={},Ss=function(){function LineShape(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return LineShape}(),Cs=function(e){__extends(Line,e);function Line(t){return e.call(this,t)||this}return Line.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},Line.prototype.getDefaultShape=function(){return new Ss},Line.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=subPixelOptimizeLine$1(xs,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;s!==0&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},Line.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},Line}(J);Cs.prototype.type=`line`;var ws=[],Ts=function(){function BezierCurveShape(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return BezierCurveShape}();function someVectorAt(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?cubicDerivativeAt:cubicAt)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?cubicDerivativeAt:cubicAt)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?quadraticDerivativeAt:quadraticAt)(e.x1,e.cpx1,e.x2,t),(n?quadraticDerivativeAt:quadraticAt)(e.y1,e.cpy1,e.y2,t)]}var Es=function(e){__extends(BezierCurve,e);function BezierCurve(t){return e.call(this,t)||this}return BezierCurve.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},BezierCurve.prototype.getDefaultShape=function(){return new Ts},BezierCurve.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,c=t.cpx2,l=t.cpy2,u=t.percent;u!==0&&(e.moveTo(n,r),c==null||l==null?(u<1&&(quadraticSubdivide(n,o,i,u,ws),o=ws[1],i=ws[2],quadraticSubdivide(r,s,a,u,ws),s=ws[1],a=ws[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(cubicSubdivide(n,o,c,i,u,ws),o=ws[1],c=ws[2],i=ws[3],cubicSubdivide(r,s,l,a,u,ws),s=ws[1],l=ws[2],a=ws[3]),e.bezierCurveTo(o,s,c,l,i,a)))},BezierCurve.prototype.pointAt=function(e){return someVectorAt(this.shape,e,!1)},BezierCurve.prototype.tangentAt=function(e){var t=someVectorAt(this.shape,e,!0);return normalize(t,t)},BezierCurve}(J);Es.prototype.type=`bezier-curve`;var Ds=function(){function ArcShape(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return ArcShape}(),Os=function(e){__extends(Arc,e);function Arc(t){return e.call(this,t)||this}return Arc.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},Arc.prototype.getDefaultShape=function(){return new Ds},Arc.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,c=Math.cos(a),l=Math.sin(a);e.moveTo(c*i+n,l*i+r),e.arc(n,r,i,a,o,!s)},Arc}(J);Os.prototype.type=`arc`;var ks=function(e){__extends(CompoundPath,e);function CompoundPath(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return CompoundPath.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},CompoundPath.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},CompoundPath.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},CompoundPath.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},CompoundPath.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),J.prototype.getBoundingRect.call(this)},CompoundPath}(J),As=function(){function Gradient(e){this.colorStops=e||[]}return Gradient.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},Gradient}(),js=function(e){__extends(LinearGradient,e);function LinearGradient(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=t??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type=`linear`,s.global=o||!1,s}return LinearGradient}(As),Ms=function(e){__extends(RadialGradient,e);function RadialGradient(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=t??.5,o.y=n??.5,o.r=r??.5,o.type=`radial`,o.global=a||!1,o}return RadialGradient}(As),Ns=Math.min,Ps=Math.max,Fs=Math.abs,Is=[0,0],Ls=[0,0],Rs=createIntersectContext(),zs=Rs.minTv,Bs=Rs.maxTv,Vs=function(){function OrientedBoundingRect(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new W;for(var n=0;n<2;n++)this._axes[n]=new W;e&&this.fromBoundingRect(e,t)}return OrientedBoundingRect.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(var c=0;c<4;c++)n[c].transform(t);W.sub(r[0],n[1],n[0]),W.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},OrientedBoundingRect.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&W.set(t,0,0),Rs.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Rs.negativeSize&&W.copy(t,r?Rs.useDir?Rs.dirMinTv:zs:Bs),r},OrientedBoundingRect.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,Is),e._getProjMinMaxOnAxis(a,t._corners,Ls),Rs.negativeSize||Is[1]<Ls[0]||Is[0]>Ls[1]){if(i=!1,Rs.negativeSize||n)return i;var s=Fs(Ls[0]-Is[1]),c=Fs(Is[0]-Ls[1]);Ns(s,c)>Bs.len()&&(s<c?W.scale(Bs,o,-s*r):W.scale(Bs,o,c*r))}else if(!n){var s=Fs(Ls[0]-Is[1]),c=Fs(Is[0]-Ls[1]);(Rs.useDir||Ns(s,c)<zs.len())&&((s<c||!Rs.bidirectional)&&(W.scale(zs,o,s*r),Rs.useDir&&Rs.calcDirMTV()),(s>=c||!Rs.bidirectional)&&(W.scale(zs,o,-c*r),Rs.useDir&&Rs.calcDirMTV()))}}return i},OrientedBoundingRect.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=Ns(l,o),s=Ps(l,s)}n[0]=o+Rs.touchThreshold,n[1]=s-Rs.touchThreshold,Rs.negativeSize=n[1]<n[0]},OrientedBoundingRect}(),Hs=[],Us=function(e){__extends(IncrementalDisplayable,e);function IncrementalDisplayable(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return IncrementalDisplayable.prototype.traverse=function(e,t){e.call(t,this)},IncrementalDisplayable.prototype.useStyle=function(){this.style={}},IncrementalDisplayable.prototype._useHoverStyle=function(){this.__hoverStyle=null},IncrementalDisplayable.prototype.getCursor=function(){return this._cursor},IncrementalDisplayable.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},IncrementalDisplayable.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},IncrementalDisplayable.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},IncrementalDisplayable.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},IncrementalDisplayable.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},IncrementalDisplayable.prototype.getDisplayables=function(){return this._displayables},IncrementalDisplayable.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},IncrementalDisplayable.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},IncrementalDisplayable.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},IncrementalDisplayable.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new G(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Hs)),e.union(r)}this._rect=e}return this._rect},IncrementalDisplayable.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},IncrementalDisplayable}(ma),Ws=makeInner();function getAnimationConfig(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),c=e===`update`;if(s){var l=void 0,u=void 0,d=void 0;return r?(l=retrieve2(r.duration,200),u=retrieve2(r.easing,`cubicOut`),d=0):(l=t.getShallow(c?`animationDurationUpdate`:`animationDuration`),u=t.getShallow(c?`animationEasingUpdate`:`animationEasing`),d=t.getShallow(c?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(u=a.easing),a.delay!=null&&(d=a.delay)),isFunction(d)&&(d=d(n,i)),isFunction(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}else return null}function animateOrSetProps(e,t,n,r,i,a,o){var s=!1,c;isFunction(i)?(o=a,a=i,i=null):isObject$2(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);var l=e===`leave`;l||t.stopAnimation(`leave`);var u=getAnimationConfig(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function updateProps$1(e,t,n,r,i,a){animateOrSetProps(`update`,e,t,n,r,i,a)}__name(updateProps$1,`updateProps`);function initProps(e,t,n,r,i,a){animateOrSetProps(`enter`,e,t,n,r,i,a)}function isElementRemoved(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function removeElement(e,t,n,r,i,a){isElementRemoved(e)||animateOrSetProps(`leave`,e,t,n,r,i,a)}function fadeOutDisplayable(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),removeElement(e,{style:{opacity:0}},t,n,r)}function removeElementWithFadeOut(e,t,n){function doRemove(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||fadeOutDisplayable(e,t,n,doRemove)}):fadeOutDisplayable(e,t,n,doRemove)}function saveOldStyle(e){Ws(e).oldStyle=e.style}var Gs=__exportAll({Arc:()=>Os,BezierCurve:()=>Es,BoundingRect:()=>G,Circle:()=>$o,CompoundPath:()=>ks,Ellipse:()=>ts,Group:()=>bi,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>ro,IncrementalDisplayable:()=>Us,Line:()=>Cs,LinearGradient:()=>js,OrientedBoundingRect:()=>Vs,Path:()=>J,Point:()=>W,Polygon:()=>vs,Polyline:()=>bs,RadialGradient:()=>Ms,Rect:()=>so,Ring:()=>gs,Sector:()=>ms,Text:()=>po,WH:()=>Js,XY:()=>qs,applyTransform:()=>applyTransform,calcZ2Range:()=>calcZ2Range,clipPointsByRect:()=>clipPointsByRect,clipRectByRect:()=>clipRectByRect,createIcon:()=>createIcon,decomposeTransform:()=>decomposeTransform,ensureCopyRect:()=>ensureCopyRect,ensureCopyTransform:()=>ensureCopyTransform,expandOrShrinkRect:()=>expandOrShrinkRect,extendPath:()=>extendPath,extendShape:()=>extendShape,getCurrentCanvasPainter:()=>getCurrentCanvasPainter,getShapeClass:()=>getShapeClass,getTransform:()=>getTransform,groupTransition:()=>groupTransition,initProps:()=>initProps,isBoundingRectAxisAligned:()=>isBoundingRectAxisAligned,isElementRemoved:()=>isElementRemoved,lineLineIntersect:()=>lineLineIntersect,linePolygonIntersect:()=>linePolygonIntersect,makeImage:()=>makeImage,makePath:()=>makePath,mergePath:()=>Xs,payloadDisableAnimation:()=>payloadDisableAnimation,registerShape:()=>registerShape,removeElement:()=>removeElement,removeElementWithFadeOut:()=>removeElementWithFadeOut,resizePath:()=>resizePath,retrieveZInfo:()=>retrieveZInfo,setTooltipConfig:()=>setTooltipConfig,subPixelOptimize:()=>Zs,subPixelOptimizeLine:()=>subPixelOptimizeLine,subPixelOptimizeRect:()=>subPixelOptimizeRect,transformDirection:()=>transformDirection,traverseElements:()=>traverseElements,traverseUpdateZ:()=>traverseUpdateZ,updateProps:()=>updateProps$1}),Ks={},qs=[`x`,`y`],Js=[`width`,`height`];function extendShape(e){return J.extend(e)}var Ys=extendFromString;function extendPath(e,t){return Ys(e,t)}function registerShape(e,t){Ks[e]=t}function getShapeClass(e){if(Ks.hasOwnProperty(e))return Ks[e]}function makePath(e,t,n,r){var i=createFromString(e,t);return n&&(r===`center`&&(n=centerGraphic(n,i.getBoundingRect())),resizePath(i,n)),i}function makeImage(e,t,n){var r=new ro({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(centerGraphic(t,i))}}});return r}function centerGraphic(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var Xs=mergePath$1;function resizePath(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function subPixelOptimizeLine(e,t){return subPixelOptimizeLine$1(e,e,{lineWidth:t}),e}function subPixelOptimizeRect(e,t){return subPixelOptimizeRect$1(e,e,t),e}var Zs=subPixelOptimize$1;function getTransform(e,t){for(var n=identity([]);e&&e!==t;)mul(n,e.getLocalTransform(),n),e=e.parent;return n}function applyTransform(e,t,n){return t&&!isArrayLike(t)&&(t=si.getLocalTransform(t)),n&&(t=invert([],t)),applyTransform$1([],e,t)}function transformDirection(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:Di(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Di(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=applyTransform(a,t,n),Di(a[0])>Di(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function isNotGroup(e){return!e.isGroup}function isPath(e){return e.shape!=null}function groupTransition(e,t,n){if(!e||!t)return;function getElMap(e){var t={};return e.traverse(function(e){isNotGroup(e)&&e.anid&&(t[e.anid]=e)}),t}function getAnimatableProps(e){var t={x:e.x,y:e.y,rotation:e.rotation};return isPath(e)&&(t.shape=clone$2(e.shape)),t}var r=getElMap(e);t.traverse(function(e){if(isNotGroup(e)&&e.anid){var t=r[e.anid];if(t){var i=getAnimatableProps(e);e.attr(getAnimatableProps(t)),updateProps$1(e,i,n,Y(e).dataIndex)}}})}function clipPointsByRect(e,t){return map$1(e,function(e){var n=e[0];n=K(n,t.x),n=Ei(n,t.x+t.width);var r=e[1];return r=K(r,t.y),r=Ei(r,t.y+t.height),[n,r]})}function clipRectByRect(e,t){var n=K(e.x,t.x),r=Ei(e.x+e.width,t.x+t.width),i=K(e.y,t.y),a=Ei(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function createIcon(e,t,n){var r=extend({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),defaults(i,n),new ro(r)):makePath(e.replace(`path://`,``),r,n,`center`)}function linePolygonIntersect(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(lineLineIntersect(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function lineLineIntersect(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=crossProduct2d(u,d,c,l);if(nearZero(f))return!1;var p=e-i,m=t-a,h=crossProduct2d(p,m,c,l)/f;if(h<0||h>1)return!1;var g=crossProduct2d(p,m,u,d)/f;return!(g<0||g>1)}function crossProduct2d(e,t,n,r){return e*r-n*t}function nearZero(e){return e<=1e-6&&e>=-1e-6}function expandOrShrinkRect(e,t,n,r,i){return t==null?e:(isNumber(t)?X[0]=X[1]=X[2]=X[3]=t:(X[0]=t[0],X[1]=t[1],X[2]=t[2],X[3]=t[3]),r&&(X[0]=K(0,X[0]),X[1]=K(0,X[1]),X[2]=K(0,X[2]),X[3]=K(0,X[3])),n&&(X[0]=-X[0],X[1]=-X[1],X[2]=-X[2],X[3]=-X[3]),expandRectOnOneDimension(e,X,`x`,`width`,3,1,i&&i[0]||0),expandRectOnOneDimension(e,X,`y`,`height`,0,2,i&&i[1]||0),e)}var X=[0,0,0,0];function expandRectOnOneDimension(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=K(0,Ei(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:Di(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function setTooltipConfig(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=isString(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&each$4(keys(c),function(e){hasOwn(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Y(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:defaults({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function traverseElement(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function traverseElements(e,t){if(e)if(isArray(e))for(var n=0;n<e.length;n++)traverseElement(e[n],t);else traverseElement(e,t)}function isBoundingRectAxisAligned(e){return!e||Di(e[1])<Qs&&Di(e[2])<Qs||Di(e[0])<Qs&&Di(e[3])<Qs}var Qs=1e-5;function ensureCopyRect(e,t){return e?G.copy(e,t):t.clone()}function ensureCopyTransform(e,t){return t?copy(e||create(),t):void 0}function retrieveZInfo(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function calcZ2Range(e){var t=-1/0,n=1/0;traverseElement(e,function(e){visitEl(e),visitEl(e.getTextContent()),visitEl(e.getTextGuideLine())});function visitEl(e){if(!(!e||e.isGroup)){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)calcZ2(e.states[t[n]]);calcZ2(e)}}function calcZ2(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function traverseUpdateZ(e,t,n){doUpdateZ(e,t,n,-1/0)}function doUpdateZ(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=K(doUpdateZ(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=K(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function payloadDisableAnimation(e){return e.animation={duration:0},e}function decomposeTransform(e,t){return t?copy($s.transform,t):identity($s.transform),$s.decomposeTransform(),copyTransform(e,$s),e}var $s=new si;$s.transform=create();function getCurrentCanvasPainter(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}registerShape(`circle`,$o),registerShape(`ellipse`,ts),registerShape(`sector`,ms),registerShape(`ring`,gs),registerShape(`polygon`,vs),registerShape(`polyline`,bs),registerShape(`rect`,so),registerShape(`line`,Cs),registerShape(`bezierCurve`,Es),registerShape(`arc`,Os);var ec={};function setLabelText(e,t){for(var n=0;n<jo.length;n++){var r=jo[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function getLabelText(e,t,n){var r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;r&&(s=r.getFormattedLabel(i,`normal`,null,a,o&&o.get(`formatter`),n==null?null:{interpolatedValue:n})),s??(s=isFunction(e.defaultText)?e.defaultText(i,e,n):e.defaultText);for(var c={normal:s},l=0;l<jo.length;l++){var u=jo[l],d=t[u];c[u]=retrieve2(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function setLabelStyle(e,t,n,r){n=n||ec;for(var i=e instanceof po,a=!1,o=0;o<Mo.length;o++){var s=t[Mo[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new po,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=getLabelText(n,t),u=t.normal,d=!!u.getShallow(`show`),f=createTextStyle(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(createTextConfig(u,n,!1));for(var o=0;o<jo.length;o++){var p=jo[o],s=t[p];if(s){var m=c.ensureState(p),h=!!retrieve2(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=createTextStyle(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=createTextConfig(s,n,!0)}}}c.silent=!!u.getShallow(`silent`),c.style.x!=null&&(f.x=c.style.x),c.style.y!=null&&(f.y=c.style.y),c.ignore=!d,c.useStyle(f),c.dirty(),n.enableTextSetter&&(ic(c).setLabelText=function(e){var r=getLabelText(n,t,e);setLabelText(c,r)})}else c&&(c.ignore=!0);e.dirty()}function getLabelStatesModels(e,t){t=t||`label`;for(var n={normal:e.getModel(t)},r=0;r<jo.length;r++){var i=jo[r];n[i]=e.getModel([i,t])}return n}function createTextStyle(e,t,n,r,i){var a={};return setTextStyleCommon(a,e,n,r,i),t&&extend(a,t),a}function createTextConfig(e,t,n){t=t||{};var r={},i,a=e.getShallow(`rotate`),o=retrieve2(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function setTextStyleCommon(e,t,n,r,i){n=n||ec;var a=t.ecModel,o=a&&a.option.textStyle,s=getRichItemNames(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=retrieve2(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);setTokenTextStyle(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=isNumber(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=ac.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=normalizeCssArray$1(_),h.__marginType=ac.textMargin)}setTokenTextStyle(e,t,o,null,null,n,r,i,!0,!1)}function getRichItemNames(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||ec).rich;if(n){t=t||{};for(var r=keys(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var tc=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],nc=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],rc=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function setTokenTextStyle(e,t,n,r,i,a,o,s,c,l){n=!o&&n||ec;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=retrieve2(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d=d||n.color,f=f||n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=retrieve2(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=retrieve2(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=retrieve2(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var _=0;_<tc.length;_++){var v=tc[_],y=i!==!1&&r?retrieve3(t.getShallow(v),r.getShallow(v),n[v]):retrieve2(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<nc.length;_++){var v=nc[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<rc.length;_++){var v=rc[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function getFont(e,t){var n=t&&t.getModel(`textStyle`);return trim([e.fontStyle||n&&n.getShallow(`fontStyle`)||``,e.fontWeight||n&&n.getShallow(`fontWeight`)||``,(e.fontSize||n&&n.getShallow(`fontSize`)||12)+`px`,e.fontFamily||n&&n.getShallow(`fontFamily`)||`sans-serif`].join(` `))}var ic=makeInner(),ac={minMargin:1,textMargin:2},oc=[`textStyle`,`color`],sc=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],cc=new po,lc=function(){function TextStyleMixin(){}return TextStyleMixin.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(oc):null)},TextStyleMixin.prototype.getFont=function(){return getFont({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},TextStyleMixin.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<sc.length;n++)t[sc[n]]=this.getShallow(sc[n]);return cc.useStyle(t),cc.update(),cc.getBoundingRect()},TextStyleMixin}(),uc=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],dc=makeStyleMapper(uc),fc=function(){function LineStyleMixin(){}return LineStyleMixin.prototype.getLineStyle=function(e){return dc(this,e)},LineStyleMixin}(),pc=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],mc=makeStyleMapper(pc),hc=function(){function ItemStyleMixin(){}return ItemStyleMixin.prototype.getItemStyle=function(e,t){return mc(this,e,t)},ItemStyleMixin}(),gc=function(){function Model(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return Model.prototype.init=function(e,t,n){},Model.prototype.mergeOption=function(e,t){merge(this.option,e,!0)},Model.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},Model.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},Model.prototype.getModel=function(e,t){var n=e!=null,r=n?this.parsePath(e):null,i=n?this._doGet(r):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),new Model(i,t,this.ecModel)},Model.prototype.isEmpty=function(){return this.option==null},Model.prototype.restoreData=function(){},Model.prototype.clone=function(){var e=this.constructor;return new e(clone$2(this.option))},Model.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},Model.prototype.resolveParentPath=function(e){return e},Model.prototype.isAnimationEnabled=function(){if(!H.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},Model.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&!(e[r]&&(n=n&&typeof n==`object`?n[e[r]]:null,n==null));r++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},Model}();enableClassExtend(gc),enableClassCheck(gc),mixin(gc,fc),mixin(gc,hc),mixin(gc,ea),mixin(gc,lc);var _c=Math.round(Math.random()*10);function getUID(e){return[e||``,_c++].join(`_`)}function enableSubTypeDefaulter(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=parseClassType(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=parseClassType(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function enableTopologicalTravel(e,t){e.topologicalTravel=function(e,t,n,r){if(!e.length)return;var i=makeDepndencyGraph(t),a=i.graph,o=i.noEntryList,s={};for(each$4(e,function(e){s[e]=!0});o.length;){var c=o.pop(),l=a[c],u=!!s[c];u&&(n.call(r,c,l.originalDeps.slice()),delete s[c]),each$4(l.successor,u?removeEdgeAndAdd:removeEdge)}each$4(s,function(){throw Error(``)});function removeEdge(e){a[e].entryCount--,a[e].entryCount===0&&o.push(e)}function removeEdgeAndAdd(e){s[e]=!0,removeEdge(e)}};function makeDepndencyGraph(e){var n={},r=[];return each$4(e,function(i){var a=createDependencyGraphItem(n,i),o=getAvailableDependencies(a.originalDeps=t(i),e);a.entryCount=o.length,a.entryCount===0&&r.push(i),each$4(o,function(e){indexOf(a.predecessor,e)<0&&a.predecessor.push(e);var t=createDependencyGraphItem(n,e);indexOf(t.successor,e)<0&&t.successor.push(i)})}),{graph:n,noEntryList:r}}function createDependencyGraphItem(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function getAvailableDependencies(e,t){var n=[];return each$4(e,function(e){indexOf(t,e)>=0&&n.push(e)}),n}}function inheritDefaultOption(e,t){return merge(merge({},e,!0),t,!0)}var vc={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:`. `}}}},yc={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},bc=`ZH`,xc=`EN`,Sc=xc,Cc={},wc={},Tc=H.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Sc).toUpperCase().indexOf(bc)>-1?bc:Sc}():Sc;function registerLocale(e,t){e=e.toUpperCase(),wc[e]=new gc(t),Cc[e]=t}function createLocaleObject(e){if(isString(e)){var t=Cc[e.toUpperCase()]||{};return e===bc||e===xc?clone$2(t):merge(clone$2(t),clone$2(Cc[Sc]),!1)}else return merge(clone$2(e),clone$2(Cc[Sc]),!1)}function getLocaleModel(e){return wc[e]}function getDefaultLocaleModel(){return wc[Sc]}registerLocale(xc,vc),registerLocale(bc,yc);var Ec=null;function getScaleBreakHelper(){return Ec}function simplyParseBreakOption(e,t){var n=getScaleBreakHelper(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function getBreaksUnsafe(e){var t=e.brk;return t?t.breaks:[]}function hasBreaks(e){var t=e.brk;return t?t.hasBreaks():!1}var Dc=1e3,Oc=Dc*60,kc=Oc*60,Ac=kc*24,jc=Ac*365,Mc={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})/},Nc={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Pc=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Fc=`{yyyy}-{MM}-{dd}`,Ic={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Fc,hour:Fc+` `+Nc.hour,minute:Fc+` `+Nc.minute,second:Fc+` `+Nc.second,millisecond:Pc},Lc=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Rc=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function parseTimeAxisLabelFormatter(e){return!isString(e)&&!isFunction(e)?parseTimeAxisLabelFormatterDictionary(e):e}function parseTimeAxisLabelFormatterDictionary(e){e=e||{};var t={},n=!0;return each$4(Lc,function(t){n&&(n=e[t]==null)}),each$4(Lc,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Lc[s],l=isObject$2(a)&&!isArray(a)?a[c]:a,u=void 0;isArray(l)?(u=l.slice(),o=u[0]||``):isString(l)?(o=l,u=[o]):(o==null?o=Nc[r]:Mc[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function pad(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function getPrimaryTimeUnit(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function isPrimaryTimeUnit(e){return e===getPrimaryTimeUnit(e)}function getDefaultFormatPrecisionOfInterval(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function format(e,t,n,r){var i=parseDate(e),a=i[fullYearGetterName(n)](),o=i[monthGetterName(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[dateGetterName(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[hoursGetterName(n)](),d=(u-1)%12+1,f=i[minutesGetterName(n)](),p=i[secondsGetterName(n)](),m=i[millisecondsGetterName(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof gc?r:getLocaleModel(r||Tc)||getDefaultLocaleModel()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,pad(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,pad(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,pad(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,pad(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,pad(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,pad(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,pad(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,pad(m,3)).replace(/{S}/g,m+``)}function leveledFormat(e,t,n,r,i){var a=null;if(isString(n))a=n;else if(isFunction(n)){var o={time:e.time,level:e.time?e.time.level:0},s=getScaleBreakHelper();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=getUnitFromValue(e.value,i);a=n[u][u][0]}}return format(new Date(e.value),a,i,r)}function getUnitFromValue(e,t){var n=parseDate(e),r=n[monthGetterName(t)]()+1,i=n[dateGetterName(t)](),a=n[hoursGetterName(t)](),o=n[minutesGetterName(t)](),s=n[secondsGetterName(t)](),c=n[millisecondsGetterName(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function roundTime(e,t,n){switch(t){case`year`:e[monthSetterName(n)](0);case`month`:e[dateSetterName(n)](1);case`day`:e[hoursSetterName(n)](0);case`hour`:e[minutesSetterName(n)](0);case`minute`:e[secondsSetterName(n)](0);case`second`:e[millisecondsSetterName(n)](0)}return e}function fullYearGetterName(e){return e?`getUTCFullYear`:`getFullYear`}function monthGetterName(e){return e?`getUTCMonth`:`getMonth`}function dateGetterName(e){return e?`getUTCDate`:`getDate`}function hoursGetterName(e){return e?`getUTCHours`:`getHours`}function minutesGetterName(e){return e?`getUTCMinutes`:`getMinutes`}function secondsGetterName(e){return e?`getUTCSeconds`:`getSeconds`}function millisecondsGetterName(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function fullYearSetterName(e){return e?`setUTCFullYear`:`setFullYear`}function monthSetterName(e){return e?`setUTCMonth`:`setMonth`}function dateSetterName(e){return e?`setUTCDate`:`setDate`}function hoursSetterName(e){return e?`setUTCHours`:`setHours`}function minutesSetterName(e){return e?`setUTCMinutes`:`setMinutes`}function secondsSetterName(e){return e?`setUTCSeconds`:`setSeconds`}function millisecondsSetterName(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function addCommas(e){if(!isNumeric(e))return isString(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function toCamelCase(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var zc=normalizeCssArray$1;function makeValueReadable(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function stringToUserReadable(e){return e&&trim(e)?e:`-`}function isNumberUserReadable(e){return isNullableNumberFinite(e)}var i=t===`time`,a=e instanceof Date;if(i||a){var o=i?parseDate(e):e;if(!isNaN(+o))return format(o,r,n);if(a)return`-`}if(t===`ordinal`)return isStringSafe(e)?stringToUserReadable(e):isNumber(e)&&isNumberUserReadable(e)?e+``:`-`;var s=numericToNumber(e);return isNumberUserReadable(s)?addCommas(s):isStringSafe(e)?stringToUserReadable(e):typeof e==`boolean`?e+``:`-`}var Bc=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],wrapVar=function(e,t){return`{`+e+(t??``)+`}`};function formatTpl(e,t,n){isArray(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=Bc[a];e=e.replace(wrapVar(o),wrapVar(o,0))}for(var s=0;s<r;s++)for(var c=0;c<i.length;c++){var l=t[s][i[c]];e=e.replace(wrapVar(Bc[c],s),n?encodeHTML(l):l)}return e}function getTooltipMarker(e,t){var n=isString(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||`html`;return r?a===`html`?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:`+encodeHTML(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+encodeHTML(r)+`;`+(t||``)+`"></span>`:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function convertToColorString(e,t){return t=t||`transparent`,isString(e)?e:isObject$2(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Vc={},Hc={},Uc=function(){function CoordinateSystemManager(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return CoordinateSystemManager.prototype.create=function(e,t){this._nonSeriesBoxMasterList=dealCreate(Vc,!0),this._normalMasterList=dealCreate(Hc,!1);function dealCreate(n,r){var i=[];return each$4(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},CoordinateSystemManager.prototype.update=function(e,t){each$4(this._normalMasterList,function(n){n.update&&n.update(e,t)})},CoordinateSystemManager.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},CoordinateSystemManager.register=function(e,t){if(e===`matrix`||e===`calendar`){Vc[e]=t;return}Hc[e]=t},CoordinateSystemManager.get=function(e){return Hc[e]||Vc[e]},CoordinateSystemManager}();function canBeNonSeriesBoxCoordSys(e){return!!Vc[e]}var Wc=createHashMap();function getCoordForCoordSysUsageKindBox(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=Wc.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function decideCoordSysUsageKind(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??(r=a?`data`:`box`),r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!canBeNonSeriesBoxCoordSys(n)&&(i=0))}return{coordSysType:n,kind:i}}function injectCoordSysByOption(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=decideCoordSysUsageKind(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var Gc=each$4,Kc=[`left`,`right`,`top`,`bottom`,`width`,`height`],qc=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function boxLayout(e,t,n,r,i){var a=0,o=0;r??(r=1/0),i??(i=1/0);var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var Jc=boxLayout;curry$1(boxLayout,`vertical`),curry$1(boxLayout,`horizontal`);function getBoxLayoutParams(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function getLayoutRect(e,t,n){n=zc(n||0);var r=t.width,i=t.height,a=Ii(e.left,r),o=Ii(e.top,i),s=Ii(e.right,r),c=Ii(e.bottom,i),l=Ii(e.width,r),u=Ii(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a=a||0,o=o||0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new G((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var Yc={rect:1,point:2};function createBoxLayoutReference(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=getCoordForCoordSysUsageKindBox(e),l=c.coord,u=c.from;if(o.dataToLayout){a=Yc.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Yc.point,s=u,i=o.dataToPoint(l))}return a??(a=Yc.rect),a===Yc.rect&&(r||(r={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function fetchLayoutMode(e){var t=e.layoutMode||e.constructor.layoutMode;return isObject$2(t)?t:t?{type:t}:null}function mergeLayoutParam(e,t,n){var r=n&&n.ignoreSize;!isArray(r)&&(r=[r,r]);var i=merge(qc[0],0),a=merge(qc[1],1);copy(qc[0],e,i),copy(qc[1],e,a);function merge(n,i){var a={},o=0,s={},c=0,l=2;if(Gc(n,function(t){s[t]=e[t]}),Gc(n,function(e){hasOwn(t,e)&&(a[e]=s[e]=t[e]),hasValue(a,e)&&o++,hasValue(s,e)&&c++}),r[i])return hasValue(t,n[1])?s[n[2]]=null:hasValue(t,n[2])&&(s[n[1]]=null),s;if(c===l||!o)return s;if(o>=l)return a;for(var u=0;u<n.length;u++){var d=n[u];if(!hasOwn(a,d)&&hasOwn(e,d)){a[d]=e[d];break}}return a}function hasValue(e,t){return e[t]!=null&&e[t]!==`auto`}function copy(e,t,n){Gc(e,function(e){t[e]=n[e]})}}function getLayoutParams(e){return copyLayoutParams({},e)}function copyLayoutParams(e,t){return t&&e&&Gc(Kc,function(n){hasOwn(t,n)&&(e[n]=t[n])}),e}var Xc=makeInner(),Z=function(e){__extends$1(ComponentModel,e);function ComponentModel(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=getUID(`ec_cpt_model`),i}return ComponentModel.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},ComponentModel.prototype.mergeDefaultAndTheme=function(e,t){var n=fetchLayoutMode(this),r=n?getLayoutParams(e):{};merge(e,t.getTheme().get(this.mainType)),merge(e,this.getDefaultOption()),n&&mergeLayoutParam(e,r,n)},ComponentModel.prototype.mergeOption=function(e,t){merge(this.option,e,!0);var n=fetchLayoutMode(this);n&&mergeLayoutParam(this.option,e,n)},ComponentModel.prototype.optionUpdated=function(e,t){},ComponentModel.prototype.getDefaultOption=function(){var e=this.constructor;if(!isExtendedClass(e))return e.defaultOption;var t=Xc(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=merge(a,n[o],!0);t.defaultOption=a}return t.defaultOption},ComponentModel.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return queryReferringComponents(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},ComponentModel.prototype.getBoxLayoutParams=function(){return getBoxLayoutParams(this,!1)},ComponentModel.prototype.getZLevelKey=function(){return``},ComponentModel.prototype.setZLevel=function(e){this.option.zlevel=e},ComponentModel.protoInitialize=function(){var e=ComponentModel.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),ComponentModel}(gc);mountExtend(Z,gc),enableClassManagement(Z),enableSubTypeDefaulter(Z),enableTopologicalTravel(Z,getDependencies);function getDependencies(e){var t=[];return each$4(Z.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=map$1(t,function(e){return parseClassType(e).main}),e!==`dataset`&&indexOf(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Q={color:{},darkColor:{},size:{}},Zc=Q.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)`};for(var Qc in extend(Zc,{primary:Zc.neutral80,secondary:Zc.neutral70,tertiary:Zc.neutral60,quaternary:Zc.neutral50,disabled:Zc.neutral20,border:Zc.neutral30,borderTint:Zc.neutral20,borderShade:Zc.neutral40,background:Zc.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Zc.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Zc.neutral70,axisLineTint:Zc.neutral40,axisTick:Zc.neutral70,axisTickMinor:Zc.neutral60,axisLabel:Zc.neutral70,axisSplitLine:Zc.neutral15,axisMinorSplitLine:Zc.neutral05}),Zc)if(Zc.hasOwnProperty(Qc)){var $c=Zc[Qc];Qc===`theme`?Q.darkColor.theme=Zc.theme.slice():Qc===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:Qc.indexOf(`accent`)===0?Q.darkColor[Qc]=modifyHSL($c,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[Qc]=modifyHSL($c,null,function(e){return e*.9},function(e){return 1-e**1.5})}Q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var el=``;typeof navigator<`u`&&(el=navigator.platform||``);var tl=`rgba(0, 0, 0, 0.2)`,nl=Q.color.theme[0],rl=modifyHSL(nl,null,null,.9),il={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[rl,nl],aria:{decal:{decals:[{color:tl,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:tl,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:tl,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:tl,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:tl,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:tl,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:el.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},al={Must:1,Might:2,Not:3},ol=makeInner();function resetSourceDefaulter(e){ol(e).datasetMap=createHashMap()}function makeSeriesEncodeForAxisCoordSys(e,t,n){var r={},i=querySeriesUpstreamDatasetModel(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=ol(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),each$4(e,function(t,n){var i=isObject$2(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=getDataDimCountOnCoordDim(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});each$4(e,function(e,t){var n=e.name,i=getDataDimCountOnCoordDim(e);if(u==null){var s=f.valueWayDim;pushDim(r[n],s,i),pushDim(o,s,i),f.valueWayDim+=i}else if(u===t)pushDim(r[n],0,i),pushDim(a,0,i);else{var s=f.categoryWayDim;pushDim(r[n],s,i),pushDim(o,s,i),f.categoryWayDim+=i}});function pushDim(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function getDataDimCountOnCoordDim(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function querySeriesUpstreamDatasetModel(e){if(!e.get(`data`,!0))return queryReferringComponents(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Ki).models[0]}function queryDatasetUpstreamDatasetModels(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:queryReferringComponents(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Ki).models}function guessOrdinal(e,t){return doGuessOrdinal(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function doGuessOrdinal(e,t,n,r,i,a){var o,s=5;if(isTypedArray(e))return al.Not;var c,l;if(r){var u=r[a];isObject$2(u)?(c=u.name,l=u.type):isString(u)&&(c=u)}if(l!=null)return l===`ordinal`?al.Must:al.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=detectValue(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=detectValue(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return al.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=detectValue(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return al.Not;var f=_[c];if(!f||isTypedArray(f))return al.Not;for(var p=0;p<f.length&&p<s;p++)if((o=detectValue(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=getDataItemValue(g);if(!isArray(y))return al.Not;if((o=detectValue(y[a]))!=null)return o}function detectValue(e){var t=isString(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?al.Might:al.Not;if(t&&e!==`-`)return al.Must}return al.Not}var sl=createHashMap();function concatInternalOptions(e,t,n){var r=sl.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var cl=makeInner();makeInner();var ll=function(){function PaletteMixin(){}return PaletteMixin.prototype.getColorFromPalette=function(e,t,n){var r=normalizeToArray(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return getFromPalette(this,cl,r,i,e,t,n)},PaletteMixin.prototype.clearColorPalette=function(){clearPalette(this,cl)},PaletteMixin}();function getNearestPalette(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function getFromPalette(e,t,n,r,i,a,o){a=a||e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:getNearestPalette(r,o);if(u=u||n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function clearPalette(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var reCreateSeriesIndices,assertSeriesInitialized,initBase,ul=`\0_ec_inner`,dl=1,fl=function(e){__extends$1(GlobalModel,e);function GlobalModel(){return e!==null&&e.apply(this,arguments)||this}return GlobalModel.prototype.init=function(e,t,n,r,i,a){r=r||{},this.option=null,this._theme=new gc(r),this._locale=new gc(i),this._optionManager=a},GlobalModel.prototype.setOption=function(e,t,n){var r=normalizeSetOptionInput(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},GlobalModel.prototype.resetOption=function(e,t){return this._resetOption(e,normalizeSetOptionInput(t))},GlobalModel.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?initBase(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&each$4(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},GlobalModel.prototype.mergeOption=function(e){this._mergeOption(e,null)},GlobalModel.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=createHashMap(),s=t&&t.replaceMergeMainTypeMap;resetSourceDefaulter(this),each$4(e,function(e,t){e!=null&&(Z.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?clone$2(e):merge(n[t],e,!0))}),s&&s.each(function(e,t){Z.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),Z.topologicalTravel(a,Z.getAllClassMainTypes(),visitComponent,this);function visitComponent(t){var a=concatInternalOptions(this,t,normalizeToArray(e[t])),o=r.get(t),c=mappingToExists(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);setComponentTypeToKeyInfo(c,t,Z),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;each$4(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=Z.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=extend({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),extend(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&reCreateSeriesIndices(this)}this._seriesIndices||reCreateSeriesIndices(this)},GlobalModel.prototype.getOption=function(){var e=clone$2(this.option);return each$4(e,function(t,n){if(Z.hasClass(n)){for(var r=normalizeToArray(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!isComponentIdInternal(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[ul],e},GlobalModel.prototype.setTheme=function(e){this._theme=new gc(e),this._resetOption(`recreate`,null)},GlobalModel.prototype.getTheme=function(){return this._theme},GlobalModel.prototype.getLocaleModel=function(){return this._locale},GlobalModel.prototype.setUpdatePayload=function(e){this._payload=e},GlobalModel.prototype.getUpdatePayload=function(){return this._payload},GlobalModel.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},GlobalModel.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?filter(a,function(e){return!!e}):queryByIdOrName(`name`,i,a):queryByIdOrName(`id`,r,a):(o=[],each$4(normalizeToArray(n),function(e){a[e]&&o.push(a[e])})),filterBySubType(o,e)},GlobalModel.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=getQueryCond(t);return doFilter(filterBySubType(r?this.queryComponents(r):filter(this._componentsMap.get(n),function(e){return!!e}),e));function getQueryCond(e){var t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function doFilter(t){return e.filter?filter(t,e.filter):t}},GlobalModel.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(isFunction(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=isString(e)?r.get(e):isObject$2(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},GlobalModel.prototype.getSeriesByName=function(e){var t=convertOptionIdName(e,null);return filter(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},GlobalModel.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},GlobalModel.prototype.getSeriesByType=function(e){return filter(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},GlobalModel.prototype.getSeries=function(){return filter(this._componentsMap.get(`series`),function(e){return!!e})},GlobalModel.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},GlobalModel.prototype.eachSeries=function(e,t){assertSeriesInitialized(this),each$4(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},GlobalModel.prototype.eachRawSeries=function(e,t){each$4(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},GlobalModel.prototype.eachSeriesByType=function(e,t,n){assertSeriesInitialized(this),each$4(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},GlobalModel.prototype.eachRawSeriesByType=function(e,t,n){return each$4(this.getSeriesByType(e),t,n)},GlobalModel.prototype.isSeriesFiltered=function(e){return assertSeriesInitialized(this),this._seriesIndicesMap.get(e.componentIndex)==null},GlobalModel.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},GlobalModel.prototype.filterSeries=function(e,t){assertSeriesInitialized(this);var n=[];each$4(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=createHashMap(n)},GlobalModel.prototype.restoreData=function(e){reCreateSeriesIndices(this);var t=this._componentsMap,n=[];t.each(function(e,t){Z.hasClass(t)&&n.push(t)}),Z.topologicalTravel(n,Z.getAllClassMainTypes(),function(n){each$4(t.get(n),function(t){t&&(n!==`series`||!isNotTargetSeries(t,e))&&t.restoreData()})})},GlobalModel.internalField=function(){reCreateSeriesIndices=function(e){var t=e._seriesIndices=[];each$4(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=createHashMap(t)},assertSeriesInitialized=function(e){},initBase=function(e,t){e.option={},e.option[ul]=dl,e._componentsMap=createHashMap({series:[]}),e._componentsCount=createHashMap();var n=t.aria;isObject$2(n)&&n.enabled==null&&(n.enabled=!0),mergeTheme(t,e._theme.option),merge(t,il,!1),e._mergeOption(t,null)}}(),GlobalModel}(gc);function isNotTargetSeries(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function mergeTheme(e,t){var n=e.color&&!e.colorLayer;each$4(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||Z.hasClass(r)||(typeof t==`object`?e[r]=e[r]?merge(e[r],t,!1):clone$2(t):e[r]??(e[r]=t))})}function queryByIdOrName(e,t,n){if(isArray(t)){var r=createHashMap();return each$4(t,function(e){e!=null&&convertOptionIdName(e,null)!=null&&r.set(e,!0)}),filter(n,function(t){return t&&r.get(t[e])})}else{var i=convertOptionIdName(t,null);return filter(n,function(t){return t&&i!=null&&t[e]===i})}}function filterBySubType(e,t){return t.hasOwnProperty(`subType`)?filter(e,function(e){return e&&e.subType===t.subType}):e}function normalizeSetOptionInput(e){var t=createHashMap();return e&&each$4(normalizeToArray(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}mixin(fl,ll);var pl=/^(min|max)?(.+)$/,ml=function(){function OptionManager(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return OptionManager.prototype.setOption=function(e,t,n){e&&(each$4(normalizeToArray(e.series),function(e){e&&e.data&&isTypedArray(e.data)&&setAsPrimitive(e.data)}),each$4(normalizeToArray(e.dataset),function(e){e&&e.source&&isTypedArray(e.source)&&setAsPrimitive(e.source)})),e=clone$2(e);var r=this._optionBackup,i=parseRawOption(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},OptionManager.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],clone$2(e?t.baseOption:this._newBaseOption)},OptionManager.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=clone$2(n[r.getCurrentIndex()]))}return t},OptionManager.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)applyMediaQuery(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!indicesEquals(a,this._currentMediaIndices)&&(o=map$1(a,function(e){return clone$2(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},OptionManager}();function parseRawOption(e,t,n){var r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&isArray(l)&&each$4(l,function(e){e&&e.option&&(e.query?r.push(e):i||(i=e))}),doPreprocess(a),each$4(c,function(e){return doPreprocess(e)}),each$4(r,function(e){return doPreprocess(e.option)});function doPreprocess(e){each$4(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function applyMediaQuery(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return each$4(e,function(e,t){var n=t.match(pl);if(!(!n||!n[1]||!n[2])){var a=n[1];compare(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function compare(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function indicesEquals(e,t){return e.join(`,`)===t.join(`,`)}var hl=each$4,gl=isObject$2,_l=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function compatEC2ItemStyle(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=_l.length;n<r;n++){var i=_l[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?merge(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?merge(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function convertNormalEmphasis(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,defaults(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function removeEC3NormalStatus(e){convertNormalEmphasis(e,`itemStyle`),convertNormalEmphasis(e,`lineStyle`),convertNormalEmphasis(e,`areaStyle`),convertNormalEmphasis(e,`label`),convertNormalEmphasis(e,`labelLine`),convertNormalEmphasis(e,`upperLabel`),convertNormalEmphasis(e,`edgeLabel`)}function compatTextStyle(e,t){var n=gl(e)&&e[t],r=gl(n)&&n.textStyle;if(r)for(var i=0,a=Wi.length;i<a;i++){var o=Wi[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function compatEC3CommonStyles(e){e&&(removeEC3NormalStatus(e),compatTextStyle(e,`label`),e.emphasis&&compatTextStyle(e.emphasis,`label`))}function processSeries(e){if(gl(e)){compatEC2ItemStyle(e),removeEC3NormalStatus(e),compatTextStyle(e,`label`),compatTextStyle(e,`upperLabel`),compatTextStyle(e,`edgeLabel`),e.emphasis&&(compatTextStyle(e.emphasis,`label`),compatTextStyle(e.emphasis,`upperLabel`),compatTextStyle(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(compatEC2ItemStyle(t),compatEC3CommonStyles(t));var n=e.markLine;n&&(compatEC2ItemStyle(n),compatEC3CommonStyles(n));var r=e.markArea;r&&compatEC3CommonStyles(r);var i=e.data;if(e.type===`graph`){i=i||e.nodes;var a=e.links||e.edges;if(a&&!isTypedArray(a))for(var o=0;o<a.length;o++)compatEC3CommonStyles(a[o]);each$4(e.categories,function(e){removeEC3NormalStatus(e)})}if(i&&!isTypedArray(i))for(var o=0;o<i.length;o++)compatEC3CommonStyles(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)compatEC3CommonStyles(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)isArray(c[o])?(compatEC3CommonStyles(c[o][0]),compatEC3CommonStyles(c[o][1])):compatEC3CommonStyles(c[o]);e.type===`gauge`?(compatTextStyle(e,`axisLabel`),compatTextStyle(e,`title`),compatTextStyle(e,`detail`)):e.type===`treemap`?(convertNormalEmphasis(e.breadcrumb,`itemStyle`),each$4(e.levels,function(e){removeEC3NormalStatus(e)})):e.type===`tree`&&removeEC3NormalStatus(e.leaves)}}function toArr(e){return isArray(e)?e:e?[e]:[]}function toObj(e){return(isArray(e)?e[0]:e)||{}}function globalCompatStyle(e,t){hl(toArr(e.series),function(e){gl(e)&&processSeries(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),hl(n,function(t){hl(toArr(e[t]),function(e){e&&(compatTextStyle(e,`axisLabel`),compatTextStyle(e.axisPointer,`label`))})}),hl(toArr(e.parallel),function(e){var t=e&&e.parallelAxisDefault;compatTextStyle(t,`axisLabel`),compatTextStyle(t&&t.axisPointer,`label`)}),hl(toArr(e.calendar),function(e){convertNormalEmphasis(e,`itemStyle`),compatTextStyle(e,`dayLabel`),compatTextStyle(e,`monthLabel`),compatTextStyle(e,`yearLabel`)}),hl(toArr(e.radar),function(e){compatTextStyle(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),hl(toArr(e.geo),function(e){gl(e)&&(compatEC3CommonStyles(e),hl(toArr(e.regions),function(e){compatEC3CommonStyles(e)}))}),hl(toArr(e.timeline),function(e){compatEC3CommonStyles(e),convertNormalEmphasis(e,`label`),convertNormalEmphasis(e,`itemStyle`),convertNormalEmphasis(e,`controlStyle`,!0);var t=e.data;isArray(t)&&each$4(t,function(e){isObject$2(e)&&(convertNormalEmphasis(e,`label`),convertNormalEmphasis(e,`itemStyle`))})}),hl(toArr(e.toolbox),function(e){convertNormalEmphasis(e,`iconStyle`),hl(e.feature,function(e){convertNormalEmphasis(e,`iconStyle`)})}),compatTextStyle(toObj(e.axisPointer),`label`),compatTextStyle(toObj(e.tooltip).axisPointer,`label`)}function get(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r=r&&r[n[i]],r!=null);i++);return r}function set(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function compatLayoutProperties(e){e&&each$4(vl,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var vl=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],yl=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],bl=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function compatBarItemStyle(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<bl.length;n++){var r=bl[n][1],i=bl[n][0];t[r]!=null&&(t[i]=t[r])}}function compatPieLabel(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function compatSunburstState(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function compatGraphFocus(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function traverseTree(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&traverseTree(e[n].children,t)}function globalBackwardCompat(e,t){globalCompatStyle(e,t),e.series=normalizeToArray(e.series),each$4(e.series,function(e){if(isObject$2(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),compatPieLabel(e.label);var n=e.data;if(n&&!isTypedArray(n))for(var r=0;r<n.length;r++)compatPieLabel(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=get(e,`pointer.color`);i!=null&&set(e,`itemStyle.color`,i)}else if(t===`bar`){compatBarItemStyle(e),compatBarItemStyle(e.backgroundStyle),compatBarItemStyle(e.emphasis);var n=e.data;if(n&&!isTypedArray(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(compatBarItemStyle(n[r]),compatBarItemStyle(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),compatSunburstState(e),traverseTree(e.data,compatSunburstState)}else t===`graph`||t===`sankey`?compatGraphFocus(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&defaults(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),compatLayoutProperties(e)}}),e.dataRange&&(e.visualMap=e.dataRange),each$4(yl,function(t){var n=e[t];n&&(isArray(n)||(n=[n]),each$4(n,function(e){compatLayoutProperties(e)}))})}var xl=createSimpleOverallStageHandler2(dataStack);function dataStack(e){var t=createHashMap();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),each$4(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),calculateStack(e))})}function calculateStack(e){each$4(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=addSafe(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var Sl=function(){function SourceImpl(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&guessOrdinal(this,n)===al.Must&&(r.type=`ordinal`)}}return SourceImpl}();function isSourceInstance(e){return e instanceof Sl}function createSource(e,t,n){n=n||detectSourceFormat(e);var r=t.seriesLayoutBy,i=determineSourceDimensions(e,n,r,t.sourceHeader,t.dimensions);return new Sl({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:clone$2(t)})}function createSourceFromSeriesDataOption(e){return new Sl({data:e,sourceFormat:isTypedArray(e)?So:vo})}function cloneSourceShallow(e){return new Sl({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:clone$2(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function detectSourceFormat(e){var t=Co;if(isTypedArray(e))t=So;else if(isArray(e)){e.length===0&&(t=yo);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(isArray(i)||isTypedArray(i)){t=yo;break}else if(isObject$2(i)){t=bo;break}}}}else if(isObject$2(e)){for(var a in e)if(hasOwn(e,a)&&isArrayLike(e[a])){t=xo;break}}return t}function determineSourceDimensions(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:normalizeDimensionsOption(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?arrayRowsTravelFirst(function(e){e!=null&&e!==`-`&&(isString(e)?o??(o=1):o=0)},n,s,10):o=isNumber(r)?r:r?1:0,!i&&o===1&&(i=[],arrayRowsTravelFirst(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||(i=objectRowsCollectDimensions(e));else if(t===`keyedColumns`)i||(i=[],each$4(e,function(e,t){i.push(t)}));else if(t===`original`){var c=getDataItemValue(e[0]);a=isArray(c)&&c.length||1}return{startIndex:o,dimensionsDefine:normalizeDimensionsOption(i),dimensionsDetectedCount:a}}function objectRowsCollectDimensions(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return keys(n)}function normalizeDimensionsOption(e){if(e){var t=createHashMap();return map$1(e,function(e,n){e=isObject$2(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??(r.displayName=r.name);var i=t.get(r.name);return i?r.name+=`-`+ i.count++:t.set(r.name,{count:1}),r})}}function arrayRowsTravelFirst(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function shouldRetrieveDataByName(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Cl,wl,Tl,El,Dl,mountMethods,Ol=function(){function DefaultDataProvider(e,t){var n=isSourceInstance(e)?e:createSourceFromSeriesDataOption(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),mountMethods(this,r,n)}return DefaultDataProvider.prototype.getSource=function(){return this._source},DefaultDataProvider.prototype.count=function(){return 0},DefaultDataProvider.prototype.getItem=function(e,t){},DefaultDataProvider.prototype.appendData=function(e){},DefaultDataProvider.prototype.clean=function(){},DefaultDataProvider.protoInitialize=function(){var e=DefaultDataProvider.prototype;e.pure=!1,e.persistent=!0}(),DefaultDataProvider.internalField=function(){var e;mountMethods=function(e,t,n){var r=n.sourceFormat,i=n.seriesLayoutBy,a=n.startIndex,o=n.dimensionsDefine,s=Dl[getMethodMapKey(r,i)];extend(e,s),r===`typedArray`?(e.getItem=getItemForTypedArray,e.count=countForTypedArray,e.fillStorage=fillStorageForTypedArray):(e.getItem=U(getRawSourceItemGetter(r,i),null,t,a,o),e.count=U(getRawSourceDataCounter(r,i),null,t,a,o))};var getItemForTypedArray=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},fillStorageForTypedArray=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},countForTypedArray=function(){return this._data?this._data.length/this._dimSize:0};Dl=(e={},e[yo+`_`+wo]={pure:!0,appendData:appendDataSimply},e[yo+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[bo]={pure:!0,appendData:appendDataSimply},e[xo]={pure:!0,appendData:function(e){var t=this._data;each$4(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[vo]={appendData:appendDataSimply},e[So]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function appendDataSimply(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),DefaultDataProvider}(),validateSimply=function(e){isArray(e)||error(`series.data or dataset.source must be an array.`)};Cl={},Cl[yo+`_`+wo]=validateSimply,Cl[yo+`_row`]=validateSimply,Cl[bo]=validateSimply,Cl[xo]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??error(`dimension name must not be null/undefined.`)},Cl[vo]=validateSimply;var getItemSimply=function(e,t,n,r){return e[r]},kl=(wl={},wl[yo+`_`+wo]=function(e,t,n,r){return e[r+t]},wl[yo+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},wl[bo]=getItemSimply,wl[xo]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},wl[vo]=getItemSimply,wl);function getRawSourceItemGetter(e,t){return kl[getMethodMapKey(e,t)]}var countSimply=function(e,t,n){return e.length},Al=(Tl={},Tl[yo+`_`+wo]=function(e,t,n){return Math.max(0,e.length-t)},Tl[yo+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Tl[bo]=countSimply,Tl[xo]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Tl[vo]=countSimply,Tl);function getRawSourceDataCounter(e,t){return Al[getMethodMapKey(e,t)]}var getRawValueSimply=function(e,t,n){return e[t]},jl=(El={},El[yo]=getRawValueSimply,El[bo]=function(e,t,n){return e[n]},El[xo]=getRawValueSimply,El[vo]=function(e,t,n){var r=getDataItemValue(e);return r instanceof Array?r[t]:r},El[So]=getRawValueSimply,El);function getRawSourceValueGetter(e){return jl[e]}function getMethodMapKey(e,t){return e===`arrayRows`?e+`_`+t:e}function retrieveRawValue(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return getRawSourceValueGetter(a)(r,o,s)}else{var c=r;return a===`original`&&(c=getDataItemValue(r)),c}}}}var Ml=/\{@(.+?)\}/g,Nl=function(){function DataFormatMixin(){}return DataFormatMixin.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},DataFormatMixin.prototype.getFormattedLabel=function(e,t,n,r,i,a){t=t||`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&isArray(s.value)&&(s.value=s.value[r]),i||(i=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`])),isFunction(i))return s.status=t,s.dimensionIndex=r,i(s);if(isString(i))return formatTpl(i,s).replace(Ml,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=retrieveRawValue(o,e,i);if(a&&isArray(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},DataFormatMixin.prototype.getRawValue=function(e,t){return retrieveRawValue(this.getData(t),e)},DataFormatMixin.prototype.formatTooltip=function(e,t,n){},DataFormatMixin}();function normalizeTooltipFormatResult(e){var t,n;return isObject$2(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function createTask(e){return new Pl(e)}var Pl=function(){function Task(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return Task.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=normalizeModBy(this._modBy),o=this._modDataCount||0,s=normalizeModBy(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function normalizeModBy(e){return!(e>=1)&&(e=1),e}var l;(this._dirty||i===`reset`)&&(this._dirty=!1,l=this._doReset(n)),this._modBy=s,this._modDataCount=c;var u=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(u==null?1/0:this._dueIndex+u,this._dueEnd);if(!n&&(l||d<f)){var p=this._progress;if(isArray(p))for(var m=0;m<p.length;m++)this._doProgress(p[m],d,f,s,c);else this._doProgress(p,d,f,s,c)}this._dueIndex=f,this._outputDueEnd=this._settedOutputEnd==null?f:this._settedOutputEnd}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},Task.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Task.prototype._doProgress=function(e,t,n,r,i){Fl.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Fl.next},this.context)},Task.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),isArray(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},Task.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Task.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},Task.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Task.prototype.getUpstream=function(){return this._upstream},Task.prototype.getDownstream=function(){return this._downstream},Task.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},Task}(),Fl=function(){var e,t,n,r,i,a={reset:function(o,s,c,l){t=o,e=s,n=c,r=l,i=Math.ceil(r/n),a.next=n>1&&r>0?modNext:sequentialNext}};return a;function sequentialNext(){return t<e?t++:null}function modNext(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}();function parseDataValue(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!isNumber(e)&&e!=null&&e!==`-`&&(e=+parseDate(e)),e==null||e===``?NaN:Number(e))}createHashMap({number:function(e){return parseFloat(e)},time:function(e){return+parseDate(e)},trim:function(e){return isString(e)?trim(e):e}});var Il={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(){function FilterOrderComparator(e,t){isNumber(t)||throwError(``),this._opFn=Il[e],this._rvalFloat=numericToNumber(t)}return FilterOrderComparator.prototype.evaluate=function(e){return isNumber(e)?this._opFn(e,this._rvalFloat):this._opFn(numericToNumber(e),this._rvalFloat)},FilterOrderComparator})();var Ll=function(){function SortOrderComparator(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??(t=n?`min`:`max`),this._incomparable=t===`min`?-1/0:1/0}return SortOrderComparator.prototype.evaluate=function(e,t){var n=isNumber(e)?e:numericToNumber(e),r=isNumber(t)?t:numericToNumber(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=isString(e),s=isString(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},SortOrderComparator}();(function(){function FilterEqualityComparator(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=numericToNumber(t)}return FilterEqualityComparator.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=numericToNumber(e)===this._rvalFloat)}return this._isEQ?t:!t},FilterEqualityComparator})();function parseSanitizationFilter(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function passesSanitizationFilter(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var Rl=function(){function ExternalSource(){}return ExternalSource.prototype.getRawData=function(){throw Error(`not supported`)},ExternalSource.prototype.getRawDataItem=function(e){throw Error(`not supported`)},ExternalSource.prototype.cloneRawData=function(){},ExternalSource.prototype.getDimensionInfo=function(e){},ExternalSource.prototype.cloneAllDimensionInfo=function(){},ExternalSource.prototype.count=function(){},ExternalSource.prototype.retrieveValue=function(e,t){},ExternalSource.prototype.retrieveValueFromItem=function(e,t){},ExternalSource.prototype.convertValue=function(e,t){return parseDataValue(e,t)},ExternalSource}();function createExternalSource(e,t){var n=new Rl,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&throwError(``);var o=[],s={},c=e.dimensionsDefine;if(c)each$4(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(hasOwn(s,n)&&throwError(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=getRawSourceItemGetter(i,wo);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=U(getRawData,null,e)),n.cloneRawData=U(cloneRawData,null,e),n.count=U(getRawSourceDataCounter(i,wo),null,r,a,o);var d=getRawSourceValueGetter(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=U(getDimensionInfo,null,o,s),n.cloneAllDimensionInfo=U(cloneAllDimensionInfo,null,o),n}function getRawData(e){var t=e.sourceFormat;return isSupportedSourceFormat(t)||throwError(``),e.data}function cloneRawData(e){var t=e.sourceFormat,n=e.data;if(isSupportedSourceFormat(t)||throwError(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}else if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(extend({},n[i]));return r}}function getDimensionInfo(e,t,n){if(n!=null){if(isNumber(n)||!isNaN(n)&&!hasOwn(t,n))return e[n];if(hasOwn(t,n))return t[n]}}function cloneAllDimensionInfo(e){return clone$2(e)}var zl=createHashMap();function registerExternalTransform(e){e=clone$2(e);var t=e.type,n=``;t||throwError(n);var r=t.split(`:`);r.length!==2&&throwError(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,zl.set(t,e)}function applyDataTransform(e,t,n){var r=normalizeToArray(e),i=r.length;i||throwError(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=applySingleDataTransform(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function applySingleDataTransform(e,t,n,r){var i=``;t.length||throwError(i),isObject$2(e)||throwError(i);var a=e.type,o=zl.get(a);o||throwError(i);var s=map$1(t,function(e){return createExternalSource(e,o)});return map$1(normalizeToArray(o.transform({upstream:s[0],upstreamList:s,config:clone$2(e.config)})),function(e,n){var r=``;isObject$2(e)||throwError(r),e.data||throwError(r),isSupportedSourceFormat(detectSourceFormat(e.data))||throwError(r);var i,a=t[0];if(a&&n===0&&!e.dimensions){var o=a.startIndex;o&&(e.data=a.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:wo,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:wo,sourceHeader:0,dimensions:e.dimensions};return createSource(e.data,i,null)})}function isSupportedSourceFormat(e){return e===`arrayRows`||e===`objectRows`}var Bl=typeof Uint32Array>`u`?Array:Uint32Array,Vl=typeof Uint16Array>`u`?Array:Uint16Array,Hl=typeof Int32Array>`u`?Array:Int32Array,Ul=typeof Float64Array>`u`?Array:Float64Array,Wl={float:Ul,int:Hl,ordinal:Array,number:Array,time:Ul},Gl;function getIndicesCtor(e){return e>65535?Bl:Vl}function cloneChunk(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function prepareStore(e,t,n,r,i){var a=Wl[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;l<s;l++)c[l]=o[l];e[t]=c}}else e[t]=new a(r)}var Kl=function(){function DataStore(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=createHashMap()}return DataStore.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=Gl[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],shouldRetrieveDataByName(r),this._dimensions=map$1(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},DataStore.prototype.getProvider=function(){return this._provider},DataStore.prototype.getSource=function(){return this._provider.getSource()},DataStore.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new Wl[t||`float`](this._rawCount),this._rawExtent[i]=initExtentForUnion(),i},DataStore.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=initExtentForUnion());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},DataStore.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},DataStore.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},DataStore.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},DataStore.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];prepareStore(n,c,l.type,s,!0)}for(var u=[],d=o;d<s;d++)for(var f=d-o,p=0;p<i;p++){var l=r[p],m=Gl.arrayRows.call(this,e[f]||u,l.property,f,p);n[p][d]=m;var h=a[p];m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},DataStore.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=map$1(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=initExtentForUnion()),prepareStore(i,l,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],f=e;f<t;f++){d=r.getItem(f,d);for(var p=0;p<o;p++){var m=i[p],h=this._dimValueGetter(d,c[p],f,p);m[f]=h;var g=s[p];h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},DataStore.prototype.count=function(){return this._count},DataStore.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},DataStore.prototype.getValues=function(e,t){var n=[],r=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},DataStore.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},DataStore.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var a=this.get(e,r);isNaN(a)||(n+=a)}return n},DataStore.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),asc(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},DataStore.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},DataStore.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=getIndicesCtor(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},DataStore.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(getIndicesCtor(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks,u=0;u<r;u++){var d=void 0,f=n.getRawIndex(u);if(o===0)d=t(u);else if(o===1){var p=l[c][f];d=t(p,u)}else{for(var m=0;m<o;m++)a[m]=l[e[m]][f];a[m]=u,d=t.apply(null,a)}d&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},DataStore.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=keys(e),i=r.length;if(!i)return this;var a=t.count(),o=new(getIndicesCtor(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){var p=0;if(i===1){for(var m=d[r[0]],h=0;h<n;h++){var g=m[h];(g>=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h<n;h++){var g=m[h],b=_[h];(g>=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f)if(i===1)for(var h=0;h<a;h++){var x=t.getRawIndex(h),g=d[r[0]][x];(g>=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;h<a;h++){for(var S=!0,x=t.getRawIndex(h),C=0;C<i;C++){var w=r[C],g=d[w][x];(g<e[w][0]||g>e[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},DataStore.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},DataStore.prototype.modify=function(e,t){this._updateDims(this,e,t)},DataStore.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent,l=0;l<t.length;l++)c[t[l]]=initExtentForUnion();for(var u=0;u<o;u++){for(var d=e.getRawIndex(u),f=0;f<a;f++)s[f]=r[t[f]][d];s[a]=u;var p=n&&n.apply(null,s);if(p!=null){typeof p!=`object`&&(i[0]=p,p=i);for(var l=0;l<p.length;l++){var m=t[l],h=p[l],g=c[m],_=r[m];_&&(_[d]=h),h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}}},DataStore.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(getIndicesCtor(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;f<i-1;f+=o){for(var p=Math.min(f+o,i-1),m=Math.min(f+o*2,i),h=(m+p)/2,g=0,_=p;_<m;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)||(g+=y)}g/=m-p;var b=f,x=Math.min(f+o,i),S=f-1,C=r[s];c=-1,u=b;for(var w=-1,T=0,_=b;_<x;_++){var v=this.getRawIndex(_),y=r[v];if(isNaN(y)){T++,w<0&&(w=v);continue}l=Math.abs((S-h)*(y-C)-(S-_)*(g-C)),l>c&&(c=l,u=v)}T>0&&T<x-b&&(d[a++]=Math.min(w,u),u=Math.max(w,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n},DataStore.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(getIndicesCtor(this._rawCount))(Math.ceil(o/i)*2),c=0,l=0;l<o;l+=i){var u=l,d=a[this.getRawIndex(u)],f=l,p=a[this.getRawIndex(f)],m=i;l+i>o&&(m=o-l);for(var h=0;h<m;h++){var g=a[this.getRawIndex(l+h)];g<d&&(d=g,u=l+h),g>p&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);u<f?(s[c++]=_,s[c++]=v):(s[c++]=v,s[c++]=_)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},DataStore.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=initExtentForUnion(),d=new(getIndicesCtor(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++)o[m]=c[this.getRawIndex(p+m)];var h=n(o),g=this.getRawIndex(Math.min(p+r(o,h)||0,l-1));c[g]=h,h<u[0]&&(u[0]=h),h>u[1]&&(u[1]=h),d[f++]=g}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},DataStore.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},DataStore.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=initExtentForUnion();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=parseSanitizationFilter(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||passesSanitizationFilter(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},DataStore.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},DataStore.prototype.clone=function(e,t){var n=new DataStore,r=this._chunks,i=e&&reduce(e,function(e,t){return e[t]=!0,e},{});if(i)for(var a=0;a<r.length;a++)n._chunks[a]=i[a]?cloneChunk(r[a]):r[a];else n._chunks=r;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},DataStore.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=clone$2(this._extent),e._rawExtent=clone$2(this._rawExtent)},DataStore.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},DataStore.prototype._getRawIdxIdentity=function(e){return e},DataStore.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},DataStore.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},DataStore.internalField=function(){function getDimValueSimply(e,t,n,r){return parseDataValue(e[r],this._dimensions[r])}Gl={arrayRows:getDimValueSimply,objectRows:function(e,t,n,r){return parseDataValue(e[t],this._dimensions[r])},keyedColumns:getDimValueSimply,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return parseDataValue(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),DataStore}(),ql=function(){function SourceManager(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return SourceManager.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},SourceManager.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},SourceManager.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},SourceManager.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},SourceManager.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(isSeries(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=isTypedArray(o)?So:vo,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=retrieve2(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=retrieve2(u.sourceHeader,d.sourceHeader),m=retrieve2(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[createSource(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[createSource(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},SourceManager.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&doThrow(``);var i,a=[],o=[];return each$4(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&doThrow(``),a.push(t),o.push(e._getVersionSign())}),n?i=applyDataTransform(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[cloneSourceShallow(a[0])]),{sourceList:i,upstreamSignList:o}},SourceManager.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},SourceManager.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},SourceManager.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},SourceManager.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||(a=i[r]={});var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];isSeries(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Kl,o.initData(new Ol(t,e.length),e)),a[n]=o}return o},SourceManager.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(isSeries(e)){var t=querySeriesUpstreamDatasetModel(e);return t?[t.getSourceManager()]:[]}else return map$1(queryDatasetUpstreamDatasetModels(e),function(e){return e.getSourceManager()})},SourceManager.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(isSeries(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}},SourceManager}();function isSeries(e){return e.mainType===`series`}function doThrow(e){throw Error(e)}var Jl=`line-height:1`;function getTooltipLineHeight(e){var t=e.lineHeight;return t==null?Jl:`line-height:`+encodeHTML(t+``)+`px`}function getTooltipTextStyle(e,t){var n=e.color||Q.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Q.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+encodeHTML(r+``)+`px;color:`+encodeHTML(n)+`;font-weight:`+encodeHTML(i+``),valueStyle:`font-size:`+encodeHTML(o+``)+`px;color:`+encodeHTML(a)+`;font-weight:`+encodeHTML(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Yl=[0,10,20,30],Xl=[``,`
|
|
11
|
+
`,`
|
|
12
|
+
|
|
13
|
+
`,`
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
`];function createTooltipMarkup(e,t){return t.type=e,t}function isSectionFragment(e){return e.type===`section`}function getBuilder(e){return isSectionFragment(e)?buildSection:buildNameValue}function getBlockGapLevel(e){if(isSectionFragment(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return each$4(e.blocks,function(e){var n=getBlockGapLevel(e);n>=t&&(t=n+ +(r&&(!n||isSectionFragment(e)&&!e.noHeader)))}),t}return 0}function buildSection(e,t,n,r){var i=t.noHeader,a=getGap(getBlockGapLevel(t)),o=[],s=t.blocks||[];assert(!s||isArray(s)),s=s||[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(hasOwn(l,c)){var u=new Ll(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}each$4(s,function(n,i){var s=t.valueFormatter,c=getBuilder(n)(s?extend(extend({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):wrapBlockHTML(r,o.join(``),i?n:a.html);if(i)return d;var f=makeValueReadable(t.header,`ordinal`,e.useUTC),p=getTooltipTextStyle(r,e.renderMode).nameStyle,m=getTooltipLineHeight(r);return e.renderMode===`richText`?wrapInlineNameRichText(e,f,p)+a.richText+d:wrapBlockHTML(r,`<div style="`+p+`;`+m+`;">`+encodeHTML(f)+`</div>`+d,n)}function buildNameValue(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=isArray(e)?e:[e],map$1(e,function(e,t){return makeValueReadable(e,isArray(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:makeValueReadable(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=getTooltipTextStyle(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:wrapInlineNameRichText(e,f,v))+(o?``:wrapInlineValueRichText(e,m,h,g,y)):wrapBlockHTML(r,(s?``:d)+(a?``:wrapInlineNameHTML(f,!s,v))+(o?``:wrapInlineValueHTML(m,h,g,y)),n)}}function buildTooltipMarkup(e,t,n,r,i,a){if(e)return getBuilder(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function getGap(e){return{html:Yl[e],richText:Xl[e]}}function wrapBlockHTML(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=getTooltipLineHeight(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function wrapInlineNameHTML(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+encodeHTML(e)+`</span>`}function wrapInlineValueHTML(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=isArray(e)?e:[e],`<span style="`+i+`;`+r+`">`+map$1(e,function(e){return encodeHTML(e)}).join(` `)+`</span>`}function wrapInlineNameRichText(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function wrapInlineValueRichText(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(isArray(t)?t.join(` `):t,a)}function retrieveVisualColorForTooltipMarker(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return convertToColorString(n)}function getPaddingFromTooltipModel(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var Zl=function(){function TooltipMarkupStyleCreator(){this.richTextStyles={},this._nextStyleNameId=getRandomIdBase()}return TooltipMarkupStyleCreator.prototype._generateStyleName=function(){return`__EC_aUTo_`+ this._nextStyleNameId++},TooltipMarkupStyleCreator.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=getTooltipMarker({color:t,type:e,renderMode:n,markerId:r});return isString(i)?i:(this.richTextStyles[r]=i.style,i.content)},TooltipMarkupStyleCreator.prototype.wrapRichTextStyle=function(e,t){var n={};isArray(t)?each$4(t,function(e){return extend(n,e)}):extend(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},TooltipMarkupStyleCreator}();function defaultSeriesFormatTooltip(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=isArray(s),l=retrieveVisualColorForTooltipMarker(t,n),u,d,f,p;if(o>1||c&&!o){var m=formatTooltipArrayValue(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=retrieveRawValue(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=isNameSpecified(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return createTooltipMarkup(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[createTooltipMarkup(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!trim(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function formatTooltipArrayValue(e,t,n,r,i){var a=t.getData(),o=reduce(e,function(e,t,n){var r=a.getDimensionInfo(n);return e=e||r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?each$4(r,function(e){setEachItem(retrieveRawValue(a,n,e),e)}):each$4(e,setEachItem);function setEachItem(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(createTooltipMarkup(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var Ql=makeInner();function getSelectionKey(e,t){return e.getName(t)||e.getId(t)}var $l=function(e){__extends$1(SeriesModel,e);function SeriesModel(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return SeriesModel.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=createTask({count:dataTaskCount,reset:dataTaskReset}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Ql(this).sourceManager=new ql(this)).prepareSource();var r=this.getInitialData(e,n);wrapData(r,this),this.dataTask.context.data=r,Ql(this).dataBeforeProcessed=r,autoSeriesName(this),this._initSelectedMapFromData(r)},SeriesModel.prototype.mergeDefaultAndTheme=function(e,t){var n=fetchLayoutMode(this),r=n?getLayoutParams(e):{},i=this.subType;Z.hasClass(i)&&(i+=`Series`),merge(e,t.getTheme().get(this.subType)),merge(e,this.getDefaultOption()),defaultEmphasis(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&mergeLayoutParam(e,r,n)},SeriesModel.prototype.mergeOption=function(e,t){e=merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=fetchLayoutMode(this);n&&mergeLayoutParam(this.option,e,n);var r=Ql(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);wrapData(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Ql(this).dataBeforeProcessed=i,autoSeriesName(this),this._initSelectedMapFromData(i)},SeriesModel.prototype.fillDataTextStyle=function(e){if(e&&!isTypedArray(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&defaultEmphasis(e[n],`label`,t)},SeriesModel.prototype.getInitialData=function(e,t){},SeriesModel.prototype.appendData=function(e){this.getRawData().appendData(e.data)},SeriesModel.prototype.getData=function(e){var t=getCurrentTask(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return Ql(this).data},SeriesModel.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},SeriesModel.prototype.setData=function(e){var t=getCurrentTask(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}Ql(this).data=e},SeriesModel.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return createHashMap(e)},SeriesModel.prototype.getSourceManager=function(){return Ql(this).sourceManager},SeriesModel.prototype.getSource=function(){return this.getSourceManager().getSource()},SeriesModel.prototype.getRawData=function(){return Ql(this).dataBeforeProcessed},SeriesModel.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},SeriesModel.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},SeriesModel.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},SeriesModel.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??(r=1/0);for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},SeriesModel.prototype.formatTooltip=function(e,t,n){return defaultSeriesFormatTooltip({series:this,dataIndex:e,multipleSeries:t})},SeriesModel.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(H.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},SeriesModel.prototype.restoreData=function(){this.dataTask.dirty()},SeriesModel.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=ll.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},SeriesModel.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},SeriesModel.prototype.getProgressive=function(){return this.get(`progressive`)},SeriesModel.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},SeriesModel.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},SeriesModel.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a<e.length;a++){var o=e[a],s=getSelectionKey(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},SeriesModel.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},SeriesModel.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=keys(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},SeriesModel.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[getSelectionKey(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},SeriesModel.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},SeriesModel.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){isObject$2(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=getSelectionKey(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=getSelectionKey(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},SeriesModel.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},SeriesModel.registerClass=function(e){return Z.registerClass(e)},SeriesModel.protoInitialize=function(){var e=SeriesModel.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),SeriesModel}(Z);mixin($l,Nl),mixin($l,ll),mountExtend($l,Z);function autoSeriesName(e){var t=e.name;isNameSpecified(e)||(e.name=getSeriesAutoName(e)||t)}function getSeriesAutoName(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return each$4(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function dataTaskCount(e){return e.model.getRawData().count()}function dataTaskReset(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),dataTaskProgress}function dataTaskProgress(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function wrapData(e,t){each$4(concatArray(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,curry$1(onDataChange,t))})}function onDataChange(e,t){var n=getCurrentTask(e);return n&&n.setOutputEnd((t||this).count()),t}function getCurrentTask(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var eu=function(){function ComponentView(){this.group=new bi,this.uid=getUID(`viewComponent`)}return ComponentView.prototype.init=function(e,t){},ComponentView.prototype.render=function(e,t,n,r){},ComponentView.prototype.dispose=function(e,t){},ComponentView.prototype.updateView=function(e,t,n,r){},ComponentView.prototype.updateLayout=function(e,t,n,r){},ComponentView.prototype.updateVisual=function(e,t,n,r){},ComponentView.prototype.toggleBlurSeries=function(e,t,n){},ComponentView.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},ComponentView}();enableClassExtend(eu),enableClassManagement(eu);function createRenderPlanner(){var e=makeInner();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var tu=makeInner(),nu=createRenderPlanner(),ru=function(){function ChartView(){this.group=new bi,this.uid=getUID(`viewChart`),this.renderTask=createTask({plan:renderTaskPlan,reset:renderTaskReset}),this.renderTask.context={view:this}}return ChartView.prototype.init=function(e,t){},ChartView.prototype.render=function(e,t,n,r){},ChartView.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&toggleHighlight(i,r,`emphasis`)},ChartView.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&toggleHighlight(i,r,`normal`)},ChartView.prototype.remove=function(e,t){this.group.removeAll()},ChartView.prototype.dispose=function(e,t){},ChartView.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},ChartView.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},ChartView.prototype.eachRendered=function(e){traverseElements(this.group,e)},ChartView.markUpdateMethod=function(e,t){tu(e).updateMethod=t},ChartView.protoInitialize=function(){var e=ChartView.prototype;e.type=`chart`}(),ChartView}();function elSetState(e,t,n){e&&isHighDownDispatcher(e)&&(t===`emphasis`?enterEmphasis:leaveEmphasis)(e,n)}function toggleHighlight(e,t,n){var r=queryDataIndex(e,t),i=t&&t.highlightKey!=null?getHighlightDigit(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){elSetState(e,n,i)}):each$4(normalizeToArray(r),function(t){elSetState(e.getItemGraphicEl(t),n,i)})}enableClassExtend(ru,[`dispose`]),enableClassManagement(ru);function renderTaskPlan(e){return nu(e.model)}function renderTaskReset(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&tu(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),iu[c]}var iu={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},au=`\0__throttleOriginMethod`,ou=`\0__throttleRate`,su=`\0__throttleType`;function throttle(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t=t||0;function exec(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var cb=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var d=u||t,f=u||n;u=null,s=r-(f?i:a)-d,clearTimeout(o),f?o=setTimeout(exec,d):s>=0?exec():o=setTimeout(exec,-s),i=r};return cb.clear=function(){o&&(clearTimeout(o),o=null)},cb.debounceNextCall=function(e){u=e},cb}function createOrUpdate(e,t,n,r){var i=e[t];if(i){var a=i[au]||i,o=i[su];if(i[ou]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=throttle(a,n,r===`debounce`),i[au]=a,i[su]=r,i[ou]=n}return i}}function clear(e,t){var n=e[t];n&&n[au]&&(n.clear&&n.clear(),e[t]=n[au])}var cu=makeInner(),lu={itemStyle:makeStyleMapper(pc,!0),lineStyle:makeStyleMapper(uc,!0)},uu={lineStyle:`stroke`,itemStyle:`fill`};function getStyleMapper(e,t){return e.visualStyleMapper||lu[t]||(console.warn(`Unknown style type '`+t+`'.`),lu.itemStyle)}function getDefaultColorKey(e,t){return e.visualDrawType||uu[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var du={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=getStyleMapper(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=getDefaultColorKey(e,r),c=a[s],l=isFunction(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||isFunction(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||isFunction(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=extend({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},fu=new gc,pu={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=getStyleMapper(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){fu.option=n[r];var o=i(fu);extend(e.ensureUniqueItemVisual(t,`style`),o),fu.option.decal&&(e.setItemVisual(t,`decal`,fu.option.decal),fu.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},mu={performRawSeries:!0,overallReset:function(e){var t=createHashMap();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();cu(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=cu(e).scope,a=getDefaultColorKey(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},hu=Math.PI;function defaultLoading(e,t){t=t||{},defaults(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new bi,r=new so({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new po({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new so({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Os({shape:{startAngle:-hu/2,endAngle:-hu/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:hu*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:hu*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var gu=function(){function Scheduler(e,t,n,r){this._stageTaskMap=createHashMap(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return Scheduler.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},Scheduler.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},Scheduler.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},Scheduler.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):preparePipelineContext(e,t,n)},Scheduler.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=createHashMap();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},Scheduler.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;each$4(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});assert(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},Scheduler.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},Scheduler.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},Scheduler.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},Scheduler.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,a=this;each$4(e,function(e,o){if(!(r.visualType&&r.visualType!==e.visualType)){var s=a._stageTaskMap.get(e.uid),c=s.seriesTaskMap,l=s.overallTask;if(l){var u,d=l.agentStubMap;d.each(function(e){needSetDirty(r,e)&&(e.dirty(),u=!0)}),u&&l.dirty(),a.updatePayload(l,n);var f=a.getPerformArgs(l,r.block);d.each(function(e){e.perform(f)}),l.perform(f)&&(i=!0)}else c&&c.each(function(o,s){needSetDirty(r,o)&&o.dirty();var c=a.getPerformArgs(o,r.block);c.skip=!e.performRawSeries&&t.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(c)&&(i=!0)})}});function needSetDirty(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},Scheduler.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},Scheduler.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)})},Scheduler.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},Scheduler.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=createHashMap(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(create):s?n.eachRawSeriesByType(s,create):c&&c(n,r).each(create);function create(t){var s=t.uid,c=o.set(s,a&&a.get(s)||createTask({plan:seriesTaskPlan,reset:seriesTaskReset,count:seriesTaskCount}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},Scheduler.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||createTask({reset:overallTaskReset});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=createHashMap(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;assert(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,createStub):l?l(n,r).each(createStub):each$4(n.getSeries(),createStub);function createStub(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,createTask({reset:stubReset,onDirty:stubOnDirty})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},Scheduler.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},Scheduler.wrapStageHandler=function(e,t){return isFunction(e)&&(e={overallReset:e,seriesType:detectSeriseType(e)}),e.uid=getUID(`stageHandler`),t&&(e.visualType=t),e},Scheduler}();function overallTaskReset(e){e.overallReset(e.ecModel,e.api,e.payload)}function stubReset(e){return e.dirtyOnOverallProgress&&stubProgress}function stubProgress(){this.agent.dirty(),this.getDownstream().dirty()}function stubOnDirty(){this.agent&&this.agent.dirty()}function seriesTaskPlan(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function seriesTaskReset(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=normalizeToArray(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?map$1(t,function(e,t){return makeSeriesTaskProgress(t)}):_u}var _u=makeSeriesTaskProgress(0);function makeSeriesTaskProgress(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function seriesTaskCount(e){return e.data.count()}function detectSeriseType(e){bu=null;try{e(vu,yu)}catch{}return bu}var vu={},yu={},bu;mockMethods(vu,fl),mockMethods(yu,Eo),vu.eachSeriesByType=vu.eachRawSeriesByType=function(e){bu=e},vu.eachComponent=function(e){e.mainType===`series`&&e.subType&&(bu=e.subType)};function mockMethods(e,t){for(var n in t.prototype)e[n]=noop}var $=Q.darkColor,xu=$.background,axisCommon=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},Su={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},Cu={darkMode:!0,color:$.theme,backgroundColor:xu,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50},feature:{dataView:{backgroundColor:xu,textColor:$.primary,textareaColor:$.background,textareaBorderColor:$.border,buttonColor:$.accent50,buttonTextColor:$.neutral00}}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:Su,y:Su,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:axisCommon(),logAxis:axisCommon(),valueAxis:axisCommon(),categoryAxis:axisCommon(),line:{symbol:`circle`},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:$.background}},radar:function(){var e=axisCommon();return e.axisName={color:$.axisLabel},e.axisLine.lineStyle.color=$.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};Cu.categoryAxis.splitLine.show=!1;var wu=function(){function ECEventProcessor(){}return ECEventProcessor.prototype.normalizeQuery=function(e){var t={},n={},r={};if(isString(e)){var i=parseClassType(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};each$4(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},ECEventProcessor.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return check(s,a,`mainType`)&&check(s,a,`subType`)&&check(s,a,`index`,`componentIndex`)&&check(s,a,`name`)&&check(s,a,`id`)&&check(c,i,`name`)&&check(c,i,`dataIndex`)&&check(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function check(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},ECEventProcessor.prototype.afterTrigger=function(){this.eventInfo=null},ECEventProcessor}(),Tu=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],Eu=Tu.concat([`symbolKeepAspect`]),Du={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<Tu.length;o++){var s=Tu[o],c=e.get(s);isFunction(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(extend({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=keys(i);function dataEach(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?dataEach:null}}},Ou={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function dataEach(e,t){for(var n=e.getItemModel(t),r=0;r<Eu.length;r++){var i=Eu[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?dataEach:null}}};function getItemVisualFromData(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n);default:}}function getVisualFromData(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t);default:}}function handleSeriesLegacySelectEvents(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=queryDataIndex(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:isArray(l)?c.getName(l[0]):c.getName(l),selected:isString(r)?r:extend({},r)})}})}function handleLegacySelectEvents(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(handleSeriesLegacySelectEvents(`map`,`selectchanged`,t,r,e),handleSeriesLegacySelectEvents(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(handleSeriesLegacySelectEvents(`map`,`selected`,t,r,e),handleSeriesLegacySelectEvents(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(handleSeriesLegacySelectEvents(`map`,`unselected`,t,r,e),handleSeriesLegacySelectEvents(`pie`,`unselected`,t,r,e))})}function findEventDispatcher(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var ku=new xn,Au={};function registerImpl(e,t){Au[e]=t}function getImpl(e){return Au[e]}var ju={};function registerCustomSeries(e,t){ju[e]=t}var Mu=makeInner();function resetCachePerECPrepare(e){Mu(e).prepare={}}function resetCachePerECFullUpdate(e){Mu(e).fullUpdate={}}function getCachePerECPrepare(e){return Mu(e).prepare}function getCachePerECFullUpdate(e){return Mu(e).fullUpdate}var Nu=Math.round(Math.random()*9),Pu=typeof Object.defineProperty==`function`,Fu=function(){function WeakMap(){this._id=`__ec_inner_`+ Nu++}return WeakMap.prototype.get=function(e){return this._guard(e)[this._id]},WeakMap.prototype.set=function(e,t){var n=this._guard(e);return Pu?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},WeakMap.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},WeakMap.prototype.has=function(e){return!!this._guard(e)[this._id]},WeakMap.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},WeakMap}(),Iu=J.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Lu={line:Cs,rect:so,roundRect:so,square:so,circle:$o,diamond:J.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:J.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:J.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Iu},Ru={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},zu={};each$4(Lu,function(e,t){zu[t]=new e});var Bu=J.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=calculateTextPosition(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=zu[r];i||(r=`rect`,i=zu[r]),Ru[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function symbolPathSetColor(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function createSymbol$1(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?makeImage(e.slice(8),new G(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?makePath(e.slice(7),{},new G(t,n,r,i),o?`center`:`cover`):new Bu({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=symbolPathSetColor,a&&c.setColor(a),c}__name(createSymbol$1,`createSymbol`);function normalizeSymbolSize(e){return isArray(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function normalizeSymbolOffset(e,t){if(e!=null)return isArray(e)||(e=[e,e]),[Ii(e[0],t[0])||0,Ii(retrieve2(e[1],e[0]),t[1])||0]}function isSafeNum(e){return isFinite(e)}function createLinearGradient(e,t,n){var r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=isSafeNum(r)?r:0,i=isSafeNum(i)?i:1,a=isSafeNum(a)?a:0,o=isSafeNum(o)?o:0,e.createLinearGradient(r,a,i,o)}function createRadialGradient(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=isSafeNum(o)?o:.5,s=isSafeNum(s)?s:.5,c=c>=0&&isSafeNum(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function getCanvasGradient(e,t,n){for(var r=t.type===`radial`?createRadialGradient(e,t,n):createLinearGradient(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function isClipPathChanged(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function parseInt10(e){return parseInt(e,10)}function getSize(e,t,n){var r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||parseInt10(s[r])||parseInt10(e.style[r]))-(parseInt10(s[a])||0)-(parseInt10(s[o])||0)||0}function normalizeLineDash(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:isNumber(e)?[e]:isArray(e)?e:null}function getLineDash(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&normalizeLineDash(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=map$1(n,function(e){return e/i}),r/=i)}return[n,r]}var Vu=new Ha(!0);function styleHasStroke(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function isValidStrokeFillStyle(e){return typeof e==`string`&&e!==`none`}function styleHasFill(e){var t=e.fill;return t!=null&&t!==`none`}function doFillPath(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function doStrokePath(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function createCanvasPattern(e,t,n){var r=createOrUpdateImage(t.image,t.__image,n);if(isImageReady(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*gn),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function brushPath(e,t,n,r,i){var a,o=styleHasStroke(n),s=styleHasFill(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Vu,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?getCanvasGradient(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?getCanvasGradient(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?createCanvasPattern(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?createCanvasPattern(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=getLineDash(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&doStrokePath(e,n),s&&doFillPath(e,n)):(s&&doFillPath(e,n),o&&doStrokePath(e,n)),T&&e.setLineDash([])}function brushImage(e,t,n){var r=t.__image=createOrUpdateImage(n.image,t.__image,t,t.onload);if(!(!r||!isImageReady(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function brushText(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=getLineDash(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(styleHasStroke(n)&&e.strokeText(i,n.x,n.y),styleHasFill(n)&&e.fillText(i,n.x,n.y)):(styleHasFill(n)&&e.fillText(i,n.x,n.y),styleHasStroke(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Hu=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Uu=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function bindCommonProps(e,t,n,r,i){var a=!1;if(!r&&(n=n||{},t===n))return!1;if(r||t.opacity!==n.opacity){flushPathDrawn(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ua.opacity:o}(r||t.blend!==n.blend)&&(a||(flushPathDrawn(e,i),a=!0),e.globalCompositeOperation=t.blend||ua.blend);for(var s=0;s<Hu.length;s++){var c=Hu[s];(r||t[c]!==n[c])&&(a||(flushPathDrawn(e,i),a=!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||(flushPathDrawn(e,i),a=!0),e.shadowColor=t.shadowColor||ua.shadowColor),a}function bindPathAndTextCommonStyle(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=bindCommonProps(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||(flushPathDrawn(e,i),s=!0),isValidStrokeFillStyle(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||(flushPathDrawn(e,i),s=!0),isValidStrokeFillStyle(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||(flushPathDrawn(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||(flushPathDrawn(e,i),s=!0),e.lineWidth=c)}for(var l=0;l<Uu.length;l++){var u=Uu[l],d=u[0];(r||a[d]!==o[d])&&(s||(flushPathDrawn(e,i),s=!0),e[d]=a[d]||u[1])}return s}function bindImageStyle(e,t,n,r,i){return bindCommonProps(e,t.style,n&&n.style,r,i)}function setContextTransform(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function updateClipStatus(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r=r||a.isZeroArea(),setContextTransform(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function isTransformChanged(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var Wu=1,Gu=2,Ku=3,qu=4;function canPathBatch(e){var t=styleHasFill(e),n=styleHasStroke(e);return!(e.lineDash||!(t^+n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function flushPathDrawn(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function brushSingle(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};brush(e,t,n),brushLoopFinalize(e,n)}function brush(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||isClipPathChanged(i,a))&&(a&&(flushPathDrawn(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(flushPathDrawn(e,n),e.save(),updateClipStatus(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped){t.__dirty&=-2,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof J&&t.autoBatch&&canPathBatch(o);s||isTransformChanged(r,l.transform)?(flushPathDrawn(e,n),setContextTransform(e,t)):u||flushPathDrawn(e,n),t instanceof J?(n.lastDrawType!==Wu&&(c=!0,n.lastDrawType=Wu),bindPathAndTextCommonStyle(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),brushPath(e,t,o,u,n)):t instanceof eo?(n.lastDrawType!==Ku&&(c=!0,n.lastDrawType=Ku),bindPathAndTextCommonStyle(e,t,l,c,n),brushText(e,t,o)):t instanceof ro?(n.lastDrawType!==Gu&&(c=!0,n.lastDrawType=Gu),bindImageStyle(e,t,l,c,n),brushImage(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==qu&&(c=!0,n.lastDrawType=qu),brushIncremental(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&flushPathDrawn(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function brushLoopFinalize(e,t){flushPathDrawn(e,t),t.prevElClipPaths&&e.restore()}function brushIncremental(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),brush(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}brushLoopFinalize(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),brush(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}brushLoopFinalize(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Ju=new Fu,Yu=new Sr(100),Xu=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function createOrUpdatePatternFromDecal(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&Ju.delete(e);var a=Ju.get(e);if(a)return a;var o=defaults(e,{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 setPatternnSource(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,Ju.set(e,s),e.dirty=!1,s;function setPatternnSource(e){for(var t=[n],a=!0,s=0;s<Xu.length;++s){var c=o[Xu[s]];if(c!=null&&!isArray(c)&&!isString(c)&&!isNumber(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=Yu.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=normalizeDashArrayX(o.dashArrayX),f=normalizeDashArrayY(o.dashArrayY),p=normalizeSymbolArray(o.symbol),m=getLineBlockLengthX(d),h=getLineBlockLengthY(f),g=!i&&Zt.createCanvas(),_=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},v=getPatternSize(),y;g&&(g.width=v.width*n,g.height=v.height*n,y=g.getContext(`2d`)),brushDecal(),a&&Yu.put(l,g||_),e.image=g,e.svgElement=_,e.svgWidth=v.width,e.svgHeight=v.height;function getPatternSize(){for(var e=1,t=0,n=m.length;t<n;++t)e=getLeastCommonMultiple(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=getLeastCommonMultiple(r,p[t].length);e*=r;var i=h*m.length*p.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function brushDecal(){y&&(y.clearRect(0,0,g.width,g.height),o.backgroundColor&&(y.fillStyle=o.backgroundColor,y.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(e<=0)return;for(var a=-h,s=0,c=0,l=0;a<v.height;){if(s%2==0){for(var u=c/2%p.length,m=0,b=0,x=0;m<v.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(b%2==0){var C=(1-o.symbolSize)*.5,w=m+d[l][b]*C,T=a+f[s]*C,E=d[l][b]*o.symbolSize,D=f[s]*o.symbolSize,O=x/2%p[u].length;brushSymbol(w,T,E,D,p[u][O])}m+=d[l][b],++x,++b,b===d[l].length&&(b=0)}++l,l===d.length&&(l=0)}a+=f[s],++c,++s,s===f.length&&(s=0)}function brushSymbol(e,t,a,s,c){var l=i?1:n,u=createSymbol$1(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&_.children.push(d)}else brushSingle(y,u)}}}}function normalizeSymbolArray(e){if(!e||e.length===0)return[[`rect`]];if(isString(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!isString(e[n])){t=!1;break}if(t)return normalizeSymbolArray([e]);for(var r=[],n=0;n<e.length;++n)isString(e[n])?r.push([e[n]]):r.push(e[n]);return r}function normalizeDashArrayX(e){if(!e||e.length===0)return[[0,0]];if(isNumber(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!isNumber(e[r])){n=!1;break}if(n)return normalizeDashArrayX([e]);for(var i=[],r=0;r<e.length;++r)if(isNumber(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=map$1(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function normalizeDashArrayY(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(isNumber(e)){var t=Math.ceil(e);return[t,t]}var n=map$1(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function getLineBlockLengthX(e){return map$1(e,function(e){return getLineBlockLengthY(e)})}function getLineBlockLengthY(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var Zu=createSimpleOverallStageHandler2(decalVisual);function decalVisual(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=createOrUpdatePatternFromDecal(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=createOrUpdatePatternFromDecal(i,t)}}})}var Qu=1,$u=800,ed=900,td=920,nd=1e3,rd=2e3,id=5e3,ad=1e3,od=1100,sd=2e3,cd=3e3,ld=4e3,ud=4500,dd=4600,fd=5e3,pd=6e3,md=7e3,hd={PROCESSOR:{SERIES_FILTER:$u,AXIS_STATISTICS:td,FILTER:nd,STATISTIC:id,STATISTICS:id},VISUAL:{LAYOUT:ad,PROGRESSIVE_LAYOUT:od,GLOBAL:sd,CHART:cd,POST_CHART_LAYOUT:dd,COMPONENT:ld,BRUSH:fd,CHART_ITEM:ud,ARIA:pd,DECAL:md}},gd=`__flagInMainProcess`,_d=`__mainProcessVersion`,vd=`__pendingUpdate`,yd=`__needsUpdateStatus`,bd=/^[a-zA-Z0-9_]+$/,xd=`__connectUpdateStatus`,Sd=0,Cd=1,wd=2;function createRegisterEventWithLowercaseECharts(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return toLowercaseNameAndCallEventful(this,e,t)}}function createRegisterEventWithLowercaseMessageCenter(e){return function(){return toLowercaseNameAndCallEventful(this,e,[...arguments])}}function toLowercaseNameAndCallEventful(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),xn.prototype[t].apply(e,n)}var Td=function(e){__extends$1(MessageCenter,e);function MessageCenter(){return e!==null&&e.apply(this,arguments)||this}return MessageCenter}(xn),Ed=Td.prototype;Ed.on=createRegisterEventWithLowercaseMessageCenter(`on`),Ed.off=createRegisterEventWithLowercaseMessageCenter(`off`);var prepare,prepareView,updateDirectly,Dd,Od,updateStreamModes,doDispatchAction,flushPendingActions,triggerUpdatedEvent,bindRenderedEvent,bindMouseEvent,render,renderComponents,renderSeries,createExtensionAPI,enableConnect,markStatusToUpdate,applyChangedStates,updateECUpdateCycleVersion,kd=function(e){__extends$1(ECharts,e);function ECharts(t,n,r){var i=e.call(this,new wu)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[_d]=1,r.ssr;var c=i._zr=init$1(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:retrieve2(r.useDirtyRect,s),useCoarsePointer:retrieve2(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=throttle(U(c.flush,c),17),i._updateTheme(n),i._locale=createLocaleObject(r.locale||Tc),i._coordSysMgr=new Uc;var l=i._api=createExtensionAPI(i);function prioritySortFunc(e,t){return e.__prio-t.__prio}return sort(Ld,prioritySortFunc),sort(Fd,prioritySortFunc),i._scheduler=new gu(i,l,Fd,Ld),i._messageCenter=new Td,i._initEvents(),i.resize=U(i.resize,i),c.animation.on(`frame`,i._onframe,i),bindRenderedEvent(c,i),bindMouseEvent(c,i),setAsPrimitive(i),i}return ECharts.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(applyChangedStates(this),this[vd]){var r=this[vd].silent;this[gd]=!0,updateECUpdateCycleVersion(this);try{prepare(this),Dd.update.call(this,null,this[vd].updateParams)}catch(e){throw this[gd]=!1,this[vd]=null,e}this._zr.flush(),this[gd]=!1,this[vd]=null,flushPendingActions.call(this,r),triggerUpdatedEvent.call(this,r)}else if(e.unfinished){var i=Qu;do{e.unfinished=!1;var a=Zt.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),updateStreamModes(this,t),e.performVisualTasks(t),renderSeries(this,this._model,n,`remain`,{}),i-=Zt.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},ECharts.prototype.getDom=function(){return this._dom},ECharts.prototype.getId=function(){return this.id},ECharts.prototype.getZr=function(){return this._zr},ECharts.prototype.isSSR=function(){return this._ssr},ECharts.prototype.setOption=function(e,t,n){if(!this[gd]){if(this._disposed){this.id;return}var r,i,a;if(isObject$2(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[gd]=!0,updateECUpdateCycleVersion(this),!this._model||t){var o=new ml(this._api),s=this._theme,c=this._model=new fl;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},Id);var l={seriesTransition:a,optionChanged:!0};if(n)this[vd]={silent:r,updateParams:l},this[gd]=!1,this.getZr().wakeUp();else{try{prepare(this),Dd.update.call(this,null,l)}catch(e){throw this[vd]=null,this[gd]=!1,e}this._ssr||this._zr.flush(),this[vd]=null,this[gd]=!1,flushPendingActions.call(this,r),triggerUpdatedEvent.call(this,r)}}},ECharts.prototype.setTheme=function(e,t){if(!this[gd]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[vd]&&(r??(r=this[vd].silent),i=this[vd].updateParams,this[vd]=null),this[gd]=!0,updateECUpdateCycleVersion(this);try{this._updateTheme(e),n.setTheme(this._theme),prepare(this),Dd.update.call(this,{type:`setTheme`},i)}catch(e){throw this[gd]=!1,e}this[gd]=!1,flushPendingActions.call(this,r),triggerUpdatedEvent.call(this,r)}}},ECharts.prototype._updateTheme=function(e){isString(e)&&(e=Rd[e]),e&&(e=clone$2(e),e&&globalBackwardCompat(e,!0),this._theme=e)},ECharts.prototype.getModel=function(){return this._model},ECharts.prototype.getOption=function(){return this._model&&this._model.getOption()},ECharts.prototype.getWidth=function(){return this._zr.getWidth()},ECharts.prototype.getHeight=function(){return this._zr.getHeight()},ECharts.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||H.hasGlobalWindow&&window.devicePixelRatio||1},ECharts.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},ECharts.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},ECharts.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},ECharts.prototype.getSvgDataURL=function(){var e=this._zr;return each$4(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},ECharts.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var t=e.excludeComponents,n=this._model,r=[],i=this;each$4(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return each$4(r,function(e){e.group.ignore=!1}),a},ECharts.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(Vd[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();each$4(Bd,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(clone$2(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Zt.createCanvas(),h=init$1(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return each$4(u,function(e){var t=e.left-o,n=e.top-s;g+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}else return e.connectedBackgroundColor&&h.add(new so({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),each$4(u,function(e){var t=new ro({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}else return this.getDataURL(e)},ECharts.prototype.convertToPixel=function(e,t,n){return Od(this,`convertToPixel`,e,t,n)},ECharts.prototype.convertToLayout=function(e,t,n){return Od(this,`convertToLayout`,e,t,n)},ECharts.prototype.convertFromPixel=function(e,t,n){return Od(this,`convertFromPixel`,e,t,n)},ECharts.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return each$4(parseFinder(n,e),function(e,n){n.indexOf(`Models`)>=0&&each$4(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r=r||!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r=r||a.containPoint(t,e))}},this)},this),!!r},ECharts.prototype.getVisual=function(e,t){var n=this._model,r=parseFinder(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?getVisualFromData(i,t):getItemVisualFromData(i,a,t)},ECharts.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},ECharts.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},ECharts.prototype._initEvents=function(){var e=this;each$4(jd,function(t){var handler=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&findEventDispatcher(i,function(e){var t=Y(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}else if(t.eventData)return a=extend({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};handler.zrEventfulCallAtLast=!0,e._zr.on(t,handler,e)});var t=this._messageCenter;each$4(Pd,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),handleLegacySelectEvents(t,this,this._api)},ECharts.prototype.isDisposed=function(){return this._disposed},ECharts.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},ECharts.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&setAttribute(this.getDom(),Ud,``);var e=this,t=e._api,n=e._model;each$4(e._componentsViews,function(e){e.dispose(n,t)}),each$4(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Bd[e.id]},ECharts.prototype.resize=function(e){if(!this[gd]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[vd]&&(r??(r=this[vd].silent),n=!0,this[vd]=null),this[gd]=!0,updateECUpdateCycleVersion(this);try{n&&prepare(this),Dd.update.call(this,{type:`resize`,animation:extend({duration:0},e&&e.animation)})}catch(e){throw this[gd]=!1,e}this[gd]=!1,flushPendingActions.call(this,r),triggerUpdatedEvent.call(this,r)}}},ECharts.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(isObject$2(e)&&(t=e,e=``),e=e||`default`,this.hideLoading(),zd[e]){var n=zd[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},ECharts.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},ECharts.prototype.makeActionFromEvent=function(e){var t=extend({},e);return t.type=Nd[e.type],t},ECharts.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(isObject$2(t)||(t={silent:!!t}),Md[e.type]&&this._model){if(this[gd]){this._pendingActions.push(e);return}var n=t.silent;doDispatchAction.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&H.browser.weChat&&this._throttledZrFlush(),flushPendingActions.call(this,n),triggerUpdatedEvent.call(this,n)}},ECharts.prototype.updateLabelLayout=function(){ku.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},ECharts.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},ECharts.internalField=function(){prepare=function(e){resetCachePerECPrepare(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),prepareView(e,!0),prepareView(e,!1),t.plan()},prepareView=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&doPrepare(t)}):n.eachSeries(doPrepare);function doPrepare(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=parseClassType(e.type);u=new(t?eu.getClass(d.main,d.sub):ru.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var l=i[c];l.__alive?c++:(!t&&l.renderTask.dispose(),o.remove(l.group),l.dispose(n,s),i.splice(c,1),a[l.__id]===l&&delete a[l.__id],l.__id=l.group.__ecComponentInfo=null)}},updateDirectly=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){each$4([].concat(e._componentsViews,e._chartsViews),callView);return}var o=makeQueryConditionKindA(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=createHashMap(),each$4(normalizeToArray(s),function(e){var t=convertOptionIdName(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null))if(isHighDownPayload(n))if(t instanceof $l)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&blurSeriesFromHighlightPayload(t,n,e._api);else{var r=findComponentHighDownDispatchers(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&blurComponent(t.mainType,t.componentIndex,e._api),a&&each$4(a,function(e){n.type===`highlight`?enterEmphasis(e):leaveEmphasis(e)})}else isSelectChangePayload(n)&&t instanceof $l&&(toggleSelectionFromPayload(t,n,e._api),updateSeriesElementSelection(t),markStatusToUpdate(e))},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||callView(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function callView(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},Dd={prepareAndUpdate:function(e){prepare(this),Dd.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,t){var n=this._model,r=this._api,i=this._zr,a=this._coordSysMgr,o=this._scheduler;if(n){resetCachePerECFullUpdate(n),n.setUpdatePayload(e),o.restoreData(n,e),o.performSeriesTasks(n),a.create(n,r),ku.trigger(`coordsys:aftercreate`,n,r),o.performDataProcessorTasks(n,e),updateStreamModes(this,n),a.update(n,r),clearColorPalette(n),o.performVisualTasks(n,e);var s=n.get(`backgroundColor`)||`transparent`;i.setBackgroundColor(s);var c=n.get(`darkMode`);c!=null&&c!==`auto`&&i.setDarkMode(c),render(this,n,r,e,t),ku.trigger(`afterupdate`,n,r)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}});var a=createHashMap();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),renderSeries(t,n,r,e,{},a),ku.trigger(`afterupdate`,n,r)}},updateView:function(e){var t=this._model;t&&(t.setUpdatePayload(e),ru.markUpdateMethod(e,`updateView`),clearColorPalette(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),render(this,t,this._api,e,{}),ku.trigger(`afterupdate`,t,this._api))},updateVisual:function(e){var t=this,n=this._model;n&&(n.setUpdatePayload(e),n.eachSeries(function(e){e.getData().clearAllVisual()}),ru.markUpdateMethod(e,`updateVisual`),clearColorPalette(n),this._scheduler.performVisualTasks(n,e,{visualType:`visual`,setDirty:!0}),n.eachComponent(function(r,i){if(r!==`series`){var a=t.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,n,t._api,e)}}),n.eachSeries(function(r){t._chartsMap[r.__viewId].updateVisual(r,n,t._api,e)}),ku.trigger(`afterupdate`,n,this._api))},updateLayout:function(e){Dd.update.call(this,e)}};function doConvertPixelImpl(e,t,n,r,i){if(e._disposed){e.id;return}for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=parseFinder(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}Od=doConvertPixelImpl,updateStreamModes=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},doDispatchAction=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=Md[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&parseClassType(s[0]);this[gd]=!0,updateECUpdateCycleVersion(this);var u=[e],d=!1;e.batch&&(d=!0,u=map$1(e.batch,function(t){return t=defaults(extend({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=isSelectChangePayload(e),_=isHighDownPayload(e);if(_&&allLeaveBlur(this._api),each$4(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p=p||extend({},t),p.type=h,f.push(p),_){var a=preParseFinder(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;updateDirectly(n,c,t,u),markStatusToUpdate(n)}else g?(updateDirectly(n,c,t,`series`),markStatusToUpdate(n)):l&&updateDirectly(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[vd]?(prepare(this),Dd.update.call(this,e),this[vd]=null):Dd[c].call(this,e)}catch(e){throw this[gd]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[gd]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;assert(isObject$2(y)),v=defaults({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},flushPendingActions=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();doDispatchAction.call(this,n,e)}},triggerUpdatedEvent=function(e){!e&&this.trigger(`updated`)},bindRenderedEvent=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[vd]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},bindMouseEvent=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=findEventDispatcher(n,isHighDownDispatcher);r&&(handleGlobalMouseOverForHighDown(r,e,t._api),markStatusToUpdate(t))}).on(`mouseout`,function(e){var n=e.target,r=findEventDispatcher(n,isHighDownDispatcher);r&&(handleGlobalMouseOutForHighDown(r,e,t._api),markStatusToUpdate(t))}).on(`click`,function(e){var n=e.target,r=findEventDispatcher(n,function(e){return Y(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Y(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function clearColorPalette(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function allocateZlevels(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r=r||!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;sort(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),each$4(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&(r===a&&r++,o=``),a=r,n.setZLevel(r)})}}render=function(e,t,n,r,i){allocateZlevels(t),renderComponents(e,t,n,r,i),each$4(e._chartsViews,function(e){e.__alive=!1}),renderSeries(e,t,n,r,i),each$4(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},renderComponents=function(e,t,n,r,i,a){each$4(a||e._componentsViews,function(e){var i=e.__model;clearStates(i,e),e.render(i,t,n,r),updateZ(i,e),updateStates(i,e)})},renderSeries=function(e,t,n,r,i,a){var o=e._scheduler;i=extend(i||{},{updatedSeries:t.getSeries()}),ku.trigger(`series:beforeupdate`,t,n,i);var s=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;o.updatePayload(i,r),clearStates(t,n),a&&a.get(t.uid)&&i.dirty(),i.perform(o.getPerformArgs(i))&&(s=!0),n.group.silent=!!t.get(`silent`),updateBlend(t,n),updateSeriesElementSelection(t)}),o.unfinished=s||o.unfinished,ku.trigger(`series:layoutlabels`,t,n,i),ku.trigger(`series:transition`,t,n,i),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];updateZ(t,n),updateStates(t,n)}),updateHoverLayerStatus(e,t),ku.trigger(`series:afterupdate`,t,n,i)},markStatusToUpdate=function(e){e[yd]=!0,e.getZr().wakeUp()},updateECUpdateCycleVersion=function(e){e[_d]=(e[_d]+1)%1e6},applyChangedStates=function(e){e[yd]&&(e.getZr().storage.traverse(function(e){isElementRemoved(e)||applyElementStates(e)}),e[yd]=!1)};function applyElementStates(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i===`emphasis`||i===`blur`||i===`select`||t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function updateHoverLayerStatus(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>retrieve2(t.get(`hoverLayerThreshold`),il.hoverLayerThreshold)&&!H.node&&!H.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=a?1:0)})}}),e._usingTHL=a)}}function updateBlend(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function updateZ(e,t){if(!e.preventAutoZ){var n=retrieveZInfo(e);t.eachRendered(function(e){return traverseUpdateZ(e,n.z,n.zlevel),!0})}}function clearStates(e,t){t.eachRendered(function(e){if(!isElementRemoved(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function updateStates(e,t){var n=e.getModel(`stateAnimation`),r=e.isAnimationEnabled(),i=n.get(`duration`),a=i>0?{duration:i,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(isElementRemoved(e))return;if(e instanceof J&&savePathStates(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(r){e.stateTransition=a;var n=e.getTextContent(),i=e.getTextGuideLine();n&&(n.stateTransition=a),i&&(i.stateTransition=a)}e.__dirty&&applyElementStates(e)}})}createExtensionAPI=function(e){return new(function(t){__extends$1(class_1,t);function class_1(){return t!==null&&t.apply(this,arguments)||this}return class_1.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},class_1.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},class_1.prototype.enterEmphasis=function(t,n){enterEmphasis(t,n),markStatusToUpdate(e)},class_1.prototype.leaveEmphasis=function(t,n){leaveEmphasis(t,n),markStatusToUpdate(e)},class_1.prototype.enterBlur=function(t){enterBlur(t),markStatusToUpdate(e)},class_1.prototype.leaveBlur=function(t){leaveBlur(t),markStatusToUpdate(e)},class_1.prototype.enterSelect=function(t){enterSelect(t),markStatusToUpdate(e)},class_1.prototype.leaveSelect=function(t){leaveSelect(t),markStatusToUpdate(e)},class_1.prototype.getModel=function(){return e.getModel()},class_1.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},class_1.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},class_1.prototype.getECUpdateCycleVersion=function(){return e[_d]},class_1.prototype.usingTHL=function(){return e._usingTHL},class_1}(Eo))(e)},enableConnect=function(e){function updateConnectedChartsStatus(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[xd]=t}}each$4(Nd,function(t,n){e._messageCenter.on(n,function(t){if(Vd[e.group]&&e[xd]!==Sd){if(t&&t.escapeConnect)return;var n=e.makeActionFromEvent(t),r=[];each$4(Bd,function(t){t!==e&&t.group===e.group&&r.push(t)}),updateConnectedChartsStatus(r,Sd),each$4(r,function(e){e[xd]!==Cd&&e.dispatchAction(n)}),updateConnectedChartsStatus(r,wd)}})})}}(),ECharts}(xn),Ad=kd.prototype;Ad.on=createRegisterEventWithLowercaseECharts(`on`),Ad.off=createRegisterEventWithLowercaseECharts(`off`),Ad.one=function(e,t,n){var r=this;function wrapped(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,wrapped)}this.on.call(this,e,wrapped,n)};var jd=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],Md={},Nd={},Pd={},Fd=[],Id=[],Ld=[],Rd={},zd={},Bd={},Vd={},Hd=new Date-0;new Date-0;var Ud=`_echarts_instance_`;function init(e,t,n){var r=!(n&&n.ssr);if(r){var i=getInstanceByDom(e);if(i)return i}var a=new kd(e,t,n);return a.id=`ec_`+ Hd++,Bd[a.id]=a,r&&setAttribute(e,Ud,a.id),enableConnect(a),ku.trigger(`afterinit`,a),a}function getInstanceByDom(e){return Bd[getAttribute(e,Ud)]}function registerTheme(e,t){Rd[e]=t}function registerPreprocessor(e){indexOf(Id,e)<0&&Id.push(e)}function registerProcessor(e,t){normalizeRegister(Fd,e,t,rd)}function registerPostInit(e){registerUpdateLifecycle(`afterinit`,e)}function registerPostUpdate(e){registerUpdateLifecycle(`afterupdate`,e)}function registerUpdateLifecycle(e,t){ku.on(e,t)}function registerAction(e,t,n){var r,i,a,o,s;isFunction(t)&&(n=t,t=``),isObject$2(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||(n=e.action),a=e.refineEvent):(r=e,i=t);function createEventType(e){return e.toLowerCase()}i=createEventType(i||r);var c=a?createEventType(r):i;Md[r]||(assert(bd.test(r)&&bd.test(i)),a&&assert(i!==r),Md[r]={actionType:r,refinedEventType:i,nonRefinedEventType:c,update:o,action:n,refineEvent:a},Pd[i]=1,a&&s&&(Pd[c]=1),Nd[c]=r)}function registerCoordinateSystem(e,t){Uc.register(e,t)}function registerLayout(e,t){normalizeRegister(Ld,e,t,ad,`layout`,!0)}function registerVisual(e,t){normalizeRegister(Ld,e,t,cd,`visual`,!0)}var Wd=[];function normalizeRegister(e,t,n,r,i,a){if((isFunction(t)||isObject$2(t))&&(n=t,t=r),!(indexOf(Wd,n)>=0)){Wd.push(n);var o=gu.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function registerLoading(e,t){zd[e]=t}function registerMap(e,t,n){var r=getImpl(`registerMap`);r&&r(e,t,n)}var Gd=registerExternalTransform;registerVisual(sd,du),registerVisual(ud,pu),registerVisual(ud,mu),registerVisual(sd,Du),registerVisual(ud,Ou),registerVisual(md,Zu),registerPreprocessor(globalBackwardCompat),registerProcessor(ed,xl),registerLoading(`default`,defaultLoading),registerAction({type:No,event:No,update:No},noop),registerAction({type:Po,event:Po,update:Po},noop),registerAction({type:Fo,event:Ro,update:Fo,action:noop,refineEvent:makeSelectChangedEvent,publishNonRefinedEvent:!0}),registerAction({type:Io,event:Ro,update:Io,action:noop,refineEvent:makeSelectChangedEvent,publishNonRefinedEvent:!0}),registerAction({type:Lo,event:Ro,update:Lo,action:noop,refineEvent:makeSelectChangedEvent,publishNonRefinedEvent:!0});function makeSelectChangedEvent(e,t,n,r){return{eventContent:{selected:getAllSelectedIndices(n),isFromClick:t.isFromClick||!1}}}registerTheme(`default`,{}),registerTheme(`dark`,Cu);function dataIndexMapValueLength(e){return e==null?0:e.length||1}function defaultKeyGetter(e){return e}var Kd=function(){function DataDiffer(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||defaultKeyGetter,this._newKeyGetter=r||defaultKeyGetter,this.context=i,this._diffModeMultiple=a===`multiple`}return DataDiffer.prototype.add=function(e){return this._add=e,this},DataDiffer.prototype.update=function(e){return this._update=e,this},DataDiffer.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},DataDiffer.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},DataDiffer.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},DataDiffer.prototype.remove=function(e){return this._remove=e,this},DataDiffer.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},DataDiffer.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=dataIndexMapValueLength(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},DataDiffer.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=dataIndexMapValueLength(c),d=dataIndexMapValueLength(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},DataDiffer.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=dataIndexMapValueLength(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},DataDiffer.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=dataIndexMapValueLength(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},DataDiffer}(),qd=function(){function DimensionUserOuput(e,t){this._encode=e,this._schema=t}return DimensionUserOuput.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},DimensionUserOuput.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},DimensionUserOuput}();function summarizeDimensions(e,t){var n={},r=n.encode={},i=createHashMap(),a=[],o=[],s={};each$4(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;getOrCreateEncodeArr(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),mayLabelDimType(n.type)&&(a[0]=t),getOrCreateEncodeArr(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}_o.each(function(e,t){var i=getOrCreateEncodeArr(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=map$1(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(a=u.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new qd(s,t),n}function getOrCreateEncodeArr(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function getDimensionTypeByAxis(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function mayLabelDimType(e){return!(e===`ordinal`||e===`time`)}var Jd=function(){function SeriesDimensionDefine(e){this.otherDims={},e!=null&&extend(this,e)}return SeriesDimensionDefine}(),Yd=makeInner(),Xd={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Zd=function(){function SeriesDataSchema(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return SeriesDataSchema.prototype.isDimensionOmitted=function(){return this._dimOmitted},SeriesDataSchema.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=ensureSourceDimNameMap(this.source)))},SeriesDataSchema.prototype.getSourceDimensionIndex=function(e){return retrieve2(this._dimNameMap.get(e),-1)},SeriesDataSchema.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},SeriesDataSchema.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=shouldRetrieveDataByName(this.source),n=!shouldOmitUnusedDimensions(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),t&&s!=null&&(!u||!u.isCalculationCoord)&&(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=Xd[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},SeriesDataSchema.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},SeriesDataSchema.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},SeriesDataSchema}();function isSeriesDataSchema(e){return e instanceof Zd}function createDimNameMap(e){for(var t=createHashMap(),n=0;n<(e||[]).length;n++){var r=e[n],i=isObject$2(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function ensureSourceDimNameMap(e){var t=Yd(e);return t.dimNameMap||(t.dimNameMap=createDimNameMap(e.dimensionsDefine))}function shouldOmitUnusedDimensions(e){return e>30}var Qd=isObject$2,$d=map$1,ef=typeof Int32Array>`u`?Array:Int32Array,tf=`e\0\0`,nf=-1,rf=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],af=[`_approximateExtent`],prepareInvertedIndex,getId,getIdNameFromStore,normalizeDimensions,transferProperties,cloneListForMapAndSample,makeIdFromName,of=function(){function SeriesData(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;isSeriesDataSchema(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=isString(u)?new Jd({name:u}):u instanceof Jd?u:new Jd(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=createHashMap();each$4(a,function(e){m.set(i[e].storeDimIndex,e)})}}return SeriesData.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},SeriesData.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},SeriesData.prototype._recognizeDimIndex=function(e){if(isNumber(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},SeriesData.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},SeriesData.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},SeriesData.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},SeriesData.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},SeriesData.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},SeriesData.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},SeriesData.prototype.getStore=function(){return this._store},SeriesData.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof Kl&&(i=e),!i){var a=this.dimensions,o=isSourceInstance(e)||isArrayLike(e)?new Ol(e,a.length):e;i=new Kl;var s=$d(a,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(o,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=summarizeDimensions(this,this._schema),this.userOutput=this._dimSummary.userOutput},SeriesData.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},SeriesData.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&makeIdFromName(this,o)}},SeriesData.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},SeriesData.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},SeriesData.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&isDataItemOption(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=convertOptionIdName(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=convertOptionIdName(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)makeIdFromName(this,o);prepareInvertedIndex(this)}},SeriesData.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},SeriesData.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},SeriesData.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},SeriesData.prototype.setCalculationInfo=function(e,t){Qd(e)?extend(this._calculationInfo,e):this._calculationInfo[e]=t},SeriesData.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=getIdNameFromStore(this,this._nameDimIdx,t)),n??(n=``),n},SeriesData.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},SeriesData.prototype.getId=function(e){return getId(this,this.getRawIndex(e))},SeriesData.prototype.count=function(){return this._store.count()},SeriesData.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},SeriesData.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},SeriesData.prototype.getIndices=function(){return this._store.getIndices()},SeriesData.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},SeriesData.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},SeriesData.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},SeriesData.prototype.getValues=function(e,t){var n=this,r=this._store;return isArray(e)?r.getValues($d(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},SeriesData.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},SeriesData.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},SeriesData.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},SeriesData.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},SeriesData.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?nf:r},SeriesData.prototype.each=function(e,t,n){isFunction(e)&&(n=t,t=e,e=[]);var r=n||this,i=$d(normalizeDimensions(e),this._getStoreDimIndex,this);this._store.each(i,r?U(t,r):t)},SeriesData.prototype.filterSelf=function(e,t,n){isFunction(e)&&(n=t,t=e,e=[]);var r=n||this,i=$d(normalizeDimensions(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?U(t,r):t),this},SeriesData.prototype.selectRange=function(e){var t=this,n={},r=keys(e),i=[];return each$4(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},SeriesData.prototype.mapArray=function(e,t,n){isFunction(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},SeriesData.prototype.map=function(e,t,n,r){var i=n||r||this,a=$d(normalizeDimensions(e),this._getStoreDimIndex,this),o=cloneListForMapAndSample(this);return o._store=this._store.map(a,i?U(t,i):t),o},SeriesData.prototype.modify=function(e,t,n,r){var i=n||r||this,a=$d(normalizeDimensions(e),this._getStoreDimIndex,this);this._store.modify(a,i?U(t,i):t)},SeriesData.prototype.downSample=function(e,t,n,r){var i=cloneListForMapAndSample(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},SeriesData.prototype.minmaxDownSample=function(e,t){var n=cloneListForMapAndSample(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},SeriesData.prototype.lttbDownSample=function(e,t){var n=cloneListForMapAndSample(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},SeriesData.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},SeriesData.prototype.getItemModel=function(e){var t=this.hostModel;return new gc(this.getRawDataItem(e),t,t&&t.ecModel)},SeriesData.prototype.diff=function(e){var t=this;return new Kd(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return getId(e,t)},function(e){return getId(t,e)})},SeriesData.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},SeriesData.prototype.setVisual=function(e,t){this._visual=this._visual||{},Qd(e)?extend(this._visual,e):this._visual[e]=t},SeriesData.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},SeriesData.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},SeriesData.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return i??(i=this.getVisual(t),isArray(i)?i=i.slice():Qd(i)&&(i=extend({},i)),r[t]=i),i},SeriesData.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Qd(t)?extend(r,t):r[t]=n},SeriesData.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},SeriesData.prototype.setLayout=function(e,t){Qd(e)?extend(this._layout,e):this._layout[e]=t},SeriesData.prototype.getLayout=function(e){return this._layout[e]},SeriesData.prototype.getItemLayout=function(e){return this._itemLayouts[e]},SeriesData.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?extend(this._itemLayouts[e]||{},t):t},SeriesData.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},SeriesData.prototype.setItemGraphicEl=function(e,t){setCommonECData(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},SeriesData.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},SeriesData.prototype.eachItemGraphicEl=function(e,t){each$4(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},SeriesData.prototype.cloneShallow=function(e){return e||(e=new SeriesData(this._schema?this._schema:$d(this.dimensions,this._getDimInfo,this),this.hostModel)),transferProperties(e,this),e._store=this._store,e},SeriesData.prototype.wrapMethod=function(e,t){var n=this[e];isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(slice(arguments)))})},SeriesData.internalField=function(){prepareInvertedIndex=function(e){var t=e._invertedIndicesMap;each$4(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new ef(a.categories.length);for(var s=0;s<n.length;s++)n[s]=nf;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},getIdNameFromStore=function(e,t,n){return convertOptionIdName(e._getCategory(t,n),null)},getId=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=getIdNameFromStore(e,e._idDimIdx,t)),n??(n=tf+t),n},normalizeDimensions=function(e){return isArray(e)||(e=e==null?[]:[e]),e},cloneListForMapAndSample=function(e){var t=new SeriesData(e._schema?e._schema:$d(e.dimensions,e._getDimInfo,e),e.hostModel);return transferProperties(t,e),t},transferProperties=function(e,t){each$4(rf.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,each$4(af,function(n){e[n]=clone$2(t[n])}),e._calculationInfo=extend({},t._calculationInfo)},makeIdFromName=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=getIdNameFromStore(e,i,t)),s==null&&a!=null&&(r[t]=s=getIdNameFromStore(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),SeriesData}();function prepareSeriesDataSchema(e,t){isSourceInstance(e)||(e=createSourceFromSeriesDataOption(e)),t=t||{};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=createHashMap(),a=[],o=getDimCount(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&shouldOmitUnusedDimensions(o),c=r===e.dimensionsDefine,l=c?ensureSourceDimNameMap(e):createDimNameMap(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=createHashMap(u),f=new Hl(o),p=0;p<f.length;p++)f[p]=-1;function getResultItem(e){var t=f[e];if(t<0){var n=r[e],i=isObject$2(n)?n:{name:n},o=new Jd,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)getResultItem(p);d.each(function(e,t){var n=normalizeToArray(e).slice();if(n.length===1&&!isString(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);each$4(n,function(e,n){var i=isString(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,applyDim(getResultItem(i),t,n))})});var m=0;each$4(n,function(e){var t,n,r,i;if(isString(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=extend({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=normalizeToArray(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;m<o&&getResultItem(m).coordDim!=null;)m++;m<o&&s.push(m++)}each$4(s,function(e,a){var o=getResultItem(e);if(c&&i.type!=null&&(o.type=i.type),applyDim(defaults(o,i),t,a),o.name==null&&n){var s=n[a];!isObject$2(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&defaults(o.otherDims,r)})}});function applyDim(e,t,n){_o.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var h=t.generateCoord,g=t.generateCoordCount,_=g!=null;g=h?g||1:0;var v=h||`value`;function ifNoNameFillWithCoordName(e){e.name??(e.name=e.coordDim)}if(s)each$4(a,function(e){ifNoNameFillWithCoordName(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var y=0;y<o;y++){var b=getResultItem(y);b.coordDim??(b.coordDim=genCoordDimName(v,i,_),b.coordDimIndex=0,(!h||g<=0)&&(b.isExtraCoord=!0),g--),ifNoNameFillWithCoordName(b),b.type==null&&(guessOrdinal(e,y)===al.Must||b.isExtraCoord&&(b.otherDims.itemName!=null||b.otherDims.seriesName!=null))&&(b.type=`ordinal`)}return removeDuplicates(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new Zd({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function getDimCount(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return each$4(t,function(e){var t;isObject$2(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function genCoordDimName(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var sf=function(){function SeriesModelCoordSysInfo(e){this.coordSysDims=[],this.axisMap=createHashMap(),this.categoryAxisMap=createHashMap(),this.coordSysName=e}return SeriesModelCoordSysInfo}();function getCoordSysInfoBySeries(e){var t=e.get(`coordinateSystem`),n=new sf(t),r=cf[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var cf={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Ki).models[0],a=e.getReferringComponents(`yAxis`,Ki).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),isCategory(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),isCategory(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Ki).models[0];t.coordSysDims=[`single`],n.set(`single`,i),isCategory(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Ki).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),isCategory(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),isCategory(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();each$4(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),isCategory(s)&&(r.set(c,s),t.firstCategoryDimIndex??(t.firstCategoryDimIndex=a))})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Ki).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function isCategory(e){return e.get(`type`)===`category`}function enableDataStack(e,t,n){n=n||{};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;isLegacyDimensionsInput(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function dimTypeIsNotOrdinalAndTime(e){return e.type!==`ordinal`&&e.type!==`time`}if(each$4(a,function(e,t){isString(e)&&(a[t]=e={name:e}),dimTypeIsNotOrdinalAndTime(e)||(p=!1)}),each$4(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&dimTypeIsNotOrdinalAndTime(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var m=u.coordDim,h=u.type,g=0;each$4(a,function(e){e.coordDim===m&&g++});var _={name:d,coordDim:m,coordDimIndex:g,type:h,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},v={name:f,coordDim:f,coordDimIndex:g+1,type:h,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(_.storeDimIndex=s.ensureCalculationDimension(f,h),v.storeDimIndex=s.ensureCalculationDimension(d,h)),o.appendCalculationDimension(_),o.appendCalculationDimension(v)):(a.push(_),a.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function isLegacyDimensionsInput(e){return!isSeriesDataSchema(e.schema)}function isDimensionStacked(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function getStackedDimension(e,t){return isDimensionStacked(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function getCoordSysDimDefs(e,t){var n=e.get(`coordinateSystem`),r=Uc.get(n),i;return t&&t.coordSysDims&&(i=map$1(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=getDimensionTypeByAxis(r.get(`type`))),n})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`]),i}function injectOrdinalMeta(e,t,n){var r,i;return n&&each$4(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??(r=a),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function createSeriesData(e,t,n){n=n||{};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=createSourceFromSeriesDataOption(e)):(i=r.getSource(),a=i.sourceFormat===vo);var o=getCoordSysInfoBySeries(t),s=getCoordSysDimDefs(t,o),c=n.useEncodeDefaulter,l=isFunction(c)?c:c?curry$1(makeSeriesEncodeForAxisCoordSys,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=prepareSeriesDataSchema(i,u),f=injectOrdinalMeta(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=enableDataStack(t,{schema:d,store:p}),h=new of(d,t);h.setCalculationInfo(m);var g=f!=null&&isNeedCompleteOrdinalData(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function isNeedCompleteOrdinalData(e){if(e.sourceFormat===`original`)return!isArray(getDataItemValue(firstDataNotNull(e.data||[])))}function firstDataNotNull(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var lf=function(){function Scale(){}return Scale.prototype.isBlank=function(){return this._isBlank},Scale.prototype.setBlank=function(e){this._isBlank=e},Scale}();enableClassManagement(lf);var uf=0,df=function(){function OrdinalMeta(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++uf,this._onCollect=e.onCollect}return OrdinalMeta.createByAxisModel=function(e){var t=e.option,n=t.data,r=n&&map$1(n,getName);return new OrdinalMeta({categories:r,needCollect:!r,deduplication:t.dedplication!==!1})},OrdinalMeta.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},OrdinalMeta.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!isString(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},OrdinalMeta.prototype._getOrCreateMap=function(){return this._map||(this._map=createHashMap(this.categories))},OrdinalMeta}();function getName(e){return isObject$2(e)&&e.value!=null?e.value:e+``}var ff=keys({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function initBreakOrLinearMapper(e,t,n){var r;e=e||{};var i=getScaleBreakHelper();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(each$4(ff,function(t){a[t]&&(e[t]=U(a[t],a))}),r=a)}return r??initLinearScaleMapper(e,n),{brk:r,mapper:e}}function decorateScaleMapper(e,t){each$4(ff,function(n){e[n]=t[n]})}function enableScaleMapperFreeze(e,t){e.freeze=noop}function getScaleExtentForTickUnsafe(e){return e.getExtentUnsafe(0,2)}function getScaleExtentForMappingUnsafe(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function getScaleLinearSpanForMapping(e){var t=getScaleExtentForMappingUnsafe(e,3);return t[1]-t[0]}function getScaleLinearSpanEffective(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function initLinearScaleMapper(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():initExtentForUnion(),extend(n,pf),n}var pf={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=getScaleExtentForMappingUnsafe(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){writeExtent(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),writeExtent(r,e,t,n)},freeze:function(){}};function writeExtent(e,t,n,r){isValidBoundsForExtent(n,r)&&(e[t][0]=n,e[t][1]=r)}function isIntervalOrLogScale(e){return isIntervalScale(e)||isLogScale(e)}function isIntervalScale(e){return e.type===`interval`}function isTimeScale(e){return e.type===`time`}function isLogScale(e){return e.type===`log`}function isOrdinalScale(e){return e.type===`ordinal`}function increaseInterval(e){var t=quantityExponent(e),n=ji(10,t),r=Oi(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,round$1(r*n,-t)}function getIntervalPrecision(e){return getPrecision(e)+2}function logScaleLogTick(e,t){return Mi(e)/Mi(t)}function logScalePowTick(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return ji(t,e)}function intervalScaleEnsureValidExtent(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=Di(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!isValidNumberForExtent(r[0])||!isValidNumberForExtent(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function extentDiffers(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function ensureValidSplitNumber(e,t){return e=e||t,Oi(K(e,1))}function ordinalScaleCreateTicks(e,t,n){var r=getScaleExtentForTickUnsafe(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&addItemInternally(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)addItemInternally(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&addItemInternally(r[1],!0,!0);function addItemInternally(e,t,r){n({value:e,offInterval:t},r)}}var mf=function(e){__extends$1(OrdinalScale,e);function OrdinalScale(t){var n=e.call(this)||this;n.type=`ordinal`,n.parse=OrdinalScale.parse,decorateScaleMapper(n,OrdinalScale.decoratedMethods);var r=t.ordinalMeta;r||(r=new df({})),isArray(r)&&(r=new df({categories:map$1(r,function(e){return isObject$2(e)?e.value:e})})),n._ordinalMeta=r;var i=initBreakOrLinearMapper(null,null,t.extent||[0,r.categories.length-1]);return n._mapper=i.mapper,enableScaleMapperFreeze(n,i.mapper),n}return OrdinalScale.parse=function(e){return e==null?e=NaN:isString(e)?(e=this._ordinalMeta.getOrdinal(e),e??(e=NaN)):e=Oi(e),e},OrdinalScale.prototype.getTicks=function(){var e=[];return ordinalScaleCreateTicks(this,0,function(t){e.push(t)}),e},OrdinalScale.prototype.getMinorTicks=function(e){},OrdinalScale.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=Ei(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}},OrdinalScale.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},OrdinalScale.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},OrdinalScale.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},OrdinalScale.prototype.count=function(){var e=getScaleExtentForTickUnsafe(this._mapper);return e[1]-e[0]+1},OrdinalScale.prototype.getOrdinalMeta=function(){return this._ordinalMeta},OrdinalScale.type=`ordinal`,OrdinalScale.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(Oi(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},OrdinalScale}(lf);lf.registerClass(mf);function getMinorTicks(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=getIntervalPrecision(f);u<t-1;){var m=round$1(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=getScaleBreakHelper();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var hf=function(e){__extends$1(IntervalScale,e);function IntervalScale(t){var n=e.call(this)||this;return n.type=`interval`,n.parse=IntervalScale.parse,t=t||{},n.brk=initBreakOrLinearMapper(n,simplyParseBreakOption(n,t),null).brk,n._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},n}return IntervalScale.parse=function(e){return e==null||e===``?NaN:Number(e)},IntervalScale.prototype.getConfig=function(){return clone$2(this._cfg)},IntervalScale.prototype.setConfig=function(e){var t=getScaleExtentForTickUnsafe(this);this._cfg=e=clone$2(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=getIntervalPrecision(e.interval))},IntervalScale.prototype.getTicks=function(e){e=e||{};var t=this._cfg,n=t.interval,r=getScaleExtentForTickUnsafe(this),i=t.niceExtent,a=t.intervalPrecision,o=getScaleBreakHelper(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?round$1(i[0]-n,a):r[0]});for(var estimateNiceMultiple=function(e,t){return Oi((t-e)/n)},d=t.intervalCount,f=i[0],p=0;;p++){if(d==null){if(f>i[1]||!isFinite(f)||!isFinite(i[1]))break}else{if(p>d)break;f=Ei(f,i[1]),p===d&&(f=i[1])}if(l.push({value:f}),f=round$1(f+n,a),s){var m=s.calcNiceTickMultiple(f,estimateNiceMultiple);m>=0&&(f=round$1(f+m*n,a))}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:i[1];return r[1]>h&&l.push({value:e.expandToNicedExtent?round$1(h+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},IntervalScale.prototype.getMinorTicks=function(e){return getMinorTicks(this,e,getBreaksUnsafe(this),this._cfg.interval)},IntervalScale.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=getPrecision(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),addCommas(round$1(e.value,n,!0))},IntervalScale.type=`interval`,IntervalScale}(lf);lf.registerClass(hf);var bisect=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},gf=function(e){__extends$1(TimeScale,e);function TimeScale(t){var n=e.call(this)||this;return n.type=`time`,n.parse=TimeScale.parse,n._locale=t.locale,n._useUTC=t.useUTC,n._interval=0,n.brk=initBreakOrLinearMapper(n,simplyParseBreakOption(n,t),null).brk,n}return TimeScale.prototype.getLabel=function(e){return format(e.value,Ic[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))]||Ic.second,this._useUTC,this._locale)},TimeScale.prototype.getFormattedLabel=function(e,t,n){return leveledFormat(e,t,n,this._locale,this._useUTC)},TimeScale.prototype.getTicks=function(e){e=e||{};var t=this._interval,n=getScaleExtentForTickUnsafe(this),r=getScaleBreakHelper(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return getScaleBreakHelper().addBreaksToTicks(o,i.breaks,n),o;o=createIntervalTicks(this._minLevelUnit,this._approxInterval,s,n,getScaleLinearSpanEffective(this),i);var c=Lc.length-1,l=0;return each$4(o,function(e){e.time&&(c=Math.min(c,indexOf(Lc,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&getScaleBreakHelper().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&getScaleBreakHelper().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(indexOf(Lc,getUnitFromValue(e.vmin,s)),indexOf(Lc,getUnitFromValue(e.vmax,s))),n=0,r=0;r<Lc.length;r++)if(!isPrimaryUnitValueAndGreaterSame(Lc[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:Lc[Math.max(i,t)],upperTimeUnit:Lc[i]}}),o},TimeScale.prototype.getMinorTicks=function(e){return getMinorTicks(this,e,getBreaksUnsafe(this),this._interval)},TimeScale.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},TimeScale.parse=function(e){return isNumber(e)?Math.round(e):+parseDate(e)},TimeScale.type=`time`,TimeScale}(lf),_f=[[`second`,Dc],[`minute`,Oc],[`hour`,kc],[`quarter-day`,kc*6],[`half-day`,kc*12],[`day`,Ac*1.2],[`half-week`,Ac*3.5],[`week`,Ac*7],[`month`,Ac*31],[`quarter`,Ac*95],[`half-year`,jc/2],[`year`,jc]];function isPrimaryUnitValueAndGreaterSame(e,t,n,r){return roundTime(new Date(t),e,r).getTime()===roundTime(new Date(n),e,r).getTime()}function getDateInterval(e,t){return e/=Ac,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function getMonthInterval(e){var t=30*Ac;return e/=t,e>6?6:e>3?3:e>2?2:1}function getHourInterval(e){return e/=kc,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function getMinutesAndSecondsInterval(e,t){return e/=t?Oc:Dc,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function getMillisecondsInterval(e){return K(nice(e,!0),1)}function getFirstTimestampOfUnit(e,t,n){var r=Math.max(0,indexOf(Lc,t)-1);return roundTime(new Date(e),Lc[r],n).getTime()}function createEstimateNiceMultiple(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function createIntervalTicks(e,t,n,r,i,a){var o=3e3,s=Rc,c=0;function addTicksInSpan(e,t,n,i,s,l,u){for(var d=createEstimateNiceMultiple(s,e),f=t,p=new Date(f);f<n&&f<=r[1]&&(u.push({value:f}),!(c++>o));)if(p[s](p[i]()+e),f=p.getTime(),a){var m=a.calcNiceTickMultiple(f,d);m>0&&(p[s](p[i]()+m*e),f=p.getTime())}u.push({value:f,notAdd:f>r[1]})}function addLevelTicks(e,i,a){var o=[],s=!i.length;if(!isPrimaryUnitValueAndGreaterSame(getPrimaryTimeUnit(e),r[0],r[1],n)){s&&(i=[{value:getFirstTimestampOfUnit(r[0],e,n)},{value:r[1]}]);for(var c=0;c<i.length-1;c++){var l=i[c].value,u=i[c+1].value;if(l!==u){var d=void 0,f=void 0,p=void 0,m=!1;switch(e){case`year`:d=Math.max(1,Math.round(t/Ac/365)),f=fullYearGetterName(n),p=fullYearSetterName(n);break;case`half-year`:case`quarter`:case`month`:d=getMonthInterval(t),f=monthGetterName(n),p=monthSetterName(n);break;case`week`:case`half-week`:case`day`:d=getDateInterval(t,31),f=dateGetterName(n),p=dateSetterName(n),m=!0;break;case`half-day`:case`quarter-day`:case`hour`:d=getHourInterval(t),f=hoursGetterName(n),p=hoursSetterName(n);break;case`minute`:d=getMinutesAndSecondsInterval(t,!0),f=minutesGetterName(n),p=minutesSetterName(n);break;case`second`:d=getMinutesAndSecondsInterval(t,!1),f=secondsGetterName(n),p=secondsSetterName(n);break;case`millisecond`:d=getMillisecondsInterval(t),f=millisecondsGetterName(n),p=millisecondsSetterName(n);break}u>=r[0]&&l<=r[1]&&addTicksInSpan(d,l,u,f,p,m,o),e===`year`&&a.length>1&&c===0&&a.unshift({value:a[0].value-d})}}for(var c=0;c<o.length;c++)a.push(o[c])}}for(var l=[],u=[],d=0,f=0,p=0;p<s.length;++p){var m=getPrimaryTimeUnit(s[p]);if(isPrimaryTimeUnit(s[p])&&(addLevelTicks(s[p],l[l.length-1]||[],u),m!==(s[p+1]?getPrimaryTimeUnit(s[p+1]):null))){if(u.length){f=d,u.sort(function(e,t){return e.value-t.value});for(var h=[],g=0;g<u.length;++g){var _=u[g].value;(g===0||u[g-1].value!==_)&&(h.push(u[g]),_>=r[0]&&_<=r[1]&&d++)}var v=i/t;if(d>v*1.5&&f>v/1.5||(l.push(h),d>v||e===s[p]))break}u=[]}}for(var y=filter(map$1(l,function(e){return filter(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),b=y.length-1,x=[],p=0;p<y.length;++p)for(var S=y[p],C=0;C<S.length;++C){var w=getUnitFromValue(S[C].value,n);x.push({value:S[C].value,time:{level:b-p,upperTimeUnit:w,lowerTimeUnit:w}})}removeDuplicates(x,removeDuplicatesGetKeyFromValueProp,null),x.sort(function(e,t){return e.value-t.value});var T=x[0],E=x[x.length-1],D=getUnitFromValue(r[0],n),O=getUnitFromValue(r[1],n);return(!T||T.value>r[0])&&x.unshift({value:r[0],time:{level:0,upperTimeUnit:D,lowerTimeUnit:D},notNice:!0}),(!E||E.value<r[1])&&x.push({value:r[1],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),x}var calcNiceForTimeScale=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=Ac,n[1]+=Ac),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-Ac}e.setExtent(n[0],n[1]);var i=ensureValidSplitNumber(t.splitNumber,10),a=getScaleLinearSpanEffective(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=_f.length,l=Math.min(bisect(_f,a,0,c),c-1),u=_f[l][1],d=_f[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};lf.registerClass(gf);var vf=0,yf=1,bf=2,xf=function(e){__extends$1(LogScale,e);function LogScale(t){var n=e.call(this)||this;n.type=`log`,n.parse=hf.parse,n.base=t.logBase||10;var r=[],i=[],a=n._lookup={from:r,to:i};r[vf]=r[yf]=i[vf]=i[yf]=NaN,decorateScaleMapper(n,LogScale.mapperMethods);var o=getScaleBreakHelper(),s=t.breakOption,c={lookup:a};return o&&o.parseAxisBreakOptionInwardTransform(s,n,{noNegative:!0},bf,c),n.powStub=new hf({breakParsed:c.original}),n.intervalStub=new hf({breakParsed:c.transformed}),enableScaleMapperFreeze(n,n.intervalStub),n}return LogScale.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=getScaleBreakHelper(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return map$1(i.getTicks(e||{}),function(e){var i=e.value,o=logScalePowTick(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,getBreaksUnsafe(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},LogScale.prototype.getMinorTicks=function(e){return getMinorTicks(this,e,getBreaksUnsafe(this.powStub),this.intervalStub.getConfig().interval)},LogScale.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},LogScale.type=`log`,LogScale.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(logScaleLogTick(e,this.base))},scale:function(e){return logScalePowTick(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=logScaleLogTick(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Sf.depth=n,Cf.lookup=this._lookup,logScalePowTick(n===2?e:this.intervalStub.transformOut(e,Sf),this.base,Cf)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!isValidBoundsForExtent(t,n)||t<=0||n<=0)){var r=wf,i=wf;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[vf]=t,r[yf]=n);var o=this.base;this.intervalStub.setExtent2(e,i[vf]=logScaleLogTick(t,o),i[yf]=logScaleLogTick(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return isValidBoundsForExtent(t[0],t[1])&&isNullableNumberFinite(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},LogScale}(lf);lf.registerClass(xf);var Sf={},Cf={},wf=[],Tf={value:1,category:1,time:1,log:1},Ef=makeInner();function determineAxisType(e){var t=e.get(`type`);return(t==null||!hasOwn(Tf,t)&&!lf.getClass(t))&&(t=`value`),t}function createScaleByModel(e,t,n){var r=getScaleBreakHelper(),i;switch(r&&(i=retrieveAxisBreaksOption(e,t,n)),t){case`category`:return new mf({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:initExtentForUnion()});case`time`:return new gf({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new xf({logBase:e.get(`logBase`),breakOption:i});case`value`:return new hf({breakOption:i});default:return new((lf.getClass(t))||hf)({})}}function getScaleValuePositionKind(e,t,n){var r=n?getScaleExtentForMappingUnsafe(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return isValidBoundsForExtent(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function discourageOnAxisZero(e){Ef(e).noOnMyZero=!0}function isOnAxisZeroDiscouraged(e){return Ef(e).noOnMyZero}function makeLabelFormatter(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=parseTimeAxisLabelFormatter(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(isString(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(isFunction(t)){if(e.type===`category`)return function(n,r){return t(getAxisRawValue(e,n),n.value-e.scale.getExtent()[0],null)};var r=getScaleBreakHelper();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(getAxisRawValue(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function getAxisRawValue(e,t){var n=e.scale;return isOrdinalScale(n)?n.getLabel(t):t.value}function getOptionCategoryInterval(e){return e.get(`interval`)??`auto`}function shouldShowAllLabels(e){return e.type===`category`&&getOptionCategoryInterval(e.getLabelModel())===0}function getDataDimensionsOnAxis(e,t){var n={};return each$4(e.mapDimensionsAll(t),function(t){n[getStackedDimension(e,t)]=!0}),keys(n)}function isNameLocationCenter(e){return e===`middle`||e===`center`}function shouldAxisShow(e){return e.getShallow(`show`)}function retrieveAxisBreaksOption(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!getScaleBreakHelper()||!n||!isAxisTypeSupportAxisBreak(t)?void 0:r}function isAxisTypeSupportAxisBreak(e){return e!==`category`}function updateIntervalOrLogScaleForNiceOrAligned(e,t,n,r,i,a){var o=isLogScale(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=extentDiffers(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function getTickValueOutermost(e,t){return isOrdinalScale(e)?e.getRawOrdinalNumber(t.value):t.value}function isAxisOnBand(e,t){return isOrdinalScale(e)&&!!t.get(`boundaryGap`)}var Df=function(){function AxisModelCommonMixin(){}return AxisModelCommonMixin.prototype.needIncludeZero=function(){return!this.option.scale},AxisModelCommonMixin.prototype.getCoordSysModel=function(){},AxisModelCommonMixin}();makeCallOnlyOnce();var Of=makeInner();makeInner();function getAxisStatPerKeyPerAxis(e,t){var n=e.model,r=Of(getCachePerECFullUpdate(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function getAxisStat(e,t){return wrapStatResult(getAxisStatPerKeyPerAxis(e,t))}function getAxisStatBySeries(e,t){var n=[];return eachKeyEachAxis(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(wrapStatResult(e))}),n}function eachKeyEachAxis(e,t){var n=Of(getCachePerECFullUpdate(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function wrapStatResult(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function eachSeriesOnAxis(e,t){var n=e.model.ecModel,r=Of(getCachePerECFullUpdate(n)).axSer;r&&eachSeriesDealForAxisStat(n,r.get(e.model.uid),t)}function eachSeriesDealForAxisStat(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function eachKeyOnAxis(e,t){var n=e.model,r=Of(getCachePerECFullUpdate(n.ecModel)).keys;r&&each$4(r.get(n.uid),function(e){t(e)})}function associateSeriesWithAxis(e,t,n){if(e){var r=t.ecModel,i=Of(getCachePerECFullUpdate(r)),a=e.model.uid,o=i.axSer||(i.axSer=createHashMap());(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=kf.get(makeClientLookupKey(s,c,n))||kf.get(makeClientLookupKey(s,c,null));if(l){var u=i.keyed||(i.keyed=createHashMap()),d=i.keys||(i.keys=createHashMap()),f=l.key,p=u.get(f)||u.set(f,createHashMap()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function makeClientLookupKey(e,t,n){return e+`|&`+retrieve2(t,!0)+`|&`+(n||``)}var kf=createHashMap(),Af=makeInner(),jf=3,Mf=function(){function ScaleRawExtentInfo(e,t,n,r,i){var a=isOrdinalScale(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(isIntervalScale(e)||isLogScale(e)||isTimeScale(e))&&(unionExtentStartFromNumber(l,parseAxisModelMinMax(e,t.get(`dataMin`,!0))),unionExtentEndFromNumber(l,parseAxisModelMinMax(e,t.get(`dataMax`,!0)))),extentHasValue(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=parseAxisModelMinMax(e,isFunction(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=parseAxisModelMinMax(e,isFunction(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=parseBoundaryGapOption(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??(u[0]=a?s?l[0]:o?0:NaN:l[0]-m[0]*h),u[1]??(u[1]=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h),!isValidNumberForExtent(u[0])&&(u[0]=NaN),!isValidNumberForExtent(u[1])&&(u[1]=NaN);var g=s||eqNaN(u[0])||eqNaN(u[1])||a&&!o,_=isIntervalScale(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=parseAxisModelMinMax(e,t.get(`startValue`,!0)),x=b!=null;!isNullableNumberFinite(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),isNullableNumberFinite(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),sanitizeExtent(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return ScaleRawExtentInfo.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},ScaleRawExtentInfo.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),sanitizeExtent(e,o),a},ScaleRawExtentInfo.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},ScaleRawExtentInfo.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},ScaleRawExtentInfo}();function sanitizeExtent(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),ensureExtentAscSimply(t))}function parseAxisModelMinMax(e,t){return t==null?null:eqNaN(t)?NaN:e.parse(t)}function parseBoundaryGapOption(e,t){var n;if(isOrdinalScale(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=isArray(r)?r:[r,r]}return[parseBoundaryGapOptionItem(n[0]),parseBoundaryGapOptionItem(n[1])]}function parseBoundaryGapOptionItem(e){return parsePercent$1(typeof e==`boolean`?0:e,1)||0}function ensureScaleStore(e){var t=Af(e.scale);return t.extent||(t.extent=initExtentForUnion()),t}function scaleRawExtentInfoEnableBoxCoordSysUsage(e,t){ensureScaleStore(e).dimIdxInCoord=t.get(e.dim)}function scaleRawExtentInfoCreate(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||scaleRawExtentInfoCreateDeal(n,e,i,r,t)}function scaleRawExtentInfoCreateDeal(e,t,n,r,i){var a=ensureScaleStore(t),o=a.extent,s=!1;eachSeriesOnAxis(t,function(r){if(r.boxCoordinateSystem){var i=getCoordForCoordSysUsageKindBox(r).coord,c=a.dimIdxInCoord;if(c>=0&&isArray(i)){var l=i[c];l!=null&&!isArray(l)&&unionExtentFromNumber(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;each$4(getDataDimensionsOnAxis(u,n),function(e){unionExtentFromExtent(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=determineRequireContainShape(e,t,r);injectScaleRawExtentInfo(e,new Mf(e,r,o,s,c),i),a.extent=null}function scaleRawExtentInfoBuildDefault(e,t){var n=e.scale;injectScaleRawExtentInfo(n,new Mf(n,e.model,t,!1,!1),jf)}function injectScaleRawExtentInfo(e,t,n){e.rawExtentInfo=t,t.from=n}var Nf=createHashMap();function adoptScaleRawExtentInfoAndPrepare(e,t,n,r,i){e.rawExtentInfo||scaleRawExtentInfoBuildDefault({scale:e,model:t},i||initExtentForUnion());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function determineRequireContainShape(e,t,n){var r=isAxisOnBand(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return eachKeyOnAxis(t,function(e){a=!!Nf.get(e)||a}),a}function adoptScaleExtentKindMapping(e,t,n,r){if(n.ctnShp){var i;if(eachKeyOnAxis(e,function(t){var n=Nf.get(t);if(n){var a=n(e,r);a&&(i=i||[0,0],unionExtentStartFromNumber(i,a[0]),unionExtentEndFromNumber(i,a[1]),discourageOnAxisZero(e))}}),i){var a=t.getExtent();if(isOrdinalScale(t))e.onBand||t.setExtent2(1,Ei(a[0],a[0]+i[0]),K(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=Ei(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=K(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function calcNiceForIntervalOrLogScale(e,t){var n=isLogScale(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=intervalScaleEnsureValidExtent(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?logScaleCalcNiceTicks(r,t):intervalScaleCalcNiceTicks(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=getIntervalPrecision(d)),i[0]||(s[0]=round$1(ki(s[0]/u)*u,l)),i[1]||(s[1]=round$1(Ai(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),updateIntervalOrLogScaleForNiceOrAligned(e,i,o,s,a,c)}function intervalScaleCalcNiceTicks(e,t){var n=ensureValidSplitNumber(t.splitNumber,5),r=getScaleLinearSpanEffective(e),i=t.minInterval,a=t.maxInterval,o=nice(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=getIntervalPrecision(o),c=e.getExtent(),l=[round$1(Ai(c[0]/o)*o,s),round$1(ki(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function logScaleCalcNiceTicks(e,t){var n=ensureValidSplitNumber(t.splitNumber,10),r=e.getExtent(),i=getScaleLinearSpanEffective(e),a=K(quantity(i),1);n/i*a<=.5&&(a*=10);var o=getIntervalPrecision(a),s=[round$1(Ai(r[0]/a)*a,o),round$1(ki(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function scaleCalcNice(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;scaleCalcNice2(t,n,r,i,null)}function scaleCalcNice2(e,t,n,r,i){var a=adoptScaleRawExtentInfoAndPrepare(e,t,r,n,i),o=isIntervalScale(e)||isTimeScale(e);scaleCalcNiceDirectly(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&adoptScaleExtentKindMapping(n,e,a,r)}function scaleCalcNiceDirectly(e,t){Pf[e.type](e,t)}var Pf={interval:calcNiceForIntervalOrLogScale,log:calcNiceForIntervalOrLogScale,time:calcNiceForTimeScale,ordinal:noop},Ff=[],If={registerPreprocessor,registerProcessor,registerPostInit,registerPostUpdate,registerUpdateLifecycle,registerAction,registerCoordinateSystem,registerLayout,registerVisual,registerTransform:Gd,registerLoading,registerMap,registerImpl,PRIORITY:hd,ComponentModel:Z,ComponentView:eu,SeriesModel:$l,ChartView:ru,registerComponentModel:function(e){Z.registerClass(e)},registerComponentView:function(e){eu.registerClass(e)},registerSeriesModel:function(e){$l.registerClass(e)},registerChartView:function(e){ru.registerClass(e)},registerCustomSeries:function(e,t){registerCustomSeries(e,t)},registerSubTypeDefaulter:function(e,t){Z.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){registerPainter(e,t)}};function use(e){if(isArray(e)){each$4(e,function(e){use(e)});return}indexOf(Ff,e)>=0||(Ff.push(e),isFunction(e)&&(e={install:e}),e.install(If))}var Lf=makeInner(),Rf=makeInner(),zf={estimate:1,determine:2};function createAxisLabelsComputingContext(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function createAxisLabels(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:map$1(parseTickLabelCustomValues(n,r),function(t,n){return{formattedLabel:makeLabelFormatter(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?makeCategoryLabels(e,t):makeRealNumberLabels(e)}function createAxisTicks(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:parseTickLabelCustomValues(i,r)}:e.type===`category`?makeCategoryTicks(e,t):{ticks:r.getTicks(n)}}function parseTickLabelCustomValues(e,t){var n=t.getExtent(),r=[];return each$4(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),removeDuplicates(r,removeDuplicatesGetKeyFromItemItself,null),asc(r),map$1(r,function(e){return{value:e}})}function makeCategoryLabels(e,t){var n=e.getLabelModel(),r=makeCategoryLabelsActually(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function makeCategoryLabelsActually(e,t,n){var r=Vf(e),i=getOptionCategoryInterval(t),a=n.kind===zf.estimate;if(!a){var o=axisCacheGet(r,i);if(o)return o}var s,c;isFunction(i)?s=makeTicksLabelsByCategoryIntervalNumOrCb(e,i,!1):(c=i===`auto`?makeAutoCategoryInterval(e,n):i,s=makeTicksLabelsByCategoryIntervalNumOrCb(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return axisCacheSet(r,i,l),!0}):axisCacheSet(r,i,l),l}function makeCategoryTicks(e,t){var n=Bf(e),r=getOptionCategoryInterval(t),i=axisCacheGet(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),isFunction(r))a=makeTicksLabelsByCategoryIntervalNumOrCb(e,r,!0);else if(r===`auto`){var s=makeCategoryLabelsActually(e,e.getLabelModel(),createAxisLabelsComputingContext(zf.determine));o=s.labelCategoryInterval,a=map$1(s.labels,function(e){return e.tick})}else o=r,a=makeTicksLabelsByCategoryIntervalNumOrCb(e,o,!0);return axisCacheSet(n,r,{ticks:a,tickCategoryInterval:o})}function makeRealNumberLabels(e){var t=e.scale.getTicks(),n=makeLabelFormatter(e);return{labels:map$1(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Bf=initAxisCacheMethod(`axisTick`),Vf=initAxisCacheMethod(`axisLabel`);function initAxisCacheMethod(e){return function ensureCache(t){return Rf(t)[e]||(Rf(t)[e]={list:[]})}}function axisCacheGet(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function axisCacheSet(e,t,n){return e.list.push({key:t,value:n}),n}function makeAutoCategoryInterval(e,t){if(t.kind===zf.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Rf(e).autoInterval=n,!0}),n}return Rf(e).autoInterval??(Rf(e).autoInterval=e.calculateCategoryInterval(t))}function calculateCategoryInterval(e,t){var n=t.kind,r=fetchAutoCategoryIntervalCalculationParams(e),i=makeLabelFormatter(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=getBoundingRect(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===zf.estimate?(t.out.noPxChangeTryDetermine.push(U(calculateCategoryIntervalTryDetermine,null,e,S,c)),S):calculateCategoryIntervalDealCache(e,S,c)??S}function calculateCategoryIntervalTryDetermine(e,t,n){return calculateCategoryIntervalDealCache(e,t,n)==null}function calculateCategoryIntervalDealCache(e,t,n){var r=Lf(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function fetchAutoCategoryIntervalCalculationParams(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function makeTicksLabelsByCategoryIntervalNumOrCb(e,t,n){var r=makeLabelFormatter(e),i=e.scale,a=[],o=isFunction(t);return ordinalScaleCreateTicks(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Hf=.8;function calcBandWidth(e,t){t=t||{};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=getScaleLinearSpanForMapping(r);isNullableNumberFinite(o)||(o=NaN);var s=e.getExtent(),c=Di(s[1]-s[0]);return isOrdinalScale(r)?calcBandWidthForCategoryAxis(n,e,o,c):i&&calcBandWidthForNumericAxis(n,e,o,c,i),a!=null&&(n.w=isNullableNumberFinite(n.w)?K(a,n.w):a),n}function calcBandWidthForCategoryAxis(e,t,n,r){var i=t.onBand,a=n+(i?1:0);a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function calcBandWidthForNumericAxis(e,t,n,r,i){var a=!1,o=-1/0;each$4(i.key?[getAxisStat(t,i.key)]:getAxisStatBySeries(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),isNullableNumberFinite(n)&&n>0&&isNullableNumberFinite(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*Hf,e.w2=e.w*n/r)}var Uf=[0,1],Wf=function(){function Axis(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return Axis.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},Axis.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},Axis.prototype.getExtent=function(){return this._extent.slice()},Axis.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},Axis.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),linearMap(e,Uf,makeExtentWithBands(this),t)},Axis.prototype.coordToData=function(e,t){var n=linearMap(e,makeExtentWithBands(this),Uf,t);return this.scale.scale(n)},Axis.prototype.pointToData=function(e,t){},Axis.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=map$1(createAxisTicks(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(getTickValueOutermost(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=fixOnBandTicksCoords(this,n,r);return map$1(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},Axis.prototype.getMinorTicksCoords=function(){if(isOrdinalScale(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),map$1(this.scale.getMinorTicks(e),function(e){return map$1(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},Axis.prototype.getViewLabels=function(e){return e=e||createAxisLabelsComputingContext(zf.determine),createAxisLabels(this,e).labels},Axis.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},Axis.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},Axis.prototype.getBandWidth=function(){return calcBandWidth(this,{min:1}).w},Axis.prototype.calculateCategoryInterval=function(e){return e=e||createAxisLabelsComputingContext(zf.determine),calculateCategoryInterval(this,e)},Axis}();function makeExtentWithBands(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function fixOnBandTicksCoords(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=calcBandWidth(e).w;if(!i)return!1;each$4(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var Gf=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],Kf=1,qf=2,Jf=Kf|qf;function setLabelLayoutDirty(e,t,n){n=n||Jf,t?e.dirty|=n:e.dirty&=~n}function isLabelLayoutDirty(e,t){return t=t||Jf,e.dirty==null||!!(e.dirty&t)}function ensureLabelLayoutWithGeometry(e){if(e)return isLabelLayoutDirty(e)&&computeLabelGeometry(e,e.label,e),e}function computeLabelGeometry(e,t,n){var r=t.getComputedTransform();e.transform=ensureCopyTransform(e.transform,r);var i=e.localRect=ensureCopyRect(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=ac.textMargin);for(var d=0;d<4;d++)Yf[d]=u===ac.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===ac.textMargin&&expandOrShrinkRect(i,Yf,!1,!1);var f=e.rect=ensureCopyRect(e.rect,i);return r&&f.applyTransform(r),u===ac.minMargin&&expandOrShrinkRect(f,Yf,!1,!1),e.axisAligned=isBoundingRectAxisAligned(r),(e.label=e.label||{}).ignore=t.ignore,setLabelLayoutDirty(e,!1),setLabelLayoutDirty(e,!0,qf),e}var Yf=[0,0,0,0];function computeLabelGeometry2(e,t,n){return e.transform=ensureCopyTransform(e.transform,n),e.localRect=ensureCopyRect(e.localRect,t),e.rect=ensureCopyRect(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=isBoundingRectAxisAligned(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function labelLayoutApplyTranslation(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function newLabelLayoutWithGeometry(e,t){for(var n=0;n<Gf.length;n++){var r=Gf[n];e[r]??(e[r]=t[r])}return ensureLabelLayoutWithGeometry(e)}function ensureOBB(e){var t=e.obb;return(!t||isLabelLayoutDirty(e,qf))&&(e.obb=t=t||new Vs,t.fromBoundingRect(e.localRect,e.transform),setLabelLayoutDirty(e,!1,qf)),t}function hideOverlap(e){var t=[];e.sort(function(e,t){return(t.suggestIgnore?1:0)-(e.suggestIgnore?1:0)||t.priority-e.priority});function hideEl(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??(t.ignore=!1)}e.ignore=!0}for(var n=0;n<e.length;n++){var r=ensureLabelLayoutWithGeometry(e[n]);if(!r.label.ignore){for(var i=r.label,a=r.labelLine,o=!1,s=0;s<t.length;s++)if(labelIntersect(r,t[s],null,{touchThreshold:.05})){o=!0;break}o?(hideEl(i),a&&hideEl(a)):t.push(r)}}}function labelIntersect(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:ensureOBB(e).intersect(ensureOBB(t),n,r)}var Xf=function(e){__extends$1(LineSeriesModel,e);function LineSeriesModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=LineSeriesModel.type,t.hasSymbolVisual=!0,t}return LineSeriesModel.prototype.getInitialData=function(e){return createSeriesData(null,this,{useEncodeDefaulter:!0})},LineSeriesModel.prototype.getLegendIcon=function(e){var t=new bi,n=createSymbol$1(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=createSymbol$1(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},LineSeriesModel.type=`series.line`,LineSeriesModel.dependencies=[`grid`,`polar`],LineSeriesModel.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,triggerEvent:!1},LineSeriesModel}($l);function getDefaultLabel(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=retrieveRawValue(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o<n.length;o++)a.push(retrieveRawValue(e,t,n[o]));return a.join(` `)}}function getDefaultInterpolatedLabel(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!isArray(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Zf=function(e){__extends$1(Symbol,e);function Symbol(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return Symbol.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=createSymbol$1(e,-1,-1,2,2,null,a);o.attr({z2:retrieve2(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=driftSymbol,this._symbolType=e,this.add(o)},Symbol.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},Symbol.prototype.getSymbolType=function(){return this._symbolType},Symbol.prototype.getSymbolPath=function(){return this.childAt(0)},Symbol.prototype.highlight=function(){enterEmphasis(this.childAt(0))},Symbol.prototype.downplay=function(){leaveEmphasis(this.childAt(0))},Symbol.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},Symbol.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},Symbol.prototype.updateData=function(e,t,n,r){this.silent=!1;var i=e.getItemVisual(t,`symbol`)||`circle`,a=e.hostModel,o=Symbol.getSymbolSize(e,t),s=Symbol.getSymbolZ2(e,t),c=i!==this._symbolType,l=r&&r.disableAnimation;if(c){var u=e.getItemVisual(t,`symbolKeepAspect`);this._createSymbol(i,e,t,o,s,u)}else{var d=this.childAt(0);d.silent=!1;var f={scaleX:o[0]/2,scaleY:o[1]/2};l?d.attr(f):updateProps$1(d,f,a,t),saveOldStyle(d)}if(this._updateCommon(e,t,o,n,r),c){var d=this.childAt(0);if(!l){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,initProps(d,f,a,t)}}l&&this.childAt(0).stopAnimation(`leave`)},Symbol.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=getLabelStatesModels(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=normalizeSymbolOffset(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof ro){var S=a.style;a.useStyle(extend({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(extend({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;setLabelStyle(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:getLabelDefaultText,inheritColor:x,defaultOpacity:b.opacity});function getLabelDefaultText(t){return T?e.getName(t):getDefaultLabel(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var E=a.ensureState(`emphasis`);E.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var D=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;E.scaleX=this._sizeX*D,E.scaleY=this._sizeY*D,this.setSymbolScale(1),toggleHoverEmphasis(this,u,d,f)},Symbol.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},Symbol.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Y(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&removeElement(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();removeElement(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},Symbol.getSymbolSize=function(e,t){return normalizeSymbolSize(e.getItemVisual(t,`symbolSize`))},Symbol.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},Symbol}(bi);function driftSymbol(e,t){this.parent.drift(e,t)}function symbolNeedsDraw(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function normalizeUpdateOpt(e){return e!=null&&!isObject$2(e)&&(e={isIgnore:e}),e||{}}function makeSeriesScope$1(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:getLabelStatesModels(t),cursorStyle:t.get(`cursor`)}}__name(makeSeriesScope$1,`makeSeriesScope`);function createEl(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Qf=function(){function SymbolDraw(e){this.group=new bi,this._SymbolCtor=e||Zf}return SymbolDraw.prototype.updateData=function(e,t){this._progressiveEls=null,t=normalizeUpdateOpt(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=makeSeriesScope$1(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);symbolNeedsDraw(e,i,r,t)&&createEl(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!symbolNeedsDraw(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):updateProps$1(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},SymbolDraw.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);symbolNeedsDraw(t,s,i,e)?(o=o||createEl(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},SymbolDraw.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=makeSeriesScope$1(e),this._data=null,this.group.removeAll()},SymbolDraw.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=normalizeUpdateOpt(r);function updateIncrementalAndHover(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++){var a=t.getItemLayout(i);if(symbolNeedsDraw(t,a,i,r)){var o=new this._SymbolCtor(t,i,this._seriesScope);o.traverse(updateIncrementalAndHover),o.setPosition(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},SymbolDraw.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},SymbolDraw.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},SymbolDraw}();function prepareDataCoordInfo(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=getValueStart(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=s===`x`||s===`radius`?1:0,d=map$1(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return isDimensionStacked(t,d[0])&&(f=!0,d[0]=p),isDimensionStacked(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function getValueStart(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:isNumber(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function getStackedOnPoint(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function isPointIllegal(e,t){return!isFinite(e)||!isFinite(t)}var $f=typeof Float32Array<`u`?Float32Array:void 0;function createFloat32Array(e){return tryEnsureTypedArray({ctor:$f},e).arr}function tryEnsureTypedArray(e,t){var n=e.arr,r=e.ctor;if(t>Li&&(t=Li),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function diffData(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function lineAnimationDiff(e,t,n,r,i,a,o,s){for(var c=diffData(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=prepareDataCoordInfo(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=getStackedOnPoint(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,N=createFloat32Array(M),P=createFloat32Array(M),I=createFloat32Array(M),L=createFloat32Array(M),R=[],y=0;y<m.length;y++){var ee=m[y],z=y*2,te=ee*2;N[z]=l[te],N[z+1]=l[te+1],P[z]=u[te],P[z+1]=u[te+1],I[z]=d[te],I[z+1]=d[te+1],L[z]=f[te],L[z+1]=f[te+1],R[y]=p[ee]}return{current:N,next:P,stackedOnCurrent:I,stackedOnNext:L,status:R}}var ep=Math.min,tp=Math.max;function drawSegment(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(isPointIllegal(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;isPointIllegal(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||isPointIllegal(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,I=void 0;if(s===`x`){P=Math.abs(A),I=Math.abs(j);var L=E>0?1:-1;p=_-L*P*o,m=v,O=_+L*I*o,k=v}else if(s===`y`){P=Math.abs(M),I=Math.abs(N);var R=D>0?1:-1;p=_,m=v-R*P*o,O=_,k=v+R*I*o}else P=Math.sqrt(A*A+M*M),I=Math.sqrt(j*j+N*N),T=I/(I+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=ep(O,tp(S,_)),k=ep(k,tp(C,v)),O=tp(O,ep(S,_)),k=tp(k,ep(C,v)),E=O-_,D=k-v,p=_-E*P/I,m=v-D*P/I,p=ep(p,tp(l,_)),m=ep(m,tp(u,v)),p=tp(p,ep(l,_)),m=tp(m,ep(u,v)),E=_-p,D=v-m,O=_+E*I/P,k=v+D*I/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var np=function(){function ECPolylineShape(){this.smooth=0,this.smoothConstraint=!0}return ECPolylineShape}(),rp=function(e){__extends$1(ECPolyline,e);function ECPolyline(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return ECPolyline.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},ECPolyline.prototype.getDefaultShape=function(){return new np},ECPolyline.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&isPointIllegal(n[i*2-2],n[i*2-1]);i--);for(;r<i&&isPointIllegal(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=drawSegment(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},ECPolyline.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=Ha.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?cubicRootAt(i,u,f,m,e,s):cubicRootAt(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?cubicAt(a,d,p,h,b):cubicAt(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},ECPolyline}(J),ip=function(e){__extends$1(ECPolygonShape,e);function ECPolygonShape(){return e!==null&&e.apply(this,arguments)||this}return ECPolygonShape}(np),ap=function(e){__extends$1(ECPolygon,e);function ECPolygon(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return ECPolygon.prototype.getDefaultShape=function(){return new ip},ECPolygon.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&isPointIllegal(n[a*2-2],n[a*2-1]);a--);for(;i<a&&isPointIllegal(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=drawSegment(e,n,i,a,a,1,t.smooth,o,t.connectNulls);drawSegment(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},ECPolygon}(J);function createGridClipPath(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new so({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=isFunction(i)?function(e){i(e,d)}:null;initProps(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function createPolarClipPath(e,t,n){var r=e.getArea(),i=round$1(r.r0,1),a=round$1(r.r,1),o=new ms({shape:{cx:round$1(e.cx,1),cy:round$1(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,initProps(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function createCoordSysClipAreaSimply(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function isCoordinateSystemType(e,t){return e.type===t}function isPointsSame(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function xyExtentFromPoints(e){for(var t=initExtentForUnion(),n=initExtentForUnion(),r=0;r<e.length;){var i=e[r++],a=e[r++];isPointIllegal(i,a)||(unionExtentFromNumber(t,i),unionExtentFromNumber(n,a))}return[t,n]}function getBoundingDiff(e,t){var n=xyExtentFromPoints(e),r=n[0],i=n[1],a=xyExtentFromPoints(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function getSmooth(e){return isNumber(e)?e:e?.5:0}function getStackedOnPoints(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=createFloat32Array(r*2),a=0;a<r;a++){var o=getStackedOnPoint(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function turnPointsIntoStep(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;isPointIllegal(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function clipColorStops(e,t){var n=[],r=e.length,i,a;function lerpStop(e,t,n){var r=e.coord;return{coord:n,color:lerp((n-r)/(t.coord-r),[e.color,t.color])}}for(var o=0;o<r;o++){var s=e[o],c=s.coord;if(c<0)i=s;else if(c>t){a?n.push(lerpStop(a,s,t)):i&&n.push(lerpStop(i,s,0),lerpStop(i,s,t));break}else i&&(n.push(lerpStop(i,s,0)),i=null),n.push(s),a=s}return n}function getVisualGradient(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())){if(t.type!==`cartesian2d`)return;for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(!a)return;var c=t.getAxis(i),l=map$1(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=clipColorStops(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;each$4(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new js(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}function getIsIgnoreFunc(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&canShowAllSymbolForCategory(a,t))){var o=t.mapDimension(a.dim),s={};return each$4(a.getViewLabels(),function(e){e.tick.offInterval||(s[getTickValueOutermost(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function canShowAllSymbolForCategory(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Zf.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>r)return!1;return!0}function getLastIndexNotNull(e){for(var t=e.length/2;t>0&&isPointIllegal(e[t*2-2],e[t*2-1]);t--);return t-1}function getPointAtIndex(e,t){return[e[t*2],e[t*2+1]]}function getIndexRange(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!isPointIllegal(o,e[l*2+1-i])){if(l===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function anyStateShowEndLabel(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<jo.length;t++)if(e.get([jo[t],`endLabel`,`show`]))return!0;return!1}function createLineClipPath(e,t,n,r){if(isCoordinateSystemType(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=anyStateShowEndLabel(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=createGridClipPath(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}else return createPolarClipPath(t,n,r)}function getEndLabelStateSpecified(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var op=function(e){__extends$1(LineView,e);function LineView(){return e!==null&&e.apply(this,arguments)||this}return LineView.prototype.init=function(){var e=new bi,t=new Qf;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=U(this._changePolyState,this)},LineView.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=prepareDataCoordInfo(r,a,_),y=g&&getStackedOnPoints(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&getIsIgnoreFunc(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=l?!1:e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=getVisualGradient(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&(y=turnPointsIntoStep(y,c,r,w,x)),c=turnPointsIntoStep(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,convertToColorString(E)),m.setClipPath(createLineClipPath(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,convertToColorString(E));var D=m.getClipPath();D?initProps(D,{shape:createLineClipPath(this,r,!1,e).shape},e):m.setClipPath(createLineClipPath(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!isPointsSame(this._stackedOnPoints,y)||!isPointsSame(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&(y=turnPointsIntoStep(y,c,r,w,x)),c=turnPointsIntoStep(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(defaults(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),setStatesStylesFromModel(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Y(f).seriesIndex=e.seriesIndex,toggleHoverEmphasis(f,k,A,j);var N=getSmooth(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var I=a.getCalculationInfo(`stackedOnSeries`),L=0;p.useStyle(defaults(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),I&&(L=getSmooth(I.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:L,smoothMonotone:P,connectNulls:x}),setStatesStylesFromModel(p,e,`areaStyle`),Y(p).seriesIndex=e.seriesIndex,toggleHoverEmphasis(p,k,A,j)}var R=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=R)}),this._polyline.onHoverStateChange=R,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ee=e.get(`triggerEvent`),z=e.get(`triggerLineEvent`),te=z===!0||ee===!0||ee===`line`,ne=z===!0||ee===!0||ee===`area`;this.packEventData(e,f,te),p&&this.packEventData(e,p,ne)},LineView.prototype.packEventData=function(e,t,n){Y(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},LineView.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=queryDataIndex(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(isPointIllegal(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Zf(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else ru.prototype.highlight.call(this,e,t,n,r)},LineView.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=queryDataIndex(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else ru.prototype.downplay.call(this,e,t,n,r)},LineView.prototype._changePolyState=function(e){var t=this._polygon;setStatesFlag(this._polyline,e),t&&setStatesFlag(t,e)},LineView.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new rp({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},LineView.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ap({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},LineView.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);isFunction(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=isFunction(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n)if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=isFunction(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},LineView.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(anyStateShowEndLabel(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new po({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=getLastIndexNotNull(o);c>=0&&(setLabelStyle(a,getLabelStatesModels(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?getDefaultLabel(i,e):getDefaultInterpolatedLabel(i,n)},enableTextSetter:!0},getEndLabelStateSpecified(r,t)),a.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},LineView.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=getIndexRange(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=getPointAtIndex(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=interpolateRawValues(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=getPointAtIndex(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=ic(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},LineView.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=lineAnimationDiff(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=turnPointsIntoStep(u.stackedOnCurrent,u.current,n,i,o),d=turnPointsIntoStep(u.current,null,n,i,o),m=turnPointsIntoStep(u.stackedOnNext,u.next,n,i,o),p=turnPointsIntoStep(u.next,null,n,i,o)),getBoundingDiff(d,p)>3e3||c&&getBoundingDiff(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),updateProps$1(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),updateProps$1(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},LineView.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},LineView.type=`line`,LineView}(ru);function pointsLayout(e,t){return{seriesType:e,plan:createRenderPlanner(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=map$1(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);isDimensionStacked(n,o[0])&&(o[0]=c),isDimensionStacked(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&createFloat32Array(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var sp={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},indexSampler=function(e){return Math.round(e.length/2)};function dataSample(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;isString(i)?p=sp[i]:isFunction(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,indexSampler))}}}}}function install$13(e){e.registerChartView(op),e.registerSeriesModel(Xf),e.registerLayout(pointsLayout(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,dataSample(`line`))}__name(install$13,`install`);var cp=function(e){__extends$1(Axis2D,e);function Axis2D(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return Axis2D.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},Axis2D.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},Axis2D.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},Axis2D.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},Axis2D}(Wf),lp=null;function getAxisBreakHelper(){return lp}var up=`expandAxisBreak`,dp=Math.PI,fp=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],pp=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],mp=makeInner(),hp=makeInner(),gp=function(){function AxisBuilderSharedContext(e){this.recordMap={},this.resolveAxisNameOverlap=e}return AxisBuilderSharedContext.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},AxisBuilderSharedContext}();function resetOverlapRecordToShared(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=hasAxisName(e.axisName)&&isNameLocationCenter(e.nameLocation);each$4(r,function(e){var t=ensureLabelLayoutWithGeometry(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?invert(_p,n.transform):identity(_p),t.transform&&mul(_p,_p,t.transform),G.copy(vp,t.localRect),vp.applyTransform(_p),s?s.union(vp):G.copy(s=new G(0,0,0,0),vp))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new G(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var _p=create(),vp=new G(0,0,0,0),resolveAxisNameOverlapDefault=function(e,t,n,r,i,a){if(isNameLocationCenter(e.nameLocation)){var o=a.stOccupiedRect;o&&moveIfOverlap(computeLabelGeometry2({},o,a.transGroup.transform),r,i)}else moveIfOverlapByLinearLabels(a.labelInfoList,a.dirVec,r,i)};function moveIfOverlap(e,t,n){var r=new W;labelIntersect(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&labelLayoutApplyTranslation(t,r)}function moveIfOverlapByLinearLabels(e,t,n,r){for(var i=W.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||moveIfOverlap(s,n,r)}}var yp=function(){function AxisBuilder(e,t,n,r){this.group=new bi,this._axisModel=e,this._api=t,this._local={},this._shared=r||new gp(resolveAxisNameOverlapDefault),this._resetCfgDetermined(n)}return AxisBuilder.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},AxisBuilder.prototype.__getRawCfg=function(){return this._cfg.raw},AxisBuilder.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=retrieve2(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=retrieve2(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:retrieve2(e.nameDirection,1),tickDirection:retrieve2(e.tickDirection,1),labelDirection:retrieve2(e.labelDirection,1),labelOffset:retrieve2(e.labelOffset,0),silent:retrieve2(e.silent,!0),axisName:r,nameLocation:retrieve3(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:hasAxisName(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new bi({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new W(Math.cos(-a.rotation),Math.sin(-a.rotation))},AxisBuilder.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),each$4(bp,function(r){e[r]&&xp[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},AxisBuilder.innerTextLayout=function(e,t,n){var r=remRadian(t-e),i,a;return isRadianAroundZero(r)?(a=n>0?`top`:`bottom`,i=`center`):isRadianAroundZero(r-dp)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<dp?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},AxisBuilder.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},AxisBuilder.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},AxisBuilder}(),bp=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],xp={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(applyTransform$1(u,u,l),applyTransform$1(d,d,l));var p=extend({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&hasBreaks(r.axis.scale))getAxisBreakHelper().buildAxisBreakLine(r,i,a,m);else{var h=new Cs(extend({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));subPixelOptimizeLine(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);isString(g)&&(g=[g,g]),(isString(_)||isNumber(_))&&(_=[_,_]);var v=normalizeSymbolOffset(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];each$4([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=createSymbol$1(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){dealLastTickLabelResultReusable(t,i,s)&&layOutAxisTickLabel(e,t,n,r,i,a,o,zf.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){dealLastTickLabelResultReusable(t,i,s)&&layOutAxisTickLabel(e,t,n,r,i,a,o,zf.determine);var c=buildAxisMajorTicks(e,i,a,r);syncLabelIgnoreToMajorTicks(e,t.labelLayoutList,c),buildAxisMinorTicks(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&(i.remove(t.nameEl),t.nameEl=c.nameLayout=c.nameLocation=null);var l=e.axisName;if(hasAxisName(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new W(0,0),_=new W(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=create();_.transform(rotate(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*dp/180);var b,x;isNameLocationCenter(u)?b=yp.innerTextLayout(e.rotation,y??e.rotation,d):(b=endTextLayout(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=retrieve(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new po({x:g.x,y:g.y,rotation:b.rotation,silent:yp.isLabelSilent(r),style:createTextStyle(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(setTooltipConfig({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=yp.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Y(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=ensureLabelLayoutWithGeometry({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:isNameLocationCenter(u)?fp[E]:pp[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function layOutAxisTickLabel(e,t,n,r,i,a,o,s){axisLabelBuildResultExists(t)||buildAxisLabel(e,t,i,s,r,o);var c=t.labelLayoutList;updateAxisLabelChangableProps(e,r,c,a),adjustBreakLabels(r,e.rotation,c);var l=e.optionHideOverlap;fixMinMaxLabelShow(r,c,l),l&&hideOverlap(filter(c,function(e){return e&&!e.label.ignore})),resetOverlapRecordToShared(e,n,r,c)}function endTextLayout(e,t,n,r){var i=remRadian(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return isRadianAroundZero(i-dp/2)?(o=c?`bottom`:`top`,a=`center`):isRadianAroundZero(i-dp*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<dp*1.5&&i>dp/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function fixMinMaxLabelShow(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(shouldShowAllLabels(r))return;function deal(e,a,o){var s=ensureLabelLayoutWithGeometry(t[a]),c=ensureLabelLayoutWithGeometry(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=mp(s.label).labelInfo.tick;if(isTimeScale(l)&&u.notNice||isOrdinalScale(l)&&u.offInterval){ignoreEl(s.label);return}}if(e===!1||s.suggestIgnore){ignoreEl(s.label);return}if(c.suggestIgnore){ignoreEl(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=newLabelLayoutWithGeometry({marginForce:f},s),c=newLabelLayoutWithGeometry({marginForce:f},c)}labelIntersect(s,c,null,{touchThreshold:d})&&ignoreEl(e?c.label:s.label)}}var a=e.get([`axisLabel`,`showMinLabel`]),o=e.get([`axisLabel`,`showMaxLabel`]),s=t.length;deal(a,0,1),deal(o,s-1,s-2)}function syncLabelIgnoreToMajorTicks(e,t,n){e.showMinorTicks||each$4(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=hp(r),a=mp(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){ignoreEl(r);return}}})}function ignoreEl(e){e&&(e.ignore=!0)}function createTicks(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(applyTransform$1(o,o,t),applyTransform$1(s,s,t));var u=new Cs({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});subPixelOptimizeLine(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=hp(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function buildAxisMajorTicks(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=createTicks(i.getTicksCoords(),n.transform,c,defaults(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function buildAxisMinorTicks(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=defaults(c.getLineStyle(),defaults(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=createTicks(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function dealLastTickLabelResultReusable(e,t,n){if(axisLabelBuildResultExists(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i=i&&r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),axisLabelBuildResultSet(e,null,null,null))}return!0}function buildAxisLabel(e,t,n,r,i,a){var o=i.axis,s=retrieve(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new bi;n.add(c);var l=createAxisLabelsComputingContext(r);if(!s||o.scale.isBlank()){axisLabelBuildResultSet(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(retrieve(e.raw.labelRotate,u.get(`rotate`))||0)*dp/180,p=yp.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;each$4(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=getTickValueOutermost(o.scale,n);if(m&&m[f]){var y=m[f];isObject$2(y)&&y.textStyle&&(l=new gc(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=retrieve2(l.getShallow(`alignMinLabel`,!0),x),C=retrieve2(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=retrieve2(l.getShallow(`verticalAlignMinLabel`,!0),w),E=retrieve2(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new po({x:0,y:0,rotation:0,silent:yp.isLabelSilent(i),z2:D,style:createTextStyle(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:isFunction(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=mp(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,setTooltipConfig({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=yp.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var M=j.parsedBreak;A.break={start:M.vmin,end:M.vmax}}o.type===`category`&&(A.dataIndex=f),Y(O).eventData=A,j&&addBreakEventHandler(i,a,O,j)}h.push(O),c.add(O)}),axisLabelBuildResultSet(t,map$1(h,function(e){return{label:e,priority:mp(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function axisLabelBuildResultExists(e){return!!e.labelLayoutList}function axisLabelBuildResultSet(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function updateAxisLabelChangableProps(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);each$4(n,function(n,a){var o=ensureLabelLayoutWithGeometry(n);if(o){var s=o.label,c=mp(s);o.suggestIgnore=s.ignore,s.ignore=!1,copyTransform(Sp,Cp);var l=t.axis;Sp.x=l.dataToCoord(getTickValueOutermost(l.scale,c.labelInfo.tick)),Sp.y=e.labelOffset+e.labelDirection*i,Sp.rotation=c.layoutRotation,r.add(Sp),Sp.updateTransform(),r.remove(Sp),Sp.decomposeTransform(),copyTransform(s,Sp),s.markRedraw(),setLabelLayoutDirty(o,!0),ensureLabelLayoutWithGeometry(o)}})}var Sp=new so,Cp=new so;function hasAxisName(e){return!!e}function addBreakEventHandler(e,t,n,r){n.on(`click`,function(n){var i={type:up,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function adjustBreakLabels(e,t,n){var r=getScaleBreakHelper();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&mp(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&each$4(i,function(r){getAxisBreakHelper().adjustBreakLabelPair(e.axis.inverse,t,[ensureLabelLayoutWithGeometry(n[r[0]]),ensureLabelLayoutWithGeometry(n[r[1]])])})}}function layout(e,t,n){n=n||{};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),retrieve(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function findAxisModels(e){var t={xAxisModel:null,yAxisModel:null};return each$4(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Ki).models[0]}),t}function createCartesianAxisViewCommonPartBuilder(e,t,n,r,i,a){for(var o=layout(e,n),s=!1,c=!1,l=0;l<t.length;l++)isIntervalOrLogScale(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new yp(n,r,o,i)}function updateCartesianAxisViewCommonPartBuilder(e,t,n){var r=layout(t,n);e.updateCfg(r)}var wp={left:0,right:0,top:0,bottom:0},Tp=[`25%`,`25%`],Ep=`cartesian2d`,Dp=function(e){__extends$1(GridModel,e);function GridModel(){return e!==null&&e.apply(this,arguments)||this}return GridModel.prototype.mergeDefaultAndTheme=function(t,n){var r=getLayoutParams(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&mergeLayoutParam(t.outerBounds,r)},GridModel.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&mergeLayoutParam(this.option.outerBounds,t.outerBounds)},GridModel.type=`grid`,GridModel.dependencies=[`xAxis`,`yAxis`],GridModel.layoutMode=`box`,GridModel.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:wp,outerBoundsContain:`all`,outerBoundsClampWidth:Tp[0],outerBoundsClampHeight:Tp[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},GridModel}(Z),Op=function(e){__extends$1(ScatterSeriesModel,e);function ScatterSeriesModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ScatterSeriesModel.type,t.hasSymbolVisual=!0,t}return ScatterSeriesModel.prototype.getInitialData=function(e,t){return createSeriesData(null,this,{useEncodeDefaulter:!0})},ScatterSeriesModel.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},ScatterSeriesModel.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},ScatterSeriesModel.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},ScatterSeriesModel.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},ScatterSeriesModel.type=`series.scatter`,ScatterSeriesModel.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],ScatterSeriesModel.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Q.color.primary}},universalTransition:{divideShape:`clone`}},ScatterSeriesModel}($l),kp=4,Ap=function(){function LargeSymbolPathShape(){}return LargeSymbolPathShape}(),jp=function(e){__extends$1(LargeSymbolPath,e);function LargeSymbolPath(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return LargeSymbolPath.prototype.getDefaultShape=function(){return new Ap},LargeSymbolPath.prototype.reset=function(){this.notClear=!1,this._off=0},LargeSymbolPath.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},LargeSymbolPath.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<kp,c=this.softClipShape,l;if(s){this._ctx=o;return}for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||c&&!c.contain(u,d)||(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)},LargeSymbolPath.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||i&&!i.contain(o,s)||r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},LargeSymbolPath.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},LargeSymbolPath.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},LargeSymbolPath.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new G(o-i/2,s-a/2,c-o+i,l-s+a)}return e},LargeSymbolPath}(J),Mp=function(){function LargeSymbolDraw(){this.group=new bi}return LargeSymbolDraw.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},LargeSymbolDraw.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},LargeSymbolDraw.prototype.incrementalPrepareUpdate=function(e){this._clear()},LargeSymbolDraw.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},LargeSymbolDraw.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},LargeSymbolDraw.prototype._create=function(){var e=new jp({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},LargeSymbolDraw.prototype._setCommon=function(e,t,n){var r=t.hostModel;n=n||{};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=createSymbol$1(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<kp;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=Y(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},LargeSymbolDraw.prototype.remove=function(){this._clear()},LargeSymbolDraw.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},LargeSymbolDraw}(),Np=function(e){__extends$1(ScatterView,e);function ScatterView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ScatterView.type,t}return ScatterView.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,createSymbolDrawOpt(e)),this._finished=!0},ScatterView.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},ScatterView.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),getIncrementalId(t),createSymbolDrawOpt(t)),this._finished=e.end===t.getData().count()},ScatterView.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=pointsLayout(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(createSymbolDrawOpt(e))}else return{update:!0}},ScatterView.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},ScatterView.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new Mp:new Qf,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},ScatterView.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},ScatterView.prototype.dispose=function(){},ScatterView.type=`scatter`,ScatterView}(ru);function createSymbolDrawOpt(e){return{clipShape:createCoordSysClipAreaSimply(e)}}var Pp=function(e){__extends$1(CartesianAxisModel,e);function CartesianAxisModel(){return e!==null&&e.apply(this,arguments)||this}return CartesianAxisModel.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ki).models[0]},CartesianAxisModel.type=`cartesian2dAxis`,CartesianAxisModel}(Z);mixin(Pp,Df);var Fp={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:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.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:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},Ip=merge({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},Fp),Lp=merge({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},Fp),Rp={category:Ip,value:Lp,time:merge({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},Lp),log:defaults({logBase:10},Lp)};function axisModelCreator(e,t,n,r){each$4(Tf,function(i,a){var o=merge(merge({},Rp[a],!0),r,!0),s=function(e){__extends$1(AxisModel,e);function AxisModel(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return AxisModel.prototype.mergeDefaultAndTheme=function(e,t){var n=fetchLayoutMode(this),r=n?getLayoutParams(e):{};merge(e,t.getTheme().get(a+`Axis`)),merge(e,this.getDefaultOption()),e.type=getAxisType(e),n&&mergeLayoutParam(e,r,n)},AxisModel.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=df.createByAxisModel(this))},AxisModel.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},AxisModel.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},AxisModel.prototype.updateAxisBreaks=function(e){var t=getAxisBreakHelper();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},AxisModel.type=t+`Axis.`+a,AxisModel.defaultOption=o,AxisModel}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,getAxisType)}function getAxisType(e){return e.type||(e.data?`category`:`value`)}var zp=function(){function Cartesian(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return Cartesian.prototype.getAxis=function(e){return this._axes[e]},Cartesian.prototype.getAxes=function(){return map$1(this._dimList,function(e){return this._axes[e]},this)},Cartesian.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),filter(this.getAxes(),function(t){return t.scale.type===e})},Cartesian.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},Cartesian}(),Bp=[`x`,`y`];function canCalculateAffineTransform(e){return(e.type===`interval`||e.type===`time`)&&!hasBreaks(e)}var Vp=function(e){__extends$1(Cartesian2D,e);function Cartesian2D(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Ep,t.dimensions=Bp,t}return Cartesian2D.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!canCalculateAffineTransform(e)||!canCalculateAffineTransform(t))){var n=getScaleExtentForMappingUnsafe(e,null),r=getScaleExtentForMappingUnsafe(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s;this._invTransform=invert([],this._transform=[c,0,0,l,i[0]-n[0]*c,i[1]-r[0]*l])}}},Cartesian2D.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},Cartesian2D.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},Cartesian2D.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},Cartesian2D.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new G(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},Cartesian2D.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return applyTransform$1(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},Cartesian2D.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t=t||[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},Cartesian2D.prototype.pointToData=function(e,t,n){if(n=n||[],this._invTransform)return applyTransform$1(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},Cartesian2D.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},Cartesian2D.prototype.getArea=function(e){e=e||0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new G(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},Cartesian2D}(zp);function scaleCalcAlign(e,t){var n=e.scale,r=e.model,i=adoptScaleRawExtentInfoAndPrepare(n,r,r.ecModel,e,null),a=isLogScale(n),o=isLogScale(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=Di(l[0].value-l[1].value),g=Di(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-(f?1:0)-(p?1:0)}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=intervalScaleEnsureValidExtent(S,b),w,T,E,D,O,k;function loopIncreaseInterval(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*K(c,2):increaseInterval(E),D=getIntervalPrecision(E)}function updateMinFromMinNice(){w=round$1(k-E*f,D)}function updateMaxFromMaxNice(){T=round$1(O+E*p,D)}function updateMinNiceFromMinT0Interval(){k=f?round$1(w+E*f,D):w}function updateMaxNiceFromMaxT1Interval(){O=p?round$1(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var A=e.getExtent(),j=Di(A[1]-A[0]);D=getAcceptableTickPrecision([T,w],j,.5/m),updateMinNiceFromMinT0Interval(),updateMaxNiceFromMaxT1Interval(),isNullableNumberFinite(D)&&(E=round$1(E,D))}else{var M=C[1]-C[0];E=a?K(quantity(M),1):nice(M/m,2),D=getIntervalPrecision(E),b[0]?(w=C[0],loopIncreaseInterval(function(){if(updateMinNiceFromMinT0Interval(),O=round$1(k+E*m,D),updateMaxFromMaxNice(),T>=C[1])return!0})):b[1]?(T=C[1],loopIncreaseInterval(function(){if(updateMaxNiceFromMaxT1Interval(),k=round$1(O-E*m,D),updateMinFromMinNice(),w<=C[0])return!0})):loopIncreaseInterval(function(){k=round$1(Ai(C[0]/E)*E,D),O=round$1(ki(C[1]/E)*E,D);var e=Oi((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=ki(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=round$1(k-E*n[0],D),O=round$1(O+E*n[1],D),updateMinFromMinNice(),updateMaxFromMaxNice(),w<=C[0]&&T>=C[1])return!0}})}updateIntervalOrLogScaleForNiceOrAligned(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}var Hp=[[3,1],[0,2]],Up=function(){function Grid(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Bp,this._initCartesian(e,t,n),this.model=e}return Grid.prototype.getRect=function(){return this._rect},Grid.prototype.update=function(e,t){var n=this._axesMap;each$4(this._axesList,function(e){scaleRawExtentInfoCreate(e,1);var t=e.scale;isOrdinalScale(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function updateAxisTicks(e){for(var t=keys(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):scaleCalcNice(i)}each$4(n,function(e){incapableOfAlignNeedFallback(e,e.__alignTo)?scaleCalcNice(e):scaleCalcAlign(e,e.__alignTo.scale)})}updateAxisTicks(n.x),updateAxisTicks(n.y);var r={};each$4(n.x,function(e){fixAxisOnZero(n,`y`,e,r)}),each$4(n.y,function(e){fixAxisOnZero(n,`x`,e,r)}),this.resize(this.model,t)},Grid.prototype.resize=function(e,t,n){var r=createBoxLayoutReference(e,t),i=this._rect=getLayoutRect(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(updateAllAxisExtentTransByGridRect(a,i),!n){var c=createAxisBiulders(i,o,a,s,t),l=void 0;if(s)Wp?(Wp(this._axesList,i),updateAllAxisExtentTransByGridRect(a,i)):l=layOutGridByOuterBounds(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=prepareOuterBounds(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=layOutGridByOuterBounds(d,f,p,i,a,c,r))}createOrUpdateAxesView(i,a,zf.determine,null,l,r),each$4(this._coordsList,function(e){e.calcAffineTransform()})}},Grid.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},Grid.prototype.getAxes=function(){return this._axesList.slice()},Grid.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}isObject$2(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},Grid.prototype.getCartesians=function(){return this._coordsList.slice()},Grid.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},Grid.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},Grid.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Ki).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Ki).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,indexOf(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},Grid.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},Grid.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,createAxisCreator(`x`),this),t.eachComponent(`yAxis`,createAxisCreator(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,each$4(o.x,function(t,n){each$4(o.y,function(i,a){var o=`x`+n+`y`+a,s=new Vp(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),prepareAlignToInCoordSysCreate(o.x),prepareAlignToInCoordSysCreate(o.y);function createAxisCreator(t){return function(n,r){if(isAxisUsedInTheGrid(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=determineAxisType(n),u=new cp(t,createScaleByModel(n,l,!0),[0,0],l,c);u.onBand=isAxisOnBand(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},Grid.prototype.getTooltipAxes=function(e){var t=[],n=[];return each$4(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);indexOf(t,i)<0&&t.push(i),indexOf(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},Grid.create=function(e,t){var n=[];return e.eachComponent(`grid`,function(r,i){var a=new Grid(r,e,t);a.name=`grid_`+i,a.resize(r,t,!0),r.coordinateSystem=a,n.push(a),each$4(a._axesList,function(e){scaleRawExtentInfoEnableBoxCoordSysUsage(e,Grid.dimIdxMap)})}),e.eachSeries(function(e){var t,n;injectCoordSysByOption({targetModel:e,coordSysType:Ep,coordSysProvider});function coordSysProvider(){var r=findAxisModels(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(associateSeriesWithAxis(t,e,Ep),associateSeriesWithAxis(n,e,Ep))},this),n},Grid.dimensions=Bp,Grid.dimIdxMap=createDimNameMap(Bp),Grid}();function isAxisUsedInTheGrid(e,t){return e.getCoordSysModel()===t}function fixAxisOnZero(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)canOnZeroToAxis(s,i[c])&&(a=i[c]);else for(var l in i)if(hasOwn(i,l)&&canOnZeroToAxis(s,i[l])&&!r[getOnZeroRecordKey(i[l])]){a=i[l];break}a&&(r[getOnZeroRecordKey(a)]=!0);function getOnZeroRecordKey(e){return e.dim+`_`+e.index}}function canOnZeroToAxis(e,t){if(!t)return!1;var n=t.scale,r=getScaleValuePositionKind(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&isOnAxisZeroDiscouraged(t)&&(i=!1),i}function prepareAlignToInCoordSysCreate(e){for(var t=keys(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];isIntervalOrLogScale(a.scale)&&retrieveAxisBreaksOption(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||(n=r.pop()),n&&each$4(r,function(e){e.__alignTo=n})}function incapableOfAlignNeedFallback(e,t){return hasBreaks(e.scale)||hasBreaks(t.scale)||t.scale.getTicks().length<2}function updateAxisTransform(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function updateAllAxisExtentTransByGridRect(e,t){each$4(e.x,function(e){return updateAxisExtentTransByGridRect(e,t.x,t.width)}),each$4(e.y,function(e){return updateAxisExtentTransByGridRect(e,t.y,t.height)})}function updateAxisExtentTransByGridRect(e,t,n){var r=[0,n],i=e.inverse?1:0;e.setExtent(r[i],r[1-i]),updateAxisTransform(e,t)}var Wp;function layOutGridByOuterBounds(e,t,n,r,i,a,o){createOrUpdateAxesView(r,i,zf.estimate,t,!1,o);var s=[0,0,0,0];fillLabelNameOverflowOnOneDimension(0),fillLabelNameOverflowOnOneDimension(1),fillMarginOnOneDimension(r,0,NaN),fillMarginOnOneDimension(r,1,NaN);var c=find(s,function(e){return e>0})==null;return expandOrShrinkRect(r,s,!0,!0,n),updateAllAxisExtentTransByGridRect(i,r),c;function fillLabelNameOverflowOnOneDimension(e){each$4(i[qs[e]],function(t){if(shouldAxisShow(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(getTickValueOutermost(t.scale,mp(o.label).labelInfo.tick));s=e===1?1-s:s,fillMarginOnOneDimension(o.rect,e,s),fillMarginOnOneDimension(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=isNameLocationCenter(n.nameLocation)?.5:NaN;fillMarginOnOneDimension(c.rect,e,s),fillMarginOnOneDimension(c.rect,1-e,NaN)}}})}function fillMarginOnOneDimension(t,n,r){var i=e[qs[n]]-t[qs[n]],a=t[Js[n]]+t[qs[n]]-(e[Js[n]]+e[qs[n]]);i=applyProportion(i,1-r),a=applyProportion(a,r);var o=Hp[n][0],c=Hp[n][1];s[o]=K(s[o],i),s[c]=K(s[c],a)}function applyProportion(e,t){return e>0&&!eqNaN(t)&&t>1e-4&&(e/=t),e}}function createAxisBiulders(e,t,n,r,i){var a=new gp(resolveAxisNameOverlapForGrid);return each$4(n,function(n){return each$4(n,function(n){if(shouldAxisShow(n.model)){var o=!r;n.axisBuilder=createCartesianAxisViewCommonPartBuilder(e,t,n.model,i,a,o)}})}),a}function createOrUpdateAxesView(e,t,n,r,i,a){var o=n===zf.determine;each$4(t,function(t){return each$4(t,function(t){shouldAxisShow(t.model)&&(updateCartesianAxisViewCommonPartBuilder(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};calcNameMarginLevel(0),calcNameMarginLevel(1);function calcNameMarginLevel(t){s[qs[1-t]]=e[Js[t]]<=a.refContainer[Js[t]]*.5?0:1-t==1?2:1}each$4(t,function(e,t){return each$4(e,function(e){shouldAxisShow(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function prepareOuterBounds(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=getLayoutRect(e.get(`outerBounds`,!0)||wp,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||indexOf([`all`,`axisLabel`],a)<0?`all`:a,s=[parsePositionSizeOption(retrieve2(e.get(`outerBoundsClampWidth`,!0),Tp[0]),t.width),parsePositionSizeOption(retrieve2(e.get(`outerBoundsClampHeight`,!0),Tp[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var resolveAxisNameOverlapForGrid=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;resolveAxisNameOverlapDefault(e,t,n,r,i,a),isNameLocationCenter(e.nameLocation)||each$4(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&moveIfOverlapByLinearLabels(e.labelInfoList,e.dirVec,r,i)})};function collect(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return collectAxesInfo(n,e,t),n.seriesInvolved&&collectSeriesInfo(n,e),n}function collectAxesInfo(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];each$4(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=makeKey(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(each$4(n.getAxes(),curry$1(saveTooltipAxisInfo,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&each$4(f.baseAxes,curry$1(saveTooltipAxisInfo,d?`cross`:!0,u)),d&&each$4(f.otherAxes,curry$1(saveTooltipAxisInfo,`cross`,!1))}function saveTooltipAxisInfo(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!isHandleTrigger(d))){s??(s=d.get(`triggerTooltip`)),d=r?makeAxisPointerModel(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=makeKey(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:isHandleTrigger(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=getLinkGroupIndex(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function makeAxisPointerModel(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};each$4(s,function(e){c[e]=clone$2(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||(c.label={});if(l.show??(l.show=!1),i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&defaults(l,u.textStyle)}return e.model.getModel(`axisPointer`,new gc(c,n,r))}function collectSeriesInfo(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||each$4(e.coordSysAxesInfo[makeKey(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())})})}function getLinkGroupIndex(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(checkPropInLink(a[r+`AxisId`],n.id)||checkPropInLink(a[r+`AxisIndex`],n.componentIndex)||checkPropInLink(a[r+`AxisName`],n.name))return i}}function checkPropInLink(e,t){return e===`all`||isArray(e)&&indexOf(e,t)>=0||e===t}function fixValue(e){var t=getAxisInfo$1(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=isHandleTrigger(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function getAxisInfo$1(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[makeKey(e)]}__name(getAxisInfo$1,`getAxisInfo`);function getAxisPointerModel(e){var t=getAxisInfo$1(e);return t&&t.axisPointerModel}function isHandleTrigger(e){return!!e.get([`handle`,`show`])}function makeKey(e){return e.type+`||`+e.id}var Gp={},Kp=function(e){__extends$1(AxisView,e);function AxisView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=AxisView.type,t}return AxisView.prototype.render=function(t,n,r,i){this.axisPointerClass&&fixValue(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},AxisView.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},AxisView.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},AxisView.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},AxisView.prototype._doUpdateAxisPointerClass=function(e,t,n){var r=AxisView.getAxisPointerClass(this.axisPointerClass);if(r){var i=getAxisPointerModel(e);i?(this._axisPointer||(this._axisPointer=new r)).render(e,i,t,n):this._disposeAxisPointer(t)}},AxisView.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},AxisView.registerAxisPointerClass=function(e,t){Gp[e]=t},AxisView.getAxisPointerClass=function(e){return e&&Gp[e]},AxisView.type=`axis`,AxisView}(eu),qp=makeInner();function rectCoordAxisBuildSplitArea(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=qp(e).splitAreaColors,f=createHashMap(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=isArray(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new so({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:defaults({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}qp(e).splitAreaColors=f}}}function rectCoordAxisHandleRemove(e){qp(e).splitAreaColors=null}var Jp=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],Yp=function(e){__extends$1(CartesianAxisView,e);function CartesianAxisView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=CartesianAxisView.type,t.axisPointerClass=`CartesianAxisPointer`,t}return CartesianAxisView.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new bi,this.group.add(this._axisGroup),shouldAxisShow(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),each$4(Jp,function(e){t.get([e,`show`])&&Xp[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||groupTransition(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},CartesianAxisView.prototype.remove=function(){rectCoordAxisHandleRemove(this)},CartesianAxisView.type=`cartesianAxis`,CartesianAxisView}(Kp),Xp={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=isArray(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new Cs({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:defaults({stroke:c[x]},_),silent:!0});subPixelOptimizeLine(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new Cs({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});subPixelOptimizeLine(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){rectCoordAxisBuildSplitArea(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=getAxisBreakHelper(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},Zp=function(e){__extends$1(CartesianXAxisView,e);function CartesianXAxisView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=CartesianXAxisView.type,t}return CartesianXAxisView.type=`xAxis`,CartesianXAxisView}(Yp),Qp=function(e){__extends$1(CartesianYAxisView,e);function CartesianYAxisView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Zp.type,t}return CartesianYAxisView.type=`yAxis`,CartesianYAxisView}(Yp),$p=function(e){__extends$1(GridView,e);function GridView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return GridView.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new so({shape:e.coordinateSystem.getRect(),style:defaults({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},GridView.type=`grid`,GridView}(eu),em={offset:0};function install$12(e){e.registerComponentView($p),e.registerComponentModel(Dp),e.registerCoordinateSystem(`cartesian2d`,Up),axisModelCreator(e,`x`,Pp,em),axisModelCreator(e,`y`,Pp,em),e.registerComponentView(Zp),e.registerComponentView(Qp),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}__name(install$12,`install`);function install$11(e){use(install$12),e.registerSeriesModel(Op),e.registerChartView(Np),e.registerLayout(pointsLayout(`scatter`))}__name(install$11,`install`);var tm=makeInner();function isTaken(e,t){return!!tm(e)[t]}registerAction({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},noop);var nm={axisPointer:1,tooltip:1,brush:1};function onIrrelevantElement(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||nm.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=retrieveZInfo(r),o=retrieveZInfo(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var rm=function(e){__extends$1(RoamController,e);function RoamController(t){var n=e.call(this)||this;n._zr=t;var r=U(n._mousedownHandler,n),i=U(n._mousemoveHandler,n),a=U(n._mouseupHandler,n),o=U(n._mousewheelHandler,n),s=U(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=retrieveZInfo(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:retrieve2(c.z2,-1/0)},p=extend({},n.triggerInfo);this._opt=defaults(extend({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??(e=!0),(!this._enabled||this._controlType!==e)&&(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(addRoamZrListener(t,`mousedown`,r,f),addRoamZrListener(t,`mousemove`,i,f),addRoamZrListener(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(addRoamZrListener(t,`mousewheel`,o,f),addRoamZrListener(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,removeRoamZrListener(t,`mousedown`,r),removeRoamZrListener(t,`mousemove`,i),removeRoamZrListener(t,`mouseup`,a),removeRoamZrListener(t,`mousewheel`,o),removeRoamZrListener(t,`pinch`,s))},n}return RoamController.prototype.isDragging=function(){return this._dragging},RoamController.prototype.isPinching=function(){return this._pinching},RoamController.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(onIrrelevantElement(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||(s=a.isInSelf(e,t,n)),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},RoamController.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},RoamController.prototype.dispose=function(){this.disable()},RoamController.prototype._mousedownHandler=function(e){if(!(isMiddleOrRightButtonOnMouseUpDown(e)||eventConsumed(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},RoamController.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||isTaken(t,`globalPan`)||eventConsumed(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!isAvailableBehavior(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&stop(e.event),e.__ecRoamConsumed=!0,trigger(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},RoamController.prototype._mouseupHandler=function(e){if(!eventConsumed(e)){var t=this._zr;if(!isMiddleOrRightButtonOnMouseUpDown(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},RoamController.prototype._mousewheelHandler=function(e){if(!eventConsumed(e)){var t=isAvailableBehavior(`zoomOnMouseWheel`,e,this._opt),n=isAvailableBehavior(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(!(r===0||!t&&!n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},RoamController.prototype._pinchHandler=function(e){if(!(isTaken(this._zr,`globalPan`)||eventConsumed(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},RoamController.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(stop(r.event),r.__ecRoamConsumed=!0,trigger(e,t,n,r,i))},RoamController}(xn);function eventConsumed(e){return e.__ecRoamConsumed}var im=makeInner();function ensureZrStore(e){var t=im(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function addRoamZrListener(e,t,n,r){for(var i=ensureZrStore(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),ensureUniformListener(e,t)}function removeRoamZrListener(e,t,n){for(var r=ensureZrStore(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||removeUniformListener(e,t);return}}function ensureUniformListener(e,t){var n=ensureZrStore(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function removeUniformListener(e,t){var n=ensureZrStore(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function trigger(e,t,n,r,i){i.isAvailableBehavior=U(isAvailableBehavior,null,n,r),e.trigger(t,i)}function isAvailableBehavior(e,t,n){var r=n[e];return!e||r&&(!isString(r)||t.event[r+`Key`])}var am=Cs.prototype,om=Es.prototype,sm=function(){function StraightLineShape(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return StraightLineShape}();(function(e){__extends$1(CurveShape,e);function CurveShape(){return e!==null&&e.apply(this,arguments)||this}return CurveShape})(sm);function isStraightLine(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var cm=function(e){__extends$1(ECLinePath,e);function ECLinePath(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return ECLinePath.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},ECLinePath.prototype.getDefaultShape=function(){return new sm},ECLinePath.prototype.buildPath=function(e,t){isStraightLine(t)?am.buildPath.call(this,e,t):om.buildPath.call(this,e,t)},ECLinePath.prototype.pointAt=function(e){return isStraightLine(this.shape)?am.pointAt.call(this,e):om.pointAt.call(this,e)},ECLinePath.prototype.tangentAt=function(e){var t=this.shape,n=isStraightLine(t)?[t.x2-t.x1,t.y2-t.y1]:om.tangentAt.call(this,e);return normalize(n,n)},ECLinePath}(J),lm=[`fromSymbol`,`toSymbol`];function makeSymbolTypeKey(e){return`_`+e+`Type`}function makeSymbolTypeValue(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=normalizeSymbolSize(i),l=normalizeSymbolOffset(o||0,c);return r+c+l+(a||``)+(s||``)}function createSymbol(e,t,n){var r=t.getItemVisual(n,e);if(!(!r||r===`none`)){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=normalizeSymbolSize(i),l=normalizeSymbolOffset(o||0,c),u=createSymbol$1(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,u.name=e,u}}function createLine(e){var t=new cm({name:`line`,subPixelOptimize:!0});return setLinePoints(t.shape,e),t}function setLinePoints(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var um=function(e){__extends$1(Line,e);function Line(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return Line.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=createLine(i);o.shape.percent=0,initProps(o,{z2:retrieve2(a,0),shape:{percent:1}},r,t),this.add(o),each$4(lm,function(n){var r=createSymbol(n,e,t);this.add(r),this[makeSymbolTypeKey(n)]=makeSymbolTypeValue(n,e,t)},this),this._updateCommonStl(e,t,n)},Line.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};setLinePoints(o.shape,a),updateProps$1(i,o,r,t),each$4(lm,function(n){var r=makeSymbolTypeValue(n,e,t),i=makeSymbolTypeKey(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=createSymbol(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},Line.prototype.getLinePath=function(){return this.childAt(0)},Line.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=getLabelStatesModels(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,each$4(lm,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<jo.length;n++){var r=jo[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||(s.style={});o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);setLabelStyle(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Q.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?round$1(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);isArray(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),toggleHoverEmphasis(this,u,d,l)},Line.prototype.highlight=function(){enterEmphasis(this)},Line.prototype.downplay=function(){leaveEmphasis(this)},Line.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},Line.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);setLinePoints(t.shape,e),t.dirty()},Line.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=sub([],l,c);normalize(u,u);function setSymbolRotation(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),setSymbolRotation(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),setSymbolRotation(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var d=void 0,f=void 0,p=r.__labelDistance,m=p[0]*i,h=p[1]*i,g=s/2,_=o.tangentAt(g),v=[_[1],-_[0]],y=o.pointAt(g);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]);var b=_[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var x=-Math.atan2(_[1],_[0]);l[0]<c[0]&&(x=Math.PI+x),r.rotation=x}var S=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:S=-h,f=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:S=h,f=`top`;break;default:S=0,f=`middle`}switch(r.__position){case`end`:r.x=u[0]*m+l[0],r.y=u[1]*h+l[1],d=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,f=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*m+c[0],r.y=-u[1]*h+c[1],d=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,f=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=m*b+c[0],r.y=c[1]+S,d=_[0]<0?`right`:`left`,r.originX=-m*b,r.originY=-S;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=y[0],r.y=y[1]+S,d=`center`,r.originY=-S;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-m*b+l[0],r.y=l[1]+S,d=_[0]>=0?`right`:`left`,r.originX=m*b,r.originY=-S;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||f,align:r.__align||d})}},Line}(bi),dm=function(){function LineDraw(e){this.group=new bi,this._LineCtor=e||um}return LineDraw.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=makeSeriesScope(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},LineDraw.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},LineDraw.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=makeSeriesScope(e),this._lineData=null,this.group.removeAll()},LineDraw.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function updateIncrementalAndHover(e){!e.isGroup&&!isEffectObject(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var r=e.start;r<e.end;r++)if(lineNeedsDraw(t.getItemLayout(r))){var i=new this._LineCtor(t,r,this._seriesScope);i.traverse(updateIncrementalAndHover),this.group.add(i),t.setItemGraphicEl(r,i),this._progressiveEls.push(i)}},LineDraw.prototype.remove=function(){this.group.removeAll()},LineDraw.prototype.eachRendered=function(e){traverseElements(this._progressiveEls||this.group,e)},LineDraw.prototype._doAdd=function(e,t,n){if(lineNeedsDraw(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},LineDraw.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);if(!lineNeedsDraw(t.getItemLayout(r))){this.group.remove(a);return}a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)},LineDraw}();function isEffectObject(e){return e.animators&&e.animators.length>0}function makeSeriesScope(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:getLabelStatesModels(t)}}function isPointNaN(e){return isNaN(e[0])||isNaN(e[1])}function lineNeedsDraw(e){return e&&!isPointNaN(e[0])&&!isPointNaN(e[1])}function sliderMove(e,t,n,r,i,a){e=e||0;var o=addSafe(n[1],-n[0]);if(i!=null&&(i=restrict(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(addSafe(t[1],-t[0]));s=restrict(s,[0,o]),i=a=restrict(s,[i,a]),r=0}t[0]=restrict(t[0],n),t[1]=restrict(t[1],n);var c=getSpanSign(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=addSafe(u[0],l):u[1]=addSafe(u[1],-l),t[r]=restrict(t[r],u);var d=getSpanSign(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=addSafe(t[r],c.sign*i)),d=getSpanSign(t,r),a!=null&&d.span>a&&(t[1-r]=addSafe(t[r],d.sign*a)),t}function getSpanSign(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function restrict(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var fm=makeInner(),pm=clone$2,mm=U,hm=function(){function BaseAxisPointer(){this._dragging=!1,this.animationThreshold=15}return BaseAxisPointer.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new bi,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=curry$1(updateProps,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}updateMandatoryProps(o,t,!0),this._renderHandle(i)}},BaseAxisPointer.prototype.remove=function(e){this.clear(e)},BaseAxisPointer.prototype.dispose=function(e){this.clear(e)},BaseAxisPointer.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&calcBandWidth(r).w>o)return!0;if(a){var s=getAxisInfo$1(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},BaseAxisPointer.prototype.makeElOption=function(e,t,n,r,i){},BaseAxisPointer.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=fm(e).pointerEl=new Gs[i.type](pm(t.pointer));e.add(a)}},BaseAxisPointer.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=fm(e).labelEl=new po(pm(t.label));e.add(i),updateLabelShowHide(i,r)}},BaseAxisPointer.prototype.updatePointerEl=function(e,t,n){var r=fm(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},BaseAxisPointer.prototype.updateLabelEl=function(e,t,n,r){var i=fm(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),updateLabelShowHide(i,r))},BaseAxisPointer.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=createIcon(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){stop(e.event)},onmousedown:mm(this._onHandleDragMove,this,0,0),drift:mm(this._onHandleDragMove,this),ondragend:mm(this._onHandleDragEnd,this)}),n.add(r)),updateMandatoryProps(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);isArray(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,createOrUpdate(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},BaseAxisPointer.prototype._moveHandleToValue=function(e,t){updateProps(this._axisPointerModel,!t&&this._moveAnimation,this._handle,getHandleTransProps(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},BaseAxisPointer.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(getHandleTransProps(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(getHandleTransProps(r)),fm(n).lastProp=null,this._doDispatchAxisPointer()}},BaseAxisPointer.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},BaseAxisPointer.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},BaseAxisPointer.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),clear(this,`_doDispatchAxisPointer`)},BaseAxisPointer.prototype.doClear=function(){},BaseAxisPointer.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},BaseAxisPointer}();function updateProps(e,t,n,r){propsEqual(fm(n).lastProp,r)||(fm(n).lastProp=r,t?updateProps$1(n,r,e):(n.stopAnimation(),n.attr(r)))}function propsEqual(e,t){if(isObject$2(e)&&isObject$2(t)){var n=!0;return each$4(t,function(t,r){n=n&&propsEqual(e[r],t)}),!!n}else return e===t}function updateLabelShowHide(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function getHandleTransProps(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function updateMandatoryProps(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function buildElStyle(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function buildLabelElOption(e,t,n,r,i){var a=getValueLabel(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=zc(o.get(`padding`)||0),c=o.getFont(),l=getBoundingRect(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),confineInContainer(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:createTextStyle(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function confineInContainer(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function getValueLabel(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:getAxisRawValue(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};each$4(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),isString(o)?a=o.replace(`{value}`,a):isFunction(o)&&(a=o(s))}return a}function getTransformedPosition(e,t,n){var r=create();return rotate(r,r,n.rotation),translate(r,r,n.position),applyTransform([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function buildCartesianSingleLabelElOption(e,t,n,r,i,a){var o=yp.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),buildLabelElOption(t,r,i,a,{position:getTransformedPosition(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function makeLineShape(e,t,n){return n=n||0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function makeRectShape(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function calcAxisPointerShadowBandWidth(e,t,n){return calcBandWidth(e,{fromStat:{sers:map$1(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function calcAxisPointerShadowEnds(e,t,n){return[K(Ei(t[0],t[1]),e-n/2),Ei(e+n/2,K(t[0],t[1]))]}var gm=function(e){__extends$1(CartesianAxisPointer,e);function CartesianAxisPointer(){return e!==null&&e.apply(this,arguments)||this}return CartesianAxisPointer.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=getCartesian(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=buildElStyle(r),f=_m[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}buildCartesianSingleLabelElOption(t,e,layout(o.getRect(),n),n,r,i)},CartesianAxisPointer.prototype.getHandleTransform=function(e,t,n){var r=layout(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=getTransformedPosition(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},CartesianAxisPointer.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=getCartesian(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=Ei(o[1],l[c]),l[c]=K(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},CartesianAxisPointer}(hm);function getCartesian(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var _m={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:makeLineShape([t,r[0]],[t,r[1]],getAxisDimIndex(e))}},shadow:function(e,t,n,r,i,a){var o=calcAxisPointerShadowBandWidth(e,i,a),s=r[1]-r[0],c=calcAxisPointerShadowEnds(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:makeRectShape([l,r[0]],[u-l,s],getAxisDimIndex(e))}}};function getAxisDimIndex(e){return e.dim===`x`?0:1}var vm=function(e){__extends$1(AxisPointerModel,e);function AxisPointerModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=AxisPointerModel.type,t}return AxisPointerModel.type=`axisPointer`,AxisPointerModel.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.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:Q.color.accent40,throttle:40}},AxisPointerModel}(Z),ym=makeInner(),bm=each$4;function register(e,t,n){if(!H.node){var r=t.getZr();ym(r).records||(ym(r).records={}),initGlobalListeners(r,t);var i=ym(r).records[e]||(ym(r).records[e]={});i.handler=n}}function initGlobalListeners(e,t){if(ym(e).initialized)return;ym(e).initialized=!0,useHandler(`click`,curry$1(doEnter,`click`)),useHandler(`mousemove`,curry$1(doEnter,`mousemove`)),useHandler(`mousewheel`,curry$1(doEnter,`mousewheel`)),useHandler(`globalout`,onLeave);function useHandler(n,r){e.on(n,function(n){var i=makeDispatchAction$1(t);bm(ym(e).records,function(e){e&&r(e,n,i.dispatchAction)}),dispatchTooltipFinally(i.pendings,t)})}}function dispatchTooltipFinally(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function onLeave(e,t,n){e.handler(`leave`,null,n)}function doEnter(e,t,n,r){t.handler(e,n,r)}function makeDispatchAction$1(e){var t={showTip:[],hideTip:[]},dispatchAction=function(n){var r=t[n.type];r?r.push(n):(n.dispatchAction=dispatchAction,e.dispatchAction(n))};return{dispatchAction,pendings:t}}__name(makeDispatchAction$1,`makeDispatchAction`);function unregister(e,t){if(!H.node){var n=t.getZr();(ym(n).records||{})[e]&&(ym(n).records[e]=null)}}var xm=function(e){__extends$1(AxisPointerView,e);function AxisPointerView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=AxisPointerView.type,t}return AxisPointerView.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;register(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},AxisPointerView.prototype.remove=function(e,t){unregister(`axisPointer`,t)},AxisPointerView.prototype.dispose=function(e,t){unregister(`axisPointer`,t)},AxisPointerView.type=`axisPointer`,AxisPointerView}(eu);function findPointFromSeries(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=queryDataIndex(a,e);if(o==null||o<0||isArray(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=u===`x`||u===`radius`?1:0,p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(map$1(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var Sm=makeInner();function axisTrigger(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||U(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){illegalPoint(i)&&(i=findPointFromSeries({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=illegalPoint(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||illegalPoint(i),f={},p={},m={list:[],map:{}},h={showPointer:curry$1(showPointer,p),showTooltip:curry$1(showTooltip,m)};each$4(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);each$4(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=findInputAxisInfo(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&processOnAxis(e,o,h,!1,f)}})});var g={};return each$4(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&each$4(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,makeMapperParam(t),makeMapperParam(e)))),g[e.key]=a}})}),each$4(g,function(e,t){processOnAxis(u[t],e,h,!0,f)}),updateModelActually(p,u,f),dispatchTooltipActually(m,i,e,o),dispatchHighDownActually(u,o,n),f}}function processOnAxis(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=buildPayloadsBySeries(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&extend(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function buildPayloadsBySeries(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return each$4(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(isNullableNumberFinite(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),each$4(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function showPointer(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function showTooltip(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=makeKey(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function updateModelActually(e,t,n){var r=n.axesInfo=[];each$4(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function dispatchTooltipActually(e,t,n,r){if(illegalPoint(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function dispatchHighDownActually(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=Sm(r)[i]||{},o=Sm(r)[i]={};each$4(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&each$4(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function makeHighDownItem(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}each$4(a,function(e,t){!o[t]&&c.push(makeHighDownItem(e))}),each$4(o,function(e,t){!a[t]&&s.push(makeHighDownItem(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function findInputAxisInfo(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function makeMapperParam(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function illegalPoint(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function install$10(e){Kp.registerAxisPointerClass(`CartesianAxisPointer`,gm),e.registerComponentModel(vm),e.registerComponentView(xm),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!isArray(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=collect(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},axisTrigger)}__name(install$10,`install`);function install$9(e){use(install$12),use(install$10)}__name(install$9,`install`);var Cm=[`x`,`y`,`radius`,`angle`,`single`],wm=makeInner(),Tm=[`cartesian2d`,`polar`,`singleAxis`];function isCoordSupported(e){return indexOf(Tm,e.get(`coordinateSystem`))>=0}function getAxisMainType(e){return e+`Axis`}function findEffectedDataZooms(e,t){var n=createHashMap(),r=[],i=createHashMap();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||addToEffected(e)});var a;do a=!1,e.eachComponent(`dataZoom`,processSingle);while(a);function processSingle(e){!i.get(e.uid)&&isLinked(e)&&(addToEffected(e),a=!0)}function addToEffected(e){i.set(e.uid,!0),r.push(e),markAxisControlled(e)}function isLinked(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function markAxisControlled(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function collectReferCoordSysModelInfo(e){var t=e.ecModel,n={infoList:[],infoMap:createHashMap()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(getAxisMainType(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function ensureAxisProxyMap(e){var t=wm(getCachePerECPrepare(e));return t.axisProxyMap||(t.axisProxyMap=createHashMap())}function getAxisProxyFromModel(e){if(e)return ensureAxisProxyMap(e.ecModel).get(e.uid)}function setAxisProxyToModel(e,t){ensureAxisProxyMap(e.ecModel).set(e.uid,t)}function getAlignTo(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?getAxisProxyFromModel(n.model):null}var Em=function(){function DataZoomAxisInfo(){this.indexList=[],this.indexMap=[]}return DataZoomAxisInfo.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},DataZoomAxisInfo}(),Dm=function(e){__extends$1(DataZoomModel,e);function DataZoomModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=DataZoomModel.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=[`percent`,`percent`],t}return DataZoomModel.prototype.init=function(e,t,n){var r=retrieveRawOption(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},DataZoomModel.prototype.mergeOption=function(e){var t=retrieveRawOption(e);merge(this.option,e,!0),merge(this.settledOption,t,!0),this._doInit(t)},DataZoomModel.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;each$4([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},DataZoomModel.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=createHashMap();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},DataZoomModel.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return each$4(Cm,function(n){var r=this.getReferringComponents(getAxisMainType(n),qi);if(r.specified){t=!0;var i=new Em;each$4(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},DataZoomModel.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});setParallelAxis(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});setParallelAxis(a,`single`)}function setParallelAxis(t,n){var i=t[0];if(i){var a=new Em;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Ki).models[0];o&&each$4(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Ki).models[0]&&a.add(e.componentIndex)})}}}r&&each$4(Cm,function(t){if(r){var i=n.findComponents({mainType:getAxisMainType(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new Em;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},DataZoomModel.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},DataZoomModel.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},DataZoomModel.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);each$4([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},DataZoomModel.prototype.noTarget=function(){return this._noTarget},DataZoomModel.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??(e=this.ecModel.getComponent(getAxisMainType(t),n))},this),e},DataZoomModel.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){each$4(n.indexList,function(n){e.call(t,r,n)})})},DataZoomModel.prototype.getAxisProxy=function(e,t){return getAxisProxyFromModel(this.getAxisModel(e,t))},DataZoomModel.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(getAxisMainType(e),t)},DataZoomModel.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;each$4([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},DataZoomModel.prototype.setCalculatedRange=function(e){var t=this.option;each$4([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},DataZoomModel.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},DataZoomModel.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},DataZoomModel.prototype.findRepresentativeAxisProxy=function(e){if(e)return getAxisProxyFromModel(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],a=this._targetAxisInfoMap.get(i),o=0;o<a.indexList.length;o++){var s=this.getAxisProxy(i,a.indexList[o]);if(s.hostedBy(this))return s;t||(t=s)}return t},DataZoomModel.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},DataZoomModel.prototype.getOrient=function(){return this._orient},DataZoomModel.type=`dataZoom`,DataZoomModel.dependencies=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`series`,`toolbox`],DataZoomModel.defaultOption={z:4,filterMode:`filter`,start:0,end:100},DataZoomModel}(Z);function retrieveRawOption(e){var t={};return each$4([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Om=function(e){__extends$1(DataZoomView,e);function DataZoomView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=DataZoomView.type,t}return DataZoomView.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},DataZoomView.type=`dataZoom`,DataZoomView}(eu),km=function(){function AxisProxy(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return AxisProxy.prototype.hostedBy=function(e){return this._dataZoomModel===e},AxisProxy.prototype.getWindow=function(){return clone$2(this._window)},AxisProxy.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(isCoordSupported(t)){var n=getAxisMainType(this._dimName),r=t.getReferringComponents(n,Ki).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},AxisProxy.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+`Axis`,this._axisIndex)},AxisProxy.prototype.getMinMaxSpan=function(){return clone$2(this._minMaxSpan)},AxisProxy.prototype.calculateDataWindow=function(e){var t=this._extent,n=this.getAxisModel().axis,r=n.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],c,l=[!1,!1];each$4([`start`,`end`],function(n,u){var d=e[n],f=e[n+`Value`];i[u]===`percent`?(d??(d=a[u]),f=linearMap(d,a,t),l[u]=!0):(c=!0,f==null?f=t[u]:(f=r.parse(f),r.sanitize&&(f=r.sanitize(f,t))),d=linearMap(f,t,a)),s[u]=f==null||isNaN(f)?t[u]:f,o[u]=d==null||isNaN(d)?a[u]:d}),asc(s),asc(o);var u=this._minMaxSpan;c?restrictSet(s,o,t,a,!1):restrictSet(o,s,a,t,!0);function restrictSet(e,t,n,r,i){var a=i?`Span`:`ValueSpan`;sliderMove(0,e,n,`all`,u[`min`+a],u[`max`+a]);for(var o=0;o<2;o++)t[o]=linearMap(e[o],n,r,!0),i&&(t[o]=t[o],l[o]=!0);ensureExtentAscSimply(t)}var d=isOrdinalScale(r)||isTimeScale(r),f=n.getExtent(),p=Di(f[1]-f[0]),m=d?0:getAcceptableTickPrecision(s,p,.5);each$4([[0,Ai],[1,ki]],function(e){var n=e[0],r=e[1];!l[n]||!isFinite(m)||(s[n]=round$1(s[n],m),s[n]=Ei(t[1],K(t[0],s[n])),o[n]===a[n]&&(s[n]=t[n],d&&(s[n]=r(s[n]))))}),ensureExtentAscSimply(s);var h=[linearMap(s[0],t,a,!0),linearMap(s[1],t,a,!0)];return ensureExtentAscSimply(h),{value:s,percent:o,percentInverted:h,valuePrecision:m}},AxisProxy.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;scaleRawExtentInfoCreate(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=defaults({start:t[0],end:t[1]},i));var a=this._window=this.calculateDataWindow(i),o=a.percent,s=a.value;o[0]!==0&&r.setZoomMM(0,s[0]),o[1]!==100&&r.setZoomMM(1,s[1])}},AxisProxy.prototype.filterData=function(e,t){if(!this.hostedBy(e))return;var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._window.value;if(i===`none`)return;each$4(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){var o=t.getStore(),s=map$1(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,c=0;c<r.length;c++){var l=o.get(s[c],e),u=!isNaN(l),d=l<a[0],f=l>a[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else each$4(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return isInWindow(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});each$4(r,function(e){t.setApproximateExtent(a,e)})}});function isInWindow(e){return e>=a[0]&&e<=a[1]}},AxisProxy.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;each$4([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=linearMap(i,[0,100],n,!0)-n[0]):i=linearMap(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},AxisProxy}(),Am={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function eachAxisModel(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(getAxisMainType(r),i),n)})})}var t=[];eachAxisModel(function(n,r,i,a){if(!getAxisProxyFromModel(i)){var o=new km(n,r,a,e);t.push(o),setAxisProxyToModel(i,o)}});var n=createHashMap();return each$4(t,function(e){each$4(e.getTargetSeriesModels(),function(e){n.set(e.uid,e)})}),n},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=getAlignTo(e,i);a?n.push([i,a]):i.reset(e,null)}),each$4(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function installDataZoomAction(e){e.registerAction(`dataZoom`,function(e,t){each$4(findEffectedDataZooms(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var jm=makeCallOnlyOnce();function installCommon(e){jm(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Am),installDataZoomAction(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function makeBackground(e,t){var n=zc(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new so({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Mm=function(e){__extends$1(TooltipModel,e);function TooltipModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=TooltipModel.type,t}return TooltipModel.type=`tooltip`,TooltipModel.dependencies=[`axisPointer`],TooltipModel.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},TooltipModel}(Z);function shouldTooltipConfine(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function testStyle(e){if(H.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var Nm=testStyle([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),Pm=testStyle([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function toCSSVendorPrefix(e,t){if(!e)return t;t=toCamelCase(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function getComputedStyle(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var Fm=toCSSVendorPrefix(Pm,`transition`),Im=toCSSVendorPrefix(Nm,`transform`),Lm=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(H.transform3dSupported?`will-change:transform;`:``);function mirrorPos(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function assembleArrow(e,t,n){if(!isString(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=convertToColorString(t);var a=mirrorPos(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=Im+`:`,l;indexOf([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function assembleTransition(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(H.transformSupported?``+Im+i:`,left`+i+`,top`+i)),Fm+`:`+a}function assembleTransform(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!H.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=H.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Im+`:`+o+`;`:[[`top`,0],[`left`,0],[Nm,o]]}function assembleFont(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=retrieve2(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),each$4([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function assembleCssText(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=getPaddingFromTooltipModel(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(assembleTransition(a,n,r)),o&&i.push(`background-color:`+o),each$4([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=toCamelCase(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(assembleFont(d)),f!=null&&i.push(`padding:`+zc(f).join(`px `)+`px`),i.join(`;`)+`;`}function makeStyleCoord$1(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&transformLocalCoord(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}__name(makeStyleCoord$1,`makeStyleCoord`);var Rm=function(){function TooltipHTMLContent(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,H.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(isString(i)?document.querySelector(i):isDom(i)?i:isFunction(i)&&i(e.getDom()));makeStyleCoord$1(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=r.handler;normalizeEvent(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return TooltipHTMLContent.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=getComputedStyle(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},TooltipHTMLContent.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Lm+assembleCssText(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+assembleTransform(i[0],i[1],!0)+(`border-color:`+convertToColorString(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},TooltipHTMLContent.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(isString(i)&&n.get(`trigger`)===`item`&&!shouldTooltipConfine(n)&&(o=assembleArrow(n,r,i)),isString(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,isArray(e)||(e=[e]);for(var s=0;s<e.length;s++)isDom(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}},TooltipHTMLContent.prototype.setEnterable=function(e){this._enterable=e},TooltipHTMLContent.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},TooltipHTMLContent.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(makeStyleCoord$1(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;each$4(assembleTransform(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},TooltipHTMLContent.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},TooltipHTMLContent.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,H.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},TooltipHTMLContent.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(U(this.hide,this),e)):this.hide())},TooltipHTMLContent.prototype.isShow=function(){return this._show},TooltipHTMLContent.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;transformLocalCoordClear(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},TooltipHTMLContent}(),zm=function(){function TooltipRichContent(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),makeStyleCoord(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return TooltipRichContent.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},TooltipRichContent.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},TooltipRichContent.prototype.setContent=function(e,t,n,r,i){var a=this;isObject$2(e)&&throwError(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new po({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:getPaddingFromTooltipModel(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),each$4([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),each$4([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},TooltipRichContent.prototype.setEnterable=function(e){this._enterable=e},TooltipRichContent.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=calcShadowOuterSize(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},TooltipRichContent.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;makeStyleCoord(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=mathMaxWith0(i.borderWidth||0),o=calcShadowOuterSize(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},TooltipRichContent.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},TooltipRichContent.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},TooltipRichContent.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(U(this.hide,this),e)):this.hide())},TooltipRichContent.prototype.isShow=function(){return this._show},TooltipRichContent.prototype.dispose=function(){this._zr.remove(this.el)},TooltipRichContent}();function mathMaxWith0(e){return Math.max(0,e)}function calcShadowOuterSize(e){var t=mathMaxWith0(e.shadowBlur||0),n=mathMaxWith0(e.shadowOffsetX||0),r=mathMaxWith0(e.shadowOffsetY||0);return{left:mathMaxWith0(t-n),right:mathMaxWith0(t+n),top:mathMaxWith0(t-r),bottom:mathMaxWith0(t+r)}}function makeStyleCoord(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Bm=new so({shape:{x:-1,y:-1,width:2,height:2}}),Vm=function(e){__extends$1(TooltipView,e);function TooltipView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=TooltipView.type,t}return TooltipView.prototype.init=function(e,t){if(!(H.node||!t.getDom())){var n=e.getComponent(`tooltip`);this._tooltipContent=(this._renderMode=getTooltipRenderMode(n.get(`renderMode`)))===`richText`?new zm(t):new Rm(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},TooltipView.prototype.render=function(e,t,n){if(!(H.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?createOrUpdate(this,`_updatePosition`,50,`fixRate`):clear(this,`_updatePosition`)}},TooltipView.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);register(`itemTooltip`,this._api,U(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},TooltipView.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},TooltipView.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||H.node||!n.getDom())){var i=makeDispatchAction(r,n);this._ticket=``;var a=r.dataByCoordSys,o=findComponentReference(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=Bm;c.x=r.x,c.y=r.y,c.update(),Y(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=findPointFromSeries(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},TooltipView.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(makeDispatchAction(r,n))},TooltipView.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!(i==null||a==null||o==null)){var s=t.getSeriesByIndex(i);if(s&&buildTooltipModel([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},TooltipView.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Y(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;findEventDispatcher(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Y(e).dataIndex==null?Y(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},TooltipView.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=U(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},TooltipView.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=buildTooltipModel([t.tooltipOption],r),o=this._renderMode,s=[],c=createTooltipMarkup(`section`,{blocks:[],noHeader:!0}),l=[],u=new Zl;each$4(e,function(e){each$4(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=getValueLabel(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=createTooltipMarkup(`section`,{header:f,noHeader:!trim(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),each$4(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=getAxisRawValue(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,convertToColorString(m.color),o);var h=normalizeTooltipFormatResult(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=buildTooltipModel([a],r).get(`valueFormatter`);p.blocks.push(_?extend({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=buildTooltipMarkup(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
17
|
+
|
|
18
|
+
`:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},TooltipView.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Y(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=buildTooltipModel([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new Zl;h.marker=g.makeTooltipMarker(`item`,convertToColorString(h.color),d);var _=normalizeTooltipFormatResult(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?buildTooltipMarkup(y?extend({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},TooltipView.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Y(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(isString(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=clone$2(a),a.content=encodeHTML(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=buildTooltipModel(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new Zl;this._showOrMove(d,function(){var n=clone$2(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},TooltipView.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o=o||e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(isString(u)){var p=e.ecModel.get(`useUTC`),m=isArray(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=format(m.axisValue,d,p)),d=formatTpl(d,n,!0)}else if(isFunction(u)){var g=U(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},TooltipView.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||isArray(t))return{color:r||i};if(!isArray(t))return{color:r||t.color||t.borderColor}},TooltipView.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t=t||e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),isFunction(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),isArray(t))n=Ii(t[0],s),r=Ii(t[1],c);else if(isObject$2(t)){var p=t;p.width=l[0],p.height=l[1];var m=getLayoutRect(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(isString(t)&&o){var h=calcTooltipPosition(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=refixTooltipPosition(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=isCenterAlign(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=isCenterAlign(d)?l[1]/2:d===`bottom`?l[1]:0),shouldTooltipConfine(e)){var h=confineTooltipPosition(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},TooltipView.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&each$4(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i=i&&o.length===s.length,i&&each$4(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&each$4(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&each$4(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},TooltipView.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},TooltipView.prototype.dispose=function(e,t){H.node||!t.getDom()||(clear(this,`_updatePosition`),this._tooltipContent.dispose(),unregister(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},TooltipView.type=`tooltip`,TooltipView}(eu);function buildTooltipModel(e,t,n){var r=t.ecModel,i;n?(i=new gc(n,r,r),i=new gc(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof gc&&(o=o.get(`tooltip`,!0)),isString(o)&&(o={formatter:o}),o&&(i=new gc(o,i,r)))}return i}function makeDispatchAction(e,t){return e.dispatchAction||U(t.dispatchAction,t)}function refixTooltipPosition(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function confineTooltipPosition(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function calcTooltipPosition(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function isCenterAlign(e){return e===`center`||e===`middle`}function findComponentReference(e,t,n){var r=preParseFinder(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=queryReferringComponents(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Y(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function install$8(e){use(install$10),e.registerComponentModel(Mm),e.registerComponentView(Vm),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},noop),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},noop)}__name(install$8,`install`);function checkMarkerInSeries(e,t){if(!e)return!1;for(var n=isArray(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function fillLabel(e){defaultEmphasis(e,`label`,[`show`])}var Hm=makeInner(),Um=function(e){__extends$1(MarkerModel,e);function MarkerModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=MarkerModel.type,t.createdBySelf=!1,t.preventAutoZ=!0,t}return MarkerModel.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},MarkerModel.prototype.isAnimationEnabled=function(){if(H.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},MarkerModel.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},MarkerModel.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=Hm(e)[i];if(!n||!n.data){Hm(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&fillLabel(n),each$4(n.data,function(e){e instanceof Array?(fillLabel(e[0]),fillLabel(e[1])):fillLabel(e)}),a=this.createMarkerModelFromSeries(n,this,t),extend(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),Hm(e)[i]=a},this)},MarkerModel.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return createTooltipMarkup(`section`,{header:this.name,blocks:[createTooltipMarkup(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},MarkerModel.prototype.getData=function(){return this._data},MarkerModel.prototype.setData=function(e){this._data=e},MarkerModel.prototype.getDataParams=function(e,t){var n=Nl.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},MarkerModel.getMarkerModelFromSeries=function(e,t){return Hm(e)[t]},MarkerModel.type=`marker`,MarkerModel.dependencies=[`series`,`grid`,`polar`,`geo`],MarkerModel}(Z);mixin(Um,Nl.prototype);function hasXOrY(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function hasXAndY(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function markerTypeCalculatorWithExtent(e,t,n,r,i,a,o){var s=[],c=isDimensionStacked(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=numCalculate(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=getPrecision(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var Wm={min:curry$1(markerTypeCalculatorWithExtent,`min`),max:curry$1(markerTypeCalculatorWithExtent,`max`),average:curry$1(markerTypeCalculatorWithExtent,`average`),median:curry$1(markerTypeCalculatorWithExtent,`median`)};function dataTransform(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!hasXAndY(t)&&!isArray(t.coord)&&isArray(i)){var a=getAxisInfo(t,n,r,e);if(t=clone$2(t),t.type&&Wm[t.type]&&a.baseAxis&&a.valueAxis){var o=indexOf(i,a.baseAxis.dim),s=indexOf(i,a.valueAxis.dim),c=Wm[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!isArray(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&Wm[t.type]){var u=r.getOtherAxis(l);u&&(t.value=numCalculate(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)Wm[d[f]]&&(d[f]=numCalculate(n,n.mapDimension(i[f]),d[f]));return t}}function getAxisInfo(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(dataDimToCoordDim(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function dataDimToCoordDim(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function dataFilter(e,t){return e&&e.containData&&t.coord&&!hasXOrY(t)?e.containData(t.coord):!0}function createMarkerDimValueGetter(e,t){return e?function(e,n,r,i){return parseDataValue(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return parseDataValue(e.value,t[i])}}function numCalculate(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}else if(n===`median`)return e.getMedian(t);else return e.getDataExtent(t)[n===`max`?1:0]}var Gm=makeInner(),Km=function(e){__extends$1(MarkerView,e);function MarkerView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=MarkerView.type,t}return MarkerView.prototype.init=function(){this.markerGroupMap=createHashMap()},MarkerView.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){Gm(e).keep=!1}),t.eachSeries(function(e){var i=Um.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!Gm(e).keep&&r.group.remove(e.group)}),updateZ(t,i,this.type)},MarkerView.prototype.markKeep=function(e){Gm(e).keep=!0},MarkerView.prototype.toggleBlurSeries=function(e,t){var n=this;each$4(e,function(e){var r=Um.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?enterBlur(e):leaveBlur(e))})})},MarkerView.type=`marker`,MarkerView}(eu);function updateZ(e,t,n){e.eachSeries(function(e){var r=Um.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=retrieveZInfo(r),o=a.z,s=a.zlevel;traverseUpdateZ(i.group,o,s)}})}var qm=function(e){__extends$1(MarkLineModel,e);function MarkLineModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=MarkLineModel.type,t}return MarkLineModel.prototype.createMarkerModelFromSeries=function(e,t,n){return new MarkLineModel(e,t,n)},MarkLineModel.type=`markLine`,MarkLineModel.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`},MarkLineModel}(Um),Jm=makeInner(),markLineTransform=function(e,t,n,r){var i=e.getData(),a;if(isArray(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=retrieve(r.yAxis,r.xAxis);else{var l=getAxisInfo(r,i,t,e);s=l.valueAxis,c=numCalculate(i,getStackedDimension(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=clone$2(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&isNumber(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[dataTransform(e,a[0]),dataTransform(e,a[1]),extend({},a[2])];return h[2].type=h[2].type||null,merge(h[2],h[0]),merge(h[2],h[1]),h};function isInfinity(e){return!isNaN(e)&&!isFinite(e)}function ifMarkLineHasOnlyDim(e,t,n,r){var i=1-e,a=r.dimensions[e];return isInfinity(t[i])&&isInfinity(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function markLineFilter(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(ifMarkLineHasOnlyDim(1,n,r,e)||ifMarkLineHasOnlyDim(0,n,r,e)))return!0}return dataFilter(e,t[0])&&dataFilter(e,t[1])}function updateSingleMarkerEndLayout(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=Ii(o.get(`x`),i.getWidth()),l=Ii(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(isCoordinateSystemType(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;isInfinity(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):isInfinity(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[n?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var Ym=function(e){__extends$1(MarkLineView,e);function MarkLineView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=MarkLineView.type,t}return MarkLineView.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Um.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=Jm(t).from,a=Jm(t).to;i.each(function(t){updateSingleMarkerEndLayout(i,t,!0,e,n),updateSingleMarkerEndLayout(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},MarkLineView.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new dm);this.group.add(c.group);var l=createList(i,e,t),u=l.from,d=l.to,f=l.line;Jm(t).from=u,Jm(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);isArray(p)||(p=[p,p]),isArray(m)||(m=[m,m]),isArray(h)||(h=[h,h]),isArray(g)||(g=[g,g]),l.from.each(function(e){updateDataVisualAndLayout(u,e,!0),updateDataVisualAndLayout(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??(n.stroke=u.getItemVisual(e,`style`).fill),f.setItemVisual(e,{z2:retrieve2(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Y(e).dataModel=t,e.traverse(function(e){Y(e).dataModel=t})});function updateDataVisualAndLayout(t,n,i){var a=t.getItemModel(n);updateSingleMarkerEndLayout(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??(s.fill=getVisualFromData(o,`color`)),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:retrieve2(a.get(`symbolOffset`,!0),g[i?0:1]),symbolRotate:retrieve2(a.get(`symbolRotate`,!0),h[i?0:1]),symbolSize:retrieve2(a.get(`symbolSize`),m[i?0:1]),symbol:retrieve2(a.get(`symbol`,!0),p[i?0:1]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},MarkLineView.type=`markLine`,MarkLineView}(Km);function createList(e,t,n){var r=e?map$1(e&&e.dimensions,function(e){var n=t.getData();return extend(extend({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new of(r,n),a=new of(r,n),o=new of([],n),s=map$1(n.get(`data`),curry$1(markLineTransform,t,e,n));e&&(s=filter(s,curry$1(markLineFilter,e)));var c=createMarkerDimValueGetter(!!e,r);return i.initData(map$1(s,function(e){return e[0]}),null,c),a.initData(map$1(s,function(e){return e[1]}),null,c),o.initData(map$1(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function install$7(e){e.registerComponentModel(qm),e.registerComponentView(Ym),e.registerPreprocessor(function(e){checkMarkerInSeries(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}__name(install$7,`install`);var getDefaultSelectorOptions=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},Xm=function(e){__extends$1(LegendModel,e);function LegendModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=LegendModel.type,t.layoutMode={type:`box`,ignoreSize:!0},t}return LegendModel.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},LegendModel.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},LegendModel.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),isArray(t)&&each$4(t,function(e,r){isString(e)&&(e={type:e}),t[r]=merge(e,getDefaultSelectorOptions(n,e.type))})},LegendModel.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},LegendModel.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&isNameSpecified(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=createHashMap();this._data=filter(map$1(r,function(e){return(isString(e)||isNumber(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new gc(e,this,this.ecModel))},this),function(e){return!!e})},LegendModel.prototype.getData=function(){return this._data},LegendModel.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;each$4(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},LegendModel.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},LegendModel.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},LegendModel.prototype.allSelect=function(){var e=this._data,t=this.option.selected;each$4(e,function(e){t[e.get(`name`,!0)]=!0})},LegendModel.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;each$4(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},LegendModel.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&indexOf(this._availableNames,e)>=0},LegendModel.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},LegendModel.type=`legend.plain`,LegendModel.dependencies=[`series`],LegendModel.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.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:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},LegendModel}(Z),Zm=curry$1,Qm=each$4,$m=bi,eh=function(e){__extends$1(LegendView,e);function LegendView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=LegendView.type,t.newlineDisabled=!1,t}return LegendView.prototype.init=function(){this.group.add(this._contentGroup=new $m),this.group.add(this._selectorGroup=new $m),this._isFirstRender=!0},LegendView.prototype.getContentGroup=function(){return this._contentGroup},LegendView.prototype.getSelectorGroup=function(){return this._selectorGroup},LegendView.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=createBoxLayoutReference(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=getLayoutRect(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=getLayoutRect(defaults({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=makeBackground(f,e))}},LegendView.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},LegendView.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=createHashMap(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),Qm(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
19
|
+
`)){var p=new $m;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,Zm(dispatchSelectAction,f,null,r,d)).on(`mouseover`,Zm(dispatchHighlightAction,m.name,null,r,d)).on(`mouseout`,Zm(dispatchDownplayAction,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Y(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=parse(h.fill);_&&_[3]===0&&(_[3]=.2,h=extend(extend({},h),{fill:stringify(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,Zm(dispatchSelectAction,null,f,r,d)).on(`mouseover`,Zm(dispatchHighlightAction,null,f,r,d)).on(`mouseout`,Zm(dispatchDownplayAction,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Y(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},LegendView.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Y(e).eventData=a},LegendView.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();Qm(e,function createSelectorButton(e){var r=e.type,i=new po({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),setLabelStyle(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),enableHoverEmphasis(i)})},LegendView.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=getLegendStyle(c,r,o,s,d,m,u),y=new $m,b=r.getModel(`textStyle`);if(isFunction(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(getDefaultLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;isString(w)&&w?T=w.replace(`{name}`,t??``):isFunction(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new po({style:createTextStyle(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new so({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&setTooltipConfig({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),enableHoverEmphasis(y),y.__legendDataIndex=n,y},LegendView.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Jc(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Jc(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},LegendView.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},LegendView.type=`legend.plain`,LegendView}(eu);function getLegendStyle(e,t,n,r,i,a,o){function handleCommonProps(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),Qm(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var s=t.getModel(`itemStyle`),c=s.getItemStyle(),l=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,u=s.getShallow(`decal`);c.decal=!u||u===`inherit`?r.decal:createOrUpdatePatternFromDecal(u,o),c.fill===`inherit`&&(c.fill=r[i]),c.stroke===`inherit`&&(c.stroke=r[l]),c.opacity===`inherit`&&(c.opacity=(i===`fill`?r:n).opacity),handleCommonProps(c,r);var d=t.getModel(`lineStyle`),f=d.getLineStyle();if(handleCommonProps(f,n),c.fill===`auto`&&(c.fill=r.fill),c.stroke===`auto`&&(c.stroke=r.fill),f.stroke===`auto`&&(f.stroke=r.fill),!a){var p=t.get(`inactiveBorderWidth`),m=c[l];c.lineWidth=p===`auto`?r.lineWidth>0&&m?2:0:c.lineWidth,c.fill=t.get(`inactiveColor`),c.stroke=t.get(`inactiveBorderColor`),f.stroke=d.get(`inactiveColor`),f.lineWidth=d.get(`inactiveWidth`)}return{itemStyle:c,lineStyle:f}}function getDefaultLegendIcon(e){var t=e.icon||`roundRect`,n=createSymbol$1(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function dispatchSelectAction(e,t,n,r){dispatchDownplayAction(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),dispatchHighlightAction(e,t,n,r)}function dispatchHighlightAction(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function dispatchDownplayAction(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function legendSelectActionHandler(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),makeSelectedMap(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){each$4(i,function(t,n){e[t?`select`:`unSelect`](n)}),makeSelectedMap(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function makeSelectedMap(e,t){var n=t||{};return each$4(e.getData(),function(t){var r=t.get(`name`);if(!(r===`
|
|
20
|
+
`||r===``)){var i=e.isSelected(r);hasOwn(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function installLegendAction(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,curry$1(legendSelectActionHandler,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,curry$1(legendSelectActionHandler,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,curry$1(legendSelectActionHandler,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,curry$1(legendSelectActionHandler,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,curry$1(legendSelectActionHandler,`unSelect`))}var th=createSimpleOverallStageHandler2(legendFilter);function legendFilter(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function install$6(e){e.registerComponentModel(Xm),e.registerComponentView(eh),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,th),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),installLegendAction(e)}__name(install$6,`install`);var nh=function(e){__extends$1(ScrollableLegendModel,e);function ScrollableLegendModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ScrollableLegendModel.type,t}return ScrollableLegendModel.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},ScrollableLegendModel.prototype.init=function(t,n,r){var i=getLayoutParams(t);e.prototype.init.call(this,t,n,r),mergeAndNormalizeLayoutParams(this,t,i)},ScrollableLegendModel.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),mergeAndNormalizeLayoutParams(this,this.option,t)},ScrollableLegendModel.type=`legend.scroll`,ScrollableLegendModel.defaultOption=inheritDefaultOption(Xm.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:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),ScrollableLegendModel}(Xm);function mergeAndNormalizeLayoutParams(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,mergeLayoutParam(t,n,{type:`box`,ignoreSize:!!i})}var rh=bi,ih=[`width`,`height`],ah=[`x`,`y`],oh=function(e){__extends$1(ScrollableLegendView,e);function ScrollableLegendView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ScrollableLegendView.type,t.newlineDisabled=!0,t._currentIndex=0,t}return ScrollableLegendView.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new rh),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rh)},ScrollableLegendView.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},ScrollableLegendView.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=isArray(u)?u:[u,u];createPageButton(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new po({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),createPageButton(`pageNext`,1);function createPageButton(e,t){var r=e+`DataIndex`,a=createIcon(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:U(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},ScrollableLegendView.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=ih[s],l=ah[s],u=ih[1-s],d=ah[1-s];i&&Jc(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=clone$2(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},ScrollableLegendView.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;Jc(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),Jc(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=retrieve2(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new so({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&updateProps$1(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},ScrollableLegendView.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},ScrollableLegendView.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;each$4([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,isString(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},ScrollableLegendView.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=ih[i],o=ah[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=u?1:0,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=getItemInfo(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=getItemInfo(c[m]),(!_&&g.e>h.s+r||_&&!intersect(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??(f.pageNextDataIndex=h.i),++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=getItemInfo(c[m]),(!_||!intersect(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??(f.pagePrevDataIndex=h.i),++f.pageCount,++f.pageIndex),h=_;return f;function getItemInfo(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function intersect(e,t){return e.e>=t&&e.s<=t+r}},ScrollableLegendView.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},ScrollableLegendView.type=`legend.scroll`,ScrollableLegendView}(eh);function installScrollableLegendAction(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function install$5(e){use(install$6),e.registerComponentModel(nh),e.registerComponentView(oh),installScrollableLegendAction(e)}__name(install$5,`install`);function install$4(e){use(install$6),use(install$5)}__name(install$4,`install`);var sh=function(e){__extends$1(InsideZoomModel,e);function InsideZoomModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=InsideZoomModel.type,t}return InsideZoomModel.type=`dataZoom.inside`,InsideZoomModel.defaultOption=inheritDefaultOption(Dm.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),InsideZoomModel}(Dm),ch=makeInner();function setViewInfoToCoordSysRecord(e,t,n){ch(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function disposeCoordSysRecordIfNeeded(e,t){for(var n=ch(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||disposeCoordSysRecord(n,o))}}}function disposeCoordSysRecord(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function createCoordSysRecord(e,t){var n={model:t,containsPoint:curry$1(containsPoint,t),dispatchAction:curry$1(dispatchAction,e),dataZoomInfoMap:null,controller:null},r=n.controller=new rm(e.getZr());return each$4([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function dispatchAction(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function containsPoint(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function mergeControllerParams(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:t.get(`zoomLock`,!0)?`move`:!0;a[i+n]>a[i+r]&&(r=n),o=o&&t.get(`preventDefaultMouseMove`,!0),s=retrieve2(t.get(`cursorGrab`,!0),s),c=retrieve2(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function installDataZoomRoamProcessor(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=ch(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=createHashMap());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){each$4(collectReferCoordSysModelInfo(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,createCoordSysRecord(t,n.model));(a.dataZoomInfoMap||(a.dataZoomInfoMap=createHashMap())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i){disposeCoordSysRecord(r,e);return}var s=mergeControllerParams(a,e,t);n.enable(s.controlType,s.opt),createOrUpdate(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var lh=function(e){__extends$1(InsideZoomView,e);function InsideZoomView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return InsideZoomView.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),setViewInfoToCoordSysRecord(r,t,{pan:U(uh.pan,this),zoom:U(uh.zoom,this),scrollMove:U(uh.scrollMove,this)})},InsideZoomView.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},InsideZoomView.prototype._clear=function(){disposeCoordSysRecordIfNeeded(this.api,this.dataZoomModel),this.range=null},InsideZoomView.type=`dataZoom.inside`,InsideZoomView}(Om),uh={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=dh[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(sliderMove(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:makeMover(function(e,t,n,r,i,a){var o=dh[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:makeMover(function(e,t,n,r,i,a){return dh[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function makeMover(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(sliderMove(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var dh={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function install$3(e){installCommon(e),e.registerComponentModel(sh),e.registerComponentView(lh),installDataZoomRoamProcessor(e)}__name(install$3,`install`);var fh=function(e){__extends$1(SliderZoomModel,e);function SliderZoomModel(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=SliderZoomModel.type,t}return SliderZoomModel.type=`dataZoom.slider`,SliderZoomModel.layoutMode=`box`,SliderZoomModel.defaultOption=inheritDefaultOption(Dm.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Q.color.accent10,borderRadius:0,backgroundColor:Q.color.transparent,dataBackground:{lineStyle:{color:Q.color.accent30,width:.5},areaStyle:{color:Q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Q.color.accent40,width:.5},areaStyle:{color:Q.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:Q.color.neutral00,borderColor:Q.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:Q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Q.color.tertiary},brushSelect:!0,brushStyle:{color:Q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),SliderZoomModel}(Dm),ph=so,mh=1,hh=30,gh=7,_h=`horizontal`,vh=`vertical`,yh=5,bh=[`line`,`bar`,`candlestick`,`scatter`],xh={easing:`cubicOut`,duration:100,delay:0},Sh=function(e){__extends$1(SliderZoomView,e);function SliderZoomView(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=SliderZoomView.type,t._displayables={},t}return SliderZoomView.prototype.init=function(e,t){this.api=t,this._onBrush=U(this._onBrush,this),this._onBrushEnd=U(this._onBrushEnd,this)},SliderZoomView.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),createOrUpdate(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView()},SliderZoomView.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},SliderZoomView.prototype._clear=function(){clear(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},SliderZoomView.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new bi;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},SliderZoomView.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?gh:0,r=createBoxLayoutReference(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===_h?{right:r.width-i.x-i.width,top:r.height-hh-a-n,width:i.width,height:hh}:{right:a,top:i.y,width:hh,height:i.height},s=getLayoutParams(e.option);each$4([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=getLayoutRect(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===vh&&this._size.reverse()},SliderZoomView.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===_h&&!i?{scaleY:o?1:-1,scaleX:1}:n===_h&&i?{scaleY:o?1:-1,scaleX:-1}:n===vh&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},SliderZoomView.prototype._getViewExtent=function(){return[0,this._size[0]]},SliderZoomView.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new ph({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new ph({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:U(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},SliderZoomView.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b){v||(y+=g);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:linearMap(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function createDataShadowGroup(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new bi,r=new vs({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new bs({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var C=0;C<3;C++){var w=createDataShadowGroup(C===1);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}},SliderZoomView.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){each$4(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&indexOf(bh,e.get(`type`))<0)){var o=r.getComponent(getAxisMainType(i),a).axis,s=getOtherDim(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},SliderZoomView.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new ph({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new ph({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:mh,fill:Q.color.transparent}})),each$4([0,1],function(t){var a=o.get(`handleIcon`);!zu[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=createSymbol$1(a,-1,0,2,2,null,!0);s.attr({cursor:getCursor(this._orient),draggable:!0,drift:U(this._onDragMove,this,t),ondragend:U(this._onDragEnd,this),onmouseover:U(this._onOverDataInfoTriggerArea,this,!0),onmouseout:U(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect();this._handleHeight=Ii(o.get(`handleSize`),this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),enableHoverEmphasis(s);var l=o.get(`handleColor`);l!=null&&(s.style.fill=l),i.add(n[t]=s);var u=o.getModel(`textStyle`),d=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new po({silent:!0,invisible:!d,style:createTextStyle(u,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:u.getTextColor(),font:u.getFont()}),z2:10}))},this);var d=u;if(l){var f=Ii(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new so({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=createSymbol$1(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Q.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new so({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:U(this._onActualMoveZoneDrift,this),ondragstart:U(this._onActualMoveZoneDragStart,this),ondragend:U(this._onActualMoveZoneDragEnd,this),onmouseover:U(this._onOverDataInfoTriggerArea,this,!0),onmouseout:U(this._onOverDataInfoTriggerArea,this,!1)})},SliderZoomView.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[linearMap(e[0],[0,100],t,!0),linearMap(e[1],[0,100],t,!0)]},SliderZoomView.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];sliderMove(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:linearMap(a.minSpan,o,i,!0),a.maxSpan==null?null:linearMap(a.maxSpan,o,i,!0));var s=this._range,c=this._range=asc([linearMap(r[0],i,o,!0),linearMap(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},SliderZoomView.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=asc(n.slice()),i=this._size;each$4([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new so,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},SliderZoomView.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var c=this._range,l;if(e){var u={start:c[0],end:c[1]},d=getAlignTo(t,o);if(d){var f=d.calculateDataWindow(u).percentInverted;u={start:f[0],end:f[1]}}l=o.calculateDataWindow(u)}else l=o.getWindow();a=[formatLabel(t,0,l,s),formatLabel(t,1,l,s)]}}var p=asc(this._handleEnds.slice());setLabel.call(this,0),setLabel.call(this,1);function setLabel(e){var t=getTransform(n.handles[e].parent,this.group),o=transformDirection(e===0?`right`:`left`,t),s=this._handleWidth/2+yh,c=applyTransform([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===_h?`middle`:o,align:i===_h?o:`center`,text:a[e]})}},SliderZoomView.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},SliderZoomView.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},SliderZoomView.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)},SliderZoomView.prototype._onActualMoveZoneDragStart=function(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)},SliderZoomView.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()},SliderZoomView.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,stop(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=applyTransform([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},SliderZoomView.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},SliderZoomView.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},SliderZoomView.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new W(t,n),this._brushing=!0,this._brushStartTime=+new Date},SliderZoomView.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();sliderMove(0,a,r,0,o.minSpan==null?null:linearMap(o.minSpan,i,r,!0),o.maxSpan==null?null:linearMap(o.maxSpan,i,r,!0)),this._range=asc([linearMap(a[0],r,i,!0),linearMap(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},SliderZoomView.prototype._onBrush=function(e){this._brushing&&(stop(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},SliderZoomView.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new ph({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},SliderZoomView.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?xh:null,start:t[0],end:t[1]})},SliderZoomView.prototype._findCoordRect=function(){var e,t=collectReferCoordSysModelInfo(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},SliderZoomView.type=`dataZoom.slider`,SliderZoomView}(Om);function formatLabel(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:isOrdinalScale(r)||isTimeScale(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?round$1(o,a,!0):o+``;return isFunction(i)?i(o,s):isString(i)?i.replace(`{value}`,s):s}function getOtherDim(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function getCursor(e){return e===`vertical`?`ns-resize`:`ew-resize`}function install$2(e){e.registerComponentModel(fh),e.registerComponentView(Sh),installCommon(e)}__name(install$2,`install`);function install$1(e){use(install$3),use(install$2)}__name(install$1,`install`);function createDom(e,t,n){var r=Zt.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function isIncrementalLayer(e){return!e.__cursors.get(0)}function getStartEndFromCursor(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var Ch=function(e){__extends(Layer,e);function Layer(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r=r||Xr,typeof t==`string`?a=createDom(t,n,r):isObject$2(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(disableUserSelect(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return Layer.prototype.afterBrush=function(){this.__prevIdx=getStartEndFromCursor(this)},Layer.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},Layer.prototype.setUnpainted=function(){this.__firstTimePaint=!0},Layer.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=createDom(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},Layer.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new G(0,0,0,0);function addRectToMergePool(e){if(!(!e.isFinite()||e.isZero()))if(i.length===0){var t=new G(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new G(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}else if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new G(0,0,0,0);t.copy(e),i.push(t)}o||(o=i.length>=a)}}for(var c=getStartEndFromCursor(this),l=c.startIdx;l<c.endIdx;++l){var u=e[l];if(u){var d=u.shouldBePainted(n,r,!0,!0),f=u.__isRendered&&(u.__dirty&1||!d)?u.getPrevPaintRect():null;f&&addRectToMergePool(f);var p=d&&(u.__dirty&1||!u.__isRendered)?u.getPaintRect():null;p&&addRectToMergePool(p)}}for(var m=this.__prevIdx,l=m.startIdx;l<m.endIdx;++l){var u=t[l],d=u&&u.shouldBePainted(n,r,!0,!0);if(u&&(!d||!u.__zr)&&u.__isRendered){var f=u.getPrevPaintRect();f&&addRectToMergePool(f)}}var h;do{h=!1;for(var l=0;l<i.length;){if(i[l].isZero()){i.splice(l,1);continue}for(var g=l+1;g<i.length;)i[l].intersect(i[g])?(h=!0,i[l].union(i[g]),i.splice(g,1)):g++;l++}}while(h);return this._paintRects=i,i},Layer.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},Layer.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},Layer.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function doClear(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;isGradientObject(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||getCanvasGradient(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):isImagePatternObject(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=createCanvasPattern(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?doClear(0,0,a,o):n.length&&each$4(n,function(e){doClear(e.x*l,e.y*l,e.width*l,e.height*l)})},Layer}(xn),wh=1e5,Th=314159,Eh=void 0,Dh=1,Oh=2;function isLayerValid(e){return e?e.__builtin__?!0:!(typeof e.resize!=`function`||typeof e.refresh!=`function`):!1}function createRoot(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function createBuiltinLayer(e,t,n,r){var i=new Ch(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,resetLayerDrawCursors(i),i}function resetLayerDrawCursors(e){e.__cursorStack=[],e.__cursors=createHashMap()}function resetLayerDrawCursor(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function ensureLayerDrawCursor(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,resetLayerDrawCursor({key:r})))}function eachCursorInLayer(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function ensureLayerListInZLevel(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function eachLayer(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&kh)||s.__builtin__)&&(!(n&Ah)||!s.__builtin__)&&(!(n&jh)||s!==e.hoverlayer))&&t(s,a,o,i)}}var kh=1,Ah=2,jh=4,Mh=kh|jh,Nh=function(){function CanvasPainter(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=extend({},n||{}),this.dpr=n.devicePixelRatio||Xr,this._singleCanvas=i,this.root=e,e.style&&(disableUserSelect(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=createBuiltinLayer(a,this,Th,0);c.initContext(),this._insertLayer(c,Th,0,!0),this._domRoot=e}else{this._width=getSize(e,0,n),this._height=getSize(e,1,n);var l=this._domRoot=createRoot(this._width,this._height);e.appendChild(l)}}return CanvasPainter.prototype.getType=function(){return`canvas`},CanvasPainter.prototype.isSingleCanvas=function(){return this._singleCanvas},CanvasPainter.prototype.getViewportRoot=function(){return this._domRoot},CanvasPainter.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},CanvasPainter.prototype.refresh=function(e){var t=e&&!isObject$2(e)?{paintAll:!!e}:e||{},n=retrieve2(t.refresh,!0),r=retrieve2(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=Oh),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return eachLayer(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},Ah),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},CanvasPainter.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=Eh,n!==Eh&&(!t&&n===Oh&&(t=this._i.hoverlayer=this._ensureLayer(wh)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),brush(i,s,r),c&&(s.style=l)}}i&&(brushLoopFinalize(i,r),i.restore())}},CanvasPainter.prototype.getHoverLayer=function(){return this._ensureLayer(wh)},CanvasPainter.prototype.paintOne=function(e,t){brushSingle(e,t)},CanvasPainter.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)eachLayer(this._i,function(e){e.afterBrush&&e.afterBrush()},Mh),this._paintHoverList(e);else{var i=this;sr(function(){i._paintList(e,t,n)})}}},CanvasPainter.prototype._compositeManually=function(){var e=this._ensureLayer(Th).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),eachLayer(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},kh)},CanvasPainter.prototype._doPaintList=function(e,t){var n=this,r=!0;return eachLayer(this._i,function(i){var a=!1;if(eachCursorInLayer(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!isIncrementalLayer(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}eachCursorInLayer(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r=r&&a})}},Mh),H.wxa&&eachLayer(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},CanvasPainter.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r)if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},CanvasPainter.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=isIncrementalLayer(e),c=s&&Zt.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=Oh),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(brush(o,f,a),f.setPrevPaintRect(p))}else brush(o,f,a);if(s&&Zt.getTime()-c>15){d++;break}}}brushLoopFinalize(o,a),t.drawIdx=Math.max(d,l)},CanvasPainter.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},CanvasPainter.prototype._ensureLayer=function(e,t,n){t=t||0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=Th,t=0);var i=ensureLayerListInZLevel(this._i,e)[t];return i||(i=createBuiltinLayer(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&merge(i,this._layerConfig[e],!0),(n||r&&e!==Th)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},CanvasPainter.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},CanvasPainter.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&isLayerValid(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=ensureLayerListInZLevel(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),ensureLayerListInZLevel(i,t)[n]=e,!r&&!e.virtual)if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);e.painter||(e.painter=this)}},CanvasPainter.prototype.eachLayer=function(e,t){return eachLayer(this._i,function(n,r){e.call(t,n,r)})},CanvasPainter.prototype.eachBuiltinLayer=function(e,t){return eachLayer(this._i,function(n,r){e.call(t,n,r)},kh)},CanvasPainter.prototype.eachOtherLayer=function(e,t){return eachLayer(this._i,function(n,r){e.call(t,n,r)},Ah)},CanvasPainter.prototype.getLayers=function(){var e={};return eachLayer(this._i,function(t,n,r){e[t.id]=t}),e},CanvasPainter.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}eachLayer(n._i,function(e){e.__dirty=!1,eachCursorInLayer(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},Mh);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){logError(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=ensureLayerDrawCursor(o,f),!s.used))if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1;s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}eachLayer(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(isIncrementalLayer(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(eachCursorInLayer(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===Eh&&(n._hoverLayerDirty=Dh))},Mh)},CanvasPainter.prototype.clear=function(){return eachLayer(this._i,function(e){e.clear(),resetLayerDrawCursors(e)},kh),this},CanvasPainter.prototype.setBackgroundColor=function(e){this._backgroundColor=e,eachLayer(this._i,function(e){e.setUnpainted()})},CanvasPainter.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?merge(n[e],t,!0):n[e]=t,eachLayer(this._i,function(e,t){merge(e,n[t],!0)})}},CanvasPainter.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},CanvasPainter.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=getSize(i,0,r),t=getSize(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,eachLayer(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(Th).resize(e,t)}return this},CanvasPainter.prototype.clearLayer=function(e){each$4(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},CanvasPainter.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},CanvasPainter.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[Th][0].dom;var t=new Ch(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;eachLayer(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];brush(n,l,a)}brushLoopFinalize(n,a)}return t.dom},CanvasPainter.prototype.getWidth=function(){return this._width},CanvasPainter.prototype.getHeight=function(){return this._height},CanvasPainter}();function install(e){e.registerPainter(`canvas`,Nh)}var Ph=l({__name:`EChart`,props:{option:{},height:{}},emits:[`click`],setup(e,{emit:t}){use([install$13,install$11,install$1,install$9,install$4,install$7,install$8,install]);let r=e,a=t,o=y(null),s=h(null),c=null;return S(()=>{o.value&&(s.value=init(o.value),s.value.setOption(r.option,{notMerge:!0}),s.value.on(`click`,e=>a(`click`,e)),c=new ResizeObserver(()=>s.value?.resize()),c.observe(o.value))}),d(()=>r.option,e=>s.value?.setOption(e,{notMerge:!0})),i(()=>{c?.disconnect(),s.value?.dispose()}),(e,t)=>(n(),p(`div`,{ref_key:`el`,ref:o,style:C({height:`${e.height}px`,width:`100%`})},null,4))}}),Fh={class:`text-h6`},Ih={class:`text-caption`},Lh={class:`d-flex align-center flex-wrap mb-1 ga-3`},Rh={class:`d-flex align-center flex-wrap mb-4 ga-3`},zh={class:`text-caption text-medium-emphasis`},Bh={key:1,class:`text-caption text-disabled pa-4`},Vh={class:`sk-tag-elo-sticky`},Hh={class:`text-caption text-medium-emphasis mb-1`},Uh=[`onClick`],Wh={class:`text-caption`},Gh={class:`text-caption text-medium-emphasis`},Kh={class:`text-right`},qh=[`title`],Jh={class:`text-right`},Yh={key:0,class:`sk-ticks`},Xh=[`title`],Zh={class:`text-caption ml-1`},Qh={key:1,class:`text-caption text-disabled`},$h={class:`text-caption`},eg={class:`text-caption`},tg={class:`text-right`},ng=8,rg=20,ig=se(l({__name:`LearnerTagElo`,props:{dataset:{},interpreters:{}},setup(i){let s=i,l=g(()=>tagEloView(s.dataset)),h=g(()=>{let e=l.value?.rows??[];return[...(l.value?.groups??[]).map(e=>({key:`group:${e.id}`,batch:e,course:!1})),...(s.interpreters?.tagBatches??[]).map(e=>({key:`course:${e.id}`,batch:e,course:!0}))].map(t=>({...t,matches:e.filter(e=>matchesTagBatch(e.tag,t.batch,e.role)).length}))}),isBookkeeping=e=>e.roles?.some(e=>e===`intro`||e===`expose`)??!1,v=y([]),S=y(`score`),w=y(0),T=y(``),byScore=(e,t)=>e.score===null||t.score===null?Number(e.score===null)-Number(t.score===null):t.score-e.score,byLastSeen=(e,t)=>(t.lastSeen??``).localeCompare(e.lastSeen??``),E={score:byScore,count:(e,t)=>t.count-e.count,lastSeen:byLastSeen,tag:(e,t)=>e.tag.localeCompare(t.tag)},D=g(()=>{let e=h.value.filter(e=>v.value.includes(e.key)).map(e=>e.batch),t=T.value?.trim().toLowerCase(),n=Number(w.value)||0;return(l.value?.rows??[]).filter(r=>e.some(e=>matchesTagBatch(r.tag,e,r.role))&&r.count>=n&&(!t||r.tag.toLowerCase().includes(t))).sort((e,t)=>E[S.value](e,t)||e.tag.localeCompare(t.tag))}),k=g(()=>D.value.filter(e=>e.score!==null)),A=y(new Map);function toggle(e){let t=new Map(A.value);if(t.has(e))t.delete(e);else{if(t.size>=ng)return;let n=new Set(t.values()),r=0;for(;n.has(r);)r++;t.set(e,r)}A.value=t}d(()=>s.dataset,()=>{A.value=new Map,v.value=h.value.filter(e=>!e.course&&!isBookkeeping(e.batch)).map(e=>e.key)},{immediate:!0});let j=g(()=>{let e=new Map,t=new Map;for(let n of D.value){let r=shortTag(s.interpreters,n.tag);e.set(n.tag,r),t.set(r,(t.get(r)??0)+1)}return new Map([...e].map(([e,n])=>[e,(t.get(n)??0)>1?e:n]))}),labelOf=e=>j.value.get(e)??shortTag(s.interpreters,e),M=O(),N=g(()=>M.current.value.dark),P={light:[`#2a78d6`,`#eb6834`,`#1baf7a`,`#eda100`,`#e87ba4`,`#008300`,`#6250d6`,`#e34948`],dark:[`#3987e5`,`#d95926`,`#199e70`,`#c98500`,`#d55181`,`#008300`,`#9085e9`,`#e66767`]},I={light:{primary:`#0b0b0b`,secondary:`#52514e`,muted:`#898781`,grid:`#e1e0d9`,axis:`#c3c2b7`},dark:{primary:`#f0efec`,secondary:`#c3c2b7`,muted:`#898781`,grid:`#2c2c2a`,axis:`#383835`}},L=g(()=>I[N.value?`dark`:`light`]),slotColor=e=>P[N.value?`dark`:`light`][e],R=g(()=>N.value?`rgba(195,194,183,0.18)`:`rgba(82,81,78,0.16)`),ee=g(()=>M.current.value.colors.surface),z=g(()=>Math.max(160,k.value.length*rg+72)),dotSize=e=>Math.min(20,8+2.2*Math.log1p(e));function escapeHtml(e){return e.replace(/[&<>"']/g,e=>`&#${e.charCodeAt(0)};`)}function rowTooltip(e){let t=e.recent.length?`recent ${e.recentOk}/${e.recent.length} correct`:`no recent buffer`;return[`<b>${escapeHtml(e.tag)}</b>`,`ELO ${e.score} (${signed(e.vsGlobal)} vs global) · ${e.count} responses`,`${t} · last seen ${fmtDate(e.lastSeen)}`].join(`<br/>`)}let te=g(()=>{let e=k.value,t=L.value,n=l.value?.global.score??0,r=[n,...e.map(e=>e.score)];return{animation:!1,grid:{left:8,right:16,top:24,bottom:8,containLabel:!0},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`,axis:`y`},formatter:t=>{let n=t[0]?.dataIndex;return n===void 0?``:rowTooltip(e[n])}},xAxis:{type:`value`,position:`top`,min:Math.floor((Math.min(...r)-20)/50)*50,max:Math.ceil((Math.max(...r)+20)/50)*50,axisLabel:{color:t.muted},axisLine:{show:!1},splitLine:{lineStyle:{color:t.grid}}},yAxis:{type:`category`,inverse:!0,triggerEvent:!0,data:e.map(e=>labelOf(e.tag)),axisLabel:{color:t.secondary,fontSize:11,interval:0},axisTick:{show:!1},axisLine:{lineStyle:{color:t.axis}}},series:[{type:`scatter`,data:e.map((e,n)=>{let r=A.value.get(e.tag);return{name:e.tag,value:[e.score,n],symbolSize:dotSize(e.count),itemStyle:{color:r===void 0?t.muted:slotColor(r),borderColor:ee.value,borderWidth:2}}}),markLine:{silent:!0,symbol:`none`,lineStyle:{color:t.primary,type:`solid`,width:1},label:{formatter:`global ${n}`,color:t.secondary,position:`end`},data:[{xAxis:n}]}}]}});function onDotClick(e){if(e.componentType===`series`&&typeof e.name==`string`)toggle(e.name);else if(e.componentType===`yAxis`){let t=e.value,n=k.value.find(e=>labelOf(e.tag)===t);n&&toggle(n.tag)}}let toData=e=>e.map(e=>[e.at,e.score]);function valueAt(e,t){let n=null;for(let r of e){if(Date.parse(r.at)>t)break;n=r.score}return n}let ne=g(()=>{let e=l.value,t=L.value;if(!e)return{};let n=[...A.value].filter(([t])=>e.series.tags[t]),r=k.value.filter(t=>!A.value.has(t.tag)&&e.series.tags[t.tag]),i=n.length<=4,a=[{name:`global`,color:t.primary,points:e.series.global},...n.map(([t,n])=>({name:labelOf(t),color:slotColor(n),points:e.series.tags[t]}))];return{animation:!1,grid:{left:8,right:i?96:16,top:36,bottom:48,containLabel:!0},legend:{top:0,data:a.map(e=>e.name),textStyle:{color:t.secondary},selectedMode:!1},tooltip:{trigger:`axis`,formatter:e=>{let t=Number(e[0]?.axisValue);if(!Number.isFinite(t))return``;let n=a.map(e=>({s:e,value:valueAt(e.points,t)})).filter(e=>e.value!==null).map(({s:e,value:t})=>`<span style="display:inline-block;width:8px;height:8px;border-radius:4px;margin-right:6px;background:${e.color}"></span>${escapeHtml(e.name)} ${t}`);return[fmtTime(new Date(t).toISOString()),...n].join(`<br/>`)}},xAxis:{type:`time`,axisLabel:{color:t.muted},axisLine:{lineStyle:{color:t.axis}},splitLine:{show:!1}},yAxis:{type:`value`,scale:!0,axisLabel:{color:t.muted},splitLine:{lineStyle:{color:t.grid}}},dataZoom:[{type:`inside`},{type:`slider`,height:16,bottom:8}],series:[...r.map(n=>({type:`line`,name:n.tag,data:toData(e.series.tags[n.tag]),step:`end`,showSymbol:!1,triggerLineEvent:!0,lineStyle:{width:1,color:R.value},itemStyle:{color:R.value},emphasis:{lineStyle:{width:2,color:t.muted}},z:1})),...a.map((e,n)=>({type:`line`,name:e.name,data:toData(e.points),step:`end`,showSymbol:!1,triggerLineEvent:!0,lineStyle:{width:2,color:e.color},itemStyle:{color:e.color},endLabel:{show:n===0||i,formatter:e.name,color:t.secondary},z:n===0?3:4}))]}});function onLineClick(e){if(e.componentType!==`series`||typeof e.seriesName!=`string`)return;let t=l.value?.series.tags[e.seriesName]===void 0?[...A.value.keys()].find(t=>labelOf(t)===e.seriesName):e.seriesName;t&&toggle(t)}function signed(e){return e===null?`—`:e>0?`+${e}`:String(e)}function fmtDate(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString()}function staleTitle(e){return e.staleScore===void 0?`counted, not rated`:`counted, not rated: the bracketed score predates count-only roles and is ignored`}let re=g(()=>{let e=l.value,t=(e?.rows??[]).filter(e=>e.score!==null),n=k.value.map(e=>e.vsGlobal).sort((e,t)=>e-t),r=n.length?n[Math.floor(n.length/2)]:null;return[{label:`global ELO (${e?.global.count??0} responses)`,value:e?.global.score??`—`},{label:`rated tags in view`,value:`${k.value.length} / ${t.length}`},{label:`median vs global, in view`,value:signed(r)},{label:`trajectories from`,value:fmtDate(e?.seriesFrom??null)}]});return(i,s)=>{let d=a(`v-alert`),g=a(`v-card`),y=a(`v-col`),E=a(`v-row`),O=a(`v-chip`),j=a(`v-chip-group`),M=a(`v-btn`),N=a(`v-btn-toggle`),P=a(`v-text-field`),I=a(`v-spacer`),L=a(`v-table`);return n(),p(`div`,null,[l.value?(n(),p(m,{key:1},[s[17]||(s[17]=f(`p`,{class:`text-caption text-medium-emphasis mb-4`},[c(` The learner's ELO on each tag (from their course registration) beside their global ELO. A tag's rating starts at the learner's global ELO when first graded and moves only on responses that grade it: read it with its response count. Bookkeeping tags (`),f(`code`,null,`intro`),c(`, `),f(`code`,null,`expose`),c(`) are counted, never rated, and are hidden by default. `)],-1)),t(E,{dense:``,class:`mb-2`},{default:e(()=>[(n(!0),p(m,null,u(re.value,i=>(n(),b(y,{key:i.label,cols:`6`,sm:`3`},{default:e(()=>[t(g,{variant:`tonal`,color:`primary`,class:`pa-2 text-center`},{default:e(()=>[f(`div`,Fh,r(i.value),1),f(`div`,Ih,r(i.label),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),f(`div`,Lh,[t(j,{modelValue:v.value,"onUpdate:modelValue":s[0]||(s[0]=e=>v.value=e),multiple:``,column:``,"selected-class":`text-primary`},{default:e(()=>[(n(!0),p(m,null,u(h.value,t=>(n(),b(O,{key:t.key,value:t.key,size:`small`,filter:``,variant:t.course?`outlined`:`tonal`,title:t.course?`course batch`:`namespace × role`},{default:e(()=>[c(r(t.batch.label)+` (`+r(t.matches)+`) `,1)]),_:2},1032,[`value`,`variant`,`title`]))),128))]),_:1},8,[`modelValue`])]),f(`div`,Rh,[t(N,{modelValue:S.value,"onUpdate:modelValue":s[1]||(s[1]=e=>S.value=e),mandatory:``,density:`compact`,color:`primary`,variant:`outlined`},{default:e(()=>[t(M,{value:`score`,size:`small`},{default:e(()=>s[6]||(s[6]=[c(`ELO`)])),_:1}),t(M,{value:`count`,size:`small`},{default:e(()=>s[7]||(s[7]=[c(`Responses`)])),_:1}),t(M,{value:`lastSeen`,size:`small`},{default:e(()=>s[8]||(s[8]=[c(`Last seen`)])),_:1}),t(M,{value:`tag`,size:`small`},{default:e(()=>s[9]||(s[9]=[c(`Name`)])),_:1})]),_:1},8,[`modelValue`]),t(P,{modelValue:w.value,"onUpdate:modelValue":s[2]||(s[2]=e=>w.value=e),modelModifiers:{number:!0},type:`number`,min:`0`,density:`compact`,variant:`outlined`,"hide-details":``,label:`min responses`,style:{"max-width":`140px`}},null,8,[`modelValue`]),t(P,{modelValue:T.value,"onUpdate:modelValue":s[3]||(s[3]=e=>T.value=e),density:`compact`,variant:`outlined`,"hide-details":``,clearable:``,placeholder:`filter by tag`,"prepend-inner-icon":`mdi-magnify`,style:{"max-width":`280px`}},null,8,[`modelValue`]),t(I),f(`span`,zh,[c(r(A.value.size)+`/`+r(ng)+` plotted `,1),A.value.size?(n(),b(M,{key:0,variant:`text`,size:`x-small`,onClick:s[4]||(s[4]=e=>A.value=new Map)},{default:e(()=>s[10]||(s[10]=[c(`clear`)])),_:1})):x(``,!0)])]),D.value.length===0?(n(),b(d,{key:0,type:`info`,variant:`tonal`},{default:e(()=>s[11]||(s[11]=[c(`No tags match these filters.`)])),_:1})):(n(),b(E,{key:1},{default:e(()=>[t(y,{cols:`12`,md:`5`},{default:e(()=>[s[12]||(s[12]=f(`div`,{class:`text-subtitle-2`},`ELO by tag`,-1)),s[13]||(s[13]=f(`div`,{class:`text-caption text-medium-emphasis mb-1`},` Dot size: responses (log scale). Click a dot or a name to plot its trajectory. `,-1)),k.value.length?(n(),b(Ph,{key:0,option:te.value,height:z.value,onClick:onDotClick},null,8,[`option`,`height`])):(n(),p(`div`,Bh,`No rated tags in this selection.`))]),_:1}),t(y,{cols:`12`,md:`7`},{default:e(()=>[f(`div`,Vh,[s[14]||(s[14]=f(`div`,{class:`text-subtitle-2`},`Trajectories`,-1)),f(`div`,Hh,[l.value.seriesFrom?(n(),p(m,{key:0},[c(` From `+r(_(fmtTime)(l.value.seriesFrom))+`, when sessions began recording ELO events. Faint lines are the other tags in view; click one to plot it. A jump between recorded events is a session that didn't save its events. `,1)],64)):(n(),p(m,{key:1},[c(`No session in this dataset recorded ELO events.`)],64))]),l.value.seriesFrom?(n(),b(Ph,{key:0,option:ne.value,height:380,onClick:onLineClick},null,8,[`option`])):x(``,!0)])]),_:1})]),_:1})),D.value.length?(n(),b(L,{key:2,density:`compact`,class:`mt-4 sk-tag-elo-table`},{default:e(()=>[s[16]||(s[16]=f(`thead`,null,[f(`tr`,null,[f(`th`,null,`Tag`),f(`th`,null,`Batch`),f(`th`,{class:`text-right`},`ELO`),f(`th`,{class:`text-right`},`vs global`),f(`th`,{class:`text-right`},`Responses`),f(`th`,null,`Recent first attempts`),f(`th`,null,`First seen`),f(`th`,null,`Last seen`),f(`th`,{class:`text-right`},`ELO events`)])],-1)),f(`tbody`,null,[(n(!0),p(m,null,u(D.value,e=>(n(),p(`tr`,{key:e.tag,class:o({"sk-pickable":e.score!==null}),onClick:t=>e.score!==null&&toggle(e.tag)},[f(`td`,null,[f(`span`,{class:`sk-swatch`,style:C({background:A.value.has(e.tag)?slotColor(A.value.get(e.tag)):`transparent`})},null,4),f(`code`,Wh,r(e.tag),1)]),f(`td`,Gh,r(e.group),1),f(`td`,Kh,[e.score===null?(n(),p(`span`,{key:1,class:`text-disabled`,title:staleTitle(e)},[s[15]||(s[15]=c(` —`)),e.staleScore===void 0?x(``,!0):(n(),p(m,{key:0},[c(` (`+r(e.staleScore)+`)`,1)],64))],8,qh)):(n(),p(m,{key:0},[c(r(e.score),1)],64))]),f(`td`,{class:o([`text-right`,_(deltaClass)(e.vsGlobal)])},r(signed(e.vsGlobal)),3),f(`td`,Jh,r(e.count),1),f(`td`,null,[e.recent.length?(n(),p(`span`,Yh,[(n(!0),p(m,null,u(e.recent,(e,t)=>(n(),p(`span`,{key:t,class:o([`sk-tick`,e.ok?`bg-success`:`bg-error`]),title:`${_(fmtTime)(e.at)} · ${e.ok?`correct`:`missed`} · ${e.card}`},null,10,Xh))),128)),f(`span`,Zh,r(e.recentOk)+`/`+r(e.recent.length),1)])):(n(),p(`span`,Qh,`—`))]),f(`td`,$h,r(fmtDate(e.firstSeen)),1),f(`td`,eg,r(fmtDate(e.lastSeen)),1),f(`td`,tg,r(e.events||``),1)],10,Uh))),128))])]),_:1})):x(``,!0)],64)):(n(),b(d,{key:0,type:`info`,variant:`tonal`},{default:e(()=>s[5]||(s[5]=[c(` This learner's registration carries no ELO for this course. `)])),_:1}))])}}}),[[`__scopeId`,`data-v-ec9e083c`]]),ag={class:`sk-pipeline`},og={class:`d-flex flex-wrap align-center ga-2 mb-3`},sg={class:`text-caption`},cg={key:0,class:`text-caption text-medium-emphasis`},lg={class:`sk-stage`},ug={class:`d-flex align-center mb-1`},dg={class:`sk-stage-num`},fg={class:`font-weight-medium`},pg={class:`text-caption text-medium-emphasis mb-2`},mg={class:`d-flex flex-wrap align-center ga-2`},hg={class:`font-weight-medium`},gg={class:`text-caption`},_g={key:0,class:`text-caption mt-1`},vg={key:1,class:`text-caption mt-1`},yg={key:1,class:`text-medium-emphasis`},bg={key:2,class:`mt-1`},xg=[`onClick`],Sg={key:0,class:`sk-config`},Cg={key:0,class:`text-caption text-medium-emphasis`},wg={class:`d-flex flex-wrap align-center ga-2`},Tg={class:`font-weight-medium`},Eg={class:`text-caption`},Dg={key:0,class:`text-caption mt-1`},Og={key:1,class:`text-caption mt-1 text-medium-emphasis`},kg={key:2,class:`mt-1`},Ag={class:`sk-impact-bar`},jg=[`title`],Mg={class:`text-caption`},Ng={key:1,class:`text-caption text-medium-emphasis`},Pg={key:3,class:`mt-1`},Fg=[`onClick`],Ig={key:0,class:`sk-config`},Lg={class:`sk-nav`},Rg={class:`d-flex flex-wrap align-center ga-2`},zg={class:`text-caption mt-1`},Bg={key:0,class:`text-caption mt-1`},Vg={class:`sk-nav`},Hg={class:`d-flex flex-wrap align-center ga-2`},Ug={class:`text-caption mt-1`},Wg={key:0,class:`text-caption mt-1`},Gg={key:0,class:`text-caption text-medium-emphasis`},Kg={key:3,class:`text-caption`},qg={key:0,class:`sk-stage-arrow`},Jg={key:0,class:`text-caption text-medium-emphasis mt-3`},Yg=se(l({__name:`PipelineOverview`,props:{strategies:{},courseId:{},stats:{},statsLabel:{}},setup(i){let s=i,l={"strategy-doc":{label:`strategy doc`,color:`primary`},"assembler-default":{label:`added by the assembler`,color:`secondary`},"default-pipeline":{label:`default pipeline`,color:`warning`}},regStat=e=>s.stats?.regulators.find(t=>t.name===e);function regStatText(e){return`In these runs: active (×>1) in ${e.runsActive}/${e.runs}, mean ×${e.meanMultiplier.toFixed(2)}, max ×${e.maxMultiplier.toFixed(2)}. Last: ${regulatorText(e.last)}.`}let d={gate:`Gate: its penalties mean not ready yet; regulators will not lift what it penalized.`,signal:`Signal: its penalties express preference.`};function filterKind(e){let t=e.kind??filterStat(e.name)?.kind;return t?{kind:t,label:t,help:d[t]}:{kind:`gate`,label:`gate (undeclared)`,help:`${d.gate} Its class declares no kind, so it counts as a gate.`}}let h=g(()=>E(s.strategies,s.courseId)),v=g(()=>new Map((s.stats?.generators??[]).map(e=>[e.name,e]))),S=g(()=>new Map((s.stats?.filters??[]).map(e=>[e.name,e]))),genStat=e=>v.value.get(e),filterStat=e=>S.value.get(e),w=g(()=>{let e=[...h.value.notes],t=s.stats;if(!t)return e;for(let t of h.value.filters){let n=filterStat(t.name);n&&n.boosted+n.penalized+n.removed===0&&e.push(`${t.name} changed no candidate's score in ${n.runs} runs.`)}if(t.runsWithSelection>0)for(let t of h.value.generators){let n=genStat(t.name);n&&n.runs>0&&n.selected===0&&e.push(`${t.name} proposed candidates in ${n.runs} runs, and none was selected.`)}return e});function accuracyOf(e){return e.firstAttempts>0?e.firstAttemptsCorrect/e.firstAttempts:null}function impactParts(e){let t=e.boosted+e.penalized+e.passed+e.removed||1;return[{key:`boosted`,count:e.boosted,color:`success`},{key:`penalized`,count:e.penalized,color:`warning`},{key:`passed`,count:e.passed,color:`grey`},{key:`removed`,count:e.removed,color:`error`}].map(e=>({...e,share:e.count/t}))}function fmtNum(e){return e>=10?Math.round(e).toString():e.toFixed(1)}function fmtPct(e){return e===0?`0%`:e<.01?`<1%`:`${Math.round(e*100)}%`}let T=y(new Set);function toggleConfig(e){let t=new Set(T.value);t.has(e)?t.delete(e):t.add(e),T.value=t}function prettyConfig(e){if(!e)return``;try{let t=JSON.parse(e),n=JSON.stringify(t,null,2);return n===`{}`?``:n}catch{return e}}return(i,s)=>{let d=a(`v-chip`),g=a(`v-alert`),v=a(`v-icon`);return n(),p(`div`,ag,[f(`div`,og,[t(d,{size:`small`,variant:`tonal`,color:h.value.kind===`default`?`warning`:`primary`},{default:e(()=>[c(r(h.value.kind===`default`?`default pipeline: the course has no strategy docs`:`assembled from strategy docs`),1)]),_:1},8,[`color`]),f(`span`,sg,r(h.value.generators.length)+` generator(s) · `+r(h.value.filters.length)+` filter(s) `,1),i.stats?(n(),p(`span`,cg,` · run stats`+r(i.statsLabel?` for ${i.statsLabel}`:``)+`: `+r(i.stats.runs)+` runs over `+r(i.stats.sessions)+` sessions, `+r(_(fmtTime)(i.stats.firstRunAt))+` – `+r(_(fmtTime)(i.stats.lastRunAt)),1)):x(``,!0)]),(n(!0),p(m,null,u(h.value.skipped,t=>(n(),b(g,{key:t.strategy._id,type:`warning`,variant:`tonal`,density:`compact`,class:`mb-2`},{default:e(()=>[f(`strong`,null,r(t.strategy.name),1),s[0]||(s[0]=c(` (`)),f(`code`,null,r(t.strategy.implementingClass),1),c(`) is `+r(t.reason)+` in this app, so it would not run here. A course's own navigators only plan correctly in the app that registers them. `,1)]),_:2},1024))),128)),(n(!0),p(m,null,u(h.value.warnings,t=>(n(),b(g,{key:t,type:`warning`,variant:`tonal`,density:`compact`,class:`mb-2`},{default:e(()=>[c(r(t),1)]),_:2},1024))),128)),(n(!0),p(m,null,u(w.value,t=>(n(),b(g,{key:t,type:`info`,variant:`tonal`,density:`compact`,class:`mb-2`},{default:e(()=>[c(r(t),1)]),_:2},1024))),128)),(n(!0),p(m,null,u(_(D),(a,g)=>(n(),p(`div`,{key:a.key},[f(`div`,lg,[f(`div`,ug,[f(`span`,dg,r(g+1),1),f(`span`,fg,r(a.title),1)]),f(`div`,pg,r(a.summary),1),a.key===`generate`?(n(!0),p(m,{key:0},u(h.value.generators,a=>(n(),p(`div`,{key:a.name,class:`sk-nav`},[f(`div`,mg,[f(`span`,hg,r(a.name),1),f(`code`,gg,r(a.implementingClass),1),t(d,{size:`x-small`,variant:`outlined`,color:l[a.origin].color},{default:e(()=>[c(r(l[a.origin].label),1)]),_:2},1032,[`color`])]),a.strategy?.description?(n(),p(`div`,_g,r(a.strategy.description),1)):x(``,!0),i.stats?(n(),p(`div`,vg,[genStat(a.name)?(n(),p(m,{key:0},[c(r(fmtNum(genStat(a.name).meanCards))+` candidates/run (`+r(fmtNum(genStat(a.name).meanNew))+` new, `+r(fmtNum(genStat(a.name).meanReview))+` review) · top score `+r(genStat(a.name).topScoreLast.toFixed(2))+` last, `+r(genStat(a.name).topScoreMax.toFixed(2))+` max `,1),i.stats.runsWithSelection>0?(n(),p(m,{key:0},[s[1]||(s[1]=c(` · `)),f(`strong`,null,r(genStat(a.name).selected),1),s[2]||(s[2]=c(` selected `)),genStat(a.name).firstAttempts>0?(n(),p(m,{key:0},[c(` · first attempts `+r(genStat(a.name).firstAttemptsCorrect)+`/`+r(genStat(a.name).firstAttempts)+` correct `,1),f(`span`,{class:o(_(accuracyClass)(accuracyOf(genStat(a.name))))},` (`+r(Math.round(100*accuracyOf(genStat(a.name))))+`%) `,3)],64)):x(``,!0)],64)):x(``,!0)],64)):(n(),p(`span`,yg,`absent from these runs`))])):x(``,!0),prettyConfig(a.strategy?.serializedData)?(n(),p(`div`,bg,[f(`a`,{class:`sk-config-link text-caption`,onClick:e=>toggleConfig(`g:${a.name}`)},r(T.value.has(`g:${a.name}`)?`Hide`:`Show`)+` config `,9,xg),T.value.has(`g:${a.name}`)?(n(),p(`pre`,Sg,r(prettyConfig(a.strategy?.serializedData)),1)):x(``,!0)])):x(``,!0)]))),128)):a.key===`filter`?(n(),p(m,{key:1},[h.value.filters.length===0?(n(),p(`div`,Cg,`No filters.`)):x(``,!0),(n(!0),p(m,null,u(h.value.filters,a=>(n(),p(`div`,{key:a.name,class:`sk-nav`},[f(`div`,wg,[f(`span`,Tg,r(a.name),1),f(`code`,Eg,r(a.implementingClass),1),t(d,{size:`x-small`,variant:`outlined`,color:l[a.origin].color},{default:e(()=>[c(r(l[a.origin].label),1)]),_:2},1032,[`color`]),a.strategy?.learnable?(n(),b(d,{key:0,size:`x-small`,variant:`outlined`},{default:e(()=>s[3]||(s[3]=[c(`learnable weight`)])),_:1})):x(``,!0),t(d,{size:`x-small`,variant:`tonal`,color:filterKind(a).kind===`gate`?`deep-orange`:`blue-grey`,title:filterKind(a).help},{default:e(()=>[c(r(filterKind(a).label),1)]),_:2},1032,[`color`,`title`])]),a.strategy?.description?(n(),p(`div`,Dg,r(a.strategy.description),1)):a.strategy?x(``,!0):(n(),p(`div`,Og,` Built in code; no strategy document. `)),i.stats?(n(),p(`div`,kg,[filterStat(a.name)?(n(),p(m,{key:0},[f(`div`,Ag,[(n(!0),p(m,null,u(impactParts(filterStat(a.name)),e=>(n(),p(`div`,{key:e.key,class:o(`bg-${e.color}`),style:C({width:`${e.share*100}%`}),title:`${e.key}: ${e.count}`},null,14,jg))),128))]),f(`div`,Mg,[c(` over `+r(filterStat(a.name).runs)+` runs: `,1),(n(!0),p(m,null,u(impactParts(filterStat(a.name)),e=>(n(),p(`span`,{key:e.key,class:`mr-2`},[f(`span`,{class:o(`text-${e.color}`)},`●`,2),c(` `+r(e.key)+` `+r(fmtPct(e.share)),1)]))),128))])],64)):(n(),p(`span`,Ng,`absent from these runs`))])):x(``,!0),prettyConfig(a.strategy?.serializedData)?(n(),p(`div`,Pg,[f(`a`,{class:`sk-config-link text-caption`,onClick:e=>toggleConfig(`f:${a.name}`)},r(T.value.has(`f:${a.name}`)?`Hide`:`Show`)+` config `,9,Fg),T.value.has(`f:${a.name}`)?(n(),p(`pre`,Ig,r(prettyConfig(a.strategy?.serializedData)),1)):x(``,!0)])):x(``,!0)]))),128))],64)):a.key===`regulate`?(n(),p(m,{key:2},[f(`div`,Lg,[f(`div`,Rg,[s[5]||(s[5]=f(`span`,{class:`font-weight-medium`},`Review mass`,-1)),t(d,{size:`x-small`,variant:`outlined`},{default:e(()=>s[4]||(s[4]=[c(`on review cards`)])),_:1})]),f(`div`,zg,` Each due review weighs its SRS urgency (0–1) times the filters' net effect on it. Above `+r(h.value.regulators.reviewMass.healthyMass)+` card-equivalents, every review is multiplied by ×`+r(h.value.regulators.reviewMass.rate)+` per `+r(h.value.regulators.reviewMass.healthyMass)+` in excess (uncapped). Reviews without an urgency weigh their score against `+r(h.value.regulators.reviewMass.referenceScore)+`. `,1),regStat(`review-mass`)?(n(),p(`div`,Bg,r(regStatText(regStat(`review-mass`))),1)):x(``,!0)]),f(`div`,Vg,[f(`div`,Hg,[s[7]||(s[7]=f(`span`,{class:`font-weight-medium`},`Intake`,-1)),t(d,{size:`x-small`,variant:`outlined`},{default:e(()=>s[6]||(s[6]=[c(`on new cards no gate penalized`)])),_:1})]),f(`div`,Ug,` ×`+r(h.value.regulators.intake.rate)+` per `+r(h.value.regulators.intake.scaleHours)+` hours since a new card was last presented (uncapped). The clock stops while no eligible new card exists. `,1),regStat(`intake`)?(n(),p(`div`,Wg,r(regStatText(regStat(`intake`))),1)):x(``,!0)]),i.stats&&i.stats.regulators.length===0?(n(),p(`div`,Gg,` None of these runs recorded regulator readings (recorded from 0.2.29). `)):x(``,!0)],64)):a.key===`select`&&i.stats&&i.stats.runsWithSelection>0?(n(),p(`div`,Kg,[c(r(i.stats.selectedUnattributed)+` selected card(s) had no generator: forced in by a hint's `,1),s[8]||(s[8]=f(`code`,null,`requireCards`,-1)),s[9]||(s[9]=c(`. `))])):x(``,!0)]),g<_(D).length-1?(n(),p(`div`,qg,[t(v,{size:`small`},{default:e(()=>s[10]||(s[10]=[c(`mdi-arrow-down`)])),_:1})])):x(``,!0)]))),128)),i.stats&&i.stats.runsWithSelection===0?(n(),p(`div`,Jg,` None of these runs recorded which cards they selected (recorded from 0.2.28), so selection and first-attempt counts are not shown. `)):x(``,!0)])}}}),[[`__scopeId`,`data-v-24b6038f`]]),Xg=l({__name:`LearnerDiagnostics`,props:{dataset:{},interpreters:{}},setup(i){let o=i,s=y(`sessions`),l=y(null),u=y(void 0),f=g(()=>pipelineRunStats(o.dataset));function openCard(e){u.value=void 0,s.value=`cards`,setTimeout(()=>u.value=e)}return d(()=>o.dataset,()=>{s.value=`sessions`,l.value=null,u.value=void 0}),(i,o)=>{let d=a(`v-tab`),h=a(`v-tabs`),g=a(`v-btn`);return n(),p(`div`,null,[t(h,{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=e=>s.value=e),density:`compact`,class:`mb-4`},{default:e(()=>[t(d,{value:`sessions`},{default:e(()=>[c(`Sessions (`+r(i.dataset.sessions.length)+`)`,1)]),_:1}),t(d,{value:`cards`},{default:e(()=>[c(`Cards (`+r(i.dataset.cardHistories.length)+`)`,1)]),_:1}),i.dataset.strategies?(n(),b(d,{key:0,value:`pipeline`},{default:e(()=>o[3]||(o[3]=[c(`Pipeline`)])),_:1})):x(``,!0),t(d,{value:`elo`},{default:e(()=>o[4]||(o[4]=[c(`ELO`)])),_:1})]),_:1},8,[`modelValue`]),s.value===`sessions`?(n(),p(m,{key:0},[l.value?(n(),p(m,{key:0},[t(g,{variant:`text`,size:`small`,"prepend-icon":`mdi-arrow-left`,class:`mb-2`,onClick:o[1]||(o[1]=e=>l.value=null)},{default:e(()=>o[5]||(o[5]=[c(` All sessions `)])),_:1}),t(Ot,{dataset:i.dataset,"session-id":l.value,interpreters:i.interpreters,onOpenCard:openCard},null,8,[`dataset`,`session-id`,`interpreters`])],64)):(n(),b(Ut,{key:1,dataset:i.dataset,interpreters:i.interpreters,onOpen:o[2]||(o[2]=e=>l.value=e)},null,8,[`dataset`,`interpreters`]))],64)):s.value===`cards`?(n(),b(ve,{key:1,dataset:i.dataset,interpreters:i.interpreters,focus:u.value},null,8,[`dataset`,`interpreters`,`focus`])):s.value===`pipeline`&&i.dataset.strategies?(n(),b(Yg,{key:2,strategies:i.dataset.strategies,"course-id":i.dataset.courseId,stats:f.value,"stats-label":i.dataset.username},null,8,[`strategies`,`course-id`,`stats`,`stats-label`])):s.value===`elo`?(n(),b(ig,{key:3,dataset:i.dataset,interpreters:i.interpreters},null,8,[`dataset`,`interpreters`])):x(``,!0)])}}});export{fetchLearnerDump as a,cardDossiers as i,Xg as n,fromDump as o,L as r,ce as t};
|
|
21
|
+
//# sourceMappingURL=admin-Dt07rW2C.js.map
|